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
Test the Str::words method.
public function testStringCanBeLimitedByWords() { $this->assertEquals('Taylor...', Str::words('Taylor Otwell', 1)); $this->assertEquals('Taylor___', Str::words('Taylor Otwell', 1, '___')); $this->assertEquals('Taylor Otwell', Str::words('Taylor Otwell', 3)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWords()\n {\n $str = new Str($this->testString);\n $result = $str->words();\n $this->assertTrue(is_array($result));\n $this->assertTrue($result[0] === 'The');\n }", "public function testWordsSplitByLetter()\n {\n $str = new Str($this->testString);\n $result = $str->words('/o/');\n $this->assertTrue(is_array($result));\n $this->assertTrue($result[0] === 'The quick br');\n }", "public function testWordsSplitByLetterWithIgnore()\n {\n $str = new Str($this->testString);\n $result = $str->words('/o/', true);\n $this->assertTrue(is_array($result));\n $this->assertTrue($result[0] === 'The quick br');\n $this->assertTrue($result[5] === 'wball');\n }", "public function testWordsSplitByNullWithIgnore()\n {\n $str = new Str($this->testString);\n $result = $str->words(null, true);\n $this->assertTrue(is_array($result));\n $this->assertTrue($result[0] === 'The');\n }", "public function testWordsCount()\n {\n $text = \"este es un un texto de prueba\";\n $countWords = HelpersMan::count_words_repeated($text);\n\n $this->assertTrue($countWords['un'] == 2);\n }", "public function testSplitWords()\n {\n $words = '123 123 45 789';\n $filter = new \\Magento\\Framework\\Filter\\SplitWords(false, 3);\n $this->assertEquals(['123', '123', '45'], $filter->filter($words));\n $filter = new \\Magento\\Framework\\Filter\\SplitWords(true, 2);\n $this->assertEquals(['123', '45'], $filter->filter($words));\n }", "static function words(string $s, int $words = 100, string $end = '...') {\n preg_match('/^\\s*+(?:\\S++\\s*+){1,'.$words.'}/u', $s, $matches);\n if (!isset($matches[0]) || static::length($s) === static::length($matches[0])) {\n return $s;\n }\n\n return rtrim($matches[0]).$end;\n }", "function clean_my_words($words) {\n return strtolower($words);\n }", "public function testForSmallWords() {\n $ret = $this->resolucao->textWrap($this->baseString, 8);\n $this->assertEquals(\"Se vi\", $ret[0]);\n $this->assertEquals(\"mais\", $ret[1]);\n $this->assertEquals(\"longe\", $ret[2]);\n $this->assertEquals(\"foi por\", $ret[3]);\n $this->assertEquals(\"estar de\", $ret[4]);\n $this->assertEquals(\"pé sobre\", $ret[5]);\n $this->assertEquals(\"ombros\", $ret[6]);\n $this->assertEquals(\"de\", $ret[7]);\n $this->assertEquals(\"gigantes\", $ret[8]);\n $this->assertCount(9, $ret);\n }", "public function countWordsInStringReturnsArray()\n {\n $this->initializeSUT();\n $stringContent = \"My test text\";\n $actual = $this->stringUtil->countWordsInString($stringContent);\n\n $this->assertInternalType('array', $actual);\n }", "public function testShortValuableWord() : void\n {\n $word = 'zoo';\n $this->assertEquals(12, score($word));\n }", "public function testSpellingWithNoNumbers()\n {\n $result = $this->NumbersToWords->spell('Dave is great!');\n $expected = 'Dave is great!';\n\n $this->assertSame($expected, $result);\n }", "public function testWords($word, $expectedResult) {\n $game = new Game('poop');\n\n $game->tryWord($word);\n\n $this->assertSame($expectedResult, $game->isWon());\n }", "function & _split_words( & $string )\n {\n $string = preg_replace($this->_pattern, \"\", $string);\n $string = str_replace($this->_convert_str,\" \",$string);\n $content_array = explode(\" \",$string); \n $array_content = array_count_values($content_array);\n $_tmp = array();\n\n while ($word = each ($array_content))\n { \n if(strlen($word[0])>$this->_word_length)\n {\n $word[0] = strtolower($word[0]);\n if(!isset($this->bad_word_array[$word[0]]))\n { \n $_tmp[] = $word[0];\n }\n }\n }\n return $_tmp;\n }", "public function testLongMixedCaseWord() : void\n {\n $word = 'OxyphenButazone';\n $this->assertEquals(41, score($word));\n }", "function whisperWords($words)\n{\n return array_map(function ($word) {\n return strtolower($word . '...');\n }, $words);\n}", "public function testForSmallWords2() {\n $ret = $this->resolucao->textWrap($this->baseString, 12);\n $this->assertEquals(\"Se vi mais\", $ret[0]);\n $this->assertEquals(\"longe foi\", $ret[1]);\n $this->assertEquals(\"por estar de\", $ret[2]);\n $this->assertEquals(\"pé sobre\", $ret[3]);\n $this->assertEquals(\"ombros de\", $ret[4]);\n $this->assertEquals(\"gigantes\", $ret[5]);\n $this->assertCount(6, $ret);\n }", "public function testMediumValuableWord() : void\n {\n $word = 'quirky';\n $this->assertEquals(22, score($word));\n }", "public function testEntireAlphabetWord() : void\n {\n $word = 'abcdefghijklmnopqrstuvwxyz';\n $this->assertEquals(87, score($word));\n }", "public function words()\n {\n return self::create('',$this->provider->words()); \n }", "public function testUcwordsSanitizer()\n {\n $this->assertEquals('Fernando Zueet', Sanitize::ucwords()->clean('fernando zueet'));\n\n $this->assertEquals('', Sanitize::ucwords()->clean(10));\n }", "public static function words($value, $words = 100, $end = '...')\n\t{\n\t\tif (trim($value) == '') return '';\n\n\t\tpreg_match('/^\\s*+(?:\\S++\\s*+){1,'.$words.'}/u', $value, $matches);\n\n\t\tif (static::length($value) == static::length($matches[0]))\n\t\t{\n\t\t\t$end = '';\n\t\t}\n\n\t\treturn rtrim($matches[0]).$end;\n\t}", "public static function words(string $value, int $words = 100, string $end = '...'): string\n {\n preg_match('/^\\s*+(?:\\S++\\s*+){1,' . $words . '}/u', $value, $matches);\n\n if (! isset($matches[0]) || static::length($value) === static::length($matches[0])) {\n return $value;\n }\n\n return rtrim($matches[0]) . $end;\n }", "public static function words( $text = '' ) {\n\t\t$words = array();\n\n\t\tif ( empty( $text ) ) {\n\t\t\treturn $words;\n\t\t}\n\t\t$text = join( ' ', self::paragraphs( $text ) );\n\n\t\t$text = preg_replace( '/[^ [:alnum:]]/iu', '', self::lowercase( $text ) );\n\t\t$words = array_filter( explode( ' ', $text ) );\n\n\t\treturn $words;\n\t}", "public function words( $value, $words = 100, $end = '...' ) {\n\t\tif ( trim( $value ) == '' ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tpreg_match( '/^\\s*+(?:\\S++\\s*+){1,'.$words.'}/u', $value, $matches );\n\n\t\tif ( $this->length( $value ) == $this->length( $matches[0] ) ) {\n\t\t\t$end = '';\n\t\t}\n\n\t\treturn rtrim( $matches[0] ).$end;\n\t}", "public function testWordFlipRandomWord()\n {\n $service = new WordService();\n\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $string = $stringFlipped = '';\n for ($i = 0; $i < 10; $i++) {\n $char = $characters[rand(0, strlen($characters)-1)];\n $string = $string.$char;\n $stringFlipped = $char.$stringFlipped;\n }\n\n $this->assertEquals($stringFlipped, $service->wordFlip($string));\n }", "function valid_words ( $str )\n\t{\n\t\t$bReturn = TRUE;\n\t\tif ( $this->forbidden_words === '') return FALSE;\n\t\t$aWords = explode( ',', $this->forbidden_words );\n\t\tforeach( $aWords as $sWord )\n\t\t{\n\t\t\t$sWord = trim( $sWord );\n\t\t\t$uPos = stripos( $str, $sWord );\n\t\t\tif (ereg(\"([0-9])\", $uPos)) // Avoid using boolean because the word can be in 0 (first) position\n\t\t\t{\n\t\t\t\t$bReturn = FALSE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $bReturn;\n\t}", "function common_words($string, $stopWords)\n {\n $string = preg_replace('/ss+/i', '', $string);\n $string = trim($string); // trim the string\n $string = preg_replace('/[^a-zA-Z0-9 -]/', '', $string); // only take alphanumerical characters, but keep the spaces and dashes too...\n $string = strtolower($string); // make it lowercase\n\n preg_match_all('/([a-z]*?)(?=s)/i', $string, $matchWords);\n $matchWords = $matchWords[0];\n foreach ( $matchWords as $key=>$item ) {\n if ( $item == '' || in_array(strtolower($item), $stopWords) || strlen($item) <= 3 ) {\n unset($matchWords[$key]);\n }\n }\n $wordCountArr = array();\n if ( is_array($matchWords) ) {\n foreach ( $matchWords as $key => $val ) {\n $val = strtolower($val);\n if ( isset($wordCountArr[$val]) ) {\n $wordCountArr[$val]++;\n } else {\n $wordCountArr[$val] = 1;\n }\n }\n }\n arsort($wordCountArr);\n $wordCountArr = array_slice($wordCountArr, 0, 10);\n return $wordCountArr;\n }", "function validate_word($data)\n{\n $data = str_replace(chr(194) . chr(160), '', $data);\n $data = str_replace(\" \", \"\", $data);\n $data = mb_strtolower($data);\n return $data;\n}", "function countWords($string)\n{\n\t$array = [];\n\t$array = explode(' ', $string);\n\t$sum = count($array);\n\treturn $sum;\n}", "function checkWords($input, $unwanted_words) {\n foreach ($unwanted_words as $value) {\n if(strpos($input, $value) !== false){ return false; }\n }\n return true;\n }", "public function actionCheckWords()\n {\n\t\t$strWords = $_GET['q'];\n\t\t$queryResulqt='SELECT words FROM badwords';\n\t\t$wordsValue1 =Yii::app()->db->createCommand($queryResulqt)->queryAll();\n\t\t\n\t\tforeach($wordsValue1 as $value)\n\t\t{\n\t\t\t$words[] = trim($value['words']);\n\n\t\t}\n\t\t\n\t\tif(in_array(trim($strWords), $words))\n\t\t{\n\t\t\techo 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 1;\n\t\t}\n\t }", "function words($str) {\n\treturn preg_match_all('#[a-zà-ú]+(?:-[a-zà-ú]+)*#i', $str, $matches) ? $matches[0] : array();\n}", "public function testEmptyWordScore() : void\n {\n $word = '';\n $this->assertEquals(0, score($word));\n }", "public function words($glue=' ') {\n $i = &$this->getInstance();\n $i = preg_replace( '/[^\\pL]/i', $glue, $i );\n $i = preg_replace( '/[,]+/', $glue, $i );\n $this->trim();\n return $this;\n }", "function shouldCountNumberOfWords()\n {\n $counter = new WordCounter(\"Keep the bar green to keep the code clean.\");\n // TODO check that 9, $counter->numberOfWords()\n }", "public function wordCount(){\n\n\t\t\t\treturn str_word_count($this->sentence);\n\n\t\t\t}", "function contains_all($str,array $words) {\r\n if(!is_string($str))\r\n { return false; }\r\n\r\n foreach($words as $word) {\r\n if(!is_string($word) || stripos($str,$word)===false)\r\n { return false; }\r\n }\r\n return true;\r\n}", "public function getValidWords()\n {\n return $this->validWords;\n }", "function shorten_words($string, $wordsreturned)\r\n\t\t\t{\r\n\t\t\t\t$retval = $string; // Just in case of a problem\r\n\t\t\t\t$array = explode(\" \", $string);\r\n\t\t\t\tif (count($array)<=$wordsreturned)\r\n\t\t\t\t{\r\n\t\t\t\t\t$retval = $string;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_splice($array, $wordsreturned);\r\n\t\t\t\t\t$retval = implode(\" \", $array);\r\n\t\t\t\t}\r\n\t\t\t\treturn $retval;\r\n\t\t\t}", "private function getWords(): array\n {\n return explode(\" \", parent::getValue());\n }", "public function words($limit = null) {\n // if a limit has been specified\n if ($limit !== null) {\n // get one entry more than requested\n $limit += 1;\n }\n\n // split the string into words\n $words = $this->splitByRegex('/[^\\\\w\\']+/u', $limit, PREG_SPLIT_NO_EMPTY);\n\n // if a limit has been specified\n if ($limit !== null) {\n // discard the last entry (which contains the remainder of the string)\n array_pop($words);\n }\n\n // return the words\n return $words;\n }", "function dt_count_words( $text, $num_words = 55 ) {\n\t$text = wp_strip_all_tags( $text );\n\t/* translators: If your word count is based on single characters (East Asian characters),\n\t enter 'characters'. Otherwise, enter 'words'. Do not translate into your own language. */\n\tif ( 'characters' == _x( 'words', 'word count: words or characters?', 'the7mk2' ) && preg_match( '/^utf\\-?8$/i', get_option( 'blog_charset' ) ) ) {\n\t\t$text = trim( preg_replace( \"/[\\n\\r\\t ]+/\", ' ', $text ), ' ' );\n\t\tpreg_match_all( '/./u', $text, $words_array );\n\t\t$words_array = array_slice( $words_array[0], 0, null );\n\t} else {\n\t\t$words_array = preg_split( \"/[\\n\\r\\t ]+/\", $text, -1, PREG_SPLIT_NO_EMPTY );\n\t}\n\n\treturn count( $words_array );\n}", "function badwords($str){\r\n\r\n $query = mysql_query(\"SELECT word FROM naughtywords\");\r\n \r\n while ($info = mysql_fetch_array($query)){\r\n if (strstr(strtolower($str), strtolower($info[\"word\"])) == TRUE){\r\n $bad = 1;\r\n }\r\n }\r\n \r\n if ($bad == 1){\r\n return TRUE;\r\n }else{\r\n return FALSE;\r\n } \r\n}", "function getWords() {\r\r\n\t\t$arr = array();\r\r\n\t\tif ($this->table != '' && $this->field != '') {\r\r\n\t\t\t$sql = 'SELECT '.KT_escapeFieldName($this->field).' AS myfield FROM '.$this->table; \r\r\n\t\t\t$rs = $this->tNG->connection->Execute($sql);\r\r\n\t\t\tif ($this->tNG->connection->errorMsg()!='') {\r\r\n\t\t\t\t$this->error = new tNG_error('BADWORDS_SQL_ERROR', array(), array($this->tNG->connection->errorMsg(), $sql));\r\r\n\t\t\t\treturn $arr;\r\r\n\t\t\t}\r\r\n\t\t\twhile (!$rs->EOF) {\r\r\n\t\t\t\t$arr[] = trim($rs->Fields('myfield'));\r\r\n\t\t\t\t$rs->MoveNext();\r\r\n\t\t\t}\r\r\n\t\t\t$rs->Close();\r\r\n\t\t} else {\r\r\n\t\t\t$file = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tNG_ChkForbiddenWords.txt';\r\r\n\t\t \tif (!file_exists($file)) {\r\r\n\t\t \t\t$this->error = new tNG_error('BADWORDS_FILE_ERROR', array(), array($file));\r\r\n\t\t \treturn $arr;\r\r\n\t\t \t}\r\r\n\t\t \tif ($fd = @fopen($file, 'rb')) {\r\r\n\t\t\t\twhile (!feof ($fd)) {\r\r\n\t\t \t\t\t$tmp = fgets($fd, 4096);\r\r\n\t\t \t\t\t$tmp = addcslashes($tmp, '/.()[]{}|^$');\r\r\n\t\t \t\t\tif (trim($tmp) != '') {\r\r\n\t\t \t\t\t\t$arrTmp = explode(',', $tmp);\r\r\n\t\t \t\t\tforeach ($arrTmp as $k => $v) {\r\r\n\t\t \t\t\t\t$arr[] = trim($v);\r\r\n\t\t \t\t \t}\r\r\n\t\t \t\t}\r\r\n\t\t \t}\r\r\n\t\t \tfclose ($fd);\r\r\n\t\t \t} else {\r\r\n\t\t \t$this->error = new tNG_error('BADWORDS_FILE_ERROR', array(), array($file));\r\r\n\t\t\t\treturn $arr;\r\r\n\t\t \t}\r\r\n\t\t}\r\r\n\t\treturn $arr;\r\r\n\t}", "public function testWordFlipEmptyString()\n {\n $service = new WordService();\n\n $this->assertEquals('', $service->wordFlip(''));\n }", "function parse_words()\n\t{\n\t\t//list of commonly used words\n\t\t// this can be edited to suit your needs\n\t\t$common = array(\"able\", \"about\", \"above\", \"act\", \"add\", \"afraid\", \"after\", \"again\", \"against\", \"age\", \"ago\", \"agree\", \"all\", \"almost\", \"alone\", \"along\", \"already\", \"also\", \"although\", \"always\", \"am\", \"amount\", \"an\", \"and\", \"anger\", \"angry\", \"animal\", \"another\", \"answer\", \"any\", \"appear\", \"apple\", \"are\", \"arrive\", \"arm\", \"arms\", \"around\", \"arrive\", \"as\", \"ask\", \"at\", \"attempt\", \"aunt\", \"away\", \"back\", \"bad\", \"bag\", \"bay\", \"be\", \"became\", \"because\", \"become\", \"been\", \"before\", \"began\", \"begin\", \"behind\", \"being\", \"bell\", \"belong\", \"below\", \"beside\", \"best\", \"better\", \"between\", \"beyond\", \"big\", \"body\", \"bone\", \"born\", \"borrow\", \"both\", \"bottom\", \"box\", \"boy\", \"break\", \"bring\", \"brought\", \"bug\", \"built\", \"busy\", \"but\", \"buy\", \"by\", \"call\", \"came\", \"can\", \"cause\", \"choose\", \"close\", \"close\", \"consider\", \"come\", \"consider\", \"considerable\", \"contain\", \"continue\", \"could\", \"cry\", \"cut\", \"dare\", \"dark\", \"deal\", \"dear\", \"decide\", \"deep\", \"did\", \"die\", \"do\", \"does\", \"dog\", \"done\", \"doubt\", \"down\", \"during\", \"each\", \"ear\", \"early\", \"eat\", \"effort\", \"either\", \"else\", \"end\", \"enjoy\", \"enough\", \"enter\", \"even\", \"ever\", \"every\", \"except\", \"expect\", \"explain\", \"fail\", \"fall\", \"far\", \"fat\", \"favor\", \"fear\", \"feel\", \"feet\", \"fell\", \"felt\", \"few\", \"fill\", \"find\", \"fit\", \"fly\", \"follow\", \"for\", \"forever\", \"forget\", \"from\", \"front\", \"gave\", \"get\", \"gives\", \"goes\", \"gone\", \"good\", \"got\", \"gray\", \"great\", \"green\", \"grew\", \"grow\", \"guess\", \"had\", \"half\", \"hang\", \"happen\", \"has\", \"hat\", \"have\", \"he\", \"hear\", \"heard\", \"held\", \"hello\", \"help\", \"her\", \"here\", \"hers\", \"high\", \"hill\", \"him\", \"his\", \"hit\", \"hold\", \"hot\", \"how\", \"however\", \"I\", \"if\", \"ill\", \"in\", \"indeed\", \"instead\", \"into\", \"iron\", \"is\", \"it\", \"its\", \"just\", \"keep\", \"kept\", \"knew\", \"know\", \"known\", \"late\", \"least\", \"led\", \"left\", \"lend\", \"less\", \"let\", \"like\", \"likely\", \"likr\", \"lone\", \"long\", \"look\", \"lot\", \"make\", \"many\", \"may\", \"me\", \"mean\", \"met\", \"might\", \"mile\", \"mine\", \"moon\", \"more\", \"most\", \"move\", \"much\", \"must\", \"my\", \"near\", \"nearly\", \"necessary\", \"neither\", \"never\", \"next\", \"no\", \"none\", \"nor\", \"not\", \"note\", \"nothing\", \"now\", \"number\", \"of\", \"off\", \"often\", \"oh\", \"on\", \"once\", \"only\", \"or\", \"other\", \"ought\", \"our\", \"out\", \"please\", \"prepare\", \"probable\", \"pull\", \"pure\", \"push\", \"put\", \"raise\", \"ran\", \"rather\", \"reach\", \"realize\", \"reply\", \"require\", \"rest\", \"run\", \"said\", \"same\", \"sat\", \"saw\", \"say\", \"see\", \"seem\", \"seen\", \"self\", \"sell\", \"sent\", \"separate\", \"set\", \"shall\", \"she\", \"should\", \"side\", \"sign\", \"since\", \"so\", \"sold\", \"some\", \"soon\", \"sorry\", \"stay\", \"step\", \"stick\", \"still\", \"stood\", \"such\", \"sudden\", \"suppose\", \"take\", \"taken\", \"talk\", \"tall\", \"tell\", \"ten\", \"than\", \"thank\", \"that\", \"the\", \"their\", \"them\", \"then\", \"there\", \"therefore\", \"these\", \"they\", \"this\", \"those\", \"though\", \"through\", \"till\", \"to\", \"today\", \"told\", \"tomorrow\", \"too\", \"took\", \"tore\", \"tought\", \"toward\", \"tried\", \"tries\", \"trust\", \"try\", \"turn\", \"two\", \"under\", \"until\", \"up\", \"upon\", \"us\", \"use\", \"usual\", \"various\", \"verb\", \"very\", \"visit\", \"want\", \"was\", \"we\", \"well\", \"went\", \"were\", \"what\", \"when\", \"where\", \"whether\", \"which\", \"while\", \"white\", \"who\", \"whom\", \"whose\", \"why\", \"will\", \"with\", \"within\", \"without\", \"would\", \"yes\", \"yet\", \"you\", \"young\", \"your\", \"br\", \"img\", \"p\",\"lt\", \"gt\", \"quot\", \"copy\");\n\t\t//create an array out of the site contents\n\t\t$s = split(\" \", $this->contents);\n\t\t//initialize array\n\t\t$k = array();\n\t\t//iterate inside the array\n\t\tforeach( $s as $key=>$val ) {\n\t\t\t//delete single or two letter words and\n\t\t\t//Add it to the list if the word is not\n\t\t\t//contained in the common words list.\n\t\t\tif(mb_strlen(trim($val)) >= $this->wordLengthMin && !in_array(trim($val), $common) && !is_numeric(trim($val))) {\n\t\t\t\t$k[] = trim($val);\n\t\t\t}\n\t\t}\n\t\t//count the words\n\t\t$k = array_count_values($k);\n\t\t//sort the words from\n\t\t//highest count to the\n\t\t//lowest.\n\t\t$occur_filtered = $this->occure_filter($k, $this->wordOccuredMin);\n\t\tarsort($occur_filtered);\n\n\t\t$imploded = $this->implode(\", \", $occur_filtered);\n\t\t//release unused variables\n\t\tunset($k);\n\t\tunset($s);\n\n\t\treturn $imploded;\n\t}", "public function StringSearchForAllWords()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_search_string_all_words;\n }", "public function countWords()\n\t{\n\t\treturn $this->count();\n\t}", "function wordCount(string $string)\n{\n $wordCont = explode(' ', trim($string));\n return count($wordCont);\n}", "static function segword($str) {\n\t\t$segObj = new Segmentation();\n\t\t$sc = $segObj->_getSegClient();\n $sc->SetLimits(0, 1, 1);\n\t\t$searchRes = $segObj->queryViaValidConnection($str, 'goods_id_dist');\n\t\tif( $searchRes == false ) {\n\t\t\treturn false;\n\t\t}\n\t\t//var_dump($searchRes['words']);\n\t\t//return array_keys( $searchRes['words'] );\n\t\tif (!empty($searchRes['words'])) {\n\t\t\treturn array_keys($searchRes['words']);\n\t\t}\n\t\telse {\n\t\t\treturn array();\n\t\t} \n\t}", "public function words($string)\n {\n return count(preg_split('/\\s+/u', $string, -1, PREG_SPLIT_NO_EMPTY));\n }", "function convert_highlite_words($words = \"\")\n\t{\n\t\tglobal $std;\n\t\t$ibforums = Ibf::app();\n\n\t\t$words = $std->clean_value(trim(urldecode($words)));\n\n\t\t// Convert booleans to something easy to match next time around\n\n\t\t$words = preg_replace(\"/\\s+(and|or)(\\s+|$)/i\", \",\\\\1,\", $words);\n\n\t\t// Convert spaces to plus signs\n\n\t\t$words = preg_replace(\"/\\s/\", \"+\", $words);\n\n\t\treturn $words;\n\t}", "public function testWordFlip()\n {\n $service = new WordService();\n\n $this->assertEquals('olleH', $service->wordFlip('Hello'));\n }", "protected function separate_words($text, $min_word_return_size)\n {\n $splitter = '/[^a-zA-Z0-9_\\+\\-\\/]/';\n $words = [];\n $matches = [];\n $matches = preg_split($splitter, $text);\n foreach ($matches as $single_word) {\n $current_word = strtolower(trim($single_word));\n #leave numbers in phrase, but don't count as words, since they tend to invalidate scores of their phrases\n if (strlen($current_word) > $min_word_return_size && $current_word != '' && !is_numeric($current_word)) {\n $words[] = $current_word;\n }\n }\n return $words;\n }", "public static function words($count, $isCommon = true)\n {\n\n if ($isCommon)\n {\n $common_word_count = count(static::$common_words);\n\n if ($count > $common_word_count)\n {\n foreach (array_rand(static::$words, $count - $common_word_count) as $key)\n {\n $remaining_words[] = static::$words[$key];\n }\n\n $word_list = array_merge(static::$common_words, $remaining_words);\n }\n else\n $word_list = array_slice(static::$common_words, 0, $count);\n }\n else\n {\n foreach (array_rand(static::$words, $count) as $key)\n {\n $word_list[] = static::$words[$key];\n }\n }\n\n return implode($word_list, ' ');\n }", "function _split_str_by_whitespace($text, $goal)\n {\n }", "public function getFirstWordsDataProvider()\n {\n // List of test cases with arguments and expected result\n // [\n // [$sentence, $words, $expected],\n // ...\n // ]\n return [\n [ \"a\", 1, [\"a\"] ], // most simple case\n [ \"a b c\", 2, [\"a\", \"b\"] ], // regular extraction\n [ \"a b c\", 5, [\"a\", \"b\", \"c\"] ], // more words than present in sentence\n [ \"a b c\", 0, [] ], // no words\n ];\n }", "public function testValuableSingleLetter() : void\n {\n $word = 'f';\n $this->assertEquals(4, score($word));\n }", "function testCapsFrequencyList321(){\r\n\r\n\t$c = new GenerateWordCloud();\r\n\t$words = array();\r\n\tarray_push($words, 'MOST');\r\n\tarray_push($words, 'most');\t\r\n\tarray_push($words, 'mOSt');\r\n\tarray_push($words, 'aveRage');\r\n\tarray_push($words, 'averAGE');\r\n\tarray_push($words, 'leasT');\r\n\t\r\n\t$frequency_list = $c->wordFreq($words);\r\n\t$this->assertEquals(3, $frequency_list['most']);\r\n\t$this->assertEquals(2, $frequency_list['average']);\r\n\t$this->assertEquals(1, $frequency_list['least']);\r\n\t$this->assertEquals(3, count($frequency_list));\r\n\t}", "public function validateWordCount($string, $wc)\n\t{\n\t\treturn str_word_count($string) <= $wc;\n\t}", "function getWords($words){\n $wordArray = str_word_count($words,1);\n global $flag_q; //flag for quotes\n\n //to add to the query string synonyms\n $synonyms = get_synonyms($words);\n\n foreach($synonyms as $synonym){\n $wordArray[] = $synonym;\n }\n\n if(!$flag_q) {\n //to handle expression with operator and stop word\n $wordArray = array_diff($wordArray, array('and', 'or', 'not', 'And', 'Or', 'Not', 'OR', 'AND', 'NOT'));\n }\n\n $wordsToSend = \"\";\n //aggregate all of the word searched for the query string to bold later\n foreach($wordArray as $word){\n $wordsToSend .= \"words[]=\" . $word . \"&\";\n }\n\n $wordsToSend = substr($wordsToSend, 0, -1);\n return $wordsToSend;\n}", "function arr_description_words($text)\n{\n // return str_word_count_utf8($text,1);\n $array_text_words = str_word_count($text, 1);\n\n return $array_text_words;\n\n}", "function wordminer($str){\n include('include/stopwords.php');\n $mined = $results = $mined_data = array();\n $str = str_replace(array(',','\"','(',')','.',\"'\"),'',$str);\n $mined = preg_split(\"/[\\W,-]+/\",strtolower($str));\n //$mined = str_replace(array(',','\"','(',')','.',\"'\"),'',$mined);\n $mined = array_unique($mined);\n foreach($mined as $val){\n if(!in_array($val,$StopWords)){\n if(strlen($val)>2){\n $tmp=substr_count($str, ' '. $val.' ');\n if($tmp>2){\n $results[$val]=$tmp;}}}}\n arsort($results);\n foreach($results as $key=>$val){\n $abs=strtolower($key);\n if(!in_array($key,$StopWords)){\n $mined_data[$key]=$val;}}\n return $mined_data;\n }", "function contains_bad_words($string)\r\n{\r\n // This array contains words which trigger the \"meep\" feature of this function\r\n // (ie. if one of the array elements is found in the string, the function will\r\n // return true). Please note that these words do not constitute a rating of their\r\n // meanings - they're used for a first indication if the string might contain\r\n // inapropiate language.\r\n $bad_words = array(\r\n 'anal', 'ass', 'bastard', 'puta',\r\n 'bitch', 'blow', 'butt', 'trolo',\r\n 'cock', 'clit', 'cock', 'pija',\r\n 'cornh', 'cum', 'cunnil', 'verga',\r\n 'cunt', 'dago', 'defecat', 'cajeta',\r\n 'dick', 'dildo', 'douche', 'choto',\r\n 'erotic', 'fag', 'fart', 'trola',\r\n 'felch', 'fellat', 'fuck', 'puto',\r\n 'gay', 'genital', 'gosh', 'pajero',\r\n 'hate', 'homo', 'honkey', 'pajera',\r\n 'horny', 'vibrador', 'jew', 'lesbiana',\r\n 'jiz', 'kike', 'kill', 'eyaculacion',\r\n 'lesbian', 'masoc', 'masturba', 'anal',\r\n 'nazi', 'nigger', 'nude', 'mamada',\r\n 'nudity', 'oral', 'pecker', 'teta',\r\n 'penis', 'potty', 'pussy', 'culo',\r\n 'rape', 'rimjob', 'satan', 'mierda',\r\n 'screw', 'semen', 'sex', 'bastardo',\r\n 'shit', 'slut', 'snot', 'sorete',\r\n 'spew', 'suck', 'tit',\r\n 'twat', 'urinat', 'vagina',\r\n 'viag', 'vibrator', 'whore',\r\n 'xxx'\r\n );\r\n\r\n // Check for bad words\r\n for($i=0; $i<count($bad_words); $i++)\r\n {\r\n if(strstr(strtoupper($string), strtoupper($bad_words[$i])))\r\n {\r\n return(true);\r\n }\r\n }\r\n\r\n // Passed the test\r\n return(false);\r\n}", "public function testContains1()\n {\n $this->assertTrue(Str::contains('foo', 'oo'));\n }", "function GetKeyWords() {\n\t\t$lTitle = str_replace(\",\", \" \", str_replace(\", \", \" \", $this->m_pubdata['storytitle']));\n\t\t$lSubTitle = str_replace(\",\", \" \", str_replace(\", \", \" \", $this->m_pubdata['storysubtitle']));\n\t\t$lSupTitle = str_replace(\",\", \" \", str_replace(\", \", \" \", $this->m_pubdata['storysuptitle']));\n\t\t//~ $lDesc = str_replace(\",\", \" \", str_replace(\", \", \" \", $this->m_pubdata['description']));\n\t\t$lTmpSTr = ($lTitle ? \", \" . $lTitle : \"\") . ($lSubTitle ? \", \" . $lSubTitle : \"\") . ($lSupTitle ? \", \" . $lSupTitle : \"\") . ($lDesc ? \", \" . $lDesc : \"\") . ($this->m_pubdata['keywordsnaked'] ? \", \" . $this->m_pubdata['keywordsnaked'] : \"\");\n\t\t$lArr = split(' ', $lTmpSTr);\n\t\tforeach($lArr as $k) {\n\t\t\t$k = trim($k);\n\t\t\t$lRetStr .= $k . ' ';\n\t\t}\n\t\treturn $lRetStr;\n\t}", "function interesting_word($word)\n{\n if (strlen($word) < 7)\n return false;\n $first_char = substr($word, 0, 1);\n if ($first_char != strtoupper($first_char))\n return false;\n return true;\n}", "public static function stopWords()\n {\n return array('a', 'able', 'about', 'across', 'after', 'all', 'almost', 'also', 'am', 'among', 'an', 'and', 'any', 'are', 'as', 'at', 'be', 'because', 'been', 'but', 'by', 'can', 'cannot', 'could', 'dear', 'did', 'do', 'does', 'either', 'else', 'ever', 'every', 'for', 'from', 'get', 'got', 'had', 'has', 'have', 'he', 'her', 'hers', 'him', 'his', 'how', 'however', 'i', 'if', 'in', 'into', 'is', 'it', 'its', 'just', 'least', 'let', 'like', 'likely', 'may', 'me', 'might', 'most', 'must', 'my', 'neither', 'no', 'nor', 'not', 'of', 'off', 'often', 'on', 'only', 'or', 'other', 'our', 'own', 'rather', 'said', 'say', 'says', 'she', 'should', 'since', 'so', 'some', 'than', 'that', 'the', 'their', 'them', 'then', 'there', 'these', 'they', 'this', 'tis', 'to', 'too', 'twas', 'us', 'wants', 'was', 'we', 'were', 'what', 'when', 'where', 'which', 'while', 'who', 'whom', 'why', 'will', 'with', 'would', 'yet', 'you', 'your');\n }", "function StringWordCount ($input, &$count)\n {\n\t $count = str_word_count($input);\n\t return $count;\n }", "static function extract_common_words($string) {\n\t\t$string = trim($string); // trim the string\n\t\t$string = preg_replace('/[^a-zA-Z\\d \\-\\_@#]/', '', $string); // only take alphabet characters, but keep the spaces and dashes too…\n\t\t$string = strtolower($string); // make it lowercase\n\n\t\t//preg_match_all('/\\b.*?\\b/i', $string, $match_words);\n\t\t$pattern = '/[ \\n]/';\n\t\t$match_words = preg_split( $pattern, $string );\n\n\t\t// $match_words = $match_words[0];\n\n\t\tforeach ( $match_words as $key => $item ) {\n\t\t\t$item = trim($item);\n\t\t\tif (substr($item, 0, 4) === 'http' || $item == '' || in_array(strtolower($item), config('stopwords')) || strlen($item) <= 3 ) {\n\t\t\t\t//echo $item; // PAS DE STRLEN NOG AAN :(\n\t\t\t\t//if($item == \"\")echo '\"' . $item . ','.$key.'\"+';\n\t\t\t\tunset($match_words[$key]);\n\t\t\t}\n\t\t}\n\n\n\t\t// $word_count = str_word_count( implode(\" \", $match_words) , 1);\n\t\t$frequency = array_count_values($match_words);\n\t\t//arsort($frequency)\n\n\t\t//dd($frequency);\n\t\treturn $frequency;\n\t}", "function spellchecker_google_check_words($text) {\n\n /* load classes */\n module_load_include('php', 'spellchecker', 'classes/SpellChecker');\n module_load_include('php', 'spellchecker', 'classes/GoogleSpell');\n\n /* send request */\n $config = NULL;\n $spell = new GoogleSpell($config);\n $matches = $spell->checkWords(variable_get('spellchecker_pspell_default_language', PSPELL_DEFAULT_LANGUAGE), $text);\n\n return $matches;\n}", "function wp_trim_words($text, $num_words = 55, $more = \\null)\n {\n }", "public function word($tags = false)\n {\n return $this->words(1, $tags);\n }", "public function getPhrase()\n {\n $alliteration = new Alliteration();\n $phrase = $alliteration->getPhrase('p', 2);\n $words = explode(' ', $phrase);\n $this->assertSame(2, count($phrase));\n $this->assertSame('P', substr($words[0], 0, 1));\n $this->assertSame('P', substr($words[1], 0, 1));\n }", "function testCapsLockStopWordDelete() {\r\n\t\t$c = new GenerateWordCloud();\r\n\t\t$words = array();\r\n\t\tarray_push($words, 'DELETED');\r\n\t\t$stopwords = array();\r\n\t\tarray_push($stopwords, 'deleted');\r\n\t\t$wordsFiltered = $c->stopWordFilter($words, $stopwords);\r\n\t\t$this -> assertEmpty($wordsFiltered);\r\n\t}", "protected function fetchBadWords() {\n\t\t$tmp = explode(',',$this->translator->getTranslatorLocale()->getL10Nsetting('badwords'));\n\t\t$tmp = array_map('trim', $tmp);\n\t\tforeach ($tmp as $word) {\n\t\t\t$this->bad_words[$word] = str_repeat(parent::getI18Nsetting('replace_char'), mb_strlen($word));\n\t\t} // end foreach\n\t\tunset($tmp);\n\t\treturn (boolean) TRUE;\n\t}", "public static function match_words($first, $second){\n\n if( strlen($first) == strlen($second) ){\n $str1 = str_split($first);\n $str2 = str_split($second);\n \n for ($i=0; $i < strlen($first); $i++) { \n if($str1[$i] != $str2[$i]){\n return false;\n }\n }\n }else{\n return false;\n }\n\n return true;\n }", "public function testLowercaseSingleLetter() : void\n {\n $word = 'a';\n $this->assertEquals(1, score($word));\n }", "function processString($keywords)\n{\n $pattern=\"/[\\s]+/\";\n $keywords=trim($keywords);\n if (!isset($keywords)||empty($keywords)) {\n return null;\n }\n $separateWords=preg_split($pattern, $keywords);\n foreach ($separateWords as $word) {\n echo $word.\"<br>\";\n }\n return $separateWords;\n}", "public static function stopwords() {\n\n\t\t$stopwords = array(\n\t\t\t'au',\n\t\t\t'aux',\n\t\t\t'avec',\n\t\t\t'ce',\n\t\t\t'ces',\n\t\t\t'dans',\n\t\t\t'de',\n\t\t\t'des',\n\t\t\t'du',\n\t\t\t'elle',\n\t\t\t'en',\n\t\t\t'et',\n\t\t\t'eux',\n\t\t\t'il',\n\t\t\t'je',\n\t\t\t'la',\n\t\t\t'le',\n\t\t\t'leur',\n\t\t\t'lui',\n\t\t\t'ma',\n\t\t\t'mais',\n\t\t\t'me',\n\t\t\t'même',\n\t\t\t'mes',\n\t\t\t'moi',\n\t\t\t'mon',\n\t\t\t'ne',\n\t\t\t'nos',\n\t\t\t'notre',\n\t\t\t'nous',\n\t\t\t'on',\n\t\t\t'ou',\n\t\t\t'par',\n\t\t\t'pas',\n\t\t\t'pour',\n\t\t\t'qu',\n\t\t\t'que',\n\t\t\t'qui',\n\t\t\t'sa',\n\t\t\t'se',\n\t\t\t'ses',\n\t\t\t'son',\n\t\t\t'sur',\n\t\t\t'ta',\n\t\t\t'te',\n\t\t\t'tes',\n\t\t\t'toi',\n\t\t\t'ton',\n\t\t\t'tu',\n\t\t\t'un',\n\t\t\t'une',\n\t\t\t'vos',\n\t\t\t'votre',\n\t\t\t'vous',\n\t\t\t'c',\n\t\t\t'd',\n\t\t\t'j',\n\t\t\t'l',\n\t\t\t'à',\n\t\t\t'm',\n\t\t\t'n',\n\t\t\t's',\n\t\t\t't',\n\t\t\t'y',\n\t\t\t'été',\n\t\t\t'étée',\n\t\t\t'étées',\n\t\t\t'étés',\n\t\t\t'étant',\n\t\t\t'étante',\n\t\t\t'étants',\n\t\t\t'étantes',\n\t\t\t'suis',\n\t\t\t'es',\n\t\t\t'est',\n\t\t\t'sommes',\n\t\t\t'êtes',\n\t\t\t'sont',\n\t\t\t'serai',\n\t\t\t'seras',\n\t\t\t'sera',\n\t\t\t'serons',\n\t\t\t'serez',\n\t\t\t'seront',\n\t\t\t'serais',\n\t\t\t'serait',\n\t\t\t'serions',\n\t\t\t'seriez',\n\t\t\t'seraient',\n\t\t\t'étais',\n\t\t\t'était',\n\t\t\t'étions',\n\t\t\t'étiez',\n\t\t\t'étaient',\n\t\t\t'fus',\n\t\t\t'fut',\n\t\t\t'fûmes',\n\t\t\t'fûtes',\n\t\t\t'furent',\n\t\t\t'sois',\n\t\t\t'soit',\n\t\t\t'soyons',\n\t\t\t'soyez',\n\t\t\t'soient',\n\t\t\t'fusse',\n\t\t\t'fusses',\n\t\t\t'fût',\n\t\t\t'fussions',\n\t\t\t'fussiez',\n\t\t\t'fussent',\n\t\t\t'ayant',\n\t\t\t'ayante',\n\t\t\t'ayantes',\n\t\t\t'ayants',\n\t\t\t'eu',\n\t\t\t'eue',\n\t\t\t'eues',\n\t\t\t'eus',\n\t\t\t'ai',\n\t\t\t'as',\n\t\t\t'avons',\n\t\t\t'avez',\n\t\t\t'ont',\n\t\t\t'aurai',\n\t\t\t'auras',\n\t\t\t'aura',\n\t\t\t'aurons',\n\t\t\t'aurez',\n\t\t\t'auront',\n\t\t\t'aurais',\n\t\t\t'aurait',\n\t\t\t'aurions',\n\t\t\t'auriez',\n\t\t\t'auraient',\n\t\t\t'avais',\n\t\t\t'avait',\n\t\t\t'avions',\n\t\t\t'aviez',\n\t\t\t'avaient',\n\t\t\t'eut',\n\t\t\t'eûmes',\n\t\t\t'eûtes',\n\t\t\t'eurent',\n\t\t\t'aie',\n\t\t\t'aies',\n\t\t\t'ait',\n\t\t\t'ayons',\n\t\t\t'ayez',\n\t\t\t'aient',\n\t\t\t'eusse',\n\t\t\t'eusses',\n\t\t\t'eût',\n\t\t\t'eussions',\n\t\t\t'eussiez',\n\t\t\t'eussent',\n\t\t);\n\n\t\treturn $stopwords;\n\t}", "function testNoCountSelectWord(){\r\n\t\r\n\t$abstract = \"find the needle NEEDLE needle in the haystack\";\r\n\r\n\t$a = new APICall(\"goat\");\t\r\n\r\n\t$f = (int)$a->count_select_word($abstract, $a->searchQuery);\r\n\r\n\t$this->assertEquals($f, 1);\r\n\r\n\t$ab = \" \";\r\n\t$g = (int)$a->count_select_word($ab, $a->searchQuery);\r\n\t\r\n\t$this->assertEquals($g, 1);\r\n\t}", "function mb_str_word_count($string, $format = 0, $charlist = '[]')\n {\n $words = empty($string = trim($string)) ? [] : preg_split('~[^\\p{L}\\p{N}\\']+~u', $string);\n\n switch ($format) {\n case 0:\n return count($words);\n break;\n case 1:\n case 2:\n return $words;\n break;\n default:\n return $words;\n break;\n }\n }", "function genrateRandomWords ($length, $words, $sep, $word_case) {\n\n $randomString = '';\n for ($i=0;$i < $length; $i++){\n //$randomString .= 'A';\n $randItem = array_rand($words);\n $word = $words[$randItem];\n\n switch ($word_case) {\n case \"upperCase\":\n $word = strtoupper($word);\n break;\n case \"lowerCase\":\n $word = strtolower($word);\n break;\n case \"camelCase\":\n $word = ucwords($word);\n break;\n default:\n $word = $word;\n }\n\n if ( $i == ($length -1) ) {\n $randomString .= $word;\n } else {\n $randomString .= $word.$sep;\n }\n }\n return $randomString;\n}", "function truncateWords($input, $numwords, $padding=\"\")\r\n{\r\n $output = strtok($input, \" \\n\");\r\n while(--$numwords > 0) $output .= \" \" . strtok(\" \\n\");\r\n if($output != $input) $output .= $padding;\r\n return $output;\r\n}", "function _strip_junk_words($words)\n\t{\n\t\t$bad=array('the','of','to','and','a','in','is','it','you','that','he','was','for','on','are',\n\t\t\t'with','as','I','his','they','be','at','this','or','had','by','but','what','some','we','can',\n\t\t\t'out','other','were','all','there','when','your','how','an','which','do','so','these','has','go',\n\t\t\t'come','did','no','my','where','me','our','thing','site','website');\n\t\t$_words=array();\n\t\tforeach ($words as $i=>$b)\n\t\t{\n\t\t\tif (!in_array($b,$bad))\n\t\t\t{\n\t\t\t\tif ((($b!='chat') || (!array_key_exists($i+1,$words)) || (($words[$i+1]!='room') && ($words[$i+1]!='rooms'))) && (($b!='user') || (!array_key_exists($i+1,$words)) || (($words[$i+1]!='group') && ($words[$i+1]!='groups'))))\n\t\t\t\t\t$_words[]=$b;\n\t\t\t\telse // Special case of compound terms that are actually single words in ocPortal; fix the word, and also stop ridiculous amounts of spurious result\n\t\t\t\t\t$words[$i+1]=$b.$words[$i+1];\n\t\t\t}\n\t\t}\n\t\treturn $_words;\n\t}", "function getWords($sentence, $count = 10) {\n preg_match(\"/(?:\\w+(?:\\W+|$)){0,$count}/\", $sentence, $matches);\n return $matches[0];\n}", "function word_tokenize($sentence){\r\n\t\t$words = preg_split('/[\\'\\s\\r\\n\\t$]+/', $sentence);\r\n\t\t$rez = array();\r\n\t\tforeach($words as $word){\r\n\t\t\t$word = preg_replace('/(^[^a-z0-9]+|[^a-z0-9]$)/i','', $word);\r\n\t\t\t$word = strtolower($word);\r\n\t\t\tif (strlen($word)>0)\r\n\t\t\t\tarray_push($rez, $word);\r\n\t\t}\r\n\t\treturn $rez;\r\n\t}", "function cut_word(string $word)\n{\n// \"u\", \"v\", \"w\", \"x\", \"y\", \"z\");\n $save_word = \"\";\n $answer_word = array();\n $count_array = 0;\n $word = strtolower($word) . \" \";\n for ($i = 0; $i < strlen($word); $i++) {\n if ($word[$i] != \" \") {\n $save_word = $save_word . $word[$i];\n } else {\n $answer_word[$count_array] = $save_word;\n $count_array++;\n $save_word = \"\";\n }\n }\n return $answer_word;\n}", "function stem_list( $words )\n {\n if ( empty($words) ) {\n return false;\n }\n\n $results = array();\n\n if ( !is_array($words) ) {\n $words = preg_split(\"/[ ,;\\n\\r\\t]+/\", trim($words));\n }\n\n foreach ( $words as $word ) {\n if ( $result = $this->stem($word) ) {\n $results[] = $result;\n }\n }\n\n return $results;\n }", "public function snake($word);", "function wordCount($paragraph) {\n $words = explode(\" \", $paragraph);\n //initiate word counter\n $wordsCount = 0;\n //loop through words array\n foreach ($words as $word){\n //if there word length is greater than 0 (not an empty space)\n if(strlen($word) > 0){\n //increment the word counter\n $wordsCount++;\n }\n }\n return $wordsCount;\n}", "public function testWordTruncateWrongLength()\n {\n $this->setExpectedException('Modern_String_Exception', 'Length must be greater than zero');\n $string = new Modern_String('foo bar baz');\n $string->wordTruncate(0);\n }", "function string_limit_words($string, $word_limit)\r\n{ \r\n $words = explode(' ', $string, ($word_limit + 1));\r\n if(count($words) > $word_limit)\r\n array_pop($words);\r\n $wd =implode(' ', $words);\r\n return $wd;\r\n}", "function limit_words( $str, $num, $append_str='' )\n{\n $words = preg_split( '/[\\s]+/', $str, -1, PREG_SPLIT_OFFSET_CAPTURE );\n if( isset($words[$num][1]) )\n {\n $str = substr( $str, 0, $words[$num][1] ) . $append_str;\n }\n unset( $words, $num );\n return trim( $str );\n}", "function random_big_word($phrase)\n{\n $phrase = preg_replace(\"/[()\\[\\]0-9.,]/\", \"\", $phrase);\n $words = explode(\" \", $phrase);\n# print \"<p>words: \"; foreach ($words as $word) { print \"'$word';\"; }\n $lesswords = array_filter($words, \"interesting_word\");\n# print \"<p>lesswords: \"; foreach ($lesswords as $word) { print \"'$word';\"; }\n if (count($lesswords)<1) {\n return '';\n }\n return $lesswords[array_rand($lesswords)];\n}", "public static function sameWord($a, $b) {\n return strtolower($a) == strtolower($b);\n }", "static public function words() : array {\n return [\n \"абажур\",\n \"абзац\",\n \"абонент\",\n \"абрикос\",\n \"абсурд\",\n \"авангард\",\n \"август\",\n \"авиация\",\n \"авоська\",\n \"автор\",\n \"агат\",\n \"агент\",\n \"агитатор\",\n \"агнец\",\n \"агония\",\n \"агрегат\",\n \"адвокат\",\n \"адмирал\",\n \"адрес\",\n \"ажиотаж\",\n \"азарт\",\n \"азбука\",\n \"азот\",\n \"аист\",\n \"айсберг\",\n \"академия\",\n \"аквариум\",\n \"аккорд\",\n \"акробат\",\n \"аксиома\",\n \"актер\",\n \"акула\",\n \"акция\",\n \"алгоритм\",\n \"алебарда\",\n \"аллея\",\n \"алмаз\",\n \"алтарь\",\n \"алфавит\",\n \"алхимик\",\n \"алый\",\n \"альбом\",\n \"алюминий\",\n \"амбар\",\n \"аметист\",\n \"амнезия\",\n \"ампула\",\n \"амфора\",\n \"анализ\",\n \"ангел\",\n \"анекдот\",\n \"анимация\",\n \"анкета\",\n \"аномалия\",\n \"ансамбль\",\n \"антенна\",\n \"апатия\",\n \"апельсин\",\n \"апофеоз\",\n \"аппарат\",\n \"апрель\",\n \"аптека\",\n \"арабский\",\n \"арбуз\",\n \"аргумент\",\n \"арест\",\n \"ария\",\n \"арка\",\n \"армия\",\n \"аромат\",\n \"арсенал\",\n \"артист\",\n \"архив\",\n \"аршин\",\n \"асбест\",\n \"аскетизм\",\n \"аспект\",\n \"ассорти\",\n \"астроном\",\n \"асфальт\",\n \"атака\",\n \"ателье\",\n \"атлас\",\n \"атом\",\n \"атрибут\",\n \"аудитор\",\n \"аукцион\",\n \"аура\",\n \"афера\",\n \"афиша\",\n \"ахинея\",\n \"ацетон\",\n \"аэропорт\",\n \"бабушка\",\n \"багаж\",\n \"бадья\",\n \"база\",\n \"баклажан\",\n \"балкон\",\n \"бампер\",\n \"банк\",\n \"барон\",\n \"бассейн\",\n \"батарея\",\n \"бахрома\",\n \"башня\",\n \"баян\",\n \"бегство\",\n \"бедро\",\n \"бездна\",\n \"бекон\",\n \"белый\",\n \"бензин\",\n \"берег\",\n \"беседа\",\n \"бетонный\",\n \"биатлон\",\n \"библия\",\n \"бивень\",\n \"бигуди\",\n \"бидон\",\n \"бизнес\",\n \"бикини\",\n \"билет\",\n \"бинокль\",\n \"биология\",\n \"биржа\",\n \"бисер\",\n \"битва\",\n \"бицепс\",\n \"благо\",\n \"бледный\",\n \"близкий\",\n \"блок\",\n \"блуждать\",\n \"блюдо\",\n \"бляха\",\n \"бобер\",\n \"богатый\",\n \"бодрый\",\n \"боевой\",\n \"бокал\",\n \"большой\",\n \"борьба\",\n \"босой\",\n \"ботинок\",\n \"боцман\",\n \"бочка\",\n \"боярин\",\n \"брать\",\n \"бревно\",\n \"бригада\",\n \"бросать\",\n \"брызги\",\n \"брюки\",\n \"бублик\",\n \"бугор\",\n \"будущее\",\n \"буква\",\n \"бульвар\",\n \"бумага\",\n \"бунт\",\n \"бурный\",\n \"бусы\",\n \"бутылка\",\n \"буфет\",\n \"бухта\",\n \"бушлат\",\n \"бывалый\",\n \"быль\",\n \"быстрый\",\n \"быть\",\n \"бюджет\",\n \"бюро\",\n \"бюст\",\n \"вагон\",\n \"важный\",\n \"ваза\",\n \"вакцина\",\n \"валюта\",\n \"вампир\",\n \"ванная\",\n \"вариант\",\n \"вассал\",\n \"вата\",\n \"вафля\",\n \"вахта\",\n \"вдова\",\n \"вдыхать\",\n \"ведущий\",\n \"веер\",\n \"вежливый\",\n \"везти\",\n \"веко\",\n \"великий\",\n \"вена\",\n \"верить\",\n \"веселый\",\n \"ветер\",\n \"вечер\",\n \"вешать\",\n \"вещь\",\n \"веяние\",\n \"взаимный\",\n \"взбучка\",\n \"взвод\",\n \"взгляд\",\n \"вздыхать\",\n \"взлетать\",\n \"взмах\",\n \"взнос\",\n \"взор\",\n \"взрыв\",\n \"взывать\",\n \"взятка\",\n \"вибрация\",\n \"визит\",\n \"вилка\",\n \"вино\",\n \"вирус\",\n \"висеть\",\n \"витрина\",\n \"вихрь\",\n \"вишневый\",\n \"включать\",\n \"вкус\",\n \"власть\",\n \"влечь\",\n \"влияние\",\n \"влюблять\",\n \"внешний\",\n \"внимание\",\n \"внук\",\n \"внятный\",\n \"вода\",\n \"воевать\",\n \"вождь\",\n \"воздух\",\n \"войти\",\n \"вокзал\",\n \"волос\",\n \"вопрос\",\n \"ворота\",\n \"восток\",\n \"впадать\",\n \"впускать\",\n \"врач\",\n \"время\",\n \"вручать\",\n \"всадник\",\n \"всеобщий\",\n \"вспышка\",\n \"встреча\",\n \"вторник\",\n \"вулкан\",\n \"вурдалак\",\n \"входить\",\n \"въезд\",\n \"выбор\",\n \"вывод\",\n \"выгодный\",\n \"выделять\",\n \"выезжать\",\n \"выживать\",\n \"вызывать\",\n \"выигрыш\",\n \"вылезать\",\n \"выносить\",\n \"выпивать\",\n \"высокий\",\n \"выходить\",\n \"вычет\",\n \"вышка\",\n \"выяснять\",\n \"вязать\",\n \"вялый\",\n \"гавань\",\n \"гадать\",\n \"газета\",\n \"гаишник\",\n \"галстук\",\n \"гамма\",\n \"гарантия\",\n \"гастроли\",\n \"гвардия\",\n \"гвоздь\",\n \"гектар\",\n \"гель\",\n \"генерал\",\n \"геолог\",\n \"герой\",\n \"гешефт\",\n \"гибель\",\n \"гигант\",\n \"гильза\",\n \"гимн\",\n \"гипотеза\",\n \"гитара\",\n \"глаз\",\n \"глина\",\n \"глоток\",\n \"глубокий\",\n \"глыба\",\n \"глядеть\",\n \"гнать\",\n \"гнев\",\n \"гнить\",\n \"гном\",\n \"гнуть\",\n \"говорить\",\n \"годовой\",\n \"голова\",\n \"гонка\",\n \"город\",\n \"гость\",\n \"готовый\",\n \"граница\",\n \"грех\",\n \"гриб\",\n \"громкий\",\n \"группа\",\n \"грызть\",\n \"грязный\",\n \"губа\",\n \"гудеть\",\n \"гулять\",\n \"гуманный\",\n \"густой\",\n \"гуща\",\n \"давать\",\n \"далекий\",\n \"дама\",\n \"данные\",\n \"дарить\",\n \"дать\",\n \"дача\",\n \"дверь\",\n \"движение\",\n \"двор\",\n \"дебют\",\n \"девушка\",\n \"дедушка\",\n \"дежурный\",\n \"дезертир\",\n \"действие\",\n \"декабрь\",\n \"дело\",\n \"демократ\",\n \"день\",\n \"депутат\",\n \"держать\",\n \"десяток\",\n \"детский\",\n \"дефицит\",\n \"дешевый\",\n \"деятель\",\n \"джаз\",\n \"джинсы\",\n \"джунгли\",\n \"диалог\",\n \"диван\",\n \"диета\",\n \"дизайн\",\n \"дикий\",\n \"динамика\",\n \"диплом\",\n \"директор\",\n \"диск\",\n \"дитя\",\n \"дичь\",\n \"длинный\",\n \"дневник\",\n \"добрый\",\n \"доверие\",\n \"договор\",\n \"дождь\",\n \"доза\",\n \"документ\",\n \"должен\",\n \"домашний\",\n \"допрос\",\n \"дорога\",\n \"доход\",\n \"доцент\",\n \"дочь\",\n \"дощатый\",\n \"драка\",\n \"древний\",\n \"дрожать\",\n \"друг\",\n \"дрянь\",\n \"дубовый\",\n \"дуга\",\n \"дудка\",\n \"дукат\",\n \"дуло\",\n \"думать\",\n \"дупло\",\n \"дурак\",\n \"дуть\",\n \"духи\",\n \"душа\",\n \"дуэт\",\n \"дымить\",\n \"дыня\",\n \"дыра\",\n \"дыханье\",\n \"дышать\",\n \"дьявол\",\n \"дюжина\",\n \"дюйм\",\n \"дюна\",\n \"дядя\",\n \"дятел\",\n \"егерь\",\n \"единый\",\n \"едкий\",\n \"ежевика\",\n \"ежик\",\n \"езда\",\n \"елка\",\n \"емкость\",\n \"ерунда\",\n \"ехать\",\n \"жадный\",\n \"жажда\",\n \"жалеть\",\n \"жанр\",\n \"жара\",\n \"жать\",\n \"жгучий\",\n \"ждать\",\n \"жевать\",\n \"желание\",\n \"жемчуг\",\n \"женщина\",\n \"жертва\",\n \"жесткий\",\n \"жечь\",\n \"живой\",\n \"жидкость\",\n \"жизнь\",\n \"жилье\",\n \"жирный\",\n \"житель\",\n \"журнал\",\n \"жюри\",\n \"забывать\",\n \"завод\",\n \"загадка\",\n \"задача\",\n \"зажечь\",\n \"зайти\",\n \"закон\",\n \"замечать\",\n \"занимать\",\n \"западный\",\n \"зарплата\",\n \"засыпать\",\n \"затрата\",\n \"захват\",\n \"зацепка\",\n \"зачет\",\n \"защита\",\n \"заявка\",\n \"звать\",\n \"звезда\",\n \"звонить\",\n \"звук\",\n \"здание\",\n \"здешний\",\n \"здоровье\",\n \"зебра\",\n \"зевать\",\n \"зеленый\",\n \"земля\",\n \"зенит\",\n \"зеркало\",\n \"зефир\",\n \"зигзаг\",\n \"зима\",\n \"зиять\",\n \"злак\",\n \"злой\",\n \"змея\",\n \"знать\",\n \"зной\",\n \"зодчий\",\n \"золотой\",\n \"зомби\",\n \"зона\",\n \"зоопарк\",\n \"зоркий\",\n \"зрачок\",\n \"зрение\",\n \"зритель\",\n \"зубной\",\n \"зыбкий\",\n \"зять\",\n \"игла\",\n \"иголка\",\n \"играть\",\n \"идея\",\n \"идиот\",\n \"идол\",\n \"идти\",\n \"иерархия\",\n \"избрать\",\n \"известие\",\n \"изгонять\",\n \"издание\",\n \"излагать\",\n \"изменять\",\n \"износ\",\n \"изоляция\",\n \"изрядный\",\n \"изучать\",\n \"изымать\",\n \"изящный\",\n \"икона\",\n \"икра\",\n \"иллюзия\",\n \"имбирь\",\n \"иметь\",\n \"имидж\",\n \"иммунный\",\n \"империя\",\n \"инвестор\",\n \"индивид\",\n \"инерция\",\n \"инженер\",\n \"иномарка\",\n \"институт\",\n \"интерес\",\n \"инфекция\",\n \"инцидент\",\n \"ипподром\",\n \"ирис\",\n \"ирония\",\n \"искать\",\n \"история\",\n \"исходить\",\n \"исчезать\",\n \"итог\",\n \"июль\",\n \"июнь\",\n \"кабинет\",\n \"кавалер\",\n \"кадр\",\n \"казарма\",\n \"кайф\",\n \"кактус\",\n \"калитка\",\n \"камень\",\n \"канал\",\n \"капитан\",\n \"картина\",\n \"касса\",\n \"катер\",\n \"кафе\",\n \"качество\",\n \"каша\",\n \"каюта\",\n \"квартира\",\n \"квинтет\",\n \"квота\",\n \"кедр\",\n \"кекс\",\n \"кенгуру\",\n \"кепка\",\n \"керосин\",\n \"кетчуп\",\n \"кефир\",\n \"кибитка\",\n \"кивнуть\",\n \"кидать\",\n \"километр\",\n \"кино\",\n \"киоск\",\n \"кипеть\",\n \"кирпич\",\n \"кисть\",\n \"китаец\",\n \"класс\",\n \"клетка\",\n \"клиент\",\n \"клоун\",\n \"клуб\",\n \"клык\",\n \"ключ\",\n \"клятва\",\n \"книга\",\n \"кнопка\",\n \"кнут\",\n \"князь\",\n \"кобура\",\n \"ковер\",\n \"коготь\",\n \"кодекс\",\n \"кожа\",\n \"козел\",\n \"койка\",\n \"коктейль\",\n \"колено\",\n \"компания\",\n \"конец\",\n \"копейка\",\n \"короткий\",\n \"костюм\",\n \"котел\",\n \"кофе\",\n \"кошка\",\n \"красный\",\n \"кресло\",\n \"кричать\",\n \"кровь\",\n \"крупный\",\n \"крыша\",\n \"крючок\",\n \"кубок\",\n \"кувшин\",\n \"кудрявый\",\n \"кузов\",\n \"кукла\",\n \"культура\",\n \"кумир\",\n \"купить\",\n \"курс\",\n \"кусок\",\n \"кухня\",\n \"куча\",\n \"кушать\",\n \"кювет\",\n \"лабиринт\",\n \"лавка\",\n \"лагерь\",\n \"ладонь\",\n \"лазерный\",\n \"лайнер\",\n \"лакей\",\n \"лампа\",\n \"ландшафт\",\n \"лапа\",\n \"ларек\",\n \"ласковый\",\n \"лауреат\",\n \"лачуга\",\n \"лаять\",\n \"лгать\",\n \"лебедь\",\n \"левый\",\n \"легкий\",\n \"ледяной\",\n \"лежать\",\n \"лекция\",\n \"лента\",\n \"лепесток\",\n \"лесной\",\n \"лето\",\n \"лечь\",\n \"леший\",\n \"лживый\",\n \"либерал\",\n \"ливень\",\n \"лига\",\n \"лидер\",\n \"ликовать\",\n \"лиловый\",\n \"лимон\",\n \"линия\",\n \"липа\",\n \"лирика\",\n \"лист\",\n \"литр\",\n \"лифт\",\n \"лихой\",\n \"лицо\",\n \"личный\",\n \"лишний\",\n \"лобовой\",\n \"ловить\",\n \"логика\",\n \"лодка\",\n \"ложка\",\n \"лозунг\",\n \"локоть\",\n \"ломать\",\n \"лоно\",\n \"лопата\",\n \"лорд\",\n \"лось\",\n \"лоток\",\n \"лохматый\",\n \"лошадь\",\n \"лужа\",\n \"лукавый\",\n \"луна\",\n \"лупить\",\n \"лучший\",\n \"лыжный\",\n \"лысый\",\n \"львиный\",\n \"льгота\",\n \"льдина\",\n \"любить\",\n \"людской\",\n \"люстра\",\n \"лютый\",\n \"лягушка\",\n \"магазин\",\n \"мадам\",\n \"мазать\",\n \"майор\",\n \"максимум\",\n \"мальчик\",\n \"манера\",\n \"март\",\n \"масса\",\n \"мать\",\n \"мафия\",\n \"махать\",\n \"мачта\",\n \"машина\",\n \"маэстро\",\n \"маяк\",\n \"мгла\",\n \"мебель\",\n \"медведь\",\n \"мелкий\",\n \"мемуары\",\n \"менять\",\n \"мера\",\n \"место\",\n \"метод\",\n \"механизм\",\n \"мечтать\",\n \"мешать\",\n \"миграция\",\n \"мизинец\",\n \"микрофон\",\n \"миллион\",\n \"минута\",\n \"мировой\",\n \"миссия\",\n \"митинг\",\n \"мишень\",\n \"младший\",\n \"мнение\",\n \"мнимый\",\n \"могила\",\n \"модель\",\n \"мозг\",\n \"мойка\",\n \"мокрый\",\n \"молодой\",\n \"момент\",\n \"монах\",\n \"море\",\n \"мост\",\n \"мотор\",\n \"мохнатый\",\n \"мочь\",\n \"мошенник\",\n \"мощный\",\n \"мрачный\",\n \"мстить\",\n \"мудрый\",\n \"мужчина\",\n \"музыка\",\n \"мука\",\n \"мумия\",\n \"мундир\",\n \"муравей\",\n \"мусор\",\n \"мутный\",\n \"муфта\",\n \"муха\",\n \"мучить\",\n \"мушкетер\",\n \"мыло\",\n \"мысль\",\n \"мыть\",\n \"мычать\",\n \"мышь\",\n \"мэтр\",\n \"мюзикл\",\n \"мягкий\",\n \"мякиш\",\n \"мясо\",\n \"мятый\",\n \"мячик\",\n \"набор\",\n \"навык\",\n \"нагрузка\",\n \"надежда\",\n \"наемный\",\n \"нажать\",\n \"называть\",\n \"наивный\",\n \"накрыть\",\n \"налог\",\n \"намерен\",\n \"наносить\",\n \"написать\",\n \"народ\",\n \"натура\",\n \"наука\",\n \"нация\",\n \"начать\",\n \"небо\",\n \"невеста\",\n \"негодяй\",\n \"неделя\",\n \"нежный\",\n \"незнание\",\n \"нелепый\",\n \"немалый\",\n \"неправда\",\n \"нервный\",\n \"нести\",\n \"нефть\",\n \"нехватка\",\n \"нечистый\",\n \"неясный\",\n \"нива\",\n \"нижний\",\n \"низкий\",\n \"никель\",\n \"нирвана\",\n \"нить\",\n \"ничья\",\n \"ниша\",\n \"нищий\",\n \"новый\",\n \"нога\",\n \"ножницы\",\n \"ноздря\",\n \"ноль\",\n \"номер\",\n \"норма\",\n \"нота\",\n \"ночь\",\n \"ноша\",\n \"ноябрь\",\n \"нрав\",\n \"нужный\",\n \"нутро\",\n \"нынешний\",\n \"нырнуть\",\n \"ныть\",\n \"нюанс\",\n \"нюхать\",\n \"няня\",\n \"оазис\",\n \"обаяние\",\n \"обвинять\",\n \"обгонять\",\n \"обещать\",\n \"обжигать\",\n \"обзор\",\n \"обида\",\n \"область\",\n \"обмен\",\n \"обнимать\",\n \"оборона\",\n \"образ\",\n \"обучение\",\n \"обходить\",\n \"обширный\",\n \"общий\",\n \"объект\",\n \"обычный\",\n \"обязать\",\n \"овальный\",\n \"овес\",\n \"овощи\",\n \"овраг\",\n \"овца\",\n \"овчарка\",\n \"огненный\",\n \"огонь\",\n \"огромный\",\n \"огурец\",\n \"одежда\",\n \"одинокий\",\n \"одобрить\",\n \"ожидать\",\n \"ожог\",\n \"озарение\",\n \"озеро\",\n \"означать\",\n \"оказать\",\n \"океан\",\n \"оклад\",\n \"окно\",\n \"округ\",\n \"октябрь\",\n \"окурок\",\n \"олень\",\n \"опасный\",\n \"операция\",\n \"описать\",\n \"оплата\",\n \"опора\",\n \"оппонент\",\n \"опрос\",\n \"оптимизм\",\n \"опускать\",\n \"опыт\",\n \"орать\",\n \"орбита\",\n \"орган\",\n \"орден\",\n \"орел\",\n \"оригинал\",\n \"оркестр\",\n \"орнамент\",\n \"оружие\",\n \"осадок\",\n \"освещать\",\n \"осень\",\n \"осина\",\n \"осколок\",\n \"осмотр\",\n \"основной\",\n \"особый\",\n \"осуждать\",\n \"отбор\",\n \"отвечать\",\n \"отдать\",\n \"отец\",\n \"отзыв\",\n \"открытие\",\n \"отмечать\",\n \"относить\",\n \"отпуск\",\n \"отрасль\",\n \"отставка\",\n \"оттенок\",\n \"отходить\",\n \"отчет\",\n \"отъезд\",\n \"офицер\",\n \"охапка\",\n \"охота\",\n \"охрана\",\n \"оценка\",\n \"очаг\",\n \"очередь\",\n \"очищать\",\n \"очки\",\n \"ошейник\",\n \"ошибка\",\n \"ощущение\",\n \"павильон\",\n \"падать\",\n \"паек\",\n \"пакет\",\n \"палец\",\n \"память\",\n \"панель\",\n \"папка\",\n \"партия\",\n \"паспорт\",\n \"патрон\",\n \"пауза\",\n \"пафос\",\n \"пахнуть\",\n \"пациент\",\n \"пачка\",\n \"пашня\",\n \"певец\",\n \"педагог\",\n \"пейзаж\",\n \"пельмень\",\n \"пенсия\",\n \"пепел\",\n \"период\",\n \"песня\",\n \"петля\",\n \"пехота\",\n \"печать\",\n \"пешеход\",\n \"пещера\",\n \"пианист\",\n \"пиво\",\n \"пиджак\",\n \"пиковый\",\n \"пилот\",\n \"пионер\",\n \"пирог\",\n \"писать\",\n \"пить\",\n \"пицца\",\n \"пишущий\",\n \"пища\",\n \"план\",\n \"плечо\",\n \"плита\",\n \"плохой\",\n \"плыть\",\n \"плюс\",\n \"пляж\",\n \"победа\",\n \"повод\",\n \"погода\",\n \"подумать\",\n \"поехать\",\n \"пожимать\",\n \"позиция\",\n \"поиск\",\n \"покой\",\n \"получать\",\n \"помнить\",\n \"пони\",\n \"поощрять\",\n \"попадать\",\n \"порядок\",\n \"пост\",\n \"поток\",\n \"похожий\",\n \"поцелуй\",\n \"почва\",\n \"пощечина\",\n \"поэт\",\n \"пояснить\",\n \"право\",\n \"предмет\",\n \"проблема\",\n \"пруд\",\n \"прыгать\",\n \"прямой\",\n \"психолог\",\n \"птица\",\n \"публика\",\n \"пугать\",\n \"пудра\",\n \"пузырь\",\n \"пуля\",\n \"пункт\",\n \"пурга\",\n \"пустой\",\n \"путь\",\n \"пухлый\",\n \"пучок\",\n \"пушистый\",\n \"пчела\",\n \"пшеница\",\n \"пыль\",\n \"пытка\",\n \"пыхтеть\",\n \"пышный\",\n \"пьеса\",\n \"пьяный\",\n \"пятно\",\n \"работа\",\n \"равный\",\n \"радость\",\n \"развитие\",\n \"район\",\n \"ракета\",\n \"рамка\",\n \"ранний\",\n \"рапорт\",\n \"рассказ\",\n \"раунд\",\n \"рация\",\n \"рвать\",\n \"реальный\",\n \"ребенок\",\n \"реветь\",\n \"регион\",\n \"редакция\",\n \"реестр\",\n \"режим\",\n \"резкий\",\n \"рейтинг\",\n \"река\",\n \"религия\",\n \"ремонт\",\n \"рента\",\n \"реплика\",\n \"ресурс\",\n \"реформа\",\n \"рецепт\",\n \"речь\",\n \"решение\",\n \"ржавый\",\n \"рисунок\",\n \"ритм\",\n \"рифма\",\n \"робкий\",\n \"ровный\",\n \"рогатый\",\n \"родитель\",\n \"рождение\",\n \"розовый\",\n \"роковой\",\n \"роль\",\n \"роман\",\n \"ронять\",\n \"рост\",\n \"рота\",\n \"роща\",\n \"рояль\",\n \"рубль\",\n \"ругать\",\n \"руда\",\n \"ружье\",\n \"руины\",\n \"рука\",\n \"руль\",\n \"румяный\",\n \"русский\",\n \"ручка\",\n \"рыба\",\n \"рывок\",\n \"рыдать\",\n \"рыжий\",\n \"рынок\",\n \"рысь\",\n \"рыть\",\n \"рыхлый\",\n \"рыцарь\",\n \"рычаг\",\n \"рюкзак\",\n \"рюмка\",\n \"рябой\",\n \"рядовой\",\n \"сабля\",\n \"садовый\",\n \"сажать\",\n \"салон\",\n \"самолет\",\n \"сани\",\n \"сапог\",\n \"сарай\",\n \"сатира\",\n \"сауна\",\n \"сахар\",\n \"сбегать\",\n \"сбивать\",\n \"сбор\",\n \"сбыт\",\n \"свадьба\",\n \"свет\",\n \"свидание\",\n \"свобода\",\n \"связь\",\n \"сгорать\",\n \"сдвигать\",\n \"сеанс\",\n \"северный\",\n \"сегмент\",\n \"седой\",\n \"сезон\",\n \"сейф\",\n \"секунда\",\n \"сельский\",\n \"семья\",\n \"сентябрь\",\n \"сердце\",\n \"сеть\",\n \"сечение\",\n \"сеять\",\n \"сигнал\",\n \"сидеть\",\n \"сизый\",\n \"сила\",\n \"символ\",\n \"синий\",\n \"сирота\",\n \"система\",\n \"ситуация\",\n \"сиять\",\n \"сказать\",\n \"скважина\",\n \"скелет\",\n \"скидка\",\n \"склад\",\n \"скорый\",\n \"скрывать\",\n \"скучный\",\n \"слава\",\n \"слеза\",\n \"слияние\",\n \"слово\",\n \"случай\",\n \"слышать\",\n \"слюна\",\n \"смех\",\n \"смирение\",\n \"смотреть\",\n \"смутный\",\n \"смысл\",\n \"смятение\",\n \"снаряд\",\n \"снег\",\n \"снижение\",\n \"сносить\",\n \"снять\",\n \"событие\",\n \"совет\",\n \"согласие\",\n \"сожалеть\",\n \"сойти\",\n \"сокол\",\n \"солнце\",\n \"сомнение\",\n \"сонный\",\n \"сообщать\",\n \"соперник\",\n \"сорт\",\n \"состав\",\n \"сотня\",\n \"соус\",\n \"социолог\",\n \"сочинять\",\n \"союз\",\n \"спать\",\n \"спешить\",\n \"спина\",\n \"сплошной\",\n \"способ\",\n \"спутник\",\n \"средство\",\n \"срок\",\n \"срывать\",\n \"стать\",\n \"ствол\",\n \"стена\",\n \"стихи\",\n \"сторона\",\n \"страна\",\n \"студент\",\n \"стыд\",\n \"субъект\",\n \"сувенир\",\n \"сугроб\",\n \"судьба\",\n \"суета\",\n \"суждение\",\n \"сукно\",\n \"сулить\",\n \"сумма\",\n \"сунуть\",\n \"супруг\",\n \"суровый\",\n \"сустав\",\n \"суть\",\n \"сухой\",\n \"суша\",\n \"существо\",\n \"сфера\",\n \"схема\",\n \"сцена\",\n \"счастье\",\n \"счет\",\n \"считать\",\n \"сшивать\",\n \"съезд\",\n \"сынок\",\n \"сыпать\",\n \"сырье\",\n \"сытый\",\n \"сыщик\",\n \"сюжет\",\n \"сюрприз\",\n \"таблица\",\n \"таежный\",\n \"таинство\",\n \"тайна\",\n \"такси\",\n \"талант\",\n \"таможня\",\n \"танец\",\n \"тарелка\",\n \"таскать\",\n \"тахта\",\n \"тачка\",\n \"таять\",\n \"тварь\",\n \"твердый\",\n \"творить\",\n \"театр\",\n \"тезис\",\n \"текст\",\n \"тело\",\n \"тема\",\n \"тень\",\n \"теория\",\n \"теплый\",\n \"терять\",\n \"тесный\",\n \"тетя\",\n \"техника\",\n \"течение\",\n \"тигр\",\n \"типичный\",\n \"тираж\",\n \"титул\",\n \"тихий\",\n \"тишина\",\n \"ткань\",\n \"товарищ\",\n \"толпа\",\n \"тонкий\",\n \"топливо\",\n \"торговля\",\n \"тоска\",\n \"точка\",\n \"тощий\",\n \"традиция\",\n \"тревога\",\n \"трибуна\",\n \"трогать\",\n \"труд\",\n \"трюк\",\n \"тряпка\",\n \"туалет\",\n \"тугой\",\n \"туловище\",\n \"туман\",\n \"тундра\",\n \"тупой\",\n \"турнир\",\n \"тусклый\",\n \"туфля\",\n \"туча\",\n \"туша\",\n \"тыкать\",\n \"тысяча\",\n \"тьма\",\n \"тюльпан\",\n \"тюрьма\",\n \"тяга\",\n \"тяжелый\",\n \"тянуть\",\n \"убеждать\",\n \"убирать\",\n \"убогий\",\n \"убыток\",\n \"уважение\",\n \"уверять\",\n \"увлекать\",\n \"угнать\",\n \"угол\",\n \"угроза\",\n \"удар\",\n \"удивлять\",\n \"удобный\",\n \"уезд\",\n \"ужас\",\n \"ужин\",\n \"узел\",\n \"узкий\",\n \"узнавать\",\n \"узор\",\n \"уйма\",\n \"уклон\",\n \"укол\",\n \"уксус\",\n \"улетать\",\n \"улица\",\n \"улучшать\",\n \"улыбка\",\n \"уметь\",\n \"умиление\",\n \"умный\",\n \"умолять\",\n \"умысел\",\n \"унижать\",\n \"уносить\",\n \"уныние\",\n \"упасть\",\n \"уплата\",\n \"упор\",\n \"упрекать\",\n \"упускать\",\n \"уран\",\n \"урна\",\n \"уровень\",\n \"усадьба\",\n \"усердие\",\n \"усилие\",\n \"ускорять\",\n \"условие\",\n \"усмешка\",\n \"уснуть\",\n \"успеть\",\n \"усыпать\",\n \"утешать\",\n \"утка\",\n \"уточнять\",\n \"утро\",\n \"утюг\",\n \"уходить\",\n \"уцелеть\",\n \"участие\",\n \"ученый\",\n \"учитель\",\n \"ушко\",\n \"ущерб\",\n \"уютный\",\n \"уяснять\",\n \"фабрика\",\n \"фаворит\",\n \"фаза\",\n \"файл\",\n \"факт\",\n \"фамилия\",\n \"фантазия\",\n \"фара\",\n \"фасад\",\n \"февраль\",\n \"фельдшер\",\n \"феномен\",\n \"ферма\",\n \"фигура\",\n \"физика\",\n \"фильм\",\n \"финал\",\n \"фирма\",\n \"фишка\",\n \"флаг\",\n \"флейта\",\n \"флот\",\n \"фокус\",\n \"фольклор\",\n \"фонд\",\n \"форма\",\n \"фото\",\n \"фраза\",\n \"фреска\",\n \"фронт\",\n \"фрукт\",\n \"функция\",\n \"фуражка\",\n \"футбол\",\n \"фыркать\",\n \"халат\",\n \"хамство\",\n \"хаос\",\n \"характер\",\n \"хата\",\n \"хватать\",\n \"хвост\",\n \"хижина\",\n \"хилый\",\n \"химия\",\n \"хирург\",\n \"хитрый\",\n \"хищник\",\n \"хлам\",\n \"хлеб\",\n \"хлопать\",\n \"хмурый\",\n \"ходить\",\n \"хозяин\",\n \"хоккей\",\n \"холодный\",\n \"хороший\",\n \"хотеть\",\n \"хохотать\",\n \"храм\",\n \"хрен\",\n \"хриплый\",\n \"хроника\",\n \"хрупкий\",\n \"художник\",\n \"хулиган\",\n \"хутор\",\n \"царь\",\n \"цвет\",\n \"цель\",\n \"цемент\",\n \"центр\",\n \"цепь\",\n \"церковь\",\n \"цикл\",\n \"цилиндр\",\n \"циничный\",\n \"цирк\",\n \"цистерна\",\n \"цитата\",\n \"цифра\",\n \"цыпленок\",\n \"чадо\",\n \"чайник\",\n \"часть\",\n \"чашка\",\n \"человек\",\n \"чемодан\",\n \"чепуха\",\n \"черный\",\n \"честь\",\n \"четкий\",\n \"чехол\",\n \"чиновник\",\n \"число\",\n \"читать\",\n \"членство\",\n \"чреватый\",\n \"чтение\",\n \"чувство\",\n \"чугунный\",\n \"чудо\",\n \"чужой\",\n \"чукча\",\n \"чулок\",\n \"чума\",\n \"чуткий\",\n \"чучело\",\n \"чушь\",\n \"шаблон\",\n \"шагать\",\n \"шайка\",\n \"шакал\",\n \"шалаш\",\n \"шампунь\",\n \"шанс\",\n \"шапка\",\n \"шарик\",\n \"шасси\",\n \"шатер\",\n \"шахта\",\n \"шашлык\",\n \"швейный\",\n \"швырять\",\n \"шевелить\",\n \"шедевр\",\n \"шейка\",\n \"шелковый\",\n \"шептать\",\n \"шерсть\",\n \"шестерка\",\n \"шикарный\",\n \"шинель\",\n \"шипеть\",\n \"широкий\",\n \"шить\",\n \"шишка\",\n \"шкаф\",\n \"школа\",\n \"шкура\",\n \"шланг\",\n \"шлем\",\n \"шлюпка\",\n \"шляпа\",\n \"шнур\",\n \"шоколад\",\n \"шорох\",\n \"шоссе\",\n \"шофер\",\n \"шпага\",\n \"шпион\",\n \"шприц\",\n \"шрам\",\n \"шрифт\",\n \"штаб\",\n \"штора\",\n \"штраф\",\n \"штука\",\n \"штык\",\n \"шуба\",\n \"шуметь\",\n \"шуршать\",\n \"шутка\",\n \"щадить\",\n \"щедрый\",\n \"щека\",\n \"щель\",\n \"щенок\",\n \"щепка\",\n \"щетка\",\n \"щука\",\n \"эволюция\",\n \"эгоизм\",\n \"экзамен\",\n \"экипаж\",\n \"экономия\",\n \"экран\",\n \"эксперт\",\n \"элемент\",\n \"элита\",\n \"эмблема\",\n \"эмигрант\",\n \"эмоция\",\n \"энергия\",\n \"эпизод\",\n \"эпоха\",\n \"эскиз\",\n \"эссе\",\n \"эстрада\",\n \"этап\",\n \"этика\",\n \"этюд\",\n \"эфир\",\n \"эффект\",\n \"эшелон\",\n \"юбилей\",\n \"юбка\",\n \"южный\",\n \"юмор\",\n \"юноша\",\n \"юрист\",\n \"яблоко\",\n \"явление\",\n \"ягода\",\n \"ядерный\",\n \"ядовитый\",\n \"ядро\",\n \"язва\",\n \"язык\",\n \"яйцо\",\n \"якорь\",\n \"январь\",\n \"японец\",\n \"яркий\",\n \"ярмарка\",\n \"ярость\",\n \"ярус\",\n \"ясный\",\n \"яхта\",\n \"ячейка\",\n \"ящик\" \n ];\n }", "public function word($value, $allow_whitespaces = false)\n\t{\n\t\treturn $allow_whitespaces ? preg_replace('/[^\\w\\s]/', '', $value)\n\t\t\t: preg_replace('/[^\\w]/', '', $value);\n\t}", "function splitByWords($text, $splitLength = 200) {\r\n $wordArray = explode(' ', $text);\r\n\r\n // Too many words\r\n if (sizeof($wordArray) > $splitLength) {\r\n // Split words into two arrays\r\n $firstWordArray = array_slice($wordArray, 0, $splitLength);\r\n $lastWordArray = array_slice($wordArray, $splitLength + 1, sizeof($wordArray));\r\n\r\n // Turn array back into two split strings \r\n $firstString = implode(' ', $firstWordArray);\r\n $lastString = implode(' ', $lastWordArray);\r\n return array($firstString, $lastString);\r\n }\r\n // if our array is under the limit, just send it straight back\r\n return array($text);\r\n }" ]
[ "0.89038986", "0.7695834", "0.73315555", "0.6994336", "0.68159896", "0.6677628", "0.65418047", "0.63699687", "0.6306306", "0.62634677", "0.6254097", "0.6239441", "0.6131041", "0.6090806", "0.6044039", "0.6042382", "0.6040891", "0.6029683", "0.60265565", "0.6017956", "0.5989553", "0.59686375", "0.5951821", "0.59490716", "0.5936927", "0.5916166", "0.5906747", "0.5902258", "0.58507025", "0.5821535", "0.5811247", "0.5800465", "0.5780348", "0.5779519", "0.576438", "0.5763861", "0.575507", "0.5744032", "0.5739675", "0.5732869", "0.5696777", "0.56909543", "0.5690602", "0.5680819", "0.5668326", "0.56585073", "0.5642428", "0.5641785", "0.5635537", "0.5632008", "0.5602521", "0.55902874", "0.55696404", "0.55356586", "0.5533707", "0.5533032", "0.55283135", "0.5523811", "0.55154806", "0.5514265", "0.5512138", "0.55096406", "0.5502237", "0.54949105", "0.5490769", "0.5487026", "0.5485318", "0.54703146", "0.5461354", "0.5445154", "0.54431415", "0.5428464", "0.5420002", "0.5409585", "0.54075694", "0.5388978", "0.5377535", "0.5371289", "0.5370712", "0.53585947", "0.53569794", "0.5341103", "0.5338576", "0.53350323", "0.5328946", "0.5325568", "0.53243923", "0.53156054", "0.531098", "0.53083944", "0.5304465", "0.5304045", "0.5301988", "0.52982265", "0.5282604", "0.52823806", "0.52816457", "0.52814513", "0.52745146", "0.524757" ]
0.774362
1
DB::delete('update slider set status=? where id = ?','0',[$id]);
public function delete($id) { // return redirect('/')->with('success', 'Record has been deleted'); $product= new productAndKitsController; $product = productAndKitsModel::find($id); $product->status='0'; $product->save(); return redirect('products'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_slider($slider_id)\n {\n $this->db->update('tbl_slider',$this,array('slider_id'=>$slider_id));\n //echo $this->db->last_query();\n }", "function delete_slider($id_slider)\n\t\t{\n\t\t\t$this->db->where('id_slider',$id_slider);\n\t\t\t$this->db->delete('slider');\n\t\t}", "function delete_slider($pid) {\n $sql = \"DELETE FROM slider WHERE id='$pid'\";\n $this->mysqli->query($sql);\n }", "function deleteParoquia()\n {\n $sql = \"UPDATE Paroquia SET status = 0 WHERE id=:id\";\n $query = $this->db->prepare($sql);\n $query->bindParam(\":id\",$this->id);\n $query->execute();\n echo json_encode(\"{'message': 'Paroquia apagada'}\");\n }", "public function destroy($id)\n {\n $orden=Orden::find($id)->update(['status'=>0]);\n return 1;\n }", "public function destroy($id)\n { \n modelMst::where((new modelMst)->getKeyName(), $id)->update(['sys_status_aktif'=>'N']); \n }", "public function deleteSlider($id)\n {\n $image = Slider::find($id);\n $old_image = $image->image;\n unlink($old_image);\n\n Slider::find($id)->delete();\n\n return redirect()->back()->with('success','slider Delete successfully');\n }", "public function delete(int $id): void\r\n{\r\n \r\n\r\n $maRequete = $this->pdo->prepare(\"DELETE FROM {$this->table} WHERE id =:id\");\r\n\r\n $maRequete->execute(['id' => $id]);\r\n}", "function deleteTurmaCatequese()\n {\n $sql = \"UPDATE TurmaCatequese SET status = 0 WHERE id=:id\";\n $query = $this->db->prepare($sql);\n $query->bindParam(\":id\",$this->id);\n $query->execute();\n echo json_encode(\"{'message': 'Turma apagada'}\");\n }", "public function delete(int $id): void{\r\n \r\n $maRequete = $this->pdo->prepare(\"DELETE FROM {$this->table} WHERE id =:id\");\r\n\r\n $maRequete->execute(['id' => $id]);\r\n\r\n\r\n}", "public function destroy($id)\r\n {\r\n SliderModel::find($id)->delete();\r\n \r\n }", "public function destroy($id)\n {\n \n $res = DB::table('systems')->where('id',$id)->delete();\n if($res){\n echo 1;\n }else{\n echo 0;\n }\n \n\n }", "function oculta($id){\n\t$sql = 'UPDATE votos SET status = 0 WHERE cancion ='.$id;\n\tmysql_query($sql);\n}", "function delete_comment($id){\n $sql=\"delete from comment where id = ?\";\n DB::delete($sql, array($id));\n}", "public function delete(){\n \t\ttry{\n \t\t\t$db = DB::get();\n \t\t\t$sql = \"UPDATE t_\" . self::$Table . \" \n \t\t\t\t\tSET \" . self::$Table . \"_supprime='1' \n \t\t\t\t\tWHERE \" . self::$Table . \"_id = '\".$this->Id.\"' \";\n \t\t\n \t\t\t$result = $db->query($sql);\n \t\t}\n \t\tcatch(Exception $e){\n \t\t\tvar_dump($e->getMessage());\n \t\t}\n }", "public function destroy($id)\n {\n \n $sliders = DB::table('sliders')->where('id',$id)->get();\n foreach ($sliders as $slider) {\n Storage::delete('public/upload/'.$slider->name);\n }\n Slider::where('id',$id)->delete();\n return redirect()->back();\n\n \n //dd(Storage::delete('public/upload/'.$img));\n //return redirect()->back();\n \n }", "public function deleteSolicitudes($id){\r\n $this->db->where();\r\n $this->db->delete(\"Solicitudes\");\r\n }", "public function delete($id){\n \n $response=array(\"message\"=>'',\"status\"=>false);\n \n $sql=\"UPDATE area SET status=0, updatedAt=CURRENT_TIMESTAMP WHERE idArea=$id\";\n $res = DB::query($sql);\n \n if($res){\n \n $response[\"message\"]='eliminado(a) con éxito';\n $response[\"status\"]=true;\n }\n \n return $response;\n }", "public function destroy($id)\n {\n $table = new IracStatus();\n $tname = $table->getTable();\n $status = RelationView::checkrelation($tname,$id);\n if($status){\n $refrence = IracStatus::find($id);\n $refrence->active = 0;\n $refrence->save();\n Session::flash('success', 'IRAC Status deleted Successfully !!');\n }else{\n Session::flash('error', 'Cannot perform delete operation. Related records found');\n }\n return Redirect::to('iracstatus');\n }", "public static function delete($id){\n\t\t\t$conn = Db::getInstance();\n\t\t\t\n\t\t\t$st = $conn->prepare(\"UPDATE `\" . static::db_table . \"` SET `status` = ? WHERE `id` = ?\");\n\t\t\t$st->execute([0, $id]);\n\t\t\t\n\t\t\treturn true;\n\t\t}", "public function deleteCoroselimg($id){\n $model = CarouselnGallery::find( $id );\n $model->delete();\n\n //updates the status to 0\n $model->status = '0';\n $model->save();\n return redirect()->back();\n }", "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 deleteModel($id){\t\r\n\t\t$this->db->where('id',$id);\r\n\t\treturn $this->db->update('uqc',array('delete_status'=>1));\r\n\t}", "public function deleteslide($id){\n try {\n $stmt = $this->con->prepare('update slide set status = :status where unique_id = :id');\n $stmt->bindValue(':status', 2, PDO::PARAM_INT);\n $stmt->bindValue(':id', $id, PDO::PARAM_STR);\n $stmt->execute();\n\n if($stmt){\n $_SESSION['newsDelete'] = \"Slide Deleted Successfully. \";\n echo \"<script>window.location='allslide.php'</script>\";\n }\n } catch (PDOException $e) {\n echo \"Error: \".$e->getMessage(). \"<br />\";\n die();\n }\n }", "function delete_update($id, $user){//set deleted status as 0\n\t\t$this->db->where('company_id', $id);\n\t\t$this->db->update('tbl_companies', $user);\n\t}", "function hook_path_delete($path) {\n db_delete('mytable')\n ->condition('pid', $path['pid'])\n ->execute();\n}", "function delete($id){\n\t\t$this->db->where('id', $id);\n\t\t$this->db->delete($this->table);\n }", "function update_slider($slider_id)\n {\n $this->db->update('tbl_slider',$this, array('slider_id'=>$slider_id));\n }", "function delete_post($id){\n $sql=\"delete from comment where Post_ID = ?\";\n DB::delete($sql, array($id));\n $sql=\"delete from post where id = ?\";\n DB::delete($sql, array($id));\n}", "function delete($table, $id){\n\nglobal $conn;\n$sql = \"DELETE FROM $table WHERE id=?\";\n\n$stmt = executeQuery($sql, ['id' => $id]);\nreturn $stmt->affected_rows;\n}", "public function deleteStatus(Request $request){\n $id = $request->id;\n $status = Status::where( 'id' , $id )->first(); \n if (!isset($status)) {\n return response()->json(['data' => '' , 'message' => 'Status Not Found'], 400);\n } \n $status->delete();\n return response()->json(['data' => '' , 'message' => 'Status Deleted Successfully'], 200); \n }", "function eliminar($id){\n\t$status = 0;\n\t//actualiza votos\n\t$sql = 'UPDATE votos SET status ='.$status.' WHERE cancion ='.$id;\n\n\tmysql_query($sql);\n\t\n\t//actualiza lista\n\techo '<SCRIPT TYPE=\"text/javascript\">actualiza();</SCRIPT>';\n}", "public static function delete($id){\n $conexion = new Conexion();\n $sql = $conexion->prepare('DELETE FROM'. self::TABLA .' WHERE id = :id');\n $sql->bindValue(':id', $id);\n $sql->execute();\n return $sql; \n}", "function deleteArticulo( $id ){\n $sql = \"UPDATE `articulo` SET `activo`= 0 WHERE `id`= $id\";\n ejecutarConsulta($sql);\n }", "public function deleteSlider($type, $id)\n {\n try{\n $slider = $this->model->where('type','=',$type)->where('uniqueId','=',$id)->first();\n\n $slider->delete();\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function delete($id){\n $sql=\" DELETE FROM \" .$this->table[0].\" WHERE sid= '\".$id.\"'\";\n return mysqli_query($this->conn, $sql);\n }", "function delete($table, $id)\n{\n connect()->query(\"DELETE FROM users WHERE id='$id'\");\n}", "function delete_one_stock($bdd)\n{\n 'UPDATE `articles` \n SET `stock`=(`stock`-1) \n WHERE articles.id=3';\n}", "public function deleteData()\n {\n DB::table($this->dbTable)\n ->where($this->where)\n ->delete();\n }", "public function destroy($id)\n {\n $table = Quotes::find($id); \n $table->delete();//delete table\n return back();\n }", "public function destroy($id)\n {\n \n /* $n_room = reserve::where('id',$id)\n ->join ('room','reserve.id_room','=','room.id')\n ->first();\n\n $person= $n_room ->person;*/\n\n room::where('id',$id )\n ->update(['available' => 0, 'vacancies' => $person->person ]); \n\n\n\n\n reserve::where('id',$id)->delete();\n return redirect()->back();\n }", "function delete_reservation($id) {\n global $DB;\n\n $reservation = $DB->get_record('roomscheduler_reservations', array('id' => $id));\n\n //print_object($reservation);\n\n $reservation->active = 0;\n\n return $DB->update_record('roomscheduler_reservations', $reservation);\n}", "function delete_enquiry($enquiry_id)\n {\n $this->db->update('tbl_enquiry',$this,array('enquiry_id'=>$enquiry_id));\n //echo $this->db->last_query();\n }", "public function destroy($id)\n {\n $empresa=Empresa::findOrFail($id);\n $empresa->condicion='0';\n $empresa->save();\n return Redirect::to('revolution/empresa');\n }", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "function delete_testimonial($testimonial_id)\n {\n $this->db->update('tbl_testimonial',$this,array('testimonial_id'=>$testimonial_id));\n }", "public function delete( ) {\n\t $query = \"DELETE FROM stat WHERE id=?\";\n\t return $this->db->execute( $query, array($this->id) ); \t\n\t }", "public function desactivar_img($id){\n\t\t$data = array(\n 'sli_estado' => \"0\"\n );\n\n\t\t$this->db->where('sli_id', $id);\n\t\t$this->db->update('slide', $data); \n\t\treturn $this->db->affected_rows();\n\t}", "public function delete($id)\n {\n \n $this->db->set('delete_flag', 1);\n $this->db->where('id', $id);\n $this->db->update('items');\n echo json_encode(['success'=>true]);\n }", "public function destroy($id)\n {\n $param['ACTIVE'] = 0;\n $idLokasiKerja = DB::table('master.mst_area_operasi')\n ->where('AREA_OPERASI_ID',$id)->update($param);\n return redirect('/areaoperasi');\n\n }", "public function delete_image($img) {\n $this->db->where('Images',$img);\n $this->db->update('advertisement_image',array('StatusID'=>3));\n }", "public function destroy($id)\n {\n $distrito = Distrito::findOrFail($id);\n $distrito->estado = '0';\n $distrito->update();\n //DB::table('distritos')->where('id',$id)->update(['estado'=>'0']);\n\n return redirect()->route('distrito.index');\n }", "function delete_slide($slide_id)\r\n {\r\n return $this->db->delete('slide',array('slide_id'=>$slide_id));\r\n }", "public function destroy($id){\n $alumnos=Alumnos::find($id);\n $alumnos->estado=0;\n $alumnos->save();\n return redirect()->route('alumnos.index');\n \n }", "public function destroy($id)\n {\n DB::table('corporates')->where('id', $id)->update(['active' => 0]);\n //$corp = DB::table('corporates')->get();\n return redirect('/admin/corporate')->with('error', \"Corporate has been desactivated\");\n }", "function deleteBio($id, $db) {\n $query = $db->prepare(\"DELETE FROM Bio WHERE ID_Bio = ?\");\n $query->execute([$id]);\n}", "public function deleteUser($id){\n$sql = \"DELETE FROM utilisateurs WHERE id = :id\";\n $stmt= $this->pdo->prepare($sql);\n $stmt->execute([\n 'id' => $id\n ]);\n}", "function update_slider_status($slider_id,$slider_status)\n {\n if($slider_status==0)\n {\n $new_stat=\"1\";\n }\n elseif($slider_status==1)\n {\n $new_stat=\"0\";\n }\n $query = $this->db->query(\"UPDATE tbl_slider SET slider_status = '$new_stat' WHERE slider_id='$slider_id'\");\n //echo $this->db->last_query();\n }", "function del_blog($id,$status){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `fqdn_blog` = 'supprimer' WHERE `id_utilisateur` = $id\");\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `status_blog` = '$status' WHERE `id_utilisateur` = $id\");\n\t\t\n\t\t$req->closeCursor();\n\t}", "public function desactiver($id)\n {\n DB::table('entreprise')\n ->where('id', $id)\n ->update(array('ent_status' => 0));\n return redirect()->route('entreprise.index');\n \n }", "public function destroy($id)\n {\n //\n $updateArray = array('game_is_deleted'=>1);\n $id = Games::where('game_id',$id)->update($updateArray);\n if($id){\n return json_encode(array('1'));\n }\n\n }", "function delete_from_best($pdo, $level_id)\n{\n $stmt = $pdo->prepare('\n DELETE FROM best_levels\n WHERE level_id = :level_id\n ');\n $stmt->bindValue(\":level_id\", $level_id, PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->rowCount();\n}", "function supprimer($id){\n try{\n $link= connecter_db();\n $rp=$link->prepare(\"delete from etudiant where id=?\");\n $rp->execute([$id]);\n}catch(PDOException $e ){\ndie (\"erreur de suppression de l'etudiant dans la base de donnees \".$e->getMessage());\n}\n}", "public function delete($id) {\r\n $sql= \"delete from bestelling where id=? limit 1\";\r\n $args=func_get_args();\r\n parent::execPreppedStmt($sql,$args);\r\n }", "function delete($id) {\n $this->db->where('id', $id);\n $this->db->delete('rit');\n }", "public function destroy($id)\n {\n\n $slider=Slider::find($id);\n \n if(Storage::delete('public/slider/'.$slider->slider)){\n $slider->delete();\n return redirect('Admin/slider')->with('success','Photo Deleted');\n }\n }", "public function destroy($id)\n {\n $slider = slider::findOrFail($id);\n if (file_exists('storage/images/slider/'.$slider->slider_gambar)) \n {\n unlink('storage/images/slider/'.$slider->slider_gambar);\n }\n $slider->delete();\n return redirect(route('slider.index'))->with('message','Gambar Slider berhasil dihapus');\n }", "public function handleDelete(Request $request){\n \t$data = $request->only('id');\n \t\\DB::table('fields')->where('field_id','=',$data['id'])\n \t ->update(['field_status'=>'deleted']);\n \t\\Session::flash('message','Field deleted successfully.');\n \treturn redirect()->route('viewfields');\n }", "public function delete()\n{//delete\n $sql = \"DELETE FROM pefs_database.pef_assessor WHERE ase_id = ?\";\n $this->db->query($sql,array($this->ase_id)); \n}", "public function deleteSystems()\r\n{\r\n $query_string = \"DELETE FROM voting_system \";\r\n $query_string .= \"WHERE systemtypeid = :systemtypeid \";\r\n\r\n return $query_string;\r\n}", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\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 }", "public function deleteService()\n {\n $serviceid = request()->input('serviceId');\n DB::table('tbl_services')->where('service_id',$serviceid)->delete();\n return redirect('cms/1');\n }", "public function destroy($id)\n {\n date_default_timezone_set(\"Asia/Ho_Chi_Minh\");\n $khoaHoc = DB::table('qlsv_khoahocs')->where('id',$id)->update([\"deleted_at\" => \"1\",\"updated_at\" => Carbon::now()]);\n return redirect()->route('qlsv_khoahoc.index');\n }", "function delete_vdo_testimonial($testimonial_id)\n {\n $this->db->update('tbl_testimonial',$this,array('testimonial_id'=>$testimonial_id));\n }", "public function destroy($id)\n {\n //\n $slider = Slider::find($id);\n $slider->delete();\n }", "public function deleteSystem()\r\n{\r\n $query_string = \"DELETE FROM voting_system \";\r\n $query_string .= \"WHERE systemid = :systemid \";\r\n\r\n return $query_string;\r\n}", "public function DeleteSupplier($id){\n\n $delete=DB::table('suppliers')\n ->where('id',$id)\n ->first();\n $photo=$delete->photo;\n unlink($photo);\n $dltuser=DB::table('suppliers')\n ->where('id',$id)\n ->delete(); \n\n return Redirect()->route('all.supplier')->with('message','Deleted Successfully.');\n\n \n}", "public function destroy()\n {\n try {\n $medSupID = array();\n foreach (Input::all() as $key) {\n $medSupID = $key;\n }\n\n UsedMedSupply::whereIn('medSupplyUsedID', $medSupID)->update(['isDeleted' => 1]);\n\n\n } catch (Exception $e) {\n\n }\n }", "public function delete($id) \r\n {\r\n $this->load(array('id=?',$id));\r\n $this->erase();\r\n }", "function delete_servicio($id)\n {\n $this->db->where('id', $id);\n return $this->db->delete('servicio');\n }", "public function destroy($id)\n\t{\n\t\t$getCount = ManageTaskStatus::where('id', '=', $id)->get()->count();\n if ($getCount < 1) {\n $result = ['success' => false, 'errormsg' => 'Status does not exists'];\n return json_encode($result);\n } else {\n $loggedInUserId = Auth::guard('admin')->user()->id;\n $delete = CommonFunctions::deleteMainTableRecords($loggedInUserId);\n $input['statusData'] = $delete;\n\n $result = ManageTaskStatus::where('id', $id)->update($input['statusData']); \n \n $tskstatus = ManageTaskStatus::where(['deleted_status' => 0])->get();\n $result = ['success' => true, 'records' => $tskstatus, 'totalCount' => count($tskstatus)];\n return json_encode($result);\n }\n\t}", "function DeleteImpostionForfait()\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"DELETE FROM fishermenland.game WHERE idGame IN (SELECT idGame FROM (SELECT idGame FROM fishermenland.game WHERE fkTypeGame = '3' GROUP BY idGame DESC LIMIT 1) temp)\");\n}", "public function desactivar($idtarifas){\n\n $sql=\" UPDATE tarifas SET estado='0' WHERE idtarifas='$idtarifas' \";\n return ejecutarConsulta($sql);\n\n\n }", "public function delete($rowid)\n {\n $this->db->where('id',$rowid);\n $this->db->delete('goods');\n }", "public function vymaz(){\r\n $db = napoj_db();\r\n $sql =<<<EOF\r\n DELETE FROM Diskusie WHERE id = \"$this->ID\";\r\nEOF;\r\n $ret = $db->exec($sql);\r\n if(!$ret){\r\n echo $db->lastErrorMsg();\r\n }\r\n $db->close();\r\n }", "public function destroy($id)\n {\n// dd($id);\n Address::whereId($id)->update(['status' => 0]);\n\n return redirect()->back();\n }", "function deleteSize($id) {\n \t$sql = \"DELETE FROM size WHERE id=:id\";\n try {\n $db = getConnection(\"alcapp\");\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"id\", $id);\n $stmt->execute();\n $db = null;\n } catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}';\n }\n }", "function deleteRecord($id){\n $category=Category::find($id);\n $category->delete();\n }", "function row_delete()\n\t{\n\t $this->db->where('id', $id);\n\t $this->db->delete('testimonials'); \n\t}", "public function deleteEvent($id) {\r\n$array = array('event_id' => $id);\r\n$success = $this->db->delete('events', $array);\r\nreturn $success;\r\n}", "function DeleteImpostion()\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"DELETE FROM fishermenland.game WHERE idGame IN (SELECT idGame FROM (SELECT idGame FROM fishermenland.game WHERE fkTypeGame = '2' GROUP BY idGame DESC LIMIT 1) temp)\");\n}", "function delete_estado($idEstado, $params)\n\t{\n\t\t$this->db->where('idestado',$idEstado);\n\t\treturn $this->db->update('estado',$params);\n\t}", "function deleteFromDatabase ($fileName, $id, $allImages) {\n\n\t$conn = openConnection();\n\t$intId = intval($id);\n\t$query = \"UPDATE portfolio SET images = (?) WHERE id = (?)\";\n\t$stmt = $conn->prepare($query);\n\t$stmt->bind_param(\"si\", $allImages, $intId);\n\t$stmt->execute();\n\tcloseConnection($conn);\n}", "public function deleteSupplier($id){\n DB::table('users')->where('id',$id)->delete();\n }", "public function delete(){\n global $db;\n $delete = $db->prepare('DELETE FROM posts WHERE id = :id');\n $delete->bindValue(':id', $this->_id, PDO::PARAM_INT);\n $delete->execute();\n }", "public function destroy($id)\n {\n $slider = Slider::find($id);\n $delete_slider = Slider::where('id', $id)->delete();\n if (!empty($slider->image)) {\n if (file_exists(base_path('public/') . $slider->image)) {\n unlink(base_path('public/') . $slider->image);\n }\n }\n return response()->json(['status' => 1, 'message' => 'Record deleted successfully.']);\n }", "public function update(Request $request,$id)\n {\n $slider = Slider::findOrFail($id);\n $data = $request->all();\n\n if ($file = $request->file('image')){\n $photo_name = str_random(3).$request->file('image')->getClientOriginalName();\n $file->move('assets/images/sliders',$photo_name);\n $data['image'] = $photo_name;\n if($slider->image != '')\n {\n unlink('assets/images/sliders/'.$slider->image);\n }\n }\n\n if ($request->status == \"\"){\n $data['status'] = 0;\n }\n else\n {\n $data['status'] = 1; \n }\n\n $slider->update($data);\n return redirect('sadmin/sliders')->with('message','Slider Updated Successfully.');\n }", "public function deleteInterests($id){\n $sql =<<<SQL\nDELETE FROM Interests\nWHERE idUser=?\nSQL;\n $pdo = $this->pdo();\n $statement = $pdo->prepare($sql);\n\n $statement->execute(array($id));\n }", "public function excluirAnuncio($id){\n global $pdo;\n $sql = $pdo->prepare(\"DELETE FROM anuncios_imagens WHERE id_anuncio = :id_anuncio\"); // vai remover o registro de imagens\n $sql->bindValue(\":id_anuncio\", $id);\n $sql->execute(); \n\n $sql = $pdo->prepare(\"DELETE FROM anuncios WHERE id = :id\"); \n $sql->bindValue(\":id\", $id);\n $sql->execute(); \n\n \n\n\n\n }", "function delete($id) {\r\n $this->db->where('id', $id);\r\n $this->db->delete($this->tbl);\r\n }" ]
[ "0.7750674", "0.689563", "0.6875786", "0.68172723", "0.67058975", "0.6681535", "0.6600205", "0.65790784", "0.6567443", "0.65552187", "0.6488891", "0.64586514", "0.6380654", "0.6356436", "0.63342315", "0.6322304", "0.6308179", "0.62800246", "0.6276944", "0.627491", "0.6245507", "0.6228617", "0.62028354", "0.61924386", "0.6189741", "0.61789334", "0.61788464", "0.6172923", "0.6171614", "0.61652", "0.6161344", "0.6149216", "0.6131559", "0.6126081", "0.6121072", "0.6106179", "0.6094094", "0.60859954", "0.6082657", "0.6079976", "0.60680175", "0.60569644", "0.6056349", "0.60514593", "0.6051206", "0.6027623", "0.60245496", "0.6020182", "0.60190827", "0.60170907", "0.6016151", "0.60115254", "0.6006493", "0.5995014", "0.5993312", "0.59898365", "0.5976372", "0.5974458", "0.59666693", "0.596601", "0.59608126", "0.59553355", "0.59546757", "0.59533334", "0.5952789", "0.59444", "0.59404916", "0.59401053", "0.59366953", "0.59365714", "0.59361917", "0.5928244", "0.59267694", "0.5921783", "0.5920227", "0.5916962", "0.5916481", "0.591521", "0.59123635", "0.5908718", "0.5903048", "0.5899612", "0.5899093", "0.5891435", "0.5888091", "0.58814734", "0.5880069", "0.58783734", "0.5870032", "0.586935", "0.5867891", "0.58668387", "0.5864921", "0.58629584", "0.5859798", "0.58571285", "0.5856443", "0.58561385", "0.5854659", "0.5850406", "0.584824" ]
0.0
-1
Display a listing of the resource.
public function index() { return view('admin.customer',['customers' => User::all()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { if(isset($request->firstname)){ $request->name = $request->firstname . ' ' . $request->lastname; } //validation $user = User::find($id); $current_email = $user->email; if ($request->email != $current_email) { $this->validate($request, [ 'email' => 'unique:users', ]); } //update customer $customer = User::find($id); //upload file(photo) if ($request->file('file') != null) { $request->file('file') ->move(public_path('uploads'), $request->file('file') ->getClientOriginalName()); $customer->pic = $request->file('file')->getClientOriginalName(); } $customer->name = $request->name; if ($request->email != $current_email) { $customer->email = $request->email; } else{ $customer->email = $current_email; } $customer->name = $request->name; $customer->mobile = $request->mobile; $customer->address = $request->address; $customer->city = $request->city; $customer->state = $request->state; $customer->country = $request->country; $customer->zip = $request->zip; $customer->ip = $request->ip; $customer->status = $request->status; $customer->save(); return back()->with('success','Customer updated successfully'); }
{ "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) { //delete customer $customer = User::find($id); $customer->delete(); return redirect()->route('customers.index')->with('success','Customer deleted successfully'); }
{ "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
Constructs new message container and clears its internal state
public function __construct() { $this->reset(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clear()\n {\n $this->messages = [];\n }", "public function clear(){\r\n\t\t$this->_init_messages();\r\n\t}", "public function clearMessages()\n {\n $this->_messages = array();\n return $this;\n }", "public function clear(): void\n {\n $this->messages = [];\n }", "public function\n\tclearMessages()\n\t{\n\t\t$this -> m_aStorage = [];\n\t}", "public function clear(){\n\t\t$this->stack = array();\n\t\t$this->messages = array();\n\t\treturn $this;\n\t}", "public function clear()\r\n {\r\n $this->messages->clear();\r\n }", "public function clear_messages() {\n\t\t$this->_write_messages( null );\n\t}", "public function reset()\n {\n $this->messages = [];\n }", "function clearContainer()\r\n {\r\n foreach ($this->container as $k => $v)\r\n unset($this->container[$k]);\r\n }", "public function clearMessage()\n {\n $this->setMessage(null);\n $this->clearFormState();\n return $this;\n }", "protected function constructEmpty()\r\n\t{\r\n\t\t$this->transitionCount = 0;\r\n\t\t$this->transitions = array();\r\n\t\t// TODO: this should probably contain at least one item\r\n\t\t$this->types = array();\r\n\t}", "public function __destruct()\n\t{\n\t\t\\Message::reset();\t\n\t}", "public function reset()\n {\n $this->values[self::MESSAGE] = null;\n $this->values[self::SENDER_KEY] = null;\n }", "protected function createBag()\n\t{\n\t\t$this->bag = new MessageBag;\n\n\t\t// Are there any default errors, from a form validator for example?\n\t\tif ($this->session->has('errors'))\n\t\t{\n\t\t\t$errors = $this->session->get('errors')->all(':message');\n\n\t\t\t$this->bag->merge(['error' => $errors]);\n\t\t}\n\n\t\t// Do we have any flashed messages already?\n\t\tif ($this->session->has($this->sessionKey))\n\t\t{\n\t\t\t$this->bag->merge(json_decode($this->session->get($this->sessionKey), true));\n\t\t}\n\t}", "protected static function newMessage()\n {\n self::$message = \\Swift_Message::newInstance();\n }", "function clear()\n\t{\n\t\t$this->to \t\t= '';\n\t\t$this->from \t= '';\n\t\t$this->reply_to\t= '';\n\t\t$this->cc\t\t= '';\n\t\t$this->bcc\t\t= '';\n\t\t$this->subject \t= '';\n\t\t$this->message\t= '';\n\t\t$this->debugger = '';\n\t}", "public function reset()\n {\n $this->_to = array();\n $this->_headers = array();\n $this->_subject = null;\n $this->_message = null;\n $this->_wrap = 78;\n $this->_params = null;\n $this->_attachments = array();\n $this->_uid = $this->getUniqueId();\n return $this;\n }", "public function reset()\n {\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CONTENTS] = array();\n }", "public function __destruct() {\n $this->flushMessages();\n }", "public function clear()\n {\n $this->fromArray(array());\n }", "public function initMessage() {}", "protected function initializeMessages()\n {\n $this->messages = array(\n \n );\n }", "public function clearContent()\n {\n $this->content = array();\n\n return $this;\n }", "public function clear_content(){\n\t\t$this->content=array();\n\t\treturn $this;\n\t}", "public function clear()\n {\n if (null !== $this->getDraft()) {\n $this->getDraft()->clear();\n } else {\n $this->_subcontent->clear();\n $this->subcontentmap = array();\n $this->_data = array();\n $this->index = 0;\n }\n }", "public function __construct()\n\t{\n\t\t$this->clear();\n\t}", "public function reset()\n {\n $this->values[self::_SAY] = null;\n $this->values[self::_FRESH] = null;\n $this->values[self::_FETCH] = null;\n $this->values[self::_CHAT_ADD_BL] = null;\n $this->values[self::_CHAT_DEL_BL] = null;\n $this->values[self::_CHAT_BLACKLIST] = null;\n $this->values[self::_CHAT_BORAD_SAY] = null;\n }", "protected function emptyMessagesFromSession()\n {\n $this->session->set('messages', null);\n }", "protected function clearMessageBody()\n {\n $this->messageBody = '';\n \n if ($this->isHeaderSet(self::CONTENT_LENGTH_HEADER))\n {\n $this->removeHeader(self::CONTENT_LENGTH_HEADER);\n }\n }", "public function delete_messages()\n {\n $this->message=array();\n Session::instance()->delete(\"hana_message\");\n }", "public function __destruct() {\n foreach ($this->_messages as $key => $message) {\n unset($this->_messages[$key]);\n $message->close();\n }\n\n $this->_stream->stop();\n }", "protected function _init()\n {\n global $injector, $notification, $prefs, $registry;\n\n /* The message text and headers. */\n $expand = array();\n $header = array(\n 'to' => '',\n 'cc' => '',\n 'bcc' => ''\n );\n $msg = '';\n $this->title = _(\"Compose Message\");\n\n /* Get the list of headers to display. */\n $display_hdrs = array(\n 'to' => _(\"To: \"),\n 'cc' => _(\"Cc: \"),\n 'bcc' => (\"Bcc: \")\n );\n\n /* Set the current identity. */\n $identity = $injector->getInstance('IMP_Identity');\n if (!$prefs->isLocked('default_identity') &&\n isset($this->vars->identity)) {\n $identity->setDefault($this->vars->identity);\n }\n\n /* Determine if mailboxes are readonly. */\n $drafts = IMP_Mailbox::getPref(IMP_Mailbox::MBOX_DRAFTS);\n $readonly_drafts = $drafts && $drafts->readonly;\n $sent_mail = $identity->getValue(IMP_Mailbox::MBOX_SENT);\n $save_sent_mail = (!$sent_mail || $sent_mail->readonly)\n ? false\n : $prefs->getValue('save_sent_mail');\n\n /* Determine if compose mode is disabled. */\n $compose_disable = !IMP_Compose::canCompose();\n\n /* Initialize objects. */\n $imp_compose = $injector->getInstance('IMP_Factory_Compose')->create($this->vars->composeCache);\n\n /* Are attachments allowed? */\n $attach_upload = $imp_compose->canUploadAttachment();\n\n foreach (array_keys($display_hdrs) as $val) {\n $header[$val] = $this->vars->$val;\n\n /* If we are reloading the screen, check for expand matches. */\n if ($this->vars->composeCache) {\n $expanded = array();\n for ($i = 0; $i < 5; ++$i) {\n if ($tmp = $this->vars->get($val . '_expand_' . $i)) {\n $expanded[] = $tmp;\n }\n }\n if (!empty($expanded)) {\n $header['to'] = strlen($header['to'])\n ? implode(', ', $expanded) . ', ' . $header['to']\n : implode(', ', $expanded);\n }\n }\n }\n\n /* Add attachment. */\n if ($attach_upload &&\n isset($_FILES['upload_1']) &&\n strlen($_FILES['upload_1']['name'])) {\n try {\n $atc_ob = $imp_compose->addAttachmentFromUpload('upload_1');\n if ($atc_ob[0] instanceof IMP_Compose_Exception) {\n throw $atc_ob[0];\n }\n if ($this->vars->a == _(\"Expand Names\")) {\n $notification->push(sprintf(_(\"Added \\\"%s\\\" as an attachment.\"), $atc_ob[0]->getPart()->getName()), 'horde.success');\n }\n } catch (IMP_Compose_Exception $e) {\n $this->vars->a = null;\n $notification->push($e, 'horde.error');\n }\n }\n\n /* Run through the action handlers. */\n switch ($this->vars->a) {\n // 'd' = draft\n // 'en' = edit as new\n // 't' = template\n case 'd':\n case 'en':\n case 't':\n try {\n switch ($this->vars->a) {\n case 'd':\n $result = $imp_compose->resumeDraft($this->indices, array(\n 'format' => 'text'\n ));\n $this->view->resume = true;\n break;\n\n case 'en':\n $result = $imp_compose->editAsNew($this->indices, array(\n 'format' => 'text'\n ));\n break;\n\n case 't':\n $result = $imp_compose->useTemplate($this->indices, array(\n 'format' => 'text'\n ));\n break;\n }\n\n $msg = $result['body'];\n $header = array_merge(\n $header,\n $this->_convertToHeader($result)\n );\n if (!is_null($result['identity']) &&\n ($result['identity'] != $identity->getDefault()) &&\n !$prefs->isLocked('default_identity')) {\n $identity->setDefault($result['identity']);\n $sent_mail = $identity->getValue(IMP_Mailbox::MBOX_SENT);\n }\n } catch (IMP_Compose_Exception $e) {\n $notification->push($e);\n }\n break;\n\n case _(\"Expand Names\"):\n foreach (array_keys($display_hdrs) as $val) {\n if (($val == 'to') || ($this->vars->action != 'rc')) {\n $res = $this->_expandAddresses($header[$val]);\n if (is_string($res)) {\n $header[$val] = $res;\n } else {\n $header[$val] = $res[0];\n $expand[$val] = array_slice($res, 1);\n }\n }\n }\n\n if (isset($this->vars->action)) {\n $this->vars->a = $this->vars->action;\n }\n break;\n\n // 'r' = reply\n // 'rl' = reply to list\n // 'ra' = reply to all\n case 'r':\n case 'ra':\n case 'rl':\n $actions = array(\n 'r' => IMP_Compose::REPLY_SENDER,\n 'ra' => IMP_Compose::REPLY_ALL,\n 'rl' => IMP_Compose::REPLY_LIST\n );\n\n try {\n $reply_msg = $imp_compose->replyMessage(\n $actions[$this->vars->a],\n $this->_getContents(),\n array(\n 'format' => 'text',\n 'to' => $header['to']\n )\n );\n } catch (IMP_Exception $e) {\n $notification->push($e, 'horde.error');\n break;\n }\n\n $header = $this->_convertToHeader($reply_msg);\n\n $notification->push(_(\"Reply text will be automatically appended to your outgoing message.\"), 'horde.message');\n $this->title = _(\"Reply\");\n break;\n\n // 'f' = forward\n case 'f':\n try {\n $fwd_msg = $imp_compose->forwardMessage(\n IMP_Compose::FORWARD_ATTACH,\n $this->_getContents(),\n false\n );\n } catch (IMP_Exception $e) {\n $notification->push($e, 'horde.error');\n break;\n }\n\n $header = $this->_convertToHeader($fwd_msg);\n\n $notification->push(_(\"Forwarded message will be automatically added to your outgoing message.\"), 'horde.message');\n $this->title = _(\"Forward\");\n break;\n\n // 'rc' = redirect compose\n case 'rc':\n $imp_compose->redirectMessage($this->indices);\n $this->title = _(\"Redirect\");\n break;\n\n case _(\"Redirect\"):\n try {\n $num_msgs = $imp_compose->sendRedirectMessage($header['to']);\n $imp_compose->destroy('send');\n\n $notification->push(ngettext(\"Message redirected successfully.\", \"Messages redirected successfully.\", count($num_msgs)), 'horde.success');\n IMP_Minimal_Mailbox::url(array('mailbox' => $this->indices->mailbox))->redirect();\n } catch (Horde_Exception $e) {\n $this->vars->a = 'rc';\n $notification->push($e);\n }\n break;\n\n case _(\"Save Draft\"):\n case _(\"Send\"):\n switch ($this->vars->a) {\n case _(\"Save Draft\"):\n if ($readonly_drafts) {\n break 2;\n }\n break;\n\n case _(\"Send\"):\n if ($compose_disable) {\n break 2;\n }\n break;\n }\n\n $message = strval($this->vars->message);\n $f_to = $header['to'];\n $old_header = $header;\n $header = array();\n\n switch ($imp_compose->replyType(true)) {\n case IMP_Compose::REPLY:\n try {\n $reply_msg = $imp_compose->replyMessage(IMP_Compose::REPLY_SENDER, $imp_compose->getContentsOb(), array(\n 'to' => $f_to\n ));\n $msg = $reply_msg['body'];\n } catch (IMP_Exception $e) {\n $notification->push($e, 'horde.error');\n $msg = '';\n }\n $message .= \"\\n\" . $msg;\n break;\n\n case IMP_Compose::FORWARD:\n try {\n $fwd_msg = $imp_compose->forwardMessage(IMP_Compose::FORWARD_ATTACH, $imp_compose->getContentsOb());\n $msg = $fwd_msg['body'];\n } catch (IMP_Exception $e) {\n $notification->push($e, 'horde.error');\n }\n $message .= \"\\n\" . $msg;\n break;\n }\n\n try {\n $header['from'] = strval($identity->getFromLine(null, $this->vars->from));\n } catch (Horde_Exception $e) {\n $header['from'] = '';\n }\n $header['replyto'] = $identity->getValue('replyto_addr');\n $header['subject'] = strval($this->vars->subject);\n\n foreach (array_keys($display_hdrs) as $val) {\n $header[$val] = $old_header[$val];\n }\n\n switch ($this->vars->a) {\n case _(\"Save Draft\"):\n try {\n $notification->push($imp_compose->saveDraft($header, $message), 'horde.success');\n if ($prefs->getValue('close_draft')) {\n $imp_compose->destroy('save_draft');\n IMP_Minimal_Mailbox::url(array('mailbox' => $this->indices->mailbox))->redirect();\n }\n } catch (IMP_Compose_Exception $e) {\n $notification->push($e);\n }\n break;\n\n case _(\"Send\"):\n try {\n $imp_compose->buildAndSendMessage(\n $message,\n $header,\n $identity,\n array(\n 'readreceipt' => ($prefs->getValue('request_mdn') == 'always'),\n 'save_sent' => $save_sent_mail,\n 'sent_mail' => $sent_mail\n )\n );\n $imp_compose->destroy('send');\n\n $notification->push(_(\"Message sent successfully.\"), 'horde.success');\n IMP_Minimal_Mailbox::url(array('mailbox' => $this->indices->mailbox))->redirect();\n } catch (IMP_Compose_Exception $e) {\n $notification->push($e);\n\n /* Switch to tied identity. */\n if (!is_null($e->tied_identity)) {\n $identity->setDefault($e->tied_identity);\n $notification->push(_(\"Your identity has been switched to the identity associated with the current recipient address. The identity will not be checked again during this compose action.\"));\n }\n }\n break;\n }\n break;\n\n case _(\"Cancel\"):\n $imp_compose->destroy('cancel');\n IMP_Minimal_Mailbox::url(array('mailbox' => $this->indices->mailbox))->redirect();\n exit;\n\n case _(\"Discard Draft\"):\n $imp_compose->destroy('discard');\n IMP_Minimal_Mailbox::url(array('mailbox' => $this->indices->mailbox))->redirect();\n exit;\n }\n\n /* Grab any data that we were supplied with. */\n if (empty($msg)) {\n $msg = strval($this->vars->message);\n }\n if (empty($header['subject'])) {\n $header['subject'] = strval($this->vars->subject);\n }\n\n $this->view->cacheid = $imp_compose->getCacheId();\n $this->view->hmac = $imp_compose->getHmac();\n $this->view->menu = $this->getMenu('compose');\n $this->view->url = self::url();\n $this->view->user = $registry->getAuth();\n\n switch ($this->vars->a) {\n case 'rc':\n $this->_pages[] = 'redirect';\n $this->_pages[] = 'menu';\n unset($display_hdrs['cc'], $display_hdrs['bcc']);\n break;\n\n default:\n $this->_pages[] = 'compose';\n $this->_pages[] = 'menu';\n\n $this->view->compose_enable = !$compose_disable;\n $this->view->msg = $msg;\n $this->view->save_draft = ($injector->getInstance('IMP_Factory_Imap')->create()->access(IMP_Imap::ACCESS_DRAFTS) && !$readonly_drafts);\n $this->view->subject = $header['subject'];\n\n $select_list = $identity->getSelectList();\n $default_identity = $identity->getDefault();\n\n if ($prefs->isLocked('default_identity')) {\n $select_list = array(\n $default_identity => $select_list[$default_identity]\n );\n }\n\n $tmp = array();\n foreach ($select_list as $key => $val) {\n $tmp[] = array(\n 'key' => $key,\n 'sel' => ($key == $default_identity),\n 'val' => $val\n );\n }\n $this->view->identities = $tmp;\n\n if ($attach_upload) {\n $this->view->attach = true;\n if (count($imp_compose)) {\n $atc_part = $imp_compose[0]->getPart();\n $this->view->attach_name = $atc_part->getName();\n $this->view->attach_size = IMP::sizeFormat($atc_part->getBytes());\n $this->view->attach_type = $atc_part->getType();\n }\n }\n\n $this->title = _(\"Message Composition\");\n }\n\n $hdrs = array();\n foreach ($display_hdrs as $key => $val) {\n $tmp = array(\n 'key' => $key,\n 'label' => $val,\n 'val' => $header[$key]\n );\n\n if (isset($expand[$key])) {\n $tmp['matchlabel'] = (count($expand[$key][1]) > 5)\n ? sprintf(_(\"Ambiguous matches for \\\"%s\\\" (first 5 matches displayed):\"), $expand[$key][0])\n : sprintf(_(\"Ambiguous matches for \\\"%s\\\":\"), $expand[$key][0]);\n\n $tmp['match'] = array();\n foreach ($expand[$key][1] as $key2 => $val2) {\n if ($key2 == 5) {\n break;\n }\n $tmp['match'][] = array(\n 'id' => $key . '_expand_' . $key2,\n 'val' => $val2\n );\n }\n }\n\n $hdrs[] = $tmp;\n }\n\n $this->view->hdrs = $hdrs;\n $this->view->title = $this->title;\n }", "public static function reset()\n {\n $container = static::getInstance();\n $container->values = array();\n $container->factories = array();\n $container->raw = array();\n }", "public function resetMessage() {\n self::$message = '';\n }", "public function reset()\n {\n $this->to = [];\n $this->from = [];\n $this->sender = [];\n $this->replyTo = [];\n $this->readReceipt = [];\n $this->returnPath = [];\n $this->cc = [];\n $this->bcc = [];\n $this->messageId = true;\n $this->subject = '';\n $this->headers = [];\n $this->textMessage = '';\n $this->htmlMessage = '';\n $this->message = [];\n $this->emailFormat = static::MESSAGE_TEXT;\n $this->priority = null;\n $this->charset = 'utf-8';\n $this->headerCharset = null;\n $this->transferEncoding = null;\n $this->attachments = [];\n $this->emailPattern = static::EMAIL_PATTERN;\n\n return $this;\n }", "public function reset()\n {\n $this->cbuff = [];\n }", "public function reset()\n {\n $this->from = [];\n $this->to = [];\n $this->subject = null;\n $this->body = null;\n $this->html = true;\n }", "protected function clear() {}", "function clear() {\n\t\t\t$this->items = [];\n\t\t}", "function clear()\n {\n $this->p_size = '';\n $this->p_bidList = array();\n\n }", "public function clear()\n {\n $this->items = array();\n $this->length = 0;\n\n return $this;\n }", "public function clear() {\n\t\t\t$this->elements = array();\n\t\t\t$this->size = 0;\n\t}", "public function clear() {\n\t\t\t$this->elements = array();\n\t\t\t$this->size = 0;\n\t}", "public function clear()\n {\n $this->_data = [];\n }", "public function clearMsg() {\n\t\t$_SESSION['msg'] = null;\n\t}", "public function clear() {\n $this->_data = [];\n }", "public function __construct() {\n $this->messages = CommonFacade::getMessages();\n }", "public function __construct() {\n $this->messages = CommonFacade::getMessages();\n }", "public function clear ()\n {\n\n $this->groups = null;\n $this->groups = array();\n $this->names = null;\n $this->names = array();\n\n }", "public function clear() {\n\t\t$this->array = array();\n\t}", "public static function clear()\n {\n self::$actionList = new \\SplPriorityQueue();\n self::$errors = [];\n self::$warnings = [];\n }", "public function clear () {\n \n }", "public function clearState()\n {\n $this->fields = array();\n }", "public function __destruct() {\r\n\t\t\t$_SESSION['mod_messages'] = $this->messages;\r\n\t\t}", "public function reset()\n {\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CHAT_ID] = null;\n $this->values[self::_ACCESSORY] = null;\n }", "public function reset()\n {\n $this->values[self::_CHAT_ID] = null;\n $this->values[self::_SPEAKER_UID] = null;\n $this->values[self::_SPEAKER_SUMMARY] = null;\n $this->values[self::_TARGET_UID] = null;\n $this->values[self::_TARGET_SUMMARY] = null;\n $this->values[self::_SPEAKER_POST] = null;\n $this->values[self::_SPEAK_TIME] = null;\n $this->values[self::_CONTENT_TYPE] = null;\n $this->values[self::_CONTENT] = null;\n }", "public function clear() {}", "public function clear() {}", "public function clear() {}", "public function clear() {}", "public function __destruct()\n {\n if ($this->cache) {\n $this->cache->setItem(self::CACHE_KEY, $this->messagesWritten);\n }\n }", "function Clear()\r\n {\r\n $this->_items = array();\r\n }", "public function clear(): self;", "function clear()\r\n\t\t{\r\n\t\t\t$this->elements = array();\r\n\t\t}", "public function clear()\n {\n $this->items = array();\n $this->itemsCount = 0;\n }", "public static function clear()\n {\n self::$context = new Context();\n self::$macros = array();\n self::$citationItem = false;\n self::$context = new Context();\n self::$rendered = new Rendered();\n self::$bibliography = null;\n self::$citation = null;\n\n self::setLocale(Factory::locale());\n self::$locale->readFile();\n }", "public function clear() {\n $this->collection = [];\n $this->noteCollectionChanged();\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CONTENTS] = array();\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CONTENTS] = array();\n }", "public function Clear()\n {\n $this->items = array();\n }", "public function clear(): void\n {\n $this->bufferSize = 0;\n $this->buffer = array();\n }", "public function cleanup(){\n\n //$this->_mail_type = 'html';\n //$this->_mail_encoding = 'utf-8';\n //$this->_transport_login = '';\n //$this->_transport = 'php';\n //$this->_transport_password = '';\n //$this->_transport_port = null;\n //$this->_transport_secure = null;\n //$this->_transport_host = null;\n $this->_lastError = null;\n $this->_subject = '';\n $this->_body = '';\n $this->_alt_body = '';\n $this->_attachements = array();\n $this->_from = '';\n $this->_fromName = null;\n $this->_replyto = array();\n $this->_addresses = array();\n $this->_cc = array();\n $this->_bcc = array();\n $this->_replyto = array();\n $this->_custom_headers = array();\n //$this->_is_embed_images = false;\n //$this->_is_track_links = false;\n //$this->_is_use_message_id = false;\n\n return $this;\n\n }", "public function clearMessages() {\n $this->connection->truncate($this->messageTable)\n ->execute();\n }", "public function __construct()\n\t{\n\t\t$this->container \t = array();\n\t\t$this->hiddenContainer = array();\n\t}", "public function clear() {\n $this->elements = array();\n }", "public function reset() {\n\t\t$this->_mailTo = array();\n\t\t$this->_mailCc = array();\n\t\t$this->_mailBcc = array();\n\t\t$this->_mailSubject = '';\n\t\t$this->_mailBody = '';\n\t\t$this->_mailReplyTo = '';\n\t\t$this->_mailReplyToName = '';\n\t\t$this->_mailFrom = '';\n\t\t$this->_mailFromName = '';\n\t\t$this->_mailFiles = array();\n\t\t$this->_mailPreparedHeaders = '';\n\t\t$this->_mailPreparedBody = '';\n\t}", "public function __construct() {\n $this->unset_members();\n }", "public function clear()\n {\n $this->items = array();\n }", "function clear()\r\n {\r\n $this->items=array();\r\n }", "private function clear()\n {\n $this->mappedQueries = [];\n $this->mappedFilters = [];\n $this->requestData = [];\n }", "public function reset()\n {\n $this->values[self::CONVERSATION] = null;\n $this->values[self::SKMSG] = null;\n $this->values[self::IMAGE] = null;\n $this->values[self::CONTACT] = null;\n $this->values[self::LOCATION] = null;\n $this->values[self::URLMSG] = null;\n $this->values[self::DOCUMENT] = null;\n $this->values[self::AUDIO] = null;\n $this->values[self::VIDEO] = null;\n $this->values[self::CALL] = null;\n $this->values[self::CHAT] = null;\n }", "public function clear()\n {\n $this->data = [];\n }", "public function clear()\n\t{\n\t\t$this->items = [];\n\t}", "public function reset() {\r\n $this->header = [];\r\n $this->cookie = [];\r\n $this->content = NULL;\r\n }", "public function clear()\n {\n $this->groups = collect();\n $this->flash();\n\n return $this;\n }", "public function updateMessageContainer(array &$form, FormStateInterface $form_state) {\n return $form['message_container'];\n }", "protected function clear()\n {\n $this->innerHtml = null;\n $this->outerHtml = null;\n $this->text = null;\n }", "public function clear(): void {\n\t\t$this->m_elements = [];\n\t}", "public function emptyErrorBag() {\n\t\t$this->errorBag = [];\n\t}", "public function clear() {\n\t}", "public function mount()\n {\n $this->messageString = '';\n $this->address = '';\n }", "public function reset()\n {\n $this->data = [];\n $this->boundary = null;\n\n return $this;\n }", "public function reset()\n {\n $this->values[self::GROUP_ID] = null;\n $this->values[self::SENDER_KEY] = null;\n }", "public function clear()\n {\n $this->stack = [];\n\n return $this;\n }", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}" ]
[ "0.6759655", "0.6694383", "0.6664635", "0.6585841", "0.65726465", "0.65234977", "0.64330304", "0.6162081", "0.6160057", "0.59145373", "0.5856848", "0.58269936", "0.5814096", "0.5718538", "0.5714013", "0.56949586", "0.56226987", "0.55620676", "0.55460143", "0.5533074", "0.54767585", "0.54622346", "0.54509383", "0.5432905", "0.5427114", "0.5426711", "0.54264224", "0.5391426", "0.53838825", "0.5383757", "0.53516746", "0.53376824", "0.52954715", "0.5294457", "0.5288429", "0.52843916", "0.5282157", "0.52715707", "0.52697587", "0.52577966", "0.52545", "0.5227543", "0.5225791", "0.5225791", "0.5217068", "0.5214303", "0.52123237", "0.51950234", "0.51950234", "0.51911044", "0.51508814", "0.5144035", "0.5142131", "0.5119759", "0.51148516", "0.51140714", "0.5113898", "0.51109874", "0.51109874", "0.51109874", "0.51109874", "0.50991213", "0.5097356", "0.509574", "0.509275", "0.5085487", "0.5082196", "0.5077796", "0.5075996", "0.5075957", "0.5072386", "0.50718457", "0.50694686", "0.50646156", "0.5062829", "0.50535804", "0.50524104", "0.5048935", "0.5047298", "0.5046331", "0.50285727", "0.5016199", "0.5015212", "0.50056255", "0.49988136", "0.49970958", "0.49918562", "0.49892822", "0.49881718", "0.49865997", "0.4983313", "0.49798554", "0.49696144", "0.49694866", "0.4968886", "0.49683005", "0.49683005", "0.49683005", "0.49683005", "0.49683005", "0.49683005" ]
0.0
-1
Clears message values and sets default ones
public function reset() { $this->values[self::SHIPMENTRECEIPTDATE] = null; $this->values[self::ATTORNEY] = null; $this->values[self::ACCEPTEDBY] = null; $this->values[self::RECEIVEDBY] = null; $this->values[self::SIGNER] = null; $this->values[self::ADDITIONALINFO] = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reset()\n {\n $this->values[self::MESSAGE] = null;\n $this->values[self::SENDER_KEY] = null;\n }", "public function reset()\n {\n $this->values[self::CONVERSATION] = null;\n $this->values[self::SKMSG] = null;\n $this->values[self::IMAGE] = null;\n $this->values[self::CONTACT] = null;\n $this->values[self::LOCATION] = null;\n $this->values[self::URLMSG] = null;\n $this->values[self::DOCUMENT] = null;\n $this->values[self::AUDIO] = null;\n $this->values[self::VIDEO] = null;\n $this->values[self::CALL] = null;\n $this->values[self::CHAT] = null;\n }", "public function reset()\n {\n $this->values[self::_SAY] = null;\n $this->values[self::_FRESH] = null;\n $this->values[self::_FETCH] = null;\n $this->values[self::_CHAT_ADD_BL] = null;\n $this->values[self::_CHAT_DEL_BL] = null;\n $this->values[self::_CHAT_BLACKLIST] = null;\n $this->values[self::_CHAT_BORAD_SAY] = null;\n }", "public function reset()\n {\n $this->values[self::_PLAIN_MAIL] = null;\n $this->values[self::_FORMAT_MAIL] = null;\n }", "public function clear(){\r\n\t\t$this->_init_messages();\r\n\t}", "public function reset()\n {\n $this->values[self::_MAIL_CFG_ID] = null;\n $this->values[self::_PARAMS] = array();\n }", "public function resetMessage() {\n self::$message = '';\n }", "function clear()\n\t{\n\t\t$this->to \t\t= '';\n\t\t$this->from \t= '';\n\t\t$this->reply_to\t= '';\n\t\t$this->cc\t\t= '';\n\t\t$this->bcc\t\t= '';\n\t\t$this->subject \t= '';\n\t\t$this->message\t= '';\n\t\t$this->debugger = '';\n\t}", "public function reset()\n {\n $this->messages = [];\n }", "public function reset()\n {\n $this->values[self::_CHAT_ID] = null;\n $this->values[self::_SPEAKER_UID] = null;\n $this->values[self::_SPEAKER_SUMMARY] = null;\n $this->values[self::_TARGET_UID] = null;\n $this->values[self::_TARGET_SUMMARY] = null;\n $this->values[self::_SPEAKER_POST] = null;\n $this->values[self::_SPEAK_TIME] = null;\n $this->values[self::_CONTENT_TYPE] = null;\n $this->values[self::_CONTENT] = null;\n }", "public function reset()\n {\n $this->values[self::_LADDER_NOTIFY] = null;\n $this->values[self::_NEW_MAIL] = null;\n $this->values[self::_GUILD_CHAT] = null;\n $this->values[self::_ACTIVITY_NOTIFY] = null;\n $this->values[self::_ACTIVITY_REWARD] = null;\n $this->values[self::_RELEASE_HEROES] = array();\n $this->values[self::_EXCAV_RECORD] = null;\n $this->values[self::_GUILD_DROP] = null;\n $this->values[self::_PERSONAL_CHAT] = null;\n $this->values[self::_SPLITABLE_HEROES] = null;\n }", "public function reset()\n {\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CHAT_ID] = null;\n $this->values[self::_ACCESSORY] = null;\n }", "public function reset()\n {\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CONTENTS] = array();\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CONTENTS] = array();\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CONTENTS] = array();\n }", "public function reset()\n {\n $this->values[self::GROUP_ID] = null;\n $this->values[self::SENDER_KEY] = null;\n }", "function reset()\n {\n $this->fromEmail = \"\";\n $this->fromName = \"\";\n $this->fromUser = null; // RMV-NOTIFY\n $this->priority = '';\n $this->toUsers = array();\n $this->toEmails = array();\n $this->headers = array();\n $this->subject = \"\";\n $this->body = \"\";\n $this->errors = array();\n $this->success = array();\n $this->isMail = false;\n $this->isPM = false;\n $this->assignedTags = array();\n $this->template = \"\";\n $this->templatedir = \"\";\n // Change below to \\r\\n if you have problem sending mail\n $this->LE = \"\\n\";\n }", "public function clear(): void\n {\n $this->messages = [];\n }", "public function clear_messages() {\n\t\t$this->_write_messages( null );\n\t}", "public function clear()\n {\n $this->messages = [];\n }", "public function reset()\n {\n $this->values[self::_WORLDCUP_QUERY_REPLY] = null;\n $this->values[self::_WORLDCUP_SUBMIT_REPLY] = null;\n }", "public function reset()\n {\n $this->values[self::_FROM] = null;\n $this->values[self::_TITLE] = null;\n $this->values[self::_CONTENT] = null;\n }", "public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_WORSHIP] = null;\n $this->values[self::_DROP_INFO] = null;\n $this->values[self::_TO_CHAIRMAN] = null;\n }", "public function reset()\n {\n $this->values[self::_USER_SUMMARY] = null;\n $this->values[self::_GUILD_SUMMARY] = null;\n $this->values[self::_PARAM1] = null;\n }", "public function reset()\n\t{\n\t\t$this->method = NOTIFY_MAIL;\n\t\t$this->body = '';\n\t\t$this->subject = '';\n\t\t$this->bcc = array();\n\t\t$this->vars = array();\n\t}", "public function reset()\n {\n $this->values[self::_ITEM_ID] = null;\n $this->values[self::_RECEIVER_NAME] = null;\n $this->values[self::_SEND_TIME] = null;\n $this->values[self::_SENDER_NAME] = null;\n }", "public function clear()\r\n {\r\n $this->messages->clear();\r\n }", "public function reset()\n {\n $this->values[self::pending_pay] = null;\n $this->values[self::pending_shipped] = null;\n $this->values[self::pending_received] = null;\n $this->values[self::user_received] = null;\n $this->values[self::to_share] = null;\n }", "public function reset()\n {\n $this->values[self::_WORLD_CHAT_TIMES] = null;\n $this->values[self::_LAST_RESET_WORLD_CHAT_TIME] = null;\n $this->values[self::_BLACK_LIST] = array();\n }", "public function reset()\n {\n $this->values[self::services] = array();\n $this->values[self::mapping] = array();\n $this->values[self::short_tcp] = self::$fields[self::short_tcp]['default'];\n }", "public function resetMessage(){\n\t\t\tif (isset($_SESSION['message']) && $_SESSION['message']!='') {\n\t\t\t\t$_SESSION['message']='';\n\t\t\t}\n\t\t}", "public function reset()\n {\n $this->values[self::_CHALLENGER] = null;\n $this->values[self::_DAMAGE] = null;\n }", "public function reset()\n {\n $this->values[self::_CHALLENGER] = null;\n $this->values[self::_DAMAGE] = null;\n }", "public function reset()\n {\n $this->values[self::WTLOGINREQBUFF] = null;\n $this->values[self::WTLOGINIMGREQI] = null;\n $this->values[self::WXVERIFYCODERE] = null;\n $this->values[self::CLIDBENCRYPTKE] = null;\n $this->values[self::CLIDBENCRYPTINFO] = null;\n $this->values[self::AUTHREQFLAG] = null;\n $this->values[self::AUTHTICKET] = null;\n }", "public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_OPPOS] = array();\n $this->values[self::_IS_ROBOT] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_GUILD_INFO] = null;\n }", "public function reset() {\n $this->values[self::OPTION] = null;\n $this->values[self::CONTENT] = array();\n $this->values[self::ERROR] = null;\n }", "public function reset()\n {\n $this->values[self::_REQUEST] = null;\n $this->values[self::_CHANGE] = null;\n }", "public function\n\tclearMessages()\n\t{\n\t\t$this -> m_aStorage = [];\n\t}", "public function reset()\n {\n $this->values[self::_SYS_MAIL_LIST] = array();\n }", "public static function clear_defaults() {\n static::$defaults = [];\n }", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_BINARY] = null;\n $this->values[self::_REPLAY] = null;\n }", "public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_NAME] = null;\n $this->values[self::_JOB] = Down_GuildJobT::member;\n $this->values[self::_REQ_GUILD_ID] = null;\n $this->values[self::_HIRE_HERO] = array();\n }", "public function applyDefaultValues()\n\t{\n\t\t$this->points = '0';\n\t\t$this->type = 0;\n\t\t$this->hidden = 0;\n\t\t$this->relationship_status = 0;\n\t\t$this->show_email = 1;\n\t\t$this->show_gender = 1;\n\t\t$this->show_hometown = 1;\n\t\t$this->show_home_phone = 1;\n\t\t$this->show_mobile_phone = 1;\n\t\t$this->show_birthdate = 1;\n\t\t$this->show_address = 1;\n\t\t$this->show_relationship_status = 1;\n\t\t$this->credit = 0;\n\t\t$this->login = 0;\n\t}", "public function reset()\n {\n $this->setValue($this->getDefaultValue());\n }", "public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_STATUS] = null;\n $this->values[self::_MAIL_TIME] = null;\n $this->values[self::_EXPIRE_TIME] = null;\n $this->values[self::_CONTENT] = null;\n $this->values[self::_MONEY] = null;\n $this->values[self::_DIAMONDS] = null;\n $this->values[self::_SKILL_POINT] = null;\n $this->values[self::_ITEMS] = array();\n $this->values[self::_POINTS] = array();\n }", "public function applyDefaultValues()\n\t{\n\t\t$this->closed = 0;\n\t\t$this->lastfmid = 0;\n\t\t$this->hasphotos = 0;\n\t}", "public function reset()\n {\n $this->values[self::TEXT] = null;\n $this->values[self::MATCHEDTEXT] = null;\n $this->values[self::CANONICALURL] = null;\n $this->values[self::DESCRIPTION] = null;\n $this->values[self::TITLE] = null;\n $this->values[self::THUMBNAIL] = null;\n }", "public function applyDefaultValues()\n {\n $this->deleted = false;\n $this->amount = 1;\n $this->amountevaluation = 0;\n $this->defaultstatus = 0;\n $this->defaultdirectiondate = 0;\n $this->defaultenddate = 0;\n $this->defaultpersoninevent = 0;\n $this->defaultpersonineditor = 0;\n $this->maxoccursinevent = 0;\n $this->showtime = false;\n $this->ispreferable = true;\n $this->isrequiredcoordination = false;\n $this->isrequiredtissue = false;\n $this->mnem = '';\n }", "public function reset()\n {\n $this->values[self::FILTER] = null;\n $this->values[self::AFTERINDEXKEY] = null;\n $this->values[self::POPULATEDOCUMENTS] = self::$fields[self::POPULATEDOCUMENTS]['default'];\n $this->values[self::INJECTENTITYCONTENT] = self::$fields[self::INJECTENTITYCONTENT]['default'];\n $this->values[self::POPULATEPREVIOUSDOCUMENTSTATES] = self::$fields[self::POPULATEPREVIOUSDOCUMENTSTATES]['default'];\n }", "public function applyDefaultValues()\n {\n $this->shnttype = '';\n $this->shntseq = 0;\n $this->shntkey2 = '';\n $this->shntform = '';\n }", "public function reset()\n {\n $this->values[self::PHONE] = null;\n $this->values[self::PASSWORD] = null;\n $this->values[self::EQUIPMENT] = null;\n $this->values[self::LOGIN_TYPE] = null;\n }", "public function reset()\n {\n $this->values[self::_AVATAR] = null;\n $this->values[self::_NAME] = null;\n $this->values[self::_VIP] = null;\n $this->values[self::_LEVEL] = null;\n $this->values[self::_GUILD_NAME] = null;\n $this->values[self::_USER_ID] = null;\n }", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_PARAM1] = null;\n $this->values[self::_PARAM2] = null;\n }", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_PARAM1] = null;\n $this->values[self::_PARAM2] = null;\n }", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_PARAM1] = null;\n $this->values[self::_PARAM2] = null;\n }", "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_PARAM1] = null;\n $this->values[self::_PARAM2] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_JOIN_GUILD_ID] = null;\n $this->values[self::_GUILD_INFO] = null;\n $this->values[self::_CD_TIME] = null;\n $this->values[self::_FAIL_REASON] = null;\n }", "public function applyDefaultValues()\n {\n $this->phadtype = '';\n $this->phadid = '';\n $this->phadsubid = '';\n $this->phadsubidseq = 0;\n $this->phadcont = '';\n }", "public function reset()\n {\n $this->values[self::BOXID] = null;\n $this->values[self::DRAFTID] = null;\n $this->values[self::TOBOXID] = null;\n $this->values[self::TODEPARTMENTID] = null;\n $this->values[self::DOCUMENTSIGNATURES] = array();\n $this->values[self::PROXYBOXID] = null;\n $this->values[self::PROXYDEPARTMENTID] = null;\n }", "public function reset() {\n $this->values[self::ERR_NO] = null;\n $this->values[self::ERR_MSG] = null;\n $this->values[self::CONTENTS] = array();\n }", "public function reset()\n {\n $this->values[self::ID] = null;\n $this->values[self::LEVELUP_TIME] = null;\n $this->values[self::BEHELPED_TIMES] = null;\n $this->values[self::HELP_ASKED] = self::$fields[self::HELP_ASKED]['default'];\n $this->values[self::TOTAL_TIME] = null;\n }", "public function reset()\n {\n $this->values[self::STATUS] = null;\n $this->values[self::ERRORS] = array();\n $this->values[self::VALIDATOR_REVISION] = self::$fields[self::VALIDATOR_REVISION]['default'];\n $this->values[self::SPEC_FILE_REVISION] = self::$fields[self::SPEC_FILE_REVISION]['default'];\n $this->values[self::TRANSFORMER_VERSION] = self::$fields[self::TRANSFORMER_VERSION]['default'];\n $this->values[self::TYPE_IDENTIFIER] = array();\n $this->values[self::VALUE_SET_PROVISIONS] = array();\n $this->values[self::VALUE_SET_REQUIREMENTS] = array();\n }", "public function reset()\n {\n $this->values[self::_STATUS] = null;\n $this->values[self::_FREQUENCY] = null;\n $this->values[self::_LAST_LOGIN_DATE] = null;\n }", "public function reset()\n {\n $this->values[self::system] = null;\n $this->values[self::platform] = null;\n $this->values[self::channel] = null;\n $this->values[self::version] = null;\n }", "public function applyDefaultValues()\n {\n $this->is_active = false;\n $this->is_closed = false;\n }", "public function reset()\n {\n $this->values[self::ERRMSG] = null;\n $this->values[self::RET] = null;\n }", "public function reset()\n {\n $this->values[self::_GUILD_LOG] = array();\n }", "public function reset()\n {\n $this->values[self::_USERS] = array();\n $this->values[self::_HIRE_UIDS] = array();\n $this->values[self::_FROM] = null;\n }", "public function reset()\n {\n $this->values[self::payment_method] = null;\n $this->values[self::wechat_pay] = null;\n $this->values[self::alipay_express] = null;\n $this->values[self::order_id] = array();\n $this->values[self::order] = array();\n }", "public function reset()\n {\n $this->values[self::_USER_ID] = null;\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_RANK] = null;\n $this->values[self::_WIN_CNT] = null;\n $this->values[self::_GS] = null;\n $this->values[self::_IS_ROBOT] = null;\n $this->values[self::_HEROS] = array();\n }", "public function reset(): void\n {\n /** @var array<string, mixed> $fieldsFromConfig */\n $fieldsFromConfig = config('alert.fields', []);\n\n $this->fields = $fieldsFromConfig;\n }", "public function reset()\n {\n $this->values[self::NAME] = null;\n $this->values[self::EMAIL] = null;\n $this->values[self::PHONEDA] = array();\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_INCOME] = null;\n }", "public function reset()\n {\n $this->values[self::REQUEST_HEADER] = null;\n $this->values[self::NEW_NAME] = null;\n $this->values[self::EVENT_REQUEST_HEADER] = null;\n }", "public function reset()\n {\n $this->values[self::SIGNEDCONTENT] = null;\n $this->values[self::FILENAME] = null;\n $this->values[self::COMMENT] = null;\n $this->values[self::CUSTOMDOCUMENTID] = null;\n $this->values[self::CUSTOMDATA] = array();\n }", "public function reset()\n {\n $this->values[self::_OPEN_PANEL] = null;\n $this->values[self::_APPLY_OPPO] = null;\n $this->values[self::_START_BATTLE] = null;\n $this->values[self::_END_BATTLE] = null;\n $this->values[self::_SET_LINEUP] = null;\n $this->values[self::_QUERY_RECORDS] = null;\n $this->values[self::_QUERY_REPLAY] = null;\n $this->values[self::_QUERY_RANKBORAD] = null;\n $this->values[self::_QUERY_OPPO] = null;\n $this->values[self::_CLEAR_BATTLE_CD] = null;\n $this->values[self::_DRAW_RANK_REWARD] = null;\n $this->values[self::_BUY_BATTLE_CHANCE] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_APP_QUEUE] = null;\n }", "public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_ADDR] = null;\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_APP_QUEUE] = null;\n }", "public function clearMsg() {\n\t\t$_SESSION['msg'] = null;\n\t}", "public function reset()\n {\n $this->values[self::PORTLIST] = null;\n $this->values[self::TIMEOUTLIST] = null;\n $this->values[self::MIMNOOPINTERVAL] = null;\n $this->values[self::MAXNOOPINTERVAL] = null;\n $this->values[self::TYPINGINTERVAL] = null;\n $this->values[self::NOOPINTERVALTIME] = null;\n }", "function setDefaultValues() {}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}" ]
[ "0.7559812", "0.74739546", "0.72973615", "0.7258333", "0.7185409", "0.71421975", "0.7037741", "0.70338154", "0.70285827", "0.70249987", "0.69918084", "0.697904", "0.6965748", "0.68274975", "0.68267244", "0.6796972", "0.6759827", "0.6743557", "0.67366123", "0.6724516", "0.6717986", "0.6702474", "0.66880184", "0.66670156", "0.665216", "0.6648875", "0.6623373", "0.6610065", "0.6604048", "0.65854067", "0.65795976", "0.6572542", "0.65723675", "0.6571937", "0.6567922", "0.6565031", "0.65475714", "0.6518179", "0.6506664", "0.64885837", "0.64826536", "0.6460602", "0.6454503", "0.64510584", "0.64296746", "0.64281696", "0.64216936", "0.64214784", "0.6412798", "0.64043164", "0.6400258", "0.6381591", "0.63810694", "0.63705844", "0.63705844", "0.6369157", "0.6369157", "0.6363431", "0.63612527", "0.63566434", "0.6355287", "0.6353886", "0.6345771", "0.6342256", "0.6342212", "0.6327448", "0.6325498", "0.63226247", "0.632092", "0.6314576", "0.6313809", "0.63039047", "0.6293232", "0.628343", "0.6280546", "0.62781066", "0.6267865", "0.6264377", "0.6263501", "0.6262706", "0.6244747", "0.62435585", "0.6228733", "0.62282777", "0.62282777", "0.62282777", "0.62282777", "0.62282777", "0.62282777", "0.62282777", "0.62282777", "0.62282777", "0.62282777", "0.62282777", "0.62282777", "0.62282777", "0.62282777", "0.62282777", "0.62282777", "0.62282777" ]
0.63534236
62
Sets value of 'ShipmentReceiptDate' property
public function setShipmentReceiptDate($value) { return $this->set(self::SHIPMENTRECEIPTDATE, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _setShipmentDate($shipmentDate) {\n\t\t$this->_shipmentDate = $shipmentDate;\n\t}", "public function setShipmentDate($shipmentDate) {\n\t\t$this->_setShipmentDate($shipmentDate);\n\t\treturn $this;\n\t}", "public function setTransactionDate($value) {\n\t\tself::$_transactionDate = $value;\n\t}", "public function setDate($value) {\n\t\t$this->_date = $value;\n\t}", "public function setDate( $sDate ) {\n\t\t$this->sDate = $sDate;\n\t}", "public function getShipmentReceiptDate()\n {\n $value = $this->get(self::SHIPMENTRECEIPTDATE);\n return $value === null ? (string)$value : $value;\n }", "public function setDate($date)\n {\n $this->date = $date;\n }", "public function setDate($date)\n {\n $this->date = $date;\n }", "public function setDate($date)\n\t{\n\t\t$this->date = $date;\n\t}", "function setDateReminded($dateReminded) {\n\t\t$this->setData('dateReminded', $dateReminded);\n\t}", "public function setDate($date) {\n $this->date = $date;\n }", "public function setDate($date){\n\t\t$this->date = $date;\n\t}", "public function setinvoiceDateAttribute($value)\n {\n\n $this->attributes['invoice_date'] = UserHelper::parseDateFromString($value);\n }", "public function setReviewDate($newReviewDate = null) {\n\t\t\t\t// base case: if the date is null, use the current date and time\n\t\t\t\tif($newReviewDate = null) {\n\t\t\t\t\t$this->reviewDate = new \\DateTime();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// store the review date\n\t\t\t\ttry {\n\t\t\t\t\t$newReviewDate = self::validateDateTime($newReviewDate);\n\t\t\t\t} catch(\\InvalidArgumentException $invalidArgument) {\n//\t\t\t\t\t\tthrow(new \\InvalidArgumentException($invalidArgument->getMessage(), 0, $range));\n\t\t\t\t\tthrow(new \\InvalidArgumentException (\"No date specified\", 405));\n\t\t\t\t} catch(\\RangeException $range) {\n\t\t\t\t\tthrow(new \\RangeException($range->getMessage(), 0, $range));\n\t\t\t\t}\n\t\t\t\t$this->reviewDate = $newReviewDate;\n\t\t\t}", "public function setToDate($toDate)\n {\n if (stristr($toDate, \"-\")) {\n $toDate = strtotime($toDate);\n }\n $this->toDate = $toDate;\n }", "public function setDate($date);", "public function setShippingDate($var)\n {\n GPBUtil::checkString($var, True);\n $this->shippingDate = $var;\n\n return $this;\n }", "public function setShippingDate($data)\n {\n if ($data == '0000-00-00 00:00:00') {\n $data = null;\n }\n if ($data === 'CURRENT_TIMESTAMP' || is_null($data)) {\n $data = \\Zend_Date::now()->setTimezone('UTC');\n }\n\n if ($data instanceof \\Zend_Date) {\n\n $data = new \\DateTime($data->toString('yyyy-MM-dd HH:mm:ss'), new \\DateTimeZone($data->getTimezone()));\n\n } elseif (!is_null($data) && !$data instanceof \\DateTime) {\n\n $data = new \\DateTime($data, new \\DateTimeZone('UTC'));\n }\n if ($data instanceof \\DateTime && $data->getTimezone()->getName() != 'UTC') {\n\n $data->setTimezone(new \\DateTimeZone('UTC'));\n }\n\n if ($this->_shippingDate != $data) {\n $this->_logChange('shippingDate');\n }\n\n $this->_shippingDate = $data;\n return $this;\n }", "public function setOrderDate($date)\n {\n $this->order_date = $date;\n }", "function setDateRated($dateRated) {\n\t\t$this->setData('dateRated', $dateRated);\n\t}", "public function _getShipmentDate() {\n\t\treturn $this->_shipmentDate;\n\t}", "public function setTxnDate($date)\n\t{\n\t\treturn $this->setDateType('TxnDate', $date);\n\t}", "public function setDate($date){\r\n\t\t$this->wishDate = $date;\r\n\t}", "public function setPaymentDate($payment_date);", "public function setToDate($toDate)\n {\n // $this->toDate = $newDate->format('c');\n $this->toDate = $toDate;\n }", "public function setInvoiceDate($val)\n {\n $this->_propDict[\"invoiceDate\"] = $val;\n return $this;\n }", "public function setContactDate($date) {\n $this->date = $date;\n }", "public function setPaymentDate(RDate $paymentDate): void\n {\n $this->paymentDate = $paymentDate;\n \\Logger::getLogger(\\get_class($this))\n ->debug(\n \\sprintf(\n __METHOD__.\" set to '%s'\",\n $this->paymentDate->format(RDate::SQL_DATE)\n )\n );\n }", "function setDateNotified($dateNotified) {\n\t\t$this->setData('dateNotified', $dateNotified);\n\t}", "public function setTransactionDate($value) \n {\n $this->_fields['TransactionDate']['FieldValue'] = $value;\n return $this;\n }", "public function setDueDateAttribute($value)\n {\n $this->attributes['due_date'] = $value;\n }", "public function setFilingDate($value) {\n\t\t$value = date('d-M-Y', strtotime($value));\n\t\tself::$_filingDate = $value;\n\t}", "public function setPurchaseDateAttribute($input)\n {\n if ($input != null && $input != '') {\n $this->attributes['purchase_date'] = Carbon::createFromFormat(config('app.date_format'), $input)->format('Y-m-d');\n } else {\n $this->attributes['purchase_date'] = null;\n }\n }", "public function setRdate($rdate) {\n $this->rdate = $rdate;\n }", "public function setDate($date)\n {\n $this->date = $date;\n \n return $this;\n }", "public function setDate()\n\t{\n\t\tif ($this->getIsNewRecord())\n\t\t\t$this->create_time = time();\n\t}", "public function setExpiryDate($date)\n {\n $this->expiryDate = $date;\n }", "public function setRestoreDate($restoreDate = null)\n {\n if (null === $restoreDate) {\n $this->restoreDate = null;\n return $this;\n }\n if ($restoreDate instanceof FHIRDateTime) {\n $this->restoreDate = $restoreDate;\n return $this;\n }\n $this->restoreDate = new FHIRDateTime($restoreDate);\n return $this;\n }", "public function setDate($date)\n {\n $this->values['Date'] = $date;\n return $this;\n }", "public function setExpirationDate(?Date $value): void {\n $this->getBackingStore()->set('expirationDate', $value);\n }", "public function setDate($date_string = null)\n {\n\n if ($this->is_date() == 1) {\n $this->now = getdate(strtotime($date_string));\n } else {\n $this->now = getdate();\n }\n }", "public function setdueDateAttribute($value)\n {\n\n $this->attributes['due_date'] = UserHelper::parseDateFromString($value);\n }", "public function setEntryDate($entry_date)\n {\n $this->entry_date = $entry_date;\n }", "public function setStartDate(?Date $value): void {\n $this->getBackingStore()->set('startDate', $value);\n }", "function setDueDate( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->DueDate = $value;\n }", "public function set_approved_date( $date ) {\n\t\t$this->set_prop( 'approved_date', $date ) ;\n\t}", "public function setRelease_date($release_date)\n {\n $release_date = (int) $release_date;\n if (is_int($release_date)) {\n $this->release_date = $release_date;\n }\n \n }", "public function setDateShippedAttribute($input)\n {\n if ($input != null && $input != '') {\n $this->attributes['date_shipped'] = Carbon::createFromFormat(config('app.date_format'), $input)->format('Y-m-d');\n } else {\n $this->attributes['date_shipped'] = null;\n }\n }", "public function setRecDate($rec_date)\n {\n $this->rec_date = $rec_date;\n\n return $this;\n }", "public function setDate( $date ) {\n\t\tif ( !preg_match( self::DATERE, $date ) ) {\n\t\t\tthrow new InvalidArgumentException( \"Not a valid date: \".$date );\n\t\t}\n\t\t$this->setParameter( \"dtreviewed\", $date );\n\t}", "function setDateCompleted($dateCompleted) {\n\t\t$this->setData('dateCompleted', $dateCompleted);\n\t}", "function setDateConfirmed($dateConfirmed) {\n\t\t$this->setData('dateConfirmed', $dateConfirmed);\n\t}", "public function setDate($date) {\n $this->date = $date;\n $this->updateData();\n return $this;\n }", "public function updateDate( Inx_Api_Recipient_Attribute $attr, $sValue );", "public function setRequesteDateAttribute($date)\n {\n $this->attributes['request_date'] = Carbon::parse($date);\n }", "public function setOrderDateAttribute($orderDate) {\n $this->attributes['order_date'] = Carbon::parse($orderDate)->toDateString(); //'toDateTimeString(); use to dd:mm:yyyy:hh:mm:ss\n }", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}", "public function setShipdate($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->shipdate !== $v) {\n $this->shipdate = $v;\n $this->modifiedColumns[OrdrhedTableMap::COL_SHIPDATE] = true;\n }\n\n return $this;\n }", "public function getDeliveryDate() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->deliveryDate;\r\n\t}", "public function setRequesProcessedDate($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->reques_processed_date !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->reques_processed_date !== null && $tmpDt = new DateTime($this->reques_processed_date)) ? $tmpDt->format('Y-m-d') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->reques_processed_date = ($dt ? $dt->format('Y-m-d') : null);\n\t\t\t\t$this->modifiedColumns[] = VpoRequestPeer::REQUES_PROCESSED_DATE;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setRecorddate($v)\n\t{\n\n\t\tif ($v !== null && !is_int($v)) {\n\t\t\t$ts = strtotime($v);\n\t\t\tif ($ts === -1 || $ts === false) { // in PHP 5.1 return value changes to FALSE\n\t\t\t\tthrow new PropelException(\"Unable to parse date/time value for [recorddate] from input: \" . var_export($v, true));\n\t\t\t}\n\t\t} else {\n\t\t\t$ts = $v;\n\t\t}\n\t\tif ($this->recorddate !== $ts) {\n\t\t\t$this->recorddate = $ts;\n\t\t\t$this->modifiedColumns[] = MmPeer::RECORDDATE;\n\t\t}\n\n\t}", "public function set_last_billed_due_date( $value ) {\n\t\t$this->set_prop( 'last_billed_due_date', $value ) ;\n\t}", "function setDateResponseDue($dateResponseDue) {\n\t\t$this->setData('dateResponseDue', $dateResponseDue);\n\t}", "public function setTransactionPostedDate($value)\n {\n $this->_fields['TransactionPostedDate']['FieldValue'] = $value;\n return $this;\n }", "public function set_last_billed_date( $value ) {\n\t\t$this->set_prop( 'last_billed_date', $value ) ;\n\t}", "public function setReleaseDate($releaseDate) {\r\n $this->_data['ReleaseDate'] = $releaseDate;\r\n return $this;\r\n }", "public function setDate($date)\n {\n $this->date = $date;\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n return $this;\n }", "public function setStatusDate($statusDate = null)\n {\n if (null === $statusDate) {\n $this->statusDate = null;\n return $this;\n }\n if ($statusDate instanceof FHIRDateTime) {\n $this->statusDate = $statusDate;\n return $this;\n }\n $this->statusDate = new FHIRDateTime($statusDate);\n return $this;\n }", "protected function setDateProperty($property, $typoscript, $submittedValues) {\n\n\t\tif (!isset($submittedValues[$typoscript['field']])) {\n\t\t\treturn;\n\t\t}\n\n\t\t$value = $submittedValues[$typoscript['field']];\n\t\t$outputFormat;\n\n\t\tif ($property == 'Birthday') {\n\t\t\t$outputFormat = self::BDAY_FORMAT;\n\t\t} else {\n\t\t\t$outputFormat = self::REV_FORMAT;\n\t\t}\n\n\t\t$format = $typoscript['format'];\n\t\tif ($format !== NULL) {\n\t\t\tif ($property == 'Birthday') {\n\t\t\t\t$format = self::DEFAULT_BDAY_INPUT_FORMAT;\n\t\t\t} else {\n\t\t\t\t$format = self::DEFAULT_REV_INPUT_FORMAT;\n\t\t\t}\n\t\t}\n\n\t\t$date = DateTime::createFromFormat($format, $value);\n\n\t\t$this->vcard->{'set' . $property}($date->format($outputFormat));\n\t}", "public function setInvoiceDateAttribute($input)\n {\n if ($input != null && $input != '') {\n $this->attributes['invoice_date'] = Carbon::createFromFormat(config('app.date_format'), $input)->format('Y-m-d');\n } else {\n $this->attributes['invoice_date'] = null;\n }\n }", "function addToRebillDate($isFirst, $date=null)\n {\n // If we are done with rebills just set date to null;\n if ($this->getPaymentsCount() >= $this->getExpectedPaymentsCount()) {\n $this->updateQuick('rebill_date', null);\n $this->rebill_date = null;\n return;\n }\n\n $today = $this->getDi()->dateTime->format('Y-m-d');\n\n // Handle situation when customer try to rebill outdated payments;\n // In this situation rebill_date should be set to today.\n\n if (is_null($this->rebill_date) || ($this->rebill_date < $today))\n $this->rebill_date = $today;\n\n if (!is_null($date))\n $this->rebill_date = $date;\n\n $period = new Am_Period($isFirst ? $this->first_period : $this->second_period);\n $this->rebill_date = $period->addTo($this->rebill_date);\n $this->updateSelectedFields('rebill_date');\n }", "public function setUpdateViewDate($value)\n {\n return $this->set('UpdateViewDate', $value);\n }", "public function setPropertyDate($date=true)\n {\n if($date === false)\n {\n $this->date =false;\n }\n elseif($date !== true)\n {\n $this->date =$date;\n }\n }", "public function setDate(Carbon $date) {\n\t\t$this->setDateRange($date, $to);\n\t}", "public function setDueDate($val)\n {\n $this->_propDict[\"dueDate\"] = $val;\n return $this;\n }", "public function setDate($date = null): object\n {\n if (null !== $date && !($date instanceof FHIRDate)) {\n $date = new FHIRDate($date);\n }\n $this->_trackValueSet($this->date, $date);\n $this->date = $date;\n return $this;\n }", "function lb_subscription_set_renewal_date($account, $subscription, $renewal_date) {\n // The $account that rules passes contains the original information, which may have\n // changed as a result of an action that has run.\n $entity = entity_load_single('user', $account->uid);\n $account_subscription_data = lb_subscription_retrieve_account_subscription_data($entity, $subscription);\n if ($account_subscription_data['delta'] === NULL) {\n lb_subscription_set_subscription($account, $subscription);\n $entity = entity_load_single('user', $account->uid);\n $account_subscription_data = lb_subscription_retrieve_account_subscription_data($entity, $subscription);\n }\n if ($account_subscription_data['delta'] !== NULL) {\n $entity->field_subscription[LANGUAGE_NONE][$account_subscription_data['delta']]['field_renewal_date'] = array(\n LANGUAGE_NONE => array(\n 0 => array(\n 'value' => $renewal_date,\n 'format' => NULL,\n 'safe_value' => $renewal_date,\n ),\n ),\n );\n entity_save('user', $entity);\n }\n}", "public function setActualDeliveryDate($actualDeliveryDate): Delivery\n {\n $this->actualDeliveryDate = $actualDeliveryDate;\n return $this;\n }", "public function setDepositDueDate($depositDueDate)\n {\n if (stristr($depositDueDate, \"-\")) {\n $depositDueDate = strtotime($depositDueDate);\n }\n $this->depositDueDate = $depositDueDate;\n }", "public function setPurchaseRequestRequiredDate($purchaseRequestRequiredDate)\n\t{\n $this->purchaseRequestRequiredDate = $purchaseRequestRequiredDate;\n return $this;\n\t}", "public function setShipmentDateTimeAttribute($value): self\n {\n if (!$value instanceof \\DateTime) {\n $value = new \\DateTime($value);\n }\n\n $this->shipmentDateTime = $value;\n\n return $this;\n }", "public function setLastPaymentReceivedDate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->last_payment_received_date !== null || $dt !== null) {\n if ($this->last_payment_received_date === null || $dt === null || $dt->format(\"Y-m-d H:i:s.u\") !== $this->last_payment_received_date->format(\"Y-m-d H:i:s.u\")) {\n $this->last_payment_received_date = $dt === null ? null : clone $dt;\n $this->modifiedColumns[KluBillTableMap::COL_LAST_PAYMENT_RECEIVED_DATE] = true;\n }\n } // if either are not null\n\n return $this;\n }", "public function setReviewDateTime($newReviewDateTime = null) : void {\n\t\t// base case: if the date is null use the current date and time\n\t\tif($newReviewDateTime === null) {\n\t\t\t$this->ReviewDateTime = new \\DateTime();\n\t\t\treturn;\n\t\t}\n\t\t// store the review date using the ValidateDate trait\n\t\ttry {\n\t\t\t$newReviewDateTime = self::validateDateTime($newReviewDateTime);\n\t\t} catch(\\InvalidArgumentException | \\RangeException $exception) {\n\t\t\t$exceptionType = get_class($exception);\n\t\t\tthrow(new $exceptionType($exception->getMessage(), 0, $exception));\n\t\t}\n\n\t\t$this->reviewDateTime = $newReviewDateTime;\n\t}", "public function set_next_bill_date( $value ) {\n\t\t$this->set_prop( 'next_bill_date', $value ) ;\n\t}", "public function setDueDate(\\DateTime $value)\n {\n $this->setItemValue('due_date', (string)$value->getTimestamp());\n }", "public function setWithDateLine( $var )\n {\n $this->_withDateLine = $var;\n }", "public function setUpdatedDate($updatedDate) {\n\t\t$this->updatedDate = $updatedDate;\n\t}", "public function setUpdatedDate($updatedDate) {\n\t\t$this->updatedDate = $updatedDate;\n\t}", "public function set_last_payment_date( $value ) {\n\t\t$this->set_prop( 'last_payment_date', $value ) ;\n\t}", "public function setDate(string $date)\r\n {\r\n $this->date = $date;\r\n\r\n return $this;\r\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }", "public function setDate($date)\n {\n $this->date = $date;\n\n return $this;\n }" ]
[ "0.74200964", "0.6654912", "0.6488629", "0.6466877", "0.6368711", "0.6300263", "0.6219233", "0.6219233", "0.621476", "0.6195307", "0.61938936", "0.61670035", "0.6157223", "0.61491805", "0.6140335", "0.61354905", "0.6111516", "0.6048797", "0.6037445", "0.601876", "0.60152745", "0.59766024", "0.5918102", "0.59061605", "0.5890958", "0.5881207", "0.5863477", "0.58604306", "0.5853697", "0.57723105", "0.5761951", "0.57539815", "0.5718821", "0.56768817", "0.5665885", "0.5656743", "0.5655745", "0.564107", "0.5637696", "0.5622072", "0.56204677", "0.5612164", "0.5588201", "0.5582494", "0.55702996", "0.55662185", "0.5565087", "0.5543939", "0.5539916", "0.55299395", "0.5527872", "0.5526519", "0.5512624", "0.551208", "0.5496394", "0.5496193", "0.54955125", "0.54955125", "0.5484024", "0.5478343", "0.54782593", "0.5473863", "0.54704314", "0.5464392", "0.5458733", "0.5453474", "0.5453432", "0.54494834", "0.54476935", "0.54476935", "0.542412", "0.54208195", "0.54190004", "0.5417808", "0.5388303", "0.5385068", "0.53828883", "0.537686", "0.5366168", "0.53654987", "0.5358814", "0.53542954", "0.53520185", "0.5351641", "0.535156", "0.5347449", "0.53446645", "0.5335294", "0.53308237", "0.5329813", "0.5329813", "0.53270775", "0.5326409", "0.5325948", "0.5325948", "0.5325948", "0.5325948", "0.5325948", "0.5325948", "0.5325948" ]
0.8229721
0
Returns value of 'ShipmentReceiptDate' property
public function getShipmentReceiptDate() { $value = $this->get(self::SHIPMENTRECEIPTDATE); return $value === null ? (string)$value : $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _getShipmentDate() {\n\t\treturn $this->_shipmentDate;\n\t}", "public function getDeliveryDate() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->deliveryDate;\r\n\t}", "public function setShipmentReceiptDate($value)\n {\n return $this->set(self::SHIPMENTRECEIPTDATE, $value);\n }", "public function getRecDate()\n {\n return $this->rec_date;\n }", "public function getShippingDate()\n {\n return $this->shippingDate;\n }", "public function getShipdate()\n {\n return $this->shipdate;\n }", "public function getActualDeliveryDate()\n {\n return $this->actualDeliveryDate;\n }", "public function getActualDeliveryDate()\n {\n return $this->actualDeliveryDate;\n }", "public function getTransactionDate() \n {\n return $this->_fields['TransactionDate']['FieldValue'];\n }", "public function getInvoiceDate() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->invoiceDate;\r\n\t}", "function getDateReminded() {\n\t\treturn $this->getData('dateReminded');\n\t}", "public function getReceiveDate()\n {\n return $this->receiveDate;\n }", "public function getDate() {\n return @$this->attributes['date'];\n }", "public function getReviewDate() {\n\t\t\t\treturn ($this->reviewDate);\n\t\t\t}", "public function getPurchaseDateModified() {\n return $this->PurchaseDateModified;\n }", "public function getPurchaseDateCreated() {\n return $this->purchaseDateCreatedDate;\n }", "public function getOrderdate()\n {\n return $this->orderdate;\n }", "public function getSaleDate()\n {\n if (!$this->sale_date) return null;\n return Formatter::date($this->sale_date);\n }", "public function getTransactionPostedDate()\n {\n return $this->_fields['TransactionPostedDate']['FieldValue'];\n }", "function getDateNotified() {\n\t\treturn $this->getData('dateNotified');\n\t}", "public function getDate()\n {\n return $this->_date;\n }", "public function getDate() {\n\t\treturn $this->_date;\n\t}", "public function getDate()\r\n {\r\n return $this->date;\r\n }", "public function getPaymentDate();", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate() {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n\t{\n\t\treturn $this->date;\n\t}", "public function getDate()\n\t{\n\t\treturn $this->date;\n\t}", "public function getDate()\n\t{\n\t\treturn $this->date;\n\t}", "public function getDate() { return $this->date; }", "public function getDate(){\n\t\treturn $this->_date;\n\t}", "public function getOrderDate()\n {\n return $this->order_date;\n }", "public function getRestoreDate()\n {\n return $this->restoreDate;\n }", "public function getDate()\n {\n return $this->date;\n }", "public function getDate()\n {\n return $this->date;\n }", "function getDate() {\n return $this->date;\n }", "function getDateRated() {\n\t\treturn $this->getData('dateRated');\n\t}", "function getDate( )\r\n\t{\r\n\t\treturn $this->date;\r\n\t}", "public function get()\n {\n return $this->date;\n }", "public function getRecordDate()\n {\n return $this->record_date;\n }", "public function getEventDate() \n {\n return $this->_fields['EventDate']['FieldValue'];\n }", "public function getStatusDate()\n {\n return $this->statusDate;\n }", "public function getReturnDate() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->returnDate;\r\n\t}", "public function getInvdate()\n {\n return $this->invdate;\n }", "public function getVerifiedDate()\n {\n return $this->getProperty()->verifiedDate;\n }", "public function getLatestDeliveryDate()\n {\n return $this->latestDeliveryDate;\n }", "public function getTransferDate()\n {\n $value = $this->get(self::TRANSFERDATE);\n return $value === null ? (string)$value : $value;\n }", "public function getPayDate() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->payDate;\r\n\t}", "public function getShipmentDate($shipment_id) {\n\t\t$columns = array ('shipment_id');\n\t\t$records = array ($shipment_id);\n\t\t$shipment_date_ = $this->query_from_shipment ( $columns, $records );\n\t\treturn sizeof($shipment_date_)>0 ? $shipment_date_ [0] ['shipment_date'] : null;\n\t}", "public function getIssueDate()\n {\n return $this->issueDate;\n }", "public function getMessageDate()\n {\n return $this->messageDate;\n }", "private function date()\n {\n $pubDate = $this->article->Journal->JournalIssue->PubDate;\n \n if (isset($pubDate->MedlineDate)) {\n $date = (string)$pubDate->MedlineDate;\n } else {\n $date = implode(' ', (array)$pubDate);\n }\n \n return $date;\n }", "public function getReceptionDate();", "public function getReceiptNo()\n {\n return $this->receipt_no;\n }", "public function getContactDate() {\n return $this->date;\n }", "public function getTransactionDate() {\n\t\treturn self::$_transactionDate;\n\t}", "public function getRgstDate()\n {\n return $this->rgst_date;\n }", "public function getDueDate()\n {\n if (array_key_exists(\"dueDate\", $this->_propDict)) {\n return $this->_propDict[\"dueDate\"];\n } else {\n return null;\n }\n }", "function get_date() {\n\t\treturn $this->get_data( 'comment_date' );\n\t}", "public function getBillDate()\n {\n return isset($this->billDate) ? $this->billDate : new DateTime;\n }", "public function getPaymentDate(): RDate\n {\n \\Logger::getLogger(\\get_class($this))\n ->info(\n \\sprintf(\n __METHOD__.\" get '%s'\",\n $this->paymentDate->format(RDate::SQL_DATE)\n )\n );\n return $this->paymentDate;\n }", "public function getFormattedPaymentDate(): string;", "public function getDateRetourReel()\n {\n return $this->dateRetourReel;\n }", "public function getReceipt()\n {\n return $this->receipt;\n }", "public function getReleaseDate()\n {\n return $this->releaseDate;\n }", "public function getRelease_date()\n {\n return $this->release_date;\n }", "public function getRelease_date()\n {\n return $this->release_date;\n }", "public function getStrDate()\n {\n return $this->getCurrentTranslation()->getStrDate();\n }", "public function getDateTransaction()\n {\n return $this->dateTransaction;\n }", "public function getRevdate()\n {\n return $this->revdate;\n }", "public function getPurchaseRequestRequiredDate()\n\t{\n\t return $this->purchaseRequestRequiredDate;\n\t}" ]
[ "0.7874261", "0.70397305", "0.6937055", "0.68867874", "0.6860003", "0.6753007", "0.6721134", "0.6721134", "0.67160636", "0.6584148", "0.6581428", "0.65775764", "0.65691787", "0.65584755", "0.65058297", "0.6505754", "0.64890975", "0.64764315", "0.6447651", "0.6447634", "0.6440197", "0.6430592", "0.6424237", "0.64184093", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64145356", "0.64127237", "0.6392035", "0.6388353", "0.6388353", "0.6388353", "0.63780504", "0.63690984", "0.6360681", "0.63606465", "0.6346899", "0.6346899", "0.6323771", "0.62968457", "0.6294024", "0.6281497", "0.6260698", "0.62372476", "0.6229469", "0.62270194", "0.6223343", "0.6222558", "0.6220575", "0.6218376", "0.62157494", "0.62123334", "0.6206216", "0.61877865", "0.61781824", "0.61778384", "0.6177131", "0.6164418", "0.61607766", "0.6160433", "0.61571133", "0.6132486", "0.612988", "0.6108349", "0.61043406", "0.60995936", "0.609672", "0.6088494", "0.608574", "0.608574", "0.6084355", "0.6082288", "0.60779023", "0.6070963" ]
0.8686044
0
Sets value of 'Attorney' property
public function setAttorney(\Diadoc\Api\Proto\Invoicing\Attorney $value=null) { return $this->set(self::ATTORNEY, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAttorney()\n {\n return $this->get(self::ATTORNEY);\n }", "public function attorney()\n {\n if ( ! $this->bean->fetchAs('user')->attorney) $this->bean->attorney = R::dispense('user');\n return $this->bean->attorney;\n }", "public function setReplacementAttorney(Lpa $lpa, AbstractAttorney $replacementAttorney, $replacementAttorneyId)\n {\n $result = $this->executePut(sprintf('/v2/user/%s/applications/%s/replacement-attorneys/%s', $this->getUserId(), $lpa->id, $replacementAttorneyId), $replacementAttorney->toArray());\n\n if (is_array($result)) {\n // Marshall the data into the required data object and set it in the LPA\n\n // Insert the updated attorney at the correct ID\n foreach ($lpa->document->replacementAttorneys as $idx => $replacementAttorney) {\n if ($replacementAttorney->id == $replacementAttorneyId) {\n if ($replacementAttorney instanceof Human) {\n $lpa->document->replacementAttorneys[$idx] = new Human($result);\n } else {\n $lpa->document->replacementAttorneys[$idx] = new TrustCorporation($result);\n }\n\n break;\n }\n }\n\n return true;\n }\n\n return false;\n }", "public function setPrimaryAttorney(Lpa $lpa, AbstractAttorney $primaryAttorney, $primaryAttorneyId)\n {\n $result = $this->executePut(sprintf('/v2/user/%s/applications/%s/primary-attorneys/%s', $this->getUserId(), $lpa->id, $primaryAttorneyId), $primaryAttorney->toArray());\n\n if (is_array($result)) {\n // Marshall the data into the required data object and set it in the LPA\n\n // Insert the updated attorney at the correct ID\n foreach ($lpa->document->primaryAttorneys as $idx => $primaryAttorney) {\n if ($primaryAttorney->id == $primaryAttorneyId) {\n if ($primaryAttorney instanceof Human) {\n $lpa->document->primaryAttorneys[$idx] = new Human($result);\n } else {\n $lpa->document->primaryAttorneys[$idx] = new TrustCorporation($result);\n }\n\n break;\n }\n }\n\n return true;\n }\n\n return false;\n }", "public function attorney(){\r\n if($this->attorney_id >0)\r\n return Consultant::find($this->attorney_id);\r\n else\r\n return -1;\r\n }", "function set_attr($attr=array()) {\n $this->other_attr = $attr;\n }", "public function attorneyName()\n {\n return $this->bean->attorney()->name;\n }", "public function __set($atrib, $value){\n\t\t$this->$atrib = $value;\n\t}", "public function setIdentifyingAttribute($string);", "public function addReplacementAttorney(Lpa $lpa, AbstractAttorney $replacementAttorney)\n {\n $target = sprintf('/v2/user/%s/applications/%s/replacement-attorneys', $this->getUserId(), $lpa->id);\n\n try {\n $result = $this->apiClient->httpPost($target, $replacementAttorney->toArray());\n\n if (is_array($result)) {\n // Marshall the data into the required data object and set it in the LPA\n if ($replacementAttorney instanceof Human) {\n $lpa->document->replacementAttorneys[] = new Human($result);\n } else {\n $lpa->document->replacementAttorneys[] = new TrustCorporation($result);\n }\n\n return true;\n }\n } catch (ApiException $ex) {}\n\n return false;\n }", "public function setAttributes();", "public function setResistanceAttribute($value)\n {\n $this->attributes['resistance'] = $this->makeCollection($value);\n }", "public function setIneffectiveAttribute($value)\n {\n $this->attributes['ineffective'] = $this->makeCollection($value);\n }", "public function set_attribute($name, $value)\n {\n }", "public function __set($attribute, $value){\n\t\t$this->$attribute = $value;\n\t}", "function set($attr, $value)\r\n\t{\r\n\t\t$this->$attr = $value;\r\n\t}", "public function setSpecialty($value)\n {\n $this->specialty = $value;\n }", "public function __SET($att, $valor){\r\n $this->$att = $valor;\r\n}", "function setBio($newBio){\n $this->bio = $newBio;\n }", "public function __set($name, $value)\n { \n //set the attribute with the value\n $this->$name = $value;\n }", "function __set($attributeToChange, $newValueToAssign) {\n //check that name is valid class attribute\n switch($attributeToChange) {\n case \"name\":\n $this->name = $newValueToAssign;\n break;\n case \"favoriteFood\":\n $this->favoriteFood = $newValueToAssign;\n break;\n case \"sound\":\n $this->sound = $newValueToAssign;\n break;\n default:\n echo $attributeToChange . \" was not found <br>\";\n }\n echo \"Set \" . $attributeToChange . \" to \" . $newValueToAssign . \"<br>\";\n }", "public function __set($attribute, $param) {\n $this->$attribute = $param;\n }", "public function __SET($attr, $value){ //Establece valor y atributo\n\n\t\t\t$this->$attr=$value;\n\t\t}", "public function addPrimaryAttorney(Lpa $lpa, AbstractAttorney $primaryAttorney)\n {\n $target = sprintf('/v2/user/%s/applications/%s/primary-attorneys', $this->getUserId(), $lpa->id);\n\n try {\n $result = $this->apiClient->httpPost($target, $primaryAttorney->toArray());\n\n if (is_array($result)) {\n // Marshall the data into the required data object and set it in the LPA\n if ($primaryAttorney instanceof Human) {\n $lpa->document->primaryAttorneys[] = new Human($result);\n } else {\n $lpa->document->primaryAttorneys[] = new TrustCorporation($result);\n }\n\n return true;\n }\n } catch (ApiException $ex) {}\n\n return false;\n }", "public function __set($name, $value)\n\t{\n\t\tswitch($name) {\n\t\t\tcase 'APPLICANTS_FAMILY_DATA_SIBLINGS_ID':\n\t\t\t\t//if the id isn't null, you shouldn't update it!\n\t\t\t\tif( !is_null($this->APPLICANTS_FAMILY_DATA_SIBLINGS_ID) ) {\n\t\t\t\t\tthrow new Exception('Cannot update APPLICANTS_FAMILY_DATA_SIBLINGS_ID!');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t//set the attribute with the value\n\t\t$this->$name = $value;\n\t}", "public function setDataAttribute($attName, $attValue)\n {\n \t$this->data[$attName] = $attValue;\n }", "public function __set($attr, $value)\n\t{\n\t\t$this->$attr = $value;\n\t}", "public function setAttribute($attribute, $value)\n {\n }", "public function setAttributes($item,$attributes) {\n\t\t$this->_properties[$item]['Attributes'] = ' '.$attributes;\n\t}", "public function setAttribute($attribute, $value)\r\n\t{\r\n\t\t\r\n\t}", "public function setAttr($attribute, $value) {\n $this->attributes[$attribute] = $value;\n }", "public function setAttendee($value)\n {\n $this->attendee = $value;\n }", "public function setreviewedAttribute()\n {\n $attribute_name = \"reviewed\";\n\n $this->attributes[$attribute_name] = 1;\n }", "public function setInspector($inspector) {\n $this->_inspector = $inspector;\n }", "public function setMarkIdentification($value) {\n\t\tself::$_markIdentification = $value;\n\t}", "public function setAttribute($key, $value): void\n {\n if ($attachment = $this->getAttachment($key)) {\n $attachment->attach($value);\n }\n else {\n parent::setAttribute($key, $value);\n }\n }", "public function __set($name, $value)\n\t{\n\t\t$this->attributes[$name] = $value;\n\t\t\n\t}", "public function __set($name,$value)\n\t{\n\t\tif(in_array($name,$this->config_other_attributes))\n\t\t\t$this->list_other_attributes[$name]=$value;\n\t\telse \n\t\t\tparent::__set($name,$value);\n\t}", "public function setEnemyArmy($value)\n {\n return $this->set(self::ENEMY_ARMY, $value);\n }", "function setTieColor($tiecolor) {\n $this->tiecolor = $tiecolor;\n }", "public function __set( $name, $value )\n\t{\n\t\t$this->attributes[$name] = $value;\n\t}", "public function attribution($value) {\n return $this->setProperty('attribution', $value);\n }", "public function attribution($value) {\n return $this->setProperty('attribution', $value);\n }", "public function setVoiture($voiture){\n $this->$voiture = $voiture;\n }", "#[\\ReturnTypeWillChange]\n public function offsetSet($offset, $value)\n {\n $this->attributes[$offset] = $value;\n }", "public function onUnsafeAttribute($name, $value)\n {\n $this->$name = $value;\n }", "public function __set($name, $value)\n {\n $this->attributes[$name] = $value;\n }", "public function __set($attribute, $value) {\n $this->setAttribute($attribute, $value);\n }", "public function __set($attribute, $value)\n {\n array_set($this->attributes, $attribute, $value);\n }", "public function setAttributeByRef ($name, &$value)\n {\n\n $this->attributes[$name] =& $value;\n\n }", "public function __set($key, $value)\n \t{\n \t\t// If the key is a relationship, add it to the ignored attributes.\n \t\t// Ignored attributes are not stored in the database.\n \t\tif (method_exists($this, $key)) {\n \t\t\t$this->ignore[$key] = $value;\n \t\t} else {\n \t\t\t$this->attributes[$key] = $value;\n \t\t\t$this->dirty[$key] = $value;\n \t\t}\n \t}", "public function setAgamaAttribute($agama)\n {\n $this->attributes['agama'] = trim(strtolower($agama));\n }", "public function setAttribute($key, $value);", "public function setAttribute($key, $value);", "public function setAttrs($attrs);", "public function setAssistArmy($value)\n {\n return $this->set(self::ASSIST_ARMY, $value);\n }", "public function setTrasient($attribute){\n\t\tEntityManager::addTrasientAttribute(get_class($this), $attribute);\n\t}", "public function setAttribute($name, $value);", "public function asAttention()\n\t{\n\t\t$this->severity = 'attention';\n\t\t$this->cannotClose();\n\t\treturn $this;\n\t}", "public function _setAvatar($Avatar)\n {\n $this->Avatar = $Avatar;\n\n }", "public function edit(Attendence $attendence)\n {\n //\n }", "public function __set($name, $value)\n {\n $this->_attributes[$name] = $value;\n }", "public function setArtist($artist) {\r\n $this->_artist = $artist;\r\n }", "public function audience()\n {\n return $this->belongsTo('App\\Attendance', 'teacher_id', 'teacher_id');\n }", "public function set($identifier, $participation);", "public function setAntagonist($value)\n {\n $this->antagonist = $value;\n }", "public function setUsernameWarner($usernameWarner)\n\t{\n\t\t$this->username_warner = $usernameWarner;\n\t}", "public function writeAttribute($attribute, $value) {}", "public function testSetMontantAvantage() {\n\n $obj = new Employes();\n\n $obj->setMontantAvantage(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantAvantage());\n }", "public function setExtrasAttribute($value)\n {\n $value = json_decode($value);\n\n // Image\n if (isset($value->image)) {\n\n $result = $this->saveImage($this, $value->image, 'pages/', 'arraiolos', 1280, 90);\n\n $value->image = $result;\n\n unset($this->attributes['image']);\n }\n\n $this->attributes['extras'] = json_encode($value);\n }", "public function set_attribute($key, $value) {\n\t\t$this->attributes[$key] = $value;\n\t}", "public function __set($attribute, $value)\n {\n $this->set($attribute, $value);\n }", "public function edit(Attandance $attandance)\n {\n //\n }", "function setIntestat($intestat)\n {\n $this->intestat = $intestat;\n }", "private function setAvatar(Avatar $avatar) {\n $this->avatar = $avatar;\n }", "public function setIllumination($value) {\n $this->illuminate = $value;\n }", "public final function __set(string $name, $value) : void\n {\n $this->attrs[$name] = $value;\n }", "public function setAttribution($attribution)\n {\n $this->attribution = $attribution;\n }", "public function setCrit()\n {\n $this->_role->crit = 100;\n }", "public function testSetQualification() {\n\n $obj = new PointBonTrav();\n\n $obj->setQualification(\"qualification\");\n $this->assertEquals(\"qualification\", $obj->getQualification());\n }", "function set_employee($emp)\n\t\t{\n\t\t\t$this->employee = $emp;\n\t\t}", "public function setUry($ury) {}", "public function setAttribute($attribute, $value) {\n\t\tif (!$this->attributes) {\n\t\t\t$this->attributes = tx_newspaper::selectOneRow(\n\t\t\t\t\t'*', tx_newspaper::getTable($this), $this->condition\n\t\t\t);\n\t\t}\n\t\t\n\t\t$this->attributes[$attribute] = $value;\n\t}", "public function testSetAnnulationAffaire() {\n\n $obj = new Collaborateurs();\n\n $obj->setAnnulationAffaire(true);\n $this->assertEquals(true, $obj->getAnnulationAffaire());\n }", "public function __set($prop, $value)\n {\n $this->assignee[$prop] = $value;\n }", "public function __set($attrib, $value) {\r\n if (in_array($attrib, $this->commonAttribs)) {\r\n $this->$attrib = $value;\r\n }\r\n }", "public function __set($attrib, $value) {\r\n if (in_array($attrib, $this->commonAttribs)) {\r\n $this->$attrib = $value;\r\n }\r\n }", "public function setAttributes($attributes){ }", "public function set()\n {\n $args = func_get_args();\n\n if ( count($args) == 2 )\n {\n $this->attributes[$args[0]] = $args[1];\n }\n elseif ( count($args) == 1 && is_array($args[0]) ) \n {\n $this->attributes = ( array_merge($this->attributes, $args[0]) );\n }\n\n return $this;\n }", "function setAttribution($text)\n {\n if (strlen($text) > 256) {\n throw new InvalidArgumentException(\"Input must be 256 characters or less\n in length!\");\n }\n $this->_attribution = $text;\n }", "public function __set($attri, $value) {\n if (in_array($attri, self::DYN_ATTRIBUTES)) {\n $this->{$attri} = $value;\n }\n }", "public function set($attribute, $value)\n {\n $this->attributes[$attribute] = $value;\n }", "public function testSetNumeroAttestation() {\n\n $obj = new AttestationCacm();\n\n $obj->setNumeroAttestation(\"numeroAttestation\");\n $this->assertEquals(\"numeroAttestation\", $obj->getNumeroAttestation());\n }", "function insert_attr($key, $value) {\n $this->other_attr[$key] = $value;\n }", "public function setAssistanceType($value)\n {\n return $this->set('AssistanceType', $value);\n }", "function set_attrs($attrs)\n {\n foreach($attrs as $key => $value) {\n if ($key == \"meta_name\") { continue; }\n if ($key == \"vocab\") { continue; }\n if ($key == \"text\") { continue; }\n if ($key == \"lang\") { continue; }\n $this->attrs[$key] = $value; \n }\n }", "public function __set($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "public function setWeaknessAttribute($value)\n {\n $this->attributes['weakness'] = $this->makeCollection($value);\n }", "public function __set($name, $value) {\n\t\t$this->setAttribute($name, $value);\n\t}", "public function testSetNiveauQualif() {\n\n $obj = new AttestationCacm();\n\n $obj->setNiveauQualif(\"niveauQualif\");\n $this->assertEquals(\"niveauQualif\", $obj->getNiveauQualif());\n }" ]
[ "0.62699723", "0.5717297", "0.56175715", "0.55537426", "0.54743093", "0.5403522", "0.53441757", "0.53389025", "0.532787", "0.52432436", "0.5170021", "0.5082601", "0.50810486", "0.50624394", "0.50622815", "0.49975216", "0.49863943", "0.49848792", "0.49135265", "0.48861223", "0.48847866", "0.4882168", "0.4877397", "0.48739418", "0.48721054", "0.48681164", "0.48593113", "0.48519918", "0.48510247", "0.48474106", "0.48164034", "0.48145786", "0.47991142", "0.47940692", "0.4787641", "0.47814485", "0.47755483", "0.47725007", "0.47598818", "0.4751573", "0.4749201", "0.47482225", "0.47482225", "0.47435242", "0.47302705", "0.47235245", "0.47198674", "0.47177893", "0.4709444", "0.4699097", "0.46950603", "0.46869513", "0.4680356", "0.4680356", "0.46653852", "0.46613315", "0.46551996", "0.46531048", "0.46492493", "0.46483198", "0.4646496", "0.46322477", "0.463023", "0.46276492", "0.46190748", "0.46186668", "0.46169883", "0.46115023", "0.46086514", "0.460823", "0.4608182", "0.46057642", "0.4605539", "0.46019882", "0.45934072", "0.4586543", "0.4583664", "0.45784187", "0.4576828", "0.4571355", "0.45675898", "0.4563097", "0.45613876", "0.45584303", "0.45580932", "0.45580631", "0.45580631", "0.45558107", "0.45505518", "0.454464", "0.45426187", "0.45406473", "0.45359036", "0.45273378", "0.45272312", "0.45245007", "0.4520561", "0.45165882", "0.45117638", "0.45113045" ]
0.75896424
0
Returns value of 'Attorney' property
public function getAttorney() { return $this->get(self::ATTORNEY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function attorney()\n {\n if ( ! $this->bean->fetchAs('user')->attorney) $this->bean->attorney = R::dispense('user');\n return $this->bean->attorney;\n }", "public function attorneyName()\n {\n return $this->bean->attorney()->name;\n }", "public function attorney(){\r\n if($this->attorney_id >0)\r\n return Consultant::find($this->attorney_id);\r\n else\r\n return -1;\r\n }", "public function getAccident()\n {\n return $this->accident;\n }", "public function setAttorney(\\Diadoc\\Api\\Proto\\Invoicing\\Attorney $value=null)\n {\n return $this->set(self::ATTORNEY, $value);\n }", "public function getIdentifyingAttribute();", "public function getAttributes()\n {\n return $this->getValueJSONDecoded('nb_icontact_prospect_attributes');\n }", "public function getPropertyDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Model\\Attributes' );\n }", "public function getCustomAttributesAttribute()\n {\n return $this->custom_attributes()->get();\n }", "public function getHattricksInCareer()\n {\n return $this->getXml()->getElementsByTagName('CareerHattricks')->item(0)->nodeValue;\n }", "public function getAttr1(){\r\n\t\treturn $this->attr1;\r\n\t}", "public function getAttribute()\n {\n return $this->attribute;\n }", "public function getAttribute()\n {\n return $this->attribute;\n }", "public function getAttributesProperty()\n {\n return Attribute::whereAttributeType(Customer::class)->get();\n }", "public function getIndiceAem() {\n return $this->indiceAem;\n }", "public function getAttr(): string\r\n {\r\n return $this->attr;\r\n }", "public static function get_attribute_returns() {\n return new external_value(PARAM_RAW, 'The course element attribute value');\n }", "public function getAttribute(): string\n {\n return $this->attribute;\n }", "function getAcademy(){\r\n return $this->academy;\r\n }", "public function getSpecialty()\n {\n return $this->getXml()->getElementsByTagName('Specialty')->item(0)->nodeValue;\n }", "public function getAccessibilityAssessment()\n {\n return $this->accessibilityAssessment;\n }", "public function getSpecialty()\n {\n return $this->specialty;\n }", "public function getAttribut() : ?int\n {\n return $this->attributs;\n }", "public function getPresident()\n {\n return $this->get(self::_PRESIDENT);\n }", "public function getAttributeValue() {\n return $this->attributeValue;\n }", "public function getEyes()\n {\n return $this->eyes;\n }", "public function race_alien()\r\n{\r\n return $this->_race_alien;\r\n}", "public function getOccupation()\n {\n return $this->occupation;\n }", "protected function getSpeakerStatusAttribute()\n {\n return $this->nomination->status_label;\n }", "public function getNaissanceAnimal()\n {\n return $this->naissanceAnimal;\n }", "public function getCustomAttributes() {}", "public function getPatient()\n {\n return $this->patient;\n }", "public function getPatient()\n {\n return $this->patient;\n }", "public function getApplicantReferenceThree()\n {\n return $this->getProperty('applicant_reference_three');\n }", "public function getAttributes_discounted() {\n\t\treturn $this->attributes_discounted;\n\t}", "public function getPatient() {\n return $this->patient;\n }", "public function getOccupancy()\n {\n return $this->occupancy;\n }", "public function getPropertyRental()\n {\n return $this->propertyRental;\n }", "public function getApplicantReferenceOne()\n {\n return $this->getProperty('applicant_reference_one');\n }", "public function getBenefAssedic() {\n return $this->benefAssedic;\n }", "public function animalRegistrationNote() {\n $registration = $this->animalRegistration();\n\n if (!isset($registration)) {\n return null;\n }\n\n return $registration->breeding_limitation;\n }", "public function getMeasurementPrinciple() {\n return $this->measurementPrinciple;\n }", "public function getDairy()\n {\n return $this->dairy;\n }", "public function getValue() {\n return $this->attributes['value'];\n }", "public function getConstitution()\n {\n return $this->Constitution;\n }", "public function getAttribution()\n {\n return $this->attribution;\n }", "public function getAttr3(){\r\n\t\treturn $this->attr3;\r\n\t}", "public function getBonus()\n {\n return $this->bonus;\n }", "public function getBonus()\n {\n return $this->bonus;\n }", "public function getBonus()\n {\n return $this->bonus;\n }", "public function getAttrib() {\n return $this->attrib;\n }", "public function getAttributeName()\n {\n return 'Insight';\n }", "public function getAssociatedOn()\n {\n return $this->_fields['AssociatedOn']['FieldValue'];\n }", "public function getAnimal()\n {\n return $this->animal;\n }", "public function eyes()\n {\n return $this->people->getName().'做了一双眼睛';\n }", "public function getHealth()\t\t\t\t\t{ return (string)$this->charXMLObj->characterTab->characterBars->health->attributes()->effective; }", "public function getGuardianAttribute()\n {\n return $this->families()->where('type', 'guardian')->first();\n }", "public function getCareof()\n {\n return $this->careof;\n }", "public function getDescriptionAnimal()\n {\n return $this->descriptionAnimal;\n }", "public function getIntelligence()\n {\n return $this->Intelligence;\n }", "public function getResidence()\n {\n return $this->residence;\n }", "public function getIdentifier()\n {\n return $this->getAttribute($this->identifier);\n }", "public function getAssistArmy()\n {\n $value = $this->get(self::ASSIST_ARMY);\n return $value === null ? (integer)$value : $value;\n }", "public function taxEffect()\n {\n return TaxSetting::findOrFail($this->taxID)->effect;\n }", "public function getSpecialEquipPref()\n {\n return $this->specialEquipPref;\n }", "public function getProperty();", "public function getMontant() {\n return $this->montant;\n }", "public function getA()\n {\n return $this->A;\n }", "public function ResidenceString()\n\t{\n\t\t$res = $this->Residence();\n\t\tif (!$res)\n\t\t\treturn \"\";\n\t\telseif ($res->Custom())\n\t\t\treturn $res->Address.\" \".$res->City.\" \".$res->State;\n\t\telse\n\t\t\treturn $res->Name.\" \".$this->Apartment;\n\t}", "function __get($attributeAskedFor) {\n echo \"Asked for \" . $attributeAskedFor . \"<br>\";\n return $this->$attributeAskedFor;\n }", "public function getBonus() {\n return strval($this->bonus);\n }", "public function getApplicantReferenceTwo()\n {\n return $this->getProperty('applicant_reference_two');\n }", "public function getIdAttestation()\n {\n return $this->idAttestation;\n }", "public function getAffiliation()\n {\n return $this->affiliation;\n }", "public function getCandidat()\n {\n return $this->candidat;\n }", "public function getMontant_taxe()\n {\n return $this->montant_taxe;\n }", "public function getMontant()\n {\n return $this->montant;\n }", "public function getMontant()\n {\n return $this->montant;\n }", "public function getAppellation() :string\n {\n\n return $this->appellation;\n }", "public function getProfessionalInfo(){\r\n\t return $this->_professionalInfo;\r\n\t}", "public function getCustomAttributes(): array;", "public function getAttribute()\r\n {\r\n return $this->getElement()->getEntityAttribute();\r\n }", "public function getRating(){\n return $this->film['rating'];\n }", "public function getBonusrec()\n {\n return $this->bonusrec;\n }", "public function get_attribute($name)\n {\n }", "public function getAirItinerary()\n {\n return $this->airItinerary;\n }", "public function getIdProf()\n {\n return $this->idProf;\n }", "public function getMatricule(){\n return $this->$Matricule;\n }", "public function getHonesty()\n {\n return $this->getXml()->getElementsByTagName('Honesty')->item(0)->nodeValue;\n }", "public function audience()\n {\n return $this->belongsTo('App\\Attendance', 'teacher_id', 'teacher_id');\n }", "private function getAttribute($attribute)\n\t{\n\t\treturn isset($this->_data->{$attribute}) ? $this->_data->{$attribute} : '';\n\t}", "public function __get($attribute)\n {\n if ( isset($this->attributes[$attribute]) ) return $this->attributes[$attribute];\n }", "function get_valeur_attribut($attribut) {\r\n\r\n\t\t$sql=\"SELECT $attribut\r\n\t\t\t\t FROM les_usagers \r\n\t\t\t\t WHERE id_usager = '$this->id_usager' \";\t \t\t \r\n\r\n\t\t$result = $this->bdd->executer($sql);\r\n\r\n\t\tif ($ligne = mysql_fetch_assoc($result)) {\r\n\r\n\t\t\treturn $ligne[$attribut];\r\n\r\n\t\t}\r\n\t\telse return \"\";\r\n\t\t\t\r\n\t}", "public function __get($attribute)\n {\n return array_get($this->attributes, $attribute);\n }", "public function getMetric()\n {\n return $this->metric;\n }", "public function getMetric()\n {\n return $this->metric;\n }", "public function getAffiliation() {\n return $this->affiliation;\n }", "public function getCareer();", "public function getAnnule()\n {\n return $this->annule;\n }", "public function getTaxe_spec()\n {\n return $this->taxe_spec;\n }" ]
[ "0.7705918", "0.7640759", "0.7004984", "0.62172234", "0.6099217", "0.6075296", "0.59137", "0.5896022", "0.5885525", "0.585058", "0.5837561", "0.5730552", "0.5730552", "0.5723511", "0.5711633", "0.56643736", "0.5627584", "0.5595766", "0.5581213", "0.5572989", "0.55626506", "0.55504984", "0.5547513", "0.5538047", "0.55103326", "0.54996693", "0.5467861", "0.5465133", "0.54382926", "0.5420134", "0.54200107", "0.54183215", "0.54183215", "0.5412831", "0.5410222", "0.5402232", "0.5400261", "0.53748333", "0.53735816", "0.53710735", "0.5370823", "0.5359668", "0.53571945", "0.5355866", "0.5350838", "0.533868", "0.5335485", "0.5331067", "0.5331067", "0.5331067", "0.53297323", "0.53266585", "0.53032565", "0.5299179", "0.5291528", "0.5289375", "0.52882767", "0.52881324", "0.5284645", "0.5284638", "0.5282713", "0.5282547", "0.52766305", "0.5273039", "0.526861", "0.5255849", "0.5247018", "0.52430505", "0.5231517", "0.52300704", "0.5222921", "0.52170444", "0.52100825", "0.5208199", "0.52003515", "0.5193028", "0.5189767", "0.5189767", "0.5188531", "0.51881325", "0.5185556", "0.51803404", "0.5176617", "0.51742136", "0.5166799", "0.516659", "0.5166397", "0.5164296", "0.51577795", "0.51543236", "0.51524925", "0.51505667", "0.5150019", "0.5149875", "0.51490307", "0.51490307", "0.51469874", "0.5145713", "0.5145163", "0.5142914" ]
0.85214347
0
Sets value of 'AcceptedBy' property
public function setAcceptedBy(\Diadoc\Api\Proto\Invoicing\Official $value=null) { return $this->set(self::ACCEPTEDBY, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAcceptedBy()\n {\n return $this->get(self::ACCEPTEDBY);\n }", "public function setAccepted($accepted)\n {\n $this->accepted = (bool) $accepted;\n }", "function setAccepted( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Accepted = ( $value );\n }", "public function setAccepted(?bool $accepted): self\n {\n\n $this->accepted = $accepted;\n\n return $this;\n\n }", "public function _setCreatedBy($createdBy) {\n\t\t$this->_createdBy = $createdBy;\n\t}", "public function setRequester($user)\r\n {\r\n $this->requester = $user;\r\n }", "public function setSubmittedbyuser($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->submittedbyuser !== $v) {\n\t\t\t$this->submittedbyuser = $v;\n\t\t\t$this->modifiedColumns[] = VenuePeer::SUBMITTEDBYUSER;\n\t\t}\n\n\t\tif ($this->aUser !== null && $this->aUser->getUserid() !== $v) {\n\t\t\t$this->aUser = null;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setPaymentAccepted($value)\n {\n $this->paymentAccepted = $value;\n }", "public function getApprovedBy()\n {\n return $this->approved_by;\n }", "public function setCreatedBy($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->created_by !== $v) {\n\t\t\t$this->created_by = $v;\n\t\t\t$this->modifiedColumns[] = CampaignPeer::CREATED_BY;\n\t\t}\n\n\t\tif ($this->asfGuardUserProfile !== null && $this->asfGuardUserProfile->getId() !== $v) {\n\t\t\t$this->asfGuardUserProfile = null;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setBy($x) { $this->by = $x; }", "public function setReviewedBy($value)\n {\n $this->reviewedBy = $value;\n }", "public function setCreatedBy($createdBy);", "public function setStatusAccepted()\n {\n $this->status = 'ACCEPTED';\n\n return $this;\n }", "public function setAnsweredBy($val)\n {\n $this->_propDict[\"answeredBy\"] = $val;\n return $this;\n }", "public function setBy($by) {\n\t\t$this->attributes['by'] = $by;\n\t\t$this->by = $by;\n\t\treturn $this;\n\t}", "public function isAccepted()\n {\n return !empty($this->acceptee_id);\n }", "private function _setAcceptedArgs($accepted_args) {\n\t\t$this->accepted_args = $accepted_args;\n\n\t\treturn $this;\n\t}", "public function setCreatedBy(User $createdBy)\n\t{\n\t\t$this->createdBy=$createdBy; \n\t\t$this->keyModified['created_by'] = 1; \n\n\t}", "public function setReceiver(User $receiver)\n {\n $this->user = $receiver;\n }", "public function setGuaranteeAccepted(array $guaranteeAccepted)\n {\n $this->guaranteeAccepted = $guaranteeAccepted;\n return $this;\n }", "public function approveByUser() {\n $this->status = parent::STATUS_APPROVED_BY_USER;\n $this->admin_id = NULL;\n\n //no reason to keep this (cause we will save to history)\n $this->decline_reason = null;\n $this->comment = null;\n \n return $this->save(false);\n }", "private function SetCreatedBy(User $value = null)\n\t\t{\n\t\t\t$this->createdby = $value;\n\t\t}", "public function setSentBy(?string $sentBy): self\n {\n $this->initialized['sentBy'] = true;\n $this->sentBy = $sentBy;\n\n return $this;\n }", "public function setAppliedBy(?UserIdentity $value): void {\n $this->getBackingStore()->set('appliedBy', $value);\n }", "public function setCreatedBy(?SubmissionUserIdentity $value): void {\n $this->getBackingStore()->set('createdBy', $value);\n }", "public function _setUpdatedBy($updatedBy) {\n\t\t$this->_updatedBy = $updatedBy;\n\t}", "public function markApprovalAsAccepted(User $user)\n {\n if (!$user->hasRoleSlug('expert')) {\n return $this->respondNotFound(trans('user::messages.user not found'));\n }\n\n $user->setApprovalStatus(ApprovalStatusEnum::ACCEPTED);\n\n event(new UserApprovalHasBeenAccepted($user));\n\n return $this->respond([\n 'message' => trans('user::messages.user approval-accepted'),\n 'status' => $user->getStatus(),\n 'pending_approval' => $user->approvalIsAccepted()\n ]);\n }", "public function setCreatedBy($creator) {\n\n $this->u_createdby = $creator;\n\n }", "public function setIsAccepted(bool $isAccepted);", "public function setCreatedBy(ParticipantInterface $participant): self;", "public function setCreatedBy()\n {\n $userService = app()->make(AuthUserService::class);\n if ($userService->check()) {\n $this->{static::CREATED_BY} = $userService->user()->id;\n }\n\n return $this;\n }", "public function addToGuaranteeAccepted(\\Devlabs91\\TravelgateNotify\\Models\\Ota\\GuaranteeType\\GuaranteesAcceptedAType\\GuaranteeAcceptedAType $guaranteeAccepted)\n {\n $this->guaranteeAccepted[] = $guaranteeAccepted;\n return $this;\n }", "public function setCreatedby($input){\n\n $this->m_Createdby=$input;\n }", "public function setCreatedBy($userID);", "public function setCreatedBy($createdBy) {\n\t\t$this->_setCreatedBy($createdBy);\n\t\treturn $this;\n\t}", "public function setCreatedByAttribute(){\n $this->attributes['created_by'] = Auth::user()->id;\n }", "public function setCreatedBy($val)\n {\n $this->_propDict[\"createdBy\"] = $val;\n return $this;\n }", "public function setCreatedBy($val)\n {\n $this->_propDict[\"createdBy\"] = $val;\n return $this;\n }", "public function setCreatedBy($val)\n {\n $this->_propDict[\"createdBy\"] = $val;\n return $this;\n }", "public function isAccepted()\n {\n return $this->accepted;\n }", "public function setReportedBy($value)\n {\n $this->setItemValue('reported_by', ['id' => (int)$value]);\n }", "public function addAcceptedUserToChannel($channel_id)\n {\n $this->channels()->attach($channel_id, ['accepted' => true]);\n }", "private function SetModifiedBy(User $value = null)\n\t\t{\n\t\t\t$this->modifiedby = $value;\n\t\t}", "public function setAssignedToAttribute($value)\n {\n $this->attributes['assigned_to'] = $value['id'];\n }", "public function setReviewedBy(?UserIdentity $value): void {\n $this->getBackingStore()->set('reviewedBy', $value);\n }", "public function setCreatedBy(UserInterface $createdBy)\n {\n $this->createdBy = $createdBy;\n $this->addFollower($createdBy);\n\n return $this;\n }", "public function SetAccept (array $accept = []);", "public function setSender($sender);", "public function setCreatedBy(?IdentitySet $value): void {\n $this->getBackingStore()->set('createdBy', $value);\n }", "public function setCreatedBy(?IdentitySet $value): void {\n $this->getBackingStore()->set('createdBy', $value);\n }", "function userRequestedBy() {\n \t\n \t$user_requested_by_request_url = sprintf($this->api_urls['user_requested_by'], $this->access_token);\n \t\n \treturn $this->__apiCall($user_requested_by_request_url);\n \t\n }", "public function set_created_by($created_by)\n\t{\n\t\tif (is_null($created_by)) {\n\t\t\tthrow new InvalidArgumentException(\"Project Created By Invalid!\");\n\t\t}\n\t\t$this->created_by = $created_by;\n\t}", "public function setReceivedBy(\\Diadoc\\Api\\Proto\\Invoicing\\Official $value=null)\n {\n return $this->set(self::RECEIVEDBY, $value);\n }", "public function setAcceptedPaymentMethod(Property\\AcceptedPaymentMethod $acceptedPaymentMethod) {\n\t\t$this->acceptedPaymentMethod = $acceptedPaymentMethod;\n\n\t\treturn $this;\n\t}", "public function setOriginator($originator)\r\n {\r\n $this->originator = $originator;\r\n\r\n return $this;\r\n }", "public function setCreated_by($created_by)\n {\n $this->created_by = $created_by;\n \n return $this;\n }", "public function setAccept($accept)\n {\n $this->accept = $accept;\n return $this;\n }", "public function setSender($sender) {\n $this->_sender = $sender;\n }", "public function testSetAcceptSetsTheAcceptVariable()\n {\n $accept = uniqid('', true) . ',' . uniqid('', true) . ',' . uniqid('', true);\n $acceptParts = explode(',', $accept);\n\n $request = new Request($this->config, []);\n $request->setAccept($accept);\n $this->assertEquals($acceptParts, $request->accept);\n\n foreach ($acceptParts as $thing) {\n $this->assertTrue($request->accepts($thing));\n }\n }", "public function setSender($sender ){\n $this->sender = $sender;\n }", "public function setSender($sender)\n {\n throw new \\Ovh\\Exceptions\\InvalidParameterException(\"Sender is incompatible with message for response\");\n }", "public function getSubmittedBy()\r\n {\r\n return $this->_submittedBy;\r\n }", "public function setClientUserId($clientUserId)\n {\n }", "public function setPreferred($preferred)\n {\n $this->json()->preferred = $preferred->json();\n }", "function sendAcceptCelebration($userData, $acceptedName, $celebrationName)\n {\n $this->getCountryCode($userData->country_id);\n $template = 'USR018';\n $username = \"$userData->first_name $userData->last_name\";\n $replace = ['[UserName]', '[CelebrationEvent]'];\n $with = [$acceptedName, $celebrationName];\n $to = $this->countryCode . (int) $userData->mobile_no;\n parent::sendSms($to, $replace, $with, $template);\n }", "public function setOwner($user_id)\r\n {\r\n $this->owner = $user_id;\r\n }", "public function setAccept($accept){\r\n\t\tif( HtmlFormTools::auto_preg_match('/^(application|audio|image|multipart|text|video)\\/(\\*|[a-zA-Z\\-]+)$/i', $accept) ){\r\n\t\t\t$this->accept = $accept;\r\n\t\t}\r\n\r\n\t\treturn $this;\r\n\t}", "function setFromUserId($a_iFromUserId)\n {\n if (!is_null($this->_iFromUserId) && $this->_iFromUserId !== (int) $a_iFromUserId) {\n $this->_markModified();\n }\n $this->_iFromUserId = (int) $a_iFromUserId;\n }", "public function setChanger(UserInterface $user)\n {\n $this->entity->setChanger($user);\n }", "public function setCreator(User $creator);", "public function canBeAccepted()\n {\n return $this->isReadyForIssuing();\n }", "function setRequestUser($value)\n {\n $this->_props['RequestUser'] = $value;\n }", "public function setSender(\\App\\Models\\Entity\\User $sender)\n {\n $this->sender = $sender;\n\n return $this;\n }", "function setSender($from){\n $this->From = $from;\n }", "public function setModifiedBy(User $modifiedBy)\n\t{\n\t\t$this->modifiedBy=$modifiedBy; \n\t\t$this->keyModified['modified_by'] = 1; \n\n\t}", "public function _setCreatedByAdmin($createdByAdmin) {\n\t\t$this->_createdByAdmin = $createdByAdmin;\n\t}", "public function setUpdatedBy()\n {\n $userService = app()->make(AuthUserService::class);\n if ($userService->check()) {\n $this->{static::UPDATED_BY} = $userService->user()->id;\n }\n\n return $this;\n }", "protected function _setApprovedFlag()\n {\n $user = $this->getUser();\n\n if (!empty($user['id'])) {\n $settings = $this->getSettings();\n if ($settings['enable_listings_approval']) {\n return 0;\n }\n else if ($user['listing_approval']) {\n return 0;\n }\n }\n\n return 1;\n }", "function setCurrentUserAsSender(){\n if( !SessionUser::isLoggedIn() ) return false;\n $this->From = SessionUser::getProperty(\"username\").\"@\".SITE_EMAILDOMAIN;\n $this->FromName = SessionUser::getProperty(\"firstname\").\" \".SessionUser::getProperty(\"lastname\").\" (\".SessionUser::getProperty(\"username\").\")\";\n }", "public function getReviewedBy()\n {\n return $this->reviewedBy;\n }", "function setFromName($to_set=\"noreply\"){\n\t\t\t$this->from_name = $to_set;\n\t\t}", "protected function setOfferValue ()\n {\n $this->request->coupon_benefits[ $this->offerNature ] = $this->offer->rate;\n }", "public function setCreatedBy(int $createdBy)\n\t{\n\t\t$this->createdBy = $createdBy;\n\n\t\treturn $this;\n\t}", "public function setBuyer(NostoOrderBuyerInterface $buyer)\n {\n $this->buyer = $buyer;\n }", "public function setSentByEmail(?string $sentByEmail): self\n {\n $this->initialized['sentByEmail'] = true;\n $this->sentByEmail = $sentByEmail;\n\n return $this;\n }", "public function setAutoResponderBCC($value) { $this->_autoResponderBCC = $value; }", "public function setOwner(User $owner)\n {\n $this->owner = $owner;\n }", "public function setReceiver($receiver) {\n $this->_receiver = $receiver;\n }", "public function set_autor($_autor)\n {\n $this->_autor = $_autor;\n\n return $this;\n }", "public function acceptFriendRequest(User $user) {\n\n // Grab the friend requests where the id = the user id\n // then grab that user and update the pivot (table)\n // and update array to accepted = true (or = 1)\n $this->friendRequests()->where('id', $user->id)\n ->first()->pivot->update(['accepted' => true]);\n }", "public function setFromEmailAddress($fromEmailAddress, $senderName);", "public function getIsAccepted(): bool;", "private function checkAccepted(object $object): void\n {\n if (!$object instanceof $this->accepted) {\n throw new InvalidTypeException($this->accepted, get_class($object));\n }\n }", "public function setReceiver($receiver){\n $this->receiver = $receiver;\n }", "public function getAnsweredBy()\n {\n if (array_key_exists(\"answeredBy\", $this->_propDict)) {\n if (is_a($this->_propDict[\"answeredBy\"], \"\\Beta\\Microsoft\\Graph\\Model\\ParticipantInfo\") || is_null($this->_propDict[\"answeredBy\"])) {\n return $this->_propDict[\"answeredBy\"];\n } else {\n $this->_propDict[\"answeredBy\"] = new ParticipantInfo($this->_propDict[\"answeredBy\"]);\n return $this->_propDict[\"answeredBy\"];\n }\n }\n return null;\n }", "function GetAllPlacedOffersIAccepted($userId)\n {\n $placedOffersModel = new PlacedOffersModel();\n $placedOffersModel->GetAllPlacedOffersIAccepted($userId);\n }", "public function setCurrenciesAccepted($value)\n {\n $this->currenciesAccepted = $value;\n }", "public function setOwner($owner) {\n\t\t$this->owner = $owner;\n\t}", "public function setOwner($owner) {\n\t\t$this->owner = $owner;\n\t}" ]
[ "0.6674386", "0.63769877", "0.6203351", "0.5709533", "0.56969076", "0.56572735", "0.55704564", "0.5513172", "0.5511953", "0.54691905", "0.54689705", "0.54527026", "0.5451261", "0.54320323", "0.53791493", "0.53631514", "0.5314622", "0.5305201", "0.5294099", "0.52705073", "0.5209753", "0.51747847", "0.5111835", "0.5084147", "0.5079516", "0.5069487", "0.50585866", "0.50531596", "0.5051295", "0.50398076", "0.5029006", "0.5025253", "0.5016755", "0.500452", "0.4998315", "0.4983682", "0.4983617", "0.49742267", "0.49742267", "0.49742267", "0.49694976", "0.4959023", "0.4940864", "0.49381438", "0.49381027", "0.49377593", "0.49277526", "0.49241123", "0.49169946", "0.4912349", "0.4912349", "0.490813", "0.48998913", "0.48655987", "0.4862254", "0.48609993", "0.4858286", "0.48542178", "0.484608", "0.48430353", "0.48244384", "0.48204824", "0.4801619", "0.47987345", "0.47964367", "0.47768778", "0.477395", "0.47722387", "0.47716954", "0.47701916", "0.47694632", "0.4765563", "0.4764695", "0.47643185", "0.47351682", "0.4734862", "0.47329003", "0.4724398", "0.47123018", "0.47109032", "0.47031763", "0.4695215", "0.46870843", "0.468357", "0.46755707", "0.4669505", "0.4663803", "0.46607628", "0.46601027", "0.46484035", "0.46477175", "0.46452272", "0.46436128", "0.46373522", "0.46358705", "0.46328956", "0.46279842", "0.4618693", "0.46144348", "0.46144348" ]
0.59824246
3
Returns value of 'AcceptedBy' property
public function getAcceptedBy() { return $this->get(self::ACCEPTEDBY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getApprovedBy()\n {\n return $this->approved_by;\n }", "public function getReceivedBy()\n {\n return $this->get(self::RECEIVEDBY);\n }", "public function getBy() { return $this->by; }", "public function getAccepted();", "function getSubmittedBy() {\n\t\treturn $this->data_array['submitted_by'];\n\t}", "function getSubmittedBy() {\n\t\treturn $this->data_array['submitted_by'];\n\t}", "public function getOwnerRequestedBy()\n {\n return $this->http->get('/users/%s/requested-by', 'self');\n }", "public function getReviewedBy()\n {\n return $this->reviewedBy;\n }", "public function getSubmittedBy()\r\n {\r\n return $this->_submittedBy;\r\n }", "public function getPassportIssuedBy(): string {\n return $this->passport_issued_by;\n }", "public function getSubmittedbyuser()\n\t{\n\t\treturn $this->submittedbyuser;\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 getAnsweredBy()\n {\n if (array_key_exists(\"answeredBy\", $this->_propDict)) {\n if (is_a($this->_propDict[\"answeredBy\"], \"\\Beta\\Microsoft\\Graph\\Model\\ParticipantInfo\") || is_null($this->_propDict[\"answeredBy\"])) {\n return $this->_propDict[\"answeredBy\"];\n } else {\n $this->_propDict[\"answeredBy\"] = new ParticipantInfo($this->_propDict[\"answeredBy\"]);\n return $this->_propDict[\"answeredBy\"];\n }\n }\n return null;\n }", "public function getBuyer()\n {\n return $this->getParameter('buyer');\n }", "public function accepted()\n {\n return $this->_accepted;\n }", "public function getGuaranteeAccepted()\n {\n return $this->guaranteeAccepted;\n }", "public function getAccept()\n {\n return $this->accept;\n }", "public function getSentBy(): ?string\n {\n return $this->sentBy;\n }", "public function isAccepted()\n {\n return !empty($this->acceptee_id);\n }", "function userRequestedBy() {\n \t\n \t$user_requested_by_request_url = sprintf($this->api_urls['user_requested_by'], $this->access_token);\n \t\n \treturn $this->__apiCall($user_requested_by_request_url);\n \t\n }", "public function getPaymentAccepted()\n {\n return $this->paymentAccepted;\n }", "public function getCreatedby()\n {\n return ($this->m_Createdby);\n }", "public function getReceiver()\n {\n return $this->user;\n }", "public function _getCreatedBy() {\n\t\treturn $this->_createdBy;\n\t}", "public function getCreatedBy()\n\t{\n\t\treturn $this->created_by;\n\t}", "public function isAccepted()\n {\n return $this->accepted;\n }", "public function getCreatedBy()\n {\n return $this->created_by;\n }", "public function getCreatedBy() {\n if(array_key_exists('created_by', $this->_attributes)) {\n return $this->_attributes['created_by'];\n }\n return 0;\n }", "public function getProvidedBy();", "public function sent_by()\n {\n // UTILIZAR $post->kpost->sent_by\n $kpost = Kpost\n ::where('user_id','=',auth()->id()) \n ->where('post_id','=',$this->id)\n ->first();\n if ($kpost)\n return $kpost->sent_by;\n return null; \n }", "public function getByAuthor()\n {\n return $this->by_author;\n }", "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "protected static function created_by(): mixed\n\t{\n\t\treturn self::$query->created_by;\n\t}", "public function getAccepted(): ?bool\n {\n\n return $this->accepted;\n\n }", "public function getFromUser()\n {\n return $this->fromUser;\n }", "public function approved_sender()\n\t{\n\t\t//pe($this->that);\n\t\tif (is_null($this->approved_sender))\n\t\t{\n\t\t\t$add = strtolower($this->get_address_from());\n\t\t\t$approved_arr = $this->get_approved();\n\t\t\tforeach($approved_arr as $check_add)\n\t\t\t{\n\t\t\t\tif ($add == strtolower($check_add))\n\t\t\t\t{\n\t\t\t\t\t$this->approved_sender = TRUE;\n\t\t\t\t\tbreak;\n\t\t\t\t};\n\t\t\t}\n\t\t\t$this->that->log_state('Sender '. $add .' approved? : ' . var_export($this->approved_sender,TRUE));\n\t\t}\n\t\treturn $this->approved_sender;\n\t}", "public function getIsAccepted(): bool;", "public function getCreatedby() {\n\n return $this->u_createdby;\n\n }", "public function getAccepted(): array\n {\n return $this->accept;\n }", "public function getAccepted()\n {\n if (is_null($this->Accepted)) {\n /** @psalm-var ?float $data */\n $data = $this->raw(self::FIELD_ACCEPTED);\n if (is_null($data)) {\n return null;\n }\n $this->Accepted = (float) $data;\n }\n\n return $this->Accepted;\n }", "public function getReturnsAcceptedOption()\n {\n return $this->returnsAcceptedOption;\n }", "public function getReturnsAcceptedOption()\n {\n return $this->returnsAcceptedOption;\n }", "public function getPayee_preferred()\n {\n return $this->payee_preferred;\n }", "public function getCreatedBy()\n\t{\n\t\treturn $this->createdBy; \n\n\t}", "public function get_created_by()\n\t{\n\t\treturn $this->created_by;\n\t}", "public function getRequestProcessedBy()\n\t{\n\t\treturn $this->request_processed_by;\n\t}", "public function getPayer_selected()\n {\n return $this->payer_selected;\n }", "public function get_strPrefAcceptType()\n {\n return $this->strPrefAcceptType;\n }", "function getAssignedTo() {\n\t\treturn $this->data_array['assigned_to'];\n\t}", "public function getCreatedBy()\n {\n if (array_key_exists(\"createdBy\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdBy\"], \"\\Beta\\Microsoft\\Graph\\Model\\IdentitySet\") || is_null($this->_propDict[\"createdBy\"])) {\n return $this->_propDict[\"createdBy\"];\n } else {\n $this->_propDict[\"createdBy\"] = new \\Beta\\Microsoft\\Graph\\Model\\IdentitySet($this->_propDict[\"createdBy\"]);\n return $this->_propDict[\"createdBy\"];\n }\n }\n return null;\n }", "public function getTypeAcceptation() {\n return $this->typeAcceptation;\n }", "public function getIdFormerApprover()\n {\n return $this->idFormerApprover;\n }", "public function getUpdatedBy(): string\n {\n return $this->updated_by;\n }", "public function getRequesterVpoUserId()\n\t{\n\t\treturn $this->requester_vpo_user_id;\n\t}", "public function getOriginator()\n {\n return $this->getMessage()['originator'];\n }", "public function getBuyerEmail() {\n return $this->params[\"original\"][\"buyer_email\"];\n }", "public function validatedBy()\n {\n return $this->service;\n }", "public function validatedBy()\n {\n return $this->service;\n }", "public function validatedBy()\n {\n return $this->service;\n }", "public function getOwnedByAttribute()\n {\n return $this->site->company;\n }", "public function _getUpdatedBy() {\n\t\treturn $this->_updatedBy;\n\t}", "public function getIsConfirmedByFieldAttribute()\n {\n return $this->confirmed_by == $this->getConstant('CONFIRMED_BY_FIELD');\n }", "public function getAcceptedPaymentMethod() {\n\t\treturn $this->acceptedPaymentMethod;\n\t}", "public function getApproved()\n {\n return $this->approved;\n }", "public function getCreatedBy()\n {\n return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;\n }", "public function getCreatedBy()\n {\n return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;\n }", "public function getCreatedBy()\n {\n return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;\n }", "public function getFollowedByCount()\n {\n return $this->findFollowedBy(Status::ACCEPTED)->count();\n }", "public function getUpdatedBy()\n\t{\n\t\treturn $this->updatedBy;\n\t}", "public function broadcastOn()\n {\n return ['user.'.\\Authorizer::getResourceOwnerId()];\n }", "public function getPayer()\n {\n return $this->user;\n }", "public function getCreatedBy();", "public function getCreatedBy();", "public function getCreatedBy();", "public function getCreatedBy();", "protected static function updated_by(): mixed\n\t{\n\t\treturn self::$query->updated_by;\n\t}", "function accepted()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n return $this->Accepted;\n }", "public function by()\n {\n return $this->user->name();\n }", "public function getResponse()\n {\n return self::$acceptedResponse;\n }", "public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }", "public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }", "public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }", "public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }", "public function getAcceptPartnerCommercial()\n {\n return $this->acceptPartnerCommercial;\n }", "public function getSenderAttribute()\n {\n return User::where('id', $this->sender_id)->first();\n }", "public function getOwner()\n {\n return $this->data['owner'];\n }", "public function getReplenishmentOwnerDescription()\n {\n return $this->replenishmentOwnerDescription;\n }", "public function getAppliedBy(): ?UserIdentity {\n $val = $this->getBackingStore()->get('appliedBy');\n if (is_null($val) || $val instanceof UserIdentity) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'appliedBy'\");\n }", "public function getAllowSendToCustomer()\n {\n return $this->allow_send_to_customer;\n }", "public function getSellerNoteToBuyer()\n {\n return $this->sellerNoteToBuyer;\n }", "public function getVendorPref()\n {\n return $this->vendorPref;\n }", "public function getSender() {\n\t\treturn $this -> data['sender'];\n\t}", "public function getCreatedBy() {\n\t\treturn $this->hasOne ( User::className (), [ \n\t\t\t\t'id' => 'created_by_id' \n\t\t] );\n\t}", "public function getPayer()\r\n {\r\n return $this->payer;\r\n }", "public function canBeAccepted()\n {\n return $this->isReadyForIssuing();\n }" ]
[ "0.71323013", "0.6525611", "0.62705785", "0.62088686", "0.61826473", "0.61826473", "0.617463", "0.61732364", "0.6167146", "0.60802245", "0.5981977", "0.5969908", "0.593676", "0.59293336", "0.591506", "0.5890674", "0.58672434", "0.58639985", "0.5854752", "0.5849962", "0.5811637", "0.5810794", "0.57993025", "0.57911825", "0.57776266", "0.5773349", "0.57601887", "0.5748967", "0.57461756", "0.57355344", "0.57334596", "0.57228065", "0.57228065", "0.57228065", "0.57228065", "0.57228065", "0.57228065", "0.5706019", "0.57021827", "0.57021195", "0.56982785", "0.56913596", "0.56876034", "0.56847125", "0.5673879", "0.5641253", "0.5641253", "0.5639567", "0.56316054", "0.55544525", "0.555358", "0.5510027", "0.5455314", "0.5447854", "0.5438569", "0.543657", "0.54275984", "0.5425844", "0.53773165", "0.53728914", "0.53636867", "0.5338815", "0.5338815", "0.5338815", "0.53334606", "0.5330689", "0.5330042", "0.5316729", "0.5315531", "0.5310679", "0.5310679", "0.5310679", "0.5307615", "0.52839077", "0.5279582", "0.527718", "0.5274219", "0.5274219", "0.5274219", "0.5274219", "0.52741367", "0.52704275", "0.526569", "0.52640957", "0.5260012", "0.5260012", "0.5260012", "0.5260012", "0.5257793", "0.5251509", "0.523839", "0.52364236", "0.5236045", "0.5234922", "0.5230944", "0.52306503", "0.5229629", "0.52229637", "0.52138245", "0.5207281" ]
0.8535156
0
Sets value of 'ReceivedBy' property
public function setReceivedBy(\Diadoc\Api\Proto\Invoicing\Official $value=null) { return $this->set(self::RECEIVEDBY, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getReceivedBy()\n {\n return $this->get(self::RECEIVEDBY);\n }", "public function setReceiver(User $receiver)\n {\n $this->user = $receiver;\n }", "public function setReceiver($receiver) {\n $this->_receiver = $receiver;\n }", "public function setReceiver($receiver){\n $this->receiver = $receiver;\n }", "public function setReceivedByIdAttribute($input)\n {\n $this->attributes['received_by_id'] = $input ? $input : null;\n }", "public function _setCreatedBy($createdBy) {\n\t\t$this->_createdBy = $createdBy;\n\t}", "function setSender($from){\n $this->From = $from;\n }", "function setFromName($to_set=\"noreply\"){\n\t\t\t$this->from_name = $to_set;\n\t\t}", "public function setSender($sender);", "public function setSender($sender ){\n $this->sender = $sender;\n }", "function setFrom($to_set=\"noreply\"){\n\t\t\t$this->from_mail = $to_set;\n\t\t}", "public function setSender($sender) {\n $this->_sender = $sender;\n }", "public function setSentBy(?string $sentBy): self\n {\n $this->initialized['sentBy'] = true;\n $this->sentBy = $sentBy;\n\n return $this;\n }", "public function setBy($x) { $this->by = $x; }", "public function setUserReceived($value)\n {\n return $this->set(self::user_received, $value);\n }", "public function setIDSender($idSender){\n $this->IDsender = $idSender;\n }", "public function setTo($to) {\r\n $this->to = $to;\r\n }", "public function setTo($to) {\r\n\t\t$this->to = $to;\r\n\t}", "function setCurrentUserAsSender(){\n if( !SessionUser::isLoggedIn() ) return false;\n $this->From = SessionUser::getProperty(\"username\").\"@\".SITE_EMAILDOMAIN;\n $this->FromName = SessionUser::getProperty(\"firstname\").\" \".SessionUser::getProperty(\"lastname\").\" (\".SessionUser::getProperty(\"username\").\")\";\n }", "public function setCreatedBy(User $createdBy)\n\t{\n\t\t$this->createdBy=$createdBy; \n\t\t$this->keyModified['created_by'] = 1; \n\n\t}", "protected function setReplyTo() {}", "public function receiving_user(){\n return $this->belongsTo('App\\User', 'received_by');\n }", "public function setSender($from, $user, $password) {\r\n\t\t$this->from = $from;\r\n\t\t$this->user = $user;\r\n\t\t$this->_password = $password;\r\n\t}", "public function setCreatedBy($createdBy);", "public function setRecipientUserId(?string $value): void {\n $this->getBackingStore()->set('recipientUserId', $value);\n }", "public function set_to($to)\n\t{\n\t\tif($this->validate_email($to))\n\t\t{\n\t\t\tif(is_array($to))\n\t\t\t\t$this->send_to = $to;\n\t\t\telse\n\t\t\t\t$this->send_to[] = $to;\t\t\n\t\t}\n\t}", "public function setSender($address);", "public function _setUpdatedBy($updatedBy) {\n\t\t$this->_updatedBy = $updatedBy;\n\t}", "private function SetModifiedBy(User $value = null)\n\t\t{\n\t\t\t$this->modifiedby = $value;\n\t\t}", "function setTo($to_set){\n\t\t\t$this->to=$to_set;\n\t\t}", "public function setCreatedBy($creator) {\n\n $this->u_createdby = $creator;\n\n }", "public static function setSender($val) \n { \n emailSettings::$sender = $val; \n }", "function set_reply($reply)\n\t{\n\t\t$this->reply_to = $reply;\n\t}", "public function setCreatedby($input){\n\n $this->m_Createdby=$input;\n }", "public function setSender($sender)\n {\n throw new \\Ovh\\Exceptions\\InvalidParameterException(\"Sender is incompatible with message for response\");\n }", "public function setSentByEmail(?string $sentByEmail): self\n {\n $this->initialized['sentByEmail'] = true;\n $this->sentByEmail = $sentByEmail;\n\n return $this;\n }", "public function setCreatedByAttribute(){\n $this->attributes['created_by'] = Auth::user()->id;\n }", "public function setRecipient(User $User = NULL) {\r\n if ($User instanceof User) {\r\n $this->Recipient = $User;\r\n \r\n $this->to_user_id = $this->Recipient->id;\r\n $this->to_username = $this->Recipient->username;\r\n $this->to_user_viewonline = $this->Recipient->hide;\r\n $this->to_user_avatar = $this->Recipient->avatar;\r\n }\r\n \r\n return $this;\r\n }", "public function set( $recipient ) {\n\t\tswitch ( gettype( $recipient ) ) {\n\t\t\tcase 'string':\n\t\t\t\t$this->parse( $recipient );\n\t\t\t\tbreak;\n\t\t\tcase 'object':\n\t\t\t\t$recipient = (array) $recipient; // Convert and continue to 'array' case\n\t\t\tcase 'array':\n\t\t\t\tif ( isset( $recipient['name'] ) ) {\n\t\t\t\t\t$this->name = $recipient['name'];\n\t\t\t\t}\n\t\t\t\tif ( isset( $recipient['email'] ) ) {\n\t\t\t\t\t$this->email = $recipient['email'];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "private function SetCreatedBy(User $value = null)\n\t\t{\n\t\t\t$this->createdby = $value;\n\t\t}", "public function setReplyTo($replyTo);", "public function setModifiedBy(User $modifiedBy)\n\t{\n\t\t$this->modifiedBy=$modifiedBy; \n\t\t$this->keyModified['modified_by'] = 1; \n\n\t}", "public function getSentBy(): ?string\n {\n return $this->sentBy;\n }", "public function setSender(\\App\\Models\\Entity\\User $sender)\n {\n $this->sender = $sender;\n\n return $this;\n }", "public function setCreatedBy(?WorkbookEmailIdentity $value): void {\n $this->getBackingStore()->set('createdBy', $value);\n }", "public function setSender($var)\n {\n GPBUtil::checkString($var, False);\n $this->sender = $var;\n\n return $this;\n }", "public function setAssignedToAttribute($value)\n {\n $this->attributes['assigned_to'] = $value['id'];\n }", "public function setRecipient($recipient)\n {\n $this->recipient = (string) $recipient;\n }", "protected function setTo() {}", "public function __construct(User $sender,User $receiver)\n {\n $this->sender = $sender;\n $this->receiver = $receiver;\n }", "public function getSentTo()\n {\n return $this->sentTo;\n }", "public function setReportedBy($value)\n {\n $this->setItemValue('reported_by', ['id' => (int)$value]);\n }", "public function getReceiver()\n {\n return $this->user;\n }", "function setReceived($received) \n {\n if ($received == true) \n\t { \n \t$this->setValueByFieldName('cashtransaction_recd','1');\n \t }\n \t else \n \t {\n\t \t$this->setValueByFieldName('cashtransaction_recd','0');\n \t } \n \t\t\t\n }", "public function getReceiver(){\n return $this->receiver;\n }", "public function setBy($by) {\n\t\t$this->attributes['by'] = $by;\n\t\t$this->by = $by;\n\t\treturn $this;\n\t}", "public function setCreatedBy($userID);", "function __construct($sender)\r\n {\r\n $this->sender = $sender;\r\n $this->recipients = array(); \r\n }", "public function setEmailFromName($value) { $this->_emailFromName = $value; }", "function setSenderId($a_iSenderId)\n {\n $this->_iSenderId = (int) $a_iSenderId;\n $this->setSearchParameter('sender_id', $this->_iSenderId);\n }", "public function setCreatedBy(UserInterface $createdBy)\n {\n $this->createdBy = $createdBy;\n $this->addFollower($createdBy);\n\n return $this;\n }", "public function setFromEmailAddress($fromEmailAddress, $senderName);", "public function setTo($to) {\n\t\t$this->attributes['to'] = $to;\n\t\t$this->to = $to;\n\t\treturn $this;\n\t}", "public function setRequester($user)\r\n {\r\n $this->requester = $user;\r\n }", "public function set_to( $to ) {\n $this->to = $to;\n return $this;\n }", "public function setReceiver($receiver)\n {\n $this->receiver = $receiver;\n\n return $this;\n }", "public function setReceiver($receiver)\n {\n $this->receiver = $receiver;\n\n return $this;\n }", "public function setTo($username) {\n\t\t$this->data['username'] = $username;\n\t}", "public function setToEmailAddress($toEmailAddress, $recipientName);", "function setSender($from)\n\t{\n\t\t// If $from is an array we assume it has an address and a name\n\t\tif (is_array($from))\n\t\t{\n\t\t\t$this->From \t= JMailHelper::cleanLine( $from[0] );\n\t\t\t$this->FromName = JMailHelper::cleanLine( $from[1] );\n\t\t// If it is a string we assume it is just the address\n\t\t} elseif (is_string($from)) {\n\t\t\t$this->From = JMailHelper::cleanLine( $from );\n\t\t// If it is neither, we throw a warning\n\t\t} else {\n\t\t\tJError::raiseWarning( 0, \"JMail:: Invalid E-Mail Sender: $from\", \"JMail::setSender($from)\");\n\t\t}\n\t}", "public function setCreatedBy($val)\n {\n $this->_propDict[\"createdBy\"] = $val;\n return $this;\n }", "public function setCreatedBy($val)\n {\n $this->_propDict[\"createdBy\"] = $val;\n return $this;\n }", "public function setCreatedBy($val)\n {\n $this->_propDict[\"createdBy\"] = $val;\n return $this;\n }", "public function setAutoResponderReplyTo($value) { $this->_autoResponderReplyTo = $value; }", "public function setFrom($from) {\n\t\t$this->mail['From'] = $from;\n\t\tif ($this->mail['ReplyTo'] == '') {\n\t\t\t$this->mail['ReplyTo'] = $from;\n\t\t}\n\t}", "private function setOwner($subject, $view)\r\n {\r\n $user = $this->contract->user;\r\n $this->messages[$user->id] = [\r\n $subject,\r\n $view,\r\n [\r\n 'user' => $user,\r\n ]\r\n ];\r\n }", "public function setCreatedBy($createdBy) {\n\t\t$this->_setCreatedBy($createdBy);\n\t\treturn $this;\n\t}", "public function setCreatedBy(?UserIdentity $value): void {\n $this->getBackingStore()->set('createdBy', $value);\n }", "public function setCreatedByUserId(?string $value): void {\n $this->getBackingStore()->set('createdByUserId', $value);\n }", "public function setAnswersReceived($answers_received){\n\t\t$this->answers_received = $answers_received;\n\t}", "public function setReplyTo(?string $replyTo): void {\n\t\tself::checkValidEMail($replyTo);\n\n\t\t$this->replyTo = $replyTo;\n\t}", "public function __construct($sender)\n {\n $this->_sender = $sender;\n }", "public function setUserId() {\n $this->user_id = $user_id;\n }", "public function set_recipient( $id ) {\n\t\t$this->recipient_id = $id;\n\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_RECIPIENT_KEY, $id );\n\t}", "public function setUserMail(?string $value): void {\n $this->getBackingStore()->set('userMail', $value);\n }", "function setEnvelopeSender($envelopeSender) {\n\t\t$this->setData('envelopeSender', $envelopeSender);\n\t}", "public function setCreatedBy($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->created_by !== $v) {\n\t\t\t$this->created_by = $v;\n\t\t\t$this->modifiedColumns[] = CampaignPeer::CREATED_BY;\n\t\t}\n\n\t\tif ($this->asfGuardUserProfile !== null && $this->asfGuardUserProfile->getId() !== $v) {\n\t\t\t$this->asfGuardUserProfile = null;\n\t\t}\n\n\t\treturn $this;\n\t}", "function addCurrentUserAsRecipient(){\n // $this->AddRecipient( SessionUser::getProperty(\"firstname\").\" \".SessionUser::getProperty(\"lastname\").\" <\".SessionUser::getProperty(\"username\").\"@\".SITE_EMAILDOMAIN.\">\" );\n $this->AddRecipient( SessionUser::getProperty(\"username\").\"@\".SITE_EMAILDOMAIN );\n }", "public function setReviewedBy($value)\n {\n $this->reviewedBy = $value;\n }", "public function setCreatedBy(?SubmissionUserIdentity $value): void {\n $this->getBackingStore()->set('createdBy', $value);\n }", "function setFromUserId($a_iFromUserId)\n {\n if (!is_null($this->_iFromUserId) && $this->_iFromUserId !== (int) $a_iFromUserId) {\n $this->_markModified();\n }\n $this->_iFromUserId = (int) $a_iFromUserId;\n }", "public function getSender(){\n return $this->sender;\n }", "public function setAutoResponderReplyToName($value) { $this->_autoResponderReplyToName = $value; }", "public function setSenderOrAuthors(?array $value): void {\n $this->getBackingStore()->set('senderOrAuthors', $value);\n }", "public function forceReplyTo($to_user_id, IUserTypes $from_user = null)\n {\n }", "public function getSender();", "public function setPhotoSender($photoSender ){\n $this->photoSender = $photoSender;\n }", "public function setAutoResponderBCC($value) { $this->_autoResponderBCC = $value; }", "public function setCreatedBy()\n {\n $userService = app()->make(AuthUserService::class);\n if ($userService->check()) {\n $this->{static::CREATED_BY} = $userService->user()->id;\n }\n\n return $this;\n }", "function setRequestUser($value)\n {\n $this->_props['RequestUser'] = $value;\n }" ]
[ "0.6823584", "0.66585255", "0.6544782", "0.64932007", "0.6350518", "0.6278065", "0.6183146", "0.606616", "0.6052428", "0.6008073", "0.6006125", "0.60020643", "0.59871113", "0.59258544", "0.5904417", "0.5880617", "0.58694434", "0.58552265", "0.5844537", "0.58075285", "0.57794", "0.5688903", "0.56481934", "0.5643167", "0.5625964", "0.5608599", "0.55772156", "0.55615985", "0.5551115", "0.5548408", "0.5542375", "0.55156493", "0.5512906", "0.5453922", "0.54422534", "0.541019", "0.53917915", "0.53760654", "0.53698945", "0.536733", "0.53482074", "0.53447384", "0.5342355", "0.5327168", "0.53254575", "0.5324874", "0.5318137", "0.53136206", "0.5301802", "0.5299004", "0.5293174", "0.5286246", "0.52862", "0.52855384", "0.5278534", "0.52721417", "0.5265857", "0.525219", "0.5248351", "0.524088", "0.52339864", "0.5232424", "0.5232219", "0.5205944", "0.52034056", "0.518885", "0.518885", "0.5187199", "0.51676095", "0.5163772", "0.51524067", "0.51524067", "0.51524067", "0.51365983", "0.51350975", "0.51273036", "0.5122086", "0.51173836", "0.5098868", "0.50980055", "0.50954336", "0.5082561", "0.5080371", "0.50772756", "0.50717944", "0.50587577", "0.5038591", "0.5029965", "0.50286144", "0.50281054", "0.50211596", "0.50202894", "0.50109535", "0.50036097", "0.50001156", "0.49960768", "0.49950954", "0.49948508", "0.49914795", "0.49906293" ]
0.63060033
5
Returns value of 'ReceivedBy' property
public function getReceivedBy() { return $this->get(self::RECEIVEDBY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getReceiver()\n {\n return $this->user;\n }", "public function getSender() {\n\t\treturn $this -> data['sender'];\n\t}", "public function getReceiver(){\n return $this->receiver;\n }", "public function getSender();", "public function getReceiver()\n {\n return $this->receiver;\n }", "public function getReceiver()\n {\n return $this->receiver;\n }", "public function getReceiver() {\n return $this->_receiver;\n }", "public function getUserReceived()\n {\n $value = $this->get(self::user_received);\n return $value === null ? (integer)$value : $value;\n }", "public function getToUser()\n {\n return $this->toUser;\n }", "public function getSentBy(): ?string\n {\n return $this->sentBy;\n }", "public function getSender(){\n return $this->sender;\n }", "public function getSender()\n {\n return $this->sender;\n }", "public function getSender()\n {\n return $this->sender;\n }", "public function getSender()\n {\n return $this->sender;\n }", "public function getSender()\n {\n return $this->sender;\n }", "public function getSender()\n {\n return $this->sender;\n }", "public function getSender()\n {\n return $this->sender;\n }", "public function getSender() {\n return $this->_sender;\n }", "public function getSender() {\n return $this->sender;\n }", "public function getSenderAttribute()\n {\n return User::where('id', $this->sender_id)->first();\n }", "public function getRecipient() {\n\t\treturn $this -> data['recipient'];\n\t}", "public function getSentTo()\n {\n return $this->sentTo;\n }", "public function getBy() { return $this->by; }", "public function getOriginator()\n {\n return $this->getMessage()['originator'];\n }", "public function getSender()\n {\n if (count($this->sender()->first()) > 0)\n return $this->sender()->first()->name;\n else\n return 'Anonymous';\n }", "public function receiver()\n {\n return User::where('id', $this->receiver_id)->first();\n }", "public function getIdSender()\n {\n return $this->idSender;\n }", "public function getCreatedby()\n {\n return ($this->m_Createdby);\n }", "public function getReceived()\n\t{\n\t\treturn $this->data['received'];\n\t}", "public function getReceived() {\n\t\treturn $this->received;\n\t}", "public function getTo() {\n return $this->user_to;\n }", "public function getMySender()\n\t{\n\t\treturn $this->senders[$this->sender_index];\n\t}", "public function getReceived()\n {\n return $this->received;\n }", "public function getReceiverId();", "public function _getCreatedBy() {\n\t\treturn $this->_createdBy;\n\t}", "public function getReceiverName()\n {\n return $this->get(self::_RECEIVER_NAME);\n }", "function getSender(){\n $return = \"\";\n if( $this->FromName != \"\" ) $return .= $this->FromName.\" (\";\n $return .= $this->From;\n if( $this->FromName != \"\" ) $return .= \")\";\n return $return;\n }", "public function getUserMail() {\n return $this->mail;\n }", "public function getRecipient()\n {\n return $this->recipient;\n }", "public function getFromUser()\n {\n return $this->fromUser;\n }", "public function getSenderName()\n {\n return $this->get(self::_SENDER_NAME);\n }", "public function getUnconfirmedReceived()\n\t{\n\t\treturn $this->data['unconfirmed_received'];\n\t}", "public function getMail()\n {\n return $this->Mail_user;\n }", "public function receiving_user(){\n return $this->belongsTo('App\\User', 'received_by');\n }", "public function getCreatedBy() {\n if(array_key_exists('created_by', $this->_attributes)) {\n return $this->_attributes['created_by'];\n }\n return 0;\n }", "public function getRecipient() {\n return $this->recipient;\n }", "public function getFrom() {\n return $this->user_from;\n }", "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "public function getCreatedBy()\n {\n return $this->createdBy;\n }", "public function getCreatedBy()\n\t{\n\t\treturn $this->created_by;\n\t}", "public function getCreatedBy()\n {\n return $this->created_by;\n }", "public function getSender()\n {\n return strtolower($this->getFrom()->getEmail());\n }", "public function getSender(): array\n {\n return $this->sender;\n }", "public function getInReplyToUserId() : string\n {\n return $this->inReplyToUserId;\n }", "function getAssignedTo() {\n\t\treturn $this->data_array['assigned_to'];\n\t}", "protected function getReceiverValue()\n\t{\n\t\t$payment = $this->request->getPayment();\n\n\t\treturn $this->request->get('receiver.'.$payment->id);\n\t}", "public function getIDsender(){\n return $this->IDsender;\n }", "public function getMessFromMail ()\n {\n return $this->mess_from_mail;\n }", "public function getCreatedBy()\n\t{\n\t\treturn $this->createdBy; \n\n\t}", "public function sent_by()\n {\n // UTILIZAR $post->kpost->sent_by\n $kpost = Kpost\n ::where('user_id','=',auth()->id()) \n ->where('post_id','=',$this->id)\n ->first();\n if ($kpost)\n return $kpost->sent_by;\n return null; \n }", "public function getCreatedby() {\n\n return $this->u_createdby;\n\n }", "public function getTo()\n {\n return $this->_to;\n }", "public function getTo()\n {\n return $this->_to;\n }", "public function getProvidedBy();", "public function getUpdatedBy(): string\n {\n return $this->updated_by;\n }", "function getTo(){\n\t\t\treturn $this->to;\n\t\t}", "function get_recipient_id() {\n\t\treturn $this->get_data( 'recipient' );\n\t}", "public function getTo() {\n return $this->to;\n }", "public function getTo() {\n\t\treturn $this->to;\n\t}", "public function getTo() {\n\t\treturn $this->to;\n\t}", "public function _getUpdatedBy() {\n\t\treturn $this->_updatedBy;\n\t}", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "function getFrom(){\n\t\t\treturn $this->from_mail;\n\t\t}", "public function getCreatedBy()\n {\n if (array_key_exists(\"createdBy\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdBy\"], \"\\Beta\\Microsoft\\Graph\\Model\\EmailIdentity\") || is_null($this->_propDict[\"createdBy\"])) {\n return $this->_propDict[\"createdBy\"];\n } else {\n $this->_propDict[\"createdBy\"] = new EmailIdentity($this->_propDict[\"createdBy\"]);\n return $this->_propDict[\"createdBy\"];\n }\n }\n return null;\n }", "public function getMailTo ()\n {\n return $this->mail_to;\n }", "function getSenderId()\n {\n return (int) $this->_iSenderId;\n }", "protected static function created_by(): mixed\n\t{\n\t\treturn self::$query->created_by;\n\t}", "function getReplyTo() {\n\t\treturn $this->getData('replyTo');\n\t}", "public function getRefundFromReceivedAmount()\n {\n return $this->refund_from_received_amount;\n }", "function getFromName(){\n\t\t\treturn $this->from_name;\n\t\t}", "public function get_created_by()\n\t{\n\t\treturn $this->created_by;\n\t}", "public function getBuyerEmail() {\n return $this->params[\"original\"][\"buyer_email\"];\n }", "public function getMessFromName ()\n {\n return $this->mess_from_name;\n }", "public function getAcceptedBy()\n {\n return $this->get(self::ACCEPTEDBY);\n }", "public function getSentByEmail(): ?string\n {\n return $this->sentByEmail;\n }", "public function getSender()\n {\n return $this->hasOne(Login::className(), ['id' => 'sender_id']);\n }", "public function getUpdatedBy()\n\t{\n\t\treturn $this->updatedBy;\n\t}", "public function getMessAccount ()\n {\n return $this->mess_account;\n }", "public function payee()\n {\n return $this->getSubject()->user;\n }", "public function getMailUsername() {\n return $this->mailUsername;\n }", "public function get_orderer_mail()\n\t{\n\t\t$orderer = $this->prop(\"purchaser\");\n\t\tif(is_oid($orderer))\n\t\t{\n\t\t\t$o = obj($orderer);\n\t\t\treturn $o->get_mail();\n\t\t}\n\t\treturn null;\n\t}" ]
[ "0.72834724", "0.7045053", "0.69161606", "0.6875164", "0.68699133", "0.68699133", "0.68007773", "0.67879784", "0.67194515", "0.6696369", "0.6640238", "0.6638411", "0.6638411", "0.6638411", "0.6638411", "0.6638411", "0.6638411", "0.66111237", "0.6597769", "0.6587635", "0.65663755", "0.65354633", "0.6512516", "0.65112215", "0.64892375", "0.6482334", "0.6444792", "0.6377614", "0.6376276", "0.6373925", "0.63624704", "0.6360756", "0.633083", "0.6330573", "0.6322237", "0.6318396", "0.6307959", "0.6279504", "0.6278992", "0.62731755", "0.62699324", "0.62540674", "0.6238893", "0.6236248", "0.62331563", "0.6215556", "0.62148887", "0.6194375", "0.6194375", "0.6194375", "0.6194375", "0.6194375", "0.6194375", "0.6181856", "0.6167253", "0.6166066", "0.6164553", "0.61539257", "0.6132687", "0.6129491", "0.61174595", "0.6116907", "0.6107371", "0.6102508", "0.60952675", "0.6047516", "0.6047516", "0.6040478", "0.601561", "0.6001489", "0.5992687", "0.5984146", "0.5979233", "0.5979233", "0.5973271", "0.597255", "0.597255", "0.597255", "0.597255", "0.597255", "0.597255", "0.5952484", "0.59453547", "0.59437215", "0.59265345", "0.5912847", "0.59109527", "0.5897135", "0.5890621", "0.588401", "0.58836985", "0.58830583", "0.58727163", "0.5864723", "0.5847897", "0.5844228", "0.5836048", "0.5814609", "0.58097684", "0.57983863" ]
0.9066102
0
Sets value of 'Signer' property
public function setSigner(\Diadoc\Api\Proto\Invoicing\Signer $value=null) { return $this->set(self::SIGNER, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSigner($val)\n {\n $this->_propDict[\"signer\"] = $val;\n return $this;\n }", "function setSign( $value )\r\n {\r\n $this->Sign = $value;\r\n }", "function setSignature($signature)\n {\n $this->_signature = $signature;\n }", "function setAuthSignature($AuthSignature)\n {\n \t$this->_authSignature =$AuthSignature;\n }", "protected function setSignature( $data ){\n $this->signature = $data;\n }", "public function getSigner()\n {\n if (array_key_exists(\"signer\", $this->_propDict)) {\n return $this->_propDict[\"signer\"];\n } else {\n return null;\n }\n }", "public function setSignature($signature) {\n\t\t$this->signature = $signature;\n\t}", "public function getSigner()\n {\n return $this->get(self::SIGNER);\n }", "public function setFileToSign($path)\n {\n $this->setFileToSignFromPath($path);\n }", "public function setFileToSign($path)\n {\n $this->setFileToSignFromPath($path);\n }", "public function setSignature($var)\n {\n GPBUtil::checkString($var, False);\n $this->signature = $var;\n }", "public function setVerifiedPublisherId(?string $value): void {\n $this->getBackingStore()->set('verifiedPublisherId', $value);\n }", "public function setRecipient($recipient)\n {\n $this->recipient = (string) $recipient;\n }", "public function setSignatureKey(?string $signatureKey): void\n {\n $this->signatureKey = $signatureKey;\n }", "public function setSignatureFile($path)\n {\n $this->setSignatureFileFromPath($path);\n }", "public function setSignature($var)\n {\n GPBUtil::checkString($var, False);\n $this->signature = $var;\n\n return $this;\n }", "public function setSignature($var)\n {\n GPBUtil::checkString($var, False);\n $this->signature = $var;\n\n return $this;\n }", "public function setSignature($var)\n {\n GPBUtil::checkString($var, True);\n $this->signature = $var;\n\n return $this;\n }", "public function SetSignatureParameter() {\n $signature_text = $this->signature->build_signature($this->request, $this->consumer, $this->token);\n $this->request->set_parameter('signature', $signature_text);\n return $this;\n }", "public function sign()\n {\n }", "function setEnvelopeSender($envelopeSender) {\n\t\t$this->setData('envelopeSender', $envelopeSender);\n\t}", "public function setSignature()\n {\n \t$options = array('user_id' => $this->user_id,\n \t 'profile_key' => 'sig'\n \t );\n $result = DatabaseObject_UserProfile::getUserProfileData($this->_db, $options);\n \t\n \tif (!$result) {\n \t return \"\";\n \t}\n \t \n \treturn $this->signature = html_entity_decode($result);\n }", "public function setRecipientUserId(?string $value): void {\n $this->getBackingStore()->set('recipientUserId', $value);\n }", "public function setSignedSignature(string $signedSignature): self {\n\t\t$this->signedSignature = $signedSignature;\n\n\t\treturn $this;\n\t}", "public function DKIM_Sign($signHeader)\n {\n }", "public function setPublisher(?string $value): void {\n $this->getBackingStore()->set('publisher', $value);\n }", "public function setPublisher(?string $value): void {\n $this->getBackingStore()->set('publisher', $value);\n }", "public function setPublisher(?string $value): void {\n $this->getBackingStore()->set('publisher', $value);\n }", "public function setSignature($signature = null)\n {\n $this->_signature = $signature;\n return $this;\n }", "public function sign() {\n header('Content-type: application/json');\n $sign = Signer::sign(input(\"document_key\"), input(\"actions\"), input(\"docWidth\"), input(\"signing_key\"), true);\n if ($sign) {\n exit(json_encode(responder(\"success\", \"Alright!\", \"Document successfully saved.\",\"reload()\")));\n }else{\n exit(json_encode(responder(\"error\", \"Oops!\", \"Something went wrong, please try again.\")));\n }\n \n }", "public function setRecipient($value)\n {\n return $this->set('Recipient', $value);\n }", "public function setRecipient($value)\n {\n return $this->set('Recipient', $value);\n }", "public function sign() : self\n {\n\n if ($this->is_signed()){\n return $this;\n }\n\n $signature = base64_encode(hash_hmac($this->algo, $this->getData(), $this->getKey(), true));\n\n $this->setSignature( $signature );\n\n $this->signed = true;\n\n \treturn $this;\n\n }", "public function setSignature($body) {\n $this->addHeaders([\n 'X-Hub-Signature' => 'sha1=' . hash_hmac('sha1', $body, $this->secret, FALSE),\n ]);\n return $this;\n }", "public function setSignerRole(\\horstoeko\\ubl\\entities\\xades\\SignerRoleType $signerRole)\n {\n $this->signerRole = $signerRole;\n return $this;\n }", "public function setFileToSignFromPath($path)\n {\n if (!file_exists($path)) {\n throw new \\Exception(\"The provided file to be signed was not found\");\n }\n\n $this->fileToSignPath = $path;\n }", "public function setFileToSignFromPath($path)\n {\n if (!file_exists($path)) {\n throw new \\Exception(\"The provided file to be signed was not found\");\n }\n\n $this->fileToSignPath = $path;\n }", "public function setSigningKey($signingKey)\n\t\t\t{\n\t\t\t\t$this->signingKey = $signingKey;\n\n\t\t\t\treturn $this;\n\t\t\t}", "function setViewerID( $viewerID ) \n {\n $this->setValueByFieldName('viewer_id', $viewerID );\n }", "public function signature(string $secondPassphrase): self\n {\n $this->transaction->asset = [\n 'signature' => [\n 'publicKey' => PublicKey::fromPassphrase($secondPassphrase)->getHex(),\n ],\n ];\n\n return $this;\n }", "public function setSig(string $sig)\n {\n $this->sig = $sig;\n\n return $this;\n }", "function sign()\r\n {\r\n return $this->Sign;\r\n }", "public function set( $recipient ) {\n\t\tswitch ( gettype( $recipient ) ) {\n\t\t\tcase 'string':\n\t\t\t\t$this->parse( $recipient );\n\t\t\t\tbreak;\n\t\t\tcase 'object':\n\t\t\t\t$recipient = (array) $recipient; // Convert and continue to 'array' case\n\t\t\tcase 'array':\n\t\t\t\tif ( isset( $recipient['name'] ) ) {\n\t\t\t\t\t$this->name = $recipient['name'];\n\t\t\t\t}\n\t\t\t\tif ( isset( $recipient['email'] ) ) {\n\t\t\t\t\t$this->email = $recipient['email'];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function setSignature(array $signature)\n {\n $this->signature = $signature;\n return $this;\n }", "protected function sign(&$data)\n {\n $data['affiliateUserName'] = $this->username;\n $data['affiliatePassword'] = $this->password;\n }", "public function create(DataSigner $dataSigner);", "public function setSignCertificate($certificate, $privateKey = null, $signOptions = PKCS7_DETACHED, $extraCerts = null)\n {\n $this->signCertificate = 'file://'.str_replace('\\\\', '/', realpath($certificate));\n\n if (null !== $privateKey) {\n if (is_array($privateKey)) {\n $this->signPrivateKey = $privateKey;\n $this->signPrivateKey[0] = 'file://'.str_replace('\\\\', '/', realpath($privateKey[0]));\n } else {\n $this->signPrivateKey = 'file://'.str_replace('\\\\', '/', realpath($privateKey));\n }\n }\n\n $this->signOptions = $signOptions;\n if (null !== $extraCerts) {\n $this->extraCerts = str_replace('\\\\', '/', realpath($extraCerts));\n }\n\n return $this;\n }", "function setAuthor($author = \"\") \n\t{\n\t\t$this->author = $author;\n\t}", "public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '')\n {\n $this->sign_cert_file = $cert_filename;\n $this->sign_key_file = $key_filename;\n $this->sign_key_pass = $key_pass;\n $this->sign_extracerts_file = $extracerts_filename;\n }", "public function setSignatures($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Io\\Token\\Proto\\Common\\Security\\Signature::class);\n $this->signatures = $arr;\n\n return $this;\n }", "public function setVerificationKey($value) {\n\t\tif(!check($value)) throw new Exception(lang('error_27'));\n\t\tif(!Validator::Number($value)) throw new Exception(lang('error_27'));\n\t\tif(!Validator::UnsignedNumber($value)) throw new Exception(lang('error_27'));\n\t\t\n\t\t$this->_verificationKey = $value;\n\t}", "final public function setViewer(PhabricatorUser $viewer) {\n $this->viewer = $viewer;\n return $this;\n }", "public function setVerifiedPublisher($val)\n {\n $this->_propDict[\"verifiedPublisher\"] = $val;\n return $this;\n }", "public function setSignatureFileFromPath($path)\n {\n if (!file_exists($path)) {\n throw new \\Exception(\"The provided signature file was not found\");\n }\n $this->signatureFilePath = $path;\n }", "public function setRootCertificate(?AndroidWorkProfileTrustedRootCertificate $value): void {\n $this->getBackingStore()->set('rootCertificate', $value);\n }", "public function setSenderOrAuthors(?array $value): void {\n $this->getBackingStore()->set('senderOrAuthors', $value);\n }", "public function setSigningTime(\\DateTime $signingTime)\n {\n $this->signingTime = $signingTime;\n return $this;\n }", "public function setSignatureHeader($var)\n {\n GPBUtil::checkString($var, False);\n $this->signature_header = $var;\n\n return $this;\n }", "public function setDefaultsmssign()\n\t\t{\n\t\t\t$this->Checklogin();\n\t\t\t$signId=$this->input->post('signId');\n\t\t\n\t\t\tif(count($signId)>0)\n\t\t\t{\n\t\t\t\t$a=$this->setting_model->setDefaultsmssign($signId);\n\t\t\t\t\t\n\t\t\t\t$this->session->set_flashdata('success','Signature has been set to default successfully');\n\t\t\t\tsetAActivityLogs('Transaction_activity','AAsmssignature_default',\"Signature Default :-\".$signId);\n\t\t\t\techo true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Something Went Wrong.......!');\n\t\t\t\techo true;\n\t\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t}", "public function setSignature($signature)\n {\n if (!base64_decode($signature)) {\n throw new \\Exception(\"The provided signature was not valid\");\n }\n\n $this->signature = $signature;\n }", "public function setCert(?string $cert): void\n {\n }", "function setAuthor($a) {\n\t\t$this->set(\"author\",$a);\n\t}", "public function recipient($recipient)\n {\n return $this->setProperty('recipient', $recipient);\n }", "public function setDefaultRecipientAttribute($recipient)\n {\n $this->attributes['default_recipient_id'] = $recipient->id;\n $this->setRelation('defaultRecipient', $recipient);\n }", "protected function sign()\n {\n trigger_error(\"Not implemented\", E_ERROR);\n }", "public function setVerifier($verifier);", "public function verifySignature( $signer = null )\r\n\t{\r\n\t\t// $signedData = $this->getSignedData();\r\n\t\t$signers = \\lyquidity\\OCSP\\Ocsp::verifySigning( $this->_tlv, $signer, $signer );\r\n\t\treturn $signers;\r\n\t}", "public function setAuthor($author) {\n $this->_author = $author;\n }", "public function setSignKeyName(?string $signKeyName) : SystemBroadcast {\n\t\t\t$this->signKeyName = $signKeyName;\n\n\t\t\treturn $this;\n\t\t}", "public function setRecipient($recipient)\n {\n $this->recipient = $recipient;\n return $this;\n }", "public function setRecipient($recipient)\n {\n $this->recipient = $recipient;\n return $this;\n }", "public function setRecipient($recipient)\n {\n $this->recipient = $recipient;\n return $this;\n }", "public function setSignatureFileContent($contentRaw)\n {\n $this->setSignatureFileFromContentRaw($contentRaw);\n }", "public function setAuthor(string $author): void\n {\n $this->_author = $author;\n }", "public function setAuthor($author)\n {\n $this->author = $author;\n }", "public function setAuthor($author)\n {\n $this->author = $author;\n }", "protected function getLiipImagine_Cache_SignerService()\n {\n return $this->services['liip_imagine.cache.signer'] = new \\Liip\\ImagineBundle\\Imagine\\Cache\\Signer('0b1f529bfd1e2214cc16881ae978db041c8bee6f');\n }", "public function setAuthor(\\TYPO3\\Party\\Domain\\Model\\Person $author) {\n\t\t$this->author = $author;\n\t}", "public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '')\n {\n }", "abstract public function getConfiguration(Signer $signer);", "function getSignature()\n {\n return $this->_signature;\n }", "public function getSigningKey()\n\t\t\t{\n\t\t\t\treturn $this->signingKey;\n\t\t\t}", "public function __construct(Signature $signature)\n {\n parent::__construct();\n $this->setChild('signature', $signature);\n }", "public function __construct(Signature $signature)\n {\n parent::__construct();\n $this->setChild('signature', $signature);\n }", "public function setUserPurposeV2(?MailboxRecipientType $value): void {\n $this->getBackingStore()->set('userPurposeV2', $value);\n }", "Public Function setPublisherPassword($PublisherPassword) {\n\t\t$this->publisherPassword = $PublisherPassword;\n\t\n\t}", "public function setSignature(\\BankId\\Merchant\\Library\\Schemas\\ds\\Signature $signature)\n {\n $this->signature = $signature;\n return $this;\n }", "public function setSignature(\\BankId\\Merchant\\Library\\Schemas\\ds\\Signature $signature)\n {\n $this->signature = $signature;\n return $this;\n }", "public function setIssuer(?SslCertificateEntity $value): void {\n $this->getBackingStore()->set('issuer', $value);\n }", "public function setSender($sender) {\n $this->_sender = $sender;\n }", "protected function registerSign()\n {\n // Bind the default Entity Manager\n $this->app->singleton('hsign', function ($app) {\n return new SignService();\n });\n }", "public function setSignKey(?string $signKey): SystemBroadcast {\n\t\t\t$this->signKey = $signKey;\n\n\t\t\treturn $this;\n\t\t}", "public function testSetEmailModeSignature() {\n\n $obj = new Collaborateurs();\n\n $obj->setEmailModeSignature(10);\n $this->assertEquals(10, $obj->getEmailModeSignature());\n }", "function setRecipients($recipients) {\n\t\t$this->setData('recipients', $recipients);\n\t}", "public function setSender($sender ){\n $this->sender = $sender;\n }", "function setCertId($value)\n {\n $this->_props['CertId'] = $value;\n }", "public function setPhotoSender($photoSender ){\n $this->photoSender = $photoSender;\n }", "public static function setSender($val) \n { \n emailSettings::$sender = $val; \n }", "protected function setRequestSignature($request) {\n\t\t$fields = array(\n\t\t\t\t$this->getVersion(), // APIVERSION\n\t\t\t\t$this->tid, // TID\n\t\t\t\t$this->shopID, // SHOPID\n\t\t\t\t$this->shopUserRef, // SHOPUSERREF\n\t\t\t\t$this->amount, // AMOUNT\n\t\t\t\t$this->currencyCode, // CURRENCYCODE\n\t\t\t\t$this->pan, // PAN\n\t\t\t\t$this->payInstrToken, // PAYINSTRTOKEN\n\t\t\t\t$this->expireMonth, // EXPIREMONTH\n\t\t\t\t$this->expireYear, // EXPIREYEAR\n\t\t\t\t$this->termURL, // TERMURL\n\t\t\t\t$this->description, // DESCRIPTION\n\t\t\t\t$this->addInfo1, // UDF1\n\t\t\t\t$this->addInfo2, // UDF2\n\t\t\t\t$this->addInfo3, // UDF3\n\t\t\t\t$this->addInfo4, // UDF4\n\t\t\t\t$this->addInfo5); // UDF5\n\t\t$signature = $this->getSignature($this->kSig, // KSIGN\n\t\t\t\t$fields); \n\t\t$request = $this->replaceRequest($request, \"{signature}\", $signature);\n\t\treturn $request;\n\t}", "abstract public function setAuthor($author);" ]
[ "0.7965138", "0.6232488", "0.60674363", "0.6032574", "0.595182", "0.5818963", "0.57612944", "0.57223207", "0.56430495", "0.56430495", "0.5633575", "0.5572085", "0.5533534", "0.5529121", "0.5460281", "0.5455594", "0.5455594", "0.5454494", "0.5361629", "0.52838343", "0.52694994", "0.52262735", "0.5160856", "0.5139464", "0.51131314", "0.5101537", "0.5101537", "0.5101537", "0.5051224", "0.50509423", "0.50503814", "0.50503814", "0.50477034", "0.49969625", "0.49830282", "0.49747887", "0.49747887", "0.4962302", "0.4951138", "0.49486995", "0.49475116", "0.49243477", "0.4906836", "0.48810244", "0.48785567", "0.48688325", "0.48655397", "0.4855815", "0.48546073", "0.48403758", "0.4824265", "0.48023707", "0.4769324", "0.47532097", "0.4749045", "0.4724439", "0.4714591", "0.47069138", "0.46934387", "0.46887422", "0.46808073", "0.46801573", "0.46665064", "0.46646395", "0.46612525", "0.46576473", "0.46565798", "0.46374106", "0.463385", "0.46302766", "0.46302766", "0.46302766", "0.4627725", "0.4624824", "0.4617485", "0.4617485", "0.4614923", "0.46122783", "0.46049953", "0.4604391", "0.46027556", "0.46017948", "0.46014366", "0.46014366", "0.45986962", "0.45955572", "0.4594836", "0.4594836", "0.45935127", "0.45870912", "0.45805427", "0.45745268", "0.4570612", "0.45626917", "0.4559102", "0.45436403", "0.45371142", "0.45227185", "0.45170578", "0.45026064" ]
0.74499846
1
Returns value of 'Signer' property
public function getSigner() { return $this->get(self::SIGNER); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSigner()\n {\n if (array_key_exists(\"signer\", $this->_propDict)) {\n return $this->_propDict[\"signer\"];\n } else {\n return null;\n }\n }", "function getSignature()\n {\n return $this->_signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature() : string\n {\n return $this->signature;\n }", "public function getSignature() {\n\t\treturn $this->signature;\n\t}", "function sign()\r\n {\r\n return $this->Sign;\r\n }", "public function getSignature(): string\n {\n return $this->signature;\n }", "public function getSignature(): string\n {\n return $this->signature;\n }", "function getAuthSignature()\n {\n return $this->_authSignature;\n }", "public function getSigningKey()\n\t\t\t{\n\t\t\t\treturn $this->signingKey;\n\t\t\t}", "public function setSigner($val)\n {\n $this->_propDict[\"signer\"] = $val;\n return $this;\n }", "public function getSignaturePrenom() {\n return $this->signaturePrenom;\n }", "public function getRecipient() {\n\t\treturn $this -> data['recipient'];\n\t}", "public function getSignature() {\n $headers = $this->getHeaders();\n foreach ($headers as $key => $value) {\n if (strtolower($key) === 'x-hub-signature') {\n return $value;\n }\n }\n return '';\n }", "public function getTransactionSignature()\n {\n return $this->transactionSignature;\n }", "public function getSignatureHeader()\n {\n return $this->signature_header;\n }", "public function getSignKey(): ?string {\n\t\t\treturn $this->signKey;\n\t\t}", "public function getSignature(): string\n {\n return $this->getName();\n }", "public function getSignatureNom() {\n return $this->signatureNom;\n }", "public function getSignatureNom() {\n return $this->signatureNom;\n }", "public function getHashSignedById(): string;", "public function getSignatureVille() {\n return $this->signatureVille;\n }", "public function getSignatureVille() {\n return $this->signatureVille;\n }", "public function getSignedContent()\n {\n return $this->get(self::SIGNEDCONTENT);\n }", "public function getSignKeyName() : ?string {\n\t\t\treturn $this->signKeyName;\n\t\t}", "public function getSignature();", "protected function signKeyName() {\n\t\t\treturn $this->signKeyName ?: 'default';\n\t\t}", "public function getSig()\n {\n return $this->sig;\n }", "public function getSignedRequest()\r\r\n {\r\r\n return $this->signedRequest;\r\r\n }", "public function getSignatureKey(): ?string\n {\n return $this->signatureKey;\n }", "public function getSignedRequest()\n {\n return $this->signedRequest;\n }", "public function getSignatureQualite() {\n return $this->signatureQualite;\n }", "public function getSignatureQualite() {\n return $this->signatureQualite;\n }", "public function getSignPublicKey() : string;", "public function setSignature()\n {\n \t$options = array('user_id' => $this->user_id,\n \t 'profile_key' => 'sig'\n \t );\n $result = DatabaseObject_UserProfile::getUserProfileData($this->_db, $options);\n \t\n \tif (!$result) {\n \t return \"\";\n \t}\n \t \n \treturn $this->signature = html_entity_decode($result);\n }", "public function setSigner(\\Diadoc\\Api\\Proto\\Invoicing\\Signer $value=null)\n {\n return $this->set(self::SIGNER, $value);\n }", "private function getSignature(): string {\r\n return base64_encode(hash_hmac(\"sha1\", $this->buildSigningBase(), $this->buildSigningKey(), true));\r\n }", "public function getSignature()\n {\n $headers = $this->getHeaders();\n return isset($headers['X-Hub-Signature']) ? $headers['X-Hub-Signature'] : null;\n }", "public function getPublisherKey()\n {\n return $this->publisherKey;\n }", "public function getSignedForNewsletter()\n {\n return $this->signedForNewsletter;\n }", "public function getRecipient() {\n return $this->recipient;\n }", "public function getAwsSignature()\n {\n return $this->awsSignature;\n }", "public function getRecipient()\n {\n return $this->recipient;\n }", "public function getSignatureKeyId()\n {\n return $this->signature_key_id;\n }", "private function getValue($signature)\n {\n $items = explode(\",\", $signature);\n\n foreach ($items as $item) {\n $itemParts = explode(\"=\", $item, 2);\n if ($itemParts[0] == 'v') {\n return $itemParts[1];\n }\n }\n\n throw new SignatureVerificationException(\n \"Unable to extract value from signature\"\n );\n }", "public function getSigns();", "public function getVerificationKey()\n {\n return $this->verification_key;\n }", "public static function getSignature()\n\t{\n\t\treturn MHTTPD::$info['signature'];\n\t}", "public function getLedgerInfoWithSigs()\n {\n return $this->ledger_info_with_sigs;\n }", "public function getUserSignature(): ?string;", "public function rawValue()\n {\n return $this->contributor_service->value;\n }", "public function getDigestMethod() {\n $signer = $this->header->getSigner();\n if ($signer !== false) {\n return (string) $signer;\n }\n return false;\n }", "public function getHeaderSignature()\r\n\t{\r\n\t\treturn $this->headers[SONIC_HEADER__SIGNATURE];\r\n\t}", "public function __toString(): string\n\t{\n\t\treturn $this->getPublicKeyPem();\n\t}", "public function getLicenseReferenceValue(): string\n {\n return $this->value;\n }", "function getStudentEmail() {\n\t\treturn $this->getData('studentEmail');\n\t}", "public function getSignatureDate() {\n return $this->signatureDate;\n }", "public function getSignatureDate() {\n return $this->signatureDate;\n }", "function getRecipientString() {\n\t\treturn $this->getAddressArrayString($this->getRecipients());\n\t}", "public function getSignatureQualiteCode() {\n return $this->signatureQualiteCode;\n }", "public function getPrivateKey() {\n return @$this->attributes['private_key'];\n }", "public function getVerify()\n {\n return $this->data['fields']['verify'];\n }", "public function getVolEmail() {\n\t\treturn ($this->volEmail);\n\t}", "public function getRawSignedRequestFromGet()\r\r\n {\r\r\n if (isset($_GET['signed_request'])) {\r\r\n return $_GET['signed_request'];\r\r\n }\r\r\n\r\r\n return null;\r\r\n }", "public function getDistributionKey()\n {\n return $this->distributionKey;\n }", "public function getBadgeValue()\n {\n return $this->auth->loggedIn() ? $this->auth->id() : null;\n }", "private function getDigestValue(DOMDocument $xml): string\n {\n $xpath = new DOMXPath($xml);\n $xpath->registerNamespace('xmlns', 'http://www.w3.org/2000/09/xmldsig#');\n\n // Find the DigestValue node\n $signatureNodes = $xpath->query('//xmlns:Signature/xmlns:SignedInfo/xmlns:Reference/xmlns:DigestValue');\n\n // Throw an exception if no signature was found.\n if (!$signatureNodes || $signatureNodes->length < 1) {\n throw new XmlSignatureValidatorException('Verification failed: No Signature was found in the document.');\n }\n\n // We only support one signature for the entire XML document.\n // Throw an exception if more than one signature was found.\n if ($signatureNodes->length > 1) {\n throw new XmlSignatureValidatorException(\n 'Verification failed: More that one signature was found for the document.'\n );\n }\n\n $domNode = $signatureNodes->item(0);\n if (!$domNode) {\n throw new XmlSignatureValidatorException(\n 'Verification failed: No Signature item was found in the document.'\n );\n }\n\n $result = base64_decode($domNode->nodeValue, true);\n\n if ($result === false) {\n throw new XmlSignatureValidatorException('Verification failed: Invalid base64 data.');\n }\n\n return $result;\n }", "public function getPubkey()\n {\n return $this->pubkey;\n }", "public function getSignature() {\n\t\treturn md5(get_class($this));\n\t}", "public function payee()\n {\n return $this->getSubject()->user;\n }", "public function getProviseur()\n {\n return $this->proviseur;\n }", "public function get_issuer() {\n\t\treturn $this->metadata['issuer']; \n\t}", "public function getSignatureHeader(): SimpleDataStore {\n\t\treturn $this->signatureHeader;\n\t}", "public function verifySignature( $signer = null )\r\n\t{\r\n\t\t// $signedData = $this->getSignedData();\r\n\t\t$signers = \\lyquidity\\OCSP\\Ocsp::verifySigning( $this->_tlv, $signer, $signer );\r\n\t\treturn $signers;\r\n\t}", "public function getPayerRefInsuranceId() {\n return $this->_payerRefInsuranceId;\n }", "public function getDigest() : string\n {\n return $this->digest;\n }", "public function certificate() {\n return $this->info['certinfo'];\n }", "public function getHash() {\n\t\treturn sha1( serialize( $this->property ) );\n\t}", "public function getPublisher() {\n return $this->publisher;\n }", "public function getSignatureParameters()\n {\n return $this->signatureParameters;\n }", "public function __toString(): string\n {\n return $this->toPEM()->string();\n }", "public function getSignatures()\n {\n return $this->signatures;\n }", "public function getSignatures()\n {\n return $this->signatures;\n }", "public function getKey()\n {\n return $this->getProperty()->getKey();\n }", "public static function getSignature()\n {\n return ':originalData';\n }", "public function getPayer()\r\n {\r\n return $this->payer;\r\n }", "public function getAuthIdentifier(){\n\t\treturn $this->getKey();\n\t}", "public function getSignatureType(): string\n {\n return $this->type->getSignatureType();\n }", "public function getEmailHash()\n {\n return $this->getValue('nb_icontact_prospect_email_hash');\n }", "public function getVerificationCode()\n {\n return($this->verificationCode);\n }", "public function get_pubkey() {\n return self::extract_key($this->get_pubkey_file());\n }", "public function getPayerInfo()\n {\n return $this->payer_info;\n }", "public function getRecipientId() {\n return $this->recipientId;\n }", "public function getPayerEmail() {\n\t\treturn $this->_getField(self::$PAYER_EMAIL);\n\t}", "public function getAuthor() {\n\t\treturn $this->author;\n\t}", "function getCertId()\n {\n return $this->_props['CertId'];\n }" ]
[ "0.8192158", "0.67831016", "0.6732796", "0.6732796", "0.6732796", "0.6732796", "0.6732796", "0.6697558", "0.6686506", "0.663176", "0.66071093", "0.66071093", "0.6485891", "0.6478548", "0.6394605", "0.6346488", "0.6139838", "0.6132627", "0.6096516", "0.6045992", "0.6024215", "0.60240453", "0.60215235", "0.60215235", "0.5986573", "0.59332615", "0.59332615", "0.5931949", "0.5914382", "0.5904607", "0.58969283", "0.58888966", "0.5826453", "0.57656664", "0.57561564", "0.5728843", "0.5728843", "0.57284427", "0.5713237", "0.5708159", "0.56967854", "0.5689299", "0.5684719", "0.56820816", "0.5675172", "0.5675018", "0.5662994", "0.56490016", "0.5601331", "0.5592556", "0.5573555", "0.5562122", "0.5549985", "0.55411476", "0.55407023", "0.55376047", "0.55079967", "0.54970247", "0.5493667", "0.546438", "0.5453174", "0.5453174", "0.54306376", "0.54223084", "0.5412388", "0.54029965", "0.54023874", "0.53925014", "0.53790677", "0.5375957", "0.5363911", "0.5356911", "0.534767", "0.53415895", "0.5331846", "0.5313303", "0.53088456", "0.5307948", "0.52916217", "0.528555", "0.52855223", "0.52812797", "0.5281179", "0.52620363", "0.5241779", "0.52403045", "0.52403045", "0.5240109", "0.5239727", "0.5230254", "0.52265704", "0.52183384", "0.5214045", "0.5198447", "0.5197337", "0.5192585", "0.5189273", "0.51811016", "0.5175771", "0.51744074" ]
0.8148116
1
Sets value of 'AdditionalInfo' property
public function setAdditionalInfo($value) { return $this->set(self::ADDITIONALINFO, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAdditionalInformation(?string $value): void {\n $this->getBackingStore()->set('additionalInformation', $value);\n }", "public function setExtraInfo(array $info)\n {\n $this->extraInfo = $info;\n }", "public function setAdditionalInformation($val)\n {\n $this->_propDict[\"additionalInformation\"] = $val;\n return $this;\n }", "function setInfo($info) {\n\t\t\t$this->updateResponse('info', $info);\n\t\t}", "public function setInfo($info);", "public function setInfoAttribute($info)\n {\n $this->attributes['info'] = serialize($info);\n }", "public function setAdditionalInformation($additionalInformation = null)\n {\n // validation for constraint: string\n if (!is_null($additionalInformation) && !is_string($additionalInformation)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($additionalInformation)), __LINE__);\n }\n if (is_null($additionalInformation) || (is_array($additionalInformation) && empty($additionalInformation))) {\n unset($this->AdditionalInformation);\n } else {\n $this->AdditionalInformation = $additionalInformation;\n }\n return $this;\n }", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function setInfo( $info )\n {\n $this->data['info'] = $info;\n }", "public function appendAdditionalInfos(\\Diadoc\\Api\\Proto\\Invoicing\\AdditionalInfo $value)\n {\n return $this->append(self::ADDITIONALINFOS, $value);\n }", "public function addAdditionalInfos(\\AgentSIB\\Diadoc\\Api\\Proto\\Invoicing\\AdditionalInfo $value)\n {\n if ($this->AdditionalInfos === null) {\n $this->AdditionalInfos = new \\Protobuf\\MessageCollection();\n }\n\n $this->AdditionalInfos->add($value);\n }", "public function extraInfo();", "public function setInfo($info, $encoding = 'UTF-8') {}", "public function getAdditionalInformation()\n {\n return $this->additionalInformation;\n }", "public function setAdditionalInformationUrl($val)\n {\n $this->_propDict[\"additionalInformationUrl\"] = $val;\n return $this;\n }", "private function _setAdditionalRequestData(Array $additional_infos){\n \n // setting reference\n $this->_payment_request->setReference($additional_infos['id_order']);\n \n // setting redirect url\n $redirect_url = $this->_payment_request->getRedirectURL();\n if (Tools::isEmpty($redirect_url))\n $this->_payment_request->setRedirectURL($this->_generateRedirectUrl($additional_infos));\n }", "public function add_info($info)\r\n { \r\n }", "function setAdditionalDetails($value = true, $function = '') {\n if(!empty($function)) $this->additionalDetailsFunction = $function;\n $this->_additionalDetails = $value;\n }", "public function setInfoFlags($infoFlags) { $this->_infoFlags = $infoFlags; }", "public function getAdditionalInfo()\n {\n $value = $this->get(self::ADDITIONALINFO);\n return $value === null ? (string)$value : $value;\n }", "public function setAdditionalInformation($additionalInformation)\n {\n $this->additionalInformation = $additionalInformation;\n return $this;\n }", "public function setAdditionalInformationMap(array $additionalInformationMap)\n {\n $this->additionalInformationMap = $additionalInformationMap;\n return $this;\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "public function setExtra($extra)\r\n {\r\n $this->extra=$extra;\r\n }", "public function getAdditionalInformation()\n {\n if (array_key_exists(\"additionalInformation\", $this->_propDict)) {\n return $this->_propDict[\"additionalInformation\"];\n } else {\n return null;\n }\n }", "public function getAdditionalInfo(): ?string\n {\n return $this->additionalInfo;\n }", "public function setExtra($extra)\n\t{\n\t\t$this->_extra = (array)$extra;\n\t}", "function fix_extra_info(& $extra_info) {\n\tif ( ! empty($extra_info) && is_string($extra_info) && ('a' === $extra_info[0])) {\n\t\t$extra_info = unserialize($extra_info);\n\t\t$extra_info = json_encode($extra_info);\n\t}\n}", "public function setAdditionalDataAttribute($key, $value)\n {\n $this->additionalData[$key] = $value;\n }", "public function setExtra($extra);", "public function getAdditionalInformation()\n {\n return isset($this->AdditionalInformation) ? $this->AdditionalInformation : null;\n }", "public function hasAdditionalInfo()\n {\n return $this->AdditionalInfo !== null;\n }", "abstract public function &setRawAdditionalProperties($value);", "public function setExtra($extra_name, $extra_value = null)\n {\n\n }", "public function getAdditionalInformationUrl()\n {\n if (array_key_exists(\"additionalInformationUrl\", $this->_propDict)) {\n return $this->_propDict[\"additionalInformationUrl\"];\n } else {\n return null;\n }\n }", "public function aim_set_info($info)\r\n\t{\r\n\t\t$this->core->aim_send_raw('toc_set_info ' . $this->core->aim_encode($info));\r\n\t}", "private function setAdditionalFields($additionalFields)\n {\n $this->additionalFields = $additionalFields;\n }", "public function get_additional_info()\n {\n return array();\n }", "public function setElementInfo($info);", "function appendInfo($info) {\n\t\t\t$this->responseVar['info'] .= $info.\"\\n<br>\\n\";\n\t\t}", "public function getExtraInfo()\n {\n return $this->extra;\n }", "public function dataSetter($infoArray) {\n\t\tforeach ($infoArray as $key => $value) {\n\t\t\t$this->dataInfo[$key] = $value;\n\t\t}\n\t}", "public function getStrAdditionalInfo() {\n return \"\";\n }", "function print_additional_settings_section_info() {\n }", "protected function storeExtraInfo()\n\t{\n\t\t$input = $this->connection->getExtraInfo();\n\t\t\n\t\tif (!isset($input)) {\n\t\t\t$this->extrainfo[] = null;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!is_string($input)) {\n\t\t\ttrigger_error(\"Metadata in other forms that a string is not yet supported\", E_USER_NOTICE);\n\t\t\treturn;\t\t\t\n\t\t}\n\t\t\n\t\t$info[] = (object)array('type'=>'_raw_', 'value'=>$input);\n\t\t\n\t\t$matches = null;\n\t\tif (preg_match_all('%<extraInfo>.*?</extraInfo>%is', $input, $matches, PREG_SET_ORDER)) {\n\t\t\tforeach ($matches[0] as $xml) {\n\t\t\t\t$sxml = new SimpleXMLElement($xml);\n\t\t\t\t$info[] = (object)array('type'=>(string)$sxml->type, 'value'=>(string)$sxml->value->string);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->extrainfo[] = $info;\n\t}", "function commerce_store_ui_entity_property_info_alter(&$info) {\n $info['commerce_store']['properties']['edit_url'] = array(\n 'label' => t('Edit URL'),\n 'description' => t(\"The URL of the store's edit page.\"),\n 'getter callback' => 'commerce_store_get_properties',\n 'type' => 'uri',\n );\n}", "public function setExtra($extra)\n {\n $resultData = $this->hydrateIfJsonToArray($extra);\n if (!empty($resultData)) {\n $this->extra = $resultData;\n }\n else {\n $this->extra = [];\n }\n }", "public function addExtra($extra_name, $extra_value)\n {\n\n }", "public function getAdditionalData()\n {\n return $this->additionalData;\n }", "private function setAdditionalOptions(): void\n\t{\n\t\tforeach ( $this->configuration->getAdditionalOptions() as $additionalOptionIdentifier => $additionalOptionValue )\n\t\t{\n\t\t\tif ( true === in_array( $additionalOptionIdentifier, static::EXCLUDED_ADDITIONAL_OPTIONS, true ) )\n\t\t\t{\n\t\t\t\tldap_set_option( $this->ldapHandle, $additionalOptionIdentifier, $additionalOptionValue );\n\t\t\t}\n\t\t}\n\t}", "public function setInfo()\n {\n if (array_key_exists(APIConstants::INFO, $this->getResponseJSON())) {\n $this->info = new ResponseInfo($this->getResponseJSON()[APIConstants::INFO]);\n }\n }", "public function setMetaInfo($data = array()) {\n $this->metaInfo = array_merge($this->metaInfo, $data);\n }", "public function setAdditionalData(array $data)\n {\n $this->data = $data;\n return $this;\n }", "protected function setInfo($info, $method, $line) {\n global $logger;\n $logger->addInfo(sprintf('[%s - %s] %s', $method, $line, $info));\n }", "public function setCreditInfo() {\n\t\t$this->creditInfo = $this->photo['title'] . \"&nbsp;by&nbsp;\" . $this->userName;\n\t}", "public function setExtraTypeInfo($extraTypeInfo)\n {\n $this->extraTypeInfo = $extraTypeInfo;\n return $this;\n }", "public function setActivationInfo(&$var)\n {\n GPBUtil::checkMessage($var, \\Accounts\\V1\\Blame::class);\n $this->activation_info = $var;\n }", "public function setExtraArray($extraArray = array()) {\n\t\t$this->extraArray = $extraArray;\n\t}", "private function convertAdditionalInformation()\n {\n return $this;\n }", "function add_custom_info_menu_item(){\n\t\n\tadd_options_page(\"Virksomhedsinformation\", \"Virksomhedsinformation\", \"manage_options\", \"contact-info\", \"theme_settings_page\");\n\t\n}", "public function getExtraInformation() {\n return $this->extra;\n }", "function hook_openid_connect_userinfo_alter(array &$userinfo, array $context) {\n // Add some custom information.\n if ($context['plugin_id'] == 'generic') {\n $userinfo['my_info'] = [\n 'full_name' => $userinfo['first_name'] . ' ' . $userinfo['last_name'],\n 'remarks' => 'Information provided by generic client plugin.',\n ];\n }\n}", "public function setInfo($info)\n\t{\n\t\t$this->info = $info;\n\n\t\treturn $this;\n\t}", "public function addEnvironmentInformation(CoreSystemInformationToolbarItem $systemInformation)\n {\n $systemInformation->addSystemInformation(...$this->getGitRevision());\n }", "public function setInfo($val)\n {\n $this->_propDict[\"info\"] = $val;\n return $this;\n }", "public function add_information() \r\n {}", "public function add_information() \r\n {}" ]
[ "0.69864225", "0.6979639", "0.68375194", "0.6357125", "0.63409376", "0.6339925", "0.6321244", "0.62204796", "0.62204796", "0.6220195", "0.6220195", "0.6220195", "0.62189466", "0.62189466", "0.62189466", "0.62189466", "0.6200131", "0.61768895", "0.61123496", "0.60899776", "0.5973327", "0.59356153", "0.5924426", "0.5921434", "0.5903429", "0.58876306", "0.58667874", "0.5856272", "0.58303195", "0.58093256", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.5796046", "0.57864696", "0.5739442", "0.5738254", "0.5700881", "0.56951386", "0.56846166", "0.5683609", "0.56824017", "0.56493926", "0.5599716", "0.5534081", "0.55162543", "0.5514128", "0.53912044", "0.5387495", "0.5331337", "0.5322197", "0.53064597", "0.5305716", "0.52997476", "0.52906555", "0.52640676", "0.5262849", "0.52604365", "0.5255545", "0.5235913", "0.52340466", "0.5233044", "0.5233041", "0.521006", "0.5207538", "0.5205642", "0.51780564", "0.51722676", "0.5165194", "0.51643103", "0.5117984", "0.5110593", "0.51047283", "0.50979906", "0.5095073", "0.50820243", "0.5079993", "0.5079993" ]
0.7534656
0
Returns value of 'AdditionalInfo' property
public function getAdditionalInfo() { $value = $this->get(self::ADDITIONALINFO); return $value === null ? (string)$value : $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAdditionalInformation()\n {\n return $this->additionalInformation;\n }", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation()\n {\n if (array_key_exists(\"additionalInformation\", $this->_propDict)) {\n return $this->_propDict[\"additionalInformation\"];\n } else {\n return null;\n }\n }", "public function getAdditionalInformation()\n {\n return isset($this->AdditionalInformation) ? $this->AdditionalInformation : null;\n }", "public function getAdditionalInfo(): ?string\n {\n return $this->additionalInfo;\n }", "public function getEventAdditionalInfo() {\n\t\treturn ($this->eventAdditionalInfo);\n\t}", "public function getExtraInfo()\n {\n return $this->extra;\n }", "public function getExtraInformation() {\n return $this->extra;\n }", "public function getAdditionalData()\n {\n return $this->additionalData;\n }", "public function getAdditional()\n {\n return $this->additional;\n }", "public function getAdditionalData() {\n\t\treturn $this->additional_data;\n\t}", "public function getAdditionalInformationUrl()\n {\n if (array_key_exists(\"additionalInformationUrl\", $this->_propDict)) {\n return $this->_propDict[\"additionalInformationUrl\"];\n } else {\n return null;\n }\n }", "public function get_additional_info()\n {\n return array();\n }", "public function getAdditionalInformation() {\n return $this->errorLog;\n }", "public function getCustomInfo() {\n\t\treturn $this->custom_info;\n\t}", "public function getAdditionalData() {\n return $this->item->getAdditionalData();\n }", "public function extraInfo();", "public function getAdditionalInformation()\n {\n return 'Site: ' . ($this->site != null ? $this->site->getLabel() : '');\n }", "public function getStrAdditionalInfo() {\n return \"\";\n }", "public function getAdditionalData()\n {\n return $this->data;\n }", "public function getAdditionalInformation()\n {\n return [\n 'isReturnable' => true,\n 'isRepairable' => true,\n 'isTransportable' => true,\n 'isSerializable' => true,\n 'isOnSiteInterventionPossible' => true,\n 'isCumbersome' => true,\n ];\n }", "public function getAdditional();", "public function getInformation()\n {\n return $this->values[\"info\"];\n }", "public function getAdditionalInformation()\n {\n return ConfigurationUtility::getSelectedConfigsInfo($this->getConfigs());\n }", "public function getExtra()\n {\n return $this->extra;\n }", "public function getExtra()\n {\n return $this->extra;\n }", "public function getExtra()\n {\n return $this->getParameter('extra');\n }", "public function getAdditionalInformation(): ?string {\n $val = $this->getBackingStore()->get('additionalInformation');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'additionalInformation'\");\n }", "public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}", "public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}", "public function getInfo ()\n {\n return $this->info;\n }", "public function getInfo()\r\n {\r\n return $this->info;\r\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function hasAdditionalInfo()\n {\n return $this->AdditionalInfo !== null;\n }", "public function getInfo()\n {\n return self::jsonDecode($this->fields['info']->getValue());\n }", "public function getExtra()\n {\n return json_decode($this->extra);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function setAdditionalInfo($value)\n {\n return $this->set(self::ADDITIONALINFO, $value);\n }", "public function info()\n {\n return $this->info;\n }", "public function info()\n {\n return $this->info;\n }", "public function getInformation()\n {\n return $this->information;\n }", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getGeneralInformation() {\n\t\tif (!$this->hasDetails) {\n\t\t\t$this->injectDetails();\n\t\t}\n\t\treturn $this->generalInformation;\n\t}", "public function getAdditionalInfosCount()\n {\n return $this->count(self::ADDITIONALINFOS);\n }", "function getAdditionalAttributes() ;", "public function getExtraData();", "public function info()\n {\n return $this->type('info');\n }", "public function getExtra();", "public function getExtraAttribute()\n {\n return $this->config['extra'];\n }", "abstract public function getRawAdditionalProperties();", "public function getInfo()\n {\n return $this->addAction(Flag::getInfo());\n }", "public function getDetails(): string\n {\n return $this->details;\n }", "public function getAdditionalFields()\n {\n return $this->additionalFields;\n }", "public function getAdditionalFields()\n {\n return $this->additionalFields;\n }", "public function getStrAdditionalInfo() {\n $strNameInternal = $this->getStrPageI();\n $strNameExternal = $this->getStrPageE();\n $strNameFolder = \"\";\n if(validateSystemid($this->getStrFolderI())) {\n $objFolder = new class_module_pages_folder($this->getStrFolderI());\n $strNameFolder = $objFolder->getStrName();\n }\n\n return $strNameInternal.$strNameExternal.$strNameFolder;\n }", "public function getExtraJson()\n {\n return $this->extra;\n }", "public function getAdditionalHeaderData() {}", "public function getAdditionalFields()\n {\n return $this->additional_fields;\n }", "public function getAdditionalInformation()\n {\n $compName = '';\n\n if ($compUid = $this->getCompetition()) {\n $competition = tx_rnbase::makeInstance('tx_cfcleague_models_Competition', $compUid);\n $compName = $competition->isValid() ? $competition->getName() : '[invalid!]';\n }\n\n return sprintf('Aktualisierung der Spieler für Wettbewerb >%s<', $compName);\n // return sprintf( $GLOBALS['LANG']->sL('LLL:EXT:mksearch/locallang_db.xml:scheduler_indexTask_taskinfo'),\n // $this->getTargetPath(), $this->getItemsInQueue());\n }", "function getDetails() {\n\t\treturn $this->data_array['details'];\n\t}", "function info() {\n\t \treturn $this->description;\n\t }", "public function getInfo()\n {\n return $this->lastInfo;\n }", "public function getDetails()\n {\n if (array_key_exists(\"details\", $this->_propDict)) {\n return $this->_propDict[\"details\"];\n } else {\n return null;\n }\n }", "public function get_info()\n {\n return $this->_request('getinfo');\n }", "public function getPropertyDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Model\\Attributes' );\n }", "public function getDetails()\n\t{\n\t\treturn $this->details;\n\t}", "protected function additionalData()\n {\n return [\n 'options' => $this->options\n ];\n }", "function getInfo()\n\t{\n\t\treturn array_merge($this->getDeveloperInfo(), $this->getContact()->getInfo());\n\t}", "public function getDetails()\n {\n return $this->details;\n }", "public function getDetails()\n {\n return $this->details;\n }", "public function getDetails()\n {\n return $this->details;\n }", "public function getDetails() {\n\t\treturn $this->details;\n\t}", "public function getAdditionalAddAttributes(): ?array;", "function getExtraContent() {\n\t\treturn get_language_string($this->get(\"extracontent\"));\n\t}", "public function getDetails()\r\n {\r\n return $this->details;\r\n }" ]
[ "0.84661686", "0.8365695", "0.8365695", "0.8364446", "0.8364446", "0.8364446", "0.8364343", "0.8364343", "0.8364343", "0.8364343", "0.83239156", "0.8258973", "0.8108962", "0.7840693", "0.76823896", "0.76316845", "0.7611364", "0.75756484", "0.75314486", "0.7492032", "0.74754703", "0.7380967", "0.7334439", "0.7323866", "0.7310907", "0.7211695", "0.7169037", "0.7144622", "0.71152514", "0.704019", "0.7010071", "0.6970808", "0.6849051", "0.6849051", "0.6832989", "0.6784221", "0.6753365", "0.6753365", "0.67294925", "0.6715696", "0.6690825", "0.6690825", "0.6690825", "0.6690825", "0.6690825", "0.6690825", "0.6690825", "0.66366947", "0.6628039", "0.6615505", "0.6589675", "0.6589675", "0.6589675", "0.6589675", "0.6589675", "0.65885943", "0.65882385", "0.65882385", "0.65267205", "0.65040267", "0.65040267", "0.65040267", "0.65040267", "0.65029675", "0.65009826", "0.65009826", "0.6500636", "0.6498211", "0.6484193", "0.6399632", "0.63823897", "0.63425124", "0.63364714", "0.63089246", "0.62763476", "0.62668985", "0.6265396", "0.62527835", "0.62527835", "0.6219338", "0.6214186", "0.6198403", "0.6197857", "0.61835575", "0.6172771", "0.61626625", "0.6131596", "0.61203545", "0.6101042", "0.6083639", "0.6071252", "0.6052624", "0.604674", "0.6046494", "0.6046494", "0.6046494", "0.6044634", "0.60278374", "0.6012501", "0.60055053" ]
0.88274384
0
Call the CI_Model constructor
public function __construct() { parent::__construct(); $this->cart_items = $this->session->userdata('cart_items'); if(!$this->cart_items) { $this->session->set_userdata('cart_items',NULL); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }", "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }", "function __construct() {\r\n parent::Model();\r\n }", "public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('Model');\n\t}", "public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('Model');\n\t}", "function __construct()\r\n {\r\n parent::Model();\r\n }", "function __construct()\n {\n // 呼叫模型(Model)的建構函數\n parent::__construct();\n \n }", "function __construct() {\n // Call the Model constructor \n parent::__construct();\n }", "function __construct () {\n\t\t$this->_model = new Model();\n\t}", "function __construct()\n {\n parent::Model();\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construc()\r\n\t{\r\n\t\tparent::Model();\r\n\t}", "function __construct(){\n\t\tparent::__construct();\n\t\t\t$this->set_model();\n\t}", "public function __construct()\n {\n $this ->model = $this ->makeModel($this ->model());\n }", "function __construct() {\n parent::__construct();\n $this->load->model('Callcenter_model');\n }", "public function __construct()\n {\n parent::Model();\n\n }", "public function __construct() {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n parent::__construct();\n // $this->load->model('');\n }", "function __construct()\n\t\t{\n\t\t\t// Call the Model constructor\n\t\t\tparent::__construct();\n\t\t $this->load->database();\t\n\t\t}", "public function __construct()\n\t{\n\t\tif (!$this->model_name)\n\t\t{\n\t\t\t$this->model_name = str_replace('Model_', '', get_class($this));\n\t\t}\n\t\t$this->model_name = strtolower($this->model_name);\n\t\t\n\t\t$this->_initialize_db();\n\t}", "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->model('data');\n\t}", "public function __construct()\n\t{\n\t\t//MVC: makes CodeIgniter style $this->load->model() available to my controllers\n\t\t$this->load = new modelLoader($this);\n\t}", "public function __construct(){\n parent::__construct();\n $this->load->model(\"Cuartel_model\");\n\n\t}", "public function __construct() {\n parent::__construct();\n $this->load->model('data_model');\n }", "public function __construct() {\n parent::__construct();\n $this->load->model('Thematic_model');\n }", "public function __construct()\n {\n \t parent::__construct();\n \t $this->load->model('Modelo');\n }", "function __construct()\n {\n parent::__construct();\n /* LOAD MODEL */\n $this->load->model('report_abuse_model');\n }", "private function __construct($model)\r\n {\r\n\r\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('LeBabeModel');\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('LeBabeModel');\n\t}", "public function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t\t\r\n\t\t$this->load->model(array('user_model','program_model'));\r\n\t\t\r\n\t}", "function __construct()\n {\n parent::__construct();\n\n\t\t$this->load->model('floatplan_model');\n\t\t$this->load->model('user_model');\n }", "function __construct()\n {\n parent::__construct(); \n // load model\n $this->load->model(array('Mcourse'));\n }", "public function __construct()\n\t\t{\n\t\t\t// $this->_database_connection = 'special_connection';\n\n\t\t\t// you can disable the use of timestamps. This way, MY_Model won't try to set a created_at and updated_at value on create methods. Also, if you pass it an array as calue, it tells MY_Model, that the first element is a created_at field type, the second element is a updated_at field type (and the third element is a deleted_at field type if $this->soft_deletes is set to TRUE)\n\t\t\t$this->timestamps = FALSE;\n\n\t\t\t// you can enable (TRUE) or disable (FALSE) the \"soft delete\" on records. Default is FALSE, which means that when you delete a row, that one is gone forever\n\t $this->soft_deletes = FALSE;\n\n\t // you can set how the model returns you the result: as 'array' or as 'object'. the default value is 'object'\n\t\t\t$this->return_as = 'object' | 'array';\n\n\n\t\t\t// you can set relationships between tables\n\t\t\t// $this->has_one['room_list'] = array('room_list','rl_id','rl_id');\n\t\t\t// $this->has_one['Sched_day'] = array('sched_day','sd_id','sd_id');\n\t\t\t// $this->has_one['subject'] = array('subjects','subj_id','subj_id');\n\n\t\t\n\t\t\t// you can also use caching. If you want to use the set_cache('...') method, but you want to change the way the caching is made you can use the following properties:\n\n\t\t\t$this->cache_driver = 'file';\n\t\t\t//By default, MY_Model uses the files (CodeIgniter's file driver) to cache result. If you want to change the way it stores the cache, you can change the $cache_driver property to whatever CodeIgniter cache driver you want to use.\n\n\t\t\t$this->cache_prefix = 'currv';\n\t\t\t//With $cache_prefix, you can prefix the name of the caches. By default any cache made by MY_Model starts with 'mm' + _ + \"name chosen for cache\"\n\n\t\t\tparent::__construct();\n\t\t}", "public function __construct()\n {\n $this->model = new BaseModel;\n }", "public function __construct() {\r\n parent::__construct();\r\n $this->load->model(array(\r\n 'app_model'\r\n ));\r\n }", "public function __construct($model) \n {\n parent::__construct($model);\n }", "public function __construct()\n\t{\n parent::__construct();\n\t\t$this->load->library('form_validation');\n\t\t$this->load->model('mdata');\n }", "function __construct() {\n parent::__construct();\n $this->load->model('Demo');\n }", "public function __construct() {\n\t\tparent::__construct();\n\n\t\t$this->load->model('example_model');\n\t}", "function __construct()\n {\n parent::__construct();\n $this->load->Model('PlanificacionModel');\n }", "public function __construct()\n {\n parent::__construct();\n\n\t\t$this->load->model(\"options_model\");\n\t\t$this->load->model(\"selections_model\");\n\t\t$this->load->model(\"info_model\");\n\t\t$this->load->model(\"dealer_model\");\n\t\t$this->load->library(\"encrypt\");\n\t\t$this->load->model(\"promocode_model\");\n\t}", "public function __construct() {\n parent::__construct();\n $this->load->model(array('dt_diag_klsf_model','dt_obat_model','dt_pasien_model','dt_pemeriksaan_model','dt_proses_model','dt_thpan_model'));\n }", "function __construct()\n {\n // Call the Model constructor\n parent::Model();\n $this->load->database('default'); \n }", "function __construct()\n {\n // Call the Model constructor\n parent::Model();\n $this->load->database('default'); \n }", "function __construct()\n {\n // Call the Model constructor\n parent::Model();\n $this->load->database('default'); \n }", "public function __construct()\n {\n parent::__construct();\n //自动加载相对应的数据模型\n if ($this->auto_load_model) {\n $model_name = $this->model_name ? $this->model_name . '_model' : $this->router->fetch_class() . '_model';\n $this->load->model($model_name, 'model');\n }\n $this->_set_user();\n $this->_check_resource();\n }", "public function __construct() {\n parent::__construct();\n $this->load->database();\n $this->load->model(\"base_model\");\n }", "public function __construct()\r\n\t{\r\n\tparent::__construct();\r\n\t\r\n\t//load database libray manually\r\n\t$this->load->database();\r\n\t\r\n\t//load Model\r\n\t$this->load->model('Hello_Model');\r\n\t}", "public function __construct(){\n //load constructor CI_Model\n parent::__construct();\n \n //load database\n $this->load->database();\n }", "function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('User_model');\n\t}", "public function __construct() {\n // Call the CI_Model constructor\n parent::__construct();\n $this->load->database();\n }", "function __construct()\n {\n parent::__construct();\n $this->load->model(['encuentros_model']);\n }", "public function __construct() {\n\n parent::__construct();\n\n // Load models\n $this->load->model(\"attributesModel\", \"attributes\");\n\n }", "public function __construct() {\n parent::__construct();\n $this->load->model(\"modelo_base\");\n \n }", "public function __construct(){\n\n parent::__construct();\n $this->load->model('User_model','user');\n $this->load->model('Sys_model','sys');\n $this->load->model('Article_model','article');\n $this->load->model('System_model','system');\n }", "public function __construct()\n {\n parent::__construct();\n \t$this->load->model('Common_model');\n }", "public function __construct()\n {\n parent::__construct();\n $this->load->model('toko_model');\n }", "function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model(\"mahasiswa_model\");\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->load->model(['m_voting', 'm_master', 'm_prospects', 'm_factors']);\n }", "public function __construct()\n {\n parent::__construct();\n //$this->load->model('test_model'); yeh \n //$this->load->helper('url_helper');\n\t\t\t\t $this->load->model(\"test_model\",\"m\");\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('Students_activities_model','sam');\n\t}", "public function __construct() {\r\n\t\tparent::__construct();\r\n\t\t$this->load->model(\"bibliotecaModel\");\r\n\t}", "function __construct()\n {\n parent::__construct();\n\t\t$this->load->model('Dash_Board_Model');\n\t\t \n }", "public function __construct(Model $model) {\n parent::__construct($model);\n \n }", "function __construct() {\r\n parent::__construct();\r\n $this->load->model(\"Siswa\"); //constructor yang dipanggil ketika memanggil siswa.php untuk melakukan pemanggilan pada model : siswa_model.php yang ada di folder models\r\n }", "function __construct()\n {\n parent::__construct();\n $this->load->model('BH');\n\n }", "public function __construct() {\n // load our model\n $this->userModel = $this->model('User'); // will check models folder for User.php\n }", "public function __construct() {\r\n parent::__construct();\r\n $this->load->model('Opportunity_model');\r\n }", "public function __construct()\n\t{\n\t\t// \\ladybug_dump($model);\n\t}", "function __construct(){\n\t\t\tparent::__construct();\n\t\t\t$this->load->model('Campaings_model');\n\t}", "function __construct()\n {\n parent::__construct();\n $this->load->model('payment_method_model', 'payment_method');\n }", "public function __construct()\n {\n parent::__construct();\n $this->load->helper(array('form','url'));\n $this->load->library(array('session', 'form_validation', 'email'));\n $this->load->database();\n $this->load->model('Init_models');\n }", "function __construct() {\n parent::__construct();\n $this->load->model('flightModel');\n $this->load->model('flight');\n $this->load->model('wackyModel');\n $this->load->model('fleetModel');\n }", "function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->load->model('colleges_model', 'colleges');\n\t\t// $this->load->model('programs');\n\t\t$this->load->model('courses_model', 'courses');\n\t\t$this->load->model('user_model', 'user');\n\t\t$this->load->model('forms_model', 'forms');\n\t\t$this->load->model('evaluation_model', 'evaluation');\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->load->model('User_model'); //load database model.\n $this->load->model('Form_data_model'); //load database model.\n }", "public function __construct(){\n parent::__construct();\n\t\t$this->load->model('notification_model');\n\t\t$this->load->model('cities_model');\n\t\t$this->load->model('areas_model');\n\t\t$this->load->model('groups_model');\n }", "public function __construct()\r\n\t{\r\n\t\t// Call the CI_Model constructor\r\n\t\tparent::__construct();\r\n\t\t$this->load->model(\"usuario_model\");\r\n\t}", "public function __construct() {\n parent::__construct(); \n $this->load->model('IPEModel');\n }", "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n $this->load->model('Profile_model');\n\n }", "public function __construct() {\n parent::__construct();\n $this->load->model('Channel_model');\n $this->load->model('UserRegister_model');\n $this->load->model('Loginrecord_model');\n $this->load->model('Paylog_model');\n }", "function __construct()\n {\n parent::__construct();\n\t\t$this->load->model('common','common');\n }", "function __construct()\r\n {\r\n parent::__construct();\r\n $this->load->model('subbab1_model');\r\n }", "public function __construct() {\n parent::__construct();\n $this->load->model('M_FluktuasiHarga');\n $this->load->model('M_Komoditas');\n $this->load->model('M_Lokasi');\n }", "function __construct(){\n parent::__construct();\n $this->check_isvalidated();\n $this->load->model('admin_model');\n $this->load->model('anggota_model');\n $this->load->model('pokok_wajib_model');\n $this->load->model('tabarok_a_model');\n $this->load->model('tarekah_a_model');\n $this->load->model('tarekah_b_model');\t\t\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t// Your own constructor code\n\t\t//$this->load->model('access_url_model');\n\t\t$this->load->model('tst_model', 'tst');\n\t}", "function __construct() {\n\t\t$this->cotizacionModel = new cotizacionModel();\n\t}", "public function __construct() {\n\t\tparent::__construct();\n\t\tif(!$this->session->userdata('name')) {\n\t\t\tredirect(redirect('login'));\n\t\t}\n\t\t$this->load->model('ProductsModel');\n\t\t$this->load->model('ProductCategoriesModel');\n\t\t$this->load->model('StockModel');\n\t\t$this->load->model('CustomerModel');\n\t\t$this->load->model('InvoiceModel');\n\t\t$this->load->model('CompanyModel');\n\t\t$this->load->model('DeliveryOrderModel');\n\t\t$this->load->model('ReturnsModel');\n\t}", "public function __construct()\n\t{\n\t\t// Assign the CodeIgniter super-object\n\t\t$this->CI =& get_instance();\n\t\t$this->CI->load->model('ContratanteDB');\n\t}", "function\t__construct()\t{\n\t\t\t\t/* contrutor da classe pai */\n\t\t\t\tparent::__construct();\n\t\t\t\t/* abaixo deverão ser carregados helpers, libraries e models utilizados\n\t\t\t\t\t por este model */\n\t\t}", "public function __construct() {\n parent::__construct('md_rent_car', 'md_order');\n $this->log->log_debug('RentCarAffairModel model be initialized');\n }", "public function __construct()\n {\n // All of my models are like this\n parent::__construct(get_class($this));\n // Calling methods to get the relevant data\n $this->generateNewsData();\n $this->generateAnalyticsData();\n $this->generatePostsData();\n }", "public function __construct(){\n $this->sliderModel = $this->model('Slider');\n $this->siteInfoModel = $this->model('SiteInfo');\n $this->officeModel = $this->model('Office');\n $this->categoryModel = $this->model('Category');\n $this->brandModel = $this->model('Brands');\n $this->productModel = $this->model('Products');\n $this->imgModel = $this->model('Image');\n }", "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('daftarmodel');\n\t}", "function __construct()\n {\n parent::__construct();\n\n $this->load->model('custom/ServiceStatus/NetworkOutage_model');\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('Students_activities_model', 'sam');\n\n\t}", "public function __construct() {\n parent::__construct();\n $this->load->model('libreta_model');\n }", "function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t// $this->load->model('colleges');\n\t\t// $this->load->model('programs');\n\t\t$this->load->model('courses_model', 'courses');\n\t\t$this->load->model('user_model', 'user');\n\t\t$this->load->model('forms_model', 'forms');\n\t\t$this->load->model('evaluation_model', 'evaluation');\n\t}" ]
[ "0.8478336", "0.8478336", "0.81615126", "0.8117826", "0.8117826", "0.80994266", "0.8051992", "0.8007743", "0.79728657", "0.7956983", "0.7944228", "0.7944228", "0.7944228", "0.7944228", "0.7891693", "0.7883193", "0.7849891", "0.7808865", "0.7793594", "0.7751989", "0.773839", "0.77268946", "0.7670276", "0.7657678", "0.76429194", "0.7612435", "0.7611017", "0.75930434", "0.75844216", "0.75723594", "0.75681573", "0.7560089", "0.7560089", "0.7549137", "0.7543959", "0.7536697", "0.7535247", "0.7531432", "0.7508008", "0.7496409", "0.7493452", "0.7482874", "0.74826145", "0.74813837", "0.7475223", "0.7468955", "0.7464571", "0.7464571", "0.7464571", "0.7441789", "0.74338335", "0.74310344", "0.7412331", "0.7402904", "0.73988914", "0.73916084", "0.7388016", "0.73868775", "0.73861545", "0.73859817", "0.7382552", "0.737817", "0.7376017", "0.73748714", "0.7373381", "0.73726946", "0.73722637", "0.7369021", "0.73644865", "0.7359956", "0.735978", "0.73588014", "0.73587704", "0.7356164", "0.7349405", "0.7347448", "0.7345184", "0.73440474", "0.73420835", "0.7340078", "0.73332465", "0.7330444", "0.73258346", "0.73241174", "0.73205066", "0.7320245", "0.7318567", "0.73143095", "0.7307136", "0.73064774", "0.7302943", "0.7300816", "0.7300289", "0.72999614", "0.7298045", "0.7297087", "0.72967243", "0.7291957", "0.72821987", "0.72789335", "0.7278296" ]
0.0
-1
fonction permettant de traiter les erreurs et de les archiver dans un fichier log
function error($type, $msg, $file, $line) { // on lit les principales variables d'environnement // pour ecrire leur contenu dans le log global $HTTP_HOST, $HTTP_USER_AGENT, $REMOTE_ADDR, $REQUEST_URI; // on donne un nom au fichier d'erreur $errorLog = URL_BASE ."erreur.log"; // construction du contenu du fichier d'erreur $errorString = "Date: " . date("d-m-Y H:i:s") . "\n"; $errorString .= "Type d'erreur: $type\n"; $errorString .= "Message d'erreur: $msg\n"; $errorString .= "Fichier: $file($line)\n"; $errorString .= "Host: $HTTP_HOST\n"; $errorString .= "Client: $HTTP_USER_AGENT\n"; $errorString .= "Client IP: $REMOTE_ADDR\n"; $errorString .= "Request URI: $REQUEST_URI\n\n"; // ecriture du log dans le fichier erreur.log $fp = fopen($errorLog, "a+"); fwrite($fp, $errorString); fclose($fp); // n'affiche que if ($type == E_ERROR || $type == E_WARNING ){ // display error message echo "<h4>Erreur (<small>$msg</small>)</h4>"; echo "Nous sommes désolés, mais cette page ne peut être affichée à cause d'une erreur interne. <br /> Cette erreur a été enregistrée et sera corrigée dès que possible. <br /><br/> <a href=# onClick='history.go(-1)'>Cliquer ici pour revenir au menu précédent.</a>"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function grabLog(){\n $logDir = Mage::getBaseDir('log') . DS;\n\n // archived directory where we will move them after storing on db\n\t\t$archivedDir = $logDir . $this->_archived . DS;\n\n // create archived directory if not exists\n Mage::getConfig()->getOptions()->createDirIfNotExists($archivedDir);\n\n foreach (glob($logDir . \"*\" . $this->_ext) as $file) {\n // get filename without extension\n $filename = basename($file, $this->_ext);\n\n // check if the file is in allowed list to store on db\n if(!in_array($filename, $this->_allowed_files)){\n continue;\n }\n\n // rename the file before moving to archive directory\n $filename_new = $filename . '-' . time() . $this->_ext;\n\n // get file contents\n $content = file_get_contents($file);\n $content = preg_replace('/^.*(?:DEBUG).*$/m', \"\\n\", $content);\n $content = preg_replace('#[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\+[0-9]{2}:[0-9]{2}#iU', \"\\n\", $content);\n $content = explode(\"\\n\",$content);\n $content = array_map('trim',$content);\n $content = implode(\"\\n\", array_unique($content)) . \"\\n Check log file at ({$archivedDir}) on server for full information\";\n\n // prepare data to save\n $data = array(\n 'title' => $filename . 'log',\n 'last_time' => date('Y-m-d h:i:s', time()),\n 'error' => $content,\n 'file' => $this->_archived . DS . $filename_new,\n );\n\n $model = Mage::getModel('tlog/log')->load(0);\n $model->setData($data);\n $model->save();\n\n // move to archive folder\n rename($file, $archivedDir . $filename_new);\n\n $this->send(array('file' => $archivedDir . $filename_new));\n }\n return true;\n\t}", "protected static function MergeLogs()\n {\n }", "public function collectLogFiles()\r\n {\r\n $folder = array($this->app_root.'/logs');\r\n $files_found = $this->findFiles($folder, array(\"log\"));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }", "private function getStatusLogs() {\n\n\n if (!file_exists(self::LOG_FILE)) {\n throw new Exception('Logs file does not exist');\n }\n elseif (!is_readable(self::LOG_FILE)) {\n throw new Exception('Logs file can not be read');\n }\n else {\n\n $logs = file(self::LOG_FILE);\n $i = 0;\n $numLines = count($logs);\n while($i<$this->numResults) {\n $i++;\n $this->statusLogs[] = $logs[$numLines - $i];\n }\n }\n }", "public function rotateLogs()\n\t{\n\t\t$arrFiles = preg_grep('/\\.log$/', scan(TL_ROOT . '/system/logs'));\n\n\t\tforeach ($arrFiles as $strFile)\n\t\t{\n\t\t\t$objFile = new \\File('system/logs/' . $strFile . '.9', true);\n\n\t\t\t// Delete the oldest file\n\t\t\tif ($objFile->exists())\n\t\t\t{\n\t\t\t\t$objFile->delete();\n\t\t\t}\n\n\t\t\t// Rotate the files (e.g. error.log.4 becomes error.log.5)\n\t\t\tfor ($i=8; $i>0; $i--)\n\t\t\t{\n\t\t\t\t$strGzName = 'system/logs/' . $strFile . '.' . $i;\n\n\t\t\t\tif (file_exists(TL_ROOT . '/' . $strGzName))\n\t\t\t\t{\n\t\t\t\t\t$objFile = new \\File($strGzName, true);\n\t\t\t\t\t$objFile->renameTo('system/logs/' . $strFile . '.' . ($i+1));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add .1 to the latest file\n\t\t\t$objFile = new \\File('system/logs/' . $strFile, true);\n\t\t\t$objFile->renameTo('system/logs/' . $strFile . '.1');\n\t\t}\n\t}", "public function logReports()\n {\n try {\n $reportsDirectory = Mage::getBaseDir('var') . '/report';\n\n foreach (glob($reportsDirectory . '/*') as $report) {\n $reportData = file_get_contents($report);\n $reportData = unserialize($reportData);\n $this->logReport($reportData);\n unlink($report);\n }\n } catch (Exception $e) {\n // Ignore\n }\n }", "protected function getLogEntries() {}", "public function lerArquivoLog(){\n $ponteiro = fopen(\"C:\\\\temp\\\\teste2.txt\", \"r\");\n\n //Abre o aruqivo .txt\n while(!feof($ponteiro)) {\n $linha = fgets($ponteiro, 4096);\n //Imprime na tela o resultado\n $this->pulaLinha();\n }\n //Fecha o arquivo\n fclose($ponteiro);\n }", "function geraLogErro($msg)\n {\n $caminho_atual = getcwd();\n\n//muda o contexto de execução para a pasta logs\n\n $data = date(\"d-m-y\");\n $hora = date(\"H:i:s\");\n $ip = $_SERVER['REMOTE_ADDR'];\n\n//Nome do arquivo:\n $arquivo = \"LoggerErro_$data.txt\";\n\n//Texto a ser impresso no log:\n $texto = \"[$hora][$ip]> $msg \\n\";\n\n $manipular = fopen(\"$arquivo\", \"a+b\");\n fwrite($manipular, $texto);\n fclose($manipular);\n\n\n }", "function cc_import_immobili_error_log($msg){\n\t\n\t$path = ABSPATH . \"import/\";\n\t$d = date(\"Ymd\");\n\t$file = $path.\"logfile_\".$d.\".txt\";\n\tif(is_array($msg)) $msg = var_export($msg, true);\n\t\n\t$method = (file_exists($file)) ? \"a\": \"w\";\n\t$handle = fopen($file, $method);\n\t$string = date(\"Y-m-d H:i:s\", time()).\" - \".$msg.\"\\n\";\n\tfwrite($handle, $string);\n\tfclose($handle);\n\t\n}", "function logCheckOnFixDate()\n\t{\n\t\t// Soll durchgefuehrt werden?\n\t\tif (!$this->m_enable || !$this->m_eraseFilesEnable)\n\t\t{\t\n\t\t\treturn 0;\n\t\t}\n\t\n\t\t// Namen der Logdateien fuer die letzten n Tage erstellen.\n\t\tfor ($i=0; $i < $this->m_eraseFilesCount; $i++)\n\t\t{\n\t\t\t// Dateiname der Logdatei\n\t\t\t$t = time();\n\t\t\t$t -= 3600 * 24 * $i;\n\t\t\t$ltm = localtime($t, 1);\n\t\t\t$fileName[$i] = sprintf($this->m_fileNameTemplate, \n\t\t\t\t$ltm[\"tm_year\"] % 100, $ltm[\"tm_mon\"] + 1, $ltm[\"tm_mday\"]);\n\t\t}\n\t\t// Alle anderen Logdateien loeschen \n\t\n\t\t$j = 0;\n\t\n\t\t// Suche nach Dateien\n\t\t$file = sprintf(\"%s%s\", $this->m_base, $this->m_sub);\n\t\n\t\tif (($dir = opendir($file)) != false)\n\t\t{\t\n\t\t\twhile(($j < $this->m_eraseFilesCount) && (($ent = readdir($dir)) != false))\n\t\t\t{\n\t\t\t\tif ($ent == \".\" || $ent == \"..\") continue;\n\t\t\t\t\n\t\t\t\tfor ($i=0; $i < $this->m_eraseFilesCount; $i++)\n\t\t\t\t{\n\t\t\t\t\t// Stimmt mit einem der zu erhaltenden Dateien ueberein?\n\t\t\t\t\tif (strstr($fileName[$i], $ent) != 0)\n\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\tif ($i == $this->m_eraseFilesCount)\n\t\t\t\t{\n\t\t\t\t\t// Sammeln der zu loeschenden Dateien,\n\t\t\t\t\t// da erst nach closedir geloescht werden kann!\n\t\t\t\t\t$deleteFileName[$j++] = $ent;\n\t\t\t\t} \n\t\t\t}\n\t\t\tclosedir($dir);\n\t\n\t\t\tif ($j)\n\t\t\t{\n\t\t\t\t// Dateien loeschen\n\t\t\t\tfor ($i=0; $i < $j; $i++)\n\t\t\t\t{\n\t\t\t\t\t$file = $this->m_base . $this->m_sub . $deleteFileName[$i];\n\t\t\t\t\t\n\t\t\t\t\tif (unlink($file) == false)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Konnte nicht geloescht werden!\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 1;\n\t}", "function myExceptionHandling($_exception, $_logfile)\n{\n if ($_SERVER['SERVER_NAME'] != \"localhost\")\n {\n //sumiere boodschap\n $_msg=\"Er heeft zich een fout voorgedaan, probeer opnieuw.<br>Als de fout blijft voorkomen neem dan contact op met de web-master.<br>Alvast onze verontschuldigingen\"; \n }\n else\n {\n //complete error message\n $_msg = \"<hr>\n <strong>Exception</strong><br><br>\n Foutmelding: \".$_exception->getMessage().\"<br><br>\n Bestand: \".$_exception->getFile().\"<br>\n Regel: \".$_exception->getLine().\"<br><hr>\";\n }\n \n// exception log\n $_error_log[1] = strftime(\"%d-%m-%Y %H:%M:%S\");\n $_error_log[2] = $_exception->getMessage();\n $_error_log[3] = $_exception->getFile();\n $_error_log[4] = $_exception->getLine();\n \n $_pointer = fopen(\"$_logfile\",\"ab\");\n fputcsv($_pointer, $_error_log);\n fclose($_pointer);\n \n// user-message \n return $_msg;\n \n}", "private function logEntriesInDateRange() {\n\t\t// loop the discovered files\t\t\n\t\tforeach ($this->report['files'] as $file) {\n\t\t\t$handle = @fopen($file, \"r\");\n\t\t\tif ($handle) {\n\t\t\t\twhile (($buffer = fgets($handle, 4096)) !== false) {\n\t\t\t\t\t$this->Log->parseLogLine($buffer);\n\t\t\t\t\t// is it an log entry for the customer of interest?\n\t\t\t\t\tif ($this->Log->logLine['customer'] == $this->report['customer']) {\n\t\t\t\t\t\t// if the log entry is in the specific date range, save it\n\t\t\t\t\t\tif ($this->Log->meta['datetime'] >= $this->report['firstTime'] && $this->Log->meta['datetime'] <= $this->report['finalTime']) {\n\t\t\t\t\t\t\t$this->report['items'][$this->Log->logLine['id']]['Activity'][] = array_merge($this->Log->meta, $this->Log->logLine);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\n\t\t\t\t}\n\t\t\t\tif (!feof($handle)) {\n\t\t\t\t\techo \"Error: unexpected fgets() fail\\n<br />\";\n\t\t\t\t}\n\t\t\t\tfclose($handle);\n\t\t\t}\n\t\t}\n\t}", "public function write()\n {\n $r=false;\n \n if(!empty($this->buffer))\n {\n foreach($this->buffer as $entry)\n {\n if(empty($this->logs[$entry['log']]))\n {\n $log_file=LOG_LOCATION.'/'.$entry['log'].'.log';\n\n $this->logs[$entry['log']]=fopen($log_file,'a');\n }\n\n if($entry['level']==LOG_LEVEL_ERROR)\n {\n $level_string='ERROR';\n }\n elseif($entry['level']==LOG_LEVEL_WARNING)\n {\n $level_string='WARNING';\n }\n elseif($entry['level']==LOG_LEVEL_NOTICE)\n {\n $level_string='NOTICE';\n }\n else\n {\n $level_string='UNKNOWN';\n }\n\n $log_config=&$this->system->config('log');\n\n $out=date($log_config['timestamp_format']).'|'.$level_string.' - '.$entry['message'].\"\\n\";\n\n if(!empty($this->logs[$entry['log']])&&fwrite($this->logs[$entry['log']],$out))\n {\n $r=true;\n }\n\n if(!$r)\n {\n throw new A_Exception('Could not write to file \"'.$log_file.'\"');\n }\n }\n\n if($r)\n {\n $this->buffer=array();\n }\n }\n }", "function write_log($cadena){\n\t\t\t$arch = fopen(\"../../logs/deletes\".\".txt\", \"a+\"); //date(\"Y-m-d\"). define hora en archivo\n\t\t\n\t\t\tfwrite($arch, \"[\".date(\"Y-m-d H:i:s\").\" \".$_SERVER['REMOTE_ADDR'].\" \".\" - Elimino produccion ] \".$cadena.\"\\n\");\n\t\t\tfclose($arch);\n\t\t}", "function logToFile($file,$level,$msg) { \n\t\t// Connectie met DB\n\t\t$db_conn = new SafeMySQL(array('db'=>DB_LOGS));\t\n\t\t$pdo = new PDO(\"mysql:host=\".DB_HOST.\";dbname=\".DB_LOGS.\";charset=utf8\", DB_USER, DB_PASS); \t\n\n\t\t$user = (isset($_SESSION[SES_NAME]['user_email'])) ? htmlentities($_SESSION[SES_NAME]['user_email'], ENT_QUOTES, 'UTF-8') : '---';\n\t\t$env = APP_ENV;\t\t\n\t\t$year = date(\"Y\");\n\t\t$date = date(\"Y-m-d\");\n\t\t$path = ROOT_PATH;\n $path .= \"/Src/Logs/\".$year.\"/\";\n\t\t// Bestaat de folder niet maak deze dan aan\n\t\tif(!file_exists($path)){\n\t\t\tmkdir($path);\n\t\t}\n\t\t\n $filename = $path.$date.'.log';\n // Open file\n\t\t$fileContent = @file_get_contents($filename);\n\t\t\t\n\t\t$datum = date(\"D Y-m-d H:i:s\");\n\t\t\t// Log level\n\t\t\tif($level === 1){\n\t\t\t\t$level = \"CRITICAL\";\n\t\t\t} elseif($level === 2){\n\t\t\t\t$level = \"WARNING\";\n\t\t\t} else {\n\t\t\t\t$level = \"NOTICE\";\n\t\t\t}\n\t\t\t\n $str = \"[{$datum}] [{$level}] [{$user}] [{$env}] [{$file}] {$msg}\".PHP_EOL; \n // Schrijf string naar file\n file_put_contents($filename, $str . $fileContent);\n\t\t\n\t\t$query_arr = array(\n\t\t\t'datum' \t\t\t=> date(\"Y-m-d H:i:s\"),\n\t\t\t'filename' \t\t\t=> $file,\n\t\t\t'criteria_level' \t=> $level,\n\t\t\t'msg'\t\t\t\t=> $msg\n\t\t);\t\t\n\t\t//var_dump($db_conn->query(\"SHOW TABLES\"));\n\t\t\n\t\tif(!$db_conn->query(\"SHOW TABLES LIKE 'beheer_log_\".$year.\"'\")){\n\t\t\t$db_conn->query(\"CREATE TABLE `beheer_log_\".$year.\"` (\n\t\t\t\t\t\t\t`id` INT(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t`datum` DATETIME DEFAULT NULL,\n\t\t\t\t\t\t\t`filename` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,\n\t\t\t\t\t\t\t`criteria_level` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,\n\t\t\t\t\t\t\t`msg` VARCHAR(5000) COLLATE utf8_unicode_ci DEFAULT NULL,\n\t\t\t\t\t\t\tPRIMARY KEY (`id`)\n\t\t\t\t\t\t) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\");\n\n\t\t\t$db_conn->query(\"INSERT INTO `beheer_log_\".$year.\"` SET ?u\", $query_arr);\n\t\n\t\t// Insert in DB\n\t\t} else {\n\t\t\t$db_conn->query(\"INSERT INTO `beheer_log_\".$year.\"` SET ?u\", $query_arr);\t\t\n\t\t}\t\t\t\t\t\n\t\t\t\t\n\t}", "function logCheckOnWorkDate()\n\t{\n\t\t// Soll durchgefuehrt werden?\n\t\tif (!$this->m_enable || !$this->m_eraseFilesEnable)\n\t\t{\t\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t// Suche nach Dateien in Verzeichnis\n\t\t$dir = sprintf(\"%s%s\", $this->m_base, $this->m_sub);\n\t\tif (($resource = opendir($dir)) != false)\n\t\t{\t\n\t\t\twhile(($file = readdir($resource)) != false)\n\t\t\t{\n\t\t\t\tif ($file == \".\" || $file == \"..\") continue;\n\t\t\t\t\n\t\t\t\t// Passt Dateiname zu Format der Logdateinamen\n\t\t\t\tif (eregi($this->m_fileNameTemplateMatch, $file))\n\t\t\t\t{\n\t\t\t\t\t// In Liste aufnehmen\n\t\t\t\t\t$fileList[$fileCount++] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($resource);\n\t\n\t\t\t// Wurden Dateien gefunden.\n\t\t\tif ($fileCount)\n\t\t\t{\t\n\t\t\t\t$fileCount = 0;\n\t\t\t\t// Array der gefundenen Dateien sortieren.\n\t\t\t\trsort($fileList);\n\t\t\t\t\n\t\t\t\tfor (; count($fileList);)\n\t\t\t\t{\t\n\t\t\t\t\t// Ist Datei von selbigem Datum?\n\t\t\t\t\tif (strncmp($tmp, $fileList[0], 10) == false)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Datei mit gleichem Datums-Zeichenfolgenbeginn\n\t\t\t\t\t\t// Kann sein, da fuer verschiedene Kanaele gelogt werden kann.\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// Datums-Zeichenfolge des Dateinamen aufnehmen.\n\t\t\t\t\t\t$tmp = $fileList[0];\n\t\t\t\t\t\t$fileCount++; // Zu erhaltende Datei\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Datumsbereich der zu erhaltenden Dateien ueberschritten?\n\t\t\t\t\tif ($fileCount > $this->m_eraseFilesCount)\n\t\t\t\t\t{\n\t\t\t\t\t\t$file = $this->m_base . $this->m_sub . $fileList[0];\n\t\t\t\t\t\tif (unlink($file) == false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Konnte nicht geloescht werden!\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//echo \"Erase file: \" . $fileList[0] . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\t//echo \"Hold file: \" . $fileList[0] . \"\\n\";\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Datei aus Array entfernen\n\t\t\t\t\tarray_shift($fileList);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 1;\n\t}", "protected function createLogFile() {}", "public function exportLogAction()\n {\n $exportLogFile = $this->dataImport->logDirectory . self::exportLogFile;\n if (file_exists($exportLogFile)) {\n echo nl2br(file_get_contents($exportLogFile));\n }\n exit;\n }", "function leerLogDeFicheroApache() {\n $tama = filesize($this->fichero);\n $mane = fopen($this->fichero, \"rb\");\n $contenidos= fread($mane, $tama);\n\n $lineas = explode(\"\\n\",$contenidos);\n $result = array();\n\n foreach ($lineas as $linea) {\n if (strlen($lineas)!=strlen(eregi_replace(\"FATAL:\",\"\",$lineas))) {\n $result[] = array(_('Linea')=>$linea,_('Error')=>null,_('Tipo')=>_(\"[FATAL]\"),_('Fecha')=>null);\n } else {\n \t//TODO : PROCESAMIENTO DE LOS DATOS DEL LOG DE MYSQL\n $fecha =\"\";\n $error = substr($lineas,26,strlen($linea));\n preg_match(\"[\\[+[a-zA-Z0-9._/ ]+\\]]\", $error, $fecha, PREG_OFFSET_CAPTURE);\n $result[] = array(_('Linea')=>$linea,_('Tama')=>substr($lineas,0,26),_('Error')=>$error,_('Fecha')=>$fecha[0][0]);\n\n }\n }\n fclose($mane);\n return $result;\n }", "function CDFLog()\n\t{\n\t\t// ** Aktivierung der Logfunktionalitaet **\n\t\t// ########################################\n\t\t$this->m_enable = true;\n\t\t// ########################################\n\t\tif ($this->m_enable)\n\t\t{\t\t\t\n\t\t\t// Basispfad der Logdateien\n\t\t\t$this->m_base = \"./\";\n\t\t\t// Unterordner der Logdateien\n\t\t\t$this->m_sub = \"Logfiles/\";\n\t\t\t// Dateiname der Logdatei: YYYY_MM_DD_PHP.log\n\t\t\t$this->m_fileNameTemplate = \"20%02u_%02u_%02u_PHP.log\";\n\t\t\t// Die Verwaltungsroutine fuer die automatische Loeschung\n\t\t\t// Aelterer Dateien geht davon aus, dass der Dateiname\n\t\t\t// mit dem Datumsstempel beginnt.\n\t\t\t$this->m_fileNameTemplateMatch = \"^20[0-9]{2}_[0-9]{2}_[0-9]{2}_PHP.log\";\n\t\t\t// Aktuellen Dateiname der Logdatei erstellen\n\t\t\t$t = time();\n\t\t\t$ltm = localtime($t, 1);\n\t\t\t$this->m_fileName = sprintf($this->m_fileNameTemplate, \n\t\t\t\t$ltm[\"tm_year\"] % 100, $ltm[\"tm_mon\"] + 1, $ltm[\"tm_mday\"]);\n\t\t\t// Loeschen von Dateien die aelter sind als m_eraseFilesCount Logtage\n\t\t\t$this->m_eraseFilesEnable = true;\n\t\t\t// Anzahl zu haltender Logdateien (in Tagen)\n\t\t\t$this->m_eraseFilesCount = 5;\n\t\t\t// Zeichenfolge fuer einen Zeilenumbruch\n\t\t\t$this->m_crLf = \"\\r\\n\";\n\t\t\t// Automatische Einfuegung eines Zeitstempels vor jedem Logeintrag\n\t\t\t$this->m_withTimestamp = true;\n\t\t\t// Pruefen ob der Logpfad existiert.\n\t\t\tif (!is_dir($this->m_base . $this->m_sub))\n\t\t\t{\t\n\t\t\t\tif (!mkdir($this->m_base . $this->m_sub))\n\t\t\t\t{\n\t\t\t\t\t// Logsystem wegen Fehlschlag abstellen\n\t\t\t\t\t$this->m_enable = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Pruefung fuer eraseFile durchfuehren\n\t\t\t$this->logCheckOnWorkDate();\n\t\t}\n\t}", "public static function log_save()\n {\n if (empty(self::$log) or self::$configuration['core']['log_threshold'] < 1) {\n return;\n }\n\n // Filename of the log\n $filename = self::log_directory().date('Y-m-d').'.log'.EXT;\n\n if (! is_file($filename)) {\n // Write the SYSPATH checking header\n file_put_contents($filename,\n '<?php defined(\\'SYSPATH\\') or die(\\'No direct script access.\\'); ?>'.PHP_EOL.PHP_EOL);\n\n // Prevent external writes\n chmod($filename, 0644);\n }\n\n // Messages to write\n $messages = array();\n\n do {\n // Load the next mess\n list($date, $type, $text) = array_shift(self::$log);\n\n // Add a new message line\n $messages[] = $date.' --- '.$type.': '.$text;\n } while (! empty(self::$log));\n\n // Write messages to log file\n file_put_contents($filename, implode(PHP_EOL, $messages).PHP_EOL, FILE_APPEND);\n }", "public function cleanOldLog() {\n\t\t// not yet implemented\n\t}", "public function registrarErro(){\r\n if($this->dataHora != null){\r\n if($this->classe != null){\r\n if($this->metodo != null){\r\n if(count($this->descricao != null)){\r\n //Registra o erro em arquivos de log .TXT----------\r\n $linha = \"\\n========================================================\\n\";\r\n $linha .= \"Data: \".$this->dataHora.\"\\n\";\r\n $linha .= \"Erro: \".$this->descricao.\"\\n\";\r\n $linha .= \"Classe: {$this->classe}\\n\";\r\n $linha .= \"Metodo: {$this->metodo}\\n\";\r\n $linha .= \"========================================================\\n\";\r\n $nomeArquivo = \"C:\\\\xampp\\\\htdocs\\\\sui\\\\logs\\\\\".date(\"Y-m-d\");\r\n $arquivo = fopen(\"{$nomeArquivo}.txt\", \"a\");\r\n fwrite($arquivo, $linha);\r\n fclose($arquivo);\r\n Helpers::msg(\"Erro\", \"Houve um erro no processo verifique o log para mais informacoes\");\r\n //Registra o erro em arquivos de log .TXT----------\r\n\r\n\r\n //Envia email para todos os programadores---------------------------\r\n// $conn = Conexoes::conectarCentral();\r\n// $programadores = $conn->query(\"select programadores.email from programadores\")->fetchAll();\r\n// $enderecos = Array();\r\n// if(count($programadores) > 0){\r\n// foreach ($programadores as $programador){\r\n// array_push($enderecos, $programador['email']);\r\n// }\r\n// }else{\r\n// array_push($enderecos, \"[email protected]\");\r\n// }\r\n// $email = new Mail();\r\n// $email->de = \"[email protected]\";\r\n// $email->para = $enderecos;\r\n// $email->titulo = \"Erro no sistema de integrações\";\r\n// $email->corpo = $this->corpoEmail();\r\n// try{\r\n// $email->enviaEmail();\r\n// } catch (Exception $ex) {\r\n// echo $ex->getMensage();\r\n// }\r\n// return true;\r\n //Envia email para todos os programadores---------------------------\r\n }else{\r\n echo \"A descricao do erro nao foi informada\";\r\n }\r\n }else{\r\n echo \"Metodo do erro nao foi informado\";\r\n }\r\n }else{\r\n echo \"Classe do erro nao foi informada\";\r\n }\r\n }else{\r\n echo \"Date e hora do erro não informada\";\r\n }\r\n }", "protected function processChangedAndNewFiles() {}", "function logrec($aid,$e,$msg,$src='') {\n\t// into the new record array[errors]\n\tglobal $logfile;\n\n\n\t$ts = date('H:i');\n\n\techo \"<p class='red'>$aid: $msg</p>\";\n\tfile_put_contents($logfile,\n\t\tsprintf(\"%6s %4s %1s %s\\n\",$ts,$aid,$e,$msg),FILE_APPEND);\n\tif (!empty($src)) {\n\t\tfile_put_contents($logfile,\n\t\tsprintf(\"%12s %s\\n\",'',$src),FILE_APPEND);\n\t}\n\treturn \"($e) $msg \". NL;\n}", "protected function exportLogs()\n {\n if (!defined('JSON_PRETTY_PRINT')) {\n define('JSON_PRETTY_PRINT', 128);\n }\n\n $data = json_encode($this->autoTestController->getLogs(), JSON_PRETTY_PRINT);\n PacklinkPrestaShopUtility::dieFileFromString($data, 'auto-test-logs.json');\n }", "private static function _rotate() {\n $config = Mirage::app()->getConfig();\n if(!isset($config['logs']))\n throw new Exception('Please set key \"logs\" in config');\n \n if(!is_array($config['logs']))\n throw new Exception('\"logs\" should be array');\n \n $logs = $config['logs'];\n \n if(!isset($logs['log_path']))\n throw new Exception('Please set log_path in config');\n \n if(!file_exists($logs['log_path']))\n throw new Exception ('Directory not exist' . $logs['log_path']);\n \n if(!is_dir($logs['log_path']))\n throw new Exception($logs['log_path'] . ' should be directory');\n \n $log_file = $logs['log_path'] . DIRECTORY_SEPARATOR . self::$file_name;\n $log_path = $logs['log_path'] . DIRECTORY_SEPARATOR;\n \n// if(!chmod($logs['log_path'], 775))\n// throw new Exception('Can\\'t change permission of ' . $logs['log_path']); \n \n if(MIRAGE_DEBUG) {\n return true;\n } \n \n // dont rotate if log file not exist\n if(!file_exists($log_file))\n return true;\n \n if(!isset($logs['rotate_by']))\n throw new Exception('Please set rotate_by');\n \n if($logs['rotate_by'] == 'filesize') {\n if(!isset($logs['filesize']))\n throw new Exception('Please configure log filesize');\n\n $new_name = self::$file_name;\n\n if((filesize($log_file) / 1048576) > $logs['filesize'])\n $new_name = date(\"Y_m_d\",filemtime($log_path . self::$file_name)) .'.log';\n \n // if new name exist dont rotate\n if(file_exists($log_path . $new_name))\n return true;\n \n // rename log file\n if(!rename($log_path . self::$file_name, $log_path . $new_name))\n throw new Exception($log_path . self::$file_name . ' is not writable');\n } else {\n if(!isset($logs['interval']))\n throw new Exception ('Please configure log interval');\n \n $filetime = filemtime($log_path . self::$file_name);\n if($filetime != false) {\n $new_name = date(\"Y_m_d\",$filetime) . '.log';\n } else {\n $new_name = self::$file_name;\n }\n \n // do not rotate if file is already exist\n if(file_exists($log_path . $new_name))\n return true;\n\n $content = file($log_file);\n\n // do not rotate if file is empty\n if(!isset($content[0]))\n return true;\n \n $date = substr($content[0], 1, 10);\n $d = explode('-',$date);\n $new_name = $d[0] . '_' . $d[1] . '_' . $d[2] . '.log';\n if(file_exists($log_path . $new_name)) {\n unlink($log_path . $new_name);\n }\n $interval = $logs['interval'];\n \n $max_date = strtotime(\"+$interval day\",strtotime($date));\n $date_today = strtotime(date('Y-m-d'));\n if($max_date <= $date_today) {\n // rename log file\n if(!rename($log_path . self::$file_name, $log_path . $new_name))\n throw new Exception($log_path . self::$file_name . ' is not writable'); \n }\n \n }\n }", "protected function backupSystemLog() : array \n {\n global $config;\n global $server;\n \n $currTime = new DelayTime();\n $archiveData = array();\n $archiveData['archive_id'] = 0;\n $archiveData['server_name'] = ServerFile::generateFilename($config['logs_dir']);\n $archiveData['notes'] = '';\n $archiveData['mime_type'] = 'application/txt';\n $archiveData['timestamp'] = $currTime->getTime();\n $archiveData['content_tz'] = 'UTC';\n\n $fromPath = $server['host_address'].$config['logs_dir'].'/'.$config['log_file'];\n $toPath = $server['host_address'].$config['logs_dir'].'/'.$archiveData['server_name'];\n\n $response = array('success' => true);\n\n if(copy($fromPath, $toPath))\n {\n // Add file notes including size and MD5\n $missionCfg = MissionConfig::getInstance();\n $archiveData['notes'] = 'Mission: '.$missionCfg->name.'<br/>'. \n 'Archive Timezone: UTC<br/>'. \n 'Size: '.ServerFile::getHumanReadableSize(filesize($toPath)).'<br/>'.\n 'MD5: '.md5_file($toPath);\n\n $archiveDao = ArchiveDao::getInstance();\n $result = $archiveDao->insert($archiveData);\n \n if($result === false)\n {\n unlink($toPath);\n Logger::warning('admin::backupSystemLog failed to add archive to database.');\n $response['success'] = false;\n $response['error'] = 'Failed to create archive. See system log for details.';\n }\n }\n else\n {\n Logger::warning('admin::backupSystemLog failed to create \"'.$archiveData['server_name'].'\"');\n unlink($toPath); \n $response['success'] = false;\n $response['error'] = 'Failed to create archive. See system log for details.';\n }\n\n Logger::info('admin::backupSystemLog finished for \"'. $archiveData['server_name'].'\". ('.$result.')');\n\n return $response;\n }", "private function pushLogs(){\n\n\t\t$log_path = $this->log_directory . $this->log_filename;\n\n\t\treturn file_put_contents($log_path, json_encode($this->logs));\n\n\t}", "public static function purgeLog(){\n\t\t$fichier = fopen('log/log.txt', 'w');\n}", "function erp_file_log( $message, $type = '' ) {\n if ( ! empty( $type ) ) {\n $message = sprintf( \"[%s][%s] %s\\n\", date( 'd.m.Y h:i:s' ), $type, $message );\n } else {\n $message = sprintf( \"[%s] %s\\n\", date( 'd.m.Y h:i:s' ), $message );\n }\n}", "function geraLog($msg)\n {\n $caminho_atual = getcwd();\n\n//muda o contexto de execução para a pasta logs\n\n $data = date(\"d-m-y\");\n $hora = date(\"H:i:s\");\n $ip = $_SERVER['REMOTE_ADDR'];\n\n//Nome do arquivo:\n $arquivo = \"log_$data.txt\";\n\n//Texto a ser impresso no log:\n $texto = \"[$hora][$ip]> $msg \\n\";\n\n $manipular = fopen(\"$arquivo\", \"a+b\");\n fwrite($manipular, $texto);\n chmod (getcwd().$arquivo, 0777);\n fclose($manipular);\n\n\n }", "private function save_log_file(){\n\n $file = MD5_HASHER_DIR . $this->file_change;\n if(is_file($file) && is_writable($file)){\n $fh = fopen($file, 'w');\n fwrite($fh, date('d/m/Y H:i:s').\" Changed Files(\".count($this->md5_changed_output).\"):\\n\");\n\n $changes = $this->order_changed_log();\n foreach($changes as $ext => $log_type){\n fwrite($fh, \"\\nFile Type (\".$ext.\"): \\n\");\n foreach($log_type as $k => $v){\n fwrite($fh, $v['real_path'].' => '.$v['modified']. \"\\n\");\n }\n }\n\n fwrite($fh, \"\\n\");\n fclose($fh);\n return true;\n }\n\n return false;\n }", "private function digestLogs() {\n if (!file_exists($this->logDir)) {\n $this->setMakeLogDir();\n }\n $files = glob($this->logDir . '/*', GLOB_ONLYDIR);\n $deletions = array_slice($files, 0, count($files) - $this->confdays);\n foreach ($deletions as $to_delete) {\n array_map('unlink', glob(\"$to_delete\"));\n }\n\n return true;\n }", "function logEnd($format) \n\t{\n\t\t// Log aktiv?\n\t\tif (!$this->m_enable)\n\t\t{\t\n\t\t\treturn 0;\n\t\t}\n\t\t// Alle Argumente als Parameter aufbereiten\n\t\t$args = func_get_args();\n\t\t// Erstes Element ist Formatstring, diesen entfernen\n\t\tarray_shift($args);\n\t\t// Datei oeffnen\n\t\tif (($logfp = fopen($this->m_base . $this->m_sub . $this->m_fileName, \"a\")) == false)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\t// Logzeile aufbauen\n\t\t$pr_row=vsprintf($this->m_row . $format . $this->m_crLf, $args);\n\t\tfwrite($logfp, $pr_row);\n\t\t// Datei schliessen\n\t\tfclose($logfp);\n\t\treturn 1;\n\t}", "public function logToFile($content) \n {\n }", "public function __construct()\n {\n// parent::__construct();\n// $this->f = fopen('storage/logs/actions.log', 'a');\n\n }", "public function logResults() {\n\t\tforeach ( $this->records as $outcome) {\n\t\t\t$this->log($outcome);\n\t\t}\n\t}", "protected function logfile_init() { \n if ($this->LOGGING) { \n $this->FILE_HANDLER = fopen($this->LOGFILE,'a') ; \n $this->debug(); \n } \n }", "private function saveLog($traza) {\r\n $nombreFichero = \"trazas\" . date(\"dmY\") . \".log\";\r\n $fichero = fopen($nombreFichero, \"a\");\r\n fwrite($fichero, $traza);\r\n fclose($fichero);\r\n }", "function frl_perform_update(){\n\n\t$task_for_out = frl_get_tasks();\n\t$log_for_out = frl_get_log();\n\t$log_queue = frl_get_log_queue();\n\n\t$step = count($log_for_out);\n\tif($step > $log_queue){\n\t\tfrl_perform_reset();\n\t\treturn;\n\t}\n\n\t//add action into log\n\t$new_line = $log_queue[$step]; \n\tarray_unshift($log_for_out, $new_line);\n\n\t$file = dirname(__FILE__).'/data/log-out.csv'; \n $csv_handler = fopen($file,'w');\n foreach ($log_for_out as $l) {\n \tfputcsv($csv_handler, $l, \",\");\n }\n fclose($csv_handler);\n\n //change status of task\n if($new_line[2] == 'Запрос уточнения'){\n \t//change status to Ждет уточнения\n \t$task_for_out = frl_change_task_status($task_for_out, $new_line[4], 'Ждет уточнения');\n }\n\n if($new_line[2] == 'Отклик на задачу'){\n \t//change status to Подтверждено\n \t$task_for_out = frl_change_task_status($task_for_out, $new_line[4], 'Подтверждено');\n }\n\n $file = dirname(__FILE__).'/data/tasks-out.csv';\n $csv_handler = fopen($file,'w');\n foreach ($task_for_out as $t) {\n \tfputcsv($csv_handler, $t, \",\");\n }\n fclose($csv_handler);\n\n}", "public static function log_datas_in_files( $service, $array_message, $criticality ) {\r\n\t\t\t// backline\r\n\t\t\t$upload_dir = wp_upload_dir();\r\n\r\n\t\t\twp_mkdir_p( $upload_dir[ 'basedir' ] . '/wpeologs/' );\r\n\r\n\t\t\t$message = \"\r\n\t\";\r\n\t\t\t$message .= current_time('mysql', 0) . self::$file_separator;\r\n\t\t\t$message .= get_current_user_id() . self::$file_separator;\r\n\t\t\t$message .= '\"' . $service . '\"' . self::$file_separator;\r\n\t\t\t$message .= $array_message['object_id'] . self::$file_separator;\r\n\r\n\t\t\t// For post type\r\n\t\t\tif(!empty($array_message['previous_element'])) {\r\n\t\t\t\t$message .= '\"' . base64_encode(serialize($array_message['previous_element'])) . '\"' . self::$file_separator;\r\n\t\t\t\t$message .= '\"' . base64_encode(serialize($array_message['previous_element_metas'])) . '\"' . self::$file_separator;\r\n\t\t\t}\r\n\r\n\t\t\t$message .= '\"' . $array_message['message'] . '\"' . self::$file_separator;\r\n\t\t\t$message .= $criticality . self::$file_separator . $service;\r\n\r\n\t\t\t$i = self::new_instance();\r\n\r\n\t\t\tif(empty($i->wpeologs_settings['my_services'][$service]) ||\r\n\t\t\t\t(!empty($i->wpeologs_settings['my_services'][$service]) && !empty($i->wpeologs_settings['my_services'][$service]['service_rotate']) && $i->wpeologs_settings['my_services'][$service]['service_rotate']))\r\n\t\t\t\tself::check_need_rotate($service, $message);\r\n\r\n\t\t\t$fp = fopen( $upload_dir[ 'basedir' ] . '/wpeologs/' . $service . '.csv', 'a');\r\n\t\t\tfwrite($fp, $message);\r\n\t\t\tfclose($fp);\r\n\r\n\t\t\tif(2 <= $criticality) {\r\n\t\t\t\t$fp = fopen( $upload_dir[ 'basedir' ] . '/wpeologs/_wpeo-critical.csv', 'a');\r\n\t\t\t\tfwrite($fp, $message);\r\n\t\t\t\tfclose($fp);\r\n\t\t\t}\r\n\t\t\telse if(1 == $criticality) {\r\n\t\t\t\t$fp = fopen( $upload_dir[ 'basedir' ] . '/wpeologs/_wpeo-warning.csv', 'a');\r\n\t\t\t\tfwrite($fp, $message);\r\n\t\t\t\tfclose($fp);\r\n\t\t\t}\r\n\t\t}", "public function process_access_log(){\n $this->load->model('rest_model');\n $today = date(\"Y-m-d\");\n $access_log_folder = $this->config->item('admin_access_log_path');\n $record_log_file = $access_log_folder . 'api_access_log.txt';\n if (!is_file($record_log_file)) {\n $fp = fopen($record_log_file, 'a+');\n chmod($record_log_file, 0777);\n $end_date = date(\"Y-m-d\", strtotime(\"-15 day\", strtotime($today)));\n } else {\n $db_end_date = end(explode('~~', file_get_contents($record_log_file)));\n }\n if ($end_date < $today) {\n while (strtotime($end_date) < strtotime($today)) {\n $end_date = date(\"Y-m-d\", strtotime(\"+1 day\", strtotime($end_date)));\n $date_arr[] = $end_date;\n }\n $log_data = $this->get_access_log($date_arr);\n if(!empty($log_data[$today])){\n $deletion = $this->rest_model->deleteAccessLog($today);\n }\n foreach ($date_arr as $date_log) {\n if (!empty($log_data[$date_log])) {\n $insertion = $this->rest_model->insertAccessLog($log_data[$date_log]);\n }\n }\n }\n $log_date = date(\"Y-m-d\", strtotime(\"-1 day\", strtotime($today)));\n file_put_contents($sql_file, \"$end_date~~$log_date\");\n echo 1;\n $this->skip_template_view();\n }", "function clean_act_log () {\n\t\tfile_put_contents(DIRLOG.\"act.log\",\"\");\n\t}", "private function writelog() {\r\n\r\n $dir = APP_PATH . 'tmp/log';\r\n //IF 'tmp/log' is file, delete it.\r\n if (is_file($dir)) {\r\n unlink(APP_PATH . 'tmp/log');\r\n }\r\n //IF 'tmp/log' is not exists, create it as folder.\r\n if (!dir_exists($dir)) {\r\n __mkdirs(APP_PATH . 'tmp/log');\r\n }\r\n //IF 'tmp/log' is exists as folder, the create logs under it.\r\n if (dir_exists($dir) && is_dir($dir)) {\r\n $date = date(\"Y-m-d H:i:s\", time());\r\n $arr = array('-', ':');\r\n $date = trim(str_replace($arr, '', $date));\r\n $cnt = $this->spArgs('msg');\r\n $str = $date . '\\t' . $cnt;\r\n file_put_contents(APP_PATH . 'tmp/log/log_' . $date . '.log', $str, FILE_APPEND);\r\n }\r\n return TRUE;\r\n }", "function envoyerLeLog()\r\n{\r\n // ----------------------------------\r\n // Construction de l'entête\r\n // ----------------------------------\r\n // On choisi généralement de construire une frontière générée aléatoirement\r\n // comme suit. (le document pourra ainsi etre attache dans un autre mail\r\n // dans le cas d'un transfert par exemple)\r\n $boundary = \"-----=\" . md5(uniqid(rand()));\r\n\r\n // Ici, on construit un entête contenant les informations\r\n // minimales requises.\r\n // Version du format MIME utilisé\r\n $header = \"MIME-Version: 1.0\\r\\n\";\r\n // Type de contenu. Ici plusieurs parties de type different \"multipart/mixed\"\r\n // Avec un frontière définie par $boundary\r\n $header .= \"Content-Type: multipart/mixed; boundary=\\\"$boundary\\\"\\r\\n\";\r\n $header .= \"\\r\\n\";\r\n\r\n // --------------------------------------------------\r\n // Construction du message proprement dit\r\n // --------------------------------------------------\r\n\r\n // Pour le cas, où le logiciel de mail du destinataire\r\n // n'est pas capable de lire le format MIME de cette version\r\n // Il est de bon ton de l'en informer\r\n // REM: Ce message n'apparaît pas pour les logiciels sachant lire ce format\r\n $msg = \"Je vous informe que ceci est un message au format MIME 1.0 multipart/mixed.\\r\\n\";\r\n\r\n // ---------------------------------\r\n // 1ère partie du message\r\n // Le texte\r\n // ---------------------------------\r\n // Chaque partie du message est séparée par une frontière\r\n $msg .= \"--$boundary\\r\\n\";\r\n\r\n // Et pour chaque partie on en indique le type\r\n $msg .= \"Content-Type: text/plain; charset=\\\"utf-8\\\"\\r\\n\";\r\n // Et comment il sera codé\r\n $msg .= \"Content-Transfer-Encoding:8bit\\r\\n\";\r\n // Il est indispensable d'introduire une ligne vide entre l'entête et le texte\r\n $msg .= \"\\r\\n\";\r\n // Enfin, on peut écrire le texte de la 1ère partie\r\n $msg .= \"Ceci est un mail avec un fichier joint\\r\\n\";\r\n $msg .= \"\\r\\n\";\r\n\r\n // ---------------------------------\r\n // 2nde partie du message\r\n // Le fichier\r\n // ---------------------------------\r\n // Tout d'abord lire le contenu du fichier\r\n $file = 'GSB2020.log';\r\n $fp = fopen($file, 'rb'); // b c'est pour les windowsiens\r\n $attachment = fread($fp, filesize($file));\r\n fclose($fp);\r\n\r\n // puis convertir le contenu du fichier en une chaîne de caractères\r\n // certe totalement illisible mais sans caractères exotiques\r\n // et avec des retours à la ligne tout les 76 caractères\r\n // pour être conforme au format RFC 2045\r\n $attachment = chunk_split(base64_encode($attachment));\r\n\r\n // Ne pas oublier que chaque partie du message est séparée par une frontière\r\n $msg .= \"--$boundary\\r\\n\";\r\n // Et pour chaque partie on en indique le type\r\n $msg .= \"Content-Type: image/gif; name=\\\"$file\\\"\\r\\n\";\r\n // Et comment il sera codé\r\n $msg .= \"Content-Transfer-Encoding: base64\\r\\n\";\r\n // Petit plus pour les fichiers joints\r\n // Il est possible de demander à ce que le fichier\r\n // soit si possible affiché dans le corps du mail\r\n $msg .= \"Content-Disposition: inline; filename=\\\"$file\\\"\\r\\n\";\r\n // Il est indispensable d'introduire une ligne vide entre l'entête et le texte\r\n $msg .= \"\\r\\n\";\r\n // C'est ici que l'on insère le code du fichier lu\r\n $msg .= $attachment . \"\\r\\n\";\r\n $msg .= \"\\r\\n\\r\\n\";\r\n\r\n // voilà, on indique la fin par une nouvelle frontière\r\n $msg .= \"--$boundary--\\r\\n\";\r\n\r\n $destinataire = '[email protected]';\r\n $expediteur = '[email protected]';\r\n $reponse = '[email protected]';\r\n try {\r\n $ret = mail($destinataire, 'GSB2020 : transmission du log', $msg,\r\n \"Reply-to: $reponse\\r\\nFrom: $expediteur\\r\\n\" . $header);\r\n if ($ret == 1) {\r\n unlink('gsb2020.log');\r\n return true;\r\n }\r\n }\r\n catch (Exception $e) {\r\n addLogEvent(\"Erreur d'envoi du log à [email protected]\");\r\n }\r\n return false;\r\n}", "public function upload_file(){\r\n\t\t$post_id = $_POST['post_id'];\r\n\t\t$folder_name = get_post_field( 'post_name', $post_id );\r\n\t\t$post_title = get_post_field( 'post_title', $post_id );\r\n\t\t$dir = $this->create_downloads_dir();\r\n\t\t$upload_dir = $dir['reports_dir'].'/'.$folder_name;\r\n\r\n\t\tif(!file_exists($upload_dir)){ mkdir($upload_dir, 0777); }\r\n\t\t\r\n\t\t$rslt = array();\r\n\t\t$insert_file = array();\r\n\t\t$insert_logs = array();\r\n\t\t$log_files = array();\r\n\t\t$activity = \"\";\r\n\t\tif(!empty($_FILES)){\r\n\t\t\t$total_size = 0;\r\n\t\t\tforeach ($_FILES['file']['tmp_name'] as $key => $tmp) {\r\n\t\t\t\t$filename = rename_duplicates($upload_dir.'/', $_FILES['file']['name'][$key]);\r\n\t\t\t\t$rslt[] = $uploaded = move_uploaded_file($tmp, $upload_dir.'/'.$filename);\t\r\n\t\t\t\t\r\n\t\t\t\t$doc_title = $_POST['doc_title'][$key];\r\n\t\t\t\t$desc = $_POST['description'][$key];\r\n\t\t\t\t$published_date = date(\"Y-m-d H:i:s\", strtotime($_POST['published_date'][$key]));\r\n\r\n\t\t\t\t$file_size = $_FILES['file']['size'][$key];\r\n\r\n\t\t\t\t$rslt['log_files'] = $log_files[] = array(\r\n\t\t\t\t\t'filename'=>$filename,\r\n\t\t\t\t\t'date_uploaded'=>current_time(\"Y-m-d H:i:s\"),\r\n\t\t\t\t\t'target_date'=>$published_date,\r\n\t\t\t\t\t'file_size'=>$file_size,\r\n\t\t\t\t\t'upload_path'=>str_replace(wp_upload_dir()['basedir'].'/', '', $upload_dir).'/'.$filename\r\n\t\t\t\t);\r\n\r\n\r\n\r\n\t\t\t\t$activity = \"Uploading file(s) failed for \".$post_title;\r\n\t\t\t\tif($uploaded){\r\n\t\t\t\t\t$activity = \"Successfully uploaded file(s) for \".$post_title;\r\n\t\t\t\t\t$insert_file[] = '('.$post_id.', \"'.$folder_name.'\", \"'.$filename.'\", \"'.$doc_title.'\", \"'.$desc.'\", \"'.$published_date.'\", 1)';\r\n\t\t\t\t}\r\n\t\t\t\t$total_size += $file_size;\r\n\t\t\t}\r\n\r\n\t\t\t$insert_logs[] = \"(\".$post_id.\", '\".$activity.\"', '', 'Market Reports', '\".current_time(\"Y-m-d H:i:s\").\"', \".$total_size.\")\";\t\r\n\r\n\t\t\tif($insert_file){\r\n\t\t\t\t$inserted = $this->MD_Model->insert_file($insert_file);\t\r\n\t\t\t\tif($inserted){\r\n\t\t\t\t\t$rslt['logs'] = $log_id = $this->MD_Model->insert_log($insert_logs);\r\n\t\t\t\t\t($log_id) ? $this->MD_Model->insert_log_files($log_id, $log_files) : '';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\techo json_encode($rslt);\r\n\t\twp_die();\r\n\t}", "function rlip_compress_logs_cron($taskname, $runtime = 0, $time = 0) {\n global $CFG;\n $zipfiles = array();\n require_once($CFG->libdir .'/filestorage/zip_archive.php');\n\n if (empty($time)) {\n $time = time() - DAYSECS; //get yesterday's date\n }\n\n //the types of plugins we are considering\n $plugintypes = array('rlipimport' => 'import', 'rlipexport' => 'export');\n //lookup for the directory paths for plugins\n $directories = get_plugin_types();\n //Loop through all plugins...\n $timestamp = userdate($time, get_string('logfiledaily_timestamp','block_rlip'), 99);\n\n foreach ($plugintypes as $plugintype => $pluginvalue) {\n //base directory\n $directory = $directories[$plugintype];\n\n //obtain plugins and iterate through them\n $plugins = get_plugin_list($plugintype);\n\n foreach ($plugins as $name => $path) {\n //skip plugins used for testing only / ones that are not available\n $instance = rlip_dataplugin_factory::factory(\"{$plugintype}_{$name}\");\n if (!$instance->is_available()) {\n continue;\n }\n\n //get the display name from the plugin-specific language string\n $plugin_name = \"{$plugintype}_{$name}\";\n\n //figure out the location (directory) configured for log file storage\n $logfilelocation = get_config($plugin_name, 'logfilelocation');\n if (empty($logfilelocation)) {\n $logfilelocation = RLIP_DEFAULT_LOG_PATH;\n }\n\n $logfilelocation = rtrim($CFG->dataroot, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.\n trim($logfilelocation, DIRECTORY_SEPARATOR);\n $logfileprefix = \"{$pluginvalue}_{$name}\";\n $logfiledate = $timestamp;\n\n //do a glob of all log files of this plugin name and of the previous day's date\n $files = array();\n foreach (glob(\"{$logfilelocation}/{$logfileprefix}_*{$logfiledate}*.log\") as $file) {\n $files[] = $file;\n }\n\n //create a zip file if there are files to archive\n if (!empty($files)) {\n $zipfile = \"{$logfilelocation}/{$logfileprefix}_{$timestamp}.zip\";\n //create the archive\n $zip = new zip_archive();\n if (!$zip->open($zipfile)) {\n continue;\n }\n $zipfiles[] = $zipfile;\n\n foreach ($files as $file) {\n //add the file\n $zip->add_file_from_pathname(basename($file), $file);\n }\n //close the zip -- done!\n $zip->close();\n\n //remove the archived file(s) from the system\n foreach ($files as $file) {\n @unlink($file);\n }\n }\n }\n }\n\n return $zipfiles;\n}", "protected function closeLogFile() {}", "function agate_log($contents)\n{\n error_log($contents);\n}", "private function fileLogAction($code, $class, $message){\n\n $this->FileLog_model->write_log($code, $class, $message);\n\n }", "function log_to_file($stranka, $pozadavek = \"\", $message = \"\", $echo = true) {\n\tif ($echo) echo \"$stranka: $pozadavek: $message <br />\";\n\t$path = \"./log/\";\n\t$referer = (isset($_SERVER[\"HTTP_REFERER\"])) ? $_SERVER[\"HTTP_REFERER\"] : \"\";\n\t// existuje soubor s timto datem?\n\t$datum = new DateTime();\n\t$datumcas = $datum->format(\"Y-m-d H:i\");\n\t$datum = $datum->format(\"Y-m-d\");\n\t$log = fopen($path . $datum . \".log\", \"a\");\n\tif ($log) {\n\t\t$text = $datumcas . \";\" . $stranka . \";\" . $pozadavek . \";\" . $message . \";\" . \";\" . $referer . \"\\n\";\n\t\tfwrite($log, $text);\n\t\tfclose($log);\n\t}\n}", "protected function openLogFile() {}", "function appendLog($logentry)\r\n{\r\n global $phpLogMessage;\r\n $logfile = 'logarr.log';\r\n $logdir = 'assets/data/logs/';\r\n $logpath = $logdir . $logfile;\r\n $date = date(\"D d M Y H:i T \");\r\n\r\n if (file_exists($logdir)) {\r\n ini_set('error_reporting', E_ERROR);\r\n $oldContents = file_get_contents($logpath);\r\n if (file_put_contents($logpath, $oldContents . $date . \" | \" . $logentry . \"\\r\\n\") === false) {\r\n phpLog($phpLogMessage = \"Logarr ERROR: Failed writing to Logarr log file\");\r\n echo \"<script>console.log('%cERROR: Failed writing to Logarr log file.', 'color: red;');</script>\";\r\n return \"Error writing to Logarr log file\";\r\n //return $error;\r\n }\r\n } else {\r\n if (!mkdir($logdir)) {\r\n echo \"<script>console.log('%cERROR: Failed to create Logarr log directory.', 'color: red;');</script>\";\r\n phpLog($phpLogMessage = \"Logarr ERROR: Failed to create Logarr log directory\");\r\n return \"ERROR: Failed to create Logarr log directory\";\r\n } else {\r\n appendLog(\"Logarr log directory created\");\r\n appendLog($logentry);\r\n return \"Logarr log directory created\";\r\n }\r\n }\r\n}", "private static function checkPaths() {\n\t\tif(!is_dir (self::$logpath)) mkdir(self::$logpath, 0777);\n\t\tif(!is_file(self::$logfile)) file_put_contents(self::$logfile, \"<?\\n/**\\n#\\n# Tools Tool Log file\\n#\\n*/\\n\\n\");\n\t}", "protected function readLog()\n\t{\n\n\t $smart = Params::get('smart');\n\n\t\tforeach ($this->reader->getLines() as $entry)\n\t\t{\n\n\t\t\t$entry = Model_LogParser::parseLogEntry(\n\t\t\t\t$entry,\n\t\t\t\t$this->log_info['current_timezone'],\n\t\t\t\t$this->log_info['to_timezone'],\n\t\t\t\t$this->log_info['dateformat'],\n $smart\n\t\t\t);\n\n\t\t\t// Parse entry\n\t\t\tif (!$entry)\n\t\t\t\tcontinue;\n\n\t\t\t// Ignore levels\n\t\t\tif (!empty($this->log_info['ignore_levels']) && in_array($entry['level'], $this->log_info['ignore_levels']))\n\t\t\t\tcontinue;\n\n\t\t\t// Add hostname\n\t\t\t$entry['hostname'] = $this->log_info['hostname'];\n\n\t\t\t// Display entries when verbose mode is used\n\t\t\tif ($this->log_info['verbose'])\n\t\t\t\t$this->console->json($entry);\n\n\n\t\t\t// Send to sender\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$this->sender->send($this->log_info['index'], $entry);\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t$this->console->error('Unable to send logs ' . $e->getMessage());\n\t\t\t}\n\n\t\t}\n\n\n\t}", "function update_log($msg)\r\n\t{\r\n\t\tglobal $LEA_REP;\r\n\r\n\t\t$rep = $LEA_REP.'log/';\r\n\r\n\t\tif(file_exists($rep.$this->id_usager.'.log')){\r\n\t\t\t$fp = fopen($rep.$this->id_usager.'.log', \"a\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$fp = fopen($rep.$this->id_usager.'.log', \"a\");\r\n\t\t\tfwrite($fp, \"********************************************************\\r\\n\\r\\n\");\r\n\t\t\tfwrite($fp, \"Fichier log de : \".$this->civilite.\" \".$this->nom.\" \".$this->prenom.\" du profil : \".$this->profil.\"\\r\\n\\r\\n\");\r\n\t\t\tfwrite($fp, \"********************************************************\\r\\n\\r\\n\");\r\n\t\t}\r\n\r\n\t\tfwrite($fp, $msg);\r\n\t}", "function rlip_compress_logs_email($plugin, $logids, $manual = false) {\n global $CFG, $DB;\n require_once($CFG->libdir.'/filestorage/zip_archive.php');\n\n if (empty($logids)) {\n // Nothing to compress.\n return false;\n }\n\n // Set up the archive.\n $archive_name = rlip_email_archive_name($plugin, 0, $manual);\n $path = $CFG->dataroot.'/'.$archive_name;\n $archive = new zip_archive();\n $result = $archive->open($path, file_archive::CREATE);\n\n // SQL fragments to get the logs.\n list($sql, $params) = $DB->get_in_or_equal($logids);\n $select = \"id {$sql}\";\n\n // Add files from log records, tracking whether a valid log path was found.\n $found = false;\n\n if ($records = $DB->get_records_select(RLIP_LOG_TABLE, $select, $params)) {\n foreach ($records as $record) {\n if ($record->logpath != NULL) {\n $archive->add_file_from_pathname(basename($record->logpath), $record->logpath);\n // Have at least one file in the zip.\n $found = true;\n }\n }\n }\n\n $archive->close();\n\n if (!$found) {\n // No logs, so delete the empty archive file and signal that we don't need to send the email.\n if (file_exists($path)) {\n @unlink($path);\n }\n return false;\n }\n\n return $archive_name;\n}", "protected function _WritePendingExportLogs()\n\t{\n\t\tif(count($this->_exportErrors) == 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach($this->_exportErrors as $module => $typeLog) {\n\t\t\tforeach($typeLog as $type => $log) {\n\t\t\t\t$query = sprintf(\"insert into [|PREFIX|]export_session (type,module,log,data) values ('log','%s','%s','%s')\", $GLOBALS['ISC_CLASS_DB']->Quote($module), $GLOBALS['ISC_CLASS_DB']->Quote($type), $GLOBALS['ISC_CLASS_DB']->Quote($log));\n\t\t\t\t$GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t\t}\n\t\t}\n\t}", "public function export()\n\t{\n\t\t$text = implode(\"\\n\", array_map([$this, 'formatMessage'], $this->messages));\n\t\tif (false === ($fp = fopen($this->logFile, 'a'))) {\n\t\t\tthrow new InvalidConfigException(\"Unable to append to log file: {$this->logFile}\");\n\t\t}\n\t\tflock($fp, LOCK_EX);\n\t\tif ($this->enableRotation) {\n\t\t\t// clear stat cache to ensure getting the real current file size and not a cached one\n\t\t\t// this may result in rotating twice when cached file size is used on subsequent calls\n\t\t\tclearstatcache();\n\t\t}\n\t\tif ($this->enableRotation && filesize($this->logFile) > $this->maxFileSize * 1024) {\n\t\t\t$this->rotateFiles();\n\t\t\tflock($fp, LOCK_UN);\n\t\t\tfclose($fp);\n\t\t\tfile_put_contents($this->logFile, $text, FILE_APPEND | LOCK_EX);\n\t\t} else {\n\t\t\tfwrite($fp, $text);\n\t\t\tflock($fp, LOCK_UN);\n\t\t\tfclose($fp);\n\t\t}\n\t\tif (null !== $this->fileMode) {\n\t\t\tchmod($this->logFile, $this->fileMode);\n\t\t}\n\t}", "public function logResult() : void\n {\n $log = implode(' ', $this->logArray);\n $logger = new Logger('Results');\n $logger->pushHandler(new StreamHandler('file.log', Logger::DEBUG));\n $logger->addInfo($log);\n }", "function gravarLogArquivo($sMessage) {\n\n $oTrace = new BackTrace ();\n $oTrace->levelDown ( 3 );\n\n do {\n $info = $oTrace->getCurrent ();\n if ($info ['file'] && 'classes_simec.inc' != substr ( $info ['file'], - 17 )) {\n break;\n }\n } while ( $oTrace->levelDown () === true );\n\n $errdata = date ( 'Y-m-d H:i:s' );\n $errlinha = $info ['line'] ? $info ['line'] : \"NULL\";\n $errarquivo = $info ['file'] ? \"'\" . substr ( str_replace ( '\\\\', '/', $info ['file'] ), 0, 300 ) . \"'\" : \"NULL\";\n $sisid = $_SESSION ['sisid'] ? $_SESSION ['sisid'] : \"NULL\";\n $usucpf = $_SESSION ['usucpforigem'] ? \"'\" . $_SESSION ['usucpforigem'] . \"'\" : \"NULL\";\n\n $nomeArquivo = 'log_erro_' . date(\"Ymd\") . '.log';\n $pathRaiz = APPRAIZ . 'arquivos/log_erro/';\n\n if(!is_dir($pathRaiz)){\n mkdir($pathRaiz, 0777);\n }\n\n\n $arquivo = fopen($pathRaiz . $nomeArquivo, \"a+\");\n\n $registroExiste = false;\n while(!feof($arquivo)) {\n // lê uma linha do arquivo\n $linha = fgets($arquivo, 4096);\n if(false !== strpos($linha, \"{$errlinha};{$errarquivo};{$sisid};{$sMessage}\")){\n $registroExiste = true;\n break;\n }\n }\n\n if(!$registroExiste){\n $log = \"{$errdata};{$errlinha};{$errarquivo};{$sisid};{$sMessage};{$usucpf}\\r\\n\";\n fwrite($arquivo, $log);\n }\n\n fclose($arquivo);\n\n return $registroExiste;\n }", "public function logs() {\n\t\t$this->out('Deleting logs:');\n\t\tif (!empty($this->args)) {\n\t\t\tforeach ($this->args as $arg) {\n\t\t\t\tif (!is_dir(LOGS . $arg)) {\n\t\t\t\t\t$this->err('No log dir \\'' . $arg . '\\'');\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$this->out('\\'' . $arg . '\\' emptied');\n\t\t\t\t$this->_empty(LOGS . $arg);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->_empty(LOGS);\n\t\t\t$this->out('All log files deleted');\n\t\t}\n\t}", "private function readErrors()\n {\n $fh = fopen($this->logdir.\"hermes.log\", \"r\");\n if($fh == FALSE)\n return;\n if(flock($fh, LOCK_EX))\n {\n $line = fgets($fh);\n while($line != FALSE)\n {\n $pair = split(' ', $line);\n $this->errors[$pair[0]] = $pair[1]; //undefined offset whatever lol\n $line = fgets($fh);\n }\n flock($fh, LOCK_UN);\n }\n fclose($fh);\n }", "function make_file_logger() {\n\t\t\n\t\t$path = owa_coreAPI::getSetting('base', 'error_log_file');\n\t\t//instantiate a a log file\n\t\t$conf = array('name' => 'debug_log', 'file_path' => $path);\n\t\t$this->loggers['file'] = owa_coreAPI::supportClassFactory( 'base', 'logFile', $conf );\n\t}", "function gererErreurs ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n // Construire le message d'erreur\n $strMessage = \"Une erreur est survenue dans le script '$e_file' a la ligne $e_line: \\n<br />$e_number : $e_message\\n<br />\";\n // Ajouter la date et l'heure\n $strMessage .= \"Date/Time: \" . date('n-j-Y H:i:s') . \"\\n<br />\";\n // Ajouter $e_vars au $message.\n $strMessage .= \"<pre>\" . print_r ($e_vars, 1) . \"</pre>\\n<br />\";\n // On peut aussi créer un journal d'erreurs et/ou envoyer par courriel.\n //@todo ramener la gestion selon $blnLocal. C'est fait.\n if ($GLOBALS['blnLocal']) {\n echo '<p class=\"error\">' . $strMessage . '</p>';\n //error_log ($strMessage, 3, \"log-err.txt\");\n } else {\n // En production, on veut seulement un courriel.\n //error_log ($strMessage, 1, $GLOBALS['courrielContact']);\n }\n // \tpour l'instant, Afficher l'erreur\n echo '<p class=\"error\">' . $strMessage . '</p>';\n }", "public function download_export_log() : void {\n $export_log = SiteInfo::getPath( 'uploads' ) .\n 'wp2static-working-files/EXPORT-LOG.txt';\n\n if ( is_file( $export_log ) ) {\n // create zip of export log in tmp file\n $export_log_zip = SiteInfo::getPath( 'uploads' ) .\n 'wp2static-working-files/EXPORT-LOG.zip';\n\n $zip_archive = new ZipArchive();\n $zip_opened =\n $zip_archive->open( $export_log_zip, ZipArchive::CREATE );\n\n if ( $zip_opened !== true ) {\n throw new WP2StaticException(\n 'Could not create archive'\n );\n }\n\n $real_filepath = realpath( $export_log );\n\n if ( ! $real_filepath ) {\n $err = 'Trying to add unknown file to Zip: ' . $export_log;\n WsLog::l( $err );\n throw new WP2StaticException( $err );\n }\n\n if ( ! $zip_archive->addFile(\n $real_filepath,\n 'EXPORT-LOG.txt'\n )\n ) {\n throw new WP2StaticException(\n 'Could not add Export Log to zip'\n );\n }\n\n $zip_archive->close();\n\n echo SiteInfo::getUrl( 'uploads' ) .\n 'wp2static-working-files/EXPORT-LOG.zip';\n } else {\n throw new WP2StaticException(\n 'Unable to find Export Log to create ZIP'\n );\n }\n }", "function log_it($msg) {\n//OUT: No return, although log file is updated\n//PURPOSE: Log messages to email and text files.\n\n $msg = date('m/d/y H:i:s : ', time()) . $msg . PHP_EOL;\n\n error_log(msg, 1, ERROR_E_MAIL);\n \terror_log(msg, 3, ERROR_LOG_FILE);\n}", "public function recorrerArchivoTXT(){\n $array = [];\n\n for ($row = $this->filaDesde; $row <= $this->filaHasta; ++ $row) {\n $item = new ExtractoBancarioItemVO();\n $registro = $this->FILE[$row];\n if($this->idTipoBanco['valor'] == 5){\n //pongo como separador la coma.\n $registro = preg_replace('/ +/', \",\", $registro);\n }\n\n $registro = explode (\",\" , $registro);\n\n if($this->idTipoBanco['valor'] == 5){\n //la posición 4 del vector es un error al hacer el parseo, no hay que considerarlo.\n //arreglo los valores del array para sacar un caracter inválido que viene del archivo.\n $invalido = $registro[1][0].$registro[1][1]; //en esta posición encuentro el caracter inválido.\n foreach ($registro as &$valor){\n $valor = str_replace($invalido, \"\", $valor);\n $valor = trim ($valor);\n }\n }\n\n for ($col = $this->columnaDesde; $col < $this->columnaHasta; ++ $col) {\n //si la columna leída nos interesa continúo.\n if(in_array($col, $this->columnas)){\n $val = $registro[$col];\n array_push($array, trim($val));\n }\n }\n\n $item->asignarValores($array, $this->idTipoBanco['valor']); //asigno los valores al objeto.\n $this->mensaje['valor'] .= $item->idTipoBancoConcepto['referencia']->result->getMessage();\n //si el status no es OK, incremento el contador de erróneos.\n if($item->idTipoBancoConcepto['referencia']->result->getStatus() != STATUS_OK)\n $this->cantidadRegistrosError['valor']++;\n $this->extractoBancarioItemArray[] = $item; //agrego el registro al array.\n\n $array = [];\n $this->cantidadRegistros['valor']++;\n }\n }", "function setLog( $msg = NULL )\n {\n if( $msg == NULL ){\n \t\t$this->logErro = \n<<<EOT\n =============== *UPLOAD* LOG =============== <br />\n Pasta destino: $this->path <br />\n \tNome do arquivo: {$this->source[ \"name\" ]} <br />\n Tamanho do arquivo: {$this->source[ \"size\" ]} bytes<br />\n Tipo de arquivo: {$this->source[ \"type\" ]} <br />\n\t\t---------------------------------------------------------------<br /><br />\nEOT;\n }else{\n \t\t$this->logErro .= $msg;\n }\n }", "protected static function compressOlderDirs(){\n\t\t// check if there are old dirs to pack\n\t\t$dirs\t= array_reverse( glob( self::LOG_DIR . '*', GLOB_ONLYDIR ) );\n\t\t//don't delete folders from last days\n\t\t$dirs\t= array_slice( $dirs, self::MAX_DAYS );\n\t\tforeach ( $dirs as $d ) {\n\t\t\t$ret = 0;\n\t\t\tpassthru( \"tar -czf {$d}.tgz {$d}\", $ret );\n\t\t\t//if packing succeeded, delete log directory\n\t\t\tif( $ret == 0 ) {\n\t\t\t\tFileSystem::deleteDir( $d, true );\n\t\t\t}\n\t\t}\n\t}", "function logToFile($arg1=\"\", $arg2=\"\",$arg3=\"\",$arg4=\"\",$arg5=\"\",$arg6=\"\"){\n\n\t$time = date(\"Y-m-d H:i:s\");\n\t\n\t$date = date(\"Y-m-d\");\n\t\n\t$str = \" $time \\t $arg1 \\t $arg2 \\t $arg3 \\t $arg4 \\t $arg5 \\t $arg6 \\t \\n\"; \n\t\n\terror_log(\"$str\\n\", 3, 'log/test_MoveProspectAccounts_'.$date.'.log'); \n\n}", "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 logExcepMessage($path,$message){\n\t\ttry{\n\t\n\t\t\t$dataStamp = date('Y-m-d g:i a');\n\t\t\t$file = fopen($path, \"a+\");\n\t\t\tif( $file == false ) \n\t\t\t\tdie( \"Error in opening file\" );\n\t\t\tfwrite( $file, \"$dataStamp: $message\\n\" );\n\t\t\tfclose( $file );\n\t\t}\n\t\tcatch(Exception $e){\n\t\t}\n\t}", "public function testOnOutput()\n {\n // $this->debug->addPlugin($this->debug->pluginLogFiles);\n\n // test logEnvInfo.files = false\n $this->debug->pluginLogFiles->onOutput();\n $this->assertSame(array(), $this->debug->data->get('log'));\n\n // test no files\n $this->debug->getChannel('Files')->clear(Debug::CLEAR_SILENT);\n $this->debug->setCfg('logEnvInfo', array('files' => true));\n $this->debug->pluginLogFiles->setFiles(array());\n $this->debug->pluginLogFiles->onOutput();\n $logEntries = $this->debug->data->get('log');\n $logEntries = $this->helper->deObjectifyData($logEntries);\n $this->assertSame(array(\n array(\n 'method' => 'info',\n 'args' => array(\n '0 files required',\n ),\n 'meta' => array(\n 'channel' => 'Files',\n ),\n ),\n array(\n 'method' => 'info',\n 'args' => array(\n 'All files excluded from logging',\n ),\n 'meta' => array(\n 'channel' => 'Files',\n ),\n ),\n array(\n 'method' => 'log',\n 'args' => array(\n 'See %clogFiles.filesExclude%c config',\n 'font-family: monospace;',\n '',\n ),\n 'meta' => array(\n 'channel' => 'Files',\n ),\n ),\n ), $logEntries);\n\n // test asTree = true;\n $this->debug->getChannel('Files')->clear(Debug::CLEAR_SILENT);\n $this->debug->pluginLogFiles->setCfg('filesExclude', array(\n '/excludedDir',\n 'closure://function',\n ));\n $this->debug->pluginLogFiles->setFiles(array(\n '/var/www/bootstrap.php',\n '/var/www/index.php',\n '/var/www/excludedDir/subdir/file.php',\n 'closure://function',\n ));\n $this->debug->pluginLogFiles->onOutput();\n $logEntries = $this->debug->data->get('log');\n $logEntries = $this->helper->deObjectifyData($logEntries);\n $this->assertSame(array(\n array(\n 'method' => 'info',\n 'args' => array(\n '4 files required',\n ),\n 'meta' => array(\n 'channel' => 'Files',\n ),\n ),\n array(\n 'method' => 'info',\n 'args' => array(\n '2 files logged',\n ),\n 'meta' => array(\n 'channel' => 'Files',\n ),\n ),\n array(\n 'method' => 'log',\n 'args' => array(\n array(\n 'debug' => Abstracter::ABSTRACTION,\n 'options' => array(\n 'asFileTree' => true,\n 'expand' => true,\n ),\n 'type' => 'array',\n 'value' => array(\n '/var/www' => array(\n 'excludedDir' => array(\n array(\n 'attribs' => array(\n 'class' => array('exclude-count'),\n ),\n 'debug' => Abstracter::ABSTRACTION,\n 'type' => 'string',\n 'value' => '1 omitted',\n ),\n ),\n array(\n 'attribs' => array(\n 'class' => array(),\n 'data-file' => '/var/www/bootstrap.php',\n ),\n 'debug' => Abstracter::ABSTRACTION,\n 'type' => 'string',\n 'value' => 'bootstrap.php',\n ),\n array(\n 'attribs' => array(\n 'class' => array(),\n 'data-file' => '/var/www/index.php',\n ),\n 'debug' => Abstracter::ABSTRACTION,\n 'type' => 'string',\n 'value' => 'index.php',\n ),\n ),\n 'closure://function' => array(\n array(\n 'attribs' => array(\n 'class' => array(\n 'exclude-count',\n ),\n ),\n 'debug' => Abstracter::ABSTRACTION,\n 'type' => 'string',\n 'value' => '1 omitted',\n ),\n ),\n ),\n ),\n ),\n 'meta' => array(\n 'channel' => 'Files',\n 'detectFiles' => true,\n ),\n ),\n ), $logEntries);\n\n // test asTree = false;\n $this->debug->getChannel('Files')->clear(Debug::CLEAR_SILENT);\n $this->debug->pluginLogFiles->setCfg('asTree', false);\n $this->debug->pluginLogFiles->onOutput();\n $logEntries = $this->debug->data->get('log');\n $logEntries = $this->helper->deObjectifyData($logEntries);\n // echo json_encode($logEntries, JSON_PRETTY_PRINT) . \"\\n\";\n $this->assertSame(array(\n array(\n 'method' => 'info',\n 'args' => array(\n '4 files required',\n ),\n 'meta' => array(\n 'channel' => 'Files',\n ),\n ),\n array(\n 'method' => 'info',\n 'args' => array(\n '2 files logged',\n ),\n 'meta' => array(\n 'channel' => 'Files',\n ),\n ),\n array(\n 'method' => 'log',\n 'args' => array(\n array(\n '/var/www/bootstrap.php',\n '/var/www/index.php',\n ),\n ),\n 'meta' => array(\n 'channel' => 'Files',\n 'detectFiles' => true,\n ),\n ),\n array(\n 'method' => 'log',\n 'args' => array(\n '2 excluded files',\n array(\n '/var/www/excludedDir' => 1,\n 'closure://function' => 1,\n ),\n ),\n 'meta' => array(\n 'channel' => 'Files',\n ),\n ),\n ), $logEntries);\n }", "private function startExtensionArchive(): void {\n // Durchlaufe alle definiertne Archive-Klassen\n foreach ($this->archiveConfig as $archiveClassName => $archiveConfig) {\n echo PHP_EOL . \"*** Starte Archivierung der Wetterwarnungen mit '\" . $archiveClassName .\n \"' Modul:\" . PHP_EOL;\n\n // Instanziere Klasse\n /** @var ArchiveToInterface $archiveClassPath */\n $archiveClassPath = '\\\\blog404de\\\\WetterWarnung\\\\Archive\\\\' . $archiveClassName;\n $this->archiveClass = new $archiveClassPath();\n\n // Konfiguriere Action-Klasse\n $this->archiveClass->setConfig($archiveConfig);\n\n // Verarbeite jede Wetterwarnung\n foreach ($this->wetterWarnungen as $parsedWarnInfo) {\n // Speichere Wetterwarnung in das Archiv\n $this->archiveClass->saveToArchive($parsedWarnInfo);\n }\n }\n }", "function db_log($query,$executedto){\n\t//$temp = $_SERVER['DOCUMENT_ROOT'].\"\\\\pk\\\\errorlog\\\\\";\n\t//$default_folder = str_replace(\"/\",\"\\\\\",$temp);\t\n\t$file_name = \"./errorlog/querylog.html\";//$default_folder.\"querylog.html\";\n\t$file_handler = fopen($file_name,\"a\");\n\t$serializedPost = serialize($_POST);\n\t$message = \"<br><i>executed at: \".date('l jS \\of F Y h:i:s A').\" details: \".$executedto.\"</i><br><b>\".$query.\" </b>\".$serializedPost.\"<br>\";\t\n\tfwrite($file_handler,$message);\n\tfclose($file_handler);\n}", "public function escribeLog($cadena) {\n $fecha = date(\"d-m-Y\");\n $archivo = \"SondaUBosque-\" . $fecha . \".log\";\n $fp = fopen($archivo, \"a\");\n $write = fputs($fp, $cadena);\n fclose($fp);\n }", "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 log1($msg)\n{\n if(WRITE_LOG == false)\n return;\n date_default_timezone_set('Europe/Vienna');\n $now = date(\"Y-m-d H:i:s\");\n $line = sprintf(\"%s => %s\\r\\n\", $now, $msg);\n file_put_contents(LOG_FILE, $line, FILE_APPEND);\n}", "function newLog($log, $date)\r\n{\r\n\t// Find the age threshold for deleting old logs\r\n\t$minage = time() - LACE_ARCHIVE_DAYS * 86400;\r\n\r\n\t// Delete logs that are too old\r\n\t$handle = opendir(LACE_LOGDIR);\r\n\twhile ($file = readdir($handle))\r\n\t{\r\n\t\tif($file == '.' || $file == '..')\r\n\t\t\tcontinue;\r\n\r\n\t\t// Filenames are in MMDDYYYY.dat format\r\n\t\t$newfile = str_replace('.dat', '', $file);\r\n\t\t$filedate = strtotime(substr($newfile, 0, 2).\"/\".substr($newfile, 2, 2).\"/\".substr($newfile, 4, 4));\r\n\r\n\t\t// Delete\r\n\t\tif ($filedate < $minage)\r\n\t\t\tunlink(LACE_LOGDIR.$file);\r\n\t}\r\n\tclosedir($handle);\r\n\r\n\t// Write the new log file\r\n\t$filename = date('mdY', $date).'.dat';\r\n $log = implode(\"\\n\", array_map('trim',$log)).\"\\n\";\r\n $handle = fopen(LACE_LOGDIR.$filename, 'a');\r\n fwrite($handle, $log);\r\n fclose($handle);\r\n // return an empty array, signifying\r\n // that the main logfile is empty\r\n \treturn array();\r\n}", "public function bajarArchivos()\n {\n $anio = date('Y');\n ////$mes = (int)date('m')-1;\n\n $mes = (int) date('m')-(int)\\Config::get('constants.constantes.mes_proceso');\n if($mes == 0){\n $anio = $anio - 1;\n $mes = 1;\n } \n\n ini_set('max_execution_time', 0);\n ini_set('memory_limit', '-1');\n ini_set('default_socket_timeout', 600);\n ini_set('upload_max_filesize ', '40M');\n ini_set('post_max_size ', '40M');\n \n $empresas = Empresa::all()->sortBy(\"codigo\");\n\n //Ver con tavo como seria la query para no traer TODOS\n\n $i=0;\n $msg=\"\";\n foreach ($empresas as $empresa) {\n //Veo si existe un procesamiento para el anio, mes, codigo\n //$existeProcesamientoArchivoFinalizado = ProcesamientoArchivo::where('anio','=',$anio)->where('mes','=',$mes)->where('codigo','=', $empresa->codigo)->where('estado','=', 'Finalizado')->count();\n $existeProcesamientoArchivoFinalizado = $this->procesamientoArchivoRepository->existeProcesamientoArchivoPorEstado($anio, $mes, $empresa->codigo, \"Fin bajada de archivo\");\n if($existeProcesamientoArchivoFinalizado == 0){\n //if($i<4 && $empresa->codigo!=\"YPF\"){\n if($i<6){\n $i++;\n $this->procesamientoArchivoRepository->crearProcesamientoArchivoEstado($anio, $mes, $empresa->codigo, \"Inicio bajada de archivo\", \"\", $empresa->id);\n\n $PozoService = new PozoService($anio, $empresa->codigo, $mes);\n \\Log::info('init descarga');\n $nombreArchivo = $anio.\"-\".$mes.\"-\".$empresa->codigo.\"-ddjj.xlsx\";\n\n $msg.=\"Codigo empresa bajado ==> \".$empresa->codigo;\n\n $excel = $PozoService->processPozos($nombreArchivo);\n \\Log::info('fin descarga');\n \n $this->procesamientoArchivoRepository->crearProcesamientoArchivoEstado($anio, $mes, $empresa->codigo, \"Fin bajada de archivo\", \"Pendiente\", $empresa->id);\n if($excel == \"\"){\n $msg.=\" ==> No existe excel para esta empresa en este mes.\";\n $this->procesamientoArchivoRepository->crearProcesamientoArchivoEstado($anio, $mes, $empresa->codigo, \"No hay DDJJ (sin Excel)\", \"\", $empresa->id); \n } \n $msg.=\"<br>\";\n }\n }\n } \n\n if($i==0)\n echo \"No quedan archivos por bajar este mes\";\n else\n echo \"Se bajaron \".$i.\" archivos. \".$msg.\" Aun quedan archivos por bajar\";\n }", "public function write_log($s_log_msg,$i_user_id,$s_log_sql=\"\")\r\n {\r\n try\r\n\t\t{/*\r\n ////////Opening XML File For logging//////\r\n $s_log_file=date(\"Y-M\").\".bin\";///saved as binary file. ex- 2010-Sep \r\n\r\n if(file_exists($this->log_path.$s_log_file))\r\n {\r\n //$logData=file_get_contents($this->log_path.$logFile);\r\n //$xml=simplexml_load_string($logData); \t\t\t \r\n\t\t\t \r\n\t\t\t $xml_obj=new SimpleXMLElement($this->log_path.$s_log_file,LIBXML_NOCDATA ,true); \r\n $log_obj=$xml_obj->addChild('Log');\r\n $log_obj->addAttribute(\"date\",date('Y-m-d H:i:s'));\r\n $log_obj->addAttribute(\"user_id\",$i_user_id);\r\n $log_obj->addChild('Msg',\"<![CDATA[\".$s_log_msg.\"]]>\");///msg tag\r\n if(trim($s_log_sql)!=\"\")\r\n $log_obj->addChild('Sql',\"<![CDATA[\".$s_log_sql.\"]]>\");///sql tag\r\n \r\n unset($log_obj,$s_log_msg,$i_user_id,$s_log_sql);\r\n //return $xml_obj->asXML($this->log_path.$s_log_file); \r\n\t\t\t ///////for using CDATA ///////\r\n\t\t\t $file_data=$xml_obj->asXML();\r\n\t\t\t $arr_search=array(\"<Msg>&lt;![CDATA\",\"]]&gt;</Msg>\",\"<Sql>&lt;![CDATA\",\"]]&gt;</Sql>\");\r\n\t\t\t $arr_replace=array(\"<Msg><![CDATA\",\"]]></Msg>\",\"<Sql><![CDATA\",\"]]></Sql>\");\r\n\t\t\t $file_data=str_replace($arr_search,$arr_replace,$file_data,$cnt);\r\n\t\t\t file_put_contents($this->log_path.$s_log_file,$file_data);\r\n\t\t\t unset($arr_search,$arr_replace);\r\n\t\t\t return $file_data;\r\n\t\t\t ///////end for using CDATA /////// \r\n \r\n }\r\n else///creating new xml file\r\n {\r\n $xml_obj=new SimpleXMLElement('<?xml version=\"1.0\" encoding=\"utf-8\"?><LogRegister></LogRegister>',LIBXML_NOCDATA);\r\n $log_obj=$xml_obj->addChild('Log');\r\n $log_obj->addAttribute(\"date\",date('Y-m-d H:i:s'));\r\n $log_obj->addAttribute(\"user_id\",$i_user_id);\r\n $log_obj->addChild('Msg',\"<![CDATA[\".$s_log_msg.\"]]>\");///msg tag\r\n if(trim($s_log_sql)!=\"\")\r\n $log_obj->addChild('Sql',\"<![CDATA[\".$s_log_sql.\"]]>\");///sql tag \r\n \r\n unset($log_obj,$s_log_msg,$i_user_id,$s_log_sql);\r\n //return $xml_obj->asXML($this->log_path.$s_log_file); \r\n\t\t\t ///////for using CDATA ///////\r\n\t\t\t $file_data=$xml_obj->asXML();\r\n\t\t\t $arr_search=array(\"<Msg>&lt;![CDATA\",\"]]&gt;</Msg>\",\"<Sql>&lt;![CDATA\",\"]]&gt;</Sql>\");\r\n\t\t\t $arr_replace=array(\"<Msg><![CDATA\",\"]]></Msg>\",\"<Sql><![CDATA\",\"]]></Sql>\");\r\n\t\t\t $file_data=str_replace($arr_search,$arr_replace,$file_data,$cnt);\r\n\t\t\t file_put_contents($this->log_path.$s_log_file,$file_data);\r\n\t\t\t unset($arr_search,$arr_replace);\r\n\t\t\t return $file_data;\r\n\t\t\t ///////end for using CDATA /////// \r\n\t\t\t \t\t\t \r\n }\r\n ////////end Opening XML File For logging//////\r\n return FALSE; \r\n \r\n */}\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "public function log($entries) {\n\n date_default_timezone_set('Europe/Madrid');\n\n if(is_string($entries)) {\n fwrite($this->handle, \"Error: [\" . date($this->dateFormat) . \"] \" . $entries);\n $this->addIpClient();\n\n return;\n }\n\n if(is_array($entries)) {\n $firstLine = true;\n foreach($entries as $value) {\n if($firstLine) {\n fwrite($this->handle, \"Error: [\" . date($this->dateFormat) . \"] \" . $value);\n $firstLine = false;\n continue;\n }\n fwrite($this->handle, $value);\n }\n\n $this->addIpClient();\n }\n }", "public function process($data)\n {\n // Delete previous set\n $this->deleteWhere('serial_number=?', $this->serial_number);\n\n // Parse log data\n $start = ''; // Start date\n $errors = array();\n $now = time();\n $four_weeks = $now + 3600 * 24 * 7 * 4;\n\n foreach (explode(\"\\n\", $data) as $line) {\n if ($line) {\n $parts = explode(\"\\t\", $line);\n\n if (count($parts) !== 3) {\n echo 'Invalid log entry: '.$line;\n } else {\n // Convert unix timestamp string to int\n $this->cert_exp_time = intval($parts[0]);\n // Trim path to 255 chars\n $this->cert_path = substr($parts[1], 0, 254);\n // Get common name out of subject\n if (preg_match('/subject= CN = ([^,]+)/', $parts[2], $matches)) {\n $this->cert_cn = $matches[1];\n } else {\n $this->cert_cn = 'Unknown';\n }\n\n $this->id = '';\n $this->timestamp = time();\n $this->create();\n \n // Check for errors\n if ($this->cert_exp_time < $now) {\n $errors[] = array(\n 'type' => 'danger',\n 'msg' => 'cert.expired',\n 'data' => json_encode(array(\n 'name' => $this->cert_cn,\n 'timestamp' => $this->cert_exp_time\n ))\n );\n } elseif ($this->cert_exp_time < $four_weeks) {\n $errors[] = array(\n 'type' => 'warning',\n 'msg' => 'cert.expire_warning',\n 'data' => json_encode(array(\n 'name' => $this->cert_cn,\n 'timestamp' => $this->cert_exp_time\n ))\n );\n }\n }\n }\n }// end foreach()\n \n if (! $errors) {\n $this->delete_event();\n } else {\n if (count($errors) == 1) {\n $error = array_pop($errors);\n $this->store_event($error['type'], $error['msg'], $error['data']);\n } else {\n // Loop through errors and submit stats\n $error_count = 0;\n $last_error = array();\n $warning_count = 0;\n // Search through errors and warnings\n foreach ($errors as $error) {\n if ($error['type'] == 'danger') {\n $last_error = $error;\n $error_count ++;\n }\n if ($error['type'] == 'warning') {\n $warning_count ++;\n }\n }\n // If errors, ignore warnings\n if ($error_count) {\n $type = 'error';\n if ($error_count == 1) {\n $msg = $last_error['msg'];\n $data = $last_error['data'];\n } else {\n $msg = 'cert.multiple_errors';\n $data = $error_count;\n }\n } else {\n $type = 'warning';\n $msg = 'cert.multiple_warnings';\n $data = $warning_count;\n }\n $this->store_event($type, $msg, $data);\n }\n }\n }", "public function log_accessi($cartella='',$dati_aggiuntivi=''){\n\n\t\t$Ndata=new Ndate();\t\n\t\t\t\n\t\t$ip = $_SERVER['REMOTE_ADDR']; //Indirizzo ip\n\t\t$agent = $_SERVER['HTTP_USER_AGENT']; //User agent come Firefox etc, e altre informazioni.\n\t\t$ref = $_SERVER['HTTP_REFERER']; // Referer, come sono arrivati al sito, con che link, dove lo hanno cliccato\n\t\t$date = $Ndata->nomegiorno().' '.$Ndata->giorno().' '.$Ndata->nomemese().' '.$Ndata->anno().' alle '.$Ndata->ora('','si'); //Data e giorno.\n\t\tif($cartella!='')$cartella.='/';\n\t\t$file = $cartella.\"Nlog.htm\"; //Nome del file log.\n\n\t\t$open = fopen($file, \"a+\"); //Apri il file\n\t\t\t\n\t\tfwrite($open, \"<p><b>Indirizzo IP:</b> \" .$ip . \"<br/>\"); //stampa/scrivi indriizzo ip.\n\t\tfwrite($open, \"<b>Referer:</b>\". $ref . \"<br/>\"); //stampa/scrivi il referer.\n\t\tfwrite($open, \"<b>UserAgent:</b>\". $agent. \"<br/>\"); //stampa/scrivi lo useragent.\n\t\tfwrite($open, \"<b>Data & Ora:</b>\". $date. \"<br/>\"); //stampa/scrivi data e ora\n\t\t\n\t\tif($dati_aggiuntivi!=''){\n\t\t\t$dati=explode(',,',$dati_aggiuntivi);\n\t\t\tfor($i=0;$i<count($dati);$i++){\n\t\t\t\tfwrite($open, \"<b>\".$dati[$i++].\":</b>\". $dati[$i]. \"<br/>\"); //aggiungi valori aggiuntivi al file\n\t\t\t}\n\t\t}\n\t\tfwrite($open, \"</p>\");\n\t\t\n\t\tfclose($open); // chiudi il file\n\t}", "public function collect_logs()\n {\n $body = file_get_contents(\"php://input\");\n $r = @file_get_contents('/tmp/apple.push.log');\n file_put_contents('/tmp/apple.push.log', $r . $body);\n return 'success'; \n }", "public function collectInfoFiles()\r\n {\r\n $files_found = $this->findFiles($this->destination_dir, array('md', '1st', 'txt'));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }", "private function wrlog($content){\n\t\t$path = $_SERVER['DOCUMENT_ROOT'];\n\t\t$file = fopen($path.\"/errors/logs/log.txt\", \"a\");\n\t\tif($file && $path){\n\t\t\tif(is_array($content)){\n\t\t\t\tforeach ($content as $line => $value) {\n\t\t\t\t\tif(is_array($value)){\n\t\t\t\t\t\t$this->wrlog($value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfwrite($file, $line . \"=>\" . $value . \"\\r\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif(is_object($content)) {\n\t\t\t\tforeach (get_object_vars($content) as $obj_line => $value) {\n\t\t\t\t\tfwrite($file, $obj_line . \"=>\" . $value . \"\\r\\n\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfwrite($file, $content.\"\\r\\n\");\n\t\t\t}\n\t\t\tfclose($file);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function updateLogged($aUnQuery, $aFileName) {\r\n echo \"</br><b>maintenance started</b></br>\";\r\n $fileAr = file($aFileName);\r\n $uidCtr = 0;\r\n\r\n foreach ($fileAr as $i => $elem) {\r\n $line = $fileAr[$i];\r\n $delim = ':';\r\n $data = str_getcsv($line, $delim);\r\n\r\n if ($data[1] == 0) {\r\n $sqlError = sqlUnsubscribe($aUnQuery, $data[0]);\r\n if($sqlError == false){\r\n $data[1] = 1;\r\n $fileAr[$i] = $data[0] . $delim . $data[1] . \"\\n\";\r\n echo \"</br>Unsubscribing: \" . $data[0];\r\n $uidCtr++;\r\n } else {\r\n echo \"</br>Error with database connection.\";\r\n break;\r\n }\r\n }\r\n }\r\n file_put_contents($aFileName, implode('', $fileAr), LOCK_EX);\r\n \r\n echo \"</br><b>maintenance finished - UUIDs processed: </b>\" . ($uidCtr - 1)\r\n . \"</br>\";\r\n}", "public function serve_log_downloads() {\n\t\tif ( empty( $_GET['tribe-common-log'] ) || 'download' !== $_GET['tribe-common-log'] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! wp_verify_nonce( @$_GET['check'], 'download_log' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( empty( $_GET['log'] ) || ! in_array( $_GET['log'], $this->get_available_logs() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$log_name = sanitize_file_name( $_GET['log'] );\n\t\t$this->current_logger()->use_log( $log_name );\n\n\t\t/**\n\t\t * Provides an opportunity to modify the recommended filename for a downloaded\n\t\t * log file.\n\t\t *\n\t\t * @param string $log_name\n\t\t */\n\t\t$log_name = apply_filters( 'tribe_common_log_download_filename', $log_name );\n\n\t\theader( 'Content-Disposition: attachment; filename=\"tribe-log-' . $log_name . '\"' );\n\t\t$output = fopen( 'php://output', 'w' );\n\n\t\tforeach ( $this->current_logger()->retrieve() as $log_entry ) {\n\t\t\tfputcsv( $output, $log_entry );\n\t\t}\n\n\t\tfclose( $output );\n\t\texit();\n\t}", "public function cleanUpOldLog() {\n\t\t$timestamp = Utils::instance()->localToUtc( apply_filters( 'ip_lockout_logs_store_backward', '-' . Settings::instance()->storage_days . ' days' ) );\n\t\tLog_Model::deleteAll( array(\n\t\t\t'date' => array(\n\t\t\t\t'compare' => '<=',\n\t\t\t\t'value' => $timestamp\n\t\t\t),\n\t\t), '0,1000' );\n\t}", "protected function assertErrorLogEntries() {}", "function processFiles($itemnumber, $aOCRData, $aDirectories, $sLogFile)\r\n{\r\n\t$aResults = array();\r\n\t$htmdirectory = $aDirectories['htm'];\r\n\t//$tifdirectory = $aDirectories['tif'];\r\n\t$ocrdonedirectory = $aDirectories['postocr'];\r\n\t$skippeddirectory = $aDirectories['skipped'];\r\n\t$readydirectory = $aDirectories['ready'];\r\n\r\n\t$tifdirectory = $ocrdonedirectory;\r\n\r\n\t//check if a directory for this itemnumber exists; if not, create it\r\n\t$itemdirectory = $readydirectory . '\\\\' . $itemnumber . '\\\\';\r\n\techo \"itemdir is $itemdirectory <br><br>\\n\";\r\n\r\n\tif (!(@opendir($itemdirectory))) {\r\n\t\ttry {\r\n\t\t\tmkdir($itemdirectory, 0755);\r\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t\t\techo 'could not create a directory for this item ' . \"\\n\";\r\n\t\t\t$warning = 'Het systeem kon geen directory maken om de bestanden te plaatsen ' . \"\\n\";\r\n\t\t\t$lfh = fopen($sLogFile, 'a');\r\n\t\t\t$errorline = date(\"Y m d H:m\") . $warning;\r\n\t\t\tfwrite($lfh, $errorline);\r\n\t\t\tfclose($lfh);\r\n\r\n\t\t\t$aResults['error'] = $warning;\r\n\t\t\treturn $aResults;\r\n\t\t}\r\n\t}\r\n\r\n\t//for each page in the item: process htm and tif file\r\n\tforeach ($aOCRData as $sScannumber=>$bOcr) {\r\n\t\t$filenamebase = $itemnumber . sprintf(\"%04d\", $sScannumber);\r\n\r\n //process htm and tif file\r\n\t\tif ($bOcr == '1') {\r\n\t\t\t//update htm and write updated file to Ready\r\n\r\n $htmfile = $htmdirectory . '\\\\' . $filenamebase . '.htm';\r\n\t\t\t$contents = file_get_contents($htmfile);\r\n\t\t\t$markedup = '';\r\n \t\t$endhead = '/<\\/head>/i';\r\n \t\t$newmeta = '<meta name=\"bookid\" content=\"' . $itemnumber . '\">' . \"\\n\" . '</head>';\r\n \t\t$markedup = preg_replace($endhead, $newmeta, $contents);\r\n\r\n\t\t\t$newfile = $itemdirectory. sprintf(\"%04d\", $sScannumber) . '.htm';\r\n\t\t\t//echo 'updating text to ' . $newfile . \"\\n\";\r\n\t\t\t$updateresult = file_put_contents($newfile, $markedup);\r\n\t\t\t//some checking on result?\r\n\r\n\r\n\t\t\t//remove old htm file\r\n\t\t\t//drastic way of removing file, as simple unlink will not always work\r\n\t\t\twhile (is_file($htmfile) == TRUE) {\r\n\t\t\t\tchmod($htmfile, 0666);\r\n\t\t\t\tunlink($htmfile);\r\n\t\t\t}\r\n\r\n\t\t\t//move tif file to Ready\r\n\t\t\t$tiffile = $tifdirectory . '\\\\' . $filenamebase . '.tif';\r\n\t\t\t$destination = $itemdirectory . '\\\\' . $filenamebase . '.tif';\r\n\t\t\t//echo 'move ocred from ' . $tiffile . 'to ' . $destination . \"<br>\\n\";\r\n\t\t\t$result = @rename($tiffile, $destination);\r\n\t\t\t//check on result\r\n\t\t\tif ($result != 1) {\r\n\t\t\t\t$lfh = fopen($sLogFile, 'a');\r\n\t\t\t\t$errorline = date(\"Y m d H:m \") . \" kon niet schrijven naar $destination <br>\\n\";\r\n\t\t\t\tfwrite($lfh, $errorline);\r\n\t\t\t\tfclose($lfh);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse { //no htm, so just move tif file\r\n $tiffile = $skippeddirectory . '\\\\' . $filenamebase . '.tif';\r\n $destination = $itemdirectory . '\\\\' . $filenamebase . '.tif';\r\n $result = 'b';\r\n\r\n //make sure the tif file exists\r\n if (!(file_exists($tiffile))) {\r\n $aResults['message'] = 'Het boek is niet compleet ik mis ' . $filenamebase . '.tif';\r\n\t\t\t$aResults['result'] = '0';\r\n }\r\n else {\r\n\t\t\t$result = @rename($tiffile, $destination);\r\n\t\t\t//echo 'move from ' . $tiffile . ' to ' . $destination . ' - ' . $result . \"<br>\\n\";\r\n\r\n\t\t\t//check on result\r\n\t\t\tif ($result != 1) {\r\n $lfh = fopen($sLogFile, 'a');\r\n $errorline = date(\"Y m d H:m \") . \" kon niet schrijven naar $destination <br> \\n\";\r\n fwrite($lfh, $errorline);\r\n fclose($lfh);\r\n\t\t\t}\r\n }\r\n\t\t}\r\n\t}\r\n\r\n\treturn $aResults;\r\n}", "private function logsInWeekRange() {\n\t\t$dir = LOGS.'Inventory/inventory/';\n\t\t$this->report['files'] = array();\n\n\t\t// Open a known directory, and proceed to read its contents\n\t\tif (is_dir($dir)) {\n\t\t\t$dh = new Folder($dir);\n\t\t\t$dh->sort = TRUE;\n//\t\t\t$st = $this->startYear;\n//\t\t\t$sm = $this->startMonth;\n//\t\t\t$ey = $this->endYear;\n//\t\t\t$em = $this->endMonth;\n\t\t\t\n\t\t\t$files = $dh->find('.*\\.log');\n\t\t\tforeach ($files as $file) {\n\t\t\t\t$name = preg_replace('/inventory\\.(\\d+)\\.[\\d]+\\.(\\d+)\\.log/', '+$2 week 1/1/$1 -1 week', $file);\n\t\t\t\tif (stristr($file, 'inventory') && strtotime($name) >= $this->report['firstWeekTime'] && strtotime($name) <= $this->report['finalWeekTime']) {\n\t\t\t\t\t$this->report['files'][] = $dir . $file;\n\t\t\t\t}\n\t\t\t}\n//\t\t\tclosedir($dh);\n//\t\t\tforeach ($files as $file) {\n//\t\t\t\t$this->report['files'][] = $file;\n//\t\t\t}\n//\t\t\tif ($dh = opendir($dir)) {\n//\t\t\t\t// walk it\n//\t\t\t\twhile (($file = readdir($dh)) !== false) {\n//\t\t\t\t\t// make a date string from the log file name\n//\t\t\t\t\t$name = preg_replace('/inventory\\.(\\d+)\\.[\\d]+\\.(\\d+)\\.log/', '+$2 week 1/1/$1 -1 week', $file);\n//\n//\t\t\t\t\t// if the log file is within the requested range of weeks, save the file name for later processing\n//\t\t\t\t\tif (stristr($file, 'inventory') && strtotime($name) >= $this->report['firstWeekTime'] && strtotime($name) <= $this->report['finalWeekTime']) {\n//\t\t\t\t\t\t$this->report['files'][] = $dir . $file;\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tclosedir($dh);\n//\t\t\t}\n\t\t}\n\t\t\n\t\t$dir = LOGS.'Inventory/snapshot/';\n\t\t$this->report['snapshot'] = array();\n\t\t\n\t\t// Open a known directory, and proceed to read its contents\n\t\tif (is_dir($dir)) {\n\t\t\tif ($dh = opendir($dir)) {\n\t\t\t\t// walk it\n\t\t\t\twhile (($file = readdir($dh)) !== false) {\n\t\t\t\t\t\t$name = preg_replace('/snapshot.(\\d+).(\\d+).log/', '$2/1/$1', $file);\n//\t\t\t\t\t\t$this->ddd($name, 'Snapshot File Name');\n//\t\t\t\t\t\t$this->ddd(strtotime($name), 'String to time $name');\n//\t\t\t\t\t\t$this->ddd(date('F j, Y', $this->report['firstTime']), 'firstTime');\n//\t\t\t\t\t\t$this->ddd($this->report['firstTime'] - MONTH, 'first time minus month');\n\t\t\t\t\t\tif (stristr($file, 'snapshot') && strtotime($name) >= ($this->report['firstSnapshot']) && strtotime($name) <= $this->report['finalTime']) {\n\t\t\t\t\t\t\t$n = (count($this->report['snapshot']) > 0) ? 1 : 0;\n\t\t\t\t\t\t\t$this->report['snapshot'][$n] = $dir . $file;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclosedir($dh);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// finish directory loop\n\t}", "function crearArchivoErrores() {\n\t\t// Crea un archivo HTML donde se documentaran los registros que no se insertaron en la tabla de migraciones\n\t\t\t$fp = fopen(\"Errores/ReporteFacturacion.html\", \"w+\");\n\t\t\t$encabezado = \"<html> <head> <title> Reporte errores Esquema Contabilidad(Farmacia) </title> \n\t\t\t<link rel='stylesheet' type='text/css' href='../../General/estilos/estilos.css'> </head>\";\n\t\t\tfputs($fp, $encabezado);\n\t\t\tfclose($fp);\n\t\t}", "function __destruct()\n\t{\n\t\tif(count($this->log)!=0)\n\t\t{\n\t\t\t$log = $this->log;\n\t\t\tforeach($log as $l) echo $l.\"<br />\\n\";\n\t\t}\n\t}", "function LogArrayToFile($data = NULL){\n if($data == NULL){\n $data = JRequest::get('POST');\n }\n if( !($file = fopen( JPATH_BASE.\"/../log.txt\", \"a+\") )) { // Um diretorio acima da raiz do joomla\n echo 'Erro ao criar arquivo!'; \n } else {\n fwrite($file, date(\"Y-m-d h:i:s\"). \" | \");\n foreach($data AS $item => $value){\n $conteudo = $item . '> '.$value . ' | ';\n if( fwrite($file, $conteudo) === FALSE ){\n echo 'Erro ao escrever dados';\n }\n }\n fwrite($file, \"\\n\");\n } \n}", "function leerLogDeFicheroMySQL() {\n \t$tama = filesize($this->fichero);\n $mane = $this->abrirFichero($this->fichero,\"rb\"); //manejador del fichero\n if (!$mane) return false;\n $contenidos = fread($mane, $tama); //Leer los datos del fichero\n\t\t//Construimos el array de lineas con el contenido leido del fichero:\n $lineas = explode(\"\\n\",$contenidos);\n $result = array();\n\t\t$aux = false; //Para usar la expresión regular\n\t\t//TODO:PROCESAMIENTO DE LOS DATOS DEL LOG DE MYSQL\n\t\tforeach ($lineas as $linea) {\n\t\t\tpreg_match(\"[\\[+[a-zA-Z0-9._/ ]+\\]]\", substr($linea,15,strlen($linea)), $aux, PREG_OFFSET_CAPTURE);\n\t\t\t$result[] = $aux;\n }\n \n fclose($mane);\n return $result;\n }" ]
[ "0.6389477", "0.63679147", "0.61752146", "0.60900766", "0.5960028", "0.59313244", "0.5916383", "0.5903278", "0.5855573", "0.58471465", "0.58174115", "0.5790787", "0.5728374", "0.56963986", "0.5675502", "0.5621629", "0.5616361", "0.5612194", "0.56072235", "0.55855197", "0.5570285", "0.5560343", "0.5551783", "0.5507777", "0.5501076", "0.54568374", "0.54342055", "0.5431063", "0.54295594", "0.5423725", "0.541747", "0.54164416", "0.54063636", "0.5393296", "0.53728133", "0.5364527", "0.5351529", "0.533291", "0.5320607", "0.5320049", "0.530103", "0.52985793", "0.52874756", "0.5286862", "0.5283455", "0.5281437", "0.52785337", "0.52778685", "0.52669", "0.52656245", "0.52611846", "0.5253925", "0.52511835", "0.52476215", "0.5238083", "0.52358305", "0.52348936", "0.5234618", "0.52318925", "0.52304184", "0.52112854", "0.52036715", "0.51923966", "0.5187176", "0.5176652", "0.5154754", "0.5143991", "0.51427406", "0.51421046", "0.51411784", "0.51346004", "0.5130366", "0.511811", "0.5107556", "0.5104671", "0.5104298", "0.5099958", "0.5099326", "0.50984466", "0.50951034", "0.50880563", "0.50880206", "0.5085274", "0.5063499", "0.5062164", "0.5060969", "0.5053064", "0.5052206", "0.50514203", "0.5051398", "0.50502855", "0.5048904", "0.5048724", "0.50463283", "0.5044355", "0.5041373", "0.50330216", "0.5028031", "0.5022163", "0.50194305" ]
0.5198117
62
Run the database seeds.
public function run() { $confirmation_code = str_random(30); User::create(array( 'id' => null, 'name' => "nevdk", 'password' => Hash::make("114948"), 'email' => "[email protected]", 'avatar' => "http://s1.cdnnz.net/var/news/2012/11/22/51906_dzhejk-dzhillenxol_or_jake.jpg", 'confirmation_code' => $confirmation_code, 'fio' => "Дмитрий Кухарчук", 'about' => "пёрсын" )); /*$faker = Faker\Factory::create('ru_RU'); $faker->addProvider(new Faker\Provider\ru_RU\Person($faker)); $faker->addProvider(new Faker\Provider\ru_RU\Internet($faker)); $faker->addProvider(new Faker\Provider\Image($faker)); $faker->addProvider(new Faker\Provider\ru_RU\Text($faker)); DB::table('users')->truncate(); for($i=0;$i<=20;$i++){ User::create(array( 'id' => null, 'name' => $faker->userName, 'password' => $faker->password, 'email' => $faker->email, 'avatar' => $faker->imageUrl(100, 100, 'people'), 'fio' => $faker->firstName." ".$faker->lastName, 'about' => $faker->realText(200) )); }*/ }
{ "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
Bootstrap the application constant.
public function boot() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function boot()\n {\n if(config('app.env') === 'production') {\n \\URL::forceScheme('https'); \n }\n define('EMAIL_FONT', 'Verdana');\n define('SITE_URL', url('/'));\n define('SECONDARY_COLOR', '#294a8e');\n define('SITE_LOGO', url('assets/images/favicon.png'));\n define('FROM_MAIL', '[email protected]');\n define('CONTACT_MAIL', '[email protected]');\n define('CONTACT_NAME', 'Admin');\n define('SITE_NAME', 'Poornatha');\n define('SITE_MAINTENANCE', 'NO');\n define('GOOGLE_API_KEY','AIzaSyARz0Z9JKu8JpdLF2RwoXc704UKLmsxx1I');\n }", "public static function boot()\n {\n static::$staplerNull = sha1(time());\n\n if (!defined('STAPLER_NULL')) {\n define('STAPLER_NULL', static::$staplerNull);\n }\n }", "public function boot()\n {\n define('CACHE_ENABLED', config('destiny.cache', true));\n define('CACHE_DEFAULT', config('destiny.cache_default', false));\n define('CACHE_INDEX', config('destiny.cache_index', 60));\n define('CACHE_PLAYER', config('destiny.cache_player'));\n }", "protected function initBootstrap()\n {\n \\Steel\\Bootstrap::init();\n }", "protected function bootstrap()\n {\n }", "protected function _initBootstrap()\n {\n }", "public static function boot(): void\n {\n if (defined('CONFIG_DIR') && file_exists(CONFIG_DIR . '/beanstalk.php')) {\n self::$beanstalk_config = require CONFIG_DIR . '/beanstalk.php';\n }\n }", "public function bootstrap()\n {\n }", "protected static function boot()\n {\n }", "protected static function boot()\n {\n parent::boot();\n\n // static::addGlobalScope(new LatestScope);\n }", "static public function generateBoostrapVariables(){\n global $configClass,$bootstrapHelper;\n $configClass = self::loadConfig();\n\t\tif((int)$configClass['twitter_bootstrap_version'] == 0){\n\t\t\t$configClass['twitter_bootstrap_version'] = 2;\n\t\t}\n $bootstrapHelper = new OspropertyHelperBootstrap((int)$configClass['twitter_bootstrap_version']);\n }", "protected static function boot()\n\t{\n\t\tparent::boot();\n\t\t\n\t\tSetting::observe(SettingObserver::class);\n\t}", "public function boot()\n {\n //\n // View::share('assetDir', env('APP_ENV') == 'production' ? 'build/' : '');\n // View::share('assetPath', env('APP_ENV') == 'production' ? 'mix' : 'asset');\n\n // TODO: Model Observer\n// Change::observe(ChangeObserver::class);\n }", "protected static function boot()\n {\n parent::boot();\n static::addGlobalScope(new ProjectScope);\n }", "protected static function boot()\n {\n parent::boot();\n\n static::addGlobalScope(new SiteScope);\n }", "public function bootstrap();", "public function bootstrap();", "public function boot()\r\n {\r\n Schema::defaultStringLength(191);\r\n\r\n // Include the definitions\r\n include_once(config_path('definitions.php'));\r\n }", "protected static function boot(){\n \n parent::boot();\n\n static::addGlobalScope(new STKCODE);\n\n \n\n \n }", "function __loadBootstrap() {\r\n\t\t$_this =& Configure::getInstance();\r\n\t\t$modelPaths = null;\r\n\t\t$viewPaths = null;\r\n\t\t$controllerPaths = null;\r\n\t\t$helperPaths = null;\r\n\t\t$componentPaths = null;\r\n\t\trequire APP_PATH . 'config' . DS . 'bootstrap.php';\r\n\t\t$_this->__buildModelPaths($modelPaths);\r\n\t\t$_this->__buildViewPaths($viewPaths);\r\n\t\t$_this->__buildControllerPaths($controllerPaths);\r\n\t\t$_this->__buildHelperPaths($helperPaths);\r\n\t\t$_this->__buildComponentPaths($componentPaths);\r\n\t}", "public function boot()\n\t{\n\t\tConfiguration::environment(\n\t\t\t$this->app['config']->get('braintree.environment')\n\t\t);\n\n\t\tConfiguration::merchantId(\n\t\t\t$this->app['config']->get('braintree.merchartId')\n\t\t);\n\n\t\tConfiguration::publicKey(\n\t\t\t$this->app['config']->get('braintree.publicKey')\n\t\t);\n\n\t\tConfiguration::privateKey(\n\t\t\t$this->app['config']->get('braintree.privateKey')\n\t\t);\n\n\t\t$encryptionKey = $this->app['config']->get('braintree.clientSideEncryptionKey');\n\t}", "protected static function updateBootstrapping()\n {\n copy(__DIR__.'/bootstrap-stubs/app.js', resource_path('assets/js/app.js'));\n\n copy(__DIR__.'/bootstrap-stubs/bootstrap.js', resource_path('assets/js/bootstrap.js'));\n }", "public function boot()\n {\n Schema::defaultStringLength(191);\n Product::observe(ProductObserver::class);\n Category::observe(CategoryObserve::class);\n User::observe(UserObserve::class);\n OpenPayU_Configuration::setEnvironment('sandbox');\n OpenPayU_Configuration::setMerchantPosId('377814');\n OpenPayU_Configuration::setSignatureKey('cec7f96ee87b4457621da7bae8049ca1');\n\n OpenPayU_Configuration::setOauthClientId('377814');\n OpenPayU_Configuration::setOauthClientSecret('9f452ecfba439d6958136de2bd88565e');\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 function _initBootstrap(){\n $this->_config = $this->getOptions();\n }", "public function boot()\n {\n if (env('API_STORE_URL')) {\n Client::configure([\n 'store_url' => env('API_STORE_URL'),\n 'username' => env('API_USERNAME'),\n 'api_key' => env('API_KEY'),\n ]);\n }\n }", "public static function boot()\n {\n parent::boot();\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 }", "protected static function boot()\n\t{\n\t\tparent::boot();\n\t}", "public static function boot() \n\t{\n\t\tparent::boot();\n\t}", "public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }", "public function getBootstrap();", "protected static function boot()\n {\n parent::boot();\n }", "protected static function boot() {\n parent::boot();\n static::addGlobalScope(new ActiveProjectScope);\n }", "public static function bootstrap(){\n //Method inherited from \\Illuminate\\Foundation\\Console\\Kernel \n \\App\\Console\\Kernel::bootstrap();\n }", "public function boot()\n {\n require app_path('Library/Libs/helper.php');\n require app_path('Library/Libs/models.php');\n }", "public function boot()\n {\n // 本番環境ではhttpsに変換する\n if (Config::get('app.env') === 'production') {\n \\URL::forceSchema('https');\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 }", "public static function boot() {\n parent::boot();\n }", "public static function boot() {\n parent::boot();\n }", "public static function boot()\n {\n parent::boot();\n }", "public function boot()\n {\n Schema::defaultStringLength(191);\n // LOAD HELPER FILE\n $helperFile = app_path('Helpers/Helper.php');\n if (file_exists($helperFile)) {\n require_once($helperFile);\n } else {\n dd('Helper file not found');\n }\n\n // SHARE HEADER META TITLE AND DESCRIPTION\n $setting = Setting::orderBy('id','desc')->first();\n View::share('setting',$setting);\n }", "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "protected static function boot()\n {\n parent::boot();\n\n //\n }", "public function boot()\n {\n \tif(\\Schema::hasTable('config')) {\n \t\tif(!\\Configuration::has('app_name')) {\n \t\t\t\\Configuration::set('app_name', env('APP_NAME'));\n \t\t}\n \t}\n }", "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 }", "protected function boot()\n {\n //Nothing to do here, but you can override this function in child classes.\n }", "public function boot()\n\t{\n view()->composer('app', function($view)\n\t {\n\t \t$settings = config('jmSettings');\n\t $myApp = $settings['JM_SITE_NAME'];\n\t $title = $settings['JM_SITE_NAME'];\n $siteDown = $settings['JM_IS_SITE_DOWN'];\n $url = $_SERVER['REQUEST_URI']; //returns the current URL\n $parts = explode('/',$url);\n $currentFolder = $parts[1]; \n $domainName = $settings['JM_DOMAIN']; \n\t $view->with(compact('title','myApp','currentFolder','domainName','siteDown'));\n\t });\n \n\t}", "protected static function boot()\n\t{\n\t\tparent::boot();\n\n\t\tstatic::addGlobalScope(new AgeScope());\n\t}", "protected static function updateBootstrapping()\n {\n copy(__DIR__ . '/angular-stubs/main.ts', resource_path('assets/js/main.ts'));\n copy(__DIR__ . '/angular-stubs/app.module.ts', resource_path('assets/js/app.module.ts'));\n copy(__DIR__ . '/angular-stubs/environment.ts', resource_path('assets/js/environment.ts'));\n copy(__DIR__ . '/angular-stubs/tsconfig.json', resource_path('assets/js/tsconfig.json'));\n }", "public function boot()\n {\n $this->setupConfig($this->app);\n }", "public function boot() {\n $extractVersion = function($versionString) {\n if (!preg_match('/^(\\d+?\\.\\d+\\.\\d+)/', $versionString, $matches)) {\n return $versionString;\n }\n return $matches[1];\n };\n $appVersions = \\Cache::remember(md5('app_versions'), 1440, function() {\n return [\n 'laravel_version' => Application::VERSION,\n 'php_version' => PHP_VERSION,\n 'mysql_version' => \\DB::table('information_schema.GLOBAL_VARIABLES')\n ->select('VARIABLE_VALUE as val')\n ->where('VARIABLE_NAME', '=', 'VERSION')\n ->get()[0]->val,\n 'last_commit_hash' => substr(shell_exec(\"git rev-parse HEAD\"), 0, 7)\n ];\n });\n\n foreach ($appVersions as $viewVarName => $rawVersion) {\n $version = $extractVersion($rawVersion);\n view()->share($viewVarName, $version);\n }\n view()->share('last_commit_hash_link', env('APP_GITHUB_REPO') . '/commit/' . $appVersions['last_commit_hash']);\n }", "public function boot()\n {\n\t\t//\n }", "protected static function boot()\n {\n parent::boot();\n\n static::addGlobalScope(new RoleScope);\n }", "public function boot()\n {\n if (!defined('LOCAL_APP')) {\n define('LOCAL_APP', env('APP_ENV') == 'local');\n }\n $this->registerValidationRole();\n }", "protected static function boot()\n {\n parent::boot();\n\t\n\t\tHomeSection::observe(HomeSectionObserver::class);\n\t\t\n static::addGlobalScope(new ActiveScope());\n }", "public static function boot();", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n\t{\n\t\t//\n\t}", "public function boot()\n {\n \n }", "public function boot() {\n\t\t//\n\t}", "public function boot() {\n\t\t//\n\t}", "public function boot()\n {\n \n }", "public function boot()\n {\n \n }", "public function boot()\n {\n \n }", "public function boot()\n\t{\n\n\t}", "public function boot()\n\t{\n\n\t}", "public function boot()\n\t{\n\n\t}", "public static function boot()\n {\n self::getInstance()->boot();\n }", "public function boot()\n {\n \\Braintree\\Configuration::environment('sandbox');\n \\Braintree\\Configuration::merchantId(env('BRAINTREE_MERCHANT_ID'));\n \\Braintree\\Configuration::publicKey(env('BRAINTREE_PUBLIC_KEY'));\n \\Braintree\\Configuration::privateKey(env('BRAINTREE_PRIVATE_KEY'));\n }", "public function boot()\n\t{\n\t\t\n\t}", "public function boot()\n\t{\n\t\t\n\t}", "public function boot ()\n {\n\n }", "public function boot()\r\n {\r\n }", "public function boot()\n\t{\n\t\t// Public master\n\t\tView::composer('leitom.boilerplate::public_master', 'Leitom\\Boilerplate\\Composers\\PublicMasterComposer');\n\n\t\t// App master\n\t\tView::composer('leitom.boilerplate::app_master', 'Leitom\\Boilerplate\\Composers\\AppMasterComposer');\n\t}", "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 bootstrap($app);", "public static function boot() {\n\t\tstatic::container()->boot();\n\t}", "public function boot()\r\n {\r\n //\r\n }", "public function boot()\r\n {\r\n //\r\n }", "public function boot()\r\n {\r\n //\r\n }", "public function boot()\r\n {\r\n //\r\n }", "public function boot()\n {\n static::bootMethods();\n }", "public function boot(){\n\n\t\t$this->bootConfig();\n\n\t}", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }", "public function boot()\n {\n $this->setupConfig();\n }" ]
[ "0.6974324", "0.66127264", "0.6603766", "0.65575427", "0.6554018", "0.6549074", "0.6485486", "0.64707696", "0.64488536", "0.64386415", "0.64062744", "0.63909155", "0.63842285", "0.6375339", "0.63709974", "0.6352027", "0.6352027", "0.6337727", "0.6323101", "0.6283241", "0.6267528", "0.6266208", "0.6234017", "0.62152374", "0.6213839", "0.6198075", "0.6197466", "0.61964464", "0.61839473", "0.6178323", "0.61744815", "0.6173203", "0.6171199", "0.6161027", "0.6160593", "0.6160512", "0.6150801", "0.61442965", "0.61407274", "0.61407274", "0.6132333", "0.6131633", "0.6130628", "0.6126926", "0.61111623", "0.6102401", "0.60699797", "0.60646033", "0.60642743", "0.60638034", "0.605767", "0.60550326", "0.6054748", "0.6049858", "0.604857", "0.6040837", "0.60382384", "0.60300475", "0.6028528", "0.6028528", "0.6028528", "0.6028528", "0.6028528", "0.6028528", "0.6028528", "0.6028528", "0.6028528", "0.6028528", "0.6028528", "0.6028528", "0.6028528", "0.6028528", "0.60279197", "0.602393", "0.602393", "0.60232115", "0.60232115", "0.60232115", "0.6022497", "0.6022497", "0.6022497", "0.6015012", "0.6007173", "0.6006857", "0.6006857", "0.599868", "0.5997105", "0.59886473", "0.5987324", "0.59835297", "0.5977554", "0.59768695", "0.59768695", "0.59768695", "0.59768695", "0.5971745", "0.5965513", "0.5964374", "0.5964374", "0.5964374", "0.5964374" ]
0.0
-1
Register the service provider.
public function register() { $this->app->singleton('command.laravel.make.generator', function ($app) { return new MakeResource($app['files']); }); $this->commands([ 'command.laravel.make.generator', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\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\n $this->registerBinding();\n }", "public function register()\n\t{\n\t\t$this->registerCommands();\n\t\t$this->registerHybridAuth();\n\t}", "public function register()\n {\n $this->registerAuthenticator();\n }", "public function register()\n {\n $this->loadHelpers();\n \n $this->passportSetting();\n }", "public function register()\n {\n //Bind service in IoC container\n $this->app->singleton('tenancy', function(){\n return new TenantManager();\n });\n }", "public function register()\n {\n\n $this->app->register(HookProvider::class);\n $this->app->register(RouteProvider::class);\n// $this->app->register(InstallModuleProvider::class);\n }", "public function register()\n\t{\n\t\t\n\t\t$this->registerViewManager();\n\t\t$this->registerResponseHandler();\n\t\t$this->registerHttpMethods();\n\t}", "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 // ...\n }", "public function register()\n {\n // ...\n }", "public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }", "public function register()\n {\n $this->registerServiceProvider();\n\n $this->addAssetNamespaceHint();\n $this->addStreamsNamespaceHint();\n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "public function register()\n {\n $this->registerContracts();\n }", "public function register()\n\t{\n $this->registerApi();\n\t}", "public function register()\n {\n \n $this->registerLoader();\n $this->registerTranslator();\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 }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\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->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 $this->registerFinite();\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n $this->registerServices();\n $this->setupStubPath();\n $this->registerProviders();\n }", "public function register()\n {\n $this->app['cache'] = $this->app->share(function($app)\n {\n return new CacheManagerMaster($app);\n });\n\n $this->app['memcached.connector'] = $this->app->share(function()\n {\n return new MemcachedConnector;\n });\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }", "public function register()\n {\n $this->registerCacheManager();\n $this->registerCourier();\n }", "public function register()\n {\n $this->app->singleton(Adapter::class, function () {\n\n return new Adapter(config('services.sso.id'), config('services.sso.secret'));\n\n });\n }", "public function register()\n {\n $this->registerRollbar();\n }", "public function register()\n {\n $this->configure();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n }", "public function register(): void\n {\n parent::register();\n\n $this->singleton(RouteViewerContract::class, RouteViewer::class);\n }", "public function register() {\n\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerBindings();\n $this->registerEventListeners();\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->app->singleton(Service\\TagsSynchronizer::class, function ($app) {\n return new Service\\TagsSynchronizer();\n });\n }", "public function register() {\n }", "public function register() {\n }", "public function register() {\n }", "public function register() {\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 }", "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 }", "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 }", "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 }", "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 }", "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 }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }" ]
[ "0.71774215", "0.7054453", "0.6968271", "0.69677705", "0.6952019", "0.6931252", "0.6926226", "0.6918423", "0.6899592", "0.6895726", "0.6894278", "0.68906504", "0.68906504", "0.6883112", "0.6872877", "0.6865099", "0.68640506", "0.68627584", "0.68624485", "0.68491566", "0.6823619", "0.68196595", "0.681956", "0.681956", "0.681956", "0.681956", "0.681956", "0.681956", "0.681956", "0.681956", "0.68090034", "0.68089324", "0.6807419", "0.6803942", "0.6802752", "0.679191", "0.67904466", "0.67874974", "0.6785141", "0.6785141", "0.6785141", "0.6780175", "0.67768264", "0.6776666", "0.6770326", "0.6762759", "0.67627436", "0.67611307", "0.6757141", "0.67570823", "0.67548144", "0.6753397", "0.6753232", "0.67504245", "0.67504245", "0.67504245", "0.67504245", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705" ]
0.0
-1
Retrieve a configuration value.
public static function get(string $key): mixed { if (!isset(static::$config[$key])) { throw new Exception( sprintf( 'Configuration with key %s not found!', $key ) ); } return static::$config[$key]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get($key)\r\n {\r\n return $this->config[$key];\r\n }", "public function getConfigValue($key)\n {\n return $this->config[$key];\n }", "static function getValue($name) {\r\n if (isset(self::$config[$name])) \r\n return self::$config[$name];\r\n else {\r\n return DB::getConfig($name);\r\n }\r\n }", "function getConfigValue($name) {\n return UserConfigOptions::getValue($name, $this);\n }", "function getConfigValue($key) {\r\n\t\t$db = & JFactory::getDBO() ;\r\n\t\t$sql = 'SELECT config_value FROM #__osmembership_configs WHERE config_key=\"'.$key.'\"';\r\n\t\t$db->setQuery($sql) ;\t\t\r\n\t\treturn $db->loadResult();\r\n\t}", "public static function get($key)\n\t{\n\t\tif (is_array(self::$_CONF) AND array_key_exists($key, self::$_CONF))\n\t\t\treturn self::$_CONF[$key];\n\t\telseif($value = Db::getInstance()->getValue('SELECT `value` FROM `'.DB_PREFIX.'configuration` WHERE `name` = \\''.pSQL($key).'\\'')){\n\t\t\tself::$_CONF[$key] = $value;\n\t\t\treturn $value;\n\t\t}\n\t\treturn false;\n\t}", "private function getConfigValue($value){\n return $this->scopeConfigInterface->getValue('payment/jpay/' . $value);\n }", "function get_config_value($config_name)\n\t{\n\t\tglobal $db, $table_prefix;\n\t\t$sql = \"SELECT config_value\n\t\t\t\t\t\tFROM \" . CONFIG_TABLE . \"\n\t\t\t\t\t\tWHERE config_name = '\" . $config_name . \"'\n\t\t\t\t\t\tLIMIT 1\";\n\t\tif (!($result = $db->sql_query($sql)))\n\t\t{\n\t\t\t$config_value = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$row = $db->sql_fetchrow($result);\n\t\t\t$config_value = !empty($row['config_value']) ? $row['config_value'] : '';\n\t\t}\n\t\treturn $config_value;\n\t}", "protected function get($name) {\n return $this->configuration->get($name);\n }", "public function getConfigValue($path)\n {\n // return store config value\n return $this->scopeConfig->getValue($path);\n }", "public function __get($key)\n {\n if (is_object($this->config)) {\n $value = $this->config->where('key', $key)->first();\n\n return $value ? $value->value : null;\n }\n }", "function getConfigurationValue($key) {\r\n $value = '';\r\n $sqlConfiguration = xtc_db_query(\"SELECT * FROM configuration WHERE configuration_key='\".strtoupper($key).\"' LIMIT 1\");\r\n if(xtc_db_num_rows($sqlConfiguration)>0){\r\n $dataConfiguration = xtc_db_fetch_array($sqlConfiguration);\r\n $value = $dataConfiguration['configuration_value'];\r\n }\r\n return $value; \r\n }", "public function get($key)\n {\n if (array_key_exists($key, $this->config)) {\n $value = $this->config[ $key ];\n } elseif ($this->offsetExists($key)) {\n $value = $this->defaults[ $key ];\n } else {\n throw new Exception(\"Config entry «{$key}» doesn't exists. \");\n }\n\n return $value;\n }", "public function getValue($key = NULL) {\n return isset($this->config[$key]) ? $this->config[$key] : NULL;\n }", "public function get($configKey, $key);", "public function getSetting() {}", "public function getSetting() {}", "function getConfigValue($name) {\n return CompanyConfigOptions::getValue($name, $this);\n }", "function get_setting() {\n return get_config(NULL, $this->name);\n }", "public function get($key){\r\n\t\tif(key_exists($key, $this->config)){\r\n\t\t\treturn $this->config[$key];\r\n\t\t}\r\n\t\tdie('Index is out of range');\r\n\t}", "public function __get($name): mixed {\n if (isset($this->data[$name]))\n return $this->data[$name];\n\n trigger_error(\n __(\"Requested configuration setting not found.\"),\n E_USER_NOTICE\n );\n\n return null;\n }", "public function getConfigValue($path = '')\n {\n return $this->getConfigData()->_descend($this->configData, $path);\n }", "public function getValueOf($id) {\n\t\t$config = $this->em->getRepository('SSNTherapassBundle:Config')->find($id);\n\t\tif (is_null($config)) {\n\t\t\treturn null;\n\t\t}\n\t\treturn $config->getValue();\n\t}", "public function getConfigurationValue($key) {\n return $this->configuration[$key] ?? NULL;\n }", "protected function get(string $key)\n {\n if (!array_key_exists($key, $this->config)) throw new InvalidConfigException(\"Your configuration doesn't have a value for the key `$key`\");\n return $this->config[$key];\n }", "public static function get($key)\n {\n return Arr::get(static::$config, $key);\n }", "static function Get($valueName)\n {\n if(isset(self::$settings[$valueName]))\n {\n return self::$settings[$valueName];\n }\n\n return false;\n }", "public function config_get(){\n\t\treturn $this->fb->exec('dhcp.config_get');\n\t}", "public function get()\r\n {\r\n $this->ensureLoaded();\r\n return $this->config;\r\n }", "public function get ( $name ) {\n\t\tif( !$this->has ( $name ) ) {\n\t\t\tthrow new \\InvalidArgumentException(sprintf('The name \"%s\" is invalid.', $name));\n\t\t}\n\t\treturn $this->config[$name];\n\t}", "public static function get( $key ) {\n\t\tif ( ! static::$config ) {\n\t\t\tstatic::_set_config_data();\n\t\t}\n\n\t\tif ( array_key_exists( $key, static::$config ) ) {\n\t\t\treturn static::$config[ $key ];\n\t\t}\n\t}", "static public function get($key)\r\n {\r\n /* If the config variable has no value, throw an exception */\r\n if(!self::has($key))\r\n {\r\n throw new Exception(\"The config key '\" . $key . \"' does not exist\");\r\n }\r\n\r\n /* Otherwise, fetch and return the value */\r\n return Fset::get(self::$values, $key);\r\n }", "public static function getConfigValue(string $value)\n {\n if (self::$_configuration instanceof JSONDBConfig) {\n return self::$_configuration->{\"get{$value}\"}();\n } else {\n switch ($value) {\n case \"StoragePath\":\n return dirname(dirname(__DIR__));\n\n default:\n throw new \\Exception(\"Invalid configuration value queried.\");\n }\n }\n }", "public function get($key)\n {\n return $this->settings[$key];\n }", "public function config(string $config): mixed\n {\n return $this->config->get($config);\n }", "public static function get($key=null){\n\t\t $connection = MyActiveRecord::getDb();\n\t\t if(empty(self::$psconfig_values))\n\t\t {\n\t\t\t $query = \"SELECT name, value FROM \" . SITE_CONFIG;\n\t\t\t $rst = $connection->createCommand($query)->queryAll();\n\t\t\t foreach($rst as $v){\n\t\t\t\t self::$psconfig_values[$v['name']] = $v['value'];\n\t\t\t }\n\t\t }\n \t\treturn self::$psconfig_values[$key];\n\t\t}", "public function getValue($config, $default = null) {\n\t\t$value = $this->config->getConfigValue(\n\t\t\t$config,\n\t\t\tarray_get($config, $this->defaults, $default)\n\t\t\t);\n\t\t$this->dispatch('SystemConfigGetValue', array($config, $value));\n\t\treturn $value;\n\t}", "public function getConfig($option)\n {\n return array_get ( $this->config, $option );\n }", "public function __get($key) {\n\t\treturn $this->config->{$key};\n\t}", "public function config($valueOf)\n {\n return DB::table('settings')->where('userId', Auth::user()->id)->value($valueOf);\n }", "function getValue( $key ) {\n\t\tif ( $value = $this->context->getValue( $key ) ) {\n\t\t\treturn $value;\n\t\t} else {\n\t\t\treturn $this->description->getConfigurationValue( $key );\n\t\t}\n\t}", "public function value($name)\r\r\n\t{\r\r\n\t\t$path = explode(CPF_CONFIG_VALUES_SEPARATOR, $name);\r\r\n\r\r\n\t\t$temp = $GLOBALS[CPF_CONFIG_ARRAY];\r\r\n\t\t$value = NULL;\r\r\n\t\t\r\r\n\t\tforeach ($path as $key)\r\r\n\t\t{\r\r\n\t\t\tif (isset($temp[$key]))\r\r\n\t\t\t{\r\r\n\t\t\t\t$value = $temp[$key];\r\r\n\t\t\t}\t\t\t\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t \ttrigger_error(sprintf('Configuration value %s undefined', $name), E_USER_ERROR);\r\r\n\t\t\t\tbreak;\r\r\n\t\t\t}\r\r\n\t\t\t$temp = $temp[$key];\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\treturn $value;\r\r\n\t}", "public static function get(string $config): mixed {\n if(!isset(self::$configurations[$config])) {\n throw new ConfigurationException('No configuration set for \"' . $config . '\"');\n }\n return self::$configurations[$config];\n }", "public static function value($fullpath)\n\t{\n //println($fullpath);\n //$fullpath = join('/',explode('.',$fullpath));\n\t\t$sides = explode('/',$fullpath);\n\t\t$path = array_pop($sides);\n\t\t$ns = join('/',$sides);\n //println(\"$ns, $path\");\n\t\treturn Config::get($ns, $path);\n\t}", "static function getConfig() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_CONFIG);\n\t}", "private function getConfig($key)\n {\n return $this->config->get($key);\n }", "public function getValue($key, $default = '') {\n\t\treturn $this->config->getValue($key, $default);\n\t}", "function configItem($key) {\n global $db;\n global $lang;\n\n if(configEnabled() == true) {\n $resp = $db->query(\"SELECT `val` FROM `\".$lang[\"config_db_name\"].\"`.`\".$lang[\"config_table_name\"].\"` WHERE `key` = '\".$key.\"' LIMIT 1\");\n if($resp) {\n if($resp->num_rows == 0) {\n return \"Unknown key\";\n } else {\n while($data = $resp->fetch_assoc()) {\n return $data[\"val\"];\n }\n }\n } else {\n return \"Unknown key\";\n }\n } else {\n return \"Not enabled\";\n }\n }", "public function getConfig($config_key)\n {\n if(array_key_exists(strtolower($config_key), self::$config_array)) \n {\n return self::$config_array[strtolower($config_key)];\n }\n\n try \n {\n return self::getDefaultValue($config_key);\n }\n catch(\\Exception $e) \n {\n printf(\"Unable to prepare configs: %s\", $e->getMessage());\n }\n }", "public static function getIniValue(string $configKey)\n {\n return ini_get($configKey);\n }", "public function getConfig($key);", "public function getConfig($key);", "public function get( $key ) {\n\t\tif ( isset( $this->config[ $key ] ) ) {\n\t\t\treturn $this->config[ $key ];\n\t\t}\n\t\treturn null;\n\t}", "public function get($name)\n {\n $config = $this->fromCache();\n return isset($config[$name]) ? $config[$name] : null;\n }", "public function config($value)\n {\n return Mage::getStoreConfig(\"simple_relevance/general/$value\");\n }", "public function get($key)\n\t{\n\t\t$default = array_key_exists($key, $this->defaultConfig) ? $this->defaultConfig[$key] : null;\n\n\t\treturn $this->componentConfig->get($key, $default);\n\t}", "public static function get (string $key)\n {\n $value = null;\n\n if (function_exists('resolve')) {\n $repo = resolve('config');\n\n if ($repo && method_exists($repo, 'get')) {\n $value = $repo->get($key);\n }\n }\n\n return $value;\n }", "public static function read()\n {\n return self::$config;\n }", "public function getConfig($key) {\n $registry = new Registry();\n // Database\n $db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);\n $registry->set('db', $db);\n $query = $db->query(\"SELECT value FROM \" . DB_PREFIX . \"setting WHERE `key` = '\" . $db->escape(utf8_strtolower($key)) . \"'\");\n\n return $query->row['value'];\n }", "function get_config_value($cfgset, $key, $defval)\n{\n if (array_key_exists($key, $cfgset)) {\n return $cfgset[$key];\n }\n else if ($defval !== null) {\n return $defval;\n }\n else {\n return null;\n }\n}", "protected function get()\n {\n return get_option($this->hash);\n }", "static public function get($key) {\n if (!property_exists(self::getConfig(), $key))\n return null;\n else\n return self::getConfig()->$key;\n }", "public static function get($key)\r\n {\r\n require_once ROOT . \"/app/config/{$key}.php\";\r\n return isset(self::$settings[$key]) ? self::$settings[$key] : null;\r\n }", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "protected function config($name) {\n return $this->configFactory->get($name);\n }", "public function getConfig($key)\n {\n return Config::get($key);\n }", "public function getConfig($a_configItem)\n {\n if (!isset($this->m_config[$a_configItem]))\n {\n throw \"Unknown Config Item\";\n }\n\n return $this->m_config[$a_configItem];\n }", "private function _get_connector_config_value($config_name){\n try {\n /**\n * Get the resource model\n */\n $resource = Mage::getSingleton('core/resource');\n \n /**\n * Retrieve the write connection\n */\n $readConnection = $resource->getConnection('core_read');\n \n /**\n * Retrieve our table name\n */\n $table = $resource->getTableName('minematic_config');\n \n //Update register\n $query = \"SELECT value FROM \" . $table . \" WHERE name = '\"\n . $config_name .\"'\";\n \n //Execute the query\n $config_value = $readConnection->fetchOne($query);\n\n return $config_value ? $config_value : FALSE;\n \n } catch (Exception $e) {\n //Log Exception Message\n Mage::helper('connector')->logSyncProcess($e->getMessage(), \"DATABASE\", \"ERROR\");\n }\n\n return FALSE;\n }", "public function get($key){\n return $this->getSetting($key);\n }", "public static function getConfig()\n {\n return self::$config;\n }", "function getConfig($key = '')\n {\n return isset($this->config[$key]) ? $this->config[$key] : null;\n }", "public final function getConfig($key = false)\n {\n return $key ? $this->config->get($key) : $this->config;\n }", "public function getConfig($path) {\n return Config::getInstance()->getElementByPath($path);\n }", "protected function config($key)\n {\n return $this->app['config']->get($key);\n }", "public function get(String $name=\"\"){\n\t\tif(isset($this->config[$name])){\n\t\t\treturn $this->config[$name];\n\t\t}\n\t\t\n\t\t// We need to split anyway if successful and sizeof is cheaper than a string search\n\t\t$split = explode(\"\\\\\",$name);\n\t\tif(sizeof($split) > 1){\n\t\t\tif(isset($this->config[$split[0]]) && isset($this->config[$split[0]][$split[1]])){\n\t\t\t\treturn $this->config[$split[0]][$split[1]];\n\t\t\t}\n\t\t}\n\t\t\n\t\tthrow new \\Exception($name.\" could not be found in config.json\");\n\t}", "public function getConfig(){\n\t\treturn $this->_config;\n\t}", "public function getValue() {\n\n\t\treturn trim(\n\t\t\tfile_get_contents(\n\t\t\t\tself::PINDIR.'/gpio'.$this->iPinNumber.'/value'\n\t\t\t)\n\t\t);\n\t}", "public function getConfig()\n {\n return $this->get('config');\n }", "public function get_config()\n\t{\n\t\treturn $this->cfg;\n\t}", "function getConfig()\n {\n return $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/config\");\n }", "public function get($name) { \n \n if (isset($this->settings[$name])) return $this->settings[$name];\n return null;\n \n }", "public function getConfig(){\n\t\t$request = $this->_sendPacketToController(self::GET_CONFIG);\n\t\tif ($request->getState() == self::STATE_OK) // If the packet is send sucefully\n\t\t\treturn $this->_getResponse(); // TODO mettre en forme la sortie\n\t\telse\n\t\t\treturn $request;\n\t}", "function fetchConfigParameter($name){\n try {\n global $db_table_prefix;\n\n $results = array();\n\n $db = pdoConnect();\n\n $query = \"SELECT id, value\n\t\tFROM \".$db_table_prefix.\"configuration WHERE name = :name\";\n\n if (!$stmt = $db->prepare($query))\n return false;\n\n $sqlVars[\":name\"] = $name;\n\n if (!$stmt->execute($sqlVars)){\n // Error\n return false;\n }\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n if ($row)\n return $row['value'];\n else {\n addAlert(\"danger\", \"The specified configuration parameter could not be found.\");\n return false;\n }\n\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n }\n}", "public function get($name)\n {\n return (isset($this->settings[$name]) ? $this->settings[$name] : null);\n }", "function getConfig($config)\n{ \n return config(\"system.$config\");\n}", "public static function get($key)\n {\n return @static::$settings[$key];\n }", "function getConfigValue( $path = '' )\n\t{\n\t\tif( $path == '' )\n\t\t\treturn\t$this->conf;\n\n\t\tif( strstr( $path, '*' ) )\n\t\t{\n\t\t\t$path\t\t=\tstr_replace( '.', '\\.', $path );\n\t\t\t$path\t\t=\t'^'.str_replace( '*', '.*', $path ).'$';\n\t\t\t$values\t\t=\tarray();\n\t\t\tforeach( $this->conf as $key => $value )\n\t\t\t{\n\t\t\t\tif( eregi( $path, $key ) )\n\t\t\t\t\t$values[$key]\t=\t$value;\n\t\t\t}\n\t\t\treturn\t$values;\n\t\t}\n\n\t\t//\tcheck wether a value of an array was requested\n\t\tif( $index\t= strrchr( $path, '[' ) )\n\t\t{\n\t\t\t$path\t\t=\tsubstr( $path, 0, strrpos( $path, '[' ) );\n\t\t\t$index\t\t=\tsubstr( $index, 1, ( strlen( $index ) - 2 ) );\n\t\t\t$tmp\t\t=\t$this->getConfigValue( $path );\n\n\t\t\treturn\t$tmp[$index];\n\t\t}\n\n\t\tif( isset( $this->conf[$path] ) )\n\t\t\treturn\t$this->conf[$path];\n\n\t\treturn\tfalse;\n\t}", "public function get(string $setting)\n {\n if (!$this->validate($setting)) {\n return false;\n }\n\n return $this->configuration->getConfigurationSetting($setting);\n }", "public function GetSettingValue($name)\r\n\t\t{\r\n\t\t\treturn $this->DB->GetOne(\"SELECT value FROM client_settings WHERE clientid=? AND `key`=?\",\r\n\t\t\t\tarray($this->ID, $name)\r\n\t\t\t);\r\n\t\t}", "public static function get($name)\n {\n self::loadConfiguration();\n\n return self::$configuration[$name] ?? null;\n }", "public function getSettingValue()\n {\n if (array_key_exists(\"settingValue\", $this->_propDict)) {\n return $this->_propDict[\"settingValue\"];\n } else {\n return null;\n }\n }", "public function getConfig()\n {\n return $this->config;\n }", "function fetchConfigurationValue($param, $sheet) {\n\t\t$value = trim($this->pi_getFFvalue($this->cObj->data['pi_flexform'], $param, $sheet));\n\t\treturn $value;\n\t}" ]
[ "0.7307334", "0.7182838", "0.71592605", "0.7103857", "0.70909715", "0.7019382", "0.70160884", "0.7011554", "0.691592", "0.6902715", "0.687079", "0.6840477", "0.68054175", "0.6803031", "0.6784207", "0.6777952", "0.6777952", "0.6775613", "0.67420775", "0.67310256", "0.6718981", "0.66537464", "0.66311604", "0.66241825", "0.6614307", "0.6602685", "0.6601826", "0.65539396", "0.655051", "0.6539096", "0.6538633", "0.6532675", "0.6520373", "0.65162647", "0.6483436", "0.6481838", "0.646681", "0.6457146", "0.64525694", "0.6452501", "0.6441354", "0.64403087", "0.64172107", "0.63998616", "0.6391853", "0.63697743", "0.6356236", "0.6354631", "0.63438964", "0.63377756", "0.6325704", "0.6325704", "0.6324409", "0.62917316", "0.62903655", "0.62901527", "0.6280824", "0.62800837", "0.62777805", "0.6274324", "0.6269381", "0.62686384", "0.62633544", "0.62535924", "0.62535924", "0.62535924", "0.62535924", "0.62535924", "0.62535924", "0.62535924", "0.62535924", "0.6248435", "0.622708", "0.6218165", "0.62173384", "0.6208659", "0.6207239", "0.6206325", "0.6206244", "0.6196843", "0.6190295", "0.61889845", "0.617016", "0.6162229", "0.6156943", "0.615111", "0.61409885", "0.61397326", "0.61301976", "0.6130004", "0.61291325", "0.61256355", "0.6119901", "0.6117586", "0.61170065", "0.6101956", "0.6100008", "0.6098851", "0.60979676", "0.6089363" ]
0.6202111
79
Set a configuration entry.
public static function set(string $key, mixed $value) { static::$config[$key] = $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setConfig($key, $value);", "public function set(string $name, $entry): void;", "public abstract function setConfig($key, $value);", "public static function set( $entry, $value ) {\r\n if ( !property_exists( 'Registry', $entry ) )\r\n throw new LibraryException('Registry entry does not exist');\r\n\r\n self::$$entry = $value;\r\n }", "public static function set(array $config): void;", "public static function set(string $config, mixed $value) : void{\n self::$configurations[$config] = $value;\n }", "function set($key, $val)\n {\n $config[$key] = $val;\n \n }", "public function set($config){\n\t\t$this->configValues = $config;\n\t}", "public function set ( $name, $value ) {\n\t\tif(!ctype_alpha(str_replace(' ', '', $name))) {\n\t\t\tthrow new \\InvalidArgumentException(sprintf('The name \"%s\" is invalid.', $name));\n\t\t}\n\t\t$this->config[$name] = $value;\n\t}", "public function __set($key, $value)\n\t{\n\t\t$this->config(array($key => $value));\n\t}", "public function setConfig($key, $value)\n {\n Config::set($key, $value);\n }", "public function setConfig($data, $value) {\n if (is_string($data)) {\n $this->_config[$data] = $value;\n } else {\n throw new ConfigException(\"Error while setting a config value\");\n }\n }", "public function set(string $key, $value) : void\n {\n if (isJson($this->configuration)) {\n $configuration = json_decode($this->configuration, true);\n $configuration[$key] = $value;\n $this->configuration = json_encode($configuration);\n } else {\n $this->configuration = json_encode([\n $key => $value\n ]);\n }\n\n $this->saveOrFail();\n }", "public function set($key, $value = null)\n {\n if (func_num_args() === 1 && is_array($key)) {\n foreach ($key as $name => $value) {\n $this->set($name, $value);\n }\n\n return;\n }\n\n if ($this->offsetExists($key)) {\n $this->config[ $key ] = $value;\n } else {\n throw new Exception(\"Config entry «{$key}» doesn't exists. \");\n }\n }", "public function set( $key, $value ) {\n\n $this->_getConfigVars();\n $this->_conf[$key] = $value;\n $this->_updateConfigFile();\n }", "public static function set($name, $value)\n {\n self::$config[$name] = $value;\n }", "protected function _set_parameter($key, $value)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $file = new File(self::FILE_CONFIG);\n\n if (! $file->exists())\n $file->create('root', 'root', '0644');\n\n $match = $file->replace_lines(\"/^$key\\s*=\\s*/\", \"$key = $value\\n\");\n\n if (!$match)\n $file->add_lines(\"$key = $value\\n\");\n\n $this->is_loaded = FALSE;\n }", "public function setEntry($entry)\n {\n if ($this->validateEntry($entry)) {\n $this->entries[] = $entry;\n }\n }", "function set_external_config($key, $value)\n {\n $this->_external_config[$key] = $value;\n }", "protected function _set_parameter($key, $value)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $this->is_loaded = FALSE;\n\n $file = new File(self::APP_CONFIG);\n\n if (! $file->exists())\n $file->create(\"root\", \"root\", \"0644\");\n\n $match = $file->replace_lines(\"/^$key\\s*=\\s*/\", \"$key = $value\\n\");\n\n if (!$match)\n $file->add_lines(\"$key = $value\\n\");\n }", "public function setConfig($id, $value) {\n\t\t$config = $this->em->getRepository('SSNTherapassBundle:Config')->find($id);\n\t\tif (is_null($config)) {\n\t\t\t$config = new Config();\n\t\t}\n\t\t$config->setValue($value);\n\t\tif (is_null($config->getId())) {\n\t\t\t$config->setId($id);\n\t\t\t$this->em->persist($config);\n\t\t}\n\t}", "public function set($key, $value)\n\t{\n\t\t$this->componentConfig->set($key, $value);\n\t}", "function set_item($item, $value)\n\t{\n\t\t$this->config[$item] = $value;\n\t}", "public function setConfig($a_configItem, $a_value)\n {\n $this->m_config[$a_configItem] = $a_value;\n }", "public function edit ( $name, $value ) {\n\t\tif( !$this->has ( $name ) ) {\n\t\t\tthrow new \\InvalidArgumentException(sprintf('The name \"%s\" does not exist and can not be edited.', $name));\n\t\t}\n\t\t$this->config[$name] = $value;\n\t}", "public function set($key, $value)\n {\n if ($config = $this->getConfigFor($key)) {\n if ($type = Arr::get($config, 'type')) {\n @settype($value, $type);\n }\n $this->setting->set($key, $value);\n }\n }", "public function set()\n\t{\n\t\t$options = $this->arguments->getOpts();\n\n\t\tif (empty($options))\n\t\t{\n\t\t\tif ($this->output->isInteractive())\n\t\t\t{\n\t\t\t\t$options = array();\n\t\t\t\t$option = $this->output->getResponse('What do you want to configure [name|email|etc...] ?');\n\n\t\t\t\tif (is_string($option) && !empty($option))\n\t\t\t\t{\n\t\t\t\t\t$options[$option] = $this->output->getResponse(\"What do you want your {$option} to be?\");\n\t\t\t\t}\n\t\t\t\telse if (empty($option))\n\t\t\t\t{\n\t\t\t\t\t$this->output->error(\"Please specify what option you want to set.\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->output->error(\"The {$option} option is not currently supported.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->output = $this->output->getHelpOutput();\n\t\t\t\t$this->help();\n\t\t\t\t$this->output->render();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (Config::save($options))\n\t\t{\n\t\t\t$this->output->addLine('Saved new configuration!', 'success');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->output->error('Failed to save configuration');\n\t\t}\n\t}", "public function setConfig(Configuration $config);", "public function set_config($key, $value) {\n $this->config[$key] = $value;\n }", "public static function set(string $key, $value)\n {\n if (!self::$configLoaded) {\n self::loadConfig();\n }\n\n self::$config[$key] = $value;\n }", "public function set($key, $value, $section = '')\n {\n $this->_config->set($key, $value, $section);\n }", "public function setWithConfig(string $id, $class, $config_file, $setter = false);", "public function set($setting_data = '', string $setting_key = '');", "public function setValue($key, $value) {\n\t\t$this->config->setValue($key, $value);\n\t}", "public function setConfiguration(array $config);", "public function setConfiguration($config){\r\n $this->configuration=$config;\r\n }", "function cfg_set(...$args)\n{\n\tglobal $CONFIG;\n\tswitch( count($args) )\n\t{\n\t\tcase 2: $CONFIG[$args[0]] = $args[1]; break;\n\t\tcase 3: $CONFIG[$args[0]][$args[1]] = $args[2]; break;\n\t\tcase 4: $CONFIG[$args[0]][$args[1]][$args[2]] = $args[3]; break;\n\t\tcase 5: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]] = $args[4]; break;\n\t\tcase 6: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]] = $args[5]; break;\n\t\tcase 7: $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]][$args[5]] = $args[6]; break;\n\t\tdefault: WdfException::Raise(\"Illegal argument count: \".count($args));\n\t}\n}", "public function set($key, $value) {\n $this->store->setConfigValue($key, $value);\n }", "public function set( $name, $value )\n\t{\n\t\t$name = trim( $name, '/' );\n\n\t\tif( $value !== null )\n\t\t{\n\t\t\t$this->cache[ $name ] = $value;\n\n\t\t\tif( isset( $this->negCache[ $name ] ) ) {\n\t\t\t\tunset( $this->negCache[ $name ] );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->negCache[ $name ] = true;\n\t\t}\n\n\t\t// don't store local configuration\n\t}", "public function set_config($name, $value) {\n $settingspluginname = 'assessmentsettings';\n $this->load_config();\n if ($value === null) {\n unset($this->config->$name);\n } else {\n $this->config->$name = $value;\n }\n set_config($name, $value, \"local_$settingspluginname\");\n }", "public function set($name, $value);", "public function set($name, $value);", "public function set($name, $value);", "public function __set($name, $value)\n {\n if ($this->_allowModifications) {\n if (is_array($value)) {\n $this->_data[$name] = new self($value, true);\n } else {\n $this->_data[$name] = $value;\n }\n $this->_count = count($this->_data);\n } else {\n /** @see Zend_Config_Exception */\n require_once 'Zend/Config/Exception.php';\n throw new Zend_Config_Exception('Zend_Config is read only');\n }\n }", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set(string $a_key, string $a_val) : void\n {\n $ilDB = $this->db;\n\n $ilDB->replace(\n \"crn_sts_mtr_settings\",\n array(\n \"keyword\" => array(\"text\", $a_key)),\n array(\n \"value\" => array(\"clob\", $a_val))\n );\n\n $this->setting[$a_key] = $a_val;\n }", "public function set ($key, $value);", "public function __set($name, $value)\n\t{\n\t\t// Ensure that setting a date always sets a JDate instance.\n\t\tif ((($name == 'updatedDate') || ($name == 'publishedDate')) && !($value instanceof JDate))\n\t\t{\n\t\t\t$value = new JDate($value);\n\t\t}\n\n\t\t// Validate that any authors that are set are instances of JFeedPerson or null.\n\t\tif (($name == 'author') && (!($value instanceof JFeedPerson) || ($value === null)))\n\t\t{\n\t\t\tthrow new InvalidArgumentException('JFeedEntry \"author\" must be of type JFeedPerson. ' . gettype($value) . 'given.');\n\t\t}\n\n\t\t// Validate that any sources that are set are instances of JFeed or null.\n\t\tif (($name == 'source') && (!($value instanceof JFeed) || ($value === null)))\n\t\t{\n\t\t\tthrow new InvalidArgumentException('JFeedEntry \"source\" must be of type JFeed. ' . gettype($value) . 'given.');\n\t\t}\n\n\t\t// Disallow setting categories, contributors, or links directly.\n\t\tif (($name == 'categories') || ($name == 'contributors') || ($name == 'links'))\n\t\t{\n\t\t\tthrow new InvalidArgumentException('Cannot directly set JFeedEntry property \"' . $name . '\".');\n\t\t}\n\n\t\t$this->properties[$name] = $value;\n\t}", "public function set( $key, $value );", "public function set( $key, $value );", "public function testGetSetConfig()\n {\n $this->config->set('foo', 'baz');\n $this->assertEquals($this->config->get('foo'), 'baz');\n }", "public function set(string $path, $value);", "public function set($key, $value) {\n\t\tSettings::set($this->getName(), $key, $value);\n\t}", "public function set_item($item, $value)\n\t{\n\t\tGSMS::$config[$item] = $value;\n\t}", "function set($name, $value, $site_guid = 0) {\n\n\n\t\t$name = trim($name);\n\n\t\t// cannot store anything longer than 255 characters in db, so catch before we set\n\t\tif (elgg_strlen($name) > 255) {\n\t\t\t_elgg_services()->logger->error(\"The name length for configuration variables cannot be greater than 255\");\n\t\t\treturn false;\n\t\t}\n\n\t\t$site_guid = (int) $site_guid;\n\t\tif ($site_guid == 0) {\n\t\t\t$site_guid = (int) $this->CONFIG->site_guid;\n\t\t}\n\n\t\tif ($site_guid == $this->CONFIG->site_guid) {\n\t\t\t$this->CONFIG->$name = $value;\n\t\t}\n\n\t\t$escaped_name = sanitize_string($name);\n\t\t$escaped_value = sanitize_string(serialize($value));\n\t\t$result = _elgg_services()->db->insertData(\"INSERT INTO {$this->CONFIG->dbprefix}config\n\t\t\tSET name = '$escaped_name', value = '$escaped_value', site_guid = $site_guid\n\t\t\tON DUPLICATE KEY UPDATE value = '$escaped_value'\");\n\n\t\treturn $result !== false;\n\t}", "public function set( $option, $value );", "abstract protected function saveConfiguration($name, $value);", "public function setConfig($config)\r\n {\r\n $this->config = $config;\r\n }", "public function set(string $configPath, ?string $value, string $scope = null): self;", "public function setData($key, $value);", "public function setData($key, $value);", "public function set(string $entryIdentifier, $data, array $tags = [], int $lifetime = null);", "public function set($name, $value)\n {\n $this->settings[$name] = $value;\n }", "public static function set($key, $value)\n {\n $config = static::load();\n\n Arr::set($config, self::buildKey($key), is_array($value) ? $value : trim($value));\n\n file_put_contents(static::path(), json_encode($config, JSON_PRETTY_PRINT));\n }", "public function set(\n string $key,\n $value,\n ): void {\n $this->boot();\n $this->configuration->eventDispatcher()->dispatch(new Set($this, $key, $value));\n }", "public function set($name, $value){}", "protected function setConfigValue($data){\t\n\t\tMage::getModel('core/config_data')->load($data['path'],'path')->setData($data)->save();\n\t}", "public function set(string $key, $value);", "public function set(string $key, $value);", "function setConfigValue( $path, $value, $type = 'leave' )\n\t{\n\t\t$this->conf[$path]\t\t\t=\t$this->convertValue( $value, $type );\n\t\t$this->currentConf[$path]\t=\t$this->convertValue( $value, $type );\n\t}", "public function set($parameter, $value);", "function set($setting, $value , $instance_id = null)\r\n\t{\r\n\t\treturn parent::set($setting, $value);\r\n\t}", "public function set($key, $value) {\n\n }", "public static function set($key, $value)\n {\n Arr::set(static::$config, $key, $value);\n }", "public function setSetting($name, $format, $value)\n\t{\n\t\t$this->localSettings[$format][$name] = $value;\n\t}", "public function setConfig($config)\n {\n $this->config = $config;\n }", "public function setConfig($config)\n {\n $this->config = $config;\n }", "public function set_value($set_value = NULL,$index = NULL,$item = NULL){\n if(is_null($index)){\n $this->ini_file_array = $set_value;\n } else if(is_null($item)){\n $this->ini_file_array[\"$index\"] = $set_value;\n } else {\n $this->ini_file_array[\"$index\"][\"$item\"] = $set_value;\n }\n }", "public function setConfig($config)\n\t{\n\t\t$this->config = $config;\n\t}", "public function set(string $key, $value): void;", "public function setOption($key, $value);", "public static function set($id, $value)\n {\n self::$config[$id] = $value;\n\n if (Configuration::where('id', $id)->exists()) {\n Configuration::where('id', $id)->update([\n 'value' => serialize($value)\n ]);\n\n return;\n }\n\n Configuration::insert([\n 'id' => $id,\n 'value' => serialize($value)\n ]);\n }", "public function set($name, $value)\n {\n }", "public function configure($option, $value)\n {\n // Dumpy won't let you add any custom config options, only update the existing ones.\n if ( ! array_key_exists($option, $this->config)) {\n // Note: something really weird is going to happen if $option is, say, an array.\n throw new InvalidArgumentException(\"Invalid option name: {$option}\");\n }\n\n // Note that:\n // 1) the passed value can be of any type and contain anything\n // 2) the option value will be overridden permanently, no way back\n $this->config[$option] = $value;\n }" ]
[ "0.70663667", "0.67675793", "0.67285955", "0.6406907", "0.6346483", "0.6307474", "0.62672573", "0.6248922", "0.6164027", "0.6146954", "0.6123163", "0.6122358", "0.6108149", "0.6091098", "0.60199714", "0.6004676", "0.5956158", "0.5951871", "0.5945465", "0.5944834", "0.591178", "0.589913", "0.58916104", "0.5889311", "0.58877134", "0.58835673", "0.5869362", "0.5868349", "0.58385515", "0.5823584", "0.580524", "0.580201", "0.5800501", "0.5786928", "0.57744014", "0.57519144", "0.57510847", "0.5742152", "0.57159734", "0.5711263", "0.5703887", "0.5703887", "0.5703887", "0.57012075", "0.5700815", "0.5700815", "0.5700815", "0.5700815", "0.5700815", "0.5700815", "0.5700815", "0.5700815", "0.5700815", "0.5700815", "0.5700815", "0.5700815", "0.5700815", "0.5700815", "0.5700815", "0.5700815", "0.5700815", "0.56956863", "0.56891286", "0.568842", "0.5681662", "0.5681662", "0.5672119", "0.56665444", "0.56663406", "0.56544936", "0.56471807", "0.56455195", "0.56322837", "0.56282973", "0.5616725", "0.56125444", "0.56125444", "0.5610026", "0.5582644", "0.55712086", "0.5569466", "0.5569162", "0.5566841", "0.5565256", "0.5565256", "0.5563274", "0.555857", "0.554705", "0.5543269", "0.55330503", "0.55317664", "0.5531399", "0.5531399", "0.5528216", "0.5524596", "0.5521262", "0.5519621", "0.5516123", "0.5509304", "0.5506826" ]
0.5956318
16
Load prices data for a list of product ids and a given store.
public function loadPriceData($storeId, $productIds) { $websiteId = $this->getStore($storeId)->getWebsiteId(); // check if entities data exist in price index table $select = $this->getConnection()->select() ->from(['p' => $this->getTable('catalog_product_index_price')]) ->where('p.customer_group_id = ?', 0) // for all customers ->where('p.website_id = ?', $websiteId) ->where('p.entity_id IN (?)', $productIds); $result = $this->getConnection()->fetchAll($select); return $result; if ($this->limiter > 3) { return $result; } // new added product prices may not be populated into price index table in some reason, // try to force reindex for unprocessed entities $processedIds = []; foreach ($result as $priceData) { $processedIds[] = $priceData['entity_id']; } $diffIds = array_diff($productIds, $processedIds); if (!empty($diffIds)) { $this->getPriceIndexer()->executeList($diffIds); $this->limiter += 1; $this->loadPriceData($storeId, $productIds); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadProductDataCollection($productIds, $storeId = null)\n {\n $collection = $this->productCollectionFactory->create();\n try {\n $store = $this->_storeModelStoreManagerInterface->getStore($storeId);\n } catch (\\Exception $e) {\n $this->_searchHelperData->log(LoggerConstants::ZEND_LOG_ERR, sprintf(\"Store not found %d\", $storeId));\n\n return null;\n }\n $collection->addAttributeToSelect($this->getUsedMagentoAttributes());\n $collection->addAttributeToSelect('price_type');\n $collection->addIdFilter($productIds);\n $collection->setStore($store);\n $collection->addStoreFilter();\n $collection->setFlag('has_stock_status_filter', true);\n\n $collection->load();\n $collection->addCategoryIds();\n\n return $collection;\n }", "public function getPriceIndexData($productIds, $storeId)\n {\n $websiteId = $this->storeManager->getStore($storeId)->getWebsiteId();\n\n $this->websiteId = $websiteId;\n $priceProductsIndexData = $this->_getCatalogProductPriceData($productIds);\n $this->websiteId = null;\n\n if (!isset($priceProductsIndexData[$websiteId])) {\n return [];\n }\n\n return $priceProductsIndexData[$websiteId];\n }", "protected function _getCatalogProductPriceData($productIds = null)\n {\n $connection = $this->getConnection();\n $catalogProductIndexPriceSelect = [];\n\n foreach ($this->dimensionCollectionFactory->create() as $dimensions) {\n if (!isset($dimensions[WebsiteDimensionProvider::DIMENSION_NAME]) ||\n $this->websiteId === null ||\n $dimensions[WebsiteDimensionProvider::DIMENSION_NAME]->getValue() === $this->websiteId) {\n $select = $connection->select()->from(\n $this->tableResolver->resolve('catalog_product_index_price', $dimensions),\n ['entity_id', 'customer_group_id', 'website_id', 'min_price']\n );\n if ($productIds) {\n $select->where('entity_id IN (?)', $productIds);\n }\n $catalogProductIndexPriceSelect[] = $select;\n }\n }\n\n $catalogProductIndexPriceUnionSelect = $connection->select()->union($catalogProductIndexPriceSelect);\n\n $result = [];\n foreach ($connection->fetchAll($catalogProductIndexPriceUnionSelect) as $row) {\n $result[$row['website_id']][$row['entity_id']][$row['customer_group_id']] = round($row['min_price'], 2);\n }\n\n return $result;\n }", "public function LoadProductsForPrice()\n\t\t{\n\t\t\t$query = \"\n\t\t\t\tSELECT\n\t\t\t\t\tp.*,\n\t\t\t\t\tFLOOR(prodratingtotal / prodnumratings) AS prodavgrating,\n\t\t\t\t\timageisthumb,\n\t\t\t\t\timagefile,\n\t\t\t\t\t\" . GetProdCustomerGroupPriceSQL() . \"\n\t\t\t\tFROM\n\t\t\t\t\t(\n\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\tDISTINCT ca.productid,\n\t\t\t\t\t\t\tFLOOR(prodratingtotal / prodnumratings) AS prodavgrating\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t[|PREFIX|]categoryassociations ca\n\t\t\t\t\t\t\tINNER JOIN [|PREFIX|]products p ON p.productid = ca.productid\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tp.prodvisible = 1 AND\n\t\t\t\t\t\t\tca.categoryid IN (\" . $this->GetProductCategoryIds() . \") AND\n\t\t\t\t\t\t\tp.prodcalculatedprice >= '\".(int)$this->GetMinPrice().\"' AND\n\t\t\t\t\t\t\tp.prodcalculatedprice <= '\".(int)$this->GetMaxPrice().\"'\n\t\t\t\t\t\tORDER BY\n\t\t\t\t\t\t\t\" . $this->GetSortField() . \", p.prodname ASC\n\t\t\t\t\t\t\" . $GLOBALS['ISC_CLASS_DB']->AddLimit($this->GetStart(), GetConfig('CategoryProductsPerPage')) . \"\n\t\t\t\t\t) AS ca\n\t\t\t\t\tINNER JOIN [|PREFIX|]products p ON p.productid = ca.productid\n\t\t\t\t\tLEFT JOIN [|PREFIX|]product_images pi ON (pi.imageisthumb = 1 AND p.productid = pi.imageprodid)\n\t\t\t\";\n\n\t\t\t//$query .= $GLOBALS['ISC_CLASS_DB']->AddLimit($this->GetStart(), GetConfig('CategoryProductsPerPage'));\n\t\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t\twhile ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {\n\t\t\t\t$row['prodavgrating'] = (int)$row['prodavgrating'];\n\t\t\t\t$this->_priceproducts[] = $row;\n\t\t\t}\n\t\t}", "public static function getPrice(&$products_table = NULL, $uid = NULL) {\n Yii::import('application.controllers.ProfileController');\n\n if (!$products_table) { //if it's cart products table\n $table = 'store_cart';\n } else {\n $table = 'temp_order_product_' . (Yii::app()->user->id ? Yii::app()->user->id : 'exchange');\n $query = \"DROP TABLE IF EXISTS {$table};\";\n $query .= \"CREATE TEMPORARY TABLE {$table} (product_id int(11) unsigned, quantity smallint(5) unsigned);\";\n foreach ($products_table as $item) {\n\n if ($item instanceof OrderProduct || $item instanceof stdClass || $item instanceof Cart) {\n $product = Product::model()->findByAttributes(array('id' => (string) $item->product_id));\n } else {\n $product = Product::model()->findByAttributes(array('code' => (string) $item->code));\n }\n\n if ($product) {\n $query .= \"INSERT INTO {$table} VALUES ({$product->id}, {$item->quantity});\";\n } else {\n throw new Exception('Product not found. Product code: ' . $item->code);\n }\n }\n Yii::app()->db->createCommand($query)->execute();\n }\n $query = Yii::app()->db->createCommand()\n ->select('SUM(c.quantity*round(prices.price*(1-greatest(ifnull(disc.percent,0),ifnull(disc1.percent,0),ifnull(disc2.percent,0))/100))) as c_summ, prices.price_id')\n ->from($table . ' c')\n ->join('store_product product', 'c.product_id=product.id')\n ->join('store_product_price prices', 'product.id=prices.product_id')\n ->join('store_price price', 'price.id=prices.price_id')\n ->leftJoin('store_discount disc', \"disc.product_id=0 and disc.actual=1 and (disc.begin_date='0000-00-00' or disc.begin_date<=CURDATE()) and (disc.end_date='0000-00-00' or disc.end_date>=CURDATE())\")\n ->leftJoin('store_product_category cat', 'cat.product_id=product.id')\n ->leftJoin('store_discount_category discat', 'discat.category_id=cat.category_id')\n ->leftJoin('store_discount disc1', \"disc1.product_id=1 and disc1.id=discat.discount_id and disc1.actual=1 and (disc1.begin_date='0000-00-00' or disc1.begin_date<=CURDATE()) and (disc1.end_date='0000-00-00' or disc1.end_date>=CURDATE())\")\n ->leftJoin('store_discount_product dispro', 'dispro.product_id=product.id')\n ->leftJoin('store_discount disc2', \"disc2.product_id=2 and disc2.id=dispro.discount_id and disc2.actual=1 and (disc2.begin_date='0000-00-00' or disc2.begin_date<=CURDATE()) and (disc2.end_date='0000-00-00' or disc2.end_date>=CURDATE())\")\n ->order('price.summ DESC')\n ->group('prices.price_id, price.summ')\n ->having('c_summ>price.summ');\n\n if (!$products_table){\n $sid = ProfileController::getSession();\n $query->where(\"(session_id=:sid AND :sid<>'') OR (user_id=:uid AND :sid<>'')\", array(\n ':sid' => $sid,\n ':uid' => Yii::app()->user->isGuest ? '' : Yii::app()->user->id,\n ));\n }\n\n// $text = $query->getText();\n $row = $query->queryRow();\n if ($row)\n $price = self::model()->findByPk($row['price_id']);\n else\n $price = self::model()->find(array('order' => 'summ'));\n\n if ($products_table)\n Yii::app()->db->createCommand(\"DROP TABLE IF EXISTS {$table};\")->execute();\n\n if ($uid)\n $profile = CustomerProfile::model()->with('price')->findByAttributes(array('user_id' => $uid));\n else\n $profile = ProfileController::getProfile();\n\n if ($profile && $profile->price_id && $profile->price->summ > $price->summ)\n return $profile->price;\n else\n return $price;\n }", "public function getProductsFromStore(request $request)\n {\n $data = $request->all();\n if(!empty($data['store_id']))\n {\n $storeId = $data['store_id'];\n $infoCheck = StoreProduct::where(['store_id'=>$storeId])->first();\n $itemId = 1;\n\n if($infoCheck)\n {\n $itemId = $infoCheck->product_id;\n }\n\n $ShopifyResponse = shopify_call($storeId, '/admin/api/2020-04/products/count.json', array(), 'GET');\n $response = json_decode($ShopifyResponse['response']);\n $countData= $response->count;\n $pageNo = $countData/250;\n $pnoLimit = round($pageNo+0.55);\n $itemId = $itemId;\n\n for($i=1; $i <= $pnoLimit; $i++)\n {\n $urg = '/admin/api/2020-04/products.json?limit=250&since_id='.$itemId;\n $response = Getdata($storeId,$urg);\n $productCount = count($response->products);\n $j = 1;\n foreach ($response->products as $item)\n {\n if($j == $productCount)\n {\n $itemId = $item->id;\n }\n $checkProduct = StoreProduct::where(['store_id' => $storeId,'product_id' => '$item->id'])->first();\n\n if(!$checkProduct)\n {\n $postData = [\n \"product_id\" => $item->id,\n \"store_id\" => $storeId,\n \"title\" => $item->title,\n \"vendor\" => $item->vendor,\n \"product_type\" => $item->product_type,\n \"handle\" => $item->handle,\n \"tags\" => $item->tags,\n \"published_scope\" => $item->published_scope,\n ];\n $response = StoreProduct::create($postData);\n $insertProductId = $response->id;\n\n /*\n * Add product Varients\n */ \n foreach ($item->variants as $items)\n {\n $insertDataVariants = [\n \"store_products_id\" => $insertProductId,\n \"store_id\" => $storeId,\n \"variant_id\" => $items->id,\n \"product_id\" => $items->product_id,\n \"title\" => $items->title,\n \"price\" => $items->price,\n \"compare_at_price\" => $items->compare_at_price,\n \"sku\" => $items->sku,\n \"position\" => $items->position,\n \"fulfillment_service\" => $items->fulfillment_service,\n \"inventory_management\" => $items->inventory_management,\n \"inventory_quantity\" => $items->inventory_quantity,\n \"option1\" => $items->option1,\n \"option2\" => $items->option2,\n \"option3\" => $items->option3,\n \"image_id\" => $items->image_id\n ];\n StoreProductVariants::create($insertDataVariants);\n } \n\n /*\n * Add product images\n */ \n foreach ($item->images as $itemimg)\n {\n $insertProductImages = [\n \"store_products_id\" => $insertProductId,\n \"store_id\" => $storeId,\n \"image_id\" => $itemimg->id,\n \"product_id\" => $itemimg->product_id,\n \"src\" => $itemimg->src,\n \"alt\" => $itemimg->alt,\n \"position\" => $itemimg->position,\n ];\n StoreProductImages::create($insertDataVariants);\n }\n }\n $j++;\n }\n }\n return response()->json(['status' =>true, 'message' =>'Data import','data' =>\"got product\"]); \n }\n else\n {\n return response()->json(['status' =>true, 'message' =>'Data not found','data'=>[]]);\n }\n }", "public function loadProductAttributeValues($productIds = array())\n {\n $selects = [];\n $storeId = $this->getIndex()->getStoreId();\n $storeIds = array(0, $storeId);\n \n $connection = $this->_attributeCollection->getConnection();\n \n $attributeTables = array();\n $attributesMap = array();\n \n $this->_dataProductAttributeValues = array();\n \n $attributesWithSelect = array();\n $attributesWithMultipleSelect = array();\n \n $productSearchWeightAttributes = $this->getProductAttrCodeUseForSearchWeight();\n if (!empty($productSearchWeightAttributes)) {\n $productSearchWeightAttributes = explode(',', $productSearchWeightAttributes);\n $conditions = 'main_table.attribute_code IN (?)';\n $this->_attributeCollection->getSelect()->orWhere($conditions, $productSearchWeightAttributes);\n }\n \n foreach ($this->_attributeCollection as $attribute) {\n $this->_dataProductAttributeData[$attribute->getAttributeCode()] = $attribute;\n $this->_dataProductAttributeData[$attribute->getAttributeId()] = $attribute;\n if (!$attribute->isStatic()) {\n //Collect attributes with frontendInput is select\n if ($attribute->getFrontendInput() == 'select') {\n //Ignore attribute has source model, those attributes will load option from source model\n $attributesWithSelect[$attribute->getAttributeId()] = $attribute->getBackend()->getTable();\n }\n //Collect attributes with frontendInput is multiple select\n if ($attribute->getFrontendInput() == 'multiselect') {\n $attributesWithMultipleSelect[$attribute->getAttributeId()] = $attribute->getBackend()->getTable();\n }\n $attributeTables[$attribute->getBackend()->getTable()][] = $attribute->getAttributeId();\n $attributesMap[$attribute->getAttributeId()] = $attribute->getAttributeCode();\n }\n }\n \n $productEntityLinkField = $this->getProductEntityLinkField();\n \n $index = 1;\n if (count($attributeTables)) {\n $attributeTables = array_keys($attributeTables);\n foreach ($productIds as $productId) {\n foreach ($attributeTables as $attributeTable) {\n $alias = 't'.$index;\n $aliasEntity = 'tf'.$index;\n $select = $connection->select()\n ->from(\n [$alias => $attributeTable],\n [\n 'value' => $alias.'.value',\n 'attribute_id' => $alias.'.attribute_id'\n ]\n )->joinInner(\n [$aliasEntity => 'catalog_product_entity'],\n \"{$alias}.{$productEntityLinkField} = {$aliasEntity}.{$productEntityLinkField}\",\n [\n 'product_id' => $aliasEntity.'.entity_id'\n ]\n )\n ->where($aliasEntity.'.entity_id = ?', $productId)\n ->where($alias.'.store_id' . ' IN (?)', $storeIds)\n ->order($alias.'.store_id' . ' DESC');\n $index++;\n $selects[] = $select;\n }\n }\n \n //Please be careful here Because $unionSelect can be nothing that is the reason for fetchAll throw error\n if (count($selects) > 0) {\n $unionSelect = new \\Magento\\Framework\\DB\\Sql\\UnionExpression(\n $selects,\n \\Magento\\Framework\\DB\\Select::SQL_UNION_ALL\n );\n \n foreach ($connection->fetchAll($unionSelect) as $attributeValue) {\n if (array_key_exists($attributeValue['attribute_id'], $attributesMap)) {\n $pId = $attributeValue['product_id'];\n $attrId = $attributeValue['attribute_id'];\n \n $this->_dataProductAttributeValues[$pId][$attributesMap[$attrId]] = $attributeValue['value'];\n \n //Collect data for attribute has options like select/multiple select\n if (in_array($attrId, array_keys($attributesWithSelect))) {\n //This function call may cause performance issue - need better way\n //load attribute option labels for autocomplete only, if laod attribute it may cause performance issue\n if ($this->_isAttributeRequiredToLoadOptionLabel($attrId)) {\n $attributeValue['option_label'] = $this->_getAttributeOptionLabels(\n $connection,\n $attrId,\n $attributeValue['value'],\n $storeIds\n );\n }\n \n $this->_dataProductAttributeValuesOptions[$pId][$attributesMap[$attrId]] = array($attributeValue['value']);\n }\n if (in_array($attrId, array_keys($attributesWithMultipleSelect))) {\n $this->_dataProductAttributeValuesOptions[$pId][$attributesMap[$attrId]] = explode(',', $attributeValue['value']);\n //This function call may cause performance issue - need better way\n //load attribute option labels for autocomplete only, if laod attribute it may cause performance issue\n if ($this->_isAttributeRequiredToLoadOptionLabel($attrId)) {\n $attributeValue['option_label'] = $this->_getAttributeOptionLabels(\n $connection,\n $attrId,\n explode(',', $attributeValue['value']),\n $storeIds\n );\n }\n }\n //TODO: for multiple select\n if (isset($attributeValue['option_label'])) {\n $this->_dataProductAttributeValuesOptionsLabels[$pId][$attributesMap[$attrId]] = $attributeValue['option_label'];\n }\n }\n }\n }\n }\n \n return $this;\n }", "public function populate_stocks($products) {\n\n foreach($products as &$p) {\n $this->db->select('s.id, s.name, st.stock');\n $this->db->from('stores AS s');\n $this->db->join('stocks AS st', 's.id = st.store_id', 'left');\n $this->db->where('st.products_id', $p->id);\n $p->stocks = $this->db->get()->result();\n }\n\n return $products;\n }", "function _prepareGroupedProductPriceData($entityIds = null) {\n\t\t\t$write = $this->_getWriteAdapter( );\n\t\t\t$table = $this->getIdxTable( );\n\t\t\t$select = $write->select( )->from( array( 'e' => $this->getTable( 'catalog/product' ) ), 'entity_id' )->joinLeft( array( 'l' => $this->getTable( 'catalog/product_link' ) ), 'e.entity_id = l.product_id AND l.link_type_id=' . LINK_TYPE_GROUPED, array( ) )->join( array( 'cg' => $this->getTable( 'customer/customer_group' ) ), '', array( 'customer_group_id' ) );\n\t\t\t$this->_addWebsiteJoinToSelect( $select, true );\n\t\t\t$this->_addProductWebsiteJoinToSelect( $select, 'cw.website_id', 'e.entity_id' );\n\n\t\t\tif ($this->getVersionHelper( )->isGe1600( )) {\n\t\t\t\t$minCheckSql = $write->getCheckSql( 'le.required_options = 0', 'i.min_price', 0 );\n\t\t\t\t$maxCheckSql = $write->getCheckSql( 'le.required_options = 0', 'i.max_price', 0 );\n\t\t\t\t$taxClassId = $this->_getReadAdapter( )->getCheckSql( 'MIN(i.tax_class_id) IS NULL', '0', 'MIN(i.tax_class_id)' );\n\t\t\t\t$minPrice = new Zend_Db_Expr( 'MIN(' . $minCheckSql . ')' );\n\t\t\t\t$maxPrice = new Zend_Db_Expr( 'MAX(' . $maxCheckSql . ')' );\n\t\t\t} \nelse {\n\t\t\t\t$taxClassId = new Zend_Db_Expr( 'IFNULL(i.tax_class_id, 0)' );\n\t\t\t\t$minPrice = new Zend_Db_Expr( 'MIN(IF(le.required_options = 0, i.min_price, 0))' );\n\t\t\t\t$maxPrice = new Zend_Db_Expr( 'MAX(IF(le.required_options = 0, i.max_price, 0))' );\n\t\t\t}\n\n\t\t\t$stockId = 'IF (i.stock_id IS NOT NULL, i.stock_id, 1)';\n\t\t\t$select->columns( 'website_id', 'cw' )->joinLeft( array( 'le' => $this->getTable( 'catalog/product' ) ), 'le.entity_id = l.linked_product_id', array( ) );\n\n\t\t\tif ($this->getVersionHelper( )->isGe1700( )) {\n\t\t\t\t$columns = array( 'tax_class_id' => $taxClassId, 'price' => new Zend_Db_Expr( 'NULL' ), 'final_price' => new Zend_Db_Expr( 'NULL' ), 'min_price' => $minPrice, 'max_price' => $maxPrice, 'tier_price' => new Zend_Db_Expr( 'NULL' ), 'group_price' => new Zend_Db_Expr( 'NULL' ), 'stock_id' => $stockId, 'currency' => 'i.currency', 'store_id' => 'i.store_id' );\n\t\t\t} \nelse {\n\t\t\t\t$columns = array( 'tax_class_id' => $taxClassId, 'price' => new Zend_Db_Expr( 'NULL' ), 'final_price' => new Zend_Db_Expr( 'NULL' ), 'min_price' => $minPrice, 'max_price' => $maxPrice, 'tier_price' => new Zend_Db_Expr( 'NULL' ), 'stock_id' => $stockId, 'currency' => 'i.currency', 'store_id' => 'i.store_id' );\n\t\t\t}\n\n\t\t\t$select->joinLeft( array( 'i' => $table ), '(i.entity_id = l.linked_product_id) AND (i.website_id = cw.website_id) AND ' . '(i.customer_group_id = cg.customer_group_id)', $columns );\n\t\t\t$select->group( array( 'e.entity_id', 'cg.customer_group_id', 'cw.website_id', $stockId, 'i.currency', 'i.store_id' ) )->where( 'e.type_id=?', $this->getTypeId( ) );\n\n\t\t\tif (!is_null( $entityIds )) {\n\t\t\t\t$select->where( 'l.product_id IN(?)', $entityIds );\n\t\t\t}\n\n\t\t\t$eventData = array( 'select' => $select, 'entity_field' => new Zend_Db_Expr( 'e.entity_id' ), 'website_field' => new Zend_Db_Expr( 'cw.website_id' ), 'stock_field' => new Zend_Db_Expr( $stockId ), 'currency_field' => new Zend_Db_Expr( 'i.currency' ), 'store_field' => new Zend_Db_Expr( 'cs.store_id' ) );\n\n\t\t\tif (!$this->getWarehouseHelper( )->getConfig( )->isMultipleMode( )) {\n\t\t\t\t$eventData['stock_field'] = new Zend_Db_Expr( 'i.stock_id' );\n\t\t\t}\n\n\t\t\tMage::dispatchEvent( 'catalog_product_prepare_index_select', $eventData );\n\t\t\t$query = $select->insertFromSelect( $table );\n\t\t\t$write->query( $query );\n\t\t\treturn $this;\n\t\t}", "public function get_prices($ids)\n\t{\n\t\t$data = '';\n\n\t\t// create comma sepearted lists\n\t\t$items = '';\n\t\tforeach ($ids as $id) {\n\t\t\tif ($items != '') {\n\t\t\t\t$items .= ',';\n\t\t\t}\n\t\t\t$items .= $id;\n\t\t}\n\n\t\t// get multiple product info based on list of ids\n\t\tif($result = $this->Database->query(\"SELECT id, price FROM $this->db_table WHERE id IN ($items) ORDER BY name\" ))\n\t\t{\n\t\t\tif($result->num_rows > 0)\n\t\t\t{\n\t\t\t\twhile($row = $result->fetch_array())\n\t\t\t\t{\n\t\t\t\t\t$data[] = array(\n\t\t\t\t\t\t'id' => $row['id'],\n\t\t\t\t\t\t'price' => $row['price']\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\n\t}", "public function getProductsForIndex($storeId, $productIds = null);", "private function collectProductData(int $storeId, string $type = 'manual'): array\n {\n $extraParameters = [\n 'filters' => [\n 'custom' => $this->feedConfigRepository->getFilters($storeId)['advanced_filters'],\n 'exclude_attribute' => 'tradetracker_exclude',\n 'exclude_disabled' => !$this->feedConfigRepository->getFilters($storeId)['add_disabled_products']\n ],\n 'stock' => [\n 'inventory' => true,\n ],\n 'category' => [\n 'exclude_attribute' => ['code' => 'tradetracker_disable_export', 'value' => 1],\n 'replace_attribute' => 'tradetracker_category',\n 'include_anchor' => true\n ],\n 'behaviour' => [\n 'configurable' => $this->feedConfigRepository->getConfigProductsBehaviour($storeId),\n 'bundle' => $this->feedConfigRepository->getBundleProductsBehaviour($storeId),\n 'grouped' => $this->feedConfigRepository->getGroupedProductsBehaviour($storeId)\n ]\n ];\n\n return $this->type->execute(\n $this->entityIds,\n $this->attributeMap,\n $extraParameters,\n $storeId,\n $type == 'preview' ? self::PREVIEW_QTY : 100000\n );\n }", "public function setStoreIds($storeIds);", "public function prepareData($collection, $productIds)\n {\n $productCollection = clone $collection;\n $productCollection->addAttributeToFilter('entity_id', ['in' => $productIds]);\n while ($product = $productCollection->fetchItem()) {\n $variations = [];\n $collectionAttr = $this->getWeeAttributeCollection();\n if ($collectionAttr->getSize() > 0) {\n foreach ($collectionAttr as $item) {\n $item->setScopeGlobal(1);\n $tax = $this->getDataTax($product, $item);\n if (!empty($tax)) {\n foreach ($tax as $element) {\n $str = 'name=' . $item->getAttributeCode()\n . Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR .\n 'country=' . $element['country']\n . Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR .\n 'state=' . $element['state']\n . Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR .\n 'value=' . $element['value'];\n if (isset($element['website_id'])) {\n $str .= Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR .\n 'website_id=' . $element['website_id'];\n }\n $variations[] = $str;\n }\n }\n }\n }\n $result = '';\n if (!empty($variations)) {\n $result = [\n self::WEE_TAX_VARIATIONS_COLUMN => implode(\n ImportProduct::PSEUDO_MULTI_LINE_SEPARATOR,\n $variations\n )\n ];\n }\n $this->weeTaxData[$product->getId()] = $result;\n }\n }", "public function getProducts()\n {\n foreach ($this->productIds 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 ProductModel())->load($id);\n }\n }", "function load_data_structure_price($user_id, $params = array())\n {\n $where_array = array();\n $language_id = ((int)$this->getRequestValue('language_id') == 0 ? 0 : (int)$this->getRequestValue('language_id'));\n\n if (count($where_array) > 0) {\n $where = ' WHERE ' . implode(' AND ', $where_array);\n }\n $query = \"SELECT COUNT(\" . DB_PREFIX . \"_price.price_id) as total, \" . DB_PREFIX . \"_price.category_id FROM \" . DB_PREFIX . \"_price GROUP BY \" . DB_PREFIX . \"_price.category_id\";\n $DBC = DBC::getInstance();\n $stmt = $DBC->query($query);\n if ($stmt) {\n while ($ar = $DBC->fetch($stmt)) {\n\n $ret['data'][$user_id][$ar['category_id']] = $ar['total'];\n }\n }\n return $ret;\n }", "public function getConfigProductsBehaviour(int $storeId): array;", "public function run()\n {\n $prices = [\n [\n 'product_id' => 2,\n 'user_id' => 3,\n 'price' => 18,\n 'created_at' => now(),\n 'updated_at' => now()\n ],\n [\n 'product_id' => 3,\n 'user_id' => 3,\n 'price' => 15,\n 'created_at' => now(),\n 'updated_at' => now()\n ],\n [\n 'product_id' => 2,\n 'user_id' => 4,\n 'price' => 18,\n 'created_at' => now(),\n 'updated_at' => now()\n ],\n [\n 'product_id' => 3,\n 'user_id' => 4,\n 'price' => 15,\n 'created_at' => now(),\n 'updated_at' => now()\n ],\n ];\n ProductPrice::query()->insert($prices);\n }", "public function get_prices()\n\t{\n\t\t$product_price_old = 0;\n\t\t$product_price_sale = 0;\n\t\t$price = 0;\n\t\t$eco = 0;\n\t\t$taxes = 0;\n\t\t$dataoc = isset($this->request->post['dataoc']) ? $this->request->post['dataoc'] : '';\n\n\t\tif (!empty($dataoc)) {\n\t\t\t$dataoc = str_replace('&quot;', '\"', $dataoc);\n\t\t\t$json = @json_decode($dataoc, true);\n\t\t\t$product_quantity = isset($json['quantity']) ? $json['quantity'] : 0;\n\t\t\t$product_id_oc = isset($json['product_id_oc']) ? $json['product_id_oc'] : 0;\n\t\t\tif ($product_id_oc == 0) $product_id_oc = isset($json['_product_id_oc']) ? $json['_product_id_oc'] : 0;\n\n\t\t\t// get options\n\t\t\t$options = isset($json['option_oc']) ? $json['option_oc'] : array();\n\t\t\tforeach ($options as $key => $value) {\n\t\t\t\tif ($value == null || empty($value)) unset($options[$key]);\n\t\t\t}\n\n\t\t\t// get all options of product\n\t\t\t$options_temp = $this->get_options_oc($product_id_oc);\n\n\t\t\t// Calc price for ajax\n\t\t\tforeach ($options_temp as $value) {\n\t\t\t\tforeach ($options as $k => $option_val) {\n\t\t\t\t\tif ($k == $value['product_option_id']) {\n\t\t\t\t\t\tif ($value['type'] == 'checkbox' && is_array($option_val) && count($option_val) > 0) {\n\t\t\t\t\t\t\tforeach ($option_val as $val) {\n\t\t\t\t\t\t\t\tforeach ($value['product_option_value'] as $op) {\n\t\t\t\t\t\t\t\t\t// calc price\n\t\t\t\t\t\t\t\t\tif ($val == $op['product_option_value_id']) {\n\t\t\t\t\t\t\t\t\t\tif ($op['price_prefix'] == $this->minus) $price -= isset($op['price_no_tax']) ? $op['price_no_tax'] : 0;\n\t\t\t\t\t\t\t\t\t\telse $price += isset($op['price_no_tax']) ? $op['price_no_tax'] : 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} elseif ($value['type'] == 'radio' || $value['type'] == 'select') {\n\t\t\t\t\t\t\tforeach ($value['product_option_value'] as $op) {\n\t\t\t\t\t\t\t\tif ($option_val == $op['product_option_value_id']) {\n\t\t\t\t\t\t\t\t\tif ($op['price_prefix'] == $this->minus) $price -= isset($op['price_no_tax']) ? $op['price_no_tax'] : 0;\n\t\t\t\t\t\t\t\t\telse $price += isset($op['price_no_tax']) ? $op['price_no_tax'] : 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// the others have not price, so don't need calc\n\t\t\t\t\t}\n\t\t\t\t\t// if not same -> return.\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$product_prices = $this->get_product_price($product_id_oc, $product_quantity);\n\t\t\t$product_price_old = isset($product_prices['price_old']) ? $product_prices['price_old'] : 0;\n\t\t\t$product_price_sale = isset($product_prices['price_sale']) ? $product_prices['price_sale'] : 0;\n\t\t\t$enable_taxes = $this->config->get('tshirtecommerce_allow_taxes');\n\t\t\tif ($enable_taxes === null || $enable_taxes == 1) {\n\t\t\t\t$taxes = isset($product_prices['taxes']) ? $product_prices['taxes'] : 0;\n\t\t\t\t$eco = isset($product_prices['eco']) ? $product_prices['eco'] : 0;\n\t\t\t} else {\n\t\t\t\t$taxes = 0;\n\t\t\t\t$eco = 0;\n\t\t\t}\n\t\t\t\n\t\t} // do nothing when empty/blank\n\n\t\t// return price for ajax\n\t\techo @json_encode(array(\n\t\t\t'price' => $price, \n\t\t\t'price_old' => $product_price_old, \n\t\t\t'price_sale' => $product_price_sale, \n\t\t\t'taxes' => $taxes,\n\t\t\t'eco' => $eco\n\t\t));\n\t\treturn;\n\t}", "function loadByProductIdAndAddress($productZonePrice, $productId, $address) {\n\t\t\t$adapter = $this->_getReadAdapter( );\n\t\t\t$bind = array( ':product_id' => $productId, ':country_id' => $address->getCountryId( ), ':region_id' => $address->getRegionId( ), ':postcode' => $address->getPostcode( ) );\n\t\t\t$table = 'pzp';\n\t\t\t$productId = $table . '.product_id';\n\t\t\t$countryId = $table . '.country_id';\n\t\t\t$regionId = $table . '.region_id';\n\t\t\t$isZipRange = $table . '.is_zip_range';\n\t\t\t$zip = $table . '.zip';\n\t\t\t$fromZip = $table . '.from_zip';\n\t\t\t$toZip = $table . '.to_zip';\n\t\t\t$countryIdOrder = $countryId . ' DESC';\n\t\t\t$regionIdOrder = $regionId . ' DESC';\n\t\t\t$zipOrder = '(IF (' . $isZipRange . ' = \\'0\\', IF ((' . $zip . ' IS NULL) OR (' . $zip . ' = \\'\\'), 3, 1), 2)) ASC';\n\t\t\t$select = $adapter->select( )->from( array( $table => $this->getMainTable( ) ) )->order( array( $countryIdOrder, $regionIdOrder, $zipOrder ) )->limit( 1 );\n\t\t\t$productIdWhere = $productId . ' = :product_id';\n\t\t\t$countryIdWhere = $countryId . ' = :country_id';\n\t\t\t$countryIdEmptyWhere = $countryId . ' = \\'0\\'';\n\t\t\t$regionIdWhere = $regionId . ' = :region_id';\n\t\t\t$regionIdEmptyWhere = $regionId . ' = \\'0\\'';\n\t\t\t$zipWhere = '(IF (' . $isZipRange . ' <> \\'0\\', (:postcode >= ' . $fromZip . ') AND (:postcode <= ' . $toZip . '), ' . $zip . ' = :postcode))';\n\t\t\t$zipEmptyWhere = '((' . $isZipRange . ' = \\'0\\') AND ((' . $zip . ' IS NULL) OR (' . $zip . ' = \\'\\')))';\n\t\t\t$where = '(' . implode( ') OR (', array( $countryIdWhere . ' AND ' . $regionIdWhere . ' AND ' . $zipWhere, $countryIdWhere . ' AND ' . $regionIdWhere . ' AND ' . $zipEmptyWhere, $countryIdWhere . ' AND ' . $regionIdEmptyWhere . ' AND ' . $zipEmptyWhere, $countryIdWhere . ' AND ' . $regionIdEmptyWhere . ' AND ' . $zipWhere, $countryIdEmptyWhere . ' AND ' . $regionIdEmptyWhere . ' AND ' . $zipEmptyWhere ) ) . ')';\n\t\t\t$select->where( $productIdWhere );\n\t\t\t$select->where( $where );\n\t\t\t$data = $adapter->fetchRow( $select, $bind );\n\t\t\t$productZonePrice->setData( $data );\n\t\t\t$this->_afterLoad( $productZonePrice );\n\t\t\treturn $this;\n\t\t}", "private function getProductsData($products_id)\n\t{\n \t$currency = Shopware()->Db()->fetchOne(\"SELECT c.currency FROM s_core_currencies c INNER JOIN s_core_shops s ON c.id = s.currency_id\"); \n\n $product = Shopware()->Modules()->Articles()->sGetArticleById($products_id);\n \n if (is_array($product[sConfigurator]))\n\t\t{\n $variants = Shopware()->Db()->fetchAll(\"SELECT \n\t\t\t\t\t\t\t\t\t\t\t\t\t\taa.id as articledetail, acg.name as groupname, aco.name as valuename, acor.option_id as optionid\n \t\t\t\t\t\t\t\tFROM s_article_configurator_option_relations acor\n \t\t\t\t\t\t\t\tINNER JOIN s_articles_details aa ON acor.article_id = aa.id\n \t\t\t\t\t\t\t\tINNER JOIN s_article_configurator_options aco ON aco.id = acor.option_id\n \t\t\t\t\t\t\t\tINNER JOIN s_article_configurator_groups acg ON acg.id = aco.group_id\n \t\t\t\t\t\t\t\tWHERE aa.articleID =\".$products_id);\n $variant_prods = array();\n\n foreach ($variants as $variantkey => $variantval)\n\t\t\t{\n $variant_prods[$variantval['articledetail']][$variantval['groupname']]=$variantval['valuename'];\n\n $images = Shopware()->Db()->fetchAll(\"SELECT \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tm.* \n \t\t\t\t\t\t\t\tFROM s_articles_img ai\n \t\t\t\t\t\t\t\tINNER JOIN s_media m ON m.id = ai.media_id\n \t\t\t\t\t\t\t\tWHERE ai.id IN (\n \t\t\t\t\t\t\t\tSELECT ai2.parent_id\n \t\t\t\t\t\t\t\tFROM s_articles_img ai2 \n \t\t\t\t\t\t\t\tWHERE ai2.article_detail_id = \".$variantval['articledetail'].\"\n \t\t\t\t\t\t\t)\");\n\t\t\t\t\n if (count($images) > 0)\n\t\t\t\t{\n foreach($images as $imagekey=>$imageval)\n\t\t\t\t\t{\n $imagepath = 'http://'.Shopware()->Shop()->getHost();\n $imagepath .= Shopware()->Shop()->getBaseUrl().'/';\n $variant_prods[$variantval['articledetail']]['image_url'] = $imagepath.$imageval['path'];\n }\n } else {\n $variant_prods[$variantval['articledetail']]['image_url'] = $product['image']['src']['original'];\n }\n }\n\n ksort($variant_prods);\n $variant_prods_array=array();\n\n foreach($variant_prods as $variantprodskey => $variantprodsval)\n\t\t\t{\n foreach($variantprodsval as $ikey => $ival)\n\t\t\t\t{\n if ($ikey != 'image_url')\n\t\t\t\t\t{\n $variant_prods_array_inner[$ikey] = $ival;\n }\n }\n $variant_prods_array_inner['image_url'] = $variantprodsval['image_url'];\n $variant_prods_array[] = $variant_prods_array_inner;\n }\n }\n\n $rewrite_path = Shopware()->Db()->fetchOne(\"SELECT path FROM s_core_rewrite_urls WHERE org_path = 'sViewport=detail&sArticle=\".$products_id.\"'\");\n \n $rewrite_url = $this->Front()->Router()->assemble(array('module' => 'frontend', 'controller' => 'index'));\n $rewrite_url .= $rewrite_path;\n\n if ($product['sUpcoming'] == 0)\n\t\t{\n if ($product['laststock'] == 1)\n\t\t\t{\n if ($product['instock'] <= 0)\n\t\t\t\t{\n $availibility = 'out of stock';\n } elseif($product['instock'] > 0) {\n $availibility = 'in stock';\n }\n\n } else {\n if ($product['instock'] <= 0)\n\t\t\t\t{\n $availibility = 'available for order';\n } elseif($product['instock'] > 0) {\n $availibility = 'in stock';\n }\n }\n } else {\n $availibility = 'preorder';\n }\n\n $prod_cats = Shopware()->Db()->fetchAll(\"SELECT categoryID FROM s_articles_categories WHERE articleID = \".$products_id);\n $prod2cats = array();\n\t\t\n foreach ($prod_cats as $catkey => $catval)\n\t\t{\n $prod2cats[] = $catval['categoryID'];\n }\n\t\t\n\t\t$price = floatval(str_replace(',','.',$product['price']));\n\t\t$pseudoprice = (isset($product['pseudoprice']) && $product['pseudoprice'] > 0) ? floatval(str_replace(',','.',$product['pseudoprice'])) : $price;\n\t\t$discout_absolute = ($pseudoprice > $price) ? ($pseudoprice - $price) : 0;\n\n $prod_shipping_array = $this->getShippingArray($product);\n $jsonproductarray = array(\n 'id' => $product['articleID'],\n 'name' => $product['articleName'],\n 'image_url' => $product['image']['src']['original'],\n 'condition' => 'new',\n 'categories' => $prod2cats,\n 'availability' => $availibility,\n 'price' => $price,\n\t\t\t'rrp' => floatval($pseudoprice),\n\t\t\t'discount_absolute' => $discout_absolute, \n 'url' => $rewrite_url,\n 'description' => $product['description_long'],\n 'currency' => $currency,\n 'shipping' => $prod_shipping_array,\n 'margin' => 0.56,\n 'gtin' => $product['ean'],\n\t\t\t'brand' => $product['supplierName'],\n\t\t\t'mpn' => $product['ordernumber']\n );\n\t\t\n if (count($variant_prods_array) > 0)\n\t\t{\n $jsonproductarray['variants'] = $variant_prods_array;\n }\n\t\t\n $products_data = $jsonproductarray;\n return $products_data;\n }", "function fn_warehouses_gather_additional_products_data_post($product_ids, $params, &$products, $auth, $lang_code)\n{\n if (empty($product_ids) && !isset($params['get_warehouse_amount']) || $params['get_warehouse_amount'] === false) {\n return;\n }\n\n /** @var Tygh\\Addons\\Warehouses\\Manager $manager */\n $manager = Tygh::$app['addons.warehouses.manager'];\n $products = $manager->fetchProductsWarehousesAmounts($products);\n}", "function LoadProduct($orderid) {\n\t$proids = array();\n\t$factory = \\woo\\mapper\\PersistenceFactory::getFactory(\"orderproduct\",array('id','orderid','proid','number','price','returnnow','modlcharge'));\n\t$finder = new \\woo\\mapper\\DomainObjectAssembler($factory);\n\t$idobj = $factory->getIdentityObject()->field('orderid')->eq($orderid);\n\t$order_pro = $finder->find($idobj);\n\n\t$factory = \\woo\\mapper\\PersistenceFactory::getFactory(\"product\",array('id','classid','length','width','think','unitlen','unitwid','unitthi','unit','sharp','note'));\n\t$finder = new \\woo\\mapper\\DomainObjectAssembler($factory);\n\t$pro = $order_pro->next();\n\t$i = 0;\n\t$data = array();\n\twhile($pro){\n\t\t$data[$i][0] = $i+1;\n\t\t$idobj = $factory->getIdentityObject()->field('id')->eq($pro->getProid());\n\t\t$collection = $finder->find($idobj);\n\t\t$product = $collection->current();\n\t\t$data[$i][1] = $product->getSize();\n\t\t$data[$i][2] = $pro->getNumber();\n\t\t$price = $pro->getPrice()-$pro->getReturnnow();\n\t\t$data[$i][3] = sprintf(\"%.2f\",$price);\n\t\t$data[$i][4] = sprintf(\"%.2f\",$price*$data[$i][2]);\n\t\t$i++;\n\t\t$pro = $order_pro->next();\n\t}\n\treturn $data;\n}", "public function listProductprices(){\n try{\n $sql = \"Select * from productforsale pr inner join product p on pr.id_product = p.id_product inner join categoryp c on p.id_categoryp = c.id_categoryp inner join medida m on p.product_unid_type = m.medida_id\";\n $stm = $this->pdo->prepare($sql);\n $stm->execute();\n $result = $stm->fetchAll();\n } catch (Exception $e){\n $this->log->insert($e->getMessage(), 'Inventory|listProductprices');\n $result = 2;\n }\n\n return $result;\n }", "public function getProductPriceDetails($params){\n\t\ttry {\n\t\t\t$query = \"SELECT * FROM store_products_price spp WHERE spp.statusid=1 AND spp.product_id = \".$params['id'];\n\t\t\t//exit;\t\t\t\n\t\t\t$stmt = $this->db->query($query);\t\t\t\n\t\t\treturn $stmt->fetchAll();\n\t\t\t\n\t\t} catch(Exception $e) {\n\t\t\tApplication_Model_Logging::lwrite($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t}", "public function fetch_items($products = []) {\n\t\t$config = new Configuration();\n\t\t$access_key_id = $_ENV['AWS_ACCESS_KEY_ID'];\n\t\t$secret_access_key = $_ENV['AWS_SECRET_ACCESS_KEY'];\n\t\t$tracking_id = $_ENV['AWS_TRACKING_ID'];\n\n\t\t/*\n\t\t* Add your credentials\n\t\t*/\n\t\t# Please add your access key here\n\t\t$config->setAccessKey($access_key_id);\n\t\t# Please add your secret key here\n\t\t$config->setSecretKey($secret_access_key);\n\n\t\t# Please add your partner tag (store/tracking id) here\n\t\t$partnerTag = $tracking_id;\n\n\t\t/*\n\t\t* PAAPI host and region to which you want to send request\n\t\t* For more details refer:\n\t\t* https://webservices.amazon.com/paapi5/documentation/common-request-parameters.html#host-and-region\n\t\t*/\n\t\t$config->setHost('webservices.amazon.co.uk');\n\t\t$config->setRegion('eu-west-1');\n\n\t\t$apiInstance = new DefaultApi(\n\t\t\t/*\n\t\t\t* If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n\t\t\t* This is optional, `GuzzleHttp\\Client` will be used as default.\n\t\t\t*/\n\t\t\tnew GuzzleHttp\\Client(),\n\t\t\t$config\n\t\t);\n\n\t\t# Request initialization\n\n\t\t/*\n\t\t* Choose resources you want from GetItemsResource enum\n\t\t* For more details,\n\t\t* refer: https://webservices.amazon.com/paapi5/documentation/search-items.html#resources-parameter\n\t\t*/\n\t\t$resources = [\n\t\t\tGetItemsResource::ITEM_INFOTITLE,\n\t\t\tGetItemsResource::ITEM_INFOPRODUCT_INFO,\n\t\t\tGetItemsResource::ITEM_INFOBY_LINE_INFO,\n\t\t\tGetItemsResource::ITEM_INFOTECHNICAL_INFO,\n\t\t\tGetItemsResource::ITEM_INFOCONTENT_INFO,\n\t\t\tGetItemsResource::ITEM_INFOFEATURES,\n\t\t\tGetItemsResource::IMAGESPRIMARYMEDIUM\n\t\t];\n\n\t\t$product_ids = array_map(function($value) {\n\t\t\treturn (string) $value;\n\t\t}, array_keys($products));\n\n\t\t// Batch into groups of 10\n\t\t$updates = [\n\t\t\t'error' => [],\n\t\t];\n\n\t\t$product_ids_batched = array_chunk( $product_ids, 10 );\n\t\t\n\t\tfor ($i = 0; $i < count($product_ids_batched); $i++) {\n\t\t\t# Forming the request\n\t\t\t$searchItemsRequest = new GetItemsRequest();\n\t\t\t$searchItemsRequest->setItemIds($product_ids_batched[$i]);\n\t\t\t$searchItemsRequest->setPartnerTag($partnerTag);\n\t\t\t$searchItemsRequest->setPartnerType(PartnerType::ASSOCIATES);\n\t\t\t$searchItemsRequest->setResources($resources);\n\n\t\t\t# Validating request\n\t\t\t$invalidPropertyList = $searchItemsRequest->listInvalidProperties();\n\t\t\t$length = count($invalidPropertyList);\n\t\t\tif ($length > 0) {\n\t\t\t\t$updates['error'][] = \"Error forming the request\";\n\t\t\t\tforeach ($invalidPropertyList as $invalidProperty) {\n\t\t\t\t\t$updates['error'][] = $invalidProperty;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t# Sending the request\n\t\t\ttry {\n\t\t\t\t$searchItemsResponse = $apiInstance->getItems($searchItemsRequest);\n\n\t\t\t\t# Parsing the response\n\t\t\t\tif ($searchItemsResponse->getItemsResult() !== null) {\n\t\t\t\t\tforeach ($searchItemsResponse->getItemsResult()->getItems() as $item) {\n\t\t\t\t\t\tif ($item !== null) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($item->getASIN() === null) {\n\t\t\t\t\t\t\t\t// Without an ASIN we can't update\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$asin = $item->getASIN();\n\t\t\t\t\t\t\t$updates[$asin]['ASIN'] = $asin;\n\t\t\t\t\t\t\t$updates[$asin]['post'] = $products[$asin];\n\n\t\t\t\t\t\t\tif ($item->getDetailPageURL() !== null) {\n\t\t\t\t\t\t\t\t$updates[$asin]['detail'] = $item->getDetailPageURL();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ($item->getItemInfo() !== null\n\t\t\t\t\t\t\t\t&& $item->getItemInfo()->getTitle() !== null\n\t\t\t\t\t\t\t\t&& $item->getItemInfo()->getTitle()->getDisplayValue() !== null) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$updates[$asin]['title'] = $item->getItemInfo()->getTitle()->getDisplayValue();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ($item->getItemInfo() !== null && \n\t\t\t\t\t\t\t\t$item->getItemInfo()->getByLineInfo() !== null &&\n\t\t\t\t\t\t\t\t$item->getItemInfo()->getByLineInfo()->getContributors() !== null) {\n\n\t\t\t\t\t\t\t\t$contributors = $item->getItemInfo()->getByLineInfo()->getContributors();\n\n\t\t\t\t\t\t\t\tforeach ($contributors as $contributor) {\n\t\t\t\t\t\t\t\t\tif ($contributor->getRoleType() === 'author') {\n\t\t\t\t\t\t\t\t\t\t$updates[$asin]['author'][] = $contributor->getName();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ($item->getImages() !== null && \n\t\t\t\t\t\t\t\t$item->getImages()->getPrimary() !== null &&\n\t\t\t\t\t\t\t\t$item->getImages()->getPrimary()->getMedium() !== null) {\n\t\t\t\t\t\t\t\t\t$updates[$asin]['image'] = $item->getImages()->getPrimary()->getMedium()->getURL();\t\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ($item->getItemInfo()->getProductInfo() !== null && \n\t\t\t\t\t\t\t\t$item->getItemInfo()->getProductInfo()->getReleaseDate() !== null &&\n\t\t\t\t\t\t\t\t$item->getItemInfo()->getProductInfo()->getReleaseDate()->getLabel() !== null) {\n\t\t\t\t\t\t\t\t\t$updates[$asin]['release'] = $item->getItemInfo()->getProductInfo()->getReleaseDate()->getDisplayValue();\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($searchItemsResponse->getErrors() !== null) {\n\t\t\t\t\t$updates['error'][] = 'Printing Errors:' . 'Printing first error object from list of errors';\n\t\t\t\t\t$updates['error'][] = 'Error code: ' . $searchItemsResponse->getErrors()[0]->getCode();\n\t\t\t\t\t$updates['error'][] = 'Error message: ' . $searchItemsResponse->getErrors()[0]->getMessage();\n\t\t\t\t}\n\n\t\t\t} catch (ApiException $exception) {\n\t\t\t\t$updates['error'][] = \"Error calling PA-API 5.0!\";\n\t\t\t\t$updates['error'][] = \"HTTP Status Code: \" . $exception->getCode();\n\t\t\t\t$updates['error'][] = \"Error Message: \" . $exception->getMessage();\n\t\t\t\tif ($exception->getResponseObject() instanceof ProductAdvertisingAPIClientException) {\n\t\t\t\t\t$errors = $exception->getResponseObject()->getErrors();\n\t\t\t\t\tforeach ($errors as $error) {\n\t\t\t\t\t\t$updates['error'][] = \"Error Type: \" . $error->getCode();\n\t\t\t\t\t\t$updates['error'][] = \"Error Message: \" . $error->getMessage();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$updates['error'][] = \"Error response body: \" . $exception->getResponseBody();\n\t\t\t\t}\n\t\t\t} catch (Exception $exception) {\n\t\t\t\t$updates['error'][] = \"Error Message: \" . $exception->getMessage();\n\t\t\t}\n\t\t}\n\n\t\treturn $updates;\n\t}", "function load_data_structure_shop($user_id, $params = array())\n {\n $where_array = array();\n //echo '<pre>';\n //print_r($params);\n //echo '</pre>';\n $language_id = ((int)$this->getRequestValue('language_id') == 0 ? 0 : (int)$this->getRequestValue('language_id'));\n\n\n if ($user_id == 0) {\n\n //$enable_publication_limit=$this->getConfigValue('apps.shop.user_limit_enable');\n\n if ($params['enable_publication_limit'] == 1) {\n $where_array[] = '((' . DB_PREFIX . '_shop_product.product_add_date+' . DB_PREFIX . '_user.publication_limit*24*3600)>' . time() . ')';\n }\n\n if ($params['active'] == 1) {\n $where_array[] = DB_PREFIX . '_shop_product.active=1';\n } elseif ($params['active'] == 'notactive') {\n $where_array[] = DB_PREFIX . '_shop_product.active=0';\n }\n\n if (isset($params['city_id'])) {\n $where_array[] = '(' . DB_PREFIX . '_shop_product.city_id=' . $params['city_id'] . ')';\n }\n\n $where_array[] = DB_PREFIX . '_shop_product.language_id=' . $language_id;\n\n if (count($where_array) > 0) {\n $where = ' WHERE ' . implode(' AND ', $where_array);\n }\n //$query = \"SELECT product_id, category_id FROM \".DB_PREFIX.\"_shop_product \".$where;\n $query = \"SELECT COUNT(\" . DB_PREFIX . \"_shop_product.product_id) as total, \" . DB_PREFIX . \"_shop_product.category_id FROM \" . DB_PREFIX . \"_shop_product LEFT JOIN \" . DB_PREFIX . \"_user ON \" . DB_PREFIX . \"_shop_product.user_id=\" . DB_PREFIX . \"_user.user_id \" . $where . \" GROUP BY \" . DB_PREFIX . \"_shop_product.category_id\";\n } else {\n\n if ($params['active'] == 1) {\n $where_array[] = DB_PREFIX . '_shop_product.active=1';\n } elseif ($params['active'] == 'notactive') {\n $where_array[] = DB_PREFIX . '_shop_product.active=0';\n } elseif ($params['archived'] == 1) {\n $where_array[] = '((' . DB_PREFIX . '_shop_product.product_add_date+' . DB_PREFIX . '_user.publication_limit*24*3600)<' . time() . ')';\n } elseif ($params['archived'] == 'notarchived') {\n $where_array[] = '((' . DB_PREFIX . '_shop_product.product_add_date+' . DB_PREFIX . '_user.publication_limit*24*3600)>' . time() . ')';\n }\n\n $where_array[] = DB_PREFIX . '_shop_product.user_id = ' . $user_id;\n\n $where = ' WHERE ' . implode(' AND ', $where_array);\n //$query = \"SELECT product_id, category_id FROM \".DB_PREFIX.\"_shop_product where user_id = $user_id\";\n $query = \"SELECT COUNT(product_id) as total, category_id FROM \" . DB_PREFIX . \"_shop_product LEFT JOIN \" . DB_PREFIX . \"_user ON \" . DB_PREFIX . \"_shop_product.user_id=\" . DB_PREFIX . \"_user.user_id \" . $where . \" GROUP BY category_id\";\n }\n //echo $query.'<br>';\n $DBC = DBC::getInstance();\n $stmt = $DBC->query($query);\n if ($stmt) {\n while ($ar = $DBC->fetch($stmt)) {\n\n $ret['data'][$user_id][$ar['category_id']] = $ar['total'];\n }\n }\n return $ret;\n }", "public function load() {\n $importItemsTempManager = ImportItemsTempManager::getInstance();\n $categoryHierarchyManager = CategoryHierarchyManager::getInstance();\n $categoryManager = CategoryManager::getInstance();\n $companyManager = CompanyManager::getInstance();\n $company_id = $_REQUEST['company_id'];\n $companyDto = $companyManager->selectByPK($company_id);\n $this->addParam('companyDto', $companyDto);\n $used_columns_indexes_array = array(2/* name */, 1/* model */, 9/* brand */, 3/* dealer price $ */, 4/* $dealer price amd */, 5/* vat $ */, 6/* vat amd */, 7/* warranty */); //explode(',', $_REQUEST['used_columns_indexes']);\n\n $customerLogin = $this->getCustomerLogin();\n $priceRowsDtos = $importItemsTempManager->getUserCurrentPriceNewRows($customerLogin);\n foreach ($priceRowsDtos as $dto) {\n $itemModel = $dto->getModel();\n if (empty($itemModel)) {\n $model = $importItemsTempManager->findModelFromItemTitle($dto->getDisplayName());\n if (!empty($model)) {\n $dto->setSupposedModel($model);\n }\n } else {\n $dto->setSupposedModel($itemModel);\n }\n }\n\n\n $columnNames = ImportPriceManager::getColumnNamesMap($used_columns_indexes_array);\n\n $rootDto = $categoryManager->getRoot();\n $firstLevelCategoriesHierarchyDtos = $categoryHierarchyManager->getCategoryChildren($rootDto->getId());\n $firstLevelCategoriesNamesDtos = $categoryHierarchyManager->getCategoriesNamesByParentCategoryId($rootDto->getId());\n\n\n $firstLevelCategoriesIds = array();\n foreach ($firstLevelCategoriesHierarchyDtos as $key => $category) {\n $firstLevelCategoriesIds[] = $category->getChildId();\n }\n $firstLevelCategoriesNames = array();\n foreach ($firstLevelCategoriesNamesDtos as $key => $category) {\n $firstLevelCategoriesNames[] = $category->getDisplayName();\n }\n\n $this->addParam('columnNames', $columnNames);\n $this->addParam('priceRowsDtos', $priceRowsDtos);\n $this->addParam('firstLevelCategoriesNames', $firstLevelCategoriesNames);\n $this->addParam('firstLevelCategoriesIds', $firstLevelCategoriesIds);\n\n if (isset($_REQUEST['new_items_row_ids'])) {\n $this->addParam('new_items_row_ids', explode(',', $_REQUEST['new_items_row_ids']));\n }\n }", "function getProducts(Store $s)\n {\n $curl_url = $s->getApiPath() . \"v2/products\";\n $products = CurlHandler::GET($curl_url, $s->getAccessToken());\n return $products;\n }", "public function ComputeProductSaleData(array $allProducts, ProductManager $productManager, $id_sale): array\n {\n $productSaleData = [];\n $index = 0;\n for ($i = 1; $i <= count($allProducts); $i++) {\n $quantity = $allProducts[$i]['quantity'];\n //GET SOLD PRODUCTS ONLY\n if ($quantity) {\n $id_product = $allProducts[$i]['id_product'];\n $ComputationPriceRequest = $productManager->getProductInformationsForPriceComputation($id_product);\n $tva = $ComputationPriceRequest[0]['ratio'];\n $HTUnitPrice = $ComputationPriceRequest[0]['price'];\n $discountPercentage = $allProducts[$i]['product_discount'];\n if ($discountPercentage) {\n $HTUnitPriceForSale = $HTUnitPrice - $discountPercentage * $HTUnitPrice / 100;\n } else {\n $HTUnitPriceForSale = $HTUnitPrice;\n }\n $HTPriceForSale = $HTUnitPriceForSale * $quantity;\n $TTCUnitPriceForSale = $HTUnitPriceForSale + $tva * $HTUnitPrice / 100;\n $TTCPriceForSale = $TTCUnitPriceForSale * $quantity;\n\n $productSaleData[$index]['fk_id_product'] = $id_product;\n $productSaleData[$index]['fk_id_sale'] = $id_sale;\n $productSaleData[$index]['original_price'] = $HTPriceForSale;\n $productSaleData[$index]['quantity'] = $quantity;\n $productSaleData[$index]['discount_percentage'] = $discountPercentage;\n $productSaleData[$index]['finalised_price'] = $TTCPriceForSale;\n //$productSaleData[$index]['created_at'] = '';\n\n $index++;\n }\n }\n return $productSaleData;\n }", "public function getStoreProducts($store)\r\n {\r\n\r\n $products = $this->model->where('parentid', $store->id)->orderBy('linkorder', 'DESC')->show();\r\n return $products;\r\n }", "public function loadData(Cart $cart)\n\t{\n\t\tif (!Validate::isLoadedObject($cart) || ($products = $cart->getProducts()) === array())\n\t\t\treturn;\n\n\t\t$currency = new Currency($cart->id_currency);\n\t\tif (!Validate::isLoadedObject($currency))\n\t\t\treturn;\n\n\t\t// Cart rules are available from prestashop 1.5 onwards.\n\t\tif (_PS_VERSION_ >= '1.5')\n\t\t{\n\t\t\t$cart_rules = (array)$cart->getCartRules(CartRule::FILTER_ACTION_GIFT);\n\n\t\t\t$gift_products = array();\n\t\t\tforeach ($cart_rules as $cart_rule)\n\t\t\t\tif ((int)$cart_rule['gift_product'])\n\t\t\t\t{\n\t\t\t\t\tforeach ($products as $key => &$product)\n\t\t\t\t\t\tif (empty($product['gift'])\n\t\t\t\t\t\t\t&& (int)$product['id_product'] === (int)$cart_rule['gift_product']\n\t\t\t\t\t\t\t&& (int)$product['id_product_attribute'] === (int)$cart_rule['gift_product_attribute'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$product['cart_quantity'] = (int)$product['cart_quantity'];\n\t\t\t\t\t\t\t$product['cart_quantity']--;\n\n\t\t\t\t\t\t\tif (!($product['cart_quantity'] > 0))\n\t\t\t\t\t\t\t\tunset($products[$key]);\n\n\t\t\t\t\t\t\t$gift_product = $product;\n\t\t\t\t\t\t\t$gift_product['cart_quantity'] = 1;\n\t\t\t\t\t\t\t$gift_product['price_wt'] = 0;\n\t\t\t\t\t\t\t$gift_product['gift'] = true;\n\n\t\t\t\t\t\t\t$gift_products[] = $gift_product;\n\n\t\t\t\t\t\t\tbreak; // One gift product per cart rule\n\t\t\t\t\t\t}\n\t\t\t\t\tunset($product);\n\t\t\t\t}\n\n\t\t\t$items = array_merge($products, $gift_products);\n\t\t}\n\t\telse\n\t\t\t$items = $products;\n\n\t\tforeach ($items as $item)\n\t\t{\n\t\t\t$name = $item['name'];\n\t\t\tif (isset($item['attributes_small']))\n\t\t\t\t$name .= ' ('.$item['attributes_small'].')';\n\n\t\t\t$this->line_items[] = array(\n\t\t\t\t'product_id' => (int)$item['id_product'],\n\t\t\t\t'quantity' => (int)$item['cart_quantity'],\n\t\t\t\t'name' => (string)$name,\n\t\t\t\t'unit_price' => Tiresias::helper('price')->format($item['price_wt']),\n\t\t\t\t'price_currency_code' => (string)$currency->iso_code,\n\t\t\t);\n\t\t}\n\t}", "public function run()\n {\n DB::table('products_store')->insert([\n [\n 'product_id' => 1,\n 'store_id' => 1,\n 'product_price' => 20.30\n ],\n [\n 'product_id' => 1,\n 'store_id' => 2,\n 'product_price' => 21\n ],\n [\n 'product_id' => 1,\n 'store_id' => 3,\n 'product_price' => 22.50\n ],\n [\n 'product_id' => 1,\n 'store_id' => 4,\n 'product_price' => 22.70\n ],\n [\n 'product_id' => 1,\n 'store_id' => 5,\n 'product_price' => 23\n ],\n [\n 'product_id' => 1,\n 'store_id' => 6,\n 'product_price' => 26.50\n ],\n [\n 'product_id' => 2,\n 'store_id' => 1,\n 'product_price' => 19.60\n ],\n [\n 'product_id' => 2,\n 'store_id' => 3,\n 'product_price' => 20.20\n ],\n [\n 'product_id' => 2,\n 'store_id' => 4,\n 'product_price' => 20.19\n ],\n [\n 'product_id' => 2,\n 'store_id' => 6,\n 'product_price' => 18.70\n ],\n [\n 'product_id' => 2,\n 'store_id' => 7,\n 'product_price' => 19.30\n ],\n [\n 'product_id' => 2,\n 'store_id' => 8,\n 'product_price' => 19.40\n ],\n [\n 'product_id' => 8,\n 'store_id' => 6,\n 'product_price' => 5\n ],\n [\n 'product_id' => 8,\n 'store_id' => 7,\n 'product_price' => 5.20\n ],\n [\n 'product_id' => 8,\n 'store_id' => 8,\n 'product_price' => 6\n ]\n ]);\n }", "public function getProductsList($params){\n\t\ttry {\t\n\t\t\tif(trim($params['start'])==''){ $start = 0; }else{ $start = $params['start'];}\n\t\t\t\n\t\t\t$query = \"select\n\t\t\t\t\tsp.product_id, sp.attributes_group_id, sp.merchant_id, sp.product_sku, sp.product_title, sp.product_small_description,\n\t\t\t\t\t(SELECT product_image FROM store_products_images spi\n\t\t\t\t\twhere spi.product_thumbnail=1 AND spi.statusid=1 AND spi.product_id=sp.product_id) AS product_image,\n\t\t\t\t\t\n\t\t\t\t\t(select spp.product_discount\n\t\t\t\t\tfrom store_products_price spp where spp.product_id=sp.product_id ORDER BY product_price ASC LIMIT 0,1) AS product_discount_details,\n\t\t\t\t\t\n\t\t\t\t\t(select spp.product_price\n\t\t\t\t\tfrom store_products_price spp where spp.product_id=sp.product_id ORDER BY product_price ASC LIMIT 0,1) AS product_price,\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t(select if(spp.product_discount_type='Amount' , (spp.product_price-spp.product_discount), (spp.product_price-(spp.product_price*product_discount)/100))\n\t\t\t\t\tfrom store_products_price spp where spp.product_id=sp.product_id ORDER BY product_price ASC LIMIT 0,1) AS product_price_details\n\n\t\t\t\t\tfrom store_products sp\n\t\t\t\t\tLEFT JOIN store_products_categories spc ON (sp.product_id=spc.product_id)\n\t\t\t\t\twhere\n\t\t\t\t\tsp.statusid=1 \n\t\t\t\t\tAND spc.category_id = \".$params['id'].\" AND sp.statusid=1\n\t\t\t\t\tGROUP BY sp.product_id\n\t\t\t\t\tORDER BY \".$params['orderby'].\" \".$params['ordertype'].\" LIMIT \".$start.\", \".$params['limit'].\"\";\n\t\t\t\n\t\t\t//exit;\t\t\t\n\t\t\t$stmt = $this->db->query($query);\t\t\t\n\t\t\treturn $stmt->fetchAll();\n\t\t\t\n\t\t} catch(Exception $e) {\n\t\t\tApplication_Model_Logging::lwrite($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t}", "public function fetchQuoteProducts()\n\t{\n\n\t\t$this->getDB()->query('SELECT * FROM product_orders WHERE quote_id = '.$this->getId());\n\t\t$res = $this->getDB()->results('arr');\n\t\tforeach($res as $quotedProd)\n\t\t{\n\t\t\t$product = new Product($quotedProd['product_id']);\n\t\t\t$product->setProductCost($quotedProd['product_cost']);\n\t\t\t$product->setProductQuantity($quotedProd['product_qty']);\n\t\t\t$product->setProductType($quotedProd['product_type']);\n\n\t\t\tarray_push($this->products, $product);\n\t\t}\n\t}", "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}", "protected function _getProducts($refresh = false, $id_product = false, $id_country = null)\n {\n $products = parent::getProducts($refresh, $id_product, $id_country);\n if (_PS_VERSION_ >= 1.6) {\n $params = Hook::exec('ppbsGetProducts', array('products'=>$products), null, true);\n if (isset($params['productpricebysize']['products'])) {\n return $params['productpricebysize']['products'];\n } else {\n return $products;\n }\n } else {\n $params = Hook::exec('ppbsGetProducts', array('products'=>$products), null);\n $params = json_decode($params, true);\n if (isset($params['products'])) {\n return $params['products'];\n } else {\n return $products;\n }\n }\n }", "private function loadProducts(ObjectManager $manager)\n {\n // First get and parse the yaml file\n $products = Yaml::parse(file_get_contents(__DIR__ . '/datas/yml/Products.yaml'));\n\n // Loop on every index\n foreach ($products as $k => $v) {\n\n // Find the Model Object from given name\n $model = $manager->getRepository('AppBundle:Product\\Model')\n ->findOneBy(['name' => $v['model_name']]);\n\n // Create a new product and assign first datas\n $product = new Product();\n $product->setTitle($k);\n $product->setModel($model);\n $product->hydrate($v);\n\n // If Notices are given, loop assign and persist them\n if (isset($v['notices'])) {\n foreach ($v['notices'] as $nk => $nv) {\n // Create, hydrate and persist new Notice Object\n $notice = new Notice();\n $notice->setType($nk);\n $notice->setProduct($product);\n $notice->setMessage($nv);\n $manager->persist($notice);\n }\n }\n\n // If Guarantees are given, loop assign and persist them\n if (isset($v['guarantees'])) {\n foreach ($v['guarantees'] as $gk => $gv) {\n // Check if guarantee is link to product or feature\n if ($gk === 'global') {\n // If ProductGuarantee, create new Object\n $guarantee = new ProductGlobal();\n } else {\n // If FeatureGuarantee, first find related feature\n $feature = $manager->getRepository('AppBundle:Feature\\Feature')\n ->findOneBy(['name' => $gk]);\n // Then create & hydrate ProductSpecific Object\n $guarantee = new ProductSpecific();\n $guarantee->setFeature($feature);\n $guarantee->setProduct($product);\n }\n\n // Then hydrate guarantee whatever it's type\n $guarantee->hydrate($gv);\n\n // If is GlobalGuarantee, link product to it\n if ($gk === 'global') {\n $product->setGlobalGuarantee($guarantee);\n }\n\n // Persist the guarantee\n $manager->persist($guarantee);\n }\n }\n\n // Persist product at end of loop\n $manager->persist($product);\n }\n\n // Flush all persisted datas\n $manager->flush();\n }", "private function setupProducts()\n {\n $products = [\n ['name' => 'Product 1'],\n ['name' => 'Product 2'],\n ['name' => 'Product 3'],\n ['name' => 'Product 4'],\n ];\n\n $container = $this->setupData($products, Product::class);\n\n $this->products = $container;\n }", "public function load_products() {\n\t\t$this->get_products_posts();\n\t\tif ( $this->posts !== null ) {\n\t\t\tforeach ( $this->posts as $ps_post ) {\n\t\t\t\t$this->add( new ShowcaseProduct( $ps_post ) );\n\t\t\t}\n\t\t}\n\t}", "private function setup_products() {\n\t\tglobal $wpdb;\n\n\t\t$ids = [];\n\t\t$d = $wpdb->get_results( \"SELECT distinct `products` FROM `{$wpdb->prefix}thespa_data`\", ARRAY_A );\n\t\tforeach ( $d as $datum ) {\n\t\t\t$prs = explode( \",\", $datum['products'] );\n\t\t\tforeach ( $prs as $pr ) {\n\t\t\t\tif ( !isset( $ids[$pr] ) ) {\n\t\t\t\t\tarray_push($ids, $pr );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$i = 0;\n\t\tforeach ( $ids as $id ) {\n\t\t\t$product = wc_get_product( $id );\n\t\t\tif ( is_object( $product ) ) {\n\t\t\t\t$this->products[$i] = [\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'name' => $product->get_title(),\n\t\t\t\t\t'url' => $product->get_permalink(),\n\t\t\t\t\t'img' => wp_get_attachment_image_src( get_post_thumbnail_id( $id ), 'medium', true )[0],\n\t\t\t\t\t'cost' => $product->get_price_html(),\n\t\t\t\t];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t}", "public function addProductSyncData(&$products)\n {\n $product_ids = [];\n $parent_ids = [];\n $product_stock_ids = []; //modification in config product stock management\n foreach ($products as $product) {\n $product_ids[] = $product['product_id'];\n $product_stock_ids[$product['product_id']] = $product['parent_id'];\n if ((int)$product['parent_id'] !== 0) {\n $product_ids[] = $product['parent_id'];\n $parent_ids[] = $product['parent_id'];\n $product_stock_ids[$product['parent_id']] = $product['parent_id'];\n }\n }\n $product_ids = array_unique($product_ids);\n $parent_ids = array_unique($parent_ids);\n try {\n $store = $this->_storeModelStoreManagerInterface->getStore();\n $website = $store->getWebsite();\n } catch (NoSuchEntityException $exception) {\n $this->_searchHelperData->log(\n LoggerConstants::ZEND_LOG_ERR,\n sprintf('Website Could not be loaded: %s', $exception->getMessage())\n );\n\n return $this;\n }\n\n $this->stockService->clearCache();\n $this->stockService->preloadKlevuStockStatus(array_merge($product_ids, $parent_ids), $website->getId());\n\n $isCollectionMethod = $this->_searchHelperConfig->isCollectionMethodEnabled();\n\n if ($isCollectionMethod) {\n $data = $this->loadProductDataCollection($product_ids);\n }\n\n // Get url product from database\n $url_rewrite_data = $this->getUrlRewriteData($product_ids);\n $attribute_map = $this->getAttributeMap();\n $baseUrl = $this->_productData->getBaseUrl($store);\n $currency = $this->_productData->getCurrency();\n try {\n $store->setCurrentCurrencyCode($currency);\n } catch (LocalizedException $e) {\n $this->_searchHelperData->log(\n LoggerConstants::ZEND_LOG_ERR,\n sprintf('Currency could not be set on store: %s', $e->getMessage())\n );\n\n return $this;\n }\n $rejectedProducts = [];\n $rp = 0;\n\n foreach ($products as $index => &$product) {\n try {\n if ($isCollectionMethod) {\n $item = $data->getItemById($product['product_id']);\n $parent = ((int)$product['parent_id'] !== 0) ? $data->getItemById($product['parent_id']) : null;\n $this->logLoadByMessage($product, true);\n } else {\n $origItem = $this->productRepository->getById(\n $product['product_id'],\n false,\n $store->getId()\n );\n $item = clone $origItem;\n $item->setData('customer_group_id', CustomerGroup::NOT_LOGGED_IN_ID);\n $parent = null;\n if ((int)$product['parent_id'] !== 0) {\n $origParent = $this->productRepository->getById(\n $product['parent_id'],\n false,\n $store->getId()\n );\n $parent = clone $origParent;\n $parent->setData('customer_group_id', CustomerGroup::NOT_LOGGED_IN_ID);\n }\n $this->logLoadByMessage($product);\n }\n\n if (!$item) {\n // Product data query did not return any data for this product\n // Remove it from the list to skip syncing it\n $rejectedProducts[$rp]['product_id'] = $product['product_id'];\n $rejectedProducts[$rp]['parent_id'] = $product['parent_id'];\n $this->_searchHelperData->log(\n LoggerConstants::ZEND_LOG_WARN,\n sprintf(\"Failed to retrieve data for product ID %d\", $product['product_id'])\n );\n unset($products[$index]);\n $rp++;\n continue;\n }\n if ((!isset($parent)) && isset($product['parent_id']) && (int)$product['parent_id'] !== 0) {\n $rejectedProducts[$rp]['product_id'] = $product['product_id'];\n $rejectedProducts[$rp]['parent_id'] = $product['parent_id'];\n $this->_searchHelperData->log(\n LoggerConstants::ZEND_LOG_WARN,\n sprintf(\"Failed to retrieve data for parent ID %d\", $product['parent_id'])\n );\n unset($products[$index]);\n $rp++;\n continue;\n }\n\n $this->processProductBefore($product, $parent, $item);\n // Add data from mapped attributes\n foreach ($attribute_map as $key => $attributes) {\n $product = $this->mapProductAttributes($item, $store, $product, $attributes, $key, $parent);\n }\n\n $product['product_type'] = $this->_productData->getProductType($parent, $item);\n $product['isCustomOptionsAvailable'] = $this->_productData->isCustomOptionsAvailable($parent, $item);\n $product['currency'] = $currency;\n $product['otherPrices'] = $this->_productData->getOtherPrices($item, $currency, $store);\n $product['category'] = $this->_productData->getCategory($parent, $item);\n $product['listCategory'] = $this->_productData->getListCategory($parent, $item);\n $product['categoryIds'] = $this->_productData->getAllCategoryId($parent, $item);\n $product['categoryPaths'] = $this->_productData->getAllCategoryPaths($parent, $item);\n $product['groupPrices'] = $this->_productData->getGroupPricesData($item, $store);\n $product['url'] = $this->_productData->getProductUrlData(\n $parent,\n $item,\n $url_rewrite_data,\n $product,\n $baseUrl\n );\n $product['inStock'] = $this->_stockHelper->getKlevuStockStatus($parent, $item, $website->getId());\n $product['itemGroupId'] = $this->_productData->getItemGroupId($product['parent_id'], $product) ?: '';\n if ((int)$product['itemGroupId'] === 0) {\n $product['itemGroupId'] = ''; // Ref: KS-15006\n }\n $product['id'] = $this->_productData->getId($product['product_id'], $product['parent_id']);\n $this->processProductAfter($product, $parent, $item);\n if ($item) {\n if (!$isCollectionMethod) {\n $item->clearInstance();\n }\n $item = null;\n }\n if ($parent) {\n if (!$isCollectionMethod) {\n $parent->clearInstance();\n }\n $parent = null;\n }\n } catch (\\Exception $e) {\n $this->_searchHelperData->log(\n LoggerConstants::ZEND_LOG_CRIT,\n sprintf(\"Exception thrown in %s::%s - %s\", __CLASS__, __METHOD__, $e->getMessage())\n );\n $markAsSync = [];\n if (!empty($product['parent_id']) && !empty($product['product_id'])) {\n $markAsSync[] = [\n $product['product_id'],\n $product['parent_id'],\n $store->getId(),\n 0,\n $this->_searchHelperCompat->now(),\n \"products\"\n ];\n $write = $this->_frameworkModelResource->getConnection(\"core_write\");\n $query = \"replace into \" . $this->_frameworkModelResource->getTableName('klevu_product_sync')\n . \"(product_id, parent_id, store_id, last_synced_at, type,error_flag) values \"\n . \"(:product_id, :parent_id, :store_id, :last_synced_at, :type,:error_flag)\";\n $binds = [\n 'product_id' => $markAsSync[0][0],\n 'parent_id' => $markAsSync[0][1],\n 'store_id' => $markAsSync[0][2],\n 'last_synced_at' => $markAsSync[0][4],\n 'type' => $markAsSync[0][5],\n 'error_flag' => 1\n ];\n $write->query($query, $binds);\n }\n continue;\n }\n unset($product['product_id'], $product['parent_id']);\n }\n\n if (count($rejectedProducts) > 0) {\n // Can not be injected via construct due to circular dependency\n $magentoProductActions = ObjectManager::getInstance()->get(MagentoProductActionsInterface::class);\n if (!$this->_searchHelperConfig->displayOutofstock()) {\n $rejectedProducts_data = [];\n $r = 0;\n foreach ($rejectedProducts as $rvalue) {\n $idData = $this->checkIdexitsInDb(\n $store->getId(),\n $rvalue[\"product_id\"],\n $rvalue[\"parent_id\"]\n );\n $ids = $idData->getData();\n if (count($ids) > 0) {\n $rejectedProducts_data[$r][\"product_id\"] = $rvalue[\"product_id\"];\n $rejectedProducts_data[$r][\"parent_id\"] = $rvalue[\"parent_id\"];\n $r++;\n }\n }\n $this->_searchHelperData->log(\n LoggerConstants::ZEND_LOG_WARN,\n sprintf(\n \"Because of indexing issue or invalid data we cannot synchronize product IDs %s\",\n implode(\n ',',\n array_map(\n static function ($el) {\n return $el['product_id'];\n },\n $rejectedProducts_data\n )\n )\n )\n );\n $magentoProductActions->deleteProducts($rejectedProducts_data);\n } else {\n $this->_searchHelperData->log(\n LoggerConstants::ZEND_LOG_WARN,\n sprintf(\n \"Because of indexing issue or invalid data we cannot synchronize product IDs %s\",\n implode(\n ',',\n array_map(\n static function ($el) {\n return $el['product_id'];\n },\n $rejectedProducts\n )\n )\n )\n );\n $magentoProductActions->deleteProducts($rejectedProducts);\n }\n }\n\n return $this;\n }", "public function loadData(Mage_Core_Model_Store $store)\n {\n /* @var Nosto_Tagging_Helper_Data $helper */\n $helper = Mage::helper('nosto_tagging');\n /* @var Nosto_Tagging_Helper_Url $helperUrl */\n $helperUrl = Mage::helper('nosto_tagging/url');\n $this->_title = $helper->cleanUpAccountTitle(\n $store->getWebsite()->getName()\n . ' - '\n . $store->getGroup()->getName()\n . ' - '\n . $store->getName()\n );\n $this->_name = substr(sha1(rand()), 0, 8);\n $this->_frontPageUrl = $helperUrl->getFrontPageUrl($store);\n $this->_currencyCode = $store->getBaseCurrencyCode();\n $this->_languageCode = substr(\n $store->getConfig('general/locale/code'), 0, 2\n );\n $this->_ownerLanguageCode = substr(\n Mage::app()->getLocale()->getLocaleCode(), 0, 2\n );\n\n /** @var Nosto_Tagging_Model_Meta_Account_Owner $owner */\n $owner = Mage::getModel('nosto_tagging/meta_account_owner');\n $owner->loadData();\n $this->_owner = $owner;\n\n /** @var Nosto_Tagging_Model_Meta_Account_Billing $billing */\n $billing = Mage::getModel('nosto_tagging/meta_account_billing');\n $billing->loadData($store);\n $this->_billing = $billing;\n\n $this->_useCurrencyExchangeRates = !$helper->multiCurrencyDisabled($store);\n if (!$helper->multiCurrencyDisabled($store)) {\n $this->_defaultPriceVariationId = $store->getBaseCurrencyCode();\n } else {\n $this->_defaultPriceVariationId = \"\";\n }\n\n $storeLocale = $store->getConfig('general/locale/code');\n $currencyCodes = $store->getAvailableCurrencyCodes(true);\n if (is_array($currencyCodes) && count($currencyCodes) > 0) {\n /** @var Nosto_Tagging_Helper_Currency $currencyHelper */\n $currencyHelper = Mage::helper('nosto_tagging/currency');\n foreach ($currencyCodes as $currencyCode) {\n $this->_currencies[$currencyCode] = $currencyHelper\n ->getCurrencyObject($storeLocale, $currencyCode);\n }\n }\n }", "public function updateprices()\n {\n\n $aParams = oxRegistry::getConfig()->getRequestParameter(\"updateval\");\n if (is_array($aParams)) {\n foreach ($aParams as $soxId => $aStockParams) {\n $this->addprice($soxId, $aStockParams);\n }\n }\n }", "public static function loadMultiple(array $ids = NULL);", "function getProducts() {\n\t\t$saleData = array();\n\t\tif($stmt = $this->connection->prepare(\"select * from products;\")) {\n\t\t\t$stmt -> execute();\n\n\t\t\t$stmt->store_result();\n\t\t\t$stmt->bind_result($id, $itemName, $itemImage, $itemDesc, $salePrice, $regularPrice, $numberLeft);\n\n\t\t\tif($stmt ->num_rows >0){\n\t\t\t\twhile($stmt->fetch() ){\n\t\t\t\t\t$saleData[] = array(\n\t\t\t\t\t\t'id' => $id,\n\t\t\t\t\t\t'itemName' => $itemName,\n\t\t\t\t\t\t'itemImage' => $itemImage,\n\t\t\t\t\t\t'itemDesc' => $itemDesc,\n\t\t\t\t\t\t'salePrice' => $salePrice,\n\t\t\t\t\t\t'regularPrice' => $regularPrice,\n\t\t\t\t\t\t'numberLeft' => $numberLeft\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $saleData;\n\t}", "public function publishConcretePriceProductByProductIds(array $productIds): void;", "function _loadRPLinks($params)\n {\n if(!empty($params))\n {\n $_ids = array_filter(array_map(\"abs\",array_map(\"intval\",$params)));\n }\n else // load by current section\n {\n global $application;\n $sections = $application->getSectionByCurrentPagename();\n if(in_array('Checkout',$sections) or in_array('Cart',$sections)) // checkout or cart\n {\n $_ids = modApiFunc('Cart','getUniqueProductsIDsInCart');\n }\n elseif(in_array('ProductList',$sections)) // product list\n {\n $_ids = array();\n $_pids = modApiFunc('Catalog', 'getProductListByGlobalFilter', PAGINATOR_ENABLE, RETURN_AS_ID_LIST);\n if(is_array($_pids) and !empty($_pids))\n {\n foreach($_pids as $_pinfo)\n {\n $_ids[] = $_pinfo['product_id'];\n };\n };\n }\n else // product info\n {\n $_id = modApiFunc('Catalog','getCurrentProductId');\n if ($_id != NULL)\n {\n $_ids = array($_id);\n }\n else\n {\n $_ids = array();\n }\n };\n };\n\n $this->RPLinks = modApiFunc('Related_Products','getRPIDsForProducts',$_ids);\n }", "public function loadProducts()\n {\n if (!isset($this->mix_id)) {\n return false;\n }\n\n $this->products = array();\n $query = \"SELECT mg.*, sup.*, p.product_id, p.product_nr, p.name, p.paint_chemical, coat.coat_desc as coatDesc \" .\n \"FROM \" . TB_MIXGROUP . \" mg \" .\n \"JOIN \" . TB_PRODUCT . \" p ON p.product_id = mg.product_id \" .\n \"JOIN \" . TB_SUPPLIER . \" sup ON p.supplier_id = sup.supplier_id \" .\n \"JOIN \" . TB_COAT . \" coat ON coat.coat_id = coating_id \" .\n \"WHERE mg.mix_id = {$this->db->sqltext($this->mix_id)}\";\n\n $this->db->query($query);\n if ($this->db->num_rows() == 0) {\n return false;\n }\n\n $productsData = $this->db->fetch_all();\n\n $unittype = new Unittype($this->db);\n //get pfp if exist\n $pfp = $this->getPfp();\n $pfpProduct = array();\n if ($pfp) {\n $pfpProducts = $pfp->getProducts();\n }\n\n foreach ($productsData as $productData) {\n $mixProduct = new MixProduct($this->db);\n foreach ($productData as $property => $value) {\n if (property_exists($mixProduct, $property)) {\n $mixProduct->$property = $productData->$property;\n }\n }\n //\tTODO: add userfriendly records to product properties\n $mixProduct->initializeByID($mixProduct->product_id);\n\n //\tif there is a primary product then this is an pfp-based mix\n if ($mixProduct->is_primary) {\n $this->isPfp = true;\n }\n\n if ($productData->ratio) {\n $mixProduct->ratio_to_save = $productData->ratio;\n }\n\n $mixProduct->unittypeDetails = $unittype->getUnittypeDetails($mixProduct->unit_type);\n $unittypeClass = $unittype->getUnittypeClass($mixProduct->unit_type);\n\n $mixProduct->unittypeDetails['unittypeClass'] = $unittypeClass;\n $mixProduct->initUnittypeList($unittype);\n\n $mixProduct->json = json_encode($mixProduct);\n //get is Ratio \n foreach ($pfpProducts as $pfpProduct) {\n if ($pfpProduct->getProductId() == $productData->product_id) {\n if (!is_null($pfpProduct->getRatioFromOriginal()) && !is_null($pfpProduct->getRatioToOriginal())) {\n $mixProduct->isRange = true;\n $mixProduct->range_ratio = trim($pfpProduct->getRatioFromOriginal()) . '-' . trim($pfpProduct->getRatioToOriginal());\n } else {\n $mixProduct->isRange = false;\n }\n break;\n }\n }\n //\tpush to mix products\n array_push($this->products, $mixProduct);\n }\n\n return $this->products;\n }", "private function buildNewStoreData($store_code, $store_productsets) {\n // 1. Didn't need it anymore...\n // 2. populates our category table.\n $this->load->model('catalog/category');\n $this->model_catalog_category->createStoreCategories($store_code);\n\n // 3. populates our product_to_category table.\n $this->load->model('productset/product');\n $this->model_productset_product->buildProductToCategoryAssociations($store_code, $store_productsets);\n\n // Build related products for the dealer based no the default set of ZZZ.\n $this->model_productset_product->buildRelatedProductAssociations($store_code, $store_productsets);\n\n // Now update the catalogs.\n $this->load->model('store/product');\n $this->model_store_product->createUnjunctionedProductRecords($store_code);\n }", "private function exportProducts(){\n Product::initStore($this->store_settings->store_name, config('shopify.api_key'), $this->store_settings->access_token);\n $products_count = Product::count();\n $products_per_page = 250;\n $number_of_pages = ceil($products_count/$products_per_page);\n $all_products = [];\n $products = [];\n //to init start time\n ShopifyApiThrottle::init();\n for( $page = 1; $page <= $number_of_pages; $page++ ){\n //wait for some time so it doesn't reach throttle point\n if( $page > 1 ){ ShopifyApiThrottle::wait(); }\n\n $products = Product::all([\n 'limit' => $products_per_page,\n 'page' => $page\n ]);\n if($products)\n $all_products = array_merge($all_products, $products);\n //to re-init start time\n ShopifyApiThrottle::init();\n }\n return $all_products;\n }", "public function loadLineItems(array $ids);", "protected function _getItems($storeId)\n {\n return Mage::getModel('catalog/product')\n ->getCollection()\n ->addStoreFilter($storeId)\n ->addAttributeToSelect('id')\n ->getSize();\n }", "private function _getAlsoSold2(){\n $data['also_sold_products'] = null;\n $also_sold = $this->model_catalog_product->GetAlsoSoldProducts($this->request->get['product_id']);\n foreach ($also_sold as $result) {\n if ($result['image']) {\n $image = $this->model_tool_image->resize($result['image'], $this->config->get($this->config->get('config_theme') . '_image_related_width'), $this->config->get($this->config->get('config_theme') . '_image_related_height'));\n } else {\n $image = $this->model_tool_image->resize('placeholder.png', $this->config->get($this->config->get('config_theme') . '_image_related_width'), $this->config->get($this->config->get('config_theme') . '_image_related_height'));\n }\n\n if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {\n $price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);\n } else {\n $price = false;\n }\n\n if ((float)$result['special']) {\n $special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);\n } else {\n $special = false;\n }\n\n if ($this->config->get('config_tax')) {\n $tax = $this->currency->format((float)$result['special'] ? $result['special'] : $result['price'], $this->session->data['currency']);\n } else {\n $tax = false;\n }\n\n if ($this->config->get('config_review_status')) {\n $rating = (int)$result['rating'];\n } else {\n $rating = false;\n }\n\n $data['also_sold_products'][] = array(\n 'product_id' => $result['product_id'],\n 'thumb' => $image,\n 'name' => $result['name'],\n 'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get($this->config->get('config_theme') . '_product_description_length')) . '..',\n 'price' => $price,\n 'special' => $special,\n 'tax' => $tax,\n 'minimum' => $result['minimum'] > 0 ? $result['minimum'] : 1,\n 'rating' => $rating,\n 'href' => $this->url->link('product/product', 'product_id=' . $result['product_id'].'&selfref=also')\n );\n }\n\n }", "public function actionGetProductPrice($id=null)\n {\n $userData = User::find()->andFilterWhere(['u_id' => $id])->andWhere(['IS NOT', 'u_mws_seller_id', null])->all();\n\n foreach ($userData as $user) {\n \\Yii::$app->data->getMwsDetails($user->u_mws_seller_id, $user->u_mws_auth_token);\n $models = FbaAllListingData::find()->andWhere(['created_by' => $user->u_id])->all(); //->andWhere(['status' => 'Active'])\n\n foreach ($models as $model) {\n if ($model->seller_sku) {\n $productDetails = \\Yii::$app->api->getProductCompetitivePrice($model->seller_sku);\n if ($productDetails) {\n $model->buybox_price = $productDetails;\n if ($model->save(false)) {\n echo $model->asin1 . \" is Updated.\";\n }\n }\n }\n sleep(3);\n }\n }\n }", "protected function set_product_ids() {\n\n\t\t// get the products selected for the report\n\t\t$this->product_ids = isset( $_GET['product_ids'] ) ? array_filter( array_map( 'absint', (array) $_GET['product_ids'] ) ) : array();\n\t}", "function getSellerProducts($params = array()){\n\t\tMpApi::sleep(); \n\t\treturn json_decode($this->callCurl(MpApi::GET , '/multivendor/seller/'.(int)$params['seller_id'].'/product.json',$params),true);\n\t}", "public function getSearchableData($productId, $storeId)\n {\n $connection = $this->getConnection();\n $ifNullDefaultTitle = $connection->getIfNullSql('st.title', 'd.title');\n $select = $connection->select()->from(\n ['m' => $this->getMainTable()],\n null\n )->join(\n ['d' => $this->getTable('downloadable_sample_title')],\n 'd.sample_id=m.sample_id AND d.store_id=0',\n []\n )->join(\n ['cpe' => $this->getTable('catalog_product_entity')],\n sprintf(\n 'cpe.entity_id = m.product_id',\n $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField()\n ),\n []\n )->joinLeft(\n ['st' => $this->getTable('downloadable_sample_title')],\n 'st.sample_id=m.sample_id AND st.store_id=:store_id',\n ['title' => $ifNullDefaultTitle]\n )->where(\n 'cpe.entity_id=:product_id',\n $productId\n );\n $bind = [':store_id' => (int)$storeId, ':product_id' => $productId];\n\n return $connection->fetchCol($select, $bind);\n }", "public function getOptions($storeId)\n {\n $this->getSelect()\n ->joinLeft(array('default_option_price' => $this->getTable('productoptions/product_option_price')), '`default_option_price`.option_id=`main_table`.option_id AND ' . $this->getConnection()->quoteInto('`default_option_price`.store_id=?', 0), array('default_price' => 'price', 'default_price_type' => 'price_type'))\n ->joinLeft(array('store_option_price' => $this->getTable('productoptions/product_option_price')), '`store_option_price`.option_id=`main_table`.option_id AND ' . $this->getConnection()->quoteInto('`store_option_price`.store_id=?', $store_id), array('store_price' => 'price', 'store_price_type' => 'price_type',\n 'price' => new Zend_Db_Expr('IFNULL(`store_option_price`.price,`default_option_price`.price)'),\n 'price_type' => new Zend_Db_Expr('IFNULL(`store_option_price`.price_type,`default_option_price`.price_type)')))\n ->join(array('default_option_title' => $this->getTable('productoptions/product_option_title')), '`default_option_title`.option_id=`main_table`.option_id', array('default_title' => 'title'))\n ->joinLeft(array('store_option_title' => $this->getTable('productoptions/product_option_title')), '`store_option_title`.option_id=`main_table`.option_id AND ' . $this->getConnection()->quoteInto('`store_option_title`.store_id=?', $store_id), array('store_title' => 'title',\n 'title' => new Zend_Db_Expr('IFNULL(`store_option_title`.title,`default_option_title`.title)')))\n ->where('`default_option_title`.store_id=?', 0);\n\n return $this;\n }", "public function prepareData($collection, $productIds)\n {\n foreach ($collection as &$item) {\n if ($item->getSpecialPrice()) {\n $product = $this->productRepository->get($item->getSku());\n $specialFromDate = $product->getSpecialFromDate();\n $specialToDate = $product->getSpecialToDate();\n\n if ($specialFromDate || $specialToDate) {\n $id = $product->getId();\n $this->effectiveDates[$id] = $this->getSpecialEffectiveDate($specialFromDate, $specialToDate);\n }\n }\n }\n }", "public function run()\n {\n DB::table('product_prices')->insert([\n 'product_id' => 1,\n 'description' => 'single',\n 'price' => 100.00\n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 2,\n 'description' => 'single', \n 'price' => 200.00 \n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 3,\n 'description' => 'single', \n 'price' => 300.00 \n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 4,\n 'description' => 'single',\n 'price' => 400.00 \n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 5,\n 'description' => 'single',\n 'price' => 500.00\n ]);\n DB::table('product_prices')->insert([\n 'product_id' => 6,\n 'description' => 'single',\n 'price' => 600.00\n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 7,\n 'description' => 'single',\n 'price' => 700.00\n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 8,\n 'description' => 'single',\n 'price' => 800.00\n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 9,\n 'description' => 'single',\n 'price' => 9000.00\n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 1,\n 'description' => 'bundle (10 pcs)',\n 'price' => 1000.00\n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 2,\n 'description' => 'bundle (10 pcs)', \n 'price' => 2000.00 \n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 3,\n 'description' => 'bundle (10 pcs)', \n 'price' => 3000.00 \n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 4,\n 'description' => 'bundle (10 pcs)',\n 'price' => 4000.00 \n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 5,\n 'description' => 'bundle (10 pcs)',\n 'price' => 5000.00\n ]);\n DB::table('product_prices')->insert([\n 'product_id' => 6,\n 'description' => 'bundle (10 pcs)',\n 'price' => 6000.00\n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 7,\n 'description' => 'bundle (10 pcs)',\n 'price' => 7000.00\n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 8,\n 'description' => 'bundle (10 pcs)',\n 'price' => 8000.00\n ]);\n\n DB::table('product_prices')->insert([\n 'product_id' => 9,\n 'description' => 'bundle (10 pcs)',\n 'price' => 9000.00\n ]);\n }", "public function getProductsData($productCollection)\n {\n /** @var Oggetto_YandexPrices_Model_Api_Market $api */\n $api = Mage::getModel('oggetto_yandexprices/api_market');\n /** @var Oggetto_YandexPrices_Helper_Data $helper */\n $helper = Mage::helper('oggetto_yandexprices');\n\n $data = [];\n /** @var Mage_Catalog_Model_Product $product */\n foreach ($productCollection as $product) {\n $price = $api->fetchPriceFromMarket($product->getName(), true);\n if (!is_null($price)) {\n $productPrice = $product->getFinalPrice();\n\n $priceFormatted = $helper->formatPrice($price, $this::YANDEX_MARKET_PRICE_CURRENCY);\n $priceAdduced = $helper->adducePrice($priceFormatted, $productPrice);\n\n $data[] = [\n 'product_id' => $product->getId(),\n 'price' => $priceAdduced\n ];\n } else {\n $data[] = [\n 'product_id' => $product->getId(),\n 'price' => $price\n ];\n }\n }\n\n return $data;\n }", "public function index()\n {\n $data['products'] = DB::table('products')\n ->limit(18)\n ->get();\n // $product = DB::table('products')\n // ->join('categories', 'products.category', '=', 'categories.id')\n // ->select('products.*', 'categories.cname')\n // // ->where('products.slug', $slug)\n // ->get();\n //dd($data['products'][0]);\n if(session('store')!=\"\"){\n $store_session = session()->get('store');\n $data['store'] = Store::where('email', '=', $store_session)->first();\n \n foreach ($data['products'] as $key => $product){\n $proid = $product->id;\n $data['products'][$key]->prices = DB::table('prices')\n ->join('stores','prices.store_id','=','stores.id')\n ->where('prices.product_id',$product->id)\n ->where('stores.id',$data['store']->id)\n ->get();\n \n }\n }\n\n return View('home.stores')->with($data);\n\n }", "public function run()\n {\n $prices = [\n [\n \"product_id\" => 1,\n \"amount\" => 39.90,\n \"started_at\" => Carbon::now(),\n \"finished_at\" => null\n ],\n [\n \"product_id\" => 2,\n \"amount\" => 49.90,\n \"started_at\" => Carbon::now(),\n \"finished_at\" => null\n ],\n [\n \"product_id\" => 3,\n \"amount\" => 69.90,\n \"started_at\" => Carbon::now(),\n \"finished_at\" => null\n ],\n [\n \"product_id\" => 4,\n \"amount\" => 39.90,\n \"started_at\" => Carbon::now(),\n \"finished_at\" => null\n ],\n [\n \"product_id\" => 5,\n \"amount\" => 49.90,\n \"started_at\" => Carbon::now(),\n \"finished_at\" => null\n ],\n [\n \"product_id\" => 6,\n \"amount\" => 69.90,\n \"started_at\" => Carbon::now(),\n \"finished_at\" => null\n ],\n\n // [\n // \"product_id\" => 1,\n // \"amount\" => 7.89,\n // \"started_at\" => Carbon::now(),\n // \"finished_at\" => Carbon::now()->addDay(7)\n // ],\n // [\n // \"product_id\" => 1,\n // \"amount\" => 9.99,\n // \"started_at\" => Carbon::now()->addDay(7),\n // \"finished_at\" => Carbon::now()->addDay(10)\n // ],\n // [\n // \"product_id\" => 1,\n // \"amount\" => 12,\n // \"started_at\" => Carbon::now(),\n // \"finished_at\" => null\n // ],\n // [\n // \"product_id\" => 2,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now(),\n // \"finished_at\" => Carbon::now()->addDay(5)\n // ],\n // [\n // \"product_id\" => 2,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now()->addDay(5),\n // \"finished_at\" => null\n // ],\n // [\n // \"product_id\" => 3,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now(),\n // \"finished_at\" => Carbon::now()->addDay(2)\n // ],\n // [\n // \"product_id\" => 3,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now()->addDay(2),\n // \"finished_at\" => null\n // ],\n // [\n // \"product_id\" => 4,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now(),\n // \"finished_at\" => null\n // ],\n // [\n // \"product_id\" => 5,\n // \"amount\" => 17.89,\n // \"started_at\" => Carbon::now(),\n // \"finished_at\" => Carbon::now()->addDay(7)\n // ],\n // [\n // \"product_id\" => 5,\n // \"amount\" => 19.99,\n // \"started_at\" => Carbon::now()->addDay(7),\n // \"finished_at\" => Carbon::now()->addDay(10)\n // ],\n // [\n // \"product_id\" => 5,\n // \"amount\" => 14,\n // \"started_at\" => Carbon::now(),\n // \"finished_at\" => null\n // ],\n // [\n // \"product_id\" => 6,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now(),\n // \"finished_at\" => Carbon::now()->addDay(5)\n // ],\n // [\n // \"product_id\" => 6,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now()->addDay(5),\n // \"finished_at\" => null\n // ],\n // [\n // \"product_id\" => 7,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now(),\n // \"finished_at\" => Carbon::now()->addDay(2)\n // ],\n // [\n // \"product_id\" => 7,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now()->addDay(2),\n // \"finished_at\" => null\n // ],\n // [\n // \"product_id\" => 8,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now(),\n // \"finished_at\" => null\n // ],\n // [\n // \"product_id\" => 9,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now(),\n // \"finished_at\" => Carbon::now()->addDay(2)\n // ],\n // [\n // \"product_id\" => 9,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now()->addDay(2),\n // \"finished_at\" => null\n // ],\n // [\n // \"product_id\" => 10,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now(),\n // \"finished_at\" => null\n // ],\n // [\n // \"product_id\" => 11,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now(),\n // \"finished_at\" => null\n // ],\n // [\n // \"product_id\" => 12,\n // \"amount\" => (mt_rand(100, 5000) / 100),\n // \"started_at\" => Carbon::now(),\n // \"finished_at\" => null\n // ]\n ];\n\n foreach ($prices as $price) {\n $price = Price::create([\n \"product_id\" => $price[\"product_id\"],\n \"amount\" => $price[\"amount\"],\n \"started_at\" => $price[\"started_at\"],\n \"finished_at\" => $price[\"finished_at\"]\n ]);\n }\n }", "public function run()\n {\n ProductPrice::insert(\n \t[\n \t[\"product_id\" => 1,\n \t \"description\" => \"economical\",\n \t \"price\" => 10000\n \t],\n \t[\"product_id\" => 1,\n \t \"description\" => \"default\",\n \t \"price\" => 100000\n \t],\n \t[\"product_id\" => 1,\n \t \"description\" => \"plus\",\n \t \"price\" => 1000000\n \t],\n \t[\"product_id\" => 2,\n \t \"description\" => \"economical\",\n \t \"price\" => 10000\n \t],\n \t[\"product_id\" => 2,\n \t \"description\" => \"default\",\n \t \"price\" => 100000\n \t],\n \t[\"product_id\" => 2,\n \t \"description\" => \"plus\",\n \t \"price\" => 1000000\n \t],\n \t[\"product_id\" => 3,\n \t \"description\" => \"economical\",\n \t \"price\" => 10000\n \t],\n \t[\"product_id\" => 3,\n \t \"description\" => \"default\",\n \t \"price\" => 100000\n \t],\n \t[\"product_id\" => 3,\n \t \"description\" => \"plus\",\n \t \"price\" => 1000000\n \t],\n \t[\"product_id\" => 4,\n \t \"description\" => \"economical\",\n \t \"price\" => 10000\n \t],\n \t[\"product_id\" => 4,\n \t \"description\" => \"default\",\n \t \"price\" => 100000\n \t],\n \t[\"product_id\" => 4,\n \t \"description\" => \"plus\",\n \t \"price\" => 1000000\n \t],\n \t[\"product_id\" => 5,\n \t \"description\" => \"economical\",\n \t \"price\" => 10000\n \t],\n \t[\"product_id\" => 5,\n \t \"description\" => \"default\",\n \t \"price\" => 100000\n \t],\n \t[\"product_id\" => 5,\n \t \"description\" => \"plus\",\n \t \"price\" => 1000000\n \t]\n \t]);\n }", "public function getSearchData()\n\t{\n\t\t$search_data \t\t=\tjson_decode($this->request->getContent(),true);\n\t\t$search_term\t\t=\t$search_data['search_term'];\n\t\t$area_id\t\t\t=\t$search_data['area_id'];\n\t\t$city_id\t\t\t=\t$search_data['city_id'];\n\t\t$page_number\t\t=\t$search_data['page_number'];\n\t\t\n\t\t$products = $this->_productCollectionFactory->create()->addAttributeToSelect(\n\t\t\t'*'\n\t\t)->addFieldToFilter(\n\t\t\t'name',\n\t\t\t['like' => '%'.$search_term.'%']\n\t\t)-> addAttributeToFilter('visibility', array('in' => array(4) )\n\t\t)-> addAttributeToFilter('status', array('in' => array(1) ))\n\t\t->addCategoryIds()->setPageSize(10)\n ->setCurPage($page_number);\n\t\t\n\t\t\n\t\t$products->getSelect()\n\t\t\t\t->join(array(\"marketplace_product\" => 'marketplace_product'),\"`marketplace_product`.`mageproduct_id` = `e`.`entity_id`\",array(\"seller_id\" => \"seller_id\"))\n\t\t\t\t->join(array(\"marketplace_userdata\" => 'marketplace_userdata'),\"`marketplace_userdata`.`seller_id` = `marketplace_product`.`seller_id` AND (FIND_IN_SET('\".$area_id.\"', `area_id`)) AND (FIND_IN_SET('\".$city_id.\"', `region_id`)) \",array(\"shop_url\", \"logo_pic\")); \n\t\t\n\t\t\n\t\t$all_response \t=\tarray();\n\t\t$all_response['data'] \t=\tarray();\n\t\t$categories \t=\tarray();\n\t\t$seller_data \t=\tarray();\n\t\t$priceHelper \t= \t$this->_objectManager->create('Magento\\Framework\\Pricing\\Helper\\Data'); // Instance of Pricing Helper\n\t\t$StockState \t= \t$this->_objectManager->get('\\Magento\\CatalogInventory\\Api\\StockStateInterface');\n\t\t$store \t\t\t\t= \t$this->_objectManager->get('Magento\\Store\\Model\\StoreManagerInterface')->getStore();\n\t\tforeach($products as $product_data){\n\t\t\tif(!isset($all_response['data'][$product_data->getSellerId()])){\t\t\t\n\t\t\t\t$all_response['data'][$product_data->getSellerId()]['seller']\t=\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'name'=> ucfirst($product_data->getShopUrl()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'shop_url'=> ($product_data->getShopUrl()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'logo'=> $product_data->getLogoPic(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\t\t\t\t\t\n\t\t\t}\n\t\t\t$categories\t\t\t=\t$product_data->getCategoryIds();\n\t\t\t$formattedPrice \t= \t$priceHelper->currency($product_data->getPrice(), true, false);\n\t\t\t\n\t\t\t$product_quantity\t=\t$StockState->getStockQty($product_data->getId(), $product_data->getStore()->getWebsiteId());\n\t\t\t$collectioncat \t\t= \t$this->_categoryCollectionFactory->create();\n\t\t\t$collectioncat->addAttributeToSelect(array('name'), 'inner');\n\t\t\t$collectioncat->addAttributeToFilter('entity_id', array('in' => $categories));\n\t\t\t$collectioncat->addAttributeToFilter('level', array('gt' => 1));\n\t\t\t$collectioncat->addIsActiveFilter();\n\t\t\t$productImageUrl \t= \t$store->getBaseUrl(\\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA) . 'catalog/product/';\n\t\t\t\n\t\t\t$shortdescription\t=\t$product_data->getShortDescription();\n\t\t\tif($shortdescription==null){\n\t\t\t\t$shortdescription\t=\t\"\";\n\t\t\t}\n\t\t\tif($product_data->getTypeId()!=\"simple\"){\n\t\t\t\t$price\t\t\t=\t0;\n\t\t\t\t$product_price\t=\t0;\n\t\t\t\t$product_special_price\t=\t0;\n\t\t\t\t$_children = $product_data->getTypeInstance()->getUsedProducts($product_data);\n\t\t\t\tforeach ($_children as $child){\n\t\t\t\t\t$productPrice = $child->getPrice();\n\t\t\t\t\t$price = $price ? min($price, $productPrice) : $productPrice;\n\t\t\t\t}\n\t\t\t\t$special_price\t=\t$product_data->getFinalPrice(); \n\t\t\t\tif($price <= $product_data->getFinalPrice()){\n\t\t\t\t\t$special_price\t=\tnull; \n\t\t\t\t}\n\t\t\t\t$formattedPrice\t\t\t=\t$price; \n\t\t\t\t$product_price\t\t\t=\t$product_data->getProductPrice();\n\t\t\t\t$product_special_price\t=\t$product_data->getProductSpecialPrice();\n\t\t\t}else{\n\t\t\t\t$formattedPrice\t\t\t=\t$product_data->getPrice(); \n\t\t\t\t$special_price\t\t\t=\t$product_data->getFinalPrice(); \n\t\t\t\t$product_price\t\t\t=\t0;\n\t\t\t\t$product_special_price\t=\t0;\n\t\t\t}\n\t\t\tif($formattedPrice == $special_price ){\n\t\t\t\t$special_price\t\t\t=\tnull; \n\t\t\t}\n\t\t\t$formattedPrice\t\t\t\t=\tnumber_format($formattedPrice, 2);\n\t\t\tif($special_price !=null){\n\t\t\t\t$special_price\t\t\t\t=\tnumber_format($special_price, 2);\n\t\t\t}\n\t\t\t$all_response['data'][$product_data->getSellerId()]['products'][]\t=\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t'id'=>$product_data->getId(),\n\t\t\t\t\t\t\t\t\t\t\t\t'name'=>$product_data->getName(),\n\t\t\t\t\t\t\t\t\t\t\t\t'sku'=>$product_data->getSku(),\n\t\t\t\t\t\t\t\t\t\t\t\t'short_description'=>$shortdescription,\n\t\t\t\t\t\t\t\t\t\t\t\t'price'=>$formattedPrice,\n\t\t\t\t\t\t\t\t\t\t\t\t'product_price'=>$product_price,\n\t\t\t\t\t\t\t\t\t\t\t\t'product_special_price'=>$product_special_price,\n\t\t\t\t\t\t\t\t\t\t\t\t'special_price'=>$special_price,\n\t\t\t\t\t\t\t\t\t\t\t\t'image'=>ltrim($product_data->getImage(), \"/\"),\n\t\t\t\t\t\t\t\t\t\t\t\t'small_image'=>ltrim($product_data->getSmallImage(), \"/\"),\n\t\t\t\t\t\t\t\t\t\t\t\t'thumbnail'=>ltrim($product_data->getThumbnail(), \"/\"),\n\t\t\t\t\t\t\t\t\t\t\t\t'quantity'=>$product_quantity,\n\t\t\t\t\t\t\t\t\t\t\t\t'product_data'=>$product_data->getData(),\n\t\t\t\t\t\t\t\t\t\t\t\t'productImageUrl'=>$productImageUrl,\n\t\t\t\t\t\t\t\t\t\t\t\t'categories'=>$collectioncat->getData(),\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t$all_response['data'][$product_data->getSellerId()]['categories']\t=\t$collectioncat->getData();\n\t\t}\n\t\t\n\t\t\n\t\t$search_data \t=\t[['page_number'=>$page_number,'total_count'=>$products->getSize()]];\n\t\tif(!empty($all_response['data'])){\n\t\t\tforeach($all_response['data'] as $serller_id=>$seller_data){\n\t\t\t\t$customer_data \t\t\t\t\t= \t$this->_objectManager->create('Magento\\Customer\\Model\\Customer')->load($serller_id);\n\t\t\t\t$seller_data['seller']['name']\t=\ttrim($customer_data->getData('firstname').\" \".$customer_data->getData('lastname'));\n\t\t\t\t$search_data[]\t=\t[\n\t\t\t\t\t\t\t\t\t\t'seller_data'=>$seller_data['seller'],\n\t\t\t\t\t\t\t\t\t\t'products'=>$seller_data['products'],\n\t\t\t\t\t\t\t\t\t\t'categories'=>$seller_data['categories']\n\t\t\t\t\t\t\t\t\t];\n\t\t\t}\n\t\t}\n\t\treturn $search_data;\n\t}", "public function allProducts()\r\n {\r\n // left join mshop_product_list as mpl on mpl.parentid = mp.id \r\n // left join mshop_media as mm on mm.id = mpl.refid\r\n // left JOIN mshop_price as mpri on mpri.id = mpl.refid\r\n // where mpl.pos = 0 and mpl.domain in ('media','price')\";\r\n $qry1 = \"select mp.id as product_id, mp.code as product_code, mp.label as product_name, mm.preview as image_url from mshop_product as mp \r\n left join mshop_product_list as mpl on mpl.parentid = mp.id \r\n left join mshop_media as mm on mm.id = mpl.refid\r\n where mpl.pos = 0 and mpl.domain in ('media')\";\r\n $qry2 = \"select mp.id as product_id, mp.label as product_name, mpri.value as product_price from mshop_product as mp \r\n left join mshop_product_list as mpl on mpl.parentid = mp.id \r\n left JOIN mshop_price as mpri on mpri.id = mpl.refid\r\n where mpl.pos = 0 and mpl.domain in ('price')\";\r\n $products1 = DB::select($qry1);\r\n $products2 = DB::select($qry2); \r\n $i = 0;\r\n foreach($products1 as $products) {\r\n foreach($products2 as $product) {\r\n if($product->product_id === $products->product_id) {\r\n $products1[$i]->product_price = $product->product_price;\r\n }\r\n }\r\n $i++;\r\n }\r\n return $products1;\r\n }", "function get_product_pricebooks($id)\n\t{\n\t\tglobal $log,$singlepane_view;\n\t\t$log->debug(\"Entering get_product_pricebooks(\".$id.\") method ...\");\n\t\tglobal $mod_strings;\n\t\trequire_once('modules/PriceBooks/PriceBooks.php');\n\t\t$focus = new PriceBooks();\n\t\t$button = '';\n\t\tif($singlepane_view == 'true')\n\t\t\t$returnset = '&return_module=Products&return_action=DetailView&return_id='.$id;\n\t\telse\n\t\t\t$returnset = '&return_module=Products&return_action=CallRelatedList&return_id='.$id;\n\n\n\t\t$query = \"SELECT ec_pricebook.pricebookid as crmid,\n\t\t\tec_pricebook.*,\n\t\t\tec_pricebookproductrel.productid as prodid\n\t\t\tFROM ec_pricebook\n\t\t\tINNER JOIN ec_pricebookproductrel\n\t\t\t\tON ec_pricebookproductrel.pricebookid = ec_pricebook.pricebookid\n\t\t\tWHERE ec_pricebook.deleted = 0\n\t\t\tAND ec_pricebookproductrel.productid = \".$id;\n\t\t$log->debug(\"Exiting get_product_pricebooks method ...\");\n\t\treturn GetRelatedList('Products','PriceBooks',$focus,$query,$button,$returnset);\n\t}", "public function runHandle() {\n\n $storeId = $this->option('storeId') ? $this->option('storeId') : 0;\n\n $storeIds = $storeId ? [$storeId] : Store::pluck('id');\n foreach ($storeIds as $storeId) {\n $this->handleRequest($storeId);\n\n //设置时区\n FunctionHelper::setTimezone($storeId);\n\n $platform = FunctionHelper::getUniqueId(Constant::PLATFORM_SHOPIFY);\n\n $productModel = ActivityProductService::getModel($storeId, '');\n $productData = $productModel->select('id', 'asin', 'shop_sku', 'country', 'sku', 'act_id', 'business_type')->get(); //->where([['shop_sku', '!=', '']])\n foreach ($productData as $product) {\n $businessType = data_get($product, 'business_type');\n if ($businessType == 1) {\n $where = [\n Constant::DB_TABLE_STORE_ID => $storeId,\n Constant::DB_TABLE_PLATFORM => $platform,\n Constant::OWNER_RESOURCE => ActivityProductService::getMake(),\n Constant::OWNER_ID => $product['id'],\n Constant::NAME_SPACE => 'free_testing',\n Constant::DB_TABLE_KEY => 'country',\n ];\n $select = [Constant::DB_TABLE_VALUE];\n $counties = MetafieldService::getModel($storeId)->select($select)->buildWhere($where)->get();\n $country = data_get($counties, '0.value', '');\n empty($country) && $country = $product['country'];\n\n $amazonPriceData = ActivityProductService::getProductPrice($product['asin'], $product['shop_sku'], $country);\n if (data_get($amazonPriceData, Constant::RESPONSE_CODE_KEY, 0) != 1 || empty(data_get($amazonPriceData, Constant::RESPONSE_DATA_KEY, []))) {//如果拉取价格失败,就返回\n continue;\n }\n } else {\n $amazonPriceData = ActivityProductService::getProductPrice($product['asin'], $product['shop_sku'], $product['country']);\n if (data_get($amazonPriceData, Constant::RESPONSE_CODE_KEY, 0) != 1 || empty(data_get($amazonPriceData, Constant::RESPONSE_DATA_KEY, []))) {//如果拉取价格失败,就返回\n continue;\n }\n }\n\n $amazonPriceData = data_get($amazonPriceData, Constant::RESPONSE_DATA_KEY, []);\n $isQuerySuccessful = data_get($amazonPriceData, 'isQuerySuccessful', false);\n $queryResults = data_get($amazonPriceData, 'queryResults', 0);\n $priceData = data_get($amazonPriceData, 'priceData', []);\n $data = [\n 'query_at' => data_get($amazonPriceData, 'queryAt', ''), //查询时间\n 'is_query_successful' => $isQuerySuccessful, //是否查询成功 1:成功 0:失败\n 'query_results' => $queryResults, //查询结果 1:查询到价格数据 0:亚马逊和爬虫 价格数据为空\n ];\n\n if ($isQuerySuccessful && $priceData) {\n data_set($data, 'listing_price', data_get($priceData, 'listing_price', 0)); //销售价\n data_set($data, 'regular_price', data_get($priceData, 'regular_price', 0)); //原价\n data_set($data, 'price_updated_at', data_get($priceData, 'updated_at', '')); //销参产品价格更新时间\n data_set($data, 'price_source', data_get($priceData, 'price_source', '')); //价格来源\n }\n\n //更新活动产品价格数据\n ActivityProductService::update($storeId, ['id' => data_get($product, 'id', 0)], $data);\n }\n\n $this->handleResponse(); //处理响应\n }\n\n return true;\n }", "public function load($product, $productAttribute, $options, $data);", "private function load($id = null) {\n\n if (!is_null($id)) {\n\n return $this->search->getProduct($id);\n\n }\n\n return $this->search->getProducts($this->filters);\n\n }", "public function getBundleProductsBehaviour(int $storeId): array;", "public static function get_stores()\n {\n }", "public function testPrices()\n {\n $product_id = 7;\n $variation = PRICE_VARIATION_MIDLANDS;\n $price = 68.21;\n $this->assertDatabaseHas('product_prices', [\n 'price' => $price,\n 'product_id' => $product_id,\n 'variation' => $variation\n ]);\n\n $product_id = 10;\n $variation = PRICE_VARIATION_MIDLANDS;\n $price = 68.21;\n $this->assertDatabaseMissing('product_prices', [\n 'price' => $price,\n 'product_id' => $product_id,\n 'variation' => $variation\n ]);\n\n }", "public function load($id){\n\t\tglobal $DB;\n\n\t\t$query = sprintf(\n\t\t\t'SELECT \n\t\t\t\tlmp.id, \n\t\t\t\tc.id as course_id,\n\t\t\t\tfullname,\n\t\t\t\tshortname,\n\t\t\t\tis_enabled,\n\t\t\t\tcategory,\n\t\t\t\tsummary,\n\t\t\t\tc.summaryformat as summary_format,\n\t\t\t\ttype,\n\t\t\t\tdescription,\n\t\t\t\ttags,\n\t\t\t\ttimecreated\n\t\t\tFROM {local_moodec_product} lmp, {course} c\n\t\t\tWHERE lmp.course_id = c.id\n\t\t\tAND lmp.id = %d',\n\t\t\t$id\n\t\t);\n\n\t\t// run the query\n\t\t$product = $DB->get_record_sql($query);\n\n\t\t// return the products\n\t\tif (!!$product) {\n\t\t\t$this->_id = (int) $product->id;\n\t\t\t$this->_courseid = (int) $product->course_id;\n\t\t\t$this->_enabled = (bool) $product->is_enabled;\n\t\t\t$this->_fullname = $product->fullname;\n\t\t\t$this->_shortname = $product->shortname;\n\t\t\t$this->_type = $product->type;\n\t\t\t$this->_categoryid = (int) $product->category;\n\t\t\t$this->_summary = $product->summary;\n\t\t\t$this->_summaryFormat = (int) $product->summary_format;\n\t\t\t$this->_description = $product->description;\n\t\t\t$this->_tags = explode(',', $product->tags);\n\t\t} else {\n \tthrow new Exception('Unable to load product using identifier: ' . $id);\n \t\t}\n\t}", "public static function loadProductsNew()\n {\n $ret = array();\n $sql = \"select * from products ORDER BY DayAdd DESC limit 0,10\";\n $list = DataProviderMain::execQuery($sql);\n\n while ($row = mysqli_fetch_array($list)) {\n $proId = $row[\"ProID\"];\n $proName = $row[\"ProName\"];\n $tinyDes = $row[\"TinyDes\"];\n $fullDes = $row[\"FullDes\"];\n $price = $row[\"Price\"];\n $quantity = $row[\"Quantity\"];\n $catId = $row[\"CatID\"];\n $view = $row[\"NView\"];\n $dayAdd = $row[\"DayAdd\"];\n $classify = $row[\"Classify\"];\n\n $p = new Products($proId, $proName, $tinyDes, $fullDes, $price, $quantity, $catId, $view, $dayAdd, $classify);\n array_push($ret, $p);\n }\n\n return $ret;\n }", "public function fetch_all_product_and_marketSelection_data() {\r\n \r\n $dataHelpers = array();\r\n if (!empty($this->settingVars->pageArray[$this->settingVars->pageName][\"DH\"]))\r\n $dataHelpers = explode(\"-\", $this->settingVars->pageArray[$this->settingVars->pageName][\"DH\"]); //COLLECT REQUIRED PRODUCT FILTERS DATA FROM PROJECT SETTING \r\n\r\n if (!empty($dataHelpers)) {\r\n\r\n $selectPart = $resultData = $helperTables = $helperLinks = $tagNames = $includeIdInLabels = $groupByPart = array();\r\n $filterDataProductInlineConfig = $dataProductInlineFields = [];\r\n \r\n foreach ($dataHelpers as $key => $account) {\r\n if($account != \"\")\r\n {\r\n //IN RARE CASES WE NEED TO ADD ADITIONAL FIELDS IN GROUP BY CLUAUSE AND ALSO AS LABEL WITH THE ORIGINAL ACCOUNT\r\n //E.G: FOR RUBICON LCL - SKU DATA HELPER IS SHOWN AS 'SKU #UPC'\r\n //IN ABOVE CASE WE SEND DH VALUE = F1#F2 [ASSUMING F1 AND F2 ARE SKU AND UPC'S INDEX IN DATAARRAY]\r\n $combineAccounts = explode(\"#\", $account);\r\n \r\n foreach ($combineAccounts as $accountKey => $singleAccount) {\r\n $tempId = key_exists('ID', $this->settingVars->dataArray[$singleAccount]) ? $this->settingVars->dataArray[$singleAccount]['ID'] : \"\";\r\n if ($tempId != \"\") {\r\n $selectPart[$this->settingVars->dataArray[$singleAccount]['TYPE']][] = $tempId . \" AS \" . $this->settingVars->dataArray[$singleAccount]['ID_ALIASE'];\r\n $groupByPart[$this->settingVars->dataArray[$singleAccount]['TYPE']][] = $this->settingVars->dataArray[$singleAccount]['ID_ALIASE'];\r\n\r\n /*[START] GETTING DATA FOR THE PRODUCT AND MARKET INLINE SELECTION FILTER*/\r\n $filterDataProductInlineConfig[] = $tempId . \" AS \" . $this->settingVars->dataArray[$singleAccount]['ID_ALIASE_WITH_TABLE'];\r\n $dataProductInlineFields[] = $tempId;\r\n /*[END] GETTING DATA FOR THE PRODUCT AND MARKET INLINE SELECTION FILTER*/\r\n }\r\n \r\n $tempName = $this->settingVars->dataArray[$singleAccount]['NAME'];\r\n $selectPart[$this->settingVars->dataArray[$singleAccount]['TYPE']][] = $tempName . \" AS \" . $this->settingVars->dataArray[$singleAccount]['NAME_ALIASE'];\r\n $groupByPart[$this->settingVars->dataArray[$singleAccount]['TYPE']][] = $this->settingVars->dataArray[$singleAccount]['NAME_ALIASE'];\r\n\r\n /*[START] GETTING DATA FOR THE PRODUCT AND MARKET INLINE SELECTION FILTER*/\r\n $filterDataProductInlineConfig[] = $tempName . \" AS \" . $this->settingVars->dataArray[$singleAccount]['NAME_ALIASE'];\r\n $dataProductInlineFields[] = $tempName;\r\n /*[END] GETTING DATA FOR THE PRODUCT AND MARKET INLINE SELECTION FILTER*/\r\n }\r\n \r\n $helperTables[$this->settingVars->dataArray[$combineAccounts[0]]['TYPE']] = $this->settingVars->dataArray[$combineAccounts[0]]['tablename'];\r\n $helperLinks[$this->settingVars->dataArray[$combineAccounts[0]]['TYPE']] = $this->settingVars->dataArray[$combineAccounts[0]]['link'];\r\n \r\n //datahelper\\Product_And_Market_Filter_DataCollector::collect_Filter_Data($selectPart, $groupByPart, $tagName, $helperTableName, $helperLink, $this->jsonOutput, $includeIdInLabel, $account);\r\n }\r\n }\r\n\r\n if(isset($this->queryVars->projectConfiguration) && isset($this->queryVars->projectConfiguration['has_product_market_filter_disp_type']) && $this->queryVars->projectConfiguration['has_product_market_filter_disp_type']==1 && count($filterDataProductInlineConfig) >0){\r\n $this->settingVars->filterDataProductInlineConfig = $filterDataProductInlineConfig;\r\n $this->settingVars->dataProductInlineFields = $dataProductInlineFields;\r\n }\r\n \r\n if(is_array($selectPart) && !empty($selectPart)){\r\n foreach ($selectPart as $type => $sPart) {\r\n $resultData[$type] = datahelper\\Product_And_Market_Filter_DataCollector::collect_Filter_Query_Data($sPart, $groupByPart[$type], $helperTables[$type], $helperLinks[$type]);\r\n }\r\n $redisCache = new utils\\RedisCache($this->queryVars);\r\n $redisCache->requestHash = 'productAndMarketFilterData';\r\n $redisCache->setDataForStaticHash($selectPart);\r\n }\r\n\r\n foreach ($dataHelpers as $key => $account) {\r\n if($account != \"\")\r\n {\r\n $combineAccounts = explode(\"#\", $account);\r\n\r\n $tagNameAccountName = $this->settingVars->dataArray[$combineAccounts[0]]['NAME'];\r\n\r\n //IF 'NAME' FIELD CONTAINS SOME SYMBOLS THAT CAN'T PASS AS A VALID XML TAG , WE USE 'NAME_ALIASE' INSTEAD AS XML TAG\r\n //AND FOR THAT PARTICULAR REASON, WE ALWAYS SET 'NAME_ALIASE' SO THAT IT IS A VALID XML TAG\r\n $tagName = preg_match('/(,|\\)|\\()|\\./', $tagNameAccountName) == 1 ? $this->settingVars->dataArray[$combineAccounts[0]]['NAME_ALIASE'] : strtoupper($tagNameAccountName);\r\n\r\n if (isset($this->settingVars->dataArray[$combineAccounts[0]]['use_alias_as_tag']))\r\n {\r\n $tagName = ($this->settingVars->dataArray[$combineAccounts[0]]['use_alias_as_tag']) ? strtoupper($this->settingVars->dataArray[$combineAccounts[0]]['NAME_ALIASE']) : $tagName;\r\n \r\n if(isset($this->settingVars->dataArray[$combineAccounts[0]]['ID_ALIASE']) && !empty($this->settingVars->dataArray[$combineAccounts[0]]['ID_ALIASE']))\r\n $tagName .= \"_\". $this->settingVars->dataArray[$combineAccounts[0]]['ID_ALIASE'];\r\n }\r\n\r\n $includeIdInLabel = false;\r\n if (isset($this->settingVars->dataArray[$combineAccounts[0]]['include_id_in_label']))\r\n $includeIdInLabel = ($this->settingVars->dataArray[$combineAccounts[0]]['include_id_in_label']) ? true : false;\r\n\r\n $tempId = key_exists('ID', $this->settingVars->dataArray[$combineAccounts[0]]) ? $this->settingVars->dataArray[$combineAccounts[0]]['ID'] : \"\";\r\n \r\n $nameAliase = $this->settingVars->dataArray[$combineAccounts[0]]['NAME_ALIASE'];\r\n $idAliase = isset($this->settingVars->dataArray[$combineAccounts[0]]['ID_ALIASE']) ? $this->settingVars->dataArray[$combineAccounts[0]]['ID_ALIASE'] : \"\";\r\n\r\n $type = $this->settingVars->dataArray[$combineAccounts[0]]['TYPE'];\r\n\r\n if( !isset($this->jsonOutput['filters']) || !array_key_exists($tagName, $this->jsonOutput['filters']) )\r\n datahelper\\Product_And_Market_Filter_DataCollector::getFilterData( $nameAliase, $idAliase, $tempId, $resultData[$type], $tagName , $this->jsonOutput, $includeIdInLabel, $account);\r\n }\r\n }\r\n\r\n // NOTE: THIS IS FOR FETCHING PRODUCT AND MARKET WHEN USER CLICKS TAB. \r\n // TO FETCH TAB DATA SERVER BASED. TO AVOID BROWSER HANG. \r\n // WE FACE ISSUE IN MJN AS MANY FILTERS ENABLED FOR ITS PROJECTS\r\n if ($this->settingVars->fetchProductAndMarketFilterOnTabClick) {\r\n $redisCache = new utils\\RedisCache($this->queryVars);\r\n $redisCache->requestHash = 'productAndMarketFilterTabData';\r\n $redisCache->setDataForStaticHash($this->jsonOutput['filters']);\r\n }\r\n }\r\n }", "protected function _saveProducts()\n {\n $priceIsGlobal = $this->_catalogData->isPriceGlobal();\n $productLimit = null;\n $productsQty = null;\n $entityLinkField = $this->getProductEntityLinkField();\n\n while ($bunch = $this->_dataSourceModel->getNextBunch()) {\n $entityRowsIn = [];\n $entityRowsUp = [];\n $attributes = [];\n $this->websitesCache = [];\n $this->categoriesCache = [];\n $tierPrices = [];\n $mediaGallery = [];\n $labelsForUpdate = [];\n $imagesForChangeVisibility = [];\n $uploadedImages = [];\n $previousType = null;\n $prevAttributeSet = null;\n $existingImages = $this->getExistingImages($bunch);\n\n foreach ($bunch as $rowNum => $rowData) {\n // reset category processor's failed categories array\n $this->categoryProcessor->clearFailedCategories();\n\n if (!$this->validateRow($rowData, $rowNum)) {\n continue;\n }\n if ($this->getErrorAggregator()->hasToBeTerminated()) {\n $this->getErrorAggregator()->addRowToSkip($rowNum);\n continue;\n }\n $rowScope = $this->getRowScope($rowData);\n\n $rowData[self::URL_KEY] = $this->getUrlKey($rowData);\n\n $rowSku = $rowData[self::COL_SKU];\n\n if (null === $rowSku) {\n $this->getErrorAggregator()->addRowToSkip($rowNum);\n continue;\n } elseif (self::SCOPE_STORE == $rowScope) {\n // set necessary data from SCOPE_DEFAULT row\n $rowData[self::COL_TYPE] = $this->skuProcessor->getNewSku($rowSku)['type_id'];\n $rowData['attribute_set_id'] = $this->skuProcessor->getNewSku($rowSku)['attr_set_id'];\n $rowData[self::COL_ATTR_SET] = $this->skuProcessor->getNewSku($rowSku)['attr_set_code'];\n }\n\n // 1. Entity phase\n if ($this->isSkuExist($rowSku)) {\n // existing row\n if (isset($rowData['attribute_set_code'])) {\n $attributeSetId = $this->catalogConfig->getAttributeSetId(\n $this->getEntityTypeId(),\n $rowData['attribute_set_code']\n );\n\n // wrong attribute_set_code was received\n if (!$attributeSetId) {\n throw new LocalizedException(\n __(\n 'Wrong attribute set code \"%1\", please correct it and try again.',\n $rowData['attribute_set_code']\n )\n );\n }\n } else {\n $attributeSetId = $this->skuProcessor->getNewSku($rowSku)['attr_set_id'];\n }\n\n $entityRowsUp[] = [\n 'updated_at' => (new \\DateTime())->format(DateTime::DATETIME_PHP_FORMAT),\n 'attribute_set_id' => $attributeSetId,\n $entityLinkField => $this->getExistingSku($rowSku)[$entityLinkField]\n ];\n } else {\n if (!$productLimit || $productsQty < $productLimit) {\n $entityRowsIn[strtolower($rowSku)] = [\n 'attribute_set_id' => $this->skuProcessor->getNewSku($rowSku)['attr_set_id'],\n 'type_id' => $this->skuProcessor->getNewSku($rowSku)['type_id'],\n 'sku' => $rowSku,\n 'has_options' => isset($rowData['has_options']) ? $rowData['has_options'] : 0,\n 'created_at' => (new \\DateTime())->format(DateTime::DATETIME_PHP_FORMAT),\n 'updated_at' => (new \\DateTime())->format(DateTime::DATETIME_PHP_FORMAT),\n ];\n $productsQty++;\n } else {\n $rowSku = null;\n // sign for child rows to be skipped\n $this->getErrorAggregator()->addRowToSkip($rowNum);\n continue;\n }\n }\n\n if (!array_key_exists($rowSku, $this->websitesCache)) {\n $this->websitesCache[$rowSku] = [];\n }\n // 2. Product-to-Website phase\n if (!empty($rowData[self::COL_PRODUCT_WEBSITES])) {\n $websiteCodes = explode($this->getMultipleValueSeparator(), $rowData[self::COL_PRODUCT_WEBSITES]);\n foreach ($websiteCodes as $websiteCode) {\n $websiteId = $this->storeResolver->getWebsiteCodeToId($websiteCode);\n $this->websitesCache[$rowSku][$websiteId] = true;\n }\n }\n\n // 3. Categories phase\n if (!array_key_exists($rowSku, $this->categoriesCache)) {\n $this->categoriesCache[$rowSku] = [];\n }\n $rowData['rowNum'] = $rowNum;\n $categoryIds = $this->processRowCategories($rowData);\n foreach ($categoryIds as $id) {\n $this->categoriesCache[$rowSku][$id] = true;\n }\n unset($rowData['rowNum']);\n\n // 4.1. Tier prices phase\n if (!empty($rowData['_tier_price_website'])) {\n $tierPrices[$rowSku][] = [\n 'all_groups' => $rowData['_tier_price_customer_group'] == self::VALUE_ALL,\n 'customer_group_id' => $rowData['_tier_price_customer_group'] ==\n self::VALUE_ALL ? 0 : $rowData['_tier_price_customer_group'],\n 'qty' => $rowData['_tier_price_qty'],\n 'value' => $rowData['_tier_price_price'],\n 'website_id' => self::VALUE_ALL == $rowData['_tier_price_website'] ||\n $priceIsGlobal ? 0 : $this->storeResolver->getWebsiteCodeToId($rowData['_tier_price_website']),\n ];\n }\n\n if (!$this->validateRow($rowData, $rowNum)) {\n continue;\n }\n\n // 5. Media gallery phase\n list($rowImages, $rowLabels) = $this->getImagesFromRow($rowData);\n $storeId = !empty($rowData[self::COL_STORE])\n ? $this->getStoreIdByCode($rowData[self::COL_STORE])\n : Store::DEFAULT_STORE_ID;\n $imageHiddenStates = $this->getImagesHiddenStates($rowData);\n foreach (array_keys($imageHiddenStates) as $image) {\n if (array_key_exists($rowSku, $existingImages)\n && array_key_exists($image, $existingImages[$rowSku])\n ) {\n $rowImages[self::COL_MEDIA_IMAGE][] = $image;\n $uploadedImages[$image] = $image;\n }\n\n if (empty($rowImages)) {\n $rowImages[self::COL_MEDIA_IMAGE][] = $image;\n }\n }\n\n $rowData[self::COL_MEDIA_IMAGE] = [];\n\n /*\n * Note: to avoid problems with undefined sorting, the value of media gallery items positions\n * must be unique in scope of one product.\n */\n $position = 0;\n foreach ($rowImages as $column => $columnImages) {\n foreach ($columnImages as $columnImageKey => $columnImage) {\n if (!isset($uploadedImages[$columnImage])) {\n $uploadedFile = $this->uploadMediaFiles($columnImage);\n $uploadedFile = $uploadedFile ?: $this->getSystemFile($columnImage);\n if ($uploadedFile) {\n $uploadedImages[$columnImage] = $uploadedFile;\n } else {\n $this->addRowError(\n ValidatorInterface::ERROR_MEDIA_URL_NOT_ACCESSIBLE,\n $rowNum,\n null,\n null,\n ProcessingError::ERROR_LEVEL_NOT_CRITICAL\n );\n }\n } else {\n $uploadedFile = $uploadedImages[$columnImage];\n }\n\n if ($uploadedFile && $column !== self::COL_MEDIA_IMAGE) {\n $rowData[$column] = $uploadedFile;\n }\n\n if ($uploadedFile && !isset($mediaGallery[$storeId][$rowSku][$uploadedFile])) {\n if (isset($existingImages[$rowSku][$uploadedFile])) {\n $currentFileData = $existingImages[$rowSku][$uploadedFile];\n if (isset($rowLabels[$column][$columnImageKey])\n && $rowLabels[$column][$columnImageKey] !=\n $currentFileData['label']\n ) {\n $labelsForUpdate[] = [\n 'label' => $rowLabels[$column][$columnImageKey],\n 'imageData' => $currentFileData\n ];\n }\n\n if (array_key_exists($uploadedFile, $imageHiddenStates)\n && $currentFileData['disabled'] != $imageHiddenStates[$uploadedFile]\n ) {\n $imagesForChangeVisibility[] = [\n 'disabled' => $imageHiddenStates[$uploadedFile],\n 'imageData' => $currentFileData\n ];\n }\n } else {\n if ($column == self::COL_MEDIA_IMAGE) {\n $rowData[$column][] = $uploadedFile;\n }\n $mediaGallery[$storeId][$rowSku][$uploadedFile] = [\n 'attribute_id' => $this->getMediaGalleryAttributeId(),\n 'label' => isset($rowLabels[$column][$columnImageKey])\n ? $rowLabels[$column][$columnImageKey]\n : '',\n 'position' => ++$position,\n 'disabled' => isset($imageHiddenStates[$columnImage])\n ? $imageHiddenStates[$columnImage] : '0',\n 'value' => $uploadedFile,\n ];\n }\n }\n }\n }\n\n // 6. Attributes phase\n $rowStore = (self::SCOPE_STORE == $rowScope)\n ? $this->storeResolver->getStoreCodeToId($rowData[self::COL_STORE])\n : 0;\n $productType = isset($rowData[self::COL_TYPE]) ? $rowData[self::COL_TYPE] : null;\n if ($productType !== null) {\n $previousType = $productType;\n }\n if (isset($rowData[self::COL_ATTR_SET])) {\n $prevAttributeSet = $rowData[self::COL_ATTR_SET];\n }\n if (self::SCOPE_NULL == $rowScope) {\n // for multiselect attributes only\n if ($prevAttributeSet !== null) {\n $rowData[self::COL_ATTR_SET] = $prevAttributeSet;\n }\n if ($productType === null && $previousType !== null) {\n $productType = $previousType;\n }\n if ($productType === null) {\n continue;\n }\n }\n\n $productTypeModel = $this->_productTypeModels[$productType];\n if (!empty($rowData['tax_class_name'])) {\n $rowData['tax_class_id'] =\n $this->taxClassProcessor->upsertTaxClass($rowData['tax_class_name'], $productTypeModel);\n }\n\n if ($this->getBehavior() == Import::BEHAVIOR_APPEND ||\n empty($rowData[self::COL_SKU])\n ) {\n $rowData = $productTypeModel->clearEmptyData($rowData);\n }\n\n $rowData = $productTypeModel->prepareAttributesWithDefaultValueForSave(\n $rowData,\n !$this->isSkuExist($rowSku)\n );\n $product = $this->_proxyProdFactory->create(['data' => $rowData]);\n\n foreach ($rowData as $attrCode => $attrValue) {\n $attribute = $this->retrieveAttributeByCode($attrCode);\n\n if ('multiselect' != $attribute->getFrontendInput() && self::SCOPE_NULL == $rowScope) {\n // skip attribute processing for SCOPE_NULL rows\n continue;\n }\n $attrId = $attribute->getId();\n $backModel = $attribute->getBackendModel();\n $attrTable = $attribute->getBackend()->getTable();\n $storeIds = [0];\n\n if ('datetime' == $attribute->getBackendType()\n && (\n in_array($attribute->getAttributeCode(), $this->dateAttrCodes)\n || $attribute->getIsUserDefined()\n )\n ) {\n $attrValue = $this->dateTime->formatDate($attrValue, false);\n } elseif ('datetime' == $attribute->getBackendType() && strtotime($attrValue)) {\n $attrValue = gmdate(\n 'Y-m-d H:i:s',\n $this->_localeDate->date($attrValue)->getTimestamp()\n );\n } elseif ($backModel) {\n $attribute->getBackend()->beforeSave($product);\n $attrValue = $product->getData($attribute->getAttributeCode());\n }\n if (self::SCOPE_STORE == $rowScope) {\n if (self::SCOPE_WEBSITE == $attribute->getIsGlobal()) {\n // check website defaults already set\n if (!isset($attributes[$attrTable][$rowSku][$attrId][$rowStore])) {\n $storeIds = $this->storeResolver->getStoreIdToWebsiteStoreIds($rowStore);\n }\n } elseif (self::SCOPE_STORE == $attribute->getIsGlobal()) {\n $storeIds = [$rowStore];\n }\n if (!$this->isSkuExist($rowSku)) {\n $storeIds[] = 0;\n }\n }\n foreach ($storeIds as $storeId) {\n if (!isset($attributes[$attrTable][$rowSku][$attrId][$storeId])) {\n $attributes[$attrTable][$rowSku][$attrId][$storeId] = $attrValue;\n }\n }\n // restore 'backend_model' to avoid 'default' setting\n $attribute->setBackendModel($backModel);\n }\n }\n\n foreach ($bunch as $rowNum => $rowData) {\n if ($this->getErrorAggregator()->isRowInvalid($rowNum)) {\n unset($bunch[$rowNum]);\n }\n }\n\n $this->saveProductEntity(\n $entityRowsIn,\n $entityRowsUp\n )->_saveProductWebsites(\n $this->websitesCache\n )->_saveProductCategories(\n $this->categoriesCache\n )->_saveProductTierPrices(\n $tierPrices\n )->_saveMediaGallery(\n $mediaGallery\n )->_saveProductAttributes(\n $attributes\n )->updateMediaGalleryVisibility(\n $imagesForChangeVisibility\n )->updateMediaGalleryLabels(\n $labelsForUpdate\n );\n\n $this->_eventManager->dispatch(\n 'catalog_product_import_bunch_save_after',\n ['adapter' => $this, 'bunch' => $bunch]\n );\n }\n\n return $this;\n }", "public function process_file_prices() {\n\t\tini_set('memory_limit', \"1048M\");\n\t\t// load config\n\t\t$this->load->config('retailer_file');\n\t\t$cfg = $this->config->item('retailer_file');\n\n\t\t$config = $cfg['inventory_prices'];\n\t\t$useFirstSheet = TRUE;\n\n\t\t// Get all rows into array\n\t\t$this->fileoperations->set_upload_lib_config_value(\"allowed_types\", 'xls|xlsx|csv');\n\t\t$this->fileoperations->add_folder_to_uploads_dir('storeinventory');\n\t\t$uploadResult = $this->fileoperations->upload('import_file', TRUE, './web');\n\n\t\t$fileInfo = $this->fileoperations->file_info;\n\t\trequire_once('./lib/phpExcel/PHPExcel.php');\n\t\trequire_once('./lib/phpExcel/PHPExcel/IOFactory.php');\n\n\t\t$xls = @PHPExcel_IOFactory::load($fileInfo['file_path'] . $fileInfo['file_name']);\n\n\t\t$result = array();\n\t\tforeach ($xls->getWorksheetIterator() as $worksheet) {\n\t\t\t$title = $worksheet->getTitle();\n\t\t\tif ($useFirstSheet) {\n\t\t\t\t$title = 'first|sheet';\n\t\t\t\t$useFirstSheet = FALSE;\n\t\t\t}\n\n\t\t\tif (!isset($config['worksheets'][$title])) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\t$worksheetConfig = $config['worksheets'][$title];\n\t\t\t\t$lastAlpha = array_merge($worksheetConfig['price_columns'],array_merge($worksheetConfig['cost_price_columns']), array_keys($worksheetConfig['identify_columns']));\n\t\t\t\tasort($lastAlpha);\n\t\t\t\t$lastAlpha = array_pop($lastAlpha);\n\t\t\t}\n\n\t\t\tforeach ($worksheet->getRowIterator() as $row) {\n\t\t\t\t$rowIndex = $row->getRowIndex();\n\t\t\t\t$cellIterator = $row->getCellIterator();\n\t\t\t\t$cellIterator->setIterateOnlyExistingCells(TRUE); // Loop all cells, even if it is not set\n\n\t\t\t\t$key = array();\n\t\t\t\t// Product price\n\t\t\t\t$price = null;\n\t\t\t\t// Product cost price\n\t\t\t\t$costPrice = null;\n\t\t\t\tforeach ($cellIterator as $cell) {\n\t\t\t\t\tif (!is_null($cell)) {\n\t\t\t\t\t\t$column = $cell->getColumn();\n\t\t\t\t\t\tif ($column > $lastAlpha) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isset($worksheetConfig['identify_columns'][$column])) {\n\t\t\t\t\t\t\t$key[$worksheetConfig['identify_columns'][$column]] = $cell->getValue();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Get product price\n\t\t\t\t\t\tif (in_array($column, $worksheetConfig['price_columns'])) {\n\t\t\t\t\t\t\t$p = $cell->getValue();\n\t\t\t\t\t\t\tif ($p !== '') {\n\t\t\t\t\t\t\t\tif (is_float($p)) {\n\t\t\t\t\t\t\t\t\t$p = (int)$p;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$price += $p;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Get cost price\n\t\t\t\t\t\tif (in_array($column, $worksheetConfig['cost_price_columns'])) {\n\t\t\t\t\t\t\t$c = $cell->getValue();\n\t\t\t\t\t\t\tif ($c !== '') {\n\t\t\t\t\t\t\t\tif (is_float($c)) {\n\t\t\t\t\t\t\t\t\t$c = (int)$c;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$costPrice += $c;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!empty($key)) {\n\t\t\t\t\t$key = json_encode($key);\n\t\t\t\t\tif (!empty($price) && $price !== null) {\n\t\t\t\t\t\t$result[$key]['price'] = $price;\n\t\t\t\t\t}\n\t\t\t\t\tif (!empty($costPrice) && $costPrice !== null) {\n\t\t\t\t\t\t$result[$key]['cost_price'] = $costPrice;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$processedCount = 0;\n\t\tforeach ($result as $k => $v) {\n\t\t\t$k = json_decode($k, true);\n\t\t\tforeach ($k as $kk => $vv) {\n\t\t\t\t$k[$kk] = trim($vv);\n\t\t\t\t$k[$kk] = ltrim($vv, 0);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t$productGroup = ManagerHolder::get('ParameterGroup')->getOneWhere($k, 'id,product_id,bar_code');\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$productGroup = array();\n\t\t\t}\n\n\t\t\t$entity = array();\n if ($productGroup) {\n\t $entity['product_group_id'] = $productGroup['id'];\n\t $entity['product_id'] = $productGroup['product_id'];\n\t $entity['bar_code'] = $productGroup['bar_code'];\n } else {\n\t $product = ManagerHolder::get('Product')->getOneWhere($k, 'id,bar_code,product_code');\n\t if ($product) {\n\t\t $entity['product_id'] = $product['id'];\n\t\t $entity['bar_code'] = $product['bar_code'];\n\t\t $entity['product_code'] = $product['product_code'];\n\t } else {\n\t\t continue;\n\t }\n }\n\t\t\tif (isset($v['price'])) {\n\t\t\t\tif (isset($entity['product_group_id'])) {\n\t\t\t\t\tManagerHolder::get('ParameterGroup')->updateById($entity['product_group_id'], 'price', $v['price']);\n\t\t\t\t}\n\t\t\t\tManagerHolder::get('Product')->updateById($entity['product_id'], 'price', $v['price']);\n\t\t\t}\n\t\t\tif (isset($v['cost_price'])) {\n\t\t\t\tManagerHolder::get('Product')->updateById($entity['product_id'], 'cost_price', $v['cost_price']);\n\t\t\t}\n\t\t\t$processedCount++;\n\t\t}\n\n\t\tManagerHolder::get('StoreInventory')->updateProductStatuses();\n\n\t\tif ($processedCount > 0) {\n\t\t\tset_flash_notice('Файл успешно обработан. Обновленно остатков: ' . $processedCount);\n\t\t} else {\n\t\t\tset_flash_error('Обновленно ' . $processedCount . ' остатков');\n\t\t}\n\n\t\t$this->redirectToReffer();\n\n\t}", "private function load_stores($var_db)\r\n\t{\r\n\t\t$this->stores = array();\r\n\t\t$sql = (\"SELECT \r\n\t\t\t\t\tstores.id\r\n\t\t\t\tFROM \r\n\t\t\t\t\tstores \r\n\t\t\t\tINNER JOIN stores_modules\r\n\t\t\t\t\tON stores_modules.fk_stores = stores.id\r\n\t\t\t\t\tAND stores_modules.enabled = 1\r\n\t\t\t\tINNER JOIN stores_modules_menus\r\n\t\t\t\t\tON stores_modules_menus.fk_stores_modules = stores_modules.id\r\n\t\t\t\t\tAND stores_modules_menus.enabled = 1\r\n\t\t\t\tINNER JOIN users_menus_permissions\r\n\t\t\t\t\tON users_menus_permissions.fk_stores_modules_menus = stores_modules_menus.id\r\n\t\t\t\t\tAND users_menus_permissions.fk_users = \" . addslashes ( $this->user ) . \" \r\n\t\t\t\t\tAND users_menus_permissions.read = 1\r\n\t\t\t\tWHERE \r\n\t\t\t\t\tstores.enabled = 1\r\n\t\t\t\tGROUP BY stores.id\");\r\n\t\t$rs = $var_db->execute ( $sql );\r\n\t\t\r\n\t\twhile($row = $var_db->get_row ( $rs )) {\r\n\t\t\t$store = new store($row->id);\r\n\t\t\t$store->load_for_user($var_db, $this->user);\r\n\t\t\t$this->stores[] = $store;\r\n\t\t}\r\n\r\n\t\treturn (true);\r\n\t}", "public function testProductGetPrices()\n {\n $product = $this->find('product', 1);\n $prices = $product->getPrices();\n $price = $prices[0];\n \n $currencies = $this->findAll('currency');\n $dollarCurrency = $currencies[0];\n \n $money = Money::create(10, $dollarCurrency); \n \n $this->assertEquals(\n $money,\n $price\n );\n }", "protected function doLoadMultiple(array $ids = NULL)\n {\n // TODO: Implement doLoadMultiple() method.\n }", "private function loadProducts($manager)\n {\n $brands = $this->brandRepository->findAll();\n\n for ($i = 0; $i < 25; $i++) {\n $product = new Product();\n $product->setName($this->faker->sentence(2,true))\n ->setCreationDate($this->faker->dateTime('now', null))\n ->setPrice($this->faker->randomFloat(2, 0, 999999))\n ->setDescription($this->faker->sentence(10, true))\n ->setSlug($this->slugify->slugify($product->getName()))\n ->setBrand($brands[rand(0, sizeof($brands) - 1)]);\n\n $manager->persist($product);\n }\n \n $manager->flush();\n }", "function getItemFromProducts($id) {\n\t\t$saleData = array();\n\t\t\t\tif($stmt = $this->connection->prepare(\"select * from products WHERE id = \" . $id . \";\")) {\n\t\t\t\t\t\t$stmt -> execute();\n\n\t\t\t\t\t\t$stmt->store_result();\n\t\t\t\t\t\t$stmt->bind_result($id, $itemName, $itemImage, $itemDesc, $salePrice, $regularPrice, $numberLeft);\n\n\t\t\t\t\t\tif($stmt ->num_rows >0){\n\t\t\t\t\t\t\twhile($stmt->fetch() ){\n\t\t\t\t\t\t\t\t$saleData[] = array(\n\t\t\t\t\t\t\t\t\t'id' =>$id,\n\t\t\t\t\t\t\t\t\t'itemName' => $itemName,\n\t\t\t\t\t\t\t\t\t'itemImage' => $itemImage,\n\t\t\t\t\t\t\t\t\t'itemDesc' => $itemDesc,\n\t\t\t\t\t\t\t\t\t'salePrice' => $salePrice,\n\t\t\t\t\t\t\t\t\t'regularPrice' => $regularPrice,\n\t\t\t\t\t\t\t\t\t'numberLeft' => $numberLeft\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $saleData;\n\t}", "public function process_mkarapuz_price_file() {\n $xml = file_get_contents('http://www.mkarapuz.com.ua/price/mamaclub.xml');\n $xml = $movies = new SimpleXMLElement($xml);\n $storeId = 131;\n\n foreach ($xml->item as $item) {\n $barCode = (string)$item->EAN[0];\n\n $parameterGroup = ManagerHolder::get('ParameterGroup')->getOneWhere(array('bar_code' => $barCode), 'e.*, product.*');\n if (empty($parameterGroup)) {\n $product = ManagerHolder::get('Product')->getOneWhere(array('bar_code' => $barCode), 'e.*');\n } else {\n $product = $parameterGroup['product'];\n }\n\n if (empty($product)) {\n continue;\n }\n\n $where = array('product_id' => $product['id'], 'bar_code' => $barCode, 'store_id' => $storeId);\n $exists = ManagerHolder::get('StoreInventory')->existsWhere($where);\n $entity = array();\n $entity['qty'] = (int)$item->qty[0];\n\n if (!empty($parameterGroup)) {\n $entity['product_group_id'] = $parameterGroup['id'];\n }\n\n $entity['update_by_admin_id'] = '';\n $entity['update_source'] = 'web';\n $entity['updated_at'] = date(DOCTRINE_DATE_FORMAT);\n\n if ($exists) {\n ManagerHolder::get('StoreInventory')->updateAllWhere($where, $entity);\n } else {\n $entity = array_merge($entity, $where);\n ManagerHolder::get('StoreInventory')->insert($entity);\n }\n\n $productUpdate = array();\n $productUpdate['price'] = $item->rrc;\n $productUpdate['cost_price'] = $item->price;\n ManagerHolder::get('Product')->updateAllWhere(array('id' => $product['id']), $productUpdate);\n }\n }", "function getProducts($name, $categoryID, $salePriceMin, $salePriceMax, $basePriceMin, $basePriceMax)\n{\n global $conn;\n \n $sql = \"SELECT * FROM product WHERE 1=1 \";\n \n if (!empty($name))\n {\n $sql .= \" AND Name LIKE :productName\";\n $namedParameters[\":productName\"] = \"%\" . $name . \"%\";\n }\n \n if (!empty($categoryID))\n {\n $sql .= \" AND CategoryId = :categoryId\";\n $namedParameters[\":categoryId\"] = $categoryID;\n }\n \n if (!empty($salePriceMin) AND !empty($salePriceMax))\n {\n $sql .= \" AND SalePrice >= :salePriceMin AND SalePrice <= :salePriceMax \";\n $namedParameters[\":salePriceMin\"] = $salePriceMin;\n $namedParameters[\":salePriceMax\"] = $salePriceMax;\n }\n \n if (!empty($basePriceMin) AND !empty($basePriceMax))\n {\n $sql .= \" AND BasePrice >= :basePriceMin AND BasePrice <= :basePriceMax\";\n $namedParameters[\":basePriceMin\"] = $basePriceMin;\n $namedParameters[\":basePriceMax\"] = $basePriceMax;\n }\n \n $sql .= \" ORDER BY Name\";\n \n $stmt = $conn->prepare($sql);\n $stmt->execute($namedParameters);\n $records = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n return $records;\n}", "public function products($params)\r\n {\r\n \t$_query = array('page' => isset($params['page']) ? $params['page'] : 1);\r\n\r\n return $this->curl_execute($method = 'products', $_query);\r\n }", "private function parseProducts($xml){\n $catalogue = $xml->shop->offers;\n $productData = array();\n foreach ($catalogue as $offers) {\n foreach ($offers as $product) {\n foreach ($product->attributes() as $key => $value) {\n if ($key == 'id') $productData['id_prom'] = $value;\n }\n $productData['model'] = $product->vendorCode;\n $productData['id_group_prom'] = $product->categoryId;\n $this->addProduct($productData);\n }\n }\n }", "public function publishAbstractPriceProductPriceList(array $priceProductPriceListIds): void;", "protected function load_data_store() {\n\t\t$this->data_store = new WC_CS_Credits_Data_Store_CPT() ;\n\t}", "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 }", "private function getPrices () {\n\t\tlibxml_use_internal_errors(true);\n\t\n\t\t$dom = new DOMDocument();\n\n\t\t@$dom->loadHTML( $this->result );\n\t\t$xpath = new DOMXPath( $dom );\n\t\t\n\t\t$this->prices[] = array(\n\t\t\t'station.from' => $this->getPostField('from.searchTerm'),\n\t\t\t'station.to' => $this->getPostField('to.searchTerm'),\n\t\t\t'station.prices' => $xpath->query($this->config['lookupString'])\n\t\t);\n\t}", "protected function copyToStores($data, $productId)\n {\n return;\n }", "public function getStores($data = array()) {\n\t\t$sql = \"SELECT id,name,db_name,db_username,db_password,db_hostname FROM stores\";\n\n\t\t$sort_data = array(\n\t\t\t'name',\n\t\t);\n\n\t\tif (isset($data['sort']) && in_array($data['sort'], $sort_data)) {\n\t\t\t$sql .= \" ORDER BY \" . $data['sort'];\n\t\t} else {\n\t\t\t$sql .= \" ORDER BY name\";\n\t\t}\n\n\t\tif (isset($data['order']) && ($data['order'] == 'DESC')) {\n\t\t\t$sql .= \" DESC\";\n\t\t} else {\n\t\t\t$sql .= \" ASC\";\n\t\t}\n\n\t\tif (isset($data['start']) || isset($data['limit'])) {\n\t\t\tif ($data['start'] < 0) {\n\t\t\t\t$data['start'] = 0;\n\t\t\t}\n\n\t\t\tif ($data['limit'] < 1) {\n\t\t\t\t$data['limit'] = 20;\n\t\t\t}\n\n\t\t\t$sql .= \" LIMIT \" . (int)$data['start'] . \",\" . (int)$data['limit'];\n\t\t}\n\n\t\t$query = $this->db->query($sql);\n\n\t\treturn $query->rows;\n\t}", "protected function _rebuildStoreIndex($storeId, $productIds = null)\n {\n // prepare searchable attributes\n $staticFields = array();\n foreach ($this->_getSearchableAttributes('static') as $attribute) {\n $staticFields[] = $attribute->getAttributeCode();\n }\n $dynamicFields = array(\n 'int' => array_keys($this->_getSearchableAttributes('int')),\n 'varchar' => array_keys($this->_getSearchableAttributes('varchar')),\n 'text' => array_keys($this->_getSearchableAttributes('text')),\n 'decimal' => array_keys($this->_getSearchableAttributes('decimal')),\n 'datetime' => array_keys($this->_getSearchableAttributes('datetime')),\n );\n\n $lastProductId = 0;\n while (true) {\n $products = $this->_getSearchableProducts($storeId, $staticFields, $productIds, $lastProductId);\n if (!$products) {\n break;\n }\n\n $productAttributes = array();\n $productRelations = array();\n foreach ($products as $productData) {\n $lastProductId = $productData['entity_id'];\n $productAttributes[$productData['entity_id']] = $productData['entity_id'];\n $productChildren = $this->_getProductChildIds($productData['entity_id'], $productData['type_id']);\n $productRelations[$productData['entity_id']] = $productChildren;\n if ($productChildren) {\n foreach ($productChildren as $productChildId) {\n $productAttributes[$productChildId] = $productChildId;\n }\n }\n }\n\n $productIndexes = array();\n $productAttributes = $this->_getProductAttributes($storeId, $productAttributes, $dynamicFields);\n foreach ($products as $productData) {\n if (!isset($productAttributes[$productData['entity_id']])) {\n continue;\n }\n\n $productAttr = $productAttributes[$productData['entity_id']];\n $hasParent = true;\n\n // determine has parent status and product id to process\n if (false == ($productId = $this->_getParentProduct($productRelations, $productData['entity_id']))) {\n $productId = $productData['entity_id'];\n $hasParent = false;\n }\n\n // only clean index, if (parent) product is visible and enabled\n if (\n !$this->_isProductVisible($productId, $productAttributes) ||\n !$this->_isProductEnabled($productId, $productAttributes)\n ) {\n $this->cleanIndex($storeId, $productIds);\n continue;\n }\n\n // only process products, which are parent products\n if (false !== $hasParent) {\n continue;\n }\n\n $productIndex = array(\n $productData['entity_id'] => $productAttr\n );\n\n if ($productChildren = $productRelations[$productData['entity_id']]) {\n foreach ($productChildren as $productChildId) {\n if (isset($productAttributes[$productChildId])) {\n $productIndex[$productChildId] = $productAttributes[$productChildId];\n }\n }\n }\n $index = $this->_prepareProductIndex($productIndex, $productData, $storeId);\n\n $productIndexes[$productData['entity_id']] = $index;\n }\n\n $this->_saveProductIndexes($storeId, $productIndexes);\n\n // cleanup\n self::$dateTimeAttributeValues = array();\n }\n\n $this->resetSearchResults();\n\n if (Mage::helper('aoe_searchperience')->isLoggingEnabled()) {\n Mage::log('statistics: ' . var_export(Aoe_Searchperience_Model_Client_Searchperience::$statistics, true));\n }\n\n return $this;\n }", "public function getAllProducts( $params = [] )\n {\n if(!config(\"constant.getDataFromApis\")){\n return $this->starrtecUnifiedPosHandler->getCategoryProducts( $params );\n }else{\n return $this->starrtecPosApiHandler->getCategoryProducts( $params );\n }//..... end if-else() .....//\n }", "protected function load_data_store() {\n\t\t$this->data_store = new WC_CS_Admin_Funds_Transaction_Data_Store_CPT() ;\n\t}", "public function fetchProductFromShopware()\n {\n $config = Config::first();\n\n // Setting offset and limit\n $offset = 0;\n $limit = 5;\n $productLog = ProductLog::first();\n if ($productLog) {\n $offset = $productLog->total_product_api_call;\n }\n\n // Get Products from Shopware API\n $response = Http::withDigestAuth($config->user_name, $config->api_key)->get($config->shop_url . '/api/articles', [\n 'limit' => $limit,\n 'start' => $offset\n ]);\n\n // Get json from API response\n $products = $response->json()['data'];\n if (count($products) > 0) {\n\n // Count number of entries\n $productCounter = 0;\n // Count number of loop\n $counter = 0;\n foreach ($products as $product) {\n // Get Product Detail from Shopware API\n $response = Http::withDigestAuth($config->user_name, $config->api_key)->get($config->shop_url . '/api/articles/' . $product['id']);\n if ($response->status() === 200) {\n\n // Select data index from API response\n $product_detail = $response->json()['data'];\n\n $categoryOne = $this->categoryURLToArray(strtolower($config->category_url_1));\n $categoryTwo = $this->categoryURLToArray(strtolower($config->category_url_2));\n\n if (in_array(strtolower($product_detail['propertyGroup']['name']), $categoryOne) ||\n $this->checkCategories($product_detail['categories'], $categoryTwo)) {\n\n $productModle = new Product;\n $productModle->product_id = $product_detail['id'];\n $productModle->detail_id = $product_detail['mainDetailId'];\n $productModle->name = $product_detail['name'];\n $productModle->description_long = $product_detail['descriptionLong'];\n $productModle->active = $product_detail['active'];\n $productModle->order_number = $product_detail['mainDetail']['number'];\n $productModle->in_Stock = $product_detail['mainDetail']['inStock'];\n $productModle->stock_min = $product_detail['mainDetail']['stockMin'];\n $productModle->shipping_free = $product_detail['mainDetail']['shippingFree'];\n $productModle->customer_group_key = $product_detail['mainDetail']['prices'][0]['customerGroupKey'];\n $productModle->tax_percent = $product_detail['tax']['tax'];\n $productModle->price = $this->calculatePrice($product_detail['mainDetail']['prices'][0]['price'], $product_detail['tax']['tax']);\n $productModle->property_group = strtolower($product_detail['propertyGroup']['name']);\n $productModle->category = $this->getCategory($product_detail['categories']);\n $productModle->media = $this->getMedia($product_detail['images'], $config);\n $saved = $productModle->save();\n if ($saved) {\n $productCounter++;\n }\n\n }\n $counter++;\n }\n }\n\n // Check and save numbers of api calls in database\n $productLog = $productLog ? $productLog : new ProductLog;\n $productLog->total_product_api_call = ($offset + $counter);\n $productLog->save();\n\n return [\n 'message' => [\n \"totalProductAddedInDatabase\" => $productCounter\n ],\n \"Status\" => 200\n ];\n }\n // This will run when no response come from API\n return [\n 'message' => [\n \"noNewProductFound\" => '0 Product add in database',\n ],\n \"Status\" => 204\n ];\n }", "public function getProducts($nodes)\n {\n $data = [];\n\n foreach ($nodes->shop->offers->offer as $node) {\n\n $images = [];\n $attributes = [];\n $descriptions = [];\n\n $name = (string)$node->name;\n\n if (isset($node->vendor)) {\n $name .= '. ' . (string)$node->vendor;\n }\n if (isset($node->author)) {\n $name .= '. ' . (string)$node->author;\n }\n\n if (isset($node->picture)) {\n foreach ($node->picture as $picture) {\n $images[] = [\n 'fullsize' => (string)$picture,\n 'thumb' => '',\n ];\n }\n }\n\n if (isset($node->param)) {\n foreach ($node->param as $param) {\n $attributes[] = [\n 'title' => (string)$param['name'],\n 'value' => (string)$param . (string)$param['unit'],\n ];\n }\n }\n\n if (isset($node->description)) {\n foreach ($node->description as $desc) {\n $descriptions[] = [\n 'title' => '',\n 'text' => (string)$desc,\n ];\n }\n }\n\n // if ($href) {\n $data[] = [\n 'name' => $name,\n 'price' => (string)$node->price,\n 'href' => explode('/?', (string)$node->url)[0],\n 'descriptions' => $descriptions,\n 'attributes' => $attributes,\n 'images' => $images,\n ];\n // }\n\n unset($images, $attributes, $descriptions, $name);\n }\n\n return $data;\n }", "private function product_batch()\n\t{\n\t\t// add call to trigger datagrab here\n\t\t//file_get_contents(ee()->config->item('base_url') . '?ACT=25&id=9');\n\n\t\tee()->sync_db = ee()->load->database('sync_db', true);\n\t\t$update_count = ee()->sync_db->count_all_results('products');\n\n\t\tif($update_count > 0)\n\t\t{\t\n\t\t\t// create curl resource \n\t $ch = curl_init(); \n\n\t // set url \n\t curl_setopt($ch, CURLOPT_URL, ee()->config->item('base_url') . '?ACT=25&id=' . ee()->config->item('integration_product_import_id')); \n\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0); \n\t curl_setopt($ch, CURLOPT_TIMEOUT, 300); \n\t curl_exec($ch); \n\t curl_close($ch);\n \t}\n\t}" ]
[ "0.6377902", "0.6286178", "0.6254009", "0.5885216", "0.5794441", "0.57587296", "0.5700745", "0.56779045", "0.56328", "0.5610376", "0.5544135", "0.5502267", "0.5482036", "0.53766614", "0.53558075", "0.534285", "0.53397644", "0.5302919", "0.52895576", "0.5261725", "0.5240733", "0.5231308", "0.5203515", "0.52025825", "0.51845646", "0.51571244", "0.51531345", "0.5127126", "0.50836325", "0.50821674", "0.50805867", "0.50777984", "0.5073235", "0.50645584", "0.50621396", "0.50574535", "0.5016364", "0.5013377", "0.5003579", "0.49998823", "0.49949935", "0.49944684", "0.4992604", "0.49890476", "0.49748182", "0.4965363", "0.4962708", "0.49581027", "0.49404842", "0.49343365", "0.49243566", "0.49198386", "0.49094632", "0.49087358", "0.4905563", "0.49018458", "0.48970374", "0.48945907", "0.489442", "0.48871812", "0.4883937", "0.48810336", "0.4879018", "0.48783565", "0.48743376", "0.48708472", "0.48589945", "0.4858824", "0.48584622", "0.4856967", "0.48551333", "0.48416808", "0.4834498", "0.483129", "0.48311412", "0.48298082", "0.48269972", "0.48258716", "0.48229888", "0.4822257", "0.48138663", "0.48098868", "0.4808245", "0.4799078", "0.47978932", "0.47921243", "0.47909698", "0.47838363", "0.47675157", "0.4760203", "0.47559515", "0.47530496", "0.47486258", "0.47437263", "0.473397", "0.47283018", "0.472138", "0.47203234", "0.47197083", "0.4713659" ]
0.71015054
0
Gets query for [[Reservations]].
public function getReservations() { return $this->hasMany(Reservation::className(), ['service_id' => 'id']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getReservations(array $query = []): Response\n {\n return $this->get('reservations', $query);\n }", "public function reservations() {\n return $this->hasMany('App\\Reservation')->getResults();\n }", "public function reservations()\n {\n return $this->hasMany(Reservation::class);\n }", "public function reservationsList(Request $request)\n {\n $id = $request->get('id');\n $search = $request->get('search');\n\n $placeReservations = $this->repository->scopeQuery(function ($query) use ($id) {\n return $query->where(['place_id' => $id, 'is_pre_reservation' => false])->orderBy('date', 'ASC');\n })->with('client')->whereHas('client', function($q) use ($search){\n $q->where('name', 'LIKE', '%'.$search.'%');\n $q->orWhere('last_name', 'LIKE', '%'.$search.'%');\n })->paginate(10);\n\n if (request()->wantsJson()) {\n\n return response()->json($placeReservations);\n }\n }", "public function reservations()\n {\n return $this->hasManyThrough(Reservation::class, Operator::class);\n }", "public function reservations()\n {\n\n return $this->hasMany('App\\Models\\reservation');\n }", "public function getReserv()\r\n {\r\n $query = \"SELECT * FROM list_reservation\";\r\n $stmt = $this->connexion()->prepare($query);\r\n $stmt->execute();\r\n\r\n while ($result = $stmt->fetchAll()) {\r\n return $result;\r\n }\r\n }", "public function reservations()\n {\n return $this->hasMany('App\\Reservation', 'restaurant_id');\n }", "public function getReservations(): string\n {\n $html = '\n <table>\n <thead>\n <tr>\n <th>ID</th>\n <th>Nom</th>\n <th>Annonce</th>\n <th>Date de réservations</th>\n </tr>\n </thead>\n <tbody>';\n\n // Get all Reservations :\n $reservationsService = new ReservationsService();\n $reservations = $reservationsService->getReservations();\n\n // Get html :\n foreach ($reservations as $reservation) {\n $usersHtml = '';\n if (!empty($reservation->getUser())) {\n $usersHtml .= 'Réservé par ';\n foreach ($reservation->getUser() as $user) {\n $usersHtml .= $user->getFirstname() . ' ' . $user->getLastname() . ' ';\n }\n }\n $annoncesHtml = '';\n if (!empty($reservation->getAnnonce())) {\n foreach ($reservation->getAnnonce() as $annonce) {\n $annoncesHtml .= $annonce->getLieuDepart() . ' ==> ' . $annonce->getLieuArrivee() . ' '. $annonce->getDateDepart()->format('H:i d-m-Y'). ' ';\n }\n }\n $html .=\n '<tr>\n <td> #'.$reservation->getId() . ' </td>' .\n '<td> '.$usersHtml . ' </td>' .\n '<td> '.$annoncesHtml . ' </td>' .\n '<td> '.$reservation->getDateReservation()->format('H:i d-m-Y') . '</td>\n </tr>';\n }\n $html .='</tbody>\n </table>';\n\n return $html;\n }", "public function index()\n {\n return Reservation::all();\n }", "public function getreservationsraw() {\n return $this->data;\n }", "public function reservationsArray(){\n\t\t$reponse = new Reponse();\n\t\t$date=new Zend_Date();\n\t\t$dateres=$date->get('dd-MM-YYYY');\n\t\t$datestart=new Zend_Date( $dateres.' 00:00:00', 'dd-MM-YYYY HH:mm:ss');\n\t\t$dateend=new Zend_Date( $dateres.' 23:59:59', 'dd-MM-YYYY HH:mm:ss');\n\t\t$start=$datestart->getTimestamp();\n\t\t$end=$dateend->getTimestamp();\n\n\t\t$mylocation = $this->selectedLocation;\n\t\tif( $mylocation instanceof Object_Location ){\n\t\t\t$this->view->reservations= $mylocation->getResource()->getReservationsByDate($start,$end);\n\t\t}\n\t}", "public function selectReservations() {\n $tab=[];\n $pdo=$this->connect_db('boutique');\n $reqlogin = $pdo->prepare(\"SELECT r.id, r.id_utilisateur, r.titrereservation, r.typeevenement, r.datedebut, r.heuredebut FROM reservation AS r INNER JOIN utilisateurs AS u ON r.id_utilisateur = u.id\");\n $reqlogin->execute($tab);\n $result=$reqlogin->fetchAll();\n return $result;\n }", "public function index()\n {\n $reservation = Reservation::all();\n return $reservation;\n }", "static public function getAllReservations() {\n\t\ttry {\n\t\t\t$rep = Model::$pdo->query('SELECT * FROM reservation WHERE idFestival =' . $_SESSION[\"idFestival\"]);\n\t\t\t$rep->setFetchMode(PDO::FETCH_CLASS, 'ModelReservation');\n\t\t\t$tab_prod = $rep->fetchAll();\n\t\t\treturn $tab_prod;\n\t\t} catch (PDOException $e) {\n\t\t\techo('Error tout casse ( /!\\ method getAllReservations() /!\\ )');\n\t\t}\n\t}", "public function actionReservationIndex()\n {\n $searchModel = new ServicesReservationSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('reservationindex', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n //\n $json = \\App\\Reservation::all();\n return $json;\n }", "public function getReservas()\n {\n return $this->hasMany(Reserva::className(), ['id_cliente' => 'id_cliente']);\n }", "public function listMyReservations()\n {\n $clubs = Club::all();\n $reservations = Reservation::all();\n\n return view('client/listmyreservations', ['reservations' => $reservations], ['clubs' => $clubs]);\n }", "public function reservations() {\n $this->template->content = View::instance(\"v_reservations_reservations\");\n $this->template->title = \"Reservations\";\n\n # Build the query to get all the users\n // $q = \"SELECT * FROM reservations\";\n\n\t $q = \"SELECT *\n FROM reservations\n WHERE user_id = \".$this->user->user_id.\" order by reservation_id desc\";\n\n # Execute the query to get all the users.\n # Store the result array in the variable $users\n $reservations = DB::instance(DB_NAME)->select_rows($q);\n\n # Build the query to figure out what reservations does this user already have?\n # I.e. who are they following\n $q = \"SELECT *\n FROM reservations\n WHERE user_id = \".$this->user->user_id;\n\n\n\n # Pass data (reservations) to the view\n $this->template->content->reservations = $reservations;\n\n\n # Render the view\n echo $this->template;\n }", "public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n\n $placeReservations = $this->repository->scopeQuery(function ($query) {\n return $query->where(['client_id' => \\Auth::guard('client')->user()->id]);\n })->with(['place' => function ($query) {\n $query->select('id', 'name', 'slug');\n }])->paginate(10);\n\n if (request()->wantsJson()) {\n\n return response()->json($placeReservations);\n }\n\n return view('placeReservations.index', compact('placeReservations'));\n }", "public function index()\n {\n return Reservation::with('customer','paypal_payments')->Where('status','Check in')->orWhere('status','Reserved')->get();\n }", "public function getReservas()\n {\n return $this->hasMany(Reserva::class, ['idLibros' => 'idLibros']);\n }", "public function show(Reservation $reservation)\n {\n \n }", "static function getSplitRoomReservationsReport() {\n global $wpdb;\n $resultset = $wpdb->get_results(\n \"SELECT reservation_id, guest_name, checkin_date, checkout_date, data_href, lh_status, \n booking_reference, booking_source, booked_date, eta, viewed_yn, notes, created_date\n FROM wp_lh_rpt_split_rooms\n WHERE job_id IN (SELECT CAST(value AS UNSIGNED) FROM wp_lh_job_param WHERE name = 'allocation_scraper_job_id' AND job_id = (SELECT MAX(job_id) FROM wp_lh_jobs WHERE classname = 'com.macbackpackers.jobs.SplitRoomReservationReportJob' AND status = 'completed'))\n ORDER BY checkin_date\");\n\n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n\n return $resultset;\n }", "public function actionIndex()\n {\n $searchModel = new ReservationDetailSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getReservaciones() {\n $pdo = Database::connect();\n $sql = \"select * from reservacion order by id_reservacion\";\n $resultado = $pdo->query($sql);\n //transformamos los registros en objetos:\n $listadoReserva = array();\n foreach ($resultado as $res) {\n $reservacion = new reservacion($res['nombre_paciente'], $res['id_medico'], $res['id_reservacion'], $res['descripcion'], $res['nota'], $res['fecha_cita'], $res['hora_cita'], $res['fecha_creacion']);\n array_push($listadoReserva, $reservacion);\n }\n Database::disconnect();\n //retornamos el listado resultante:\n return $listadoReserva;\n }", "public function show(Reservation $reservation)\n {\n }", "public function get_reserv_with_user_id($user_id){\n $reservations = Reservation::where('user_id',$user_id)\n ->get();\n return reservationResource::collection($reservations);\n }", "public function index()\n {\n $resultsPerPage = 4;\n\n if (request()->wantsJson()) {\n $reservations = Reservation::with(['status', 'hotel'])\n ->withCount(['clients', 'rooms'])\n ->paginate($resultsPerPage);\n\n $data = $reservations->makeHidden([\n 'reservation_status_id',\n 'created_at',\n 'updated_at',\n 'hotel_id'\n ]);\n $reservations->data = $data;\n\n return response($reservations);\n }\n\n return view('reservations.index');\n }", "public function notSyncedReservations()\n {\n if (request()->wantsJson()) {\n $reservations = Reservation::with(['hotel', 'clients', 'rooms', 'status'])\n ->whereNull('google_event_id')->get();\n\n $payload = $this->prepareGoogleCalendarEventPayload($reservations);\n\n return response($payload);\n }\n }", "public function show(Reservation $reservation)\n {\n //\n }", "public function show(Reservation $reservation)\n {\n //\n }", "public function show(Reservation $reservation)\n {\n //\n }", "public function get_accepted_reserv_with_user_id($user_id){\n $reservations = Reservation::where('status',1)\n ->where('user_id',$user_id)\n ->get();\n return reservationResource::collection($reservations);\n }", "function get_all(){\n $where = \"reservation_status <> 'Pending'\";\n $reservations = where( 'reservations', $where );\n\n echo json_encode( $reservations );\n exit;\n}", "public function reservationsAction($slug)\n {\n $em = $this->get('doctrine.orm.entity_manager');\n $reservationService = $this->container->get('reservation');\n\n $book = $em->getRepository('DropTableLibraryBundle:Book')->findOneBySlug($slug);\n $reservations = $reservationService->getReservationsByBook($book);\n\n return [\n 'reservations' => $reservations,\n ];\n }", "public function index()\n {\n return Reserva::all();\n }", "public function index() {\n $reservations = Reservation::paginate(15);\n return view('reservations.index', compact('reservations'));\n }", "public function test_get_all_reservations()\n {\n $response = $this->get('/api/reservations');\n\n $response->assertStatus(200);\n }", "public static function findReservation($data)\n {\n $response = self::send('reservas/buscar_reservas', [\n 'dato' => $data['numberCodeOrName'],\n 'ubicacion_id' => $data['ubicacion_id'],\n ],1);\n\n return $response;\n }", "public function index()\n {\n $reservations = Reservation::all();\n return view('calendarreservation', compact('reservations'));\n }", "public function getReservation($id_locataire) {\n\n \t$reservation = Reservation::where('id_locataire', $id_locataire)->get();\n\n return $reservation;\n }", "public function indexAction()\n\t{\n\t\t$order_id = session_id();\n\t\t\n\t\t$this->view->headTitle('Reservation');\n\t\t$objReser = new Models_Reservation();\n\t\t\n\t\t$resId = $this->_getParam('rid', false);\n\t\tif (false === $resId) {\n\t\t $this->_redirect('');\n\t\t}\n\t\t\n /**\n * Get restaurant\n */\n $objRes = new Models_Restaurant();\n $res = $objRes->find($resId)->toArray();\n $res = current($res);\n if (false == $res || '0' == $res['reser_onoff']) {\n $this->_redirect('');\n }\n /**\n * Check active restaurant\n */\n $this->_checkReservationOfRestaurant($res);\n// echo '<pre>';print_r($res);die;\n /**\n * All time in a day\n */\n $defaultTimeZone = date_default_timezone_get();\n date_default_timezone_set('UTC');\n $allTimes = array();\n for ($i = 0; $i < 48; $i++) {\n $time = 1800 * $i;\n $allTimes[] = array(\n 'time' => $time,\n 'text' => date('g:i A', $time)\n );\n }\n date_default_timezone_set($defaultTimeZone);\n// echo date('g:i A', 0);die;\n// echo '<pre>';print_r($allTimes);die;\n \n /**\n * Get search condition\n */\n $search = $this->_getParam('search', array(\n 'date' => date('m/d/Y'),\n 'time' => (date('G') * 3600 + (ceil(date('i')/30)) * 1800),\n 'quantity' => 2\n ));\n $search['quantity'] = intval($search['quantity']);\n \n \n $pointerDate = explode('/', $search['date']);\n $pointerDate = mktime(0, 0, 0, $pointerDate[0], $pointerDate[1], $pointerDate[2]) + $search['time'];\n $search['unixTime'] = $pointerDate;\n \n $this->session->reserSearch = $search;\n// echo '<pre>';print_r($search);die;\n\n /**\n * Get next 7 day often\n */\n $searchDateArr = array();\n $count = 0;\n $pointerDate = $search['unixTime'];\n $dateArr = array('date_mon', 'date_tue', 'date_wed', 'date_thu', 'date_fri', 'date_sat', 'date_sun');\n\n while (true) {\n $field = 'date_' . strtolower(date('D', $pointerDate));\n if ('1' == $res[$field]) {\n $searchDateArr[] = array(\n 'time' => $pointerDate,\n 'field' => $field,\n 'date' => date('D, m/d/Y g:i A', $pointerDate)\n );\n $count++;\n }\n if( 8 <= $count) {\n break;\n }\n $pointerDate += 3600 * 24;\n }\n /**\n * Get available hour for each date\n */\n foreach ($searchDateArr as &$date) {\n $date['startTime'] = $date['time'] - 1800 * 3;\n $date['endTime'] = $date['time'] + 1800 * 3;\n $maxTotal = $res['reser_quantity'] - $search['quantity'];\n \n $date['exitResers'] = $objReser->searchExistRerservation($date['startTime'], $date['endTime'], $maxTotal);\n $date['available'] = array();\n \n for ($i = $date['startTime']; $i <= $date['endTime']; $i = $i + 1800) {\n $flag = true;\n foreach ($date['exitResers'] as $exist) {\n if ($i == $exist['time']) {\n $flag = false;\n break;\n }\n }\n \n $date['available'][$i] = $flag;\n }\n }\n unset($date);\n \n// echo '<pre>';print_r($searchDateArr);die;\n// $searchDateArr[1]['available']['1301472000'] = false;\n// $searchDateArr[1]['available']['1301477400'] = false;\n// $searchDateArr[1]['available']['1301482800'] = false;\n /**\n * Data for view\n */\n $this->view->res = $res;\n $this->view->arr_restaurant = $res;\n $this->view->resId = $resId;\n $this->view->allTimes = $allTimes;\n $this->view->search = $search;\n $this->view->searchDateArr = $searchDateArr;\n $this->view->currentTime = time();\n $this->view->address_restaurant = $res['street'].\" \".$res['city'].\" \".$res['state'];\n\t}", "function get_reservation_byId($id) {\n global $DB;\n\n return $DB->get_record('roomscheduler_reservations', array('id' => $id));\n}", "public function index()\n {\n // $this->params['products'] = $products;\n\n $reservations = Reservation::all();\n $this->params['reservations'] = $reservations;\n return view('reservation.index')->with($this->params);\n }", "function afficherreservation(){\n\t\t$sql=\"SElECT * From reservation\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function query($params)\n { \n return $this->request(Resource::RESOURCE_QUERY, $params);\n }", "public function index()\n {\n\n if(auth()->user()->admin ==1){\n $reservations = Reservation::get();\n }else{\n $reservations = Reservation::where('user_id', auth()->user()->id)->get();\n }\n\n return view('reservations.index', [\n 'reservations' => $reservations\n ]);\n }", "public function reservaciones()\n {\n return $this->hasMany('App\\Models\\Reservaciones');\n }", "function searchForReservations() {\r\n $type = ($_POST['searchType']);\r\n \r\n if ($type == \"Select Search Type\") {\r\n echo (\"Please choose what you're searching for from the drop down menu below.\");\r\n } else if ($type == \"Request ID\") {\r\n \r\n $roomReservationRequestId = ($_POST[\"searchParam\"]);\r\n error_log(\"searching by request id = \".$roomReservationRequestId);\r\n $Reservation = retrieve_RoomReservationActivity_byRequestId($roomReservationRequestId);\r\n // retrieval routine returns just one reservation, so return an array consisting of one record\r\n if (!$Reservation)\r\n { \r\n error_log(\"retrieve_RoomReservationActivity_byRequestID returned false\");\r\n $Reservations = false;\r\n }\r\n else\r\n {\r\n $Reservations = array();\r\n $Reservations[] = $Reservation;\r\n }\r\n return $Reservations;\r\n\r\n /* if (!$Reservations) {\r\n echo (\"No reservations found! Try entering your search again.\");\r\n } */\r\n } else if ($type == \"Social Worker (Last Name)\") {\r\n $socialWorkerLastName = ($_POST[\"searchParam\"]);\r\n // $Reservations = array();\r\n $Reservations = (retrieve_SocialWorkerLastName_RoomReservationActivity($socialWorkerLastName));\r\n return $Reservations;\r\n\r\n /* if (!$Reservations) {\r\n echo (\"No reservations found! Try entering your search again.\");\r\n } */\r\n } else if ($type == \"Staff Approver (Last Name)\") {\r\n $rmhStaffLastName = ($_POST[\"searchParam\"]);\r\n // $Reservations = array();\r\n $Reservations = (retrieve_RMHStaffLastName_RoomReservationActivity($rmhStaffLastName));\r\n return $Reservations;\r\n\r\n /* if (!$Reservations) {\r\n echo (\"No reservations found! Try entering your search again.\");\r\n } */\r\n } else if ($type == \"Family (Last Name)\") {\r\n $parentLastName = ($_POST[\"searchParam\"]);\r\n \r\n $Reservations = (retrieve_FamilyLastName_RoomReservationActivity($parentLastName));\r\n return $Reservations;\r\n } else if ($type == \"Status\") {\r\n $status = ($_POST[\"searchParam\"]);\r\n $Reservations = (retrieve_RoomReservationActivity_byStatus($status));\r\n return $Reservations;\r\n } else if ($type == \"Last Activity\") {\r\n $activity = ($_POST[\"searchParam\"]);\r\n $Reservations = (retrieve_RoomReservationActivity_byLastActivity($activity));\r\n return $Reservations;\r\n }\r\n}", "public function index(Request $request){\n return Reserva::all();\n }", "public function obterReservaAlls($objetor, $status) {\n \n $sql = \"\n SELECT \n r.idReserva,\n t.nome AS turmaNome,\n s.predio,\n s.andar,\n s.numero,\n r.data,\n r.hora\n FROM \n reservas r\n INNER JOIN\n pessoas p\n ON\n p.idPessoa = r.idPessoa\n INNER JOIN\n turmas t\n ON\n t.idTurma = r.idTurma\n INNER JOIN\n salas s\n ON\n s.idSala = r.idSala\n WHERE\n r.idPessoa = '$objetor->idPessoa' and\n r.status = '$status' \n \";\n $query = $this->query->setQuery($sql);\n return $query;\n }", "public function reservation()\n\t{\n\n\t}", "public function index()\n {\n $this->is_admin();\n\n $bookings = DB::table('reservations')\n ->join('users', 'reservations.userID', '=', 'users.userID')\n ->join('hotels', 'reservations.hotelID', '=', 'hotels.hotelID')\n ->select('reservations.*', 'users.name', 'hotels.hotelType')\n ->get();\n\n return view('admin.reserve', compact('bookings'));\n }", "public function show($id)\n {\n return Reservation::find($id);\n }", "public function getGuardsWithScheduleRange(string $startDate, string $endDate)\n {\n return $this->model->with(['schedules' => function ($query) use ($startDate, $endDate) {\n $query->whereBetween('date', [$startDate, $endDate])->orderBy('date', 'ASC');\n }])\n ->get();\n }", "public static function SEARCH_STOP_DATE_RANGE_BOOKING(){\n\t $SQL_String = \"SELECT * FROM area_booking WHERE am_id=:am_id AND (date_enter BETWEEN :stop_start AND :stop_end OR date_exit BETWEEN :stop_start AND :stop_end) AND _keep=1\";\n\t return $SQL_String;\n\t}", "public function electionQuery()\n {\n // create the HTTP request url\n $this->url = $this->buildRequestURL('elections');\n // return the json result\n return $this->execute();\n }", "public function index()\n {\n $reservations = Reservation::orderByDesc('id')->get();\n return view(\"admin.pages.reservation.list\", compact(\"reservations\"));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Reservation::find()->where(['user_id' => \\Yii::$app->user->id]),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "private function getStoredReservationsJsonStructure(): array\n {\n return [\n 'data' => [\n '*' => [\n 'first_name',\n 'last_name',\n 'middle_name',\n 'phone',\n 'birth_date',\n 'sex',\n 'appointment_time',\n 'webOrderId'\n ]\n ]\n ];\n }", "function afficherreservation(){\n\t\t$sql=\"select hotel.nom hotel ,hotel.ville,reservation.* from (reservation inner join hotel on reservation.idhotel=hotel.id) order by idres \";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $reservation = $em->getRepository('CommerceBundle:Reservation')->findAll();\n return $this->render('reservation/index.html.twig', array(\n 'reservation' => $reservation,\n ));\n }", "public function index(Request $request)\n {\n $reservations = Reservation::active();\n\n return $this->afterId($request, $reservations)->get();\n }", "public function index()\n {\n //translatedIn(app() -> getLocale())->\n $reservations = Appointment::paginate(PAGINATION_COUNT);\n return view('Admin.reservations.index', compact('reservations'));\n }", "public function index()\n {\n return view('reservations.index');\n }", "public function __construct() {\n $this->reservations = new ArrayCollection();\n }", "public function reservation()\n {\n return $this->belongsTo('Reservation');\n }", "public function model()\n {\n return Reservation::class;\n }", "function index(){\n\n\n $where = \"MONTH( reservation_startdate ) = MONTH( NOW() ) AND reservation_status = 'Approved'\";\n\n $reservation = where( 'reservations', $where );\n\n return view( 'admin/reservation/reservation', compact( 'reservation' ));\n}", "public function obterReservasAtuais($objetor) {\n \n $dataHoje = date(\"Y-m-d\");\n $sql = \"\n SELECT \n r.idReserva,\n t.nome AS turmaNome,\n s.predio,\n s.andar,\n s.numero,\n r.data,\n r.hora\n FROM \n reservas r\n INNER JOIN\n pessoas p\n ON\n p.idPessoa = r.idPessoa\n INNER JOIN\n turmas t\n ON\n t.idTurma = r.idTurma\n INNER JOIN\n salas s\n ON\n s.idSala = r.idSala\n WHERE\n r.idPessoa = '$objetor->idPessoa' and\n r.status = '0' and\n r.data >= '$dataHoje'\n \n \";\n $query = $this->query->setQuery($sql);\n return $query;\n }", "public function obterReservasPassadas($objetor) {\n \n $dataHoje = date(\"Y-m-d\");\n $sql = \"\n SELECT \n r.idReserva,\n t.nome AS turmaNome,\n s.predio,\n s.andar,\n s.numero,\n r.data,\n r.hora\n FROM \n reservas r\n INNER JOIN\n pessoas p\n ON\n p.idPessoa = r.idPessoa\n INNER JOIN\n turmas t\n ON\n t.idTurma = r.idTurma\n INNER JOIN\n salas s\n ON\n s.idSala = r.idSala\n WHERE\n r.idPessoa = '$objetor->idPessoa' and\n r.status = '0' and\n r.data < '$dataHoje'\n \n \";\n $query = $this->query->setQuery($sql);\n return $query;\n }", "public function index()\n {\n $name =Auth::user()->name;\n $id =Client::where('name',$name)->first()->id;\n $reservations = Reservation::where('client_id',$id)->with('client')->with('car')->get();\n\n //$reservations= Reservation::->get();\n\n return view('res.index',compact('reservations'));\n }", "function ListaPreReservas() {\n\n\t//obtiene el id del usuario\n\t$sql = \"SELECT reserva.id, reserva.fecha_solicitud, reserva.fecha_reserva, concat(persona.primer_nombre, ' ', persona.primer_apellido) AS nombre,\n\t\t\t\t persona.cedula, area.descripcion\n\t\t\tFROM reserva INNER JOIN usuario ON reserva.usuario_id = usuario.id\n\t\t\tINNER JOIN persona on usuario.persona_id = persona.id\n\t\t\tINNER JOIN area ON reserva.area_id = area.id\n\t\t\tWHERE reserva.estado = 'PRE-RESERVA'\";\n\n\t$db = new conexion();\n\t$result = $db->consulta($sql);\n\t$num = $db->encontradas($result);\n\n\t$respuesta->datos = [];\n\t$respuesta->mensaje = \"\";\n\t$respuesta->codigo = \"\";\n\n\tif ($num != 0) {\n\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t}\n\n\t\t$respuesta->mensaje = \"Ok\";\n\t\t$respuesta->codigo = 1;\n\t} else {\n\t\t$respuesta->mensaje = \"No existen reservas pendientes!\";\n\t\t$respuesta->codigo = 0;\n\t}\n\n\treturn json_encode($respuesta);\n}", "public function index(Request $request)\n {\n \t$showLocal = true;\n $branch_list = null;\n if (Auth::user()->hasRole('admin')) {\n $reservations = $this->reservations->paginate(10, $request->search);\n }\n\n if (Auth::user()->hasRole('owner')) {\n $branch_list = $this->branchs->branchList(Auth::user()->id);\n $reservations = $this->reservations->search_paginate(10, Auth::user()->id, $request->branch, $request->date, $request->search);\n }\n\n if ( $request->ajax() ) {\n\n if (count($reservations) > 0) {\n return response()->json([\n 'success' => true,\n 'view' => view('branchs.list_reservations', compact('reservations', 'showLocal'))->render(),\n ]);\n } else {\n return response()->json([\n 'success' => false,\n 'message' => trans('app.no_records_found')\n ]);\n }\n }\n\n return view('reservations.index', compact('reservations', 'branch_list', 'showLocal'));\n }", "public function getusuaiosreservas()\n {\n return R::findAll('reservas');\n }", "public function getRestaurants(){\n \n $result = self::where([\n \"status\" => \"Active\"\n ])\n ->select([\"id\",\"name\",\"has_gst\"])\n ->orderBy(\"name\")\n ->get();\n \n return $result;\n }", "public function index(Request $request)\n {\n $keyword = $request->get('search');\n $perPage = 25;\n\n if (!empty($keyword)) {\n $labreservations = LabReservation::where('start_date', 'LIKE', \"%$keyword%\")\n ->orWhere('end_date', 'LIKE', \"%$keyword%\")\n ->orWhere('lab_id', 'LIKE', \"%$keyword%\")\n ->orWhere('status_id', 'LIKE', \"%$keyword%\")\n ->orWhere('reserved_by', 'LIKE', \"%$keyword%\")\n ->orWhere('reserved_at', 'LIKE', \"%$keyword%\")\n ->orWhere('description', 'LIKE', \"%$keyword%\")\n ->orWhere('reservable_id', 'LIKE', \"%$keyword%\")\n ->orWhere('reservable_type', 'LIKE', \"%$keyword%\")\n ->latest()->paginate($perPage);\n } else {\n $labreservations = LabReservation::latest()->paginate($perPage);\n }\n\n return view('lab-reservations.index', compact('labreservations'));\n }", "public function show(Reserve $reserve)\n {\n //\n }", "public function get_confirmable_reserv_with_user_id($user_id){\n $reservations = Reservation::where('status',2)\n ->where('user_id',$user_id)\n ->get();\n return reservationResource::collection($reservations);\n }", "public function reserverAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n\n $reservations = $em->getRepository('BibliothequeBundle:Reservation')->findAll();\n\n return $this->render('reservation/index.html.twig', array(\n 'reservations' => $reservations,\n ));\n }", "public function index()\n\t{\n\t\t$Reservations = Reservations::get()->toArray();\n\t\t\n\t\treturn view('dashboard/index');\n\t}", "public function obterEquipamentosReserva($objetor) {\n \n $sql = \"\n SELECT \n e.nome, \n COUNT( e.idEquipamento ) AS total\n FROM \n reservas r\n INNER JOIN\n reservas_equipamentos re\n ON\n r.idReserva = re.idReserva\n INNER JOIN\n equipamentos e\n ON\n e.idEquipamento = re.idEquipamento\n WHERE\n r.idPessoa = '$objetor->idPessoa' and\n r.status = '0'\n GROUP BY e.nome\n \";\n \n $query = $this->query->setQuery($sql);\n return $query;\n }", "protected function reservationsByUser(User $user): Builder\n {\n /** @var Builder $builder */\n $builder = Reservation::whereHas('user', function (Builder $query) use ($user) {\n $query->where('email', $user->email);\n });\n\n return $builder;\n }", "public function getReservation(string $reservationId): Response\n {\n return $this->get(\"reservations/$reservationId\");\n }", "public static function forApartment($apartment_id) {\n\t\t\t\n\t\t\treturn ReservedDay::where('apartment_id', $apartment_id)->get();\n\t\t}", "public function index()\n {\n\n $reservation = Reservation::orderByRaw(\"FIELD(status , 'pending', 'accepted', 'cancelled') ASC\")->get();\n\n $guest = Guest::all();\n \n $roomType = RoomType::all();\n \n $inventory = Inventory::all();\n \n return view('frontDesk.reservation.reservation', compact('inventory', 'roomType','reservation','guest'));\n \n \n }", "public function index()\n {\n $reservation = Reservation::orderBy('id', 'desc')->paginate(10);\n\n if(request()->has('search')){\n\n\n $searchTerm = request()->input('search');\n $whereTerm = \" `reservations`.`reservation_name` like '%\".$searchTerm.\"%' OR\n `reservations`.`number_of_people` like '%\".$searchTerm.\"%' OR \n `reservations`.`phone_number` like '%\".$searchTerm.\"%' OR \n `reservations`.`email` like '%\".$searchTerm.\"%'\";\n\n $reservation = Reservation::whereRaw($whereTerm)->paginate(10);\n\n }\n\n\n if(request()->input('time')=='Upcoming'){\n\n\n $reservation = Reservation::whereDate('reservation_time', '>=', Carbon\\Carbon::tomorrow()->toDateString())->orderBy('id', 'desc')->paginate(10);\n\n }\n else if(request()->input('time')=='Present'){\n\n\n $reservation = Reservation::whereDate('reservation_time', '>=', Carbon\\Carbon::today()->toDateString())->whereDate('reservation_time', '<', Carbon\\Carbon::tomorrow()->toDateString())->orderBy('id', 'asc')->paginate(10);\n\n }\n if(request()->input('time')=='Past'){\n\n\n $reservation = Reservation::whereDate('reservation_time', '<', Carbon\\Carbon::today()->toDateString())->orderBy('id', 'asc')->orderBy('id', 'desc')->paginate(10);\n\n }\n\n \n\n $date = date(\"Y-m-d\");\n\n if(request()->has('pdf')){\n\n $reservation = Reservation::get(array('reservations.id', 'reservations.reservation_name','reservations.reservation_date' , 'reservations.reservation_time', 'reservations.number_of_people', 'reservations.phone_number','reservations.email', 'reservations.created_at','reservations.status', DB::raw('CURRENT_TIMESTAMP as current')));\n\n\n if(request()->has('search')&&request()->input('pdf')=='filtered'){\n\n $searchTerm = request()->input('search');\n $whereTerm = \" `reservations`.`reservation_name` like '%\".$searchTerm.\"%' OR\n `reservations`.`number_of_people` like '%\".$searchTerm.\"%' OR \n `reservations`.`phone_number` like '%\".$searchTerm.\"%' OR \n `reservations`.`email` like '%\".$searchTerm.\"%'\";\n\n $reservation = Reservation::whereRaw($whereTerm)->get(array('reservations.id', 'reservations.reservation_name','reservations.reservation_date' , 'reservations.reservation_time', 'reservations.number_of_people', 'reservations.phone_number','reservations.email','reservations.status', 'reservations.created_at',DB::raw('CURRENT_TIMESTAMP as current')));\n\n }\n\n if((request()->input('time')=='Upcoming')&&request()->input('pdf')=='filtered'){\n\n\n $reservation = Reservation::whereDate('reservation_time', '>=', Carbon\\Carbon::tomorrow()->toDateString())->orderBy('id', 'desc')->get(array('reservations.id', 'reservations.reservation_name','reservations.reservation_date' , 'reservations.reservation_time', 'reservations.number_of_people', 'reservations.phone_number','reservations.email','reservations.status', 'reservations.created_at',DB::raw('CURRENT_TIMESTAMP as current')));\n\n }\n\n if((request()->input('time')=='Present')&&request()->input('pdf')=='filtered'){\n\n\n $reservation = Reservation::whereDate('reservation_time', '>=', Carbon\\Carbon::today()->toDateString())->whereDate('reservation_time', '<', Carbon\\Carbon::tomorrow()->toDateString())->orderBy('id', 'asc')->get(array('reservations.id', 'reservations.reservation_name','reservations.reservation_date' , 'reservations.reservation_time', 'reservations.number_of_people', 'reservations.phone_number','reservations.email','reservations.status', 'reservations.created_at',DB::raw('CURRENT_TIMESTAMP as current')));\n\n }\n\n if((request()->input('time')=='Past')&&request()->input('pdf')=='filtered'){\n\n\n $reservation = Reservation::whereDate('reservation_time', '<', Carbon\\Carbon::today()->toDateString())->orderBy('id', 'asc')->orderBy('id', 'desc')->get(array('reservations.id', 'reservations.reservation_name','reservations.reservation_date' , 'reservations.reservation_time', 'reservations.number_of_people', 'reservations.phone_number','reservations.email','reservations.status', 'reservations.created_at',DB::raw('CURRENT_TIMESTAMP as current')));\n\n }\n\n $pdf = PDF::setOptions(['isHtml5ParserEnabled' => true, 'isRemoteEnabled' => true])->loadView('download.reservationpdf',['reservation'=>$reservation]);\n return $pdf->download('Reservation - '.$date.'.pdf');\n }\n\n if(request()->has('csv')){\n\n\n $reservation = Reservation::get(array('reservations.id as Id','reservations.reservation_name as Reservation_Name', 'reservations.reservation_date as Reservation_DateTime' , 'reservations.number_of_people as Number_of_People', 'reservations.phone_number as Phone_Number','reservations.email as Email', 'reservations.updated_at as Updated_At'));\n\n if(request()->has('search')&&request()->input('csv')=='filtered'){\n\n $searchTerm = request()->input('search');\n $whereTerm = \" `reservations`.`reservation_name` like '%\".$searchTerm.\"%' OR\n `reservations`.`number_of_people` like '%\".$searchTerm.\"%' OR \n `reservations`.`phone_number` like '%\".$searchTerm.\"%' OR \n `reservations`.`email` like '%\".$searchTerm.\"%'\";\n\n $reservation = Reservation::whereRaw($whereTerm)->get(array('reservations.id as Id','reservations.reservation_name as Reservation_Name', 'reservations.reservation_date as Reservation_DateTime' , 'reservations.number_of_people as Number_of_People', 'reservations.phone_number as Phone_Number','reservations.email as Email', 'reservations.updated_at as Updated_At'));\n\n }\n\n if((request()->input('time')=='Upcoming')&&request()->input('csv')=='filtered'){\n\n $reservation = Reservation::whereDate('reservation_time', '>=', Carbon\\Carbon::tomorrow()->toDateString())->orderBy('id', 'desc')->get(array('reservations.id as Id','reservations.reservation_name as Reservation_Name', 'reservations.reservation_date as Reservation_DateTime' , 'reservations.number_of_people as Number_of_People', 'reservations.phone_number as Phone_Number','reservations.email as Email', 'reservations.updated_at as Updated_At'));\n\n }\n\n if((request()->input('time')=='Present')&&request()->input('csv')=='filtered'){\n\n $reservation = Reservation::whereDate('reservation_time', '>=', Carbon\\Carbon::today()->toDateString())->whereDate('reservation_time', '<', Carbon\\Carbon::tomorrow()->toDateString())->orderBy('id', 'asc')->get(array('reservations.id as Id','reservations.reservation_name as Reservation_Name', 'reservations.reservation_date as Reservation_DateTime' , 'reservations.number_of_people as Number_of_People', 'reservations.phone_number as Phone_Number','reservations.email as Email', 'reservations.updated_at as Updated_At'));\n\n }\n\n if((request()->input('time')=='Past')&&request()->input('csv')=='filtered'){\n\n $reservation = Reservation::whereDate('reservation_time', '<', Carbon\\Carbon::today()->toDateString())->orderBy('id', 'asc')->orderBy('id', 'desc')->get(array('reservations.id as Id','reservations.reservation_name as Reservation_Name', 'reservations.reservation_date as Reservation_DateTime' , 'reservations.number_of_people as Number_of_People', 'reservations.phone_number as Phone_Number','reservations.email as Email', 'reservations.updated_at as Updated_At'));\n\n }\n\n $formatter = Formatter::make($reservation->toArray(), Formatter::ARR);\n\n $csv = $formatter->toCsv();\n\n $date = date(\"Y-m-d\");\n\n header('Content-Disposition: attachment; filename= \"Reservation\"'.$date.\".csv\");\n header(\"Cache-control: private\");\n header(\"Content-type: application/force-download\");\n header(\"Content-transfer-encoding: binary\\n\");\n\n echo $csv;\n\n exit;\n\n }\n\n return view('reservation.index', compact('reservation'));\n }", "public function getRespondToReservation(Request $request)\n {\n\t\t$user = null;\n\t\tif(Auth::check())\n\t\t{\n\t\t\t$user = Auth::user();\n\t\t\t\n\t\t\tif($this->helpers->isAdmin($user))\n\t\t\t{\n\t\t\t\t$hasPermission = $this->helpers->hasPermission($user->id,['view_users','edit_users']);\n\t\t\t\t#dd($hasPermission);\n\t\t\t\t$req = $request->all();\n\t\t\t\t\n\t\t\t\tif($hasPermission)\n\t\t\t\t{\n\t\t\t\t$validator = Validator::make($req,[\n\t\t 'xf' => 'required|numeric',\n\t\t\t\t\t\t\t'axf' => 'required',\n\t\t\t\t\t\t\t'gxf' => 'required|numeric'\n\t\t ]);\n\t\t\t\t\t\t\n\t\t\t\tif($validator->fails())\n {\n session()->flash(\"validation-status-error\",\"ok\");\n\t\t\t return redirect()->intended('/');\n }\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$dt = [\n\t\t\t 'id' => $req['xf'],\n\t\t\t 'apartment_id' => $req['axf'],\n\t\t\t 'user_id' => $req['gxf']\n\t\t\t ];\n\t\t\t \n\t\t\t if($this->helpers->hasReservation($dt))\n\t\t\t {\n\t\t\t\t $dt['type'] = $req['type'];\n\t\t\t\t $dt['auth'] = $user->id;\n\t\t\t\t\n\t\t\t $this->helpers->respondToReservation($dt);\n\t\t\t session()->flash(\"respond-to-reservation-status\",\"ok\");\n return redirect()->intended('/');\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \t session()->flash(\"duplicate-reservation-status-error\",\"ok\");\n\t\t\t return redirect()->intended('/');\n\t\t\t }\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsession()->flash(\"permissions-status-error\",\"ok\");\n\t\t\t\t\treturn redirect()->intended('/');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAuth::logout();\n\t\t\t\t$u = url('/');\n\t\t\t\treturn redirect()->intended($u);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn redirect()->intended('/');\n\t\t}\n }", "protected function grid()\n {\n $grid = new Grid(new Reservation());\n\n $grid->column('id', __('Id'));\n $grid->column('user.name', __('Pet Owner'));\n $grid->column('pet.name', __('Pet Name'));\n $grid->column('service.name', __('Service'));\n $grid->column('date', __('Date'));\n $grid->column('status', __('Status'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n\n $grid->filter(function($filter){\n\n $filter->disableIdFilter();\n $filter->like('user.name', 'Pet Owner');\n $filter->like('pet.name','Pet Name');\n \n });\n\n return $grid;\n }", "public function getReservationId()\n {\n return $this->reservation_id;\n }", "protected function getLicenseQuery()\n {\n return $this->licenseQuery;\n }", "protected function getListQuery()\n\t{\n\t\t\n\t\t// Create a new query object.\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\t\n\t\t// Select all fields from the table.\n\t\t$query->select($this->getState('list.select', 'h.*'));\n\t\t$query->from($db->quoteName('#__hotelreservation_hotels').' AS h');\n\t\n\t\t// Join over countries\n\t\t$query->select('hc.country_name');\n\t\t$query->join('LEFT', $db->quoteName('#__hotelreservation_countries').' AS hc ON h.country_id=hc.country_id');\n\t\n\t\t// Join over currency\n\t\t$query->select('hcr.description as hotel_currency');\n\t\t$query->join('LEFT', $db->quoteName('#__hotelreservation_currencies').' AS hcr ON h.currency_id=hcr.currency_id');\n\t\t\n\t\t// Join over currency\n\t\t$query->select('hatr.accommodationtypeId ');\n\t\t$query->join('LEFT', $db->quoteName('#__hotelreservation_hotel_accommodation_type_relation').' AS hatr ON h.hotel_id=hatr.hotelid');\n\t\t$query->select('hat.name as accommodation_type');\n\t\t$query->join('LEFT', $db->quoteName('#__hotelreservation_hotel_accommodation_types').' AS hat ON hat.id=hatr.accommodationtypeId');\n\t\t\n\t\t// Filter by search in title.\n\t\t$search = $this->getState('filter.search');\n\t\tif (!empty($search)) {\n\t\t\t$query->where(\" h.hotel_name LIKE lower('%\".$search.\"%') \");\n\t\t}\n\t\t\n\t\t$typeId = $this->getState('filter.accommodationtypeId');\n\t\tif (is_numeric($typeId)) {\n\t\t\t$query->where('hatr.accommodationtypeId ='.(int) $typeId);\n\t\t}\n\t\n\t\t$statusId = $this->getState('filter.status_id');\n\t\tif (is_numeric($statusId)) {\n\t\t\t$query->where('h.is_available ='.(int) $statusId);\n\t\t}\n\t\n\t\t$query->group('h.hotel_id');\n\t\n\t\t// Add the list ordering clause.\n\t\t$query->order($db->escape($this->getState('list.ordering', 'hotel_name')).' '.$db->escape($this->getState('list.direction', 'ASC')));\n\t\n\t\treturn $query;\n\t}", "protected function getOptions()\n {\n $db = JFactory::getDBO(); //get DB connection object\n // create new query object anc clear the query specification\n $query = $db->getQuery(true);\n\n\t $query->select(\n\t\t 'r.id as id,\n r.name as name,\n s.space as space, \n r.start as start, \n r.end as end'\n\t );\n\n\t $query->from('#__reservations_reservations as r');\n\t $query->leftJoin('#__reservations_spaces as s on r.space_id=s.id');\n\n\n $db->setQuery((string) $query);\n $reservations = $db->loadObjectList();\n $options = array();\n\n\n if ($reservations)\n {\n foreach ($reservations as $reservation)\n {\n $options[] = JHtml::_('select.option', $reservation->id, $reservation->space);\n }\n }\n\n $options = array_merge(parent::getOptions(), $options);\n\n return $options;\n }", "public function index(Request $request)\n {\n $reservations = Reservation::query()->paginate();\n\n return $this->success($reservations);\n }", "public static function getName () {\n return 'Reservable';\n }", "public function get_all()\n\t{\n\t\t$db = $this->db_connection->get_connection();\n\n $sql = \"SELECT id, realtor, manager FROM settings_reserve ORDER BY id DESC\";\n\n \t$query = $db->prepare($sql);\n\n\t\tif ($query->execute()) {\n\t\t\treturn $query->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t} else {\n\t\t\thttp_response_code(500);\n\t\t\t$this->validator->check_response();\n\t\t}\n\t}", "public function reservationValidation($reservation, $start, $end)\n {\n $usedTables = DB::table('individual_reservations')->where('table_id', $reservation->table_id)->where('id', '!=', $reservation->id)/*->where('start_date', '>', $date)*/\n ->get();\n\n\n foreach ($usedTables as $res)\n {\n if (($res->start_date >= $start && $res->start_date <= $end) || ($res->end_date >= $start && $res->end_date <= $end))\n {\n return ['start' => $res->start_date, 'end' => $res->end_date];\n }\n }\n\n return null;\n }", "public function __toString(): string\n {\n $options = \\http_build_query(Values::of($this->options), '', ' ');\n return '[Twilio.Taskrouter.V1.ReadReservationOptions ' . $options . ']';\n }" ]
[ "0.7292927", "0.719451", "0.6754986", "0.6753897", "0.66162133", "0.65637815", "0.65264463", "0.6490856", "0.6485142", "0.641531", "0.63514847", "0.6326581", "0.61961174", "0.60966027", "0.60914516", "0.6080957", "0.5988641", "0.5876879", "0.5834394", "0.5825535", "0.5821079", "0.58110404", "0.5786649", "0.57810205", "0.5761408", "0.56645674", "0.5609724", "0.55967224", "0.55862755", "0.55554587", "0.5543666", "0.55411243", "0.55411243", "0.55411243", "0.55389374", "0.5510263", "0.55037665", "0.54965746", "0.5473599", "0.54636717", "0.54524356", "0.54299015", "0.5425426", "0.54183257", "0.53918386", "0.5384628", "0.5346209", "0.5336163", "0.5335672", "0.53335935", "0.53158283", "0.53119504", "0.5290126", "0.52679974", "0.52470577", "0.52424324", "0.5223425", "0.5220957", "0.5220641", "0.5218573", "0.52034175", "0.51875496", "0.5177179", "0.5171331", "0.5171261", "0.51543665", "0.5153707", "0.5149748", "0.51444703", "0.5108417", "0.5102774", "0.5099915", "0.5084475", "0.5081872", "0.5080495", "0.50764453", "0.50600684", "0.505224", "0.5051972", "0.5037567", "0.5028542", "0.5019925", "0.50136596", "0.50067246", "0.4981056", "0.4975268", "0.49727005", "0.4971232", "0.4969829", "0.49551225", "0.49416345", "0.49363595", "0.49273223", "0.4924109", "0.49172252", "0.49129298", "0.4906701", "0.4900186", "0.48988056", "0.48984206" ]
0.70258766
2
$name serves as a namespace for the session keys
abstract public function __construct(string $name);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSession($name);", "public static function getCurrentName($name) {\n return Session::put(Privilege::SESSION_NAME_NAME);\n }", "public function getName()\n {\n return 'session';\n }", "private function setName($name)\n {\n $session = new Zend_Session_Namespace('Unodor_Account');\n $session->name = $name;\n }", "function set_name ($name)\r\n {\r\n $_SESSION[\"name\"] = $name;\r\n }", "public static function setCurrentName($name) {\n Session::put(Privilege::SESSION_NAME_NAME, $name);\n }", "static function getSession($name){\n return $_SESSION[$name];\n }", "public function __get( $name){\n\t\tif ( isset($_SESSION[$name])){\n\t\t\treturn $_SESSION[$name];\n\t\t}\n\t}", "function get_name ()\r\n {\r\n return $_SESSION[\"name\"];\r\n }", "public function get_nameSession()\n {\n return $this->_nameSession;\n }", "public static function name(string $name)\n {\n static::$name = $name;\n static::$session = null;\n }", "public function name($name = '') {\n\t\tif (!empty($name)) {\n\t\t\treturn session_name($name);\n\t\t}\n\t\telse {\n\t\t\treturn session_name();\n\t\t}\n\t}", "public function getSession_name() {\r\n return $this->session_name;\r\n }", "public function getName(): string\n {\n return session_name();\n }", "public function getSessionName()\n {\n return session_name();\n }", "public function __get( $name ){\n\n if ( isset($_SESSION[$name])) {\n return $_SESSION[$name];\n }\n }", "public static function set_name_space($s)\n\t{\n\t\tif (!isset($_SESSION['Session_Master']))\n\t\t{\n\t\t\t$_SESSION['Session_Master'] = array();\n\t\t}\n\t\t\n\t\tif (!isset($_SESSION['Session_Master'][$s])) \n\t\t{\n\t\t\t$_SESSION['Session_Master'][$s] = array();\n\t\t}\n\t\tself::$s_name_space = $s;\n\t}", "public static function get($name) {\n return $_SESSION[$name];\n }", "public function getSessionNm() {\n $this->_session_nm = $this->pub_session_nm;\n return $this->pub_session_nm;\n }", "protected static function getSessionNamespace()\n {\n return rex::getProperty('instname') . '_backend';\n }", "public static function get($name){\n return $_SESSION[$name];\n }", "public function getName()\n {\n return $this->_session->getName();\n }", "private function getSessionName(): string\n {\n $cookie = new Cookie();\n\n return $cookie->get('sessionName', $this->name);\n }", "function getSession( $name ) #version 1\n{\n if ( isset($_SESSION[$name]) ) \n {\n return $_SESSION[$name];\n }\n return \"\";\n}", "public function __get( $name )\n {\n if (isset($_SESSION[$name])) {\n return $_SESSION[$name];\n }\n }", "public function getSessionKey();", "public static function get(string $name) {\n return $_SESSION[$name];\n }", "public function __get($name){\n\t\treturn isset($_SESSION[$name]) ? $_SESSION[$name] : null;\n\t}", "public static function get($name) {\n return $_SESSION[$name];\n }", "public function session($name='') {\n\t\t$this->session[$name] = (isset($_SESSION[$name])) ?\n\t\t\t$_SESSION[$name] : NULL;\n\t\t\t\n\t\treturn $this->session;\n\t}", "static function reporticoSessionName()\n {\n //if ( ReporticoApp::get(\"session_namespace\") )\n if (self::getReporticoSessionParam(\"framework_parent\")) {\n return \"NS_\" . ReporticoApp::get(\"session_namespace\");\n } else {\n return session_id() . \"_\" . ReporticoApp::get(\"session_namespace\");\n }\n\n }", "protected function getSessionKeyName()\n {\n return 'filters.' . $this->sessionKey . '.' . request()->route('project')->id;\n }", "public static function get($name)\n {\n return $_SESSION[$name];\n }", "public function getSessionName(): string {\n\n\t\treturn $this->sessionName;\n\t}", "public function getName()\n {\n $session = new Zend_Session_Namespace('Unodor_Account');\n return $session->name;\n }", "public function setName(string $name): void\n {\n session_name($name);\n }", "public function __get($_name);", "public function name(string $name = null)\n {\n if ($name === null) {\n return $this->session->name();\n }\n \n if (! $this->session->started()) {\n $this->session->name($name);\n }\n }", "function session_enter()\n{\n $sess_name = session_name(\"FormatikAPI\");\n session_start();\n}", "private function setSessionName(): void\n {\n $cookie = new Cookie($this->expiringTime - 1);\n if ($cookie->exists('sessionName')) {\n return;\n }\n\n // unset all session name cookies\n foreach ($_COOKIE as $key => $value) {\n if (strlen($key) === strlen($this->name)) {\n $cookie->unset($key);\n }\n }\n\n $cookie->save('sessionName', $this->name);\n }", "public function __get($name) {\n\t\t$result = null;\n\t\tif ($name == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tif (array_key_exists($name, $this->session))\n\t\t{\n\t\t\t$result = $this->session[$name];\n\t\t}\n\t\telse if (array_key_exists($name, $_SESSION))\n\t\t{\n\t\t\t$result = $_SESSION[$name];\n\t\t}\n\n\t\treturn $result;\n\t}", "function sess_start($name = null){\n\n if( $name ) session_name($name);\n session_start();\n session_regenerate_id();\n\n }", "function setSessionVariable($localVarName,$varName, $value) {\n $_SESSION[$this->local_current_module.\"_\".$localVarName.\"_\".$varName] = $value;\n}", "function set ($name,$value) {\r\n $_SESSION[$name]=$value;\r\n }", "public function setSessionName($name = \"icepay_api_webservice_reportingsession\")\n {\n $this->_sessionName = $name;\n }", "function getSession($name) {\r\n if(isset($_SESSION[$name])) {\r\n return $_SESSION[$name];\r\n }\r\n else {\r\n return null;\r\n }\r\n}", "static function reporticoNamespace()\n {\n return ReporticoApp::get(\"session_namespace_key\");\n }", "public function __get($name)\n {\n return isset($_SESSION[$name]) ? $_SESSION[$name] : null;\n }", "public function getSessionAuthTokenName();", "public function __get($name)\n\t{\n\t\tswitch ($name) {\n\t\t\tdefault:\n\t\t\t\tif (isset($this->$name))\n\t\t\t\t{\n\t\t\t\t\treturn $this->$name;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(isset($_SESSION[$name])) $this->$name = $_SESSION[$name];\n\t\t\t\t\telse $this->$name = NULL;\n\t\t\t\t\treturn $this->$name;\n\t\t\t\t}\n\t\t};\n\t}", "function get ($name) {\r\n if ( isset ( $_SESSION[$name] ) )\r\n return $_SESSION[$name];\r\n else\r\n return false;\r\n }", "protected function getKey($name)\n\t{\n\t\t/**\n\t\t * Kullanıcıdaki sezon referansını al\n\t\t */\n\t\tif (isset($_COOKIE[$this->config->getSessionName()])) {\n\t\t\t$this->sessionId = $_COOKIE[$this->config->getSessionName()];\n\t\t\t$this->config->setSessionId($this->sessionId);\n\t\t}\n\n\t\t/**\n\t\t * Kullanıcıdaki sezon referansını 32 karakter değilse tekrar oluştur\n\t\t */\n\t\tif (strlen($this->sessionId) !== 32) {\n\t\t\t$this->sessionId = $this->sessionId();\n\t\t\t$this->config->setSessionId($this->sessionId);\n\t\t\t$this->config->setCookie($this->config->getSessionName(), $this->sessionId, \"None\");\n\t\t}\n\n\t\t/**\n\t\t * Güvenlik anahtarı ile karşılaştırmak için anahtar oluştur\n\t\t */\n\t\t$key = md5($this->sessionId . $this->secretKey . $this->sessionId);\n\n\t\tif (!isset($_COOKIE[$name])) {\n\t\t\t/**\n\t\t\t * Güvenlik anahtarı ile oluşturulmuş güvenlik cookie sini gönder\n\t\t\t */\n\t\t\t$this->config->setCookie($name, $key, \"None\");\n\t\t\t$_COOKIE[$name] = $key;\n\t\t} else {\n\t\t\t/**\n\t\t\t * Kullanıcıdaki cookie lerin uyumu karşılaştır\n\t\t\t */\n\t\t\tif ($_COOKIE[$name] === $key) {\n\t\t\t\t$key = $_COOKIE[$name];\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * Uyumsuz ise tekrar oluştur\n\t\t\t\t */\n\t\t\t\t$this->sessionId = $this->sessionId();\n\t\t\t\t$this->config->setSessionId($this->sessionId);\n\t\t\t\t$this->config->setCookie($this->config->getSessionName(), $this->sessionId, \"None\");\n\n\t\t\t\t$key = md5($this->sessionId . $this->secretKey . $this->sessionId);\n\t\t\t\t$this->config->setCookie($name, $key, \"None\");\n\t\t\t\t$_COOKIE[$name] = $key;\n\t\t\t}\n\t\t}\n\n\t\treturn $key;\n\t}", "public static function load($name = null) {\n $class_name = 'Kuuzu\\\\KU\\\\Core\\\\Session\\\\' . KUUZU::getConfig('store_sessions');\n\n if ( !class_exists($class_name) ) {\n trigger_error('Session Handler \\'' . $class_name . '\\' does not exist, using default \\'Kuuzu\\\\KU\\\\Core\\\\Session\\\\File\\'', E_USER_ERROR);\n\n $class_name = 'Kuuzu\\\\KU\\\\Core\\\\Session\\\\File';\n }\n\n $obj = new $class_name();\n\n if ( !isset($name) ) {\n $name = 'sid';\n }\n\n $obj->setName($name);\n $obj->setLifeTime(ini_get('session.gc_maxlifetime'));\n\n return $obj;\n }", "public function __get($name)\n {\n if (isset($_SESSION[$this->prefix][$name])) {\n return $_SESSION[$this->prefix][$name];\n }\n\n return null;\n }", "public function set_nameSession($_nameSession)\n {\n $this->_nameSession = $_nameSession;\n\n return $this;\n }", "public function getSessionKeyName($key) {\n return self::BASE_NAME . '_' . $key;\n }", "public static function store($name, $value)\n\t{\n $_SESSION[$name] = $value;\n\t}", "private function &getNamespace() {\r\n\t\t$ns = self::SESSION_NAMESPACE;\r\n\t\tif(!isset($_SESSION[$ns])) {\r\n\t\t\t$_SESSION[$ns] = array();\r\n\t\t}\r\n\t\treturn $_SESSION[$ns];\r\n\t}", "public static function get_name_space($s = '')\n\t{\n\t\t$s = $s ? $s : self::$s_name_space;\n\t\t$a_return = array();\n\t\tif (@is_array($_SESSION['Session_Master'][$s]))\n\t\t{\n\t\t\t$a_return = $_SESSION['Session_Master'][$s];\n\t\t}\n\t\treturn $a_return;\n\t}", "public function getNomSession() {\n return \\admin\\UserBundle\\Services\\LoginManager::SESSION_DATA_NAME;\n }", "public function set_session($name,$val)\n { \n $_SESSION[$name] = $val; \n }", "private function _getStorageName() {\n\t\tif($this->_rememberMe) {\n\t\t\treturn self::TOKEN_COOKIE_STORAGE;\n\t\t}\n\n\t\treturn self::TOKEN_SESSION_STORAGE;\n\t}", "public static function get($name)\n {\n if(isset($_SESSION[$name]))\n {\n return $_SESSION[$name];\n }\n }", "function put_id() {\n \n if($this->name == \"\") {\n $this->name = $this->classname;\n }\n \n // if we stop using the session id- we should remove the session id from\n // the current QUERYSTRING/ or the HTTP_GET_VARS ????\n die(\"This has not been coded yet.\");\n }", "public function getName(): string\n {\n return $this->isStarted() ? session_name() : $this->name;\n }", "public function forName();", "public function get($name) {\n if(!empty($_SESSION[$name])) return $_SESSION[$name];\n }", "public function __set($name,$value){\n\t\treturn $_SESSION[$name] = $value;\n\t}", "public function getSession($name)\n\t{\n\t\treturn $this->session->get($name);\n\t}", "function setSessValue($k, $v){\n $k = _APPNAME .'#'.$k;\n $_SESSION[$k] = $v;\n }", "public function __set( $name , $value ){\n\n \tif ( $this->sessionState == self::SESSION_NOT_STARTED ){\n \t\tself::$instance->startSession();\n \t}\n\n $_SESSION[$name] = $value;\n }", "public function get_sessionstring()\n {\n \treturn \"$this->_session_name=$this->_session_id\";\n }", "public function __set($name, $value)\n {\n $_SESSION[$name] = $value;\n }", "public function __set($name, $value)\n {\n $_SESSION[$name] = $value;\n }", "function requestSessionInfo()\n {\n //para pasarselo al aside;\n\n $sessionLevel = $this->loginController->GetSessionAuthLevel();\n $this->view->setSessionLevel($sessionLevel);\n\n $sessionName = $this->loginController->GetSessionUsername();\n $this->view->setSessionName($sessionName);\n }", "function session_register($name, $_ = NULL)\n{\n}", "public function __set($name, $value)\n {\n $_SESSION[$this->prefix][$name] = $value;\n }", "public function __construct($name=null) {\n \n session_start();\n \n }", "public function session($name, $value){\n if( isset($this->openForm) && is_array($this->openForm) )\n $this->openForm['fields'][] = new fe_session(array('name' => $name, 'value' => $value));\n }", "public function key() {\n\t\treturn key($this->session);\n\t}", "protected function getStateKeyPrefix()\n\t{\n\t\treturn get_class($this) . '_' . sha1($this->authUrl) . '_';\n\t}", "public function g_session($name) {\n\treturn isset($_SESSION[$this->config->item('sess_cookie_name') . '_' . $name]) ? $_SESSION[$this->config->item('sess_cookie_name') . '_' . $name] : FALSE;\n }", "function _key($name = '')\n {\n }", "function setSession($name, $data) {\r\n $_SESSION[$name] = $data;\r\n return true;\r\n}", "final public function set($name, $value)\n {\n $key = $this->getSessionKey($name);\n\n $_SESSION[$key] = $value;\n }", "public function testSetName()\n {\n $session = new Session();\n $session->setName('oldName');\n\n $this->assertEquals('oldName', $session->getName());\n\n $session->open();\n $session->setName('newName');\n\n $this->assertEquals('newName', $session->getName());\n\n $session->destroy();\n }", "public static function createSession($name, $data) {\n $_SESSION[$name] = serialize($data);\n }", "private function setSessionKey()\n {\n $this->sessionKey = 'formfactory.captcha.' . $this->formRequestClass;\n }", "public static function clear_name_space()\n\t{\n\t\t$_SESSION['Session_Master'][self::$s_name_space] = array();\n\t}", "function setLocalSessionVariable($localVarName,$varName, $value) {\n $_SESSION[$localVarName.\"_\".$varName] = $value;\n }", "public function get($name)\n {\n if (isset($_SESSION[$this->_namespace][$name])) {\n return $_SESSION[$this->_namespace][$name];\n }\n\n return null;\n }", "function getKey($keyname = 'generic') {\n if (array_key_exists($keyname . '_key', $_COOKIE)) {\n\t\t\treturn $_COOKIE[$keyname . '_key'];\n\t\t} else {\n\t\t\treturn $GLOBALS['TSFE']->fe_user->user['ses_id'];\n\t\t}\n }", "public function getSessionName(\n string $key,\n ): string {\n [$key] = Toolkit::filter([$key])->string()->trim();\n\n Toolkit::assert([\n [$key, \\Auth0\\SDK\\Exception\\ArgumentException::missing('key')],\n ])->isString();\n\n return $this->sessionPrefix . '_' . ($key ?? '');\n }", "function getNameSpace() { return $this->_namespace; }", "function token_set($name) {\r\n\t$session=Zend_Auth::getInstance()->getStorage();\r\n\t$token=auth();\r\n\t$session->set($name,$token);\r\n\r\n\treturn $token;\r\n}", "public function get ($name)\n\t{\n\t\t\n\t\tif (array_key_exists ($name, $_SESSION))\n\t\t{\n\t\t\treturn $_SESSION[$name];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t}", "public static function createNamespace(string $name): SessionInterface\n {\n return static::getInstance()->createNamespace($name);\n }", "private function getVarSess($name, $defaultvalue=null) {\n\t\tif (array_key_exists($name, $_SESSION))\n\t\t\treturn $_SESSION[$name];\n\t\treturn $defaultvalue;\n\t}", "function set_current_list_name ($list_name)\r\n {\r\n $_SESSION[\"current_list_name\"] = $list_name;\r\n }", "private function updateSession()\n {\n $_SESSION[$this->namespace] = $this->session;\n }", "function fsl_session_set($name,$value,$timeout = NULL){\n $_SESSION[$name] = fsl_encrypt($value);\n\t\t\t\tif(!empty($timeout)) $_SESSION[$name.'_timeout'] = $timeout + time();\n\t\t\n return true;\n}" ]
[ "0.70582324", "0.6970325", "0.69551665", "0.6870411", "0.6846554", "0.6813603", "0.6679995", "0.66612285", "0.6646659", "0.6584326", "0.65836036", "0.65539825", "0.6528358", "0.65055376", "0.6442608", "0.64423215", "0.6437564", "0.64023703", "0.63870275", "0.63614535", "0.6348376", "0.63413435", "0.6334531", "0.6315429", "0.6304608", "0.62983626", "0.6282229", "0.62369543", "0.62159204", "0.6213592", "0.62113285", "0.62059397", "0.61834097", "0.61823237", "0.6157552", "0.6135218", "0.611684", "0.61080605", "0.6064954", "0.6058362", "0.6056148", "0.60210586", "0.60179204", "0.6011373", "0.59920484", "0.5990876", "0.5960497", "0.59568334", "0.59481305", "0.59437746", "0.59414154", "0.59331375", "0.59259355", "0.59236", "0.592221", "0.5911414", "0.59057266", "0.59003747", "0.58927584", "0.58704615", "0.5866727", "0.5856632", "0.5852902", "0.5844833", "0.58403456", "0.58170885", "0.581245", "0.5804111", "0.5801713", "0.57942843", "0.57838905", "0.5769623", "0.57665545", "0.57665545", "0.57566625", "0.57551676", "0.5753388", "0.57444793", "0.5720767", "0.5718167", "0.5716149", "0.5702635", "0.56935626", "0.568632", "0.56853473", "0.568497", "0.56822294", "0.5681121", "0.56782085", "0.5672821", "0.56685716", "0.5662649", "0.56592387", "0.5657272", "0.56470376", "0.5645107", "0.5638374", "0.56380385", "0.5626746", "0.56158704", "0.5604214" ]
0.0
-1
Close the session and release the lock
public function close() { $this->sessionClosed = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function unlock_session() {\n \\core\\session\\manager::write_close();\n ignore_user_abort(true);\n }", "function close () {\n\n # create database object if not create\n self::_connect();\n\n $this->link->direct('SELECT RELEASE_LOCK(\"'.$this->session_lock.'\")');\n\n return TRUE;\n }", "public static function close() {\n if ('' !== session_id()) {\n session_write_close();\n }\n }", "private function _closeSession()\n {\n $session = $this->requestStack->getCurrentRequest()->getSession();\n if ($session===null || !$session->isStarted()) {\n return;\n } \n \n $session->save();\n }", "public function close()\n {\n $this->_client->endSession($this->_session);\n }", "function release(){\n\t\tsession_write_close();\n\t}", "public function close()\n {\n curl_close($this->_session);\n }", "public function commitSession()\n {\n session_write_close();\n }", "function __destruct()\n {\n session_write_close();\n }", "public static function sessionCloseHandler();", "function session_leave()\n{\n session_write_close();\n}", "public function destroy()\n {\n $this->session_open();\n $_SESSION = array();\n session_destroy();\n }", "public function closeSession() {\n session_unset();\n return true;\n }", "public function close()\n {\n session_write_close();\n return true;\n }", "public function __destruct() {\n session_write_close();\n return true;\n }", "function closeSession($session)\n {\n $client = getClient();\n $closeSession = new stdClass();\n $closeSession->session = $session;\n $client->closeSession($closeSession);\n }", "function shutdown() {\r\n // Write the session data to the disk\r\n session_write_close();\r\n}", "public function close() {\n\t\tparent::close();\n\t\tif ($this->lockFileName == null) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\t// Close the lock file channel (Which will also free any locks)\n\t\t\t$this->lockFileChannel->close();\n\t\t} catch ( \\Exception $e ) {\n\t\t\t// Problems closing the stream. Punt.\n\t\t}\n\t\tself::$locks->remove( $this->lockFileName );\n\t\t\n\t\t// Unlink (delete) the lock file\n\t\t$f = new File( $this->lockFileName );\n\t\t$f->delete();\n\t\t\n\t\t$this->lockFileName = null;\n\t\t$this->lockFileChannel = null;\n\t}", "public static function sessionClose()\n {\n return true;\n }", "private function close()\n\t{\n\t\tif ($this->memcache_connected)\n\t\t{\n\t\t\t$this->connection->close();\n\t\t\t$this->memcache_connected = false;\n\t\t}\n\t}", "public function destroySession() {}", "public static function Logout()\n {\n Session::CloseSession();\n }", "static function destroy() {\n\t\tsession_unset();\n\t\tsession_destroy();\n\t\tsession_write_close();\n\t}", "public static function destroySession();", "function lock_release(Session $session) {\n\t\tif (\n\t\t\t$this->lock !== NULL\n\t\t\t&& !$this->lock->is_owned_by($session)\n\t\t) {\n\t\t\tthrow new SlideLockException(\n\t\t\t\t\"Can't unlock a slide locked from another session.\"\n\t\t\t);\n\t\t}\n\t\t$this->lock = NULL;\n\t}", "private function unlock() {\n\t\tif (file_exists($this -> lockfile)) {\n\t\t\tunlink($this -> lockfile);\n\t\t}\n\t}", "function EndSession(){\n session_unset(); \n // destroy the session \n session_destroy(); \n }", "function db_pwassist_session_close()\n{\n\treturn true;\n}", "private function end() {\n if ($this->isSessionStarted()) {\n session_commit();\n $this->clear();\n }\n }", "function closeConnec() {\r\n unset($_SESSION[\"login\"]) ;\r\n unset($_SESSION[\"pwd\"]) ;\r\n }", "public function logout() {\n $s = Session::getInstance();\n $key = $this->sessionId;\n unset($s->$key);\n $this->setAuthed(false);\n }", "public function logout()\n {\n $this->session->end();\n }", "protected function _close()\n\t{\n\t\t$this->connID->close();\n\t}", "public static function writeClose()\n {\n if (self::$_writeClosed) {\n return;\n }\n \n session_write_close();\n self::$_writeClosed = true;\n }", "public function __destruct()\n\t{\n\t\t$this->writeSession();\n\t}", "public function close()\n {\n $this->session->sess_destroy();\n redirect('/home');\n }", "public function close() {\n if (!is_null($this->redis) && $this->redis->isConnected()) {\n $this->redis->close();\n $this->redis = null;\n $this->log(\"Shared Redis connection is closed.\");\n }\n }", "function deconnection($SessionClose) {\r\n\tif ($SessionClose==1) \r\n\t{\r\n\t if (isset($_COOKIE[session_name()])) {\r\n \t setcookie(session_name(), '', time()-42000, '/');\r\n\t }\r\n\t session_unset();\t \r\n\t $_SESSION = array();\r\n\t session_destroy();\r\n\t}\r\n}", "public static function logOut()\n {\n self::startSession();\n session_destroy();\n }", "public function logoutxxx()\n {\n $this->getSession()->destroy();\n }", "public function killSession()\n {\n $this->session->invalidate();\n }", "public function sessionEnd (){\n $this->load->library( 'nativesession' );\n $this->load->helper('url');\n\n //delete session data\n $this->nativesession->delete('userid');\n $this->nativesession->delete('userLevel');\n\n session_destroy();\n\n redirect(\"../../../iris/dashboard\");\n\t}", "public function force_close_session_controller(){\n\t\t\tsession_start(['name'=>'ASUSAP']);\n\t\t\tsession_unset();\n\t\t\tsession_destroy();\n\t\t\treturn header(\"Location: \".SERVERURL.\"login/\");\n\t\t}", "public function unlock() {\n }", "function closeSession($obj, $socket_id, $channel_id, $_DATA)\n {\n $dp=$this->dp;\n \n $sessionId = $_DATA['ses'];\n \n $q=\"UPDATE imk_SES SET status='C' WHERE id=\".$sessionId;\n $dp->setQuery($q);\n $dp->query();\n $err=$dp->getAffectedRows();\n if ($err < 1) {\n\t$obj->write($socket_id, $channel_id, \"err=\".$err . \";\"); \n\t}\n $obj->write($socket_id, $channel_id, \"err='OK';\"); \n }", "public static function destroy() {\t\t\t\n\t\t\tself::start();\n\t\t\tsession_regenerate_id(true); \n\t\t\t\n\t\t\tunset($_SESSION);\n\t\t\tsession_destroy();\n\t\t}", "public static function terminate(): void {\n\t\tself::$sessionInstance->terminate ();\n\t}", "function close() {\n if($this->locked) {\n foreach($this->users as $user => $pass) {\n if($this->cvs[$user]) {\n fputs($this->fplock, \"$user:$pass:\" . $this->cvs[$user] . \"\\n\");\n } else {\n fputs($this->fplock, \"$user:$pass\\n\");\n }\n }\n rename($this->lockfile, $this->filename);\n flock($this->fplock, LOCK_UN);\n $this->locked = false;\n fclose($this->fplock);\n }\n }", "protected function releaseLock() \n {\n $log = FezLog::get();\n $db = DB_API::get();\n \n $sql = \"DELETE FROM \".$this->_dbtp.\"locks WHERE \".$this->_dblp.\"name=?\";\n try {\n $db->query($sql, $this->_lock);\n }\n catch(Exception $ex) {\n $log->err($ex);\n $log->err(array(\"Queue releaseLock failed\", $res));\n } \n }", "public function kill_session()\n {\n $this->plugins->exec_hook('session_destroy');\n\n $this->session->kill();\n $_SESSION = array('language' => $this->user->language, 'temp' => true, 'skin' => $this->config->get('skin'));\n $this->user->reset();\n }", "private function renewSession() {}", "public function endSession() {\n $this->state = 0;\n $_SESSION['authstate'] = 0;\n setcookie('access_token', '', 0);\n setcookie('access_token_secret', '', 0);\n }", "function session_close($hash){\n if(isset($hash)){\n $session=mysqli_fetch_assoc(DB::select('sessions',['*'],'hash=\"'.$hash.'\"'));\n if(isset($session['closed'])&&$session['closed']==0){\n DB::update('sessions',['closed'=>1],'hash=\"'.$hash.'\"');\n }\n return User::logout();\n }\n return false;\n}", "public function destroy(){\n\t\tsession_unset();\n\t\t$id = $this->getId();\n\t\tif (!empty($id)) {\n\t\t\tsession_destroy();\n\t\t}\n\t}", "function closeSession($full=false,$regenSessionId=false){\r\n\t\tif( empty($_SESSION['moduser']['userId']) || $_SESSION['moduser']['userId'] !== $this->PK ){\r\n\t\t\treturn $this;\r\n\t\t}\r\n\t\tself::resetSesssion($full,$regenSessionId);\r\n\t\treturn $this;\r\n\t}", "public function unlock(): void;", "public static function close(){\n//\t\techo 'close'.\"\\n<br>\";\n//\t\t$db = RuntimeInfo::instance()->connections()->MySQL(RuntimeInfo::instance()->helpers()->Session()->getSessionConfig()->getHosts());\n\t\t\n\t\t// just because i'm closing a session, why does that mean i need to close the db connection?\n// \t\tif($db instanceof MySQLAbstraction)\n// \t\t{\n// \t\t\treturn $db->close();\n// \t\t}\n// \t\telse { return false; }\n\t}", "public function logout()\n {\n $this->user = null;\n $this->synchronize();\n unset($_SESSION);\n }", "public function logout()\n {\n session_unset();\n // deletes session file\n session_destroy();\n }", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close() {}", "public function close() {}", "public function close() {}", "public function close() {}", "public function __destruct()\n {\n foreach (static::$sessions as $session_id => $session) {\n try {\n static::$retry->retry(function () use ($session) {\n $session->delete();\n }, true);\n } catch (\\Exception $e) {\n }\n }\n }", "public function testCloseOnSuccess()\n {\n $config = array(\n 'cookie_name' => 'fs_session',\n 'match_ip' => false,\n 'save_path' => 'host=localhost,port=1234,timeout=30'\n );\n\n $lockKey = 'fs_session:1234:lock';\n $key = 'fs_session:1234';\n\n $redisDriver = new RedisDriver($config);\n\n $redisDriver->instantiateRedis($this->redisMock);\n\n $this->redisMock->expects($this->once())\n ->method('connect')\n ->with('localhost', '1234', '30')\n ->willReturn(true);\n\n $this->redisMock->expects($this->once())\n ->method('setex')\n ->with($lockKey, 300, 1)\n ->willReturn(true);\n\n $this->redisMock->expects($this->once())\n ->method('get')\n ->with($key)\n ->willReturn('SESSION-DATA');\n\n // close() required calls\n $this->redisMock->expects($this->once())\n ->method('ping')\n ->willReturn('+PONG');\n\n $this->redisMock->expects($this->once())\n ->method('close')\n ->willReturn(true);\n\n // lock releasing\n $this->redisMock->expects($this->once())\n ->method('delete')\n ->with($lockKey)\n ->willReturn(true);\n\n $open = $redisDriver->open(session_save_path(), 'fs_session');\n $read = $redisDriver->read('1234');\n $close = $redisDriver->close();\n\n $this->assertEquals(self::$true, $open);\n $this->assertEquals('SESSION-DATA', $read);\n $this->assertEquals(self::$true, $close);\n }", "public function unsetSession();", "public function close()\n {\n $this->fclose();\n }", "function close() {\n\t\t$this->disconnect();\n\t}", "public function delete() {\n $this->logger->debug(\"Deleting session\");\n $this->repository->removeByKey($this->getKeys());\n self::$instance = null;\n }", "protected function tearDown()\n {\n \t$this->session->close();\n }", "public function expireSession()\n\t{\n\t\t// TODO\n\t}", "public function close()\n {\n $this->connection->quit();\n unset($this->connection);\n $this->connection = null;\n }", "public static function destroy()\r\n {\r\n if (self::isStarted())\r\n {\r\n session_unset();\r\n session_destroy();\r\n }\r\n }", "function killSession() {\n session_start();\n session_destroy();\n header('location: login.php');\n }", "public function destroy() {\n\t\t\tif (isset($_SESSION)) {\n\t\t\t\tsession_destroy();\n\t\t\t} else {\n\t\t\t\t$this->response->throwErr(\"There's no active session\");\n\t\t\t\texit();\n\t\t\t}\n\t\t}", "public function logout() {\r\n\t\tSession::delete($this->_sessionName);\r\n\t}", "public function purge()\n {\n $this->_session->purge();\n }", "function _shutdown()\n {\n $curr_time = time();\n\n if (!isset($_SESSION['__sessionhandler']) ||\n ($curr_time >= $_SESSION['__sessionhandler'])) {\n\n $_SESSION['__sessionhandler'] = $curr_time + (ini_get('session.gc_maxlifetime') / 2);\n $this->_force = true;\n }\n }" ]
[ "0.8162429", "0.7985942", "0.7335534", "0.731751", "0.7297254", "0.72207665", "0.6990429", "0.6941734", "0.68420285", "0.681307", "0.6752454", "0.6674101", "0.665993", "0.6646683", "0.65924126", "0.6590808", "0.65864384", "0.6555097", "0.65355855", "0.64999765", "0.64740115", "0.6463241", "0.64164394", "0.64116913", "0.64007354", "0.6374977", "0.6346465", "0.63172823", "0.62948287", "0.62700075", "0.6251785", "0.62465715", "0.61944455", "0.61709476", "0.61630315", "0.61598533", "0.61401695", "0.6111801", "0.61044186", "0.6100137", "0.609213", "0.6088539", "0.6076909", "0.60642946", "0.6062987", "0.6061249", "0.60467297", "0.6033661", "0.6033372", "0.60048884", "0.60036474", "0.5982206", "0.59780616", "0.59738904", "0.5961906", "0.5952375", "0.5943405", "0.5936877", "0.5935823", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.59230036", "0.5897769", "0.5897769", "0.5897769", "0.58975893", "0.5895047", "0.58941144", "0.58933175", "0.5889278", "0.5883106", "0.5880821", "0.5880703", "0.5868932", "0.58664703", "0.58662283", "0.5860198", "0.58583915", "0.58542585", "0.5847506", "0.5843638" ]
0.7412623
2
Get card details request
public function getCardDetails($parameters = array()) { return $this->createRequest('TopBetta\Services\Accounting\Gateways\Message\RapidDirectGetCardRequest', $parameters); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function card_details(Request $request) {\n\n $cards = Card::select('user_id as id','id as card_id','customer_id',\n 'last_four', 'card_token', 'is_default', \n \\DB::raw('DATE_FORMAT(created_at , \"%e %b %y\") as created_date'))\n ->where('user_id', $request->id)->get();\n\n $cards = (!empty($cards) && $cards != null) ? $cards : [];\n\n $response_array = ['success'=>true, 'data'=>$cards];\n\n return response()->json($response_array, 200);\n }", "function getCardDetail()\n {\n $disabled = array();\n $required = array();\n \n if ($this->vars[\"card_id\"]) {\n $action = 2; // modify\n // find all the disabled fields for current action\n foreach ($this->fieldData[\"detailview\"] as $dkey => $dval) {\n if (in_array($action, $dval[\"disabled\"])) {\n $disabled[] = $dkey;\n }\n }\n // find all the required fields for current action\n foreach ($this->fieldData[\"detailview\"] as $rkey => $rval) {\n if (in_array($action, $rval[\"required\"])) {\n $required[] = $rkey;\n }\n }\n\n $res =& $this->db->query(\"SELECT * FROM `module_isic_card` WHERE `id` = !\", $this->vars[\"card_id\"]);\n $result = array();\n if ($data = $res->fetch_assoc()) {\n $t_pic = str_replace(\"_thumb.jpg\", \".jpg\", $data[\"pic\"]);\n if (file_exists(SITE_PATH . $t_pic)) {\n $data[\"pic\"] = $t_pic;\n } else {\n $data[\"pic\"] = \"\";\n }\n $data[\"person_birthday\"] = date(\"d/m/Y\", strtotime($data[\"person_birthday\"]));\n $data[\"expiration_date\"] = date(\"d/m/Y\", strtotime($data[\"expiration_date\"]));\n $data[\"status_id\"] = $data[\"status_id\"] ? $data[\"status_id\"] : '';\n $data[\"bank_id\"] = $data[\"bank_id\"] ? $data[\"bank_id\"] : '';\n $result[] = $data;\n echo JsonEncoder::encode(array('success' => true, 'data' => $result, 'disable' => $disabled, 'require' => $required));\n } else {\n echo JsonEncoder::encode(array('error' => 'cold not load data'));\n }\n } else {\n $action = 1; // add\n // find all the disabled fields for current action\n foreach ($this->fieldData[\"detailview\"] as $dkey => $dval) {\n if (in_array($action, $dval[\"disabled\"])) {\n $disabled[] = $dkey;\n }\n }\n // find all the required fields for current action\n foreach ($this->fieldData[\"detailview\"] as $rkey => $rval) {\n if (in_array($action, $rval[\"required\"])) {\n $required[] = $rkey;\n }\n }\n $result[] = array(\"pic\" => \"\");\n echo JsonEncoder::encode(array('success' => true, 'data' => $result, 'disable' => $disabled, 'require' => $required));\n }\n exit();\n }", "public function get_card_info($card_id, Request $request){\n\t\t\n\t\t$login_info = $request->session()->get('total_info');\n\t\t\n\t\t$card = App\\Card::find($card_id);\n\t\tif(null !== $card){\n\t\t\t$card->valid_forever = ($card->valid_period == null);\n\t\t\t$card->expire_remain_days = floor( (strtotime($card->valid_period) - time()) / 86400 );\n\t\t\t$card->dealer;\n\t\t\t$card->product;\n\t\t\t$card->customer;\n\t\t\t$card->product_stock = App\\Stock::getDealerStockInfo($card->product_id, $login_info['dealer_id']);\n\t\t\tif($card->product){\n\t\t\t\t$card->product->level1_info;\n\t\t\t\t$card->product->level2_info;\n\t\t\t}\n\t\t\t$return_arr = array(\"status\" => true, 'card' => $card);\n\t\t}else{\n\t\t\t$return_arr = array(\"status\" => false);\n\t\t}\n\t\techo json_encode($return_arr);\n\t}", "function card_get(){\n\t\tif ($this->get('idspbu') == NULL){\n\t\t\t$this->response(array( 'status' => \"ID SPBU not found\" ), 408);\n\t\t} else {\n\t\t\t$param['id_spbu'] = $this->get('idspbu');\n\t\t\t$param['id_pelanggan'] = $this->get('idpelanggan');\n\t\t\t$param['id_card'] = $this->get('idcard');\n\t\t\t$param['nik'] = $this->get('nik');\n\t\t\t\n\t\t\t$response = $this->rest_model->getCard($this->get('idspbu'), $param);\n\t\t\tif(!empty($response)){\n\t\t\t\t$this->response($response, 200);\n\t\t\t} else {\n\t\t\t\t$this->response(array( 'status' => \"NULL\" ), 406);\n\t\t\t}\n\t\t}\n\t}", "public function billing_card_info_details() {\n\n $option = [\n 'projection' => [\n '_id' => 1,\n 'cardnumber' => 1,\n 'cvv' => 1,\n 'expiry_month' => 1,\n 'expiry_year' => 1,\n 'firstname' => 1,\n 'lastname' => 1,\n 'email'=>1,\n 'customer_id'=>1,\n 'address' => 1,\n 'city' => 1,\n 'state' => 1,\n 'country' => 1,\n 'postal_code' => 1,\n 'subscription_id'=>1,\n 'customer_id'=>1\n ]\n ];\n $result = $this->mongo_db->find(MDB_BILLING_REG_INFO, array('_id' => 1), $option);\n return (!empty($result)) ? $result : '';\n }", "function CardInfo(){\r\n }", "public function getCard() {\n return $this->card;\n }", "public function testGetCardInfo()\n {\n $card = factory('App\\Card')->create();\n\n $response = $this->actingAs($card->owner, 'api')\n ->withHeader('Accept', 'application/json')\n ->get(route('api.cards.info', [$card->number]));\n\n $response->assertOk();\n $response->assertJsonStructure([\n 'currency',\n 'owner',\n ]);\n }", "public function getCard()\n {\n return $this->card;\n }", "public function get_card(){ return $this->_card;}", "final public static function awaitingForCustomerCardDetails()\n {\n return self::get(820);\n }", "function get_card_info($file){\n $template_data = get_file_data( $file , array( 'Card' => 'Card' ) );\n if (!empty($template_data['Card'])) {\n return $template_data['Card'];\n }\n }", "public function getCardData()\n {\n $cardData = $this->dashboardHelper->getFormattedCardData(request()->all());\n\n return response()->json($cardData);\n }", "public function getAccountDetails(){\n\t\t$url = \"/account/details/\";\n\t\t$method='get';\n\t\treturn $this->request($url , $method);\n\t}", "public function askForCard()\n {\n }", "public function getProviderCreditDetails($requestParameters = array());", "protected function getCardData()\n {\n $this->getCard()->validate();\n\n $card = array();\n $card['name'] = $this->getCard()->getName();\n $card['number'] = $this->getCard()->getNumber();\n $card['expiry_month'] = $this->getCard()->getExpiryDate('m');\n $card['expiry_year'] = $this->getCard()->getExpiryDate('y');\n $card['cvd'] = $this->getCard()->getCvv();\n\n return $card;\n }", "public function show(Card $card)\n {\n //\n }", "public function show(Card $card)\n {\n //\n }", "public function show(Card $card)\n {\n //\n }", "public function show(Card $card)\n {\n //\n }", "abstract public function getDetails();", "public function getCard()\n {\n return $this->vaultHelper->getQuoteCard($this->getSubscription()->getQuote());\n }", "public function printCardInfo() {\n\t\tprint $this->strRepresentation();\n\t}", "function InfGetCreditCard($inf_contact_id, $inf_card_id) {\n\t$object_type = \"CreditCard\";\n\t$class_name = \"Infusionsoft_\" . $object_type;\n\t$object = new $class_name();\n\t$object->removeRestrictedFields(); // Remove CreditCard and CVV\n\t$objects = Infusionsoft_DataService::query(new $class_name(), array('Id' => $inf_card_id, 'ContactId' => $inf_contact_id, 'Status' => 3));\n\n $cards_array = array();\n foreach ($objects as $i => $object) {\n $cards_array = $object->toArray();\n }\n\treturn $cards_array; // Should only be one card\n}", "public function index(CardRequest $request)\n {\n return $request->availableCards();\n }", "public function card();", "public function details_get()\n \t{\n \t\tlog_message('debug', 'Score/details_get');\n\n\t\t$result = $this->_score->get_details(\n\t\t\t$this->get('type'),\n\t\t\t$this->get('codes'),\n\t\t\textract_id($this->get('userId')),\n\t\t\t(!empty($this->get('storeId'))? extract_id($this->get('storeId')): '')\n\t\t);\n\n\t\tlog_message('debug', 'Score/details_get:: [1] result='.json_encode($result));\n\t\t$this->response($result);\n\t}", "public function getCard(): ?string\n {\n return $this->card;\n }", "public function getCard(): bool {\n $result = $this->mysqli->query(\"SELECT * FROM cards WHERE id='{$this->id}'\");\n if($result->num_rows == 1) { # Card exists in database\n $card = $result->fetch_assoc();\n $this->cardNum = $card['card_num'];\n $this->name = $card['name'];\n $this->billingAddress = $card['billing_address'];\n $this->exp = $card['exp'];\n $this->securityCode = $card['security_code'];\n return true;\n } else { # Card doesn't exist yet\n return false;\n }\n }", "public function extendedcardread()\n {\n $id_item = $this->request->getParameter(\"id\");\n $item = $this->item->getItem($id_item);\n $categories = $this->category->getCategories();\n $id_category = $item['catid'];\n $category = $this->category->getCategory($id_category);\n $links = $this->link->getLinks($id_item);\n $this->generateadminView(array(\n 'item' => $item,\n 'category' => $category,\n 'categories' => $categories,\n 'links' => $links\n ));\n }", "public function getCards();", "public function detailsAction(Request $request)\n {\n\n }", "public function getDetails() {\n return $this->_get( 'details', array() );\n }", "public function getProviderCreditReversalDetails($requestParameters = array());", "public function card()\n {\n if ( ! $this->bean->card) $this->bean->card = R::dispense('card');\n return $this->bean->card;\n }", "public function actionCardIndex() {\n $searchModel = new UserCardSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $this->pageSize);\n $card_physical_id = [];\n $cardInfo = [];\n if ($dataProvider->getModels()) {\n// $card_physical_id = $dataProvider->query->asArray()->all();\n// $card_physical_id = array_column($all, 'card_id');\n foreach ($dataProvider->getModels() as $model) {\n $card_physical_id[] = $model->getAttributes();\n }\n }\n if ($card_physical_id) {\n try {\n $url = Yii::$app->request->getHostInfo() . Url::to(['@cardCenterCardInfoBySn']);\n $cardInfo = Common::curlPost($url, ['f_card_id' => $card_physical_id]);\n $cardInfo = $cardInfo ? json_decode($cardInfo, true) : '';\n } catch (Exception $exc) {\n $cardInfo = [];\n }\n }\n return $this->render('/card/index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'cardInfo' => $cardInfo,\n ]);\n }", "public function getIdCard()\n {\n return $this->id_card;\n }", "public function getBoardingCardInfo($card)\n {\n $from = isset($card['from'])?$card['from']:'';\n $to = isset($card['to'])?$card['to']:'';\n $seat = isset($card['transport']['seat'])?$card['transport']['seat']:'';\n $gate = isset($card['transport']['gate'])?$card['transport']['gate']:'';\n $extraInfo = isset($card['transport']['extra'])?$card['transport']['extra']:'';\n $flight = isset($card['transport']['flight'])?$card['transport']['flight']:'';\n\n $str = \"From {$from}, take flight {$flight} to {$to}. Gate {$gate}, seat {$seat}. {$extraInfo}.\";\n return $str;\n }", "public function getCidCard()\n {\n return $this->cid_card;\n }", "public function getCaptureDetails($requestParameters = array());", "public function getCreditCardById($customer_id, $card_id)\n {\n \n // verify the required parameter 'customer_id' is set\n if ($customer_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $customer_id when calling getCreditCardById');\n }\n // verify the required parameter 'card_id' is set\n if ($card_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $card_id when calling getCreditCardById');\n }\n \n // parse inputs\n $resourcePath = \"/customer/{customer_id}/credit_card/{card_id}\";\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n $method = \"GET\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));\n \n \n \n // path params\n if ($customer_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"customer_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($customer_id),\n $resourcePath\n );\n }// path params\n if ($card_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"card_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($card_id),\n $resourcePath\n );\n }\n \n \n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } else if (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n \n $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . \":\" . $this->apiClient->getConfig()->getPassword());\n \n \n // make the API Call\n try\n {\n list($response, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, $method,\n $queryParams, $httpBody,\n $headerParams, '\\Tpaga\\Model\\CreditCard'\n );\n \n if (!$response) {\n return null;\n }\n\n return $this->apiClient->getSerializer()->deserialize($response, '\\Tpaga\\Model\\CreditCard', $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Tpaga\\Model\\CreditCard', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n \n throw $e;\n }\n \n return null;\n \n }", "function spgateway_credit_MetaData() {\n return array(\n 'DisplayName' => 'spgateway - 信用卡',\n 'APIVersion' => '1.1', // Use API Version 1.1\n 'DisableLocalCredtCardInput' => false,\n 'TokenisedStorage' => false,\n );\n}", "public function cards(Request $request)\n {\n return [\n\n ];\n }", "public function getCardReference()\n {\n return $this->data->creditCard->token;\n }", "public function getCardData() : array {\n return $this->getObjectInfo($this);\n }", "public function get_details()\n\t{\t\n\t\t$id = $this->input->post('id');\n\t\tif($id != '')\n\t\t{\n\t\t\t$contact_details = $this->contact_model->get_contact_details($id);\n\t\t\t$response = array('details' => $contact_details);\n\t\t\techo json_encode($response);\n\t\t}\n\t}", "public function show(Request $request, $id)\n {\n $username = $request->input('username');\n $shopper = Shopper::where('email', $username)->first();\n\n if (!empty($shopper)) {\n return response()->json(Card::find($id));\n } else {\n return response('{\"error\":\"Invalid arguments\"}', 500);\n }\n\n }", "public function show(CreditCard $creditCard)\n {\n //\n }", "public function getCard(): Model\\CardSetting\n {\n return $this->card;\n }", "public function retrieveAccountDetails()\n {\n $segments = \"/account\";\n\n return $this->createRequest($segments);\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function getAllCard(){\n $cards = Card::all();\n\n return response()->json([\n 'response_code' => 200,\n 'status' => 'success',\n 'message' => \"berhasil mendapatkan semua card\",\n 'error' => (Object)[],\n 'cards' => $cards\n ],200);\n }", "public function generateCreditCardInfo() {\n $ret = [\"CreditCardInfo\" => []];\n $ret[\"CreditCardInfo\"][] = [\"cardNumber\" => $this->creditCardNo];\n $ret[\"CreditCardInfo\"][] = [\"expiryDate\" => $this->getFormattedExpiryDate()];\n if ($this->cvv != null)\n $ret[\"CreditCardInfo\"][] = [\"cvv\" => $this->cvv];\n return $ret;\n }", "function details() {\r\n\t\r\n\t\t// Id of the annonce\r\n\t\t$id = $_REQUEST['id'];\n\t\t\r\n\t\t// Find it\r\n\t\t$request = new Annonce();\r\n\t\t$request->id = $id;\r\n\t\t$res = $request->find();\r\n\t\r\n\t\t// Should have only one result\r\n\t\tif (sizeof($res) != 1) {\r\n\t\t\tthrow new InternalError(\"Expected one result for Annonce (id=$id). Got \" . sizeof($res));\r\n\t\t}\r\n\t\n\t\t$this->annonce = $res[0];\r\n\t\r\n\t\t// Redirect to list\r\n\t\t$this->renderView(\"detailsAnnonce\");\r\n\t}", "public function show(Postcard $postcard)\n {\n //\n }", "public function getDetail();", "protected function getCards($args) {\n\n if ($args['ent_date_time'] == '')\n return $this->_getStatusMessage(1, 1);\n\n $this->curr_date_time = urldecode($args['ent_date_time']);\n\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '2');\n\n if (is_array($returned))\n return $returned;\n\n if ($this->User['stripe_id'] == '')\n return $this->_getStatusMessage(51, 51);\n\n $getCardArr = array('stripe_id' => $this->User['stripe_id']);\n\n $cardsArr = array();\n\n $card = $this->stripe->apiStripe('getCustomer', $getCardArr);\n\n if ($card['error'])\n return array('errNum' => 16, 'errFlag' => 1, 'errMsg' => $card['error']['message'], 'test' => 2);\n\n foreach ($card['cards']['data'] as $c) {\n $cardsArr[] = array('id' => $c['id'], 'last4' => $c['last4'], 'type' => $c['brand'], 'exp_month' => $c['exp_month'], 'exp_year' => $c['exp_year']);\n }\n\n if (count($cardsArr) > 0)\n $errNum = 52;\n else\n $errNum = 51;\n\n $errMsgArr = $this->_getStatusMessage($errNum, 52);\n return array('errNum' => $errMsgArr['errNum'], 'errFlag' => $errMsgArr['errFlag'], 'errMsg' => $errMsgArr['errMsg'], 'cards' => $cardsArr, 'def' => $card['default_card']);\n }", "public function findAction() {\n // todo log access\n $cardname = $this->_request->getParam('cardname');\n if (empty($cardname)) {\n $this->getHelper('redirector')->goto('index', 'index');\n }\n else {\n $this->getHelper('redirector')->gotoUrl('/index/search/card/' . rawurlencode($cardname));\n }\n }", "public function show(Card $card) {\n //$card = Card::find($card); // This is using Laravels built in stuff.\n \n // This without any of the above and using show(Card $card) is using \n // even more built in stuff from Laravel.\n return view('cards.show', compact('card')); \n\n }", "function get_order_details_get()\n { \n $input = $this->get();\n \n if(!isset($input['id']) || $input['id'] == '') \n { \n $message = ['status' => FALSE,'message' => $this->lang->line('text_rest_invalidparam')];\n $this->set_response($message, REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400)\n }\n else\n {\n $trip_data = $this->Common_model->getOrderDetails($input['id']);\n if($trip_data){\n $message = ['status' => TRUE,'message' => $this->lang->line('trip_details_found_success'),'data'=>$trip_data];\n $this->set_response($message, REST_Controller::HTTP_OK); // OK (200)\n }\n else{\n $message = ['status' => FALSE,'message' => $this->lang->line('trip_details_found_error')];\n $this->response($message, REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400)\n }\n \n }\n }", "protected function detail($id)\n\t{\n\t\t$show = new Show(Card ::findOrFail($id));\n\n\t\t$show -> field('id', __('ID'));\n\t\t$show -> field('card', __('卡号'));\n\t\t$show -> field('password', __('密码'));\n\t\t$show -> field('type', __('类型'));\n\t\t$show -> field('consume', __('是否已充值'));\n\t\t$show -> field('key', __('被充值Key'));\n\t\t$show -> field('consumetime', __('充值时间'));\n $show -> field('beifeng', __('是否被封'));\n\n\t\treturn $show;\n\t}", "public function getNameCard()\n {\n return $this->get(self::_NAME_CARD);\n }", "public function getCardcode()\n {\n return $this->cardcode;\n }", "public function cards(Request $request) {\n return [];\n }", "public function getCreditCard()\n {\n return $this->creditCard;\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }", "public function cards(Request $request)\n {\n return [];\n }" ]
[ "0.7329979", "0.7292767", "0.7267805", "0.7259959", "0.7195169", "0.6851935", "0.6775561", "0.6733595", "0.6702249", "0.6688055", "0.66441643", "0.64680374", "0.64126635", "0.6390764", "0.6261462", "0.6248112", "0.62083733", "0.6135064", "0.6135064", "0.6135064", "0.6135064", "0.61170256", "0.61019987", "0.6056641", "0.6029994", "0.6017136", "0.60148335", "0.6010147", "0.598099", "0.59679514", "0.5954298", "0.5909703", "0.59014", "0.5885673", "0.58737224", "0.58466977", "0.5841592", "0.5825096", "0.5824062", "0.58198", "0.5792339", "0.5790848", "0.57895786", "0.57535666", "0.57521945", "0.57371527", "0.57234305", "0.5720403", "0.5712166", "0.57000935", "0.56813926", "0.56763244", "0.56763244", "0.56691104", "0.56654364", "0.5661392", "0.5645082", "0.56395704", "0.5597433", "0.5587775", "0.5584626", "0.55712134", "0.5563302", "0.5554924", "0.5537407", "0.553377", "0.5528943", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088", "0.5528088" ]
0.7026273
5
/$result = MessageCode::query() >where(MessageCode::FIELD_MOBILE,$mobile) >where(MessageCode::FIELD_CODE,$code) >where(MessageCode::FIELD_UPDATED_AT,'first(); return $result;
public static function getEffectMessageCode($mobile,$code) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_email_from_code(){\n\n $query = $this->db->get_where('tbl_doctor');\n }", "public static function findByCode($code) {\n return self::find()->where(['code' => $code])->one();\n }", "public static function getAllMessages($sender, $receiver)\n{\n $messages = DB::select('select global_id, sender, receiver, body, type from messages where \n sender = \"'.$sender.'\" AND receiver = \"'.$receiver.'\" or \n sender = \"'.$receiver.'\" AND receiver = \"'.$sender.'\" ORDER BY created_at asc');\n\n return $messages;\n}", "public function Query(){\r\n\t\treturn self::get_query();\r\n\t}", "public function search_customer_bymobile($mobile = \"\"){\r\n $query = $this->db->get_where('view_customer_info', array('mobile' => $mobile,'is_finish_registration' => '1'));\r\n return $query->row_array();\r\n }", "public static function query()\n {\n $query = DB::table('LENDER as l')\n ->leftJoin('LENDER_TYPE as lt', 'l.LENDER_TYPE', 'lt.LENDER_TYPE')\n ->where('l.BRANCH_ID', 'IHTVN1')\n ->where('l.LENDER_DATE','>=','20190101')\n ->orderBy('l.LENDER_NO', 'desc');\n return $query;\n }", "public function search($query)\n {\n //return $this->model->where('name', 'like', \"%$query%\")->where('user_id', 1)->get();\n return Contact::search($query)->where('user_id', 1)->get();\n }", "public function _query()\n {\n }", "public function getQuery(): ActiveQuery\n {\n return ContactData::find();\n }", "public function query()\n {\n if($this->type ==1){\n return Upgrade::query()->where(['status'=>0,'year'=>currentYear(),'semester'=>currentSemester()]);\n }\n elseif ($this->type==2){\n return Upgrade::query()->where(['status'=>1,'year'=>currentYear(),'semester'=>currentSemester()]);\n }\n\n\n }", "public function getByCode($code) {\n\n\t\t$select = $this->_db->select()\n\t\t\t->from(array('device' => 'device'))\n\t\t\t->joinInner(array('account' => 'account'), 'account.account_code = device.account_code', array('account_name'))\t\t\t\n\t\t\t->joinLeft(array('room' => 'room'), 'room.room_code = device.room_code and room_deleted = 0')\t\t\n\t\t\t->where('account_deleted = 0 and account.account_code = ?', $this->_account)\n\t\t\t->where('device_code = ?', $code)\n\t\t\t->limit(1);\t\t\n\n\t\t$result = $this->_db->fetchRow($select);\n\t\treturn ($result == false) ? false : $result = $result;\t\t\n\t}", "public function getMessageBy( ){\n \n $query = \"SELECT * FROM tbl_mails WHERE USER_ID=\".$this->sql->Param('a').\" AND READ_='0'\";\n \n \n $stmt = $this->sql->Prepare($query);\n $stmt =$this->sql->Execute($stmt,array($_SESSION[ID]));\n $obj = $stmt->FetchNextObject();\n \n return $obj;\n }", "public function query() {\n\n }", "function getMobileNew()\n {\n $query = \"select * from {$this->table} where Theloai_idTheloai = 2 and visibleOnHome = 1 limit 4\";\n $pre = $this->db->prepare($query);\n $pre->execute();\n $data = $pre->fetchAll(PDO::FETCH_ASSOC);\n $pre->closeCursor();\n return $data;\n }", "public function Query(){\n\t}", "public function Query(){\n\t}", "public function Query(){\n\t}", "function customQuery($query) \t{\n $res = $this->execute($query);\n\t\t return $res;\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 getByCode($code)\n\t{\n\t\t\n\t\t$select = $this->_db->select()\t\n\t\t\t\t\t->from(array('_comms' => '_comms'))\t\t\t\t\t\t\t\t\n\t\t\t\t\t->where('_comms_code = ?', $code)\n\t\t\t\t\t->limit(1);\n \n\t $result = $this->_db->fetchRow($select);\n return ($result == false) ? false : $result = $result;\n\n\t}", "public function getFromCode($code)\n {\n if($code != null)\n {\n $this->db->select('I.*', FALSE);\n $this->db->select('T.name AS type');\n $this->db->select('S.status AS status');\n $this->db->from('items AS I');\n $this->db->join('item_type AS T', 'T.id = I.item_type_id');\n $this->db->join('item_status AS S', 'S.id = I.item_status_id');\n $query = $this->db->where('I.code', $code)\n ->limit(1)\n ->get();\n if(!empty($query->result()))\n {\n return $query->result()[0];\n }\n else\n {\n return NULL;\n }\n }\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 data_earphone(){\n return $this->db->get_where(\"tb_barang\", array('kategori' => 'earphone'));\n }", "function messages_addQueries() {\n\treturn array(\n\t\t//this one is a bit of a beast, but it saves using many queries\n\t\t'getLatestByUser' => '\n\t\t\tSELECT\n\t\t\t\tMAX(msg.id) last_id,\n\t\t\t\tmsg.message last_message,\n\t\t\t\tIF(msg.`from` = :user, \\'out\\', \\'in\\') last_direction,\n\t\t\t\tIF(msg.`from` = :user, 1, msg.`read`) last_read,\n\t\t\t\tUNIX_TIMESTAMP(CONCAT(msg.sent,\"+00:00\")) last_sent,\n\t\t\t\totheruser.name otheruser_name,\n\t\t\t\totheruser.id otheruser_id\n\t\t\tFROM\n\t\t\t\t(\n\t\t\t\t\tSELECT seconduser, MAX(id) lastid FROM\n\t\t\t\t\t(\n\t\t\t \t\t(\n\t\t\t \t\tSELECT `to` seconduser, id\n\t\t\t \t\tFROM !prefix!user_pms\n\t\t\t \t\tWHERE `from` = :user AND deleted = 0\n\t\t\t \t\t) UNION (\n\t\t\t \t\tSELECT `from` seconduser, id\n\t\t\t \t\tFROM !prefix!user_pms\n\t\t\t\t\t\t\tWHERE `to` = :user AND deleted = 0\n\t\t\t \t\t)\n\t\t\t \t) lasttwo GROUP BY seconduser\n\t\t\t\t) lastmsg\n\t\t\tINNER JOIN\n\t\t\t\t!prefix!users otheruser\n\t\t\t\tON\n\t\t\t\t\totheruser.id = seconduser\n\t\t\tINNER JOIN\n\t\t\t\t!prefix!user_pms msg\n\t\t\t\tON\n\t\t\t\t\tmsg.id = lastid\n\t\t\tGROUP BY otheruser_id\n\t\t\tORDER BY last_id DESC\n\t\t',\n\t\t'getUnreadCountByUser' => '\n\t\t\tSELECT COUNT(*) FROM !prefix!user_pms WHERE `to` = :user AND `read` = 0\n\t\t',\n\t\t'getMessagesBetweenUsers' => '\n\t\t\tSELECT pm.id pm_id, message,UNIX_TIMESTAMP(CONCAT(sent,\"+00:00\")) AS sent, userfrom.name from_name, userto.name to_name, userfrom.id from_id, userto.id to_id\n\t\t\t\tFROM !prefix!user_pms pm\n\t\t\tINNER JOIN\n\t\t\t\t!prefix!users userto\n\t\t\tON\n\t\t\t\tuserto.id = `to`\n\t\t\tINNER JOIN\n\t\t\t\t!prefix!users userfrom\n\t\t\tON\n\t\t\t\tuserfrom.id = `from`\n\t\t\tWHERE\n\t\t\t(\n\t\t\t\t(`from` = :firstuser AND `to` = :seconduser)\n\t\t\t\t\tOR\n\t\t\t\t(`from` = :seconduser AND `to` = :firstuser)\n\t\t\t) AND deleted = 0\n\t\t\tORDER BY sent DESC\n\t\t',\n\t\t'deleteMessage' => '\n\t\t\tUPDATE !prefix!user_pms SET deleted = 1 WHERE id = :id AND `to` = :user\n\t\t',\n\t\t'sendMessage' => '\n\t\t\tINSERT INTO !prefix!user_pms (`from`,`to`,`message`) VALUES (:from, :to, :message) \n\t\t',\n\t\t'setMessagesAsRead' => '\n\t\t\tUPDATE !prefix!user_pms SET `read` = 1 WHERE `from` = :seconduser AND `to` = :firstuser\n\t\t'\n );\n}", "public function verify_email($code) {\n $this->db->select('*');\n $this->db->from('vendors');\n $this->db->join('business_details', 'business_details.business_id = vendors.id');\n $this->db->where('vendors.email_verification_code', $code);\n $query = $this->db->get();\n $query_result = $query->result();\n if (!empty($query_result)) {\n $order_status_update = array(\n 'email_verification_status' => '1'\n );\n\n $this->db->where('email_verification_code', $code);\n $this->db->update('vendors', $order_status_update);\n\n\n $partner_details = array();\n if (count($query_result) == 0) {\n $partner_details = $query_result;\n } else {\n $partner_details = $query_result[0];\n }\n return $partner_details;\n } else {\n return \"not matched\";\n }\n }", "public function query()\n\t{\n\t\t\n\t}", "function getws_message_movil(){\n\t\t\n\t\tif(!empty($this->input->post('idrequest')))\n\t\t{\n\t\t\t$this->db->where('a.id_request_sd',$this->input->post('idrequest'));\n\n\t\t}\t\t\n\t\telse {\n\t\t\t$this->db->where('a.id_request_sd','*');\n\t\t}\n\t\t\n\n\t\t$result = $this->db->select(\" a.id_request_sd,a.client_message,a.client_message_type,\n\t\t\t\t\t\t\t\t\t\ta.last_read_bar_qr,a.client_message_view \")\n\t\t\t\t->from('ws_message_movil a')\n\t\t\t\t\n\t\t\t\t->ORDER_BY('a.id_request_sd','asc')\n\t\t\t\t->get();\n\n\t\treturn $result->row();\n\n\n\t}", "public function query($query){\n return $this->connection->query($query);\n }", "public static function query();", "function findByQuery($query){\r\n\t\t\tif (isset($query)&& trim($query)!=''){\t\t//@argument Contains value Or Not\r\n\t\t\t\t$this->db->trans_start(); \t//start database transction\r\n\t\t\t\t$object = $this->db->query($query);\r\n\t\t\t\t$this->db->trans_complete(); //complete database transction\t\r\n\t\t\r\n\t\t\tif ($this->db->trans_status() === FALSE){ //it returns false if transction falied\r\n\t\t\t\t$this->db->trans_rollback();\t\t\t//Rollback to previous state\r\n\t\t\t}else{\r\n\t\t\t\t$this->db->trans_commit();\t\t\t//either Commit data\r\n\t\t\t}\r\n\t\t}\r\n\t\t\treturn $object->result();\r\n\t}", "public function getByCode($code) {\n\t\t$select = $this->_db->select()\t\n\t\t\t\t\t\t->from(array('mileage' => 'mileage'))\n\t\t\t\t\t\t->joinLeft('car', 'car.car_code = mileage.car_code')\n\t\t\t\t\t\t->joinLeft('booking', 'booking.booking_code = mileage.booking_code and booking_deleted = 0')\t\t\t\t\t\t\n\t\t\t\t\t\t->joinLeft('mileagetype', 'mileagetype.mileagetype_code = mileage.mileagetype_code')\n\t\t\t\t\t\t->where('mileage_deleted = 0 and car_deleted = 0 and mileagetype_deleted = 0')\n\t\t\t\t\t ->where('mileage.mileage_code = ?', $code)\n\t\t\t\t\t ->limit(1);\n\t\t\n\t $result = $this->_db->fetchRow($select);\t\n return ($result == false) ? false : $result = $result;\t\t\t\t\t \n\t}", "public function query();", "public function query();", "public function query();", "public abstract function get_query();", "public function get_query(){\n return $this->build_query()->query;\n }", "public function queryCode($id) {\n\t\t$q = $this->query();\n\t\t$q->filterByCode($id);\n\t\treturn $q;\n\t}", "public function search() {\n $sql = \"SELECT * FROM tb_msg ORDER BY id DESC\";\n $stmt = $this->db->prepare($sql);\n\n// $stmt->bindValue(\":senha\", $this->aluno->getSenha());\n $stmt->execute();\n $result = $stmt->fetchAll();\n return $result;\n }", "public function getByCode($code)\n\t{\t\t\n\t\t$select = $this->_db->select()\t\n\t\t\t\t\t->from(array('_comm' => '_comm'))\t\t\t\t\n\t\t\t\t\t->joinLeft('account', 'account.account_code = _comm.account_code and account_deleted = 0')\t\n\t\t\t\t\t->joinLeft(array('areapost' => 'areapost'), 'areapost.areapost_code = account.areapost_code')\t\t\t\t\t\n\t\t\t\t\t->where('_comm_code = ?', $code)\t\t\t\t\t\n\t\t\t\t\t->limit(1);\n \n\t\t$result = $this->_db->fetchRow($select);\n return ($result == false) ? false : $result = $result;\n\n\t}", "public function getByCode($code) {\n\t\t$select = $this->_db->select()\t\n\t\t\t\t\t->from(array('comment' => 'comment'))\n\t\t\t\t\t->joinLeft(array('rate' => 'rate'), \"rate.rate_item_type = 'COMMENT' and rate.rate_item_code = comment.comment_code and rate_deleted = 0\", array('rate_number', 'rate_percent' => '(rate.rate_number/10)*100'))\n\t\t\t\t\t->where('comment_deleted = 0 and comment_active = 1')\n\t\t\t\t\t->where('comment_code = ?', $code)\n\t\t\t\t\t->limit(1);\n \n\t\t$result = $this->_db->fetchRow($select);\n return ($result == false) ? false : $result = $result;\n\t}", "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}", "public function findOne(array $where): object{ // [email => [email protected], first_name => sabo]\n $tableName = static::tableName();\n $attributes = array_keys($where);\n // $array = array_map(fn($attr) =>\"$attr = :$attr\", $attributes);\n // $combining = implode(\"AND\", $array);\n $query = implode(\"AND\", array_map(fn($attr) =>\"$attr = :$attr\", $attributes));\n $st = self::prepare(\n \"SELECT * FROM $tableName\n WHERE $query\"\n );\n foreach($where as $key => $item){\n $st->bindValue(\":$key\", $item);\n }\n $st->execute();\n return $st->fetchObject(static::class);\n }", "public function query()\n {\n $query = Customer::whereHas('verify',function($query) {\n $query->where('verify_by', Auth::user()->id)->where('status','0');\n });\n\n return $this->applyScopes($query);\n }", "public function where()\n {\n return $this->query; \n }", "function get_query_record($query)\n {\n $result=$this->db->query($query);\n if($result->num_rows() > 0)\n {\n return $result;\n }\n }", "public function moinhat(){\n $this->db->select($this->column_bosuutap);\n $this->db->from(\"$this->table\");\n $this->db->join($this->table_trans, \"$this->table.id = $this->table_trans.id\");\n $this->db->where(\"$this->table_trans.language_code\", \"vi\");\n $this->db->order_by(\"$this->table.id\", 'DESC');\n $query = $this->db->get();//var_dump($this->db->last_query()); exit();\n return $query->result();\n }", "public function query()\n {\n $query = EaBookingEntry::leftJoin('mst_customers AS c1', 'ea_booking_entries.shipper_id', '=', 'c1.id')\n ->leftJoin('mst_customers AS c2', 'ea_booking_entries.consignee_id', '=', 'c2.id')\n ->leftJoin('mst_customers AS c3', 'ea_booking_entries.agent_id', '=', 'c3.id')\n ->leftJoin('mst_airports AS c4', 'ea_booking_entries.origin_id', '=', 'c4.id')\n ->leftJoin('mst_airports AS c5', 'ea_booking_entries.destination_id', '=', 'c5.id')\n ->leftJoin('ea_shipment_entries AS file', 'ea_booking_entries.shipment_id', '=', 'file.id')\n ->orderBy('ea_booking_entries.date', 'desc')\n ->orderBy('ea_booking_entries.code', 'desc')\n ->select(['ea_booking_entries.id','ea_booking_entries.code','ea_booking_entries.shipment_type','ea_booking_entries.date', 'ea_booking_entries.status', 'c1.name AS shipper_name', 'c2.name AS consignee_name', 'c3.name AS agent_name', 'c4.name AS origin_name', 'c5.name AS destination_name', 'file.code as shipment_code']);\n return $this->applyScopes($query);\n }", "function test($d){\n $sql = $this->db->table('sendmailtemp')->getWhere(['email' => $d['email']]);\n }", "function createdUserMail($tracking_code ,$type ){\r\n\tglobal $wpdb;\r\n\t\r\n\t\t$table_mail_creation = $wpdb->prefix . \"mail_creation\";\r\n\t\t$table_batch_creation = $wpdb->prefix . \"batch_creation\";\r\n\t\tif($type=='Batch'){\r\n\t\t\t/****that quy find mail creation user name and created date in batch case ***/\r\n\t\t\t$qry=\"SELECT created_by , created_on FROM \".$table_batch_creation.\" WHERE batch_name='\".$tracking_code.\"' or batch_id='\".$tracking_code.\"'\";\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif($type=='Individual'){\r\n\t\t\t/****that quy find mail creation user name and created date in individual case ***/\r\n\t\t\t$qry=\"SELECT created_by , created_on FROM \".$table_mail_creation.\" WHERE tracking_number ='\".$tracking_code.\"'\";\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$result = $wpdb->get_row(\r\n\t\t\t\t\t\t$qry\r\n\t\t\t\t\t);\r\n\t\t\t\t\t\r\n\t\treturn $result;\r\n\t}", "function getDatumTijdByValicationCode($code) {\n global $db;\n $query = $db->prepare(\"select datumTijd from validation where validatiecode = :validatiecode\");\n $query->execute(array(':validatiecode' => $code));\n return $query->fetch(PDO::FETCH_OBJ);\n}", "private function db_get() {\n if ($this->trackId == null) {\n return FALSE;\n }\n\n $sqlRepsonse = db_select('uc_checkoutpayment_hub_communication', 'c')\n ->fields('c')\n ->condition('track_id', $this->trackId, '=')\n ->orderBy('created', 'DESC')\n ->execute()\n ->fetchAll();\n \n if (!empty($sqlRepsonse)) {\n $data = reset($sqlRepsonse);\n $default = end($sqlRepsonse);\n\n $this->email = $default->email;\n\n foreach ($sqlRepsonse as $charge) {\n if ($charge->status == $data->status) {\n $this->value += $charge->value;\n }\n \n if ($charge->responseCode == '10100') {\n $data->responseMessage = $charge->responseMessage;\n }\n }\n\n $this->id = $data->id;\n $this->created = $data->created;\n $this->trackId = $data->track_id;\n $this->currency = $data->currency;\n $this->responseMessage = $data->responseMessage;\n $this->responseCode = $data->responseCode;\n $this->status = $data->status;\n\n return TRUE;\n }\n\n return false;\n }", "public function query()\n {\n $query = Qc::query();\n\n $query->select([\n 'qc.id',\n DB::raw('obras.nome AS obra_nome'),\n DB::raw('carteiras.nome AS carteira_nome'),\n DB::raw('tipologias.nome AS tipologia_nome'),\n DB::raw('\"\" AS etapa'),\n 'status',\n DB::raw('\"\" AS sla'),\n 'descricao',\n DB::raw('users.name AS comprador_nome'),\n 'data_fechamento',\n DB::raw('\"\" AS acompanhamento'),\n 'valor_fechamento',\n 'valor_pre_orcamento',\n 'valor_orcamento_inicial',\n 'numero_contrato',\n DB::raw('\"\" AS saving'),\n DB::raw('fornecedores.nome AS fornecedor_nome'),\n \n ])\n ->join('carteiras', 'carteiras.id', 'carteira_id')\n ->join('obras', 'obras.id', 'obra_id')\n ->join('tipologias', 'tipologias.id', 'tipologia_id')\n ->leftJoin('users', 'users.id', 'comprador_id')\n ->leftJoin('fornecedores', 'fornecedores.id', 'fornecedor_id')\n ->whereIn('status', [ 'Aprovado', 'Reprovado', 'Em negociação', 'Fechado' ])\n ->groupBy('qc.id');\n\n $request = $this->request();\n\n if(!is_null($request->days)) {\n $query->whereDate(\n 'qc.created_at',\n '>=',\n Carbon::now()->subDays($request->days)->toDateString()\n );\n }\n\n if($request->data_start) {\n if(strpos($request->data_start, '/')){\n $query->whereDate(\n 'qc.created_at',\n '>=',\n Carbon::createFromFormat('d/m/Y', $request->data_start)->toDateString()\n );\n }\n }\n\n if($request->data_end) {\n $query->whereDate(\n 'qc.created_at',\n '<=',\n Carbon::createFromFormat('d/m/Y', $request->data_end)->toDateString()\n );\n }\t\t\t\n\t\n return $this->applyScopes($query);\n }", "public function hello6()\n {\n \n // 可以写成 >= <= <> in [4,5,6,7,8] 'between', [5, 8]\n// $result = Db::name('data')->where('id','between', [1,9])->select();\n// print_r($result);\n \n //查询某个字段是否为NULL\n// $result = Db::name('data')\n// ->where('name', 'null')\n// ->select();\n// print_r($result); \n \n // 使用EXP条件表达式,表示后面是原生的SQL语句表达式\n// $result = Db::name('data')->where('id','exp', \" > 1 and name = '111'\")->select(); \n// print_r($result);\n \n //使用多个字段查询:\n// $result = Db::name('data')\n// ->where('id', '>=', 1)\n// ->where('name', 'like', '%php%')\n// ->select();\n// print_r($result); \n // 或者使用\n// $result = Db::name('data')\n// ->where([\n// 'id' => ['>=', 1],\n// 'name' => ['like', '%think%'],\n// ])->select();\n// print_r($result); \n// \n // 再来看一些复杂的用法,使用OR和AND混合条件查询\n// $result = Db::name('data') \n// ->where('name', 'like', '%think%')\n// ->where('id', ['in', [1, 2, 3]], ['>=', 1], 'or')\n// ->limit(2)\n// ->select();\n// print_r($result); \n \n // 批量查询\n// $result = Db::name('data')\n// ->where([\n// 'id' => [['in', [1, 2, 3]], ['>=', 1], 'or'],\n// 'name' => ['like', '%php%'],\n// ])\n// ->limit(10)\n// ->select();\n// print_r($result); \n //快捷查询\n// $result = Db::name('data')\n// ->where('id&status', '>', 0)\n// ->limit(10)\n// ->select();\n// print_r($result); \n\n// $result = Db::name('data')\n// ->where('id|status', '>', 0)\n// ->limit(10)\n// ->select();\n// print_r($result); \n \n \n }", "function query()\n\t{\n\t\treturn $this->query;\n\t}", "public function query(): string;", "public function getquery(){\n\t\treturn $this->query;\n\t}", "function insert_in_sms_table($user_id,$phone_num,$generated_code){\r\n $sql = \"INSERT INTO `sms_verification` (user_id,phone_num,scode) VALUES ('{$user_id}','{$phone_num}','{$generated_code}')\";\r\n db()->query($sql);\r\n}", "protected function getListQuery()\n {\n // Create a new query object. \n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n // Select some fields\n $query->select('id,name,email,published,ordering,bio,dob,gender,image');\n // From the hello table\n $query->from('#__helloworld_message');\n \n \n \n $name = $this->getState('filter.name');\n\t\t\t\t\tif (!empty($name)) {\n\t\t\t\t\t\t$name = $db->Quote($db->escape($name));\n\t\t\t\t\t\t$query->where('name = '. $name);\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\treturn $query;\n }", "public function getByCode($code);", "function query_peminjam(){\n\t\t\t$query = $this->db->query (\"SELECT * FROM peminjam\");\n\t\t\t$query = $query->result();\n\t\t\treturn $query;\n\t\t}", "function getMostRecentCodeMovement() {\n $res = $this->all();\n $index = count($res) - 1;\n return $res{$index}->code;\n }\n}", "public static function query()\n {\n }", "function getPersonalInboxQueries($connection,$userId,$inboxMessageSearch){\n $query = \"SELECT fpd.*,fu.name AS user_name,fu.profile_pic AS user_profile,fpd.datetime as posted_time FROM forum_personal_discussion fpd LEFT JOIN forum_users fu on fu.user_id=fpd.user_id WHERE fpd.person_id='$userId' \";\n\n // echo $query;\n if ($inboxMessageSearch){\n $query .= \" AND ( fpd.discussion_title LIKE '%{$inboxMessageSearch}%' OR fpd.message LIKE '%{$inboxMessageSearch}%' OR fu.name LIKE '%{$inboxMessageSearch}%') \";\n }\n $query .= ' ORDER BY datetime DESC';\n $result = $connection->query($query);\n return $result;\n }", "public function query()\n {\n return Customer::query();\n }", "public function Query() {\n \n }", "public function check_mobile($mobile){\n $query = $this->db->select('01_mobile')\n ->where('01_mobile', $mobile)\n ->get('register_01');\n if($query->num_rows()>0){\n return 0;\n }else{\n $query = $this->db->where('is_sms', 1)\n ->where('number', $mobile)\n ->get('verify_otp_12');\n if($query->num_rows()>0){\n return 'sent';\n }else{\n $query = $this->db->where('number', $mobile)\n ->delete('verify_otp_12');\n $otp = rand(10000, 1000000);\n $data = array(\n 'number' => $mobile,\n 'otp' => $otp,\n );\n $query = $this->db->insert('verify_otp_12', $data);\n return true;\n }\n }\n }", "function getByStatus($status){\n // Please make this clear, where can in find this status, status darimana? status dari peminjaman atau status dari pengembalian atau status dari inventori?\n $this->db->where('status_barang',$status);\n $query = $this->db->get('pengembalian'); // Please make this clear where to find or how to find which table contains status.\n return array();\n}", "function get_notification()\n {\n $this ->db-> select('*');\n $this ->db-> from('tbl_enquiry');\n $this->db->where('enquiry_delete_status','0');\n $query = $this->db->get();\n return $query->result();\n }", "function query() {\n }", "public function query(){\n\n $rows = $this\n ->db\n ->where(\"id >\", 1)\n ->like(\"title\", \"etti\")\n ->order_by(\"id\", \"desc\")\n ->limit(1)\n ->get(\"personel\")\n ->result();\n\n echo $this->db->last_query();\n echo \"<br>\";\n print_r($rows);\n\n\n\n }", "function check_activation($email,$activation)\n {\n return $q = DB::table(\"admin_tbl\")->where(\"email\",$email)->where(\"status\",$activation)->first();\n }", "protected function getListQuery()\n\t{\n $state = JFactory::getApplication()->getUserState('com_messages.state',0);\n $direct = JFactory::getApplication()->getUserState('com_messages.direct',0);\n\n\t\t// Create a new query object.\n\t\t$query\t= $this->_db->getQuery(true);\n\t\t$user\t= JFactory::getUser();\n\n\t\t// Select the required fields from the table.\n\t\t$query->select('*');\n\t\t$query->from('#__messages');\n if($direct)\n {\n $query->where('user_id_from = '.(int) $user->get('id'));\n }\n else \n {\n $query->where('user_id_to = '.(int) $user->get('id'));\n }\n if((int)$state != 9)\n {\n $query->where('state = '.(int) $state);\n }\n $query->order('message_id DESC');\n\t\treturn $query;\n\t}", "function get_where($data) {\n\t\t$query = $this->db->get_where('realisasi_skp',$data);\n\t\treturn $query->result();\t\t\n\t}", "public function listapproved_pr_submited_ph($emp_code) { \n\t$condition = \"ph_id =\" . \"'\" . $emp_code . \"' and ph_comment != 'NULL' \";\n\t//$condition = \"ph_id =\" . \"'\" . $emp_code . \"' \"; //2020-02-29\n\n$this->db->select('*');\n$this->db->from('pr_master');\n$this->db->order_by('pr_id', 'DESC');\n$this->db->limit(100);\n$this->db->where($condition);\n$query = $this->db->get();\n\nif ($query->num_rows() >= 1) {\nreturn $query;\n} else {\nreturn false;\n}\n}", "public function read_Vendor_information($mobile_no) {\n\n $condition = \"mobile_no =\" . \"'\" . $mobile_no . \"'\";\n $this->db->select('*');\n $this->db->from('vendor');\n $this->db->where($condition);\n $this->db->limit(1);\n $query = $this->db->get();\n\n if ($query->num_rows() == 1) {\n return $query->result();\n } else {\n return false;\n }\n }", "function getCode($where){\n $this->db->join('invoices', 'invoices.id_invoice = orders.id_invoice', 'left');\n $this->db->join('products', 'products.id_product = orders.id_product', 'left');\n $this->db->join('costs', 'costs.id_cost = orders.id_cost', 'left'); \n return $this->db->get_where('orders', $where)->result();\n }", "public function get_guest_id($mobile_number) { \n $map_guest_query = $this->find('first', array(\n 'conditions' => array(\n 'mobile_number' => $mobile_number,\n 'activated'=>1,\n 'guest_flag'=>1,\n 'deleted_flag'=>0,\n ),\n 'fields' => array('id'),\n )\n ); \n $member_guest_id=$map_guest_query['GenieGuest']['id'];\n return $member_guest_id;\n}", "public function getByCode($code) {\n\n\t\t$select = $this->_db->select()\n\t\t\t->from(array('participant' => 'participant'))\n\t\t\t->joinInner(array('account' => 'account'), 'account.account_code = participant.account_code')\n\t\t\t->joinLeft(array('media' => 'media'), \"media_item_type = 'PARTICIPANT' and media_item_code = participant.participant_code and media_primary = 1 and media_deleted = 0\", array('media_code', 'media_path', 'media_ext'))\n\t\t\t->where('account_deleted = 0 and account.account_code = ?', $this->_account)\n\t\t\t->where('participant.participant_code = ?', $code)\n\t\t\t->limit(1);\t\t\n\n\t\t$result = $this->_db->fetchRow($select);\n\t\treturn ($result == false) ? false : $result = $result;\t\t\n\t}", "public static function query()\n {\n return (new static)->newQuery();\n }", "public static function query()\n {\n return (new static)->newQuery();\n }", "static function get_address($code){\n \t$address = DB::table('es_mx')\n\t\t ->select('id','colony','state','town','country','code','postal_code')\n ->where('postal_code','=',$code)->get()->toArray();\n\n\t return $address;\n }", "function register_status()\n{\n return DB::table('config')\n ->select('*')\n ->where('name', 'register_open')\n ->first();\n}", "function inbox(){\n\t\t$this->db->select('*');\n\t\t$this->db->from('inbox');\t\n\t\t$this->db->where('Processed', 'false');\n $sql = $this->db->get();\n $result = $sql->result();\n return $result; \n }", "function mark_thread_messages_read_main($message_thread_code)\n {\n $current_user = $this->session->userdata('login_type') . '-' . $this->session->userdata('login_user_id');\n $this->db->where('sender !=', $current_user);\n $this->db->where('message_thread_code', $message_thread_code);\n $this->db->update('admin_message', array('read_status' => 1));\n //echo $this->db->last_query();die;\n \n }", "function createQuery() ;", "public function searchByID($query){\n //$flight = Volo::where('flightID', request('flightID'))->get(); //ci può essere al più un'occorrenza\n //$flight = Volo::find(request('flightID')); //ci può essere al più un'occorrenza\n //$flight = Volo::find($request['flightID']); //ci può essere al più un'occorrenza\n $flight = Volo::find($query); //ci può essere al più un'occorrenza\n\n if(isset($flight)){\n $partenzaIATA = Aeroporto::find($flight -> aeroportoPartenza); //recupero istanza della tabella aeroporto in base al codice IATA\n $arrivoIATA = Aeroporto::find($flight -> aeroportoArrivo);\n if(isset($partenzaIATA) && isset($arrivoIATA)){\n $aeroportoPartenza = $partenzaIATA -> città . ' ' . $partenzaIATA -> denominazione;\n $aeroportoArrivo = $arrivoIATA -> città . ' ' . $arrivoIATA -> denominazione;\n }\n else{\n $aeroportoPartenza = $flight -> aeroportoPartenza;\n $aeroportoArrivo = $flight -> aeroportoArrivo;\n }\n \n return ['exists' => true,\n 'flightID' => $flight -> flightID,\n 'aeroportoPartenza' => $aeroportoPartenza, //non uso $flight -> aeroportoPartenza\n 'aeroportoArrivo' => $aeroportoArrivo, //non uso $flight -> aeroportoArrivo\n 'dataPartenza' => $flight -> dataPartenza,\n 'oraPartenza' => $flight -> oraPartenza,\n 'dataArrivo' => $flight -> dataArrivo,\n 'oraArrivo' => $flight -> oraArrivo,\n 'stato' => $flight -> stato,\n ];\n }\n else {\n return ['exists' => false];\n }\n }", "function sqlQuery($sql){\r\n\t\t$con->testmodeEcho($sql, 'SqlSentence');\r\n\t\treturn connDB()->query($sql);\r\n\t}", "function query() {}", "public function data_headphone_dan_headset(){\n return $this->db->get_where(\"tb_barang\", array('kategori' => 'headphone dan headset'));\n }", "public function query()\n {\n return $this->model\n ->newQuery()\n ->with(['translations'])\n ->orderBy('order_column')\n ->nonDraft();\n }", "function query($query) {\n\t\treturn $this->dbcr_query( $query, true );\n\t}", "public function check_mobile_if_validate($mobile = \"\"){\r\n $query = $this->db->get_where('tblUserInformation', array('mobile' => $mobile));\r\n $row = $query->row_array();\r\n if(!empty($row)){\r\n $v = $this->db->get_where('tbl_user_verification', array('fk_userid' => $row['userid'],'verification_type' => 'SMS','verification_status' => 'VERIFIED'));\r\n $vrow = $v->row_array();\r\n if(!empty($vrow)) return true;\r\n else return false;\r\n }else{\r\n return false;\r\n }\r\n\r\n }", "public function query()\n {\n $farmer_invoice = DB::table('farmer_invoices')\n ->select('farmer_invoices.id','farmer_invoices.user_id','farmer_invoices.farmer_id',DB::raw(\"''\"),DB::raw(\"'' as branch_id\"),'farmer_invoices.date as date','farmer_invoices.invoice_number as sale_no',DB::raw(\"'' as type\"),'farmer_invoices.total_amount as sub_total',DB::raw(\"'0' as discount\"),'farmer_invoices.total_amount as grand_total','farmer_invoices.remarks');\n\n $sale_invoice = DB::table('sales')\n ->select('sales.id','sales.user_id',DB::raw(\"'' as farmer_id\"),'sales.customer_id','sales.branch_id','sales.sale_date as date','sales.sale_no','sales.payment_type as type','sales.sub_total','sales.discount','sales.grand_total','sales.remarks')\n ->unionAll($farmer_invoice)\n ->orderBy('date','desc');\n return $sale_invoice->get();\n }" ]
[ "0.60037595", "0.5944128", "0.5866501", "0.5804676", "0.57873625", "0.57540077", "0.5613337", "0.5598674", "0.5583254", "0.55679345", "0.55558574", "0.55174726", "0.5517319", "0.5459041", "0.5441171", "0.5441171", "0.5441171", "0.5412617", "0.5396176", "0.5396176", "0.5396176", "0.5396176", "0.5396176", "0.5396176", "0.5396176", "0.5396176", "0.5396176", "0.5394106", "0.53906345", "0.5390441", "0.53867126", "0.5374251", "0.5373914", "0.53707355", "0.53525394", "0.5352358", "0.5339194", "0.5338836", "0.5332641", "0.53322864", "0.53322864", "0.53322864", "0.53291506", "0.53218704", "0.5303172", "0.5302066", "0.52974474", "0.529458", "0.52855355", "0.5282154", "0.52774626", "0.52717143", "0.52419883", "0.5239991", "0.52372026", "0.5224742", "0.5217866", "0.52151215", "0.52059436", "0.5203965", "0.5195002", "0.51903164", "0.51897246", "0.51864445", "0.51819783", "0.5171494", "0.5171111", "0.5167221", "0.51654214", "0.5162454", "0.516054", "0.5150215", "0.5147841", "0.5144659", "0.51383007", "0.5137298", "0.51332825", "0.51274145", "0.5112597", "0.5105626", "0.510533", "0.51029414", "0.5101186", "0.5094818", "0.50942755", "0.5092641", "0.50858724", "0.50858724", "0.5083671", "0.50739455", "0.507254", "0.5071867", "0.50616086", "0.5056534", "0.50527847", "0.5051677", "0.5050741", "0.5042657", "0.5041542", "0.5033996", "0.5029435" ]
0.0
-1
Set the route class
public function __construct(array $values = array()) { parent::__construct($values); $this['route_class'] = 'Synapse\\Route'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function & SetRouteClass ($routerClass);", "public function set_class($class)\n\t{\n\t\t$this->route_stack[self::SEG_CLASS] = str_replace(array('/', '.'), '', $class);\n\t}", "public function & SetRouterClass ($routerClass);", "protected function _route()\r\n\t\t{\r\n\t\t\t((!is_object($this->_route)) ? $this->_route = init_class(ROUTE_NAME) : '');\r\n\t\t}", "public function GetRouteClass ();", "public function objectRouteClass();", "public function setRoute() {\n $address = $_SERVER['REQUEST_URI'];\n \n $this->determineControllerAndMethod($address);\n\n $this->determineArguments($address);\n }", "abstract protected function getDefaultRouterClass();", "public function set_route($route)\n {\n }", "function route_class()\n{\n return str_replace('.', '-', Route::currentRouteName());\n}", "private function route() {\n if (class_exists($this->controllerName . $this->postfix)) {\n $fullName = $this->controllerName . $this->postfix;\n $this->controllerClass = new $fullName;\n $this->controllerClass->setUp();\n if (count($this->args > 1)) { // Pass args that are not controller class\n $this->controllerClass->setArgs($this->args);\n }\n\n // Second arg in url is our \"action\", try that as a method-call\n $method = strtolower($this->args[0]); // method names are case-insensitive. Might as well take advantage of it.\n if (isset($method) && method_exists($this->controllerClass, $method)) {\n $this->controllerClass->{$this->args[0]}();\n }\n \n } else { // No such class. Use our default\n $this->defaultRoute();\n }\n }", "public function setClass($class){\n $this->_class = $class;\n }", "public static function defaultRouteClass($routeClass = null)\n {\n if ($routeClass === null) {\n return static::$_defaultRouteClass;\n }\n static::$_defaultRouteClass = $routeClass;\n }", "public function GetRouterClass ();", "public function setRoute($routeTo) {\n $this->isDynamic = true;\n $xRouteTo = null;\n $type = gettype($routeTo);\n\n if (!is_callable($routeTo) && $type != 'object' && !class_exists($routeTo)) {\n $cleaned = str_replace('\\\\', DS, $routeTo);\n $xRouteTo = str_replace('/', DS, $cleaned);\n $explode = explode('.', $routeTo);\n $extension = $explode[count($explode) - 1];\n\n if ($extension != 'php') {\n $this->isDynamic = false;\n }\n } else if (is_callable($routeTo)) {\n $this->setType(Router::CLOSURE_ROUTE);\n $xRouteTo = $routeTo;\n } else if ($type == 'object') {\n $xRouteTo = get_class($routeTo);\n } else if (class_exists($routeTo)) {\n $xRouteTo = $routeTo;\n }\n\n $this->routeTo = $xRouteTo;\n }", "abstract protected function getDefaultRouterClass(): string;", "public function setClass($class);", "public function setRoute($route) {\n\t\t$this->route = $route;\n\t}", "public function setClass($class)\n {\n $this->class = str_replace(array('/', '.'), '', $class);\n }", "public function setClass($class){\n $this->class=$class;\n }", "protected function setClass()\n {\n $default = 'List';\n if ( isset( $_GET['spid'] ) ) {\n switch ( $_GET['spid'] ) {\n case 'fundraisers':\n $this->class = 'Fundraisers';\n return;\n default:\n $this->class = $default;\n return;\n }\n }\n $this->class = $default;\n }", "public function setRoute($route)\n {\n $this->route = $route;\n }", "public function setRoute($route)\n {\n $this->route = $route;\n }", "public function set_matched_route($route)\n {\n }", "public static function set($route) {\n self::registerRoute($route);\n }", "public function & SetViewClass ($viewClass);", "public function setRoute($method, $route)\t{\n\t\t//Reset internal state\n\t\t$this->class = \"NoRoute\";\n\t\t$this->params = array();\n\t\t$this->method = $method;\n\t\t$route = explode(\"?\", $route);\n\t\tif (is_array($route)) $route = $route[0];\n\t\t\n\t\tif ($this->prefix != null) $route = preg_replace(\"|\". preg_quote($this->prefix) . \"|iA\", \"\", $route);\n\t\t$this->log->setRoute($method, $route);\n\t\t$this->route = $route;\n\t\t\n\t\t$routeParts = array_filter(explode(\"/\", $route), 'strlen');\n\t\t$uri = strtolower(array_shift($routeParts));\n\t\t\n\t\tif (isset($this->routeArray[$uri]))\t{\n\t\t\tforeach($this->routeArray[$uri] as $route)\t{\n\t\t\t\tif ($route['method'] == $method && count($route['params']) == count($routeParts))\t{\n\t\t\t\t\t$this->class = $route['class'];\n\t\t\t\t\tforeach ($route['params'] as $param)\t{\n\t\t\t\t\t\t$this->params[$param] = array_shift($routeParts);\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function setClass($class) {\r\n\t$this->class = $class;\r\n }", "public function __construct()\n {\n $this->route = new \\Janrain\\Union\\Lib\\Route;\n }", "public function setRoute($route)\r\n {\r\n // Handle images\r\n if (!$this->isImage($route) && !$this->isFile($route)) {\r\n // Route must follow a directory of a question inside the questions directory\r\n $curQuestionDir = $this->root.'/'.$route;\r\n if (!is_dir($curQuestionDir)) {\r\n throw new Exception('Question directory '.$curQuestionDir.' does not exists.');\r\n }\r\n if (!file_exists($curQuestionDir.'/bebras.js')) {\r\n throw new Exception('Question directory '.$curQuestionDir.' is not a task.');\r\n }\r\n \r\n // A question's route must end with a \"/\"\r\n if ($route[strlen($route) - 1] != '/') {\r\n throw new Exception('A question\\'s directory must end with a \"/\".');\r\n }\r\n $route = substr($route, 0, strlen($route) - 1);\r\n }\r\n \r\n $this->route = $route;\r\n }", "public function setRouting()\n {\n // Are query strings enabled in the config file? Normally CI doesn't utilize query strings\n // since URI segments are more search-engine friendly, but they can optionally be used.\n // If this feature is enabled, we will gather the directory/class/method a little differently\n $segments = array();\n $enableQueryStrings = Fly::getConfig('enableQueryStrings');\n $ct = Fly::getConfig('aliasController');\n $dt = Fly::getConfig('aliasModule');\n $ft = Fly::getConfig('aliasAction');\n\n if ($enableQueryStrings === true && isset($_GET[$ct])) {\n\n if (isset($_GET[$dt])) {\n $this->setModule(trim($this->uri->filterUri($_GET[$dt])));\n $segments[] = $this->fetchModule();\n }\n\n if (isset($_GET[$ct])) {\n $this->setClass(trim($this->uri->filterUri($_GET[$ct])));\n $segments[] = $this->fetchClass();\n }\n\n if (isset($_GET[$ft])) {\n $this->setMethod(trim($this->uri->filterUri($_GET[$ft])));\n $segments[] = $this->fetchMethod();\n }\n }\n\n // Load the routes.php file.\n Fly::app()->loadConfig('config.routes', true, true);\n $route = Fly::app()->getConfig('routes');\n $this->routes = (!isset($route) || !is_array($route)) ? array() : $route;\n unset($route);\n\n // Set the default controller so we can display it in the event\n // the URI doesn't correlated to a valid controller.\n $this->default_controller = (!isset($this->routes['defaultController']) || $this->routes['defaultController'] == '') ? false : $this->routes['defaultController'];\n\n // Were there any query string segments? If so, we'll validate them and bail out since we're done.\n if (count($segments) > 0) {\n $r = $this->validateRequest($segments);\n if ($r === null) {\n return array();\n }\n if (isset($r['segments'])) {\n return $r['segments'];\n }\n return array();\n }\n\n // Fetch the complete URI string\n $this->uri->fetchUriString();\n\n // Is there a URI string? If not, the default controller specified in the \"routes\" file will be shown.\n if ($this->uri->getUriString() == '') {\n return $this->setDefaultController();\n }\n\n // Do we need to remove the URL suffix?\n $this->uri->removeUrlSuffix();\n\n // Compile the segments into an array\n $this->uri->explodeSegments();\n\n // Parse any custom routing that may exist\n $this->parseRoutes();\n\n // Re-index the segment array so that it starts with 1 rather than 0\n $this->uri->reindexSegments();\n }", "public function setClass($class)\n {\n $this->class = $class;\n }", "private function setRoutes() : void\n {\n $this->routes = $this->routeProvider->getRoutes();\n $this->syRouteCollection = new RouteCollection();\n foreach ($this->routes as $route) {\n $syRoute = new SymfonyRoute(\n $route->getPath(),\n $route->getParamsDefaults(),\n $route->getParamsRequirements(),\n [],\n '',\n [],\n $route->getMethods()\n );\n $this->syRouteCollection->add($route->getName(), $syRoute);\n }\n }", "public function setRoute(array $route): void;", "public function setRoute($match, $isRegex, $controller, $class,\n $function)\n {\n $this->routes[$match] = array(\n 'match' => $match,\n 'is_regex' => $isRegex,\n 'controller' => $controller,\n 'class' => $class,\n 'function' => $function\n );\n }", "protected function init() {\n\t\t$routes = $this->routePluginManager;\n\t\tforeach ( array (\n\t\t\t\t'hostname' => __NAMESPACE__ . '\\Hostname',\n\t\t\t\t'literal' => __NAMESPACE__ . '\\Literal',\n\t\t\t\t'part' => __NAMESPACE__ . '\\Part',\n\t\t\t\t'regex' => __NAMESPACE__ . '\\Regex',\n\t\t\t\t'scheme' => __NAMESPACE__ . '\\Scheme',\n\t\t\t\t'segment' => __NAMESPACE__ . '\\Segment',\n\t\t\t\t'wildcard' => __NAMESPACE__ . '\\Wildcard',\n\t\t\t\t'query' => __NAMESPACE__ . '\\Query',\n\t\t\t\t'method' => __NAMESPACE__ . '\\Method' \n\t\t) as $name => $class ) {\n\t\t\t$routes->setInvokableClass ( $name, $class );\n\t\t}\n\t\t;\n\t}", "protected function makeRoute()\n {\n new MakeRoute($this, $this->files);\n }", "public function __construct()\n {\n if (Registry::isKeySet('route')) {\n\n $this->route = Registry::get('route');\n\n }\n\n }", "protected function _set_routing()\n {\n // Load the routes.php file. It would be great if we could\n // skip this for enable_query_strings = TRUE, but then\n // default_controller would be empty ...\n if (file_exists(APPPATH.'config/routes.php'))\n {\n include(APPPATH.'config/routes.php');\n }\n\n if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/routes.php'))\n {\n include(APPPATH.'config/'.ENVIRONMENT.'/routes.php');\n }\n\n // Validate & get reserved routes\n if (isset($route) && is_array($route))\n {\n /*\n * Updated for codefight cms\n * to be @deprecated as now we have custom router files\n * see @ apppath / modules / routes\n */\n //$this->routes = $route;\n //$_route = $this->_generate_auto_routes();\n //$route = array_merge($_route, $route);\n /*---END---*/\n\n\n isset($route['default_controller']) && $this->default_controller = $route['default_controller'];\n isset($route['translate_uri_dashes']) && $this->translate_uri_dashes = $route['translate_uri_dashes'];\n unset($route['default_controller'], $route['translate_uri_dashes']);\n $this->routes = $route;\n }\n\n // Are query strings enabled in the config file? Normally CI doesn't utilize query strings\n // since URI segments are more search-engine friendly, but they can optionally be used.\n // If this feature is enabled, we will gather the directory/class/method a little differently\n if ($this->enable_query_strings)\n {\n // If the directory is set at this time, it means an override exists, so skip the checks\n if ( ! isset($this->directory))\n {\n $_d = $this->config->item('directory_trigger');\n $_d = isset($_GET[$_d]) ? trim($_GET[$_d], \" \\t\\n\\r\\0\\x0B/\") : '';\n\n if ($_d !== '')\n {\n $this->uri->filter_uri($_d);\n $this->set_directory($_d);\n }\n }\n\n $_c = trim($this->config->item('controller_trigger'));\n if ( ! empty($_GET[$_c]))\n {\n $this->uri->filter_uri($_GET[$_c]);\n $this->set_class($_GET[$_c]);\n\n $_f = trim($this->config->item('function_trigger'));\n if ( ! empty($_GET[$_f]))\n {\n $this->uri->filter_uri($_GET[$_f]);\n $this->set_method($_GET[$_f]);\n }\n\n $this->uri->rsegments = array(\n 1 => $this->class,\n 2 => $this->method\n );\n }\n else\n {\n $this->_set_default_controller();\n }\n\n // Routing rules don't apply to query strings and we don't need to detect\n // directories, so we're done here\n return;\n }\n\n // Is there anything to parse?\n if ($this->uri->uri_string !== '')\n {\n $this->_parse_routes();\n }\n else\n {\n $this->_set_default_controller();\n }\n }", "public function route()\n\t{\n\t\t/* [http|https]/[Ajax|]/[Get|Post|Delete|Put]/uri */\n\t\t$this->route = $this->route_raw = ($this->c->Request->is_https ? 'https' : 'http').'/'.($this->c->Request->is_ajax ? 'Ajax' : '').'/'.$this->c->Request->request.'/'.$this->c->Request->uri;\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->preRouter();\n\n\t\t/* rewrite dispatch route */\n\t\tforeach ($this->c->router['routes'] as $regexpath => $switchto) {\n\t\t\tif (preg_match($regexpath, $this->route)) {\n\t\t\t\t/* we got a match */\n\t\t\t\t$this->route = preg_replace($regexpath, $switchto, $this->route);\n\t\t\t\t$this->route_matched = $regexpath;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->postRouter();\n\n\t}", "public function setClass(string $class_name);", "public function __construct()\n {\n $this->routes = array();\n }", "protected static function getRoutesClasses()\n {\n return [];\n }", "private function defineRoute(){\n if($this->route_path === '/'){\n //go to home\n $controller_name = ucfirst($this->config->getLandingPageControllerName().\"Controller\");\n }\n elseif (array_key_exists($this->route_path[1],$this->nameRoutes())){\n $name_route = $this->nameRoutes()[$this->route_path[1]];\n $controller_name = !empty($name_route[0])?ucfirst($name_route[0]):'';\n $this->route_path[2] = $name_route[1];\n }\n else{\n $controller_name = !empty($this->route_path[1])?ucfirst($this->route_path[1].\"Controller\"):'';\n }\n $method_name = !empty($this->route_path[2])?$this->route_path[2]:'index';\n $parameters = is_array($this->route_path)?array_slice($this->route_path, 3):'';\n\n $file_path = ROOT_DIR.\"/src/Controllers/{$controller_name}.php\";\n if(file_exists($file_path)){\n $controller_name_with_namespace = 'App\\Controllers\\\\'.$controller_name;\n $controller_object = new $controller_name_with_namespace();\n if(method_exists($controller_object,$method_name)){\n $controller_object->$method_name($parameters);\n }else{\n exit('Wrong Method');\n }\n\n }else{\n exit('Wrong Controller');\n }\n }", "public function _set_routing()\n\t{\n\t\t// Load the routes.php file.\n\t\t$route = $this->CI->config->get('routes.php', 'route');\n\n\t\t// Set route remapping\n\t\t$this->routes = is_array($route) ? $route : array();\n\t\tunset($route);\n\n\t\t// Set the default controller so we can display it in the event\n\t\t// the URI doesn't correlate to a valid controller.\n\t\t$this->default_controller = empty($this->routes['default_controller'])\n\t\t\t? FALSE : strtolower($this->routes['default_controller']);\n\n\t\t// Are query strings enabled in the config file? Normally CI doesn't utilize query strings\n\t\t// since URI segments are more search-engine friendly, but they can optionally be used.\n\t\t// If this feature is enabled, we will gather the directory/class/method a little differently\n\t\t$ctl_trigger = $this->CI->config->item('controller_trigger');\n\t\tif ($this->CI->config->item('enable_query_strings') === TRUE && isset($_GET[$ctl_trigger]))\n\t\t{\n\t\t\t$segments = array();\n\n\t\t\t// Add directory segment if provided\n\t\t\t$dir_trigger = $this->CI->config->item('directory_trigger');\n\t\t\tif (isset($_GET[$dir_trigger]))\n\t\t\t{\n\t\t\t\t$segments[] = trim($this->CI->uri->_filter_uri($_GET[$dir_trigger]));\n\t\t\t}\n\n\t\t\t// Add controller segment - this was qualified above\n\t\t\t$class = trim($this->CI->uri->_filter_uri($_GET[$ctl_trigger]));\n\t\t\t$segments[] = $class;\n\n\t\t\t// Add function segment if provided\n\t\t\t$fun_trigger = $this->CI->config->item('function_trigger');\n\t\t\tif (isset($_GET[$fun_trigger]))\n\t\t\t{\n\t\t\t\t$segments[] = trim($this->CI->uri->_filter_uri($_GET[$fun_trigger]));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Fetch the complete URI string, remove the suffix, and explode\n\t\t\t$this->CI->uri->_fetch_uri_string();\n\t\t\t$this->CI->uri->_remove_url_suffix();\n\t\t\t$this->CI->uri->_explode_segments();\n\t\t\t$segments = $this->CI->uri->segments;\n\t\t}\n\n\t\t// Set the route stack\n\t\t$this->_set_request($segments);\n\t}", "public static function Route()\n { \n $uri = self::getURI(); // get path\n $uri = self::parseGET($uri); // fill $_GET with params and strip them\n self::$uri = $uri;\n\n self::activateController($uri);\n }", "public function setNodeRoute($route);", "public function setType(string $type) {\n if ($type == Router::API_ROUTE || $type == Router::CLOSURE_ROUTE ||\n $type == Router::CUSTOMIZED || $type == Router::VIEW_ROUTE) {\n $this->type = $type;\n }\n }", "public function set_locator_class($class = 'SimplePie_Locator')\n {\n }", "public function __construct(){\n $this->findRoute();\n }", "private function __di_init_service_route () {\n $this->route = $this->constant(new GoDiService_Route_Property($this));\n }", "public function setRoutes($routes);", "public function & SetRequestClass ($requestClass);", "function setRoute(DynamicValue $p_route):void\n {\n $this->route=$p_route; \n }", "public function setRoute (string $route) : self {\n $this->route = $route;\n return $this;\n }", "private function bindRoute(): void\n {\n if (isset($this->route)) {\n return;\n }\n $this->route = new SymfonyRoute('');\n }", "public function setRoute(string $route): self \n {\n $this->route = $route;\n return $this;\n }", "protected function configureRoute(Route $route, \\ReflectionClass $class, \\ReflectionMethod $method, $annot)\n {\n // controller\n if ('__invoke' === $method->getName()) {\n $route->setDefault('_controller', $class->getName());\n } else {\n $route->setDefault('_controller', $class->getName().'::'.$method->getName());\n }\n }", "public function setNodeRouteConfig($config);", "public function setRoute($Route)\r\n {\r\n $this->Route = $Route;\r\n }", "public function __construct()\n {\n $this->uri = Fly::app()->getUri();\n Fly::log('debug', \"Router Class Initialized\");\n $this->setRouting();\n }", "public function registerRouters () {\n\t\tif ( !current_user_can( 'manage_options' ) )\n\t\t\treturn;\n\n\t\tforeach ( $this->classes as $class ) {\n\t\t\t\\Maven\\Core\\HookManager::instance()->addFilter( 'json_endpoints', array( $class, 'registerRoutes' ) );\n\t\t}\n\t}", "public function cls(\\ReflectionClass $refClass, Annotation $annotation, \\think\\Route\\RuleGroup &$route)\n\t{\n\t}", "public function testDefaultRouteClass(): void\n {\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/{controller}', ['action' => 'index']);\n $result = Router::url(['controller' => 'FooBar', 'action' => 'index']);\n $this->assertSame('/FooBar', $result);\n\n // This is needed because tests/bootstrap.php sets App.namespace to 'App'\n static::setAppNamespace();\n\n Router::defaultRouteClass('DashedRoute');\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/cake/{controller}', ['action' => 'cake']);\n $result = Router::url(['controller' => 'FooBar', 'action' => 'cake']);\n $this->assertSame('/cake/foo-bar', $result);\n\n $result = Router::url(['controller' => 'FooBar', 'action' => 'index']);\n $this->assertSame('/FooBar', $result);\n\n Router::reload();\n Router::defaultRouteClass('DashedRoute');\n $routes = Router::createRouteBuilder('/');\n $routes->fallbacks();\n\n $result = Router::url(['controller' => 'FooBar', 'action' => 'index']);\n $this->assertSame('/foo-bar', $result);\n }", "public function __construct ()\n {\n parent::__construct('route');\n }", "public function __construct(Route $route) {\n $this->route = $route;\n }", "public function __construct() {\n $this->setRoutes(array(\n 'user' => 'getAllUsers',\n 'user/:userId' => 'getCertainUser',\n 'fixName/:variableName' => 'anotherMethod'\n ));\n }", "protected function set_class( $class ) {\n\t\t$this->class = $class;\n\t\t$this->is_class_set = true;\n\t}", "static function setRoute( \n \\AmidaMVC\\Framework\\Controller $ctrl,\n \\AmidaMVC\\Component\\SiteObj &$_siteObj ) \n {\n $siteDefault = array(\n 'base_url' => $ctrl->base_url,\n 'path_info_ctrl' => $ctrl->path_info,\n 'path_info' => '',\n 'routes' => array(),\n 'command' => array(),\n 'prefix_cmd' => $ctrl->prefixCmd,\n 'mode' => NULL,\n );\n $paths = explode( '/', $siteDefault[ 'path_info_ctrl' ] );\n foreach( $paths as $cmd ) {\n if( empty( $cmd ) ) continue;\n if( $cmd === '..' ) continue;\n if( substr( $cmd, 0, 1 ) === '.' ) continue;\n if( substr( $cmd, 0, 1 ) === $siteDefault[ 'prefix_cmd' ] ) {\n $siteDefault[ 'command' ][] = $cmd;\n }\n else {\n $siteDefault[ 'routes' ][] = $cmd;\n }\n }\n // setup path_info.\n $siteDefault[ 'path_info' ] = implode( '/', $siteDefault[ 'routes' ] );\n if( empty( $siteDefault[ 'path_info' ] ) ) {\n $siteDefault[ 'path_info' ] = '/';\n }\n $ctrl->path_info = $siteDefault[ 'path_info' ];\n // setup command. \n $siteDefault[ 'command' ] = array_unique( $siteDefault[ 'command' ] );\n if( !empty( $siteDefault[ 'command'] ) ) {\n if( $mode = static::findMode( $siteDefault[ 'command'] ) ) {\n $ctrl->mode = $mode;\n $ctrl->setAction( $mode );\n $siteDefault[ 'mode' ] = $mode;\n }\n }\n $_siteObj->set( 'siteObj', $siteDefault );\n }", "public function assignRoute(array $route);", "public function setRoute($value)\n {\n return $this->set('Route', $value);\n }", "public function setRoute($value)\n {\n return $this->set('Route', $value);\n }", "public function __construct()\n {\n $this->route = null;\n }", "public function setRoutes(array $routes);", "public function setResourceClass($resourceClass);", "public function setRoutes(array $routes) {\n\t\t$this->routes = $routes;\n\t}", "private function setup($Route) {\n $this->Route = $Route;\n \n \n }", "public function __construct(Route $route)\n {\n $this->route= $route;\n }", "public function __construct()\n { \n $routeName = \\Route::currentRouteName(); \n \n }", "public function & SetControllerClass ($controllerClass);", "public function __construct(Route $route)\n {\n $this->route = $route;\n }", "public function __construct(Route $route)\n {\n $this->route = $route;\n }", "public function setBodyClass($class) {\n\t\t\t# Prevents duplicate \"index\" classes\n\t\t\tif ($this->_context['page'] != 'index' || $class != 'index')\n\t\t\t\t$this->_body_class .= $class;\n\t\t}", "private function configureRouting()\n {\n // Setup the router.\n $router = new FastRoute([]);\n\n // Add routes.\n $router->addRoutes([\n new Route('/', Controller\\Home::class, 'home'),\n ]);\n\n // Set the router object.\n $this->setRouter($router);\n }", "public static function getRouteControllerClass()\r\n {\r\n $route = self::getRouteResolve();\r\n\r\n if(isset($route['class'])){\r\n return $route['class'];\r\n }\r\n\r\n return null;\r\n }", "public function viewClass($type, $class = null) {\n\t\tif ($class === null) {\n\t\t\treturn $this->config('viewClasses.' . $type);\n\t\t}\n\n\t\treturn $this->config('viewClasses.' . $type, $class);\n\t}", "public function __construct() {\n $this->setRouteData();\n }", "public function setRouteOptions($options);", "public static function setRoute(string $uri = '') {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__, $uri);\n\n\t\t$uri = self::_applyFilter(get_class(), __FUNCTION__, $uri, array('event' => 'args'));\n\t\t\n\t\tif (empty($uri)) {\n\t\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\t}\n\n\t\tif (substr($uri, strlen($uri) - 1) === '/') {\n\t\t\t$uri = substr_replace($uri, '', strlen($uri) - 1);\n\t\t}\n\n\t\t$routes = array();\n\n\t\t$pos = @strpos($uri, '?');\n\n\t\tif ($pos !== false) {\n\t\t\t$uri = substr_replace($uri, '', $pos, strlen($uri));\n\t\t}\n\n\t\t$uri_parts = explode('/', $uri);\n\n\t\tforeach ($uri_parts as $key => $value) {\n\t\t\tif (empty($uri_parts[$key])) {\n\t\t\t\tunset($uri_parts[$key]);\n\t\t\t}\n\t\t}\n\n\t\t$uri_parts = array_values($uri_parts);\n\t\t$uri = '/' . implode('/', $uri_parts);\n\t\t\n\t\t$assigned_route = array();\n\t\t$default_route = array();\n\t\t$assigned_route_options = array('listen'=> '*');\n\t\t$default_route_options = array();\n\t\t\n\t\t$method = (isset($_SERVER['REQUEST_METHOD'])) ? $method = $_SERVER['REQUEST_METHOD'] : null;\n\t\t\n\t\tforeach (self::$routes as $route) {\n\t\t\t\n\t\t\tif(self::_isAllowRequest($route['listen'], $method)) {\n\t\t\t\t\n\t\t\t\t$reRule = preg_replace(self::$default_rule_replace, self::$default_route_replace, $route['rule']);\n\t\t\t\t$reRule = str_replace('/', '\\/', $reRule);\n\t\n\t\t\t\tif (preg_match('/' . $reRule . '/', $uri, $matches)) {\n\t\n\t\t\t\t\t$uri_match = '';\n\t\t\t\t\tforeach ($matches as $key => $value) {\n\t\t\t\t\t\tif (!Validator::isInteger($key)) {\n\t\t\t\t\t\t\t$uri_match .= '/' . $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}//end foreach\n\t\n\t\t\t\t\t$match_1 = str_replace($uri_match, '', $uri);\n\t\t\t\t\t$match_2 = str_replace($uri_match, '', $matches[0]);\n\t\n\t\t\t\t\tif ($match_1 === $match_2 && !empty($match_1)) {\n\t\t\t\t\t\t$assigned_route = $matches;\n\t\t\t\t\t\t$assigned_route_options = $route;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if ($match_1 === $match_2 && empty($match_1)) {\n\t\t\t\t\t\t$default_route = $matches;\n\t\t\t\t\t\t$default_route_options = $route;\n\t\t\t\t\t}\n\t\t\t\t}//end if prgrack mage\n\t\t\t}\n\t\t}//end first for\n\n\t\tif (!empty($assigned_route)) {\n\t\t\t$final_route = $assigned_route;\n\t\t\t$route_options = $assigned_route_options;\n\t\t\tif (!isset($final_route['route'])) {\n\t\t\t\t$final_route['route'] = $default_route;\n\t\t\t}\n\t\t\tif (!isset($route_options['route'])) {\n\t\t\t\t$route_options['route'] = $default_route;\n\t\t\t}\n\t\t} else {\n\t\t\t$final_route = $default_route;\n\t\t\t$route_options = $default_route_options;\n\t\t}\n\n\t\tself::$route_parameters = $final_route;\n\t\tself::$route_options = $route_options;\n\t\t\n\t\t$method = (isset($_SERVER['REQUEST_METHOD'])) ? $method = $_SERVER['REQUEST_METHOD'] : null;\n\t\t\n\t\tif(!isset($route_options['listen']) || (isset($route_options['listen']) && $route_options['listen'] == '*')) {\n\t\t\tself::$correct_request_method = true;\n\t\t} else {\n\t\t\t$listen = strtoupper($route_options['listen']);\n\t\t\t\n\t\t\tif(strpos($listen, $method )!== false) {\n\t\t\t\tself::$correct_request_method = true;\n\t\t\t} else {\n\t\t\t\tself::$correct_request_method = false;\n\t\t\t}\n\t\t}\n\n\t\tself::_notify(get_class() . '::' . __FUNCTION__, $final_route, $route_options);\n\n\t\tif(self::$correct_request_method) {\n\t\t\t\n\t\t\tif (!empty($route_options['activate_ssl']) && $route_options['activate_ssl'] && !self::isSecureConnection()) {\n\t\t\t\tself::activateSSL();\n\t\t\t} else if (!empty($route_options['deactivate_ssl']) && $route_options['deactivate_ssl'] && self::isSecureConnection()) {\n\t\t\t\tself::deactivateSSL();\n\t\t\t}\n\t\n\t\t\tif (!empty($route_options['redirect'])) {\n\t\t\t\tself::redirect($route_options['redirect']);\n\t\t\t}\n\t\t\t\n\t\t\tif (!empty($route_options['callback'])) {\n\t\t\t\treturn call_user_func_array($route_options['callback'], array(new Request()));\n\t\t\t}\n\t\t}\n\n\t}", "public function setCurrentRoute($route)\n {\n $this->currentRoute = $route;\n }", "public function setClassPath($class, $path)\n {\n $class = strtolower($class);\n\n $this->overriden[$class] = $path;\n\n $this->classes[$class] = $path;\n }", "public function setClassPath($class, $path)\n {\n $class = strtolower($class);\n\n $this->overriden[$class] = $path;\n\n $this->classes[$class] = $path;\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.8070008", "0.782589", "0.72941405", "0.7226074", "0.7109683", "0.6798517", "0.67389774", "0.6604988", "0.6563212", "0.6527538", "0.6465704", "0.64335763", "0.6425324", "0.6397005", "0.6382114", "0.6340753", "0.6313975", "0.6287683", "0.627938", "0.62666017", "0.6236395", "0.61973476", "0.61973476", "0.6181135", "0.6177584", "0.6173444", "0.61630374", "0.61449933", "0.6131599", "0.6125232", "0.61175096", "0.60627645", "0.6055943", "0.6041404", "0.60301816", "0.6022399", "0.5994886", "0.5994199", "0.5980249", "0.59797746", "0.59678125", "0.594562", "0.5891095", "0.5862949", "0.5839002", "0.5830175", "0.58265144", "0.5825286", "0.5824106", "0.5818862", "0.5816118", "0.57841206", "0.5761075", "0.5732732", "0.57093817", "0.5709294", "0.5683716", "0.5670833", "0.56707007", "0.5657758", "0.56558615", "0.5655498", "0.56416225", "0.56384486", "0.56253135", "0.56154406", "0.5610031", "0.5608717", "0.5597673", "0.55925107", "0.55906993", "0.5590058", "0.5577948", "0.55709064", "0.5570527", "0.55592734", "0.5555626", "0.5538196", "0.5532587", "0.55307597", "0.5528468", "0.5528468", "0.5527444", "0.55210584", "0.55061036", "0.5504553", "0.5503694", "0.54984665", "0.54838127", "0.54834485", "0.547164", "0.547164", "0.5471357", "0.5471357", "0.5471357", "0.5471357", "0.5471357", "0.5471357", "0.5471357", "0.5471357", "0.5471357" ]
0.0
-1
Override Pimple's offsetGet to add support for initializers
public function offsetGet($id) { $value = parent::offsetGet($id); if (is_object($value)) { $this->initialize($value); } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function offsetGet($offset) {}", "public function offsetGet($offset) {}", "public function offsetGet($offset) {}", "function offsetGet(/*. mixed .*/ $offset){}", "public function offsetGet($offset)\n {\n }", "public function offsetGet($offset);", "public function offsetGet($offset);", "public function __get($offset)\n {\n }", "public function get($offset);", "public function offsetGet($offset)\n {\n }", "public function offsetGet($_offset)\n {\n return parent::offsetGet($_offset);\n }", "public function get($offset, $default = null);", "public function offsetGet($offset): mixed;", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "public function offset($offset);", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "public function offsetGet($offset)\n {\n return $this->$offset;\n }", "public function testOffsetGet()\n {\n $bag = new ArrayAttributeBag('foobar_storageKey');\n\n $bag['foo'] = 'bar';\n\n $this->assertSame('bar', $bag['foo']);\n }", "public function getAtOffset(Array $offset = []);", "function offsetGet(/*. mixed .*/ $object_){}", "public function getOffset($offset, $container = 'default');", "public /*mixed*/ function offsetGet(/*scalar*/ $offset)\n\t{\n\t\tif(isset($this->_data[$offset]))\n\t\t\treturn $this->_data[$offset];\n\t\tif($this->_default instanceof Closure) {\n\t\t\t$fn = $this->_default;\n\t\t\treturn $fn($offset);\n\t\t}\n\t\treturn $this->_default;\n\t}", "public /*mixed*/ function offsetGet(/*scalar*/ $offset)\n\t{\n\t\treturn $this;\n\t}", "public function __get($offset)\n {\n if (empty($this->containerPointer ?? null)) {\n throw new \\Exception('No container pointer provided!', 1);\n }\n\n $getter = 'get' . ucfirst($offset);\n if (method_exists($this, $getter)) {\n return call_user_func([$this, $getter]);\n }\n\n return $this->{$this->containerPointer}[$offset] ?? null;\n }", "public function offsetGet($offset)\n {\n return $this->$offset;\n\n }", "#[\\ReturnTypeWillChange]\n public function offsetGet($offset)\n {\n }", "#[\\ReturnTypeWillChange]\n public function offsetGet($offset)\n {\n }", "#[\\ReturnTypeWillChange]\n public function offsetGet($offset)\n {\n }", "#[\\ReturnTypeWillChange]\n public function offsetGet($offset)\n {\n }", "#[\\ReturnTypeWillChange]\n public function offsetGet($offset)\n {\n }", "function &offsetGet($offset) {\n $property = defined('static::$DOMAIN_PROPERTY') ? static::$DOMAIN_PROPERTY : 'data';\n if(!isset($this->{$property})) {\n $this->{$property} = [];\n }\n\n if(is_array($this->{$property}) && isset($this->{$property}[$offset])) {\n return $this->{$property}[$offset];\n }\n\n $none = null;\n return $none;\n }", "public function __get(string $offset)\n\t{\n\t\treturn $this->getValue($offset);\n\t}", "public function getOffset();", "public function getOffset();", "public function getOffset();", "public function get_offset(){\r\n return $this->$new_offset;\r\n }", "public function offsetGet( $key );", "public function offsetGet($offset)\n\t{\n\t\treturn $this->$offset;\n\t}", "public function offsetGet($offset){\n\t\treturn $this->get($offset);\n\t}", "public function offsetGet($offset)\n {\n return $this->$offset;\n }", "public function offsetGet($offset)\n {\n return $this->$offset;\n }", "public function offsetGet($offset)\n {\n return $this->$offset;\n }", "public function offsetGet($offset)\n {\n return $this->$offset;\n }", "public function offsetGet($offset)\n {\n return $this->$offset;\n }", "public function offsetGet($offset)\n {\n return $this->$offset;\n }", "public function offsetGet($offset)\n {\n return $this->$offset;\n }", "public static function offset($offset);", "public function offset(?int $offset): self;", "public function getOffset() {}", "public function getOffset() {}", "public function getOffset() {}", "public function offsetGet($offset)\n {\n $method = 'get' . str_replace(\" \", \"\", ucwords(strtr($offset, \"_-\", \" \")));\n if(method_exists($this, $method)){\n return $this->$method();\n }\n return null;\n }", "public abstract function value($offset = 0);", "final public function offsetGet($offset)\n\t{\n\t\treturn $this->__get($offset);\n\t}", "public function testOffsetGet()\n\t{\n\t\t$this->assertEquals('rdf:metaData', $this->instance[2]->getName());\n\t}", "public function getOffsets() {}", "public function &offsetGet($offset)\n {\n if ($offset === 'name' && !parent::offsetGet('name')) {\n parent::offsetSet('name', spl_object_hash($this));\n }\n return parent::offsetGet($offset);\n }", "public function get_offset()\n {\n }", "#[\\ReturnTypeWillChange]\n public function offsetGet($offset)\n {\n return $this->attributes[$offset];\n }", "function offsetExists(/*. mixed .*/ $offset){}", "public function __isset($offset)\n {\n }", "public function offsetGet($name) {\n\t\treturn call_user_func_array(array('parent', __FUNCTION__), func_get_args()); \n\t}", "public function getValue($offset = null) {}", "public function offsetGet($offset)\n {\n return $this->getParam($offset);\n }", "public function testOffsetExists()\n\t{\n\t\t$this->assertTrue(isset($this->instance[1]));\n\t}", "function getOffset() ;", "public function offsetGet($offset)\n\t{\n\t\tif(isset(self::$arrayMap[$offset])) {\n\t\t\treturn $this->{self::$arrayMap[$offset]};\n\t\t}\n\t}" ]
[ "0.6929383", "0.6929383", "0.6926884", "0.6899008", "0.6745722", "0.65956503", "0.65956503", "0.65891385", "0.63396484", "0.6289008", "0.62109786", "0.61604637", "0.6155545", "0.6144535", "0.6144535", "0.6144535", "0.6144535", "0.6144535", "0.6144535", "0.6144535", "0.6144535", "0.6144535", "0.6144535", "0.6144535", "0.6144535", "0.6144535", "0.6144535", "0.6144535", "0.60727376", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6061724", "0.6025124", "0.6008341", "0.5947816", "0.59362906", "0.5935318", "0.59336007", "0.5929793", "0.58934295", "0.5888449", "0.58848494", "0.58848494", "0.5883824", "0.5883824", "0.5883824", "0.5867553", "0.5843393", "0.5821959", "0.5821959", "0.5821959", "0.5792124", "0.57844234", "0.57802385", "0.57630813", "0.57606304", "0.57606304", "0.57606304", "0.57606304", "0.57606304", "0.57606304", "0.57606304", "0.5754775", "0.57429236", "0.5738828", "0.5738828", "0.5738828", "0.5722464", "0.57192445", "0.5718804", "0.5707324", "0.5691582", "0.56721544", "0.5666296", "0.56524855", "0.5620142", "0.56122965", "0.56121075", "0.5611157", "0.56074375", "0.55914307", "0.556375", "0.55304533" ]
0.0
-1
Add a command to $this['console'] (Symfony's console component)
public function command($command) { if (! $command instanceof Command) { $command = $this[$command]; } $this['console']->add($command); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addCommand($command);", "public function add(Command $command);", "private function registerConsoleCommands()\n {\n // Console Commands\n }", "private function registerConsoleCommands()\n {\n // Console Commands\n }", "public function registerArtisanCommand()\n\t{\n\t\t$this->app->bindShared('optimus-prime.transformer.make', function($app)\n\t\t{\n\t\t\treturn $app->make('Mosaiqo\\OptimusPrime\\Console\\TransformerGenerate');\n\t\t});\n\n\t\t$this->commands('optimus-prime.transformer.make');\n\t}", "private function registerConsoleCommands()\n {\n $this->commands(DB2Reader\\Commands\\SyncStructures::class);\n }", "public function command(Command $command);", "private function registerConsoleCommands()\n {\n $this->commands(BadasoSitemapSetup::class);\n $this->commands(BadasoSitemapTestSetup::class);\n }", "private function registerConsoleCommands()\n {\n $this->commands(Commands\\InstallCommand::class);\n $this->commands(Commands\\AdminCommand::class);\n }", "public function registerCommands(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands([GeneratePhaseRouter::class]);\n }\n }", "protected function registerCrudCommand()\n {\n $this->app->singleton('command.core.crud', function () {\n return new \\Pw\\Core\\Console\\Commands\\CoreCrudCommand();\n });\n\n $this->commands('command.core.crud');\n }", "public function addSymfonyCommand(Command $command, $modes);", "public function cli()\n {\n _APP_=='varimax' && $this->registerConsoleCommand();\n }", "public function add(Command $command)\n {\n $this->commands[] = $command;\n }", "public function add_cli_command() {\n\t\tif ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {\n\t\t\treturn;\n\t\t}\n\n\t\tWP_CLI::add_command( 'queue', '\\WP_Queue\\Command' );\n\t}", "protected function addCommands()\n {\n $this->commands([\n MakeBlueprint::class,\n ]);\n }", "protected function registerCommands()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n CreateService::class,\n CreateInterface::class,\n CreateProvider::class,\n ]);\n }\n }", "public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }", "protected function registerCommands()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n InstallCommand::class,\n MakeTileCommand::class,\n ]);\n }\n }", "protected function registerCommands()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\AddLaratrustUserTraitUseCommand::class,\n Console\\MakePermissionCommand::class,\n Console\\MakeRoleCommand::class,\n Console\\MakeSeederCommand::class,\n Console\\MakeTeamCommand::class,\n Console\\MigrationCommand::class,\n Console\\SetupCommand::class,\n Console\\SetupTeamsCommand::class,\n Console\\UpgradeCommand::class,\n ]);\n }\n }", "private function registerCommands(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n EventListenCommand::class,\n ]);\n }\n }", "private function setupCommands(): void\n {\n if ($this->app->runningInConsole()) {\n // $this->commands([\n // ]);\n }\n }", "protected function registerCommands()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n InstallCommand::class,\n ]);\n }\n }", "public function addCommand(Command $command)\n {\n $this->commands[$command->getName()] = $command;\n }", "private function registerCommands()\n {\n $this->add(new RunCommand());\n }", "public function addCommand(CommandInterface $command);", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n \n require base_path('routes/console.php');\n }", "protected function registerCommands(): void\n {\n $this->commands([\n\n ]);\n }", "protected function registerMigrationCommand()\n {\n $this->app->singleton('command.core.migration', function () {\n return new \\Pw\\Core\\Console\\Commands\\CoreMigrationCommand();\n });\n\n $this->commands('command.core.migration');\n }", "public static function extendConsoleWithClass($class){\n static::$extendedCommands[] = $class;\n }", "protected function registerInstallCommand()\n {\n $this->app->singleton('command.core.install', function () {\n return new \\Pw\\Core\\Console\\Commands\\CoreInstallCommand();\n });\n\n $this->commands('command.core.install');\n }", "public function registerConsoleCommand($key, $class)\n {\n $key = 'command.'.$key;\n $this->app[$key] = $this->app->share(function ($app) use ($class) {\n return new $class;\n });\n\n $this->commands($key);\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n\n require base_path('routes/console.php');\n }", "protected function commands() {\n require base_path('routes/console.php');\n }", "protected function registerCommands()\n {\n $this->add(new Command\\BuildCommand());\n }", "public function registerConsoleCommand($key, $class)\n {\n $key = 'command.'.$key;\n\n $this->app->singleton($key, $class);\n\n $this->commands($key);\n }", "protected function registerApplicationCommands()\n {\n if (!is_dir($dir = __DIR__.'/../Command')) {\n return;\n }\n\n $finder = new Finder();\n $finder->files()->name('*Command.php')->in($dir);\n\n $prefix = 'Phlexget\\\\Command';\n foreach ($finder as $file) {\n $ns = $prefix;\n if ($relativePath = $file->getRelativePath()) {\n $ns .= '\\\\'.strtr($relativePath, '/', '\\\\');\n }\n $r = new \\ReflectionClass($ns.'\\\\'.$file->getBasename('.php'));\n if ($r->isSubclassOf('Symfony\\\\Component\\\\Console\\\\Command\\\\Command') && !$r->isAbstract()) {\n $this->add($r->newInstance());\n }\n }\n }", "protected function registerCommands()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n KnetCommand::class,\n InstallCommand::class,\n PublishCommand::class,\n ]);\n }\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n $this->load(__DIR__.'/Commands');\n require base_path('routes/console.php');\n }", "protected function addToParent(SymfonyCommand $command)\r\n {\r\n return parent::add($command);\r\n }", "protected function commands()\n {\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n require base_path('routes/console.php');\n }", "protected function commands()\n {\n require base_path('routes/console.php');\n }" ]
[ "0.7304341", "0.6926484", "0.68666756", "0.68666756", "0.66503364", "0.6634797", "0.65980995", "0.6595667", "0.6585102", "0.65645355", "0.65317327", "0.6519502", "0.6513228", "0.6480323", "0.64171803", "0.6401555", "0.64002836", "0.63780975", "0.63765", "0.6351101", "0.6323737", "0.6289464", "0.62886894", "0.6278999", "0.6263814", "0.625854", "0.6197978", "0.61718965", "0.6157252", "0.615253", "0.6148009", "0.6138908", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.6117263", "0.61024004", "0.6101383", "0.6099795", "0.60919577", "0.60839516", "0.60701674", "0.60701674", "0.6050116", "0.6048213", "0.6048213", "0.6048213", "0.6048213", "0.6048213", "0.6048213", "0.6048213", "0.6048213", "0.6048213", "0.6048213", "0.6048213", "0.6048213" ]
0.7712684
0
Set the implementation that should be used for a given pattern name. This can be a class name or an object.
public function setImplementation(string $name, $implementation): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setNamingPattern($pattern ='/([a-zA-Z1-9]+)(Function|Block)$/') {\n\t\t //\"/([a-zA-Z1-9]+)Function$/\";\n\t\t $this->_namingPattern = $pattern;\n\t}", "public function setPattern($pattern) {}", "public function setPattern($pattern) {\n if ($pattern instanceof PanelsPatternInterface) {\n $this->pattern = $pattern;\n $this->configuration['pattern'] = $pattern->getPluginId();\n }\n elseif (is_string($pattern)) {\n $this->pattern = NULL;\n $this->configuration['pattern'] = $pattern;\n }\n else {\n throw new \\Exception(\"Pattern must be a string or PanelsPatternInterface object\");\n }\n\n return $this;\n }", "public function setPattern($pattern)\n {\n $this->_pattern = $pattern;\n }", "public function setClassName(string $name) : void\n {\n //since the $this->name property is a read only and can not be changed even with reflectio na new property needs to be used\n //TODO add validation\n $this->gen_name = $name;\n }", "public function setClass(string $class_name);", "public function register($name, $pattern, $strict = false);", "public function __set($name, $value) {\n if(array_key_exists(strtolower($name), $this->_instances)) {\n $this->_instances[strtolower($name)] = $value;\n }\n }", "function setDriver($name) {\n\t\t$driver = $this->driversPath.$name.\".php\";\n\t\ttry {\n\t\t\tif( ! file_exists($driver) ) throw new Exception(\"Selected file is not a driver!\");\n\t\t\tinclude($driver);\n\t\t\t$drv = new $name();\n\t\t\tif( ! is_a($drv, 'Driver') ) throw new InvalidArgumentException(\"Drivers should extend Driver class\");\n\t\t} catch (Exception $e) {\n\t\t\t$this->toast = $e->getMessage();\n\t\t\treturn false;\n\t\t}\n $this->driver = $drv;\n\t\t$this->driver->cr = $this;\n\t\treturn true;\n\t}", "public function setProviderName($name);", "function map_named($name, $pattern, $defaults=false, $requirements=false) {\n\t\t# parse pattern into regex\n\t\t$this->maps[$name] = new UsherMap($pattern, $defaults, $requirements);\n\t}", "public function setPattern(?string $pattern): static\n {\n $this->pattern = $pattern;\n return $this;\n }", "public function makeClassName(string $pattern, string $name): string\n {\n $className = $pattern;\n $replace = [\n '[datetime]_' => '',\n '[name]' => $this->removeSpecialCharacters($name),\n '.php' => '',\n ];\n return Str::studly(str_replace(array_keys($replace), $replace, $className));\n }", "public function setPattern($pattern) {\n $this->pattern = $pattern;\n return $this;\n }", "public function __construct( $pattern, $default = null )\n {\n $this->pattern = $pattern;\n $this->default = $default;\n }", "public function setSlugPattern($pattern);", "public function SetPattern ($pattern) {\n\t\t$this->pattern = $pattern;\n\t\treturn $this;\n\t}", "public function __set($name, $provider) {\n\n $this->set($name, $provider);\n }", "public function __set($name, $value){\n switch ($name) {\n case '_patente':\n $this->_patente = $value;\n case '_marca':\n $this->_marca= $value;\n case '_color':\n $this->_color= $value;\n case '_precio':\n $this->_precio= $value;\n default:\n \"No se existe la varible\";\n break;\n }\n $this->$name = $value;\n }", "public function setPattern(string $type, ?string $pattern): void\n {\n if (!array_key_exists($type, $this->patterns)) {\n throw new \\OutOfBoundsException('The type you are trying to set, does not exists!');\n }\n\n if (null === $pattern) {\n $this->patterns[$type] = '/a^/';\n\n return;\n }\n\n // Check for a capturing group in the pattern.\n if (!preg_match('/^[^()]*\\([^)]*\\)[^()]*$/', $pattern)) {\n throw new GitChangelogException('The pattern must contain exactly one capturing group');\n }\n\n $this->patterns[$type] = \"/$pattern(?![^\\[]*\\])/\";\n }", "public function __set($name, $value)\n\t{\n\t\t$this->getInstance()->$name = $value;\n\t}", "public function __set( $name, $value )\n\t{\n\t\t//\tThen behaviors\n\t\tforeach ( $this->_behaviorCache as $_behaviorName )\n\t\t{\n\t\t\tif ( ( $_behavior = $this->asa( $_behaviorName ) ) instanceof IPSOptionContainer && $_behavior->contains( $name ) )\n\t\t\t\treturn $_behavior->setValue( $name, $value );\n\t\t}\n\n\t\t//\tLet parent take a stab. He'll check getter/setters and Behavior methods\n\t\treturn parent::__set( $name, $value );\n\t}", "public function set(string $name, string $locale, Package|callable $spec): void\n {\n $this->registry[$name][$locale] = $spec;\n $this->converted[$name][$locale] = $spec instanceof Package;\n }", "public function __set($name, $value);", "public function __set($name, $value);", "public function setClassName( $value ) {\r\n\t\t$this->class_name = $value;\r\n\t}", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n $method = 'set' . ucfirst($name); // Zie: http://www.php.net/manual/en/function.ucfirst.php\n if (method_exists($this, $method) ) { // Zie: http://www.php.net/manual/en/function.method-exists.php\n $this->{$method}($value);\n } else {\n $property = '_' . lcfirst($name); // Zie: http://www.php.net/manual/en/function.lcfirst.php\n if (property_exists($this, $property) ) { // Zie: http://www.php.net/manual/en/function.property-exists.php\n $this->{$property} = $value; // De accolades zijn optioneel.\n } else {\n $this->_throwError($property);\n }\n }\n }", "public function __set(string $name, $value): void\n\t{\n\t\t$setter = 'set' . ucfirst($name);\n\n\t\tif (self::hasMethod(static::class, $setter)) {\n\t\t\t$this->$setter($value);\n\t\t}\n\t}", "public function setServiceProvider($name, ServiceProviderInterface $provider);", "public function setStrategy($strategy)\n {\n $sClass = $this->strategies->load(ucfirst($strategy));\n $this->strategy = new $sClass();\n $this->strategy->setAdapter($this);\n\n RETURN $this;\n }", "public function setPattern(string $countryCode, string $pattern) : void\n {\n $this->patterns[$countryCode] = $pattern;\n }", "public function setPattern($pattern)\n {\n $this->pattern = $pattern;\n return $this;\n }", "public function setPattern($pattern)\n {\n $this->pattern = $pattern;\n return $this;\n }", "public function unregister($pattern_name)\n {\n }", "public function __set($_name, $_value);", "function __set($name, $value)\n {\n // TODO: Implement __set() method.\n }", "function __set($name, $value) {\n $this->$name = $value;\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "function __set($name, $value)\r\n\t{\r\n\t\t$this->{$name} = $value;\r\n\t}", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function __set($name, $value)\n {\n }", "public function setPattern($value)\n\t{\n\t\t$this->setViewState('Pattern',$value,'');\n\t}", "function __set( $name, $value ) {\n\t\t$this->$name = $value;\n\t}", "final public function __set($name, $value)\n {\n }", "public function setProcessor($name){\r\n\t\t$this->processor = $name;\r\n\t}", "private function __set($name, $value)\n {\n// \tprint(\"Property set for [$name]<br/>\");\n if (method_exists($this, ($method = 'set_'.$name)))\n {\n $this->$method($value);\n }\n }", "public function __set($name, $value){\n $this->$name=$value;\n }", "public static function setDefaultDriver($name)\n {\n }", "public function give($implementation);", "public function pattern($name, $pattern)\n {\n $this->routeObject->addPattern($name, $pattern);\n return $this;\n }", "public function __set($name, $value){\n $this->$name = $value;\n }", "public function setName($name) {\n\t}", "public function set(string $name, $object)\n {\n $this->instances[$name] = $object;\n }", "public function determinePattern($className){\n\t\t\n\t}", "public function setPattern($pattern)\n {\n $this->options['pattern'] = $pattern;\n\n return $this;\n }", "public function setName($_name)\n {\n if (is_string($_name)) {\n \t$this->_name = $_name;\n }\n }", "public static function setImplementationFactory(callable $implementationFactory)\n {\n }", "private function setRepositoryClass()\n {\n $name = $this->argument('name');\n $this->model = $name;\n $modelClass = $this->qualifyClass($name);\n $this->fileName = $modelClass . $this->type;\n $this->className = $name;\n }", "function setClassName($value) {\r\n $this->className = $value;\r\n }", "function __set ( $name , $value )\n {\n $this->$name=$value;\n }", "private static function setFromClassAnnotation($className)\n {\n $annotation = self::getClassAnnotation($className);\n if (empty($annotation))\n return;\n\n $value = function() use ($className) {\n return new $className();\n };\n\n switch ($annotation->getName())\n {\n case 'PebbleFactory':\n PebbleCollection::set($annotation->getValue(), $value);\n break;\n\n case 'SharedPebble':\n PebbleCollection::once($annotation->getValue(), $value);\n break;\n }\n }", "public function pattern($key, $pattern)\n {\n $this->patterns[$key] = $pattern;\n }", "public function __set($name,$value)\r\n {\r\n $this->set($name,$value);\r\n }", "function __set($name, $value)\n {\n $this->set($name, $value);\n }", "public function __set($name, $value) {\n\t\tswitch($name) {\n\t\t\tcase \"applicationDefinitionId\":\n\t\t\t\t$this->setApplicationDefinitionId($value); return;\n\t\t\tcase \"pageDefinitionId\": $this->setPageDefinitionId($value); return;\n\t\t\tcase \"title\": $this->setTitle($value); return;\n\t\t\tcase \"icon\": $this->setIcon($value); return;\n\t\t\tcase \"phpSelector\": $this->setPhpSelector($value); return;\n\t\t\tcase \"titleWidth\": $this->setTitleWidth($value); return;\n\t\t\tcase \"titleLabel\": $this->setTitleLabel($value); return;\n\t\t}\n\t\tthrow new \\Scrivo\\SystemException(\"No such set-property '$name'.\");\n\t}", "public function set_class_name($class_name) {\n\t\t\t$this->_class_name = $class_name;\n\t}", "public function setName($name) {}", "public function setName($name) {}", "public function name($pattern)\n {\n $pattern = $this->addFileExtensionToPattern($pattern);\n $this->finder->name($pattern);\n $this->useDefaultName = false;\n\n return $this;\n }", "public function setDefaultEngine(string $name): ViewManagerInterface;", "private function createReplacementPatternInterfaceMock()\n {\n return $this->getMockBuilder(ReplacementPatternInterface::class)->getMock();\n }", "public function setClass($class);", "public function __set($name,$value)\n {\n $this->set($name, $value);\n }", "public function __set($name, $value) {\n $this->$name = $value;\n }", "private function _set($name, $value) {\n $methodName = 'set' . ucfirst($name);\n if(method_exists($this, $methodName)) {\n $this->$methodName($value);\n } else {\n $property = $name;\n $this->$property = $value;\n }\n }", "public function __set($name, $value)\n {\n $this->$name = $value;\n }", "public function __set($name, $value)\n {\n $this->$name = $value;\n }", "public function __set($name, $value)\n {\n $this->$name = $value;\n }", "private function setName($name) {\n if (is_string($name)) {\n $this->name = $name;\n }\n }", "public function setName($name)\n {\n // TODO: Implement setName() method.\n }", "public function SetName ($name);", "public function setName($name);", "public function setName($name);", "public function setName($name);", "public function setName($name);", "public function setName($name);", "public function setName($name);", "public function setName($name);", "public function setName($name);", "public function setName($name);", "public function setName($name);", "public function setName($name);" ]
[ "0.6213045", "0.6005729", "0.59967476", "0.59144324", "0.5570548", "0.5485691", "0.5462404", "0.53771013", "0.53156143", "0.5288449", "0.5222408", "0.5217453", "0.5212749", "0.52102244", "0.51750135", "0.51701534", "0.51332945", "0.5117826", "0.5101714", "0.50942975", "0.5092296", "0.5090064", "0.5071681", "0.50639975", "0.50639975", "0.50371605", "0.5030266", "0.5023518", "0.500327", "0.49996868", "0.49981406", "0.49917984", "0.49890724", "0.49890724", "0.49889743", "0.49810484", "0.49768928", "0.4975772", "0.49640182", "0.49638504", "0.49638504", "0.49638504", "0.49638504", "0.49638504", "0.49624217", "0.49619916", "0.49619916", "0.49619916", "0.49607867", "0.49600345", "0.49452463", "0.49354726", "0.4931778", "0.49147892", "0.4907117", "0.4904128", "0.49037907", "0.49000552", "0.4892652", "0.48923796", "0.4891563", "0.48911697", "0.48862278", "0.48847613", "0.4872877", "0.48705432", "0.48594806", "0.48582488", "0.48531577", "0.48457608", "0.48435974", "0.48418012", "0.48368442", "0.48343018", "0.4829502", "0.4829502", "0.4825319", "0.482144", "0.48189315", "0.48164567", "0.48114643", "0.48049384", "0.48047322", "0.47999617", "0.47999617", "0.47999617", "0.4798069", "0.4788221", "0.47768688", "0.47642297", "0.47642297", "0.47642297", "0.47642297", "0.47642297", "0.47642297", "0.47642297", "0.47642297", "0.47642297", "0.47642297", "0.47642297" ]
0.65185994
0
Adds a pattern to the configuration. It can be added to an alias or as a subpattern, choosing where to place it. This method uses a fluent interface and is followed by `ToAliasOrParent` Example: $configuration >add('strong') >toAlias('inline') >last(); $configuration >add('strong') >toParent('italic') >first();
public function add(string $name): ToAliasOrParent;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPattern($pattern) {\n if ($pattern instanceof PanelsPatternInterface) {\n $this->pattern = $pattern;\n $this->configuration['pattern'] = $pattern->getPluginId();\n }\n elseif (is_string($pattern)) {\n $this->pattern = NULL;\n $this->configuration['pattern'] = $pattern;\n }\n else {\n throw new \\Exception(\"Pattern must be a string or PanelsPatternInterface object\");\n }\n\n return $this;\n }", "public function addPattern(string $baseDir, string $pattern, string $textDomain = 'default')\n {\n if (!isset($this->patterns[$textDomain]))\n $this->patterns[$textDomain] = array();\n\n $this->patterns[$textDomain][] = array(\n 'baseDir' => rtrim($baseDir, '/'),\n 'pattern' => $pattern,\n );\n\n return $this;\n }", "public function pattern($patterns) {\n\t\tforeach ((array) $patterns as $val) {\n\t\t\t$this->patterns[] = $val;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function add($pattern, $target)\n {\n $pattern = str_replace(\n ['|', '^', '$'],\n ['\\|', '\\^', '\\$'],\n $pattern\n );\n\n return $this->addRoute(\n new Route('|^' . $pattern . '$|', $target)\n );\n }", "public function setPattern($pattern)\n {\n $this->options['pattern'] = $pattern;\n\n return $this;\n }", "public function setPattern($pattern) {\n $this->pattern = $pattern;\n return $this;\n }", "public function add($pattern, $callback, array $options = ['GET']): \\BearFramework\\App\\RoutesRepository\n {\n if (is_string($pattern)) {\n if (!isset($pattern{0})) {\n throw new \\InvalidArgumentException('The pattern argument must be a not empty string or array of not empty strings');\n }\n $pattern = [$pattern];\n } elseif (is_array($pattern)) {\n if (empty($pattern)) {\n throw new \\InvalidArgumentException('The pattern argument must be a not empty string or array of not empty strings');\n }\n foreach ($pattern as $_pattern) {\n if (!is_string($_pattern)) {\n throw new \\InvalidArgumentException('The pattern argument must be a not empty string or array of not empty strings');\n }\n if (!isset($_pattern{0})) {\n throw new \\InvalidArgumentException('The pattern argument must be a not empty string or array of not empty strings');\n }\n }\n } else {\n throw new \\InvalidArgumentException('The pattern argument must be a not empty string or array of not empty strings');\n }\n if (is_callable($callback)) {\n $callback = [$callback];\n } elseif (is_array($callback)) {\n if (empty($callback)) {\n throw new \\InvalidArgumentException('The callback argument must be a valid callable or array of valid callables');\n }\n foreach ($callback as $_callback) {\n if (!is_callable($_callback)) {\n throw new \\InvalidArgumentException('The callback argument must be a valid callable or array of valid callables');\n }\n }\n } else {\n throw new \\InvalidArgumentException('The callback argument must be a valid callable or array of valid callables');\n }\n $this->data[] = [$pattern, $callback, $options];\n return $this;\n }", "public function append_url_pattern($pattern) {\n $this->urls[] = $pattern;\n }", "public function setPattern(?string $pattern): static\n {\n $this->pattern = $pattern;\n return $this;\n }", "static public function add($pattern, array $route=array())\n\t{\n\t\tif (is_array($pattern))\n\t\t{\n\t\t\tself::$routes = $pattern + self::$routes;\n\n\t\t\treturn;\n\t\t}\n\n\t\tself::$routes[$pattern] = $route;\n\t}", "public function addAlias($alias) {\n $this->alias[] = $alias;\n return $this;\n }", "public function pattern($name, $pattern)\n {\n $this->routeObject->addPattern($name, $pattern);\n return $this;\n }", "public function setPattern($pattern) {}", "public function setPattern($pattern)\n {\n $this->pattern = $pattern;\n return $this;\n }", "public function setPattern($pattern)\n {\n $this->pattern = $pattern;\n return $this;\n }", "public function SetPattern ($pattern) {\n\t\t$this->pattern = $pattern;\n\t\treturn $this;\n\t}", "function addRuleInstances(&$digester) {\r\n\r\n\t\t$applicationPattern\t\t= 'phpmvc-config';\r\n\r\n\t\t// DataSourceConfig\r\n\t\t$dataSourcesPattern\t\t= 'phpmvc-config/data-sources';\r\n\t\t$dataSourcePattern\t\t= 'phpmvc-config/data-sources/data-source';\r\n\r\n\t\t// ActionConfig\r\n\t\t$actionMappingsPattern\t= 'phpmvc-config/action-mappings';\r\n\t\t$actionMappingPattern\t= 'phpmvc-config/action-mappings/action';\r\n\t\t$actionForwardPattern\t= 'phpmvc-config/action-mappings/action/forward';\r\n\r\n\t\t// FormBean\r\n\t\t$formBeansPattern\t\t\t= 'phpmvc-config/form-beans';\r\n\t\t$formBeanPattern\t\t\t= 'phpmvc-config/form-beans/form-bean';\r\n\r\n\r\n\t\t$globForwardsPattern\t\t= '*/global-forwards';\r\n\t\t$setPropertyPattern\t\t= 'phpmvc-config/my-object/property';\r\n\r\n\r\n\t\t// DataSourceConfig <data-source ...>\r\n\t\t// Create a new configuration object ('DataSourceConfig')\r\n\t\t$digester->addObjectCreate(\r\n\t\t\t\t\t\t\t$dataSourcePattern,\t// <data-source ...>\r\n\t\t\t\t\t\t\t'DataSourceConfig',\t// config class to build\r\n\t\t\t\t\t\t\t'className');\t\t\t// [optional] specify an alternate to \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the default 'DataSourceConfig' config \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// file, if this attribute is present in\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the phpmvc-config xml descriptor file\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Eg: \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// <data-source ... className=\"MyDataSourceConfig\">\r\n\t\t// Set the configuration objects properties\r\n\t\t// phpmvc-config xml descriptor file attributes must match the target object methods\r\n\t \t// Eg: \"driverClassName\" maps to \"BasicDataSource->setDriverClassName\"\r\n\t\t$digester->addSetProperties($dataSourcePattern);\r\n\t\t// Add a callback reference to bind the configuration object to its parent\r\n\t\t// (ApplicationConfig) object.\r\n\t\t// Eg: Rule(pattern-to-match, ApplicationConfig->addDataSourceConfig(dataSourceConfig))\r\n\t\t$digester->addSetNext($dataSourcePattern, 'addDataSourceConfig');\t\t\r\n\r\n\r\n\t\t// ActionConfig\r\n\t\t$digester->addObjectCreate($actionMappingPattern, 'ActionConfig');\r\n\t\t$digester->addSetProperties($actionMappingPattern);\r\n\t\t$digester->addSetNext($actionMappingPattern, 'addActionConfig');\t\r\n\r\n\t\t$digester->addObjectCreate($actionForwardPattern, 'ForwardConfig');\r\n\t\t$digester->addSetProperties($actionForwardPattern);\r\n\t\t$digester->addSetNext($actionForwardPattern, 'addForwardConfig');\t\r\n\r\n\r\n\t\t// FormBeanConfig\r\n\t\t$digester->addObjectCreate($formBeanPattern, 'FormBeanConfig');\r\n\t\t$digester->addSetProperties($formBeanPattern);\r\n\t\t$digester->addSetNext($formBeanPattern, 'addFormBeanConfig');\t\r\n\r\n }", "public function addRule($pattern, $replacement)\n {\n $this->rules[] = (is_callable($replacement))\n ? ['pattern' => $pattern, 'replacement' => $replacement, 'callback' => true]\n : ['pattern' => $pattern, 'replacement' => $replacement, 'callback' => false];\n }", "public function addRoute(string $pattern, $callback): void\n {\n if (!\\is_callable($callback)) {\n throw new InvalidRouteConfigurationException(\n 'Second argument of ' . __METHOD__ . ' must be callable'\n );\n }\n\n $pattern = '/^' . str_replace('/', '\\/', $pattern) . '$/';\n\n self::$routes[$pattern] = $callback;\n }", "public function setPattern(string $type, ?string $pattern): void\n {\n if (!array_key_exists($type, $this->patterns)) {\n throw new \\OutOfBoundsException('The type you are trying to set, does not exists!');\n }\n\n if (null === $pattern) {\n $this->patterns[$type] = '/a^/';\n\n return;\n }\n\n // Check for a capturing group in the pattern.\n if (!preg_match('/^[^()]*\\([^)]*\\)[^()]*$/', $pattern)) {\n throw new GitChangelogException('The pattern must contain exactly one capturing group');\n }\n\n $this->patterns[$type] = \"/$pattern(?![^\\[]*\\])/\";\n }", "protected function registerPattern($pattern, $replacement = '') {\n // doublecheck if pattern actually starts at beginning of content\n if(substr($pattern, 1, 1) !== '^') {\n throw new Exception('Pattern \"' . $pattern . '\" should start processing at the beginning of the string.');\n }\n\n $this->patterns[] = $pattern;\n $this->replacements[] = $replacement;\n }", "public function register($name, $pattern, $strict = false);", "public function addPattern($name, array $data)\n {\n $this->added_data[$name] = $data;\n }", "public function addPregReplace($pattern, $replacement) {\n\t\t$this->replaces[] = array('pattern' => $pattern, 'replacement' => $replacement);\n\t}", "public function addOptions($pattern, $paths = null, $position = false)\n {\n return $this->add($pattern, $paths, 'OPTIONS', $position);\n }", "public static function pattern(string $pattern, string $exceptionMessage = self::DEFAULT_PATTERN_EXCEPTION_MESSAGE): self\n {\n return (new self())->setPattern($pattern, $exceptionMessage);\n }", "public function with($pattern, $callback)\n {\n $this->basepath = $this->prepare($pattern);\n if(is_callable($callback))\n call_user_func($callback);\n $this->basepath = '/';\n }", "public function registerRules()\n {\n\n $routes = $this->getRoutes();\n if (!empty($routes)) {\n add_rewrite_tag('%' . $this->routeVariable . '%', '(.+)');\n foreach ($routes as $name => $route) {\n /** @var Route $route */\n $regex = $this->generateRouteRegex($route);\n $path = $route->getPath();\n\n $qs = $this->routeVariable . '=' . $name;\n if (strpos($path, '{') !== false) {\n preg_match_all('/{(.*?)}/', $path, $wildCardsMatchs);\n $wildCards = $wildCardsMatchs[1];\n if (!empty($wildCards)) {\n $cpt = 1;\n foreach ($wildCards as $wildCard) {\n $qs .= '&' . $wildCard . '=$matches[' . $cpt . ']';\n $cpt++;\n }\n }\n }\n $callable = $route->getCallable();\n if (is_callable($callable) || is_array($callable)) {\n $newRewriteRule = 'index.php?' . $qs;\n } else {\n $newRewriteRule = $callable;\n if (strpos($newRewriteRule, $this->routeVariable . '=' . $name) === false) {\n $newRewriteRule .= '&' . $this->routeVariable . '=' . $name;\n }\n }\n\n add_rewrite_rule($regex, $newRewriteRule, 'top');\n }\n }\n\n return $this;\n }", "function something() {\n\t\t$this->add(\"(.+)\");\n\t\treturn $this;\n\t}", "public function add($pattern, $paths = null, $httpMethods = null, $position = 4)\n {\n $route = new Route($pattern, $paths, $httpMethods);\n $route->setGroup($this);\n\n if ($position == Router::POSITION_FIRST) {\n array_unshift($this->routes, $route);\n } else {\n array_push($this->routes, $route);\n }\n return $route;\n }", "public static function invalidPattern(string $pattern): self\n {\n return new self(\n \"Laravel Auto-Reg: The path-pattern \\\"$pattern\\\" is invalid. \"\n . \"Check the 'patterns' values in configs/\" . Settings::LARAVEL_CONFIG_NAME . \".php\"\n );\n }", "final public function register($pattern, $abstraction = null)\n {\n if ( $abstraction instanceof AdoptableRoutingInterface ) {\n foreach ( $abstraction->getRoutes() as list($route, $abstractPattern) ) {\n $implementedPattern = $pattern.'/'.ltrim($abstractPattern, '/');\n $this->routes->add($route, $this->buildRouteData($implementedPattern));\n }\n \n return null;\n }\n \n $routeClass = $this->routeClass;\n $this->routes->add($route = new $routeClass, $this->buildRouteData($pattern));\n \n if ( null !== $abstraction ) {\n $route->abstraction($abstraction); \n }\n \n return $route;\n }", "public function setPattern($pattern)\n {\n $this->_pattern = $pattern;\n }", "public function setPattern(\n string $pattern,\n string $exceptionMessage = self::DEFAULT_PATTERN_EXCEPTION_MESSAGE\n ): self\n {\n if ($this->pattern !== null) {\n throw new ParserConfigurationException(\n 'The pattern for AssertStringRegex has already been defined and cannot be overwritten'\n );\n }\n if (@preg_match($pattern, '') === false) {\n throw new ParserConfigurationException(\n 'An invalid regular expression was provided'\n );\n }\n $this->pattern = $pattern;\n $this->patternExceptionMessage = $exceptionMessage;\n\n return $this;\n }", "public function add($pattern, $paths = null, $httpMethods = null) {\n\n\t\t$route = new Route($pattern, $paths, $httpMethods);\n\n\t\t$this->_routes[] = $route;\n\n\t\treturn $route;\n\t}", "public function addRoute($pattern, $handler)\n {\n $this->routes->append($pattern, $handler);\n }", "public function addPatterns(array $array_patterns)\n {\n foreach($array_patterns as $name => $rule_data)\n $this->added_data[$name] = $rule_data;\n }", "protected function addPattern(array $schema, array $definition) : array\n {\n if (isset($definition['pattern'])) {\n $schema['pattern'] = $definition['pattern'];\n }\n return $schema;\n }", "public function addExpression($expression, $alias = NULL, $arguments = []);", "protected function patterns() {\n throw new coding_exception('patterns() method needs to be overridden in each subclass of mod_dataform_field_patterns');\n }", "public function addAlias( $name, $value )\n {\n $this->aliases[$name] = $value;\n }", "public function addAlias(string $alias, string $target): self;", "public function connectTo($mode) {\n $this->Lexer->addSpecialPattern('~~~*RECURSIVE~*~~', $mode, 'plugin_latexit_base');\n $this->Lexer->addSpecialPattern('\\\\\\cite.*?\\}', $mode, 'plugin_latexit_base');\n }", "function add_rewrite_rule($regex, $query, $after = 'bottom')\n {\n }", "function connectTo($mode) {\n\t$this->Lexer->addSpecialPattern('\\[@.+?\\]',$mode,'plugin_dokuresearchr');\n\t// $this->Lexer->addEntryPattern('<TEST>',$mode,'plugin_test');\n}", "public function pattern($key, $pattern)\n {\n $this->patterns[$key] = $pattern;\n }", "private function configureUsingFluentDefinition(): void\n {\n $data = ExpressionParser::parse($this->signature);\n\n parent::__construct($data['name']);\n\n foreach ($data['arguments'] as $argument) {\n $this->getDefinition()->addArgument($argument);\n }\n\n foreach ($data['options'] as $option) {\n $this->getDefinition()->addOption($option);\n }\n }", "public function add_rule($regex, $query, $after = 'bottom')\n {\n }", "function _register_core_block_patterns_and_categories()\n {\n }", "function connectTo($mode) {\n $this->Lexer->addSpecialPattern('<plot.*?>\\n.*?\\n</plot>',$mode,'plugin_plot');\n }", "function connectTo($mode) {\n $this->Lexer->addEntryPattern('<poem>\\n?',$mode,'plugin_poem_block');\n }", "public function addConfig(\\Yaf\\Config_Abstract $config){ }", "public static function add_rewrite_rule()\n {\n }", "public function addAlias(string $alias, string $realName): self\n {\n assert(!isset($this->alias[$realName]));\n $this->alias[$alias] = $realName;\n return $this;\n }", "public function __construct($patterns = [\"Proxy\\\\{ns}\\\\{ln}\"])\n {\n $this->patterns = $patterns;\n }", "static function add_alias(): void {\r\n\t\tself::add_acf_inner_field(self::aliases, self::alias, [\r\n\t\t\t'label' => 'Alias',\r\n\t\t\t'type' => 'text',\r\n\t\t\t'instructions' => '',\r\n\t\t\t'required' => 1,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '100',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t]);\r\n\t}", "function addWhat($name, $what, $alias = NULL) {\n\t\tif($alias !== NULL) {\n\t\t\t$this->addBlock('what', $name, $what . ' AS ' . '`' . $alias . '`');\n\t\t} else {\n\t\t\t$this->addBlock('what', $name, $what);\n\t\t}\n\t\treturn $this;\n\t}", "public function addConfiguration(NodeDefinition $node)\n {\n }", "public function addPost($pattern, $paths = null, $position = false)\n {\n return $this->add($pattern, $paths, 'POST', $position);\n }", "public function addUsage(string $usage): static\n {\n if (!str_starts_with($usage, $this->name)) {\n $usage = sprintf('%s %s', $this->name, $usage);\n }\n\n $this->usages[] = $usage;\n\n return $this;\n }", "public function addRoute($name, $pattern, array $rules, $methods = array('GET'), $controller, $action)\n {\n $this->routes->add($name, new Route($name, $pattern, $rules, $methods, $controller, $action));\n }", "public function insert(string $insert): self\n {\n if (!in_array($insert, ['append', 'prepend'])) {\n throw new InvalidArgumentException(\"Invalid argument insert [$insert]\");\n }\n\n $this->config->set('insert', $insert);\n\n return $this;\n }", "public function add(RuleElement\\Element $element) {\n $this->elements[] = $element;\n\n return $this;\n }", "public function addReverseRoute($pattern, $replacement, $isLast=false)\n {\n // Store reverse route\n $this->reverseRoutes[] = $this->newRoute($pattern, $replacement, $isLast);\n }", "public function addEncoder($pattern, Diggin_Http_Response_Charset_Encoder_EncoderInterface $encoder)\n {\n $this->_encoderSet[$pattern] = $encoder;\n\n return $this;\n }", "protected function configureUsingFluentDefinition()\n {\n list($name, $arguments, $options) = Parser::parse($this->signature);\n parent::__construct($name);\n foreach ($arguments as $argument) {\n $this->getDefinition()->addArgument($argument);\n }\n foreach ($options as $option) {\n $this->getDefinition()->addOption($option);\n }\n }", "public function addRoutes()\n {\n //Get the routes template content\n $content = \\File::get($this->package_path('Templates/routes.php'));\n //Append to the routes.php file\n $this->addToFile('routes.php', 'routes', \"\\n\\n\" . $content);\n }", "public function addPatch($pattern, $paths = null, $position = false)\n {\n return $this->add($pattern, $paths, 'PATCH', $position);\n }", "public function setPattern($value)\n\t{\n\t\t$this->setViewState('Pattern',$value,'');\n\t}", "function connectTo($mode)\n {\n $this->Lexer->addSpecialPattern('~~QRCODE.*?~~', $mode, 'plugin_qrcode_qrcode');\n }", "public function addRoutes(): void\n {\n $router = $this->config['router'] ?? Router::class;\n $router::$DELIMITER = $this->delimiter;\n foreach (static::$routes as [$url, $func, $method]) {\n $router::add($url, [$this, $func], $method);\n }\n }", "static function addAlias()\n\t{\n\t\tPie_Config::set('pie', 'aliases', '', APP_WEB_DIR);\n\t}", "public function pattern(string $key, string $pattern): self\n {\n $key = \\trim($key, ':{}');\n if(\\substr($pattern, 0, 1) != '(' && \\substr($pattern, -1) != ')'){\n $pattern = '(' . $pattern . ')';\n }\n $this->patterns[':' . $key] = $pattern;\n $this->patterns['{' . $key . '}'] = $pattern;\n return $this;\n }", "private function addRoute()\n {\n if (! $this->postType->rewrite) {\n return;\n }\n $postTypeSlug = $this->postType->rewrite['slug'];\n $this->cortexRoutes->addRoute(new QueryRoute(\n \"{$postTypeSlug}/{postName}/{singleChildName}\",\n function (array $matches) use ($postTypeSlug) {\n $queryPost = new QueryPost(\n $this->postType->name,\n $matches['postName']\n );\n if (! $queryPost->postExists()) {\n new TemplateRenderer('404');\n }\n $postSingle = $queryPost->getPost();\n new TemplateRenderer(\n $postTypeSlug,\n $matches['singleChildName'],\n $this->makeDataArray(\n $postSingle->ID,\n $matches['singleChildName']\n ),\n $this->templateRootDirectory\n );\n die();\n }\n ));\n }", "function ca_rewrite_pattern_form($form, &$form_state, $ca_rewrite_pattern, $op = 'edit') {\n $form['description'] = array(\n '#type' => 'textfield',\n '#title' => t('Description'),\n '#default_value' => $ca_rewrite_pattern->description,\n );\n $form['pattern'] = array(\n '#type' => 'textfield',\n '#title' => t('Pattern'),\n '#default_value' => $ca_rewrite_pattern->pattern,\n );\n $form['replacement'] = array(\n '#type' => 'textfield',\n '#title' => t('Replacement'),\n '#default_value' => $ca_rewrite_pattern->replacement,\n );\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save Pattern'),\n '#weight' => 40,\n );\n return $form;\n}", "public function addToDescription($item)\n {\n // validation for constraint: itemType\n if (!false) {\n throw new \\InvalidArgumentException(sprintf('The Description property can only contain items of anyType, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->Description[] = $item;\n return $this;\n }", "public function getPattern(): string\n {\n return $this->getConfig('pattern');\n }", "function connectTo($mode) {\n $this->Lexer->addEntryPattern('<TEXT>(?=.*?</TEXT>)',$mode,'plugin_plaintext_block');\n }", "protected function migrate_pattern_categories($pattern)\n {\n }", "public function regex($name, $pattern, $message = 'The creation date is invalid')\n {\n //Regex\n switch ($pattern)\n {\n case 'www':\n $value = '/^[0-9]{4}[-\\/](0[1-9]|1[12])[-\\/](0[1-9]|[12][0-9]|3[01])$/';\n break;\n \n case 'alias':\n $value = '/^[0-9a-zA-Z_-]++$/iD';\n break;\n\n \n default:\n $value = '/^[0-9]{4}[-\\/](0[1-9]|1[12])[-\\/](0[1-9]|[12][0-9]|3[01])$/';\n break;\n }\n\n \n $this->validation->add($name, new \\Phalcon\\Validation\\Validator\\Regex(array(\n 'pattern' => $value,\n 'message' => $message\n )));\n return $this;\n }", "protected function createDeclarativeConfig() {\n $this->mapServiceAndRoute();\n }", "public function addAlias(string $alias, string $id) {\n\t\treturn $this->setEntry(\n\t\t\t$alias,\n\t\t\t$this->createObject(Entry\\AliasEntry::class, $id)\n\t\t);\n\t}", "protected function addListenerPattern(ListenerPattern $pattern)\n {\n $this->patterns[$pattern->getEventPattern()][] = $pattern;\n\n foreach ($this->syncedEvents as $eventName => $value) {\n if ($pattern->test($eventName)) {\n unset($this->syncedEvents[$eventName]);\n }\n }\n }", "public function appendAuthRoute($pattern){\n if(!is_file($this->getAuthRoutePath())){\n return \\Filebase\\Filesystem::write($this->getAuthRoutePath(),json_encode([$pattern],JSON_UNESCAPED_SLASHES));\n }\n $content = json_decode(\\Filebase\\Filesystem::read($this->getAuthRoutePath()),true);\n if($content){\n if ((array_search($pattern, $content)) === false) {\n array_push($content,$pattern);\n return \\Filebase\\Filesystem::write($this->getAuthRoutePath(),json_encode($content,JSON_UNESCAPED_SLASHES));\n } else {\n return false;\n }\n }\n return \\Filebase\\Filesystem::write($this->getAuthRoutePath(),json_encode([$pattern],JSON_UNESCAPED_SLASHES));\n }", "function qa_register_plugin_phrases($pattern, $name)\n{\n\tglobal $qa_plugin_directory, $qa_plugin_urltoroot;\n\n\tif (empty($qa_plugin_directory) || empty($qa_plugin_urltoroot)) {\n\t\tqa_fatal_error('qa_register_plugin_phrases() can only be called from a plugin qa-plugin.php file');\n\t}\n\n\tqa_register_phrases($qa_plugin_directory . $pattern, $name);\n}", "public function __construct($pattern) {\n $pattern = preg_quote($pattern, self::DELIMITER);\n $pattern = preg_replace_callback('/([\\\\\\\\]{1,3})\\*/', function($matches) {\n $length = strlen($matches[1]);\n if ($length === 1) {\n return '.*';\n }\n\n return '\\*';\n }, $pattern);\n\n $this->regexp = self::DELIMITER.'^'.$pattern.'$'.self::DELIMITER;\n }", "public function add_rewrite_rule( $path = '', $rewrite_regex = array(), $tag_regex = array(), $after = 'top' ) {\n\t\t$url_matches = array();\n\t\t$uri = '^' . $path;\n\t\t$_url = array();\n\t\t$matches = [];\n\n\t\tpreg_match_all( '/{([\\w\\d]+)}/', $path, $url_matches );\n\n\t\tif ( ! empty( $url_matches ) && isset( $url_matches[1] ) ) {\n\t\t\tforeach ( $url_matches[1] as $data ) {\n\t\t\t\t$key = '{' . $data . '}';\n\t\t\t\t$regex = ( isset( $rewrite_regex[ $data ] ) && ! empty( $rewrite_regex[ $data ] ) ) ? $rewrite_regex[ $data ] : $this->value_pattern_replace;\n\t\t\t\t$uri = str_replace( $key, $regex, $uri );\n\t\t\t}\n\n\t\t\tif ( preg_match_all( $this->parameter_pattern, $path, $matches ) ) {\n\t\t\t\tforeach ( $matches[1] as $id => $param ) {\n\t\t\t\t\t$key = ( empty( $this->prefix ) ) ? $param : $this->prefix . '_' . $param;\n\t\t\t\t\t$this->rules_queryvars[] = $key;\n\t\t\t\t\t$_url[] = \"{$key}=\\$matches[\" . ( $id + 1 ) . ']';\n\t\t\t\t\t$_regex = ( isset( $tag_regex[ $param ] ) && ! empty( $tag_regex[ $param ] ) ) ? $tag_regex[ $param ] : '(.+)';\n\t\t\t\t\t$this->add_tag( '%' . $key . '%', $_regex );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->rules[] = array(\n\t\t\t\t'regex' => $uri . '/?',\n\t\t\t\t'replace' => 'index.php?' . implode( '&', $_url ),\n\t\t\t\t'type' => $after,\n\t\t\t);\n\t\t}\n\t\treturn $this;\n\t}", "public function setNamingPattern($pattern ='/([a-zA-Z1-9]+)(Function|Block)$/') {\n\t\t //\"/([a-zA-Z1-9]+)Function$/\";\n\t\t $this->_namingPattern = $pattern;\n\t}", "function map($pattern, $defaults=false, $requirements=false) {\n\t\t# parse pattern into regex\n\t\t$this->maps[] = new UsherMap($pattern, $defaults, $requirements);\n\t}", "public function setDashPattern($pattern) {}", "function hm_add_rewrite_rule( $rule, $query, $template = null, $args = array() ) {\n\n\tglobal $hm_rewrite_rules;\n\n\t$hm_rewrite_rules[ $rule ] = array( $rule, $query, $template, wp_parse_args( $args ) );\n\n}", "function add($add){\n if(is_array($add))\n {\n foreach($add as $p => $value){\n if(!isset($this->sections[$p])) $this->sections[$p] = new ConfigSection($p);\n $this->sections[$p]->register($value);\n }\n }\n }", "protected function configureUsingFluentDefinition()\n {\n $this->signature = $this->replaceType($this->signature);\n\n parent::configureUsingFluentDefinition();\n }", "public function __construct(\n string $name,\n string $pattern,\n string $namespace = '',\n string $postfix = 'Controller',\n array $defaults = [],\n array $controllers = []\n ) {\n parent::__construct($name, $defaults);\n\n $this->pattern = ltrim($pattern, '/');\n $this->namespace = $namespace;\n $this->postfix = $postfix;\n $this->controllers = $controllers;\n }", "function connectTo($mode) {\n $this->Lexer->addSpecialPattern('\\{\\{gallery>[^}]*\\}\\}',$mode,'plugin_gallery');\n }", "function connectTo($mode) {\n $this->Lexer->addSpecialPattern('<bibdata ?.*?>.*?</bibdata>', $mode, 'plugin_bibdata_entry');\n }", "public function add($alias, DataProviderInterface $provider);", "public function setSlugPattern($pattern);", "function connectTo($mode) {\n $this->Lexer->addSpecialPattern('(?:\\$[^\\$].*?\\$|\\${2}.+?\\${2}|<latex>.*?\\</latex>)', $mode, 'plugin_iocexportl_ioclatex');\n }", "public function __construct( $pattern, $default = null )\n {\n $this->pattern = $pattern;\n $this->default = $default;\n }" ]
[ "0.5556643", "0.53016084", "0.5290629", "0.5248685", "0.51410633", "0.5137805", "0.51126206", "0.5085655", "0.5074957", "0.5061189", "0.50297666", "0.50270134", "0.4989072", "0.4967302", "0.4967302", "0.49197653", "0.49001226", "0.48807308", "0.48541895", "0.47041908", "0.46947655", "0.46791506", "0.46707448", "0.45630193", "0.45445156", "0.45364258", "0.45345885", "0.45260203", "0.45257702", "0.45249373", "0.45199174", "0.45199102", "0.45189738", "0.4510002", "0.45079228", "0.45078194", "0.4473958", "0.44310093", "0.4428248", "0.44252402", "0.44132072", "0.4408401", "0.43939283", "0.4370877", "0.43489742", "0.43409503", "0.43357363", "0.43278775", "0.43247336", "0.4283882", "0.42664078", "0.42576322", "0.4253842", "0.42419532", "0.42270857", "0.419247", "0.41873738", "0.41696075", "0.41623777", "0.41566718", "0.4155119", "0.41529107", "0.41482124", "0.41329363", "0.41322872", "0.41127953", "0.41038325", "0.41018182", "0.41016525", "0.41008434", "0.40977123", "0.40895912", "0.40820256", "0.4076565", "0.40698564", "0.40682283", "0.40680093", "0.406383", "0.40597525", "0.40502784", "0.40500587", "0.4043366", "0.40398622", "0.4034331", "0.40305936", "0.4025211", "0.40204424", "0.39943874", "0.39918178", "0.39907867", "0.39839417", "0.39819756", "0.39808857", "0.397838", "0.3973748", "0.39683628", "0.39585122", "0.3956143", "0.394645", "0.3938544" ]
0.522914
4
Get the validation rules that apply to the request.
public function rules() { if ($this->isMethod('PATCH')) { return $this->filterWithModelConfiguration(I18nLang::class, I18nLang::getPatchRules()); } elseif ($this->isMethod('PUT')) { return $this->filterWithModelConfiguration(I18nLang::class, I18nLang::getPutRules()); } else { // @fixme Api documentation generator method "GET" for update... return PUT method rules return $this->filterWithModelConfiguration(I18nLang::class, I18nLang::getPutRules()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Retrieve tracking url for the order
public static function getTrackingUrl($orderToken) { return Configs::TRACKING_URL . "#/{$orderToken}"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTrackerUrl($trackingCode, $orderId=null);", "public function get_transaction_url( $order ) {\r\n \r\n $this->view_transaction_url = MDL_COINCHECK_API_BASE. '?cmd=_view-a-trans&id=%s';\r\n \r\n return parent::get_transaction_url( $order );\r\n }", "public function getSnapOrderUrl(){\n\t\t$result = null;\n\t\t\n\t\t$order = $this->getOrder();\n\t\t\n\t\tif(isset($order) && ($order->getStatus() == 'pending') && (null !== $order->getRealOrderId())){\n\t\t\t$hostedpayment = Mage::getModel('hostedpayments/hostedpayment');\n\t\t\t$hostedpayment->load($order->getRealOrderId(), 'order_id');\n\t\t\t\n\t\t\tif((null !== $hostedpayment->getId()) && ($hostedpayment->getId() != 0) &&\n\t\t\t\t(trim($hostedpayment->getUrl()) != '')){\n\t\t\t\t$result = Mage::getUrl('hostedpayments/processing/return', array('id' => $order->getRealOrderId(), '_secure' => true));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function getCarrierTrackingUrl()\n {\n return $this->carrierTrackingUrl;\n }", "private function _get_url($track) {\n\t\t$site_url = ( is_ssl() ? 'https://':'http://' ).$_SERVER['HTTP_HOST'];\n\t\tforeach ($track as $k=>$value) {\n\t\t\tif (strpos(strtolower($value), strtolower($site_url)) === 0) {\n\t\t\t\t$track[$k] = substr($track[$k], strlen($site_url));\n\t\t\t}\n\t\t\tif ($k == 'data') {\n\t\t\t\t$track[$k] = preg_replace(\"/^https?:\\/\\/|^\\/+/i\", \"\", $track[$k]);\n\t\t\t}\n\n\t\t\t//This way we don't lose search data.\n\t\t\tif ($k == 'data' && $track['code'] == 'search') {\n\t\t\t\t$track[$k] = urlencode($track[$k]);\n\t\t\t} else {\n\t\t\t\t$track[$k] = preg_replace(\"/[^a-z0-9\\.\\/\\+\\?=-]+/i\", \"_\", $track[$k]);\n\t\t\t}\n\n\t\t\t$track[$k] = trim($track[$k], '_');\n\t\t}\n\t\t$char = (strpos($track['data'], '?') === false)? '?':'&amp;';\n\t\treturn str_replace(\"'\", \"\\'\", \"/{$track['code']}/{$track['data']}{$char}referer=\" . urlencode( isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '' ) );\n\t}", "public function order_tracking_numbers()\n\t{\n\t\t$order_id = ee()->TMPL->fetch_param('order_id');\n\n\t\t$query = ee()->db\n\t\t\t->where('order_id', $order_id)\n\t\t\t->where('order_status_name', 'Shipped')\n\t\t\t->get('store_order_history');\n\n\t\t$variables = array();\n\n\t\tforeach($query->result() as $row)\n\t\t{\n\t\t\t\n\t\t\t$exploded = explode('|', $row->order_status_message);\n\n\t\t\tif(count($exploded) == 2)\n\t\t\t{\n\t\t\t\t$variables[] = array(\n \t\t'tracking_url' => $this->get_tracking_url($exploded[0], $exploded[1]),\n \t\t'tracking_number' => $exploded[1]\n \t\n \t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$variables[] = array(\n \t\t'tracking_url' => '',\n \t\t'tracking_number' => $row->order_status_message\n \t\n \t\t);\n\t\t\t}\t\n\t\t\t\n\t\t}\t\n\n \treturn ee()->TMPL->parse_variables(ee()->TMPL->tagdata, $variables);\t\n\n\t}", "function get_trackback_url()\n {\n }", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('pagseguro/payment/request');\n }", "private function get_tracking_url($type, $tracking_number) {\n\t\t$url = '';\n\n\t\tswitch($type)\n\t\t{\n\t\t\tcase \"fedex\":\n\t\t\t\t$url = 'http://www.fedex.com/Tracking?language=english&cntry_code=us&tracknumbers=' . $tracking_number;\n\t\t\t\tbreak;\n\n\t\t\tcase \"ups\":\n\t\t\t\t$url = 'http://wwwapps.ups.com/WebTracking/processInputRequest?TypeOfInquiryNumber=T&InquiryNumber1=' . $tracking_number;\n\t\t\t\tbreak;\n\n\t\t\tcase \"usps\":\n\t\t\t\t$url = 'https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1=' . $tracking_number;\n\t\t\t\tbreak;\t\t\n\n\t\t}\n\n\t\treturn $url;\n\n\t\t\n\t}", "public function getTrackingUrlTemplate()\n {\n return isset($this->tracking_url_template) ? $this->tracking_url_template : '';\n }", "public function get_return_url ($order_id)\n\t{\n\t\treturn $this->protocol . \"://\" . $this->host . $this->path . \"/mollie.php?mollie_action=return_page&order_id=\" . $order_id;\n\t}", "public function getTrackingLink( $strTracking ) \r\n {\r\n // original link is still unknown\r\n return 'http://trackthepack.com/track/'.$strTracking;\r\n }", "public function getOrderPlaceRedirectUrl()\n\t{\n return Mage::getUrl('hostedpayments/processing/pay');\n\t}", "protected function getReturnUrl(jshopOrder $order)\r\n {\r\n return $this->getActionUrl('return', $order->order_id);\r\n }", "public function getPaymentUrl(){\n\t\t$order = $this->getOrder();\n\t\t$hostedpayment = Mage::getModel('hostedpayments/hostedpayment');\n\t\t$hostedpayment->load($order->getRealOrderId(), 'order_id');\n\t\t\n\t\t$paymentUrl = $hostedpayment->getUrl();\n\t\t\t\t\n\t\tif(!isset($paymentUrl) || trim($paymentUrl) == '' ){\n\t\t\t$paymentUrl = EvoSnapApi::getCheckoutUrl($this->_getOrderCheckout(),\n\t\t\t\t\t$this->getTrigger3ds(), $this->getHostedPaymentsConfiguration());\n\t\t\t\t\n\t\t\t$order->addStatusToHistory($order->getStatus(), Mage::helper('hostedpayments')->__('Customer was redirected to the Snap* Hosted Payments Checkout for payment.'));\n\t\t\t$order->save();\n\t\t\t\n\t\t\t$hostedpayment = Mage::getModel('hostedpayments/hostedpayment');\n\t\t\t$hostedpayment->setOrderId($order->getRealOrderId());\n\t\t\t$hostedpayment->setUrl($paymentUrl);\n\t\t\t$hostedpayment->setPrefix($this->getConfigData('order_prefix'));\n\t\t\t$hostedpayment->setDataChanges(true);\n\t\t\t$hostedpayment->save();\n\t\t}\n\t\t\n\t\treturn $paymentUrl;\n\t}", "public function getReturnUrl()\n {\n return Mage::getUrl('payulite/processing/return', array('_secure' => true, 'order' => '{{ORDER_ID}}'));\n }", "public function getUrl()\n {\n return parent::getUrl().'v3/openOrders';\n }", "public function getOrderPlaceRedirectUrl()\n {\n if (Mage::getStoreConfig('payment/bitcoin/fullscreen')) {\n if(Mage::helper(\"bitcoin\")->doesTheStoreHasSSL()){\n $target_url = Mage::getUrl(\"bitcoin/index/pay\" , array(\"_secure\" => true));\n }else{\n $target_url = Mage::getUrl(\"bitcoin/index/pay\" , array(\"_secure\" => false));\n }\n return $target_url;\n } else {\n return '';\n }\n }", "public function trackOrder($trackingNo);", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('paynovapayment/processing/payment');\n }", "public function getOneClickUrl()\n {\n $store = Mage::getSingleton('adminhtml/session_quote')->getStore();\n\n return Zend_Json::encode($this->escapeUrl(Mage::getStoreConfig('oyst/oneclick/payment_url', $store->getId())));\n }", "protected function _getOrdersTrackingCode()\n {\n if (!Mage::helper('webgriffe_servergoogleanalytics')->isEnabled()) {\n return parent::_getOrdersTrackingCode();\n }\n\n return '';\n }", "public function getEventUrl () {\n $urlPixel = 'https://www.google-analytics.com/collect?v=1'\n . '&tid=' . $this->GAtrackingID\n . '&t=event'\n . '&ec=' . urlencode($this->category)\n . '&ea=' . urlencode($this->action)\n . '&cn=' . urlencode($this->campaign)\n . '&cs=' . urlencode($this->source)\n . '&cm=' . urlencode($this->medium)\n . '&cc=' . urlencode($this->content)\n . '&cid=' . $this->supporterID;\n return $urlPixel;\n }", "public function getOrderPlaceRedirectUrl()\n {\n return $this->getConfig()->getPaymentRedirectUrl();\n }", "public function getTrackingId()\n {\n return $this->trackingId;\n }", "public function getTakeUrl() { }", "public function getOrderPlaceRedirectUrl()\n {\n $info = $this->getInfoInstance();\n\n return $info->getAdditionalInformation(self::REDIRECT_URL_KEY);\n }", "public function getCheckoutUrl()\n {\n return $this->helper('checkout/url')->getCheckoutUrl();\n }", "public function getPageviewUrl () {\n $urlPixel = 'https://www.google-analytics.com/collect?v=1'\n . '&tid=' . $this->GAtrackingID\n . '&t=pageview'\n . '&dp=' . $this->getPath()\n . '&dt=' . urlencode($this->title)\n . '&cn=' . urlencode($this->campaign)\n . '&cs=' . urlencode($this->source)\n . '&cm=' . urlencode($this->medium)\n . '&cc=' . urlencode($this->content)\n . '&cid=' . $this->supporterID; \n return $urlPixel;\n }", "public function getTrackingNumber()\n {\n return $this->tracking_number;\n }", "function timetracking_uri(timetracking $timetracking){\n return array(\n 'path' => 'timetracking/' . $timetracking->timetracking_id,\n );\n}", "public function getOrderPlaceRedirectUrl()\n {\n //The form of the Payment Gateway will be displayed to him\n return Mage::getUrl('mypaymentmethod1/payment/redirect', array('_secure' => false));\n }", "public function getHTTPLink()\n\t{\n\t\treturn 'http://open.spotify.com/track/' . toSpotifyId($this->id);\n\t}", "public function trackingUrl($trackingNumber, $language = null, $params = [])\n {\n return $this->trackingUrl . '?tracknumbers=' . $trackingNumber;\n }", "public function getTrackingNumber() : string\n\t{\n\t\treturn $this->trackingNumber;\n\t}", "public function getTrackingCode()\n {\n // Get API key from config\n $api_key = Mage::getStoreConfig('refersion/refersion_settings/refersion_api_key');\n\n // Build the url to get the script\n $script_url = '//www.refersion.com/tracker/v3/'.$api_key.'.js';\n\n return $script_url;\n }", "public function get_return_url()\n {\n }", "function getLink()\n {\n $url = $this->getPaypal();\n $link = 'https://'.$url.'/cgi-bin/webscr?';\n foreach($this->VARS as $item => $sub){\n $link .= $sub[0].'='.$sub[1].'&';\n }\n return $link;\n }", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('postfinancecheckout/transaction/redirect', array(\n '_secure' => true\n ));\n }", "public function getTrackingID()\n {\n return $this->trackingID;\n }", "public function orderLink($in){\n\treturn( '<a href=\"https://www.google.com/dfp/'.DFP_NETWORK_ID.'?#delivery/OrderDetail/orderId='.$in.'\" target=\"_new\">'.$in.'</a>' );\n }", "public function get_tracking_code(): string {\n global $OUTPUT, $USER;\n\n $settings = $this->record->get_property('settings');\n\n $template = new \\stdClass();\n $template->siteid = $settings['siteid'];\n $template->siteurl = $settings['siteurl'];\n $custompiwikjs = (isset($settings['piwikjsurl']) && !empty($settings['piwikjsurl']));\n $template->piwikjsurl = $custompiwikjs ? $settings['piwikjsurl'] : $settings['siteurl'];\n $template->imagetrack = $settings['imagetrack'];\n\n $template->userid = false;\n\n if (!empty($settings['userid']) && !empty($settings['usefield']) && !empty($USER->{$settings['usefield']})) {\n $template->userid = $USER->{$settings['usefield']};\n }\n\n $template->doctitle = \"\";\n\n if (!empty($this->record->get_property('cleanurl'))) {\n $template->doctitle = \"_paq.push(['setDocumentTitle', '\" . $this->trackurl() . \"']);\\n\";\n }\n\n return $OUTPUT->render_from_template('watool_matomo/tracking_code', $template);\n }", "public function getTrackingNumber()\n {\n return $this->trackingNumber;\n }", "public static function gaReferrer()\n {\n return self::isReferred() ? 'ga(\"BaseTracker.set\", \"dimension3\", \"'.$_SERVER['HTTP_REFERER'].'\");' : '';\n }", "public function getOrderPlaceRedirectUrl()\n {\n $this->getInfoInstance()->setMethodInstance(null);\n $actualInstance = $this->getInfoInstance()->getMethodInstance();\n return $actualInstance->getOrderPlaceRedirectUrl();\n }", "public function getReturnUrl() {\n return Url::fromRoute('entity.commerce_order.edit_form', ['commerce_order' => $this->order->id()]);\n }", "function onp_op_get_url_to_purchase( $campaign = 'na' ) {\r\n global $optinpanda; \r\n return onp_licensing_325_get_purchase_url( $optinpanda, $campaign );\r\n}", "public function getShopNowUrl()\n {\n return $this->getData('show_now_url');\n }", "public function getMytripUrl() {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ()->get ( 'Magento\\Store\\Model\\StoreManagerInterface' )->getStore ();\n return $objectManager->getUrl('booking/mytrip/currenttrip/');\n }", "public function getUrl() {\n\t\treturn $this->rawUrl;\n\t}", "function analytics_trackurl() {\n global $DB, $PAGE, $COURSE;\n $pageinfo = get_context_info_array($PAGE->context->id);\n $trackurl = \"'/\";\n\n // Adds course category name.\n if (isset($pageinfo[1]->category)) {\n if ($category = $DB->get_record('course_categories', array('id'=>$pageinfo[1]->category))) {\n $cats=explode(\"/\",$category->path);\n foreach (array_filter($cats) as $cat) {\n if ($categorydepth = $DB->get_record(\"course_categories\", array(\"id\" => $cat))) {;\n $trackurl .= urlencode($categorydepth->name).'/';\n }\n }\n }\n }\n\n // Adds course full name.\n if (isset($pageinfo[1]->fullname)) {\n if (isset($pageinfo[2]->name)) {\n $trackurl .= urlencode($pageinfo[1]->fullname).'/';\n } else if ($PAGE->user_is_editing()) {\n $trackurl .= urlencode($pageinfo[1]->fullname).'/'.get_string('edit', 'local_analytics');\n } else {\n $trackurl .= urlencode($pageinfo[1]->fullname).'/'.get_string('view', 'local_analytics');\n }\n }\n\n // Adds activity name.\n if (isset($pageinfo[2]->name)) {\n $trackurl .= urlencode($pageinfo[2]->modname).'/'.urlencode($pageinfo[2]->name);\n }\n \n $trackurl .= \"'\";\n return $trackurl;\n}", "public function get_webhook_url ($order_id)\n\t{\n\t\treturn $this->protocol . \"://\" . $this->host . $this->path . \"/mollie.php?mollie_action=webhook&order_id=\" . $order_id;\n\t}", "public function getGeneratedUrl()\n {\n return $this->generated_url;\n }", "public function getLinkOrderUrl()\n {\n return $this->getUrl('dil_checkout/order/link');\n }", "public function getUrl() {\n return $this->_gatewayRedirect->getUrl ();\n }", "function &getTrackbackurl_string($blog_id , $direction=\"\"){\n\t\t$ent_trackback = \"\" ;\n\t $trackback_array =& $this->get($blog_id , $direction) ;\n\t if( $trackback_array && is_array($trackback_array) ){\n\t\t\t$ent_trackback = \"\" ;\n\t\t\tforeach( $trackback_array as $trackback_obj ){\n\t\t\t\t$ent_trackback .= $trackback_obj->getVar('tb_url' , 'n') . \"\\n\" ;\n\t\t\t}\n\t\t\t$ent_trackback = trim( $ent_trackback );\n\t\t}\n\t\treturn $ent_trackback ;\n\t}", "protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }", "public function getUrl()\n {\n if ((bool)$this->_action) {\n return $this->_vendorUrlModel->getUrl(\n (string)$this->_action,\n ['_cache_secret_key' => true]\n );\n }\n return '#';\n }", "public function getURL() {\n return $this->apiURL . $this->endPoint . $this->storeID . $this->jsonFile;\n }", "public function getUrlForCheckoutButton()\n {\n if ($this->getQuote()) {\n /** @var Quote $quote */\n $quote = $this->getQuote();\n $route = $this->getRoute($quote);\n $params = ['quote_id' => $quote->getQuoteId()];\n\n if ($this->isAutoLoginEnabled()) {\n $params['hash'] = $quote->getUrlHash();\n }\n\n return $this->url->getUrl($route, $params);\n }\n\n return \"#\";\n }", "function getUrl() {\n\t\treturn $this->repoObj->lobUrltitle;\n\t}", "public function display_tracking_info( $order_id ) {\n\t\twc_get_template( 'myaccount/view-order.php', array( 'tracking_items' => $this->get_tracking_items( $order_id, true ) ), 'woocommerce-shipment-tracking/', $this->get_plugin_path() . '/templates/' );\n\t}", "public function getUrl() {\n\t\treturn sprintf(self::ENDPOINT, $this->_account);\n\t}", "protected function getFetchUrl() {\n $url = 'users/' . $this->user->id . '/instruments';\n return $url;\n }", "public function autoTrackUrl() {\n\t\treturn apply_filters( 'aioseo_google_autotrack', plugin_dir_url( AIOSEO_FILE ) . 'app/Common/Assets/js/autotrack.js' );\n\t}", "public function getTrackerDetails($trackingCode, $orderId=null);", "public static function makeReturnUrl($buyOrder) {\n return self::website().'src/returnUrl.php?status=success&buyOrder='.$buyOrder;\n }", "public function getProductUrl()\n {\n return $this->product_url;\n }", "protected function prepareFindRequestUri(OrderInterface $order) {\n $query = [\n 'NetworkToken' => $this->configuration['api_key'],\n 'Target' => 'Conversion',\n 'Method' => 'findAll',\n 'fields' => [\n 'id',\n 'status',\n 'advertiser_info',\n ],\n 'filters' => [\n 'advertiser_info' => $order->getOrderNumber(),\n 'offer_id' => $this->configuration['offer_id'],\n ],\n ];\n return Url::fromUri($this->getApiUri(), ['query' => $query])->toUriString();\n }", "public function get_url()\n {\n }", "public function url()\n\t{\n\t\treturn Url::to($this->id);\n\t}", "public function url() {\n return $this->info['url'];\n }", "public function getUrl()\n {\n return $this->createUrl();\n }", "public function getSpotifyURI()\n\t{\n\t\treturn 'spotify:track:' . toSpotifyId($this->id);\n\t}", "public function getUrl() {\n\t\t$this->getRublon()->log(__METHOD__);\n\t\treturn $this->getRublon()->getAPIDomain() .\n\t\t\tself::URL_PATH_CODE .\n\t\t\turlencode($this->getUrlParamsString());\n\t}", "public function getUrl()\n {\n return WEB_SERVER_BASE_URL . '/badges/' . $this->data['id'];\n }", "public function getOrderPlaceRedirectUrl()\r\n {\r\n \t$result = false;\r\n \t$session = Mage::getSingleton('checkout/session');\r\n \t$nVersion = $this->getVersion();\r\n \t$mode = $this->getConfigData('mode');\r\n \t\r\n \tif($session->getMd() &&\r\n \t\t$session->getAcsurl() &&\r\n \t\t$session->getPareq())\r\n \t{\r\n \t\t// Direct (API) for 3D Secure payments\r\n \t\tif($nVersion >= 1410)\r\n\t \t{\r\n\t\t \t// need to re-add the ordered item quantity to stock as per not completed 3DS transaction\r\n\t\t \tif($mode != Paymentsense_Paymentsensegateway_Model_Source_PaymentMode::PAYMENT_MODE_TRANSPARENT_REDIRECT)\r\n\t\t \t{\r\n\t\t \t\t$order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());\r\n\t\t \t\t$this->addOrderedItemsToStock($order);\r\n\t\t \t}\r\n\t \t}\r\n \t\t\r\n \t\t$result = Mage::getUrl('paymentsensegateway/payment/threedsecure', array('_secure' => true));\r\n \t}\r\n \tif($session->getHashdigest())\r\n \t{\r\n \t\t// Hosted Payment Form and Transparent Redirect payments\r\n \t\tif($nVersion >= 1410)\r\n\t \t{\r\n\t\t \t// need to re-add the ordered item quantity to stock as per not completed 3DS transaction\r\n\t\t \tif(!Mage::getSingleton('checkout/session')->getPares())\r\n\t\t \t{\r\n\t\t \t\t$order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());\r\n\t\t \t\t$this->addOrderedItemsToStock($order);\r\n\t\t \t}\r\n\t \t}\r\n \t\r\n \t\t$result = Mage::getUrl('paymentsensegateway/payment/redirect', array('_secure' => true));\r\n \t}\r\n \r\n return $result;\r\n }", "private function getDownloadLink(Array $track): string\n {\n $trackSrc = $this->findTrackSrc($track['track_id']);\n\n $trackDetails = $this->getTrackDetails($trackSrc);\n\n $link = $this->buildDownloadUrl($trackDetails);\n\n return $link;\n }", "public function url()\n\t{\n\t\t/*\n\t\t * Retrieve the ping from the database.\n\t\t */\n\t\t$ping = db()->table('ping')->get('url', $_GET['url'])->where('deleted', null)->where('target', null)->all();\n\t\t\n\t\t/*\n\t\t * Pass the data onto the view.\n\t\t */\n\t\t$this->view->set('notifications', $ping);\n\t}", "protected function getUrl() {\r\n\t\treturn $this->url;\r\n\t}", "public function getRemoteUrl();", "public function getToUrl()\n {\n\n return $this->toUrl;\n\n }", "public function getOrdersUrl(int $deltaTimestamp)\n {\n // TODO: Implement getOrdersUrl() method.\n }", "public function get_url(){\n\n\t\t\treturn $this->api_urls['giturl'];\n\n\t\t}", "public function get_url()\n {\n return $this->url;\n }", "public function getUrlDetail()\n {\n \treturn \"cob_actadocumentacion/ver/$this->id_actadocumentacion\";\n }", "public function getShipPostUrl($orderId){\r\n \treturn $this->getUrl('marketplace/shipment/savePost',array(\r\n \t\t'order_id'=>$orderId,\r\n \t));\r\n }", "public function url()\n {\n return $this->data['url'];\n }", "protected function getUrl() {\n return $this->url;\n }", "public function getFetchUrl()\n {\n return $this->getUrl(\"afbt/fetch/index\");\n }", "public function get_url() {\n\t\treturn $this->url;\n\t}", "public function get_url() {\n\t\treturn $this->url;\n\t}", "public function getInvoiceUrl()\n {\n if (array_key_exists(\"invoiceUrl\", $this->_propDict)) {\n return $this->_propDict[\"invoiceUrl\"];\n } else {\n return null;\n }\n }", "public function url()\n {\n return $this->url;\n }", "public function get_url () {\r\n\t\treturn $this->url;\r\n\t}", "public function getUrl()\n {\n if (null === $this->data) {\n $this->initializeReport();\n }\n\n return $this->data['_links']['report']['href'];\n }", "public function get_request_url( $order, $testmode = 'testing' ) {\n\n\t\t$worldpay_args = http_build_query( $this->get_worldpay_args( $order ), '', '&' );\n\n\t\tif ( $testmode == 'testing' ) {\n\t\t\treturn 'https://secure-test.worldpay.com/wcc/purchase?testMode=100&' . $worldpay_args;\n\t\t} else {\n\t\t\treturn 'https://secure.worldpay.com/wcc/purchase?' . $worldpay_args;\n\t\t}\n\n\t}", "public function getURL(): string\n {\n return $this->http->getURL();\n }", "public function getContinueShoppingURL() {\n\t\treturn BASKET_CONTINUE_SHOPPING_URL;\n\t}", "public function boardingPointTrackUrl()\n {\n return route('bookings.track.boarding-point-route', ['bookingid' => $this->booking_id]);\n }" ]
[ "0.718123", "0.6810285", "0.6649919", "0.6514836", "0.6507937", "0.6397123", "0.639575", "0.6339237", "0.63327515", "0.6320452", "0.6300426", "0.62978387", "0.6282804", "0.6278921", "0.62649673", "0.6262171", "0.6246346", "0.6204483", "0.61827457", "0.61535615", "0.6149346", "0.61396587", "0.612511", "0.6083704", "0.60828197", "0.6069487", "0.60355157", "0.6025352", "0.6020819", "0.5996963", "0.598667", "0.5976458", "0.5968409", "0.59614974", "0.59611946", "0.5955443", "0.59521604", "0.5951114", "0.5947928", "0.59275794", "0.59171873", "0.59111917", "0.5910729", "0.58912337", "0.5889633", "0.58737916", "0.5857632", "0.5843755", "0.5832679", "0.58270615", "0.58092964", "0.5808353", "0.58071625", "0.5783754", "0.5768073", "0.5750918", "0.57488877", "0.57435375", "0.57410634", "0.5740212", "0.57270193", "0.5710892", "0.57040614", "0.57014054", "0.5700962", "0.5700138", "0.5692446", "0.56732893", "0.56723213", "0.5672277", "0.5670216", "0.5667681", "0.56622833", "0.56608105", "0.56508666", "0.56491953", "0.56460875", "0.56446135", "0.56378084", "0.5635538", "0.5632816", "0.5627883", "0.5616713", "0.5609689", "0.5592628", "0.5575648", "0.556792", "0.55674535", "0.55598754", "0.55543494", "0.5551834", "0.5551834", "0.55489933", "0.5547951", "0.5538663", "0.553534", "0.5533605", "0.5528526", "0.55279285", "0.55242425" ]
0.7669723
0
Retrieve the print invoice for the order
public static function getPrintInvoice($orderId, $orderToken) { return Configs::URL . "order/{$orderId}/print?token={$orderToken}"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function print_invoice() {\n $userid = $this->input->post('userId');\n $data = $this->get_pdf_data($userid);\n $data['user_org'] = $this->payments_model->get_user_org_details($userid);\n $data['invoice'] = $this->payments_model->get_invoice_details($data['clsid'], $data['crsid'], $userid);\n $data['meta_data'] = $this->meta_data;\n return generate_invoice($data);\n }", "public function getInvoiceOrder();", "public function print_invoice($order_id)\r\n {\r\n if($order_id != '')\r\n {\r\n $data['order_info'] = $this->order_model->get_order_info($order_id);\r\n $data['page_title'] = 'Print Invoice';\r\n $this->show_view('order_invoice', $data);\r\n }\r\n }", "public function getInvoice()\n {\n return $this->_coreRegistry->registry('current_invoice');\n }", "public function print_invoice( $invoice_id ) {\n \n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n \n // Get invoice details\n $invoice = $this->invoice->get_invoice( $invoice_id ); \n \n // Verify if invoice exists\n if ( $invoice ) {\n \n if ( $invoice[0]->user_id === $this->user_id ) {\n \n // Get the invoice logo\n $invoice_logo = get_option( 'main-logo' );\n\n if ( get_option( 'invoice-logo' ) ) {\n\n $invoice_logo = get_option( 'invoice-logo' );\n\n }\n\n // Get the invoice billing period text\n $billing_period = 'Billing Period';\n\n if ( get_option( 'invoice-billing-period' ) ) {\n\n $billing_period = get_option( 'invoice-billing-period' );\n\n } \n\n // Get the invoice transaction id\n $transaction_id = 'Transaction ID';\n\n if ( get_option( 'invoice-transaction-id' ) ) {\n\n $transaction_id = get_option( 'invoice-transaction-id' );\n\n } \n\n // Get the invoice date format\n $date_format = 'dd-mm-yyyy';\n\n if ( get_option( 'invoice-date-format' ) ) {\n\n $date_format = get_option( 'invoice-date-format' );\n\n }\n\n // Get the invoice hello text\n $hello_text = 'Hello [username]';\n\n if ( get_option( 'invoice-hello-text' ) ) {\n\n $hello_text = get_option( 'invoice-hello-text' );\n\n }\n\n // Get the invoice message\n $message = 'Thanks for using using our services.';\n\n if ( get_option( 'invoice-message' ) ) {\n\n $message = get_option( 'invoice-message' );\n\n }\n\n // Get the invoice date word\n $date = 'Date';\n\n if ( get_option( 'invoice-date' ) ) {\n\n $date = get_option( 'invoice-date' );\n\n }\n\n // Get the invoice description word\n $description = 'Description';\n\n if ( get_option( 'invoice-description' ) ) {\n\n $description = get_option( 'invoice-description' );\n\n } \n\n // Get the invoice description text\n $description_text = 'Upgrade Payment';\n\n if ( get_option( 'invoice-description-text' ) ) {\n\n $description_text = get_option( 'invoice-description-text' );\n\n } \n\n // Get the invoice amount word\n $amount = 'Amount';\n\n if ( get_option( 'invoice-amount' ) ) {\n\n $amount = get_option( 'invoice-amount' );\n\n } \n\n // Get the invoice amount word\n $taxes = 'Taxes';\n\n if ( get_option( 'invoice-taxes' ) ) {\n\n $taxes = get_option( 'invoice-taxes' );\n\n } \n\n // Get the invoice taxes value\n $taxes_value = '';\n\n if ( get_option( 'invoice-taxes-value' ) ) {\n\n $taxes_value = get_option( 'invoice-taxes-value' );\n\n } \n\n // Get the invoice total word\n $total = 'Total';\n\n if ( get_option( 'invoice-total' ) ) {\n\n $total = get_option( 'invoice-total' );\n\n }\n\n // Get the no reply message\n $no_reply = 'Please do not reply to this email. This mailbox is not monitored and you will not receive a response. For assistance, please contact us to [email protected].';\n\n if ( get_option( 'invoice-no-reply' ) ) {\n\n $no_reply = get_option( 'invoice-no-reply' );\n\n } \n \n echo '<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"1000px\">\n <tbody><tr><td align=\"center\" width=\"600\" valign=\"top\">\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tbody>\n <tr>\n <td align=\"center\" valign=\"top\" bgcolor=\"#ffffff\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-bottom:10px;\" width=\"100%\">\n <tbody><tr valign=\"bottom\"> \n <td width=\"20\" align=\"center\" valign=\"top\">&nbsp;</td>\n <td align=\"left\" height=\"64\">\n <img alt=\"logo\" class=\"invoice-logo\" src=\"' . $invoice_logo . '\">\n </td> \n <td width=\"40\" align=\"center\" valign=\"top\">&nbsp;</td>\n <td align=\"right\">\n <span style=\"padding-top:15px;padding-bottom:10px;font:italic 12px;color:#757575;line-height:15px;\">\n <span style=\"display:inline;\">\n <span class=\"invoice-billing-period\">' . $billing_period . '</span> <strong><span class=\"invoice-date-format billing-period-from\">' . $this->get_invoice_time($invoice[0]->from_period) . '</span> to <span class=\"invoice-date-format billing-period-to\">' . $this->get_invoice_time($invoice[0]->to_period) . '</span></strong>\n </span>\n <span style=\"display:inline;\">\n <br>\n <span class=\"invoice-transaction-id\">' . $transaction_id . '</span>: <strong class=\"transaction-id\">' . $invoice[0]->transaction_id . '</strong>\n </span>\n </span>\n </td>\n <td width=\"20\" align=\"center\" valign=\"top\">&nbsp;</td>\n </tr>\n </tbody>\n </table>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"padding-bottom:10px;padding-top:10px;margin-bottom:20px;\" width=\"100%\">\n <tbody><tr valign=\"bottom\"> \n <td width=\"20\" align=\"center\" valign=\"top\">&nbsp;</td>\n <td valign=\"top\" style=\"font-family:Calibri, Trebuchet, Arial, sans serif;font-size:15px;line-height:22px;color:#333333;\" class=\"yiv1811948700ppsans\">\n <p>\n </p><div style=\"margin-top:30px;color:#333;font-family:arial, helvetica, sans-serif;font-size:12px;\"><span style=\"color:#333333;font-weight:bold;font-family:arial, helvetica, sans-serif; margin-left: 2px;\" class=\"invoice-hello-text\">' . $this->get_invoice_placeholders($hello_text, array('username' => $invoice[0]->username) ) . ' </span><table><tbody><tr><td valign=\"top\" class=\"invoice-message\">' . $this->get_invoice_placeholders($message, array('username' => $invoice[0]->username) ) . '</td><td></td></tr></tbody></table><br><div style=\"margin-top:5px;\">\n <br><div class=\"yiv1811948700mpi_image\" style=\"margin:auto;clear:both;\">\n </div>\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"clear:both;color:#333;font-family:arial, helvetica, sans-serif;font-size:12px;margin-top:20px;\" width=\"100%\">\n <tbody>\n <tr>\n <td style=\"text-align:left;border:1px solid #ccc;border-right:none;border-left:none;padding:5px 10px 5px 10px !important;color:#333333;\" class=\"invoice-date\" width=\"10%\">' . $date . '</td>\n <td style=\"border:1px solid #ccc;border-right:none;border-left:none;padding:5px 10px 5px 10px !important;color:#333333;\" width=\"80%\" class=\"invoice-description\">' . $description . '</td>\n <td style=\"text-align:right;border:1px solid #ccc;border-right:none;border-left:none;padding:5px 10px 5px 10px !important;color:#333333;\" width=\"10%\" class=\"amount\">' . $amount . '</td>\n </tr>\n <tr>\n <td style=\"padding:10px;\" width=\"80%\">\n <span class=\"invoice-description-text\">' . $description_text . '</span>\n <br>\n\n <span style=\"display:inline;font-style: italic;color: #888888;\" class=\"invoice-plan-name\">' . $invoice[0]->plan_name . '</span>\n </td>\n <td style=\"text-align:right;padding:10px;\" width=\"10%\"></td>\n <td style=\"text-align:right;padding:10px;\" width=\"10%\" class=\"invoice-amount\">' . $invoice[0]->amount . ' ' . $invoice[0]->currency . '</td>\n </tr>\n </tbody>\n </table>\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-top:1px solid #ccc;border-bottom:1px solid #ccc;color:#333;font-family:arial, helvetica, sans-serif;font-size:12px;margin-bottom:10px;\" width=\"100%\">\n <tbody>\n <tr>\n <td>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%;color:#333;font-family:arial, helvetica, sans-serif;font-size:12px;margin-top:10px;\">\n <tbody>\n <tr class=\"taxes-area\" style=\"display: none;\">\n <td style=\"width:80%;text-align:right;padding:0 10px 10px 0;\" class=\"invoice-taxes\">' . $taxes . '</td>\n <td style=\"width:20%;text-align:right;padding:0 10px 10px 0;\">\n <span style=\"display:inline;\" class=\"invoice-taxes-value\">' . $taxes_value . ' %</span>\n\n </td>\n </tr>\n <tr>\n <td style=\"width:80%;text-align:right;padding:0 10px 10px 0;\">\n <span style=\"color:#333333;font-weight:bold;\" class=\"invoice-total\">' . $total . '</span>\n </td>\n <td style=\"width:20%;text-align:right;padding:0 10px 10px 0;\" class=\"invoice-total-value\">' . $invoice[0]->total . ' ' . $invoice[0]->currency . '</td>\n </tr>\n </tbody></table>\n </td>\n </tr>\n\n </tbody></table>\n <span style=\"font-size:11px;color:#333;\" class=\"invoice-no-reply\">' . $no_reply . '</span></div>\n <span style=\"font-weight:bold;color:#444;\">\n </span>\n <span>\n </span>\n </div></td>\n <td width=\"20\" align=\"center\" valign=\"top\">&nbsp;</td>\n </tr>\n </tbody>\n </table>\n <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>\n </td>\n </tr>\n </tbody>\n </table> \n </td>\n </tr>\n </tbody>\n </table>';\n \n exit();\n \n }\n \n }\n \n show_404();\n \n }", "public function getOrderForPrint($id) {\n\n // get the order data\n $order = $this->find('first', array(\n 'conditions' => array('Order.id' => $id),\n 'fields' => array(\n\t\t\t\t'created', \n\t\t\t\t'order_number', \n\t\t\t\t'order_reference', \n\t\t\t\t'total', \n\t\t\t\t'billing_company',\n 'billing_address', \n\t\t\t\t'billing_address2', \n\t\t\t\t'billing_city',\n 'billing_zip', \n\t\t\t\t'billing_state', \n\t\t\t\t'billing_country', \n\t\t\t\t'ship_date', \n\t\t\t\t'note', \n\t\t\t\t'user_customer_id'),\n 'contain' => array(\n 'User' => array(\n 'fields' => array(\n\t\t\t\t\t\t'first_name', \n\t\t\t\t\t\t'last_name', \n\t\t\t\t\t\t'username')\n ),\n 'Shipment' => array(\n 'fields' => array(\n 'first_name', \n\t\t\t\t\t\t'last_name', \n\t\t\t\t\t\t'company',\n 'email', \n\t\t\t\t\t\t'phone',\n 'address', \n\t\t\t\t\t\t'address2',\n 'city', \n\t\t\t\t\t\t'zip', \n\t\t\t\t\t\t'state', \n\t\t\t\t\t\t'country',\n 'carrier', \n\t\t\t\t\t\t'method', \n\t\t\t\t\t\t'billing'\n )\n ),\n 'OrderItem' => array(\n 'fields' => array('quantity', 'name',),\n 'Item' => array(\n 'fields' => array('item_code'),\n 'Location'\n )\n )\n )\n ));\n $customer_type = ClassRegistry::init('Customer')\n\t\t\t\t->field(\n\t\t\t\t\t\t'customer_type', \n\t\t\t\t\t\tarray('Customer.user_id' => $order['Order']['user_customer_id'] ));\n $items = $this->assemblePrintLineItems($order['OrderItem']);\n $firstPageLines = 500;\n $pg1 = array_slice($items, 0, $firstPageLines);\n if (count($items) > count($pg1)) {\n $chunk = array_chunk(array_slice($items, $firstPageLines, count($items)), 37);\n } else {\n $chunk = array();\n }\n\n // page the line item arrays\n // first\n $orderedBy = $this->User->discoverName($order['User']['id']);\n if(!empty($order['Order']['ship_date'])){\n $t = strtotime($order['Order']['ship_date']);\n } else {\n $t = time();\n }\n $data = array(\n 'reference' => array(\n 'labels' => array('Date', 'Order'),\n 'data' => array(date('m/d/y', $t), $order['Order']['order_number'])\n ),\n 'items' => $pg1,\n 'summary' => array(\n 'labels' => array('Ordered By', 'Reference', 'Carrier', 'Method', 'Billing'),\n 'data' => array(\n $orderedBy, // Ordered By\n $order['Order']['order_reference'],\t\t // Reference\n $order['Shipment'][0]['carrier'],\t\t // Carrier\n $order['Shipment'][0]['method'],\t // Method\n $order['Shipment'][0]['billing'],\t // Billing\n//\t\t\t\t\t$order['Order']['total']\t\t\t // Total\n )\n ),\n 'note' => $order['Order']['note'],\n 'headerRow' => array('#', 'Qty', 'Code', 'Name'),\n 'customer_type' => $customer_type,\n 'chunk' => $chunk,\n 'shipping' => array(\n \"{$order['Shipment'][0]['first_name']} {$order['Shipment'][0]['last_name']}\",\n $order['Shipment'][0]['company'],\n $order['Shipment'][0]['address'],\n $order['Shipment'][0]['address2'],\n \"{$order['Shipment'][0]['city']} {$order['Shipment'][0]['state']} {$order['Shipment'][0]['zip']} {$order['Shipment'][0]['country']}\"\n ),\n 'billing' => array(\n $order['Order']['billing_company'],\n $order['Order']['billing_address'],\n $order['Order']['billing_address2'],\n \"{$order['Order']['billing_city']} {$order['Order']['billing_state']} {$order['Order']['billing_zip']} {$order['Order']['billing_country']}\"\n )\n );\n return $data;\n }", "public function getInvoiceDetails()\n {\n return $this->invoiceDetails;\n }", "public function invoice($order_id)\n\t{\n\t\t$check = DB::select(\"SELECT COUNT(*) as count FROM orders WHERE id = '\".$order_id.\"' AND customer = '\".customer('id').\"' LIMIT 1\")[0];\n\t\tif ($check->count == 0){\n\t\t\tabort(404);\n\t\t}\n\t\t$order = DB::select(\"SELECT * FROM orders WHERE id = '\".$order_id.\"'\")[0];\n\t\t$header = $this->header(translate('Invoice'),false,true);\n\t\t$fields = DB::select(\"SELECT name,code FROM fields ORDER BY id ASC\");\n\t\t$footer = $this->footer();\n\t\treturn view('invoice')->with(compact('header','order','fields','footer'));\n\t}", "public function invoice_print($id)\n {\n $orders = Order::with('customer', 'payment', 'shipping', 'order_items')->findOrFail($id);\n $order_info = OrderInfo::with('product')->select('id', 'order_id', 'product_id', 'product_name', 'product_price', 'product_qty')->where('order_id', $id)->get();\n\n return view('backend.order.print_invoice');\n }", "public function getInvoice()\n {\n\n $CfdiId = 'ab9PC44sxbs2LUYaGCTm-g2';\n\n $params = [\n 'type' => 'issued',\n ];\n\n $result = $this->facturama->get('Cfdi/' . $CfdiId, $params);\n return $result;\n }", "public function getInvoiceNumber();", "public function getInvoiceInfo()\n {\n return $this->get(self::INVOICEINFO);\n }", "public function print($id)\n {\n $invoice = $this->invoice->findOrFail($id);\n\n $pdf = PDF::loadView('site::audiences.account.orders.pdf', compact('invoice'))->setPaper('a4');\n\n return $pdf->download('invoice-' . $invoice->created_at->format('d-m-Y') . '.pdf');\n }", "public function getInvoiceExtraPrintBlocksXML( &$order ) {\n\t\t$dom = new DOMDocument( '1.0', 'utf-8' );\n\t\t$OnlineInvoice = $dom->createElement( 'OnlineInvoice' );\n\t\t$dom->appendChild( $OnlineInvoice );\n\t\t$OnlineInvoice->setAttributeNS( 'http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance' );\n\t\t$OnlineInvoice->setAttributeNS( 'http://www.w3.org/2001/XMLSchema-instance', 'xsd', 'http://www.w3.org/2001/XMLSchema' );\n\n\t\t$OrderLines = $dom->createElement( 'OrderLines' );\n\t\t$OnlineInvoice->appendChild( $OrderLines );\n\n\t\t$items = $this->get_order_items( $order );\n\t\tforeach ( $items as $order_item ) {\n\t\t\t$OrderLine = $dom->createElement( 'OrderLine' );\n\t\t\t$OrderLine->appendChild( $dom->createElement( 'Product', str_replace( '&amp;', '-', htmlentities( $order_item['name'] ) ) ) );\n\t\t\t$OrderLine->appendChild( $dom->createElement( 'Qty', $order_item['qty'] ) );\n\t\t\t$OrderLine->appendChild( $dom->createElement( 'UnitPrice', sprintf( \"%.2f\",$order_item['price_without_tax'] / $order_item['qty'] ) ) );\n\t\t\t$OrderLine->appendChild( $dom->createElement( 'VatRate', round( $order_item['tax_percent'] ) ) );\n\t\t\t$OrderLine->appendChild( $dom->createElement( 'VatAmount', $order_item['tax_price'] ) );\n\t\t\t$OrderLine->appendChild( $dom->createElement( 'Amount', $order_item['price_with_tax'] ) );\n\t\t\t$OrderLines->appendChild( $OrderLine );\n\t\t}\n\n\t\treturn str_replace( \"\\n\", '', html_entity_decode( str_replace( 'xsi:xsd', 'xmlns:xsd', $dom->saveXML() ), ENT_COMPAT|ENT_XHTML, 'UTF-8' ) );\n\t}", "public function getInvoiceData()\n {\n return Mage::getSingleton('core/session')->getData(\"invoice\");\n }", "public function getInvoiceNumber()\n {\n return $this->invoice_number;\n }", "public function viewOrderInvoiceAction()\n {\n $id = $this->request->query->get('id');\n $easyadmin = $this->request->attributes->get('easyadmin');\n $entity = $easyadmin['item'];\n\n $html = $this->renderView('easy_admin/Order/viewInvoice.html.twig', array(\n 'entity' => $entity\n ));\n\n return new Response(\n $this->get('knp_snappy.pdf')->getOutputFromHtml($html),\n 200,\n array(\n 'Content-Type' => 'application/pdf',\n 'Content-Disposition' => 'attachment; filename=\"' . $entity->getClient()->getFirstname() . '.pdf\"'\n )\n );\n }", "public function getInvoice($_ID)\n {\n return $this->getUnique(\"invoices\", $_ID);\n }", "public function invoiceAction() {\n $this->chekcingForMarketplaceSellerOrNot ();\n /**\n * Get order Id\n * @var unknown\n */\n $orderId = $this->getRequest ()->getParam ( 'id' );\n /**\n * Getting order product ids\n */\n $orderPrdouctIds = Mage::helper ( 'marketplace/vieworder' )->getOrderProductIds ( Mage::getSingleton ( 'customer/session' )->getId (), $orderId );\n /**\n * Getting cancel order items\n */\n $cancelOrderItemProductIds = Mage::helper ( 'marketplace/vieworder' )->cancelOrderItemProductIds ( Mage::getSingleton ( 'customer/session' )->getId (), $orderId );\n\n /**\n * Getting the sonfiguration for order manage.\n */\n $orderStatusFlag = Mage::getStoreConfig ( 'marketplace/admin_approval_seller_registration/order_manage' );\n /**\n * Check whether product id count is greater than one\n */\n if (count ( $orderPrdouctIds ) >= 1 && $orderStatusFlag == 1) {\n $order = Mage::getModel ( 'sales/order' )->load ( $orderId );\n $itemsarray = $itemsArr = array ();\n /**\n * prepare invoice items\n */\n foreach ( $order->getAllItems () as $item ) {\n $qty = 0;\n /**\n * Prepare invoice qtys\n */\n $itemProductId = $item->getProductId ();\n $itemId = $item->getItemId ();\n /**\n * check whether item is in array\n */\n if (in_array ( $itemProductId, $orderPrdouctIds ) && ! in_array ( $itemProductId, $cancelOrderItemProductIds )) {\n $itemsArr [] = $itemId;\n /**\n * Qty ordered for that item\n */\n $qty = $item->getQtyOrdered () - $item->getQtyInvoiced ();\n }\n $itemsarray [$itemId] = $qty;\n }\n\n try {\n /**\n * Create invoice\n */\n if ($order->canInvoice ()) {\n /**\n * Generate invoice for shippment.\n */\n Mage::getModel ( 'sales/order_invoice_api' )->create ( $order->getIncrementId (), $itemsarray, '', 1, 1 );\n\t\t Mage::getModel ( 'marketplace/order' )->updateSellerOrderItemsBasedOnSellerItems ( $itemsArr, $orderId, 1 );\n\t\t $order->setStatus('processing');\n\t\t $order->save();\n /**\n * add success message\n */\n Mage::getSingleton ( 'core/session' )->addSuccess ( $this->__ ( 'The invoice has been created.' ) );\n }\n $this->_redirect ( 'marketplace/order/vieworder/orderid/' . $orderId );\n } catch ( Exception $e ) {\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( $e->getMessage () ) );\n $this->_redirect ( 'marketplace/order/vieworder/orderid/' . $orderId );\n }\n } else {\n /**\n * Checkk the permission for generate invoice.\n */\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( 'You do not have permission to access this page' ) );\n $this->_redirect ( 'marketplace/order/manage' );\n return false;\n }\n }", "public function print_distro_invoice($order_id, $distributor_id)\r\n {\r\n if($order_id != '')\r\n {\r\n\r\n $data['order_info'] = $this->order_model->get_dis_order_info($order_id);\r\n $data['distributor'] = $this->order_model->getDistributorInfo($distributor_id);\r\n $data['page_title'] = 'Print Invoice';\r\n\r\n $this->show_view('distributor_invoice_print', $data);\r\n }\r\n }", "function get_invoice($args) {\r\n if (is_numeric($args)) {\r\n $invoice_id = $args;\r\n } else {\r\n extract(wp_parse_args($args, $defaults), EXTR_SKIP);\r\n $defaults = array('invoice_id' => '', 'return_class' => false);\r\n }\r\n $invoice = new WPI_Invoice();\r\n $invoice->load_invoice(\"id=$invoice_id\");\r\n\r\n if (!empty($invoice->error) && $invoice->error) {\r\n return sprintf(__(\"Invoice %s not found.\", WPI), $invoice_id);\r\n }\r\n\r\n if (!empty($return_class) && $return_class) {\r\n return $invoice;\r\n }\r\n\r\n return $invoice->data;\r\n}", "public function sendInvoice(Mage_Sales_Model_Order $order)\n {\n if($this->_logging){\n Mage::log('in sendInvoice', null, $this->_logfile);\n }\n $payment = $order->getPayment();\n $paymentInstance = $payment->getMethodInstance();\n $order->setActionFlag(Mage_Sales_Model_Order::ACTION_FLAG_INVOICE, true);\n // check if it is possible to invoice!\n if ($order->canInvoice()){\n if($this->_logging){\n Mage::log('sendInvoice sending invoice for '.$paymentInstance->getCode(), null, $this->_logfile);\n }\n try {\n // Initialize new magento invoice\n $invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();\n // Set magento transaction id which returned from capayable\n $invoice->setTransactionId($payment->getLastTransId());\n // Allow payment capture and register new magento transaction\n $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_OFFLINE);\n\n // TODO: get following to work\n //$invoice->addComment('U betaald via Achteraf betalen.', true, true);\n //$invoice->getOrder()->setCustomerNoteNotify(true);\n\n // Register invoice and apply it to order, order items etc.\n $invoice->register();\n\n $transaction = Mage::getModel('core/resource_transaction')\n ->addObject($invoice)\n ->addObject($invoice->getOrder());\n\n // Commit changes or rollback if error has occurred\n $transaction->save();\n\n /**\n * Register invoice with Capayable\n */\n $isApiInvoiceAccepted = $paymentInstance->processApiInvoice($invoice);\n if($this->_logging) {\n Mage::log('sendInvoice isApiInvoiceAccepted:', null, $this->_logfile);\n Mage::log($isApiInvoiceAccepted, null, $this->_logfile);\n }\n //if ($isApiInvoiceAccepted) {\n $invoice->getOrder()->setIsInProcess(true);\n $invoice->getOrder()->addStatusHistoryComment(\n 'Invoice created and email send', true\n );\n $invoice->sendEmail(true, '');\n $order->save();\n// } else {\n// $this->_getSession()->addError(Mage::helper('capayable')->__('Failed to send the invoice.'));\n// }\n } catch (Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n Mage::logException($e);\n }\n } else {\n Mage::log('sendInvoice: could not send invoice, invoice already sent.', null, $this->_logfile);\n }\n }", "public function getInvoiceNo()\n {\n return $this->invoice_no;\n }", "public function show(Invoices $invoice)\n {\n return $invoice;\n }", "function invoice(){ \n\t$order_id=$this->uri->segment(3); \n\t$order = base64_decode(urldecode($order_id));\n\tif(empty($order)){$order=4;}\n\t\t$company_id = $this->session->userdata('id');\n\t\t$role = $this->session->userdata('role');\n\t\tif(!empty($company_id) &&($role=='admin') || ($role == 'super_admin')){\t\n\t\t\tif(!empty($order)){ \n\t\t\t$response = $this->InteractModal->get_order( $order);\n\t\t\t$where = array( 'company_id' =>$company_id);\n\t\t\t$user_data=$this->InteractModal->single_field_value('subscription',$where);\n\t\t\t$user_email= $user_data[0]['customer_email'];\n\t\t\t$pagedata['response'] = $response;\t\t\t\n\t\t\t$pagedata['user_email'] = $user_email;\t\t\t\n\t\t\t}\n\t\t\t\t$this->load->view('dashboard/header');\n\t\t\t\t$this->load->view('dashboard/invoice',$pagedata);\n\t\t\t\t$this->load->view('dashboard/footer');\n\t\t}else{\n\t\t\tredirect(base_url()); \n\t\t}\n\t}", "public function getCurrentInvoice () {\n $pendingInvoice = $this->getPendingInvoice();\n\n if ($pendingInvoice instanceof invoice) return $pendingInvoice;\n\n $invoice = new invoice(array(\"uid_empresa\" => $this->getUID()), NULL);\n\n return $invoice;\n }", "function theme_uc_product_content_show_order($node) {\n //dsm($node);\n \n $ret = '<div class=\"field\"><div class=\"field-label\">Invoice:</div>';\n $ret .= '<div class=\"field-items\">';\n $ret .= uc_order_load_invoice($node->order);\n $ret .= '</div></div>';\n \n return $ret;\n}", "public function getInvoice($invoiceId);", "public function print_receipt() {\n $userid = $this->input->post('userId');\n $data = $this->get_pdf_data($userid);\n //modified on 27/11/2014\n $data['meta_data'] = $this->meta_data;\n return generate_payment_receipt($data);\n }", "public function show(Invoice $invoice)\n {\n return $invoice;\n }", "function enhanced_invoice($order_id, $end = 0){\n $order = $this->order_model->get($order_id);\n $order_type = $this->order_model->get_order_type($order->order_type);\n $od = $this->order_details_model->get_order_details($order_id, true);\n\n $inv = array();\n $total = 0;\n foreach ($od as $key) {\n $inv[$key->id]['name'] = $key->arabic;\n $inv[$key->id]['eng'] = $key->eng;\n $inv[$key->id]['price'] = $key->price;\n $inv[$key->id]['qty'] = $key->quantity;\n $inv[$key->id]['total_line'] = $key->quantity*$key->price;\n $total += $inv[$key->id]['total_line'];\n }\n //$items_table = to_table($inv);\n\n $this->load->helper('orders');\n $s = get_service($order->order_type);\n\n $service = get_service_value($total, $s);\n $grand_total = $total+$service;\n \n $this->data['grand_total'] = $grand_total;\n $this->data['service_value'] = ($service)? $service : 0;\n $this->data['ratio'] = $s;\n $this->data['total'] = $total;\n $this->data['table'] = $this->order_model->get_table($order->customer_id);\n $this->data['order'] = $order;\n $this->data['order_type'] = $order_type;\n $this->data['items_table'] = $inv ;\n\n $this->check_order($order_type, $this->data);\n\n\n $invID = str_pad($order->id, 5, '0', STR_PAD_LEFT); \n\n$header = $this->load->view('app/orders/invoice/header',$this->data, true);\n$items = $this->load->view('app/orders/invoice/items', $this->data, true);\n$footer = $this->load->view('app/orders/invoice/footer',$this->data, true);\n\n $od = $this->order_details_model->get_count($order_id);\n\n\n $format = $this->get_pdf_format($od);\n\n $this->load->library('pdf', array(\n 'format'=>$format, \n 'title'=>'Club21 Cafe & Restaurant', \n 'string'=>'Invoice Details', \n 'footer'=>false\n ));\n //$this->pdf->lib_setTitle('Invoice Details');\n $this->pdf->lib_Cell(0, 10, \"$od lines [ $format ] $order_type->name\", 1, 1, 'C');\n\n $y_head = $this->pdf->lib_getY();\n $this->pdf->lib_writeHTMLCell(0, 0, 0, $y_head, $header, 1, 0, false, true, '', true);\n $y_items = $y_head + $this->pdf->lib_getLastH();\n $this->pdf->lib_writeHTMLCell(0, 0, 0, $y_items, $items, 0, 0, false, true, '', true);\n $y_foot = $y_items + $this->pdf->lib_getLastH();\n $this->pdf->lib_writeHTMLCell(0, 0, 0, $y_foot, $footer, 0, 0, false, true, '', true);\n\n\n $this->pdf->lib_output(APPPATH .\"invoice/inv_$invID.pdf\");\n $this->pdf_image(APPPATH .\"invoice/inv_$invID.pdf\"); \n $this->load->library('ReceiptPrint'); \n $this->receiptprint->connect('192.168.0.110', 9100);//any ip and port \n $this->receiptprint->print_image(APPPATH .\"invoice/inv_$invID.pdf.$this->ext\"); \n//unlink(APPPATH .\"invoice/inv_$invID.pdf.$this->ext\");\n if($end == 1 )\n $this->end($order_id, $grand_total);\n $this->edit_order($order->id);\n\n }", "public function getInvoiceID(){\n return $this->InvoiceID;\n }", "public function getInvoiceID()\n {\n return $this->invoiceID;\n }", "public function view_invoice($enc_id)\n {\n \t$arr_data = $order_product = [];\n \t$id = base64_decode($enc_id);\n \t$arr_agent = [];\n\n $obj_agent = $this->AgentModel->where('status','=','1')->get();\n\n if($obj_agent)\n\n {\n\n $arr_agent = $obj_agent->toArray();\n\n\t\t}\n\n \t$obj_data = $this->BaseModel->with('get_city','get_delivery_type','get_shipment_details')\n \t\t\t\t\t\t\t\t\t\t->with(['get_customer_details'=>function($q){\n\t\t\t\t\t\t\t\t\t\t\t\t$q->with('get_group_details');\n\t\t\t\t\t\t\t\t\t\t\t}])\n \t\t\t\t\t\t\t\t\t\t->where('id',$id)->first();\n\n \tif($obj_data){\n \t\t$arr_data = $obj_data->toArray();\n \t\t// dd($arr_data);\n \t}\n\n\t\t$obj_datas = $this->PrintingOrderDetailsModel->with(['get_order_details'=>function($q){\n \t\t\t\t\t\t\t\t\t\t\t\t\t$q->with('get_order_finance_details');\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->with(['get_productoption_selected'=>function($q){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$q->with('get_option_details');\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 ->with('get_product_details','get_combination_details')\n \t\t\t\t\t\t\t\t\t\t\t\t ->where('order_id',$id)->get();\n\n \tif($obj_datas){\n \t\t$arrs_data = $obj_datas->toArray();\n\t\t\t//dd($arrs_data);\n \t\t $i=1;\n \t\t//dd($arr_data);\n \t\tforeach ($arrs_data as $key => $value) {\n\t\t\t\t//dd($value);\t\n\t\t\t\t$product_op \t\t\t= isset($value['get_productoption_selected'])? $value['get_productoption_selected'] :'';\n\t\t\t\t\t//dd($product_op );\n\t\t\t\tforeach ($product_op as $ikey => $ivalue) {\n\t\t\t\t\t$arr_product_options[] = $ivalue['get_option_details']['english_name'];\n\t\t\t\t}\n\n\n\t\t\t\t$combination = isset($value['get_combination_details']['description'])? $value['get_combination_details']['description'] :'';\n\t\t\t\t//dd($combination);\n\t\t\t\t$arr_product_sub = [];\n\t\t\t\tforeach ($combination as $ikey => $subid) {\n\t\t\t\t\t//dd($subid);\n\t\t\t\t\t$sub_data = $this->SubOptionModel->where('id',$subid)->first();\n\t\t\t\t\tif($sub_data){\n\t\t\t\t\t\t$arr_product_engsub[] = $sub_data->english_name;\n\t\t\t\t\t\t$arr_product_arbsub[] = $sub_data->arabic_name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n \n\t\t\t\t$eng_option = implode(', ', $arr_product_engsub);\n\t\t\t\t$arb_option = implode(', ', $arr_product_arbsub);\n\t\t\t\t//$option = implode(',', $arr_product_options);\n\n\t\t\t\t$total_price = $value['quantity']*$value['unit_price'];\n\t \t\t$order_product['product_english'] = $value['get_product_details']['product_english_name'].'-'.$eng_option;\n\t \t\t$order_product['product_arabic'] = $value['get_product_details']['product_arabic_name'].'- '.$arb_option;\n\t \t\t$order_product['perquantity'] = 1;\n\t \t\t$order_product['unit_price'] = $value['unit_price'];\n\t \t\t$order_product['quantity'] = $value['quantity'];\n\t \t\t$order_product['total_price'] = $total_price;\n\t\t\t\t\t\t\t\t\n\t\t\t\t$arr_data['product_details'][] = $order_product;\t\t\t\t\n\t\t\t\t\t\t\t\t\n \t\t}\n\t\t} \n\n\t\t$this->arr_view_data['page_title'] = \"Manage \".$this->module_title;\n $this->arr_view_data['parent_module_icon'] = \"fa fa-home\";\n $this->arr_view_data['parent_module_title'] = \"Dashboard\";\n $this->arr_view_data['parent_module_url'] = url('/').'/admin/dashboard';\n $this->arr_view_data['module_icon'] = $this->module_icon;\n $this->arr_view_data['module_title'] = \"Manage \".$this->module_title;\n\t\t$this->arr_view_data['module_url_path'] = $this->module_url_path;\n\t\t$this->arr_view_data['admin_url_path'] = $this->admin_url_path;\n\t\t$this->arr_view_data['admin_panel_slug'] = $this->admin_panel_slug;\n\t\t$this->arr_view_data['arr_data'] \t\t= $arr_data;\n\t\t$this->arr_view_data['arr_agent'] = $arr_agent;\n\t\t\n\t\treturn view($this->module_view_folder.'.customer-invoice',$this->arr_view_data);\n }", "public function get_invoice()\n\t{\t\t\n\t\t$invoiceid = Input::get('invoiceid');\n\t\t$invoice_job = DB::table('tbl_invoices')->where('invoice_number','=',$invoiceid)->first();\n\t\tif(!empty($invoice_job))\n\t\t{\n\t\t\t$ser_id=$invoice_job->customer_id;\n\t\t\t$grand_total=$invoice_job->grand_total;\n\t\t\t$paid_amount=$invoice_job->paid_amount;\n\t\t\t$total=$grand_total - $paid_amount ;\n\t\t\treturn array($ser_id, $total);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 01;\n\t\t}\n\t}", "public function createInvoice(OrderInterface $order = NULL, array $options = []);", "public function whmcs_get_invoice($params = array()) {\n\t\t$params['action'] = 'GetInvoice';\n\t\t// return Whmcs_base::send_request($params);\n $load = new Whmcs_base();\n return $load->send_request($params);\n\t}", "public function getInvoiceID()\n {\n return $this->_invoiceID;\n }", "private function _generateInvoice()\n {\n $order = $this->_getOrder();\n if ($order->canInvoice()) {\n $invoice = $order->prepareInvoice();\n\n $invoice->register();\n Mage::getModel('core/resource_transaction')\n ->addObject($invoice)\n ->addObject($invoice->getOrder())\n ->save();\n \n $invoice->pay()->save();\n\n $order->save();\n\n $invoice->sendEmail(\n (boolean) Mage::getStoreConfig(\n 'payment/paymentnetwork_pnsofortueberweisung/send_mail', \n Mage::app()->getStore()->getStoreId()\n ), ''\n );\n }\n }", "function genInvoice($order_id)\n {\n\n //CHECK AND GENERATE INVOICE\n $conf = $this->BL->conf;\n\n $temp = $this->BL->orders->get(\"WHERE `orders`.sub_id=\".intval($order_id));\n $order = $temp[0];\n\n $temp = $this->BL->orders->recurring_data($order_id, 0, \"SELECT\");\n $next_due_date = $temp['rec_next_date'];\n\n $order['bill_cycle'] = (empty ($order['bill_cycle']) || empty ($order['product_id']))?12:$order['bill_cycle'];\n $cycle_name = $this->props->cycles[$order['bill_cycle']];\n $desc = $order['product_id'] . \"-\" . $order['domain_name'] . \"-\" . $next_due_date;\n\n // Use the first invoice for this order and domain to generate a template.\n $temp = $this->BL->invoices->get(\"WHERE `invoices`.desc = '\" . $this->utils->quoteSmart($order['product_id'] . \"-\" . $order['domain_name']) . \"' AND `orders`.domain_name='\".$this->utils->quoteSmart($order['domain_name']).\"' AND `orders`.product_id=\".intval($order['product_id']));\n $start_invoice = $temp[0];\n $this->REQUEST['pay_text'] = \"\";\n $echo = \"\";\n\n\n //GET DOMAIN REGISTRATION PRICE\n $dom_array = explode(\".\", $order['domain_name'], 2);\n $sld = $dom_array[0];\n $tld = $dom_array[1];\n $tld_amount = 0;\n if ($order['dom_reg_type'] == 1)\n {\n $tld_data = $this->BL->tlds->find(array(\"WHERE `dom_ext`='\".$this->utils->quoteSmart($tld).\"'\"));\n $month_diff = $this->utils->count_months($order['sign_date'], $next_due_date);\n $division = $month_diff / ($order['dom_reg_year'] * 12);\n if ($order['dom_reg_year'] * 12 == $month_diff || $division == floor($division))\n {\n $echo .= \"RENEW DOMAIN, \";\n foreach ($tld_data as $t)\n {\n if ($order['dom_reg_year'] == $t['dom_period'])\n {\n $tld_amount = $t['dom_price'];\n }\n }\n }\n }\n //GET SUB-DOMAIN PRICE\n elseif ($order['dom_reg_type'] == 2)\n {\n $subdomain_data = $this->BL->subdomains->find(array(\"WHERE `maindomain`='\".$this->utils->quoteSmart($tld).\"'\"));\n $subdomain_cycle = $this->BL->subdomains->getCycles($subdomain_data[0]['main_id']);\n $echo .= \"RENEW SUB DOMAIN, \";\n $tld_amount = $subdomain_cycle[$cycle_name];\n }\n else\n {\n $tld_amount = 0;\n }\n if ($tld_amount > 0)\n {\n $this->REQUEST['pay_text'] .= $order['domain_name'] . \" => <b>\" . $this->BL->toCurrency($tld_amount,null,1);\n $this->REQUEST['pay_text'] .= \"</b><br>\";\n }\n $this->REQUEST['tld_fee'] = $tld_amount;\n\n\n //GET PRODUCT PRICE\n $cycle_amount = 0;\n $product_cycles = $this->BL->products->getCycles($order['product_id']);\n $cycle_amount = $product_cycles[$cycle_name];\n if ($cycle_amount > 0)\n {\n $this->REQUEST['pay_text'] .= $this->BL->getFriendlyName($order['product_id']) . \" => <b>\" . $this->BL->toCurrency($cycle_amount,null,1);\n $this->REQUEST['pay_text'] .= \"</b><br>\";\n }\n $this->REQUEST['cycle_fee']= $cycle_amount;\n\n\n //GET ADDON PRICE\n $pay_text1 = \"\";\n $order_addons = $this->BL->orders->getAddons($order_id);\n $inv_addon_fee = \"<&>\";\n $addon_amount = 0;\n foreach ($order_addons as $order_addon)\n {\n $addon_data = $this->BL->addons->getByKey($order_addon['addon_id']);\n $addon_cycles = $this->BL->addons->getCycles($order_addon['addon_id']);\n if (isset($addon_data['addon_name']))\n {\n $inv_addon_fee .= $addon_data['addon_name'] . \">0.00>\" . $this->utils->toFloat($addon_cycles[$cycle_name]) . \"<&>\";\n $addon_amount = $addon_amount + $addon_cycles[$cycle_name];\n $pay_text1 .= $addon_data['addon_name'] . \" => <b>\" . $this->BL->toCurrency($addon_cycles[$cycle_name],null,1);\n $pay_text1 .= \"</b><br>\";\n }\n }\n if ($addon_amount > 0)\n {\n $this->REQUEST['addon_fee'] = $inv_addon_fee;\n $this->REQUEST['pay_text'] .= $pay_text1;\n }\n\n //GET DISCOUNTS\n $this->REQUEST['inv_tld_disc'] = 0;\n $this->REQUEST['inv_plan_disc'] = 0;\n $this->REQUEST['inv_addon_disc']= 0;\n if ($conf['include_sp_rec'] == 1)\n {\n $this->REQUEST['inv_tld_disc'] = $start_invoice['inv_tld_disc'];\n $this->REQUEST['inv_plan_disc'] = $start_invoice['inv_plan_disc'];\n $this->REQUEST['inv_addon_disc']= $start_invoice['inv_addon_disc'];\n }\n\n //calculate subtotal\n $this->REQUEST['other_amount']= 0;\n $this->REQUEST['other_amount']= $this->REQUEST['other_amount'] + ($this->REQUEST['tld_fee'] * ($this->REQUEST['inv_tld_disc'] / 100));\n $this->REQUEST['other_amount']= $this->REQUEST['other_amount'] + ($this->REQUEST['cycle_fee'] * ($this->REQUEST['inv_plan_disc'] / 100));\n $this->REQUEST['other_amount']= $this->REQUEST['other_amount'] + ($addon_amount * ($this->REQUEST['inv_addon_disc'] / 100));\n $this->REQUEST['net_amount'] = $this->REQUEST['tld_fee'] + $this->REQUEST['cycle_fee'] + $addon_amount - $this->REQUEST['other_amount'];\n $this->REQUEST['desc'] = $desc;\n $temp = explode(\"-\",$next_due_date,3);\n $invoices = $this->BL->invoices->find(array(\"WHERE `desc` LIKE '\" . $this->utils->quoteSmart($order['product_id'] . \"-\" . $order['domain_name'] . \"-\" . trim($temp[0]) . \"-\" . trim($temp[1]) . \"-%\").\"'\"));\n if (count($invoices))\n {\n $order['credit'] = $invoices[0]['debit_credit_amount'];\n $order['credit_desc']= $invoices[0]['debit_credit_reason'];\n $order['credit_type']= 0;\n if ($invoices[0]['debit_credit'] == $this->props->lang['credit'])\n {\n $order['credit_type']= 1;\n }\n }\n\n //Count credit\n if ($order['credit'] > 0)\n {\n //negetive credit\n if ($order['credit_type'] == 0)\n {\n $this->REQUEST['net_amount'] = $this->REQUEST['net_amount'] + $order['credit'];\n $this->REQUEST['pay_text'] .= $this->props->lang['and'] . \" \" . $this->props->lang['debit'] . \" = <b>\" . $this->utils->toFloat($order['credit']);\n $this->REQUEST['pay_text'] .= \"</b> \" . $this->props->lang['reason'] . \" : <b>\" . $order['credit_desc'] . \"<b>\";\n $credit_balance = 0;\n $this->REQUEST['debit_credit'] = $this->props->lang['debit'];\n $this->REQUEST['debit_credit_amount']= $order['credit'];\n $this->REQUEST['credit_desc'] = $order['credit_desc'];\n }\n else\n {\n if ($this->REQUEST['net_amount'] > $order['credit'])\n {\n $this->REQUEST['net_amount']= $this->REQUEST['net_amount'] - $order['credit'];\n $credit_balance = 0;\n $this->REQUEST['debit_credit'] = $this->props->lang['credit'];\n $this->REQUEST['debit_credit_amount']= $order['credit'];\n $this->REQUEST['credit_desc'] = $order['credit_desc'];\n }\n else\n {\n $credit_balance = $order['credit'] - $this->REQUEST['net_amount'];\n $this->REQUEST['debit_credit'] = $this->props->lang['credit'];\n $this->REQUEST['debit_credit_amount']= $this->REQUEST['net_amount'];\n $this->REQUEST['net_amount'] = 0;\n $this->REQUEST['credit_desc'] = $order['credit_desc'];\n }\n $this->REQUEST['pay_text'] .= $this->props->lang['and'] . \" \" . $this->props->lang['credit'] . \" = <b>\" . $this->BL->toCurrency($order['credit'],null,1);\n $this->REQUEST['pay_text'] .= \"</b> \" . $this->props->lang['reason'] . \" : <b>\" . $order['credit_desc'] . \"<b>\";\n }\n $data = array();\n $data['id'] = $order['id'];\n if($credit_balance)\n {\n $data['credit'] = $credit_balance;\n }\n else\n {\n $data['credit'] = 0;\n $data['credit_type'] = '';\n $data['credit_desc'] = '';\n }\n $this->BL->customers->update($data);\n }\n\n //calculate tax\n //get tax data\n $tax_string = null;\n $total_tax_amount = 0;\n foreach ($this->calculateTax($this->REQUEST['net_amount'], $this->BL->getCustomerFieldValue(\"country\",$order['id']), $this->BL->getCustomerFieldValue(\"state\",$order['id'])) as $r_k => $r_v)\n {\n ${ $r_k }= $r_v;\n }\n $this->REQUEST['tax_percent'] = $tax_string;\n $this->REQUEST['tax_amount'] = $total_tax_amount;\n $this->REQUEST['gross_amount'] = $this->REQUEST['net_amount'] + $this->REQUEST['tax_amount'];\n $this->REQUEST['status'] = $this->props->invoice_status[0];\n $this->REQUEST['order_id'] = $order_id;\n $this->REQUEST['due_date'] = $next_due_date;\n\n // Set status if specified (otherwise we use the default)\n if (isset ($this->REQUEST['force_status']))\n {\n $this->REQUEST['status'] = $this->REQUEST['force_status'];\n }\n $echo .= $this->REQUEST['desc'] . \"<br />\";\n\n // If the invoice doesn't exist, create it.\n $this->REQUEST['invoice_no'] = 0;\n if (!count($invoices))\n {\n $this->REQUEST['invoice_no'] = $this->BL->invoices->add($this->REQUEST['order_id']);\n }\n // Otherwise, if the invoice already exists, but the status is 'Upcoming', update it.\n elseif ($invoices[0]['status'] == $this->props->invoice_status[5])\n {\n $this->REQUEST['invoice_no'] = $invoices[0]['invoice_no'];\n $this->BL->invoices->update($this->REQUEST);\n }\n\n // Set new due date if an invoice was created or updated\n if (!empty ($this->REQUEST['invoice_no']) || (count($invoices)))\n {\n $echo .= \"Updated due date.\\n\";\n $this->BL->recurring_data($this->REQUEST['order_id'], 0, \"UPDATE\", $this->REQUEST['due_date']);\n }\n\n // Email invoice if configured to do so, and if the invoice was created, and it is \"Pending\"\n if ($conf['en_automail'] && $this->REQUEST['status']==$this->props->invoice_status[0])\n {\n $this->mailInvoice($this->REQUEST['invoice_no']);\n }\n return $echo;\n }", "public function invoice($id)\n {\n $orders = Order::with('customer', 'payment', 'shipping', 'order_items')->findOrFail($id);\n $order_info = OrderInfo::with('product')->select('id', 'order_id', 'product_id', 'product_name', 'product_price', 'product_qty')->where('order_id', $id)->get();\n\n return view('backend.order.invoice', compact('orders', 'order_info'));\n }", "public function getInvoice(string $id): Invoice;", "public function print_invoice($user_id,$record_reference_number)\n {\n \t$data = ['title' => 'Invoice'];\n \t$pdf = PDF::loadView('/gateready/invoice',$data);\n \t\n\n \treturn $pdf->download('invoice.pdf');\n }", "public function captureInvoice(Varien_Object $payment)\n {\n\n\n $transaction = Mage::getModel('sales/order_payment_transaction')->getCollection()\n ->addAttributeToFilter('order_id', array('eq' => $payment->getOrder()->getEntityId()))->getLastItem();\n $addData = $transaction->getAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);\n $transaction_id = $addData['transID'];\n\n\n if(empty($transaction_id)){\n $transaction_id = Mage::getSingleton('core/session')->getTransactionID();\n\n }\n if (empty($transaction_id)) {\n Mage::helper('paynovapayment')->log(\"Error. Missing transaction ID from order and cannot do capture.\");\n Mage::throwException(Mage::helper('paynovapayment')->__('Error. Missing transaction ID.'));\n }\n\n\n $invoice = $payment->getCurrentInvoice();\n $transInformation = $payment->getTransaction($transaction_id)->getAdditionalInformation();\n\n\n\n $order_id = $transInformation['raw_details_info']['order_id'];\n $order_number = $transInformation['raw_details_info']['order_number'];\n\n $order = Mage::getModel('sales/order');\n\n $order->loadByIncrementId($order_number);\n\n $res['orderId'] = $order_id;\n $res['transactionId'] = $transaction_id;\n $res['totalAmount'] = $invoice->getGrandTotal();\n $res['invoiceId'] = $transaction_id;\n\n $items = $invoice->getAllItems();\n\n\n $itemcount= count($items);\n $data = array();\n $i=0;\n $linenumber=1;\n\n $unitMeasure = Mage::getStoreConfig('paynovapayment/advanced_settings/product_unit');\n if (empty($unitMeasure)){\n $unitMeasure = \"pcs\";\n }\n $shippingname = Mage::getStoreConfig('paynovapayment/advanced_settings/shipping_name');\n if (empty($shippingname)){\n $shippingname = \"Shipping\";\n }\n $shippingsku = Mage::getStoreConfig('paynovapayment/advanced_settings/shipping_sku');\n if (empty($shippingsku)){\n $shippingsku = \"Shipping\";\n }\n\n foreach ($items as $itemId => $item)\n {\n\n $orderItem = $item->getOrderItem();\n\n $product = Mage::helper('catalog/product')->getProduct($item->getSku(), Mage::app()->getStore()->getId(), 'sku');\n $productUrl = Mage::getUrl($product->getUrlPath());\n $description = $product->getShortDescription();\n if (empty($description)){\n $description = $orderItem->getName();\n }\n $itemtype = $orderItem->getProductType();\n\n\n $lineqty = intval($item->getQty());\n // if product has parent - get parent qty\n\n\n if ($item->getParentItemID() AND $item->getParentItemID()>0){\n $parentQuoteItem = Mage::getModel(\"sales/quote_item\")->load($item->getParentItemID());\n $parentqty = intval($parentQuoteItem->getQty());\n $lineqty = $lineqty * $parentqty;\n }\n\n\n $lineprice = $orderItem->getPrice();\n $linetax = $orderItem->getTaxPercent();\n $unitAmountExcludingTax = $orderItem->getPrice();\n $linetaxamount = ($lineqty*$lineprice)*($linetax/100);\n $linetotalamount = $lineqty*$unitAmountExcludingTax+$linetaxamount;\n\n\n // If item has discount\n if ($orderItem->getDiscountAmount() AND $orderItem->getDiscountAmount()>0 )\n {\n $linediscountamount = $orderItem->getDiscountAmount();\n $itemdiscount = $linediscountamount/$lineqty;\n $unitAmountExcludingTax = $lineprice-$itemdiscount;\n $linetaxamount = ($lineqty*$unitAmountExcludingTax)*($linetax/100);\n $total1 = $lineqty*$unitAmountExcludingTax;\n $linetotalamount = $total1+$linetaxamount;\n $linetax1 = $lineqty*$unitAmountExcludingTax;\n $linetax2 = $linetax/100;\n $linetaxamount = $linetax1*$linetax2;\n }\n\n $res['lineItems'][$itemId]['id'] = $linenumber;\n $res['lineItems'][$itemId]['articleNumber'] = substr($orderItem->getSku(),0,50);\n $res['lineItems'][$itemId]['name'] = $item->getName();\n $res['lineItems'][$itemId]['quantity'] = $lineqty;\n $res['lineItems'][$itemId]['unitMeasure'] = $unitMeasure;\n $res['lineItems'][$itemId]['description'] = $description;\n $res['lineItems'][$itemId]['productUrl'] = $productUrl;\n\n\n if ($itemtype ==\"bundle\") {\n $res['lineItems'][$itemId]['unitAmountExcludingTax'] =0;\n $res['lineItems'][$itemId]['taxPercent'] = 0;\n $res['lineItems'][$itemId]['totalLineTaxAmount'] = 0;\n $res['lineItems'][$itemId]['totalLineAmount'] = 0;\n } else {\n $res['lineItems'][$itemId]['unitAmountExcludingTax'] = round($unitAmountExcludingTax,2);\n $res['lineItems'][$itemId]['taxPercent'] = round($linetax,2);\n $res['lineItems'][$itemId]['totalLineTaxAmount'] = round($linetaxamount,2);\n $res['lineItems'][$itemId]['totalLineAmount'] = round($linetotalamount,2);\n }\n\n $i++;\n $linenumber++;\n }\n if ($order->getShippingAmount() AND $order->getShippingAmount()>0) {\n $quoteid = $order->getQuoteId();\n $quote = Mage::getModel('sales/quote')->load($quoteid);\n $itemId++;\n $res['lineItems'][$itemId]['id'] = $linenumber;\n $res['lineItems'][$itemId]['articleNumber'] = substr($shippingsku,0,50);\n $res['lineItems'][$itemId]['name'] = $shippingname;\n $res['lineItems'][$itemId]['quantity'] = 1;\n $res['lineItems'][$itemId]['unitMeasure'] = $unitMeasure;\n $res['lineItems'][$itemId]['unitAmountExcludingTax'] = round($order->getShippingAmount(),2);\n $res['lineItems'][$itemId]['taxPercent'] = Mage::helper('paynovapayment')->getShippingTaxPercentFromQuote($quote);\n $res['lineItems'][$itemId]['totalLineTaxAmount'] = round($order->getShippingTaxAmount(),2);\n $res['lineItems'][$itemId]['totalLineAmount'] = round($order->getShippingInclTax(),2);\n $res['lineItems'][$itemId]['description'] = $description;\n $res['lineItems'][$itemId]['productUrl'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);;\n }\n\n\n\n $output=$this->setCurlCall($res, '/orders/'.$order_id.'/transactions/'.$transaction_id.'/finalize/'.$res['totalAmount']);\n\n\n $order->save();\n\n $status = $output->status;\n if($status->statusKey == 'PAYMENT_COMPLETED'){\n\n $status->isSuccess = true;\n $output->transactionId = 'Order has been finalized';\n\n }\n\n if($status->isSuccess){\n\n $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING);\n\n $order->save();\n\n $payment->setStatus(self::STATUS_APPROVED)\n ->setTransactionId($output->transactionId)\n ->setIsTransactionClosed(0);\n return $status->isSuccess;\n\n }else{\n\n $error=$status->statusMessage;\n\n\n $order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT,\n Mage::helper('paynovapayment')->__($error)\n );\n $order->save();\n\n Mage::throwException(\"$error\");\n\n $this->_redirect('checkout/onepage');\n\n }\n\n }", "public function invoice_id(){\n return parent::get_fk_object(\"invoice_id\");\n }", "public function get_printshop_order($printshop_income_id) {\n $out=array('result'=>$this->error_result, 'msg'=>$this->error_message);\n if ($printshop_income_id==0) {\n $res=$this->_newprintshop_order();\n } else {\n $this->db->select('oa.*, oa.amount_id as printshop_income_id, c.printshop_item_id, o.customer_name as customer, o.order_num');\n $this->db->from('ts_order_amounts oa');\n $this->db->join('ts_printshop_colors c', 'c.printshop_color_id=oa.printshop_color_id');\n $this->db->join('ts_orders o','o.order_id=oa.order_id');\n $this->db->where('oa.amount_id', $printshop_income_id);\n $res=$this->db->get()->row_array();\n if (!isset($res['amount_id'])) {\n $out['msg']='Printshop Order Not Found';\n return $out;\n }\n }\n $data=$this->_prinshoporder_params($res);\n $out['result']=$this->success_result;\n $out['data']=$data;\n return $out;\n }", "public function testCreateFromOrderShouldReturnAnInvoiceObject()\n {\n $order = new Order();\n $invoice = $this->invoiceFactory->createFromOrder($order);\n static::assertInstanceOf(Invoice::class, $invoice);\n }", "private function preInvoice($customer_id, $order) {\n $client = $this->getClient();\n $sessionid = Mage::getSingleton('admin/session')->getLedgerCookie(); \n\n $postArray = array(\n 'login' => $this->username,\n 'sessionid' => $sessionid,\n 'path' => 'bin/mozilla',\n 'type' => 'invoice',\n 'action' => 'add',\n 'customer_id' => $customer_id,\n 'oddordnumber' => $order->getRealOrderId()\n );\n\n //creating pre invoice\n if (!$client->post($this->context.'is.pl', $postArray )) {\n $this->errorHandle('Hiba történt a számla előkészítése közben!', $client->getError(), $order->getRealOrderId());\n return NULL;\n }\n\n $content = $client->getContent();\n\n if (substr_count($content,\"ERROR\")>0) {\n $this->errorHandle('Hiba történt a számla előkészítése közben!', $content, $order->getRealOrderId());\n return NULL;\n }\n\n if ($this->debug) {\n $h = fopen($this->tmpdir.\"/ledgerinvoice_debug.log\",\"a\");\n fwrite($h,\"\\n********************** preInvoice **************************\\n\");\n fwrite($h,$content.\"\\n\");\n fclose($h);\n }\n\n return $content;\n }", "private function createPayPalInvoice($order)\n {\n $body = [\n 'merchant_info' => [\n 'email' => '[email protected]',\n 'first_name' => 'Jakob',\n 'last_name' => 'Johansson',\n 'business_name' => 'Woo'\n ],\n 'shipping_info' => [\n 'first_name' => $order->get_shipping_first_name(),\n 'last_name' => $order->get_shipping_last_name(),\n 'address' => [\n 'line1' => $order->get_shipping_address_1(),\n 'city' => $order->get_shipping_city(),\n 'state' => $order->get_shipping_state(),\n ]\n ],\n 'shipping_cost' => [\n 'amount' => [\n 'currency' => $order->get_currency(),\n 'value' => $order->get_total()\n ]\n ]\n ];\n\n $response = wp_remote_retrieve_body(wp_remote_post($this->invoiceUrl, [\n 'method' => 'POST',\n 'headers' => [\n 'Authorization' => 'Bearer ' . $this->getAccessToken(),\n 'Content-Type' => 'application/json'\n ],\n 'body' => json_encode($body)\n ]));\n\n $response = json_decode($response, true);\n\n update_post_meta($order->get_id(), 'paypal_invoice_id', $response['id']);\n }", "public function invoice($id)\n {\n $order = $this->orderRepository->findWithoutFail($id);\n\n if (empty($order)) {\n Flash::error('Order not found');\n\n return redirect(route('orders.index'));\n }\n \n $price = ($order->reason=='fire')?150:(($order->position=='regular')?150:250);\n\n if(empty($order->sb_number)){\n\t $invoice = Invoice::make()\n\t\t ->addItem($order->candidate->user->first_name.' '.$order->candidate->user->last_name,$price,1)\n\t\t ->logo(asset('assets/img/[email protected]'))\n\t\t ->number($order->id)\n\t\t ->tax(19)\n\t\t ->customer([\n\t\t\t 'name' => $order->company->name,\n\t\t\t 'phone' => $order->company->phone,\n\t\t\t 'address' => $order->company->address,\n\t\t\t 'reg_com' => $order->company->reg_com,\n\t\t\t 'vat_code' => $order->company->vat_code,\n\t\t ])\n\t\t ->show('invoice');\n }else{\n\t $smartBill = new SmartBillCloudRestClientClass('[email protected]','af3930ccb2c9a7c3e0b24d538f648837');\n\n\t $pdf = $smartBill->PDFInvoice(\"RO30184266\",$order->sb_name,str_pad($order->sb_number, 4, \"0\", STR_PAD_LEFT));\n\n\t return response($pdf,200,array('Content-Type' => 'application/pdf', 'Content-Disposition' => 'inline; filename=\"invoice.pdf\"'));\n }\n }", "public function display_billing_invoice()\n\t{\n\t\t$table_contact_select = '\n\t\t\t<tr>\n\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t<td>'.$this->ml_client_contact_select($this->account->client_id).'</td>\n\t\t\t</tr>\n\t\t';\n\n\t\t?>\n\t\t<h2>Invoice PDF</h2>\n\n\t\t<div id=\"invoice_data\">\n\t\t\t<?php $this->print_payment_form('none', $table_contact_select);?>\n\t\t</div>\n\n\t\t<div id=\"invoice_edit\">\n\t\t\t<div>\n\t\t\t\t<label>Client:</label><input type=\"text\" name=\"pdf_client\" value=\"<?= $this->account->name ?>\"><br/>\n\t\t\t\t<label>Contact Name:</label><input type=\"text\" name=\"pdf_contact\"><br/>\n\t\t\t\t<label>Inv Date:</label><input type=\"text\" name=\"pdf_date\" class=\"date_input\" value=\"<?php echo date(util::DATE);?>\"><br/>\n\t\t\t\t<label>Inv Number:</label><input type=\"text\" name=\"pdf_invoice_num\"><br/>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div>\n\t\t\t\t<label>Address 1:</label><input type=\"text\" name=\"pdf_address_1\"><br/>\n\t\t\t\t<label>Address 2:</label><input type=\"text\" name=\"pdf_address_2\"><br/>\n\t\t\t\t<label>Address 3:</label><input type=\"text\" name=\"pdf_address_3\"><br/>\n\t\t\t</div>\n\t\t\t\n\t\t\t<?= $this->print_pdf_wpro_phone() ?>\n\n\t\t\t<div id=\"pdf_charges\" ejo>\n\t\t\t\t<label>Charges</label>\n\t\t\t\t<table>\n\t\t\t\t\t<tr><th>Amount</th><th>Description</th></tr>\n\t\t\t\t</table>\n\t\t\t\t<input type=\"button\" id=\"pdf_add_charge\" value=\"Add Charge\">\n\t\t\t</div>\n\n\t\t\t<div>\n\t\t\t\t<label>Notes</label><br/>\n\t\t\t\t<input type=\"text\" name=\"pdf_notes\">\n\t\t\t</div>\n\n\t\t\t<input type=\"hidden\" name=\"pdf_type\" value=\"invoice\">\n\t\t\t<input type=\"submit\" a0=\"action_gen_pdf\" value=\"Generate Invoice\">\n\t\t</div>\n\t\t\n\t\t<div class=\"clear\"></div>\n\t\t<?php\n\t}", "public function setInvoiceOrder(OrderInterface $order = null);", "private function getInvoice($id = null)\n {\n if (!$id) {\n\n $default_data = [\n 'customer_id' => null,\n 'invoice_number' => null,\n 'po_number' => null,\n 'invoice_date' => null,\n 'payment_due' => null,\n 'publish_status' => PublishStatus::DRAFT,\n 'published_at' => null,\n ];\n\n $invoice = $this->invoice\n ->fill($default_data)\n ->load('invoiceItems');\n\n }\n else {\n\n $invoice = $this->invoice\n ->with('invoiceItems')\n ->findOrFail($id);\n\n }\n\n return $invoice;\n }", "public function getInvoiceNumber(){\n return $this->getParameter('invoice_number');\n }", "public function invoice()\n {\n return $this->belongsTo(InvoiceProxy::modelClass(), 'saas_subscription_invoice_id');\n }", "public function invoice(){\n\n\t\t// hasOne(RelatedModel, foreignKeyOnRelatedModel = service_id, localKey = id)\n\t\treturn $this->hasOne(Invoice::class);\n\t}", "private function __print_receipt()\n {\n\t//Assuming range\n\t$ret = $this->__view_receipt();\n\t$receipthead = $this->__receipt_head_html();\n\t$receiptfoot = $this->__receipt_foot_html();\n\t\n\t$receipts = $receipthead. sprintf(\"\n\t<div id=\\\"receiptrow1\\\" class = \\\"receiptcolumn1\\\">%s</div><div id=\\\"receiptrow1\\\" class = \\\"receiptcolumn2\\\">%s</div>\n\t<div id=\\\"receiptrow2\\\" class = \\\"receiptcolumn1\\\">%s</div><div id=\\\"receiptrow2\\\" class = \\\"receiptcolumn2\\\">%s</div>\n\t<div id=\\\"receiptrow3\\\" class = \\\"receiptcolumn1\\\">%s</div><div id=\\\"receiptrow3\\\" class = \\\"receiptcolumn2\\\">%s</div>\n\t\n\t\", $ret, $ret, $ret, $ret, $ret, $ret).$receiptfoot;\n\t\n\techo $receipts;\n }", "public function invoice() {\n return $this->belongsTo('App\\Models\\Invoice', 'payment_invoiceid', 'bill_invoiceid');\n }", "public function getInvoiceModel(){}", "public function invoice()\n\t{\n\t\t$tableName = 'master_invoice';\n\t\t$condition = array('send_status' => SENT);\n\t\t$result['invoice'] = $this->CustomModel->selectAllFromWhere($tableName, $condition);\n\t\t$result['count'] = ($result['invoice'] != 0) ? count($result['invoice']) : 0;\n\n\t\t$this->load->view('london/layout/header');\n\t\t$this->load->view('london/layout/sidenavbar', $result);\n\t\t$this->load->view('london/pages/invoice', $result);\n\t\t$this->load->view('london/layout/footer');\n\t}", "public function generateInvoices()\n\t{\n\t\t$orders = $this->orderRepository->getUninvoicedOrders();\n\t\t$invoices = [];\n\n\t\tforeach($orders as $order)\n\t\t{\n\t\t\t$invoices[] = $this->invoiceFactory->createFromOrder($order);\n\t\t}\n\n\t\treturn $invoices;\n\t}", "public function toString()\n {\n return 'Invoice is present on invoices tab.';\n }", "function wpi_invoice_lookup($args = '') {\r\n return wp_invoice_lookup($args);\r\n}", "public function receipt()\n\t{\n\t\t\n\t\t$this->templateFileName = 'receipt.tpl';\n\t\t\n\t\tif (!isset($_REQUEST['orderID']))\n\t\t{\n\t\t\tthrow new \\Exception(\"Incorrect parameters\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\t// Get the order data\n\t\t\t$order = $this->dbConnection->prepareRecord(\"SELECT o.order_id, DATE_FORMAT(o.order_timestamp, '%W, %M %D, %Y') AS order_timestamp, r.description AS order_status, subtotal, tax, shipping, total, user_id, shipping_address_id, billing_address_id, payment_id FROM b_order o INNER JOIN b_reference r ON o.order_status = r.data_value AND r.data_member = 'ORDER_STATUS' WHERE order_id = ?\", $_REQUEST['orderID']);\n\t\t\t\n\t\t\t// Make sure the order is for the current user\n\t\t\tif ($order['user_id'] != $this->session->userID)\n\t\t\t{\n\t\t\t\tthrow new \\Exception(\"The order is for another user.\");\n\t\t\t}\n\n\t\t\t// Get the order lines\n\t\t\t$order_items = $this->dbConnection->prepareRecordSet(\"SELECT oi.order_id, oi.item_id, oi.item_sequence, oi.quantity, oi.price, oi.extended_price, oi.line_status, i.item_name, i.item_description, i.image_url, i.thumb_url, i.price, i.isbn, i.author, i.category_id FROM b_order_item oi INNER JOIN b_item i ON oi.item_id = i.item_id WHERE oi.order_id = ? ORDER BY oi.item_sequence\", $_REQUEST['orderID'] );\n\t\t\t\n\t\t\t// Get the addresses\n\t\t\t$shipping_address = $this->dbConnection->prepareRecord(\"SELECT * FROM b_user_address WHERE address_id = ?\", $order['shipping_address_id']);\n\t\t\t$billing_address = $this->dbConnection->prepareRecord(\"SELECT * FROM b_user_address WHERE address_id = ?\", $order['billing_address_id']);\n\t\t\t$payment_method = $this->dbConnection->prepareRecord(\"SELECT payment_id, payment_type, credit_card_type, payment_name, RIGHT(account_number, 4) AS account_number_last_4, LPAD(RIGHT(account_number, 4), LENGTH(account_number), 'X') AS account_number, card_expiration_month, card_expiration_year, rp.description AS payment_type_description, rc.description AS credit_card_type_description FROM b_payment INNER JOIN b_reference rp ON rp.data_member = 'PAYMENT_TYPE' AND rp.data_value = payment_type LEFT OUTER JOIN b_reference rc ON rc.data_member = 'CREDIT_CARD_TYPE' AND rc.data_value = credit_card_type WHERE payment_id = ?\", $order['payment_id']);\n\t\t\t\n\t\t\t$this->set('order', $order);\n\t\t\t$this->set('order_items', $order_items);\n\t\t\t$this->set('shipping_address', $shipping_address);\n\t\t\t$this->set('billing_address', $billing_address);\n\t\t\t$this->set('payment_method', $payment_method);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function print_invoice($id='')\n\t{\n\t\tif(isset($this->session->isactive)){\n\n\t\t\tif($id){\n\t\t\t\t$this->load->model('invoice_model');\n\t\t\t\t$invoice = $this->invoice_model->get_invoice($id);\n\t\t\t\t$this->load->model('student_model');\n\t\t\t\t$student = $this->student_model->get_every_student_full($invoice[0]['gr_number']);\n\n\t\t\t\t$id = $id;\n\t\t\t\t$grnumber = $invoice[0]['gr_number'];\n\t\t\t\t$name = $student[0]['name'];\n\t\t\t\t$class = $student[0]['class'];\n\t\t\t\t$division = $student[0]['division'];\n\t\t\t\t$date = explode('-',$invoice[0]['date']);\n\t\t\t\t$date = $date[2].'-'.$date[1].'-'.$date[0];\n\t\t\t\t$grand_total = $invoice[0]['grand_total'];\n\t\t\t\t$particulars = explode(' ',$invoice[0]['particulars']);\n\t\t\t\t$amount = explode(' ',$invoice[0]['amount']);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$id = $this->input->post('invoice_id');\n\t\t\t\t$grnumber = $this->input->post('grnumber');\n\t\t\t\t$name = $this->input->post('name');\n\t\t\t\t$class = $this->input->post('class');\n\t\t\t\t$division = $this->input->post('division');\n\t\t\t\t$date = $this->input->post('date');\n\t\t\t\t$grand_total = $this->input->post('grand_total');\n\t\t\t\t$particulars = explode(' ',$this->input->post('particulars'));\n\t\t\t\t$amount = explode(' ',$this->input->post('amount'));\n\t\t\t}\n\n\t\t\t$dhtml = '';\n\t\t\tfor ($i=0; $i<count($particulars); $i++) {\n\t\t\t\t$dhtml = $dhtml .\n\t\t\t\t\t\t\t\t \"<tr style='width:700px;text-align:center'>\n\t\t\t\t\t\t\t\t <td><br></td>\n\t\t\t\t\t\t\t\t <td style='width:250px;text-align:left;'>\".$particulars[$i].\"</td>\n\t\t\t\t\t\t\t\t <td style='width:250px;text-align:right;font:bold;border-left:1px solid black;'>\".$amount[$i].\"</td>\n\t\t\t\t\t\t\t\t </tr>\";\n\t\t\t}\n\n\t\t\tif(count($particulars)<15){\n\t\t\t\tfor ($i=count($particulars); $i<=15; $i++) {\n\t\t\t\t\t$dhtml = $dhtml .\n\t\t\t\t\t\t\t\t\t \"<tr style='width:700px;text-align:center'>\n\t\t\t\t\t\t\t\t\t <td><br></td>\n\t\t\t\t\t\t\t\t\t <td><br></td>\n\t\t\t\t\t\t\t\t\t <td style='border-left:1px solid black;'><br></td>\n\t\t\t\t\t\t\t\t\t </tr>\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$html = \"\n\t\t\t<html>\n\t\t\t\t<body style='margin-left:25px;'>\n\t\t\t\t\t<table style='width:700px;'>\n\n\t\t\t\t\t\t<tr style='width:700px;text-align:center;'>\n\t\t\t\t\t\t\t<td style='font:bold;font-size:25px;'>IQRA English Medium School</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='width:700px;text-align:center;'>\n\t\t\t\t\t\t\t<td style='font-size:18px;'>Mirjole, Majgaon Road,</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='width:700px;text-align:center;'>\n\t\t\t\t\t\t\t<td style='font-size:18px;'>Near Coast Guard Airport,</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='width:700px;text-align:center;'>\n\t\t\t\t\t\t\t<td style='font-size:18px;'>Ratnagiri</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='width:700px;text-align:center;'>\n\t\t\t\t\t\t\t<td style='font-size:15px;'>Email : [email protected]</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td><br></td></tr>\n\t\t\t\t\t\t<tr><td><br></td></tr>\n\t\t\t\t\t\t<tr style='width:700px;text-align:center;'>\n\t\t\t\t\t\t\t<td style='font:bold;font-size:20px;'>Fees Receipt</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td><br></td></tr>\n\n\t\t\t\t\t</table>\n\n\t\t\t\t\t<table style='width:700px;font-size:17px;'>\n\t\t\t\t\t\t<tr style='width:700px;'>\n\t\t\t\t\t\t\t<td style='width:80px;'>Gr No.</td>\n\t\t\t\t\t\t\t<td style='width:400px;text-align:left;font:bold;'>: \".$grnumber.\"</td>\n\n\t\t\t\t\t\t\t<td style='width:80px;'>Invoice No.</td>\n\t\t\t\t\t\t\t<td style='width:100px;text-align:left;font:bold;'>: \".$id.\"</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='width:700px;'>\n\t\t\t\t\t\t\t<td style='width:80px;'>Name</td>\n\t\t\t\t\t\t\t<td style='width:400px;text-align:left;font:bold;'>: \".$name.\"</td>\n\n\t\t\t\t\t\t\t<td style='width:80px;'>Date</td>\n\t\t\t\t\t\t\t<td style='width:100px;text-align:left;font:bold;'>: \".$date.\"</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='width:700px;'>\n\t\t\t\t\t\t\t<td style='width:80px;'>Class</td>\n\t\t\t\t\t\t\t<td style='width:400px;text-align:left;font:bold;'>: \".$class.\"</td>\n\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='width:700px;'>\n\t\t\t\t\t\t\t<td style='width:80px;'>Division</td>\n\t\t\t\t\t\t\t<td style='width:400px;text-align:left;font:bold;'>: \".$division.\"</td>\n\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t</table>\n\n\t\t\t\t\t<br>\n\n\t\t\t\t\t<table style='width:700px;border-collapse:collapse;font-size:17px;'>\n\t\t\t\t\t\t<tr style='width:700px;text-align:center'>\n\t\t\t\t\t\t\t<td style='width:200px;border-top:1px solid black;border-bottom:1px solid black;'><br></td>\n\t\t\t\t\t\t\t<td style='width:250px;text-align:left;border-top:1px solid black;border-bottom:1px solid black;'>Particulars</td>\n\t\t\t\t\t\t\t<td style='width:250px;text-align:right;border-left:1px solid black;border-top:1px solid black;border-bottom:1px solid black;'>Amount</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td><br></td>\n\t\t\t\t\t\t\t<td><br></td>\n\t\t\t\t\t\t\t<td style='border-left:1px solid black;'><br></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\".$dhtml.\"\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<tr style='width:700px;text-align:center'>\n\t\t\t\t\t\t\t<td style='width:200px;border-top:1px solid black;border-bottom:1px solid black;'><br></td>\n\t\t\t\t\t\t\t<td style='width:250px;text-align:center;border-top:1px solid black;border-bottom:1px solid black;'>Total</td>\n\t\t\t\t\t\t\t<td style='width:250px;text-align:right;font:bold;border-left:1px solid black;border-top:1px solid black;border-bottom:1px solid black;'>\".$grand_total.\"</td>\n\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t</table>\n\n\t\t\t\t\t<br><br><br><br><br><br>\n\t\t\t\t\t<div style='text-align:right;font-size:16px;margin-right:55px;'>Authorised Signatory</div>\n\n\t\t\t\t\t<footer>Developed by theShaibaz</footer>\n\n\t\t\t\t</body>\n\t\t\t</html>\n\t\t\t\";\n\n\t\t\t// instantiate and use the dompdf class\n\t\t\t$dompdf = new Dompdf();\n\t\t\t$dompdf->loadHtml($html);\n\n\t\t\t// (Optional) Setup the paper size and orientation\n\t\t\t$dompdf->setPaper('A4', 'portrait');\n\n\t\t\t// Render the HTML as PDF\n\t\t\t$dompdf->render();\n\n\t\t\t// Output the generated PDF to Browser\n\t\t\t$dompdf->stream(\"invoice.pdf\", array(\"Attachment\" => false));\n\n\t\t}\n\t\telse {\n\t\t\tredirect('login');\n\t\t}\n\t}", "public function invoice(){\n\t\treturn Hash::make(\"12345\");\n\t\t$inv = Invoice::where('id','1')->first();\n\t\tprint_r($inv->json);\n\t\treturn 0;\n\t}", "public function getInvoice($invoice_id)\n {\n return $this->remote->select()->from('invoice')->where('id', '=', $invoice_id)->fetch();\n }", "function displayOrder($orderoid){\n $r = array();\n // le champ INFOCOMPL de WTSCATALOG (PRODUCT) est optionnel, si présent nécessaire dans certains documents\n $r['do'] = $this->dsorder->display(array('oid'=>$orderoid, \n\t\t\t\t\t 'selectedfields'=>'all', \n\t\t\t\t\t 'options'=>array('PICKUPPOINT'=>array('target_fields'=>array('title')))\n\t\t\t\t\t ));\n $r['bl'] = $this->dsline->browse(\n\t\t\t\t array('selectedfields'=>'all',\n\t\t\t\t\t 'options'=>array('PRODUCT'=>array('target_fields'=>array('INFOCOMPL', 'label'))),\n\t\t\t\t\t 'order'=>'WTPCARD, REFERENCE',\n\t\t\t\t\t 'pagesize'=>9999,\n\t\t\t\t\t 'first'=>0,\n\t\t\t\t\t 'select'=>$this->dsline->select_query(array('cond'=>array('LNKORDER'=>array('=', $orderoid))))));\n // mise en forme des lignes achats carte, utlisation bonus, assurance, port\n // recup du premier jour de ski (paiement chq)\n $r['bl']['lines__bonu'] = array();\n $r['bl']['lines__validfromhidden'] = array();\n $r['bl']['lines__cart'] = array();\n $r['bl']['lines__assu'] = array();\n $r['bl']['lines__validtill'] = array();\n $r['bl']['lines__annul'] = array_fill(0, count($r['bl']['lines_oid']), false);\n $r['_totassu'] = 0;\n $r['_totcart'] = 0;\n $r['_totport'] = 0;\n $r['_nbforf'] = 0;\n $r['_tot1'] = 0;\n $r['_tot2'] = 0;\n $r['_totassuAnnul'] = 0;\n $r['_totcartAnnul'] = 0;\n $r['_totportAnnul'] = 0;\n $r['_tot1Annul'] = 0;\n $r['_tot2Annul'] = 0;\n $r['_cartesseules'] = array();\n $cartesfaites = array();\n $firstday = NULL;\n $nodates = true;\n // rem : assur pointe sur son forfait\n // bonus pointe sur son forfait\n // les forfaits de nouvelles cartes pointent TOUS vers la ligne ...\n // a ne compter qu'ne fois donc\n //\n // ajout du calendrier pour les lignes forfaits\n //\n foreach($r['bl']['lines_oLINETYPE'] as $l=>$olinetype){\n if ($r['bl']['lines_oETATTA'][$l]->raw == XModEPassLibre::$WTSORDERLINE_ETATTA_ANNULATION){\n $r['bl']['lines__annul'][$l] = true;\n }\n $r['bl']['lines__validfromhidden'][$l] = 0;\n if($olinetype->raw == 'port'){\n\t$r['_totport']+=$r['bl']['lines_oTTC'][$l]->raw;\n }\n if($olinetype->raw == 'forf'){\n /* -- vente de cartes seules -- */\n $r['_nbforf'] += 1;\n /* -- vente de cartes seules -- */\n $r['_tot1']+=$r['bl']['lines_oTTC'][$l]->raw;\n if ($r['bl']['lines__annul'][$l] == true)\n\t $r['_tot1Annul']+= $r['bl']['lines_oTTC'][$l]->raw;\n if ($firstday == NULL || $r['bl']['lines_oVALIDFROM'][$l]->raw < $firstday)\n $firstday = $r['bl']['lines_oVALIDFROM'][$l]->raw;\n $rsc = selectQueryGetAll(\"select type from \".self::$tablePRDCALENDAR.\" c where c.koid=(select calendar from \".self::$tablePRDCONF.\" pc where pc.koid=(select prdconf from \".self::$tableCATALOG.\" p where p.koid='{$r['bl']['lines_oPRODUCT'][$l]->raw}'))\");\n if (count($rsc)>=1 && $rsc[0]['type'] == 'NO-DATE'){\n $r['bl']['lines__validfromhidden'][$l] = 1;\n } else {\n // calcul du validtill\n $dp = $this->modcatalog->displayProduct(NULL, NULL, NULL, NULL, $r['bl']['lines_oPRODUCT'][$l]->raw);\n $dpc = $this->modcatalog->getPrdConf($dp);\n $r['bl']['lines__validtill'][$l] = $this->getValidtill($r['bl']['lines_oVALIDFROM'][$l]->raw, $dp, $dpc);\n $nodates = false;\n }\n }\n $r['_tot2']+=$r['bl']['lines_oTTC'][$l]->raw;\n if ($r['bl']['lines__annul'][$l] == true)\n $r['_tot2Annul']+= $r['bl']['lines_oTTC'][$l]->raw;\n\n $ll = false;\n if (!empty($r['bl']['lines_oLNKLINE'][$l]->raw)){\n $ll = array_search($r['bl']['lines_oLNKLINE'][$l]->raw, $r['bl']['lines_oid']);\n }\n if ($ll === false)\n continue;\n\n if($r['bl']['lines_oLINETYPE'][$ll]->raw == 'cart'){\n if (!isset($cartesfaites['_'.$ll])){\n $r['_totcart']+= $r['bl']['lines_oTTC'][$ll]->raw;\n $cartesfaites['_'.$ll] = 1;\n if ($r['bl']['lines__annul'][$ll] == true)\n $r['_totcartAnnul']+= $r['bl']['lines_oTTC'][$ll]->raw;\n }\n $r['bl']['lines__cart'][$l] = $ll;\n }\n if($olinetype->raw == 'bonu' && $r['bl']['lines_oLINETYPE'][$ll]->raw == 'forf'){\n $r['bl']['lines__bonu'][$ll] = $l;\n }\n if($olinetype->raw == 'assu' && $r['bl']['lines_oLINETYPE'][$ll]->raw == 'forf'){\n $r['bl']['lines__assu'][$ll] = $l;\n $r['_totassu']+= $r['bl']['lines_oTTC'][$l]->raw;\n if ($r['bl']['lines__annul'][$l] == true)\n $r['_totassuAnnul']+= $r['bl']['lines_oTTC'][$l]->raw;\n }\n }\n // utilisation avoirs et coupons\n if ($r['_tot2'] <= 0){\n $r['_tot2'] = 0;\n }\n /* -- vente de cartes seules -- */\n foreach($r['bl']['lines_oLINETYPE'] as $l=>$olinetype){\n if($r['bl']['lines_oLINETYPE'][$l]->raw == 'cart'){\n if (!isset($cartesfaites['_'.$l])){\n $r['_totcart']+= $r['bl']['lines_oTTC'][$l]->raw;\n $cartesfaites['_'.$l] = 1;\n $r['_cartesseules'][] = $l;\n }\n }\n }\n // calcul des totaux - annulations (pro)\n foreach(array('_tot1', '_tot2', '_totassu') as $tn){\n $r[$tn.'C'] = $r[$tn] - $r[$tn.'Annul'];\n }\n if ($firstday == NULL){\n $firstday = $r['do']['oFIRSTDAYSKI']->raw;\n }\n /* -- vente de cartes seules -- */\n $r['firstday'] = $firstday;\n $r['nodates'] = $nodates;\n /* -- cas des commandes pro -- */\n if ($this->customerIsPro()){\n $this->summarizeOrder($r);\n }\n\n return $r;\n }", "function print_return_receipt($invoice_no='',$return_prod_id=0)\r\n\t{\r\n\t\t$this->erpm->auth(PNH_INVOICE_RETURNS);\r\n\t\t$this->load->plugin('barcode');\r\n\t\t$data['fran_det'] = $this->erpm->get_frandetbyinvno($invoice_no);\r\n\t\t$data['return_proddet'] = $this->erpm->get_returnproddetbyid($return_prod_id);\r\n\t\t\r\n\t\t// check if the product is ready to be shipped \r\n\t\tif(!$data['return_proddet']['readytoship'])\r\n\t\t{\r\n\t\t\tshow_error(\"Selection is not ready to ship\");\r\n\t\t}\r\n\t\t\r\n\t\t// check if the product is already shipped \r\n\t\tif($data['return_proddet']['is_shipped'])\r\n\t\t{\r\n\t\t\tshow_error(\"Print Cannot be processed, Product already shipped\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$data['page'] = 'print_return_receipt';\r\n\t\t$this->load->view('admin/body/print_return_receipt',$data);\r\n\t}", "public function getPurchaseInvoiceID()\n {\n return $this->purchaseInvoiceID;\n }", "public function post_invoice($order_id, &$reply) {\n\t\t\t$wc_order = new WC_Order($order_id);\n\n\t\t\t$invoice = new \\CoinSimple\\Invoice();\n\t\t\t$invoice->setName($wc_order->billing_first_name . ' ' . $wc_order->billing_last_name);\n\t\t\t$invoice->setEmail($wc_order->billing_email);\n\t\t\t$invoice->setCurrency(strtolower(get_woocommerce_currency()));\n\n\t\t\t// create line items\n\t\t\t$wc_items = $wc_order->get_items();\n\t\t\tforeach ($wc_items as $wc_item) {\n\t\t\t\tif (get_option('woocommerce_prices_include_tax') === 'yes') {\n\t\t\t\t\t$line_total = $wc_order->get_line_subtotal($wc_item, true /*tax*/, true /*round*/);\n\t\t\t\t} else {\n\t\t\t\t\t$line_total = $wc_order->get_line_subtotal($wc_item, false /*tax*/, true /*round*/);\n\t\t\t\t}\n\n\t\t\t\t$item = array(\n\t\t\t\t\t\"description\" => $wc_item['name'],\n\t\t\t\t\t\"quantity\" => floatval($wc_item['qty']),\n\t\t\t\t\t\"price\" => round($line_total / $wc_item['qty'], 2)\n\t\t\t\t);\n\n\t\t\t\t$invoice->addItem($item);\n\t\t\t}\n\n\t\t\t$invoice->setNotes($this->get_option(\"notes\"));\n\n\t\t\t//tax\n\t\t\tif ($wc_order->get_total_tax() != 0 && get_option('woocommerce_prices_include_tax') !== 'yes') {\n\t\t\t\t$tax = 0;\n\t\t\t\tforeach ($wc_order->get_tax_totals() as $value) {\n\t\t\t\t\t$tax += $value->amount;\n\t\t\t\t}\n\t\t\t\t$tax = round($tax, 2);\n\n\t\t\t\t$invoice->addItem(array(\n\t\t\t\t\t\t\"description\" => \"Sales tax\",\n\t\t\t\t\t\t\"quantity\" => 1,\n\t\t\t\t\t\t\"price\" => $tax\n\t\t\t\t));\n\t\t\t}\n\n\t\t\t// shipping\n\t\t\tif ($wc_order->get_total_shipping() != 0) {\n\t\t\t\t$shipping = $wc_order->get_total_shipping();\n\t\t\t\tif (get_option('woocommerce_prices_include_tax') === 'yes') {\n\t\t\t\t\t$shipping += $wc_order->get_shipping_tax();\n\t\t\t\t}\n\n\t\t\t\t$invoice->addItem(array(\n\t\t\t\t\t\t\"description\" => \"Shipping and handling\",\n\t\t\t\t\t\t\"quantity\" => 1,\n\t\t\t\t\t\t\"price\" => round($shipping, 2)\n\t\t\t\t));\n\t\t\t}\n\n\t\t\t// coupens\n\t\t\tif ($wc_order->get_total_discount() != 0) {\n\t\t\t\t$invoice->addItem(array(\n\t\t\t\t\t\t\"description\" => \"Discounts\",\n\t\t\t\t\t\t\"quantity\" => 1,\n\t\t\t\t\t\t\"price\" => -round($wc_order->get_total_discount(), 2)\n\t\t\t\t));\n\t\t\t}\n\n\t\t\t// settings part\n\t\t\t$invoice->setCallbackUrl(add_query_arg('wc-api', 'wc_coinsimple', home_url('/')));\n\t\t\t$invoice->setCustom(array(\n\t\t\t\t\"order_id\" => $wc_order->id,\n\t\t\t\t\"order_key\" => $wc_order->order_key\n\t\t\t));\n\n\t\t\tif ($this->get_option(\"redirect_url\") != \"\") {\n\t\t\t\t$invoice->setRedirectUrl($this->get_option(\"redirect_url\"));\n\t\t\t}\n\n\t\t\t$business = new \\CoinSimple\\Business($this->get_option(\"business_id\"), $this->get_option('api_key'));\n\t\t\t$res = $business->sendInvoice($invoice);\n\n\t\t\tif ($res->status == \"ok\") {\n\t\t\t\t$reply = $res;\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function getShntinvoice()\n {\n return $this->shntinvoice;\n }", "public function setOrderTypeInvoice() {\n $this->orderType = \"Invoice\";\n return $this;\n }", "public function actionGetOut($order_id=999)\n {\n $obj = $this->c->getOrderObj($order_id);\n \n $ret = '';\n if ($obj) {\n foreach ($obj->houseContract->contracts as $contract)\n $ret .= $contract->getContractText();\n } else {\n echo 'no obj ';\n }\n $ret = iconv('utf-8', 'gbk', $ret);\n print_r($ret);\n echo 'job done!';\n }", "public function orderinvoice(Request $request)\n {\n dd($request);\n $order = $request->input('order');\n $orderdes = DB::select(\"select * from orders where id='\" . $order . \"' \");\n $details = DB::select(\"select * from cart where orderid='\" . $order . \"' \");\n\n\n //dd($Jobid);\n $pdf = PDF::loadView('partials.invoiceorder', array('Jobid' => $order, 'order' => $orderdes, 'details' => $details));\n //dd($pdf);\n return $pdf->download($order . '.pdf');\n\n }", "public function print_invoice_details_table() {\n\n // Language variables to be used in heredoc syntax\n $tableHeaderCategory = lang( 'report_th_category' );\n $tableHeaderDescription = lang( 'report_th_description' );\n $tableHeaderAmount = lang( 'report_th_amount' );\n\n // Get the invoice row details\n $invoiceRows = $this->mockinvoice_row_model->get_by( 'mockInvoiceId = ' . @$_POST['mockInvoiceId'] );\n\n $tableRows = '';\n\n foreach ( $invoiceRows as $row ) {\n\n // Add currency symbol Eg. '$' to the amount if we have one\n ( $row->amount != null ? $amount = lang( 'system_currency_symbol' ) . $row->amount : $amount = '' );\n // Replace new lines with HTML <br> tags\n $description = nl2br( $row->description );\n\n // Check if a row has some content and add it to the table if it does\n if ( ( $row->category != null ) or ( $row->description != null ) or ( $row->amount != null ) ) {\n $tableRows .= <<< HTML\n <tr id=\"invoice-details-row-{$row->mockInvoiceRowId}\">\n <td>{$row->category}</td>\n <td>{$description}</td>\n <td>{$amount}</td>\n </tr>\n\nHTML;\n }\n }\n\n // Output the HTML\n if ( $tableRows == '' ) {\n\n // Show that we have no details yet to display\n echo '<div class=\"alert alert-warning\">' . lang( 'report_minv_empty' ) . '</div>';\n } else {\n\n // Display the table with invoice details\n echo <<< HTML\n <table class=\"table table-striped table-bordered table-hover table-report\">\n <thead>\n <tr class=\"report-heading-row\">\n <th>{$tableHeaderCategory}</th>\n <th>{$tableHeaderDescription}</th>\n <th>{$tableHeaderAmount}</th>\n </tr>\n </thead>\n <tbody>\n\n{$tableRows}\n\n </tbody>\n </table>\n\nHTML;\n }\n }", "function ras_invoice_view_invoice_item($invoice_item) {\n return 'This is an invoice item - ID: ' . $invoice_item->invoice_item_id;\n}", "public function findInvoiceId() {\n\t\treturn $this->request->getFiltered('ok_invoice'); \n\t}", "public function invoice(){\n return $this->hasOne(Invoice::class);\n }", "public function invoiceOption(): InvoiceOption\n {\n return $this->invoiceOption;\n }", "protected function createInvoice(OrderInterface $order, Transaction $transaction)\n {\n if (!$order->canInvoice()) {\n return null;\n }\n\n // @todo fix it\n // throwing an exception, might be because of Gateway process with SDK\n return null;\n\n $invoice = $this->invoiceService->prepareInvoice($order);\n $invoice->setRequestedCaptureCase(Invoice::CAPTURE_ONLINE);\n $invoice->register();\n\n $transaction->addObject($invoice)->addObject($invoice->getOrder());\n\n $transaction->save();\n\n return $invoice;\n }", "public function invoice()\n {\n return $this->belongsTo(Invoice::class, 'invoice_id', 'id');\n }", "public function invoicePrintPdf($invoiceNo)\n {\n $data['invoice_no'] = $invoiceNo;\n $preference = Preference::getAll()->pluck('value', 'field')->toArray();\n $data['dflt_currency_id'] = $preference['dflt_currency_id'];\n $data['saleInvoiceData'] = SaleOrder::with([\n 'location:id,name',\n 'paymentTerm:id,days_before_due',\n 'currency:id,name,symbol',\n 'saleOrderDetails',\n 'customer:id,first_name,last_name,email,phone',\n 'customerBranch:id,name,billing_street,billing_city,billing_state,billing_zip_code,billing_country_id'\n ])->find($invoiceNo);\n $data['saleOrderData'] = $data['saleInvoiceData'] != \"POSINVOICE\" ? SaleOrder::with(['location:id,name'])->find($data['saleInvoiceData']->order_reference_id) : null;\n if (empty($data['saleInvoiceData'])) {\n Session::flash('fail', __('Invoice not available'));\n return redirect()->intended('invoice/list');\n }\n foreach ($data['saleInvoiceData']->saleOrderDetails as $key => $value) {\n if ($data['saleInvoiceData']->has_tax == 1 && $value->quantity > 0) {\n $value->taxList = (new SaleTax)->getSaleTaxesInPercentage($value->id);\n }\n }\n $data['taxes'] = (new SaleOrder)->calculateTaxRows($invoiceNo);\n $data['paymentMethods'] = PaymentMethod::getAll();\n $data['paymentsList'] = CustomerTransaction::where('sale_order_id', $invoiceNo)->latest('id')->get();\n $data['currencies'] = Currency::getAll()->pluck('name', 'id')->toArray();\n $data['accounts'] = Account::where('is_deleted', '!=', 1)->get();\n $data['item_tax_types'] = TaxType::getAll();\n\n if ($data['saleInvoiceData']->pos_shipping) {\n $data['saleInvoiceData']->shipping_address = json_decode($data['saleInvoiceData']->pos_shipping);\n if ($data['saleInvoiceData']->shipping_address->ship_country_id) {\n $data['saleInvoiceData']->shipping_address->ship_country = Country::where('code', $data['saleInvoiceData']->shipping_address->ship_country_id)\n ->first()\n ->country;\n } else {\n $data['saleInvoiceData']->shipping_address->ship_country = \"\";\n }\n }\n $reference = TransactionReference::where('reference_type', 'INVOICE_PAYMENT')->latest('id')->first();\n if (!empty($reference)) {\n $info = explode('/', $reference->code);\n $refNo = (int)$info[0];\n $data['reference'] = sprintf(\"%03d\", $refNo + 1) . '/' . date('Y');\n } else {\n $data['reference'] = sprintf(\"%03d\", 1) . '/' . date('Y');\n }\n $data['company_logo'] = Preference::getAll()->where('category','company')->where('field', 'company_logo')->first('value');\n $data['type'] = request()->get('type') == 'print' || request()->get('type') == 'pdf' ? request()->get('type') : 'print';\n\n return printPDF($data, 'invoice_' . time() . '.pdf', 'admin.invoice.print', view('admin.invoice.print', $data), $data['type']);\n }", "public function invoice(Request $request)\n {\n $getusers = Order::with('users')->where('order.id', $request->id)->get()->first();\n $getorders=OrderDetails::with('itemimage')->select('order_details.id','order_details.qty','order_details.price as total_price','item.id','item.item_name','item.item_price','order_details.item_id')\n ->join('item','order_details.item_id','=','item.id')\n ->join('order','order_details.order_id','=','order.id')\n ->where('order_details.order_id',$request->id)->get();\n\n // $getorders = OrderDetails::with('items')->where('order_details.item_id', $request->id)->get();\n // dd($getusers['users']);\n return view('invoice',compact('getorders','getusers'));\n }", "public function invoice_info( $invoice_id ) {\r\n\t\treturn $this->_send_request( 'invoices/'.$invoice_id );\r\n\t}", "public function getPrinter();", "public function invoice($id = null)\n {\n UserModel::authentication();\n\n //get the session user\n $user = UserModel::user();\n\n //get the user's invoice\n $invoice = InvoiceModel::invoice($id);\n\n $this->View->Render('dashboard/invoice', ['invoice' => $invoice, 'user' => $user]);\n }", "public function invoices()\n {\n $user = auth()->user();\n $facturas = DB::table('quotes')\n ->select('quotes.account_id', 'quotes.created_by_id', 'quotes.id as quoteId', 'quotes.quote_date',\n DB::raw(\"upper(quotes.quote_number) AS quote_number\"),\n 'quotes.invoice_date','quotes.stage_id',\n 'accounts.name as accountName','users.name as userName','stages.name as stageName',\n 'accounts.document_number','document_types.name as documenttype')\n ->join('accounts', 'accounts.id', '=', 'quotes.account_id')\n ->join('document_types', 'document_types.id', '=', 'accounts.document_type_id')\n ->join('stages', 'stages.id', '=', 'quotes.stage_id')\n ->join('users', 'users.id', '=', 'quotes.created_by_id')\n ->whereIn('quotes.stage_id', array(3,4))\n ->where('users.organization_id', $user->organization_id)\n ->orderByRaw('quotes.updated_at DESC')\n ->paginate(10);\n return view('quote.invoices',compact('facturas'));\n }", "public function getInvoiceData(){\n return $this->getParameter('invoice_data');\n }", "public function getinvoice($id) \n\n {\n $customer = array();\n $data = PurchaseOrder::find($id);\n $SupplierDetail = DB::table('zenrolle_purcahse')->join('zenrolle_suppliers','zenrolle_purcahse.supplier','=','zenrolle_suppliers.id')\n ->select('zenrolle_suppliers.id','zenrolle_suppliers.name','zenrolle_suppliers.address','zenrolle_suppliers.city','zenrolle_suppliers.country','zenrolle_suppliers.phone','zenrolle_suppliers.email','zenrolle_purcahse.invoice_no','zenrolle_purcahse.reference_no','zenrolle_purcahse.order_date','zenrolle_purcahse.due_date','zenrolle_purcahse.payment_made','zenrolle_purcahse.invoice_note')\n ->where('zenrolle_purcahse.id',$id)->get();\n $invoice = PurchaseItem::where('pid',$id)->get();\n \n $customer['invoice'] = $invoice;\n $payment_method = DB::table('zenrolle_paymentmethod')->select('id','payment_type')\n ->get();\n $data->due_balance = $data->total - $data->payment_made;\n return view('purchasing.purchase_order.create',compact('invoice','data',\n 'SupplierDetail','payment_method')); \n }", "public function getForcedShipmentWithInvoice();", "public function getOrderline() {\n return $this->orderline;\n}", "function genNewInvoices($order_id)\n {\n $conf = $this->BL->conf;\n\n // Calculate what day we're generating invoices for.\n $today = getdate();\n $gen_for_date = $this->utils->getXdayAfter($conf['send_before_due'], $today);\n $v_day = date('Y-m-d', strtotime($gen_for_date ['year'] . \"-\" . $gen_for_date ['mon'] . \"-\" . $gen_for_date ['mday']));\n\n // Generate invoices\n $echo = \"\";\n $temp = $this->BL->orders->recurring_data($order_id, 0, \"SELECT\");\n $next_due_date = $temp['rec_next_date'];\n\n while ($next_due_date <= $v_day)\n {\n $echo .= \"Processing Order #$order_id - For invoice due date: $next_due_date\\n\";\n $echo .= $this->genInvoice($order_id);\n\n $temp = $this->BL->recurring_data($order_id, 0, \"SELECT\");\n if ($next_due_date == $temp['rec_next_date'])\n {\n $echo .= \"No change in due date, done processing.\\n\";\n break; // Break out if next due date wasn't updated.\n }\n $next_due_date = $temp['rec_next_date'];\n }\n\n return $echo;\n }", "public function printAccount()\n {\n return $this->hasOne('App\\PrintAccount');\n }", "public function __toString() {\n return theme('commerce_invoice_number', ['invoice_number' => $this, 'sanitize' => FALSE]);\n }", "public function getInvoiceUrl()\n {\n if (array_key_exists(\"invoiceUrl\", $this->_propDict)) {\n return $this->_propDict[\"invoiceUrl\"];\n } else {\n return null;\n }\n }", "public function print($id)\n {\n $invoice = $this->invoiceRepo->print($id);\n \n\n return view('assistant.invoices.print', compact('invoice'));\n }", "function getConvertQuoteToInvoice($focus, $quote_focus, $quoteid) {\n\tglobal $log,$current_user;\n\t$log->debug('> getConvertQuoteToInvoice '.get_class($focus).','.get_class($quote_focus).','.$quoteid);\n\t$fields = array(\n\t\t'bill_street','bill_city','bill_code','bill_pobox','bill_country','bill_state',\n\t\t'ship_street','ship_city','ship_code','ship_pobox','ship_country','ship_state'\n\t);\n\tforeach ($fields as $fieldname) {\n\t\tif (getFieldVisibilityPermission('Quotes', $current_user->id, $fieldname) != '0') {\n\t\t\t$quote_focus->column_fields[$fieldname] = '';\n\t\t}\n\t}\n\t$focus->column_fields['subject'] = isset($quote_focus->column_fields['subject']) ? $quote_focus->column_fields['subject'] : '';\n\t$focus->column_fields['account_id'] = isset($quote_focus->column_fields['account_id']) ? $quote_focus->column_fields['account_id'] : '';\n\t$focus->column_fields['contact_id'] = isset($quote_focus->column_fields['contact_id']) ? $quote_focus->column_fields['contact_id'] : '';\n\t$focus->column_fields['bill_street'] = isset($quote_focus->column_fields['bill_street']) ? $quote_focus->column_fields['bill_street'] : '';\n\t$focus->column_fields['ship_street'] = isset($quote_focus->column_fields['ship_street']) ? $quote_focus->column_fields['ship_street'] : '';\n\t$focus->column_fields['bill_city'] = isset($quote_focus->column_fields['bill_city']) ? $quote_focus->column_fields['bill_city'] : '';\n\t$focus->column_fields['ship_city'] = isset($quote_focus->column_fields['ship_city']) ? $quote_focus->column_fields['ship_city'] : '';\n\t$focus->column_fields['bill_state'] = isset($quote_focus->column_fields['bill_state']) ? $quote_focus->column_fields['bill_state'] : '';\n\t$focus->column_fields['ship_state'] = isset($quote_focus->column_fields['ship_state']) ? $quote_focus->column_fields['ship_state'] : '';\n\t$focus->column_fields['bill_code'] = isset($quote_focus->column_fields['bill_code']) ? $quote_focus->column_fields['bill_code'] : '';\n\t$focus->column_fields['ship_code'] = isset($quote_focus->column_fields['ship_code']) ? $quote_focus->column_fields['ship_code'] : '';\n\t$focus->column_fields['bill_country'] = isset($quote_focus->column_fields['bill_country']) ? $quote_focus->column_fields['bill_country'] : '';\n\t$focus->column_fields['ship_country'] = isset($quote_focus->column_fields['ship_country']) ? $quote_focus->column_fields['ship_country'] : '';\n\t$focus->column_fields['bill_pobox'] = isset($quote_focus->column_fields['bill_pobox']) ? $quote_focus->column_fields['bill_pobox'] : '';\n\t$focus->column_fields['ship_pobox'] = isset($quote_focus->column_fields['ship_pobox']) ? $quote_focus->column_fields['ship_pobox'] : '';\n\t$focus->column_fields['description'] = isset($quote_focus->column_fields['description']) ? $quote_focus->column_fields['description'] : '';\n\t$focus->column_fields['terms_conditions'] = isset($quote_focus->column_fields['terms_conditions']) ? $quote_focus->column_fields['terms_conditions'] : '';\n\t$focus->column_fields['currency_id'] = isset($quote_focus->column_fields['currency_id']) ? $quote_focus->column_fields['currency_id'] : '';\n\t$focus->column_fields['conversion_rate'] = isset($quote_focus->column_fields['conversion_rate']) ? $quote_focus->column_fields['conversion_rate'] : '';\n\tif (vtlib_isModuleActive('Warehouse')) {\n\t\t$focus->column_fields['whid'] = $quote_focus->column_fields['whid'];\n\t}\n\t$cbMapid = GlobalVariable::getVariable('BusinessMapping_Quotes2Invoice', cbMap::getMapIdByName('Quotes2Invoice'));\n\tif ($cbMapid) {\n\t\t$cbMap = cbMap::getMapByID($cbMapid);\n\t\t$focus->column_fields = $cbMap->Mapping($quote_focus->column_fields, $focus->column_fields);\n\t}\n\t$log->debug('< getConvertQuoteToInvoice');\n\treturn $focus;\n}", "public function show($invoice)\n {\n $order = Order::withTrashed()->whereInvoice($invoice)->first();\n return view('admin.orders.show', compact('order'));\n }", "public function getDetails($id)\n {\n $invoice = Invoice::find($id);\n $invoice->load('lines');\n $invoice->load('user');\n $invoice->load('documentosReferencia');\n\n return $invoice;\n }" ]
[ "0.77063274", "0.75562555", "0.7248353", "0.6983601", "0.67693925", "0.66512096", "0.66322625", "0.6613494", "0.6580078", "0.65775543", "0.6507405", "0.6497683", "0.64966655", "0.6470866", "0.64156246", "0.63896483", "0.63861483", "0.63789815", "0.63775706", "0.63391715", "0.6330024", "0.63158447", "0.6276072", "0.6270785", "0.6255078", "0.62495756", "0.6241467", "0.62321305", "0.62241185", "0.6217103", "0.6209334", "0.61975193", "0.6196897", "0.6172537", "0.6147057", "0.6139428", "0.6132458", "0.6104502", "0.6097531", "0.60972834", "0.6093785", "0.60887116", "0.60758024", "0.60758007", "0.60589397", "0.60587573", "0.60537744", "0.6052841", "0.6037705", "0.6023271", "0.6019382", "0.59970844", "0.5995972", "0.59896356", "0.598196", "0.59808064", "0.59792113", "0.59785324", "0.5975767", "0.5973053", "0.5969925", "0.59634554", "0.59497964", "0.5941851", "0.5930979", "0.59242845", "0.59237677", "0.5918326", "0.5912341", "0.59042436", "0.58982193", "0.5887176", "0.58815676", "0.58776647", "0.58769643", "0.5861626", "0.5854493", "0.5843893", "0.58208835", "0.5805878", "0.580358", "0.57997406", "0.5796478", "0.5781728", "0.5769759", "0.5766656", "0.5762077", "0.57583445", "0.57496506", "0.5748817", "0.5747647", "0.57446223", "0.5741302", "0.5725419", "0.5723722", "0.5715121", "0.57127684", "0.5712176", "0.57072186", "0.5704644" ]
0.6570188
10
Retrieve the application configuration array
public static function getAppConfig() { $curl = curl_init(); curl_setopt_array($curl, self::getCurlOptions("config")); return self::getApiResponse($curl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function lazy_get_config(): array\n\t{\n\t\treturn array_merge_recursive($this->configs['app'], $this->construct_options);\n\t}", "public function getConfiguration()\n {\n return self::$config_array;\n }", "public function getConfigArray() {}", "static public function getConfig() {\n return Application::$config;\n }", "function getAppConfig() {\n $appConfig = array(\n 'images' => array(\n 'thumbnail' => array (\n 'default_sizes' => array (600, 300, 150),\n 'cdn_prefix' => \"https://s3-us-west-2.amazonaws.com/marathimultiplex/images/thumbnail/\"\n ),\n 'banner' => array (\n 'default_sizes' => array(1000, 500),\n 'cdn_prefix' => \"https://s3-us-west-2.amazonaws.com/marathimultiplex/images/banner/\"\n )\n )\n );\n \n return $appConfig;\n }", "public function getConfig(): array;", "private function config()\n {\n return $this->app['config'];\n }", "private function config()\n {\n return $this->app['config'];\n }", "public function getConfiguration(): array;", "public function getConfiguration(): array;", "public function config(): array\n {\n return $this->config;\n }", "protected abstract static function getConfig(): array;", "public function getConfig(): array\n {\n return $this->_config;\n }", "protected function getConfig()\n {\n\n return $this->app['config']['manticore'];\n }", "function configuration()\r\n {\r\n global $db;\r\n $default_conf = $this->default_configuration();\r\n $conf = $db->getAssoc('\r\n select configuration_key, configuration_value from !\r\n where module_key = ?\r\n ', false, array(TABLE_CONFIGURATION, $this->module_key()));\r\n return array_merge($default_conf, $conf);\r\n }", "public function getAllConfigs()\r\n\t{\r\n\t\treturn $this->arrConfig;\r\n\t}", "function get_config_array();", "public function getConfigArray(): array\n {\n return [\n 'paths' => [\n 'migrations' => $this->getCorrectedPath(__DIR__ . '/_files/migrations'),\n ],\n 'environments' => [\n 'default_migration_table' => 'phinxlog',\n 'default_database' => 'production',\n 'production' => [\n 'adapter' => 'mysql',\n 'host' => MYSQL_DB_CONFIG['host'],\n 'name' => MYSQL_DB_CONFIG['name'],\n 'user' => MYSQL_DB_CONFIG['user'],\n 'pass' => MYSQL_DB_CONFIG['pass'],\n 'port' => MYSQL_DB_CONFIG['port']\n ]\n ]\n ];\n }", "private function appSettings()\n {\n $getModuleUrl = function() {\n return strtok($this->module->getUrl(''), '?');\n };\n $removeExtraSlashes = function($url) {\n return preg_replace(\"/(?<!https:)(?<!http:)\\/{2,}/\", \"/\", $url);\n };\n $project_templates = [\n 'template for single study' => $this->module->getUrl('data/EPU_single.xml'),\n 'template for multiple studies' => $this->module->getUrl('data/EPU_multiple.xml'),\n ];\n $data = [\n 'module_version' => $this->module->VERSION,\n 'module_prefix' => $this->module->PREFIX,\n 'module_url' => $getModuleUrl(),\n 'redcap_root_url' => APP_PATH_WEBROOT_FULL,\n 'redcap_relative_url' => APP_PATH_WEBROOT,\n 'redcap_full_url' => $removeExtraSlashes(APP_PATH_WEBROOT_FULL.APP_PATH_WEBROOT),\n 'project_templates' => $project_templates,\n ];\n return $data;\n }", "public function getConfiguration(): array\n {\n return $this->configuration;\n }", "public function getConfiguration(): array\n {\n }", "private static function getConfig() {\n\n\t\t$pathRoot = $_SERVER['DOCUMENT_ROOT'].substr($_SERVER['PHP_SELF'],0, strpos($_SERVER['PHP_SELF'],\"/\",1)).\"/config/\";\n\n\t\t$jsonConfig = file_get_contents($pathRoot.'config.json');\n\t\tself::$arrayConfig = json_decode($jsonConfig);\n\t}", "public function getConfig() : array {\n\t\treturn static::$options;\n\t}", "function getConfig()\n {\n return $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/config\");\n }", "public function getConfig ()\n {\n return $this->web->getConfig();\n }", "public function getConfig()\n {\n return $this['config'];\n }", "public function getConfig()\n {\n return $this->get('config');\n }", "public static function getConfig() {\n\t\tif (self::$temp_config !== null) {\n\t\t\treturn self::$temp_config;\n\t\t}\n\n\t\t$config_file = self::getConfigFile();\n\t\treturn (!file_exists($config_file)) ? array() : json_decode(file_get_contents($config_file), true);\n\t}", "public function getConfig() : array {\n return include __DIR__ . '/../config/module.config.php';\n }", "public function getAppConfig()\n {\n return [\n 'authentication' => [\n 'default_redirect_to' => '/',\n ],\n 'view_helpers' => [\n 'aliases' => [\n 'isUser' => Helper\\IsUser::class,\n 'sanitizeHtml' => Helper\\SanitizeHtml::class,\n ],\n 'factories' => [\n Helper\\IsUser::class => Helper\\IsUserFactory::class,\n Helper\\SanitizeHtml::class => InvokableFactory::class,\n ],\n ],\n ];\n }", "public function config()\n\t{\n\t\treturn $this->config;\n\t}", "public function config()\n\t{\n\t\treturn $this->config;\n\t}", "public static function getConfig()\n {\n return self::$config;\n }", "public static function getAll()\n {\n return self::$config;\n }", "public static function load_app_conf() {\n $app_config = include(CONFIGPATH.'app.conf.php');\n return $app_config;\n }", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig()\n {\n\n $config = [];\n\n $configFiles = [\n __DIR__ . '/config/module.config.php',\n __DIR__ . '/config/module.config.cache.php',\n __DIR__ . '/config/module.config.console.php',\n __DIR__ . '/config/module.config.forms.php',\n __DIR__ . '/config/module.config.imagestorage.php',\n __DIR__ . '/config/module.config.routes.php',\n ];\n\n // Merge all module config options\n foreach($configFiles as $configFile) {\n $config = \\Zend\\Stdlib\\ArrayUtils::merge($config, include $configFile);\n }\n\n return $config;\n }", "public function config()\n {\n return $this->config;\n }", "public function toArray()\n {\n \n return $this->getConfig();\n }", "public function config()\n {\n return $this->context->getConfig();\n }", "public static function allConf() {\n\t\t\treturn (array)Configure::read( self::$confKey );\n\t\t}", "private function getConfig()\n\t{\n\t\t$apiKey = $this->getApiKey();\n\t\t$configArray = array('api_key'=> $apiKey,'outputtype'=>Wp_WhitePages_Model_Api::API_OUTPUT_TYPE);\n\t\t\n\t\treturn $configArray;\n\t}", "public function getGlobalConfiguration();", "public function getConfig()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('config');\n }", "public function getConfigurarion()\n {\n return $this->configuration;\n }", "public function getConf() {\n return static::$conf;\n }", "public static function read()\n {\n return self::$config;\n }", "public function getConfig() \n {\n return $this->config;\n }", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getAll()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->_config;\n }", "public function getConfig()\n {\n return $this->_config;\n }", "public function getConfig() {}", "public function configAll() {\n \n return $this->config;\n \n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig() {\n \t\n \t// Return our configuration\n \treturn $this->aConfig;\n }", "public function getConfig() {\n return $this->_config;\n }", "public static function all()\n {\n return self::$config;\n }", "public function getConfig()\r\n {\r\n return Zend_Registry::get('config');\r\n }", "private static function _getConfigArray()\n\t{\n\t\treturn explode('.', self::_getConfig());\n\t}", "public function getConfig() {\r\n\r\n\t}", "protected function getFreshConfiguration()\n {\n $app = tap(Start::instance()->bootstrap()->getApplication(), function ($app) {\n $app->make(Kernel::class)->bootstrap();\n });\n\n return $app['config']->all();\n }", "abstract protected function configs(): array;", "public function getConfig(){\n\t\treturn $this->_config;\n\t}", "protected function getApplicationConfiguration( )\n {\n if( ! isset($this->_configuration) )\n {\n $this->_configuration = ProjectConfiguration::getApplicationConfiguration(\n $this->_application,\n 'test',\n true\n );\n }\n\n return $this->_configuration;\n }", "public function getConfiguration()\n {\n return $this->_config;\n }", "public function getConfig() {\r\n return $this->config;\r\n }", "protected function getKernelConfiguration()\n {\n return [];\n }", "static function getConfig() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_CONFIG);\n\t}", "final public function getAppConfig()\n {\n return $this->appConfig;\n }", "public function getConfig()\n {\n return $this->config;\n }", "public function getConfig(){\n return $this->config;\n }", "public function getConfigData()\n {\n return [\n 'alias' => $this->getAlias(),\n 'dbName' => $this->getName(),\n 'dbHost' => $this->getHost(),\n 'dbType' => $this->getType(),\n 'dbUser' => $this->getUserName(),\n 'dbPass' => $this->getPassword()\n ];\n }", "public function getConfig() {\n return $this->container->offsetGet('config');\n }", "function getConfig()\n {\n return $this->config;\n }", "public function getConfiguration() {\n\t\treturn $this->_getResponse(self::URL_CONFIGURATION);\n\t}" ]
[ "0.7990026", "0.79844946", "0.790076", "0.77063787", "0.7671714", "0.7628399", "0.76238364", "0.76238364", "0.76128036", "0.76128036", "0.75476295", "0.7547383", "0.75032234", "0.73868716", "0.73776174", "0.73676825", "0.7366576", "0.7349639", "0.73223424", "0.72953165", "0.72799766", "0.7274914", "0.7271699", "0.7250695", "0.72325885", "0.72217405", "0.71836406", "0.71546185", "0.71478003", "0.71433485", "0.7136445", "0.7136445", "0.7121127", "0.71183425", "0.71040857", "0.7091718", "0.7091718", "0.7091718", "0.7091718", "0.7091718", "0.7091718", "0.7091718", "0.7091718", "0.7087212", "0.7083548", "0.70831543", "0.7076738", "0.70746833", "0.70656776", "0.7061076", "0.7058212", "0.7057561", "0.70472014", "0.70445484", "0.7044079", "0.70320535", "0.70320535", "0.70320535", "0.70320535", "0.7025636", "0.7025137", "0.7025137", "0.7019771", "0.7015463", "0.70109195", "0.70109195", "0.70109195", "0.70109195", "0.70109195", "0.70109195", "0.70109195", "0.70109195", "0.70109195", "0.70109195", "0.70109195", "0.70109195", "0.70109195", "0.70109195", "0.70109195", "0.70087665", "0.7002432", "0.6987542", "0.6984826", "0.69784564", "0.69752955", "0.6973665", "0.69664794", "0.6965048", "0.6964762", "0.69584894", "0.694644", "0.69445646", "0.69435656", "0.6940436", "0.69390947", "0.6933135", "0.69316465", "0.6930074", "0.69198924", "0.69148386" ]
0.7100204
35
Retrieve the full path of the uploaded signature
public static function getSignaturePath($relativePath) { return Configs::URL . $relativePath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_signature_path($name) {\n return $this->get_file_path($name) . '.sign';\n }", "protected function getFullPathToUploadFile()\n {\n return $this->fullPathToUploadFile;\n }", "public function get_full_uploaded_file_path()\n {\n return $this->full_uploaded_file_path;\n }", "public function getRootUploadedPath()\n {\n return \"{$this->uploaded_filename}\";\n }", "public function getUploadedPath()\n {\n return $this->uploadedPath;\n }", "public function getSignature(): string\n {\n return $this->signature;\n }", "public function getSignature(): string\n {\n return $this->signature;\n }", "public function uploadPath();", "public function getSignature() : string\n {\n return $this->signature;\n }", "public static function getUploadPath()\n {\n return '';\n }", "public function getRelativeUploadPath(): string;", "public function uploadPath()\n {\n return call_user_func($this->savePath, $this->basePath);\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature();", "public function getPath(): string {\n $meta_data = stream_get_meta_data($this->file);\n return $meta_data[\"uri\"];\n }", "public function getSignature() {\n\t\treturn $this->signature;\n\t}", "public function uploadPath()\n {\n return config('quikservice.user.upload.profile-picture.path');\n }", "public function getUploadedFilePath()\n {\n return !empty($this->filepath) ? $this->filepath : \n (!empty($this->filename) ? (Yii::$app->params['uploadPath'] . $this->filename) : null);\n }", "private function getSignature(): string {\r\n return base64_encode(hash_hmac(\"sha1\", $this->buildSigningBase(), $this->buildSigningKey(), true));\r\n }", "function getSignature()\n {\n return $this->_signature;\n }", "public function getUploadPath()\n {\n $reflect = new ReflectionClass($this);\n return $this->uploadPath . $reflect->getShortName() . '/' . $this->id . '/';\n }", "protected function getUploadPath()\n {\n return 'uploads/achtergrondfotos';\n }", "public function getPath()\n {\n return 'bundles/jobhub/'.$this->getUploadDir().'/'.$this->path;\n }", "public function getUploadedPath()\n {\n return $this->getUploadsFolder() . '/' . $this->getRootUploadedPath();\n }", "public function getUploadedFileInfo();", "public function getFilePath();", "public function getFilePath();", "public function getFilePath();", "public function getFilePath();", "public function getOriginalFile() {}", "public function getOriginalFile() {}", "public function getFile()\n {\n return $this->getAbsolutePath($this->avatarName);\n }", "public function getFirstDocumentSignatureFilename()\n {\n if ($this->getDocumentSignaturesCount() > 0) {\n /** @var DocumentSignature $signature */\n $signature = $this->documentSignatures->first();\n\n return $signature->getDocument()->getFilename();\n }\n\n return;\n }", "public function getSignature(): string\n {\n return $this->getName();\n }", "function handle_upload_signature(){\r\n\t\t$config = array();\r\n\t\t$config['upload_path'] = './assets/image_uploads/signature';\r\n\t\t$config['allowed_types'] = 'gif|jpg|png';\r\n\r\n\t\t$this->load->library('upload', $config);\r\n\t\t$this->upload->initialize($config);\r\n\t\tif (isset($_FILES['signature']) && !empty($_FILES['signature']['name'])){\r\n\t\t\tif ($this->upload->do_upload('signature')){\r\n\t\t\t\t// set a $_POST value for 'image' that we can use later\r\n\t\t\t\t$upload_data = $this->upload->data();\r\n\t\t\t\t$_POST['old_signature'] = $upload_data['file_name'];\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\t// possibly do some clean up ... then throw an error\r\n\t\t\t\t$this->form_validation->set_message('handle_upload_signature', $this->upload->display_errors());\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function getPath(): string\n {\n return asset('storage/upload/'.$this->path);\n }", "public function storage_path();", "public static function getSignature()\n\t{\n\t\treturn MHTTPD::$info['signature'];\n\t}", "public function getFile()\n {\n $file = Input::file('report');\n $filename = $this->doSomethingLikeUpload($file);\n\n // Return it's location\n return $filename;\n }", "public function getSignature() {\n $headers = $this->getHeaders();\n foreach ($headers as $key => $value) {\n if (strtolower($key) === 'x-hub-signature') {\n return $value;\n }\n }\n return '';\n }", "public function path(): string\n {\n return realpath($this->file);\n }", "private function getFilePath() {\n\t\treturn $this->options['path'].'/'.md5($this->options['revision']).'/'.$this->path;\n\t}", "private function signature(){\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\t\t\t\n\t\t\t$first_name = $this->_request['first_name'];\t\t\n\t\t\t$last_name = $this->_request['last_name'];\t\n\t\t\t$data = $this->_request['data'];\n\t\t\t$current_datetime = new DateTime(); \n\t\t\t$sig_name = strtolower(preg_replace(\"/[\\W\\s+]/\",\"\", $first_name.'_'.$last_name.'_'.$current_datetime->format('Y-m-d_His')));\n\t\t\t$signature = base64_decode(str_replace(\"data:image/png;base64,\",\"\",$data));\n\t\t\t$result=file_put_contents(\"../signatures/\".$sig_name.\".png\",$signature);\t\n\t\t\tif($result){\n\t\t\t\t $this->response($sig_name.'.png', 200);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// If invalid inputs \"Bad Request\" status message and reason\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Signature Failed\");\n\t\t\t\t$this->response($this->json($error), 400);\t\t\t\t\t\t\n\t\t\t}\t\t\n\t\t}", "public function getUploadedsPath()\n {\n return $this->uploadedsPath;\n }", "public function get_path()\n\t\t{\n\t\t\tif ($this->path) {\n\t\t\t\treturn $this->path.'/'.$this->get_full_name();\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\t$hash = $this->hash();\n\t\t\t\t} catch(\\System\\Error\\File $e) {\n\t\t\t\t\t$hash = null;\n\t\t\t\t}\n\n\t\t\t\tif ($hash) {\n\t\t\t\t\treturn $this->get_path_hashed();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "public function getFilePath(): string;", "public function getFilePath(): string;", "private function getThumbFilepath() {\n\t\t$filename = $this->getThumbFilename();\n\t\t$filepath = $this->pathCache . $filename;\n\t\treturn($filepath);\n\t}", "public function path()\n {\n return $this->image->path;\n }", "public function signed_files_dir() {\n\t\t\treturn plugin_dir_path( __FILE__ ) . CFS_SIGNED_FILES_DIR;\n\t\t}", "function handle_upload_signature(){\r\n\t\t$config = array();\r\n\t\t$config['upload_path'] = './assets/image_uploads/signature';\r\n\t\t$config['allowed_types'] = 'gif|jpg|png';\r\n\t\t\r\n\t\t$this->load->library('upload', $config);\r\n\t\t$this->upload->initialize($config);\r\n\t\tif (isset($_FILES['bank_signature']) && !empty($_FILES['bank_signature']['name'])){\r\n\t\t\tif ($this->upload->do_upload('bank_signature')){\r\n\t\t\t\t// set a $_POST value for 'image' that we can use later\r\n\t\t\t\t$upload_data = $this->upload->data();\r\n\t\t\t\t$_POST['old_signature'] = $upload_data['file_name'];\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\t// possibly do some clean up ... then throw an error\r\n\t\t\t\t$this->form_validation->set_message('handle_upload_signature', $this->upload->display_errors());\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} \r\n\t}", "public function getFullFilePath()\n {\n return $this->basePath . $this->mediaFile->getFileName();\n }", "public function getScreenshotFilePath() {\n $uploadPath = $this->getScreenshotUploadPath();\n if (!is_dir($uploadPath)) {\n mkdir($uploadPath);\n }\n return $uploadPath . $this->id . \".\" . $this->screenshotFile->extension;\n }", "public function path()\n {\n return \"/storage/{$this->picture}\";\n }", "public function getFilePath()\n {\n return $this->file_path;\n }", "public function getUploadPath()\n\t{\n\t\t// return Yii::app()->params->upload.'/';\n\t\treturn Yii::app()->config->fixedValues['upload_path'];\n\t}", "public function getSignature()\n {\n $signString= sprintf(\"%s\\n%s\\n%s\\n%d\", $this->topic, $this->consumerId, $this->message->getMessageHandle(), $this->time);\n return base64_encode(hash_hmac('sha1', $signString, $this->getAuthorization()->getAccessSecret(), true));\n }", "public function getUploadedFile(){\n\t\t\t$pic = isset($this->EMP_IMG) ? $this->EMP_IMG : 'default.jpg';\n\t\t\treturn Yii::$app->params['HRD_EMP_UploadUrl'].$pic;\n\t\t}", "private function getSignature()\n\t{\n\t\t$string_to_sign = mb_convert_encoding(\n\t\t\t$this->http_verb . $this->uri . $this->timestamp . $this->nonce,\n\t\t\t'UTF-8'\n\t\t);\n\t\treturn base64_encode(\n\t\t\thash_hmac(\n\t\t\t\t'sha1',\n\t\t\t\t$string_to_sign,\n\t\t\t\t$this->secret,\n\t\t\t\ttrue\n\t\t\t)\n\t\t);\n\t}", "public function getAbsolutePath()\n {\n return $this->getUploadRootDir().'/'.$this->name;\n }", "public function getUploadUrl()\n {\n \treturn $this->getForm()->getUploadUrl();\n }", "public static function getSignature()\n {\n return ':originalData';\n }", "public function getFilepath();", "public function path() {\n return $this->filepath();\n }", "public function get_uploaded_file_url()\n {\n return App::getBaseURL() . $this->uploaded_file_path;\n }", "public\n function getOriginalPath()\n {\n return $this->originalsPath;\n }", "public function get_uploaded_file_name()\n {\n return $this->uploaded_filename;\n }", "public function getFilePath() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"filepath\", NULL);\n\t}", "public function getUploadPath()\n {\n return Yii::$app->params['upload_dir'] . DIRECTORY_SEPARATOR . $this->path;\n }", "public function getPictureFilePathWeb()\n {\n return null === $this->picturePath ? null : $this->getUploadDir() . '/' . $this->picturePath;\n }", "public function getFilePath() {\n return $this->path;\n }", "function getAuthSignature()\n {\n return $this->_authSignature;\n }", "private function get_upload_pres_path()\n { \n return \"uploads/presentations/\" . $this->id . \"/\"; \n }", "public function getAbsolutePath()\n {\n return null === $this->photoId\n ? null\n : $this->getUploadRootDir().'/'.$this->photoId;\n }", "public function getUploadedFileName() {\n\t \t return $this->uploadedFileName;\n\t }", "function _getFilePath($key){\n return $this->savePath .'/'. $this->prefix . md5($key);\n }", "public function getStoragePath(): string;", "public function getFile_path() {\n return $this->_file_path ? $this->_file_path : null;\n }", "public function getFilesPath() {\n\t\treturn $this->uploadPath;\n\t}", "public function getAbsolutePath()\n\t{\n\t\treturn ($this->filename === null) ? null : ($this->getUploadRootDir() . '/' . $this->filename);\n\t}", "public function getFilename() {}", "public function getPublic_Filename(){\n $filename = '';\n if ( $this->filename )\n $filename = str_replace(UPLOADS_DIR, '', $this->filename);\n return $filename;\n }", "public static function getSignature($path)\n {\n return Signature::create($path)->get();\n }", "private function upload_file_and_get_path(): string\n {\n $this->load->library('upload');\n $image_path = \"\";\n $config['upload_path'] = './static/images/';\n $config['allowed_types'] = 'jpg|jpeg|png|gif|pdf';\n $config['encrypt_name'] = TRUE;\n $this->upload->initialize($config);\n if ($this->upload->do_upload('image_path')) {\n $info = $this->upload->data();\n $image_path = $info['file_name'];\n // delete the images present in table or else with every new upload unwanted files will keep on increasing\n } else {\n echo $this->upload->display_errors();\n return \"\";\n }\n return $image_path;\n }", "public static function getFilePath(): string\n {\n return static::getInstance()->getFilePath();\n }", "public function getFile(): string\n {\n return $this->filePath;\n }", "public function getFileUploadLocation()\n {\n $config = $this->getServiceLocator()->get('config');\n return $config['module_config']['upload_location'];\n }", "public function getFilePath()\n {\n return $this->filePath;\n }", "private function filePath()\n {\n return $this->filePath;\n }", "public function basePathUpload() {\n\t\t\t\t\t\t$this->redirectToIndex();\n\t\t\t\t\t\t$pathupload = realpath ( APPLICATION_PATH . '/../public/data/uploads' );\n\t\t\t\t\t\treturn $pathupload;\n\t\t\t\t\t}", "protected function getUploadRootDir(): string\n {\n // documents should be saved\n return __DIR__.'/../../public/'.$this->getUploadDir();\n }", "public function getFilepath()\n {\n return $this->filepath;\n }", "public function getFilename() {\n return $this->path;\n }", "public function getPath(): string;", "public function getPath(): string;", "public function getPath(): string;", "public function getPath(): string;" ]
[ "0.7191419", "0.68589747", "0.67963266", "0.67591107", "0.675871", "0.67541957", "0.67541957", "0.66949755", "0.6667064", "0.6647249", "0.6627544", "0.6619361", "0.6608753", "0.6608753", "0.6608753", "0.6608753", "0.6608753", "0.66014403", "0.6600791", "0.6532506", "0.65267587", "0.65142804", "0.6495094", "0.6466977", "0.64411515", "0.6370983", "0.6362926", "0.6362247", "0.63561743", "0.63339514", "0.63339514", "0.63339514", "0.63339514", "0.6318614", "0.6318614", "0.6312831", "0.6309777", "0.6299292", "0.6293627", "0.62851214", "0.6267767", "0.62656176", "0.62635446", "0.6248561", "0.6243705", "0.6230852", "0.62216765", "0.6214153", "0.620854", "0.6207149", "0.6207149", "0.61961985", "0.61740255", "0.6165324", "0.61470467", "0.6146541", "0.6144829", "0.61355466", "0.61346346", "0.6107386", "0.61040694", "0.60808086", "0.60703075", "0.6067063", "0.60647315", "0.60554093", "0.60500526", "0.6046275", "0.60423344", "0.6039437", "0.60366064", "0.60356057", "0.6025846", "0.6023161", "0.6017139", "0.60132784", "0.60122454", "0.6010548", "0.5997815", "0.59918886", "0.5985275", "0.5981144", "0.5980856", "0.5966237", "0.5962532", "0.59602976", "0.59552586", "0.5951379", "0.5946955", "0.5946508", "0.59364283", "0.593427", "0.59332806", "0.5931135", "0.5925993", "0.59226227", "0.59210134", "0.5916214", "0.5916214", "0.5916214", "0.5916214" ]
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "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) { $confirmed = false; $comment = $request->comment; $approval = $request->approval; $documentId = $request->documentId; $id = Auth::id(); $date = date("Y-m-d H:i:s"); if($approval === 'on'){ $confirmed = true; } if($comment == null){ $comment = ""; } $review = Review::create(['user_id'=>$id, 'document_id'=>$documentId, 'comment'=>$comment, 'date'=>$date, 'confirmed'=>$confirmed]); //Find the people that already validated this document. $confirmedReviews = Review::where('document_id', $documentId)->where( function($query){$query->where('confirmed', true);})->get(); //Find people that should validate this document. $userdoc = DocumentUser::where('doc_id', $documentId)->get(); $doc = Document::findOrfail($documentId); if($confirmedReviews->count() === $userdoc->count()){ $doc->status = "REVIEWED"; }else{ $doc->status = "NOT_REVIEWED"; } $doc->save(); $msg = ""; if($confirmed){ $msg = Auth::user()->name." has approved your document"; }else{ $msg = Auth::user()->name." mentioned some changes he want you to include on this document"; } $note = Notification::create(['sender'=>Auth::id(), 'recipient'=>$doc->owner_id, 'doc_id'=>$doc->id, 'version'=>$doc->version, 'is_read'=>false, 'datetime'=>date('Y-m-d H:i:s'), 'message'=>$msg]); if($confirmed){ return redirect()->action('DocumentController@index'); } return redirect()->action('DocumentController@show', ['id'=>$doc->id]); }
{ "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) { //Hand it to me and i will take care of it }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
convert from degrees to radians
function haversine( $latitudeFrom, $longitudeFrom, $latitudeTo, $longitudeTo, $earthRadius = 3963.1676) { $latFrom = deg2rad($latitudeFrom); $lonFrom = deg2rad($longitudeFrom); $latTo = deg2rad($latitudeTo); $lonTo = deg2rad($longitudeTo); $latDelta = $latTo - $latFrom; $lonDelta = $lonTo - $lonFrom; $angle = 2. * asin(sqrt(pow(sin($latDelta / 2.), 2) + cos($latFrom) * cos($latTo) * pow(sin($lonDelta / 2.), 2))); return $angle * $earthRadius; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deg2rad2($deg) {\n return ($deg * pi() / 180.0);\n}", "function radToDeg() { # :: Num -> Float\n return new Num\\Float(rad2deg($this->value));\n }", "public function deg2rad() : self\n {\n return $this->map('deg2rad');\n }", "function degree_to_radian($input)\n {\n return $input / 180.0;\n }", "function rad2deg2($rad) {\n return ($rad * 180 / pi());\n}", "function convertRadians($Value) \r\n{\r\n return $Value * pi() / 180;\r\n}", "public function rad2deg() : self\n {\n return $this->map('rad2deg');\n }", "function todegree($rad) {\n $radvalue = explode(\"rad\", $rad);\n $degree = $radvalue[0] * 180 / pi();\n return $degree;\n}", "private function deg_to_rad( $deg ) {\n\n return( $deg * M_PI/180.0 );\n }", "abstract public function convertToCelsius(float $degrees): float;", "private function RiseSetAngle()\n\t{\n\t\t//var earthRad = 6371009; // in meters\n\t\t//var angle = DegreeMath.Acos(earthRad/(earthRad+ elv));\n\t\t$angle = 0.0347 * sqrt($this->_elv); // an approximation\n\t\treturn 0.833 + $angle;\n\t}", "public static function deg180()\n {\n return static::createWithDegree(Degree::DEG_180);\n }", "public function getAngle(): float\n {\n return $this->angle;\n }", "function degree_to_compass_point($d){\r\n $dp = $d + 11.25;\r\n $dp = $dp % 360;\r\n $dp = floor($dp / 22.5) ;\r\n $points = array(\"N\",\"NNE\",\"NE\",\"ENE\",\"E\",\"ESE\",\"SE\",\"SSE\",\"S\",\"SSW\",\"SW\",\"WSW\",\"W\",\"WNW\",\"NW\",\"NNW\",\"N\");\r\n $dir = $points[$dp];\r\n return $dir;\r\n }", "function fumseck_geocoord_DMS_to_DegDec($degrees, $minutes, $seconds, $direction) {\n\t\n\tif ( $direction == 'W' or $direction == 'S' ) {\n\t\t$sign = -1;\n\t} else {\n\t\t$sign = 1;\n\t}\n\t\n\treturn ( $sign * ( $degrees + ( ($minutes * 60 + $seconds) / 3600 ) ) );\n\t\n}", "public function toRadian($value)\n {\n return $value * (M_PI / 180);\n }", "public function fromDegreesToRadians(): Point {\n return new Point(\n rad2deg($this->x),\n rad2deg($this->y)\n );\n }", "public function test_dms_to_deg_1()\n {\n $dms = \"45d53'25\\\"W\";\n $dd = \\SimpleMappr\\Mappr::dmsToDeg($dms);\n $this->assertEquals($dd, -45.890277777778);\n }", "public function testDegreesToDirection() {\n $this->assertion($this->dl->degreesToDirection(100), \"E\", \"100 degrees should equal E.\");\n $this->assertion($this->dl->degreesToDirection(220), \"SW\", \"220 degrees should equal SW.\");\n $this->assertion($this->dl->degreesToDirection(340), \"NNW\", \"340 degrees should equal NNW.\");\n $this->assertion($this->dl->degreesToDirection(0), \"N\", \"0 degrees should equal N.\");\n }", "public function getDegree(): float\n {\n // tangent undefined at 90, 270 degrees\n if ($this->real === 0.0) {\n $degree = $this->imaginary > 0\n ? 90\n : ($this->imaginary < 0\n ? 270\n : 0);\n return $degree;\n } else {\n $tangent = abs($this->imaginary) / abs($this->real);\n $degree = rad2deg(atan($tangent));\n\n $quadrant1 = $this->real > 0 && $this->imaginary >= 0;\n $quadrant2 = $this->real < 0 && $this->imaginary >= 0;\n $quadrant3 = $this->real < 0 && $this->imaginary <= 0;\n $quadrant4 = $this->real > 0 && $this->imaginary <= 0;\n if ($quadrant1) {\n return $degree;\n }\n if ($quadrant2) {\n return 180 - $degree;\n }\n if ($quadrant3) {\n return 180 + $degree;\n }\n if ($quadrant4) {\n return 360 - $degree;\n }\n }\n }", "public function test_dms_to_deg_2()\n {\n $dms = \"45° 53' 25\\\" W\";\n $dd = \\SimpleMappr\\Mappr::dmsToDeg($dms);\n $this->assertEquals($dd, -45.890277777778);\n }", "function degToCompass($num) {\n if ($num < 0) $num += 360;\n if ($num >= 360) $num -= 360;\n\n $val = round (($num-11.25) / 22.5); // each segment is 22.5 degrees... place the number in the middle\n $arr = array (\"N\",\"NNE\",\"NE\",\"ENE\",\"E\",\"ESE\",\"SE\",\"SSE\",\"S\",\"SSW\",\"SW\",\"WSW\",\"W\",\"WNW\",\"NW\",\"NNW\");\n return $arr[abs($val)]; // use absolute values to ensure that 359 degrees translates as N, like 1 degree\n}", "public function test_dms_to_deg_4()\n {\n $dms = \"45d53'25\\\"E\";\n $dd = \\SimpleMappr\\Mappr::dmsToDeg($dms);\n $this->assertEquals($dd, 45.890277777778);\n }", "public function fromRadiansToDegrees(): Point {\n return new Point(\n rad2deg($this->x),\n rad2deg($this->y)\n );\n }", "function distanceDeg($mi) {\n $km = $mi * 0.621371;\n return (1 / 110.54) * $km;\n }", "public static function convertAngleValue($value)\n {\n if($value !== null && strpos($value, 'deg') !== false)\n {\n $value = (float) $value;\n $value = deg2rad($value);\n }\n \n return $value !== null ? ((float) $value) : null;\n }", "public function getAngle()\n {\n return $this->angle;\n }", "public function rotate($degrees);", "abstract public function convertFromCelsius(float $degrees): float;", "public function test_dms_to_deg_3()\n {\n $dms = \"45º 53' 25\\\" W\";\n $dd = \\SimpleMappr\\Mappr::dmsToDeg($dms);\n $this->assertEquals($dd, -45.890277777778);\n }", "public function rotate($degrees)\n {\n // Make the degrees an integer\n $degrees = (int) $degrees;\n\n if ($degrees > 180)\n {\n do\n {\n // Keep subtracting full circles until the degrees have normalized\n $degrees -= 360;\n }\n while($degrees > 180);\n }\n\n if ($degrees < -180)\n {\n do\n {\n // Keep adding full circles until the degrees have normalized\n $degrees += 360;\n }\n while($degrees < -180);\n }\n\n $this->_do_rotate($degrees);\n\n return $this;\n }", "public function getAngle()\n\t{\n\t\treturn $this->angle;\n\t}", "public static function deg90()\n {\n return static::createWithDegree(Degree::DEG_90);\n }", "public function test_dms_to_deg_7()\n {\n $dms = \"45d53'25\\\"S\";\n $dd = \\SimpleMappr\\Mappr::dmsToDeg($dms);\n $this->assertEquals($dd, -45.890277777778);\n }", "private function getRadianValue(Measurement $angle): float\n {\n return $angle->convertTo(UnitAngle::radians())->value();\n }", "function arcTan2(Num &$n) { # :: (Num, Num) -> Float\n return new Num\\Float(atan2($this->value, $n->value));\n }", "public static function radiusInDegrees($radius, $lat)\n {\n return ($radius * cos(deg2rad($lat))) / 52520.0;\n }", "public function test_dms_to_deg_5()\n {\n $dms = \"45º 53′ 25″ N\";\n $dd = \\SimpleMappr\\Mappr::dmsToDeg($dms);\n $this->assertEquals($dd, 45.890277777778);\n }", "public function getDegAttribute(): int\n {\n return $this->attributes['deg'];\n }", "public function test_dms_to_deg_6()\n {\n $dms = \"45d 53m 25 N\";\n $dd = \\SimpleMappr\\Mappr::dmsToDeg($dms);\n $this->assertEquals($dd, 45.890277777778);\n }", "public function getRotation() {}", "public function getRotation() {}", "public static function dmsToDeg($dms)\n {\n $dec = null;\n $dms = stripslashes($dms);\n $neg = (preg_match('/[SWO]/i', $dms) == 0) ? 1 : -1;\n $dms = preg_replace('/(^\\s?-)|(\\s?[NSEWO]\\s?)/i', \"\", $dms);\n $pattern = \"/(\\\\d*\\\\.?\\\\d+)(?:[°ºd: ]+)(\\\\d*\\\\.?\\\\d+)*(?:['m′: ])*(\\\\d*\\\\.?\\\\d+)*[\\\"s″ ]?/i\";\n $parts = preg_split($pattern, $dms, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);\n if (!$parts) {\n return;\n }\n // parts: 0 = degree, 1 = minutes, 2 = seconds\n $deg = isset($parts[0]) ? (float)$parts[0] : 0;\n $min = isset($parts[1]) ? (float)$parts[1] : 0;\n if (strpos($dms, \".\") > 1 && isset($parts[2])) {\n $min = (float)($parts[1] . '.' . $parts[2]);\n unset($parts[2]);\n }\n $sec = isset($parts[2]) ? (float)$parts[2] : 0;\n if ($min >= 0 && $min < 60 && $sec >= 0 && $sec < 60) {\n $dec = ($deg + ($min/60) + ($sec/3600))*$neg;\n }\n return $dec;\n }", "public function test_dms_to_deg_9()\n {\n $dms = \"45º 40′ 85″ N\";\n $dd = \\SimpleMappr\\Mappr::dmsToDeg($dms);\n $this->assertEquals($dd, null);\n }", "public function get_direction() {\r\n echo PHP_EOL;\r\n $this->action(\"checking current direction\");\r\n //can easily display the degree, and will, but also do cardinal\r\n\r\n //since North is direction's \"origin\", it occurs when $direction == 0\r\n if ($this->direction == 0) {\r\n $this->action(\"is facing true north\");\r\n }\r\n //other cases are easily handled as well\r\n else {\r\n $this->action(\"is facing {$this->direction}° clockwise from true north\");\r\n if ($this->direction < 90) {\r\n $this->action(\"is facing north east\");\r\n }\r\n //we rotate clockwise, this is east\r\n elseif ($this->direction == 90) {\r\n $this->action(\"is facing east\");\r\n }\r\n elseif ($this->direction < 180) {\r\n $this->action(\"is facing south east\");\r\n }\r\n elseif ($this->direction == 180) {\r\n $this->action(\"is facing south\");\r\n }\r\n elseif ($this->direction < 270) {\r\n $this->action(\"is facing south west\");\r\n }\r\n elseif ($this->direction == 270) {\r\n $this->action(\"is facing west\");\r\n }\r\n else {\r\n //direction must be greater than 270. 360 resets the direction\r\n // back to zero, so first if will catch it, thus we are facing NW\r\n $this->action(\"is facing north west\");\r\n }\r\n }\r\n }", "public function atan() : self\n {\n return $this->map('atan');\n }", "public static function deg270()\n {\n return static::createWithDegree(Degree::DEG_270);\n }", "function deg2dec($deg,$min,$sec){\n\treturn frac($deg)+(frac($min)/60)+(frac($sec)/3600);\n}", "public function get_degree()\n {\n\n return $this->db->get('ACADEMIC_DEGREES_NEXT')->result();\n\n }", "public function test_dms_to_deg_8()\n {\n $dms = \"45º 70′ 25″ N\";\n $dd = \\SimpleMappr\\Mappr::dmsToDeg($dms);\n $this->assertEquals($dd, null);\n }", "function normalizeLongitude($longitude)\n{\n if ($longitude > 360) {\n $longitude = fmod($longitude, 360);\n }\n\n if ($longitude > 180) {\n $longitude = 0 - fmod($longitude, 180);\n }\n\n if ($longitude < -180) {\n $longitude = 180 + fmod($longitude, 180);\n }\n return $longitude;\n}", "public function setAngle($radians)\n\t{\n\t\tif ( ! is_numeric($radians))\n\t\t{\n\t\t\tthrow new \\InvalidArgumentException('Angle radians must be a numeric.');\n\t\t}\n\t\t\n\t\t$this->angle = $radians;\n\t\t\n\t\treturn $this;\n\t}", "protected function calculateDelta($radDistance)\n {\n return asin(sin($radDistance) / cos($this->getLatitude(true)));\n }", "function DMStoDecimalDegrees ($Degrees, $Minutes, $Seconds)\n{\n $Decimal = abs($Degrees) + abs($Minutes) / 60 + abs($Seconds) / 3600;\n if ( $Degrees < 0 ) {\n $DecimalDegrees = -$Decimal;\n } elseif ($Minutes < 0) {\n $DecimalDegrees = -$Decimal;\n } elseif ($Seconds < 0) {\n $DecimalDegrees = -$Decimal;\n } else {\n $DecimalDegrees = $Decimal;\n }\n return $DecimalDegrees;\n}", "public function getAngle(Point $otherPoint, bool $inDegrees = true): float {\n // Get magnitudes\n $magnitudeThis = $this->getMagnitude();\n $magnitudeOtherPoint = $otherPoint->getMagnitude();\n\n // Computes angle\n $angleInRadians = acos(($this->x * $otherPoint->getX() + $this->y * $otherPoint->getY()) / ($magnitudeThis * $magnitudeOtherPoint));\n return $inDegrees ? rad2deg($angleInRadians) : $angleInRadians;\n }", "public function rotate($x, $y, $angle) {}", "public function rotate($x, $y, $angle) {}", "public function rotate($x, $y, $angle) {}", "private function _getRandomAngle() {\r\n\t\t// Choose which random angle to use.\r\n\t\treturn (rand(0, 1)) ? rand(0, 60) : rand(300, 360);\r\n\t}", "function getRhumbLineBearing($lat1, $lon1, $lat2, $lon2) {\n\t\t$dLon = deg2rad($lon2) - deg2rad($lon1);\n\n\t\t//difference in the phi of latitudinal coordinates\n\t\t$dPhi = log(tan(deg2rad($lat2) / 2 + pi() / 4) / tan(deg2rad($lat1) / 2 + pi() / 4));\n\n\t\t//we need to recalculate $dLon if it is greater than pi\n\t\tif (abs($dLon) > pi()) {\n\t\t\tif ($dLon > 0) {\n\t\t\t\t$dLon = (2 * pi() - $dLon) * -1;\n\t\t\t} else {\n\t\t\t\t$dLon = 2 * pi() + $dLon;\n\t\t\t}\n\t\t}\n\t\t//return the angle, normalized\n\t\treturn (rad2deg(atan2($dLon, $dPhi)) + 360) % 360;\n\t}", "public function startAngle($value) {\n return $this->setProperty('startAngle', $value);\n }", "public function startAngle($value) {\n return $this->setProperty('startAngle', $value);\n }", "public function startAngle($value) {\n return $this->setProperty('startAngle', $value);\n }", "public function rotate($degrees)\n {\n $this->rotation = (int)$degrees;\n return $this;\n }", "private function DMStoDEC($_deg, $_min, $_sec, $_ref)\n {\n\n $_array = explode('/', $_deg);\n $_deg = $_array[0] / $_array[1];\n $_array = explode('/', $_min);\n $_min = $_array[0] / $_array[1];\n $_array = explode('/', $_sec);\n $_sec = $_array[0] / $_array[1];\n\n $_coordinate = $_deg + ((($_min * 60) + ($_sec)) / 3600);\n /**\n * + + = North/East\n * + - = North/West\n * - - = South/West\n * - + = South/East\n */\n if ('s' === strtolower($_ref) || 'w' === strtolower($_ref)) {\n // Negatify the coordinate\n $_coordinate = 0 - $_coordinate;\n }\n\n return $_coordinate;\n }", "public static function atan ($v) {\n\t\treturn atan($v);\n\t}", "function calculateBearing($lat1,$long1,$lat2,$long2) {\r\n $y = $lat2-$lat1;\r\n $x = $long2-$long1;\r\n \r\n if($x==0 AND $y==0){ return 0; };\r\n return ($x < 0) ? rad2deg(atan2($x,$y))+360 : rad2deg(atan2($x,$y)); \r\n }", "private function calculateRadianLength(\n PositionInterface $start,\n PositionInterface $end\n ): float {\n return $this->calculateHaversineDistance(\n $this->getRadianValue($start->getLatitude()),\n $this->getRadianValue($end->getLatitude()),\n $this->getRadianValue(\n $start\n ->getLatitude()\n ->subtract($end->getLatitude())\n ),\n $this->getRadianValue(\n $start\n ->getLongitude()\n ->subtract($end->getLongitude())\n )\n );\n }", "public function setAngleDegrees($degree)\n\t{\n\t\tif ( ! is_numeric($degree))\n\t\t{\n\t\t\tthrow new \\InvalidArgumentException('Angle degrees must be a numeric.');\n\t\t}\n\t\t\n\t\t$this->setAngle($degree * pi() / 180);\n\t\t\n\t\treturn $this;\n\t}", "public static function atan($operand)\n {\n return atan($operand);\n }", "public function getDias180()\n {\n return $this->dias180;\n }", "function GetCenterFromDegrees($data)\n{\n if (!is_array($data)) return FALSE;\n\n $num_coords = count($data);\n\n $X = 0.0;\n $Y = 0.0;\n $Z = 0.0;\n\n foreach ($data as $coord)\n {\n $lat = $coord[0] * pi() / 180;\n $lon = $coord[1] * pi() / 180;\n\n $a = cos($lat) * cos($lon);\n $b = cos($lat) * sin($lon);\n $c = sin($lat);\n\n $X += $a;\n $Y += $b;\n $Z += $c;\n }\n\n $X /= $num_coords;\n $Y /= $num_coords;\n $Z /= $num_coords;\n\n $lon = atan2($Y, $X);\n $hyp = sqrt($X * $X + $Y * $Y);\n $lat = atan2($Z, $hyp);\n\n return array($lat * 180 / pi(), $lon * 180 / pi());\n}", "function distance( $latitudeFrom, $longitudeFrom, $latitudeTo, $longitudeTo, $earthRadius = 6371000){\n // convert from degrees to radians\n $latFrom = deg2rad($latitudeFrom);\n $lonFrom = deg2rad($longitudeFrom);\n $latTo = deg2rad($latitudeTo);\n $lonTo = deg2rad($longitudeTo);\n\n $latDelta = $latTo - $latFrom;\n $lonDelta = $lonTo - $lonFrom;\n\n $angle = 2 * asin(sqrt(pow(sin($latDelta / 2), 2) +\n cos($latFrom) * cos($latTo) * pow(sin($lonDelta / 2), 2)));\n return $angle * $earthRadius / 1000;\n }", "function getDegats() {\r\n\t\treturn $this->_degats;\r\n\t}", "public static function DMS2Decimal($degrees = 0, $minutes = 0, $seconds = 0, $direction = 'n') {\n //returns false on bad inputs, decimal on success\n\n //direction must be n, s, e or w, case-insensitive\n $d = strtolower($direction);\n $ok = array('n', 's', 'e', 'w');\n\n //degrees must be integer between 0 and 180\n if(!is_numeric($degrees) || $degrees < 0 || $degrees > 180) {\n $decimal = false;\n }\n //minutes must be integer or float between 0 and 59\n elseif(!is_numeric($minutes) || $minutes < 0 || $minutes > 59) {\n $decimal = false;\n }\n //seconds must be integer or float between 0 and 59\n elseif(!is_numeric($seconds) || $seconds < 0 || $seconds > 59) {\n $decimal = false;\n }\n elseif(!in_array($d, $ok)) {\n $decimal = false;\n }\n else {\n //inputs clean, calculate\n $decimal = $degrees + ($minutes / 60) + ($seconds / 3600);\n\n //reverse for south or west coordinates; north is assumed\n if($d == 's' || $d == 'w') {\n $decimal *= -1;\n }\n }\n\n return $decimal;\n }", "function rotate(&$tmp, $angle, $color=null) {\r\r\n\t\t\r\r\n\t\t// color ?\r\r\n\t\t//\r\r\n\t\tif (!is_a($color, 'Asido_Color')) {\r\r\n\t\t\t$color = new Asido_Color;\r\r\n\t\t\t$color->set(255, 255, 255);\r\r\n\t\t\t}\r\r\n\t\t\r\r\n\t\treturn $this->__rotate($tmp, $angle, $color);\r\r\n\t\t}", "function fiftyone_degrees_get_number($string, $start, $end) {\n $value = 0;\n for ($i = $end, $p = 0; $i >= $start; $i--, $p++) {\n $value += pow(10, $p) * ($string[$i] - ord('0'));\n }\n return $value;\n}", "function get_point_for_distance($long1,$lat1,$d,$angle){\n $R = 6378.14;\n\n # Degree to Radian\n $latitude1 = $lat1 * (M_PI/180);\n $longitude1 = $long1 * (M_PI/180);\n $brng = $angle * (M_PI/180);\n\n $latitude2 = asin(sin($latitude1)*cos($d/$R) + cos($latitude1)*sin($d/$R)*cos($brng));\n $longitude2 = $longitude1 + atan2(sin($brng)*sin($d/$R)*cos($latitude1),cos($d/$R)-sin($latitude1)*sin($latitude2));\n\n # back to degrees\n $latitude2 = $latitude2 * (180/M_PI);\n $longitude2 = $longitude2 * (180/M_PI);\n\n # 6 decimal for Leaflet and other system compatibility\n $lat2 = round ($latitude2,6);\n $long2 = round ($longitude2,6);\n\n // Push in array and get back\n $tab[0] = $long2;\n $tab[1] = $lat2;\n return $tab;\n}", "function _convert_lat_lng_to_decimal($lat, $lng)\n\t{\n\t\t// get direction and assign correct sign to be used in next operation\n\t\tif (substr($lat, -1) == 'N') $lat_dir = 1;\n\t\telse $lat_dir = -1;\n\t\t\n\t\tif (substr($lng, -1) == 'E') $lng_dir = 1;\n\t\telse $lng_dir = -1;\n\t\t\n\t\t// convert latitude\n\t\t$degrees = (float) substr($lat, 0, 2);\n\t\t$minutes = (float) substr($lat, 2, 9);\n\t\t$latitude_decimal = $lat_dir * $degrees + $lat_dir * ($minutes/60);\n\t\t\n\t\t// convert longitutde\n\t\t$degrees = (float) substr($lng, 0, 3);\n\t\t$minutes = (float) substr($lng, 3, 10);\n\t\t$longitude_decimal = $lng_dir * $degrees + $lng_dir * ($minutes/60);\n\t\t\n\t\treturn array($latitude_decimal, $longitude_decimal);\n\t}", "function Rotate($x,$y) {\n if( $this->a == 0 || $this->a == 360 ) {\n return array($x + $this->transx, $y + $this->transy );\n }\n else {\n $x1=round($this->m[0][0]*$x + $this->m[0][1]*$y,1) + $this->m[0][2] + $this->transx;\n $y1=round($this->m[1][0]*$x + $this->m[1][1]*$y,1) + $this->m[1][2] + $this->transy;\n return array($x1,$y1);\n }\n }", "function setRotation( $r ) {\n\n // only 0,90,180,270\n if ( $r > 270 ) return;\n if ( $r % 90 != 0 ) return;\n\n $this->rotate = $r;\n $this->vertical = ( $r == 90 or $r == 270 );\n}", "public function getDirection() {\n\n\t\treturn trim(\n\t\t\tfile_get_contents(\n\t\t\tself::PINDIR.'/gpio'.$this->iPinNumber.'/direction'\n\t\t\t)\n\t\t);\n\t}", "protected function assureCoordinate($coordinate)\n {\n // canary, if already numeric our work here is done...\n if(is_numeric($coordinate)){ return (float)$coordinate; }//if\n // canary, if we have a string then divide up into degrees minutes seconds array\n if(is_string($coordinate)){\n $coordinate = explode(' ',str_replace(array('°','\"',\"'\"),'',$coordinate));\n }//if\n // canary, $coordinate needs to be an array by the time it gets here...\n if(!is_array($coordinate)){\n throw new UnexpectedValueException(\n sprintf('$coordinate was not a string or array, it was a %s',gettype($coordinate))\n );\n }//if\n \n // break the array into degrees minutes and seconds...\n $degrees = (float)$coordinate[0];\n $minutes = isset($coordinate[1]) ? (float)$coordinate[1] : 0.0; // 1/60th of a degree\n $seconds = isset($coordinate[2]) ? (float)$coordinate[2] : 0.0; // 1/60th of a minute\n \n return $degrees + ($minutes * (1/60.0)) + ($seconds * (1/3600));\n \n }", "public function rotation($value) {\n return $this->setProperty('rotation', $value);\n }", "public function rotate()\n\t{\n\t\t// Allowed rotation values\n\t\t$degs = array(90, 180, 270, 'vrt', 'hor');\n\n\t\tif ($this->rotation_angle === '' OR ! in_array($this->rotation_angle, $degs))\n\t\t{\n\t\t\t$this->set_error('imglib_rotation_angle_required');\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Reassign the width and height\n\t\tif ($this->rotation_angle === 90 OR $this->rotation_angle === 270)\n\t\t{\n\t\t\t$this->width\t= $this->orig_height;\n\t\t\t$this->height\t= $this->orig_width;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->width\t= $this->orig_width;\n\t\t\t$this->height\t= $this->orig_height;\n\t\t}\n\n\t\t// Choose resizing function\n\t\tif ($this->image_library === 'imagemagick' OR $this->image_library === 'netpbm')\n\t\t{\n\t\t\t$protocol = 'image_process_'.$this->image_library;\n\t\t\treturn $this->$protocol('rotate');\n\t\t}\n\n\t\treturn ($this->rotation_angle === 'hor' OR $this->rotation_angle === 'vrt')\n\t\t\t? $this->image_mirror_gd()\n\t\t\t: $this->image_rotate_gd();\n\t}", "function distance($lat1, $lon1, $lat2, $lon2)\n{\n if (($lat1 == $lat2) && ($lon1 == $lon2)) {\n return 0;\n } else {\n $theta = $lon1 - $lon2;\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist) * 60 * 1.853159616;\n return $dist;\n }\n}", "private function days_to_years( $days ) {\n\t\treturn floor( $days / 365 );\n\t}", "public function acos() : self\n {\n return $this->map('acos');\n }", "public function rotate()\n {\n // not possible in php?\n }", "public static function byAngle(...$degree)\n {\n return static::createWithDegree(...$degree);\n }", "public function getDegree() {\n require_once(\"Degree.php\");\n return new Degree($this->fenixEdu, $this->fenixEdu->getDegree($this->data->degree->id));\n }", "function rotation($angle)\n\t{\n\t\t$this->rotation = $angle;\n\t\treturn $this;\n\t}", "public function getOrientation()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ORIENTATION, $payload);\n\n $payload = unpack('v1roll/v1pitch/v1yaw', $data);\n\n $result['roll'] = IPConnection::fixUnpackedInt16($payload['roll']);\n $result['pitch'] = IPConnection::fixUnpackedInt16($payload['pitch']);\n $result['yaw'] = IPConnection::fixUnpackedInt16($payload['yaw']);\n\n return $result;\n }", "public function cos() : self\n {\n return $this->map('cos');\n }", "function haversine($latitudeFrom, $longitudeFrom, $latitudeTo, $longitudeTo, $earthRadius = 3963){\n // convert from degrees to radians\n $latFrom = deg2rad($latitudeFrom);\n $lonFrom = deg2rad($longitudeFrom);\n $latTo = deg2rad($latitudeTo);\n $lonTo = deg2rad($longitudeTo);\n \n $latDelta = $latTo - $latFrom;\n $lonDelta = $lonTo - $lonFrom;\n \n $angle = 2 * asin(sqrt(pow(sin($latDelta / 2), 2) +\n cos($latFrom) * cos($latTo) * pow(sin($lonDelta / 2), 2)));\n return $angle * $earthRadius;\n}", "public static function geoBearingRhumb(Application\\Model\\Waypoint_Coordinate $c1, Application\\Model\\Waypoint_Coordinate $c2) {\n // Perform the math & store the values in radians.\n $delta = log( tan(($c2->lat->getAsRad() / 2) + (M_PI / 4))\n / tan(($c1->lat->getAsRad() / 2) + (M_PI / 4)) );\n $rads = atan2( ($c2->lon->getAsRad() - $c1->lon->getAsRad() ), $delta);\n\n // Convert this back to degrees to use with a compass\n $degrees = Application\\Model\\Waypoint_Coordinate_DMS::convRadtoDeg($rads);\n\n // If negative subtract it from 360 to get the bearing we are used to.\n $degrees = ($degrees < 0) ? 360 + $degrees : $degrees;\n\n return $degrees;\n }", "public function rotateBy($rotation) {}", "function distance(\n $latitudeFrom, $longitudeFrom, $latitudeTo, $longitudeTo, $earthRadius = 6371000)\n{\n $latFrom = deg2rad($latitudeFrom);\n $lonFrom = deg2rad($longitudeFrom);\n $latTo = deg2rad($latitudeTo);\n $lonTo = deg2rad($longitudeTo);\n\n $latDelta = $latTo - $latFrom;\n $lonDelta = $lonTo - $lonFrom;\n\n $angle = 2 * asin(sqrt(pow(sin($latDelta / 2), 2) +\n cos($latFrom) * cos($latTo) * pow(sin($lonDelta / 2), 2)));\n return $angle * $earthRadius;\n}", "public function rotateRight();", "public function unify()\n {\n return $this->convertTo(\n [\n 'length' => 'px',\n 'duration' => 's',\n 'angle' => 'rad',\n ]\n );\n }", "function fGetBearing($origin, $destination){\n\t\tif ( 0 == strcmp($origin,$destination)) {\n\t\t\treturn 0;\n\t\t}\n\t\t$lat1 = deg2rad($origin->y);\n\t\t$lat2 = deg2rad($destination->y);\n\t\t$dLon = deg2rad($destination->x - $origin->x);\n\t\t$y = sin($dLon) * cos($lat2);\n\t\t$x = cos($lat1) * sin($lat2) - sin($lat1) * cos($lat2) * cos($dLon);\n\t\treturn (rad2deg(atan2($y, $x)) +360 ) % 360;\n\t}" ]
[ "0.7715345", "0.7611772", "0.7577923", "0.751843", "0.7498324", "0.7478634", "0.74290746", "0.7303316", "0.6922596", "0.63312334", "0.62803537", "0.61912686", "0.60792875", "0.60720044", "0.6032732", "0.6026371", "0.60155135", "0.5968277", "0.59225774", "0.5921811", "0.59119", "0.5903965", "0.59000605", "0.5873369", "0.5868847", "0.58557844", "0.5842623", "0.5813133", "0.5807715", "0.57583404", "0.57482", "0.5738719", "0.5616107", "0.560614", "0.560018", "0.5567363", "0.55282956", "0.5480986", "0.54667777", "0.5418682", "0.540803", "0.54076934", "0.5341652", "0.53352267", "0.5226638", "0.5224535", "0.5216731", "0.51841867", "0.50262654", "0.50018895", "0.4988823", "0.49777904", "0.4975505", "0.49349523", "0.48800093", "0.4877007", "0.4877007", "0.4877007", "0.48236674", "0.47696137", "0.47033954", "0.47033954", "0.47033954", "0.46872008", "0.46817383", "0.4677793", "0.46103686", "0.4604445", "0.4589367", "0.4579853", "0.45278394", "0.44963264", "0.44878745", "0.4479492", "0.44578478", "0.4454477", "0.4443348", "0.44405672", "0.4428423", "0.44253123", "0.44243273", "0.441836", "0.44082588", "0.43964562", "0.43868884", "0.43737307", "0.43732813", "0.43580672", "0.43523258", "0.43396038", "0.43281344", "0.4327585", "0.43179405", "0.43126258", "0.43032715", "0.42995158", "0.42889023", "0.42701623", "0.42681566", "0.42646402", "0.42348787" ]
0.0
-1
Generate a sym link. The salt is important in order to remove the deterministic side of the address.
private function create(Photo $photo, string $sizeVariant, string $salt) { // in case of video and raw we always need to use the field 'thumbUrl' for anything which is not the original size $originalFieldName = ($sizeVariant != Photo::VARIANT_ORIGINAL && ($photo->isVideo() || $photo->type == 'raw')) ? self::VARIANT_2_ORIGINAL_FILENAME_FIELD[Photo::VARIANT_THUMB] : self::VARIANT_2_ORIGINAL_FILENAME_FIELD[$sizeVariant]; $originalFileName = (substr($sizeVariant, -2, 2) == '2x') ? Helpers::ex2x($photo->$originalFieldName) : $photo->$originalFieldName; if ($photo->type == 'raw' && $sizeVariant == Photo::VARIANT_ORIGINAL) { $originalPath = Storage::path('raw/' . $originalFileName); } else { $originalPath = Storage::path(Photo::VARIANT_2_PATH_PREFIX[$sizeVariant] . '/' . $originalFileName); } $extension = Helpers::getExtension($originalPath); $symFilename = hash('sha256', $salt . '|' . $originalPath) . $extension; $symPath = Storage::drive('symbolic')->path($symFilename); try { // in theory we should be safe... symlink($originalPath, $symPath); } catch (Exception $exception) { unlink($symPath); symlink($originalPath, $symPath); } $this->{self::VARIANT_2_SYM_PATH_FIELD[$sizeVariant]} = $symFilename; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function generateShareLink()\n {\n $strong = true;\n $appearance = 'sha256';\n return hash($appearance, openssl_random_pseudo_bytes(128, $strong), false);\n }", "public function CreatePublicSymLink()\n {\n $filemanager = $this->getFileManager();\n\n $fullPath = PATH_OUTBOX.'/public/'.$this->sqlData['cms_document_tree_id'].'/';\n if (!is_dir($fullPath)) {\n $filemanager->mkdir($fullPath, 0777, true);\n }\n $targetFile = $this->GetRealPath();\n\n $sSEOTargetFileName = $this->GetTargetFileName();\n if (!$this->localFileExists()) {\n // trigger error only in live mode because sometimes files are missing in the development environment\n trigger_error('Error: Download source ['.$targetFile.'] does not exist, or is not readable!', E_USER_NOTICE);\n } else {\n $filemanager->unlink($fullPath.'/'.$sSEOTargetFileName);\n if (!file_exists($fullPath.'/'.$sSEOTargetFileName)) {\n if ($filemanager->symlink($targetFile, $fullPath.'/'.$sSEOTargetFileName)) {\n $this->fileURL = URL_OUTBOX.'/public/'.$this->sqlData['cms_document_tree_id'].'/'.$sSEOTargetFileName;\n } else {\n trigger_error('Error: Unable to create SymLink ['.$targetFile.'] -> ['.$fullPath.'/'.$sSEOTargetFileName.']', E_USER_WARNING);\n }\n }\n }\n }", "public function includeSymboles() {\n\n for ($i=0; $i <$this->symbolPortion ; $i++) {\n $this->password = $this->password.substr($this->symboles, rand(0, strlen($this->symboles) - 1), 1);\n }\n }", "function generate_link_hash($link_name)\n{\n\tglobal $user;\n\n\tif (!isset($user->data[\"hash_$link_name\"]))\n\t{\n\t\t$user->data[\"hash_$link_name\"] = substr(sha1($user->data['user_form_salt'] . $link_name), 0, 8);\n\t}\n\n\treturn $user->data[\"hash_$link_name\"];\n}", "protected function generateLinkID() {\n $s = \"\";\n do {\n switch (getConfig(\"link_style\")) {\n case LINK_UUID_V4:\n // UUID version 4.\n $uuid = openssl_random_pseudo_bytes(16);\n $uuid[6] = chr(ord($uuid[6]) & 0x0f | 0x40);\n $uuid[8] = chr(ord($uuid[8]) & 0x3f | 0x80);\n $s = vsprintf(\"%s%s-%s-%s-%s-%s%s%s\", str_split(bin2hex($uuid), 4));\n break;\n case LINK_16_HEX:\n // 16-char (8-byte) hexadecimal string.\n $s = bin2hex(openssl_random_pseudo_bytes(8));\n break;\n case LINK_16_LOWER_CASE:\n // 16-char lower-case alphanumeric string.\n $alpha = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n for ($i = 0; $i < 16; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_16_MIXED_CASE:\n // 16-char mixed-case alphanumeric string.\n // '0', 'O', 'l' and 'I' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n for ($i = 0; $i < 16; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_16_UPPER_CASE:\n // 16-char upper-case alphanumeric string.\n // '0' and 'O' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHIJKLMNPQRSTUVWXYZ\";\n for ($i = 0; $i < 16; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_32_HEX:\n // 32-char (16-byte) hexadecimal string.\n $s = bin2hex(openssl_random_pseudo_bytes(16));\n break;\n case LINK_32_LOWER_CASE:\n // 32-char lower-case alphanumeric string.\n $alpha = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n for ($i = 0; $i < 32; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_32_MIXED_CASE:\n // 32-char mixed-case alphanumeric string.\n // '0', 'O', 'l' and 'I' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n for ($i = 0; $i < 32; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_32_UPPER_CASE:\n // 32-char upper-case alphanumeric string.\n // '0' and 'O' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHIJKLMNPQRSTUVWXYZ\";\n for ($i = 0; $i < 32; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n break;\n case LINK_4_PLUS_4_LOWER_CASE:\n // 4+4-char lower-case alphanumeric string.\n $alpha = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n for ($i = 0; $i < 8; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n $s = substr($s, 0, 4).\"-\".substr($s, -4);\n break;\n case LINK_4_PLUS_4_MIXED_CASE:\n // 4+4-char mixed-case alphanumeric string.\n // '0', 'O', 'l' and 'I' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n for ($i = 0; $i < 8; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n $s = substr($s, 0, 4).\"-\".substr($s, -4);\n break;\n case LINK_4_PLUS_4_UPPER_CASE:\n default:\n // 4+4-char upper-case alphanumeric string.\n // '0' and 'O' not included because of visual similarity.\n $alpha = \"123456789ABCDEFGHIJKLMNPQRSTUVWXYZ\";\n for ($i = 0; $i < 8; $i++) $s .= $alpha[random_int(0, strlen($alpha)-1)];\n $s = substr($s, 0, 4).\"-\".substr($s, -4);\n break;\n }\n } while ($this->memcache->get(PREFIX_LOCDATA.$s) !== false);\n return $s;\n }", "function generate_secure_link($shared_secret, $duration, $url) {\n $timestamp = time() + $duration;\n $hash = md5($shared_secret . $timestamp);\n $link = $url . '?s=' . $hash . '&t=' . $timestamp;\n return $link;\n}", "private static function __generateHashString($cost, $salt) {\n\t\treturn sprintf('$%s$%02d$%s$', self::$_saltPrefix, $cost, $salt);\n\t}", "function linkGen($syte, $login, $pass)\r\n {\r\n \t$sites = ['mail' => \"https://auth.mail.ru/cgi-bin/auth?Login=$login&Password=$pass&Domain=$domain\"];\r\n \t\r\n \tforeach ($sites as $site => $authLink) {\r\n\t if ($site == 'mail') {\r\n\t \t// crunch!! REMOVE\r\n\t if (strpos($login, '@') !== False) {\r\n\t list($login, $domain) = explode('@', $login);\r\n\t } else {\r\n\t $domain = 'mail.ru';\r\n\t }\r\n\t $authLink = \"https://auth.mail.ru/cgi-bin/auth?Login=$login&Password=$pass&Domain=$domain\";\r\n\t return \"<a style=\\\"cursor: pointer;\\\" onclick=\\\"return openEx('$authLink');\\\">$syte</a>\";\r\n \t}\r\n \t}\r\n\r\n\r\n return NULL;\r\n }", "public static function generateHashString($cost, $salt)\n {return sprintf('$%s$%02d$%s$', self::$saltPrefix, $cost, $salt);}", "public static function regenerateSalt()\n\t{\n\t\treturn PzPHP_Helper_String::createCode(mt_rand(40,45), PzPHP_Helper_String::ALPHANUMERIC_PLUS);\n\t}", "private function generateSalt(): string\n {\n return base64_encode(random_bytes(16));\n }", "private function generateSalt(): string\n {\n return base64_encode(random_bytes(16));\n }", "function df_store_url_link($s = null) {return df_store_url($s, S::URL_TYPE_LINK);}", "public static function passTheSalt(): string\n {\n return (string) bin2hex(openssl_random_pseudo_bytes(16));\n }", "protected function linkcreator() {\n $chars = str_split(\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-\", 1);shuffle($chars);\n return join(\"\", array_slice($chars, 0, 33));\n }", "private function generateSalt()\n {\n return str_random(16);\n }", "public static function makeShortLink()\n {\n $valid = 'abcdefghijklmnopqrstuwvxyzABCDEFGHIJKLMNOPQRSTUWVXYZ0123456789';\n\n // it's possible that the resulting\n // string will already be in the system.\n // If so, try again\n while(true) {\n $string = '';\n $hex = uniqid();\n\n // uniqid is 13 characters. we need an even\n // number, and characters on the right are\n // more random, so start at the second character\n for ($i = 1; $i < strlen($hex); $i+=2) {\n $decimal = hexdec($hex[$i].$hex[$i+1]);\n $alpha = chr($decimal);\n\n // force it to an alphanumeric character\n $string .= (strpos($valid, $alpha) === false)\n ? $valid[$decimal % strlen($valid)]\n : $alpha;\n\n if(strpos($valid, $alpha) !== FALSE)\n $string .= $alpha;\n }\n\n if (! self::find($string))\n return $string;\n }\n }", "function generateFixedSalt16Byte()\r\n{\r\n return \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\";\r\n}", "public function createReferralLink() : string\n {\n $url = $this->storeManager->getStore()->getBaseUrl(UrlInterface::URL_TYPE_WEB);\n $encrypt = urlencode($this->encryptor->encrypt($this->customerSession->getCustomerId()));\n $link = $url . \"?ref=\" . $encrypt;\n return $link;\n }", "public static function generateSymmetricKey($password, $length)\n {\n $symkey = '';\n $sequence = 0;\n while (strlen($symkey) < $length) {\n $temp = pack('Na*', $sequence++, $password);\n $symkey.= Hex::decode(sha1($temp));\n }\n return substr($symkey, 0, $length);\n }", "public static function generateSalt() {\n $salt = '$2a$13$';\n $salt = $salt . md5(mt_rand());\n return $salt;\n }", "private function generateSalt() {\n $salt = base64_encode(pack(\"H*\", md5(microtime())));\n \n return substr($salt, 0, $this->saltLng);\n }", "static public function genStdOrderPass()\n {\n\n $chrs = \"ABCDEFGHJKLMNPQRSTUVWXYZ\";\n $chrs .= \"abcdefghijkmnopqrstuvwxyz\";\n $chrs .= \"123456789\";\n return 'p_' . vmCrypt::getToken(VmConfig::get('randOrderPw', 8), $chrs);\n }", "private function GenSalt()\n {\n $chars = array_merge(range('a','z'), range('A','Z'), range(0, 9));\n $max = count($chars) - 1;\n $str = \"\";\n $length = 22;\n \n while($length--) {\n shuffle($chars);\n $rand = mt_rand(0, $max);\n $str .= $chars[$rand];\n }\n return $str . '$';\n }", "public function isSymLink()\n {\n return ( $this->fileStructure->type == self::IS_SYMBOLIC_LINK );\n }", "function generateSaltPassword () {\n\treturn base64_encode(random_bytes(12));\n}", "function generateFixedSalt32Byte()\r\n{\r\n return \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\";\r\n}", "function generateRandomSymbol() {\n $r = mt_rand(0, 3);\n switch($r) {\n case 0: $i = mt_rand(33, 47); break;\n case 1: $i = mt_rand(58, 64); break;\n case 2: $i = mt_rand(91, 96); break;\n case 3: $i = mt_rand(123, 126); break;\n }\n return chr($i);\n }", "public static function make_salt()\n {\n\n \t$chars = str_split('0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz');\n \n \t\t$newSalt = '';\n \t\tfor ($i = 0; $i < 16; $i++) \n \t\t{\n \t\t\t$newSalt .= $chars[rand(0, count($chars) - 1)];\n \t\t}\n\n \t\treturn $newSalt;\n }", "function generateHash($plainText, $salt = null) // used in confirm-password.php, class.newuser.php, class.user.php, user-login.php, user-update-account.php\r\n\r\n{\r\n\r\n\tif ($salt === null)\r\n\r\n\t{\r\n\r\n\t\t$salt = substr(md5(uniqid(rand(), true)), 0, 25);\r\n\r\n\t}\r\n\r\n\telse\r\n\r\n\t{\r\n\r\n\t\t$salt = substr($salt, 0, 25);\r\n\r\n\t}\r\n\r\n\t\r\n\r\n\treturn $salt . sha1($salt . $plainText);\r\n\r\n}", "public function generateAuthKey()\n {\n $this->salt = OldDi::GetString(8);\n }", "public function GenerateKey()\n // Generates a 22 character salt.\n {\n $this->_SALT = \"$\";\n for($i = 0; $i < 22; $i ++)\n $this->_SALT = $this->_SALT . $this->_CHARSET[mt_rand(0, 63)];\n return $this->_SALT;\n }", "public function generate_hash($nick, $pass, $environment = true) {\n $string = $nick.$pass;\n\n // Link the hash to the user's environment\n if ($environment) {\n $string .= $_SERVER['HTTP_USER_AGENT'].$_SERVER['HTTP_ACCEPT_LANGUAGE'].\"*\";\n }\n\n return sha1($string);\n }", "private function generateKey(): string\n\t{\n\t\t// `+` and `/` are replaced by `-` and `_`, resp.\n\t\t// The other characters (a-z, A-Z, 0-9) are legal within an URL.\n\t\t// As the number of bytes is divisible by 3, no trailing `=` occurs.\n\t\treturn strtr(base64_encode(random_bytes(3 * self::RANDOM_ID_LENGTH / 4)), '+/', '-_');\n\t}", "private function _generateActivationKey()\n {\n $key = Utils::getRandomKey(32);\n return $key;\n }", "private function genSalt() {\r\n $random = 0;\r\n $rand64 = \"\";\r\n $salt = \"\";\r\n $random = rand(); // Seeded via initialize()\r\n // Crypt(3) can only handle A-Z a-z ./\r\n $rand64 = \"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\r\n $salt = substr( $rand64, $random % 64, 1 ) . substr( $rand64, ($random / 64) % 64, 1 );\r\n $salt = substr( $salt, 0, 2 ); // Just in case\r\n return($salt);\r\n }", "static function generateSalt($strength=10) {\n return self::saltStart($strength) . random_string(22, './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz');\n }", "public function toString()\n\t{\n\t\t$checksum = Hash::ripemd160($this->addy);\n\t\t$this->addy = Buffertools::concat($this->addy, $checksum->slice(0, 4));\n\t\treturn $this->address_prefix . Base58::encode($this->addy);\n\t}", "function get_shortcut_link()\n {\n }", "public static function make($string, $salt = ''){\n return hash('sha256', $string . $salt);\n }", "public function generateHash()\n {\n do {\n $hash = Security::randomString(8);\n } while ($this->exists(['hash' => $hash]));\n\n return $hash;\n }", "public function generateSigningSecret(): string\n {\n try {\n return sodium_bin2hex(sodium_crypto_auth_keygen());\n } catch (SodiumException $e) {\n throw new RuntimeException('Could not generate signing key', 0, $e);\n }\n }", "function make_key($pw, $salt) {\n\treturn sha1(md5(md5($pw).md5($salt)));\n}", "function gen_salt($algo) {\n switch($algo) {\n case 'sha256':\n return base64_encode(mcrypt_create_iv (192, MCRYPT_DEV_RANDOM));\n // per man 3 crypt the salt is a maximum of 16 characters\n // and the salt character set is [a–zA–Z0–9./]\n // this is less than the rule of thumb for larger hash sizes\n // handle it as a separate case\n case 'crypt-sha256':\n $iv = mcrypt_create_iv (96, MCRYPT_DEV_RANDOM);\n return str_replace('+', '.', base64_encode($iv));\n }\n return false;\n}", "public function generate()\n{\n\n//generate a unique id//\n\n$unique=uniqid();\n\n$mesadig=crypt($unique,rand());\n//encrypt with the salt//\n\n//FILETER FOR THE /\n\n$mesadig=str_replace('/', 'ssd', $mesadig);\n\nreturn $mesadig;\n\n}", "public static function pubCrypt($symKey){\n\t\topenssl_public_encrypt($symKey, $encSymKey, self::getPubKey(), OPENSSL_PKCS1_OAEP_PADDING); //The default OPENSSL_PKCS1_PADDING is deprecated.\n\t\treturn base64_encode($encSymKey);\n\t}", "protected function _create_salt()\n\t{\n\t\t$this->CI->load->helper('string');\n\t\treturn sha1(random_string('alnum', 32));\n\t}", "public static function generateKey()\n {\n return openssl_digest(php_uname() . \"-\" . $_SERVER[\"REMOTE_ADDR\"], 'MD5', true);\n }", "function salt_hmac($size1=4,$size2=6) {\n$hprand = rand(4,6); $i = 0; $hpass = \"\";\nwhile ($i < $hprand) {\n$hspsrand = rand(1,2);\nif($hspsrand!=1&&$hspsrand!=2) { $hspsrand=1; }\nif($hspsrand==1) { $hpass .= chr(rand(48,57)); }\nif($hspsrand==2) { $hpass .= chr(rand(65,70)); }\n++$i; } return $hpass; }", "private function genSalt()\n {\n \treturn md5(time() + rand());\n }", "protected static function _generateSaltMd5() {\n\t\treturn '$1$' . Random::generate(6, ['encode' => Random::ENCODE_BASE_64]);\n\t}", "public function registration_link():string{\n\t\treturn 'finspot:FingerspotReg;'.base64_encode(REGISTRATION_PATH.$this->id);\n\t}", "public function generateKey()\n {\n return 'do.' . $this->token->user->id . '.' . preg_replace('/\\//', '.', $this->getUrl());\n }", "function _hash_gensalt_private($input, &$itoa64, $iteration_count_log2 = 6)\n{\n\tif ($iteration_count_log2 < 4 || $iteration_count_log2 > 31)\n\t{\n\t\t$iteration_count_log2 = 8;\n\t}\n\n\t$output = '$H$';\n\t$output .= $itoa64[min($iteration_count_log2 + ((PHP_VERSION >= 5) ? 5 : 3), 30)];\n\t$output .= _hash_encode64($input, 6, $itoa64);\n\n\treturn $output;\n}", "public static function genhash ($url)\r\n\t{\r\n\t\t$hash = 'Mining PageRank is AGAINST GOOGLE\\'S TERMS OF SERVICE. Yes, I\\'m talking to you, scammer.';\r\n\t\t$c = 16909125;\r\n\t\t$length = strlen($url);\r\n\t\t$hashpieces = str_split($hash);\r\n\t\t$urlpieces = str_split($url);\r\n\t\tfor ($d = 0; $d < $length; $d++)\r\n\t\t{\r\n\t\t\t$c = $c ^ (ord($hashpieces[$d]) ^ ord($urlpieces[$d]));\r\n\t\t\t$c = self::zerofill($c, 23) | $c << 9;\r\n\t\t}\r\n\t\treturn '8' . self::hexencode($c);\r\n\t}", "function generateArgon2idMinimal($password, $salt) {\r\n $opsLimit= 2;\r\n $memLimit = 8192 * 1024;\r\n $outputLength = 32;\r\n return sodium_crypto_pwhash ($outputLength, $password, $salt, $opsLimit, $memLimit, SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13);\r\n}", "function makeSalt() {\r\n static $seed = \"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n $algo = (PHP_VERSION_ID >= 50307) ? '$2y' : '$2a'; //DON'T CHANGE THIS!!\r\n $strength = '$12'; //too high will time out script.\r\n $salt = '$';\r\n for ($i = 0; $i < 22; $i++) {\r\n $salt .= substr($seed, mt_rand(0, 63), 1);\r\n }\r\n return $algo . $strength . $salt;\r\n}", "function hash_generator($str, $key)\n{\n $nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);\n $ciphertext = sodium_crypto_secretbox($str, $nonce, $key);\n\n return $nonce . $ciphertext;\n}", "public function createSalt () {\n srand(time());\t\t\t\t\n $pool = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n for($index = 0; $index < 2; $index++) {\n $sid .= substr($pool,(rand()%(strlen($pool))), 1);\n }\n return $sid; \n }", "private function generate_code(){\n $bytes = random_bytes(2);\n // var_dump(bin2hex($bytes));\n return bin2hex($bytes);\n }", "public function generateSalt() {\n // A salt is randomly generated here to protect again brute force attacks\n // and rainbow table attacks. The following statement generates a hex\n // representation of an 8 byte salt. Representing this in hex provides\n // no additional security, but makes it easier for humans to read.\n // For more information:\n // http://en.wikipedia.org/wiki/Salt_%28cryptography%29\n // http://en.wikipedia.org/wiki/Brute-force_attack\n // http://en.wikipedia.org/wiki/Rainbow_table\n $this->salt = dechex(mt_rand(0, 2147483647)) . dechex(mt_rand(0, 2147483647));\n return $this->salt;\n }", "public function generateSecurePassword()\n {\n\n try {\n // Generate the random salt, \n // replace byte por byte for utf8 support\n $this->_salt = strtr(base64_encode(mcrypt_create_iv(22, MCRYPT_DEV_URANDOM)), '+', '.');\n\n // generate the password with the salt\n $this->password = password_hash($this->password, PASSWORD_BCRYPT, ['salt' => $this->_salt]);\n } catch (\\Exception $ex) {\n \\kerana\\Exceptions::showError('LoginError', $ex);\n }\n }", "public function createSalt()\n{\n\t$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n\treturn substr(str_shuffle(str_repeat($pool, 5)), 0, $this->saltLength);\n}", "function gen_pin(){\n $rand_num = rand(6, 12);\n $permitted_chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $pin = substr(str_shuffle($permitted_chars), 0, $rand_num);\n return $pin;\n }", "protected static function generatePin()\n\t{\n\t\t$pool = '0123456789';\n\t\treturn substr(str_shuffle(str_repeat($pool, 5)), 0, 4);\n\t}", "function _leonardo_hash_gensalt_private($input, &$itoa64, $iteration_count_log2 = 6)\n{\n if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31)\n {\n $iteration_count_log2 = 8;\n }\n\n $output = '$H$';\n $output .= $itoa64[min($iteration_count_log2 + ((PHP_VERSION >= 5) ? 5 : 3), 30)];\n $output .= _leonardo_hash_encode64($input, 6, $itoa64);\n\n return $output;\n}", "function generateMnemonic(){\n // Generate a mnemonic\n $random = new Random();\n $entropy = $random->bytes(Bip39Mnemonic::MAX_ENTROPY_BYTE_LEN);\n $bip39 = MnemonicFactory::bip39();\nreturn $bip39->entropyToMnemonic($entropy);\n}", "public static function make($len = 32) {\r\n\t\t$bytes = openssl_random_pseudo_bytes($len / 2);\r\n\t\treturn bin2hex($bytes);\r\n\t}", "private function generatePassword() {\n // account is not wide open if conventional logins are permitted\n $guid = '';\n\n for ($i = 0; ($i < 8); $i++) {\n $guid .= sprintf(\"%x\", mt_rand(0, 15));\n }\n\n return $guid;\n }", "public function genMapsLink()\n {\n $city = str_replace(' ', '+', $this->getCity()->getCityName());\n $street = str_replace(' ', '+', $this->getStreet());\n $hno = str_replace(' ', '+', $this->getHouseNo());\n\n $url = \"https://maps.google.com?q=\" . $city . '+' . $street . '+' . $hno;\n\n return $url;\n }", "function generate_salt($length = 16)\n {\n $possible_chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345678';\n $rand_string = '';\n for($i = 0; $i < $length; ++$i)\n {\n $rand_string .= $possible_chars[random_int(0, strlen($possible_chars) - 1)];\n }\n return utf8_encode($rand_string);\n }", "public function getShortcutLinkText ()\n {\n $text = $this->scopeConfig->getValue(\n 'b2bregistration/register/shortcut_link_text',\n ScopeInterface::SCOPE_STORE\n );\n return $text;\n }", "private function generateURL($name)\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n return md5($name.substr(str_shuffle($characters), 0, 10));\n }", "public function generateEncryptionSecret(): string\n {\n try {\n return sodium_bin2hex(sodium_crypto_secretbox_keygen());\n } catch (SodiumException $e) {\n throw new RuntimeException('Could not generate encryption key', 0, $e);\n }\n }", "protected function createInvalidFakeReturnUrl(): string\n {\n return (string) base64_encode(openssl_random_pseudo_bytes(32));\n }", "function gen_salt($salt_length=22)\n\t{\n\t\t$raw_salt_len = 16;\n \t\t$buffer = '';\n $buffer_valid = false;\n\n\t\tif (function_exists('mcrypt_create_iv') && !defined('PHALANGER')) {\n\t\t\t$buffer = mcrypt_create_iv($raw_salt_len, MCRYPT_DEV_URANDOM);\n\t\t\tif ($buffer) {\n\t\t\t\t$buffer_valid = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!$buffer_valid && function_exists('openssl_random_pseudo_bytes')) {\n\t\t\t$buffer = openssl_random_pseudo_bytes($raw_salt_len);\n\t\t\tif ($buffer) {\n\t\t\t\t$buffer_valid = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!$buffer_valid && @is_readable('/dev/urandom')) {\n\t\t\t$f = fopen('/dev/urandom', 'r');\n\t\t\t$read = strlen($buffer);\n\t\t\twhile ($read < $raw_salt_len) {\n\t\t\t\t$buffer .= fread($f, $raw_salt_len - $read);\n\t\t\t\t$read = strlen($buffer);\n\t\t\t}\n\t\t\tfclose($f);\n\t\t\tif ($read >= $raw_salt_len) {\n\t\t\t\t$buffer_valid = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!$buffer_valid || strlen($buffer) < $raw_salt_len) {\n\t\t\t$bl = strlen($buffer);\n\t\t\tfor ($i = 0; $i < $raw_salt_len; $i++) {\n\t\t\t\tif ($i < $bl) {\n\t\t\t\t\t$buffer[$i] = $buffer[$i] ^ chr(mt_rand(0, 255));\n\t\t\t\t} else {\n\t\t\t\t\t$buffer .= chr(mt_rand(0, 255));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$salt = $buffer;\n\n\t\t// encode string with the Base64 variant used by crypt\n\t\t$base64_digits = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\t\t$bcrypt64_digits = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\t\t$base64_string = base64_encode($salt);\n\t\t$salt = strtr(rtrim($base64_string, '='), $base64_digits, $bcrypt64_digits);\n\n\t\t$salt = substr($salt, 0, $salt_length);\n\n\t\treturn $salt;\n\t}", "public static function generateHash($salt, $password) {\n $hash = crypt($password, $salt);\n return substr($hash, 29);\n }", "public function genSalt(){\n return mcrypt_create_iv(16, MCRYPT_DEV_URANDOM);\n }", "function __generateRandom($length = 8, $salt = 'abcdefghijklmnopqrstuvwxyz0123456789') {\r\n\t\t$salt = str_shuffle ($salt);\r\n\t\t$return = \"\";\r\n\t\t$i = 0;\r\n\t\twhile ($i < $length) {\r\n\t\t\t$num = rand(0, strlen($salt) -1);\r\n\t\t\t$tmp = $salt[$num];\r\n\t\t\t$return .= $tmp;\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\treturn str_shuffle($return);\r\n\t}", "protected function _create_fingerprint($salt = 'kosher')\n\t{\n\t\treturn md5(ee()->input->user_agent().$salt);\n\t}", "public static function makeSalt()\n\t\t{\n\n\t\t\treturn uniqid(mt_rand(), true);\n\t\t}", "private function generateSalt(){\n return substr(md5(rand(0, 999)), 0, 5);\n }", "function gen_mix_salt($pass) {\n $salt = generate_salt();\n return mix_salt($salt, $pass);\n}", "public function generate_code()\n {\n return $string = bin2hex(random_bytes(10));\n }", "public function getSecurityCode()\n {\n $sid = 'abcdefghiklmnopqstvxuyz0123456789ABCDEFGHIKLMNOPQSTVXUYZ';\n $max = strlen($sid) - 1;\n $res = \"\";\n for($i = 0; $i<16; ++$i){\n $res .= $sid[mt_rand(0, $max)];\n } \n return $res;\n }", "private function newHash()\n {\n $salt = hash('sha256', uniqid(mt_rand(), true) . 't33nh4sh' . strtolower($this->email));\n\n // Prefix the password with the salt\n $hash = $salt . $this->password;\n \n // Hash the salted password a bunch of times\n for ( $i = 0; $i < 100000; $i ++ ) {\n $hash = hash('sha256', $hash);\n }\n \n // Prefix the hash with the salt so we can find it back later\n $hash = $salt . $hash;\n \n return $hash;\n }", "function generateSalt() {\n\t$numberOfDesiredBytes = 16;\n\t$salt = random_bytes($numberOfDesiredBytes);\n\treturn $salt;\n}", "private function getSalt() \n {\n /**\n * the base64 function uses +'s and ending ='s; translate the first, and cut out the latter\n */\n return sprintf('$2a$%02d$%s', $this->rounds, substr(strtr(base64_encode($this->getBytes()), '+', '.'), 0, 22));\n }", "public function generateLink($params)\n {\n }", "protected function generate()\n\t{\n\t\t$hash = bin2hex( random_bytes( 16 ) );\n\n\t\t$timeHi = hexdec( substr( $hash, 12, 4 ) ) & 0x0fff;\n\t\t$timeHi &= ~( 0xf000 );\n\t\t$timeHi |= 4 << 12;\n\n\t\t$clockSeqHi = hexdec( substr( $hash, 16, 2 ) ) & 0x3f;\n\t\t$clockSeqHi &= ~( 0xc0 );\n\t\t$clockSeqHi |= 0x80;\n\n\t\t$params = [\n\t\t\tsubstr( $hash, 0, 8 ),\n\t\t\tsubstr( $hash, 8, 4 ),\n\t\t\tsprintf( '%04x', $timeHi ),\n\t\t\tsprintf( '%02x', $clockSeqHi ),\n\t\t\tsubstr( $hash, 18, 2 ),\n\t\t\tsubstr( $hash, 20, 12 )\n\t\t];\n\n\t\treturn vsprintf( '%08s-%04s-%04s-%02s%02s-%012s', $params );\n\t}", "function gen_token(){\n\t\t$secretKey = \"BismILLAHirrohmaanirrohiim\";\n\n\t\t// Generates a random string of ten digits\n\t\t$salt = mt_rand();\n\n\t\t// Computes the signature by hashing the salt with the secret key as the key\n\t\t$signature = hash_hmac('sha256', $salt, $secretKey, true);\n\n\t\t// base64 encode...\n\t\t$encodedSignature = base64_encode($signature);\n\n\t\t// urlencode...\n\t\t$encodedSignature = urlencode($encodedSignature);\n\n\t\treturn $encodedSignature;\n\t}", "protected function generateSalt()\n\t{\n\t\treturn uniqid('',true);\n\t}", "public function generateAutoLoginLink($params){\n $dataRequest = array();$dataRequestAppend = array();\n // Destination ID\n if (isset($params['r'])){\n $dataRequest['r'] = $params['r']; $dataRequestAppend[] = '/(r)/'.rawurlencode(base64_encode($params['r']));\n }\n // User ID\n if (isset($params['u']) && is_numeric($params['u'])){\n $dataRequest['u'] = $params['u']; $dataRequestAppend[] = '/(u)/'.rawurlencode($params['u']);\n }\n // Username\n if (isset($params['l'])){\n $dataRequest['l'] = $params['l']; $dataRequestAppend[] = '/(l)/'.rawurlencode($params['l']);\n }\n if (!isset($params['l']) && !isset($params['u'])) {\n throw new Exception('Username or User ID has to be provided');\n }\n // Expire time for link\n if (isset($params['t'])){\n $dataRequest['t'] = $params['t'];\n $dataRequestAppend[] = '/(t)/'.rawurlencode($params['t']);\n }\n $hashValidation = sha1($params['secret_hash'].sha1($params['secret_hash'].implode(',', $dataRequest)));\n return \"index.php/user/autologin/{$hashValidation}\".implode('', $dataRequestAppend);\n }", "function decipherSIG($link, $original_link){\n\t$cipher = getCipher($original_link);\n\n\t$sig = str_split($link['s']);\n\t$instructions = explode(\" \", $cipher);\n\n\tforeach($instructions as $instruction){\n\t\tif(strpos($instruction, \"reverse\") !== false){\n\t\t\t$sig = array_reverse($sig);\n\t\t}\n\t\telse if(strpos($instruction, \"swap\") !== false){\n\t\t\t$param = str_replace(\"swap\", \"\", $instruction);\n\t\t\tif(is_numeric($param)){\n\t\t\t\t$replace_index = intval($param) % count($sig);\n\t\t\t\t$tmp = $sig[0];\n\t\t\t\t$sig[0] = $sig[$replace_index];\n\t\t\t\t$sig[$replace_index] = $tmp;\n\t\t\t}\n\n\t\t}\n\t\telse if(strpos($instruction, \"slice\") !== false){\n\t\t\t$param = str_replace(\"slice\", \"\", $instruction);\n\t\t\tif(is_numeric($param)){\n\t\t\t\t$sig = array_slice($sig, intval($param));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn implode($sig);\n}", "function createSalt()\n{\n $text = uniqid(Rand(), TRUE);\n return substr($text, 0, 5);\n\n}", "function rsd_link()\n {\n }", "public function generate($data, Link $link) : string\n {\n return $this->router->generate(\n $link->getRouteName(),\n $this->expressionLanguage->evaluate($link->getRouteParameters(), $data),\n $link->isAbsolute() ? UrlGeneratorInterface::ABSOLUTE_URL : null\n );\n }", "function createNewSalt(){\n\t$characters = 'abcdefghijklmnopqrstuvwxyz-:;><*#%&()ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';\n\n\t$salt = \"\";\n\n\tfor ($i = 0; $i<32; $i++){\n $salt = $salt.$characters[rand(0,strlen($characters)-1)];\n\t}\n\t\n\treturn $salt;\n}", "function salt($len=16) {\n $pool = range('!', '~');\n $high = count($pool) - 1;\n $tmp = '';\n for ($c = 0; $c < $len; $c++) {\n $tmp .= $pool[rand(0, $high)];\n }\n return $tmp;\n}", "public static function generateCode() {\n $long_code = strtr(md5(uniqid(rand())), '0123456789abcdefghij', '234679QWERTYUPADFGHX');\n return substr($long_code, 0, 12);\n }", "function get_secure_hash($aiLength = 64, $aiInput = 128){\n\n /* @var $lrHandler resource */\n $lrHandler = fopen('/dev/urandom', 'r');\n\n $lsHash = fgets($lrHandler, $aiInput);\n\n fclose($lrHandler);\n \n // Random madness sequence initiated...\n if (function_exists('mhash')) \n {\n // mhash also returns binary, so we use bin2hex at the outermost place.\n $lsHash = bin2hex(mhash(MHASH_SHA256, $lsHash));\n } else {\n $lsHash = hash('sha256', bin2hex($lsHash));\n }\n\n // more randomness ?? (too much, maybe???)\n $lsHash = str_shuffle($lsHash);\n\n return substr($lsHash, 0, $aiLength);\n }" ]
[ "0.6883757", "0.618923", "0.6167013", "0.59339654", "0.5887604", "0.58627725", "0.55396116", "0.550641", "0.54027855", "0.5371698", "0.5366054", "0.5366054", "0.53569615", "0.5349974", "0.532327", "0.5282112", "0.52752346", "0.52659595", "0.52330947", "0.52269167", "0.52076584", "0.5175107", "0.5163338", "0.5155524", "0.51360846", "0.5128128", "0.5120647", "0.5114632", "0.5089127", "0.5083933", "0.5062024", "0.50593907", "0.50549585", "0.50407046", "0.5028663", "0.502567", "0.5025001", "0.50227475", "0.5022019", "0.5010579", "0.5007336", "0.50032103", "0.49987885", "0.49924994", "0.4984011", "0.49822694", "0.49822584", "0.49783307", "0.49762192", "0.49607864", "0.495877", "0.4952097", "0.495199", "0.49474204", "0.49419302", "0.4922715", "0.49224272", "0.49140117", "0.49095857", "0.4904755", "0.49043143", "0.49031875", "0.48979893", "0.48970082", "0.48929253", "0.48918253", "0.48897648", "0.48871112", "0.48830536", "0.48826206", "0.4879387", "0.4879127", "0.4876277", "0.48688158", "0.4857712", "0.48564237", "0.48549247", "0.48454085", "0.48440832", "0.48362735", "0.482144", "0.48096642", "0.48055404", "0.48047677", "0.4804344", "0.47970694", "0.47945377", "0.47935286", "0.4791649", "0.47896713", "0.47865355", "0.47836384", "0.47732934", "0.47731572", "0.47724035", "0.4769613", "0.4763722", "0.4759193", "0.47575775", "0.47516605", "0.4749129" ]
0.0
-1
Set up a link.
public function set(Photo $photo) { $this->photo_id = $photo->id; $this->timestamps = false; // we set up the created_at $now = now(); $this->created_at = $now; $this->updated_at = $now; foreach (self::VARIANT_2_INDICATOR_FIELD as $variant => $indicator_field) { if ($photo->{$indicator_field} !== null && $photo->{$indicator_field} !== 0 && $photo->{$indicator_field} !== '') { $this->create($photo, $variant, strval($now)); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setLink($url)\n\t{\n\t\t$this->link = $url;\n\t}", "public function setLink($link);", "function link() {\n $this->title = \"link\";\n }", "function setLink($link) {\r\n $this->_link = $link;\r\n }", "function setLink($link) {\r\n $this->_link = $link;\r\n }", "function setUrlLink(){\n if( $this->id == 0 ) return;\n $url = $this->aFields[\"url\"]->toString();\n if( $url == \"\" ) return;\n $url = strip_tags( preg_replace( \"/[\\\"']/\", \"\", $url ) );\n if( !$this->aFields[\"url\"]->editable ) $this->aFields[\"url\"]->display = false;\n $this->aFields[\"url_link\"]->display = true;\n $this->aFields[\"url_link\"]->value = \"<a href=\\\"\".$url.\"\\\">\".$url.\"</a>\";\n }", "public function makeLinkButton() {}", "public function set_link($link) \n\t{\n\t\tif($this->version == RSS2 || $this->version == RSS1)\n\t\t{\n\t\t\t$this->add_element('link', $link);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->add_element('link','',array('href'=>$link));\n\t\t\t$this->add_element('id', zajlib_feed::uuid($link,'urn:uuid:'));\n\t\t} \n\t\t\n\t}", "function Link($id,$title,$url,$description,$category_id,$on_homepage)\n\t{\n\t\tparent::Resource($id,RESOURCE_LINK);\n\t\t$this->title = $title;\n\t\t$this->url = $url;\n\t\t$this->description = $description;\t\n\t\t$this->category_id = $category_id;\n\t\t$this->on_homepage = $on_homepage;\n\t}", "function setLink(&$link)\n {\n $this->_link = $link;\n }", "public function link();", "public function setLink($link){\n\t\t$this->link = $link;\n\t}", "public function __construct(){\n\t\t\t$this->genLink();\n\t\t}", "public function __construct($link)\n {\n $this->link = $link;\n }", "protected function addLinks()\n {\n }", "public function setLink(string $link): void\n {\n $this->link = $link;\n }", "function genLink () {\n\t\t\t$db_host=\"127.0.0.1\";\n\t\t\t$db_nombre=\"gallery\";\n\t\t\t$db_user=\"gallery\";\n\t\t\t$db_pass=\"gallery\";\n\t\t\t$link=mysql_connect($db_host, $db_user, $db_pass) or die (\"Error conectando a la base de datos.\");\n\t\t\tmysql_select_db($db_nombre ,$link) or die(\"Error seleccionando la base de datos.\");\n\t\t\t$this->link = $link;\n\t\t}", "public function set_link($link){\n\t\t$this->set_channel_element('link', $link);\n\t}", "protected function setUp()\r\n {\r\n parent::setUp();\r\n \r\n // TODO Auto-generated ColumnLinkTest::setUp()\r\n \r\n $this->ColumnLink = new ColumnLink(/* parameters */);\r\n }", "public function __construct($config, $link)\n {\n $this->config = $config;\n $this->link = $link;\n }", "function setHeadLink($var)\n\t{\n\t\t$this -> head_link = $var;\n\t}", "public function __construct($link)\n {\n //\n $this->link = $link;\n $this->sender = auth()->user()->name;\n }", "public function setLink($link) {\n\t\t$this->addChannelTag('link', $link);\n\t}", "function makeLink($label, $link, $ATagParams = ''){\n\t\tif(is_array($this->conf['typolink.']))\n\t\t\t$myConf = $this->conf['typolink.'];\n\t\t$myConf['parameter'] = $link;\n\t\tif($ATagParams) {\n\t\t\t$myConf['ATagParams'] = $ATagParams;\n\t\t}\n\t\treturn $this->cObj->typoLink($label, $myConf);\n }", "function SetLink($link,$y=0,$page=-1)\n\t\t{\n\t\t\tif($y==-1) $y=$this->y;\n\t\t\tif($page==-1)\t$page=$this->page;\n\t\t\t$this->links[$link]=array($page,$y);\n\t\t}", "public function makeLinks() {\r\n $this->url = new Url(sprintf(\"/f-p%d.htm#%d\", $this->id, $this->id));\r\n $this->url->single = sprintf(\"/forums?mode=post.single&id=%d\", $this->id);\r\n $this->url->report = sprintf(\"/f-report-%d.htm\", $this->id);\r\n $this->url->reply = sprintf(\"/f-po-quote-%d.htm\", $this->id);\r\n $this->url->delete = sprintf(\"/f-po-delete-%d.htm\", $this->id);\r\n $this->url->edit = sprintf(\"/f-po-editpost-%d.htm\", $this->id);\r\n $this->url->replypm = sprintf(\"/messages/new/from/%d/\", $this->id);\r\n $this->url->iplookup = sprintf(\"/moderators?mode=ip.lookup&ip=%s\", $this->ip);\r\n $this->url->herring = sprintf(\"/f-herring-p-%d.htm\", $this->id);\r\n \r\n if ($this->thread->forum->id == 71) {\r\n $this->url->developers = sprintf(\"/%s/d/%s/%s\", \"developers\", $this->thread->url_slug, $this->url_slug);\r\n }\r\n \r\n return $this;\r\n }", "public function setLink($link){\n $this->link = $link;\n return $this;\n }", "public function setLink($value)\n {\n return $this->set('Link', $value);\n }", "public function setLink($value)\n {\n return $this->set('Link', $value);\n }", "public function setLink($value)\n {\n return $this->set('Link', $value);\n }", "public function setLink($value)\n {\n return $this->set('Link', $value);\n }", "public function setLink($value)\n {\n return $this->set('Link', $value);\n }", "function setLinks($link) \n {\n $this->links = $link;\n }", "public function uploadlink() {\n $defaults = array();\n\n $defaults[\"straat\"] = \"straatnaam of de naam van de buurt\";\n $defaults[\"huisnummer\"] = \"huisnummer\";\n $defaults[\"maker\"] = \"maker\";\n $defaults[\"personen\"] = \"namen\";\n $defaults[\"datum\"] = \"datum of indicatie\";\n $defaults[\"titel\"] = \"titel\";\n $defaults[\"naam\"] = \"Je naam\";\n $defaults[\"email\"] = \"Je e-mailadres\";\n $defaults[\"tags\"] = \"\";\n\n $this->set('defaults', $defaults);\n }", "public function run()\n {\n Link::truncate();\n Link::create([\n 'domain' => 'https://52zoe.com',\n 'logo' => 'https://52zoe.com/images/avatar.png',\n 'title' => '秋枫阁',\n 'summary' => '秋枫阁,一个PHPer的个人博客。',\n 'state' => 1,\n ]);\n }", "public function link($setting_key = 'default')\n {\n }", "protected function _setLink(XMLWriter $xml)\n {\n $value = $this->feed->getLink();\n\n if (!$value) {\n throw new InvalidArgumentException(\n 'RSS 2.0 feed elements MUST contain exactly one link element but one has not been set'\n );\n }\n\n $xml->startElement('link');\n\n if (!Uri::factory($value)->isValid()) {\n $xml->writeAttribute('isPermaLink', 'false');\n }\n\n $xml->text($value);\n $xml->endElement(); // link\n }", "public function makelink()\n {\n /*\n * If link set directly that forces using it rather than build\n */\n if ($this->link) {\n return $this->link;\n }\n\n $pageid = static::makeParameterId($this->for);\n $parameters = $this->app['request']->query->all();\n if (array_key_exists($pageid, $parameters)) {\n unset($parameters[$pageid]);\n } else {\n unset($parameters['page']);\n }\n\n $parameters[$pageid] = '';\n $link = '?' . http_build_query($parameters);\n\n return $link;\n }", "public function setLink($params, $context)\n {\n $this->validateMethodContext($context, [\"role\" => OMV_ROLE_ADMINISTRATOR]);\n // Validate the parameters of the RPC service method.\n $this->validateMethodParams($params, \"rpc.webdesk.setlink\");\n // Prepare the configuration object.\n $object = new \\OMV\\Config\\ConfigObject(\"conf.service.webdesk.link\");\n $object->setAssoc($params);\n // Set the configuration object.\n $isNew = $object->isNew();\n $db = \\OMV\\Config\\Database::getInstance();\n /*if (TRUE === $isNew) {\n // Check uniqueness - Linkd folder\n $db->assertIsUnique($object, \"uuid\");\n }*/\n $db->set($object);\n // Return the configuration object.\n return $object->getAssoc();\n }", "public function maybe_make_link($url)\n {\n }", "function addLink(& $story, & $pageElement) {\t\t\n\t\t$storyElement =& $this->_document->createElement('link');\n\t\t$pageElement->appendChild($storyElement);\n\t\t\n\t\t$this->addCommonProporties($story, $storyElement);\n\t\t\n \t\t// description\n\t\t$shorttext =& $this->_document->createElement('description');\n\t\t$storyElement->appendChild($shorttext);\n\t\t$shorttext->appendChild($this->_document->createTextNode(htmlspecialchars($story->getField('shorttext'))));\n \t\t\n \t\t// file\n\t\t$longertext =& $this->_document->createElement('url');\n\t\t$storyElement->appendChild($longertext);\n\t\t$longertext->appendChild($this->_document->createTextNode(htmlspecialchars($story->getField(\"url\"))));\n\t\t\n\t\t$this->addStoryProporties($story, $storyElement);\n\t}", "public function setLink($link)\n {\n $this->setChannelElement('link', $link);\n }", "public function _construct()\n {\n parent::_construct();\n $this->setTemplate('displaze/mybrand/manufacturer/link.phtml');\n }", "public function _construct()\n {\n parent::_construct();\n $this->setTemplate('magiccart/shopbrand/brand/link.phtml');\n }", "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 }", "public function __construct($url, $title, $link)\n {\n $this->setUrl($url);\n $this->setTitle($title);\n $this->setLink($link);\n }", "protected function checkLink()\n\t{\n\t\tif(empty($this->link) && empty($this->label))\n\t\t{\n\t\t\t$split = preg_split(\"/[^A-Za-z0-9]/\", $this->title, 2, PREG_SPLIT_NO_EMPTY);\n\t\t\t$this->label = $split[0];\n\t\t}\n\n\t\tif(empty($this->link) && !empty($this->label))\n\t\t{\n\t\t\t$split = preg_split(\"/[^A-Za-z0-9]/\", $this->label, 2, PREG_SPLIT_NO_EMPTY);\n\t\t\t$this->label = $split[0];\n\t\t}\n\n\t\t$this->link = (empty($this->link)) ? \"\" : $this->link;\n\t\t$this->label = (empty($this->label)) ? \"\" : $this->label;\n\t\t$this->label = strtolower($this->label);\n\n\t\treturn $this;\n\t}", "function rsd_link()\n {\n }", "public function __construct(FetchLinkMeta $link)\n {\n $this->link = $link;\n }", "public function link() : Link;", "protected function setUpInstanceCoreLinks() {}", "public function getLink() {}", "public function addLink(string $name, array $attributes);", "public function setUrl($link)\n {\n if (!$this->characterLastHas($link, '/')) {\n $link .= '/';\n }\n $link = $link . self::$folder . '/';\n self::set('_url', $link);\n if (empty($this->linkBaseMapAssets))\n $this->linkBaseMapAssets = $link;\n }", "public function getLink();", "public function getLink();", "function Link()\n\t{\tif ($this->details[\"hblink\"])\n\t\t{\tif (strstr($this->details[\"hblink\"], \"http://\") || strstr($this->details[\"hblink\"], \"https://\"))\n\t\t\t{\treturn $this->details[\"hblink\"];\n\t\t\t} else\n\t\t\t{\treturn SITE_URL . $this->details[\"hblink\"];\n\t\t\t}\n\t\t}\n\t}", "public function link(){\n\t\tif( $this->link ) {\n\t\t\treturn $this->link;\n\t\t}//end if\n\n\t\t$this->link = @file_get_contents( $this->base_dir.'/'.$this->dir . $this->filename . '.link');\n\t\treturn $this->link;\n\t}", "public function setLink($str, $type = Link::TYPE_HREF)\n {\n return parent::setLink(new Link($type, $str));\n }", "public function link($link) {\n\t\t$this->link = $link;\n\t\treturn $this;\n\t}", "public function __construct($uri, $title, $description, $name, $link='')\n {\n $this->setUri($uri);\n $this->setTitle($title);\n $this->setDescription($description);\n $this->setName($name);\n if ($link !== '')\n $this->setLink($link);\n else\n $this->setLink($uri);\n }", "function setTitlelink($v) {\n\t\t$this->set(\"titlelink\",$v);\n\t}", "protected function setUp()\n {\n parent::setUp();\n\n $this->createUrl();\n }", "function permalink_link()\n {\n }", "public function href();", "public function __construct(string $link, string $link_title)\n {\n //\n $this->fields = [\n 'link' => $link,\n 'link_title' => $link_title,\n ];\n }", "public function init() {\n\t RSSFeed::linkToFeed($this->Link() . \"rss\"); \n\t parent::init();\n\t}", "public function setLink(string $name, string $url): void\n {\n $name = trim(strtolower($name));\n\n if ($name == '_') {\n $name = array_shift($this->anonymous);\n }\n\n $this->links[$name] = trim($url);\n }", "public function link(string $url, string $email, string $type);", "public function setupLinkGenerator(LinkGenerator $linkGenerator)\n {\n $this->linkGenerator = $linkGenerator;\n return $this;\n }", "private function newLink(int $bid = 0) {\n $m = $this->getViewModel();\n $link = new Links();\n $m->link = $link;\n $link->sitename = 'Here';\n $link->url = '/';\n $link->urltype = 'Front';\n $link->enabled = true;\n\n if ($bid > 0) {\n\n $link->refid = $bid;\n $link->urltype = 'Blog';\n // get the actual blog, extract title, url and intro text\n $blog = Blog::findFirstById($bid);\n if (!empty($blog)) {\n $revision = $this->getLinkedRevision($blog);\n $link->url = \"/article/\" . $blog->title_clean;\n $link->title = $blog->title;\n $link->summary = Text::IntroText($revision->content, 300);\n }\n } else {\n $link->urltype = 'Front';\n }\n\n $m->collections = [];\n return $this->viewNewLink($m);\n }", "function getLink() {return $this->_link;}", "function getLink() {return $this->_link;}", "public function __construct(MenuLinkManagerInterface $link) {\n $this->link = $link;\n }", "public function __construct() {\n $this->setTitle(\"Felis Investigations\");\n $this->addLink(\"login.php\", \"Log in\");\n }", "public static function setLink($link)\n {\n self::$link = $link;\n\n return self;\n }", "public function setLink(?string $link)\n {\n $this->link = $link;\n\n return $this;\n }", "function addLink($label, $link) \n {\n $xmlObject = new XMLObject( XMLObject_Menu::NODE_ITEM );\n $xmlObject->addElement( XMLObject_Menu::ITEM_TYPE, XMLObject_Menu::ITEM_TYPE_LINK);\n $xmlObject->addElement(XMLObject_Menu::ITEM_TYPE_LINK_LABEL, $label);\n $xmlObject->addElement(XMLObject_Menu::ITEM_TYPE_LINK_LINK, $link);\n \n $this->addXmlObject( $xmlObject );\n \n }", "function setLinksource($linksource)\r\n\t{\r\n\t\t$this->linksource = $linksource;\r\n\t}", "public function set_link($link)\n\t{\n\t\tif (is_null($link) || empty($link)) {\n\t\t\tthrow new InvalidArgumentException(\"Database Link Invalid!\");\n\t\t}\n\t\t$this->link = $link;\n\t}", "public function __construct($uri, $title, $description='', $link='')\n {\n $this->setUri($uri);\n $this->setTitle($title);\n if ($description !== '')\n $this->setDescription($description);\n if ($link === '')\n $this->setLink($uri);\n else\n $this->setLink($link);\n }", "public function __construct()\n {\n $this->miniUrl = \"https://short.link/\";\n }", "public function create()\n {\n // 创建一个友情链接\n return view('admin.config.linkAdd');\n }", "function LinkToURL($url = null)\n\t{\n\t\t// Print URL link using HTML class\n\t\techo HTML::LinkToURL($url);\n\t}", "public function __construct(User $user,string $link)\n {\n $this->user = $user;\n $this->link = $link;\n }", "public function setUrl()\n {\n $this->set('url', function() {\n $url = new Url();\n $url->setBaseUri('/');\n return $url;\n });\n }", "public function create()\n {\n //加载添加友情链接\n \n return view(\"admin.link.create\");\n }", "public function __construct()\n {\n $this->buildUrl();\n }", "function makeLink($text, $link, $section = '', $title = '', $target = '')\n{\n\t// if there's nothing to link, don't link anything\n\tif(!$text)\n\t\treturn '';\n\n\t$ret = '<a href=\"';\n\n\tif($section != 'EXTERIOR')\n\t{\n\t\tif($section == '/')\n\t\t\t$ret .= ARC_WWW_PATH;\n\t\telse if($section)\n\t\t\t$ret .= ARC_WWW_PATH . $section . '/';\n\n\t\t$ret .= '?';\n\t}\n\n\tif($section != 'EXTERIOR' && isset($_GET['sqlprofile']) || isset($_POST['sqlprofile']))\n\t\t$link .= '&sqlprofile';\n\n\t$ret .= str_replace('&', '&amp;', $link) . '\"';\n\n\tif($title)\n\t\t$ret .= ' title=\"' . $title . '\"';\n\n\tif($target)\n\t\t$ret .= ' target=\"' . $target . '\"';\n\n\t$ret .= '>' . $text . '</a>';\n\n\treturn $ret;\n}", "public function init() {\n extract($this->data);\n\n //Default link\n if(!$href) {\n $this->data['href'] = \"\";\n }\n\n if($href) {\n $this->data['attributeList']['role'] = \"link\";\n }\n }", "function __construct()\n\t{\n\t\t// Set connection and store it in self::$link\n\t\tself::$link = Connection::setConnect();\n\t}", "public function testCreateSharedLink()\n {\n }", "static public function createLink($data = [])\n\t{\n\t\t$link = new Link;\n\n\t\t// set the link fields\n\t\t$link->object_id = $data['object_id'];\n\t\t$link->object_type = $data['object_type'];\n\t\t$link->link_type = $data['link_type'];\n\t\t$link->link = $data['link'];\n\n\t\t// save the record to the DB\n\t\t$link->save();\n\n\t\t// return the new DB records id\n\t\treturn $link;\n\t}", "function getLink() {\n return new Hyperlink($this->getName(),\"/user/$this->id\",'userlink');\n }", "public function init() {\n $link = new Zend_Form_Element_Text('link');\n $link->setRequired();\n $link->setLabel('Enter New Url: ')->setAttrib('class', 'form-label');\n $link->setAttrib('class', 'form-control');\n $link->addFilter('stringTrim');\n $link->addValidator(new Zend_Validate_Db_NoRecordExists(\n array(\n 'table' => 'links',\n 'field' => 'link',\n )\n ));\n $submit = new Zend_Form_Element_Submit('Add');\n\t\t$submit->setAttrib('class', 'btn btn-primary');\n\t\t$this->setAttrib('class', 'form-horizontal');\n $this->addElements(array( $link, $submit));\n }", "public function testGetSetUri()\n {\n $uri = 'http://localhost/test/test';\n $linkHeaderItem = new LinkHeaderItem($uri);\n\n $this->assertEquals($uri, $linkHeaderItem->getUri());\n\n $uri = $uri.'?test=true';\n $linkHeaderItem->setUri($uri);\n\n $this->assertEquals($uri, $linkHeaderItem->getUri());\n }", "protected function initiateUrl()\n\t{\n\t\t// base url\n\t\tif($this->app->config->has('app.url'))\n\t\t\t$this->setBase($this->app->config->get('app.url'));\n\n\t\t// asset url\n\t\tif($this->app->config->has('asset.url'))\n\t\t\t$this->setAsset($this->app->config->get('asset.url'));\n\t}", "public function link(string $target, string $link): Promise;", "function link() {\n\t\t$this->Link->recursive = 0;\n\t\t$links = $this->Link->find('all');\n\t\t$this->set('links', $links);\n\t}", "public function setLink($link)\n\t{\n\t\t$this->link = $link;\n\t\treturn $this;\n\t}", "public function __construct() {\n\t\t$widget_ops = array('description' => __( \"Your blogroll\" ) );\n\t\tparent::__construct('links', __('Links'), $widget_ops);\n\t}" ]
[ "0.7007", "0.694338", "0.68851596", "0.68474627", "0.68474627", "0.67268974", "0.66713977", "0.66247606", "0.6618927", "0.6618785", "0.66085356", "0.6606036", "0.66001076", "0.6581856", "0.648033", "0.6409177", "0.6338342", "0.62993383", "0.6297729", "0.62602365", "0.62349397", "0.61817926", "0.6161143", "0.61349946", "0.6131366", "0.61000067", "0.6094136", "0.607257", "0.6071333", "0.60710794", "0.606985", "0.606985", "0.606043", "0.6059108", "0.60574657", "0.6051337", "0.6049478", "0.6045607", "0.60451275", "0.6038607", "0.6029", "0.60113424", "0.59937847", "0.59744924", "0.59640193", "0.5950027", "0.5927877", "0.58957833", "0.58923507", "0.5888034", "0.5883132", "0.5876404", "0.5856302", "0.5848275", "0.5841026", "0.5841026", "0.58141935", "0.5803398", "0.57920206", "0.57601327", "0.575959", "0.57566655", "0.5753366", "0.5750109", "0.5743809", "0.57415336", "0.5739961", "0.5735014", "0.5722489", "0.5717789", "0.5712593", "0.5710794", "0.5710794", "0.57082653", "0.5697101", "0.56932044", "0.5678261", "0.56745243", "0.56742674", "0.56660986", "0.5659354", "0.5653517", "0.5651545", "0.564566", "0.5641664", "0.5636232", "0.56359774", "0.56320065", "0.5622533", "0.5621075", "0.56182325", "0.56124556", "0.5611157", "0.5602037", "0.5569392", "0.5566886", "0.5566142", "0.5556715", "0.55550605", "0.5554091", "0.555397" ]
0.0
-1
Given the return array of a photo, override the link provided.
public function override(array &$return) { foreach (self::VARIANT_2_SYM_PATH_FIELD as $variant => $field) { if ($this->$field != '') { // TODO: This could be avoided, if the original variant was also serialized into the sub-array 'sizeVariants', see comment in PhotoCast#toReturnArray if ($variant == Photo::VARIANT_ORIGINAL) { $return['url'] = Storage::drive('symbolic')->url($this->$field); } else { $return['sizeVariants'][$variant]['url'] = Storage::drive('symbolic')->url($this->$field); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPhotoLinkAttribute()\n {\n return $this->attributes['photo_link'] = ($this->photo)?Storage::disk('public')->url($this->photo):config('values.noPhoto');\n }", "public function get_image_link()\n {\n }", "public function getPhotoUrls () {\n\t\t\n\t}", "public function overrideFullUrl(array &$return)\n\t{\n\t\tforeach (self::VARIANT_2_SYM_PATH_FIELD as $variant => $field) {\n\t\t\tif ($this->$field != '') {\n\t\t\t\t// TODO: This could be avoided, if the original variant was also serialized into the sub-array 'sizeVariants', see comment in PhotoCast#toReturnArray\n\t\t\t\tif ($variant == Photo::VARIANT_ORIGINAL) {\n\t\t\t\t\t$return['full_url'] = Storage::drive('symbolic')->url($this->$field);\n\t\t\t\t} else {\n\t\t\t\t\t$return['sizeVariants'][$variant]['full_url'] = Storage::drive('symbolic')->url($this->$field);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function buildPhotoUrl () {\n\t\t\n\t}", "function print_link_photo($table) {\n\n\t$html = \"<a class=\\\"div_class\\\" href=\\\"\" . $table['link'] . \"\\\">\\n\";\n\t$html .= \"\\t<h3>\" . $table['titre'] . \"</h3>\\n\";\n\t$html .= \"\\t<div class=\\\"photo_text\\\">\\n\";\n\t$html .= \"\\t\\t<img src=\\\"Images/\" . $table['photo'] . \"\\\">\";\n\t$html .= \"\\t\\t<p>\" . $table['texte'] . \"</p>\\n\";\n\t$html .= \"\\t</div>\\n\";\n\t$html .= \"</a>\\n\";\n\n\treturn $html;\n}", "public function getPhotoLinkMiniAttribute()\n {\n return $this->attributes['photo_link_mini'] = ($this->photo)?Storage::disk('public')->url($this->photo_mini):config('values.noPhotoMini');\n }", "public function getPhotoUrl()\n {\n if (filter_var($this->photoUrl, FILTER_VALIDATE_URL)) {\n return $this->photoUrl;\n }\n\n if (null !== $this->photoUrl) {\n return \"/uploads/photos/$this->photoUrl\";\n }\n }", "public function processPhoto($aPhoto) {\n \t$aSizes = Phpfox::getParam('photo.photo_pic_sizes');\n \t$aPhoto['photo_sizes'] = array();\n \tforeach ($aSizes as $iSize) {\n \t\t$aPhoto['photo_sizes'][$iSize] = Phpfox::getLib('image.helper')->display(array(\n \t\t\t'file' => $aPhoto['destination'],\n \t\t\t'server_id' => $aPhoto['server_id'],\n \t\t\t'path' => 'photo.url_photo',\n\t\t 'suffix' => '_'. $iSize,\n\t\t 'return_url' => true\n \t\t));\n \t}\n \t$aPhoto['photo_origin'] = Phpfox::getLib('image.helper')->display(array(\n \t\t\t'file' => $aPhoto['destination'],\n \t\t\t'server_id' => $aPhoto['server_id'],\n \t\t\t'path' => 'photo.url_photo',\n\t\t 'return_url' => true\n \t));\n \t\n \t$aPhoto['time_phrase'] = Phpfox::getLib('date')->convertTime($aPhoto['time_stamp'], 'photo.photo_image_details_time_stamp');\n \t$aPhoto['item_id'] = $aPhoto['photo_id'];\n \t$aPhoto['full_url'] = Phpfox::callback('photo.getLink', $aPhoto);\n \t \n \treturn $aPhoto;\n }", "public function getPhotoUrl()\n\t{\n\t\treturn $this->photo_url;\n\t}", "public function setPhoto($photo)\n {\n $this->photo = 'https:' . $photo;\n\n return $this;\n }", "function imglink_default() {\n\t\t\t$image_set = get_site_option( 'image_default_link_type' );\n\t\t\tif ( $image_set !== 'none' ) {\n\t\t\t\tupdate_site_option( 'image_default_link_type', 'none' );\n\t\t\t}\n\t\t}", "function image_link($imagename) {\r\n if (is_null($this->imagepath[$imagename]))\r\n {\r\n\tif ($this->monda && ($imagename == \"rss\")) {\r\n\t $path = $this->siteurl . '/wp-includes/images/rss.png';\r\n\t} else {\r\n \t $path = $this->image_url . $imagename . '.png';\r\n\t}\r\n\tif (wp_remote_fopen($path)) {\r\n\t $this->imagepath[$imagename] = $path;\r\n\t}\r\n\telse {\r\n\t $this->imagepath[$imagename] = $this->image_url . 'unknown.png';\r\n\t}\r\n }\r\n return $this->imagepath[$imagename];\r\n }", "public function getLinkToImg()\n {\n return ImgUpload::getLinkToImg($this);\n }", "public function setPhoto($value)\n {\n $this->photo = $value;\n }", "public function setPhotos($value)\n {\n $this->photos = $value;\n }", "function remove_image_links() {\n update_option('image_default_link_type', 'none');\n}", "function get_display_photo(){\n\t$display_photo = get_profile( 'photo' );\n\tif ( empty($display_photo) || !file_exists(abspath('/contents/images/profile/'.$display_photo)) )\n\t\treturn false;\n\n\treturn get_image_link( \"/images/profile/$display_photo\", \"default\" );\n}", "function setPhoto($photo): string\n{\n if ($photo) {\n return \"/storage/{$photo}\";\n }\n return '/img/products/photo.png';\n}", "function bethel_filter_attachment_link_for_gallery ($link, $id, $size, $permalink, $icon, $text) {\n $original_url = wp_get_attachment_url ($id);\n $new_url = wp_get_attachment_image_src ($id, 'bethel_fullscreen');\n return str_replace($original_url, $new_url[0], $link);\n}", "function wpb_imagelink_setup() {\n $image_set = get_option( 'image_default_link_type' );\n if ($image_set !== 'none') {\n update_option('image_default_link_type', 'none');\n }\n}", "function imagelink_setup() {\n $image_set = get_option( 'image_default_link_type' );\n if ($image_set !== 'none') {\n update_option('image_default_link_type', 'none');\n }\n}", "function give_linked_images_class($html, $id, $caption, $title, $align, $url, $size, $alt = '' ){\n\t$rel = \"prettyPhoto\";\n \n\t// check if there are already rel assigned to the anchor\n\tif ( preg_match('/<a.*? rel=\".*?\">/', $html) ) {\n\t $html = preg_replace('/(<a.*? rel=\".*?)(\".*?>)/', '$1 ' . $rel . '$2', $html);\n\t} else {\n\t $html = preg_replace('/(<a.*?)>/', '$1 rel=\"' . $rel . '\" >', $html);\n\t}\n\treturn $html;\n }", "public function setPhoto($photo)\n {\n $this->photo = $photo;\n \n return $this;\n }", "public function new_gallery_shortcode_defaults( $output, $attr ) {\n $options = $this->options;\n if($options['file_link'] == 'true') {\n global $post;\n $attr = array(\n 'link' => 'file'\n );\n return $output;\n }\n }", "public function getLinkImage()\n\t{\n\t\treturn $this->link_image;\n\t}", "function rest_get_avatar_urls($id_or_email)\n {\n }", "public function getPhotoAttribute()\n {\n return empty($this->attributes['photo'])? \"/images/admin.jpg\" : $this->attributes['photo'];\n }", "public function setPhoto($photo)\n {\n // First checking for extension validity, including default value - default values are set before we approach setting ones passed by data array\n if(!in_array($photo, $this->extensions)) {\n // If extension is invalid we throw descriptive exception\n throw new Exception('Extension specified is not valid');\n }\n // if photo extension equals default value it's final value (which will be the path) is set to defined default value\n if($photo == self::DEFAULT_TEXT) {\n $this->_values['photo'] = self::PHOTO_FOLDER . self::DEFAULT_IMAGE;\n } else {\n // If everything is right and we got extension of the file from the database, we are setting up a link to photo\n $this->_values['photo'] = self::PHOTO_FOLDER . $this->_values['id'] . \".\" . $photo;\n }\n }", "public function setPhoto($photo)\n {\n // First checking for extension validity, including default value - default values are set before we approach setting ones passed by data array\n if(!in_array($photo, $this->extensions)) {\n // If extension is invalid we throw descriptive exception\n throw new Exception('Extension specified is not valid');\n }\n // if photo extension equals default value it's final value (which will be the path) is set to defined default value\n if($photo == self::DEFAULT_TEXT) {\n $this->_values['photo'] = self::PHOTO_FOLDER . self::DEFAULT_IMAGE;\n } else {\n // If everything is right and we got extension of the file from the database, we are setting up a link to photo\n $this->_values['photo'] = self::PHOTO_FOLDER . $this->_values['id'] . \".\" . $photo;\n }\n }", "function photo($thumb=true) {\n if (empty($this->main_photo)) {\n if ($this->page[\"Name\"] == \"\") $this->openpage (\"Name\",\"person\");\n if (preg_match('/\\<a name=\"headshot\".+\"(http:\\/\\/.+\\.jpg)\".+<\\/a>/',$this->page[\"Name\"],$match)) {\n if ($thumb) $this->main_photo = $match[1];\n else $this->main_photo = str_replace('_SY140_SX100', '_SY600_SX400',$match[1]);\n } else {\n return FALSE;\n }\n }\n return $this->main_photo;\n }", "public function getPhotoURL(){\r\n\t\t$photo = $this->getPhoto();\r\n\r\n\t\treturn $photo != null ? \"https://maps.googleapis.com/maps/api/place/photo?maxwidth=800&photoreference=\" . $photo . \"&key=\" . GOOGLE_MAPS_API_KEY_PRIVATE : null;\r\n\t}", "public function getPhotoUrlAttribute()\n {\n return asset(env('FRONTEND_IMAGES_PATH') . $this->image);\n }", "public function setPhotoData($body) {\n\t\t$cnt = count($body['photos']['photo']);\n\t\t$num = rand(0, $cnt-1);\n\t\t$this->photo = $body['photos']['photo'][$num];\n\t}", "public function getPhoto($photo=null)\n {\n if ($photo != null && is_array($this->livres) && count($this->livres)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE photo = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$photo]);\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->photo;\n }\n \n }", "public function photo(){\n }", "public function getPhotos();", "public function getPhotoUrlAttribute()\n {\n return 'https://www.gravatar.com/avatar/' . md5(strtolower($this->email)) . '.jpg?s=200&d=mm';\n }", "static function changePhoto() {\n\t\t\n\t\t$case_intra = rcube_utils::get_input_value('photo_intra', RCUBE_INPUT_POST);\n\t\t$case_ader = rcube_utils::get_input_value('photo_ader', RCUBE_INPUT_POST);\n\n\t\t$info = array();\n\t\tif ( !empty($case_intra) && $case_intra == '1') {\n\t\t\t$info['mineqpublicationphotointranet'] = 1;\n\t\t} else {\n\t\t\t$info['mineqpublicationphotointranet'] = 0;\n\t\t}\n\t\t\n\t\tif ( !empty($case_ader) && $case_ader == '1' && !empty($case_intra) && $case_intra == '1')\n\t\t{\n\t\t\t$info['mineqpublicationphotoader'] = 1;\n\t\t} else {\n\t\t\t$info['mineqpublicationphotoader'] = 0;\n\t\t}\n\t\t\t\n\t\t$user_infos = melanie2::get_user_infos(Moncompte::get_current_user_name());\n\t\t\n\t\t$user_dn = $user_infos['dn'];\n\t\t$password = rcmail::get_instance()->get_user_password();\n\t\t\n\t\t$auth = Ldap::GetInstance(Config::$MASTER_LDAP)->authenticate($user_dn, $password);\n\t\t\n\t\tif(Ldap::GetInstance(Config::$MASTER_LDAP)->modify($user_dn, $info)) {\n\t\t\trcmail::get_instance()->output->show_message(rcmail::get_instance()->gettext('photo_pub_ok', 'melanie2_moncompte'), 'confirmation');\n\t\t} else {\n\t\t\t$err = Ldap::GetInstance(Config::$MASTER_LDAP)->getError();\n\t\t\trcmail::get_instance()->output->show_message(rcmail::get_instance()->gettext('photo_pub_nok', 'melanie2_moncompte') . $err, 'error');\n\t\t}\n\t\t\n\t}", "public function originalImage($override = true) {\n // check remote url is set\n $remote_url = $this->remote_url;\n if (empty($remote_url))\n throw new Exception ('Please set Remote Url first');\n \n // get file name\n $file_name = end(explode('/', $remote_url));\n \n // if we do not allow override, skip it\n if (!$override && is_file($this->original_img_dir.$file_name)) {\n //$this->log('Skip to copy original image '.$remote_url);\n return;\n } \n \n // proxy for external url \n $proxy = 'tcp://infpapxvip.it.unsw.edu.au:8080'; \n $aContext = array(\n 'http' => array(\n \t'proxy' => $proxy,\n \t'request_fulluri' => True,\n \t),\n ); \n $context = stream_context_create($aContext); \n \n // copy from remote\n if ($content = file_get_contents($remote_url, false, $context)) {\n if (file_put_contents($this->original_img_dir.$file_name, $content)) {\n //$this->log('Succeed to copy original image '.$remote_url);\n } else {\n throw new Exception ('Fail to copy remote image, '.$remote_url.' to '.$this->original_img_dir);\n }\n }\n else\n throw new Exception ('Can not get file from remote address: '.$remote_url);\n }", "public function getPhotoUrl()\n\t{\n if ($about = $this->getAbout()) {\n \t$ci =& get_instance();\n $ci->load->config('dir');\n $upload_path = $ci->config->item('upload_dir');\n\n\t\t\t$path = $upload_path . 'media/' . $about->photo; \n\n if (!file_exists($path) || $about->photo == '') {\n $url = base_url().BASE_IMG . 'user-photo.jpg';\n } else {\n $url = site_url($path);\n }\n }\t\n\n return $url;\t\n\t}", "public function getPhotoAttribute()\n {\n return $this->fetchFirstMedia()->file_url ?? \"\";\n }", "function getImage($row) {\n if ($row['image'] != '') {\n\t$result = '<a href=\"http://commons.wikimedia.org/wiki/File:' . rawurlencode($row['image']) . '\">';\n\t$result = $result . '<img src=\"' . getImageFromCommons(str_replace(' ', '_', $row['image']), 200) . '\" align=\"right\" />';\n\t$result = $result . '</a>';\n } else {\n\t$result = '<a href=\"' . makeUploadLink($row) .'\" title=\"Upload een zelfgemaakte foto van dit monument naar Commons\" target=\"_blank\">';\n\t$result = $result . '<img src=\"' . getImageFromCommons('Crystal_Clear_app_lphoto.png', 100) . '\" align=\"right\" />';\n\t$result = $result . '</a>';\n }\n return $result;\n}", "function test_img_external_source() {\n $links = array(\n 'external' => array(),\n 'internal' => array()\n );\n $posts = CompliantPost::published();\n\n foreach ( $posts as $post ) {\n foreach ( $post->embedded_images as $embedded_image ) {\n if ( $embedded_image->has_external_src() ) {\n $links['external'][] = $embedded_image->src;\n }\n else {\n $links['internal'][] = $embedded_image->src;\n }\n }\n }\n\n var_dump($links);\n }", "public function getPhotoByLikes($allPhotos)\n {\n return $allPhotos;\n \n }", "function the_attachment_link($post = 0, $fullsize = \\false, $deprecated = \\false, $permalink = \\false)\n {\n }", "function wpb_imagelink_setup() {\n\t$image_set = get_option( 'image_default_link_type' );\n\tif($image_set !== 'none') {\n\t\tupdate_option('image_default_link_type', 'none');\n\t}\n}", "public function picture_url() {\n return $this->_adaptee->user_photo(\"\", true);\n }", "public function resolveThumbnailUrl();", "function wpb_imagelink_setup() {\n\t$image_set = get_option( 'image_default_link_type' );\n\tif ($image_set !== 'none') {\n\t\tupdate_option('image_default_link_type', 'none');\n\t}\n}", "function wpb_imagelink_setup() {\n\t$image_set = get_option( 'image_default_link_type' );\n\tif ($image_set !== 'none') {\n\t\tupdate_option('image_default_link_type', 'none');\n\t}\n}", "function wpb_imagelink_setup() {\n\t$image_set = get_option( 'image_default_link_type' );\n\tif ($image_set !== 'none') {\n\t\tupdate_option('image_default_link_type', 'none');\n\t}\n}", "function get_correct_image_link_thumb($thumb_id='', $size='large'){\n\n if ($thumb_id != '') {\n $imagepermalink = wp_get_attachment_image_src($thumb_id, $size, true);\n } else {\n $imagepermalink[0] = get_stylesheet_directory_uri() . '/images/cover.jpg';\n }\n return $imagepermalink[0];\n}", "function company_photos()\n\t\t{\n\t\t\t$type = $this->uri->segment(5);\n\t\t\t$data = $this->photo->company_photos();\n\t\t\t$this->directPageDetails(\"gallery_company/list_photo_company\",\"\",$data);\n\t\t}", "function get_image_info_array($row) {\n\t\n\t$pic= array();\n\n\t$pic['url']= \"https://farm\" . $row['farm'] . \".static.flickr.com/\" . $row['server'] . \"/\" . $row['fid'] . \"_\" . $row['secret'] . \"_m.jpg\";\n\t\n\t// build link to flickr page for this photo\n\t$pic['link']=\"https://www.flickr.com/photos/\" . $row['nsid'] . \"/\" . $row['fid'] . \"/\";\n\t\n\t$pic['credit']=stripslashes($row['username']);\n\t\n\t// url for square icon\n\t$pic['sq'] = \"https://farm\" . $row['farm'] . \".static.flickr.com/\" . $row['server'] . \"/\" . $row['fid'] . \"_\" . $row['secret'] . \"_s_d.jpg\";\n\n\treturn $pic;\n\n}", "public function getImageUrl(bool $dummy = true)\n {\n $link = $this->link;\n return empty( $this->owner->$link ) ? ( $dummy ? $this->dummy_path : null ) : '/storage/' . $this->directory . '/' . $this->owner->$link;\n }", "function findPhoto($photo_id){\n\t\n}", "public function getProfilePhotoUrlAttribute(): string\n {\n return $this->profile_photo_path ?: $this->defaultProfilePhotoUrl();\n }", "public function getPhotoUrlAttribute()\n {\n return data_get($this, 'photo.s3url', 'https://s3.ap-southeast-1.amazonaws.com/flb-assets/static/parcels/medium.png');\n }", "function the_attachment_links($id = \\false)\n {\n }", "function add_photo($photo, $gallery) {\n\n $photo_post = array();\n $photo_post['post_title'] = $photo['title'];\n $photo_post['post_content'] = '';\n $photo_post['post_type'] = 'attachment';\n $photo_post['post_status'] = 'publish';\n $photo_post['post_author'] = $this->flickr_author;\n $photo_post['post_category'] = array($this->flickr_category, );\n $photo_post['post_mime_type'] = 'image/jpeg'; //assuming jpeg, is this ok?\n $photo_post['post_parent'] = $gallery['pageid'];\n if ($photo['url_o']) {\n $photo_post['guid'] = $photo['url_o']; //magically linking the photo\n } else {\n $photo_post['guid'] = $photo['url_m']; //for some reason url_o isnt always available\n }\n \n //$postid = wp_insert_post($photo_post);\n $postid = wp_insert_attachment($photo_post);\n /* Update metadata now */\n $this->set_metadata($postid, $photo);\n\n //now tag with mediatags\n wp_set_object_terms($postid, array($gallery['mediatag']), MEDIA_TAGS_TAXONOMY);\n\n //and we should be done. Horay!\n}", "public function getAllPhotos();", "protected function defaultProfilePhotoUrl()\n {\n return 'https://ui-avatars.com/api/?name='.urlencode($this->name).'&color=252f3f&background=EBF4FF';\n }", "function print_photo($table) {\n\n\t$html = \"<div class=\\\"div_class\\\" href=\\\"\" . $table['link'] . \"\\\">\\n\";\n\t$html .= \"\\t<img src=\\\"Images/\" . $table['photo'] . \"\\\">\";\n\t$html .= \"</div>\\n\";\n\n\treturn $html;\n\n}", "public function changePhotoAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET LISTING ID\n $this->view->listing_id = $listing_id = $this->_getParam('listing_id');\n\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET LISTING ITEM\n $this->view->sitereview = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n Engine_Api::_()->core()->setSubject($sitereview);\n //IF THERE IS NO SITEREVIEW.\n if (empty($sitereview)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n //GET LISTING TYPE ID\n $listingtype_id = $sitereview->listingtype_id;\n\n //SELECTED TAB\n $this->view->TabActive = \"profilepicture\";\n\n //CAN EDIT OR NOT\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\n return;\n }\n\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $allowed_upload_photo;\n }\n else\n $allowed_upload_photo = 0;\n }\n else\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n\n if (empty($allowed_upload_photo)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n //AUTHORIZATION CHECK\n Engine_Api::_()->sitereview()->setListingTypeInRegistry($listingtype_id);\n $listingType = Zend_Registry::get('listingtypeArray' . $listingtype_id);\n\n if ($listingType->photo_type != 'listing') {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n //GET FORM\n $this->view->form = $form = new Sitereview_Form_ChangePhoto();\n\n //CHECK FORM VALIDATION\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //CHECK FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //UPLOAD PHOTO\n if ($form->Filedata->getValue() !== null) {\n //GET DB\n $db = Engine_Api::_()->getDbTable('listings', 'sitereview')->getAdapter();\n $db->beginTransaction();\n //PROCESS\n try {\n //SET PHOTO\n $sitereview->setPhoto($form->Filedata);\n $db->commit();\n } catch (Engine_Image_Adapter_Exception $e) {\n $db->rollBack();\n $form->addError(Zend_Registry::get('Zend_Translate')->_('The uploaded file is not supported or is corrupt.'));\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n } else if ($form->getValue('coordinates') !== '') {\n $storage = Engine_Api::_()->storage();\n $iProfile = $storage->get($sitereview->photo_id, 'thumb.profile');\n $iSquare = $storage->get($sitereview->photo_id, 'thumb.icon');\n $pName = $iProfile->getStorageService()->temporary($iProfile);\n $iName = dirname($pName) . '/nis_' . basename($pName);\n list($x, $y, $w, $h) = explode(':', $form->getValue('coordinates'));\n $image = Engine_Image::factory();\n $image->open($pName)\n ->resample($x + .1, $y + .1, $w - .1, $h - .1, 48, 48)\n ->write($iName)\n ->destroy();\n $iSquare->store($iName);\n @unlink($iName);\n }\n\n $file_id = Engine_Api::_()->getDbtable('photos', 'sitereview')->getPhotoId($listing_id, $sitereview->photo_id);\n\n $photo = Engine_Api::_()->getItem('sitereview_photo', $file_id);\n\n if (!$sitereview->draft && time() >= strtotime($sitereview->creation_date)) {\n $action = Engine_Api::_()->getDbtable('actions', 'activity')->addActivity($viewer, $sitereview, 'sitereview_change_photo_listtype_' . $listingtype_id);\n\n if ($action != null) {\n Engine_Api::_()->getDbtable('actions', 'activity')->attachActivity($action, $photo);\n }\n }\n\n if (!empty($sitereview->photo_id)) {\n $photoTable = Engine_Api::_()->getItemTable('sitereview_photo');\n $order = $photoTable->select()\n ->from($photoTable->info('name'), array('order'))\n ->where('listing_id = ?', $sitereview->listing_id)\n ->group('photo_id')\n ->order('order ASC')\n ->limit(1)\n ->query()\n ->fetchColumn();\n\n $photoTable->update(array('order' => $order - 1), array('file_id = ?' => $sitereview->photo_id));\n }\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'change-photo', 'listing_id' => $listing_id), \"sitereview_dashboard_listtype_$listingtype_id\", true);\n }", "public function getProfilePhotoUrlAttribute()\n {\n return $this->profile_photo_path\n ? Storage::disk($this->profilePhotoDisk())->url($this->profile_photo_path)\n : $this->defaultProfilePhotoUrl();\n }", "function wp_get_attachment_link($post = 0, $size = 'thumbnail', $permalink = \\false, $icon = \\false, $text = \\false, $attr = '')\n {\n }", "public function get_image_url()\n {\n }", "public function photo()\n {\n \treturn $this->article->photos->first();\n }", "public function addPhoto($value)\n {\n $this->photos[] = $value;\n }", "public function setPhoto($photo)\n {\n $this->photo = $photo;\n\n return $this;\n }", "function asu_isearch_fetch_profile_photo($data) {\n $photo_url = $data['photo_url'];\n $destination = $data['destination'];\n\n $entity = current(entity_load('node', array($data['entity'])));\n\n if (!$entity) {\n return;\n }\n\n // ensure the file is truly accessible\n $response = drupal_http_request($photo_url);\n if ($response->code == 200) {\n\n $file = FALSE;\n $photo_exists = file_exists($destination);\n\n // does the file already exist on the server?\n // if yes, associate it\n if ($photo_exists) {\n $file = current(entity_load('file', array(), array('uri' => $destination.'')));\n }\n\n if (!$photo_exists || filesize($destination) != $response->headers['content-length']) {\n $file = system_retrieve_file($photo_url, $destination, TRUE, $replace = FILE_EXISTS_REPLACE);\n }\n \n if ($file) {\n // Load the node so we can set\n $entity->field_isearch_photo_url[LANGUAGE_NONE][0]['fid'] = $file->fid;\n node_save($entity);\n }\n }\n}", "function getpexelsimages($arr_data)\n{\n require_once INCLUDES_DIR .'/api.php';\n $class = new RFI\\API\\API();\n $arr_pexels = json_decode($class->pexels($arr_data));\n $arr_pex=[];\n if (isset($arr_pexels->photos) && !empty($arr_pexels->photos)) {\n foreach ($arr_pexels->photos as $data) {\n $arr_pex[] = array(\n 'imageurl' => $data->src->large2x,\n 'imageurlsmall' => $data->src->medium,\n 'username' => $data->photographer,\n 'landing' => $data->url,\n 'userimage' => 'https://cdn.pixabay.com/photo/2017/07/18/23/23/user-2517433_960_720.png',\n 'credit' => 'pexels', \n 'userlink' => $data->photographer_url \n );\n }\n }\n return $arr_pex;\n}", "public function setPhotoUrl($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->photo_url !== $v) {\n\t\t\t$this->photo_url = $v;\n\t\t\t$this->modifiedColumns[] = PostPeer::PHOTO_URL;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function getImageUrl(){\n return $this->image_url;\n }", "protected function defaultProfilePhotoUrl(): string\n {\n return 'https://ui-avatars.com/api/?name='.urlencode($this->name).'&color=7F9CF5&background=EBF4FF';\n }", "function item_image_gallery($attrs = array(), $imageType = 'square_thumbnail', $filesShow = null, $item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n\n $files = $item->Files;\n if (!$files) {\n return '';\n }\n\n $defaultAttrs = array(\n 'wrapper' => array('id' => 'item-images'),\n 'linkWrapper' => array(),\n 'link' => array(),\n 'image' => array()\n );\n if ($filesShow === null) {\n $filesShow = get_option('link_to_file_metadata');\n }\n $attrs = array_merge($defaultAttrs, $attrs);\n\n $html = '';\n if ($attrs['wrapper'] !== null) {\n $html .= '<div ' . tag_attributes($attrs['wrapper']) . '>';\n }\n foreach ($files as $file) {\n if ($attrs['linkWrapper'] !== null) {\n $html .= '<div ' . tag_attributes($attrs['linkWrapper']) . '>';\n }\n\n $image = file_image($imageType, $attrs['image'], $file);\n if ($filesShow) {\n $html .= link_to($file, 'show', $image, $attrs['link']);\n } else {\n $linkAttrs = $attrs['link'] + array('href' => $file->getWebPath('original'));\n $html .= '<a ' . tag_attributes($linkAttrs) . '>' . $image . '</a>';\n }\n\n if ($attrs['linkWrapper'] !== null) {\n $html .= '</div>';\n }\n }\n if ($attrs['wrapper'] !== null) {\n $html .= '</div>';\n }\n return $html;\n}", "function the_picture_a( $args = array() ) {\n\techo get_picture_a( $args );\n}", "public function get_picture(){ return $this->_picture;}", "public function getRelativeLinkToImg()\n {\n return ImgUpload::getRelativeLinkToImg($this);\n }", "function h_entry_from_photo($url, $oldLocationFormat=true, $multiPhoto=false) {\n $entry = array(\n 'published' => null,\n 'location' => null,\n 'category' => array(),\n 'content' => '',\n 'syndication' => ''\n );\n\n if($oldLocationFormat)\n $entry['place_name'] = null;\n\n if(Config::$xray) {\n $http = new \\p3k\\HTTP(user_agent());\n $response = $http->get('https://'.Config::$xray.'/parse?'.http_build_query([\n 'url' => $url,\n 'instagram_session' => Config::$igCookie,\n ]));\n $data = json_decode($response['body'], true);\n } else {\n $xray = new p3k\\XRay();\n // Fetch the photo permalink, as well as associated profiles and locations\n $data = $xray->parse($url, [\n 'instagram_session' => Config::$igCookie\n ]);\n }\n\n if(!$data || $data['code'] != 200) {\n return null;\n }\n\n $photo = $data['data'];\n\n $entry['published'] = $photo['published'];\n\n // Add venue information if present\n if(!empty($photo['location'])) {\n $location = $photo['refs'][$photo['location'][0]];\n\n if($oldLocationFormat) {\n $entry['place_name'] = $location['name'];\n if(!empty($location['latitude'])) {\n $entry['location'] = 'geo:' . $location['latitude'] . ',' . $location['longitude'];\n }\n } else {\n $entry['location'] = [\n 'type' => ['h-card'],\n 'properties' => [\n 'name' => [$location['name']]\n ]\n ];\n if(!empty($location['latitude'])) {\n $entry['location']['properties']['latitude'] = [(string)$location['latitude']];\n $entry['location']['properties']['longitude'] = [(string)$location['longitude']];\n }\n }\n }\n\n if(isset($photo['content']))\n $entry['content'] = $photo['content']['text'];\n\n $entry['syndication'] = $url;\n\n if(!empty($photo['category']))\n $entry['category'] = $photo['category'];\n\n // Include the photo/video media URLs\n if(!empty($photo['video'])) {\n $entry['photo'] = $photo['photo'];\n $entry['video'] = $photo['video'];\n } else {\n $entry['photo'] = $photo['photo'];\n }\n\n $entry['author'] = $photo['author'];\n\n return $entry;\n}", "function btm_thumb_linksto(){\n\t global $post;\n\t $custom = get_post_custom($post->ID);\n\t $featured_image_link_to = $custom[\"featured_image_link_to\"][0];\n\t $featured_image_link_to_url = $custom[\"featured_image_link_to_url\"][0];\n\t ?>\n\t <p><?php _e('Choose on a post by post basis where the featured image thumbnails to link to.','btm'); ?></p>\n\t <p>\n\t <select name=\"featured_image_link_to\">\n\t \t<option value=''><?php _e('Default','btm'); ?></option>\n\t \t<?php\n\t \t\t$featured_image_link_to_options = array(\n\t \t\t\t'post' => __('Full Post','btm'),\n\t \t\t\t'image' => __('Image','btm')\t \t\t\t\n\t \t\t);\t\n\t\t\tforeach ( $featured_image_link_to_options as $k => $v ) {\n\t\t\t\tif ( $k == $featured_image_link_to ) { $sel = \" selected='selected'\"; }else{ $sel = \"\"; }\n\t\t\t \techo \"<option \" . $sel . \" value='\". $k .\"'>\" . $v . \"</option>\"; \n\t\t\t}\n\t \t?>\n\t\t</select>\n\t\t<em><?php _e('or','btm'); ?></em> <?php _e('Custom URL:','btm'); ?> <input type=\"text\" style='width:300px; border-style:solid; border-width:1px;' name=\"featured_image_link_to_url\" value=\"<?php echo $featured_image_link_to_url; ?>\" /> <?php _e('(Full URL - Video, External Page, etc...)','btm'); ?></p>\t\t\n\t <?php\n\t}", "public function setLinkImage($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->link_image !== $v) {\n\t\t\t$this->link_image = $v;\n\t\t\t$this->modifiedColumns[] = PostPeer::LINK_IMAGE;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setPhoto(Photo $photoObject);", "function _wp_image_meta_replace_original($saved_data, $original_file, $image_meta, $attachment_id)\n {\n }", "public function setPhoto(?string $photo)\n {\n $this->photo = $photo;\n\n return $this;\n }", "public function getImg()\n {\n return $this->imgLink;\n }", "function adapt_image( $id=0, $width=0, $height=0, $link=false, $attr=null, $circle=false, $blank=false ) {\n\n $html = '';\n\n if ( $circle !== false ) :\n if ( $width > $height ) : \n $width = $height;\n elseif ( $width <= $height ) : \n $height = $width;\n endif;\n\n $html .= '<div class=\"is-circle\">';\n endif;\n\n $link_attrs = $link ? \"href='{$link}'\" : \"href='#.'\";\n $link_attrs .= $blank ? \" target='_blank'\" : '';\n\n $html .= $link ? \"<a {$link_attrs}>\" : '';\n $html .= wp_get_attachment_image( $id, array( $width, $height ), true, $attr );\n $html .= $link ? '</a>' : '';\n\n if ( $circle !== false )\n $html .= '</div>'; \n\n}", "function use_the_attachment_image_nolink($size='thumbnail')\n{\tif ( $images = get_children(array(\n\t\t'post_parent' => get_the_ID(),\n\t\t'post_status' => 'inherit',\n\t\t'post_type' => 'attachment',\n\t\t'post_mime_type' => 'image',\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'numberposts' => 1)))\n\t{\t$permalink = get_permalink();\n\t\tforeach( $images as $image )\n\t\t{ echo wp_get_attachment_image($image->ID, $size, false); }\n\t}\n\telse {}\n}", "public function getImageUrl();", "function libravatar_lookup(array &$b)\n{\n\t$default_avatar = DI::config()->get('libravatar', 'default_avatar');\n\tif (empty($default_avatar)) {\n\t\t// if not set, look up if there was one from the gravatar addon\n\t\t$default_avatar = DI::config()->get('gravatar', 'default_avatar', 'identicon');\n\t}\n\n\trequire_once 'Services/Libravatar.php';\n\n\t$libravatar = new Services_Libravatar();\n\t$libravatar->setSize($b['size']);\n\t$libravatar->setDefault($default_avatar);\n\t$avatar_url = $libravatar->getUrl($b['email']);\n\n\t$b['url'] = $avatar_url;\n\t$b['success'] = true;\n}", "function opensky_islandora_solr_results_alter(&$object_results, $query_processor) {\n\n $default_path = drupal_get_path('module', 'islandora_solr') . '/images/defaultimg.png';\n foreach ($object_results as $object_index => $object_result) {\n if (isset ($object_results[$object_index]['thumbnail_url']) && $object_results[$object_index]['thumbnail_url'] == $default_path) {\n if (strpos($object_results[$object_index]['content_models'][0], 'citationCModel') !== false) {\n $object_results[$object_index]['thumbnail_url'] = drupal_get_path('module', 'opensky') . '/images/BiblioCitOnly.png';\n }\n }\n }\n}", "public function getProfilePhotoUrlAttribute(): string\n {\n return $this->profile_photo_path && $this->photoExists()\n ? Storage::disk($this->profilePhotoDisk())->url($this->profile_photo_path)\n : $this->filamentDefaultAvatar();\n }", "function addArticleImage($object) {\n /* you can itentify the article with $object->reference->ShopId */ \n $object->Item->ShopId = 'yourReturnedArticlebildIdOnMarketplace_'.rand(1000, 9999); \n}", "function get_attachment_link($post = \\null, $leavename = \\false)\n {\n }", "function photos_redirect() {\n\t\tif ( is_singular( 'um_user_photos' ) ) {\n\t\t\twp_redirect( home_url() );\n\t\t}\n\t}", "public function nextGetUrlAttribute()\n {\n $photoUrl = explode('/', $this->file_name);\n $photoUrl[0] = '/storage';\n $photoUrl = implode('/', $photoUrl);\n\n return $photoUrl;\n }", "public function Photo(){\n\t\t$photoId = \"491634914183411\";\n\t\t$imgInfo \t\t\t= 'https://graph.facebook.com/'.$photoId.'?access_token='.$this->session->userdata('oauth_token');\n\t\techo $imgInfo;\n\t}", "function get_image_send_to_editor($id, $caption, $title, $align, $url = '', $rel = \\false, $size = 'medium', $alt = '')\n {\n }", "function imageObj($OA) {\n \n // check isset\n if(!isset($OA['alt'])) $OA['alt'] = '';\n if(!isset($OA['file'])) $OA['file'] = '';\n if(!isset($OA['title'])) $OA['title'] = '';\n \n // wrap before\n if (isset($OA['wrapB'])) echo $OA['wrapB'].\"\\n\";\n \n // link begin\n if (isset($OA['link'])) {\n echo '<a href=\"'. $OA['link'] .'\"';\n if(isset($OA['linkT'])) echo ' target=\"'. $OA['linkT'] .'\"';\n echo '>';\n }\n \n // check for absolute path\n if (substr($OA['file'],0,4) == 'http') $pT = '';\n else $pT = THEMEPATH;\n \n // check width and height and echo tag\n if (isset($OA['width'])) {\n echo '<img src=\"'. $pT . $OA['file'] .'\"';\n if ($OA['width'] != 'auto') echo ' width=\"'. $OA['width'] .'\"';\n if ($OA['height'] != 'auto') echo ' height=\"'. $OA['height'] .'\"';\n echo ' alt=\"'. $OA['alt'] .'\"';\n if ($OA['title']) echo ' title=\"'. $OA['title'] .'\"';\n echo '>';\n } else {\n echo '<img src=\"'. $pT . $OA['file'] .'\" alt=\"'. $OA['alt'] .'\"';\n if ($OA['title']) echo ' title=\"'. $OA['title'] .'\"';\n echo '>';\n }\n \n // if 'link' exists\n if (isset($OA['link'])) echo '</a>';\n \n // 'wrap' after\n if (isset($OA['wrapA'])) echo \"\\n\".$OA['wrapA'];\n echo \"\\n\\n\";\n}" ]
[ "0.6520268", "0.62386245", "0.6188613", "0.6099768", "0.60065246", "0.58699924", "0.56690764", "0.56276137", "0.56235313", "0.56205916", "0.56147367", "0.55549306", "0.5525815", "0.55023104", "0.54522115", "0.5444897", "0.5418164", "0.54179925", "0.54162186", "0.5410759", "0.5409375", "0.5403165", "0.5400298", "0.5399964", "0.539904", "0.5397454", "0.53948367", "0.53885174", "0.5383221", "0.5383221", "0.53584754", "0.5335873", "0.53348565", "0.5331493", "0.53183997", "0.53010154", "0.52930903", "0.5282332", "0.5270811", "0.52647847", "0.52628607", "0.525996", "0.5251249", "0.5248872", "0.5235644", "0.52350414", "0.5233694", "0.5230739", "0.5225821", "0.52232677", "0.52232677", "0.52232677", "0.52225775", "0.52206063", "0.5219183", "0.52172166", "0.52090704", "0.5197061", "0.5187689", "0.51854396", "0.51706994", "0.5165907", "0.51599485", "0.51486886", "0.5128986", "0.5126136", "0.51235694", "0.511763", "0.51169515", "0.51166296", "0.51130116", "0.51123", "0.5109538", "0.51030886", "0.5100486", "0.50989693", "0.50773", "0.5063479", "0.5057995", "0.5056326", "0.50521445", "0.5045113", "0.5035786", "0.5031173", "0.5030691", "0.5029126", "0.5026798", "0.501519", "0.50080884", "0.50069535", "0.5004847", "0.500265", "0.49872687", "0.4982197", "0.4977584", "0.4975974", "0.49745074", "0.49655622", "0.49596715", "0.49567127" ]
0.59698683
5
Given the return array of a photo, override the link provided.
public function overrideFullUrl(array &$return) { foreach (self::VARIANT_2_SYM_PATH_FIELD as $variant => $field) { if ($this->$field != '') { // TODO: This could be avoided, if the original variant was also serialized into the sub-array 'sizeVariants', see comment in PhotoCast#toReturnArray if ($variant == Photo::VARIANT_ORIGINAL) { $return['full_url'] = Storage::drive('symbolic')->url($this->$field); } else { $return['sizeVariants'][$variant]['full_url'] = Storage::drive('symbolic')->url($this->$field); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPhotoLinkAttribute()\n {\n return $this->attributes['photo_link'] = ($this->photo)?Storage::disk('public')->url($this->photo):config('values.noPhoto');\n }", "public function get_image_link()\n {\n }", "public function getPhotoUrls () {\n\t\t\n\t}", "public function buildPhotoUrl () {\n\t\t\n\t}", "public function override(array &$return)\n\t{\n\t\tforeach (self::VARIANT_2_SYM_PATH_FIELD as $variant => $field) {\n\t\t\tif ($this->$field != '') {\n\t\t\t\t// TODO: This could be avoided, if the original variant was also serialized into the sub-array 'sizeVariants', see comment in PhotoCast#toReturnArray\n\t\t\t\tif ($variant == Photo::VARIANT_ORIGINAL) {\n\t\t\t\t\t$return['url'] = Storage::drive('symbolic')->url($this->$field);\n\t\t\t\t} else {\n\t\t\t\t\t$return['sizeVariants'][$variant]['url'] = Storage::drive('symbolic')->url($this->$field);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function print_link_photo($table) {\n\n\t$html = \"<a class=\\\"div_class\\\" href=\\\"\" . $table['link'] . \"\\\">\\n\";\n\t$html .= \"\\t<h3>\" . $table['titre'] . \"</h3>\\n\";\n\t$html .= \"\\t<div class=\\\"photo_text\\\">\\n\";\n\t$html .= \"\\t\\t<img src=\\\"Images/\" . $table['photo'] . \"\\\">\";\n\t$html .= \"\\t\\t<p>\" . $table['texte'] . \"</p>\\n\";\n\t$html .= \"\\t</div>\\n\";\n\t$html .= \"</a>\\n\";\n\n\treturn $html;\n}", "public function getPhotoLinkMiniAttribute()\n {\n return $this->attributes['photo_link_mini'] = ($this->photo)?Storage::disk('public')->url($this->photo_mini):config('values.noPhotoMini');\n }", "public function getPhotoUrl()\n {\n if (filter_var($this->photoUrl, FILTER_VALIDATE_URL)) {\n return $this->photoUrl;\n }\n\n if (null !== $this->photoUrl) {\n return \"/uploads/photos/$this->photoUrl\";\n }\n }", "public function processPhoto($aPhoto) {\n \t$aSizes = Phpfox::getParam('photo.photo_pic_sizes');\n \t$aPhoto['photo_sizes'] = array();\n \tforeach ($aSizes as $iSize) {\n \t\t$aPhoto['photo_sizes'][$iSize] = Phpfox::getLib('image.helper')->display(array(\n \t\t\t'file' => $aPhoto['destination'],\n \t\t\t'server_id' => $aPhoto['server_id'],\n \t\t\t'path' => 'photo.url_photo',\n\t\t 'suffix' => '_'. $iSize,\n\t\t 'return_url' => true\n \t\t));\n \t}\n \t$aPhoto['photo_origin'] = Phpfox::getLib('image.helper')->display(array(\n \t\t\t'file' => $aPhoto['destination'],\n \t\t\t'server_id' => $aPhoto['server_id'],\n \t\t\t'path' => 'photo.url_photo',\n\t\t 'return_url' => true\n \t));\n \t\n \t$aPhoto['time_phrase'] = Phpfox::getLib('date')->convertTime($aPhoto['time_stamp'], 'photo.photo_image_details_time_stamp');\n \t$aPhoto['item_id'] = $aPhoto['photo_id'];\n \t$aPhoto['full_url'] = Phpfox::callback('photo.getLink', $aPhoto);\n \t \n \treturn $aPhoto;\n }", "public function getPhotoUrl()\n\t{\n\t\treturn $this->photo_url;\n\t}", "public function setPhoto($photo)\n {\n $this->photo = 'https:' . $photo;\n\n return $this;\n }", "function imglink_default() {\n\t\t\t$image_set = get_site_option( 'image_default_link_type' );\n\t\t\tif ( $image_set !== 'none' ) {\n\t\t\t\tupdate_site_option( 'image_default_link_type', 'none' );\n\t\t\t}\n\t\t}", "function image_link($imagename) {\r\n if (is_null($this->imagepath[$imagename]))\r\n {\r\n\tif ($this->monda && ($imagename == \"rss\")) {\r\n\t $path = $this->siteurl . '/wp-includes/images/rss.png';\r\n\t} else {\r\n \t $path = $this->image_url . $imagename . '.png';\r\n\t}\r\n\tif (wp_remote_fopen($path)) {\r\n\t $this->imagepath[$imagename] = $path;\r\n\t}\r\n\telse {\r\n\t $this->imagepath[$imagename] = $this->image_url . 'unknown.png';\r\n\t}\r\n }\r\n return $this->imagepath[$imagename];\r\n }", "public function getLinkToImg()\n {\n return ImgUpload::getLinkToImg($this);\n }", "public function setPhoto($value)\n {\n $this->photo = $value;\n }", "public function setPhotos($value)\n {\n $this->photos = $value;\n }", "function remove_image_links() {\n update_option('image_default_link_type', 'none');\n}", "function get_display_photo(){\n\t$display_photo = get_profile( 'photo' );\n\tif ( empty($display_photo) || !file_exists(abspath('/contents/images/profile/'.$display_photo)) )\n\t\treturn false;\n\n\treturn get_image_link( \"/images/profile/$display_photo\", \"default\" );\n}", "function setPhoto($photo): string\n{\n if ($photo) {\n return \"/storage/{$photo}\";\n }\n return '/img/products/photo.png';\n}", "function bethel_filter_attachment_link_for_gallery ($link, $id, $size, $permalink, $icon, $text) {\n $original_url = wp_get_attachment_url ($id);\n $new_url = wp_get_attachment_image_src ($id, 'bethel_fullscreen');\n return str_replace($original_url, $new_url[0], $link);\n}", "function wpb_imagelink_setup() {\n $image_set = get_option( 'image_default_link_type' );\n if ($image_set !== 'none') {\n update_option('image_default_link_type', 'none');\n }\n}", "function imagelink_setup() {\n $image_set = get_option( 'image_default_link_type' );\n if ($image_set !== 'none') {\n update_option('image_default_link_type', 'none');\n }\n}", "function give_linked_images_class($html, $id, $caption, $title, $align, $url, $size, $alt = '' ){\n\t$rel = \"prettyPhoto\";\n \n\t// check if there are already rel assigned to the anchor\n\tif ( preg_match('/<a.*? rel=\".*?\">/', $html) ) {\n\t $html = preg_replace('/(<a.*? rel=\".*?)(\".*?>)/', '$1 ' . $rel . '$2', $html);\n\t} else {\n\t $html = preg_replace('/(<a.*?)>/', '$1 rel=\"' . $rel . '\" >', $html);\n\t}\n\treturn $html;\n }", "public function setPhoto($photo)\n {\n $this->photo = $photo;\n \n return $this;\n }", "public function new_gallery_shortcode_defaults( $output, $attr ) {\n $options = $this->options;\n if($options['file_link'] == 'true') {\n global $post;\n $attr = array(\n 'link' => 'file'\n );\n return $output;\n }\n }", "public function getLinkImage()\n\t{\n\t\treturn $this->link_image;\n\t}", "function rest_get_avatar_urls($id_or_email)\n {\n }", "public function getPhotoAttribute()\n {\n return empty($this->attributes['photo'])? \"/images/admin.jpg\" : $this->attributes['photo'];\n }", "public function setPhoto($photo)\n {\n // First checking for extension validity, including default value - default values are set before we approach setting ones passed by data array\n if(!in_array($photo, $this->extensions)) {\n // If extension is invalid we throw descriptive exception\n throw new Exception('Extension specified is not valid');\n }\n // if photo extension equals default value it's final value (which will be the path) is set to defined default value\n if($photo == self::DEFAULT_TEXT) {\n $this->_values['photo'] = self::PHOTO_FOLDER . self::DEFAULT_IMAGE;\n } else {\n // If everything is right and we got extension of the file from the database, we are setting up a link to photo\n $this->_values['photo'] = self::PHOTO_FOLDER . $this->_values['id'] . \".\" . $photo;\n }\n }", "public function setPhoto($photo)\n {\n // First checking for extension validity, including default value - default values are set before we approach setting ones passed by data array\n if(!in_array($photo, $this->extensions)) {\n // If extension is invalid we throw descriptive exception\n throw new Exception('Extension specified is not valid');\n }\n // if photo extension equals default value it's final value (which will be the path) is set to defined default value\n if($photo == self::DEFAULT_TEXT) {\n $this->_values['photo'] = self::PHOTO_FOLDER . self::DEFAULT_IMAGE;\n } else {\n // If everything is right and we got extension of the file from the database, we are setting up a link to photo\n $this->_values['photo'] = self::PHOTO_FOLDER . $this->_values['id'] . \".\" . $photo;\n }\n }", "function photo($thumb=true) {\n if (empty($this->main_photo)) {\n if ($this->page[\"Name\"] == \"\") $this->openpage (\"Name\",\"person\");\n if (preg_match('/\\<a name=\"headshot\".+\"(http:\\/\\/.+\\.jpg)\".+<\\/a>/',$this->page[\"Name\"],$match)) {\n if ($thumb) $this->main_photo = $match[1];\n else $this->main_photo = str_replace('_SY140_SX100', '_SY600_SX400',$match[1]);\n } else {\n return FALSE;\n }\n }\n return $this->main_photo;\n }", "public function getPhotoURL(){\r\n\t\t$photo = $this->getPhoto();\r\n\r\n\t\treturn $photo != null ? \"https://maps.googleapis.com/maps/api/place/photo?maxwidth=800&photoreference=\" . $photo . \"&key=\" . GOOGLE_MAPS_API_KEY_PRIVATE : null;\r\n\t}", "public function getPhotoUrlAttribute()\n {\n return asset(env('FRONTEND_IMAGES_PATH') . $this->image);\n }", "public function setPhotoData($body) {\n\t\t$cnt = count($body['photos']['photo']);\n\t\t$num = rand(0, $cnt-1);\n\t\t$this->photo = $body['photos']['photo'][$num];\n\t}", "public function getPhoto($photo=null)\n {\n if ($photo != null && is_array($this->livres) && count($this->livres)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE photo = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$photo]);\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->photo;\n }\n \n }", "public function photo(){\n }", "public function getPhotos();", "public function getPhotoUrlAttribute()\n {\n return 'https://www.gravatar.com/avatar/' . md5(strtolower($this->email)) . '.jpg?s=200&d=mm';\n }", "static function changePhoto() {\n\t\t\n\t\t$case_intra = rcube_utils::get_input_value('photo_intra', RCUBE_INPUT_POST);\n\t\t$case_ader = rcube_utils::get_input_value('photo_ader', RCUBE_INPUT_POST);\n\n\t\t$info = array();\n\t\tif ( !empty($case_intra) && $case_intra == '1') {\n\t\t\t$info['mineqpublicationphotointranet'] = 1;\n\t\t} else {\n\t\t\t$info['mineqpublicationphotointranet'] = 0;\n\t\t}\n\t\t\n\t\tif ( !empty($case_ader) && $case_ader == '1' && !empty($case_intra) && $case_intra == '1')\n\t\t{\n\t\t\t$info['mineqpublicationphotoader'] = 1;\n\t\t} else {\n\t\t\t$info['mineqpublicationphotoader'] = 0;\n\t\t}\n\t\t\t\n\t\t$user_infos = melanie2::get_user_infos(Moncompte::get_current_user_name());\n\t\t\n\t\t$user_dn = $user_infos['dn'];\n\t\t$password = rcmail::get_instance()->get_user_password();\n\t\t\n\t\t$auth = Ldap::GetInstance(Config::$MASTER_LDAP)->authenticate($user_dn, $password);\n\t\t\n\t\tif(Ldap::GetInstance(Config::$MASTER_LDAP)->modify($user_dn, $info)) {\n\t\t\trcmail::get_instance()->output->show_message(rcmail::get_instance()->gettext('photo_pub_ok', 'melanie2_moncompte'), 'confirmation');\n\t\t} else {\n\t\t\t$err = Ldap::GetInstance(Config::$MASTER_LDAP)->getError();\n\t\t\trcmail::get_instance()->output->show_message(rcmail::get_instance()->gettext('photo_pub_nok', 'melanie2_moncompte') . $err, 'error');\n\t\t}\n\t\t\n\t}", "public function originalImage($override = true) {\n // check remote url is set\n $remote_url = $this->remote_url;\n if (empty($remote_url))\n throw new Exception ('Please set Remote Url first');\n \n // get file name\n $file_name = end(explode('/', $remote_url));\n \n // if we do not allow override, skip it\n if (!$override && is_file($this->original_img_dir.$file_name)) {\n //$this->log('Skip to copy original image '.$remote_url);\n return;\n } \n \n // proxy for external url \n $proxy = 'tcp://infpapxvip.it.unsw.edu.au:8080'; \n $aContext = array(\n 'http' => array(\n \t'proxy' => $proxy,\n \t'request_fulluri' => True,\n \t),\n ); \n $context = stream_context_create($aContext); \n \n // copy from remote\n if ($content = file_get_contents($remote_url, false, $context)) {\n if (file_put_contents($this->original_img_dir.$file_name, $content)) {\n //$this->log('Succeed to copy original image '.$remote_url);\n } else {\n throw new Exception ('Fail to copy remote image, '.$remote_url.' to '.$this->original_img_dir);\n }\n }\n else\n throw new Exception ('Can not get file from remote address: '.$remote_url);\n }", "public function getPhotoUrl()\n\t{\n if ($about = $this->getAbout()) {\n \t$ci =& get_instance();\n $ci->load->config('dir');\n $upload_path = $ci->config->item('upload_dir');\n\n\t\t\t$path = $upload_path . 'media/' . $about->photo; \n\n if (!file_exists($path) || $about->photo == '') {\n $url = base_url().BASE_IMG . 'user-photo.jpg';\n } else {\n $url = site_url($path);\n }\n }\t\n\n return $url;\t\n\t}", "public function getPhotoAttribute()\n {\n return $this->fetchFirstMedia()->file_url ?? \"\";\n }", "function getImage($row) {\n if ($row['image'] != '') {\n\t$result = '<a href=\"http://commons.wikimedia.org/wiki/File:' . rawurlencode($row['image']) . '\">';\n\t$result = $result . '<img src=\"' . getImageFromCommons(str_replace(' ', '_', $row['image']), 200) . '\" align=\"right\" />';\n\t$result = $result . '</a>';\n } else {\n\t$result = '<a href=\"' . makeUploadLink($row) .'\" title=\"Upload een zelfgemaakte foto van dit monument naar Commons\" target=\"_blank\">';\n\t$result = $result . '<img src=\"' . getImageFromCommons('Crystal_Clear_app_lphoto.png', 100) . '\" align=\"right\" />';\n\t$result = $result . '</a>';\n }\n return $result;\n}", "function test_img_external_source() {\n $links = array(\n 'external' => array(),\n 'internal' => array()\n );\n $posts = CompliantPost::published();\n\n foreach ( $posts as $post ) {\n foreach ( $post->embedded_images as $embedded_image ) {\n if ( $embedded_image->has_external_src() ) {\n $links['external'][] = $embedded_image->src;\n }\n else {\n $links['internal'][] = $embedded_image->src;\n }\n }\n }\n\n var_dump($links);\n }", "public function getPhotoByLikes($allPhotos)\n {\n return $allPhotos;\n \n }", "function the_attachment_link($post = 0, $fullsize = \\false, $deprecated = \\false, $permalink = \\false)\n {\n }", "function wpb_imagelink_setup() {\n\t$image_set = get_option( 'image_default_link_type' );\n\tif($image_set !== 'none') {\n\t\tupdate_option('image_default_link_type', 'none');\n\t}\n}", "public function picture_url() {\n return $this->_adaptee->user_photo(\"\", true);\n }", "public function resolveThumbnailUrl();", "function wpb_imagelink_setup() {\n\t$image_set = get_option( 'image_default_link_type' );\n\tif ($image_set !== 'none') {\n\t\tupdate_option('image_default_link_type', 'none');\n\t}\n}", "function wpb_imagelink_setup() {\n\t$image_set = get_option( 'image_default_link_type' );\n\tif ($image_set !== 'none') {\n\t\tupdate_option('image_default_link_type', 'none');\n\t}\n}", "function wpb_imagelink_setup() {\n\t$image_set = get_option( 'image_default_link_type' );\n\tif ($image_set !== 'none') {\n\t\tupdate_option('image_default_link_type', 'none');\n\t}\n}", "function get_correct_image_link_thumb($thumb_id='', $size='large'){\n\n if ($thumb_id != '') {\n $imagepermalink = wp_get_attachment_image_src($thumb_id, $size, true);\n } else {\n $imagepermalink[0] = get_stylesheet_directory_uri() . '/images/cover.jpg';\n }\n return $imagepermalink[0];\n}", "function company_photos()\n\t\t{\n\t\t\t$type = $this->uri->segment(5);\n\t\t\t$data = $this->photo->company_photos();\n\t\t\t$this->directPageDetails(\"gallery_company/list_photo_company\",\"\",$data);\n\t\t}", "function get_image_info_array($row) {\n\t\n\t$pic= array();\n\n\t$pic['url']= \"https://farm\" . $row['farm'] . \".static.flickr.com/\" . $row['server'] . \"/\" . $row['fid'] . \"_\" . $row['secret'] . \"_m.jpg\";\n\t\n\t// build link to flickr page for this photo\n\t$pic['link']=\"https://www.flickr.com/photos/\" . $row['nsid'] . \"/\" . $row['fid'] . \"/\";\n\t\n\t$pic['credit']=stripslashes($row['username']);\n\t\n\t// url for square icon\n\t$pic['sq'] = \"https://farm\" . $row['farm'] . \".static.flickr.com/\" . $row['server'] . \"/\" . $row['fid'] . \"_\" . $row['secret'] . \"_s_d.jpg\";\n\n\treturn $pic;\n\n}", "public function getImageUrl(bool $dummy = true)\n {\n $link = $this->link;\n return empty( $this->owner->$link ) ? ( $dummy ? $this->dummy_path : null ) : '/storage/' . $this->directory . '/' . $this->owner->$link;\n }", "function findPhoto($photo_id){\n\t\n}", "public function getProfilePhotoUrlAttribute(): string\n {\n return $this->profile_photo_path ?: $this->defaultProfilePhotoUrl();\n }", "public function getPhotoUrlAttribute()\n {\n return data_get($this, 'photo.s3url', 'https://s3.ap-southeast-1.amazonaws.com/flb-assets/static/parcels/medium.png');\n }", "function the_attachment_links($id = \\false)\n {\n }", "function add_photo($photo, $gallery) {\n\n $photo_post = array();\n $photo_post['post_title'] = $photo['title'];\n $photo_post['post_content'] = '';\n $photo_post['post_type'] = 'attachment';\n $photo_post['post_status'] = 'publish';\n $photo_post['post_author'] = $this->flickr_author;\n $photo_post['post_category'] = array($this->flickr_category, );\n $photo_post['post_mime_type'] = 'image/jpeg'; //assuming jpeg, is this ok?\n $photo_post['post_parent'] = $gallery['pageid'];\n if ($photo['url_o']) {\n $photo_post['guid'] = $photo['url_o']; //magically linking the photo\n } else {\n $photo_post['guid'] = $photo['url_m']; //for some reason url_o isnt always available\n }\n \n //$postid = wp_insert_post($photo_post);\n $postid = wp_insert_attachment($photo_post);\n /* Update metadata now */\n $this->set_metadata($postid, $photo);\n\n //now tag with mediatags\n wp_set_object_terms($postid, array($gallery['mediatag']), MEDIA_TAGS_TAXONOMY);\n\n //and we should be done. Horay!\n}", "public function getAllPhotos();", "protected function defaultProfilePhotoUrl()\n {\n return 'https://ui-avatars.com/api/?name='.urlencode($this->name).'&color=252f3f&background=EBF4FF';\n }", "function print_photo($table) {\n\n\t$html = \"<div class=\\\"div_class\\\" href=\\\"\" . $table['link'] . \"\\\">\\n\";\n\t$html .= \"\\t<img src=\\\"Images/\" . $table['photo'] . \"\\\">\";\n\t$html .= \"</div>\\n\";\n\n\treturn $html;\n\n}", "public function changePhotoAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET LISTING ID\n $this->view->listing_id = $listing_id = $this->_getParam('listing_id');\n\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET LISTING ITEM\n $this->view->sitereview = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n Engine_Api::_()->core()->setSubject($sitereview);\n //IF THERE IS NO SITEREVIEW.\n if (empty($sitereview)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n //GET LISTING TYPE ID\n $listingtype_id = $sitereview->listingtype_id;\n\n //SELECTED TAB\n $this->view->TabActive = \"profilepicture\";\n\n //CAN EDIT OR NOT\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\n return;\n }\n\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $allowed_upload_photo;\n }\n else\n $allowed_upload_photo = 0;\n }\n else\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n\n if (empty($allowed_upload_photo)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n //AUTHORIZATION CHECK\n Engine_Api::_()->sitereview()->setListingTypeInRegistry($listingtype_id);\n $listingType = Zend_Registry::get('listingtypeArray' . $listingtype_id);\n\n if ($listingType->photo_type != 'listing') {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n //GET FORM\n $this->view->form = $form = new Sitereview_Form_ChangePhoto();\n\n //CHECK FORM VALIDATION\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //CHECK FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //UPLOAD PHOTO\n if ($form->Filedata->getValue() !== null) {\n //GET DB\n $db = Engine_Api::_()->getDbTable('listings', 'sitereview')->getAdapter();\n $db->beginTransaction();\n //PROCESS\n try {\n //SET PHOTO\n $sitereview->setPhoto($form->Filedata);\n $db->commit();\n } catch (Engine_Image_Adapter_Exception $e) {\n $db->rollBack();\n $form->addError(Zend_Registry::get('Zend_Translate')->_('The uploaded file is not supported or is corrupt.'));\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n } else if ($form->getValue('coordinates') !== '') {\n $storage = Engine_Api::_()->storage();\n $iProfile = $storage->get($sitereview->photo_id, 'thumb.profile');\n $iSquare = $storage->get($sitereview->photo_id, 'thumb.icon');\n $pName = $iProfile->getStorageService()->temporary($iProfile);\n $iName = dirname($pName) . '/nis_' . basename($pName);\n list($x, $y, $w, $h) = explode(':', $form->getValue('coordinates'));\n $image = Engine_Image::factory();\n $image->open($pName)\n ->resample($x + .1, $y + .1, $w - .1, $h - .1, 48, 48)\n ->write($iName)\n ->destroy();\n $iSquare->store($iName);\n @unlink($iName);\n }\n\n $file_id = Engine_Api::_()->getDbtable('photos', 'sitereview')->getPhotoId($listing_id, $sitereview->photo_id);\n\n $photo = Engine_Api::_()->getItem('sitereview_photo', $file_id);\n\n if (!$sitereview->draft && time() >= strtotime($sitereview->creation_date)) {\n $action = Engine_Api::_()->getDbtable('actions', 'activity')->addActivity($viewer, $sitereview, 'sitereview_change_photo_listtype_' . $listingtype_id);\n\n if ($action != null) {\n Engine_Api::_()->getDbtable('actions', 'activity')->attachActivity($action, $photo);\n }\n }\n\n if (!empty($sitereview->photo_id)) {\n $photoTable = Engine_Api::_()->getItemTable('sitereview_photo');\n $order = $photoTable->select()\n ->from($photoTable->info('name'), array('order'))\n ->where('listing_id = ?', $sitereview->listing_id)\n ->group('photo_id')\n ->order('order ASC')\n ->limit(1)\n ->query()\n ->fetchColumn();\n\n $photoTable->update(array('order' => $order - 1), array('file_id = ?' => $sitereview->photo_id));\n }\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'change-photo', 'listing_id' => $listing_id), \"sitereview_dashboard_listtype_$listingtype_id\", true);\n }", "public function getProfilePhotoUrlAttribute()\n {\n return $this->profile_photo_path\n ? Storage::disk($this->profilePhotoDisk())->url($this->profile_photo_path)\n : $this->defaultProfilePhotoUrl();\n }", "function wp_get_attachment_link($post = 0, $size = 'thumbnail', $permalink = \\false, $icon = \\false, $text = \\false, $attr = '')\n {\n }", "public function get_image_url()\n {\n }", "public function photo()\n {\n \treturn $this->article->photos->first();\n }", "public function addPhoto($value)\n {\n $this->photos[] = $value;\n }", "public function setPhoto($photo)\n {\n $this->photo = $photo;\n\n return $this;\n }", "function asu_isearch_fetch_profile_photo($data) {\n $photo_url = $data['photo_url'];\n $destination = $data['destination'];\n\n $entity = current(entity_load('node', array($data['entity'])));\n\n if (!$entity) {\n return;\n }\n\n // ensure the file is truly accessible\n $response = drupal_http_request($photo_url);\n if ($response->code == 200) {\n\n $file = FALSE;\n $photo_exists = file_exists($destination);\n\n // does the file already exist on the server?\n // if yes, associate it\n if ($photo_exists) {\n $file = current(entity_load('file', array(), array('uri' => $destination.'')));\n }\n\n if (!$photo_exists || filesize($destination) != $response->headers['content-length']) {\n $file = system_retrieve_file($photo_url, $destination, TRUE, $replace = FILE_EXISTS_REPLACE);\n }\n \n if ($file) {\n // Load the node so we can set\n $entity->field_isearch_photo_url[LANGUAGE_NONE][0]['fid'] = $file->fid;\n node_save($entity);\n }\n }\n}", "function getpexelsimages($arr_data)\n{\n require_once INCLUDES_DIR .'/api.php';\n $class = new RFI\\API\\API();\n $arr_pexels = json_decode($class->pexels($arr_data));\n $arr_pex=[];\n if (isset($arr_pexels->photos) && !empty($arr_pexels->photos)) {\n foreach ($arr_pexels->photos as $data) {\n $arr_pex[] = array(\n 'imageurl' => $data->src->large2x,\n 'imageurlsmall' => $data->src->medium,\n 'username' => $data->photographer,\n 'landing' => $data->url,\n 'userimage' => 'https://cdn.pixabay.com/photo/2017/07/18/23/23/user-2517433_960_720.png',\n 'credit' => 'pexels', \n 'userlink' => $data->photographer_url \n );\n }\n }\n return $arr_pex;\n}", "public function setPhotoUrl($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->photo_url !== $v) {\n\t\t\t$this->photo_url = $v;\n\t\t\t$this->modifiedColumns[] = PostPeer::PHOTO_URL;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function getImageUrl(){\n return $this->image_url;\n }", "protected function defaultProfilePhotoUrl(): string\n {\n return 'https://ui-avatars.com/api/?name='.urlencode($this->name).'&color=7F9CF5&background=EBF4FF';\n }", "function item_image_gallery($attrs = array(), $imageType = 'square_thumbnail', $filesShow = null, $item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n\n $files = $item->Files;\n if (!$files) {\n return '';\n }\n\n $defaultAttrs = array(\n 'wrapper' => array('id' => 'item-images'),\n 'linkWrapper' => array(),\n 'link' => array(),\n 'image' => array()\n );\n if ($filesShow === null) {\n $filesShow = get_option('link_to_file_metadata');\n }\n $attrs = array_merge($defaultAttrs, $attrs);\n\n $html = '';\n if ($attrs['wrapper'] !== null) {\n $html .= '<div ' . tag_attributes($attrs['wrapper']) . '>';\n }\n foreach ($files as $file) {\n if ($attrs['linkWrapper'] !== null) {\n $html .= '<div ' . tag_attributes($attrs['linkWrapper']) . '>';\n }\n\n $image = file_image($imageType, $attrs['image'], $file);\n if ($filesShow) {\n $html .= link_to($file, 'show', $image, $attrs['link']);\n } else {\n $linkAttrs = $attrs['link'] + array('href' => $file->getWebPath('original'));\n $html .= '<a ' . tag_attributes($linkAttrs) . '>' . $image . '</a>';\n }\n\n if ($attrs['linkWrapper'] !== null) {\n $html .= '</div>';\n }\n }\n if ($attrs['wrapper'] !== null) {\n $html .= '</div>';\n }\n return $html;\n}", "function the_picture_a( $args = array() ) {\n\techo get_picture_a( $args );\n}", "public function get_picture(){ return $this->_picture;}", "public function getRelativeLinkToImg()\n {\n return ImgUpload::getRelativeLinkToImg($this);\n }", "function h_entry_from_photo($url, $oldLocationFormat=true, $multiPhoto=false) {\n $entry = array(\n 'published' => null,\n 'location' => null,\n 'category' => array(),\n 'content' => '',\n 'syndication' => ''\n );\n\n if($oldLocationFormat)\n $entry['place_name'] = null;\n\n if(Config::$xray) {\n $http = new \\p3k\\HTTP(user_agent());\n $response = $http->get('https://'.Config::$xray.'/parse?'.http_build_query([\n 'url' => $url,\n 'instagram_session' => Config::$igCookie,\n ]));\n $data = json_decode($response['body'], true);\n } else {\n $xray = new p3k\\XRay();\n // Fetch the photo permalink, as well as associated profiles and locations\n $data = $xray->parse($url, [\n 'instagram_session' => Config::$igCookie\n ]);\n }\n\n if(!$data || $data['code'] != 200) {\n return null;\n }\n\n $photo = $data['data'];\n\n $entry['published'] = $photo['published'];\n\n // Add venue information if present\n if(!empty($photo['location'])) {\n $location = $photo['refs'][$photo['location'][0]];\n\n if($oldLocationFormat) {\n $entry['place_name'] = $location['name'];\n if(!empty($location['latitude'])) {\n $entry['location'] = 'geo:' . $location['latitude'] . ',' . $location['longitude'];\n }\n } else {\n $entry['location'] = [\n 'type' => ['h-card'],\n 'properties' => [\n 'name' => [$location['name']]\n ]\n ];\n if(!empty($location['latitude'])) {\n $entry['location']['properties']['latitude'] = [(string)$location['latitude']];\n $entry['location']['properties']['longitude'] = [(string)$location['longitude']];\n }\n }\n }\n\n if(isset($photo['content']))\n $entry['content'] = $photo['content']['text'];\n\n $entry['syndication'] = $url;\n\n if(!empty($photo['category']))\n $entry['category'] = $photo['category'];\n\n // Include the photo/video media URLs\n if(!empty($photo['video'])) {\n $entry['photo'] = $photo['photo'];\n $entry['video'] = $photo['video'];\n } else {\n $entry['photo'] = $photo['photo'];\n }\n\n $entry['author'] = $photo['author'];\n\n return $entry;\n}", "function btm_thumb_linksto(){\n\t global $post;\n\t $custom = get_post_custom($post->ID);\n\t $featured_image_link_to = $custom[\"featured_image_link_to\"][0];\n\t $featured_image_link_to_url = $custom[\"featured_image_link_to_url\"][0];\n\t ?>\n\t <p><?php _e('Choose on a post by post basis where the featured image thumbnails to link to.','btm'); ?></p>\n\t <p>\n\t <select name=\"featured_image_link_to\">\n\t \t<option value=''><?php _e('Default','btm'); ?></option>\n\t \t<?php\n\t \t\t$featured_image_link_to_options = array(\n\t \t\t\t'post' => __('Full Post','btm'),\n\t \t\t\t'image' => __('Image','btm')\t \t\t\t\n\t \t\t);\t\n\t\t\tforeach ( $featured_image_link_to_options as $k => $v ) {\n\t\t\t\tif ( $k == $featured_image_link_to ) { $sel = \" selected='selected'\"; }else{ $sel = \"\"; }\n\t\t\t \techo \"<option \" . $sel . \" value='\". $k .\"'>\" . $v . \"</option>\"; \n\t\t\t}\n\t \t?>\n\t\t</select>\n\t\t<em><?php _e('or','btm'); ?></em> <?php _e('Custom URL:','btm'); ?> <input type=\"text\" style='width:300px; border-style:solid; border-width:1px;' name=\"featured_image_link_to_url\" value=\"<?php echo $featured_image_link_to_url; ?>\" /> <?php _e('(Full URL - Video, External Page, etc...)','btm'); ?></p>\t\t\n\t <?php\n\t}", "public function setLinkImage($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->link_image !== $v) {\n\t\t\t$this->link_image = $v;\n\t\t\t$this->modifiedColumns[] = PostPeer::LINK_IMAGE;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setPhoto(Photo $photoObject);", "function _wp_image_meta_replace_original($saved_data, $original_file, $image_meta, $attachment_id)\n {\n }", "public function setPhoto(?string $photo)\n {\n $this->photo = $photo;\n\n return $this;\n }", "public function getImg()\n {\n return $this->imgLink;\n }", "function adapt_image( $id=0, $width=0, $height=0, $link=false, $attr=null, $circle=false, $blank=false ) {\n\n $html = '';\n\n if ( $circle !== false ) :\n if ( $width > $height ) : \n $width = $height;\n elseif ( $width <= $height ) : \n $height = $width;\n endif;\n\n $html .= '<div class=\"is-circle\">';\n endif;\n\n $link_attrs = $link ? \"href='{$link}'\" : \"href='#.'\";\n $link_attrs .= $blank ? \" target='_blank'\" : '';\n\n $html .= $link ? \"<a {$link_attrs}>\" : '';\n $html .= wp_get_attachment_image( $id, array( $width, $height ), true, $attr );\n $html .= $link ? '</a>' : '';\n\n if ( $circle !== false )\n $html .= '</div>'; \n\n}", "function use_the_attachment_image_nolink($size='thumbnail')\n{\tif ( $images = get_children(array(\n\t\t'post_parent' => get_the_ID(),\n\t\t'post_status' => 'inherit',\n\t\t'post_type' => 'attachment',\n\t\t'post_mime_type' => 'image',\n\t\t'order' => 'ASC',\n\t\t'orderby' => 'menu_order ID',\n\t\t'numberposts' => 1)))\n\t{\t$permalink = get_permalink();\n\t\tforeach( $images as $image )\n\t\t{ echo wp_get_attachment_image($image->ID, $size, false); }\n\t}\n\telse {}\n}", "public function getImageUrl();", "function libravatar_lookup(array &$b)\n{\n\t$default_avatar = DI::config()->get('libravatar', 'default_avatar');\n\tif (empty($default_avatar)) {\n\t\t// if not set, look up if there was one from the gravatar addon\n\t\t$default_avatar = DI::config()->get('gravatar', 'default_avatar', 'identicon');\n\t}\n\n\trequire_once 'Services/Libravatar.php';\n\n\t$libravatar = new Services_Libravatar();\n\t$libravatar->setSize($b['size']);\n\t$libravatar->setDefault($default_avatar);\n\t$avatar_url = $libravatar->getUrl($b['email']);\n\n\t$b['url'] = $avatar_url;\n\t$b['success'] = true;\n}", "function opensky_islandora_solr_results_alter(&$object_results, $query_processor) {\n\n $default_path = drupal_get_path('module', 'islandora_solr') . '/images/defaultimg.png';\n foreach ($object_results as $object_index => $object_result) {\n if (isset ($object_results[$object_index]['thumbnail_url']) && $object_results[$object_index]['thumbnail_url'] == $default_path) {\n if (strpos($object_results[$object_index]['content_models'][0], 'citationCModel') !== false) {\n $object_results[$object_index]['thumbnail_url'] = drupal_get_path('module', 'opensky') . '/images/BiblioCitOnly.png';\n }\n }\n }\n}", "public function getProfilePhotoUrlAttribute(): string\n {\n return $this->profile_photo_path && $this->photoExists()\n ? Storage::disk($this->profilePhotoDisk())->url($this->profile_photo_path)\n : $this->filamentDefaultAvatar();\n }", "function addArticleImage($object) {\n /* you can itentify the article with $object->reference->ShopId */ \n $object->Item->ShopId = 'yourReturnedArticlebildIdOnMarketplace_'.rand(1000, 9999); \n}", "function get_attachment_link($post = \\null, $leavename = \\false)\n {\n }", "function photos_redirect() {\n\t\tif ( is_singular( 'um_user_photos' ) ) {\n\t\t\twp_redirect( home_url() );\n\t\t}\n\t}", "public function nextGetUrlAttribute()\n {\n $photoUrl = explode('/', $this->file_name);\n $photoUrl[0] = '/storage';\n $photoUrl = implode('/', $photoUrl);\n\n return $photoUrl;\n }", "public function Photo(){\n\t\t$photoId = \"491634914183411\";\n\t\t$imgInfo \t\t\t= 'https://graph.facebook.com/'.$photoId.'?access_token='.$this->session->userdata('oauth_token');\n\t\techo $imgInfo;\n\t}", "function get_image_send_to_editor($id, $caption, $title, $align, $url = '', $rel = \\false, $size = 'medium', $alt = '')\n {\n }", "function imageObj($OA) {\n \n // check isset\n if(!isset($OA['alt'])) $OA['alt'] = '';\n if(!isset($OA['file'])) $OA['file'] = '';\n if(!isset($OA['title'])) $OA['title'] = '';\n \n // wrap before\n if (isset($OA['wrapB'])) echo $OA['wrapB'].\"\\n\";\n \n // link begin\n if (isset($OA['link'])) {\n echo '<a href=\"'. $OA['link'] .'\"';\n if(isset($OA['linkT'])) echo ' target=\"'. $OA['linkT'] .'\"';\n echo '>';\n }\n \n // check for absolute path\n if (substr($OA['file'],0,4) == 'http') $pT = '';\n else $pT = THEMEPATH;\n \n // check width and height and echo tag\n if (isset($OA['width'])) {\n echo '<img src=\"'. $pT . $OA['file'] .'\"';\n if ($OA['width'] != 'auto') echo ' width=\"'. $OA['width'] .'\"';\n if ($OA['height'] != 'auto') echo ' height=\"'. $OA['height'] .'\"';\n echo ' alt=\"'. $OA['alt'] .'\"';\n if ($OA['title']) echo ' title=\"'. $OA['title'] .'\"';\n echo '>';\n } else {\n echo '<img src=\"'. $pT . $OA['file'] .'\" alt=\"'. $OA['alt'] .'\"';\n if ($OA['title']) echo ' title=\"'. $OA['title'] .'\"';\n echo '>';\n }\n \n // if 'link' exists\n if (isset($OA['link'])) echo '</a>';\n \n // 'wrap' after\n if (isset($OA['wrapA'])) echo \"\\n\".$OA['wrapA'];\n echo \"\\n\\n\";\n}" ]
[ "0.6520268", "0.62386245", "0.6188613", "0.60065246", "0.59698683", "0.58699924", "0.56690764", "0.56276137", "0.56235313", "0.56205916", "0.56147367", "0.55549306", "0.5525815", "0.55023104", "0.54522115", "0.5444897", "0.5418164", "0.54179925", "0.54162186", "0.5410759", "0.5409375", "0.5403165", "0.5400298", "0.5399964", "0.539904", "0.5397454", "0.53948367", "0.53885174", "0.5383221", "0.5383221", "0.53584754", "0.5335873", "0.53348565", "0.5331493", "0.53183997", "0.53010154", "0.52930903", "0.5282332", "0.5270811", "0.52647847", "0.52628607", "0.525996", "0.5251249", "0.5248872", "0.5235644", "0.52350414", "0.5233694", "0.5230739", "0.5225821", "0.52232677", "0.52232677", "0.52232677", "0.52225775", "0.52206063", "0.5219183", "0.52172166", "0.52090704", "0.5197061", "0.5187689", "0.51854396", "0.51706994", "0.5165907", "0.51599485", "0.51486886", "0.5128986", "0.5126136", "0.51235694", "0.511763", "0.51169515", "0.51166296", "0.51130116", "0.51123", "0.5109538", "0.51030886", "0.5100486", "0.50989693", "0.50773", "0.5063479", "0.5057995", "0.5056326", "0.50521445", "0.5045113", "0.5035786", "0.5031173", "0.5030691", "0.5029126", "0.5026798", "0.501519", "0.50080884", "0.50069535", "0.5004847", "0.500265", "0.49872687", "0.4982197", "0.4977584", "0.4975974", "0.49745074", "0.49655622", "0.49596715", "0.49567127" ]
0.6099768
3
Returns the relative symlinked path of a particular size variant, if it exists.
public function get(string $sizeVariant): string { $field = self::VARIANT_2_SYM_PATH_FIELD[$sizeVariant]; if ($this->$field != '') { return Storage::drive('symbolic')->url($this->$field); } else { return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPath($size){\n\n\t\tif($size=='full'){\n\t\t\treturn $this->getFilePath();\n\t\t}else {\n\n\t\t\tif (array_key_exists($size, Config::get('image.sizes'))) {\n\n\t\t\t\t$parts = explode('.', $this->value);\n\t\t\t\tarray_pop($parts);\n\n\t\t\t\treturn static::getMediaPath() . '/' . implode('.', $parts) . '_' . $size . '.' . $this->getExtension();\n\n\t\t\t} else {\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\t}", "public function getShortPathOfPhoto(object $photo, int $variant): string\n\t{\n\t\t$origFilename = $photo->url;\n\t\t$thumbFilename = $photo->thumbUrl;\n\t\t$thumbFilename2x = $this->add2xToFilename($thumbFilename);\n\t\t$otherFilename = ($this->isVideo($photo) || $this->isRaw($photo)) ? $thumbFilename : $origFilename;\n\t\t$otherFilename2x = $this->add2xToFilename($otherFilename);\n\t\tswitch ($variant) {\n\t\t\tcase self::VARIANT_THUMB:\n\t\t\t\t$filename = $thumbFilename;\n\t\t\t\tbreak;\n\t\t\tcase self::VARIANT_THUMB2X:\n\t\t\t\t$filename = $thumbFilename2x;\n\t\t\t\tbreak;\n\t\t\tcase self::VARIANT_SMALL:\n\t\t\tcase self::VARIANT_MEDIUM:\n\t\t\t\t$filename = $otherFilename;\n\t\t\t\tbreak;\n\t\t\tcase self::VARIANT_SMALL2X:\n\t\t\tcase self::VARIANT_MEDIUM2X:\n\t\t\t\t$filename = $otherFilename2x;\n\t\t\t\tbreak;\n\t\t\tcase self::VARIANT_ORIGINAL:\n\t\t\t\t$filename = $origFilename;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new InvalidArgumentException('Invalid size variant: ' . $variant);\n\t\t}\n\t\t$directory = self::VARIANT_2_PATH_PREFIX[$variant] . '/';\n\t\tif ($variant === self::VARIANT_ORIGINAL && $this->isRaw($photo)) {\n\t\t\t$directory = 'raw/';\n\t\t}\n\n\t\treturn $directory . $filename;\n\t}", "public function getRelativeLinkToThumbnailImg($size)\n {\n return ImgUpload::getRelativeLinkToThumbnailImg($this, $size);\n }", "public function get_thumb_path($size)\n\t{\n\t\t$path = Assets_helper::ensure_cache_path('assets/thumbs/'.$this->file_id);\n\n\t\treturn $path.$this->file_id.'_'.$size.'.'.$this->extension();\n\t}", "public function getSmallFileHref()\n\t{\n\t\treturn Core_File::isValidExtension($this->file, Core_File::getResizeExtensions())\n\t\t\t? '/' . $this->_href . 'small_' . $this->file\n\t\t\t: NULL;\n\t}", "function getResponsiveLink($size) {\n\t\t// don't scale up\n\t\tif ($this->getWidth() > $size) {\n\t\t\t$resized = $this->getImageByWidth($size);\n\t\t\t$link = $resized->Link();\n\t\t} \n\t\t\n\t\t// let the browser scale\n\t\telse {\n\t\t\t$link = $this->Link();\n\t\t}\n\n\t\treturn $link;\n\t}", "public function fullPath($size = \"small\") {\n $path = \"\";\n $image = \"NoImage.png\";\n if(!empty($this->image_dir)){\n $path = '../files/images/image_file/' . $this->image_dir . DS;\n }\n if(!empty($this->image_file)){\n $image = $size . '_' . $this->image_file;\n }\n return $path . $image;\n }", "public function getSmallFilePath()\n\t{\n\t\treturn Core_File::isValidExtension($this->file, Core_File::getResizeExtensions())\n\t\t\t? $this->_dir . 'small_' . $this->file\n\t\t\t: NULL;\n\t}", "public function getThumbUrl($size = null)\n\t{\n\t\treturn false;\n\t}", "public function getFilePath($size = null)\n {\n if(!is_null($size)){\n return self::IMAGES_DIR.explode(\".\",$this->filename)[0].'/'.$size.'/';\n } else {\n return self::IMAGES_DIR.explode(\".\",$this->filename)[0].'/';\n }\n }", "public function get_thumb_relative_path(){\n\t\treturn $this->dir . '/' . $this->get_thumb_name();\n\t}", "protected function fullPath()\n {\n\n if ( $this->is_external )\n {\n if ( $this->path )\n {\n $ph = '/' . $this->path;\n } else {\n $ph = null;\n }\n\n return $this->external_url . $ph;\n } else {\n\n // switch the disk\n switch ( $this->disk )\n {\n case 'local':\n\n return Config::get('app.url') . '/' . $this->path;\n break;\n\n case 's3':\n return Config::get('photos.storage_path') . '/' . $this->path;\n break;\n }\n }\n }", "public function getUri($size){\n\t\tif($size=='full'){\n\t\t\treturn $this->getFileUri();\n\t\t}else {\n\t\t\tif(array_key_exists($size,Config::get('image.sizes'))){\n\t\t\t\t$parts = explode('.',$this->value);\n\t\t\t\tarray_pop($parts);\n\t\t\t\treturn static::getMediaUri() . '/' . implode('.',$parts) . '_' . $size . '.' . $this->getExtension();\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public function getImageURL($size = 'original') {\n\t\treturn $this->_config['images']['base_url'] . $size;\n\t}", "function isSymlink($id) {\n\t\tif(isset($this->myelements[$id]['symlink']) && $this->myelements[$id]['symlink'] != \"\" && $this->myelements[$id]['symlink'] != \"0\") {\n\t\t\treturn $this->myelements[$id]['symlink'];\n\t\t}\n\n\t\treturn 0;\n\t}", "public function getThumbServerPath(AssetFileModel $fileModel, $size)\n\t{\n\t\t$thumbFolder = craft()->path->getAssetsThumbsPath().$size.'/';\n\t\tIOHelper::ensureFolderExists($thumbFolder);\n\n\t\t$extension = $this->_getThumbExtension($fileModel);\n\n\t\t$thumbPath = $thumbFolder.$fileModel->id.'.'.$extension;\n\n\t\tif (!IOHelper::fileExists($thumbPath))\n\t\t{\n\t\t\t$imageSource = $this->getLocalImageSource($fileModel);\n\n\t\t\tcraft()->images->loadImage($imageSource)\n\t\t\t\t->scaleToFit($size)\n\t\t\t\t->saveAs($thumbPath);\n\n\t\t\tif (craft()->assetSources->populateSourceType($fileModel->getSource())->isRemote())\n\t\t\t{\n\t\t\t\t$this->queueSourceForDeletingIfNecessary($imageSource);\n\t\t\t}\n\t\t}\n\n\t\treturn $thumbPath;\n\t}", "function realPath($path, $relative_to = NULL, $resolve_symlink = TRUE);", "function createNavigationURLSize($galleryPID, $galleryCID, $imgID, $size) {\n $typolink_conf = array(\n 'no_cache' => $this->conf['showHits'],\n 'parameter' => $GLOBALS['TSFE']->id,\n 'additionalParams' => '&tx_hldamgallery_pi1[galleryPID]=' . $galleryPID .\n '&tx_hldamgallery_pi1[galleryCID]=' . $galleryCID . '&tx_hldamgallery_pi1[imgID]=' . $imgID .\n '&tx_hldamgallery_pi1[size]=' . $size,\n 'useCacheHash' => true\n );\n\n return $this->cObj->typolink_URL($typolink_conf);\n }", "function dahz_get_image_size_links() {\n\n\t/* If not viewing an image attachment page, return. */\n\tif ( !wp_attachment_is_image( get_the_ID() ) )\n\t\treturn;\n\n\t/* Set up an empty array for the links. */\n\t$links = array();\n\n\t/* Get the intermediate image sizes and add the full size to the array. */\n\t$sizes = get_intermediate_image_sizes();\n\t$sizes[] = 'full';\n\n\t/* Loop through each of the image sizes. */\n\tforeach ( $sizes as $size ) {\n\n\t\t/* Get the image source, width, height, and whether it's intermediate. */\n\t\t$image = wp_get_attachment_image_src( get_the_ID(), $size );\n\n\t\t/* Add the link to the array if there's an image and if $is_intermediate (4th array value) is true or full size. */\n\t\tif ( !empty( $image ) && ( true === $image[3] || 'full' == $size ) ) {\n\n\t\t\t/* Translators: Media dimensions - 1 is width and 2 is height. */\n\t\t\t$label = sprintf( __( '%1$s &#215; %2$s', 'dahz-core' ), number_format_i18n( absint( $image[1] ) ), number_format_i18n( absint( $image[2] ) ) );\n\n\t\t\t$links[] = sprintf( '<a class=\"image-size-link\">%s</a>', $label );\n\t\t}\n\t}\n\n\t/* Join the links in a string and return. */\n\treturn join( ' <span class=\"sep\">/</span> ', $links );\n}", "function get_default_thumb($size = NULL) {\n if ($size == \"small\" && file_exists(TEMPLATEDIR . '/images/thumbs/group_thumb-small.png')) {\n return TEMPLATEURL . '/images/thumbs/group_thumb-small.png';\n } elseif (file_exists(TEMPLATEDIR . '/images/thumbs/group_thumb.png') && !$size) {\n return TEMPLATEURL . '/images/thumbs/group_thumb.png';\n } else {\n if ($size == 'small')\n $this->get_default_thumb = GP_THUMB_URL . '/no_thumb-small.png';\n else\n $this->get_default_thumb = GP_THUMB_URL . '/no_thumb.png';\n return $this->get_default_thumb;\n }\n }", "public function getPath(string $url): string;", "function physical_path_to($file)\n{\n $paths = get_view()->getAssetPaths();\n foreach ($paths as $path) {\n list($physical, $web) = $path;\n if (file_exists($physical . '/' . $file)) {\n return $physical . '/' . $file;\n }\n }\n throw new InvalidArgumentException(__(\"Could not find file %s!\", $file));\n}", "public function getPathOnly($size = false, $method=3){\n $base = $this->getModule()->getCachePath();\n $sub = $this->getSubDur();\n\n $origin = $this->getPathToOrigin();\n\n if(!$size) return $origin;\n\n $filePath = $base.DIRECTORY_SEPARATOR.$sub.DIRECTORY_SEPARATOR.$method.'_'.$size.'.'.$this->ext;\n\n return $filePath;\n }", "public function thumbUrl($url, $size)\n {\n $rootUrl = Settings::getInstance()->URLS['URL'];\n $pattern = '#^http(s)?://(www\\.)?#i';\n if (preg_match($pattern, $url)) {\n return preg_replace_callback($pattern, function ($matches) use ($rootUrl, $size) {\n $ssl = ($matches[1] ? 'ssl/' : '');\n return sprintf('%sthumbs/%s/%s', $rootUrl, $size, $ssl);\n }, $url);\n } else {\n return sprintf('%sthumbs/%s%s', $rootUrl, $size, $url);\n }\n }", "public function getInstallationPath()\n {\n return get_storage_path($this->getSubdir().DIRECTORY_SEPARATOR.$this->getId());\n }", "protected function get_path()\n {\n $path_found = false;\n $found_path = null;\n foreach ($this->get_paths() as $path) {\n if ($path_found) {\n continue;\n }\n $path = wp_normalize_path($path);\n if (file_exists($path)) {\n $path_found = true;\n $found_path = $path;\n }\n }\n\n return $found_path;\n\n }", "public function getIconUrl($size = null)\n\t{\n\t\treturn false;\n\t}", "public function path()\n {\n if (in_array($this->object->extension(), ['html', 'twig', 'md'])) {\n return $this->object->getViewPath();\n } else {\n return $this->object->getAssetPath();\n }\n }", "abstract public function get_thumbnail_source_path();", "function fa_get_path( $rel_path ){\n\t$path = path_join( FA_PATH, $rel_path );\n\treturn wp_normalize_path( $path );\n}", "public function getFirstPhotoURL( $size = \"300\" ){\n $pics = $this->getPhotos();\n return $pics[0][\"Uri{$size}\"];\n }", "public function getPackagePath()\n {\n if (!is_null($this->path)) {\n return $this->path;\n }\n\n switch ($this->getPackageType()) {\n case self::TYPE_ROOT:\n $this->path = static::getPackageCwd() . $this->name;\n break;\n case self::TYPE_VENDOR:\n $this->path = sprintf('%s/vendor/%s', static::getPackageCwd(), $this->name);\n break;\n case self::TYPE_PSEUDO:\n default:\n $this->path = false;\n break;\n }\n\n return $this->path;\n }", "public function getMediaUrl(string $variant = null)\n {\n $authorimages = include 'DataFiles/authorimages.php';\n $authorguid = $this->getOriginalId();\n\n if (array_key_exists($authorguid, $authorimages)) {\n // check if image exists then serve it if it does\n $imagePath = parent::getMediaUrl($variant);\n if (empty($imagePath)) {\n return '';\n }\n $headers = get_headers($imagePath);\n $imageExists = stripos($headers[0], \"200 OK\") ? true : false;\n\n if ($imageExists) {\n return parent::getMediaUrl($variant);\n }\n\n // try serving legacy image from the mapping file\n $path = $authorimages[$authorguid];\n $headers = get_headers($path);\n $exists = stripos($headers[0], \"200 OK\") ? true : false;\n if ($exists && ! $variant) {\n return $path;\n }\n }\n\n return parent::getMediaUrl($variant);\n }", "public static function fullPath ($relPath) {\n\t\treturn (\\realpath($relPath) ?: null);\n\t}", "abstract public function get_thumbnail( $variant = '', $size = 'thumb' );", "public function getFullPath()\n {\n return sfAssetsLibraryTools::getMediaDir(true) . $this->getRelativePath();\n }", "public function get_image_path($id, $size = 'min')\n {\n $id = abs(intval($id));\n $id = sprintf('%\\'09d', $id);\n $dir1 = substr($id, 0, 3);\n $dir2 = substr($id, 3, 2);\n $dir3 = substr($id, 5, 2);\n\n return $dir1 . '/' . $dir2 . '/' . $dir3 . '/' . substr($id, -2) . '_topic_' . $size . '.jpg';\n }", "public function getFullPath(): string\n {\n $store = $this->getStore();\n return $store ? $store->getBaseMediaDir() . '/' . $this->getPath() : '';\n }", "public function getPath(): string {\n $meta_data = stream_get_meta_data($this->file);\n return $meta_data[\"uri\"];\n }", "public function avatarUrl(): string\n {\n $sizes = ['xl', 'l', 'm', 's'];\n\n foreach ($sizes as $size) {\n if (array_key_exists($size, $this->avatarUrls())) {\n return $this->avatarUrls()[$size];\n }\n }\n\n // Could not find any of the sizes specified, just return the first one in the array.\n return current($this->avatarUrls());\n }", "public function avatarUrl(): string\n {\n $sizes = ['xl', 'l', 'm', 's'];\n\n foreach ($sizes as $size) {\n if (array_key_exists($size, $this->avatarUrls())) {\n return $this->avatarUrls()[$size];\n }\n }\n\n // Could not find any of the sizes specified, just return the first one in the array.\n return current($this->avatarUrls());\n }", "public function checkIsSymlink($path);", "function getLogoPath($large = false) {\n $size = $large ? '40x40' : '16x16';\n return ENVIRONMENT_PATH . '/' . PUBLIC_FOLDER_NAME . '/logos/' . $this->getId() . \".$size.jpg\";\n }", "public function getPathLocation(): string;", "function format_size($row) {\n if (is_null($row['job_size'])) {\n return \"...\";\n }\n $size = sprintf(\"%.2f\", $row['job_size']/1024).\" kb\";\n if (identity_can('job-view-source', $row)) {\n return format_link(url_job_view_source($row['id']), $size);\n }\n return $size;\n }", "static function asset_path($source)\n {\n if ($source) {\n $decoded_source = json_decode($source);\n if ($url = $decoded_source->url) {\n // if $url then the file is stored on the cloud \n return $url;\n } else {\n // else it is on the local storage ( generating the URL dynamically in this case so if the\n // the admin changes his Domain or base URL the assets will still work)\n $replace = preg_replace('/.*\\/storage/', '', $decoded_source->path);\n $url = asset('/storage' . $replace);\n return $url;\n }\n }\n }", "public function getImageFile()\n {\n $link = $this->link;\n return empty( $this->owner->$link ) ? null : \\Yii::getAlias(\n '@storage/' . $this->directory . '/' . $this->owner->$link\n );\n }", "public function getSize($path);", "function quadro_jetpack_related_thumb( $size ) {\n\t\n\tglobal $_wp_additional_image_sizes;\n\t\n\t// Return if we have no sizes to set\n\tif ( !isset($_wp_additional_image_sizes['quadro-med-thumb']) )\n\t\treturn $size;\n\n\t$size = array(\n\t\t'width' => $_wp_additional_image_sizes['quadro-med-thumb']['width'],\n\t\t'height' => $_wp_additional_image_sizes['quadro-med-thumb']['height']\n\t);\n\n\treturn $size;\n\n}", "static function getPath(string $url): ?string;", "public function getResponsiveImagesDirectoryUrl(): string\n {\n return $this->config->get(\"filesystems.disks.{$this->media->disk}.url\").'/'\n .$this->pathGenerator->getPathForResponsiveImages($this->media);\n }", "public function getRelativeLinkToImg()\n {\n return ImgUpload::getRelativeLinkToImg($this);\n }", "public function getAssetPath()\n {\n $url_frags = parse_url($_SERVER['REQUEST_URI']);\n \n if (!array_key_exists('path', $url_frags)) {\n return false;\n }\n\n $file_name = basename($url_frags['path']);\n \n if (!preg_match('/^(.+)\\.([a-z]+)$/', $file_name)) {\n return false;\n }\n\n // this is the path after the common path prefix\n $path_everything_after = substr(\n $url_frags['path'],\n strpos($url_frags['path'], $this->common_path_prefix)\n );\n\n $file_name = $this->actual_path.'/'.$path_everything_after;\n if (file_exists($file_name)) {\n return $file_name;\n }\n return false;\n }", "public function getSwatchCachePath($swatchType)\n {\n return self::SWATCH_MEDIA_PATH . '/' . $swatchType . '/';\n }", "public function getUsablePath()\n {\n $extension = pathinfo($path = $this->getRelativePath(), PATHINFO_EXTENSION);\n\n $path = strstr($path, \".{$extension}\", true);\n\n return \"{$path}.{$this->getUsableExtension()}\";\n }", "public function getAssetPath($type)\n {\n $src = $this->get('src', Config::get('theming.theme'));\n $path = '/' . $type . '/' . Str::ensureRight($src, '.' . $type);\n $manifest = $this->getManifest()->get($path);\n return $this->themeUrl($manifest ? $manifest : $path);\n }", "public function addVariantToBasePath($path, $variant = FileHandler::ORIGINAL)\n {\n return rtrim($path, '/') . '/' . trim($variant, '/');\n }", "public function get_thumbnail_url($id = NULL, $size = NULL) {\n\t\t\n\t\t$archives = TableRegistry::get('Administrator.Archives');\n\n\t\t$archive = $archives->find('all', ['conditions' => ['Archives.id' => $id]])->first();\n\t\t\n\t\t//validar si existe el archivo y si no esta vacio (evita errores).\n\t\tif(isset($archive->filename) && !empty($archive->filename)) {\n\t\t\n\t\t\t\t// tamaño mediano de la imagen\n\t\t\t\tif(file_exists($archive->folder.\"medium-\".$archive->filename) && $size == 'medium' || $size == 'thumbnail') {\n\t\t\t\t\t\treturn \"/\".$archive->folder.\"medium-\".$archive->filename;\t\t\t\n\t\t\t\t} else {\n\t\t\t\t//tamaño completo de la imagen\n\t\t\t\t\treturn \"/\".$archive->folder.$archive->filename;\t\t\t\n\t\t\t\t} \n\t\t\n\t\t} else { \n\n\t\t\t\treturn NULL; \n\t\t}\n\n\t\t\n\t}", "public function getSize(){\n $path = $this->aParams['path'] . $this->aParams['name'];\n if(\n is_null($this->aParams['size']) &&\n mb_strlen($this->aParams['path']) &&\n mb_strlen($this->aParams['name']) &&\n file_exists($path)\n\n ){\n $this->aParams['size'] = filesize($path);\n }\n return\n $this->aParams['size'] !== FALSE && $this->aParams['size'] !== null\n ? sprintf('%u', $this->aParams['size'])\n : NULL;\n }", "function sd_sc_get_path($atts) {\n\textract(shortcode_atts(array(\n\t\t'path' => '',\n\t), $atts));\n\t$sane = sd_is_path_sane($path);\n\tif (true === $sane) {\n\t\treturn $path;\n\t}\n\treturn false;\n}", "function doo_asset_path($filename, $parent = false, $nomin = false)\n{\n $dist_url = DOO_PLUGIN_PRESET_URI . 'assets/';\n $dist_path = DOO_PLUGIN_PRESET_DIR . 'assets/';\n $directory = dirname($filename) . '/';\n $file = basename($filename);\n\n $file_parts = explode('.', $file);\n $ext = $file_parts[count($file_parts) - 1];\n $has_min_version = false;\n\n if ($file_parts[count($file_parts) - 2] != 'min') {\n $file_min = str_replace('.' . $ext, '.min.' . $ext, $file);\n\n if (file_exists($dist_path . $directory . $file_min)) {\n $has_min_version = true;\n }\n }\n\n $is_development = defined('WP_ENV') && (WP_ENV == 'development');\n\n if (!$is_development && $has_min_version && !$nomin) {\n return $dist_url . $directory . $file_min;\n } else {\n return $dist_url . $directory . $file;\n }\n}", "function getKb($link) {\r\n if (file_exists($link))\r\n {\r\n $wsize = round (filesize($link)/1024);\r\n }\r\n else\r\n {\r\n $wsize=0;\r\n }\r\n return $wsize;\r\n}", "public function getSrcPath()\n {\n return $this->getSettingArray()[\"src_path\"];\n }", "function sloodle_convert_file_size_shorthand($size)\n {\n $size = trim($size);\n $num = (int)$size;\n $char = strtolower($size{strlen($size)-1});\n switch ($char)\n {\n case 'g': $num *= 1024;\n case 'm': $num *= 1024;\n case 'k': $num *= 1024;\n }\n\n return $num;\n }", "public function GetImageSRC($size = 'default')\n\t{\treturn $this->imagelocation . $this->InputSafeString($size) . '/' . (int)$this->id . '.png';\n\t}", "function get_brand_thumbnail_url( $brand_id, $size = 'full' ) {\n\t\t$thumbnail_id = get_woocommerce_term_meta( $brand_id, 'thumbnail_id', true );\n\n\t\tif ( $thumbnail_id )\n\t\t\treturn current( wp_get_attachment_image_src( $thumbnail_id, $size ) );\n\t}", "private function create(Photo $photo, string $sizeVariant, string $salt)\n\t{\n\t\t// in case of video and raw we always need to use the field 'thumbUrl' for anything which is not the original size\n\t\t$originalFieldName = ($sizeVariant != Photo::VARIANT_ORIGINAL && ($photo->isVideo() || $photo->type == 'raw')) ?\n\t\t\tself::VARIANT_2_ORIGINAL_FILENAME_FIELD[Photo::VARIANT_THUMB] :\n\t\t\tself::VARIANT_2_ORIGINAL_FILENAME_FIELD[$sizeVariant];\n\t\t$originalFileName = (substr($sizeVariant, -2, 2) == '2x') ? Helpers::ex2x($photo->$originalFieldName) : $photo->$originalFieldName;\n\n\t\tif ($photo->type == 'raw' && $sizeVariant == Photo::VARIANT_ORIGINAL) {\n\t\t\t$originalPath = Storage::path('raw/' . $originalFileName);\n\t\t} else {\n\t\t\t$originalPath = Storage::path(Photo::VARIANT_2_PATH_PREFIX[$sizeVariant] . '/' . $originalFileName);\n\t\t}\n\t\t$extension = Helpers::getExtension($originalPath);\n\t\t$symFilename = hash('sha256', $salt . '|' . $originalPath) . $extension;\n\t\t$symPath = Storage::drive('symbolic')->path($symFilename);\n\n\t\ttry {\n\t\t\t// in theory we should be safe...\n\t\t\tsymlink($originalPath, $symPath);\n\t\t} catch (Exception $exception) {\n\t\t\tunlink($symPath);\n\t\t\tsymlink($originalPath, $symPath);\n\t\t}\n\t\t$this->{self::VARIANT_2_SYM_PATH_FIELD[$sizeVariant]} = $symFilename;\n\t}", "public static function getSize($path) {\n \n }", "function get_image_size( $size ) {\n\t$sizes = get_image_sizes();\n\n\tif ( isset( $sizes[ $size ] ) ) {\n\t\treturn $sizes[ $size ];\n\t}\n\n\treturn false;\n}", "function wp_make_link_relative($link)\n {\n }", "public function getProductPicUrl($sPath, $sFile, $sSize, $sIndex = null, $bSsl = null)\n {\n if ( strpos( $sFile, \"http\" ) !== false ) {\n $sUrl = $sFile;\n }\n else {\n $sUrl = parent::getProductPicUrl( $sPath, $sFile, $sSize, $sIndex, $bSsl );\n }\n \n return $sUrl;\n }", "public function get_min_path()\n\t{\n\t\t$min_path = empty($this->options['input_minpath'])\n\t\t\t? $this->get_default_min_path()\n\t\t\t: $this->options['input_minpath'];\n\n\t\t$min_path = apply_filters('bwp_minify_min_dir', $min_path);\n\t\t$min_path = apply_filters('bwp_minify_min_path', $min_path);\n\n\t\t// allow overidden of the generated min path via constants\n\t\t$min_path = defined('BWP_MINIFY_MIN_PATH') && '' != BWP_MINIFY_MIN_PATH\n\t\t\t? BWP_MINIFY_MIN_PATH : $min_path;\n\n\t\treturn $min_path;\n\t}", "protected function _getPath(): ?string\n {\n property_exists_or_fail($this, ['album_id', 'filename']);\n\n return PHOTOS . $this->get('album_id') . DS . $this->get('filename');\n }", "public function thumbnailPath() {\n return $this->baseDir() . '/tn-' . $this->fileName();\n }", "function _wp_get_attachment_relative_path($file)\n {\n }", "function absPath($value){\r\n\treturn realpath(dirname(__dir__, $value));\r\n}", "function absPath($value){\r\n\treturn realpath(dirname(__dir__, $value));\r\n}", "public function ImageFileDirectory($size = 'default')\n\t{\treturn $this->imagedir . $this->InputSafeString($size);\n\t}", "public function absPath(string $path): string;", "public function getThumbnailPath()\n {\n return $this->getThumbnailsFolder() . '/' . $this->getRootThumbnailPath();\n }", "private function getThumbFilepath() {\n\t\t$filename = $this->getThumbFilename();\n\t\t$filepath = $this->pathCache . $filename;\n\t\treturn($filepath);\n\t}", "function get_gp_thumb($grp_details, $size = NULL) {\n $exts = array('jpg', 'png', 'gif', 'jpeg');\n $gpid = $grp_details['group_id'];\n foreach ($exts as $ext) {\n if ($size == 'small')\n $file_size = \"-small\";\n\n if (file_exists(GP_THUMB_DIR . '/' . $gpid . \"$file_size.\" . $ext))\n return GP_THUMB_URL . '/' . $gpid . \"$file_size.\" . $ext;\n }\n\n return $this->get_default_thumb($size);\n }", "function get_parent_theme_file_path($file = '')\n {\n }", "function file_display_url(File $file, $format = 'fullsize')\n{\n if (!$file->exists()) {\n return false;\n }\n return $file->getWebPath($format);\n}", "function get_path_relative_to($path, $relative_to) {\n return substr($path, strlen($relative_to));\n }", "public function getRealUrlAliasBase(): string;", "function statamic_path($path = null)\n{\n return path(APP, $path);\n}", "protected function _getThemesPath()\n {\n $pathElements = array(\n dirname(__FILE__),\n '..',\n '..',\n 'public',\n 'themes'\n );\n return realpath(implode(DIRECTORY_SEPARATOR, $pathElements));\n }", "public function getThumbPath()\n {\n $blockThumbsFolder = $this->theme->getFolder() . '/public/block-thumbs/';\n return $blockThumbsFolder . md5($this->blockSlug) . '/' . md5(file_get_contents($this->getViewFile())) . '.jpg';\n }", "protected function imageUrl($attribute, $size = null)\n {\n if (in_array($attribute, $this->owner->attributes()) && is_array($this->attributes[$attribute]))\n {\n if (empty($this->owner->$attribute)) {\n return null;\n }\n\n $size = $this->sizeIndex($attribute, $size);\n\n if (strpos($this->domain, '@') === 0) {\n $host = Yii::getAlias($this->domain);\n } else {\n if (preg_match('~^((?:https?\\:)?//)~', $this->domain, $m)) {\n $protocol = $m[1];\n } else {\n $protocol = preg_replace('~^((?:https?\\:)?//)(.*)$~', '\\\\1', Yii::$app->urlManager->hostInfo);\n }\n $host = $protocol. preg_replace('~^(?:https?\\:)?//(.*)$~',\n str_replace('{$domain}', '\\\\1', $this->domain), Yii::$app->urlManager->hostInfo);\n }\n\n $format = array_merge($this->defaultImagesSettings, $this->attributes[$attribute],\n $this->attributes[$attribute]['sizes'][$size])['format'];\n\n return $this->schemaTo($host, $attribute, \"$size/{$this->owner->$attribute}.$format\");\n }\n\n throw new UnknownMethodException(\n sprintf('Calling unknown method: %s::get%sUrl()', get_class($this), ucfirst($attribute)));\n }", "public function getFullPath(): string;", "function get_default_min_path()\n\t{\n\t\tif (!empty($this->default_min_path))\n\t\t\treturn $this->default_min_path;\n\n\t\t// @since 1.3.0 we get a path relative to root for Minify instead of an\n\t\t// absolute URL to add compatibility to staging or mirror site.\n\t\t$min_path = preg_replace('#https?://[^/]+#ui', '', $this->plugin_wp_url);\n\t\t$min_path = $min_path . 'min/';\n\n\t\t$this->default_min_path = $min_path;\n\t\treturn $min_path;\n\t}", "public function getPathAttribute($value)\n {\n $urlBase = \"../../../uploads/\";\n \n //Testa se o valor é uma URL\n if( preg_match ( '/^https?:\\/\\//' , $value) ) {\n return $value;\n } else {\n return $urlBase.$value;\n } \n }", "public function getUrlAttribute()\n {\n return storage_url($this->attributes['path']);\n }", "public static function getImageSize($url)\n\t{\n\t\tstatic $rootPath = '';\n\t\tstatic $pathLength = 0;\n\t\tstatic $rootUrl = '';\n\t\tstatic $rootLength = 0;\n\t\tstatic $protocoleRelRootUrl = '';\n\t\tstatic $protocoleRelRootLength = 0;\n\n\t\tif (empty($rootPath))\n\t\t{\n\t\t\t$rootUrl = Juri::root();\n\t\t\t$rootLength = JString::strlen($rootUrl);\n\t\t\t$protocoleRelRootUrl = str_replace(array('https://', 'http://'), '//', $rootUrl);\n\t\t\t$protocoleRelRootLength = JString::strlen($protocoleRelRootUrl);\n\t\t\t$rootPath = JUri::base(true);\n\t\t\t$pathLength = JString::strlen($rootPath);\n\t\t\tif (JFactory::getApplication()->isAdmin())\n\t\t\t{\n\t\t\t\t$rootPath = str_replace('/administrator', '', $rootPath);\n\t\t\t}\n\t\t}\n\n\t\t// default values ?\n\t\t$dimensions = array('width' => 0, 'height' => 0);\n\n\t\t// build the physical path from the URL\n\t\tif (substr($url, 0, $rootLength) == $rootUrl)\n\t\t{\n\t\t\t$cleanedPath = substr($url, $rootLength);\n\t\t}\n\t\telse if (substr($url, 0, 2) == '//' && substr($url, 0, $protocoleRelRootLength) == $protocoleRelRootUrl)\n\t\t{\n\t\t\t// protocol relative URL\n\t\t\t$cleanedPath = substr($url, $protocoleRelRootLength);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$cleanedPath = $url;\n\t\t}\n\n\t\t$cleanedPath = !empty($rootPath) && substr($cleanedPath, 0, $pathLength) == $rootPath ? substr($url, $pathLength) : $cleanedPath;\n\t\t$imagePath = JPATH_ROOT . '/' . $cleanedPath;\n\t\tif (file_exists($imagePath))\n\t\t{\n\t\t\t$imageInfos = getimagesize($imagePath);\n\t\t\tif (!empty($imageInfos))\n\t\t\t{\n\t\t\t\t$dimensions = array('width' => $imageInfos[0], 'height' => $imageInfos[1]);\n\t\t\t}\n\t\t}\n\t\treturn $dimensions;\n\t}", "protected function getDestinationPath() {\n $destination_path = 'web/sites/default/';\n if (isset($this->extra['destination-directory'])) {\n $destination_path = $this->extra['destination-directory'];\n }\n return $this->basePath . $destination_path;\n }", "public function getOutputPath()\n {\n $base = getcwd() . DIRECTORY_SEPARATOR;\n\n if (isset($this->raw->output)) {\n $path = $this->raw->output;\n\n if (false === Path::isAbsolute($path)) {\n $path = Path::canonical($base . $path);\n }\n } else {\n $path = $base . 'default.phar';\n }\n\n if (false !== strpos($path, '@' . 'git-version@')) {\n $path = str_replace('@' . 'git-version@', $this->getGitVersion(), $path);\n }\n\n return $path;\n }", "public function path($style = null)\n\t{\n\t\t$template = $this->_options['path'];\n\t\treturn $this->_parseTemplateString($template, $style);\n\t}", "private function thumb()\n {\n $preview = array('png', 'jpg', 'gif', 'bmp');\n\n $publicBaseUrl = 'packages/spescina/mediabrowser/src/img/icons/';\n\n if ($this->folder)\n {\n if ($this->back)\n {\n $icon = 'back';\n }\n else\n {\n $icon = 'folder';\n }\n\n $url = $publicBaseUrl . $icon . '.png';\n }\n else\n {\n if (in_array($this->extension, $preview))\n {\n $url = $this->path;\n }\n else\n {\n $url = $publicBaseUrl . $this->extension . '.png';\n }\n }\n\n return $url;\n }", "public function getPathBase()\n {\n if (is_null($this->_pathBase)) {\n $this->_pathBase = get_permalink();\n }\n\n return $this->_pathBase;\n }" ]
[ "0.60312146", "0.593279", "0.58525705", "0.5756368", "0.57476443", "0.5717517", "0.5674111", "0.5475384", "0.53238875", "0.5280697", "0.5252688", "0.52259266", "0.5221644", "0.5147773", "0.5071334", "0.5054699", "0.49727762", "0.49698547", "0.4946099", "0.49257994", "0.48794565", "0.48549223", "0.4833465", "0.48101628", "0.4795403", "0.47876596", "0.4781226", "0.4775769", "0.4765825", "0.47628027", "0.47409567", "0.47408623", "0.47371882", "0.4733618", "0.47260824", "0.47223887", "0.46891415", "0.46829745", "0.4677309", "0.4677291", "0.4677291", "0.46747577", "0.46653807", "0.4661128", "0.46518663", "0.46461102", "0.463893", "0.46221447", "0.46181607", "0.46143067", "0.4612318", "0.46063608", "0.46038648", "0.46013883", "0.45866102", "0.4584254", "0.45795664", "0.45762908", "0.456937", "0.4569322", "0.45681107", "0.45681083", "0.45638236", "0.4563392", "0.456036", "0.45564467", "0.45486796", "0.4547724", "0.45425254", "0.45418772", "0.45393643", "0.4538764", "0.45372438", "0.45324075", "0.4526946", "0.45227545", "0.45227545", "0.45216742", "0.45118472", "0.4511184", "0.4510885", "0.4510384", "0.4504274", "0.4502202", "0.45021716", "0.44998005", "0.44930136", "0.4492352", "0.44854805", "0.4485038", "0.44829464", "0.448005", "0.4477989", "0.4476117", "0.44749472", "0.4472918", "0.44695735", "0.4455287", "0.44538862", "0.44529387" ]
0.6841231
0
before deleting we actually unlink the symlinks.
public function delete() { foreach (self::VARIANT_2_SYM_PATH_FIELD as $variant => $field) { if ($this->$field != '') { $path = Storage::drive('symbolic')->path($this->$field); try { unlink($path); } catch (Exception $e) { Logs::error(__METHOD__, __LINE__, 'could not unlink ' . $path); } } } return parent::delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDeleteDirectoryWithLinksAndSymlinks()\n {\n if ( !function_exists( 'link' ) || !function_exists( 'symlink' ) )\n {\n $this->markTestSkipped( 'Missing \"link\" or \"symlink\" function.' );\n return;\n }\n\n $this->createTestDirectories( array( '/logs/foo/12345' ) );\n $this->createTestFile( '/logs/foo/12345/bar.txt' );\n\n $file = PHPUC_TEST_DIR . '/logs/foo/12345/bar.txt';\n\n link( $file, PHPUC_TEST_DIR . '/logs/bar.txt' );\n symlink( $file, PHPUC_TEST_DIR . '/logs/foo/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/logs' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/logs' );\n }", "public function & unLinkPath () {\n if ($this->pathExists->toBoolean () == TRUE) {\n if (unlink ($this->varContainer)) {\n # Return to chain ...\n return $this->returnToChain ();\n }\n }\n }", "public function testUnlink()\n {\n $filename = static::$baseFile . '/fs/tmp.txt';\n\n file_put_contents($filename, 'It works!');\n $this->assertTrue(file_exists($filename));\n\n $this->assertTrue(unlink($filename));\n\n clearstatcache();\n $this->assertFalse(file_exists($filename));\n }", "protected function removeSymlink()\n {\n File::delete(public_path('theme'));\n }", "public function on_delete() {\n $this->remove_dir();\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}", "private function generateSymlinks()\n {\n $fs = new Filesystem();\n $uploadPath = $this->getContainer()->getParameter('contao.upload_path');\n\n // Remove the base folders in the document root\n $fs->remove($this->rootDir . '/web/' . $uploadPath);\n $fs->remove($this->rootDir . '/web/system/modules');\n $fs->remove($this->rootDir . '/web/vendor');\n\n $this->symlinkFiles($uploadPath);\n $this->symlinkModules();\n $this->symlinkThemes();\n\n // Symlink the assets and themes directory\n $this->symlink('assets', 'web/assets');\n $this->symlink('system/themes', 'web/system/themes');\n $this->symlink('app/logs', 'system/logs');\n }", "public function unlinkTempFiles() {}", "public function unlinkTempFiles() {}", "function UnlinkRecursive($dir, $deleteRootToo = true) \n{ \n if(!$dh = @opendir($dir)) \n { \n return false; \n } \n while (false !== ($obj = readdir($dh))) \n { \n if($obj == '.' || $obj == '..') \n { \n continue; \n } \n\n if (!@unlink($dir . '/' . $obj)) \n { \n UnlinkRecursive($dir.'/'.$obj, true); \n } \n } \n\n closedir($dh); \n \n if ($deleteRootToo) \n { \n @rmdir($dir); \n } \n \n return true; \n}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function afterDelete()\n {\n foreach ($this->attributes as $attribute => $attributeConfig) {\n $unlinkOnDelete = $this->getAttributeConfig($attributeConfig, 'unlinkOnDelete');\n if ($unlinkOnDelete) {\n $this->delete($attribute);\n }\n }\n }", "public function pruneSymbolicLinks(): void\n {\n Site::pruneLinks();\n }", "public function testUnlinkNonExistingFile()\n {\n $this->assertFalse(unlink(static::$baseFile . '/fs/tmp.txt'));\n }", "public function delete_page_links() {\n\t\t\t$this->linked_postid = '';\n\t\t\t$this->pages_url = '';\n\t\t\t$this->MakePersistent();\n\n\t\t}", "function deleteFile() {\r\n\t\tif (file_exists($this->data[$this->alias]['path'])) {\r\n\t\t\tunlink($this->data[$this->alias]['path']);\r\n\t\t}\r\n\t}", "protected function cleanup() {\n $h = opendir($this->tmpdir);\n while (false !== ($e = readdir($h))) {\n if ($e!='.'&&$e!='..'&&is_file($this->tmpdir.'/'.$e)) unlink ($this->tmpdir.'/'.$e);\n }\n if (is_object($this->history)) $this->history->cleanup();\n closedir($h);\n rmdir($this->tmpdir);\n }", "private function deltree($path) {\n if (!is_link($path) && is_dir($path)) {\n $entries = scandir($path);\n foreach ($entries as $entry) {\n if ($entry != '.' && $entry != '..') {\n $this->deltree($path . DIRECTORY_SEPARATOR . $entry);\n }\n }\n rmdir($path);\n } else {\n unlink($path);\n }\n }", "public static function cleanUp()\n {\n foreach (glob(static::getYamlRoot() . '*') as $file) {\n is_file($file) and unlink($file);\n }\n foreach (glob('{' . static::getEntitiesRoot() . '*,' . static::getProxiesRoot() . '*' . '}', GLOB_BRACE) as $file) {\n is_file($file) and unlink($file);\n is_dir(basename($file)) and rmdir(basename($file));\n is_dir($file) and rmdir($file);\n }\n !is_dir(static::getYamlRoot()) and mkdir(static::getYamlRoot(), 0777, true);\n !is_dir(static::getEntitiesRoot()) and mkdir(static::getEntitiesRoot(), 0777, true);\n !is_dir(static::getProxiesRoot()) and mkdir(static::getProxiesRoot(), 0777, true);\n }", "public function delete(): void\n {\n unlink($this->path);\n }", "function fm_update_shared_links($linkid) {\r\n\r\n\tif ($sharedlinks = get_records('fmanager_shared', \"sharedlink\", $linkid)) {\r\n\t\tforeach ($sharedlinks as $sl) {\t\t\r\n\t\t\tif (!delete_records('fmanager_shared', \"id\", $sl->id)) {\r\n\t\t\t\terror(get_string(\"errnoupdate\",'block_file_manager'));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "public function delete () {\n if(count($this->data[$this->id])) {\n foreach($this->data[$this->id] as $key=>$prop) {\n if($prop[\"link\"] == \"P127F\")\n $broader = $key;\n }\n }\n unset($this->data[$this->id][$broader]);\n \n // if there are still links, we must stop\n if(count($this->data[$this->id])) \n throw new Exception(\"Cannot remove because record has links! (remove them first)\");\n\n // remove table data linked to this record\n foreach($this->tables as $table) {\n $table->deleteMyData($this->id);\n }\n \n // remove link to class hierarchy and then the record itself\n IdaDb::deleteBy(\"_sys_classes_join\", array(\"subject\"=>$this->id));\n IdaDb::deleteBy(\"_sys_records\", array(\"id\"=>$this->id));\n \n }", "function uninstall() {\n $rec = SQLSELECT('Select distinct LINKED_OBJECT,LINKED_PROPERTY from myconditions');\n $total = count($rec);\n if ($total) {\n for($i=0;$i<$total;$i++) {\n removeLinkedProperty($rec[$i]['LINKED_OBJECT'], $rec[$i]['LINKED_PROPERTY'], 'myrules');\n }\n }\n SQLExec('DROP TABLE IF EXISTS myrules');\n SQLExec('DROP TABLE IF EXISTS myconditions');\n SQLExec('DROP TABLE IF EXISTS myactions');\n\n parent::uninstall();\n }", "public function delete()\n {\n foreach ($this->versions as $version)\n {\n $version->delete();\n }\n\n parent::delete();\n }", "function delLogin(){\n unlink($this->fHtaccess);\n }", "function delLogin(){\n unlink($this->fHtaccess);\n }", "public function tear_down() {\n\t\tunset( $GLOBALS['link'] );\n\t\tparent::tear_down();\n\t}", "public function unlinkTempFiles()\n {\n $typo3temp = PATH_site . 'typo3temp/';\n foreach (glob($typo3temp . $this->tempFilePrefix . '*') as $tempFile) {\n @unlink($tempFile);\n }\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function delete(): void\n {\n $this->instances->demo()->runHook($this->root(), 'delete:before', $this);\n\n Dir::remove($this->root());\n $this->instances->delete($this->id);\n\n $this->instances->demo()->runHook($this->root(), 'delete:after', $this);\n }", "public function cleanTmpFolder() {\n\t\tarray_map('unlink', glob($this->settings->tmp_path . '/*'));\n\t}", "public function __destruct()\n {\n $iMax = count($this->aFiles);\n for ($iFor = 0; $iFor < $iMax; $iFor++) {\n\n if (true === file_exists($this->aFiles[$iFor])) {\n\n unlink($this->aFiles[$iFor]);\n }\n\n $sMessage = 'delete: ' . $this->aFiles[$iFor];\n $this->oLog->writeLog(Log::HF_DEBUG, $sMessage);\n }\n }", "public function testUnlinkFile777(): void\n {\n $dirName = 'unlink';\n $basePath = $this->testFilePath . '/' . $dirName . '/';\n $filePath = $basePath . 'file.txt';\n\n $this->createFileStructure([\n $dirName => [\n 'file.txt' => 'test',\n ],\n ]);\n chmod($filePath, 777);\n\n FileHelper::unlink($filePath);\n\n $this->assertFileDoesNotExist($filePath);\n }", "protected function cleanup() {\n\t\tif(isset($this->data['attachment'])) {\n\t\t\tunlink($this->data['attachment']);\n\t\t}\n\t\tparent::cleanup();\n\t}", "public function tearDown(): void\n {\n if (is_dir($this->tmpPath)) {\n if (file_exists($this->oldFile)) {\n unlink($this->oldFile);\n }\n if (file_exists($this->origFile)) {\n unlink($this->origFile);\n }\n if (file_exists($this->newFile)) {\n unlink($this->newFile);\n }\n if (is_dir($this->newDir)) {\n if (file_exists($this->newDirFile)) {\n unlink($this->newDirFile);\n }\n rmdir($this->newDir);\n }\n rmdir($this->tmpPath);\n }\n }", "function uninstall() {\r\n SQLExec('DROP TABLE IF EXISTS watchfolders');\r\n parent::uninstall();\r\n }", "function delLogin(){\r\n\t\tunlink($this->fHtaccess);\r\n\t}", "public function unlink($id)\n {\n //\n Relation::destroy( $id );\t\n }", "function deleteEntry() \n { \n \n // before removing entry, make sure associated linkGroups & linkViewers\n // are removed as well\n $linkID = $this->getID();\n \n $linkMgr = new RowManager_NavLinkAccessGroupManager();\n $linkMgr->setLinkID( $linkID );\n $list = $linkMgr->getListIterator();\n \n $list->setFirst();\n while( $entry = $list->getNext() ) {\n $entry->deleteEntry();\n }\n \n $linkViewerMgr = new RowManager_NavLinkViewerManager();\n $linkViewerMgr->setLinkID( $linkID );\n $list = $linkViewerMgr->getListIterator();\n \n $list->setFirst();\n while( $entry = $list->getNext() ) {\n $entry->deleteEntry();\n }\n \n parent::deleteEntry();\n \n }", "public function deleteDownloadFile()\r\n\t{\r\n\t\t@unlink($this->reference);\r\n\t}", "function delete() {\n global $USER;\n if($this->Dir !== 0 && $this->mayI(DELETE)) {\n $this->loadStructure();\n foreach($this->files as $file) {\n $file->delete();\n }\n foreach($this->folders as $folder) {\n $folder->delete();\n }\n rmdir($this->path);\n parent::delete();\n }\n }", "protected function tearDown()\n {\n unlink(__DIR__.'/foo.graphql');\n unlink(__DIR__.'/schema/bar.graphql');\n unlink(__DIR__.'/schema/baz.graphql');\n\n if (is_dir(__DIR__.'/schema')) {\n rmdir(__DIR__.'/schema');\n }\n }", "public function deleteAll()\n {\n \\Core\\File\\System::rrmdir($this->_getPath(), false, true);\n }", "protected function cleanup()\n {\n $cache = sprintf('%s/phantomjs_*', sys_get_temp_dir());\n\n array_map('unlink', glob($cache));\n }", "public function delete($flags=0)\n\t{\n\t\tif ($this instanceof Fs_Symlink) {\n\t\t\tparent::delete($flags);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!$this->exists()) return;\n\t\t\t\t\n\t\tif ($flags & Fs::RECURSIVE) {\n\t\t\t$files = scandir($this->_path);\n\t\t\t\n\t\t\tforeach ($files as $file) {\n\t\t\t\tif ($file == '.' || $file == '..') continue;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif (is_dir(\"{$this->_path}/$file\") && !is_link(\"{$this->_path}/$file\")) $this->$file->delete($flags);\n\t\t\t\t\t else unlink(\"{$this->_path}/$file\");\n\t\t\t\t} catch (Fs_Exception $e) {\n\t\t\t\t\ttrigger_error($e->getMessage(), E_USER_WARNING);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!@rmdir($this->_path)) throw new Fs_Exception(\"Failed to delete '{$this->_path}'\", error_get_last());\n\t}", "public function canNotUnlink()\n {\n $this->assertFalse(@unlink(vfsStream::url('foo')));\n }", "private function clear()\n {\n unlink($this->getConfig()->read('tmp_dir') . Evaluator::FILENAME);\n rmdir($this->getConfig()->read('tmp_dir'));\n }", "public function __destruct(){\n\t\t\t\tunset ($this->link);\n\t\t\t\t\n\t\t\t}", "public function __destruct(){\n\t\t\t\tunset ($this->link);\n\t\t\t\t\n\t\t\t}", "public function tearDown()\n {\n foreach ($this->files as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n }", "protected function tearDown()\n {\n if (file_exists(\"{$this->dir}/file1.mock\")) unlink(\"{$this->dir}/file1.mock\");\n if (file_exists(\"{$this->dir}/file2.mock\")) unlink(\"{$this->dir}/file2.mock\");\n if (file_exists(\"{$this->dir}/dir1/file3.mock\")) unlink(\"{$this->dir}/dir1/file3.mock\");\n if (file_exists(\"{$this->dir}/dir1/file4.mock\")) unlink(\"{$this->dir}/dir1/file4.mock\");\n if (file_exists(\"{$this->dir}/dir1\")) rmdir(\"{$this->dir}/dir1\");\n\n if (file_exists(sys_get_temp_dir().'/def/xyz.mock')) unlink(sys_get_temp_dir().'/def/xyz.mock'); \n if (file_exists(sys_get_temp_dir().'/def')) rmdir(sys_get_temp_dir().'/def'); \n\n if (file_exists($this->dir.\"/abc.mock\")) unlink($this->dir.\"/abc.mock\");\n if (file_exists($this->dir.\"/def.mock\")) unlink($this->dir.\"/def.mock\");\n\n if (file_exists(sys_get_temp_dir().'/abc/def/xy/abc.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/abc.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy/dd.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/dd.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy')) rmdir(sys_get_temp_dir().'/abc/def/xy'); \n if (file_exists(sys_get_temp_dir().'/abc/def')) rmdir(sys_get_temp_dir().'/abc/def'); \n if (file_exists(sys_get_temp_dir().'/abc')) rmdir(sys_get_temp_dir().'/abc'); \n \n if (file_exists(\"{$this->dir}/dir2\")) rmdir(\"{$this->dir}/dir2\");\n if (file_exists($this->dir)) rmdir($this->dir);\n \n Config_Mock_Unserialize:$created = array();\n unset(Q\\Transform::$drivers['from-mock']);\n }", "function wp_delete_link($link_id)\n {\n }", "public function tearDown() {\n\t\tif(is_dir('/tmp/clara')) {\n\t\t\t$this->rrmdir('/tmp/clara');\n\t\t}\n\t}", "public function tearDown(): void\n {\n if (file_exists(static::$in)) {\n unlink(static::$in);\n }\n if (file_exists(static::$ou)) {\n unlink(static::$ou);\n }\n }", "function cleanupTmp() {\n // try to delete all the tmp files we know about.\n foreach($this->tmpFilesCreated as $file) {\n if(file_exists($file)) {\n $status = unlink($file);\n }\n }\n $this->tmpFilesCreated = array();\n // try to completely delete each directory we created.\n $dirs = array_reverse($this->tmpDirsCreated);\n foreach($dirs as $dir) {\n if(file_exists($dir)) {\n $this->recursiveRmdir($dir);\n }\n }\n $this->tmpDirsCreated = array();\n }", "public function afterSave()\n {\n $this->unlinkOnSave();\n }", "protected function tearDown()\n {\n $sDelete = \"delete from oxlinks where oxid='\" . $this->_oxLinks->getId() . \"'\";\n oxDb::getDb()->Execute($sDelete);\n parent::tearDown();\n }", "function cleanup()\n {\n $db = eZDB::instance();\n $db->begin();\n $db->query( \"DELETE FROM ezsphinx\" );\n $db->query( \"DELETE FROM ezsphinx_pathnodes\" );\n $db->commit();\n }", "public function __destruct()\n {\n unlink($this->tmpListFile);\n }", "public function instance_deleted() {\n $this->purge_all_definitions();\n @rmdir($this->filestorepath);\n }", "public function teardown()\n {\n if ($this->csvFile) {\n unlink($this->csvFile);\n $this->csvFile = null;\n }\n\n if ($this->photoZip) {\n unlink($this->photoZip);\n $this->photoZip = null;\n }\n }", "protected function cleanupFilesystem() {\n $this->deleteFile($this->_directories[\"communication.log\"]);\n $this->deleteFile($this->_directories[\"communicationDetails\"]);\n $this->deleteFile($this->_directories[\"communityRegistry\"]);\n $this->deleteDirector($this->_directories[\"communityDefinitionsDir\"]);\n $this->deleteDirector($this->_directories[\"nodeListDir\"]);\n }", "protected function doCleanup() {\n $base = $this->tempPath();\n $dirs = array($base);\n\n if (is_dir($base)) {\n foreach ($this->recurse($base) as $file) {\n if (is_dir($file)) {\n $dirs[] = $file;\n } else {\n unlink($file);\n }\n }\n\n foreach (array_reverse($dirs) as $path) {\n rmdir($path);\n }\n }\n\n foreach (array(self::LOGFILE_STUB, self::STATEFILE_STUB, self::ZIPTEMP_STUB, self::ZIPCOMP_STUB) as $extra_file) {\n if (is_file($base.$extra_file)) {\n unlink($base.$extra_file);\n }\n }\n }", "function after_delete() {}", "function delete( )\n {\n $this->dbInit();\n $this->Database->query( \"DELETE FROM eZLink_Hit WHERE Link='$this->ID'\" ); \n $this->Database->query( \"DELETE FROM eZLink_Link WHERE ID='$this->ID'\" );\n }", "function deleteTemp () : void {\n\tforeach(glob(_ROOT_PATH.'temp/*') as $file){\n\t\tunlink($file);\n\t}\n}", "public function unlink() {\n $this->credential->setAccessToken(null);\n $this->credential->setTokenType(null);\n }", "function unlink_recursive($path, $fail_callback = null) {\n if ($fail_callback === null) {\n $fail_callback = function($path) {\n trigger_error(\"Could not delete \\\"$path\\\".\", E_USER_ERROR);\n };\n }\n if (is_file($path)) {\n if (@unlink($path) === false) {\n $fail_callback($path);\n return false;\n }\n } else {\n foreach (scandir($path) as $node) {\n if ($node === \".\" || $node === \"..\")\n continue;\n if (!unlink_recursive(\"$path/$node\"))\n return false;\n }\n if (@rmdir($path) === false) {\n $fail_callback($path);\n return false;\n }\n }\n return true;\n}", "function rmdirRecursive($path,$followLinks=false) { \n\t\t$dir = opendir($path) ;\n\t\twhile ($entry = readdir($dir)) { \n\t\t\tif (is_file(\"$path/$entry\") || ((!$followLinks) && is_link(\"$path/$entry\"))) {\n\t\t\t\t@unlink( \"$path/$entry\" );\n\t \t}\n\t \telseif (is_dir(\"$path/$entry\") && $entry!='.' && $entry!='..') {\n\t\t\t\trmdirRecursive(\"$path/$entry\"); // recursive\n\t\t\t}\n\t\t}\n\t\tclosedir($dir);\n\t\treturn @rmdir($path);\n\t}", "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 unlink() {\n\t\t/** @var WireFileTools $files */\n\t\tif(!strlen($this->basename) || !is_file($this->filename)) return true;\n\t\t$files = $this->wire('files');\n\t\tforeach($this->extras() as $extra) {\n\t\t\t$extra->unlink();\n\t\t}\n\t\treturn $files->unlink($this->filename, true);\n\t}", "public function destroy(Link $link)\n {\n //\n }", "public function deleteDirPhoto() {\n if(is_file($this->getLinkplan())){\n unlink($this->getLinkplan());\n }\n return (rmdir($this->dirPhoto));\n }", "public function __destruct()\n {\n @unlink($this->path);\n }", "public function __destruct()\r\n\t{\r\n\t\t@unlink($this->targetFile);\r\n\t\tif (strcmp($this->referenceFile, $this->outputReferenceFile) !== 0)\r\n\t\t\t@unlink($this->referenceFile);\r\n\t}", "private static function unlink($file, $suppress_errors)\n\t{\n\t\t$alias = Yii::getAlias($file);\n\t\tif ($suppress_errors) {\n\t\t\t@unlink($alias);\n\t\t} else {\n\t\t\tunlink($alias);\n\t\t}\n\t}", "protected function cleanup()\n {\n foreach ($this->temp_files as $file) {\n $this->filesystem->remove($file);\n }\n $this->temp_files = [];\n }", "function deinstallPackageDyntables() {\n @unlink('/usr/local/www/diag_dhcp_leases.php');\n @unlink('/usr/local/www/javascript/dyntables.js');\n @rename('/usr/local/pkg/diag_dhcp_leases.php.org', '/usr/local/www/diag_dhcp_leases.php');\n}", "protected function tearDown()\n\t{\n\t\t$this->object->DeleteList(array(array(\"objectId\", \">\", 0)));\n\t\t$this->child->DeleteList(array(array(\"childId\", \">\", 0)));\n\t\t$this->sibling->DeleteList(array(array(\"siblingId\", \">\", 0)));\n\t\t$this->parent_->DeleteList(array(array(\"parent_Id\", \">\", 0)));\n\t\tunset($this->object);\n\t\tunset($this->sibling);\n\t\tunset($this->sibling2);\n\t\tunset($this->child);\n\t\tunset($this->child2);\n\t\tunset($this->parent_);\n\t}", "public function delete()\n {\n $filesystem = $this->localFilesystem(dirname($this->path));\n\n method_exists($filesystem, 'deleteDir')\n ? $filesystem->deleteDir(basename($this->path))\n : $filesystem->deleteDirectory(basename($this->path));\n }", "public function destroy()\n {\n /**\n * We don't clean up swap because of performance considerations\n * Cleaning is performed by Memory Manager destructor\n */\n\n $this->_memManager->unlink($this, $this->_id);\n }", "function unlink_if_exists($fn) {\n\tif (file_exists($fn))\n\tunlink($fn);\n}", "function unlink_on_shutdown($filepath) {\r\n register_shutdown_function(function($filepath) {\r\n if (file_exists($filepath)) { @unlink($filepath); }\r\n }, $filepath);\r\n}", "public function afterDelete()\n {\n $this->resetPolymorphicRelation();\n if ($this->getPolymorphicRelation() !== null) {\n $this->getPolymorphicRelation()->delete();\n }\n\n parent::afterDelete();\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "protected function _delete()\r\n {\r\n parent::_delete();\r\n }", "public function cleanupPointers();", "public static function gcTearDownAfterClass() {\n\t\tgc_delete_link( self::$bookmark->link_id );\n\t}", "public function after_delete() {}", "function deletelinks($id_ex){\n $db = connect_start();\n\n $db->exec(\"DELETE FROM links WHERE id_exercice = '$id_ex'\");\n $db->exec(\"ALTER TABLE links AUTO_INCREMENT = 0\");\n}", "private function deleteTemporaryFiles()\n {\n foreach ($this->temp as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n\n $this->temp = [];\n }", "public function __destruct()\n {\n //$this->deletePath($this->path);\n }", "public function cleanTempFiles()\n\t{\n\t\t$manifestData = $this->_getManifestData();\n\n\t\tforeach ($manifestData as $row)\n\t\t{\n\t\t\tif (UpdateHelper::isManifestVersionInfoLine($row))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$rowData = explode(';', $row);\n\n\t\t\t// Delete any files we backed up.\n\t\t\t$backupFilePath = IOHelper::normalizePathSeparators(blx()->path->getAppPath().$rowData[0].'.bak');\n\n\t\t\tif (($file = IOHelper::getFile($backupFilePath)) !== false)\n\t\t\t{\n\t\t\t\tBlocks::log('Deleting backup file: '.$file->getRealPath(), \\CLogger::LEVEL_INFO);\n\t\t\t\t$file->delete();\n\t\t\t}\n\t\t}\n\n\t\t// Delete the temp patch folder\n\t\tIOHelper::deleteFolder($this->_unzipFolder);\n\n\t\t// Delete the downloaded patch file.\n\t\tIOHelper::deleteFile($this->_downloadFilePath);\n\t}", "function deleteArticleTree() {\n\t\tparent::rmtree($this->filesDir);\n\t}", "public function destroy(Slink $slink)\n {\n //\n }", "public function delete(GC_Model_Link $object)\n\t{\n \t$this->getDbTable()->delete(array('id = ?' => $object->id));\n\t}", "public function pre_delete()\r\n\t{\r\n\t\tparent::pre_delete();\r\n\t\t$Change = App::make('Change');\r\n\t\t$Change::where('fmodel', 'GalleryItem')\r\n\t\t\t ->where('fid', $this->id)\r\n\t\t\t ->delete();\r\n\t\t\t \r\n\t\t// Thumbs\r\n\t\t/*if($this->file) {\r\n\t\t\t# Should really check if these are used anywhere else, but no easy way to do that in other modules yet so just leaving them for now\r\n\t\t\t\r\n\t\t\t// Name\r\n\t\t\t$name = basename(public_path().$this->file);\r\n\t\t\t\r\n\t\t\t// Thumbs\r\n\t\t\t$thumbs = Config::get('galleries::thumbs');\r\n\t\t\tforeach($thumbs as $k => $v) {\r\n\t\t\t\tif(file_exists(public_path().$v['path'].$name)) unlink(public_path().$v['path'].$name);\r\n\t\t\t}\r\n\t\t}*/\r\n\t}", "static function delete()\n\t{\n\t\t\n\t\tif (file_exists(Cache::$path))\n\t\t\tunlink(Cache::$path);\n\t\t\t\t\n\t}", "public function __destruct()\n {\n if (file_exists($this->filename)) {\n unlink($this->filename);\n }\n\n foreach ($this->tempFiles as $file) {\n $this->filesystem->remove($file);\n }\n }", "function deletePhoto($imageNom, $link)\n{\n /* SUPPRIME DU SERVEUR */\n unlink($imageNom);\n\n /* SUPPRIME DE LA BASE DE DONNEES */\n $query = \"DELETE FROM Photo WHERE nomFich = '\" . $imageNom . \"'\";\n executeUpdate($link, $query);\n\n $imageNom = str_replace(array( '..', '/', '\\\\', ':' ), '', $imageNom);\n}", "public function clean()\n {\n if ( is_dir( $this->_strDirectory ) ) {\n $h = opendir($this->_strDirectory);\n while ($h && $f = readdir($h)) { \n if ( $f != '.' && $f != '..') {\n $fn = $this->_strDirectory . '/' . $f;\n if ( is_dir($fn) ) {\n $dir = new Sys_Dir($fn);\n $dir->delete();\n } else {\n $file = new Sys_File( $fn );\n $file->delete();\n }\n }\n }\n\t if ( $h ) { closedir( $h ); }\n \n }\n }" ]
[ "0.6682299", "0.66008157", "0.6587069", "0.65488595", "0.6521325", "0.6501601", "0.64481765", "0.6368464", "0.6368171", "0.6267687", "0.6225504", "0.62104803", "0.6163554", "0.6140713", "0.60702455", "0.60550785", "0.6033885", "0.6022012", "0.6015648", "0.60112", "0.6006856", "0.59652877", "0.59485763", "0.59222394", "0.59208554", "0.59208554", "0.5916128", "0.59129274", "0.59034705", "0.590248", "0.59016424", "0.5901392", "0.5885926", "0.5873628", "0.5870964", "0.58709484", "0.5865862", "0.5865252", "0.5847868", "0.5847425", "0.5838706", "0.58345276", "0.58299965", "0.5823512", "0.58107567", "0.5808708", "0.58066916", "0.5802562", "0.5802562", "0.5801169", "0.57993037", "0.57890046", "0.5786154", "0.57851535", "0.57822603", "0.577965", "0.57688063", "0.57572967", "0.5754225", "0.5750929", "0.5747629", "0.57411873", "0.574116", "0.5738937", "0.5733958", "0.5699104", "0.5686055", "0.56851035", "0.568421", "0.5683356", "0.56695956", "0.56474376", "0.56429154", "0.56377524", "0.563382", "0.5633076", "0.5629742", "0.56258804", "0.5625695", "0.5611721", "0.5611156", "0.5605762", "0.5605385", "0.5599866", "0.5597138", "0.55960745", "0.5591233", "0.5588379", "0.5583683", "0.5571929", "0.5549019", "0.55473197", "0.55424285", "0.554101", "0.5537915", "0.5535528", "0.5529795", "0.5526309", "0.55233103", "0.5520695", "0.55202615" ]
0.0
-1
Find the country for an IP address. Always returns a string (parent method may return array) To return the code only, pass in true for the $codeOnly parameter.
public static function ip2country($address, $codeOnly = false) { $results1 = null; $results2 = null; if (isset($_SERVER['HTTP_CF_IPCOUNTRY'])) { $results2 = $_SERVER['HTTP_CF_IPCOUNTRY']; } else { $results1 = parent::ip2country($address); } $returnValue = $results2 ?: $results1; if ($codeOnly) { if (is_array($returnValue)) { return $returnValue['code']; } return $returnValue; } $name = parent::countryCode2name($returnValue); return [ 'code' => $returnValue, 'name' => $name, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function visitor_country()\n {\n $code = null;\n if (Director::isDev()) {\n if (isset($_GET['countryfortestingonly'])) {\n $code = $_GET['countryfortestingonly'];\n Controller::curr()->getRequest()->getSession()->set('countryfortestingonly', $code);\n }\n if ($code = Controller::curr()->getRequest()->getSession()->get('countryfortestingonly')) {\n Controller::curr()->getRequest()->getSession()->set('MyCloudFlareCountry', $code);\n }\n }\n if (! $code) {\n if (isset($_SERVER['HTTP_CF_IPCOUNTRY']) && $_SERVER['HTTP_CF_IPCOUNTRY']) {\n return $_SERVER['HTTP_CF_IPCOUNTRY'];\n }\n $code = Controller::curr()->getRequest()->getSession()->get('MyCloudFlareCountry');\n if (! $code) {\n $address = self::get_remote_address();\n if (strlen($address) > 3) {\n $code = CloudFlareGeoIP::ip2country($address, true);\n }\n if (! $code) {\n $code = self::get_default_country_code();\n }\n if ('' === $code) {\n $code = Config::inst()->get('CloudFlareGeoip', 'default_country_code');\n }\n Controller::curr()->getRequest()->getSession()->set('MyCloudFlareCountry', $code);\n }\n }\n\n return $code;\n }", "public function getIpToCountry($ip_address)\r\n {\r\n $url_to_exch_code = \"https://ipinfo.io/\" . $ip_address . \"/country\";\r\n\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, $url_to_exch_code);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n $code_string = curl_exec($ch);\r\n curl_close($ch);\r\n\r\n //Leave only letters in query result\r\n $code_string = preg_replace(\"/[^A-Z]+/\", \"\", $code_string);\r\n\r\n //Check also an amount of letters - should be only two\r\n if(!empty($code_string) && strlen($code_string) == 2) {\r\n\r\n if(is_file(APPPATH . 'libraries/ipstate_src/countries_names.json')){\r\n\r\n $json_names = file_get_contents(APPPATH . 'libraries/ipstate_src/countries_names.json');\r\n\r\n $names_array = json_decode($json_names, true);\r\n\r\n if(array_key_exists($code_string, $names_array)){\r\n\r\n $country_name = $names_array[$code_string];\r\n $country_name = $this->checkIpResult($country_name);\r\n return $country_name;\r\n\r\n }else {\r\n return false;\r\n }\r\n } else {\r\n return false;\r\n }\r\n } else {\r\n return false;\r\n }\r\n }", "public function getCountryByIP($ipaddress = null, $useFallback = true)\n {\n if (!$this->_locationCode) {\n\n require_once(\"GeoIP/geoip.inc\");\n\n if (is_null($this->_gi)) {\n $this->_gi = geoip_open(\"/bigdisk/docs/INC/_default/GeoIP/GeoIP.dat\", GEOIP_STANDARD);\n }\n\n if (is_null($ipaddress)) {\n $ipaddress = $this->getIpAddress();\n }\n\n $locationCode = geoip_country_code_by_addr($this->_gi, $ipaddress);\n\n if (!$locationCode) {\n if ($useFallback) {\n $locationCode = geoip_country_code_by_addr($this->_gi, '77.95.99.162');\n } else {\n Logger::error('getCountryByIP() called without fallback and failed for client ip: ' . $ipaddress);\n $locationCode = null;\n }\n }\n\n $this->_locationCode = $locationCode;\n }\n\n Logger::debug('Get country by ip: ' . $this->_locationCode);\n\n return $this->_locationCode;\n }", "public function getCode()\r\r\n\t{\r\r\n\t\treturn \"\";#getCountryFromIP($this->ip,\"code\");\r\r\n\t}", "public static function getCountry(){\n $country = '';\n $ip = self::getClientIP();\n if ($ip != '') {\n $data = file_get_contents('http://freegeoip.net/json/' . $ip);\n $response = json_decode($data);\n $country = $response->country_code;\n }\n \n return $country;\n }", "public static function country()\n\t{\n\t\treturn static::onTrustedRequest(function () {\n\t\t\treturn request()->header('CF_IPCOUNTRY');\n\t\t}) ?: '';\n\t}", "public function countryCode();", "public function getCountryCode();", "public function getCountryNameDirectly()\r\n {\r\n\r\n $url_to_exch_code = \"https://freegeoip.net/json/\";\r\n\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, $url_to_exch_code);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n $json = curl_exec($ch);\r\n curl_close($ch);\r\n\r\n $details = json_decode($json, true);\r\n\r\n if(!empty($details['country_name'])) {\r\n\r\n return $details['country_name'];\r\n\r\n } else {\r\n\r\n $url_to_exch_code = \"https://geoip.nekudo.com/api/json\";\r\n\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, $url_to_exch_code);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n $json = curl_exec($ch);\r\n curl_close($ch);\r\n\r\n $details = json_decode($json, true);\r\n\r\n if(!empty($details['country']['name'])) {\r\n\r\n return $details['country']['name'];\r\n\r\n } else {\r\n\r\n return false;\r\n\r\n }\r\n }\r\n\r\n }", "protected static function country_code(): mixed\n\t{\n\t\treturn self::$query->country_code;\n\t}", "private function getCountryIdByIp()\n {\n try {\n $countryId = $this->geoIpAdapter->getCountryCode($this->request->getClientIp());\n } catch (\\Exception $e) {\n $countryId = null;\n }\n return $countryId;\n }", "public static function getCountryByIp($ip)\n {\n $country = file_get_contents('https://ipapi.co/' . $ip . '/country_name/');\n if(\\strtolower($country) !== 'undefined') {\n return $country;\n }\n }", "public function getCountry($ip = null)\r\n {\r\n //filter_var is 5.2+ only\r\n if (!empty($ip) && !filter_var($ip, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {\r\n trigger_error(\"Invalid IP sent to getCountry! Sent: $ip\", E_USER_ERROR);\r\n return false;\r\n }\r\n $args = array();\r\n if (!empty($ip)) {\r\n $args['ip'] = $ip;\r\n }\r\n $country = self::makeCall('getCountry', $args);\r\n if (isset($this) && !empty($country)) {\r\n $this->country = $country;\r\n }\r\n return $country;\r\n }", "function getCountry($ip_address){\n $url = \"http://ip-to-country.webhosting.info/node/view/36\";\n $inici = \"src=/flag/?type=2&cc2=\";\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST,\"POST\");\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"ip_address=$ip_address\"); \n \n ob_start();\n \n curl_exec($ch);\n curl_close($ch);\n $cache = ob_get_contents();\n ob_end_clean();\n \n $resto = strstr($cache,$inici);\n $pais = substr($resto,strlen($inici),2);\n \n return $pais;\n }", "function SI_determineCountry($ip) {\n\tif (!SI_isIPtoCountryInstalled()) return '';\n\t\n\tglobal $SI_tables;\n\t$ip = sprintf(\"%u\",ip2long($ip));\n\t\n\t$query = \"SELECT country_name FROM $SI_tables[countries]\n\t\t\t WHERE ip_from <= $ip AND\n\t\t\t ip_to >= $ip\";\n\tif ($result = mysql_query($query)) {\n\t\tif ($r = mysql_fetch_array($result)) {\n\t\t\treturn trim(ucwords(preg_replace(\"/([A-Z\\xC0-\\xDF])/e\",\"chr(ord('\\\\1')+32)\",$r['country_name'])));\n\t\t\t}\n\t\t}\n\t}", "public function getCountryCode($ip=null) {\r\r\n\t\tif (!$this->database)\r\r\n\t\t\treturn geoip_country_code_by_name($this->currentIp($ip));\r\r\n\t\treturn geoip_country_code_by_addr($this->database, $this->currentIp($ip));\r\r\n\t}", "function get_country_by_ip($ip) {\n // Check if ip address is valid\n if (filter_var($ip, FILTER_VALIDATE_IP)) {\n // Get host\n $host = gethostbyaddr($ip);\n\n // Try determination of origin via hostname\n $country = get_country_by_host(gethostbyaddr($ip));\n\n // If determination via hostname fails and ip is not localhost check RDAP record of ip address\n if($country == null && $ip != \"127.0.0.1\" && $ip != \"::1\") {\n $country = get_country_by_rdap($ip);\n if($country == null) {\n $domain_parts = explode(\".\", $host);\n $top_level_domain = $domain_parts[count($domain_parts) - 1];\n if($top_level_domain == \"com\" || $top_level_domain == \"net\" || $top_level_domain == \"edu\" || $top_level_domain == \"gov\") {\n return \"US\";\n }\n }\n }\n return $country;\n }\n return null;\n}", "function getCountryFromIp() {\n\n\n //error_log(\"getting country for your IP\");\n\n \n\n $ch = curl_init('http://geoip.nekudo.com/api/' . $_SERVER['REMOTE_ADDR']);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n\n $geoip = json_decode($result);\n \n if ($geoip) {\n $countryCode = $geoip->country->code;\n return $countryCode;\n\n \n }\n else {\n // No results returned from the API\n // return country US\n //error_log(\"no results from API, call getCountyFromURL\");\n \n return \"US\";\n }\n}", "public static function get_ip_country() {\n\t\tif ( false === self::$ip_country ) {\n\t\t\t$geoip = WC_Geolocation::geolocate_ip();\n\t\t\tself::$ip_country = $geoip['country'];\n\t\t}\n\t\treturn self::$ip_country;\n\t}", "public function country_full()\r\n {\r\n\r\n // $address = new PiplApi_Address(array('country' => 'FR'));\r\n // print $address->country; // Outputs \"FR\"\r\n // print $address->country_full(); // Outputs \"France\"\r\n if (!empty($this->country))\r\n {\r\n $uppedcoutnry = strtoupper($this->country);\r\n\r\n return array_key_exists($uppedcoutnry, PiplApi_Utils::$piplapi_countries) ?\r\n PiplApi_Utils::$piplapi_countries[$uppedcoutnry] :\r\n NULL;\r\n }\r\n return;\r\n }", "public function get_country_code($host){\n\t\t$ip_address = @gethostbyname($host);\n\n\t\t$country_code = '';\n\t\tif(filter_var($ip_address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) === false) {\n\t\t\t$this->errors[] = sprintf(__('\"%s\" is not a valid IP address or hostname.',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t AELIA_CS_PLUGIN_TEXTDOMAIN),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$host);\n\t\t\t$country_code = false;\n\t\t}\n\n\t\tif($country_code !== false) {\n\t\t\ttry {\n\t\t\t\t$geoip = geoip_open(self::geoip_db_file(), GEOIP_STANDARD);\n\t\t\t\t$country_code = geoip_country_code_by_addr($geoip, $ip_address);\n\t\t\t}\n\t\t\tcatch(Exception $e) {\n\t\t\t\t$this->errors[] = sprintf(__('Error(s) occurred while retrieving Geolocation information ' .\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'for IP Address \"%s\". Error: %s.',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t AELIA_CS_PLUGIN_TEXTDOMAIN),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ip_address,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$e->getMessage());\n\t\t\t\t$country_code = false;\n\t\t\t}\n\n\t\t\tif(get_value('filehandle', $geoip, false) != false) {\n\t\t\t\tgeoip_close($geoip);\n\t\t\t}\n\t\t}\n\n\t\treturn apply_filters('wc_aelia_ip2location_country_code', $country_code, $host);\n\t}", "public function getCountry()\n {\n return isset($this->address_data['country']) ? $this->address_data['country'] : null;\n }", "public function get_visitor_country() {\n\t\treturn $this->get_country_code($this->get_visitor_ip_address());\n\t}", "public function getUserCountry()\n {\n $fileName = $this->getDatabaseFile();\n\n $reader = new MaxMindReader($fileName);\n\n $ipAddress = $this->getUserIp();\n //$ipAddress = \"82.65.140.34\";\n\n $country = $reader->get($ipAddress);\n $reader->close();\n\n return $country ? $country['country']['iso_code'] : null;\n }", "public function getCountryCode(): string;", "function country($code = null)\n{\n if (!$code) {\n return \\SumanIon\\CloudFlare::country() ?: 'US';\n }\n\n if (true === $code) {\n return country(\\SumanIon\\CloudFlare::country() ?: 'US');\n }\n\n try {\n return app('earth')->findOneByCode($code);\n } catch (\\Exception $ex) {\n return null;\n }\n}", "public function testIPCountry()\n {\n $settings = require(__DIR__ . '/../src/settings.php');\n $geo_ip = new GeoIP($settings['settings']);\n\n $country = $geo_ip->getIPCountry('90.221.55.209');\n $this->assertEquals('GB', $country['countrycode']);\n }", "public function getCountryUsingGEOIP($ip = null)\n {\n if (is_null($ip)) {\n $ip = $this->commonFunctionRepo->get_client_ip();\n }\n // If site access from localhost or function not exist\n if ($_SERVER['HTTP_HOST'] == 'localhost' || !function_exists('geoip_country_code_by_name')) {\n // For localhost\n if ($ip == '::1' || $ip == '127.0.0.1') {\n $countryCode = 'IN';\n } else {\n $countryCode = 'GB';\n }\n } else {\n //Function call for identify country code from IP\n $countryCode = geoip_country_code_by_name($ip);\n }\n //if country code is empty then set it as GB\n if (empty($countryCode)) {\n $countryCode = 'GB';\n }\n $this->useragent['country'] = $countryCode;\n }", "public function getCountryFromIpReturnsStringDataProvider() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'217.72.208.133',\n\t\t\t\t'Germany'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'27.121.255.4',\n\t\t\t\t'Japan'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'5.226.31.255',\n\t\t\t\t'Spain'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'66.85.131.18',\n\t\t\t\t'United States'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'182.118.23.7',\n\t\t\t\t'China'\n\t\t\t),\n\t\t);\n\t}", "public function getCountryFromDb($ip_address)\r\n {\r\n //Check the IP version\r\n if (filter_var($ip_address,FILTER_VALIDATE_IP)) {\r\n\r\n $dbname = \"ip2location_db1\";\r\n\r\n //Converts a string containing an (IPv4) Internet Protocol dotted address into a long integer\r\n $ip_address = ip2long($ip_address);\r\n\r\n } elseif(filter_var($ip_address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {\r\n\r\n $dbname = \"ip2location_db1_ipv6\";\r\n\r\n //Convert IP address to its corresponding 32–bit decimal number\r\n $ip_address = $this->ipAddressToIpNumber($ip_address);\r\n\r\n } else {\r\n return false;\r\n }\r\n \r\n $CI =&get_instance();\r\n\r\n $CI->db->where('ip_from <=', $ip_address);\r\n $CI->db->where('ip_to >=', $ip_address);\r\n $res = $CI->db->get($dbname);\r\n\r\n if ($res && $res->num_rows() > 0) {\r\n $row = $res->row();\r\n if ($row->country_name && $row->country_name !== '-') {\r\n $country_name = $row->country_name;\r\n $country_name = $this->checkIpResult($country_name);\r\n return $country_name;\r\n }\r\n } else {\r\n return false;\r\n }\r\n }", "public function getCountryByIp($ip)\n {\n $reader = $this->_getReader();\n return $reader->get($ip);\n }", "public function ip2country($ipAddress)\n\t{\n\t\treturn static::$reader->country($ipAddress);\n\t}", "protected function getCountryByCode(string $code)\n {\n global $db;\n require_once DOL_DOCUMENT_ROOT.'/core/class/ccountry.class.php';\n $pays = new \\Ccountry($db);\n if ($pays->fetch(0, $code) > 0) {\n return $pays->id;\n }\n\n return false;\n }", "public function getCountry();", "public function getCountry();", "private function get_country_city_from_ip($ip) {\n if (!filter_var($ip, FILTER_VALIDATE_IP)) {\n throw new InvalidArgumentException(\"IP is not valid\");\n }\n\n//contact ip-server\n $response = @file_get_contents('http://www.netip.de/search?query=' . $ip);\n if (empty($response)) {\n return \"error\";\n }\n\n $patterns = array();\n $patterns[\"domain\"] = '#Name: (.*?)&nbsp;#i';\n $patterns[\"country\"] = '#Country: (.*?)&nbsp;#i';\n $patterns[\"state\"] = '#State/Region: (.*?)<br#i';\n $patterns[\"town\"] = '#City: (.*?)<br#i';\n\n $ipInfo = array();\n\n foreach ($patterns as $key => $pattern) {\n $ipInfo[$key] = preg_match($pattern, $response, $value) && !empty($value[1]) ? $value[1] : 'not found';\n }\n\n return $ipInfo;\n }", "static function get_country($code) {\n $countries = self::get_countries();\n foreach($countries as $c) {\n if($c->code == $code || $c->code2l == $code) {\n return $c;\n }\n }\n return FALSE;\n }", "function getCountry($code){\n\t\n\tglobal $dz;\n\t\n\tif(strlen($code)!=2){\n\t\t\n\t\t// Invalid input.\n\t\terror('field/invalid','country');\n\t\t\n\t}\n\t\n\t// Make sure it's uppercase:\n\t$code=strtoupper($code);\n\t\n\t// Get the row:\n\t$row=$dz->get_row('select country_id from countries where iso2=\"'.$code.'\"');\n\t\n\tif(!$row){\n\t\t\n\t\t// Country was not found.\n\t\terror('country/notfound');\n\t\t\n\t}\n\t\n\treturn $row['country_id'];\n}", "function ip_info($ip = NULL, $purpose = \"country_code\", $deep_detect = TRUE) {\n $output = NULL;\n if (filter_var($ip, FILTER_VALIDATE_IP) === FALSE) {\n $ip = $_SERVER[\"REMOTE_ADDR\"];\n if ($deep_detect) {\n if (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP))\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP))\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n }\n }\n $purpose = str_replace(array(\"name\", \"\\n\", \"\\t\", \" \", \"-\", \"_\"), NULL, strtolower(trim($purpose)));\n if (filter_var($ip, FILTER_VALIDATE_IP) && in_array($purpose, $support)) {\n $ipwhois_result = @json_decode(file_get_contents(\"http://ipwhois.app/json/\" . $ip));\n if (@strlen(trim($ipwhois_result->geoplugin_countryCode)) == 2) \n\t\t$cc=@$ipwhois_result->geoplugin_country_code{\n switch ($purpose) {\n case $cc:\n\t\t\t\t$content = @$ipwhois_result->geoplugin_countryName;\n\t\t\t\tbreak;\n }\n }\n }\n echo '<div>'.Weloceme to $content.'</div>';\n}", "public function countryCode(): string\n {\n return $this->getData('CountryCodeISO3166A2');\n }", "public function country()\r\n\t{\r\n\t\t$country = \\Shop\\Models\\Countries::fromCode( $this->country_isocode_2 );\r\n\r\n\t\treturn $country;\r\n\t}", "public function getCountry()\n {\n if (!array_key_exists('country', $this->userInfo)) {\n $this->getLocation();\n }\n\n return $this->getInfoVar('country');\n }", "function getPais($ip = false){\n $ip = ($ip==false)?getUserIP():$ip;\n $key=\"7b471597a8e15e665536cef21de5b54ffc5a38a7\";\n $data= file_get_contents(\"http://api.db-ip.com/addrinfo?addr=$ip&api_key=$key\");\n $data = json_decode($data,true);\n return ($data['country']);\n}", "public function getCountryByIP($ipAddress)\n {\n // Check IP validity\n $validate = new Zend_Validate_Ip(array('allowipv6' => false));\n if (!$validate->isValid($ipAddress)) {\n return false;\n }\n\n $adapter = $this->getReadConnection();\n $numValue = ip2long($ipAddress);\n $query = $adapter->select()\n ->from($this->getMainTable(), array('range_to', 'country_id'))\n ->where('range_from <= ?', $numValue)\n ->order('range_from ' . Zend_Db_Select::SQL_DESC)\n ->limit(1);\n $row = $adapter->fetchRow($query);\n if ($row && $row['range_to'] >= $numValue) {\n return $row['country_id'];\n }\n\n return false;\n }", "public function getCountryCode(): ?string;", "public function getCountry() {}", "public function getCountry() {}", "public function getCountryCode()\n {\n return substr($this->_code, -2);\n }", "function getLocationInfoByIp($ip){\r\n\r\n $ip_data = @json_decode(file_get_contents(\"http://www.geoplugin.net/json.gp?ip=\".$ip));\r\n if($ip_data && $ip_data->geoplugin_countryName != null){\r\n $result['country'] = $ip_data->geoplugin_countryCode;\r\n $result['city'] = $ip_data->geoplugin_city;\r\n }\r\n $country_short=$result['country'];\r\n $country_name=Locale::getDisplayRegion('sl-Latn-'.$country_short.'-nedis', 'en');\r\n return $country_name;\r\n}", "public function country(): string\n {\n return $this->country;\n }", "public function getCountry(): string\n {\n return $this->result->country_name;\n }", "static function getCountryFromIPbyGEOpluginNet(&$CountryEvaluation)\n\t{\t\n\t\t$CountryEvaluation[\"methods\"][\"GEOpluginNet\"]\t= '-';\n\t\tif (isset ($_SERVER['HTTP_CLIENT_IP'])\t\t\t) {$client\t= $_SERVER['HTTP_CLIENT_IP'];}\t\t\telse {\t$client\t\t= 'unknown';}\n\t\tif (isset ($_SERVER['HTTP_X_FORWARDED_FOR'])\t) {$forward\t= $_SERVER['HTTP_X_FORWARDED_FOR'];}\telse {\t$forward\t= 'unknown';}\n\t\tif (isset ($_SERVER['REMOTE_ADDR'])\t\t\t\t) {$remote\t= $_SERVER['REMOTE_ADDR'];}\t\t\t\telse {\t$remote\t\t= 'unknown';}\n\n\t\tif\t\t( filter_var ( $client,\t\tFILTER_VALIDATE_IP )\t)\t{ $ip = $client;\t}\n\t\telseif\t( filter_var ( $forward,\tFILTER_VALIDATE_IP )\t)\t{ $ip = $forward;\t}\n\t\telse \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ $ip = $remote;\t}\n\t\t$CountryEvaluation[\"status\"][\"GEOpluginNetIPused\"]\t= $ip;\n\t\ttry\t{ $geopluginResult\t= \tfile_get_contents(\"http://www.geoplugin.net/json.gp?ip=\".$ip); } \n\t\tcatch (Exception $exception) \n\t\t{ \n\t\t\t$CountryEvaluation[\"status\"][\"GEOpluginNetsuccessful\"]\t= 0;\n\t\t\t$CountryEvaluation[\"status\"][\"GEOpluginNeterror\"]\t= \"errormessage = ( \". str_replace(array(\"\\r\\n\", \"\\n\", \"\\r\"), \" \", $exception->message) .\" )\";\n\t\t}\n\t\tif (!$geopluginResult)\t{ /* geoPlugin did not work... */}\n\t\telse\n\t\t{\n\t\t\t$ip_data = json_decode ($geopluginResult);\n\t\t\tif($ip_data && $ip_data->geoplugin_countryName != null)\n\t\t\t{\n\t\t\t\t$CountryEvaluation[\"status\"][\"GEOpluginNetsuccessful\"]\t= 1;\n\t\t\t\t$CountryEvaluation[\"methods\"][\"GEOpluginNet\"]\t= $ip_data->geoplugin_countryCode;\n\t\t\t}\n\t\t}\n\t\treturn ;\n\t}", "public function getCountry() : string {\n\t\t\treturn substr($this->value, 4, 2);\n\t\t}", "abstract public function country();", "abstract public function countryISOCode();", "public function getCountryName($ip=null) {\r\r\n\t\tif (!$this->database)\r\r\n\t\t\treturn geoip_country_name_by_name($this->currentIp($ip));\r\r\n\t\treturn geoip_country_name_by_addr($this->database, $this->currentIp($ip));\r\r\n\t}", "public function getPayerAddressCountry() {\n\t\treturn $this->_getField(self::$PAYER_ADDRESS_COUNTRY);\n\t}", "public function getCountry()\n {\n $arr_countries = array(\n 'F' =>\t_('Austria'),\n 'T' =>\t_('Belgium'),\n 'D' =>\t_('Finland'),\n 'E' =>\t_('France'),\n 'L' =>\t_('France'),\n 'P' =>\t_('Germany'),\n 'R' =>\t_('Germany'),\n 'N' =>\t_('Greece'),\n 'K' =>\t_('Ireland'),\n 'J' =>\t_('Italy'),\n 'G' =>\t_('Netherlands'),\n 'H' =>\t_('United Kingdom'),\n 'U' =>\t_('Portugal'),\n 'M' =>\t_('Spain'),\n );\n\n return $arr_countries[$this->str_value[0]];\n }", "public static function getCountry(string $code): string\n {\n if (Str::contains($code, '_')) {\n $tab = explode('_', $code);\n\n return Str::lower($tab[1]);\n } elseif (Str::contains($code, '-')) {\n $tab = explode('-', $code);\n\n return Str::lower($tab[1]);\n }\n\n return config('contentful.default_country');\n }", "function countryCityFromIP($ipAddr)\n{\n //Developed by Roshan Bhattarai \n //Visit http://roshanbh.com.np for this script and more.\n \n //verify the IP address for the \n ip2long($ipAddr)== -1 || ip2long($ipAddr) === false ? trigger_error(\"Invalid IP\", E_USER_ERROR) : \"\";\n // This notice MUST stay intact for legal use\n $ipDetail=array(); //initialize a blank array\n //get the XML result from hostip.info\n $xml = file_get_contents(\"http://api.hostip.info/?ip=\".$ipAddr);\n //get the city name inside the node <gml:name> and </gml:name>\n preg_match(\"@<Hostip>(\\s)*<gml:name>(.*?)</gml:name>@si\",$xml,$match);\n //assing the city name to the array\n $ipDetail['city']=$match[2]; \n //get the country name inside the node <countryName> and </countryName>\n preg_match(\"@<countryName>(.*?)</countryName>@si\",$xml,$matches);\n //assign the country name to the $ipDetail array \n $ipDetail['country']=$matches[1];\n //get the country name inside the node <countryName> and </countryName>\n preg_match(\"@<countryAbbrev>(.*?)</countryAbbrev>@si\",$xml,$cc_match);\n $ipDetail['country_code']=$cc_match[1]; //assing the country code to array\n //return the array containing city, country and country code\n return $ipDetail;\n}", "function ip_info($ip = NULL, $purpose = \"location\", $deep_detect = TRUE) {\r\n $output = NULL;\r\n if (filter_var($ip, FILTER_VALIDATE_IP) === FALSE) {\r\n $ip = $_SERVER[\"REMOTE_ADDR\"];\r\n if ($deep_detect) {\r\n if (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP))\r\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP))\r\n $ip = $_SERVER['HTTP_CLIENT_IP'];\r\n }\r\n }\r\n $purpose = str_replace(array(\"name\", \"\\n\", \"\\t\", \" \", \"-\", \"_\"), NULL, strtolower(trim($purpose)));\r\n $support = array(\"country\", \"countrycode\", \"state\", \"region\", \"city\", \"location\", \"address\");\r\n $continents = array(\r\n \"AF\" => \"Africa\",\r\n \"AN\" => \"Antarctica\",\r\n \"AS\" => \"Asia\",\r\n \"EU\" => \"Europe\",\r\n \"OC\" => \"Australia (Oceania)\",\r\n \"NA\" => \"North America\",\r\n \"SA\" => \"South America\"\r\n );\r\n if (filter_var($ip, FILTER_VALIDATE_IP) && in_array($purpose, $support)) {\r\n $ipdat = @json_decode(file_get_contents(\"http://www.geoplugin.net/json.gp?ip=\" . $ip));\r\n if (@strlen(trim($ipdat->geoplugin_countryCode)) == 2) {\r\n switch ($purpose) {\r\n case \"location\":\r\n $output = array(\r\n \"city\" => @$ipdat->geoplugin_city,\r\n \"state\" => @$ipdat->geoplugin_regionName,\r\n \"country\" => @$ipdat->geoplugin_countryName,\r\n \"country_code\" => @$ipdat->geoplugin_countryCode,\r\n \"continent\" => @$continents[strtoupper($ipdat->geoplugin_continentCode)],\r\n \"continent_code\" => @$ipdat->geoplugin_continentCode\r\n );\r\n break;\r\n case \"address\":\r\n $address = array($ipdat->geoplugin_countryName);\r\n if (@strlen($ipdat->geoplugin_regionName) >= 1)\r\n $address[] = $ipdat->geoplugin_regionName;\r\n if (@strlen($ipdat->geoplugin_city) >= 1)\r\n $address[] = $ipdat->geoplugin_city;\r\n $output = implode(\", \", array_reverse($address));\r\n break;\r\n case \"city\":\r\n $output = @$ipdat->geoplugin_city;\r\n break;\r\n case \"state\":\r\n $output = @$ipdat->geoplugin_regionName;\r\n break;\r\n case \"region\":\r\n $output = @$ipdat->geoplugin_regionName;\r\n break;\r\n case \"country\":\r\n $output = @$ipdat->geoplugin_countryName;\r\n break;\r\n case \"countrycode\":\r\n $output = @$ipdat->geoplugin_countryCode;\r\n break;\r\n }\r\n }\r\n }\r\n return $output;\r\n }", "public function requestCountryCode();", "public function getISOCountry()\n {\n return $this->iSOCountry;\n }", "protected function getCountry($identifier)\n {\n return array_first(\n explode('-', $identifier),\n function ($pieces) {\n return true;\n }\n );\n }", "public function getCountryName();", "public function getCountryName($ip_address)\r\n {\r\n\r\n //get country name via ipinfo.io and countries_names.json\r\n $country = $this->getIpToCountry($ip_address);\r\n\r\n if ($country) {\r\n\r\n $this->countryname = $country;\r\n return $this->countryname;\r\n\r\n } else {\r\n\r\n //get country name from database\r\n $country = $this->getCountryFromDb($ip_address);\r\n\r\n if ($country) {\r\n\r\n $this->countryname = $country;\r\n return $this->countryname;\r\n\r\n } else {\r\n\r\n //get country name from APIs response directly, without using IP\r\n $country = $this->getCountryNameDirectly();\r\n\r\n if($country) {\r\n\r\n $this->countryname = $country;\r\n return $this->countryname;\r\n\r\n } else {\r\n\r\n echo \"Error while getting user country name!\";\r\n }\r\n }\r\n }\r\n\r\n }", "public function findCountry($code)\n {\n\n $country = $this->em->getRepository('TTBundle:Airport')->findOneByAirportCode($code);\n\n return $country;\n }", "function jr_get_server_country() {\r\n\r\n\t// Get user country\r\n\tif(isset($_SERVER['HTTP_X_FORWARD_FOR'])) $ip = $_SERVER['HTTP_X_FORWARD_FOR']; else $ip = $_SERVER['REMOTE_ADDR'];\r\n\r\n\t$ip = strip_tags($ip);\r\n\t$country = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\r\n\r\n\t$result = wp_remote_get('http://api.hostip.info/country.php?ip='.$ip);\r\n\tif (!is_wp_error($result) && strtolower($result['body']) != 'xx') $country = $result['body'];\r\n\r\n\treturn strtolower($country);\r\n}", "public function getCountryCode()\n {\n $node = $this->response->getFirst('contact:addr/contact:cc', $this->node);\n\n return $node->nodeValue;\n }", "public function getCountryCode() : string\n {\n return $this->countryCode;\n }", "public function country(): ?string\n {\n return $this->country;\n }", "function getCountry($ip)\n{\n global $geoPlugin_array;\n $apiurl = \"http://www.geoplugin.net/php.gp?ip={$ip}\";\n echo $apiurl;\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $apiurl);\n $geoPlugin_array = curl_exec($ch);\n return $geoPlugin_array['geoplugin_country'];\n}", "public function getCountryCode()\n {\n return $this->code;\n }", "function tep_get_country_iso_code_2($country_id) {\n $country_iso_query = tep_db_query(\"select * from \" . TABLE_COUNTRIES . \" where countries_id = '\" . $country_id . \"'\");\n if (!tep_db_num_rows($country_iso_query)) {\n return 0;\n }\n else {\n $country_iso_row = tep_db_fetch_array($country_iso_query);\n return $country_iso_row['countries_iso_code_2'];\n }\n }", "function tep_get_country_iso_code_2($country_id) {\n\n $country_iso_query = tep_db_query(\"select * from \" . TABLE_COUNTRIES . \" where countries_id = '\" . $country_id . \"'\");\n\n if (!tep_db_num_rows($country_iso_query)) {\n return 0;\n }\n else {\n $country_iso_row = tep_db_fetch_array($country_iso_query);\n return $country_iso_row['countries_iso_code_2'];\n }\n }", "protected function getCountry()\n {\n return strtoupper($this->checkoutSession->getLastRealOrder()->getBillingAddress()->getCountryId());\n }", "function getLocationInfoByIp() {\n\t\t$client = @$_SERVER['HTTP_CLIENT_IP'];\n\t\t$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t$remote = @$_SERVER['REMOTE_ADDR'];\n\t\t$result = array('country'=>'', 'city'=>'');\n\t\tif(filter_var($client, FILTER_VALIDATE_IP)){\n\t\t\t$ip = $client;\n\t\t}elseif(filter_var($forward, FILTER_VALIDATE_IP)){\n\t\t\t$ip = $forward;\n\t\t}else{\n\t\t\t$ip = $remote;\n\t\t}\n\t\t$ip_data = @json_decode(file_get_contents(\"http://www.geoplugin.net/json.gp?ip=\".$ip));\n\t\tif($ip_data && $ip_data->geoplugin_countryName != null){\n\t\t\t$result['country'] = $ip_data->geoplugin_countryName;\n\t\t\t$result['city'] = $ip_data->geoplugin_city;\n\t\t\t$result['ip'] = $remote;\n\t\t}\n\t\treturn $result;\n }", "public function getCountryCode(): ?string\n {\n return $this->countryCode;\n }", "function get_calling_code($country_id = '')\r\n {\r\n echo get_country_calling_code_by_id($country_id);\r\n }", "public function getCountryCode()\n\t{\n\t\tif ($this->countryCode === null)\n\t\t{\n\t\t\t$binInfo = $this->getBinInfo();\n\t\t\tif ($binInfo)\n\t\t\t\t$this->countryCode = strtoupper($binInfo->countryCode);\n\t\t}\n\t\treturn $this->countryCode;\n\t}", "public function getPostalcode();", "public function getCountry()\n {\n return parent::getValue('country');\n }", "public function getCountry() :string\n {\n return $this->country;\n }", "public function getCountry() : string\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->getValueObject('country');\n }", "public function getPostalCode();", "public function getPostalCode();", "public function getCountryCode()\n {\n return $this->countryCode;\n }", "public function getCountryCode()\n {\n return $this->countryCode;\n }", "public function getCountryCode()\n {\n return $this->countryCode;\n }", "public function getCountry()\n {\n return $this->getParameter('country');\n }", "public function getCountryCode(): string\n {\n return !is_null($this->Countrycode)\n ? $this->Countrycode\n : self::DEFAULT_COUNTRY;\n }", "public static function ipLookup($ip) {\r\n\t\t$query = self::$db->query('SELECT iscollege, description FROM l_subnet WHERE subnet >> $1 ORDER BY description ASC', array($ip));\r\n\r\n\t\t$location = array();\r\n\r\n\t\tif (($query === null) or (pg_num_rows($query) == 0)) {\r\n\t\t\t$geoip = geoip_record_by_name($ip);\r\n\t\t\t$location[0] = ($geoip === FALSE) ? 'Unknown' : empty($geoip['city']) ? \"{$geoip['country_name']}\" : utf8_encode($geoip['city']).\", {$geoip['country_name']}\";\r\n\t\t\treturn $location;\r\n\t\t}\r\n\t\t$q = self::$db->fetch_all($query);\r\n\t\tforeach ($q as $k) {\r\n\t\t\t$location[] = $k['description'];\r\n\t\t\t$location[] = ($k['iscollege'] == 't') ? 'College Bedroom' : 'Study Room / Labs / Wifi';\r\n\t\t}\r\n\t\treturn $location;\r\n\t}", "function get_country_by_host($host) {\n // Make sure host is set and not an ip address\n if(isset($host) && filter_var($host, FILTER_VALIDATE_IP) == false) {\n\n // Split host by dots\n $domain_parts = explode(\".\", $host);\n\n // Get TLD (Last element of array)\n $top_level_domain = $domain_parts[count($domain_parts) - 1];\n\n // Check if TLD is country code\n if(strlen($top_level_domain) == 2) {\n // Return upper case country code\n return strtoupper($top_level_domain);\n }\n }\n\n // Return null if determination of host origin fails\n return null;\n}", "private function countryIso()\n {\n $cacheKey = 'country_abbrs';\n $ttl = config('priongeography.cache_ttl', 60*24);\n\n return $this->cache->remember($cacheKey, $ttl, function () {\n $countries = scandir(__DIR__.'/config/geography');\n $countries = str_replace(\".php\", \"\", $countries);\n unset($countries[0]);\n unset($countries[1]);\n\n return $countries;\n });\n }", "public static function getCountryByCode($code){\n return Country::findOne([ 'code'=> $code]);\n }", "function country_flag($countryCode)\n {\n return CountryFlag::get($countryCode);\n }", "public function sGetCountry($country)\n {\n if (empty($country)) {\n return false;\n }\n if (isset($this->cache['country'][$country])) {\n return $this->cache['country'][$country];\n }\n\n if (is_numeric($country)) {\n $sql = $this->db->quoteInto('c.id = ?', $country);\n } elseif (is_string($country)) {\n $sql = $this->db->quoteInto('c.countryiso = ?', $country);\n } else {\n return false;\n }\n\n $sql = \"\n SELECT c.id, c.id as countryID, countryname, countryiso,\n (SELECT name FROM s_core_countries_areas WHERE id = areaID ) AS countryarea,\n countryen, c.position, notice\n FROM s_core_countries c\n WHERE $sql\n \";\n\n return $this->cache['country'][$country] = $this->db->fetchRow($sql) ?: [];\n }", "public function getCountry($return_nr = false)\n {\n $this->checkJMBG();\n\n $arr = $this->explode();\n if (count($arr) <> 13) return false;\n foreach ($arr as $k => $v) $$k = (int)$v;\n\n if ($return_nr == true) return $H;\n\n if (isset($this->countries[$H])) return $this->countries[$H];\n else return $H;\n }", "public function getRegistrationCountry(): ?string;" ]
[ "0.71452796", "0.71019566", "0.69386697", "0.690375", "0.681859", "0.68109745", "0.65917224", "0.65023303", "0.64344203", "0.6433007", "0.6417532", "0.6405281", "0.6395851", "0.63250035", "0.63166034", "0.6299794", "0.6294193", "0.6262607", "0.62503624", "0.6237037", "0.62235725", "0.61597246", "0.61327714", "0.61232084", "0.6117546", "0.6108516", "0.6084789", "0.6079289", "0.60775536", "0.6075707", "0.60514784", "0.6028907", "0.6006326", "0.598889", "0.598889", "0.5978893", "0.5968162", "0.5952966", "0.59248334", "0.59244144", "0.59241605", "0.5915899", "0.590884", "0.5861191", "0.583879", "0.5825352", "0.5825352", "0.58168465", "0.58035916", "0.5802708", "0.5765352", "0.57533026", "0.57520676", "0.5738059", "0.56848377", "0.5682192", "0.5671744", "0.56527925", "0.56521064", "0.56481016", "0.56471264", "0.5637604", "0.55890775", "0.55767447", "0.55743986", "0.55693656", "0.556618", "0.55570304", "0.5555583", "0.55523264", "0.55483234", "0.5543637", "0.5541512", "0.5533689", "0.5513931", "0.5492628", "0.5483525", "0.5474428", "0.54628366", "0.5453595", "0.5444258", "0.5427667", "0.54171807", "0.5416333", "0.54132706", "0.5411125", "0.5411125", "0.53747183", "0.53747183", "0.53747183", "0.537415", "0.5372454", "0.53609365", "0.53152436", "0.53114015", "0.5288366", "0.5288186", "0.52872205", "0.5275224", "0.5260993" ]
0.7044808
2
Returns the country code, for the current visitor.
public static function visitor_country() { $code = null; if (Director::isDev()) { if (isset($_GET['countryfortestingonly'])) { $code = $_GET['countryfortestingonly']; Controller::curr()->getRequest()->getSession()->set('countryfortestingonly', $code); } if ($code = Controller::curr()->getRequest()->getSession()->get('countryfortestingonly')) { Controller::curr()->getRequest()->getSession()->set('MyCloudFlareCountry', $code); } } if (! $code) { if (isset($_SERVER['HTTP_CF_IPCOUNTRY']) && $_SERVER['HTTP_CF_IPCOUNTRY']) { return $_SERVER['HTTP_CF_IPCOUNTRY']; } $code = Controller::curr()->getRequest()->getSession()->get('MyCloudFlareCountry'); if (! $code) { $address = self::get_remote_address(); if (strlen($address) > 3) { $code = CloudFlareGeoIP::ip2country($address, true); } if (! $code) { $code = self::get_default_country_code(); } if ('' === $code) { $code = Config::inst()->get('CloudFlareGeoip', 'default_country_code'); } Controller::curr()->getRequest()->getSession()->set('MyCloudFlareCountry', $code); } } return $code; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_visitor_country() {\n\t\treturn $this->get_country_code($this->get_visitor_ip_address());\n\t}", "protected static function country_code(): mixed\n\t{\n\t\treturn self::$query->country_code;\n\t}", "public function countryCode();", "public static function country()\n\t{\n\t\treturn static::onTrustedRequest(function () {\n\t\t\treturn request()->header('CF_IPCOUNTRY');\n\t\t}) ?: '';\n\t}", "public function getCountry()\n {\n if (!array_key_exists('country', $this->userInfo)) {\n $this->getLocation();\n }\n\n return $this->getInfoVar('country');\n }", "protected function getCountry()\n {\n return strtoupper($this->checkoutSession->getLastRealOrder()->getBillingAddress()->getCountryId());\n }", "public function country(): string\n {\n return $this->country;\n }", "public function get_country_id() {\n\t\treturn $this->_country_id;\n\t}", "public function getCountryCode()\n {\n return $this->country_code;\n }", "public function getCountryCode()\n {\n return $this->country_code;\n }", "public function getCountryCode()\n {\n return $this->country_code;\n }", "public function getCode()\r\r\n\t{\r\r\n\t\treturn \"\";#getCountryFromIP($this->ip,\"code\");\r\r\n\t}", "public function getCountryCode()\n {\n return $this->countryCode;\n }", "public function getCountryCode()\n {\n return $this->countryCode;\n }", "public function getCountryCode()\n {\n return $this->countryCode;\n }", "public function getCountry() : string\n {\n return $this->country;\n }", "public function getCountryCode() : string\n {\n return $this->countryCode;\n }", "public function country()\r\n\t{\r\n\t\t$country = \\Shop\\Models\\Countries::fromCode( $this->country_isocode_2 );\r\n\r\n\t\treturn $country;\r\n\t}", "public function countryCode(): string\n {\n return $this->getData('CountryCodeISO3166A2');\n }", "public function getCountry(): string\n {\n return $this->result->country_name;\n }", "public function getCountryCode(): string\n {\n return !is_null($this->Countrycode)\n ? $this->Countrycode\n : self::DEFAULT_COUNTRY;\n }", "public function getCountryCode()\n\t{\n\t\tif ($this->countryCode === null)\n\t\t{\n\t\t\t$binInfo = $this->getBinInfo();\n\t\t\tif ($binInfo)\n\t\t\t\t$this->countryCode = strtoupper($binInfo->countryCode);\n\t\t}\n\t\treturn $this->countryCode;\n\t}", "public function getCountry() :string\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->getValueObject('country');\n }", "public function getCountryCode()\n {\n return substr($this->_code, -2);\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return parent::getValue('country');\n }", "public function getCountry()\n\t{\n\t\treturn $this->country;\n\t}", "public function getCountry()\n\t{\n\t\treturn $this->country;\n\t}", "public function getCountry() : string {\n\t\t\treturn substr($this->value, 4, 2);\n\t\t}", "public function getCountryCode()\n {\n return $this->code;\n }", "public function getCountry()\n {\n return $this->getParameter('country');\n }", "public function getCountryCode();", "public function getCountryId()\n {\n return $this->getShippingAddress()->getCountryId();\n }", "public function getCountry_id()\n {\n return $this->country_id;\n }", "public function getCountry() {\n\t\treturn self::$_country;\n\t}", "public function getCountry()\n {\n return isset($this->address_data['country']) ? $this->address_data['country'] : null;\n }", "function getCountry() {\r\r\n\t\treturn $this->country;\r\r\n\t}", "public static function getCountry(){\n $country = '';\n $ip = self::getClientIP();\n if ($ip != '') {\n $data = file_get_contents('http://freegeoip.net/json/' . $ip);\n $response = json_decode($data);\n $country = $response->country_code;\n }\n \n return $country;\n }", "function countryId( )\n {\n return $this->CountryID;\n }", "public function getCountryCode()\n {\n $node = $this->response->getFirst('contact:addr/contact:cc', $this->node);\n\n return $node->nodeValue;\n }", "public function getNativeCountry()\n {\n return Wrapper\\World::country($this->getNativeLeagueId());\n }", "function getCountryID() {\n\t\treturn $this->_CountryID;\n\t}", "public function getCountry() \n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->getParameter('billingCountry');\n }", "public function getCountryName()\n {\n return $this->getCountry()->getName();\n }", "public function getCountryName() {\n //check if we have a country code\n if ($this->country) {\n //return the country name\n return Locale::getDisplayRegion('en_' . $this->country);\n }\n return NULL;\n }", "public function getCountryName()\n {\n return $this->getValue('nb_icontact_prospect_country_name');\n }", "public function getUserCountry()\n {\n $fileName = $this->getDatabaseFile();\n\n $reader = new MaxMindReader($fileName);\n\n $ipAddress = $this->getUserIp();\n //$ipAddress = \"82.65.140.34\";\n\n $country = $reader->get($ipAddress);\n $reader->close();\n\n return $country ? $country['country']['iso_code'] : null;\n }", "public function getCountryCode(): string;", "public static function get_ip_country() {\n\t\tif ( false === self::$ip_country ) {\n\t\t\t$geoip = WC_Geolocation::geolocate_ip();\n\t\t\tself::$ip_country = $geoip['country'];\n\t\t}\n\t\treturn self::$ip_country;\n\t}", "private function getCountryIdByIp()\n {\n try {\n $countryId = $this->geoIpAdapter->getCountryCode($this->request->getClientIp());\n } catch (\\Exception $e) {\n $countryId = null;\n }\n return $countryId;\n }", "public function countryCodeGenerator(): int\n\t{\n\t\treturn generateHash();\n\t}", "public function getCountry() {}", "public function getCountry() {}", "public function getCountryCode($ip=null) {\r\r\n\t\tif (!$this->database)\r\r\n\t\t\treturn geoip_country_code_by_name($this->currentIp($ip));\r\r\n\t\treturn geoip_country_code_by_addr($this->database, $this->currentIp($ip));\r\r\n\t}", "public function country(): ?string\n {\n return $this->country;\n }", "public function getCountryCode(): ?string\n {\n return $this->countryCode;\n }", "public function getHotelCountry()\n {\n return $this->hotel_country;\n }", "public function getReqCountry()\n\t{\n\t\treturn $this->req_country;\n\t}", "public function getPayerAddressCountry() {\n\t\treturn $this->_getField(self::$PAYER_ADDRESS_COUNTRY);\n\t}", "public function getCountry();", "public function getCountry();", "public function getPhoneCountryCode()\n {\n return $this->phoneCountryCode;\n }", "public function getSubscriberCountry()\n {\n $country = parent::getSubscriberCountry(); \n return $country;\n }", "public function getCountryCode() {\n\t\tif (!$this->_countryCode) {\n\t\t\tthrow new System_Exception('User countryCode is not set');\n\t\t}\n\t\treturn $this->_countryCode;\n\t}", "public function getPhoneCountryCode()\n\t{\n\t\treturn $this->getIfSet('countryCode', $this->data->phone);\n\t}", "protected function LiveDefaultCountry()\n {\n return self::get_default_country_code_combined();\n }", "public function getCountryName();", "public function getSessionCountry()\n {\n return Mage::getSingleton('core/session')->getData($this->_sessionRequestCountryKey);\n }", "public function getMerchantCountry()\n {\n return $this->_pro->getConfig()->getMerchantCountry();\n }", "public function getCountryName()\n {\n return $this->getShippingAddress()->getCountryModel()->getName($this->localeResolver->getLocale());\n }", "public function getCountry()\n {\n $arr_countries = array(\n 'F' =>\t_('Austria'),\n 'T' =>\t_('Belgium'),\n 'D' =>\t_('Finland'),\n 'E' =>\t_('France'),\n 'L' =>\t_('France'),\n 'P' =>\t_('Germany'),\n 'R' =>\t_('Germany'),\n 'N' =>\t_('Greece'),\n 'K' =>\t_('Ireland'),\n 'J' =>\t_('Italy'),\n 'G' =>\t_('Netherlands'),\n 'H' =>\t_('United Kingdom'),\n 'U' =>\t_('Portugal'),\n 'M' =>\t_('Spain'),\n );\n\n return $arr_countries[$this->str_value[0]];\n }", "public function getCountry(): ?string\n {\n return $this->country;\n }", "public function getCountry(): ?string\n {\n return $this->country;\n }", "public function getCountry(): ?string\n {\n return $this->country;\n }", "public function getShippingCountry()\n {\n return $this->getParameter('shippingCountry');\n }", "public function getCountryOfOrigin() {\n\t\treturn $this->countryOfOrigin;\n\t}", "public function getCountryCode(): string\n {\n return 'SK';\n }", "protected function LiveCountry()\n {\n return EcommerceCountry::get_country();\n }", "public function getBillingCountry()\n {\n return $this->getParameter('billingCountry');\n }", "public function getDriverIdCountry()\n {\n return isset($this->driverIdCountry) ? $this->driverIdCountry : null;\n }", "public function getCountry(): ?string\n {\n return $this->_country;\n }", "public function getCurrentSiteCountry()\n {\n // Used when site data is from cache and not the db\n if (empty($this->currentSiteCountry)\n || !is_a($this->currentSiteCountry, '\\Rcm\\Entity\\Country')\n ) {\n $siteInfo = $this->getCurrentSiteInfo();\n\n $country = new Country();\n $country->setCountryName($siteInfo['country']['countryName']);\n $country->setIso2($siteInfo['country']['iso2']);\n $country->setIso3($siteInfo['country']['iso3']);\n\n $this->currentSiteCountry = $country;\n }\n\n return $this->currentSiteCountry;\n\n }", "public function getShipcountry()\n {\n return $this->shipcountry;\n }", "abstract public function countryISOCode();", "public function getCompanyCountry() {\n\n return $this->company_country;\n\n }" ]
[ "0.86774015", "0.7877117", "0.77712077", "0.77142596", "0.7645294", "0.75600326", "0.75285864", "0.74842864", "0.74761164", "0.74761164", "0.74761164", "0.7330843", "0.7325794", "0.7325794", "0.7325794", "0.73137426", "0.73134124", "0.7311447", "0.73039615", "0.72930354", "0.72883755", "0.7285521", "0.7266023", "0.72639096", "0.7236701", "0.7233931", "0.7233931", "0.7233931", "0.7233931", "0.7233931", "0.7233931", "0.7233931", "0.7233931", "0.7233931", "0.7233931", "0.7233931", "0.7233931", "0.7233931", "0.7233931", "0.72191226", "0.72099227", "0.72099227", "0.7207094", "0.7199062", "0.71874666", "0.71725214", "0.71522504", "0.7139227", "0.71363527", "0.70332426", "0.70185626", "0.69974977", "0.6987217", "0.69427186", "0.6927354", "0.6879482", "0.6857956", "0.685475", "0.68167436", "0.6799025", "0.6794167", "0.67866683", "0.6769533", "0.6766351", "0.67413217", "0.6694489", "0.66925985", "0.66925985", "0.66906035", "0.6685466", "0.66791135", "0.66762", "0.66708076", "0.6660788", "0.66560185", "0.66560185", "0.66366464", "0.6605083", "0.6588985", "0.65862906", "0.65740347", "0.65678906", "0.655866", "0.6549098", "0.6526683", "0.65265507", "0.6516902", "0.6516902", "0.6516902", "0.6507976", "0.6499357", "0.6489091", "0.6464133", "0.646168", "0.64572555", "0.64552784", "0.6408361", "0.6400426", "0.6376353", "0.6343481" ]
0.83939046
1
Returns true or false based on form success Set in hooks.raven.php > process()
public function success() { return Session::getFlash('raven:success'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function formSubmitted() {\n return $_SERVER[\"REQUEST_METHOD\"] == 'POST';\n }", "private function processForm()\n {\n //Validate the form passed The Curator's safety procedures.\n if(!$this->Form->validate())\n {\n array_push($this->Form->formMessagesError, FORM\\MESSAGE\\ERROR_GENERAL);\n\n return FALSE;\n }\n\n //Verify the form is not being flooded\n if($this->Form->checkFormFlood(CONFIG\\ACCOUNT\\FLOOD_DELAY))\n {\n array_push($this->Form->formMessagesError, FORM\\MESSAGE\\FLOOD);\n\n return FALSE;\n }\n\n //Initialize the Rules class for field validation.\n $this->Policy = new Policy($this->Form);\n\n //Check the user field data against Curator rules.\n if($this->Policy->checkRules())\n {\n array_push($this->Form->formMessagesError, FORM\\MESSAGE\\ERROR_FIELD);\n\n return FALSE;\n }\n\n array_push($this->Form->formMessagesSuccess, 'Account Created.');\n\n $this->success = TRUE;\n\n //Since the account was created set up the form flood protection.\n //$this->Form->setFormFlood();\n\n return TRUE;\n \n //Validate each field one at a time.\n //If its a required field it must have data\n //Ensure the data in the field matches the field.\n //Ensure the rules for each field are met.\n\n //Verify if account already exists.\n\n //Create account\n\n //Start authorization process\n }", "public function callbackSuccess()\n {\n $this->AddOutput(\"<p><i>Form was submitted and the callback method returned true.</i></p>\"); \n $this->redirectTo();\n }", "public function formSuccess() {\n return $this->_formSuccess;\n }", "function form_action()\r\n {\r\n $success = true ;\r\n\r\n $sdifqueue = new SDIFResultsQueue() ;\r\n $cnt = $sdifqueue->ProcessQueue() ;\r\n\r\n $c = container() ;\r\n $msgs = $sdifqueue->get_status_message() ;\r\n\r\n foreach ($msgs as $msg)\r\n $c->add(html_div(sprintf('ft-%s-msg', $msg['severity']), $msg['msg'])) ;\r\n $c->add(html_div('ft-note-msg',\r\n sprintf(\"%d record%s processed from SDIF Queue.\",\r\n $cnt, $cnt == 1 ? \"\" : \"s\"))) ;\r\n\r\n $this->set_action_message($c) ;\r\n\r\n unset($sdifqueue) ;\r\n\r\n return $success ;\r\n }", "public function process()\n {\n $error = false;\n\n if ($this->httpRequest->getMethod() == 'POST' && $this->form->isValid()) {\n $email = $this->form->getData('email');\n\n if ($this->userManager->exists($email)) {\n $this->form->addErrorMsg(\n 'L\\'adresse e-mail est déjà utilisée',\n ['email']\n );\n\n $error = true;\n }\n \n $password = $this->form->getData('password');\n $confirmedPassword = $this->form->getData('confirmedPassword');\n if ($password != $confirmedPassword) {\n $this->form->addErrorMsg(\n 'Les mots de passe ne correspondent pas',\n ['password', 'confirmedPassword']\n );\n\n $error = true;\n }\n\n if ($error) {\n return false;\n }\n\n $user = new User(\n [\n 'email' => $this->form->getData('email'),\n 'password' => $this->form->getData('password'),\n 'firstName' => $this->form->getData('firstName'),\n 'lastName' => $this->form->getData('lastName')\n ]\n );\n $this->userManager->save($user);\n\n $user = $this->userManager->get($user->getEmail());\n\n $this->authentication->setConnexion($user->getId(), $user->getEmail());\n\n return true;\n }\n\n return false;\n }", "protected function success()\n {\n if ( isset( $this->data['status'] ) && $this->data['status'] == 'SUCCESS' ) {\n return true;\n }\n return false;\n }", "function formSubmitted()\n\t{\n\t\t// Do we have a form name? If so, if we have this form name, then this\n\t\t// particular form has been submitted.\n\t\tif ($this->formName) {\n\t\t\treturn (isset($_POST['update']) && $_POST['update'] == $this->formName);\t\n\t\t} \n\t\t// No form name, just detect our hidden field.\n\t\telse {\n\t\t\treturn (isset($_POST['update']));\n\t\t}\n\t}", "public function psxFormIsCompleted()\n {\n // TODO: Remove all code related to PSX form. Since it's not used any more we return true to be sure to not make any breaking changes\n return true;\n//\n// if (getenv('PLATEFORM') === 'PSREADY') { // if on ready, the user is already onboarded\n// return true;\n// }\n//\n// return !empty($this->getPsxForm());\n }", "function check_form_submitted()\n {\n $query = $this->recruitment_model->get_faculty_info($this->user_id);\n if($query->num_rows()==1)\n {\n if($query->row()->final_submission==1)\n {\n return 1;\n }\n else\n {\n return 0;\n }\n }\n return 0;\n }", "public function callbackSubmit()\n {\n // Get values from the submitted form\n $text = $this->form->value(\"text\");\n\n if (!$this->di->get('session')->has(\"user\")) {\n $this->form->addOutput(\"Du behöver logga in\");\n return false;\n }\n\n $user = new User($this->di->get(\"db\"));\n if ($user->controlAuthority($this->di->get('session')->get(\"user\"), $this->post->user) != true) {\n $this->form->addOutput(\"Du får inte redigera denna.\");\n return false;\n }\n\n if ($text == \"\") {\n $this->form->addOutput(\"Du skrev aldrig något. Skriv gärna något.\");\n return false;\n }\n\n $this->post->text = $text;\n $this->post->save();\n $this->form->addOutput(\"Du har uppdaterat inlägget\");\n return true;\n }", "public function process() {\n\t\treturn false;\n\t}", "public function is_form_submit() {\n\n\t if (isset($_POST['foodbakery_restaurant_title'])) {\n\t\treturn true;\n\t }\n\t return false;\n\t}", "function validateForm( &$process )\n {\n $errors[] = 'You must override this method: ezauthorizegateway::validateForm';\n if ( $errors )\n return $this->loadForm( $process, $errors );\n else\n return false;\n }", "function FormPosted()\n{\n //en return true of false\n\n}", "public function isSubmitted();", "abstract protected function afterSuccessValidation();", "public function is_form_submit_success( $id ) {\n\n\t\t// TODO: Code needs revision. Copy-paste from class-frontend.php.\n\t\t$form = wpforms()->form->get( (int) $id );\n\n\t\tif ( empty( $form ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$form_id = absint( $form->ID );\n\t\t$form_data = apply_filters( 'wpforms_frontend_form_data', wpforms_decode( $form->post_content ) );\n\t\t$errors = empty( wpforms()->process->errors[ $form_id ] ) ? array() : wpforms()->process->errors[ $form_id ];\n\n\t\t// Check for return hash.\n\t\tif (\n\t\t\t! empty( $_GET['wpforms_return'] ) &&\n\t\t\twpforms()->process->valid_hash &&\n\t\t\tabsint( wpforms()->process->form_data['id'] ) === $form_id\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Check for error-free completed form.\n\t\tif (\n\t\t\tempty( $errors ) &&\n\t\t\t! empty( $form_data ) &&\n\t\t\t! empty( $_POST['wpforms']['id'] ) &&\n\t\t\tabsint( $_POST['wpforms']['id'] ) === $form_id\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function getSuccess() {\n\t\tp(\"Checking success status of all\");\n\t\t// set false if error has occurred, can return false immediately\n\t\tif ( $this->success === false ) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ($this->fields as $field) {\n\t\t\tif ( $field->getSuccess() === false) {\n\t\t\t\t$this->success = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $this->success;\n\t}", "function formSuccess() {\n\n // Template\n $this->r->text['back_url'] = suxFunct::getPreviousURL();\n $this->r->title .= \" | {$this->r->gtext['success']}\";\n\n $this->tpl->display('success.tpl');\n\n }", "public function isSuccess();", "public function isSuccess();", "public function isSuccess();", "public function isSuccess();", "function process_form()\n {\n }", "function isSuccess()\n\t{\n\t\treturn($this->getStatus() == 'SUCCESS');\n\t}", "public function validateForm() {\n\n\t\t$validated_ok = $this->adapter->revalidate();\n\n\t\treturn !$validated_ok;\n\t}", "function isSuccessful() ;", "public function is_submit()\r\n {\r\n if( $this->taintedInputs->isAutogenerated()){\r\n return false;\r\n }\r\n else{\r\n return true;\r\n }\r\n }", "function form_submitted()\n{\n return isset($_POST['Submit']);\n}", "public function checkForm()\n\t{\n\t\t$name = $_POST['name'];\n\t\t$email = $_POST['email'];\n\t\t$pass = $_POST['pass'];\n\t\t$conf_pass = $_POST['conf_pass'];\n\t\t$result = $this -> facade -> checkRegister($name, $email, $pass,\n\t\t$conf_pass);\n\t\tif($result === true)\n\t\t{\n\t\t\t$add = $this -> facade -> addUser();\n\t\t\t$data = $this -> facade -> getArray();\n\t\t\t$this -> view -> showForm($data);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data = $this -> facade -> getArray();\n\t\t\t$this -> view -> showForm($data);\n\t\t\treturn true;\n\t\t}\n\t}", "public function requireFilterSubmit_result()\n\t{\n\t\treturn false;\n\t}", "function check_submit_form()\n {\n }", "public function success()\n {\n return ( \n ! empty($this->result) \n && $this->result->getStatus() == 'Success' \n && $this->result->getCode() == 200 );\n }", "function successful()\n\t{\n\t\treturn $this->isSuccess();\n\t}", "public function do_success($form)\n\t{\n\t\t$actions = $this->get_setting('actions', array());\n\t\tif(isset($actions[$this->value])) {\n\t\t\t$actions[$this->value]['fn']($form);\n\t\t}\n\t\treturn parent::do_success($form);\n\t}", "public function callbackSubmit()\n {\n $subject = $this->form->value(\"subject\");\n $text = $this->form->value(\"text\");\n $tags = \\preg_split('/[^\\w]+/u', $this->form->value(\"tags\"));\n\n $user = $this->di->get('user');\n\n if ($this->post->authorId != $user->id && !$user->isLevel(UserLevels::ADMIN)) {\n $this->di->get('flash')->setFlash(\"Nu är det nått skumt på gång...\", \"flash-warning\");\n return false;\n }\n\n $this->posts->upsert($this->post->id, $subject, $text, $tags);\n $this->di->get('flash')->setFlash(\"\\\"{$subject}\\\", har ändrats.\", \"flash-success\");\n\n return true;\n }", "public function processPayment(){\r\n return true;\r\n }", "function isSubmitted()\r\n\t\t{\r\n\t\t\tif( isset($_POST[$this->form_id.'-issubmitted'] ) )\r\n\t\t\t\treturn TRUE;\r\n\t\t\telse\r\n\t\t\t\treturn FALSE;\r\n\r\n\t\t}", "function process() // OK\n { \n if(! $this->validate()) {\n\t $this->_errors->addError('Failed at event validation.');\n\t return false;\n }\n \n $this->_getTransactions();\n \n// -- added\n if(! $this->validate()) {\n\t $this->_errors->addError('Failed after dynamic validations.');\n\t return false;\n }\n// --\n if (! $this->_executeTransactions()) return false;\n else return $this->storeEventDetail();\n }", "function validate_form($filtered_input, &$form) {\n $success = true;\n // All the iput info stays in the field after submitting\n foreach ($form['fields'] as $field_id => &$field) {\n $field_input = $filtered_input[$field_id];\n // makes input field to stay filled after refershing page\n $field['value'] = $field_input;\n // if validate array has functions then calling function to check if the field is empty\n foreach (($field['validate'] ?? []) as $validator) {\n $is_valid = $validator($filtered_input[$field_id], $field); // same as => validate_not_empty($field_input, $field);\n // $is_valid will be false, if validator returns false\n if (!$is_valid) {\n $success = false;\n break;\n }\n }\n }\n \n// var_dump($success);\n\n if ($success) {\n foreach (($form['validators'] ?? []) as $validator_id => $validator) {\n if (is_array($validator)) {\n $is_valid = $validator_id($filtered_input, $form, $validator);\n } else {\n $is_valid = $validator($filtered_input, $form);\n }\n if (!$is_valid) {\n $success = false;\n break;\n }\n }\n }\n \n// var_dump($success);\n \n if ($success) {\n if (isset($form['callbacks']['success'])) {\n $form['callbacks']['success']($filtered_input, $form);\n }\n } else {\n if (isset($form['callbacks']['fail'])) {\n $form['callbacks']['fail']($filtered_input, $form);\n }\n }\n \n return $success;\n \n}", "public function has_submit() {\n\t\treturn false;\n\t}", "function culturefeed_pages_edit_membership_form_submit(&$form, &$form_state) {\n\n $form_state['#success'] = TRUE; // This boolean will be checked at in the ajax callback.\n drupal_set_message(t('Membership changed'));\n\n}", "public function submitForm(array $form, FormStateInterface $form_state) {\n if ($form_state['values']['op'] === $form_state['values']['resend']) {\n $this->code = $this->generate();\n if (!$this->sendCode($this->code)) {\n drupal_set_message(t('Unable to deliver the code. Please contact support.'), 'error');\n }\n else {\n drupal_set_message(t('Code resent'));\n }\n return FALSE;\n }\n else {\n return parent::submitForm($form, $form_state);\n }\n }", "public function passed(){\n \n //Loop through all the fields in the ruleset\n foreach($this->rules as $fieldName => $ruleCollection){\n foreach($ruleCollection as $rule => $rule_value){\n $this->validateField($fieldName, $rule, $rule_value); \n }\n }\n \n if($this->useValidationToken){\n if( Input::get(\"form_token\") != Session::get(\"form_token\") ){\n $this->addError(\"form_token\", \"token\", \"Could not process form form at this time. Please try again.\");\n }\n }\n \n //If we're using session flash, add a formatted list of errors to the session flash system\n if($this->useSessionFlash){\n Session::addFlash($this->formattedErrors(\"list\"), \"danger\", \"Please correct the following errors\");\n }\n \n return $this->hasPassed;\n }", "public function isSuccess()\n {\n return $this->_success;\n }", "public function isRequestSuccess(): bool\n {\n return count($this->errors) === 0;\n }", "function ValidateUpdatedSubmission(){\r\n\t\t//This is a hidden input field. Humans won't fill this field.\r\n\t\tif(!empty($_POST[$this->GetSpamTrapInputName()]) ){\r\n\t\t\t//The proper error is not given intentionally\r\n\t\t\t$this->HandleError(\"Automated submission prevention\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$validator = new FormValidator();\r\n\t\t$validator->addValidation(\"Evename\", \"req\", \"Please fill in Event Name\");\r\n\t\t$validator->addValidation(\"Eaddress\", \"req\", \"Please fill in address\");\r\n\t\t$validator->addValidation(\"Ecity\", \"req\", \"Please fill in City\");\r\n\t\t$validator->addValidation(\"Estate\", \"req\", \"Please fill in State\");\r\n\t\t$validator->addValidation(\"Ezip\", \"req\", \"Please fill in Zip code\");\r\n\t\t$validator->addValidation(\"EphoneNumber\", \"req\", \"Please fill in Phone Number\");\r\n\t\t$validator->addValidation(\"Etype\", \"req\", \"Please fill in Type of Event\");\r\n\t\t$validator->addValidation(\"EstartDate\", \"req\", \"Please Select a Start Date\");\r\n\t\t$validator->addValidation(\"EtimeStart\", \"req\", \"Please fill in the Start Time\");\r\n\t\t$validator->addValidation(\"EtimeEnd\", \"req\", \"Please fill in the End Time\");\r\n// \t\t$validator->addValidation(\"EendDate\", \"req\", \"Please Select an End Date\");\r\n\t\t$validator->addValidation(\"Edescription\", \"req\", \"Please fill in Description\");\r\n\r\n\t\tif(!$validator->ValidateForm()){\r\n\t\t\t$error='';\r\n\t\t\t$error_hash = $validator->GetErrors();\r\n\t\t\tforeach($error_hash as $inpname => $inp_err){\r\n\t\t\t\t$error .= $inpname.':'.$inp_err.\"\\n\";\r\n\t\t\t}\r\n\t\t\t$this->HandleError($error);\r\n\t\t\treturn false;\r\n\t\t} \r\n\t\treturn true;\r\n\t}", "function ValidateRegistrationSubmission(){\r\n if(!empty($_POST[$this->GetSpamTrapInputName()]) ){\r\n //The proper error is not given intentionally\r\n $this->HandleError(\"Automated submission prevention: case 2 failed\");\r\n return false;\r\n }\r\n \r\n\t\t$validator = new FormValidator();\r\n\t\t$validator->addValidation(\"UFname\", \"req\", \"Please Input Your First Name\");\r\n\t\t$validator->addValidation(\"ULname\", \"req\", \"Please Input Your Last Name\");\r\n\t\t$validator->addValidation(\"UuserName\", \"req\", \"Please Provide a User Name\");\r\n\t\t$validator->addValidation(\"UPswd\", \"req\", \"Please Provide a Password\");\r\n\t\t$validator->addValidation(\"ConPswd\", \"req\", \"Please Confirm Your Password\");\r\n\t\t$validator->addValidation(\"Uemail\", \"req\", \"Please Please fill in Name\");\r\n\t\t$validator->addValidation(\"Uemail\", \"email\", \"Please Provide a Valid Email: Syntax is Wrong\");\r\n\t\t$validator->addValidation(\"Uphone\", \"req\", \"Please Provide a Valid Phone Number\");\r\n\r\n if(!$validator->ValidateForm()){\r\n $error='';\r\n $error_hash = $validator->GetErrors();\r\n foreach($error_hash as $inpname => $inp_err){\r\n $error .= $inpname.':'.$inp_err.\"\\n\";\r\n }\r\n $this->HandleError($error);\r\n return false;\r\n } \r\n return true;\r\n }", "public function submit()\n\t{\n\t\t$error = $this->validate();\n\n\t\tif (sizeof($error))\n\t\t{\n\t\t\treturn $error;\n\t\t}\n\n\t\tif (!$this->post_id)\n\t\t{\n\t\t\t$this->post();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->edit();\n\t\t}\n\n\t\treturn true;\n\t}", "protected function ValidateForm()\n {\n return true;\n }", "function form_action()\r\n {\r\n $success = true ;\r\n\r\n $file = $this->get_element($this->getUploadFileLabel()) ; \r\n $fileInfo = $file->get_file_info() ; \r\n\r\n $this->set_file_info($fileInfo) ; \r\n $this->set_file_info_table($fileInfo) ; \r\n\r\n // Read the file contents for processing\r\n \r\n $lines = file($fileInfo['tmp_name']) ; \r\n\r\n $line_number = 1 ;\r\n $record = array() ;\r\n\r\n // Establish a database connection\r\n \r\n $sdifqueue = new SDIFResultsQueue() ;\r\n\r\n // Need a record set to work with\r\n\r\n $rs = $sdifqueue->getEmptyRecordSet() ;\r\n\r\n // Process each line in the file, adding it to the SDIF queue\r\n\r\n foreach ($lines as $line)\r\n {\r\n if (trim($line) == \"\") continue ;\r\n\r\n $record_type = substr($line, 0, 2) ;\r\n $record[\"linenumber\"] = $line_number ;\r\n $record[\"recordtype\"] = $record_type ;\r\n $record[\"sdifrecord\"] = trim($line) ;\r\n\r\n $sql = $sdifqueue->getConnection()->GetInsertSQL($rs, $record) ;\r\n\r\n $sdifqueue->setQuery($sql) ;\r\n $sdifqueue->runInsertQuery() ;\r\n\r\n $line_number++ ;\r\n }\r\n\r\n unset($sdifqueue) ;\r\n\r\n // Delete the file so we don't keep a lot of stuff around. \r\n\r\n if (!unlink($fileInfo['tmp_name'])) \r\n $this->add_error(html_div('ft-error-msg',\r\n $this->getUploadFileLabel(),\r\n 'Unable to remove uploaded file.')) ; \r\n\r\n $this->set_action_message(html_div('ft-note-msg', 'File \"' . \r\n $this->get_element_value($this->getUploadFileLabel()) .\r\n '\" successfully uploaded.')) ; \r\n\r\n return $success ;\r\n }", "public function callbackSubmit()\n {\n $this->user = new \\Anax\\Users\\User();\n $this->user->setDI($this->di);\n\n if (isset($_SESSION[\"user\"])) {\n unset($_SESSION[\"user\"]);\n return $this->isLogoutSuccessful();\n } else {\n $this->logoutMessage = \"Du är inte inloggad!\";\n return false;\n }\n }", "function validateupdate(){\n\t\tglobal $_REQUEST;\t\t\n\t\t\n\t\tif(!empty($this->errors)){\n\t\t\t$result = false;\n\t\t}else{\n\t\t\t$result = true;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function preProcess()\n { \n $errors = $this->get( 'error' );\n $this->assign('errors', $errors );\n $errors = null;\n return true;\n }", "public function isSubmitted()\n\t{\n\t\tif ($this->http_method == 'get') {\n\t\t\t// GET form is always submitted\n\t\t\treturn TRUE;\n\t\t} else if (isset($this->raw_input['__'])) {\n\t\t\t$__ = $this->raw_input['__'];\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t\tforeach ((array) $__ as $token => $x) {\n\t\t\t$t = static::validateFormToken($token, $this->id);\n\t\t\tif ($t !== FALSE) {\n\t\t\t\t// Submitted\n\t\t\t\tif ($this->form_ttl > 0 && time() - $t > $this->form_ttl) {\n\t\t\t\t\t$this->form_errors[self::E_FORM_EXPIRED] = array(\n\t\t\t\t\t\t'message' => _('The form has expired, please check entered data and submit it again.')\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "public function callbackSubmit()\n {\n // Remember values during resubmit, useful when failing (retunr false)\n // and asking the user to resubmit the form.\n $this->form->rememberValues();\n $apiKey = $this->form->value(\"ApiKey\");\n $widget = $this->form->value(\"Widget\");\n $defaultList = $this->form->value(\"DefaultList\");\n $apiKey = $apiKey === \"\" ? \"null\" : $apiKey;\n $popup = $this->form->value(\"Popup\");\n $mailChimpService = new MailChimpService($this->di);\n\n try {\n $mailChimpService->addConfig($apiKey, $widget, $popup, $defaultList);\n } catch (\\Peto16\\Admin\\Exception $e) {\n $this->form->addOutput($e->getMessage());\n return false;\n }\n $this->form->addOutput(\"Configuration updated.\");\n return true;\n }", "function form_backend_validation()\r\n {\r\n return true ;\r\n }", "public function after_submission( $entry, $form ) {\n\n\t\t// Evaluate the rules configured for the custom_logic setting.\n\t\t//$result = $this->is_custom_logic_met( $form, $entry );\n\t\t$result = true;\n\n\t\tif ( $result ) {\n\t\t\t$settings = $this->get_form_settings( $form );\n\t\t\t$enabled = 1 === (int) rgar( $settings, 'enabled' );\n\n\t\t\tif ( ! $enabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$event_id = $this->create_event( $entry, $settings );\n\t\t}\n\t}", "public function success()\n {\n // Success Status Codes\n return (boolean) (substr($this->agent->code(),0,1)==2);\n }", "public function formSubmit() {\n\n check_admin_referer('ncstate-wrap-authentication');\n\n $newOptions = array(\n 'autoCreateUser' => (bool)$_POST['nwa_autoCreateUser'],\n );\n\n update_option('ncstate-wrap-authentication', $newOptions);\n\n wp_safe_redirect(add_query_arg('updated', 'true', wp_get_referer()));\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}", "function useForm()\n {\n if ( eZSys::isShellExecution() )\n return false;\n else \n return true; \n }", "public function isSuccess():bool;", "public function isSuccessful()\n {\n return isset($this->data['status']) && $this->data['status'] === 'success';\n }", "protected function processForm(){\n if(Tools::isSubmit('saveBtn')){ // save data\n $settings = array(\n 'user' => Tools::getValue('user'),\n 'widget_id' => Tools::getValue('widget_id'),\n 'tweets_limit' => Tools::getValue('tweets_limit'),\n 'follow_btn' => Tools::getValue('follow_btn')\n );\n Configuration::updateValue($this->name.'_settings', serialize($settings));\n \n // display success message\n return $this->displayConfirmation($this->l('The settings have been successfully saved!'));\n }\n \n return '';\n }", "public function isSuccessful() {}", "public function isSuccess(): bool;", "public function isSuccess(): bool;", "public function isSuccess(): bool;", "function processa()\n {\n return true;\n }", "public function isSuccessful()\n {\n return false;\n }", "public function isSuccessful()\n {\n return false;\n }", "public function isSuccessful()\n {\n return false;\n }", "public function validate()\n {\n return $_POST['formkey'] === $this->oldFormkey;\n }", "public function checkAccess()\n {\n if(!Module::isInstalled('lddw_grecaptcha')) {\n return parent::checkAccess();\n }\n $valid = Hook::exec('onSubmitContactForm');\n if(empty($valid)) {\n $this->errors[] = Tools::displayError('Invalid ReCaptcha Response');\n }\n\n return $valid;\n }", "function validate() {\n\treturn true;\n}", "public function form_success()\n {\n \tif ($this->session->has_userdata('success_message')) \n \t{\n \t\t# code...\n \t\t$this->data = array_merge($this->data, array(\n \t\t\t'msg'\t\t=> $this->session->userdata('success_message')['msg'],\n \t\t\t'msg2'\t\t=> $this->session->userdata('success_message')['msg2'],\n \t\t\t're_link'\t=> $this->session->userdata('success_message')['re_link'],\n \t\t\t'msg3'\t\t=> $this->session->userdata('success_message')['msg3'],\n \t\t\t're_link2'\t=> $this->session->userdata('success_message')['re_link2'] \n\t\t\t));\n\n \t\tif ($this->session->userdata('success_message')['type'] == 'participants') \n \t\t{\n \t\t\t# code...\n \t\t\t$this->data['output'] = $this->Model_return->return_participants($this->session->userdata('success_message')['id']);\n \t\t}\n \t\telseif ($this->session->userdata('success_message')['type'] == 'event') \n \t\t{\n \t\t\t# code...\n \t\t\t$this->data['output'] = $this->Model_return->return_event($this->session->userdata('success_message')['id']);\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$this->data['output'] = NULL;\n \t\t}\n \t\t$this->render($this->set_views->form_success());\n \t}\n \telse\n \t{\n \t\tredirect('/Form');\n \t}\n }", "abstract public function isSuccessful();", "protected function hasFormBeenProcessed($form)\n {\n global $wpdb;\n\n $unique_id = RGFormsModel::get_form_unique_id($form['id']);\n $sql = \"select lead_id from {$wpdb->prefix}rg_lead_meta where meta_key='gfbitpay_unique_id' and meta_value = %s\";\n $lead_id = $wpdb->get_var($wpdb->prepare($sql, $unique_id));\n\n return !empty($lead_id);\n }", "public function processAction() {\n\n if (!$this->validateRequest()) {\n $this->_helper->viewRenderer->setNoRender(true);\n $this->_helper->layout()->disableLayout();\n return;\n }\n\n $request = $this->getRequest();\n\n // Check if we have a POST request, otherwise, redirect\n if (!$request->isPost()) {\n return $this->_helper->redirector('index');\n }\n //Retrieving the form\n $form = $this->getForm();\n if (!$form->isValid($request->getPost())) {// Invalid entries\n $this->view->message = 'process-authorize';\n $this->view->form = $form;\n return $this->render('index'); // re-render the login form\n }\n\n if ($form->getValue('yes')) {//Resource Owner says yes\n $this->processApprove($form->getValues());\n } else if ($form->getValue(\"no\")) {//Resource Owner says no\n $this->processDeny($form->getValues());\n } else {//unrecognized value\n $this->view->message = 'process-authorize';\n $this->view->form = $form;\n return $this->render('index'); // re-render the login form\n }\n }", "function isValid() {\n\t\t$value = $this->getFieldValue();\n\t\tif (empty($value) || $value == 'on') {\n\t\t\t// Make sure that the form will contain a real\n\t\t\t// boolean value after validation.\n\t\t\t$form =& $this->getForm();\n\t\t\t$value = ($value == 'on' ? true : false);\n\t\t\t$form->setData($this->getField(), $value);\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isValidationPassed();", "public function isSuccessful();", "private function validate() {\n\t\n\t\t\treturn false;\n\t}", "function RegisterPraktijk()\n {\n if(!isset($_POST['submitted']))\n {\n return false;\n }\n // Maak een Array\n $formvars = array();\n \n $this->CollectRegistrationSubmissionPraktijk($formvars);\n \n if(!$this->SaveToDatabasePraktijk($formvars))\n {\n return false;\n }\n return true;\n }", "function form_action()\r\n {\r\n $success = true ;\r\n\r\n $sdifqueue = new SDIFResultsQueue() ;\r\n $sdifqueue->PurgeQueue() ;\r\n\r\n $this->set_action_message(html_div('ft-note-msg',\r\n sprintf('%d record%s purged from SDIF Queue.',\r\n $sdifqueue->getAffectedRows(),\r\n $sdifqueue->getAffectedRows() == 1 ? \"\" : \"s\"))) ;\r\n\r\n unset($sdifqueue) ;\r\n\r\n return $success ;\r\n }", "public function was_successful() {\n return (bool) ( $this->mail_response );\n }", "protected function _update()\r\n\t{\r\n\t\t$oFlexSliderSlide = new FlexSliderSlider($this -> _iId);\r\n\t\t$bStatus = $oFlexSliderSlide -> update($_POST);\r\n\t\t$this -> _saveSlides($this -> _iId);\r\n\t\t\r\n\t\tif ($bStatus === true)\r\n\t\t{\r\n\t\t\t$this -> _aRedirect['message'] = 'saved';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this -> _aRedirect['message'] = 'error';\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "function validForm()\n{\n global $f3;\n $isValid = true;\n\n if (!validCity($f3->get('city'))) {\n\n $isValid = false;\n $f3->set(\"errors['city']\", \"Please enter a valid city.\");\n }\n\n if (!validDistance($f3->get('distance'))) {\n\n $isValid = false;\n $f3->set(\"errors['distance']\", \"Please enter a valid distance.\");\n }\n\n return $isValid;\n}", "function SaveForm($form_data)\n {\n $this->db->insert('prizebonddraw', $form_data);\n\n if ($this->db->affected_rows() == '1')\n {\n return TRUE;\n }\n\n return FALSE;\n }", "public function success();", "function process() {\n // We always call the parent's method\n parent::process();\n $d = $this->getDocument();\n \n // We pass the form our request object and the location of us so the form\n // will make us handle the input (as actually we take care of processing\n // this form) - it could link to any other action as long as it is aware\n // of the form\n $form = new Form($this->getRequest(), new Location($this), Request::METHOD_POST);\n \n // This is how you prepare values for the radio buttons\n $radios = array('visa', 'master');\n \n // This is how we prepare the fields\n $form->addField('text1', new TextInputField('Your name here please', \n new RegexValidator('^[[:alpha:]]+[[:space:]][[:alpha:]]+$')));\n $form->addField('pass1', \n new TextInputField('', new RegexValidator('^[[:digit:]]{16}$'), TextInputField::PASSWORD));\n $form->addField('text2', new TextInputField('', null, TextInputField::TEXTAREA));\n $form->addField('check1', new CheckBoxInputField());\n $form->addField('payment', new RadioButtonInputField('visa', $radios));\n \n // Here we test if the form was correctly submitted\n if($form->isValidSubmission()) {\n // Normally, we would do something useful here and redirect to another page\n // since this form uses the POST method\n $d->setVariable('success', true);\n }\n \n // Here we place the form into the document variable so it can process it\n $d->setVariable('form', $form);\n }", "public function isSuccess()\n {\n return $this->getStatus() === 'Success' && $this->getCode() === 200;\n }", "function ValidateSearchSubmission(){\r\n\t\tif(!empty($_POST[$this->GetSpamTrapInputName()]) ){\r\n\t\t\t//The proper error is not given intentionally\r\n\t\t\t$this->HandleError(\"Automated submission prevention: case 2 failed\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$validator = new FormValidator();\r\n\t\t$validator->addValidation(\"eventSearch\", \"req\", \"Search Field is Empty!\");\r\n\r\n\t\tif(!$validator->ValidateForm()){\r\n\t\t\t$error = '';\r\n\t\t\t$error_hash = $validator->GetErrors();\r\n\t\t\tforeach($error_hash as $inpname => $inp_err){\r\n\t\t\t\t$error .= $inpname.':'.$inp_err.\"\\n\";\r\n\t\t\t}\r\n\t\t\t$this->HandleError($error);\r\n\t\t\treturn false;\r\n\t\t} \r\n\t\treturn true;\r\n\t}", "protected function response()\r\n {\r\n return true;\r\n }", "public function callbackSubmit()\n {\n $answer = new Answer();\n $answer->setDb($this->di->get(\"dbqb\"));\n\n $filter = new TextFilter();\n\n $answer->title = $this->form->value(\"title\");\n $answer->body = $filter->doFilter($this->form->value(\"body\"), \"markdown\");\n $answer->questionid = $this->form->value(\"questionid\");\n $answer->userid = $this->form->value(\"userid\");\n $answer->save();\n\n // Update user rank - 3points for an answer\n $user = new User();\n $user->setDb($this->di->get(\"dbqb\"));\n $user->updateRank($answer->userid, 3);\n\n return true;\n }", "function passes() {\n return $this->startValidation();\n }", "public function finished()\n\t{\n\t\t$submission = $this->getSubmission();\n\n\t\tif (!$submission) return $this->httpError(404);\n\n\t\t$referrer = isset($_GET['referrer']) ? urldecode($_GET['referrer']) : null;\n\n\t\tif (!$this->DisableAuthenicatedFinishAction && !$submission) {\n\t\t\t$formProcessed = Session::get('FormProcessed');\n\n\t\t\tif (!isset($formProcessed)) {\n\t\t\t\treturn $this->redirect($this->Link() . $referrer);\n\t\t\t} else {\n\t\t\t\t$securityID = Session::get('SecurityID');\n\t\t\t\t// make sure the session matches the SecurityID and is not left over from another form\n\t\t\t\tif ($formProcessed != $securityID) {\n\t\t\t\t\t// they may have disabled tokens on the form\n\t\t\t\t\t$securityID = md5(Session::get('FormProcessedNum'));\n\t\t\t\t\tif ($formProcessed != $securityID) {\n\t\t\t\t\t\treturn $this->redirect($this->Link() . $referrer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSession::clear('FormProcessed');\n\t\t}\n\n\t\t$data = array(\n\t\t\t\t'Submission' => $submission,\n\t\t\t\t'Link' => $referrer\n\t\t);\n\n\t\t$this->extend('updateReceivedFormSubmissionData', $data);\n\n\t\treturn $this->customise(array(\n\t\t\t'Content' => $this->customise($data)->renderWith($this->config()->submission_template),\n\t\t\t'Form' => '',\n\t\t));\n\t}", "public function runSuccess();", "public function isSuccessful()\n {\n return true;\n }" ]
[ "0.69721645", "0.69304556", "0.6874654", "0.6865524", "0.67941236", "0.66425264", "0.65642124", "0.65415466", "0.65379703", "0.6517871", "0.64882517", "0.6430404", "0.6417659", "0.6401707", "0.6399473", "0.63909507", "0.63558567", "0.63370854", "0.6318661", "0.62679195", "0.6259428", "0.6259428", "0.6259428", "0.6259428", "0.6255456", "0.6235004", "0.62034255", "0.6180215", "0.6178067", "0.61685497", "0.6166743", "0.6163416", "0.61596495", "0.6125325", "0.6119636", "0.611581", "0.6109771", "0.61089414", "0.6103962", "0.61038035", "0.606692", "0.6066183", "0.6050109", "0.60464", "0.60376984", "0.6036475", "0.60360366", "0.6035392", "0.6030985", "0.6027928", "0.60193986", "0.6012192", "0.60109174", "0.6004561", "0.60030144", "0.5996372", "0.59948087", "0.5988917", "0.5986318", "0.5975722", "0.5975242", "0.59743094", "0.59722817", "0.59711456", "0.59668744", "0.59643245", "0.5954283", "0.5950806", "0.5950806", "0.5950806", "0.5939515", "0.59307736", "0.59307736", "0.59307736", "0.5929744", "0.5927421", "0.59198433", "0.5918066", "0.5915254", "0.59050024", "0.58938503", "0.5884869", "0.5872297", "0.58703554", "0.5868403", "0.58521867", "0.5850746", "0.58504534", "0.58424187", "0.58418375", "0.5841811", "0.5840414", "0.5827049", "0.5826611", "0.58224386", "0.5820323", "0.5818274", "0.58171904", "0.5815517", "0.58108115", "0.5806275" ]
0.0
-1
Returns an array if errors are present, false if not Set in hooks.raven.php > process()
public function errors() { if ($errors = Session::getFlash('raven')) { return Parse::template($this->content, $errors); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasErrors();", "public function getErrors()\n {\n return $this->processerrors;\n }", "public function get_errors() {\n\t\treturn empty( $this->errors ) ? false : $this->errors;\n\t}", "function hasErrors()\n\t{\n\t\treturn $this->bool_hasErrors;\n\t}", "public function hasErrors() {\n return (boolean) $this->_getErrorNumber();\n }", "public static function hasErrors() { return count(PNApplication::$errors) > 0; }", "public function preProcess()\n { \n $errors = $this->get( 'error' );\n $this->assign('errors', $errors );\n $errors = null;\n return true;\n }", "public function isError() {\n return $this->_errors;\n }", "public function getErrors(): array;", "public function getErrors(): array;", "public function getErrors(): array;", "function getErrors()\n\t{\n\t\treturn [];\n\t}", "public function getErrors() : array;", "public function errorsOccured() {\n return !empty($this->errors);\n }", "public function hasErrors()\n {\n return $this->errorHandler instanceof ErrorHandler;\n }", "public function has_errors()\n {\n }", "private function getInitialErrors()\n\t{\n\t\t$errors = [];\n\n\t\t// Make sure our file doesn't exist (unless we're appending)\n\t\tif(file_exists($this->config['file']) && ! $this->append)\n\t\t{\n\t\t\t$errors[] = 'File exists';\n\t\t}\n\n\t\t// Create our file\n\t\tif( ! touch($this->config['file']))\n\t\t{\n\t\t\t$errors[] = 'Could not create file';\n\t\t}\n\n\t\t// Make sure we can write to our file\n\t\tif( ! is_writable($this->config['file']))\n\t\t{\n\t\t\t$errors[] = 'Cannot write to file';\n\t\t}\n\n\t\treturn empty($errors) ? false : $errors;\n\t}", "function getErrors();", "public function getErrors(){\n if( !isset($this->openForm) ) return false;\n if( !is_bool($this->openForm) && !is_array($this->openForm) )\n return self::getFormErrors($this->openForm);\n if( is_array($this->openForm) )\n return self::getFormErrors($this->openForm['formid']);\n return false;\n }", "public function hasErrors()\n {\n if (isset($this->_response->ERROR)) {\n return true;\n }\n return false;\n }", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function hasErrors()\n {\n return !empty(self::$errors);\n }", "public static function found_validation_errors() {\n\t\treturn ! empty( self::$errors );\n\t}", "public function has_errors() {\n\t\treturn count($this->_error_array) > 0;\n\t}", "public function getErrors():array;", "public function checkError() {\n return is_array($this->errors);\n }", "public function hasErrors()\n {\n return count($this->errors) ? true : false;\n }", "public function hasErrors()\n\t{\n\t\treturn count($this->errors);\n\t}", "public function hasError()\r\n\t{\r\n\t\treturn $this->root->hasAttribute('liberr');\r\n\t}", "public function has_errors()\n {\n return ($this->errors != NULL && count($this->errors));\n }", "public function getAllerrors() {\n return $this->errors;\n }", "private static function _set_has_error_all(): void\n {\n self::$_has_error_all = true;\n }", "public function hasError()\n\t{\n\t\treturn $this->error || $this->error_code;\n\t}", "public function has_errors() {\n return !empty($this->errors);\n }", "public function has_errors()\n {\n return !empty($this->errors);\n }", "protected function _hasErrors() {\n return (bool) count($this->_getSession()->getMessages()->getItemsByType('error'));\n }", "public function hasError() { return $this->error; }", "public function getErrors()\n {\n $errors = $this->getValue('klarna_validation_errors');\n return $errors ? $errors : array();\n }", "public function get_errors() {\n $res = array();\n foreach($this->errors as $error) {\n $res[] = $error->errormsg;\n }\n return $res;\n }", "public static function getErrors(): array\n {\n return self::$errors;\n }", "public function hasErrors() {\n return (count($this->errors)) ? true : false;\n }", "public function hasErrors() {\n return !is_bool($this->_errors);\n }", "function has_errors() {\n\t\treturn count($this->errors) > 0;\n\t}", "public static function error($errors){\n\t\t\tif (in_array(true, $errors)) {\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function has_errors() {\n\t\treturn ! empty( $this->errors );\n\t}", "public function validation_errors()\n\t{\n\t\t$errors = array();\n\n\t\tforeach ($this->validators as $fld=>$arr)\n\t\t{\n\t\t\tforeach ($arr as $vl)\n\t\t\t{\n\t\t\t\t$vl->page = $this;\n\n\t\t\t\tif (!$vl->validate($fld, $this->vars))\n\t\t\t\t{\n\t\t\t\t\t$errors[$fld] = $vl->error_message($fld, $this->vars);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $errors;\n\t}", "function requestErrors() {\n return $this->errors;\n }", "function get_errors()\n {\n }", "function get_errors() {\n\t\treturn $this->errors;\n\t}", "public function hasError ()\n {\n return (bool)$this->stderr;\n }", "public function has_error()\n\t{\n\t\treturn count($this->arr_error) == 0 ? false : true;\n\t}", "public function getErrors () : array {\n\t\treturn $this->errors;\n\t}", "function validate()\r\n {\r\n global $app;\r\n return empty($app->errors);\r\n }", "public function errorsArray()\n {\n return $this->errors;\n }", "public function getErrorList() {\n\t\treturn array();\n\n\t}", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function getErrors(): array\n {\n return $this->errors;\n }", "public function hasErrors()\n {\n return count($this->get(self::ERRORS)) !== 0;\n }", "public function errors()\n\t{\n\t\treturn $this->_errors['errors'];\n\t}", "public function errors()\n\t{\n\t\treturn $this->_errors['errors'];\n\t}", "public function errors();", "public function errors();", "public function hasErrors()\n\t{\n\t\treturn (empty($this->errors)) ? false : true;\n\t}", "public function hasErrors()\n\t{\t\n\t\tif(empty($this->_errors))\n\t\t\treturn False;\n\t\telse\n\t\t\treturn True;\n\t}", "public function hasErrors() {\n\t\treturn !empty( $this->getErrors() );\n\t}", "public static function errors(): array\n\t{\n\t\treturn self::$errorsArray;\n\t}", "public function get_errors()\n {\n return $this->errors;\n }", "public function get_errors()\n {\n return $this->errors;\n }", "public function get_errors()\n {\n return $this->errors;\n }", "function getErrors() {\n \techo errorHandler();\n }", "protected final function requestErrors(): array\n {\n return $this->errors;\n }", "public function get_errors() {\n return $this->errors;\n }", "public function get_errors() {\n return $this->errors;\n }", "public function hasErrors(): bool\n {\n return $this->errors->count() ? true : false;\n }", "public function hasErrors()\n {\n return !$this->errors->isEmpty();\n }", "public function errors(): array\n {\n return $this->errors;\n }", "public function errors()\n\t{\n\t\treturn $this->errors;\n\t}", "public function errors()\n\t{\n\t\treturn $this->errors;\n\t}", "public function get_errors() {\n\t\treturn $this->errors;\n\t}", "private function get_errors( $errors ) {\n\t\t\t\t\n\t\t\tforeach( $errors as $err ) {\n\t\t\t\t\n\t\t\t\terror_log( $err );\n\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//return false;\n\t\t}", "public function errors() {\r\n\t\treturn $this->_errors;\r\n\t}", "public function hasError();", "public function hasError();", "public function hasError();", "public function hasError();", "public function errors()\n\t{\n\t\treturn $this->_errors;\n\t}", "public function getValidationErrors() {\n\t\treturn (array)$this -> _errors;\n\t}", "function getErrors() {\n\t\treturn $this->_arc2_RemoteStore->getErrors();\n\t}", "public function getErrors() : array\n {\n return $this->errors;\n }", "public function getErrors(){\r\n return $this->_errors['error'];\r\n }", "public function error()\n\t{\n\t\treturn [];\n\t}", "function get_errors(){\r\n\t\t$errors = array();\r\n\r\n\t\tforeach($this->feeds as $feed){\r\n\t\t\tif($feed->error()) $errors[] = $feed->get_feed_id();\r\n\t\t}\r\n\r\n\t\treturn $errors;\r\n\t}" ]
[ "0.6748236", "0.67011833", "0.6588821", "0.6565944", "0.65657294", "0.65572774", "0.6445504", "0.64079434", "0.63633114", "0.63633114", "0.63633114", "0.63114154", "0.6255876", "0.6249589", "0.62379557", "0.6230407", "0.62259984", "0.61628133", "0.61529183", "0.61377263", "0.6120667", "0.6120667", "0.6120667", "0.6120667", "0.6086956", "0.6076877", "0.607383", "0.6069692", "0.6064081", "0.60558164", "0.6050112", "0.6036954", "0.6020785", "0.6019881", "0.60098094", "0.6009207", "0.60091877", "0.6005586", "0.59968776", "0.5992814", "0.59914017", "0.5988219", "0.5985971", "0.5979929", "0.59787464", "0.5972342", "0.59639055", "0.5958787", "0.59552383", "0.59329075", "0.59273654", "0.5926189", "0.5916436", "0.59135675", "0.59044605", "0.5899754", "0.5898083", "0.58948123", "0.5892932", "0.5892932", "0.5892932", "0.5892932", "0.5892932", "0.5892932", "0.5892932", "0.5886232", "0.5886152", "0.5886152", "0.5886131", "0.5886131", "0.5873705", "0.5867228", "0.58652246", "0.5863734", "0.5855448", "0.5855448", "0.5855448", "0.5850131", "0.58440995", "0.5837753", "0.5837753", "0.58368236", "0.58272046", "0.5826965", "0.5826888", "0.5826888", "0.58267844", "0.5824859", "0.58237666", "0.5821274", "0.5821274", "0.5821274", "0.5821274", "0.5818874", "0.5817201", "0.5811077", "0.5803516", "0.5796002", "0.5788113", "0.57852674" ]
0.59686005
46
Call the Model constructor
function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this ->model = $this ->makeModel($this ->model());\n }", "function __construct () {\n\t\t$this->_model = new Model();\n\t}", "function __construct()\n {\n // 呼叫模型(Model)的建構函數\n parent::__construct();\n \n }", "function __construc()\r\n\t{\r\n\t\tparent::Model();\r\n\t}", "function __construct()\r\n {\r\n parent::Model();\r\n }", "function __construct() {\r\n parent::Model();\r\n }", "function __construct() {\n // Call the Model constructor \n parent::__construct();\n }", "public function __construct() {\n // Call the Model constructor\n parent::__construct();\n }", "private function __construct($model)\r\n {\r\n\r\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n parent::Model();\n }", "function __construct(){\n\t\tparent::__construct();\n\t\t\t$this->set_model();\n\t}", "public function __construct()\n\t{\n\t\tif (!$this->model_name)\n\t\t{\n\t\t\t$this->model_name = str_replace('Model_', '', get_class($this));\n\t\t}\n\t\t$this->model_name = strtolower($this->model_name);\n\t\t\n\t\t$this->_initialize_db();\n\t}", "public function __construct()\n {\n parent::Model();\n\n }", "function __construct()\n\t\t{\n\t\t\t// Call the Model constructor\n\t\t\tparent::__construct();\n\t\t $this->load->database();\t\n\t\t}", "public function __construct()\n {\n // All of my models are like this\n parent::__construct(get_class($this));\n // Calling methods to get the relevant data\n $this->generateNewsData();\n $this->generateAnalyticsData();\n $this->generatePostsData();\n }", "public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('Model');\n\t}", "public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('Model');\n\t}", "public function __construct () {\n $this->model = 'App\\\\' . $this->model;\n $this->model = new $this->model();\n\n // Get the column listing for a given table\n $this->table_columns = Schema::getColumnListing( $this->table );\n }", "public function __construct()\n\t{\n\t\t// \\ladybug_dump($model);\n\t}", "function __construct () {\n\n\t\techo 'I am in Model';\n\n\t}", "public function __construct() {\n $this->openConnection();\n $this->model();\n }", "public function __construct()\n {\n $this->model = app()->make($this->model());\n }", "function __construct()\n {\n $this->openDatabaseConnection();\n $this->loadModel();\n }", "public function __construct(Model $model) {\n parent::__construct($model);\n \n }", "public function __construct()\n {\n $this->model = new BaseModel;\n }", "public function __construct()\n {\n parent::__construct();\n //自动加载相对应的数据模型\n if ($this->auto_load_model) {\n $model_name = $this->model_name ? $this->model_name . '_model' : $this->router->fetch_class() . '_model';\n $this->load->model($model_name, 'model');\n }\n $this->_set_user();\n $this->_check_resource();\n }", "public function __construct(){\n\t\tinclude_once(\"model/crews_model.php\");\n\t\t$this->model = new crews_model();\n\t}", "public function __construct($model) \n {\n parent::__construct($model);\n }", "public function __construct($initModel = true) {\n if ($initModel)\n $this->model = new Model();\n }", "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->model('data');\n\t}", "public function __construct() {\n $this->porcentajesCursoModel = $this->model('PorcentajesCursoModel');\n $this->tipoModuloModel = $this->model('TipoModuloModel');\n $this->cursoModel = $this->model('CursoModel');\n }", "public function __construct() {\n $this->docenteModel = $this->model('DocenteModel');\n }", "function __construct(Model $model)\n {\n $this->model=$model;\n }", "public function __construct() {\n // load our model\n $this->userModel = $this->model('User'); // will check models folder for User.php\n }", "public function __construct($model)\n {\n //\n $this->model = $model;\n }", "public function __construct() {\n\t\t$this->orgModel = new OrgModel(); // TODO: \n\t }", "public function __construct()\n {\n\n $this->SubCategory = new SubCategoriesModel;\n $this->Functions = new ModelFunctions();\n }", "function __construct() {\n parent::__construct();\n $this->load->model('Callcenter_model');\n }", "public function __construct() {\n // und lädt das zugehörige Model\n $this->userModel = $this->model('User');\n }", "function __construct()\n {\n parent::__construct();\n $this->__resTraitConstruct();\n $this->load->model('VSMModel');\n $this->load->model('TextPreprocessingModel');\n\n }", "public function __CONSTRUCT(){\n $this->model = new Estadobien();\n }", "public function __construct()\r\n\t{\r\n\tparent::__construct();\r\n\t\r\n\t//load database libray manually\r\n\t$this->load->database();\r\n\t\r\n\t//load Model\r\n\t$this->load->model('Hello_Model');\r\n\t}", "function __construct() {\n\t\t$this->cotizacionModel = new cotizacionModel();\n\t}", "protected function _construct()\n {\n $this->_init(Model::class, ResourceModel::class);\n }", "public function __construct() {\n parent::__construct('md_rent_car', 'md_order');\n $this->log->log_debug('RentCarAffairModel model be initialized');\n }", "function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct()\n {\n $this->modelName = explode('.', Route::currentRouteName())[0];\n $this->model = new Model($this->modelName);\n }", "public function __construct( Model $model ) {\n\t\t$this->model = $model;\n\t}", "public function __construct () {\n\t\tparent::__construct ();\n\t\t\n\t\tif ($this->models)\n\t\tforeach ($this->models as $model) {\n\t\t\tunset ($this->models[$model]);\n\t\t\t$this->models[$model] = $this->session->getModel ($model,$this);\n\t\t\t$this->$model = $this->models[$model];\n\t\t}\n\t}", "public function __construct()\n {\n \t parent::__construct();\n \t $this->load->model('Modelo');\n }", "function\t__construct()\t{\n\t\t\t\t/* contrutor da classe pai */\n\t\t\t\tparent::__construct();\n\t\t\t\t/* abaixo deverão ser carregados helpers, libraries e models utilizados\n\t\t\t\t\t por este model */\n\t\t}", "function __construct()\n {\n parent::__construct();\n\n\t\t$this->load->model('floatplan_model');\n\t\t$this->load->model('user_model');\n }", "public function __construct() {\r\n $this->model = new CompanyModel();\r\n }", "public function __construct($model){\r\n\t\t$this->model = $model;\r\n\t}", "public function __construct()\n {\n $this->MemberModel = new MemberModel();\n }", "public function __construct()\n\t{\n\t\t$this->modelProducts = new ProductsModel();\n\t\t/* ********** fin initialisation Model ********** */\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('LeBabeModel');\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('LeBabeModel');\n\t}", "public function __construct()\n {\n parent::__construct();\n\n $this->model = new MembersModel();\n }", "public function __construct() {\n $this->load = new Load();\n $this->model = new Model();\n }", "public function __construct()\n {\n echo \"constructeur model\";\n }", "function __construct()\n {\n $this->view = new View();\n $this->model = new si_cf_parametroModel();\n }", "public function __construct()\n\t\t{\n\t\t\t/*goi thang den ham _init trong ResourceModel*/\n\t\t\tparent::_init('lienhe', 'id', new ContactModel);\n\t\t}", "public function __construct()\n {\n parent::__construct();\n\n\t\t$this->load->model(\"options_model\");\n\t\t$this->load->model(\"selections_model\");\n\t\t$this->load->model(\"info_model\");\n\t\t$this->load->model(\"dealer_model\");\n\t\t$this->load->library(\"encrypt\");\n\t\t$this->load->model(\"promocode_model\");\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->load->model(['m_voting', 'm_master', 'm_prospects', 'm_factors']);\n }", "public function __construct() {\n parent::__construct();\n $this->load->model('Thematic_model');\n }", "function __construct() {\n $this->model = new HomeModel();\n }", "public function __construct() {\n\n parent::__construct();\n\n // Load models\n $this->load->model(\"attributesModel\", \"attributes\");\n\n }", "public function __construct()\n\t{\n\t\t//MVC: makes CodeIgniter style $this->load->model() available to my controllers\n\t\t$this->load = new modelLoader($this);\n\t}", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "function __construct()\n\t{\n\t\tparent :: __construct();\n\t\t$this -> load -> model('getinfo','m');\n\t}", "function __construct() {\n $this->loteModel = new loteModel();\n }", "public function __construct() {\n parent::__construct();\n $this->load->model(array('dt_diag_klsf_model','dt_obat_model','dt_pasien_model','dt_pemeriksaan_model','dt_proses_model','dt_thpan_model'));\n }", "function __construct()\n\t{\n\t\t// this->model = new Producto();\n\t}", "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }", "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }", "public function __construct() {\n\t\t$this->empleadoModel = $this->model('Empleado');\n\t}", "public function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t\t\r\n\t\t$this->load->model(array('user_model','program_model'));\r\n\t\t\r\n\t}", "public function __construct(Model $model)\n {\n // $this->$key = $model;\n $this->model = $model;\n }", "function __construct()\n {\n // load model\n Load::loadModel(\"helpDesk\");\n }", "public function __construct()\n\t{\n\t\t$this->model = new Layout_Model();\n\t}", "public function __construct(){\n $this->sliderModel = $this->model('Slider');\n $this->siteInfoModel = $this->model('SiteInfo');\n $this->officeModel = $this->model('Office');\n $this->categoryModel = $this->model('Category');\n $this->brandModel = $this->model('Brands');\n $this->productModel = $this->model('Products');\n $this->imgModel = $this->model('Image');\n }", "function __construct()\n {\n parent::__construct();\n // $this->load->model('');\n }", "public function __construct() {\r\n parent::__construct();\r\n $this->load->model(array(\r\n 'app_model'\r\n ));\r\n }", "function __construct(){\n\t\t\t$this->model = new model(); //variabel model merupakan objek baru yang dibuat dari class model\n\t\t\t$this->model->table=\"tb_dosen\";\n\t\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('TimeTable_model', 'tmtl');\n\t\t$this->load->model('Schools_model', 'schl');\n\t}", "public function __construct() {\n\t\t\t$this->modelName = 'concreeeeeete';\n\t\t}", "public function __construct($model = null)\n {\n $instance = $this->makeModel($model);\n parent::__construct($instance->getConnection()->query());\n $this->setModel($instance);\n }", "function __construct() {\n parent::__construct();\n $this->load->model('Fontend_model');\n $this->load->model('Package_model');\n }" ]
[ "0.8196736", "0.8080118", "0.8054001", "0.7839992", "0.78184336", "0.78158236", "0.7770901", "0.773286", "0.7704549", "0.7701882", "0.7701882", "0.7701882", "0.7701882", "0.76811564", "0.76426494", "0.75779855", "0.75710344", "0.75621206", "0.7518676", "0.75171185", "0.75171185", "0.7511973", "0.7489728", "0.7468261", "0.74572253", "0.7449389", "0.7445181", "0.7444535", "0.7427869", "0.7407304", "0.74014014", "0.73759925", "0.73413444", "0.7335981", "0.73260605", "0.7277932", "0.7272845", "0.72707343", "0.7265125", "0.7254405", "0.7252804", "0.72438663", "0.7242104", "0.7241692", "0.7240256", "0.7231797", "0.7230043", "0.72287345", "0.7228103", "0.722678", "0.72072005", "0.71945196", "0.7175319", "0.716174", "0.71547157", "0.7150238", "0.7140722", "0.71377164", "0.71358", "0.7132933", "0.7132409", "0.7132409", "0.71250975", "0.71239203", "0.71029484", "0.7092826", "0.70837456", "0.7072703", "0.70563996", "0.7049204", "0.70491046", "0.7045107", "0.70382833", "0.7036996", "0.7036996", "0.7036996", "0.7036996", "0.7036996", "0.7036996", "0.7036996", "0.7036996", "0.7036996", "0.7033529", "0.7029588", "0.7026682", "0.70233345", "0.70195305", "0.70195305", "0.7018619", "0.7012934", "0.7012402", "0.7007989", "0.70067614", "0.7005785", "0.7004497", "0.6996979", "0.69894654", "0.6989313", "0.6972264", "0.6970196", "0.6969221" ]
0.0
-1
rescatar los nombre del formulario y asociarlos a las variables de arriba
public function __construct() { $this->nombre = $_POST['nombre']; $this->edad = $_POST['edad']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateFormConstantes()\n {\n $inputs = array();\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Seuil de Calcul Prime fichier',\n 'name' => 'co_seuil_prime_fichier',\n 'desc' => 'Montant du seuil de calcul de la prime',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prime fichier',\n 'name' => 'co_prime_fichier',\n 'desc' => 'Montant de la prime fichier',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prime parrainage',\n 'name' => 'co_prime_parrainage',\n 'desc' => 'Montant de la prime parrainage',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prospects par jour',\n 'name' => 'co_prospects_jour',\n 'desc' => 'Nombre de prospects affectés par jour travaillé',\n 'class' => 'input fixed-width-md',\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prospects par heure',\n 'name' => 'co_prospects_heure',\n 'desc' => 'Nombre de prospects par heure travaillé',\n 'class' => 'input fixed-width-md',\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Ancienneté des prospects',\n 'name' => 'co_prospects_jour_max',\n 'desc' => 'Nombre de jour maximum d\\'ancienneté des prospects pour l\\'atribution',\n 'class' => 'input fixed-width-md',\n 'suffix' => 'jour'\n );\n\n $fields_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Configuration'),\n 'icon' => 'icon-cogs'\n ),\n 'input' => $inputs,\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => 'submitConfiguration'\n )\n )\n );\n\n $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));\n $helper = new HelperForm();\n $helper->default_form_language = $lang->id;\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name\n . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigConfiguration(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n return $helper->generateForm(array($fields_form));\n\n }", "function geraClasseDadosFormulario(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modelo1 = Util::getConteudoTemplate('class.Modelo.DadosFormulario.tpl');\n $modelo2 = Util::getConteudoTemplate('metodoDadosFormularioCadastro.tpl');\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 $nomeClasse = ucfirst($this->getCamelMode($aTabela['NOME']));\n\n $copiaModelo1 = $modelo1;\n $copiaModelo2 = $modelo2;\n\n # varre a estrutura dos campos da tabela em questao\n $camposForm = $aModeloFinal = array();\n foreach($aTabela as $oCampo){\n # recupera campo e tabela e campos (chave estrangeira)\n $nomeCampoOriginal = (string)$oCampo->NOME;\n $nomeCampo \t = $nomeCampoOriginal;\n //$nomeCampo \t = $nomeCampoOriginal;\n\n # monta parametros a serem substituidos posteriormente\n switch ((string)$oCampo->TIPO) {\n case 'date':\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = Util::formataDataFormBanco(strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"]))));\";\n break;\n\n case 'datetime':\n case 'timestamp':\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = Util::formataDataHoraFormBanco(strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"]))));\";\n break;\n\n default:\n if((int)$oCampo->CHAVE == 1)\n if((string)$aTabela['TIPO_TABELA'] != 'NORMAL')\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"])));\";\n else\n $camposForm[] = \"if(\\$acao == 2){\\n\\t\\t\\t\\$post[\\\"$nomeCampoOriginal\\\"] = strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"])));\\n\\t\\t}\";\n else\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"])));\";\n break;\n }\n }\n # monta demais valores a serem substituidos\n $camposForm = join($camposForm,\"\\n\\t\\t\");\n\n # substitui todas os parametros pelas variaveis ja processadas\n $copiaModelo2 = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo2);\n $copiaModelo2 = str_replace('%%ATRIBUICAO%%', $camposForm, $copiaModelo2);\n\n $aModeloFinal[] = $copiaModelo2;\n }\n\n $modeloFinal = str_replace('%%FUNCOES%%', join(\"\\n\\n\", $aModeloFinal), $copiaModelo1);\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes\";\n if(!file_exists($dir)) \n mkdir($dir);\n\n $fp = fopen(\"$dir/class.DadosFormulario.php\",\"w\");\n fputs($fp, $modeloFinal);\n fclose($fp);\n return true;\t\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}", "abstract protected function getFormName();", "protected function addNamesLabelsValues() {\n foreach ($this->__fields() as $field) {\n $this->$field->__name = $field;\n if (!$this->$field->label && $this->$field->label !== '') $this->$field->label = strtoupper($field[0]) . substr ($field, 1);\n $this->setFieldValue($field);\n $this->$field->setForm($this);\n }\n }", "function defform()\n\t{\n\t\t// Definisi elemen form untuk data teman\n\t\t$noteman = array(\n\t\t\t\t\"name\"\t\t=> \"noteman\",\n\t\t\t\t\"id\"\t\t=> \"noteman\",\n\t\t\t\t\"maxlenght\"\t=> \"4\",\n\t\t\t\t\"size\"\t\t=> \"3\",\n\t\t\t\t\"value\"\t\t=> \"\",\n\t\t\t\t\"style\"\t\t=> \"background:red;\"\n\t\t\t);\n\n\t\t$namateman = array(\n\t\t\t\t\"name\"\t\t=> \"namateman\",\n\t\t\t\t\"id\"\t\t=> \"namateman\",\n\t\t\t\t\"maxlenght\"\t=> \"50\",\n\t\t\t\t\"size\"\t\t=> \"35\",\n\t\t\t\t\"value\"\t\t=> \"\",\n\t\t\t\t\"style\"\t\t=> \"background:cyan;\"\n\t\t\t);\n\n\t\t$notelp = array(\n\t\t\t\t\"name\"\t\t=> \"notelp\",\n\t\t\t\t\"id\"\t\t=> \"notelp\",\n\t\t\t\t\"maxlenght\"\t=> \"15\",\n\t\t\t\t\"size\"\t\t=> \"13\",\n\t\t\t\t\"value\"\t\t=> \"\",\n\t\t\t\t\"style\"\t\t=> \"background:cyan;\"\n\t\t\t);\n\n\t\t$email = array(\n\t\t\t\t\"name\"\t\t=> \"email\",\n\t\t\t\t\"id\"\t\t=> \"email\",\n\t\t\t\t\"maxlenght\"\t=> \"35\",\n\t\t\t\t\"size\"\t\t=> \"25\",\n\t\t\t\t\"value\"\t\t=> \"\",\n\t\t\t\t\"style\"\t\t=> \"background:cayn;\"\n\t\t\t);\n\t\t// end definisi\n\n\t\t$atableteman = [\n\t\t\t\"noteman\"\t=> $noteman,\n\t\t\t\"namateman\"\t=> $namateman,\n\t\t\t\"notelp\"\t=> $notelp,\n\t\t\t\"email\"\t\t=> $email\n\t\t];\n\n\t\treturn $atableteman;\n\t}", "public static function form(){\n $fecha = mktime(date(\"Y\"), date(\"m\"), date(\"d\"));\n $tipoAct = 'Actividad'->'id_tipo_act';\n return ['nombre' => '', 'tipo_actividad' => '','fecha_desde' =>$fecha, 'fecha_hasta' =>$fecha,\n 'instancia' => '', 'puesto_mencion' =>'','inst_referente' => '',\n 'inst_oferente' => '', 'lugar' =>'','descripcion' =>''];\n\n }", "public function formulario()\n {\n //\n }", "function configurar_formulario (toba_ei_formulario $form){\n switch ($this->s__tipo){\n case \"Definitiva\" : $this->cargar_form_definitivo($form); break;\n case \"Periodo\" : $this->cargar_form_periodo($form); break;\n }\n }", "protected function getFormObjectName() {}", "function geraClasseValidadorFormulario(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modelo1 = Util::getConteudoTemplate('class.Modelo.ValidadorFormulario.tpl');\n $modelo2 = Util::getConteudoTemplate('metodoValidaFormularioCadastro.tpl');\n\n # abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n $aModeloFinal = array();\n \n # varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $nomeClasse = ucfirst($this->getCamelMode((string)$aTabela['NOME']));\n $copiaModelo1 = $modelo1;\n $copiaModelo2 = $modelo2;\n\n $objetoClasse = \"\\$o$nomeClasse\";\n\n # ==== varre a estrutura dos campos da tabela em questao ====\n $camposForm = array();\n foreach($aTabela as $oCampo){\n # recupera campo e tabela e campos (chave estrangeira)\n $nomeCampoOriginal = (string)$oCampo->NOME;\n # processa nome original da tabela estrangeira\n $nomeFKClasse = (string)$oCampo->FKTABELA;\n $objetoFKClasse = \"\\$o$nomeFKClasse\";\n\n $nomeCampo = $nomeCampoOriginal;\n //$nomeCampo = $nomeCampoOriginal;\n\n # monta parametros a serem substituidos posteriormente\n $label = ($nomeFKClasse != '') ? ucfirst(strtolower($nomeFKClasse)) : ucfirst(str_replace($nomeClasse,\"\",$nomeCampoOriginal));;\t\t\t\t\t\n $camposForm[] = ((int)$oCampo->CHAVE == 1) ? \"if(\\$acao == 2){\\n\\t\\t\\tif(\\$$nomeCampoOriginal == ''){\\n\\t\\t\\t\\t\\$this->msg = \\\"$label invalido!\\\";\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t}\" : \"if(\\$$nomeCampoOriginal == ''){\\n\\t\\t\\t\\$this->msg = \\\"$label invalido!\\\";\\n\\t\\t\\treturn false;\\n\\t\\t}\\t\";\n }\n # monta demais valores a serem substituidos\n $camposForm = join($camposForm,\"\\n\\t\\t\");\n\n # substitui todas os parametros pelas variaveis já processadas\n $copiaModelo2 = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo2);\n $copiaModelo2 = str_replace('%%ATRIBUICAO%%', $camposForm, $copiaModelo2);\n\n $aModeloFinal[] = $copiaModelo2;\n }\n\n $modeloFinal = str_replace('%%FUNCOES%%', join(\"\\n\\n\", $aModeloFinal), $copiaModelo1);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes\";\n if(!file_exists($dir)) mkdir($dir);\n\n $fp = fopen(\"$dir/class.ValidadorFormulario.php\",\"w\"); fputs($fp, $modeloFinal); fclose($fp);\n\n return true;\t\n }", "abstract function builder_form(): string;", "function asignar_valores2(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->marca=$_POST['marca'];\n\t\t$this->modelo=$_POST['modelo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t}", "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->etiqueta=$_POST['etiqueta'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->icono=$_POST['icono'];\n\t}", "function createFieldString($tablas, $campos, $valores){\n\t\tglobal $formatedFields, $formatedValueConstrains,$misCampos;\n\t\t$i = 0;\n\n\t\tforeach ($valores as $key => $value) {\n\t\t\tif(empty($value)){\n\t\t\t\t$formatedFields[] = $tablas[$i].\".\".$campos[$i];\n\t\t\t\t$misCampos[] = $campos[$i];\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$formatedValueConstrains[] = $tablas[$i].\".\".$campos[$i].\"='\".$valores[$i].\"'\";\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\n\t}", "function createFieldString($tablas, $campos, $valores){\n\t\tglobal $formatedFields, $formatedValueConstrains,$misCampos;\n\t\t$i = 0;\n\n\t\tforeach ($valores as $key => $value) {\n\t\t\tif(empty($value)){\n\t\t\t\t$formatedFields[] = $tablas[$i].\".\".$campos[$i];\n\t\t\t\t$misCampos[] = $campos[$i];\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$formatedValueConstrains[] = $tablas[$i].\".\".$campos[$i].\"='\".$valores[$i].\"'\";\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\n\t}", "abstract public function forms();", "public function input($ref, $params = null) {\n if($this->Fields[$ref]) {\n //atributo principal\n $i['name'] = $ref;\n $i['id'] = strtolower(get_called_class().\"-\".$ref);\n \n //atributos setados sem a necessidade de tratamento ex.: id=\"id\"\n $commonAttrs = \"autocomplete|checked|class|disabled|id|name|maxlength|placeholder|size|style|type|value\";\n $validateAttrs = \"required|email|integer|onlyLetterNumber\";\n\n //verifica quais atributos ja foram setados anteriormente na classe\n foreach (explode(\"|\", $commonAttrs) as $attr) {\n if(isset($this->Fields[$ref][$attr])) $i[$attr] = $this->Fields[$ref][$attr];\n }\n \n //processa os campos de validacao passados pela classe\n foreach (explode(\"|\", $validateAttrs) as $attr) {\n if(isset($this->Fields[$ref][$attr])) $v[$attr] = $this->Fields[$ref][$attr];\n if($this->Fields[$ref][$attr] === true) $v[$attr] = true;\n }\n \n // se FormMode == \"add\" e houverem dados no $_POST do navegador, printa os dados no value do input\n // isso evita que o usuario tenha de redigitar todos os dados em caso de erro ao processar o formulario\n // semelhante como os formularios ja estao preenchidos ao disparar o evento javascript:history.back();\n // do navegador\n if($this->FormMode === \"add\" && !is_null($_POST[$ref])) $i['value'] = $_POST[$ref];\n \n // se FormMode == \"edit\" e houverem dados no objeto da class, printa os dados no value do input\n if($this->FormMode === \"edit\" && !is_null($this->$ref)) $i['value'] = $this->$ref;\n\n //processa todos os paramentos passados pela funcao\n if(is_array($params)) {\n foreach($params as $attr => $value) {\n if(preg_match(\"/^($commonAttrs)/i\", $attr)) {\n //atributos globais\n $i[$attr] = $value;\n } else\n if(preg_match(\"/^($validateAttrs)/i\", $attr)) {\n //atributos para validacao\n if($value === true) {\n $v[$attr] = true;\n } else {\n unset($v[$attr]);\n }\n } else {\n //atributos de html5 data-* sao passados diretamente\n if(preg_match(\"/^data-/i\", $attr)) $i[$attr] = $value;\n }\n }\n }\n\n //Se $v[$attr] => true transforma para class=\"validate[$attr]\"; sera validado com js posteriormente\n if(is_array($v) && count($v) > 0) {\n $i['class'] .= \" validate[\";\n $first = true;\n foreach($v as $attr => $val) {\n if($first === false) $i['class'] .= \",\";\n switch ($attr) {\n case \"email\":\n $i['class'] .= \"custom[email]\";\n break;\n case \"onlyLetterNumber\":\n $i['class'] .= \"custom[onlyLetterNumber]\";\n break;\n default:\n $i['class'] .= $attr;\n break;\n }\n $first = false;\n }\n $i['class'] .= \"]\";\n }\n\n //Se os campos forem type=radio|checkbox, o formulario seja 'edit' e o valor do campo $this->$ref corresponder, seta checked=\"checked\"\n if($this->FormMode === \"edit\" && ($this->$ref === $i['value'] || $_POST[$ref] == $i['value']) && ($i['type'] === \"radio\" || $i['type'] === \"checkbox\")) $i['checked'] = \"checked\";\n \n if($this->FormMode === \"add\" && ($_POST[$ref] == $i['value']) && ($i['type'] === \"radio\" || $i['type'] === \"checkbox\")) $i['checked'] = \"checked\";\n \n \n // remove os espacos no final e no comeco do atributo classe\n $i['class'] = trim($i['class']);\n \n if(!$i['type']) $i['type'] = \"text\";\n \n //monta o input com parametros mais relevantes primeiro\n if($i['type'] === \"textarea\") {\n $input = '<textarea name=\"'.$i['name'].'\" ';\n\n //remove os parametros relevantes para evitar repeticao\n unset($i['type']);\n unset($i['name']);\n\n //monta o input\n foreach ($i as $attr => $value) {\n if($attr !== \"value\") $input .= $attr.'=\"'.$value.'\" ';\n }\n \n $input .= \">\".$i['value'].\"</textarea>\\n\";\n } else {\n $input = '<input type=\"'.$i['type'].'\" name=\"'.$i['name'].'\" ';\n\n //remove os parametros relevantes para evitar repeticao\n unset($i['type']);\n unset($i['name']);\n\n //monta o input\n foreach ($i as $attr => $value) {\n $input .= $attr.'=\"'.$value.'\" ';\n }\n\n $input .= \" />\\n\";\n }\n \n //FUS-RO-DA!\n echo $input;\n } else {\n echo \"<!-- error input $ref -->\";\n }\n }", "function cargar_formulario($datos_necesarios){\n if(isset($datos_necesarios['acta'])){\n $ar = array();\n \n $ar[0]['votos'] = $datos_necesarios['acta']['total_votos_blancos'];\n $ar[0]['id_nro_lista'] = -1;\n $ar[0]['nombre'] = \"VOTOS EN BLANCO\";\n \n $ar[1]['votos'] = $datos_necesarios['acta']['total_votos_nulos'];\n $ar[1]['id_nro_lista'] = -2;\n $ar[1]['nombre'] = \"VOTOS NULOS\";\n \n $ar[2]['votos'] = $datos_necesarios['acta']['total_votos_recurridos'];\n $ar[2]['id_nro_lista'] = -3;\n $ar[2]['nombre'] = \"VOTOS RECURRIDOS\";\n\n //obtener los votos cargados, asociados a este acta\n $votos = $this->dep('datos')->tabla($datos_necesarios['tabla_voto'])->get_listado_votos($datos_necesarios['acta']['id_acta']);\n \n if(sizeof($votos) > 0){//existen votos cargados\n $ar = array_merge($votos, $ar);\n \n }\n else{//no existen votos cargados\n $listas = $this->dep('datos')->tabla($datos_necesarios['tabla_listas'])->get_listas_a_votar($datos_necesarios['acta']['id_acta']);\n \n if(sizeof($listas)>0)//Existen listas\n $ar = array_merge($listas, $ar); \n \n }\n \n return $ar;\n }\n }", "function get_data_form(){\n\n $IdTrabajo= $_REQUEST['IdTrabajo']; //Variable para el id del trabajo\n $NombreTrabajo = $_REQUEST['NombreTrabajo']; //Variable para el nombre del trabajo\n $FechaIniTrabajo = $_REQUEST['FechaIniTrabajo']; //Variable para la fecha de inicio del trabajo\n $FechaFinTrabajo = $_REQUEST['FechaFinTrabajo']; //Variable para la fecha de finalizacion del trabajo\n $PorcentajeNota = $_REQUEST['PorcentajeNota']; //Variable para el porcentaje de la nota\n $action = $_REQUEST['action']; //Variable action para la accion a realizar\n\n //crea un trabajo\n $TRABAJO = new TRABAJO_Model(\n $IdTrabajo,\n $NombreTrabajo,\n $FechaIniTrabajo,\n $FechaFinTrabajo,\n $PorcentajeNota);\n\n return $TRABAJO;\n }", "protected function generaCamposFormulario($datosIniciales)\r\n {\r\n $string= '<label>Reto:</label> <input type=\"text\" name=\"nombre\" />';\r\n $string.= '<label>Descripcion:</label> <textarea name=\"descripcion\" rows=\"10\" cols=\"40\"></textarea>';\r\n $string.= '<p><button type=\"submit\" name=\"registro\" value=\"\">Registrar</button></p>';\r\n return $string;\r\n }", "protected function generaCamposFormulario($datosIniciales)\n\t\t{\n\t\t\tif(empty($datosIniciales)){\n\t\t\t\t$html = '<fieldset>';\n\t\t\t\t$html.= '<legend>Rellene los datos para finalizar su compra: </legend>';\n\t\t\t\t$html.= '<p>Nombre: <input type=\"text\" name=\"nombre\" required>';\n\t\t\t\t$html.= ' Apellidos: <input type=\"text\" name=\"apellido\" required></p>';\n\t\t\t\t$html.= '<p>País: <input type=\"text\" name=\"pais\" required></p>';\n\t\t\t\t$html.= '<p>Dirección: <input type=\"text\" name=\"direccion\" required>';\n\t\t\t\t$html.=' Código postal: <input type=\"text\" name=\"cp\" required></p>';\n\t\t\t\t$html.= '<p>Localidad/Ciudad: <input type=\"text\" name=\"localidad\" required>';\n\t\t\t\t$html.= ' Provincia: <input type=\"text\" name=\"provincia\" required></p>';\n\t\t\t\t$html.= '<p>Teléfono: <input type=\"text\" name=\"telefono\" required></p>';\n\t\t\t\t$html.= '<p>Dirección de correo electrónico: <input type=\"text\" name=\"correo\" required></p>';\n\t\t\t\t$html.= '</fieldset>';\n\t\t\t\t$html .= '<div id=\"fc\"><fieldset>';\n\t\t\t\t$html.= '<legend> Rellene los datos de pago: </legend>';\n\t\t\t\t$html .='<p><input type=\"checkbox\" id=\"tipoV\" name=\"tipoT\" value=\"Visa\" >';\n\t\t\t\t$html .='<img src=\"img/visa.jpg\" class=\"visa\" style=\"width:8%; height:6%;\"/>';\n\t\t\t\t$html .='<input type=\"checkbox\" id=\"tipoMC\" name=\"tipoT\" value=\"MasterCard\" >';\n\t\t\t\t$html .='<img src=\"img/mastercard.png\" class=\"MasterCard\" style=\"width:5%; height:3%;\"/></p>';\n\t\t\t\t$html .='<p>Numero de tarjeta: <input type=\"text\" name=\"tarjeta\" required></p>';\n\t\t\t\t$html .='<p>Fecha de caducidad: <input type=\"text\" name=\"mesC\" required> / <input type=\"text\" name=\"añoC\" required> </p>';\n\t\t\t\t$html .='<p>CVV: <input type=\"text\" name=\"cvv\" required></p>';\n\t\t\t\t$html .='<?php echo \"La cantidad total a pagar es \"'. $_SESSION[\"totalCompra\"] .'\"€.\" ?>';\n\t\t\t\t$html.= '<p><input type=\"submit\" name=\"aceptar\" value=\"PAGAR\"></p>';\n\t\t\t $html.= '</fieldset></div>';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$html = '<fieldset>';\n\t\t\t\t$html.= '<legend> Rellene los datos para finalizar su compra: </legend>';\n\t\t\t\t$html.= '<p>Nombre: <input type=\"text\" name=\"nombre\" value=\"'.$datosIniciales['nombre'].'\" required>';\n\t\t\t\t$html.= ' Apellido: <input type=\"text\" name=\"apellido\" value=\"'.$datosIniciales['apellido'].'\" required></p>';\n\t\t\t\t$html.= '<p>País: <input type=\"text\" name=\"pais\" value=\"'.$datosIniciales['pais'].'\" required></p>';\n\t\t\t\t$html.= '<p>Dirección: <input type=\"text\" name=\"direccion\" value=\"'.$datosIniciales['direccion'].'\" required>';\n\t\t\t\t$html.=' Código postal: <input type=\"text\" name=\"cp\" value=\"'.$datosIniciales['cp'].'\" required></p>';\n\t\t\t\t$html.= '<p>Localidad/Ciudad: <input type=\"text\" name=\"localidad\" value=\"'.$datosIniciales['localidad'].'\" required>';\n\t\t\t\t$html.= ' Provincia: <input type=\"text\" name=\"provincia\" value=\"'.$datosIniciales['provincia'].'\" required></p>';\n\t\t\t\t$html.= '<p>Teléfono: <input type=\"text\" name=\"telefono\" value=\"'.$datosIniciales['telefono'].'\" required></p>';\n\t\t\t\t$html.= '<p>Dirección de correo electrónico: <input type=\"text\" name=\"correo\" value=\"'.$datosIniciales['correo'].'\" required></p>';\n\t\t\t $html.= '</fieldset>';\n\t\t\t\t$html .= '<div id=\"fc\"><fieldset>';\n\t\t\t\t$html.= '<legend> Rellene los datos de pago: </legend>';\n\t\t\t\t$html .='<p><input type=\"checkbox\" id=\"tipoV\" name=\"tipoT\" value=\"Visa\" >';\n\t\t\t\t$html .='<img src=\"img/visa.jpg\" class=\"visa\" style=\"width:8%; height:6%;\"/>';\n\t\t\t\t$html .='<input type=\"checkbox\" id=\"tipoMC\" name=\"tipoT\" value=\"MasterCard\" >';\n\t\t\t\t$html .='<img src=\"img/mastercard.png\" class=\"MasterCard\" style=\"width:5%; height:3%;\"/></p>';\n\t\t\t\t$html .='<p>Numero de tarjeta: <input type=\"text\" name=\"tarjeta\" required></p>';\n\t\t\t\t$html .='<p>Fecha de caducidad: <input type=\"text\" name=\"mesC\" required> / <input type=\"text\" name=\"añoC\" required> </p>';\n\t\t\t\t$html .='<p>CVV: <input type=\"text\" name=\"cvv\" required></p>';\n\t\t\t\t$html .='<?php echo \"La cantidad total a pagar es \"'. $_SESSION[\"totalCompra\"] .'\"€.\" ?>';\n\t\t\t\t$html.= '<p><input type=\"submit\" name=\"aceptar\" value=\"PAGAR\"></p>';\n\t\t\t $html.= '</fieldset></div>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}", "function muestraFormularioMetas(){\n $name = $titulo = $urlfolio = \"\";\n $folio = $random = 0;\n if($this->data['folio'] != \"\"){\n $tmp=explode('-',$this->data['folio']);\n if($this->opc == 9){\n $name=\"guardaAvance\";\n $arrayProyecto = $this->regresaDatosProyecto($tmp[0]);\n $folio = $tmp[0];\n $urlfolio=$this->data['folio'];\n $titulo=CAPTURAREPORTEDEMETAS;\n $random=rand(1,10000000);\n }\n else{\n $name=\"actualizaAvance\";\n $arrayProyecto = $this->regresaDatosProyecto($tmp[1]);\n $folio = $tmp[1];\n $urlfolio=$tmp[1].\"-\".$tmp[2];\n $random=$tmp[0];\n }\n $this->arrayNotificaciones = $this->notificaciones ();\n $titulo = $arrayProyecto['proyecto'];\n $resultados = $this->consultaActividades($this->pages->limit);\n $arrayDisabled = $this->recuperaPermisos($arrayProyecto['unidadResponsable_id'],$arrayProyecto['programa_id']); \n $trimestreId = $this->obtenTrimestre($arrayDisabled);\n $arrayUnidadOperativas=$this->catalogoUnidadesOperativas($this->db);\n\t\t\t$campoTrimestre=\"estatus_avance_entrega\";\n\t\t\tif($campoTrimestre > 1){\n\t\t\t\t$campoTrimestre=\"estatus_avance_entrega\".$campoTrimestre;\n\t\t\t}\n\t\t\t\n $this->buffer=\"\n <input type='hidden' name='noAtributos' id='noAtributos' value='\".( count($resultados) + 0).\"'>\n <input type='hidden' name='valueId' id='valueId' value='\".($this->arrayAvanceMetas['id'] + 0).\"'>\n <input type='hidden' name='folio' id='folio' value='\".$folio.\"'>\n <input type='hidden' name='random' id='random' value='\".$random.\"'>\n <input type='hidden' name='trimestreId' id='trimestreId' value='\".$trimestreId.\"'>\n <div class='panel panel-danger spancing'>\n <div class='panel-heading titulosBlanco'>\".$titulo.\"</div>\n <div class='panel-body'>\n <table align='center' border='0' class='table table-condensed'>\n <tr class='active alturaComponentesA'>\n <td class='tdleft' colspan='2' width='25%'>\".PROYECTO.\"</td>\n <td class='tdleft' colspan='2'>\".$arrayProyecto['proyecto'].\"</td>\n </tr>\n <tr class='alturaComponentesA'>\n <td class='tdleft' colspan='2' >\".UNIDADOPERATIVA.\"</td>\n <td class='tdleft' colspan='2'>\".$arrayUnidadOperativas[$arrayProyecto['unidadOperativaId']].\"</td>\n </tr>\n <tr class='alturaComponentesA'>\n <td class='tdleft' colspan='2' >\".TRIMESTRE.\"</td>\n <td class='tdleft' colspan='2'>\".$trimestreId.\"</td>\n </tr>\n \n </table>\n <table width='100%' class='table'>\n <tr>\n <td class='tdcenter fondotable' rowspan='2' width='30%'>\".ACTIVIDAD.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE1C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE2C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE3C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE4C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TOTAL.\"</td>\n <td class='tdcenter fondotable' rowspan='2' width='14%'>\".MEDIDA.\"</td>\n <td class='tdcenter fondotable' rowspan='2' width=' 8%'>\".ucfirst(substr(PONDERACION,0,4)).\"</td>\n <td class='tdcenter fondotable' rowspan='2' width=' 8%'>\".ucfirst(substr(TIPOACT,8,3)).\"</td>\n </tr>\n <tr>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n </tr>\";\n $contadorTab1=1;\n $contadorTab2=2;\n $contadorTab3=3;\n $contadorTab4=4; \n $contadorRen = $total = $totales = $rtotal = $rtotales = 0;\n $disabled_t1 = $disabled_t2 = $disabled_t3 = $disabled_t4 = \"\";\n $fondo_t1 = 'background-color:#ffff99;';\n $fondo_t2 = 'background-color:#ffff99;';\n $fondo_t3 = 'background-color:#ffff99;';\n $fondo_t4 = 'background-color:#ffff99;';\n if($arrayDisabled[1]['dis'] + 0 == 0){\n $disabled_t1=\" readonly ='true' \";\n $fondo_t1 = '';\n }\n if($arrayDisabled[2]['dis'] + 0 == 0){\n $disabled_t2=\" readonly ='true' \";\n $fondo_t2 = '';\n }\n if($arrayDisabled[3]['dis'] + 0 == 0){\n $disabled_t3=\" readonly ='true' \";\n $fondo_t3 = '';\n }\n if($arrayDisabled[4]['dis'] + 0 == 0){\n $disabled_t4=\" readonly ='true' \";\n $fondo_t4 = '';\n }\n $arrayEditable=array(1,3,4,6,7,8,9);\n \n foreach($resultados as $id => $resul){\n $rand = rand(1,99999999999999);\n $class=\"\";\n if($contador % 2 == 0)\n $class=\"active\";\n $campo=\"estatus_avance_entrega_t\".$trimestreId; \n $idEstatusActividad =$resul[$campo] ;\n $varTemporalId = $resul['id'].\"-\".$arrayProyecto['id'].\"-\".$trimestreId;\n $varTemporalIdE = $resul ['id'] . \"-\" . $arrayProyecto['id'].\"-\".$trimestreId.\"-\".$idEstatusActividad; \n $idact= $resul['id'];\n $totales = $totales + $this->arrayDatos[$idact][5] + 0;\n $tmp=\"\";\n \n if($resul['tipo_actividad_id'] != 0){\n $this->buffer.=\"\n <tr class=' $class alturaComponentesA'>\n <td class='tdleft' rowspan='2'>\".$resul['actividad'].\"</td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][1] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' tabindex='\".$contadorTab1.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab1.\"-1-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][1] + 0).\"' style='width:35px;$fondo_t1' \".$disabled_t1.\">\n </td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][2] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' \".$this->disabled.\" tabindex='\".$contadorTab2.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab2.\"-2-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][2] + 0).\"' style='width:35px;$fondo_t2' \".$disabled_t2.\"> \n </td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][3] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' \".$this->disabled.\" tabindex='\".$contadorTab3.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab3.\"-3-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][3] + 0).\"' style='width:35px;$fondo_t3' \".$disabled_t3.\">\n </td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][4] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' \".$this->disabled.\" tabindex='\".$contadorTab4.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab4.\"-4-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][4] + 0).\"' style='width:35px;$fondo_t4' \".$disabled_t4.\">\n </td>\n <td class='tdcenter' rowspan='2'>\n <span id='total\".$contadorRen.\"' class='totales'>\".number_format(($this->arrayDatos[$idact][1] + $this->arrayDatos[$idact][2] + $this->arrayDatos[$idact][3] + $this->arrayDatos[$idact][4] + 0),0,',','.').\"</span>\n </td>\n <td class='tdcenter' rowspan='2'>\n <span id='rtotal\".$contadorRen.\"' class='totales'>\".number_format($this->arrayAvanceMetas[$idact][1] + $this->arrayAvanceMetas[$idact][2] + $this->arrayAvanceMetas[$idact][3] +$this->arrayAvanceMetas[$idact][4],0,',','.').\"</span>\n </td>\n <td class='tdcenter'>\".$resul['medida'].\"</td>\n <td class='tdcenter'>\".$resul['ponderacion'].\"</td>\n <td class='tdcenter'>\".$resul['tipo_actividad_id'].\"</td>\n </tr>\n <tr>\n <td colspan='8' class='tdleft $class'>\".$this->regresaUltimoComentario($arrayProyecto['id'],$resul['id']).\"<br>\".$this->regresaNoAdjuntos($arrayProyecto['id'],$resul['id']).\"<span id='avance'></span></td>\";\n $rtotales = $rtotales + $this->arrayAvanceMetas[$idact][5]; \n if($this->session['rol'] == 1 || $this->session['rol'] >=3){\n $this->buffer.=\"<td class='tdcenter $class' colspan='3'>\"; \n if($this->session['rol'] == 1 || $this->session['rol'] >=4){\n $classb=\"mComentariosConsulta\";\n if(in_array($arrayProyecto[$campoTrimestre],$arrayEditable)){\n $classb=\"mComentarios\";\n }\n $this->buffer.=\"<button type='button' class='btn btn-success btn-sm $classb' id='\".$resul['proyecto_id'].\"-\".$resul['id'].\"-\".$trimestreId.\"'><span class='glyphicon glyphicon-pencil'></span>&nbsp;&nbsp;Comentarios</button>\";\n }\n if($this->session['rol'] >=3){\n $this->buffer.=\"<button type='button' class='btn btn-warning btn-sm masFile' id='m-\".$resul['proyecto_id'].\"-\".$resul['id'].\"-\".$trimestreId.\"'>&nbsp;&nbsp;M&aacute;s</button>\";\n }\n $this->buffer.=\"</td>\";\n }\n if($this->session['rol'] == 2){\n $this->buffer.=\"\n <td class='tdcenter $class'><button type='button' class='btn btn-success btn-sm mComentariosConsulta' id='\".$resul['proyecto_id'].\"-\".$resul['id'].\"-\".$trimestreId.\"'><span class='glyphicon glyphicon-pencil'></span>&nbsp;&nbsp;Comentarios</button></td>\n <td class='tdcenter $class'>\n <button type='button' class='btn btn-default aprobadosavances' data-toggle='tooltip' data-placement='bottom'\n title='\".PROYECTOAPROBADO.\"' id='aaa-\".$varTemporalIdE.\"'><span class='glyphicon glyphicon-ok'></span>\n </button>\n </td>\n <td class='tdcenter $class'>\n <button type='button' class='btn btn-default noaprobadosavances' data-toggle='tooltip' data-placement='bottom'\n title='\".PROYECTONOAPROBADO.\"' id='ann-\".$varTemporalIdE.\"'><span class='glyphicon glyphicon-remove'></span>\n </button></td>\";\n }\n \n \n $this->buffer.=\"</tr><tr><td colspan='11'>&nbsp;</td>\";\n if( ($idEstatusActividad!= 3) && ($idEstatusActividad!= 6) && ($idEstatusActividad!= 9)){\n $this->buffer .= \"<td class='tdleft' colspan='3' id='v-\".$varTemporalIdE.\"' style='background-color:\" . $this->arrayNotificaciones [$idEstatusActividad] ['color'] . \";color:#000000;'>\" . $this->arrayNotificaciones [$idEstatusActividad] ['nom'] . \"</td>\";\n }\n else{\n $this->buffer .= \"<td class='tdleft verComentariosNoAprobados' colspan='3' id='v-\".$varTemporalIdE.\"' style='cursor:pointer;background-color:\" . $this->arrayNotificaciones [$idEstatusActividad] ['color'] . \";color:#000000;' data-toggle='tooltip' data-placement='bottom' title='\" . TOOLTIPMUESTRACOMENTARIOS . \"'>\" . $this->arrayNotificaciones [$idEstatusActividad] ['nom'] . \"</td>\";\n }\n $this->buffer .= \"</tr>\";\n $contadorTab1 = $contadorTab1 + 4;\n $contadorTab2 = $contadorTab2 + 4;\n $contadorTab3 = $contadorTab3 + 4;\n $contadorTab4 = $contadorTab4 + 4;\n $contadorRen++;\n $contador++;\n }\n }\n $contadorTab4++;\n \n /*$this->buffer.=\"<tr><td colspan='8'></td>\n <td class='tdleft'>Total:</td><td class='tdcenter'><span id='totales' class='totales'>\".($totales + 0).\"</span></td>\n <td class='tdcenter'><span id='rtotales' class='totales'>\".($rtotales + 0).\"</span></td>\n <td colspan='3'>&nbsp;</td></tr></table>*/\n $this->buffer.=\"</table>\n </div>\n <div class=\\\"central\\\"><br>\"; \n if( (in_array($arrayProyecto[$campoTrimestre],$arrayEditable)) or ($this->session['rol']<=2 or $this->session['rol']<=5) ){\n \n $this->buffer.=\"<button type='button' tabindex='\".$contadorTab4.\"' class='btn btn-success btn-sm' id='\".$name.\"' name='\".$name.\"'><span class='glyphicon glyphicon-floppy-saved'></span>&nbsp;\".AGREGAREPORTEMETA.\"</button>&nbsp;&nbsp;\";\n }\n $this->buffer.=\"<button type='button' class='btn btn-primary btn-sm'\n onclick=\\\"location='\".$this->path.\"aplicacion.php?aplicacion=\".$this->session ['aplicacion'].\"&apli_com=\".$this->session ['apli_com'].\"&opc=0'\\\">\".REGRESA.\"</button>\n </div>\".$this->procesando(4).\"<br></div>\";\n }else{\n header(\"Location: \".$this->path.\"aplicacion.php?aplicacion=\".$this->session ['aplicacion'].\"&apli_com=\".$this->session ['apli_com'].\"&opc=1\");\n } \n }", "private function viewFormulario()\n {\n if (count($camposDefinidos = array_map('trim', explode(';', $this->camposForm))) > 0) {\n $campo_formulario = File::get(base_path($this->templates['campo']));\n $form = File::get(base_path($this->templates['form']));\n $stringCampos = \"\";\n foreach ($camposDefinidos as $c) {\n if (count($c_ = array_map('trim', explode(':', $c))) == 2) {\n $stringCampos .= $campo_formulario;\n $stringCampos = str_replace('[{campo}]', $c_[0], $stringCampos);\n $stringCampos = str_replace('[{label}]', $c_[1], $stringCampos);\n $stringCampos = str_replace('[{tabela}]', $this->tabela, $stringCampos);\n } else {\n echo \"#FORMULARIO# Campo {$c} ignorado, por nao estar descrito corretamente... forma correta -> campo:label\\n\";\n }\n }\n\n $form = str_replace('[{campos_formulario}]', $stringCampos, $form);\n $form = str_replace('[{route_as}]', $this->routeAs, $form);\n $form = str_replace('[{tabela}]', $this->tabela, $form);\n File::put(base_path('resources/views/' . $this->tabela . \"/form.blade.php\"), $form);\n }\n }", "protected function createFormFields() {\n\t}", "function asignar_valores(){\n $this->nombre=$_POST['nombre'];\n $this->prioridad=$_POST['prioridad'];\n $this->etiqueta=$_POST['etiqueta'];\n $this->descripcion=$_POST['descripcion'];\n $this->claves=$_POST['claves'];\n $this->tipo=$_POST['tipo'];\n }", "public function getFormName();", "public function getFormName();", "public function campo($nombre) {}", "public static function form_fields(){\n\n \treturn [\n [\n \t'id'=> 'description',\n \t'name'=> 'description', \n \t'desc'=> 'Description', \n \t'val'=>\tnull, \n \t'type'=> 'text',\n \t'maxlength'=> 255,\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'rate',\n \t'name'=> 'rate', \n \t'desc'=> 'Discount Rate', \n \t'val'=>\tnull, \n \t'type'=> 'number',\n \t'min'=> 0,\n \t'max'=> 100,\n \t'step'=> '0.01',\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'stat',\n \t'name'=> 'stat', \n \t'desc'=> 'isActive', \n \t'val'=>1, \n \t'type'=> 'checkbox',\n ],\n ];\n\n }", "public function __construct($name = null) {\n parent::__construct('about');\n\n $this->add(array(\n 'name' => 'id',\n 'type' => 'Hidden',\n ));\n $this->add(array(\n 'name' => 'name',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Наименование предприятия',\n ),\n 'attributes' => array(\n 'class' => 'form-control',\n 'id' => 'name',\n 'placeholder' => 'Наименование предприятия',\n ),\n ));\n \n $this->add(array(\n 'name' => 'tel',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Телефон',\n ),\n 'attributes' => array(\n 'class' => 'form-control',\n 'placeholder' => 'Контактный номер телефона',\n ),\n ));\n \n $this->add(array(\n 'name' => 'address',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Адрес',\n ),\n 'attributes' => array(\n 'class' => 'form-control',\n 'placeholder' => 'Адрес',\n ),\n ));\n \n $this->add(array(\n 'name' => 'current_account',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'РАСЧЕТНЫЙ СЧЕТ',\n ),\n 'attributes' => array(\n 'class' => 'form-control',\n 'placeholder' => 'РАСЧЕТНЫЙ СЧЕТ',\n ),\n ));\n \n $this->add(array(\n 'name' => 'unp',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'УНП',\n ),\n 'attributes' => array(\n 'class' => 'form-control',\n 'placeholder' => 'УНП',\n ),\n ));\n $this->add(array(\n 'name' => 'bank_info',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Информация о банке',\n ),\n 'attributes' => array(\n 'class' => 'form-control',\n 'placeholder' => 'Информация о банке',\n ),\n ));\n \n $this->add(array(\n 'name' => 'okpo',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'ОКПО',\n ),\n 'attributes' => array(\n 'class' => 'form-control',\n 'placeholder' => 'ОКПО',\n ),\n ));\n \n $this->add(array(\n 'name' => 'director',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Директор',\n ),\n 'attributes' => array(\n 'class' => 'form-control',\n 'placeholder' => 'ФИО',\n ),\n ));\n \n $this->add(array(\n 'name' => 'email',\n 'type' => 'Email',\n 'options' => array(\n 'label' => 'Email',\n ),\n 'attributes' => array(\n 'class' => 'form-control',\n 'placeholder' => 'Электронный адрес',\n ),\n ));\n \n $this->add(array(\n 'name' => 'description',\n 'type' => 'Zend\\Form\\Element\\Textarea',\n 'options' => array(\n 'label' => 'О предприятии',\n ),\n 'attributes' => array(\n 'class' => 'form-control',\n 'placeholder' => 'О предприятии',\n ),\n ));\n \n $this->add(array(\n 'name' => 'submit',\n 'type' => 'Submit',\n 'attributes' => array(\n 'value' => 'Сохранить',\n 'id' => 'submitbutton',\n ),\n 'attributes' => array(\n 'class' => 'btn btn-danger',\n ),\n ));\n }", "function os2forms_nemid_form_builder_webform_form_builder_types_nemid_com_name($key, $label) {\n $fields = array();\n\n $fields[$key] = array(\n 'title' => t('NemID @label', array('@label' => $label)),\n 'weight' => -20,\n );\n $component['name'] = t('New NemID @label', array('@label' => $label));\n $fields[$key]['default'] = _form_builder_webform_default($key, array(), $component);\n\n return $fields;\n}", "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 createFieldForm($arrLang)\n{\n\n $arrFields = array(\"conference_name\" => array(\"LABEL\" => $arrLang['Conference Name'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:300px;\"),\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"conference_owner\" => array(\"LABEL\" => $arrLang['Conference Owner'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"conference_number\" => array(\"LABEL\" => $arrLang['Conference Number'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"moderator_pin\" => array(\"LABEL\" => $arrLang['Moderator PIN'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"moderator_options_1\" => array(\"LABEL\" => $arrLang['Moderator Options'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"moderator_options_2\" => array(\"LABEL\" => \"\",\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_pin\" => array(\"LABEL\" => $arrLang['User PIN'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_options_1\" => array(\"LABEL\" => $arrLang['User Options'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_options_2\" => array(\"LABEL\" => \"\",\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_options_3\" => array(\"LABEL\" => \"\",\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"start_time\" => array(\"LABEL\" => $arrLang['Start Time (PST/PDT)'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"DATE\",\n \"INPUT_EXTRA_PARAM\" => array(\"TIME\" => true, \"FORMAT\" => \"%Y-%m-%d %H:%M\",\"TIMEFORMAT\" => \"12\"),\n \"VALIDATION_TYPE\" => \"ereg\",\n \"VALIDATION_EXTRA_PARAM\" => \"^(([1-2][0,9][0-9][0-9])-((0[1-9])|(1[0-2]))-((0[1-9])|([1-2][0-9])|(3[0-1]))) (([0-1][0-9]|2[0-3]):[0-5][0-9])$\"),\n \"duration\" => array(\"LABEL\" => $arrLang['Duration (HH:MM)'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:20px;text-align:center\",\"maxlength\" =>\"2\"),\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"duration_min\" => array(\"LABEL\" => $arrLang['Duration (HH:MM)'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:20px;text-align:center\",\"maxlength\" =>\"2\"),\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n/*\n \"recurs\" => array(\"LABEL\" => $arrLang['Recurs'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"reoccurs_period\" => array(\"LABEL\" => $arrLang[\"Reoccurs\"],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"SELECT\",\n \"INPUT_EXTRA_PARAM\" => $arrReoccurs_period,\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\",\n \"EDITABLE\" => \"no\",\n \"SIZE\" => \"1\"),\n \"reoccurs_days\" => array(\"LABEL\" => $arrLang[\"for\"],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"SELECT\",\n \"INPUT_EXTRA_PARAM\" => $arrReoccurs_days,\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\",\n \"EDITABLE\" => \"no\",\n \"SIZE\" => \"1\"),\n*/\n \"max_participants\" => array(\"LABEL\" => $arrLang['Max Participants'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:50px;\"),\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n );\n return $arrFields;\n}", "function acf_get_form_data($name = '')\n{\n}", "function chargeForm($form,$label,$titre){\n\n \t\t$liste = $this->getAll();\n \t\t$array[0] = \"\";\n \t\tfor ($i = 0; $i < count($liste); $i++)\n \t{\n \t\t$j = $liste[$i]->role_id;\n \t\t$array[$j] = $liste[$i]->role_name;\n \t\t//echo 'array['.$j.'] = '.$array[$j].'<br>';\n \t}\n \t\t$s = & $form->createElement('select',$label,$titre);\n \t\t$s->loadArray($array);\n \t\treturn $s;\n \t}", "function campos_formulario( $fields) {\n\n //Variables necesarias básicas como que el email es obligatorio\n $commenter = wp_get_current_commenter();\n $req = get_option( 'require_name_email' );\n\t$aria_req = ( $req ? \" aria-required='true'\" : '' );\n\t\n // campos por defecto del formulario que vamos a introducir con nuestros cambios\n $fields = array(\n\t\t\n // NOMBRE\n 'author' =>\n\t'<input id=\"author\" placeholder=\"Nombre\" \n\tclass=\"nombre\" name=\"author\" type=\"text\" value=\"' . esc_attr( $commenter['comment_author'] ) . \n\t'\" size=\"30\"' . $aria_req . ' />',\n\n // EMAIL\n 'email' =>\n\t'<input id=\"email\" placeholder=\"Email\" \n\tclass=\"email\" name=\"email\" type=\"email\" value=\"' . esc_attr( $commenter['comment_author_email'] ) . '\" size=\"30\"' . $aria_req . ' />',\n\t);\n\t\n\treturn $fields;\n }", "function recuperar_datos() {\n\t\tglobal $nombre, $tipo ;\n\t\t\n\t\t\t$pers_id =(isset($_POST['id_marcas']) && !empty($_POST['id_marcas']))? $_POST['id_marcas']:\"\";\n\t\t\t$tipo =(isset($_POST['tipo']) && !empty($_POST['tipo']))? $_POST['tipo']:\"A\"; \t\n\n\t\t\t$nombre=(isset($_POST[\"nombre\"]) && !empty($_POST[\"nombre\"]))? $_POST[\"nombre\"]:\"\";\t\t\t\n\t\n\t\t}", "public function getInputFor($nome);", "abstract protected function getFormTypeParams();", "protected function addFormFieldNamesToViewHelperVariableContainer() {}", "protected function procesaFormulario($datos)\n {\n\n $result = array();\n $app = Aplicacion::getSingleton();\n \n $id = $datos['id'] ?? null;\n\n $title = $datos['title'] ?? null;\n if ( empty($title) ) {\n $result['title'] = \"El nombre de la película no puede quedar vacío.\";\n }\n\n $date_released = $datos['date_released'] ?? null;\n if ( empty($date_released) ) {\n $result['date_released'] = \"La fecha no puede quedar vacía.\";\n }\n\n $duration = $datos['duration'] ?? null;\n if (!is_numeric($duration)) {\n $result['duration'] = \"La duración debe ser un número\";\n } else if ( empty($duration) || $duration < 0 ) {\n $result['duration'] = \"La película debe tener una duración positiva\";\n }\n\n $country = $datos['country'] ?? null;\n if ( empty($country)) {\n $result['country'] = \"El país no puede quedar vacío\";\n }\n\n $plot = $datos['plot'] ?? null;\n if ( empty($plot)) {\n $result['plot'] = \"La película debe tener una trama\";\n }\n\n $link = $datos['link'] ?? null;\n $price = $datos['price'] ?? null;\n if (empty($link) && !empty($price)) {\n $result['link'] = \"Has añadido el precio, pero no el link. Añádelo\";\n } else if (!empty($link) && empty($price)) {\n $result['price'] = \"Has añadido el link, pero no el precio. Añádelo\";\n } else if (!empty($link) && !empty($price)) {\n if (!is_numeric($price)) {\n $result['price'] = \"El precio debe ser un número\";\n }else if ( $price < 2 ) {\n $result['price'] = \"El precio debe ser mayor que 0\";\n }\n }\n\n $image = $datos['image'] ?? null;\n $dir_subida = './img/peliculas/';\n $fichero_subido = $dir_subida . basename($_FILES['image']['name']);\n if (!move_uploaded_file($_FILES['image']['tmp_name'], $fichero_subido) && !empty($_FILES['image']['name'])) {\n $result['image'] = $_FILES['image']['name'].\"El fichero no se ha podido subir correctamente\";\n }\n\n $genres = $datos['genres'] ?? null;\n\n $actors = $datos['actors'] ?? null;\n\n $directors = $datos['directors'] ?? null;\n \n $prevPage = $datos['prevPage'] ?? null;\n\n if (count($result) === 0) {\n if ($app->usuarioLogueado() && ($app->esGestor() || $app->esAdmin())) {\n $pelicula = Pelicula::editar($id, $title, $_FILES['image']['name'], $date_released, $duration, $country, $plot, $link, $price);\n\n Pelicula::actualizarGeneros($pelicula, $genres);\n\n Pelicula::actualizarActoresDirectores($pelicula, $actors, $directors);\n if ( ! $pelicula ) {\n $result[] = \"La película ya existe\";\n } else {\n $result = \"{$prevPage}\";\n }\n }\n }\n return $result;\n }", "private function IndexValidacionFormulario() {\n\t\t\t$Val = new NeuralJQueryFormularioValidacion(true, true, false);\n\t\t\t$Val->Requerido('AVISO', 'Debe Ingresar el Número del Aviso');\n\t\t\t$Val->Numero('AVISO', 'El Aviso debe Ser Numérico');\n\t\t\t$Val->CantMaxCaracteres('AVISO', 10, 'Debe ingresar aviso con 10 Números');\n\t\t\t$Val->Requerido('PRIORIDAD', 'Debe Seleccionar una Opción');\n\t\t\t$Val->Requerido('RAZON', 'Debe Seleccionar una Opción');\n\t\t\t$Val->Requerido('REGIONAL[]', 'Seleccione la Regional a Reportar');\n\t\t\t$Val->Requerido('NODO', 'Debe ingresar el Nodo al que pertenece la Matriz');\n\t\t\t$Val->Requerido('HORAFIN', 'Defina la fecha-hora que termina el Aviso');\n\t\t\t$Val->Requerido('MATRIZ', 'Debe informar el Número de la Matriz');\n\t\t\t$Val->ControlEnvio('peticionAjax(\"FormularioGuion\", \"Respuesta\");');\n\t\t\treturn $Val->Constructor('FormularioGuion');\n\t\t}", "public function getAcroFormFieldNamesToTemplateNodes() {}", "public function createForm();", "public function createForm();", "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 }", "public static function getFormComponents(): array {\n return [\n 'title' => ['attr' => ['required' => true, 'maxlength' => AppConstants::INDEXED_STRINGS_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'status' => ['type' => 'translated', 'attr' => ['required' => true, 'maxlength' => AppConstants::INDEXED_STRINGS_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'startDate' => ['type' => 'date', 'attr' => ['required' => true]],\n 'endDate' => ['type' => 'date', 'attr' => ['required' => true]],\n 'price' => ['attr' => ['max' => AppConstants::SMALL_INTEGER_MAXIMUM_VALUE]],\n 'type' => ['type' => 'translated', 'attr' => ['max' => AppConstants::SMALL_INTEGER_MAXIMUM_VALUE]],\n // 'major_id' => ['type'=>'reference','attr' => ['maxlength' => AppConstants::STRINGS_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'requiredNumberOfUsers' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'appliedUsersCount' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'language' => ['details-type' => 'multi-data'],\n 'location' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'workHoursCount' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'willTakeCertificate' => ['type' => 'boolean', 'attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n // 'major' => [\n // 'type' => 'reference',\n // 'reference' => 'major.name',\n // 'displayColumn' => 'major.name',\n // ],\n 'company' => [\n 'type' => 'reference',\n 'reference' => 'company.name',\n 'displayColumn' => 'company.name',\n ],\n 'requiredNumberOfUsers' => ['attr' => ['max' => AppConstants::SMALL_INTEGER_MAXIMUM_VALUE]],\n 'briefDescription' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'fullDescription' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'majors' => ['details-type' => 'multi-data-majors'],\n\n ];\n }", "function mostrarFormulario(){\n\n echo \"<br><br>\";\n echo \"<h2>FORMULARIO PARA ALUMNOS</h2>\"; \n?>\n\n <form method=\"post\" action=\"<?php echo htmlspecialchars($_SERVER[\"PHP_SELF\"]);?>\">\n Matricula: <input type=\"text\" name=\"matricula\" value=\"<?php echo $this->matricula;?>\">\n <br><br>\n Nombre: <input type=\"text\" name=\"nombree\" value=\"<?php echo $this->nombre;?>\">\n <br><br>\n Carrera: <input type=\"text\" name=\"carreraa\" value=\"<?php echo $this->carrera;?>\">\n <br><br>\n <span class=\"error\">* <?php echo $this->nameErr;?></span>\n <br><br>\n E-mail: <input type=\"text\" name=\"email\" value=\"<?php echo $this->email;?>\">\n <span class=\"error\">* <?php echo $this->emailErr;?></span>\n <br><br>\n Telefono: <input type=\"tel\" name=\"telefonoo\"value=\"<?php echo $this->telefono;?>\">\n <br><br>\n <input type=\"submit\" name=\"submitt\" value=\"Submit\">\n </form>\n\n<?php\n }", "abstract function form();", "public function loadForm() {\n foreach ($this->Fields as $key => $item) {\n if($item['function'] && $this->FormMode == \"add\") {\n $fn = str_replace('$1', $_POST[$key], $item['function']);\n $this->$key = eval($fn);\n } else\n if($_POST[$key] !== null) {\n $this->$key = $_POST[$key];\n }\n }\n }", "protected function addNameToView($view) {\n // Pokud je name nastaveno ve form data, vezme se z nich\n $view->name = arr::get($this->form_data, 'name', '');\n\n //Pokud je name stale prazdne, zkusime ho nacit z modelu pomoci preview()\n //select ocekavam na atributu, ktery odpovida nazvu ciziho klice - tedy\n //[object]id\n $relobject = $this->virtual\n ? $this->config['relobject']\n : substr($this->attr, 0, -2);\n\n //pokud ma byt umozneno pridat relacni zaznam v ramci tohoto form. prvku\n //tak se zobrazi tlacitko pro to\n $view->new = arr::get($this->config, 'new', '');\n $view->new_label = arr::get($this->config, 'new_label', __($relobject.'.new_'.$relobject));\n\n //nazvy atributu musi vzdy jit pres metodu itemAttr rodicovske tridy Form\n $view->name_attr = $this->form->itemAttr($this->attr.'[name]');\n $view->value_attr = $this->form->itemAttr($this->attr.'[value]');\n\n // Pokud je specifikovano preview pro tento formItem, pouzijeme ho\n $preview = arr::get($this->config, 'preview', '');\n // A prelozime ho, jinak se pouzije defaultni preview modelu - viz ORM::preview()\n $preview = $preview != '' ? __($preview) : NULL;\n\n if ($this->virtual)\n {\n $relobject = ORM::factory($relobject, arr::get($this->form_data, 'value'));\n\n $view->name = $relobject->preview();\n }\n else\n {\n if ($this->model->{$relobject}->loaded())\n {\n $view->name = $this->model->{$relobject}->preview($preview);\n }\n //pokud neni relacni zaznam podle hodnoty PK nalezen, tak uz neexistuje\n //a do prvku se musi propsat prazdna hodnota\n else\n {\n $view->name = $view->value = NULL;\n }\n }\n\n // Pokud je name stale prazdne, vlozime watermark, pokud je specifikovan\n if (empty($view->name) and ($watermark = arr::get($this->config, 'watermark', '')) != '') {\n $view->name = $watermark;\n $view->watermark = TRUE; // rika ze se ma inputu pridat class watermark\n }\n $view->input_class = arr::get($this->config, 'input_class', 'input-block-level');\n }", "public function getFormFields() {\n $fields = array(\n 'shapes[]' => array(\n 'type' => 'select',\n 'multiplicate' => '5',\n 'values' => array(\n '-' => '-',\n 'cube' => 'cube',\n 'round' => 'round',\n )\n ),\n 'width[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Width'\n ),\n 'higth[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Higth'\n ),\n 'x_position[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'X position'\n ),\n 'y_position[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Y position'\n ),\n 'red[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color red',\n ),\n 'green[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color green',\n ),\n 'blue[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color blue',\n ),\n 'size[]' => array(\n 'type' => 'text',\n 'multiplicate' => '1',\n 'label' => 'Size holst'\n ),\n 'enable[]' => array(\n 'type' => 'checkbox',\n 'multiplicate' => '5',\n 'label' => 'enable'\n )\n );\n return $fields;\n }", "public function populateForm() {}", "abstract public function createForm();", "abstract public function createForm();", "protected function generaCamposFormulario($datosIniciales){\n \t$html = '<div class=\"form\">';\n \t$html .= '<p>¿Cuál es su nombre?</p>';\n \t$html .= '<input type=\"text\" name=\"name\" placeholder=\"Nombre\">';\n $html .= '<p>¿Cuál es la fecha de nacimiento?</p>';\n $html .= '<input type=\"date\" name=\"birthDate\" placeholder=\"Fecha de nacimiento\">';\n \t$html .= '<button type=\"submit\" name=\"pd-insert\">Insertar</button>';\n \t$html .= '</div>';\n \treturn $html;\n }", "function nombrecampo($numcampo){return mysqli_field_name($this->Consulta_ID, $numcampo);}", "function get_data_form(){\n\n\n\t$IdGrupo = '';\n\t$IdFuncionalidad = '';\n\t$IdAccion = '';\n\t$NombreGrupo = '';\n\t$NombreFuncionalidad = '';\n\t$NombreAccion = '';\n\t$action = '';\n\n\tif(isset($_REQUEST['IdGrupo'])){\n\t$IdGrupo = $_REQUEST['IdGrupo'];\n\t}\n\tif(isset($_REQUEST['IdFuncionalidad'])){\n\t$IdFuncionalidad = $_REQUEST['IdFuncionalidad'];\n\t}\n\tif(isset($_REQUEST['IdAccion'])){\n\t$IdAccion = $_REQUEST['IdAccion'];\n\t}\n\tif(isset($_REQUEST['action'])){\n\t$action = $_REQUEST['action'];\n\t}\n\tif(isset($_REQUEST['NombreGrupo'])){\n\t$NombreGrupo = $_REQUEST['NombreGrupo'];\n\t}\n\tif(isset($_REQUEST['NombreFuncionalidad'])){\n\t$NombreFuncionalidad = $_REQUEST['NombreFuncionalidad'];\n\t}\n\tif(isset($_REQUEST['NombreAccion'])){\n\t$NombreAccion = $_REQUEST['NombreAccion'];\n\t}\n\n\t$PERMISOS = new PERMISO_Model(\n\t\t$IdGrupo, \n\t\t$IdFuncionalidad, \n\t\t$IdAccion,\n\t\t$NombreGrupo,\n\t\t$NombreFuncionalidad,\n\t\t$NombreAccion);\n\n\treturn $PERMISOS;\n}", "abstract public function getFormDesc();", "public function valiteForm();", "function asignar_valores(){\n\t\t$this->codigo=$_POST['codigo'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->marca=$_POST['marca'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->categoria=$_POST['categoria'];\n\t\t$this->hotel=$_POST['hoteles'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->lugar=$_POST['lugar'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->detal=$_POST['detal'];\n\t\t$this->mayor=$_POST['mayor'];\n\t\t$this->limite=$_POST['limite'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->segmento=$_POST['segmento'];\n\t\t$this->principal=$_POST['principal'];\n\t\t\n\t\t\n\t}", "abstract function getForm();", "function get_fields($name_suffix='',$title='',$description='',$enabled=1,$cost=NULL,$one_per_member=0)\n\t{\n\t\trequire_lang('points');\n\t\t$fields=new ocp_tempcode();\n\t\t$fields->attach(form_input_line(do_lang_tempcode('TITLE'),do_lang_tempcode('DESCRIPTION_TITLE'),'custom_title'.$name_suffix,$title,true));\n\t\t$fields->attach(form_input_text(do_lang_tempcode('DESCRIPTION'),do_lang_tempcode('DESCRIPTION_DESCRIPTION'),'custom_description'.$name_suffix,$description,true));\n\t\t$fields->attach(form_input_integer(do_lang_tempcode('COST'),do_lang_tempcode('HOW_MUCH_THIS_COSTS'),'custom_cost'.$name_suffix,$cost,true));\n\t\t$fields->attach(form_input_tick(do_lang_tempcode('ONE_PER_MEMBER'),do_lang_tempcode('DESCRIPTION_ONE_PER_MEMBER'),'custom_one_per_member'.$name_suffix,$one_per_member==1));\n\t\t$fields->attach(form_input_tick(do_lang_tempcode('ENABLED'),'','custom_enabled'.$name_suffix,$enabled==1));\n\t\treturn $fields;\n\t}", "function ToonFormulierAfspraak()\n{\n\n}", "public function getFieldInstanceByName($name)\n\t{\n\t\t$moduleName = $this->getModule()->getName(true);\n\t\t$fieldsLabel = $this->getEditFields();\n\t\t$params = ['uitype' => 1, 'column' => $name, 'name' => $name, 'label' => $fieldsLabel[$name], 'displaytype' => 1, 'typeofdata' => 'V~M', 'presence' => 0, 'isEditableReadOnly' => false];\n\t\tswitch ($name) {\n\t\t\tcase 'crmid':\n\t\t\t\t$params['uitype'] = 10;\n\t\t\t\t$params['referenceList'] = ['Contacts'];\n\t\t\t\tbreak;\n\t\t\tcase 'istorage':\n\t\t\t\t$params['uitype'] = 10;\n\t\t\t\t$params['referenceList'] = ['IStorages'];\n\t\t\t\t$params['typeofdata'] = 'V~O';\n\t\t\t\tbreak;\n\t\t\tcase 'status':\n\t\t\t\t$params['uitype'] = 16;\n\t\t\t\t$params['picklistValues'] = [1 => \\App\\Language::translate('PLL_ACTIVE', $moduleName), 0 => \\App\\Language::translate('PLL_INACTIVE', $moduleName)];\n\t\t\t\tbreak;\n\t\t\tcase 'server_id':\n\t\t\t\t$servers = Settings_WebserviceApps_Module_Model::getActiveServers($this->getModule()->typeApi);\n\t\t\t\t$params['uitype'] = 16;\n\t\t\t\tforeach ($servers as $key => $value) {\n\t\t\t\t\t$params['picklistValues'][$key] = $value['name'];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'type':\n\t\t\t\t$params['uitype'] = 16;\n\t\t\t\t$params['picklistValues'] = [];\n\t\t\t\tforeach ($this->getTypeValues() as $key => $value) {\n\t\t\t\t\t$params['picklistValues'][$key] = \\App\\Language::translate($value, $moduleName);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'language':\n\t\t\t\t$params['typeofdata'] = 'V~O';\n\t\t\t\t$params['uitype'] = 32;\n\t\t\t\t$params['picklistValues'] = \\App\\Language::getAll();\n\t\t\t\tbreak;\n\t\t\tcase 'user_id':\n\t\t\t\t$params['uitype'] = 16;\n\t\t\t\t$params['picklistValues'] = \\App\\Fields\\Owner::getInstance($moduleName)->getAccessibleUsers('', 'owner');\n\t\t\t\tbreak;\n\t\t\tcase 'password_t':\n\t\t\t\t$params['typeofdata'] = 'P~M';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn Settings_Vtiger_Field_Model::init($moduleName, $params);\n\t}", "public function GruporModelo()\n\t\t{\n\t\t\t$id = \"\";\n\t\t\t$numero = \"\";\n\t\t\t$franja = \"\";\n\t\t}", "function _reglas()\n\t{\n\t\t$reglas[] = array('field' => 'titulo', 'label' => 'lang:field_titulo', 'rules' => 'trim|required|max_length[100]');\n\t\t\n\t\t\t$reglas[] = array('field' => 'has_category', 'label' => 'lang:field_has_category', 'rules' => 'callback_has_categorys');\n\t\t\n\t\t\n\t\treturn $reglas;\n\t}", "function formelement($form,$lable,$name,$value,$type,$cattype=0,$tables=0,$opt=0,$mult=0){\n\tswitch ($type){\n\t\tcase 'hidden':\n\t\t\t$form->hiddenfield($name,$value);\n\t\tbreak;\n\t\tcase 'image':\n\t\t\tfor($i=0; $i<sizeof($tables); $i++){\n\t\t\t\tif($tables[$i]['table'] == $cattype) $n = $i;\n\t\t\t}\n\t\t\tif(isset($tables[$n]['imageproperties'])){\n\t\t\t\t$form->hiddenfield(\"imageproperties[$name][width]\",$tables[$n]['imageproperties'][\"$name\"]['width']);\n\t\t\t\t$form->hiddenfield(\"imageproperties[$name][height]\",$tables[$n]['imageproperties'][\"$name\"]['height']);\n\t\t\t\t$form->hiddenfield(\"imageproperties[$name][frame]\",$tables[$n]['imageproperties'][\"$name\"]['frame']);\n\t\t\t\t$note = \"Image will be cropped and resized to \".$tables[$n]['imageproperties'][\"$name\"]['width'].\" x \".$tables[$n]['imageproperties'][\"$name\"]['height'].\"\";\n\t\t\t}\n\t\t\t$form->hiddenfield('filelocation',$cattype);\n\t\t\t$imagename = $_GET['pg'].\"_\".$_GET['id'].\"_lg.jpg\";\n\t\t\t$form->filefield($lable,$name,'',$_GET['pg'],$_GET['id'],'image',$note);\n\t\t\tbreak;\n\t\tcase 'file':\n\t\t\tfor($i=0; $i<sizeof($tables); $i++){\n\t\t\t\tif($tables[$i]['table'] == $cattype) $n = $i;\n\t\t\t}\n\t\t\tif($opt && trim($opt) != '') $note = $opt;\n\t\t\telse $note = \"Upload .jpg, .pdf or .doc (Word document) file\";\n\t\t\t$form->hiddenfield('filelocation',$cattype);\n\t\t\t$form->filefield($lable,$name,$value,$_GET['pg'],$_GET['id'],'file',$note);\n\t\t\tbreak;\n\t\tcase 'textfield':\n\t\t\t$form->textfield($lable,$name,$value,$opt);\n\t\tbreak;\n\t\tcase 'textarea':\n\t\t\t$n = getKey($tables, $cattype);\n\t\t\tfor($i=0; $i<sizeof($tables[$n]['field']); $i++){\n\t\t\t\tif($tables[$n]['field'][$i] == $name) $x = $i;\n\t\t\t}\n\t\t\tif($tables[$n]['note'][$x] && $tables[$n]['note'][$x]!=\"\") $note = $tables[$n]['note'][$x];\n\t\t\telse $note = 0;\n\t\t\tif($name == 'description') $s = '250'; else $s = '60';\n\t\t\t$form->textarea($lable,$name,$value,$s,$note);\n\t\tbreak;\n\t\tcase 'selectbox':\n\t\t\t// **************************************************************\n\t\t\t// NOTE FOR JK: TRY TO MAKE THIS CONDITIONAL DATA WITHIN THE CONFIG FILE\n\t\t\t// **************************************************************\n\t\t\tif($name == 'category'){\n\t\t\t\t// GET ALL CATEGORIES FOR THIS PARTICULAR TYPE\n\t\t\t\t$x = mysql_query(\"SELECT * FROM `category` WHERE `type`='$cattype' AND `parent`='0'\");\n\t\t\t\twhile($xd = mysql_fetch_assoc($x)){\n\t\t\t\t\t$nmvals .= $xd['id'].','.$xd['title'].'|';\n\t\t\t\t\t$xdid = $xd['id'];\n\t\t\t\t\t$sx = mysql_query(\"SELECT * FROM `category` WHERE `type`='$cattype' AND `parent`='$xdid'\");\n\t\t\t\t\tif(mysql_num_rows($sx) > 0){\n\t\t\t\t\t\twhile($sxd = mysql_fetch_assoc($sx)) $nmvals .= $sxd['id'].',&nbsp;&middot;'.$sxd['title'].'|';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if($name == 'sub'){\n\t\t\t\tif($_GET['pg'] == 'bb_categories'){\n\t\t\t\t\t// GET ALL FORUM CATEGORIES\n\t\t\t\t\t$x = mysql_query(\"SELECT * FROM `bb_categories` WHERE `sub`='0'\");\n\t\t\t\t\twhile($xd = mysql_fetch_assoc($x)) $nmvals .= $xd['id'].','.$xd['title'].'|';\n\t\t\t\t} else {\n\t\t\t\t\t// GET ALL TOP LEVEL CATEGORIES\n\t\t\t\t\t$x = mysql_query(\"SELECT * FROM `category` WHERE `sub`=''\");\n\t\t\t\t\twhile($xd = mysql_fetch_assoc($x)) $nmvals .= $xd['id'].','.$xd['title'].'|';\n\t\t\t\t}\n\t\t\t} else if($name == 'products'){\n\t\t\t\t// GET ALL CATEGORIES FOR THIS PARTICULAR TYPE\n\t\t\t\t$x = mysql_query(\"SELECT * FROM `category` WHERE `type`='products' AND `subof`='0'\");\n\t\t\t\twhile($xd = mysql_fetch_assoc($x)){\n\t\t\t\t\t$nmvals .= $xd['id'].','.$xd['title'].'|';\n\t\t\t\t\t$xdid = $xd['id'];\n\t\t\t\t\t$sx = mysql_query(\"SELECT * FROM `products` WHERE `category`='$xdid' AND `active`='0' ORDER BY `title` ASC\");\n\t\t\t\t\tif(mysql_num_rows($sx) > 0){\n\t\t\t\t\t\twhile($sxd = mysql_fetch_assoc($sx)) $nmvals .= $sxd['id'].',&nbsp;&middot;'.$sxd['title'].'|';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if($name == 'options'){\n\t\t\t\t$x = mysql_query(\"SELECT * FROM `options` WHERE `active`='0' ORDER BY `title` ASC\");\n\t\t\t\twhile($xd = mysql_fetch_assoc($x)) $nmvals .= $xd['id'].','.$xd['title'].'|';\n\t\t\t\t\n\t\t\t} else if(TableExists($name, $default_dbname)){\n\t\t\t\t// IF THERE'S A DATABASE BY IT'S NAME, LIST ALL\n\t\t\t\t$x = mysql_query(\"SELECT * FROM `$name` ORDER BY `title`\");\n\t\t\t\tif(mysql_num_rows($x) > 0){\n\t\t\t\t\twhile($xd = mysql_fetch_assoc($x)) $nmvals .= $xd['id'].','.$xd['title'].'|';\n\t\t\t\t}\n\t\t\t\n\t\t\t} else {\n\t\t\t\t// **************************************************************\n\t\t\t\t// NOTE FOR JK: FOR THE MOST PART, THIS IS ALL THE CONDITIONAL YOU NEED\n\t\t\t\t// (FOR EVERYTHING OTHER THAN TYPE... as long as names are kept consistent)\n\t\t\t\t// **************************************************************\n\t\t\t\t$n = getKey($tables, $cattype);\n\t\t\t\tif( $tables[$n]['select'][\"$name\"] && eregi(\"\\|\",$tables[$n]['select'][\"$name\"]) ){\n\t\t\t\t\t$nmvals = $tables[$n]['select'][\"$name\"];\n\t\t\t\t} else if($tables[$n]['select'][\"$name\"]) {\n\t\t\t\t\t$db = $tables[$n]['select'][\"$name\"];\n\t\t\t\t\t$key = getKey($tables, $name);\n\t\t\t\t\t$listme = $tables[$key]['listme'];\n\t\t\t\t\t$x = mysql_query(\"SELECT * FROM `$db`\");\n\t\t\t\t\twhile($xd = mysql_fetch_assoc($x)){\n\t\t\t\t\t\tif(!is_array($listme) && $xd[\"$listme\"]){\n\t\t\t\t\t\t\t\t$title = stripslashes($qd[\"$listme\"]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tforeach($listme AS $k => $v){\n\t\t\t\t\t\t\t\tif($xd[$v]) $title .= $xd[$v];\n\t\t\t\t\t\t\t\telse $title .= $v;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$nmvals .= $xd['id'].','.$title.'|';\n\t\t\t\t\t\tunset($title);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\tif(!isset($nmvals)) $form->errorfield($lable,$name,\"\".strtoupper($name).\" NEED TO BE ADDED\");\n\t\t\telse $form->selectbox($lable,$name,$nmvals,$value,$mult);\n\t\tbreak;\n\t\tcase 'selectmult':\n\t\t\tif(TableExists($name, $default_dbname)){\n\t\t\t\t// IF THERE'S A DATABASE BY IT'S NAME, LIST ALL\n\t\t\t\t$x = mysql_query(\"SELECT * FROM `$name` ORDER BY `title`\");\n\t\t\t\twhile($xd = mysql_fetch_assoc($x)) $nmvals .= $xd['id'].','.$xd['title'].'|';\n\t\t\t} else {\n\t\t\t\t// **************************************************************\n\t\t\t\t// NOTE FOR JK: FOR THE MOST PART, THIS IS ALL THE CONDITIONAL YOU NEED\n\t\t\t\t// (FOR EVERYTHING OTHER THAN TYPE... as long as names are kept consistent)\n\t\t\t\t// **************************************************************\n\t\t\t\t$n = getKey($tables, $cattype);\n\t\t\t\tif( $tables[$n]['select'][\"$name\"] && eregi(\"\\|\",$tables[$n]['select'][\"$name\"]) ){\n\t\t\t\t\t$nmvals = $tables[$n]['select'][\"$name\"];\n\t\t\t\t} else if($tables[$n]['select'][\"$name\"]) {\n\t\t\t\t\t$db = $tables[$n]['select'][\"$name\"];\n\t\t\t\t\t$key = getKey($tables, $name);\n\t\t\t\t\t$listme = $tables[$key]['listme'];\n\t\t\t\t\t$x = mysql_query(\"SELECT * FROM `$db`\");\n\t\t\t\t\twhile($xd = mysql_fetch_assoc($x)){\n\t\t\t\t\t\tif(!is_array($listme) && $xd[\"$listme\"]){\n\t\t\t\t\t\t\t\t$title = stripslashes($qd[\"$listme\"]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tforeach($listme AS $k => $v){\n\t\t\t\t\t\t\t\tif($xd[$v]) $title .= $xd[$v];\n\t\t\t\t\t\t\t\telse $title .= $v;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$nmvals .= $xd['id'].','.$title.'|';\n\t\t\t\t\t\tunset($title);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!isset($nmvals)) $form->errorfield($lable,$name,\"\".strtoupper($name).\" NEED TO BE ADDED (mult)\");\n\t\t\telse $form->selectmult($lable,$name,$nmvals,$value);\n\t\tbreak;\n\t\tcase 'radiobuttonlist':\n\t\t\t// **************************************************************\n\t\t\t// NOTE FOR JK: TRY TO MAKE THIS CONDITIONAL DATA WITHIN THE CONFIG FILE\n\t\t\t// **************************************************************\n\t\t\tif($name == 'active'){\n\t\t\t\t$nmvals = '0,Yes|1,No';\n\t\t\t\tif($value == \"\") $value = '1';\n\t\t\t} else if($name == 'featured' && $nmvals == \"\"){\n\t\t\t\t$nmvals = '0,Featured|1,Not featured';\n\t\t\t\tif($value == \"\") $value = '1';\n\t\t\t}\n\t\t\t$form->radiobuttonlist($lable,$name,$nmvals,$value);\n\t\tbreak;\n\t\tcase 'checkbox':\n\t\t\t$form->checkbox($lable,$name,$value);\n\t\tbreak;\n\t\tcase 'textlist':\n\t\t\t$form->textlist($lable,$name,$value);\n\t\tbreak;\n\t\tcase 'text':\n\t\t\t$form->text($lable,$name,$value);\n\t\tbreak;\n\t}\n}", "protected function asignarCamposRelacionales() {\n foreach($this->campos as $nombre=>$campo) {\n if($campo->tipo!='relacional'||($campo->relacion!='1:1'&&$campo->relacion!='1:0')) continue;\n $columna=$campo->columna;\n if(is_object($this->consultaValores->$nombre)) {\n //Asignado como entidad u objeto anónimo\n $this->consultaValores->$columna=$this->consultaValores->$nombre->id;\n } elseif(is_array($this->consultaValores->$nombre)) {\n //Asignado como array\n $this->consultaValores->$columna=$this->consultaValores->$nombre['id'];\n }\n }\n }", "function getFormField($arr)\n{\n\t$name = '';\n\t$parms = '';\n\t$val = '';\n\t$type = '';\n\n\textract($arr);\n\n\tif(!$parms)\n\t{\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 'textarea':\n\t\t\t\t$parms = 'rows=\"15\" cols=\"35\" wrap=\"virtual\"';\n\t\t\t\tbreak;\n\t\t\tcase 'file':\n\t\t\tcase 'text':\n\t\t\tcase 'password':\n\t\t\t\t$parms = 'size=\"35\"';\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tswitch($type)\n\t{\n\t\tcase 'textarea':\n\t\t\t$str = '<textarea name=\"' . $name . '\" ' . $parms . '>' . $val . '</textarea>';\n\t\t\tbreak;\n\t\tcase 'select':\n\t\t\t$str = '<select name=\"' . $name . '\" ' . $parms . '>' . $val . '</select>';\n\t\t\tbreak;\n\t\tcase 'disptext':\n\t\t\t$str = $val;\n\t\t\tbreak;\n\t\tcase 'checkbox':\n\t\t\t$str = '<input type=\"checkbox\" name=\"' .$name . '\" ' . $val . ' />';\n\t\t\tbreak;\n\t\tcase 'null':\n\t\t\t$str = '';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$str = '<input type=\"' . $type . '\" name=\"' . $name . '\" ' . $parms . ' value=\"' . $val . '\" />';\n\t\t\tbreak;\n\t}\n\treturn $str;\n}", "function generate_search_data_fields($name, $dexnum, $type1, $type2, $region, $specialform, $tier) {\n $specialform = $specialform ? 'true' : 'false';\n\n if ($type1 === 'No Secondary') {\n $type1 = 'notype';\n }\n\n if ($type2 === 'No Secondary') {\n $type2 = 'notype';\n }\n \n $fields = [\n $name,\n \"num=$dexnum\",\n \"dexnum=$dexnum\",\n \"type=$type1\",\n \"type=$type2\",\n \"type1=$type1\",\n \"type2=$type2\",\n \"region=$region\",\n \"specialform=$specialform\",\n \"tier=$tier\"\n ];\n\n return strtolower(implode(' ', $fields));\n}", "protected function generaCamposFormulario($datosIniciales)\r\n {\r\n return '';\r\n }", "public function init()\r\n {\r\n \t\r\n \t$this->setName('nome');\r\n \t$this->setAttrib('enctype', 'multipart/form-data');\r\n $ID_OPERADOR = new Zend_Form_Element_Hidden('ID_OPERADOR');\r\n $ID_OPERADOR->addFilter('Int');\r\n \r\n\t\t$NM_OPERADOR= new Zend_Form_Element_Text('NM_OPERADOR');\r\n $NM_OPERADOR->setLabel('NOME')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter nome');\r\n \t \r\n \t \r\n $DS_TELEFONE_PESSOAL= new Zend_Form_Element_Text('DS_TELEFONE_PESSOAL');\r\n $DS_TELEFONE_PESSOAL->setLabel('TELEFONE PESSOAL')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter telefone pessoal');\r\n \t \r\n \t \r\n $DS_TELEFONE_BIOS= new Zend_Form_Element_Text('DS_TELEFONE_BIOS');\r\n $DS_TELEFONE_BIOS->setLabel('TELEFONE BIOS')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter telefone bios'); \t\r\n \t \r\n $DS_EMAIL_PESSOAL= new Zend_Form_Element_Text('DS_EMAIL_PESSOAL');\r\n $DS_EMAIL_PESSOAL->setLabel('E-MAIL PESSOAL')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter e-mail pessoal'); \r\n \r\n $DS_EMAIL_BIOS= new Zend_Form_Element_Text('DS_EMAIL_BIOS');\r\n $DS_EMAIL_BIOS->setLabel('E-MAIL BIOS')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter e-mail bios');\r\n \r\n $DS_ENDERECO= new Zend_Form_Element_Text('DS_ENDERECO');\r\n $DS_ENDERECO->setLabel('ENDEREÇO')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter endereco');\r\n \r\n $DS_BAIRRO= new Zend_Form_Element_Text('DS_BAIRRO');\r\n $DS_BAIRRO->setLabel('BAIRRO')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter bairro');\r\n \r\n $NR_CEP= new Zend_Form_Element_Text('NR_CEP');\r\n $NR_CEP->setLabel('CEP')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cep');\r\n \r\n \r\n $NR_CPF= new Zend_Form_Element_Text('NR_CPF');\r\n $NR_CPF->setLabel('CPF')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cpf');\r\n \r\n $NR_IDENTIDADE= new Zend_Form_Element_Text('NR_IDENTIDADE');\r\n $NR_IDENTIDADE->setLabel('Nº IDENTIDADE')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter nº identidade');\r\n \t \r\n $DT_NASCIMENTO= new Zend_Form_Element_Text('DT_NASCIMENTO');\r\n $DT_NASCIMENTO->setLabel('DATA NASCIMENTO')\r\n ->setRequired(true)\r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter data nascimento'); \t \r\n \r\n $DS_REGISTRO_PROFISSIONAL= new Zend_Form_Element_Text('DS_REGISTRO_PROFISSIONAL');\r\n $DS_REGISTRO_PROFISSIONAL->setLabel('REGISTRO PROFISSIONAL')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter data registro profissional');\r\n \t \r\n $DS_CTF_IBAM= new Zend_Form_Element_Text('DS_CTF_IBAM');\r\n $DS_CTF_IBAM->setLabel('CTF IBAMA')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter ctf ibama');\r\n \r\n $DS_SKYPE= new Zend_Form_Element_Text('DS_SKYPE');\r\n $DS_SKYPE->setLabel('SKYPE')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter skype');\r\n \r\n $DS_LOGIN= new Zend_Form_Element_Text('DS_LOGIN');\r\n $DS_LOGIN->setLabel('LOGIN')\r\n ->setRequired(true)\r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter skype');\r\n \r\n $DS_SENHA= new Zend_Form_Element_Password('DS_SENHA');\r\n $DS_SENHA->setLabel('SENHA')\r\n ->setRequired(true)\r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter senha');\r\n \t \r\n $REPETIR_SENHA= new Zend_Form_Element_Password('REPETIR_SENHA');\r\n $REPETIR_SENHA->setLabel('REPETIR SENHA')\r\n ->setRequired(true)\r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter repetir senha');\r\n \r\n \r\n $NM_CONTATO_FAMILIAR= new Zend_Form_Element_Text('NM_CONTATO_FAMILIAR');\r\n $NM_CONTATO_FAMILIAR->setLabel('NOME CONTATO FAMILIAR')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter nome contato familiar');\r\n \r\n\r\n $NR_TELEFONE_CONTATO_FAMILIAR= new Zend_Form_Element_Text('NR_TELEFONE_CONTATO_FAMILIAR');\r\n $NR_TELEFONE_CONTATO_FAMILIAR->setLabel('Nº TELEFONE CONTATO FAMILIAR')\r\n \t \r\n \t ->addFilter('StripTags')\r\n \t ->addFilter('StringTrim')\r\n \t ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter n� telefone contato familiar');\r\n \r\n \t \r\n $FK_PERFIL= new Zend_Form_Element_Select('FK_PERFIL');\r\n $perfil = new Application_Model_DbTable_Perfil();\r\n $FK_PERFIL->setLabel('Perfil');\r\n $FK_PERFIL->setMultiOptions( $perfil->getPerfil() )\r\n ->setRequired(true)\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control select2');\r\n \t \r\n \t \r\n \t $submit = new Zend_Form_Element_Submit('submit');\r\n \t $submit->setLabel(\"Adiconar\");\r\n \t $submit->setAttrib('id', 'submitbutton');\r\n \t $submit->removeDecorator('DtDdWrapper')\r\n \t ->setAttrib('class', 'btn btn-primary button')\r\n \t ->removeDecorator('HtmlTag')\r\n \t ->removeDecorator('Label');\r\n \t \r\n \r\n $this->addElements(array($ID_OPERADOR,$NM_OPERADOR,$DS_TELEFONE_PESSOAL,$DS_TELEFONE_BIOS,$DS_EMAIL_PESSOAL,$DS_EMAIL_BIOS,$DS_ENDERECO,$DS_BAIRRO,$NR_CEP,$NR_CPF,$NR_IDENTIDADE,$DT_NASCIMENTO,$DS_REGISTRO_PROFISSIONAL,$DS_CTF_IBAM,$DS_SKYPE,$DS_LOGIN,$DS_SENHA,$REPETIR_SENHA,$NM_CONTATO_FAMILIAR, $NR_TELEFONE_CONTATO_FAMILIAR, $FK_PERFIL,$submit));\r\n // $this->addElements(array($id, $nome, $email,$senha, $submit));\r\n $this->setDecorators( array( array('ViewScript', array('viewScript' => '/forms/formularioOperador.phtml'))));\r\n }", "public static function getFormFieldMap() {\n return array(\n 'name' => 'title',\n 'blurb' => 'blurb',\n 'image' => 'image',\n 'link' => 'link',\n );\n }", "public function __construct($module = null, $fname = null, $group = null,\n $name = null, $title = null, $show = null, \n $disabled = null, $required = null, $type = null, \n $regex = null, $length = null, $min = null, \n $max = null, $selected = null, $checked = null, \n $value = null, $size = null, $cols = null,\n $rows = null, $source = null, $multiple = null,\n $btype = null, $text = null, $tclasses = null,\n $iclasses = null, $defines = null, $filters = null,\n $roles = null) {\n global $filelogger;\n\n $filelogger->debug(\"FormElement = [\".\n \" (%,%,%), (%,%,%), (%,%,%), (%,%,%), (%,%,%),\".\n \" (%,%,%), (%,%,%), (%,%,%), (%,%,%), (%,%,%),\".\n \" (%,%,%), (%,%,%), (%,%,%), (%,%,%), (%,%,%),\".\n \" (%,%,%), (%,%,%), (%,%,%), (%,%,%), (%,%,%),\".\n \" (%,%,%), (%,%,%), (%,%,%), (%,%,%), (%,%,%),\".\n \" (%,%,%), (%,%,%), (%,%,%) ]\",\n array(\n \"module\",$module,gettype($module),\"fname\",$fname,gettype($fname),\n \"group\",$group,gettype($group),\"btype\",$btype,gettype($btype),\n \"name\",$name,gettype($name),\"title\",$title,gettype($title),\n \"show\",$show,gettype($show),\"disabled\",$disabled,gettype($disabled),\n \"required\",$required,gettype($required),\"type\",$type,gettype($type),\n \"regex\",$regex,gettype($regex),\"length\",$length,gettype($length),\n \"min\",$min,gettype($min),\"max\",$max,gettype($max),\n \"selected\",$selected,gettype($selected),\"checked\",$checked,gettype($checked),\n \"value\",$value,gettype($value),\"size\",$size,gettype($size),\n \"cols\",$cols,gettype($cols),\"rows\",$rows,gettype($rows),\n \"source\",$source,gettype($source),\"multiple\",$multiple,gettype($multiple),\n \"text\",$text,gettype($text),\"tclasses\",$tclasses,gettype($tclasses),\n \"iclasses\",$iclasses,gettype($iclasses),\"defines\",$defines,gettype($defines),\n \"filters\",$filters,gettype($filters),\"roles\",$roles,gettype($roles)\n )\n ); \n \n $this->module = $module;\n $this->fname = $fname;\n $this->groupid = (Validator::equals($group,\"globals\") ? \"g\" : \"e\");\n $this->name = $name;\n $this->title = $title;\n $this->text = $text;\n\n $this->show = $show;\n $this->disabled = (Validator::equals($disabled,\"y\")\n ? \"disabled=\\\"disabled\\\"\" : \"\");\n $this->required = $required;\n\n $this->type = $type;\n $this->btype = $btype;\n\n $this->size = (Validator::matches($size,\"/^[1-9]{1}[0-9]*$/\")&&$size>0\n ? $size : 1);\n $this->length = (Validator::matches($length,\"/^[1-9]{1}[0-9]*$/\")&&$length>0\n ? $length : 254);\n $this->min = (Validator::matches($min,\"/^[1-9]{1}[0-9]*$/\")&&$min>0\n ? $min : 0);\n $this->max = (Validator::matches($max,\"/^[1-9]{1}[0-9]*$/\")&&$max>0\n ? $max : 100);\n\n $this->cols = (Validator::matches($cols,\"/^[1-9]{1}[0-9]*$/\")&&$cols>0\n ? $cols : 30);\n $this->rows = (Validator::matches($rows,\"/^[1-9]{1}[0-9]*$/\")&&$rows>0\n ? $rows : 3);\n\n $this->regex = $regex; // used to check values inserted on submit\n $this->value = $value;\n $this->source = $source;\n\n $this->selected = (Validator::equals($selected,\"y\")\n ? \"selected=\\\"selected\\\"\" : \"\");\n $this->checked = (Validator::equals($checked,\"y\")\n ? \"checked=\\\"checked\\\"\" : \"\");\n $this->multiple = (Validator::equals($multiple,\"y\")\n ? \"multiple=\\\"multiple\\\"\" : \"\");\n\n $this->tclasses = $tclasses;\n $this->iclasses = $iclasses;\n\n $this->defines = $defines; \n\n $this->filters = (Validator::matches($filters,\n \"/^[a-z]+(_{0,1}[a-z]+)*(,[a-z]+(_{0,1}[a-z]+)*)*$/\") \n ? $filters : \"string\"); \n $this->roles = (Validator::equals($roles,\"\") \n ? array(\"*\") : explode(\",\",$roles));\n\n }", "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->valor_vehiculo=$_POST['valor_vehiculo'];\n\t\t$this->saldo=$_POST['saldo'];\n\t\t$this->valor_inicial=$_POST['valor_inicial'];\n\t\t$this->comision=$_POST['comision'];\n\t\t$this->plazo=$_POST['plazo'];\n\t\t$this->cuotas=$_POST['cuotas'];\n\t\t$this->total=$_POST['total'];\n\t}", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "protected function procesaFormulario($datos)\r\n {\r\n return array();\r\n }", "function cl_bensetiquetaimpressa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"bensetiquetaimpressa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function create_user_registration_form($data) {\n foreach($data as $key => $val) {\n echo '<div class=\"form-group\">\n <label for=\"'.$val.'\" class=\"pl-1\">'.$key.':';\n if ($val != \"mobile\") echo '*'; echo '</label>\n <input type=\"'.USERS_FORM_TYPES[$key].'\" class=\"form-control\"\n name=\"'.$val.'\" placeholder=\"'.$key.'\" maxlength=\"40\"';\n if (isset($_POST[$val])) echo ' value=\"'.$_POST[$val].'\"';\n echo '></div>';\n }\n }", "function saveForm(){\t\n\t\t$this->saveFormBase();\n\t\t$this->saveFormGeoCoverage();\n\t\t$this->saveVaFormResolution();\n\t\tif ($this->dataset->nbModForm >0) $this->saveModForm();\n\t\tif ($this->dataset->nbSatForm >0) $this->saveSatForm();\n\t\tif ($this->dataset->nbInstruForm >0) $this->saveInstruForm();\n\t\t$this->saveFormGrid();\n\t\t//Parameter\n\t\t$this->saveFormVariables($this->dataset->nbVars);\n\t\t//REQ DATA_FORMAT\n\t\t$this->dataset->required_data_formats = array();\n\t\t$this->dataset->required_data_formats[0] = new data_format;\n\t\t$this->dataset->required_data_formats[0]->data_format_id = $this->exportValue('required_data_format');\n\t}", "function getNombreGenericoPrestacion($nombre) {\r\n switch ($nombre) {\r\n case 'INMU':\r\n $descr = \"INMUNIZACION\";\r\n break;\r\n case 'NINO':\r\n case 'NINO_PESO':\r\n $descr = \"CONTROL PEDIATRICO\";\r\n break;\r\n case 'ADOLESCENTE':\r\n $descr = \"CONTROL ADOLESCENTE\";\r\n break;\r\n case 'PARTO':\r\n $descr = \"CONTROL DEL PARTO\";\r\n break;\r\n case 'EMB':\r\n $descr = \"CONTROL DE EMBARAZO\";\r\n break;\r\n case 'ADULTO':\r\n $descr = \"CONTROL DE ADULTO\";\r\n break;\r\n case 'SEGUIMIENTO':\r\n $descr = \"SEGUIMIENTO\";\r\n break;\r\n case 'TAL':\r\n $descr = \"TAL\";\r\n break;\r\n }\r\n return $descr;\r\n}", "public function getForm();", "public function recuperaNome(){\n $nome = \"\";\n if(isset($_POST['nomericetta'])){\n $nome = $_POST['nomericetta'];\n }\n return $nome;\n }", "public function definition() {\n\t\t\tglobal $CFG, $DB;\t\n\t\t\n\t\t$mform = $this->_form; // Don't forget the underscore!\n\t\n\t\t$result= $DB->get_records_sql(\"SELECT DISTINCT `intensidad` FROM `mdl_ejercicios`\");\n\t\t$result_tren= $DB->get_records_sql(\"SELECT DISTINCT `categoria` FROM `mdl_ejercicios`\");\n\t\t$options= array();\n\t\tforeach($result as $rs)\n\t\t\t\t$options[$rs->intensidad] = $rs->intensidad;\n\t\t\n\t\t$options_tren= array();\n\t\tforeach ($result_tren as $rst)\n\t\t\t$options_tren[$rst->categoria]= $rst->categoria;\n\t\t$mform->addElement('header', 'header', 'Para crear una rutina aleatoria');\n\t\t\n\t\t$mform->addElement('select', 'intensidad', '¿Qué intensidad quieres?:',$options);\n\n\t\t//$mform->addElement('select', 'categoria', '¿Qué tren de tu cuerpo quieres trabajar?:',$options_tren);\n\t\t\n\t\t\n\t\t$buttonarray=array();\n\t\t$buttonarray[] = &$mform->createElement('submit', 'submitbutton', 'Buscar rutina');\n\t\t$buttonarray[] = &$mform->createElement('reset', 'resetbutton', 'Resetear');\n\t\t$buttonarray[] = &$mform->createElement('cancel', 'cancel', 'Cancelar');\n\t\t$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);\n\t\t$mform->addElement('hidden', 'end');\n\t\t$mform->setType('end', PARAM_NOTAGS);\n\t\t$mform->closeHeaderBefore('end');\n\t}", "public function __construct($name = null)\n {\n parent::__construct('ponto');\n \n $this->setAttribute('method', 'post');\n $this->add(array(\n 'name' => 'id',\n 'attributes' => array(\n 'type' => 'hidden',\n ),\n ));\n\n $this->add(array(\n 'name' => 'manha_ini',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => 'Manha - Entrada',\n ),\n ));\n\n $this->add(array(\n 'name' => 'manha_fim',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => utf8_encode('Manha - Saida'),\n ),\n ));\n\n $this->add(array(\n 'name' => 'tarde_ini',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => 'Tarde - Entrada',\n ),\n ));\n\n $this->add(array(\n 'name' => 'tarde_fim',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => utf8_encode('Tarde - Saida'),\n ),\n ));\n\n $this->add(array(\n 'name' => 'data',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => 'Dia',\n ),\n ));\n\n $this->add(array(\n 'name' => 'submit',\n 'attributes' => array(\n 'type' => 'submit',\n 'value' => 'Go',\n 'id' => 'submitbutton',\n ),\n ));\n\n }", "function formularioLugar($lugar){\n\n echo \"<hr><h4>\".strtoupper($lugar).\"</h4>\n <form action='lugar-insert.php' method='post' enctype='multipart/form-data' name='form1' class='form-horizontal form-label-left'>\n\n <input type='hidden' name='lugar' value='\".$lugar.\"' required>\n\n <div class='form-group'>\n <div class='col-md-12 col-sm-12 col-xs-12'>\";\n \n campo(0, \"text\",\"nombre\",\"\");\n\n echo \"</div>\n </div>\n\n <div class='ln_solid'></div>\n <div class='form-group'>\n <div class='col-md-12 col-sm-12 col-xs-12'>\n <button type='submit' class='btn btn-success'>Agregar</button>\n </div>\n </div>\n </form>\";\n}", "public function formatear($nombre,$apellido)\n {\n # code...\n echo \"<br>Nombre: \".$nombre.\" | Apellido: \".$apellido;\n\n }", "protected function _readFormFields() {}", "function inscription_jesa_direct($form, &$form_state) {\n $form['#tree'] = TRUE;\n\n $form['description'] = array(\n '#type' => 'item',\n '#title' => t('Allow to register a new participant. if the participant does\\'t exist he(she) will be created. For a new member you must provide the name, firstname, the gender and a contact method (mail or phone).'),\n );\n $form['stagiaire'] = array(\n '#type' => 'fieldset',\n '#title' => t('Member'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n $form['stagiaire']['existant'] = array(\n '#type' => 'fieldset',\n '#title' => t('Existing member'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n $form['stagiaire']['existant']['user_name'] = array(\n '#title' => t('Existing member'),\n '#type' => 'textfield',\n '#autocomplete_path' => 'inscriptions/jeunes/admin/direct/stagiaire_autoc',\n );\n $form['stagiaire']['nouveau'] = array(\n '#type' => 'fieldset',\n '#title' => t('New member'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n $selection = array(\n 'nom' => array('required' => FALSE,),\n 'prenom' => array('required' => FALSE,),\n 'date_naissance' => array('required' => FALSE,),\n 'mail' => array('required' => FALSE,),\n 'telephone' => array('required' => FALSE,),\n 'adresse_1' => array('required' => FALSE,),\n 'adresse_2' => array('required' => FALSE,),\n 'sexe' => array('required' => FALSE,),\n );\n $form['stagiaire']['nouveau'] += _inscription_jesa_get_form_user_fields($selection);\n $form['stage'] = array(\n '#type' => 'fieldset',\n '#title' => t('Events'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n $form['stage']['list'] = array(\n '#type' => 'radios',\n '#options' => _inscription_jesa_get_next_stages(4),\n '#title' => t('Events'),\n );\n $selection = array(\n 'train' => array('required' => FALSE,),\n );\n $form['stage'] += _inscription_jesa_get_form_incscription_fields($selection);\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Submit'),\n ); \n\n return $form;\n}", "public function get_form($metodo,$usuario,$form,$data=0,$ciclo=1,$codSubM=null,$cMet=\"\"){\n #traemos el formulario\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT fbArmaFormulario($form,$usuario,$data,$ciclo,$codSubM,$this->_modulo,'\".$cMet.\"') as formulario; \";\n $this->get_results_from_query();\n if(count($this->rows) >= 1){\n foreach ($this->rows as $pro=>$va) {\t\t\t\t\n $this->_formulario[] = $va;\n if($this->_formulario[0]['formulario'] == ''){\t\t\t\t\n $mensjFrm = getMenssage('danger','Ocurrio un error','No tiene permisos para acceder a esta opcion. ');\n $this->_formulario[0] = array('formulario'=>$mensjFrm);\n }\n }\n }\t\n #traemos el formulario modal\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT fbArmaFormularioModal($form,$usuario) as modal; \";\n $this->get_results_from_query();\n if(count($this->rows) >= 1){\n foreach ($this->rows as $pro=>$va) { \n $this->_formulario_modal[] = $va;\n if($this->_formulario_modal[0]['modal'] == ''){ \n $mensjFrm = '';\n $this->_formulario_modal[0] = array('modal'=>$mensjFrm);\n }\n }\n } \n #traemos la ayuda del form\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT fbArmaAyudaFormulario($form,$usuario,1) as formulario_ayuda\";\n $this->get_results_from_query();\n if (count($this->rows) >= 1) {\n foreach ($this->rows as $pro => $va) {\n $this->_formulario_ayuda[] = $va;\n if ($this->_formulario_ayuda[0]['formulario_ayuda'] == '') {\n $mensjFrm = getMenssage('info', 'Ocurrio un error', 'No hay ayuda registrada para este proceso,consulte al administrador del sistema. ');\n $this->_formulario_ayuda[0] = array('formulario_ayuda' => $mensjFrm);\n }\n }\n }\n #Traemos los botones por formulario y usuario\n ModeloFacturacion::get_boton($metodo,$usuario,$form,$cMet);\n }", "protected function generaCamposFormulario($datosIniciales) {\r\n $gameId = $_POST['gameId'];\r\n return '<div class=\"contenedor-add\">\r\n <div>\r\n <div class=\"contenedor-title\">\r\n Score: <select class=\"form-control\" id=\"score\" type=\"text\" name=\"score\">\r\n <option value=\"-\">-</option>\r\n <option value=\"1\">1</option>\r\n <option value=\"2\">2</option>\r\n <option value=\"3\">3</option>\r\n <option value=\"4\">4</option>\r\n <option value=\"5\">5</option>\r\n <option value=\"6\">6</option>\r\n <option value=\"7\">7</option>\r\n <option value=\"8\">8</option>\r\n <option value=\"9\">9</option>\r\n <option value=\"10\">10</option>\r\n </select>\r\n </div>\r\n </div>\r\n <table>\r\n <tr>\r\n <td>Title: </td>\r\n <td>\r\n <input class=\"form-control\" id = \"title\" type=\"text\" name=\"title\" placeholder=\"Title\" required>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>Review: </td>\r\n <td>\r\n <textarea rows=\"4\" cols=\"50\" name=\"review\" required></textarea>\r\n </td>\r\n </tr>\r\n <input type=\"hidden\" value=\"'.$gameId.'\" name=\"game\">\r\n </table>\r\n </div>\r\n <div class=\"button-wrapper\">\r\n <button type=\"submit\" class=\"button-create-game\" id=\"game\">Send</button>\r\n </div>';\r\n }", "public static function generate($fields) {\n $form=\"\";\n $extraOptions=[];\n // wildCard will be applied all inputs\n $wildCard=isset($fields[\"*\"]) ? $fields[\"*\"]:[];\n // exclude given elements\n if(isset($fields[\"_exclude\"])) {\n foreach ($fields[\"_exclude\"] as $value) {\n unset($fields[$value]);\n }\n }\n foreach ($fields as $key => $val) {\n if($key==\"*\"||$key==\"_exclude\") continue;\n if(!empty($wildCard)) {\n $val=array_replace_recursive($val,$wildCard);\n }\n $inputOptions=isset($val[\"options\"]) ? $val[\"options\"] : [];\n \n $placeholder=isset($val[\"placeholder\"]) ? $val[\"placeholder\"] : null;\n switch ($val[\"type\"]) {\n case 'select':\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$val[\"data\"],$inputOptions);\n break;\n case 'password':\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$placeholder,$inputOptions);\n break;\n case 'checkbox':\n case 'radio':\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$val[\"value\"],null); // removed $val[\"checked\"] for unwanted results\n break;\n case 'color':\n case 'number':\n case 'file';\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$inputOptions);\n break;\n // other elements share the same parameters.\n default:\n try {\n\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$placeholder,$inputOptions);\n }catch(\\Exception $err) {\n if(config('app.debug')==false) { // only show error on debug\n dump(\"Error on generating form\",$err,$key,$val);\n }\n }\n break;\n }\n }\n return $form;\n }", "function tk_template_get_field (&$this, &$res, $field)\n{\n $ui =& $app->ui;\n\n $res[\"form_$field\"] = $ui->new_formfield ($field);\n $res[$field] = $ui->value ($field);\n}", "public function __get($strName) {\n\t\t\tswitch ($strName) {\n\t\t\t\t// General MetaControlVariables\n\t\t\t\tcase 'Fichas': return $this->objFichas;\n\t\t\t\tcase 'TitleVerb': return $this->strTitleVerb;\n\t\t\t\tcase 'EditMode': return $this->blnEditMode;\n\n\t\t\t\t// Controls that point to Fichas fields -- will be created dynamically if not yet created\n\t\t\t\tcase 'IdControl':\n\t\t\t\t\tif (!$this->lblId) return $this->lblId_Create();\n\t\t\t\t\treturn $this->lblId;\n\t\t\t\tcase 'IdLabel':\n\t\t\t\t\tif (!$this->lblId) return $this->lblId_Create();\n\t\t\t\t\treturn $this->lblId;\n\t\t\t\tcase 'IdMarcaControl':\n\t\t\t\t\tif (!$this->lstIdMarcaObject) return $this->lstIdMarcaObject_Create();\n\t\t\t\t\treturn $this->lstIdMarcaObject;\n\t\t\t\tcase 'IdMarcaLabel':\n\t\t\t\t\tif (!$this->lblIdMarca) return $this->lblIdMarca_Create();\n\t\t\t\t\treturn $this->lblIdMarca;\n\t\t\t\tcase 'IdTiposControl':\n\t\t\t\t\tif (!$this->lstIdTiposObject) return $this->lstIdTiposObject_Create();\n\t\t\t\t\treturn $this->lstIdTiposObject;\n\t\t\t\tcase 'IdTiposLabel':\n\t\t\t\t\tif (!$this->lblIdTipos) return $this->lblIdTipos_Create();\n\t\t\t\t\treturn $this->lblIdTipos;\n\t\t\t\tcase 'IdModeloControl':\n\t\t\t\t\tif (!$this->lstIdModeloObject) return $this->lstIdModeloObject_Create();\n\t\t\t\t\treturn $this->lstIdModeloObject;\n\t\t\t\tcase 'IdModeloLabel':\n\t\t\t\t\tif (!$this->lblIdModelo) return $this->lblIdModelo_Create();\n\t\t\t\t\treturn $this->lblIdModelo;\n\t\t\t\tcase 'IdVersionControl':\n\t\t\t\t\tif (!$this->lstIdVersionObject) return $this->lstIdVersionObject_Create();\n\t\t\t\t\treturn $this->lstIdVersionObject;\n\t\t\t\tcase 'IdVersionLabel':\n\t\t\t\t\tif (!$this->lblIdVersion) return $this->lblIdVersion_Create();\n\t\t\t\t\treturn $this->lblIdVersion;\n\t\t\t\tcase 'IdPaisControl':\n\t\t\t\t\tif (!$this->lstIdPaisObject) return $this->lstIdPaisObject_Create();\n\t\t\t\t\treturn $this->lstIdPaisObject;\n\t\t\t\tcase 'IdPaisLabel':\n\t\t\t\t\tif (!$this->lblIdPais) return $this->lblIdPais_Create();\n\t\t\t\t\treturn $this->lblIdPais;\n\t\t\t\tcase 'IdSeguroControl':\n\t\t\t\t\tif (!$this->txtIdSeguro) return $this->txtIdSeguro_Create();\n\t\t\t\t\treturn $this->txtIdSeguro;\n\t\t\t\tcase 'IdSeguroLabel':\n\t\t\t\t\tif (!$this->lblIdSeguro) return $this->lblIdSeguro_Create();\n\t\t\t\t\treturn $this->lblIdSeguro;\n\t\t\t\tcase 'IdServicioControl':\n\t\t\t\t\tif (!$this->txtIdServicio) return $this->txtIdServicio_Create();\n\t\t\t\t\treturn $this->txtIdServicio;\n\t\t\t\tcase 'IdMonedaLabel':\n\t\t\t\t\tif (!$this->lblMoneda) return $this->lblMoneda_Create();\n\t\t\t\t\treturn $this->lblMoneda;\n\t\t\t\tcase 'IdMonedaControl':\n\t\t\t\t\tif (!$this->txtMoneda) return $this->txtMoneda_Create();\n\t\t\t\t\treturn $this->txtMoneda;\n\t\t\t\tcase 'IdMonedaLabel':\n\t\t\t\t\tif (!$this->lblMoneda) return $this->lblMoneda_Create();\n\t\t\t\t\treturn $this->lblMoneda;\n\t\t\t\t\t\n\t\t\t\tcase 'DescripcionControl':\n\t\t\t\t\tif (!$this->txtDescripcion) return $this->txtDescripcion_Create();\n\t\t\t\t\treturn $this->txtDescripcion;\n\t\t\t\tcase 'DescripcionLabel':\n\t\t\t\t\tif (!$this->lblDescripcion) return $this->lblDescripcion_Create();\n\t\t\t\t\treturn $this->lblDescripcion;\n\t\t\t\tcase 'PrecioControl':\n\t\t\t\t\tif (!$this->txtPrecio) return $this->txtPrecio_Create();\n\t\t\t\t\treturn $this->txtPrecio;\n\t\t\t\tcase 'PrecioLabel':\n\t\t\t\t\tif (!$this->lblPrecio) return $this->lblPrecio_Create();\n\t\t\t\t\treturn $this->lblPrecio;\n\t\t\t\tcase 'AnioControl':\n\t\t\t\t\tif (!$this->txtAnio) return $this->txtAnio_Create();\n\t\t\t\t\treturn $this->txtAnio;\n\t\t\t\tcase 'AnioLabel':\n\t\t\t\t\tif (!$this->lblAnio) return $this->lblAnio_Create();\n\t\t\t\t\treturn $this->lblAnio;\n\t\t\t\tcase 'CombustibleControl':\n\t\t\t\t\tif (!$this->txtCombustible) return $this->txtCombustible_Create();\n\t\t\t\t\treturn $this->txtCombustible;\n\t\t\t\tcase 'CombustibleLabel':\n\t\t\t\t\tif (!$this->lblCombustible) return $this->lblCombustible_Create();\n\t\t\t\t\treturn $this->lblCombustible;\n\t\t\t\tcase 'CilindradaControl':\n\t\t\t\t\tif (!$this->txtCilindrada) return $this->txtCilindrada_Create();\n\t\t\t\t\treturn $this->txtCilindrada;\n\t\t\t\tcase 'CilindradaLabel':\n\t\t\t\t\tif (!$this->lblCilindrada) return $this->lblCilindrada_Create();\n\t\t\t\t\treturn $this->lblCilindrada;\n\t\t\t\tcase 'CilindrosControl':\n\t\t\t\t\tif (!$this->txtCilindros) return $this->txtCilindros_Create();\n\t\t\t\t\treturn $this->txtCilindros;\n\t\t\t\tcase 'CilindrosLabel':\n\t\t\t\t\tif (!$this->lblCilindros) return $this->lblCilindros_Create();\n\t\t\t\t\treturn $this->lblCilindros;\n\t\t\t\tcase 'PotenciaMaximaControl':\n\t\t\t\t\tif (!$this->txtPotenciaMaxima) return $this->txtPotenciaMaxima_Create();\n\t\t\t\t\treturn $this->txtPotenciaMaxima;\n\t\t\t\tcase 'PotenciaMaximaLabel':\n\t\t\t\t\tif (!$this->lblPotenciaMaxima) return $this->lblPotenciaMaxima_Create();\n\t\t\t\t\treturn $this->lblPotenciaMaxima;\n\t\t\t\tcase 'ParMotorTorqueControl':\n\t\t\t\t\tif (!$this->txtParMotorTorque) return $this->txtParMotorTorque_Create();\n\t\t\t\t\treturn $this->txtParMotorTorque;\n\t\t\t\tcase 'ParMotorTorqueLabel':\n\t\t\t\t\tif (!$this->lblParMotorTorque) return $this->lblParMotorTorque_Create();\n\t\t\t\t\treturn $this->lblParMotorTorque;\n\t\t\t\tcase 'PosicionControl':\n\t\t\t\t\tif (!$this->txtPosicion) return $this->txtPosicion_Create();\n\t\t\t\t\treturn $this->txtPosicion;\n\t\t\t\tcase 'PosicionLabel':\n\t\t\t\t\tif (!$this->lblPosicion) return $this->lblPosicion_Create();\n\t\t\t\t\treturn $this->lblPosicion;\n\t\t\t\tcase 'AlimentacionControl':\n\t\t\t\t\tif (!$this->txtAlimentacion) return $this->txtAlimentacion_Create();\n\t\t\t\t\treturn $this->txtAlimentacion;\n\t\t\t\tcase 'AlimentacionLabel':\n\t\t\t\t\tif (!$this->lblAlimentacion) return $this->lblAlimentacion_Create();\n\t\t\t\t\treturn $this->lblAlimentacion;\n\t\t\t\tcase 'MotorShortControl':\n\t\t\t\t\tif (!$this->txtMotorShort) return $this->txtMotorShort_Create();\n\t\t\t\t\treturn $this->txtMotorShort;\n\t\t\t\tcase 'MotorShortLabel':\n\t\t\t\t\tif (!$this->lblMotorShort) return $this->lblMotorShort_Create();\n\t\t\t\t\treturn $this->lblMotorShort;\n\t\t\t\tcase 'ValvulasControl':\n\t\t\t\t\tif (!$this->txtValvulas) return $this->txtValvulas_Create();\n\t\t\t\t\treturn $this->txtValvulas;\n\t\t\t\tcase 'ValvulasLabel':\n\t\t\t\t\tif (!$this->lblValvulas) return $this->lblValvulas_Create();\n\t\t\t\t\treturn $this->lblValvulas;\n\t\t\t\tcase 'TipoControl':\n\t\t\t\t\tif (!$this->txtTipo) return $this->txtTipo_Create();\n\t\t\t\t\treturn $this->txtTipo;\n\t\t\t\tcase 'TipoLabel':\n\t\t\t\t\tif (!$this->lblTipo) return $this->lblTipo_Create();\n\t\t\t\t\treturn $this->lblTipo;\n\t\t\t\tcase 'MarchasControl':\n\t\t\t\t\tif (!$this->txtMarchas) return $this->txtMarchas_Create();\n\t\t\t\t\treturn $this->txtMarchas;\n\t\t\t\tcase 'MarchasLabel':\n\t\t\t\t\tif (!$this->lblMarchas) return $this->lblMarchas_Create();\n\t\t\t\t\treturn $this->lblMarchas;\n\t\t\t\tcase 'TraccionControl':\n\t\t\t\t\tif (!$this->txtTraccion) return $this->txtTraccion_Create();\n\t\t\t\t\treturn $this->txtTraccion;\n\t\t\t\tcase 'TraccionLabel':\n\t\t\t\t\tif (!$this->lblTraccion) return $this->lblTraccion_Create();\n\t\t\t\t\treturn $this->lblTraccion;\n\t\t\t\tcase 'VelocidadMaximaControl':\n\t\t\t\t\tif (!$this->txtVelocidadMaxima) return $this->txtVelocidadMaxima_Create();\n\t\t\t\t\treturn $this->txtVelocidadMaxima;\n\t\t\t\tcase 'VelocidadMaximaLabel':\n\t\t\t\t\tif (!$this->lblVelocidadMaxima) return $this->lblVelocidadMaxima_Create();\n\t\t\t\t\treturn $this->lblVelocidadMaxima;\n\t\t\t\tcase 'Aceleracion0100Control':\n\t\t\t\t\tif (!$this->txtAceleracion0100) return $this->txtAceleracion0100_Create();\n\t\t\t\t\treturn $this->txtAceleracion0100;\n\t\t\t\tcase 'Aceleracion0100Label':\n\t\t\t\t\tif (!$this->lblAceleracion0100) return $this->lblAceleracion0100_Create();\n\t\t\t\t\treturn $this->lblAceleracion0100;\n\t\t\t\tcase 'ConsumoUrbanoControl':\n\t\t\t\t\tif (!$this->txtConsumoUrbano) return $this->txtConsumoUrbano_Create();\n\t\t\t\t\treturn $this->txtConsumoUrbano;\n\t\t\t\tcase 'ConsumoUrbanoLabel':\n\t\t\t\t\tif (!$this->lblConsumoUrbano) return $this->lblConsumoUrbano_Create();\n\t\t\t\t\treturn $this->lblConsumoUrbano;\n\t\t\t\tcase 'ConsumoInterurbanoControl':\n\t\t\t\t\tif (!$this->txtConsumoInterurbano) return $this->txtConsumoInterurbano_Create();\n\t\t\t\t\treturn $this->txtConsumoInterurbano;\n\t\t\t\tcase 'ConsumoInterurbanoLabel':\n\t\t\t\t\tif (!$this->lblConsumoInterurbano) return $this->lblConsumoInterurbano_Create();\n\t\t\t\t\treturn $this->lblConsumoInterurbano;\n\t\t\t\tcase 'ConsumoMixtoControl':\n\t\t\t\t\tif (!$this->txtConsumoMixto) return $this->txtConsumoMixto_Create();\n\t\t\t\t\treturn $this->txtConsumoMixto;\n\t\t\t\tcase 'ConsumoMixtoLabel':\n\t\t\t\t\tif (!$this->lblConsumoMixto) return $this->lblConsumoMixto_Create();\n\t\t\t\t\treturn $this->lblConsumoMixto;\n\t\t\t\tcase 'PuertasControl':\n\t\t\t\t\tif (!$this->txtPuertas) return $this->txtPuertas_Create();\n\t\t\t\t\treturn $this->txtPuertas;\n\t\t\t\tcase 'PuertasLabel':\n\t\t\t\t\tif (!$this->lblPuertas) return $this->lblPuertas_Create();\n\t\t\t\t\treturn $this->lblPuertas;\n\t\t\t\tcase 'PlazasControl':\n\t\t\t\t\tif (!$this->txtPlazas) return $this->txtPlazas_Create();\n\t\t\t\t\treturn $this->txtPlazas;\n\t\t\t\tcase 'PlazasLabel':\n\t\t\t\t\tif (!$this->lblPlazas) return $this->lblPlazas_Create();\n\t\t\t\t\treturn $this->lblPlazas;\n\t\t\t\tcase 'FilasDeAsientosControl':\n\t\t\t\t\tif (!$this->txtFilasDeAsientos) return $this->txtFilasDeAsientos_Create();\n\t\t\t\t\treturn $this->txtFilasDeAsientos;\n\t\t\t\tcase 'FilasDeAsientosLabel':\n\t\t\t\t\tif (!$this->lblFilasDeAsientos) return $this->lblFilasDeAsientos_Create();\n\t\t\t\t\treturn $this->lblFilasDeAsientos;\n\t\t\t\tcase 'InfoEjesControl':\n\t\t\t\t\tif (!$this->txtInfoEjes) return $this->txtInfoEjes_Create();\n\t\t\t\t\treturn $this->txtInfoEjes;\n\t\t\t\tcase 'InfoEjesLabel':\n\t\t\t\t\tif (!$this->lblInfoEjes) return $this->lblInfoEjes_Create();\n\t\t\t\t\treturn $this->lblInfoEjes;\n\t\t\t\tcase 'PesoControl':\n\t\t\t\t\tif (!$this->txtPeso) return $this->txtPeso_Create();\n\t\t\t\t\treturn $this->txtPeso;\n\t\t\t\tcase 'PesoLabel':\n\t\t\t\t\tif (!$this->lblPeso) return $this->lblPeso_Create();\n\t\t\t\t\treturn $this->lblPeso;\n\t\t\t\tcase 'CapacidadBaulControl':\n\t\t\t\t\tif (!$this->txtCapacidadBaul) return $this->txtCapacidadBaul_Create();\n\t\t\t\t\treturn $this->txtCapacidadBaul;\n\t\t\t\tcase 'CapacidadBaulLabel':\n\t\t\t\t\tif (!$this->lblCapacidadBaul) return $this->lblCapacidadBaul_Create();\n\t\t\t\t\treturn $this->lblCapacidadBaul;\n\t\t\t\tcase 'CapacidadTanqueControl':\n\t\t\t\t\tif (!$this->txtCapacidadTanque) return $this->txtCapacidadTanque_Create();\n\t\t\t\t\treturn $this->txtCapacidadTanque;\n\t\t\t\tcase 'CapacidadTanqueLabel':\n\t\t\t\t\tif (!$this->lblCapacidadTanque) return $this->lblCapacidadTanque_Create();\n\t\t\t\t\treturn $this->lblCapacidadTanque;\n\t\t\t\tcase 'CapacidadCargaControl':\n\t\t\t\t\tif (!$this->txtCapacidadCarga) return $this->txtCapacidadCarga_Create();\n\t\t\t\t\treturn $this->txtCapacidadCarga;\n\t\t\t\tcase 'CapacidadCargaLabel':\n\t\t\t\t\tif (!$this->lblCapacidadCarga) return $this->lblCapacidadCarga_Create();\n\t\t\t\t\treturn $this->lblCapacidadCarga;\n\t\t\t\tcase 'FrenosDelanterosControl':\n\t\t\t\t\tif (!$this->txtFrenosDelanteros) return $this->txtFrenosDelanteros_Create();\n\t\t\t\t\treturn $this->txtFrenosDelanteros;\n\t\t\t\tcase 'FrenosDelanterosLabel':\n\t\t\t\t\tif (!$this->lblFrenosDelanteros) return $this->lblFrenosDelanteros_Create();\n\t\t\t\t\treturn $this->lblFrenosDelanteros;\n\t\t\t\tcase 'FrenosTraserosControl':\n\t\t\t\t\tif (!$this->txtFrenosTraseros) return $this->txtFrenosTraseros_Create();\n\t\t\t\t\treturn $this->txtFrenosTraseros;\n\t\t\t\tcase 'FrenosTraserosLabel':\n\t\t\t\t\tif (!$this->lblFrenosTraseros) return $this->lblFrenosTraseros_Create();\n\t\t\t\t\treturn $this->lblFrenosTraseros;\n\t\t\t\tcase 'NeumaticosControl':\n\t\t\t\t\tif (!$this->txtNeumaticos) return $this->txtNeumaticos_Create();\n\t\t\t\t\treturn $this->txtNeumaticos;\n\t\t\t\tcase 'NeumaticosLabel':\n\t\t\t\t\tif (!$this->lblNeumaticos) return $this->lblNeumaticos_Create();\n\t\t\t\t\treturn $this->lblNeumaticos;\n\t\t\t\tcase 'SuspensionDelanteraControl':\n\t\t\t\t\tif (!$this->txtSuspensionDelantera) return $this->txtSuspensionDelantera_Create();\n\t\t\t\t\treturn $this->txtSuspensionDelantera;\n\t\t\t\tcase 'SuspensionDelanteraLabel':\n\t\t\t\t\tif (!$this->lblSuspensionDelantera) return $this->lblSuspensionDelantera_Create();\n\t\t\t\t\treturn $this->lblSuspensionDelantera;\n\t\t\t\tcase 'SuspensionTraseraControl':\n\t\t\t\t\tif (!$this->txtSuspensionTrasera) return $this->txtSuspensionTrasera_Create();\n\t\t\t\t\treturn $this->txtSuspensionTrasera;\n\t\t\t\tcase 'SuspensionTraseraLabel':\n\t\t\t\t\tif (!$this->lblSuspensionTrasera) return $this->lblSuspensionTrasera_Create();\n\t\t\t\t\treturn $this->lblSuspensionTrasera;\n\t\t\t\tcase 'IdEstadoControl':\n\t\t\t\t\tif (!$this->lstIdEstadoObject) return $this->lstIdEstadoObject_Create();\n\t\t\t\t\treturn $this->lstIdEstadoObject;\n\t\t\t\tcase 'IdEstadoLabel':\n\t\t\t\t\tif (!$this->lblIdEstado) return $this->lblIdEstado_Create();\n\t\t\t\t\treturn $this->lblIdEstado;\n\t\t\t\tcase 'ProcesadaControl':\n\t\t\t\t\tif (!$this->chkProcesada) return $this->chkProcesada_Create();\n\t\t\t\t\treturn $this->chkProcesada;\n\t\t\t\tcase 'ProcesadaLabel':\n\t\t\t\t\tif (!$this->lblProcesada) return $this->lblProcesada_Create();\n\t\t\t\t\treturn $this->lblProcesada;\n\t\t\t\tdefault:\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn parent::__get($strName);\n\t\t\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\t\t\tthrow $objExc;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}", "public function __construct($nome, $email, $mensagem, $tituloAnuncio, $categoriaAnuncio, $nameAnunciante, $telefone ) //oq eles recebem do formulario e do controller\n {\n // os dados aqui e declaramos os atributos em cima do construct e no construct entre () recebemos os\n //parametros do controller\n // e dentro o construct ou seja **aqui ** atualizamos os valores das variáveis\n //que vamos por la em cima\n\n $this->nome = $nome;\n $this->email = $email;\n $this->mensagem = $mensagem;\n $this->tituloAnuncio = $tituloAnuncio ;\n $this->categoriaAnuncio = $categoriaAnuncio ;\n $this->nameAnunciante = $nameAnunciante ;\n $this->telefone = $telefone ;\n\n\n }", "abstract protected function getFormIntroductionFields();", "public function formularioNuevo(){\n\t\t$template = file_get_contents('tpl/proyecto_form_tpl.html');\n\t\t$tipos = $this->listaTipos();\n\t\t$tipos_proy = '<select name=\"tipo_proyecto\" size=\"1\" size=\"10\" id=\"tipo_proyecto\">';\n\t\tforeach($tipos as $key => $tipo){\n\t\t\t$tipos_proy = $tipos_proy.'<option value=\"'.utf8_encode($tipo['gral_param_propios']['GRAL_PAR_PRO_COD']).'\">'.\n\t\t\t\t\t\t utf8_encode($tipo['gral_param_propios']['GRAL_PAR_PRO_DESC']).'</option>';\n\t\t}\n\t\t$tipos_proy = $tipos_proy.'</select >';\n\t\t$template = str_replace('{proyecto_tipo}', $tipos_proy, $template);\n print($template);\n\t}", "function getFormFieldNamesJson() {\n\t\t\treturn $this->getCoreHelper( )->jsonEncode( $this->getFormFieldNames( ) );\n\t\t}", "function obtenerDataForm( $pairs ){\r\n\t\t$dataform = array();\r\n\t\t//Chequeo por pares (campo=valor),(campo=valor),...,(campo=valor)\r\n\t\tforeach ( $pairs as $i ) {\r\n\t\t\tlist( $name, $value ) = explode( '=', $i, 2 );\r\n\t\t\t$par[\"f\"] = urldecode( $name );\r\n\t\t\t$par[\"v\"] = urldecode( $value );\r\n\t\t\t$dataform[] = $par;\r\n\t\t}\r\n\t\t//$dataform = insertarFecha( $dataform );\r\n\t\treturn $dataform;\r\n\t}" ]
[ "0.64029264", "0.6207173", "0.6113303", "0.6057076", "0.6051551", "0.6029386", "0.601214", "0.5936789", "0.5917821", "0.5832835", "0.58186036", "0.58098", "0.58042717", "0.5802802", "0.5800592", "0.5800592", "0.57874703", "0.5774952", "0.5760843", "0.57544863", "0.574601", "0.57441396", "0.572849", "0.57190394", "0.57098436", "0.5695391", "0.5664706", "0.5664706", "0.5660021", "0.5630747", "0.5612492", "0.56122535", "0.5610442", "0.5600358", "0.5593335", "0.5589589", "0.558901", "0.5588378", "0.5575367", "0.5575134", "0.55717885", "0.55658895", "0.55653083", "0.55532765", "0.5551972", "0.5551972", "0.5540737", "0.55360234", "0.55348426", "0.55315983", "0.55254054", "0.5521547", "0.5520212", "0.5509245", "0.54992765", "0.54992765", "0.549602", "0.54945856", "0.54921347", "0.54911053", "0.5485692", "0.54855895", "0.54834694", "0.5480676", "0.5469969", "0.54677397", "0.54672", "0.5463198", "0.54577804", "0.54548544", "0.54516816", "0.5449745", "0.54494804", "0.54430777", "0.5440936", "0.5437413", "0.54202074", "0.54189694", "0.541625", "0.54109424", "0.5409596", "0.5406375", "0.53997314", "0.538017", "0.5377741", "0.5374642", "0.5374517", "0.53731024", "0.53626233", "0.536251", "0.53578794", "0.5355081", "0.53391707", "0.5337179", "0.53346866", "0.5332719", "0.5326078", "0.53259706", "0.5316334", "0.531532", "0.5313845" ]
0.0
-1
Notification Envoyer les identifiants
private function renderMAIL_9_HTML($mod) { $aff = '<div id="search-wrap">'; $aff .= '<div class="slide">'; $aff .= '<img src="../../include/images/1.png" border="0"/> <a class="btn-slide-mail-9" href="#">Notification Envoyer les identifiants</a>'; $aff .= '</div>'; $aff .= '<div id="mail-9-panel" style="display: none;">'; $aff .= ' <table width="100%" border="1">'; $aff .= ' <tr>'; $aff .= ' <td width="120" valign="top">Adresse emetteur</td>'; $aff .= ' <td><input type="text" style="width: 100%" name="MailFrom_9" value="' . stripslashes ( $this->myMail_9->getMailFrom () ) . '"/></td>'; $aff .= ' </tr>'; $aff .= ' <tr>'; $aff .= ' <td width="120" valign="top">Sujet / Objet</td>'; $aff .= ' <td><input type="text" style="width: 100%" name="MailSubject_9" value="' . stripslashes ( $this->myMail_9->getMailSubject () ) . '" /></td>'; $aff .= ' </tr>'; $aff .= ' <tr>'; $aff .= ' <td width="120" valign="top">Entete</td>'; $aff .= ' <td>'; include_once ("../../../../include/js/fckeditor/fckeditor.php"); $oFCKeditor = new FCKeditor ( 'MailHeader_9' ); $oFCKeditor->BasePath = "../../../../include/js/fckeditor/"; $oFCKeditor->Width = "100%"; $oFCKeditor->Height = "200"; // $oFCKeditor->ToolbarSet = "Basic"; $oFCKeditor->Value = stripslashes ( $this->myMail_9->getMailHeader () ); $aff .= $oFCKeditor->CreateHtml (); $aff .= '</td>'; $aff .= ' </tr>'; $aff .= ' <tr>'; $aff .= ' <td width="120" valign="top">Pied</td>'; $aff .= ' <td>'; include_once ("../../../../include/js/fckeditor/fckeditor.php"); $oFCKeditor = new FCKeditor ( 'MailFooter_9' ); $oFCKeditor->BasePath = "../../../../include/js/fckeditor/"; $oFCKeditor->Width = "100%"; $oFCKeditor->Height = "200"; // $oFCKeditor->ToolbarSet = "Basic"; $oFCKeditor->Value = stripslashes ( $this->myMail_9->getMailFooter () ); $aff .= $oFCKeditor->CreateHtml (); $aff .= '</td>'; $aff .= '</tr>'; $aff .= ' </table>'; $aff .= '</div>'; $aff .= '</div>'; return $aff; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function track_identity()\n {\n }", "public function getIdentificacao();", "public function getIdentifiers();", "public function getAllIdentifiers() {}", "public function identificacionegresado(){\n \treturn $this->embedsOne('encuestas\\identificacionEgresado');\n }", "public function Enviocertificados($id)\n {\n $asistencias = Asistente::where('evento_id',$id)->get();\n foreach ($asistencias as $asistencia) {\n $asistencia->usuarios->notify(new UsuarioNuevo());\n }\n return redirect()->route('asistentes')->withStatus(__('Mensajes enviados con éxito.'));\n }", "public function getIdentities()\n {\n }", "function identification(){\n\t\t//$db = $connection->testFW;\n\t\t//var_dump($db);\n\t\t$this->display(\"carnet.tpl\");\n\t\t$this->display(\"contact.tpl\");\n\t\t//$user = new M_users();\n\n\t\t$Oident = Oscar_Identification_2::getInstance();\n\t\t\n\t\t//$refUser = $user->findOne( array( \"_id\"=>new MongoId( $Oident->get_private_data( \"id_mongo\" ) ) ));\n\t\t//var_dump($refUser);\n\n\t\t$this->stop_layout();\n\t\t\n\t\t\t\t\n\t\t/*\n\t\t if( ( isset($this->CPOST[\"login_identitfiant\"])) && ( isset ($this->CPOST[\"password_identifiant\"]))){\n\t\t\techo \"il y a bien une valeur\";\n\t\t\t$Oident->identify($login);\t\n\t\t\t$this = new Smarty_factory();\n\n\t\t\t $this->display(\"carnet.html\",array(\n\t\t\t\t\t\"login\" => $login,\n\t\t\t\t\t\"mot_de_pass\" => $mdp,\n\n\t\t\t\t ));\n\t\t}\n\t\telse {\n\t\t\tvar_dump(\"il n'y a pas d'envoie de donnee\");\n\t\t}\n\t\t*/\n\n\n\t}", "function setup_notifelms() {\n\n\tglobal $AccountId, $DefaultNotificationElms, $DB;\n\n\t$ids = array();\n\t$insert_failure = false;\n\tif(!is_numeric($AccountId) || $AccountId < 1) {\n\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\techo \"Invalid account id\\n\";\n\t\t}\n\t\treturn $ids;\n\t}\n\n\tforeach($DefaultNotificationElms as $idx => $elmdata) {\n\t\t$sql = \"INSERT INTO NotificationElm (Id, TypeId, AccId, Name, ElmId, Height, Width, Style, DisplayOrder, InnerHtml, DisplayNotifCount, Active, Del) VALUES\n\t\t\t\t(NULL, (SELECT Id FROM NotificationElmType WHERE Type = '{$elmdata[\"type\"]}'), {$AccountId}, '{$elmdata[\"name\"]}', '{$elmdata[\"id\"]}', '{$elmdata[\"h\"]}',\n\t\t\t\t'{$elmdata[\"w\"]}', NULL, '{$elmdata[\"display\"]}', NULL, '{$elmdata[\"count\"]}', 1, 0)\";\n\t\tif(!$DB->Query($sql)) {\n\t\t\tif(ADMIN_DEBUG_MODE === true) {\n\t\t\t\techo \"Elm Insert Failure: {$DB->GetLastErrorMsg()}\\n\";\n\t\t\t}\n\t\t\t$insert_failure = true;\n\t\t} else {\n\t\t\t$ids[] = $DB->GetLastInsertedId();\n\t\t}\n\n\t\tif($elmdata[\"attribs\"] === true) {\n\t\t\tif(!add_elm_attributes($DB->GetLastInsertedId())) {\n\t\t\t\techo \"****Failed to add attribs for elm id: {$DB->GetLastInsertedId()}\\n\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif($insert_failure) {\n\t\t$tmp = var_export($ids, true);\n\t\techo \"*****************\\nExperienced Insert Failure!. Data:\\n{$tmp}\\n******************\\n\";\n\t}\n\n\treturn $ids;\n}", "public function broadcastOn()\n {\n $user = $this->user;\n \n return [$user->id];\n }", "public function getIdentifiant()\n {\n return $this->identifiant;\n }", "public function getNotificationNids(): array;", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function getUsersToNotifyOfTokenGiven() {\n return array(\n $this->getAuthorPHID(),\n );\n }", "private function onboardUsers()\n {\n foreach ($this->users as $user) {\n $token = $user->generateMagicToken();\n $user->sendNotification(new OnboardEmail($user, $token));\n }\n }", "public function accept_all()\n {\n $ids = $_POST['ids'];\n foreach ($ids as $id) {\n $accepted = EventMobile::find($id);\n $accepted->update(['event_status_id' => 2]);\n $accepted->save();\n //Notify Each event owner\n $event_owner = $accepted->user;\n if ($event_owner) {\n $notification_message['en'] = 'YOUR EVENT IS APPROVED';\n $notification_message['ar'] = 'تم الموافقة على الحدث';\n $notification = $this->NotifcationService->save_notification($notification_message, 3, 4, $accepted->id, $event_owner->id);\n $this->NotifcationService->PushToSingleUser($event_owner, $notification);\n }\n //get users have this event in their interests\n $this->NotifcationService->EventInterestsPush($accepted);\n }\n\n }", "protected function IdUserListReproduction ()\n {\n $lista = Model_listas::find('all', array\n (\n 'where' => array\n (\n array('id_usuario'=>$this->userID()),\n array('titulo'=>'reproducidas')\n )\n ));\n if(!empty($lista))\n {\n $id=0;\n foreach ($lista as $key => $value)\n {\n $id = $lista[$key]->id;\n } \n return $id; \n }\n }", "public function marcarComoLeidos()\n {\n //pendiente por extraer el id del usuario logeado\n $notificaciones = Notificaciones::where('visto', false)->get();\n foreach ($notificaciones as $notificacion)\n {\n $notificacion->visto = true;\n $notificacion->save();\n }\n return redirect()\n ->back()\n ->with(\"succes\",\"Notificaciones vistas.\");\n }", "public function contarInventario(){\n\t}", "public function getIds()\n {\n\n }", "protected function onData($data)\n {\n $this->_identifiers = UserIdentifiers::make($this->client, $data);\n }", "public function index()\n {\n $userss = User::where('role_id','=','2')->get();\n foreach($userss as $userwithrole) {\n $userwithrole->notify(new NotifyUsersMeeting());\n event(new eventTrigger($userwithrole));\n //$userwithrole->notify(new NotifyUsersMeeting($userwithrole));\n }\n //$users = DB::table('users')->where('role_id', 2)->get();\n //$users = Auth::user();\n //$users->notify(new NotifyUsersMeeting());\n //notify(new NotifyUsersMeeting());\n //event(new eventTrigger());\n return redirect('home');\n }", "public function getIdentifiers()\n {\n return $this->init()->_identifiers;\n }", "public function senderIdManagement()\n {\n\n $all_sender_id = SenderIdManage::where('status', 'unblock')->orWhere('status', 'Pending')->get();\n $all_ids = [];\n\n foreach ($all_sender_id as $sid) {\n $client_array = json_decode($sid->cl_id);\n\n if (isset($client_array) && is_array($client_array) && in_array('0', $client_array)) {\n array_push($all_ids, $sid->id);\n } elseif (isset($client_array) && is_array($client_array) && in_array(Auth::guard('client')->user()->id, $client_array)) {\n array_push($all_ids, $sid->id);\n }\n }\n $sender_ids = array_unique($all_ids);\n\n $sender_id = SenderIdManage::whereIn('id', $sender_ids)->get();\n\n return view('client.sender-id-management', compact('sender_id'));\n }", "public function getIds() {\n\t\treturn array_keys($this->registered);\n\t}", "public function broadcastOn()\n {\n return [$this->reciever_id];\n }", "public function register_notifications();", "public function broadcastOn()\n {\n return [\"user.{$this->user->id}\"];\n }", "public function should_track_identity()\n {\n }", "public function invites();", "function getEventIDs() {\n\t\t$return = array();\n\n\t\tif ( $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$return[] = $oObject->getID();\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "public function broadcastOn()\n {\n return ['user.'.\\Authorizer::getResourceOwnerId()];\n }", "public function getEntreprises_id()\n {\n return $this->entreprises_id;\n }", "public function sigLeadershipsIds()\n {\n return $this->sigs()->where('main', 1)->lists('id')->toArray();\n }", "function getUserIds() {\n\t\t$charIds = $this->getCharIds();\n\t\t$idsToReturn = array();\n\t\tforeach ($charIds as $id) {\n\t\t\n\t\t\t$idsToReturn[] = getOneThing(\"playedby\", \"gamestate_characters\", \"id=$id and gameid=$this->gameId\");\n\t\t\n\t\t}\n\t\tdbug(\"getUserIds is about to return \".implode(\", \", $idsToReturn));\n\t\treturn $idsToReturn;\n\t}", "public function iniciar() {\r\n session_regenerate_id();\r\n }", "public function getID(): string {\n\t\treturn 'admin_notifications';\n\t}", "function identifyUser() {\n}", "public function setNotificacion(array $datos) {\r\n $consulta = $this->insertar('t_notificaciones', $datos);\r\n return parent::connectDBPrueba()->insert_id();\r\n }", "public function getIdNotificacion() {\n\t\treturn $this->idNotificacion;\n\t}", "public function getIds();", "public function getIds();", "public static function sendUserNotification()\n {\n $con = $GLOBALS[\"con\"];\n $sqlGetCount = \"SELECT staff_id, notification_counter from user\";\n $result = mysqli_query($con, $sqlGetCount);\n while ($row = mysqli_fetch_assoc($result)) {\n $count = 1;\n $count += (int)$row['notification_counter'];\n $user = $row['staff_id'];\n $sqlAddCount = \"update user set notification_counter = $count where staff_id = $user\";\n mysqli_query($con, $sqlAddCount);\n }\n }", "public function getIdfa();", "public function broadcastOn()\n {\n return ['ticket_'.$this->ticket->id];\n }", "public function eventisegnalati(){\r\n $query = \"SELECT DISTINCT idev FROM segnalazione \";\r\n\t\t$result = self::$conn->query($query);\r\n $id = array();\r\n if($result){\r\n while($row = $result->fetch_assoc()){\r\n $id[] = $row['idev']; \r\n }\r\n }\r\n return $id;\r\n }", "public function mesInscrAction($id,Request $request) {\n \n if ($request->getSession()->get('email') == null) {\n return $this->pageErreur(\"Vous devez être connecté pour accèder à ce lien\");\n } \n \n $em = $this->getDoctrine()->getManager();\n $saison = new Saison;\n $year = $saison->connaitreSaison();\n $saison = $em->getRepository('SC\\ActiviteBundle\\Entity\\Saison')->findOneByAnnee($year);\n $activite = $em->getRepository('SC\\ActiviteBundle\\Entity\\Activite')->find($id);\n $parents = $em->getRepository('SC\\UserBundle\\Entity\\User')->findOneByEmail($request->getSession()->get('email'));\n $listEnfants = $em->getRepository('SC\\UserBundle\\Entity\\Enfant')->findBy(array('userParent' => $parents));\n \n $mesSorties = $em->getRepository('SC\\ActiviteBundle\\Entity\\InscriptionSortie')->jointureSortieInscriptionSortie($id,$request->getSession()->get('email'),$year);\n return $this->render('SCUserBundle:Security:mesSorties.html.twig', array('activite'=> $activite, 'mesSorties' => $mesSorties,'saison' => $year ));\n }", "function mostrarUsuario($id) {\n //Llamamos a la variable agenda\n global $agenda;\n //Obtenemos el id de la variable agenda\n $usuario = $agenda[$id];\n foreach($usuario as $user) {\n echo $user . '<br/>';\n }\n }", "function get_author_user_ids()\n {\n }", "public function showlisteannoncepro()\n {\n $userauth = JWTAuth::parseToken()->authenticate();\n $obj = json_decode($userauth , true);\n $first = array_values($obj)[0];\n $annonces = Annonce::where('users_id', $first )->get();\n return $annonces;\n \n }", "protected function insert() {\n\t\tglobal $wgEchoNotifications;\n\n\t\t$notifMapper = new NotificationMapper();\n\n\t\t$services = MediaWikiServices::getInstance();\n\t\t$hookRunner = new HookRunner( $services->getHookContainer() );\n\t\t// Get the bundle key for this event if web bundling is enabled\n\t\t$bundleKey = '';\n\t\tif ( !empty( $wgEchoNotifications[$this->event->getType()]['bundle']['web'] ) ) {\n\t\t\t$hookRunner->onEchoGetBundleRules( $this->event, $bundleKey );\n\t\t}\n\n\t\tif ( $bundleKey ) {\n\t\t\t$hash = md5( $bundleKey );\n\t\t\t$this->bundleHash = $hash;\n\t\t}\n\n\t\t$notifUser = NotifUser::newFromUser( $this->user );\n\n\t\t// Add listener to refresh notification count upon insert\n\t\t$notifMapper->attachListener( 'insert', 'refresh-notif-count',\n\t\t\tstatic function () use ( $notifUser ) {\n\t\t\t\t$notifUser->resetNotificationCount();\n\t\t\t}\n\t\t);\n\n\t\t$notifMapper->insert( $this );\n\n\t\tif ( $this->event->getCategory() === 'edit-user-talk' ) {\n\t\t\t$services->getTalkPageNotificationManager()\n\t\t\t\t->setUserHasNewMessages( $this->user );\n\t\t}\n\t\t$hookRunner->onEchoCreateNotificationComplete( $this );\n\t}", "public function obtenerId() {}", "public function all_user_connected() {\n try\n {\n $max_last_ping = time() - 31;\n $stmt = $this->db->prepare(\"SELECT * FROM connected_user WHERE last_ping > :last_ping\");\n $stmt->execute(array(\n 'last_ping' => $max_last_ping\n ));\n\n while($result = $stmt->fetch()) {\n $listid[] = $result['id_user'];\n }\n \n return $listid;\n }\n catch(PDOException $e) {\n die('<h1>ERREUR LORS DE LA CONNEXION A LA BASE DE DONNEE. <br />REESAYEZ ULTERIEUREMENT</h1>');\n }\n }", "public function executeNewIdentification(sfWebRequest $request)\n {\n\t $this->split_id = $request->getParameter('id','0') ;\n\t $this->origin_id = $request->getParameter('split_created','0') ;\n\t $userName=Doctrine_Query::create()->\n\t\t\tselect('u.formated_name')->\n\t\t\tfrom('Users u')->\n\t\t\twhere('u.id = ?', $this->getUser()->getId())->fetchOne();\n\t $this->label_author= $userName;\n \n }", "public function getIdentitas() {\n return view('applicant.identitas');\n }", "public static function\tIdentifiers()\n {\n $accesses = array(self::TypePublic);\n\n if (Cache::Exist(\"user\") == false)\n\treturn $accesses;\n\n $user = Cache::Get(\"user\");\n\n $accesses[] = $user->id;\n\n foreach (self::$entities as $entity)\n\t{\n\t // XXX[we could perform theses operations in parallel to speed up the process]\n\t $access = call_user_func($entity . \"::Access\", $user->id);\n\n\t if (empty($access) == true)\n\t continue;\n\n\t foreach ($access as $object)\n\t $accesses[] = $object[\"id\"];\n\t}\n\n return $accesses;\n }", "public function getIdentifiers()\n {\n return $this->identifiers;\n }", "public function getIdentity();", "public function getIdUsers()\n {\n return $this->idUsers;\n }", "public function getIdUsers()\n {\n return $this->idUsers;\n }", "public function getIdUsers()\n {\n return $this->idUsers;\n }", "public function getIdUsers()\n {\n return $this->idUsers;\n }", "public function idinformacion(){\n\t\treturn $this->_idinformacion;\n\t}", "function trouver_nombre_notification($id_auteur) {\n return sql_countsel('spip_notifications', 'id_auteur = '.intval($id_auteur).' AND lu != 1');\n}", "public function getId() {}", "public function getId() {}", "public function userActivated($request)\n {\n $adminsID = User::select('id')->where('role_id', '=', Roles::where('name', '=', 'admin')->value('id'))->get();\n foreach($adminsID as $thisAdmin)\n {\n $data = ['UserActivatedID'=>$request['id'] ,'UserActivatedName'=>$request['name']]; //fill data array\n $notif = ['type'=>'UserActivated', 'user_id' => $thisAdmin->id, 'data'=> json_encode($data)]; //fill notif array\n $this->store($notif); //call store function\n }\n\n //notify sponsor\n $sponsor_id = Sponsorships::where('user_id', '=', $request['id'])->value('sponsor_id');\n $sponsor_type = Roles::where('id', '=', User::where('id', '=', $sponsor_id)->value('role_id'))->value('name');\n if (strtoupper($sponsor_type) != 'ADMIN')\n {\n $data = ['UserActivatedID'=>$request['id'] ,'UserActivatedName'=>$request['name']]; //fill data array\n $notif = ['type'=>'UserActivated', 'user_id' => $sponsor_id, 'data'=> json_encode($data)]; //fill notif array\n $this->store($notif); //call store function\n }\n }", "public function getId() ;", "public function getNewInsertedIdProviders()\n\t{\n\t\t$newInsertedId = $GLOBALS['xoopsDB']->getInsertId();\n\t\treturn $newInsertedId;\n\t}", "public function setNameAndId() {}", "public function revisionIds(SemillaInterface $entity);", "public function getNewsletterRecipientIDs();", "public function obtenerID();", "public function inscrire(){\r\n $nb = 0 ;\r\n $pseudo = $this -> getPseudo();\r\n $q = \"update UserTab set User_inscrit = 1 where User_pseudo = '\".$pseudo.\"'\";\r\n $nb = execute($q) ;\r\n \r\n return $nb ;\r\n\r\n }", "public function execute_and_get_ids()\n {\n }", "abstract public function getIdent();", "function get_nonauthor_user_ids()\n {\n }", "public function getAllIds();", "public function getID()\n {\n return $this->idUsuario;\n }", "public function broadcastOn()\n {\n return ['new-message'.$this->for_user_id];\n }", "public function getIdentities()\n {\n return [\\Blackbird\\TicketBlaster\\Model\\Event::CACHE_TAG . '_' . 'list'];\n }", "public function authorize(): void\n {\n $loop = $this->getLoop();\n\n $command = new Identify($this, $loop);\n $command->execute(null);\n\n $this->getLoop()->addPeriodicTimer($this->getInterval(), [\n $this,\n 'heartbeat',\n ]);\n\n $this->status = self::STATUS_AUTHED;\n }", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function id();", "public function listId() {\n\t\treturn $this->academic_session->all()->pluck('id')->all();\n\t}", "public function getIdentityProperties() {}", "public function listar_anuncios_interessadosByUser(){\n if(!isset($_SESSION))session_start();\n\n $cliente = unserialize($_SESSION['cliente']);\n\n return $this->anunciosDAO->selectAllInteresadosByUser($cliente->getId());\n }" ]
[ "0.6605985", "0.6417686", "0.6006635", "0.59828424", "0.59376496", "0.5912661", "0.58113474", "0.57518643", "0.57021564", "0.56763685", "0.5639466", "0.56240064", "0.55523497", "0.55523497", "0.55523497", "0.55523497", "0.55523497", "0.55523497", "0.55523497", "0.55523497", "0.5521958", "0.55152035", "0.5514093", "0.5488777", "0.5480562", "0.5469784", "0.54621404", "0.54109526", "0.5407452", "0.53656256", "0.5344456", "0.53248453", "0.53209275", "0.53017807", "0.53001875", "0.5299565", "0.5288563", "0.5271286", "0.52701414", "0.5252362", "0.52466965", "0.5244957", "0.5236539", "0.52215725", "0.52156", "0.5210954", "0.52108616", "0.52095425", "0.52095425", "0.5206904", "0.5206369", "0.51979554", "0.51965195", "0.51855993", "0.51848704", "0.51807654", "0.5178149", "0.5175469", "0.51734203", "0.51724106", "0.5169676", "0.5162294", "0.5157207", "0.5155652", "0.51451635", "0.5133746", "0.5133746", "0.5133746", "0.5133746", "0.5133377", "0.51281893", "0.512497", "0.512497", "0.51231694", "0.5112802", "0.511138", "0.5110299", "0.51040614", "0.5100271", "0.5097584", "0.50931114", "0.5082266", "0.507704", "0.50763404", "0.5064941", "0.50576806", "0.50573635", "0.50481105", "0.504605", "0.5043775", "0.5043775", "0.5043775", "0.5043775", "0.5043775", "0.5043775", "0.5043775", "0.5043775", "0.5043775", "0.5042452", "0.5036854", "0.5022412" ]
0.0
-1
Notification Envoyer Relance Satisfaction
private function renderMAIL_10_HTML($mod) { $aff = '<div id="search-wrap">'; $aff .= '<div class="slide">'; $aff .= '<img src="../../include/images/1.png" border="0"/> <a class="btn-slide-mail-10" href="#">Phase Satisfaction - Relance Questionnaire</a>'; $aff .= '</div>'; $aff .= '<div id="mail-10-panel" style="display: none;">'; $aff .= ' <table width="100%" border="1">'; $aff .= ' <tr>'; $aff .= ' <td width="120" valign="top">Adresse emetteur</td>'; $aff .= ' <td><input type="text" style="width: 100%" name="MailFrom_10" value="' . stripslashes ( $this->myMail_10->getMailFrom () ) . '"/></td>'; $aff .= ' </tr>'; $aff .= ' <tr>'; $aff .= ' <td width="120" valign="top">Sujet / Objet</td>'; $aff .= ' <td><input type="text" style="width: 100%" name="MailSubject_10" value="' . stripslashes ( $this->myMail_10->getMailSubject () ) . '" /></td>'; $aff .= ' </tr>'; $aff .= ' <tr>'; $aff .= ' <td width="120" valign="top">Entete</td>'; $aff .= ' <td>'; include_once ("../../../../include/js/fckeditor/fckeditor.php"); $oFCKeditor = new FCKeditor ( 'MailHeader_10' ); $oFCKeditor->BasePath = "../../../../include/js/fckeditor/"; $oFCKeditor->Width = "100%"; $oFCKeditor->Height = "200"; // $oFCKeditor->ToolbarSet = "Basic"; $oFCKeditor->Value = stripslashes ( $this->myMail_10->getMailHeader () ); $aff .= $oFCKeditor->CreateHtml (); $aff .= '</td>'; $aff .= ' </tr>'; $aff .= ' <tr>'; $aff .= ' <td width="120" valign="top">Pied</td>'; $aff .= ' <td>'; include_once ("../../../../include/js/fckeditor/fckeditor.php"); $oFCKeditor = new FCKeditor ( 'MailFooter_10' ); $oFCKeditor->BasePath = "../../../../include/js/fckeditor/"; $oFCKeditor->Width = "100%"; $oFCKeditor->Height = "200"; // $oFCKeditor->ToolbarSet = "Basic"; $oFCKeditor->Value = stripslashes ( $this->myMail_10->getMailFooter () ); $aff .= $oFCKeditor->CreateHtml (); $aff .= '</td>'; $aff .= '</tr>'; $aff .= ' </table>'; $aff .= '</div>'; $aff .= '</div>'; return $aff; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function notify() {\n if ($this->active_invoice->isLoaded()) {\n if ($this->active_invoice->canResendEmail($this->logged_user)) {\n $company = $this->active_invoice->getCompany();\n if(!($company instanceof Company)) {\n $this->response->operationFailed();\n } // if\n \n $issue_data = $this->request->post('issue', array(\n 'issued_on' => $this->active_invoice->getIssuedOn(),\n 'due_on' => $this->active_invoice->getDueOn(),\n 'issued_to_id' => $this->active_invoice->getIssuedToId()\n ));\n \n $this->response->assign('issue_data', $issue_data);\n \n if ($this->request->isSubmitted()) {\n try {\n if($this->active_invoice->isIssued()) {\n $this->active_invoice->setDueOn($issue_data['due_on']);\n } // if\n \n $resend_to = isset($issue_data['user_id']) && $issue_data['user_id'] ? Users::findById($issue_data['user_id']) : null;\n \n if($issue_data['send_emails'] && $resend_to instanceof IUser) {\n $this->active_invoice->setIssuedTo($resend_to);\n \n $recipients = array($resend_to);\n\n AngieApplication::notifications()\n ->notifyAbout('invoicing/invoice_reminder', $this->active_invoice)\n ->sendToUsers($recipients, true);\n } // if\n \n $this->active_invoice->save();\n \n $this->response->respondWithData($this->active_invoice, array(\n 'detailed' => true, \n \t'as' => 'invoice'\n ));\n \t} catch (Exception $e) {\n \t DB::rollback('Failed to resend email @ ' . __CLASS__);\n \t $this->response->exception($e);\n \t} // try\n } // if\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n }", "public function actionCheckwarranty()\n {\n $repairs = new Repair();\n $repairs = $repairs->getRepairOutWarranty();\n\n if (sizeof($repairs)>0){\n\n $body = \"Foi detetado que algumas reparações estão prestes a terminar a garantia nos próximos <b>5 dias</b>. <br/><br/>\n Aceda ao portal em <a href=\\\"http://sat.toquereservado.pt/backend/web/warning/warranty\\\">www.sat.toquereservado.pt</a> para identificar e resolver o problema das seguintes reparações:\n <br/>\n <ul>\n \";\n\n foreach($repairs as $row) {\n $body.='\n <li>\n <a href=\"http://sat.toquereservado.pt/backend/web/warning/warranty?SearchRepair%5Bid_repair%5D='.$row[\"id_repair\"].'&SearchRepair%5Bstore_id%5D=&SearchRepair%5Bequip%5D=&SearchRepair%5Bmodel%5D=&SearchRepair%5Brepair_desc%5D=&SearchRepair%5Bclient%5D=&SearchRepair%5Bdate_entry%5D=&SearchRepair%5Bdatediff%5D=\">'.$row[\"id_repair\"].'</a>\n </li>\n ';\n }\n\n $body.=\"</ul>\";\n\n //echo $body; \n\n $to = \\Yii::$app->params[\"adminEmail\"];\n $from = \\Yii::$app->params[\"adminEmail\"];\n $subject = \"Garantia a expirar\";\n\n $name='=?UTF-8?B?'.base64_encode(\"Sistema de Gestão de ToqueReservado\").'?=';\n $subject='=?UTF-8?B?'.base64_encode($subject).'?=';\n $headers=\"From: $name <{$from}>\\r\\n\".\n \"Reply-To: {$to}\\r\\n\".\n \"MIME-Version: 1.0\\r\\n\".\n \"Content-Type: text/html; charset=UTF-8\";\n\n mail($to,$subject,$body,$headers);\n }\n }", "public function api_entry_sendnotification() {\n parent::validateParams(array('sender', 'receiver', 'subject'));\n\n if(!$this->Mdl_Users->get($_POST['sender'])) parent::returnWithErr(\"Sender is not valid\");\n if(!$this->Mdl_Users->get($_POST['receiver'])) parent::returnWithErr(\"Receiver is not valid\");\n\n $sender = $this->Mdl_Users->get($_POST['sender']);\n $receiver = $this->Mdl_Users->get($_POST['receiver']);\n\n unset($sender->password);\n unset($receiver->password);\n\n if ($_POST['subject'] == \"ipray_sendinvitation\") {\n $msg = $sender->username . \" has invited you.\";\n }\n else if ($_POST['subject'] == \"ipray_acceptinvitation\") {\n $msg = $sender->username . \" has accepted your invitation.\";\n\n // sender ---> receiver \n $this->Mdl_Users->makeFriends($_POST[\"sender\"], $_POST[\"receiver\"]);\n }\n else if ($_POST['subject'] == \"ipray_rejectinvitation\") {\n $msg = $sender->username . \" has rejected your invitation.\";\n }\n else if ($_POST['subject'] == 'ipray_sendprayrequest') {\n parent::validateParams(array('request'));\n }\n else if ($_POST['subject'] == 'ipray_acceptprayrequest') {\n parent::validateParams(array('request'));\n }\n else if ($_POST['subject'] == 'ipray_rejectprayrequest') {\n parent::validateParams(array('request'));\n }\n else {\n parent::returnWithErr(\"Unknown subject is requested.\");\n }\n\n if (!isset($receiver->devicetoken) || $receiver->devicetoken == \"\")\n parent::returnWithErr(\"User is not available at this moment. Please try again later.\");\n\n $payload = array(\n 'sound' => \"default\",\n 'subject' => $_POST['subject'],\n 'alert' => $msg,\n 'sender' => $sender,\n 'receiver' => $receiver\n );\n\n if (($failedCnt = $this->qbhelper->sendPN($receiver->devicetoken, json_encode($payload))) == 0) {\n $this->load->model('Mdl_Notifications');\n $this->Mdl_Notifications->create(array(\n 'subject' => $_POST['subject'],\n 'message' => $msg,\n 'sender' => $sender->id,\n 'receiver' => $receiver->id\n ));\n\n parent::returnWithoutErr(\"Contact request has been sent successfully.\");\n }\n else {\n parent::returnWithErr($failedCnt . \" requests have not been sent.\");\n }\n \n }", "private function notifyORS() {\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/ORSNotification.php');\r\n\r\n $piDetails = $this->getPIDisplayDetails();\r\n $piName = $piDetails['firstName'] . \" \" . $piDetails['lastName'];\r\n\r\n $subject = sprintf('[TID-%s] Tracking form submitted online [%s]', $this->trackingFormId, $piName);\r\n $emailBody = sprintf('A tracking form was submitted online :\r\n\r\nTracking ID : %s\r\nTitle : \"%s\"\r\nPrincipal Investigator : %s\r\nDepartment : %s\r\n\r\n', $this->trackingFormId, $this->projectTitle, $piName, $piDetails['departmentName']);\r\n\r\n $ORSNotification = new ORSNotification($subject, $emailBody);\r\n try {\r\n $ORSNotification->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send email notification to ORS : '. $e);\r\n }\r\n }", "public function notifyPayment()\n {\n }", "public function notify_members() {\n $from = array($this->site->user->email, $this->site->user->name());\n $subject = Kohana::lang('finance_reminder.charge.subject');\n if ($this->site->collections_enabled()) {\n $message = Kohana::lang('finance_reminder.charge.message_finances');\n }\n else {\n $message = Kohana::lang('finance_reminder.charge.message_basic');\n }\n\n foreach ($this->finance_charge_members as $member) {\n if ( ! $member->paid) {\n $replacements = array(\n '!name' => $member->user->name(),\n '!due_date' => date::display($member->due, 'M d, Y', FALSE),\n '!due_amount' => money::display($member->balance()),\n '!charge_title' => $member->title,\n '!pay_link' => url::base(),\n );\n $email = array(\n 'subject' => strtr($subject, $replacements),\n 'message' => strtr($message, $replacements),\n );\n email::announcement($member->user->email, $from, 'finance_charge_reminder', $email, $email['subject']);\n }\n }\n return TRUE;\n }", "public function notificationsafeenvrnmnt(){\n $this->load->model('resident/maintainsafeenvironment_model', 'seadl');\n return $this->seadl->safeenvrnmntnotifications();\n //return false;\n }", "public function accept_frnd_req($frnd_id) {\n $userid = $this->session->userdata('logged_in')['id'];\n $data = array(\n 'user_approved' => 1,\n 'active' => 1,\n 'req_accepted' => date('Y-m-d H:i:s')\n );\n $this->Friendsmodel->accept_frnd_req($frnd_id, $userid, $data);\n $data1 = array(\n 'resourse_approved' => 1,\n 'active' => 1,\n 'req_accepted' => date('Y-m-d H:i:s')\n );\n $this->Friendsmodel->accept_frnd_req($userid, $frnd_id, $data1);\n add_notification($frnd_id, $userid,'has accepted your friend request');\n }", "public function sendEmailVerificationNotification();", "public function notifyOwner()\n {\n global $config, $reefless, $account_info;\n\n $reefless->loadClass('Mail');\n\n $mail_tpl = $GLOBALS['rlMail']->getEmailTemplate(\n $config['listing_auto_approval']\n ? 'free_active_listing_created'\n : 'free_approval_listing_created'\n );\n\n if ($config['listing_auto_approval']) {\n $link = $reefless->getListingUrl(intval($this->listingID));\n } else {\n $myPageKey = $config['one_my_listings_page'] ? 'my_all_ads' : 'my_' . $this->listingType['Key'];\n $link = $reefless->getPageUrl($myPageKey);\n }\n\n $mail_tpl['body'] = str_replace(\n array('{username}', '{link}'),\n array(\n $account_info['Username'],\n '<a href=\"' . $link . '\">' . $link . '</a>',\n ),\n $mail_tpl['body']\n );\n $GLOBALS['rlMail']->send($mail_tpl, $account_info['Mail']);\n }", "public function Notify_owner_ready($requeridor, $vale)\n {\n if($this->email_check($requeridor['email'])){\n if($vale['id_estado']->id_estado_entrega == $this->CI->config->item('EnProcesoDeArmado')){\n\n $header = '[Sistema de Vales #'.$vale['id_vale'].'] Su vale se encuentra en proceso de armado';\n\n }elseif($vale['id_estado']->id_estado_entrega == $this->CI->config->item('ListoParaRetirar')){\n\n $header = '[Sistema de Vales #'.$vale['id_vale'].'] Su vale ya esta listo para ser retirado';\n\n }elseif($vale['id_estado']->id_estado_entrega == $this->CI->config->item('Retirado')){\n\n $header = '[Sistema de Vales #'.$vale['id_vale'].'] Su vale ha sido retirado';\n\n }elseif($vale['id_estado']->id_estado_entrega == $this->CI->config->item('RechazoPorFaltaDeStock')){\n\n $header = '[Sistema de Vales #'.$vale['id_vale'].'] Su vale ha sido Rechazado por falta de stock';\n }\n $body = $this->CI->load->view('email/update_status', $vale, TRUE);\n $dbdata = array(\n '_recipients' => $requeridor['email'],\n '_body' => $body,\n '_headers' => $header,\n );\n $this->CI->mailer->new_mail_queue($dbdata);\n }\n }", "public function getNotifyAction() {\r\n $this->view->notification = $notification = $this->_getParam('notification', 0);\r\n $suggObj = Engine_Api::_()->getItem('suggestion', $notification->object_id);\r\n if (!empty($suggObj)) {\r\n\t\t\t$this->view->suggObj = $suggObj;\r\n\r\n if( strstr($suggObj->entity, \"sitereview\") ) {\r\n $getListingTypeId = Engine_Api::_()->getItem('sitereview_listing', $suggObj->entity_id)->listingtype_id;\r\n $getModId = Engine_Api::_()->suggestion()->getReviewModInfo($getListingTypeId);\r\n $modInfoArray = Engine_Api::_()->getApi('modInfo', 'suggestion')->getPluginDetailed(\"sitereview_\" . $getModId);\r\n $this->view->modInfoArray = $modInfoArray = $modInfoArray[\"sitereview_\" . $getModId];\r\n }else {\r\n $modInfoArray = Engine_Api::_()->getApi('modInfo', 'suggestion')->getPluginDetailed($suggObj->entity);\r\n $this->view->modInfoArray = $modInfoArray = $modInfoArray[$suggObj->entity];\r\n }\r\n \r\n if ($this->isModuleEnabled($modInfoArray['pluginName'])) {\r\n if ( $suggObj->entity == 'photo' ) {\r\n $modItemId = $suggObj->sender_id;\r\n } else {\r\n $modItemId = $suggObj->entity_id;\r\n }\r\n $modObj = Engine_Api::_()->getItem($modInfoArray['itemType'], $modItemId);\r\n\r\n\t// Check Sender exist on site or not.\r\n\t$isSenderExist= Engine_Api::_()->getItem('user', $suggObj->sender_id)->getIdentity();\r\n\tif( empty($isSenderExist) ) {\r\n\t Engine_Api::_()->getDbtable('suggestions', 'suggestion')->removeSuggestion($suggObj->entity, $suggObj->entity_id, $modInfoArray['notificationType']);\r\n\t $this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t $this->view->modObj = null;\r\n\t}\r\n\r\n\t// If Loggden user have \"Friend Suggestion\" Which already his friend then that friend suggestion should be delete.\r\n\tif( empty($modObj) || (( $suggObj->entity != 'photo' ) && ($modInfoArray['itemType'] == 'user') && !empty($modItemId)) ) {\r\n\t\t$is_user = Engine_Api::_()->getItem('user', $suggObj->entity_id)->getIdentity();\r\n\t\t$isFriend = Engine_Api::_()->getApi('coreFun', 'suggestion')->isMember($modItemId);\r\n\t\tif( empty($is_user) || !empty($isFriend) || empty($modObj) ) {\r\n\t\t Engine_Api::_()->getDbtable('suggestions', 'suggestion')->removeSuggestion($suggObj->entity, $suggObj->entity_id, $modInfoArray['notificationType']);\r\n\t\t $this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t\t $this->view->modObj = null;\r\n\t\t}\r\n\t}\r\n\r\n // It would be \"NULL\", If that entry already deleteed from the table.\r\n if (empty($modObj)) {\r\n Engine_Api::_()->getDbtable('suggestions', 'suggestion')->removeSuggestion($suggObj->entity, $suggObj->entity_id, $modInfoArray['notificationType']);\r\n $this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n $this->view->modObj = null;\r\n } else {\r\n\t\t\t\t\t$this->view->modObj = $modObj;\r\n $this->view->senderObj = $senderObj = Engine_Api::_()->getItem('user', $suggObj->sender_id);\r\n $this->view->sender_name = $this->view->htmlLink($senderObj->getHref(), $senderObj->displayname);\r\n }\r\n }else {\r\n\t$this->view->modNotEnable = true;\r\n }\r\n }else {\r\n\t\t\t// If suggestion are not available in \"Suggestion\" table but available in \"Notifications table\" then we are deleting from \"Notifications Table\".\r\n\t\t\tEngine_Api::_()->getDbtable('notifications', 'activity')->delete(array('notification_id = ?' => $notification->notification_id));\r\n\t\t\t$this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t\t}\r\n }", "public function notify()\n {\n /*$data = DB::select(DB::raw(\"SELECT license_type_id from `license_type_vehicle` where CURDATE()+INTERVAL 31 DAY =`license_end_on`\"));\n if(!empty($result)) {\n $data = array('license_type_id' => ,$result->license_type_id, 'vehicle_id' => $result->vehicle_id, '' );\n }\n DB::table('users')->insert([\n ['email' => '[email protected]', 'votes' => 0],\n ['email' => '[email protected]', 'votes' => 0]\n ]);*/\n $results = DB::table('license_type_vehicle')\n ->join('vehicles', 'vehicles.id', '=', 'license_type_vehicle.vehicle_id') \n ->select('license_type_vehicle.license_type_id', 'license_type_vehicle.vehicle_id','vehicles.client_id')\n ->where( 'license_type_vehicle.license_end_on', '=','CURDATE()+INTERVAL 30 DAY')\n ->get();\n print_r($results);\n /* Mail::send('emails.welcome', ['key' => 'value'], function($message)\n {\n $message->to('[email protected]', 'John Smith')->subject('Welcome!');\n });*/\n \n }", "private function notifyHREB() {\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/HREBNotification.php');\r\n\r\n $piDetails = $this->getPIDisplayDetails();\r\n $piName = $piDetails['firstName'] . \" \" . $piDetails['lastName'];\r\n $subject = sprintf('[TID-%s] Tracking form submitted online [%s]', $this->trackingFormId, $piName);\r\n $emailBody = sprintf('A tracking form was submitted online :\r\n\r\nTracking ID : %s\r\nTitle : \"%s\"\r\nPrincipal Investigator : %s\r\nDepartment : %s\r\n\r\n', $this->trackingFormId, $this->projectTitle, $piName, $piDetails['departmentName']);\r\n\r\n $HREBNotification = new HREBNotification($subject, $emailBody);\r\n try {\r\n $HREBNotification->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send email notification to HREB : '. $e);\r\n }\r\n }", "public function send_lease_notification(Request $request)\n\t\t{ \n\t\t\t$offer_status = $request->offer_status;\n\t\t\t$lease_form = array();\n\t\t\t\n\t\t\t$lease_form_fields = array(\n\t\t\t\t'company',\n\t\t\t\t'contactPerson',\n\t\t\t\t'email',\n\t\t\t\t'phone',\n\t\t\t\t'address',\n\t\t\t\t'city',\n\t\t\t\t'state',\n\t\t\t\t'zipCode',\n\t\t\t\t'billTo',\n\t\t\t\t'howLongInBusiness',\n\t\t\t\t'buyOut'\n\t\t\t);\n\t\t\tforeach ($lease_form_fields as $lease_form_field) {\n\t\t\t\t$lease_form[$lease_form_field] = (isset($request->lease_form[$lease_form_field])) ? $request->lease_form[$lease_form_field] : '';\n\t\t\t}\n\t\t\t\n\t\t\t$recipient = $request->recipient;\n\t\t\t$company = $request->company;\n\t\t\t\n\t\t\tswitch ($recipient) {\n\t\t\t\tcase \"laine\":\n\t\t\t\t\t$sales_rep_data = array(\n\t\t\t\t\t\t'mail' => '[email protected]',\n\t\t\t\t\t\t'sales_rep' => 'Laine Dobson',\n\t\t\t\t\t\t'company' => $company\n\t\t\t\t\t);\n\t\t\t\t\t$new_user_data = array_merge($lease_form, $sales_rep_data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"greg\":\n\t\t\t\t\t$sales_rep_data = array(\n\t\t\t\t\t\t'mail' => '[email protected]',\n\t\t\t\t\t\t'sales_rep' => 'Greg Bentz',\n\t\t\t\t\t\t'company' => $company\n\t\t\t\t\t);\n\t\t\t\t\t$new_user_data = array_merge($lease_form, $sales_rep_data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"jesse\":\n\t\t\t\tdefault:\n\t\t\t\t\t$sales_rep_data = array(\n\t\t\t\t\t\t'mail' => '[email protected]', \n\t\t\t\t\t\t'sales_rep' => 'Jesse Harwell',\n\t\t\t\t\t\t'company' => $company\n\t\t\t\t\t);\n\t\t\t\t\t$new_user_data = array_merge($lease_form, $sales_rep_data);\n\t\t\t\t\tbreak; \n\t\t\t}\n\t\t\t\n\t\t\tswitch ($offer_status) {\n\t\t\t\tcase \"rejected\":\n\t\t\t\t\tMail::send(\n\t\t\t\t\t\t'emails.notification_device_rejected',\n\t\t\t\t\t\t$new_user_data,\n\t\t\t\t\t\tfunction ($message) use ($new_user_data) {\n\t\t\t\t\t\t\t$message->from('[email protected]', 'Pahoda Image Products');\n\t\t\t\t\t\t\t$message->to($new_user_data['mail'], $new_user_data['sales_rep'])->subject('Perfectcopier Lease Form information: Device Quote Rejected');\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"accepted\":\n\t\t\t\tdefault:\t\t\n\t\t\t\t\t$sales_rep_data = array (\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'mail' => '[email protected]', \n\t\t\t\t\t\t\t'sales_rep' => 'Jesse Harwell',\n\t\t\t\t\t\t\t'company' => $company\n\t\t\t\t\t\t), \n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'mail' => '[email protected]', \n\t\t\t\t\t\t\t'sales_rep' => 'Greg Bentz',\n\t\t\t\t\t\t\t'company' => $company\n\t\t\t\t\t\t), \n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'mail' => '[email protected]', \n\t\t\t\t\t\t\t'sales_rep' => 'Laine Dobson',\n\t\t\t\t\t\t\t'company' => $company\n\t\t\t\t\t\t), \n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'mail' => '[email protected]',\n\t\t\t\t\t\t\t'sales_rep' => 'Alex',\n\t\t\t\t\t\t\t'company' => $company\n\t\t\t\t\t\t)\n\t\t\t\t\t);\t\t\t\t\t\n\t\t\t\t\tforeach ($sales_rep_data as $sales_rep_array) {\t\t\t\t\t\t\n\t\t\t\t\t\t$new_user_data = array_merge($lease_form, $sales_rep_array);\n\t\t\t\t\t\t\n\t\t\t\t\t\tMail::send(\n\t\t\t\t\t\t\t'emails.notification_device_accepted',\n\t\t\t\t\t\t\t$new_user_data,\n\t\t\t\t\t\t\tfunction ($message) use ($new_user_data) {\n\t\t\t\t\t\t\t\t$message->from('[email protected]', 'Pahoda Image Products');\n\t\t\t\t\t\t\t\t$message->to($new_user_data['mail'], $new_user_data['sales_rep'])->subject('Perfectcopier notification: Device Quote Accepted');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t}\t\t\t\n\t\t\treturn response()->json(array('message' => $lease_form));\n\t\t}", "public function notificationAction() {\n global $CFG;\n\n // Full strength error logging\n error_reporting(E_ALL);\n ini_set('display_errors', 0);\n ini_set('log_errors', 1);\n\n // Library stuff\n $sagepay = new sagepayserverlib();\n $sagepay->setController($this);\n\n // POST data from SagePay\n $data = $sagepay->getNotification();\n\n // Log the notification data to debug file (in case it's interesting)\n $this->log(var_export($data, true));\n\n // Get the VendorTxCode and use it to look up the purchase\n $VendorTxCode = $data['VendorTxCode'];\n if (!$purchase = $this->bm->getPurchaseFromVendorTxCode($VendorTxCode)) {\n $url = $this->Url('booking/fail') . '/' . $VendorTxCode . '/' . urlencode('Purchase record not found');\n $this->log('SagePay notification: Purchase not found - ' . $url);\n $sagepay->notificationreceipt('INVALID', $url, 'Purchase record not found');\n die;\n }\n\n // Now that we have the purchase object, we can save whatever we got back in it\n $purchase = $this->bm->updateSagepayPurchase($purchase, $data);\n\n // Mailer\n $mail = new maillib();\n $mailpurchase = clone $purchase;\n $mail->initialise($this, $mailpurchase, $this->bm);\n $mail->setExtrarecipients($CFG->backup_email);\n\n // Check VPSSignature for validity\n if (!$sagepay->checkVPSSignature($purchase, $data)) {\n $purchase->status = 'VPSFAIL';\n $purchase->save();\n $url = $this->Url('booking/fail') . '/' . $VendorTxCode . '/' . urlencode('VPSSignature not matched');\n $this->log('SagePay notification: VPS sig no match - ' . $url);\n $sagepay->notificationreceipt('INVALID', $url, 'VPSSignature not matched');\n die;\n }\n\n // Check Status.\n // Work out what next action should be\n $status = $purchase->status;\n if ($status == 'OK' || ($status == 'OK REPEATED')) {\n\n // Send confirmation email\n $url = $this->Url('booking/complete') . '/' . $VendorTxCode;\n $mail->confirm();\n $this->log('SagePay notification: Confirm sent - ' . $url);\n $sagepay->notificationreceipt('OK', $url, '');\n } else if ($status == 'ERROR') {\n $url = $this->Url('booking/fail') . '/' . $VendorTxCode . '/' . urlencode($purchase->statusdetail);\n $this->log('SagePay notification: Booking fail - ' . $url);\n $mail->decline();\n $sagepay->notificationreceipt('OK', $url, $purchase->statusdetail);\n } else {\n $url = $this->Url('booking/decline') . '/' . $VendorTxCode;\n $this->log('SagePay notification: Booking decline - ' . $url);\n $mail->decline();\n $sagepay->notificationreceipt('OK', $url, $purchase->statusdetail);\n }\n\n $purchase->completed = 1;\n $purchase->save();\n\n die;\n }", "private function notifyDean() {\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/DeanNotification.php');\r\n\r\n $piDetails = $this->getPIDisplayDetails();\r\n $piName = $piDetails['firstName'] . \" \" . $piDetails['lastName'];\r\n\r\n $subject = sprintf('[TID-%s] Tracking form submitted online [%s]', $this->trackingFormId, $piName);\r\n $emailBody = sprintf('A tracking form was submitted online that requires approval :\r\n\r\nTracking ID : %s\r\nTitle : \"%s\"\r\nPrincipal Investigator : %s\r\nDepartment : %s\r\n\r\nTo view full details of this tracking form, please login at http://research.mtroyal.ca and navigate to \"My Approvals\".\r\n\r\n', $this->trackingFormId, $this->projectTitle, $piName, $piDetails['departmentName']);\r\n\r\n $DeanNotification = new DeanNotification($subject, $emailBody, $this);\r\n try {\r\n $DeanNotification->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send email notification to Dean : '. $e);\r\n }\r\n }", "public function notify_finance($user_data,$req_data, $reject){\n\t\t$fin_data = $this->FinAdvApprove->Home->find('all', array('fields' => array('id','email_address', 'first_name','last_name'), 'conditions' => array('hr_department_id' => '4','Home.status' => '1'), 'group' => array('Home.id')));\t\t\t\n\t\t// iterate finance team\n\t\t\tforeach($fin_data as $fin){\t\n\t\t\t\t// check the same user\n\t\t\t\tif($this->Session->read('USER.Login.id') != $fin['Home']['id']){\n\t\t\t\t// change the subject\n\t\t\t\t\tif($reject == 1){\n\t\t\t\t\t\t$status = 'rejected';\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$status = 'approved';\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t$sub = 'My PDCA - Advance request is '.$status.' by '.ucfirst($this->Session->read('USER.Login.first_name')).' '.ucfirst($this->Session->read('USER.Login.last_name'));\n\t\t\t\t\t$template = 'notify_advance';\n\t\t\t\t\t$name = $fin['Home']['first_name']. ' '.$fin['Home']['last_name'];\n\t\t\t\t\t\n\t\t\t\t\t$vars = array('from_name' => ucfirst($this->Session->read('USER.Login.first_name')).' '.ucfirst($this->Session->read('USER.Login.last_name')), 'status' => $status,'name' => $name, 'purpose' => $req_data['FinAdvApprove']['purpose'], 'desc' => $req_data['FinAdvApprove']['description'], 'amt' => $req_data['FinAdvApprove']['amount'], 'req_date' => $req_data['FinAdvApprove']['req_date'],'remarks' => $this->request->query['remark'],'employee' => $user_data['Home']['first_name'].' '.$user_data['Home']['last_name'], 'client' => $req_data['TskCustomer']['company_name']);\n\t\t\t\t\t// notify superiors\t\t\t\t\t\t\n\t\t\t\t\tif(!$this->send_email($sub, $template, '[email protected]', $fin['Home']['email_address'],$vars)){\t\n\t\t\t\t\t\t// show the msg.\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Problem in sending the mail to finance...', 'default', array('class' => 'alert alert-error'));\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function sendNotification(){\n\t\t$events = Event::getEvents(0);\n\t\t\n\t\t\n\t\tforeach($events as $event)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\t$eventType = $event['eventType'];\n\t\t\t$message = '';\n\t\t\n\t\t\t//notify followers\n\t\t\tif($eventType == Event::POST_CREATED)\n\t\t\t\t$message = $event['raiserName'] . ' added a new post.';\n\t\t\telse if($eventType == Event::POST_LIKED)\n\t\t\t\t$message = $event['raiserName'] . ' liked a post of ' . $event['relatedUserName'];\n\t\t\telse if($eventType == Event::POST_FLAGGED)\n\t\t\t\t$message = $event['raiserName'] . ' flagged a post of ' . $event['relatedUserName'];\n\t\t\telse if($eventType == Event::COMMENT_CREATED)\n\t\t\t\t$message = $event['raiserName'] . ' commented on a post of ' . $event['relatedUserName'];\n\t\t\telse if($eventType == Event::RESTAURANT_MARKED_FAVOURITE)\n\t\t\t\t$message = $event['raiserName'] . ' marked a restaurant as favourite.';\n\t\t\telse if($eventType == Event::USER_FOLLOWED)\n\t\t\t\t$message = $event['raiserName'] . ' is now following ' . $event['relatedUserName'];\n\t\t\n\t\t\tif(!empty($message))\n\t\t\t{\n\t\t\t\t//fetch all followers of the event raiser or related user\n\t\t\t\t$sql = Follower::getQueryForFollower($event['raiserId']);\n\t\t\n\t\t\t\tif($event['relatedUserId'])\n\t\t\t\t\t$sql .= ' OR f.followedUserId =' . $event['relatedUserId'];\n\t\t\n// \t\t\t\t$followers = Yii::app()->db->createCommand($sql)->queryAll(true);\n// \t\t\t\tforeach($followers as $follower)\n// \t\t\t\t{\n// \t\t\t\t\tif($follower['id'] != $event['raiserId'] && $follower['id'] != $event['relatedUserId'])\n// \t\t\t\t\t{\n// // \t\t\t\t\t\t$did = Notification::saveNotification($follower['id'], Notification::NOTIFICATION_GROUP_WORLD, $message, $event['id']);\n// // \t\t\t\t\t\terror_log('DID : => '.$did);\n// \t\t\t\t\t\t//send push notification\n// \t\t\t\t\t\t/**----- commented as no followers will be notified, as suggested by the client\n// \t\t\t\t\t\t$session = Session::model()->findByAttributes(array('deviceToken'=>$follower['deviceToken']));\n// \t\t\t\t\t\tif($session)\n// \t\t\t\t\t\t{\n// \t\t\t\t\t\t$session->deviceBadge += 1;\n// \t\t\t\t\t\t$session->save();\n// \t\t\t\t\t\tsendApnsNotification($follower['deviceToken'], $message, $follower['deviceBadge']);\n// \t\t\t\t\t\t}\n// \t\t\t\t\t\t*****/\n// \t\t\t\t\t}\n// \t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t//notify the related user\n\t\t\tif($event['relatedUserId'] && $event['relatedUserId'] != $event['raiserId'])\n\t\t\t{\n\t\t\t\tif($eventType == Event::POST_LIKED)\n\t\t\t\t\t$message = $event['raiserName'] . ' liked your post.';\n\t\t\t\telse if($eventType == Event::POST_FLAGGED)\n\t\t\t\t\t$message = $event['raiserName'] . ' flagged your post.';\n\t\t\t\telse if($eventType == Event::COMMENT_CREATED)\n\t\t\t\t\t$message = $event['raiserName'] . ' commented on your post.';\n\t\t\t\telse if($eventType == Event::USER_FOLLOWED)\n\t\t\t\t\t$message = $event['raiserName'] . ' is now following you.';\n\t\t\t\telse if($eventType == Event::USER_MENTIONED_COMMENT){\n\t\t\t\t\t$message = $event['raiserName'] . ' mentioned you in a comment.';\n// \t\t\t\t\t$eventType = Event::COMMENT_CREATED;\n\t\t\t\t}\n\t\t\t\telse if($eventType == Event::USER_MENTIONED_POST){\n\t\t\t\t\t$message = $event['raiserName'] . ' mentioned you in a post.';\n// \t\t\t\t\t$eventType = Event::COMMENT_CREATED;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($message))\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$notfyId = Notification::saveNotification($event['relatedUserId'], Notification::NOTIFICATION_GROUP_YOU, $message, $event['id']);\n\t\t\t\t\t$session = Session::model()->findByAttributes(array('userId'=>$event['relatedUserId']));\n// \t\t\t\t\terror_log('SESSION_LOG : '. print_r( $session, true ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tif(!is_null($session) && !empty($session) && $session->deviceToken)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$notifyData = array(\n// \t\t\t\t\t\t\t\t\"id\" => $notfyId,\n// \t\t\t\t\t\t\t\t\"receiverId\" => $event['relatedUserId'],\n// \t\t\t\t\t\t\t\t\"notificationGroup\" => Notification::NOTIFICATION_GROUP_YOU,\n\t\t\t\t\t\t\t\t\"alert\" => $message,\n// \t\t\t\t\t\t\t\t\"eventId\" => $event['id'],\n// \t\t\t\t\t\t\t\t\"isSeen\" => \"0\",\n\t\t\t\t\t\t\t\t\"eventType\" => $eventType,\n// \t\t\t\t\t\t\t\t\"raiserId\" => $event['raiserId'],\n// \t\t\t\t\t\t\t\t\"raiserName\" => $event['raiserName'],\n// \t\t\t\t\t\t\t\t\"relatedUserId\" => $event['relatedUserId'],\n// \t\t\t\t\t\t\t\t\"relatedUserName\" => $event['relatedUserName'],\n\t\t\t\t\t\t\t\t\"elementId\" => $event['elementId'],\n\t\t\t\t\t\t\t\t\"eventDate\" => $event['eventDate'],\n// \t\t\t\t\t\t\t\t\"isNotified\" => $event['isNotified'],\n\t\t\t\t\t\t\t\t'badge' => $session->deviceBadge,\n\t\t\t\t\t\t\t\t'sound' => 'default'\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n// \t\t\t\t\t\t\techo 'Notify Data : ';\n// \t\t\t\t\t\tprint_r($notifyData);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$session->deviceBadge += 1;\n\t\t\t\t\t\t$session->save();\n\t\t\t\t\t\tsendApnsNotification($session->deviceToken, $message, $session->deviceBadge, $notifyData);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}elseif( isset($event['message']) && $event['message'] !=null){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$devices = array();\n\t\t\t\t$sql = 'SELECT id, deviceToken, deviceBadge from session where role=\"manager\"';\n\t\t\t\t\n\t\t\t $rows = Yii::app()->db->createCommand($sql)->queryAll(true);\n\t\t \t$chunk=1;\t\t \n\t\t \n\t\t\t\tforeach ($rows as $row){\n\t\t\t\t\t$devices[] = array(\n\t\t\t\t\t\t\t'deviceToken'=>$row['deviceToken'],\n\t\t\t\t\t\t\t'notifyData' => array('aps'=> array(\n\t\t\t\t\t\t\t\t\t\"alert\" => $event['message'],\n\t\t\t\t\t\t\t\t\t\"eventType\" => $event['eventType'],\n\t\t\t\t\t\t\t\t\t\"elementId\" => $event['id'],\n\t\t\t\t\t\t\t\t\t\"eventDate\" => $event['eventDate'],\n\t\t\t\t\t\t\t\t\t'badge' => $row['deviceBadge'],\n\t\t\t\t\t\t\t\t\t'sound' => 'default'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif($chunk > 4){\n\t\t\t\t\t\tsendApnsNotification($devices, '');\n\t\t\t\t\t\t$chunk=1;\n\t\t\t\t\t\t$devices = array();\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$chunk++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(!empty($devices)){\n\t\t\t\t\techo 'Sending...'.date(DATE_RFC850).\"\\n\";\n\t\t\t\t\tsendApnsNotification($devices, '');\n\t\t\t\t\techo 'done '.date(DATE_RFC850).\"\\n\";\n\t\t\t\t}\n// \t\t\t\t$notfyId = Notification::saveNotification($event['relatedUserId'], Notification::NOTIFICATION_GROUP_YOU, $message, $event['id']);\n\n// \t\t\t\t$insertSql = 'INSERT into notification (receiverId, notificationGroup, message, eventId) (select id, \"1\", \"'.$event['message'].'\", '.$event['id'].' from user where isDisabled = 0 and role=\"manager\")';\n// \t\t\t\tYii::app()->db->createCommand($insertSql)->query();\n\t\t\t\t\n\t\t\t}\n\t\t\tEvent::model()->updateByPk($event['id'], array('isNotified'=>1));\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function sellerConfirm() {\n\t\tLog::info ( 'Seller has confirmed the payment:' . $this->user_pk, array (\n\t\t\t\t'c' => '1' \n\t\t) );\n\t\tif (isset ( $_POST ['time'] ) && $_POST ['time'] != '') {\n\t\t\t$timePeriod = $_POST ['time'];\n\t\t\t$subscriptionStartsAt = date ( 'Y-m-d H:i:s' );\n\t\t\t$subscriptionEndsAt = '';\n\t\t\t\n\t\t\tif ($timePeriod == 'quarterPeriod') {\n\t\t\t\t$subscriptionEndsAt = date ( 'Y-m-d H:i:s', strtotime ( '+3 months' ) );\n\t\t\t} else if ($timePeriod == 'halfannualPeriod') {\n\t\t\t\t$subscriptionEndsAt = date ( 'Y-m-d H:i:s', strtotime ( '+6 months' ) );\n\t\t\t} else if ($timePeriod == 'annualPeriod') {\n\t\t\t\t$subscriptionEndsAt = date ( 'Y-m-d H:i:s', strtotime ( '+1 years' ) );\n\t\t\t} else if ($timePeriod == 'phantomPeriod') {\n\t\t\t\t$subscriptionEndsAt = date ( 'Y-m-d H:i:s', strtotime ( '+5 years' ) );\n\t\t\t} else if ($timePeriod == 'freeTrail') {\n\t\t\t\t$subscriptionEndsAt = date(\"2016-12-31 00:00:00\");\n\t\t\t}\n\t\t\t\n\t\t\t$userRecord = \\DB::table ( 'users' )->where ( 'id', '=', $this->user_pk )->first ();\n\t\t\t$is_business = $userRecord->is_business;\n\t\t\t\n\t\t\t// add subscription start and end date to seller\n\t\t\t$subscription = ThankyouController::addSubscription ( $subscriptionStartsAt, $subscriptionEndsAt, $is_business );\n\t\tif($subscription==1){\n\t\t\tCommonComponent::activityLog ( \"SELLER_CONFIRM_PAYMENT\", SELLER_CONFIRM_PAYMENT, 0, HTTP_REFERRER, CURRENT_URL );\n\t\t\t$stored_uid = $this->user_pk;\n\t\t\t\t\n\t\t\ttry{\n\t\t\t\tif(isset(Auth::User()->lkp_role_id) && (Auth::User()->lkp_role_id == '1')){\n\t\t\t\t\t\n\t\t\t\t\tDB::table ( 'users' )->where ( 'id', $this->user_pk )->update ( array (\n\t\t\t\t\t'is_active' => 1,\n\t\t\t\t\t'is_confirmed' => 1,\n\t\t\t\t\t'is_approved' => 1,\n\t\t\t\t\t'secondary_role_id'=>'2',\n\t\t\t\t\t'is_buyer_paid'=>1,\n\t\t\t\t\t'mail_sent' => 1\n\t\t\t\t\t) );\n\t\t\t\t\tSession::put('last_login_role_id','2');\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\tDB::table ( 'users' )->where ( 'id', $this->user_pk )->update ( array (\n\t\t\t'lkp_role_id' => 2,\n\t\t\t'is_active' => 1,\n\t\t\t'is_confirmed' => 1,\n\t\t\t'is_approved' => 1,\n\t\t\t'is_buyer_paid'=>1,\n\t\t\t'mail_sent' => 1\n\t\t\t) );\n\t\t\t\t}\n\t\t\t}catch(Exception $ex){\n\t\t\t}\n\t\t\t// Information email to seller after payment\n\t\t\t\t\n\t\t\t$userData = DB::table ( 'users' )->where ( 'id', $this->user_pk )->select ( 'users.*' )->get ();\n\t\t\t\t\n\t\t\tCommonComponent::send_email ( SELLER_PAYMENT_INFO_MAIL, $userData );\n\t\t\t\n\t\t}\n\t\t\t\n\t\t}\n\t}", "function paymentNotify(){\n \t\tglobal $jinput, $mainframe,$configClass;\n\t\t$paymentMethod = $jinput->getString('payment_method', '');\n\t\t$method = os_payments::getPaymentMethod($paymentMethod) ;\n\t\t$method->verifyPayment();\n }", "public static function send_employer_expiring_notice() {\n\t\tself::maybe_init();\n\n\t\t$email_key = WP_Job_Manager_Email_Employer_Expiring_Job::get_key();\n\t\tif ( ! self::is_email_notification_enabled( $email_key ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$settings = self::get_email_settings( $email_key );\n\t\t$days_notice = WP_Job_Manager_Email_Employer_Expiring_Job::get_notice_period( $settings );\n\t\tself::send_expiring_notice( $email_key, $days_notice );\n\t}", "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 notify_request_client($email) {\n\t$link = SITE_URL.'requests.php';\n\n\t$text = \"Hello,\\n\";\n\t$text .= \"\\nYou requested an appointment. You can manage your appointment below:\\n\";\n\t$text .= \"\\n<a href='$link'>Manage</a>\\n\";\n\t$text .= \"\\nThanks,\\n\";\n\t$text .= \"The Ma-Maria team\";\n\n\tif(MAIL_ENABLED) {\n\t\tmail($email, 'Ma-Maria - Request', $text);\n\t}\n}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerification('networking_agent'));\n }", "public function notification();", "public function notification();", "function notifyReg($uName,$eMail) { //notify a new user registration\r\n\tglobal $ax, $set, $today;\r\n\t\t\r\n\t//compose email message\r\n\t$subject = \"{$ax['log_new_reg']}: {$uName}\";\r\n\t$msgBody = \"\r\n<p>{$ax['log_new_reg']}:</p><br>\r\n<table>\r\n\t<tr><td>{$ax['log_un']}:</td><td>{$uName}</td></tr>\r\n\t<tr><td>{$ax['log_em']}:</td><td>{$eMail}</td></tr>\r\n\t<tr><td>{$ax['log_date_time']}:</td><td>\".IDtoDD($today).\" {$ax['at_time']} \".ITtoDT(date(\"H:i\")).\"</td></tr>\r\n</table>\r\n\";\r\n\t//send email\r\n\t$result = sendEml($subject,$msgBody,$set['calendarEmail'],1,0,0);\r\n\treturn $result;\r\n}", "function remindAboutContractsAboutToExpire(){\n\t//14 days before the end of contract.\n\t$query1=mysql_query(\"SELECT id,guardid, contractstartdate,contractenddate, current_date() as today, date_sub(contractenddate, interval 14 day) as warningdate, datediff(contractenddate, current_date()) as diff FROM guards WHERE contractenddate > contractstartdate\");\t\n\t\t\t\t\t\n\twhile($contracts = mysql_fetch_array($query1,MYSQL_ASSOC)){ \n\t\tif($contracts['today'] >= $contracts['warningdate'] && $contracts['diff'] <= 14 && $contracts['diff'] > 0){\n\t\t\t$guards_duecontractend = getGuardNameById($contracts['guardid']);\n\t\t\t//Put a reminder to be seen by all concerned parties on their dashboards \n\t\t\t$reason = \"Contract for \". $guards_duecontractend.\" expires in \".$contracts['diff'].\" Days.\";\n\t\t\t$details = \"<a href=\\\"../hr/index.php?id=\".encryptValue($contracts['id']).\"\\\"> Update contract</a>\";\n\t\t\t$sql_details=mysql_query(\"SELECT * FROM messages WHERE reason = '\".$reason.\"' \") or die (mysql_error());\n\t\t\t//Check if this has already been inserted in the messages table, so that we do not replicate the reminder each time the dashboard is refreshed.\n\t\t\tif(mysql_num_rows($sql_details)==0){\n\t\t\t\tmysql_query(\"INSERT INTO messages (reason,details,sentby,sentto,date) VALUES ('\".$reason.\"','\".$details.\"','','1,84,85',now())\") or die (mysql_error());\n\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t}else if($contracts['diff'] < 0){\n\t\t\t$guards_duecontractend = getGuardNameById($contracts['guardid']);\n\t\t\t$reason = \"Contract for \".$guards_duecontractend.\" has expired!\";\n\t\t\t$details = \"<a href=\\\"../hr/index.php?id=\".encryptValue($contracts['id']).\"\\\"> Update contract</a>\";\n\t\t\t$sql_details=mysql_query(\"SELECT * FROM messages WHERE reason = '\".$reason.\"' \") or die (mysql_error());\n\t\t\t//Check if this has already been inserted in the messages table, so that we do not replicate the reminder each time the dashboard is refreshed.\n\t\t\t$sql_details=mysql_query(\"SELECT * FROM messages WHERE reason = '\".$reason.\"' \") or die (mysql_error());\n\t\t\tif(mysql_num_rows($sql_details)==0){\n\t\t\t\tmysql_query(\"INSERT INTO messages (reason,details,sentby,sentto,date) VALUES ('\".$reason.\"','\".$details.\"','','1,84,85',now())\") or die (mysql_error());\n\t\t\t}\n\t\t}\n\t\t\t\n\t}\n}", "public function trigger_notification()\n\t{\n \t\t\n\t\t $result=$this->Fb_common_func->send_notification($this->facebook,'Skywards meet me here!',array('100001187318347','1220631499','1268065008','1347427052','566769531'),'467450859982651|cf5YXgYRZZDJuvBF1_ZOyDyRJHM','100001187318347');\n\n\t echo $result;\n\t}", "function ajax_refuse_candidate() {\n $_POST['nonce'] = empty($_POST['nonce']) ? '' : trim($_POST['nonce']);\n\n if(\n empty($_POST['link-id'])\n || empty($_POST['doer-id'])\n || empty($_POST['task-id'])\n || empty($_POST['nonce'])\n || !wp_verify_nonce($_POST['nonce'], $_POST['link-id'].'-candidate-refuse-'.$_POST['doer-id'])\n ) {\n die(json_encode(array(\n 'status' => 'fail',\n 'message' => __('<strong>Error:</strong> wrong data given.', 'tst'),\n )));\n }\n\n p2p_update_meta($_POST['link-id'], 'is_approved', false);\n\n // Send email to the task doer:\n $task = get_post($_POST['task-id']);\n $doer = get_user_by('id', $_POST['doer-id']);\n tst_actualize_member_role($_POST['doer-id']);\n\n global $email_templates;\n// add_filter('wp_mail_content_type', function(){\n// return 'text/html';\n// });\n\n wp_mail(\n get_user_by('id', $_POST['doer-id'])->user_email,\n $email_templates['refuse_candidate_doer_notice']['title'],\n nl2br(sprintf(\n $email_templates['refuse_candidate_doer_notice']['text'],\n $doer->first_name,\n $task->post_title\n ))\n );\n\n // Task is automatically switched \"publish\":\n wp_update_post(array('ID' => $_POST['task-id'], 'post_status' => 'publish'));\n\t\n die(json_encode(array(\n 'status' => 'ok',\n )));\n}", "public function decline() {\n header('Content-type: application/json');\n $requestId = input(\"requestid\");\n Database::table(\"requests\")->where(\"id\", $requestId)->update(array(\"status\" => \"Declined\"));\n $request = Database::table(\"requests\")->where(\"id\", $requestId)->first();\n $sender = Database::table(\"users\")->where(\"id\", $request->sender)->first();\n $documentLink = env(\"APP_URL\").\"/document/\".$request->document;\n $send = Mail::send(\n $sender->email, \"Signing invitation declined by \".$request->email,\n array(\n \"title\" => \"Signing invitation declined.\",\n \"subtitle\" => \"Click the link below to view document.\",\n \"buttonText\" => \"View Document\",\n \"buttonLink\" => $documentLink,\n \"message\" => $request->email.\" has declined the signing invitation you had sent. Click the link above to view the document.<br><br>Thank you<br>\".env(\"APP_NAME\").\" Team\"\n ),\n \"withbutton\"\n );\n $actionTakenBy = escape($request->email);\n /*\n * Check, whether IP address register is allowed in .env\n * If yes, then capture the user's IP address\n */\n if (env('REGISTER_IP_ADDRESS_IN_HISTORY') == 'Enabled') {\n $actionTakenBy .= ' ['.getUserIpAddr().']';\n }\n $activity = '<span class=\"text-primary\">'.$actionTakenBy.'</span> declined a signing invitation of this document.';\n Signer::keephistory($request->document, $activity, \"default\");\n $notification = '<span class=\"text-primary\">'.escape($request->email).'</span> declined a signing invitation of this <a href=\"'.url(\"Document@open\").$request->document.'\">document</a>.';\n Signer::notification($sender->id, $notification, \"decline\");\n if (!$send) { exit(json_encode(responder(\"error\", \"Oops!\", $send->ErrorInfo))); }\n exit(json_encode(responder(\"success\", \"Declined!\", \"Request declined and sender notified.\",\"reload()\")));\n }", "public function actionNotifyToJoin(){\n $message = new YiiMailMessage;\n $message->view = 'system';\n $message->subject = \"We are happy to see you soon on Cofinder\"; // 11.6. title change\n $message->from = Yii::app()->params['noreplyEmail'];\n \n // send newsletter to all in waiting list\n $invites = Invite::model()->findAll(\"NOT ISNULL(`key`)\");\n $c = 0;\n foreach ($invites as $user){\n \n $create_at = strtotime($user->time_invited);\n if ($create_at < strtotime('-8 week') || $create_at >= strtotime('-1 day')) continue; \n if (!\n (($create_at >= strtotime('-1 week')) || \n (($create_at >= strtotime('-4 week')) && ($create_at < strtotime('-3 week'))) || \n (($create_at >= strtotime('-8 week')) && ($create_at < strtotime('-7 week'))) )\n ) continue; \n \n //set mail tracking\n $mailTracking = mailTrackingCode($user->id);\n $ml = new MailLog();\n $ml->tracking_code = mailTrackingCodeDecode($mailTracking);\n $ml->type = 'invitation-reminder';\n $ml->user_to_id = $user->id;\n $ml->save();\n \n //$activation_url = '<a href=\"'.absoluteURL().\"/user/registration?id=\".$user->key.'\">Register here</a>';\n $activation_url = mailButton(\"Register here\", absoluteURL().\"/user/registration?id=\".$user->key,'success',$mailTracking,'register-button');\n $content = \"This is just a friendly reminder to activate your account on Cofinder.\n <br /><br />\n Cofinder is a web platform through which you can share your ideas with the like minded entrepreneurs, search for people to join your project or join an interesting project yourself.\n <br /><br />If we got your attention you can \".$activation_url.\"!\";\n \n $message->setBody(array(\"content\"=>$content,\"email\"=>$user->email,\"tc\"=>$mailTracking), 'text/html');\n $message->setTo($user->email);\n Yii::app()->mail->send($message);\n $c++;\n }\n Slack::message(\"CRON >> Invite to join reminders: \".$c);\n return 0;\n }", "function ipnAction(){\n\t\t$this->_helper->layout->disableLayout();\n\t $this->_helper->viewRenderer->setNoRender(true);\n\t\t\n\t // check if this is a subscriber signup action, then ignore it since it is just confirming that \n\t // a recurring payment profile has been created \n\t if ($this->_getParam('txn_type') == 'subscr_signup') {\n\t \t// do not countinue\n\t \treturn; \n\t }\n\t \n\t $config = Zend_Registry::get(\"config\"); \n\t \n\t\t// below supported vals that paypal posts to us, this list is exhaustive..\n\t\t// NOTE: if a variable is not in this array, it is not going in the database. \n\t\t$paypal_vals = array(\"item_name\", \"item_number\", \"custom\", \n\t\t\t\"receiver_email\", \"receiver_id\", \"quantity\", \"memo\", \"payment_type\", \"payment_status\", \n\t\t\t\"payment_date\", \"payment_gross\", \"payment_fee\",\n\t\t\t\"mc_gross\", \"mc_fee\", \"mc_currency\", \"settle_amount\", \"settle_currency\", \"exchange_rate\",\n\t\t\t\"txn_id\", \"parent_txn_id\", \"txn_type\", \"first_name\", \"last_name\", \"payer_business_name\", \n\t\t\t\"address_name\", \"address_street\", \"address_city\", \"address_zip\", \"address_status\",\n\t\t\t\"address_country\", \"payer_email\", \"payer_id\", \"payer_status\",\"pending_reason\", \"reason_code\",\n\t\t\t\"notify_version\", \"verify_sign\"); \n\t\t\n\t\t// these are used later to verify validity of transaction\n\t\t$payment_status = $this->_getParam('payment_status');\n\t\t$txn_id = $this->_getParam('txn_id');\n\t\t$receiver_email = $this->_getParam('receiver_email');\n\t\t\n\t\t// read the post from PayPal system and add 'cmd'\n\t\t$req = 'cmd=_notify-validate';\n\t\t$addtosql = array();\n\t\t$params = $this->_getAllParams();\n\t\tforeach ($params as $key => $value) {\n\t\t\t$newvalue = urlencode(stripslashes($value));\t\t\n\t\t\t$req .= \"&\".$key.\"=\".$newvalue;\t\t\n\t\t\t// build insert statement to save papypal variables to database\n\t\t\tif ($key == 'payment_date') {\n\t\t\t\t// transform the paymentdate into a proper date for inserting into the database\n\t\t\t\t$addtosql[] = \" \".$key.\"='\".changeDateFromPageToMySQLFormat($value).\"'\"; \n\t\t\t} else {\n\t\t\t\t// process other fields \n\t\t\t\tif (in_array ($key, $paypal_vals)) { \n\t\t\t\t\tif (is_numeric($value)) { \n\t\t \t$addtosql[] = \" \".$key.\"=\".$value; \n\t\t \t} else { \n\t\t \t$addtosql[]= \" \".$key.\"='\".$value.\"'\"; \n\t\t \t} \n\t\t\t\t}\n\t\t\t} \n\t }\n\t\t$queryForPaypalInfo = \"INSERT INTO payment SET \".implode(\", \", $addtosql);\n\t\t\n\t\t// Check whether or not paypal txn_id is a duplicate before adding new paypal info\n\t\t// to the database\t\n\t\t$transactionIDValid = isTransactionIDValid($txn_id);\t\n\t\t// Save transaction details from Paypal to persistent store (file or database).\n\t\t//$result = mysql_query($queryForPaypalInfo);\n\t\t$conn = Doctrine_Manager::connection(); \n\t\t$result = $conn->execute($queryForPaypalInfo); \n\t\t$paymentid = $conn->lastInsertId();\n\t\tif (!$result) {\n\t\t\t# an error occured, log it and send a message\n\t\t\t$this->_logger->err(\"Error Inserting Paypal Transaction in Database. Query :\".$queryForPaypalInfo.\" - error \".mysql_error()); \n\t\t}\t\n\t\t\n\t\t// post back to PayPal system to verify the transaction \n\t\t$client = new Zend_Http_Client($config->paypal->serverurl);\n\t\t$client->setMethod(Zend_Http_Client::POST);\n\t\t$client->setParameterPost(array_merge(\n\t\t\t\t\t\t\t\t\t\tarray('cmd' => '_notify-validate'),\n\t\t\t\t\t\t\t\t\t\t$this->_getAllParams()\n\t\t\t\t\t\t\t\t )\n\t\t);\n\t\t$response = $client->request();\n\t\t\n\t\tif ($response->getBody() == 'VERIFIED'){\n\t\t\t// check the payment_status is Completed\n\t\t\tif ($payment_status != \"Completed\") {\t\t\t\t\t\n\t\t\t\t// payment not completed, just exit.\t\n\t\t\t\treturn; \n\t\t\t}\n\t\t\t// check that txn_id has not been previously processed\n\t\t\tif ($transactionIDValid == false) {\n\t\t\t\treturn; \t\t\t\n\t\t\t}\n\t\t\t// check that receiver_email is your Primary PayPal email\n\t\t\tif ($receiver_email != $config->paypal->receiveremail) {\t\t\t\t\t\n\t\t\t\t// receiver email is not primary email, just exit.\n\t\t\t\treturn; \n\t\t\t}\n\t\t\t\n\t\t\t// execute the custom login i.e. update the expiry date in the useraccount table and set the start and end dates in the payment table\n\t\t\texecuteCustomLogic($this->_getParam('custom'), $paymentid, $this->_getParam('item_number'));\n\t\t} else {\n\t\t\t// TODO: log for manual investigation\n\t\t\tsendTestMessage(\"Paypal POST BACK VERIFICATION failed: Log manual investigation\", \"Paypal POST BACK VERIFICATION failed: Log manual investigation\");\n\t\t\t$this->_logger->err(\"Paypal payment with Txn #\".$txn_id.\" is invalid, manual investigation required\");\n\t\t}\n\t}", "public function send_frnd_req($frnd_id) {\n $user_id = $this->session->userdata('logged_in')['id'];\n $data = array(\n 'resource_id' => $user_id,\n 'user_id' => $frnd_id,\n 'resourse_approved' => 1,\n 'req_sent' => date('Y-m-d H:i:s')\n );\n $this->Friendsmodel->send_frnd_req($data);\n $data = array(\n 'resource_id' => $frnd_id,\n 'user_id' => $user_id,\n 'user_approved' => 1,\n 'req_sent' => date('Y-m-d H:i:s')\n );\n $this->Friendsmodel->send_frnd_req($data);\n $msg = 'has sent you a friend request';\n add_notification($frnd_id,$user_id,$msg);\n }", "function wpsp_email_notify( $inquiry_info, $is_operator = false, $is_tour_design = flase ) {\n\t\n\tif ( $is_operator ) {\n\t\t$subject = ( $is_tour_design ) ? esc_html__( 'Tour design:', 'discovertravel' ) . ' ' . $inquiry_info['fullname'] : esc_html__( 'Tour inquiry:', 'discovertravel' ) . ' ' . $inquiry_info['firstname'] . ' ' . $inquiry_info['lastname'];\n\t} else {\n\t\t$subject = get_bloginfo('name') . ' ' . esc_html__( 'Notification', 'discovertravel' );\n\t}\n\t\n\t$guest_email = strip_tags( $inquiry_info['email'] );\n\t$operator_email = ot_get_option('operator-email');\n\t$noreply_email = ot_get_option('noreply-email');\n\t$emailTo = ( $is_operator ) ? $operator_email : $guest_email;\n\t\n\tif ( $is_operator ) {\n\t\t$headers = \"From: \" . $guest_email . \"\\r\\n\";\n\t\t$headers .= \"Reply-To: \" . $guest_email . \"\\r\\n\";\n\t} else {\n\t\t$headers = \"From: \" . $noreply_email . \"\\r\\n\";\n\t}\n\t$headers .= \"MIME-Version: 1.0\\r\\n\";\n\t$headers .= \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\";\n\n\tif ( $is_tour_design ) {\n\t\t$custom_destination = '';\n\t\tforeach ( $inquiry_info['destinations'] as $destination ) :\n\t\t\t$custom_destination .=\t$destination . ', ';\n\t\tendforeach;\n\n\t\t$custom_style = '';\n\t\tforeach ( $inquiry_info['tourstyles'] as $style ) :\n\t\t\t$custom_style .=\t$style . ', ';\n\t\tendforeach;\n\t}\n\t\n\t$body = '<html><body style=\"background-color:#4caf50; padding-bottom:30px;\">';\n\t\n\t$body .= '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#333333\"><tbody>';\n \t$body .= '<tr>';\n $body .= '<td align=\"center\" valign=\"top\">';\n \n $body .= '<table width=\"640\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tbody>';\n $body .= '<tr>';\n $body .= '<td width=\"170\" valign=\"middle\" style=\"padding-bottom:10px; padding-top:10px;\">';\n $body .= '<img src=\"'. ot_get_option('custom-logo') . '\">';\n $body .= '</td>';\n $body .= '<td width=\"470\" valign=\"middle\" style=\"padding-bottom:10px; padding-top:10px; text-align:right;\">';\n $body .= '<font style=\"font-size:18px;line-height:18px\" face=\"Arial, sans-serif\" color=\"#ffffff\">' . esc_html__( 'Hotline Support: ', 'discovertravel' ) . '<font color=\"#ffffff\" style=\"text-decoration:none;color:#ffffff\">' . ot_get_option('operator-hotline') . '</font></font>';\n $body .= '<br><font style=\"font-size:14px;line-height:14px\" face=\"Arial, sans-serif\" color=\"#cccccc\"><a href=\"mailto:' . ot_get_option('operator-email') . '\" style=\"text-decoration:none\"><font color=\"#cccccc\">' . ot_get_option('operator-email') . '</font></a></font>';\n $body .= '</td>';\n $body .= '</tr>';\n $body .= '</tbody></table>';\n \n $body .= '</td>';\n $body .= '</tr>';\n $body .= '</tbody></table>';\n\n\t$body .= '<div style=\"max-width:640px; margin: 30px auto 20px; background-color:#fff; padding:30px;\">';\n\t$body .= '<table cellpadding=\"5\" width=\"100%\"><tbody>';\n\t$body .= '<tr>';\n\t$body .= '<td colspan=\"2\">';\n\tif ( $is_operator ) {\n\t\t$body .= '<p>' . esc_html__( 'Dear Operators', 'discovertravel' ) . ',</p>';\n\t\tif ( $is_tour_design ) {\n\t\t\t$body .= '<p>' . esc_html__( 'Please review the tour customized from ', 'discovertravel' ) . ' <strong>' . $inquiry_info['fullname'] . esc_html__( ' listed bellow', 'discovertravel' ) . '</p>';\t\n\t\t} else {\n\t\t\t$body .= '<p>' . esc_html__( 'Please review tour inquiry from ', 'discovertravel' ) . ' <strong>' . $inquiry_info['title'] . ' ' . $inquiry_info['firstname'] . '</strong>' . esc_html__( ' listed bellow', 'discovertravel' ) . '</p>';\t\n\t\t}\n\t\t\t\n\t} else {\n\t\tif ( $is_tour_design ) {\n\t\t\t$body .= '<p>' . esc_html__( 'Dear', 'discovertravel' ) . ' ' . $inquiry_info['fullname'] . ',</p>';\n\t\t} else {\n\t\t\t$body .= '<p>' . esc_html__( 'Dear', 'discovertravel' ) . ' ' . $inquiry_info['title'] . ' ' . $inquiry_info['firstname'] . ',</p>';\t\n\t\t}\n\t\t$body .= '<p>' . esc_html__( 'Thank you very much for your kind interest in booking Tours in Cambodia with', 'discovertravel' ) . ' ' . get_bloginfo('name') . '. ' . esc_html__( 'One of our travel consultants will proceed your request and get back to you with BEST OFFERS quickly.', 'discovertravel' ) . '</p>';\n\t\t$body .= '<p>' . esc_html__( 'Please kindly check all the information of your inquiry again as below:', 'discovertravel' ) . '</p>';\n\t}\n\t$body .= '</td>';\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\t$body .= '<td colspan=\"2\"><div style=\"border-bottom:1px solid #ccc; padding-bottom:5px;\"><strong>' . ( $is_tour_design ) ? esc_html__( 'Tour design summary:', 'discovertravel' ) : esc_html__( 'Tour inquiry summary:', 'discovertravel' ) . '</strong></div></td>';\n\t$body .= '</tr>';\n\tif ( !$is_tour_design ) {\n\t\t$body .= '<tr>';\n\t\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Tour name: ', 'discovertravel' ) . '</strong></td>';\n\t\t$body .= '<td width=\"70%\">' . $inquiry_info['tourname'] . ' ' . $inquiry_info['tourday'] . ' ' . esc_html__( 'Days', 'discovertravel' ) . '/' . ($inquiry_info['tourday'] - 1) . ' ' . esc_html__( 'Nights', 'discovertravel' ) . '</td>';\n\t\t$body .= '</tr>';\n\t} else {\n\t\t$body .= '<tr>';\n\t\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Destinations: ', 'discovertravel' ) . '</strong></td>';\n\t\t$body .= '<td width=\"70%\">' . $custom_destination . '' . $inquiry_info['otherdestination'] . '</td>';\n\t\t$body .= '</tr>';\n\t\t$body .= '<tr>';\n\t\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Tour styles: ', 'discovertravel' ) . '</strong></td>';\n\t\t$body .= '<td width=\"70%\">' . $custom_style . '</td>';\n\t\t$body .= '</tr>';\n\t}\n\t$body .= '<tr>';\n\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Will travel as: ', 'discovertravel' ) . '</strong></td>';\n\t$body .= '<td width=\"70%\" style=\"text-transform: capitalize;\">' . $inquiry_info['tourtype'] . '</td>';\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Total guests: ', 'discovertravel' ) . '</strong></td>';\n\t$body .= '<td width=\"70%\">';\n\tif ( $inquiry_info['tourtype'] == 'solo' ) {\n\t\t$body .= esc_html__( 'Adults:', 'discovertravel' ) . ' 1';\n\t}\n\tif ( $inquiry_info['tourtype'] == 'couple' ) {\n\t\t$body .= esc_html__( 'Adults:', 'discovertravel' ) . ' 2';\n\t}\n\tif ( $inquiry_info['tourtype'] == 'family' || $inquiry_info['tourtype'] == 'group' ) {\n\t\t$body .= esc_html__( 'Adults:', 'discovertravel' ) . ' ' . $inquiry_info['adult'] . ', ';\n\t\t$body .= esc_html__( 'Children:', 'discovertravel' ) . ' ' . $inquiry_info['children'] . ', '; \n\t\t$body .= esc_html__( 'Babies:', 'discovertravel' ) . ' ' . $inquiry_info['kids'];\n\t} // end tour type as family or group\n\t$body .= '</td>';\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Hotel class: ', 'discovertravel' ) . '</strong></td>';\n\t$body .= '<td width=\"70%\">' . $inquiry_info['tourclass'] . '</td>';\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\tif ( $inquiry_info['flexibledate'] ) {\n\t\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Flexible date: ', 'discovertravel' ) . '</strong></td>';\n\t\t$body .= '<td width=\"70%\">' . $inquiry_info['manualdate'] . '</td>';\n\t} else {\n\t\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Arrive date: ', 'discovertravel' ) . '</strong></td>';\n\t\t$body .= '<td width=\"70%\">' . date(\"d F Y\", strtotime( $inquiry_info['departuredate'] )) . '</td>';\n\t}// end flexible date is checked\n\t$body .= '</tr>';\n\tif ( !empty( $inquiry_info['otherrequest'] ) ) {\n\t$body .= '<tr>';\n\t$body .= '<td valign=\"top\" style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Special requests: ', 'discovertravel' ) . '</strong></td>';\n\t$body .= '<td width=\"70%\">' . $inquiry_info['otherrequest'] . '</td>';\n\t$body .= '</tr>';\n\t} // end other request\n\t$body .= '<tr>';\n\t$body .= '<td colspan=\"2\"><div style=\"padding-top: 10px; border-bottom:1px solid #ccc; padding-bottom:5px;\"><strong>' . esc_html__( 'Contact info:', 'discovertravel' ) . '</strong></div></td>';\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Full Name: ', 'discovertravel' ) . '</strong></td>';\n\tif ( $is_tour_design ) {\n\t\t$body .= '<td width=\"70%\"><strong>' . $inquiry_info['fullname'] . '</strong></td>';\n\t} else {\n\t\t$body .= '<td width=\"70%\"><strong>' . $inquiry_info['title'] . ' ' . $inquiry_info['firstname'] . ' ' . $inquiry_info['lastname'] . '</strong></td>';\n\t}\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Email: ', 'discovertravel' ) . '</strong></td>';\n\t$body .= '<td width=\"70%\">' . $inquiry_info['email'] . '</td>';\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Phone: ', 'discovertravel' ) . '</strong></td>';\n\t$body .= '<td width=\"70%\">' . $inquiry_info['phone'] . '</td>';\n\t$body .= '</tr>';\n\t$body .= '<tr>';\n\t$body .= '<td style=\"padding-left:30px;width:30%;color:#666666;\"><strong>' . esc_html__( 'Nationality: ', 'discovertravel' ) . '</strong></td>';\n\t$body .= '<td width=\"70%\">' . $inquiry_info['country'] . '</td>';\n\t$body .= '</tr>';\n\t$body .= '</tbody></table>';\n\n\tif ( !$is_operator )\n\t\t$body .= '<br><p><strong>' . esc_html__( 'Tips: ', 'discovertravel' ) . '</strong>' . esc_html__( 'If you submit incorrect information, please contact our travel consultants to change your information by ', 'discovertravel' ) . '<a href=\"mailto:' . ot_get_option('operator-email') . '\">' . ot_get_option('operator-email') . '</a></p>';\n\t\n\t$body .= '<p style=\"padding-top: 10px;\">' . esc_html__( 'Thanks & Best regards,', 'discovertravel') . '</p>';\t\n\n\tif ( !$is_operator ) {\n\t\t$body .= '<p style=\"border-top:1px solid #ccc; padding-top:30px; font-size:12px; color:#666666;\"><strong style=\"font-size:13px; color:#4caf50;\">' . get_bloginfo('name') . '</strong>';\n\t\t$body .= '<br>' . ot_get_option('operator-address');\n\t\t$body .= '<br><strong>' . esc_html__( 'T. ', 'discovertravel' ) . '</strong>' . ot_get_option('operator-phone');\n\t\t$body .= '<br><strong>' . esc_html__( 'E. ', 'discovertravel' ) . '</strong><a href=\"mailto:' . ot_get_option('operator-email') . '\">' . ot_get_option('operator-email') . '</a>';\n\t\t$body .= '<br><strong>' . esc_html__( 'F. ', 'discovertravel' ) . '</strong>' . ot_get_option('operator-fax');\n\t\t$body .= '<br><strong>' . esc_html__( 'W: ', 'discovertravel' ) . '</strong>' . get_bloginfo('wpurl', 'display') . '</p>';\n\t}\n\t$body .= '</div>'; //wrapper\n\t$body .= '</body></html>';\n\t\n\tif ( mail( $emailTo, $subject, $body, $headers ) ){\n\t\tif ( !$is_operator ) {\n\t\t\t$out = '<h3>' . esc_html__( 'Thank you for sending us your inquiry!', 'discovertravel' ) . '</h3>';\n\t\t\t$out .= '<p>' . esc_html__( 'We will contact you within 01 working day. If you have any questions, please kindly contact us at: ', 'discovertravel' );\n\t\t\t$out .= '<br>Email: <a href=\"mailto:' . $operator_email . '\">' . $operator_email . '</a>';\n\t\t\t$out .= '<br><span class=\"hotline\">Hotline: ' . ot_get_option('operator-hotline') . '</span></p>';\n\t\t\t$out .= '<p class=\"note\">Note: To ensure that you can receive a reply from us, Please kindly add the \"' . str_replace( 'http://', '', get_home_url() ) . '\" domain to your e-mail \"safe list\".<br>If you do not receive a response in your \"inbox\" within 12 hours, check your \"bulk mail\" or \"junk mail\" folders.</p>';\n\t\t\techo $out;\n\t\t}\n\t} else {\n\t\tif ( !$is_operator )\n\t\t\techo '<h5>' . esc_html__( 'Sorry, your inquiry cannot be send right now.', 'discovertravel' ) . '</h5><p>' . error_message . '</p>';\n\t}\n}", "function emailRegistrationAdmin() {\n require_once ('com/tcshl/mail/Mail.php');\n $ManageRegLink = DOMAIN_NAME . '/manageregistrations.php';\n $emailBody = $this->get_fName() . ' ' . $this->get_lName() . ' has just registered for TCSHL league membership. Click on the following link to approve registration: ';\n $emailBody.= $ManageRegLink;\n //$sender,$recipients,$subject,$body\n $Mail = new Mail(REG_EMAIL, REG_EMAIL, REG_EMAIL_SUBJECT, $emailBody);\n $Mail->sendMail();\n }", "private function sendNotifyEmail(){\n $uS = Session::getInstance();\n $to = filter_var(trim($uS->referralFormEmail), FILTER_SANITIZE_EMAIL);\n\n try{\n if ($to !== FALSE && $to != '') {\n// $userData = $this->getUserData();\n $content = \"Hello,<br>\" . PHP_EOL . \"A new \" . $this->formTemplate->getTitle() . \" was submitted to \" . $uS->siteName . \". <br><br><a href='\" . $uS->resourceURL . \"house/register.php' target='_blank'>Click here to log into HHK and take action.</a><br>\" . PHP_EOL;\n\n $mail = prepareEmail();\n\n $mail->From = ($uS->NoReplyAddr ? $uS->NoReplyAddr : \"[email protected]\");\n $mail->FromName = htmlspecialchars_decode($uS->siteName, ENT_QUOTES);\n $mail->addAddress($to);\n\n $mail->isHTML(true);\n\n $mail->Subject = \"New \" . Labels::getString(\"Register\", \"onlineReferralTitle\", \"Referral\") . \" submitted\";\n $mail->msgHTML($content);\n\n if ($mail->send() === FALSE) {\n return false;\n }else{\n return true;\n }\n }\n }catch(\\Exception $e){\n return false;\n }\n return false;\n }", "public function sendEmailVerificationNotification()\n { \n \n $this->notify(new ConfirmEmail); \n \n }", "public function payForInvitedUsers(){\n \n $userService = parent::getService('user','user');\n \n $refererUsers = $userService->getUsersWithRefererNotPaid();\n foreach($refererUsers as $user):\n // if created at least 30 days ago\n if(strtotime($user['created_at'])>strtotime('-30 days')){\n continue;\n }\n // if logged within last 5 days ago\n if(!(strtotime($user['last_active'])>strtotime('-7 days'))){\n $user->referer_not_active = 1;\n $user->save();\n continue;\n }\n \n $values = array();\n $values['description'] = 'Referencing FastRally to user '.$user['username'];\n $values['income'] = 1;\n \n \n if($user['gold_member_expire']!=null){\n $amount = 100;\n }\n else{\n $amount = 10;\n }\n \n \n $userService->addPremium($user['referer'],$amount,$values);\n $user->referer_paid = 1;\n $user->save();\n endforeach;\n echo \"done\";exit;\n }", "public function accept_friend_request()\n {\n //update status to 1;\n $this->Friend_model->accept_friend_request_model();\n //two (perhaps more in the future) data rows are inserted into checked_on table where each one corresponds to the time the user has seen the other user's messages\n $this->Friend_model->insert_notifications_model();\n }", "function _wp_privacy_send_erasure_fulfillment_notification($request_id)\n {\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerification('admin'));\n }", "public function send_expiry_notification() {\n $expired_posts = $this->get_expired_posts();\n\n $subject = 'Posts that need your attention';\n $recipient = \\get_bloginfo('admin_email');\n $content = $this->_generate_expiry_notification_content( $expired_posts );\n\n // Set post to draft\n // bb_log( $content, 'Sending an email to ' . $recipient );\n // Helper\\Email::send_email( $recipient, $subject, $content );\n }", "function attendeeRegistrationEditNotification($eventID, $userID, $attenID, $status, $eventName, $attenFirstName, $attenLastName) \r\r\n\t{\r\r\n\t\t$result = mysql_query(\"select emailAddress from User where userID = '\".$attenID.\"'\");\r\r\n\t\t$num_rows = mysql_num_rows($result);\r\r\n\t\t\r\r\n\t\tif (!$result) \r\r\n\t\t{\r\r\n\t\t \tthrow new Exception('Could not find email address.');\r\r\n\t\t} \r\r\n\t\telse if ($num_rows == 0) \r\r\n\t\t{\r\r\n\t\t\tthrow new Exception('Could not find the user!');\r\r\n\t\t} \r\r\n\t\telse \r\r\n\t\t{\r\r\n\t\t\t$apostrophe \t\t= array(\"\\'\"); // for fixing apostrophe issue\r\r\n\t\t\t$attenFirstName \t= str_replace($apostrophe, \"'\", $attenFirstName);\r\r\n\t\t\t$attenLastName \t\t= str_replace($apostrophe, \"'\", $attenLastName);\r\r\n\t\t\t$eventName \t\t\t= str_replace($apostrophe, \"'\", $eventName);\r\r\n\t\t\t\r\r\n\t\t \t$row = mysql_fetch_object($result);\r\r\n\t\t\t$email = $row -> emailAddress;\r\r\n\r\r\n\t\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'From: uGather <[email protected]>' . \"\\r\\n\";\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t$sub = \"uGather: \".$attenID.\": Event Registration for \".$eventName.\"\";\r\r\n\t\t\t$mesg = \"<html>\r\r\n\t\t\t\t\t\t<head>\r\r\n\t\t\t\t\t\t\t<title>You have registered for an event!</title>\r\r\n\t\t\t\t\t\t</head>\r\r\n\t\t\t\t\t\t<body>\r\r\n\t\t\t\t\t\t<h2 style=\\\"font-family: 'Trebuchet MS', 'Helvetica Neue', Arial, Sans-serif; font-weight: bold; padding: 10px 0 5px 5px; color: #444; font-size: 2.5em; color: #88AC0B; border-bottom: 1px solid #E4F2C8; letter-spacing: -2px; margin-left: 5px; \\\">uGather Event Registration Change</h2>\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">Hello, \".$attenFirstName.\" \".$attenLastName.\"! </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">You have changed your registration status for the event <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">\".$eventName.\"</a> at <a href=\\\"http://www.ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. <br />\r\r\n\t\t\t\t\t\tYour registration status for \".$eventName.\" is: \".$status.\". </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">You can find the event page for \".$eventName.\" here: <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view event \".$eventName.\"</a>. You can view all of the attendees to that event here: <a href=\\\"http://www.ugather.info/viewAttendees.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view attendees to \".$eventName.\"</a>. </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">This is an automatically generated email from <a href=\\\"http://ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. Please do not respond. Thank you.</p> \r\r\n\t\t\t\t\t\t</body>\r\r\n\t\t\t\t\t\t</html>\";\r\r\n\t\r\r\n\t\t\tif (mail($email, $sub, $mesg, $headers)) \r\r\n\t\t\t{\r\r\n\t\t\t\treturn true;\r\r\n\t\t\t} \r\r\n\t\t\telse \r\r\n\t\t\t{\r\r\n\t\t\t\tthrow new Exception('Could not send email.');\r\r\n\t\t\t}\r\r\n \t}\r\r\n\t}", "public function linkNotification() {\n\n\n /*\n * \tWithin this function you should request the status of the transaction to get all transaction details, based on that information you should update the order and respond with a link\t\n */\n\n $return_url = substr(BASE_URL, 0, -12) . 'index.php';\n\n echo '<a href=\"' . $return_url . '\">Click here to return to the store.</a>';\n }", "function sendReleasingRequestToEmployer($userData)\n\t\t{\n\t\t\t$datetime = date('Y-m-d h:i:s a');\n\t\t\t//checking for milestone id and workroom id\n\t\t\t$milestone = $this->manageContent->getValue_where('milestone_info', '*', 'milestone_id', $userData['milestone']);\n\t\t\tif(!empty($milestone[0]))\n\t\t\t{\n\t\t\t\t//get workroom details\n\t\t\t\t$workroom = $this->manageContent->getValue_where('workroom_info', '*', 'workroom_id', $milestone[0]['workroom_id']);\n\t\t\t\tif(!empty($workroom[0]) && $workroom[0]['con_user_id'] == $_SESSION['user_id'] && $milestone[0]['funding_status'] == 1)\n\t\t\t\t{\n\t\t\t\t\t//get project details\n\t\t\t\t\t$project_details = $this->manageContent->getValue_where('project_info', '*', 'project_id', $workroom[0]['project_id']);\n\t\t\t\t\t//get sending user details\n\t\t\t\t\t$con_user_details = $this->manageContent->getValue_where('user_info', '*', 'user_id', $_SESSION['user_id']);\n\t\t\t\t\t//creating notification id\n\t\t\t\t\t$noti_id = uniqid('noti');\n\t\t\t\t\t$sending_user = $workroom[0]['emp_user_id'];\n\t\t\t\t\t$page_link = 'escrow.php?wid='.$workroom[0]['workroom_id'];\n\t\t\t\t\t$message = 'Money Release Request of <b>'.$milestone[0]['milestone_name'].'</b> from <b>'.$con_user_details[0]['name'].'</b> for <b>'.$project_details[0]['title'].'</b>';\n\t\t\t\t\t$column_name = array('notification_id','message','date','user_id','project_id','from_user','page_link','view_status');\n\t\t\t\t\t$column_value = array($noti_id,$message,$datetime,$workroom[0]['emp_user_id'],$workroom[0]['project_id'],$_SESSION['user_id'],$page_link,0);\n\t\t\t\t\t$insert = $this->manageContent->insertValue('notification_info', $column_name, $column_value);\n\t\t\t\t\tif($insert != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\techo 'Request Send Successfully';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo 'Request Can Not Be Sent';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t}", "function eventPlannerRegistrationEditNotification($eventID, $userID, $status, $eventName, $userFirstName, $userLastName, $plannerFirstName, $plannerLastName) \r\r\n\t{\r\r\n\t\t$result = mysql_query(\"select emailAddress from User where userID in (select userID from Event where eventID = '\".$eventID.\"')\");\r\r\n\t\t$num_rows = mysql_num_rows($result);\r\r\n\t\tif (!$result) \r\r\n\t\t{\r\r\n\t\t \tthrow new Exception('Could not find email address for that event.');\r\r\n\t\t} \r\r\n\t\telse if ($num_rows == 0) \r\r\n\t\t{\r\r\n\t\t\tthrow new Exception('Could not find event planner for event.');\r\r\n\t\t} \r\r\n\t\telse \r\r\n\t\t{\r\r\n\t\t\t$apostrophe \t\t= array(\"\\'\"); // for fixing apostrophe issue\r\r\n\t\t\t$userFirstName \t\t= str_replace($apostrophe, \"'\", $userFirstName);\r\r\n\t\t\t$userLastName \t\t= str_replace($apostrophe, \"'\", $userLastName);\r\r\n\t\t\t$plannerFirstName \t\t= str_replace($apostrophe, \"'\", $plannerFirstName);\r\r\n\t\t\t$plannerLastName \t\t= str_replace($apostrophe, \"'\", $plannerLastName);\r\r\n\t\t\t$eventName \t\t\t= str_replace($apostrophe, \"'\", $eventName);\r\r\n\t\t\t\r\r\n\t\t \t$row = mysql_fetch_object($result);\r\r\n\t\r\r\n\t\t\t$email = $row -> emailAddress;\r\r\n\t\t\t\r\r\n\t\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'From: uGather <[email protected]>' . \"\\r\\n\";\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t$sub = \"uGather: \".$userID.\": Event Registration for \".$eventName.\"\";\r\r\n\t\t\t$mesg = \"<html>\r\r\n\t\t\t\t\t\t<head>\r\r\n\t\t\t\t\t\t\t<title>Someone has registered for your event!</title>\r\r\n\t\t\t\t\t\t</head>\r\r\n\t\t\t\t\t\t<body>\r\r\n\t\t\t\t\t\t<h2 style=\\\"font-family: 'Trebuchet MS', 'Helvetica Neue', Arial, Sans-serif; font-weight: bold; padding: 10px 0 5px 5px; color: #444; font-size: 2.5em; color: #88AC0B; border-bottom: 1px solid #E4F2C8; letter-spacing: -2px; margin-left: 5px; \\\">uGather Event Registration Change</h2>\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">Hello, \".$plannerFirstName.\" \".$plannerLastName.\"! </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">The user \".$userID.\" (\".$userFirstName.\" \".$userLastName.\") has changed their registration status for your event, <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">\".$eventName.\"</a>, at <a href=\\\"http://www.ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. <br />\r\r\n\t\t\t\t\t\t\".$userID.\"'s registration status for \".$eventName.\" is: \".$status.\". </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">You can find the event page for \".$eventName.\" here: <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view event \".$eventName.\"</a>. You can view all of the attendees to your event here: <a href=\\\"http://www.ugather.info/viewAttendees.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view attendees to \".$eventName.\"</a>. </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">This is an automatically generated email from <a href=\\\"http://ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. Please do not respond. Thank you.</p> \r\r\n\t\t\t\t\t\t</body>\r\r\n\t\t\t\t\t\t</html>\";\r\r\n\t\r\r\n\t\t\tif (mail($email, $sub, $mesg, $headers)) \r\r\n\t\t\t{\r\r\n\t\t\t\treturn true;\r\r\n\t\t\t} \r\r\n\t\t\telse \r\r\n\t\t\t{\r\r\n\t\t\t\tthrow new Exception('Could not send email.');\r\r\n\t\t\t}\r\r\n \t}\r\r\n\t}", "function update_event_notice($userId, $promotionId, $storeId, $attendStatus, $eventStatus, $scheduledTime, $baseUrl)\n\t{\n\t\tlog_message('debug', '_event/update_event_notice');\n\t\tlog_message('debug', '_event/update_event_notice:: [1] userId='.$userId.' promotionId='.$promotionId.' storeId='.$storeId.' attendStatus='.$attendStatus.' eventStatus='.$eventStatus.' scheduledTime='.json_encode($scheduledTime));\n $msg='';\n\n $status = $this->_query_reader->get_row_as_array('get_previous_attend_status',array(\n 'promotion_id'=>$promotionId,\n\t\t 'user_id'=>$userId\n ));\n\n log_message('debug', '_event/update_event_notice:: [2] status='.json_encode($status));\n\n $result = $this->_query_reader->run('add_promotion_notice',array(\n 'promotion_id'=>$promotionId,\n 'user_id'=>$userId,\n 'store_id'=>$storeId,\n 'attend_status'=>$attendStatus,\n 'event_status'=>$eventStatus\n ));\n\n # Get details of the event\n $eventDetails = $this->get_event_details($userId, $promotionId);\n $eventDetails = $eventDetails[0];\n log_message('debug', '_event/update_event_notice:: [3] eventDetails='.json_encode($eventDetails));\n\n # If user response maybe(pending) and need reservation then schedule two reminder to send out in the future\n\t\tif($attendStatus == 'pending' && !empty($eventDetails) && $eventDetails['requires_reservation'] == 'Y'){\n\n $templateVariables = array('storename'=>$eventDetails['store_name'],\n 'promotiontitle'=>$eventDetails['promotion_title'],\n 'eventlink'=>$baseUrl.\"c/\".encrypt_value($eventDetails['event_id'].\"--\".format_id($userId).\"--reserve\"));\n\n $template = server_curl(MESSAGE_SERVER_URL, array('__action'=>'get_row_as_array',\n 'query' => 'get_message_template',\n 'variables' => array('message_type'=>'first_event_reminder')\n ));\n log_message('debug', '_event/update_event_notice:: [4] template='.json_encode($template));\n\n $reminder1 = server_curl(MESSAGE_SERVER_URL, array('__action'=>'schedule_send',\n \t\t\t\t\t\t'message'=>array(\n \t\t\t\t\t\t\t'senderType'=>'user',\n \t\t\t\t\t\t\t'sendToType'=>'list',\n \t\t\t\t\t\t\t'sendTo'=>array($userId),\n 'template'=>$template,\n 'templateId'=>$template['id'],\n \t\t\t\t\t\t\t'subject'=>$template['subject'],\n \t\t\t\t\t\t\t'body'=>$template['details'],\n 'sms'=>$template['sms'],\n \t\t\t\t\t\t\t'saveTemplate'=>'N',\n \t\t\t\t\t\t\t'scheduledSendDate'=>$scheduledTime[0],\n \t\t\t\t\t\t\t'sendDate'=>'',\n \t\t\t\t\t\t\t'methods'=>array(\"system\",\"email\",\"sms\"),\n 'templateVariables'=> $templateVariables\n \t\t\t\t\t\t),\n \t\t\t\t\t\t'userId'=>$userId,\n \t\t\t\t\t\t'organizationId'=>'',\n \t\t\t\t\t\t'organizationType'=>''\n \t\t\t));\n\n $template = server_curl(MESSAGE_SERVER_URL, array('__action'=>'get_row_as_array',\n 'query' => 'get_message_template',\n 'variables' => array('message_type'=>'second_event_reminder')\n ));\n log_message('debug', '_event/update_event_notice:: [5] template='.json_encode($template));\n\n $reminder2 = server_curl(MESSAGE_SERVER_URL, array('__action'=>'schedule_send',\n \t\t\t\t\t\t'message'=>array(\n \t\t\t\t\t\t\t'senderType'=>'user',\n \t\t\t\t\t\t\t'sendToType'=>'list',\n \t\t\t\t\t\t\t'sendTo'=>array($userId),\n 'template'=>$template,\n 'templateId'=>$template['id'],\n \t\t\t\t\t\t\t'subject'=>$template['subject'],\n \t\t\t\t\t\t\t'body'=>$template['details'],\n 'sms'=>$template['sms'],\n \t\t\t\t\t\t\t'saveTemplate'=>'N',\n \t\t\t\t\t\t\t'scheduledSendDate'=>$scheduledTime[1],\n \t\t\t\t\t\t\t'sendDate'=>'',\n \t\t\t\t\t\t\t'methods'=>array(\"system\",\"email\",\"sms\"),\n 'templateVariables'=>$templateVariables\n \t\t\t\t\t\t),\n \t\t\t\t\t\t'userId'=>$userId,\n \t\t\t\t\t\t'organizationId'=>'',\n \t\t\t\t\t\t'organizationType'=>''\n \t\t\t));\n\n\t\t}\n\n # If the status was pending then delete the reminder messages\n if( $status['attend_status'] == 'pending' && !empty($eventDetails) && $eventDetails['requires_reservation'] == 'Y' && $result) {\n\n $template1 = server_curl(MESSAGE_SERVER_URL, array('__action'=>'get_row_as_array',\n 'query' => 'get_message_template',\n 'variables' => array('message_type'=>'first_event_reminder')\n ));\n\n $template2 = server_curl(MESSAGE_SERVER_URL, array('__action'=>'get_row_as_array',\n 'query' => 'get_message_template',\n 'variables' => array('message_type'=>'second_event_reminder')\n ));\n\n $result = $this->_query_reader->run('delete_reminder_messages',array(\n 'user_id'=>$userId,\n 'store_name'=>$eventDetails['store_name'],\n 'template_id'=>implode(\"','\", array($template1['id'],$template2['id']))\n ));\n\n # If the event doesn't need reservation then delete record if user change their mind to maybe or not going\n } else if ( $status['attend_status'] == 'confirmed' && !empty($eventDetails) && $eventDetails['requires_reservation'] == 'N' && $result){\n\n $result = $this->_query_reader->run('delete_reservation_record',array(\n 'user_id'=>$userId,\n 'promotion_id'=>$promotionId\n ));\n }\n\n\t\tlog_message('debug', '_event/update_event_notice:: [6] result='.json_encode($result));\n return array('result'=>(!empty($result) && $result? 'SUCCESS': 'FAIL'), 'msg'=>$msg);\n\t}", "public function notifyTransferedPlayers(){\n \n Service::loadModels('rally', 'rally');\n $peopleService = parent::getService('people','people');\n $carService = parent::getService('car','car');\n $teamService = parent::getService('team','team');\n $marketService = parent::getService('market','market');\n $notificationService = parent::getService('user','notification');\n \n /*\n * Players\n */\n $offersNoBid = $marketService->getFinishedOffersNotNotifiedNoBid();\n foreach($offersNoBid as $offerNoBid):\n $notificationService->addNotification($offerNoBid['Player']['first_name'].\" \".$offerNoBid['Player']['last_name'].\" was not sold. Player will return to your team tomorrow\",3,$offerNoBid['Team']['User']['id']);\n $offerNoBid->set('notified',1);\n $offerNoBid->save();\n endforeach;\n \n $offers = $marketService->getFinishedOffersNotNotified();\n // 1. Zaplacenie za transfer przez kupujacego\n \n foreach($offers as $offer): \n foreach($offer['Bids'] as $key => $bid){\n if($key==0){\n $notificationService->addNotification($offer['Player']['first_name'].\" \".$offer['Player']['last_name'].\" was successfully sold. Player will leave your team tomorrow\",3,$offer['Team']['User']['id']);\n $notificationService->addNotification($offer['Player']['first_name'].\" \".$offer['Player']['last_name'].\" has been bought. Player will join your team tomorrow\",3,$bid['Team']['User']['id']);\n }\n else{\n $notificationService->addNotification($offer['Player']['first_name'].\" \".$offer['Player']['last_name'].\" has not been bought.\",3,$bid['Team']['User']['id']);\n }\n } \n \n \n $offer->set('notified',1);\n $offer->save();\n endforeach;\n /*\n * Cars\n */\n \n $caroffersNoBid = $marketService->getFinishedCarOffersNotMovedNoBid();\n foreach($caroffersNoBid as $offerNoBid):\n $notificationService->addNotification($offerNoBid['Car']['name'].\" was not sold. The car will return to your team tomorrow\",3,$offerNoBid['Team']['User']['id']);\n $offerNoBid->set('notified',1);\n $offerNoBid->save();\n endforeach;\n \n $caroffers = $marketService->getFinishedCarOffersNotMoved();\n // 1. Zaplacenie za transfer przez kupujacego\n // 2. OTrzymanie kasy przez sprzedajacego\n // 3. Zmiana teamu przez kupujacego\n // 4. Ustawienie oferty na player_moved\n foreach($caroffers as $offer):\n foreach($offer['Bids'] as $key => $bid){\n if($key==0){\n $notificationService->addNotification($offer['Car']['name'].\" was successfully sold. The car will leave your team tomorrow\",3,$offer['Team']['User']['id']);\n $notificationService->addNotification($offer['Car']['name'].\" has been bought. The car will join your team tomorrow\",3,$bid['Team']['User']['id']);\n }\n else{\n $notificationService->addNotification($offer['Car']['name'].\" has not been bought.\",3,$bid['Team']['User']['id']);\n }\n }\n $offer->set('notified',1);\n $offer->save();\n endforeach;\n \n echo \"done\";exit;\n }", "public function decline()\n {\n\n if($this->user['menteer_type']==37 && $this->user['is_matched'] > 0 && $this->user['match_status']=='pending') {\n\n // mentor update\n $update_user = array(\n 'id' => $this->session->userdata('user_id'),\n 'data' => array('is_matched' => '0'),\n 'table' => 'users'\n );\n $this->Application_model->update($update_user);\n\n // mentee update\n $update_user = array(\n 'id' => $this->user['is_matched'],\n 'data' => array('is_matched' => '0'),\n 'table' => 'users'\n );\n $this->Application_model->update($update_user);\n\n $mentee = $this->Application_model->get(array('table'=>'users','id'=>$this->user['is_matched']));\n\n // notify mentee\n\n $data = array();\n $data['first_name'] = $this->user['first_name'];\n $data['last_name'] = $this->user['last_name'];\n\n $message = $this->load->view('/chooser/email/decline', $data, true);\n $this->email->clear();\n $this->email->from($this->config->item('admin_email', 'ion_auth'), $this->config->item('site_title', 'ion_auth'));\n $this->email->to($mentee['email']);\n $this->email->subject('Mentor has declined');\n $this->email->message($message);\n\n $result = $this->email->send(); // @todo handle false send result\n\n $this->session->set_flashdata('message', '<div class=\"alert alert-success\">The Mentee has been notified.</div>');\n redirect('/dashboard');\n\n }else{\n\n redirect('/dashboard');\n\n }\n\n }", "function send_notification_expiring_licence() {\n $site_url = $_SERVER['HTTP_HOST'];\n if ($site_url == \"xxxx.com\") {\n\n $licence = array (\n \"Plugin 1\" => \"2020-06-16\",\n \"Plugin 2\" => \"2020-12-10\",\n \"Plugin 3\" => \"2020-03-29\",\n \"Plugin 4\" => \"2020-03-04\",\n \"Plugin 5\" => \"2021-01-10\",\n );\n\n $now = date(\"Y-m-d\"); // On détermine la date d'aujourd'hui\n $datetime_now = new DateTime($now);\n\n foreach ($licence as $nom => $date_deadline) {\n \n $datetime_deadline = new DateTime($date_deadline);\n\n $difference = $datetime_now->diff($datetime_deadline);\n\n // Au bout de 15 jours, une première notification est envoyée avertissant de l'arrivée à échéande de la licence\n\n if ($difference->y == 0 AND $difference->m == 0 AND $difference->d == 15) {\n\n $to = \"[email protected], [email protected]\";\n\n $headers = array('Content-Type: text/html; charset=UTF-8');\n\n $subject = \"[Elephant] - Licence $nom arrivant à expiration\";\n $message = \"Bonjour,<br/><br/>\";\n $message .= \"Le plugin $nom arrive à expiration dans <b>15 jours.</b><br/>\";\n $message .= \"Merci de le renouveler en se référant au chef de projet concerné.<br/>\";\n\t\t\t$message .= \"Cordialement\";\n\n\t\t\twp_mail( $to, $subject, $message, $headers);\n\n }\n\n\n }\n\n }\n \n}", "public function notifyClientTicketDelivred($client,$ticket)\n\t{\n\t\t//step 2 create the action link\n\t\t//step 3 pass tha variable to the twig \n\t\t//step 4 send email\n\t\t$client_email=$client->getEmail();\n\t\t$client_name=$client->getName();\n\t\t$ticket_id=$ticket->getDiplayId();\n\t\t$token=$this->createEmailToken($client->getCredentials());\n\t\t$today=new \\DateTime(\"NOW\",new \\DateTimeZone(TIMEZONE));\n\t\t$date=$today->format(\"d.m.Y\");\n\t\t$link=$this->router->generate(\"_acceptticketemail\",array('ticket_id' =>$ticket_id ,'token'=>$token->getTokendig()), UrlGeneratorInterface::ABSOLUTE_URL);\n\t\t$subject=\"Confirm ticket >> \".$ticket->getTitle().\" #\".$ticket->getDiplayId();\n\t\t$project = $ticket->getProject();\n\t\tif($project->getChannelid() != null)\n\t\t{\n\t\t\t$ticket_name = \"#\".$ticket->getDiplayId().\" \".$ticket->getTitle();\n\t\t\t$link2=ClientLinks::getTicketDetailLink($project->getDisplayId(),$ticket->getDiplayId());\n\t\t\t$mess = $this->messaging->sendActionSlackMessage(\"This ticket has been delivered with total production time \".$ticket->getRealtime().'h',\n\t\t\t\t\"please accept ticket\",$link2,$link,$ticket_name,$project->getChannelid());\n\t\t}\n\t\t$message =\\Swift_Message::newInstance()\n\t\t->setSubject($subject)\n\t\t->setFrom(array(\"[email protected]\"=>\"flexwork\"))\n\t\t->setTo($client_email)\n\t\t->setBody(\n\t\t\t$this->twig->render(\n\t\t\t\t\t'EmailTemplates/client/delivered.html.twig',\n\t\t\t\t\tarray('ticket'=>$ticket,'client'=>$client,\"link\"=>$link,\"date\"=>$date)\n\t\t\t\t),\n\t\t\t\t'text/html'\n\t\t\t);\n\t\t\n\t\tif($this->checkSendNotif($client->getCredentials(),$ticket->getProject()))\n\t\t\t\t\t$isent=$this->mailer->send($message);\n\t\tforeach ($client->getUsers() as $user) {\n\t\t\t$client->setName($user->getName());\n\t\t\t$message =\\Swift_Message::newInstance()\n\t\t\t\t->setSubject($subject)\n\t\t\t\t->setFrom(array(\"[email protected]\"=>\"flexwork\"))\n\t\t\t\t->setTo($user->getEmail())\n\t\t\t\t->setBody(\n\t\t\t\t\t$this->twig->render(\n\t\t\t\t\t\t\t'EmailTemplates/client/delivered.html.twig',\n\t\t\t\t\t\t\tarray('ticket'=>$ticket,'client'=>$client,\"link\"=>$link,\"date\"=>$date)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'text/html'\n\t\t\t\t\t);\n\t\t\t\tif($this->checkSendNotif($client->getCredentials(),$ticket->getProject()))\n\t\t\t\t\t$isent=$this->mailer->send($message);\n\t\t\t}\n\n\t}", "public function requestAcceptAction() {\r\n $notification = $this->_getParam('notification', 0);\r\n\t\t$is_suggestionExist = Engine_Api::_()->getItem('user', $notification->object_id);\r\n\t\tif( empty($is_suggestionExist) ) {\r\n\t\t\t// If user are not exist then we are deleting the \"User Request\" which loggden user are gettig.\r\n\t\t\tEngine_Api::_()->getDbtable('notifications', 'activity')->delete(array('notification_id = ?' => $notification->notification_id));\r\n\t\t\t$this->_helper->redirector->gotoRoute(array('route' => 'default'));\r\n\t\t}else {\r\n\t\t\t$this->view->notification = $notification;\r\n\t\t}\r\n }", "function invite_check($from, $to, $togcm, $type, $message, $sender_name, $event_refrence){\n$arr = array(\"host\" => $from,\n\t \"to_id\" => $to,\n\t \"sender_name\" => $sender_name,\n\t \"event_reference\" => $event_refrence,\n\t \"payload_type\" => \"invite_check\",\n \"payload_message\" => $message);\n$new_payload = json_encode($arr);\nsend_gcm_notify($togcm, $new_payload);\n}", "public function acceptInvitation()\n\t{\n\t\t$id = $this->request->data['id'];\n\t\t$room_name = $this->request->data['roomName'];\n\t\t$invite['MeetingUser']['id'] = $id;\n\t\t//set status 1 as accepted\n\t\t$invite['MeetingUser']['is_accept'] = 1;\n\t\t$invite['MeetingUser']['is_read'] = 1;\n\t\t$invite['MeetingUser']['is_attend'] = 0;\n\t\t//set notification\n\t\t$oldCount1 = $this->Session->read('oldMeetingCount');\n\t\tif ($oldCount1>0) {\n\t\t\t$newCount1 = $oldCount1-1;\n\t\t\t$this->Session->write('oldMeetingCount',$newCount1);\n\t\t}\n\t\tif($this->MeetingUser->save($invite))\n\t\t\techo \"1\";\n\t\telse\n\t\t\techo \"0\";\n\t\texit;\n\t}", "private function newAcceptRejectMessageBody() {\n echo 'Implement newAcceptRejectMessageBody() based on generateAccRejEmail() in curationAccRejEmailText.php' . \"<br>\\r\\n\";\n }", "public static function sendEmailReminder()\n {\n /*'text'->Notification.notification_message\n subject-> notification_subject \n\n sender can be from .env or email of currently logged user ....\n to... list from vic, vol, emp\n */\n /*Mail::raw(Input::get('notification_message'), function($message) {\n $message->from('[email protected]', 'NECare System email');\n\n $message->to('[email protected]', 'Chanda')->subject(Input::get('notification_subject'));\n });\n */\n\n $activities= Input::get('activity_id');\n //if volunteer = 'Y'\n if (Input::get('to_all_volunteers')=='Y') {\n\n\n $activitydetails = Activitydetail::where('activity_id', $activities)->value('volunteer_id'); \n $volunteers = Volunteer::where('id', $activitydetails)->get(); \n foreach ($volunteers as $volunteer) {\n Mail::raw(Input::get('notification_message'), function($message) use ($volunteer) {\n $message->from('[email protected]', 'NECare System email');\n\n $message->to($volunteer->email, $volunteer->last_name.\", \".$volunteer->first_name)->subject(Input::get('notification_subject'));\n });\n } \n }\n\n //if victim = 'Y'\n if (Input::get('to_all_victims')=='Y') {\n\n $activitydetails = Activitydetail::where('activity_id', $activities)->value('victim_id'); \n $victims = Victim::where('id', $activitydetails)->get(); \n foreach ($victims as $victim) {\n Mail::raw(Input::get('notification_message'), function($message) use ($victim) {\n $message->from('[email protected]', 'NECare System email');\n\n $message->to($victim->email, $victim->last_name.\", \".$victim->first_name)->subject(Input::get('notification_subject'));\n });\n }\n }\n\n //if employee = 'Y'\n if (Input::get('to_all_employees')=='Y') {\n\n\n $activitydetails = Activitydetail::where('activity_id', $activities)->value('employee_id'); \n $employees = Employee::where('id', $activitydetails)->get(); \n foreach ($employees as $employee) {\n Mail::raw(Input::get('notification_message'), function($message) use ($employee) {\n $message->from('[email protected]', 'NECare System email');\n\n $message->to($employee->email, $employee->last_name.\", \".$employee->first_name)->subject(Input::get('notification_subject'));\n });\n } \n }\n }", "function user_subscription_exemptions()\n {\n global $ilance, $phrase, $ilconfig;\n\n $notice = $expiredusernames = '';\n $expiredexemptions = 0;\n $exemptionscheck = $ilance->db->query(\"\n SELECT exemptid, user_id, accessname, value, exemptfrom, exemptto, comments, invoiceid, active\n FROM \" . DB_PREFIX . \"subscription_user_exempt\n WHERE exemptto <= '\" . DATETODAY . \" \" . TIMENOW . \"'\n AND active = '1'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($exemptionscheck) > 0)\n { \n while ($exemptions = $ilance->db->fetch_array($exemptionscheck, DB_ASSOC))\n {\n // expire subscription exemptions\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"subscription_user_exempt\n SET active = '0'\n WHERE exemptid = '\" . $exemptions['exemptid'] . \"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n $expiredusernames .= fetch_user('username', $exemptions['user_id']) . ', ';\n $expiredexemptions++;\n // send email to notify about subscription permission exemption expiry and renewal details\n // >> this will be added at a later date <<\n }\n if (!empty($expiredusernames))\n {\n $expiredusernames = mb_substr($expiredusernames, 0, -2);\n }\n else\n {\n $expiredusernames = 'None';\n }\n $notice .= \"Expired $expiredexemptions subscription exemptions for the following users: $expiredusernames. \";\n }\n return $notice;\n }", "function shipPriceRejected($id,$logisticportalid) {\n global $objGeneral;\n global $objCore;\n $arrColumnUpdate = array('pricestatus' => 2);\n $varUsersWhere = \" pkpriceid ='\" . $id . \"'\";\n $this->update(TABLE_ZONEPRICE, $arrColumnUpdate, $varUsersWhere);\n $arrLogisticdetails = $objGeneral->GetCompleteDetailsofLogisticPortalbyid($logisticportalid);\n $logistictitle = $arrLogisticdetails[0]['logisticTitle'];\n $logisticmailid = $arrLogisticdetails[0]['logisticEmail'];\n \n \n if ($_SERVER[HTTP_HOST] != '192.168.100.97') {\n //Send Mail To User\n $varPath = '<img src=\"' . SITE_ROOT_URL . 'common/images/logo.png' . '\"/>';\n $varToUser = $logisticmailid;\n $varFromUser = SITE_EMAIL_ADDRESS;\n $sitelink = SITE_ROOT_URL . 'logistic/';\n $varSubject = SITE_NAME . ':Price Apporval';\n $varBody = '\n \t\t<table width=\"700\" cellspacing=\"0\" cellpadding=\"5\" border=\"0\">\n\t\t\t\t\t\t\t <tbody>\n\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t <td width=\"600\" style=\"padding-left:10px;\">\n\t\t\t\t\t\t\t <p>\n\t\t\t\t\t\t\tWelcome! <br/><br/>\n\t\t\t\t\t\t\t<strong>Dear ' . $logistictitle . ',</strong>\n\t\t\t\t\t\t\t <br />\n\t\t\t\t\t\t\t <br />\n\t\t\t\t\t\t\tWe are inform that your Zone Price Are Not Apporved. \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t <br /><br />\n\t\t\t\t\t\t\tIf there is anything that we can do to enhance your Tela Mela experience, please feel free to <a href=\"{CONTACT_US_LINK}\">contact us</a>.\n\t\t\t\t\t\t\t<br/><br/>\n\t\t\t\t\t\t\t </p>\n\t\t\t\t\t\t\t </td>\n\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t </tbody>\n\t\t\t\t\t\t\t </table>\n \t\t';\n// $varOutput = file_get_contents(SITE_ROOT_URL . 'common/email_template/html/admin_user_registration.html');\n// $varUnsubscribeLink = 'Click <a href=\"' . SITE_ROOT_URL . 'unsubscribe.php?user=' . md5($argArrPost['frmUserEmail']) . '\" target=\"_blank\">here</a> to unsubscribe.';\n// $varActivationLink = '';\n// $arrBodyKeywords = array('{USER}', '{USER_NAME}', '{PASSWORD}', '{EMAIL}', '{ROLE}', '{SITE_NAME}', '{ACTIVATION_LINK}', '{IMAGE_PATH}', '{UNSUBSCRIBE_LINK}');\n// $arrBodyKeywordsValues = array(trim(stripslashes($argArrPost['frmName'])), trim(stripslashes($argArrPost['frmName'])), trim($argArrPost['frmPassword']), trim(stripslashes($argArrPost['frmUserEmail'])), 'Country Portal', SITE_NAME, $varActivationLink, $varPath); //,$varUnsubscribeLink\n// $varBody = str_replace($arrBodyKeywords, $arrBodyKeywordsValues, $varOutput);\n $objCore->sendMail($varToUser, $varFromUser, $varSubject, $varBody);\n $_SESSION['sessArrUsers'] = '';\n }\n //return all record\n return 1;\n }", "public function sendEmailVerificationNotification()\n {\n if (request()->is('api/*')) {\n $this->notify(new VerifyEmailNotification);\n } else {\n parent::sendEmailVerificationNotification();\n }\n }", "static function send_request_for_approval_to($email,$name,$date_from,$date_to,$reason,$approve_link,$reject_link){\n $message = \"<p> Dear supervisor, <br> Employee {$name} requested for some time off, starting on {$date_from} and ending on {$date_to}, stating the reason: {$reason}.<br> Click on one of the below links to approve or reject the application: <a href={$approve_link}> approve </a> - <a href={$reject_link}> reject </a> </p>\";\n $headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\n \t$success = mail($email, 'A request in pending you approval', $message, $headers);\n if (!$success) {\n echo $errorMessage = error_get_last()['message'];\n }\n }", "public function invite(){\n $this->validate(request(),[\n 'task_id' => 'required',\n 'user_id'=> 'required'\n ]);\n $task=Task::find(request('task_id'));\n\n $user=User::find(request('user_id'));\n if (\\Gate::denies('taskOwner', $task)) {\n return response()->json(\"Task doesn't Belong To you\");\n }\n \\Mail::to($user)->send(new TaskInvitation($user,$task));\n return response()->json(\"Invitation Mail Sent Successfully\");\n }", "function wpsp_send_tour_inquiry() {\n\t\n\tparse_str ($_POST['tours'], $inquiry_info);\n\t\n\twpsp_email_notify( $inquiry_info, true, false ); //confirm to operator\n\twpsp_email_notify( $inquiry_info, false, false ); //confirm to traveller\n\t\n\tdie();\n}", "function ajax_approve_candidate() {\n $_POST['nonce'] = empty($_POST['nonce']) ? '' : trim($_POST['nonce']);\n\n if(\n empty($_POST['link-id'])\n || empty($_POST['doer-id'])\n || empty($_POST['task-id'])\n || empty($_POST['nonce'])\n || !wp_verify_nonce($_POST['nonce'], $_POST['link-id'].'-candidate-ok-'.$_POST['doer-id'])\n ) {\n die(json_encode(array(\n 'status' => 'fail',\n 'message' => __('<strong>Error:</strong> wrong data given.', 'tst'),\n )));\n }\n\n// wp_update_post(array('ID' => $_POST['task-id'], 'post_status' => 'closed'));\n p2p_update_meta($_POST['link-id'], 'is_approved', true);\n\n // Send email to the task doer:\n $task = get_post($_POST['task-id']);\n $doer = get_user_by('id', $_POST['doer-id']);\n $task_author = get_user_by('id', $task->post_author);\n \n tst_actualize_member_role($doer); \n tst_actualize_member_role($task_author); \n\n // Notice to doer:\n global $email_templates;\n wp_mail(\n $doer->user_email,\n $email_templates['approve_candidate_doer_notice']['title'],\n nl2br(sprintf(\n $email_templates['approve_candidate_doer_notice']['text'],\n $doer->first_name,\n $task->post_title,\n $task_author->user_email,\n $task_author->user_email,\n home_url('members/'.$task_author->user_login.'/')\n ))\n );\n\n // Notice to author:\n wp_mail(\n $task_author->user_email,\n $email_templates['approve_candidate_author_notice']['title'],\n nl2br(sprintf(\n $email_templates['approve_candidate_author_notice']['text'],\n $task_author->first_name,\n $task->post_title,\n $doer->user_email,\n $doer->user_email,\n home_url('members/'.$doer->user_login.'/')\n ))\n );\n\n // Task is automatically switched \"to work\":\n wp_update_post(array('ID' => $_POST['task-id'], 'post_status' => 'in_work'));\n\n die(json_encode(array(\n 'status' => 'ok',\n )));\n}", "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}", "public function invites();", "public function sendEmailVerificationNotification()\n {\n $this->notify(new AdminEmailVerificationNotification);\n }", "function notify($asset, $asset_id , $expiry_type, $expiry_date , $mail , $sent_to , $ticket_id,$left){\n\t\t\n\t\t\t$today = date(\"Y-m-d\");\n\t\t\n\t\t\t$imgSrc = 'http://www.nhc-ksa.com/images/logo1.png'; // Change image src to your site specific settings\n\t\t\t$imgDesc = 'Logo'; // Change Alt tag/image Description to your site specific settings\n\t\t\t$imgTitle = 'Logo'; // Change Alt Title tag/image title to your site specific settings\n\t\t\n\t\t\t$subjectPara1 = '<h3>The '.$expiry_type.' expiring shortly.</h3>';\n\t\t\t$subjectPara2 = 'The '.$expiry_type.' expiry for asset : '.$asset.' (ID : '.$asset_id.' ) is on '.$expiry_date.' ('.$left.' days left).Kindly take necessary action.';\n\t\t\t$subjectPara3 = 'A ticket is opened under ID : ' . $ticket_id;\n\t\t\t$subjectPara4 = NULL;\n\t\t\t$subjectPara5 = NULL;\n\t\t\n\t\t\t$message = '<!DOCTYPE HTML>'.\n\t\t\t\t\t'<head>'.\n\t\t\t\t\t'<meta http-equiv=\"content-type\" content=\"text/html\">'.\n\t\t\t\t\t'<title>Email notification</title>'.\n\t\t\t\t\t'</head>'.\n\t\t\t\t\t'<body>'.\n\t\t\t\t\t'<div id=\"header\" style=\"width: 80%;height: 60px;margin: 0 auto;padding: 10px;color: #fff;text-align: center;font-family: Open Sans,Arial,sans-serif;\">'.\n\t\t\t\t\t'<img height=\"50\" width=\"220\" style=\"border-width:0\" src=\"'.$imgSrc.'\" alt=\"'.$imgDesc.'\" title=\"'.$imgTitle.'\">'.\n\t\t\t\t\t'</div>'.\n\t\t\n\t\t\t\t\t'<div id=\"outer\" style=\"width: 80%;margin: 0 auto;margin-top: 10px;\">'.\n\t\t\t\t\t'<div id=\"inner\" style=\"width: 78%;margin: 0 auto;background-color: #fff;font-family: Open Sans,Arial,sans-serif;font-size: 13px;font-weight: normal;line-height: 1.4em;color: #444;margin-top: 10px;\">'.\n\t\t\t\t\t'<p>'.$subjectPara1.'</p>'.\n\t\t\t\t\t'<p>'.$subjectPara2.'</p>'.\n\t\t\t\t\t'<p>'.$subjectPara3.'</p>'.\n\t\t\t\t\t'<p>'.$subjectPara4.'</p>'.\n\t\t\t\t\t'<p>'.$subjectPara5.'</p>'.\n\t\t\t\t\t'</div>'.\n\t\t\t\t\t'</div>'.\n\t\t\n\t\t\t\t\t'<div id=\"footer\" style=\"width: 80%;height: 40px;margin: 0 auto;text-align: center;padding: 10px;font-family: Verdena;\">'.\n\t\t\t\t\t'All rights reserved @ assets-newhorizons 2014'.\n\t\t\t\t\t'</div>'.\n\t\t\t\t\t'</body>';\n\t\t\n\t\t\t/*EMAIL TEMPLATE ENDS*/\n\t\t\n \t\t\t$subject = 'Notification alert ('.$asset_id.'/'.$ticket_id.'): '.$expiry_type .' expiring on '.$expiry_date.' for Asset ID : '.$asset_id.', Ticket ID: '.$ticket_id.'.'; //change subject of email\n\t\t\t//$mail->SMTPDebug = 3; // Enable verbose debug output\n \t\t\t$mail->ClearAllRecipients( );// clear all\n\t\t\t$mail->isSMTP(); // Set mailer to use SMTP\n\t\t\t$mail->Host = 'ssl://smtp.gmail.com'; // Specify main and backup SMTP servers\n\t\t\t$mail->SMTPAuth = true; // Enable SMTP authentication\n\t\t\t $mail->Username = '[email protected]'; // SMTP username\n\t\t\t $mail->Password = '123qweASD!'; // SMTP password\n\t\t\t$mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted\n\t\t\t$mail->Port = 465; // TCP port to connect to\n\t\t\n\t\t\t$mail->From = '[email protected]';\n\t\t\t$mail->FromName = 'Assets-NewHorizons';\n\t\t\t$mail->addAddress($sent_to, 'Recipient'); // Add a recipient\n\t\t\t//$mail->addAddress('[email protected]'); // Name is optional\n\t\t\t//$mail->addReplyTo('[email protected]', 'Information');\n\t\t\t//$mail->addCC('[email protected]');\n\t\t\t//$mail->addBCC('[email protected]');\n\t\t\n\t\t\t$mail->WordWrap = 500; // Set word wrap to 50 characters\n\t\t\t//$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments\n\t\t\t//$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name\n\t\t\t$mail->isHTML(true); // Set email format to HTML\n\t\t\n\t\t\t$mail->Subject = $subject;\n\t\t\t//$mail->Subject = $subject. date(\"Y-m-d h:i:s\");\n\t\t\t$mail->Body = $message;\n\t\t\t$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n\t\t\n\t\t\t$a = 1;\n\t\t\n\t\tif(!$mail->send()) {\n\t//if($a != 1) {\n\t\t\t\techo 'Message could not be sent.';\n\t\t\t\techo 'Mailer Error: ' . $mail->ErrorInfo;\n\t\t\t} else {\n\t\t\t\t\n \t\t\t\techo '<b>Send for asset id ' . $asset_id . ' to '.$sent_to . ' OPENED TICKET ID IS :'. $ticket_id.' </b><br>';\n \t\t\t\n\t\t\t\t \t\t\t}\n\t\t}", "public function accept()\n {\n\n if($this->user['menteer_type']==37 && $this->user['is_matched'] > 0 && $this->user['match_status']=='pending') {\n\n // mentor update\n $update_user = array(\n 'id' => $this->session->userdata('user_id'),\n 'data' => array('match_status' => 'active','match_status_stamp' => date('y-m-d H:i:s')),\n 'table' => 'users'\n );\n $this->Application_model->update($update_user);\n\n // mentee update\n $update_user = array(\n 'id' => $this->user['is_matched'],\n 'data' => array('match_status' => 'active','match_status_stamp' => date('y-m-d H:i:s')),\n 'table' => 'users'\n );\n $this->Application_model->update($update_user);\n\n $mentee = $this->Application_model->get(array('table'=>'users','id'=>$this->user['is_matched']));\n\n // notify mentee about the accept\n\n $data = array();\n $data['first_name'] = $this->user['first_name'];\n $data['last_name'] = $this->user['last_name'];\n\n $message = $this->load->view('/chooser/email/accept', $data, true);\n $this->email->clear();\n $this->email->from($this->config->item('admin_email', 'ion_auth'), $this->config->item('site_title', 'ion_auth'));\n $this->email->to($mentee['email']);\n $this->email->subject('Mentor has accepted');\n $this->email->message($message);\n\n $result = $this->email->send(); // @todo handle false send result\n\n $this->session->set_flashdata('message', '<div class=\"alert alert-success\">The Mentee has been notified about the acceptance.</div>');\n redirect('/dashboard');\n\n }else{\n\n redirect('/dashboard');\n\n }\n\n }", "public function mailopen() {\n $signingKey = $_GET['signingKey'];\n $request = Database::table(\"requests\")->where(\"signing_key\", $signingKey)->first();\n $actionTakenBy = escape($request->email);\n /*\n * Check, whether IP address register is allowed in .env\n * If yes, then capture the user's IP address\n */\n if (env('REGISTER_IP_ADDRESS_IN_HISTORY') == 'Enabled') {\n $actionTakenBy .= ' ['.getUserIpAddr().']';\n }\n $activity = '<span class=\"text-primary\">'.$actionTakenBy.'</span> opened signing invitation email of this document.';\n Signer::keephistory($request->document, $activity, \"default\");\n $notification = '<span class=\"text-primary\">'.escape($request->email).'</span> has opened the email signing requests sent for this <a href=\"'.url(\"Document@open\").$request->document.'\">document</a>.';\n Signer::notification($request->sender, $notification, \"accept\");\n exit();\n }", "function _wp_privacy_send_request_confirmation_notification($request_id)\n {\n }", "function approve(){\n\t\t$points= $this->ref('currently_requested_to_id')->get('points_available');\n\t\tif($points < 3000)\n\t\t\t$this->api->js()->univ()->errorMessage(\"Not suficcient points available, [ $points ]\")->execute();\n\t\t// Send point to the requester and less from your self ... \n\n\t\t$purchaser= $this->add('Model_MemberAll')->addCondition(\"id\",$this['request_from_id'])->tryLoadAny();\n\t\t$purchaser['points_available'] = $purchaser['points_available'] + 3000;\n\t\t$purchaser->save();\n\n\t\t$seller=$this->add('Model_MemberAll')->addCondition(\"id\",$this['currently_requested_to_id'])->tryLoadAny();\n\t\t$seller['points_available'] = $seller['points_available'] - 3000;\n\t\t$seller->save();\n\n\t\tif($this->api->auth->model->id == 1)\n\t\t\t$this['status']='Approved By Admin';\n\t\telse\n\t\t\t$this['status']='Approved';\n\n\t\t$this->save();\n\n\n\t}", "function attendeeRegistrationNotification($eventID, $userID, $attenID, $status, $eventName, $attenFirstName, $attenLastName) \r\r\n\t{\r\r\n\t\t$result = mysql_query(\"select emailAddress from User where userID = '\".$attenID.\"'\");\r\r\n\t\t$num_rows = mysql_num_rows($result);\r\r\n\t\t\r\r\n\t\tif (!$result) \r\r\n\t\t{\r\r\n\t\t \tthrow new Exception('Could not find email address.');\r\r\n\t\t} \r\r\n\t\telse if ($num_rows == 0) \r\r\n\t\t{\r\r\n\t\t\tthrow new Exception('Could not find the user!');\r\r\n\t\t} \r\r\n\t\telse \r\r\n\t\t{\r\r\n\t\t\t$apostrophe \t\t= array(\"\\'\"); // for fixing apostrophe issue\r\r\n\t\t\t$attenFirstName \t= str_replace($apostrophe, \"'\", $attenFirstName);\r\r\n\t\t\t$attenLastName \t\t= str_replace($apostrophe, \"'\", $attenLastName);\r\r\n\t\t\t$eventName \t\t\t= str_replace($apostrophe, \"'\", $eventName);\r\r\n\t\t\t\r\r\n\t\t \t$row = mysql_fetch_object($result);\r\r\n\t\t\t$email = $row -> emailAddress;\r\r\n\r\r\n\t\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'From: uGather <[email protected]>' . \"\\r\\n\";\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t$sub = \"uGather: \".$attenID.\": Event Registration for \".$eventName.\"\";\r\r\n\t\t\t$mesg = \"<html>\r\r\n\t\t\t\t\t\t<head>\r\r\n\t\t\t\t\t\t\t<title>You have registered for an event!</title>\r\r\n\t\t\t\t\t\t</head>\r\r\n\t\t\t\t\t\t<body>\r\r\n\t\t\t\t\t\t<h2 style=\\\"font-family: 'Trebuchet MS', 'Helvetica Neue', Arial, Sans-serif; font-weight: bold; padding: 10px 0 5px 5px; color: #444; font-size: 2.5em; color: #88AC0B; border-bottom: 1px solid #E4F2C8; letter-spacing: -2px; margin-left: 5px; \\\">\r\r\nuGather Event Registration</h2>\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">Hello, \".$attenFirstName.\" \".$attenLastName.\"! </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">You have changed your registration status for the event <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">\".$eventName.\"</a> at <a href=\\\"http://www.ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. <br />\r\r\n\t\t\t\t\t\tYour registration status for \".$eventName.\" is: \".$status.\". </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">You can find the event page for \".$eventName.\" here: <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view event \".$eventName.\"</a>. You can view all of the attendees to that event here: <a href=\\\"http://www.ugather.info/viewAttendees.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view attendees to \".$eventName.\"</a>. </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">This is an automatically generated email from <a href=\\\"http://ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. Please do not respond. Thank you.</p> \r\r\n\t\t\t\t\t\t</body>\r\r\n\t\t\t\t\t\t</html>\";\r\r\n\t\r\r\n\t\t\tif (mail($email, $sub, $mesg, $headers)) \r\r\n\t\t\t{\r\r\n\t\t\t\treturn true;\r\r\n\t\t\t} \r\r\n\t\t\telse \r\r\n\t\t\t{\r\r\n\t\t\t\tthrow new Exception('Could not send email.');\r\r\n\t\t\t}\r\r\n \t}\r\r\n\t}", "public function notifyRSVPRegistered( $data )\n {\n $subject = \"Event Manager - RSVP Registered\";\n\n $msg = '\n <img src=\"http://' . $_SERVER['HTTP_HOST'] . '/images/event.png\" width=\"200\" height=\"200\" alt=\"Event Manager Banner\"/>\n\n <br><br>\n Hello ' . $data['Eid'] . ',\n\n <br><br>\n We have received your RSVP on ' . date(\"m/d/Y\") . ' through the event management platform.\n\n <br><br>\n\n <hr>\n\n <br>\n\n <table>\n <tr>\n <td colspan=\"2\">\n Reservation Information\n </td>\n </tr>\n <tr>\n <td colspan=\"2\">\n ---------------------------------------------------------\n </td>\n </tr>\n <tr>\n <td width=\"50%\">\n Your EID:\n </td>\n <td width=\"50%\">' .\n $data['Eid'] . '\n </td>\n </tr>\n <tr>\n <td>\n Event Name:\n </td>\n <td>' .\n $data['Name'] . '\n </td>\n </tr>\n <tr>\n <td>\n Event Date:\n </td>\n <td>' .\n $data['Date'] . '\n </td>\n </tr>\n <tr>\n <td>\n Event Location:\n </td>\n <td>' .\n $data['Location'] . '\n </td>\n </tr>\n </table>\n\n <br><br>\n\n An iCal has been attached for your convenience, please use it to add a reminder to your calendar.\n\n <br><br>\n\n Thank you,\n <br>\n Event Manager<br><br>';\n\n return $this->sendEmail( array( \"subject\"=>$subject, \"msg\"=>$msg, \"email\"=>$data['Email'], \"name\"=>$data['Eid'], \"iCal\"=>$data['iCal'] ) );\n }", "function ProcessRiskInformationNotification($dom_response_obj) {\n /*\n * +++ CHANGE ME +++\n * Risk information notifications provide financial information about\n * a transaction to help you ensure that an order is not fraudulent.\n * A <risk-information-notification> includes the customer's billing\n * address, a partial credit card number and other values to help you\n * verify that an order is not fraudulent. Google Checkout will send you a\n * <risk-information-notification> message after completing its\n * risk analysis on a new order.\n *\n * If you are implementing the Notification API, you need to\n * modify this function to relay the information in the\n * <risk-information-notification> to your internal systems that\n * process this order data.\n */\n /*\n Google AVS constants\n Y - Full AVS match (address and postal code)\n P - Partial AVS match (postal code only)\n A - Partial AVS match (address only)\n N - No AVS match\n U - AVS not supported by issuer\n Google CVN constants\n M - CVN match\n N - No CVN match\n U - CVN not available\n E - CVN error\n */\n $dom_data_root = $dom_response_obj->document_element();\n $google_order_number = $dom_data_root->get_elements_by_tagname(\"google-order-number\");\n $number = $google_order_number[0]->get_content();\n $avs_data = $dom_data_root->get_elements_by_tagname(\"avs-response\");\n $avs = $avs_data[0]->get_content();\n $cvn_data = $dom_data_root->get_elements_by_tagname(\"cvn-response\");\n $cvn = $cvn_data[0]->get_content();\n // decode risk information\n $avs_string = '';\n switch($avs)\n {\n case 'Y': $avs_string = 'Full AVS match (address and postal code)'; break;\n case 'P': $avs_string = 'Partial AVS match (postal code only)'; break;\n case 'A': $avs_string = 'Partial AVS match (address only)'; break;\n case 'N': $avs_string = 'No AVS match'; break;\n case 'U': $avs_string = 'AVS not supported by issuer'; break;\n }\n $cvn_string = '';\n switch($cvn)\n {\n case 'M': $cvn_string = 'CVN match'; break;\n case 'N': $cvn_string = 'No CVN match'; break;\n case 'U': $cvn_string = 'CVN not available'; break;\n case 'E': $cvn_string = 'CVN error'; break;\n }\n $message = \"Risk Information:\\n\" . $avs_string . \"\\n\" . $cvn_string;\n // put results to the order status history\n $order = tep_db_fetch_array(tep_db_query(\"select orders_id, orders_status from \" . TABLE_ORDERS . \" where google_orders_id='\" . $number . \"'\"));\n tep_db_query(\"insert into \" . TABLE_ORDERS_STATUS_HISTORY . \" (orders_id, orders_status_id, date_added, comments) values('\" . $order['orders_id'] . \"', '\" . $order['orders_status'] . \"', now(), '\" . $message . \"')\");\n SendNotificationAcknowledgment();\n}", "private function sendSubmissionConfirmationEmail() {\r\n require_once('classes/tracking/notifications/Notifications.php');\r\n require_once('classes/tracking/notifications/ResearcherNotification.php');\r\n\r\n $subject = sprintf('[TID-%s] Tracking form submitted successfully', $this->trackingFormId);\r\n $emailBody = sprintf('Your tracking form was submitted successfully. It has been assigned a Tracking ID of %s.\r\n\r\nApprovals may still be required from your Dean, Ethics, and the Office of Research Services depending on the details provided. To see details of these approvals, you can login to the MRU research website and go to My Tracking Forms.\r\n\r\nIf you have any question, then please contact MRU\\'s Grants Facilitator, Jerri-Lynne Cameron at 403-440-5081 or [email protected].\r\n\r\nRegards,\r\nOffice of Research Services\r\n\r\n', $this->trackingFormId);\r\n\r\n $confirmationEmail = new ResearcherNotification($subject, $emailBody, $this->submitter);\r\n try {\r\n $confirmationEmail->send();\r\n } catch(Exception $e) {\r\n printf('Error: Unable to send confirmation notification to researcher : '. $e);\r\n }\r\n }", "function eventPlannerRegistrationNotification($eventID, $userID, $status, $eventName, $userFirstName, $userLastName, $plannerFirstName, $plannerLastName) \r\r\n\t{\r\r\n\t\t$result = mysql_query(\"select emailAddress from User where userID in (select userID from Event where eventID = '\".$eventID.\"')\");\r\r\n\t\t$num_rows = mysql_num_rows($result);\r\r\n\t\tif (!$result) \r\r\n\t\t{\r\r\n\t\t \tthrow new Exception('Could not find email address for that event.');\r\r\n\t\t} \r\r\n\t\telse if ($num_rows == 0) \r\r\n\t\t{\r\r\n\t\t\tthrow new Exception('Could not find event planner for event.');\r\r\n\t\t} \r\r\n\t\telse \r\r\n\t\t{\r\r\n\t\t\t$apostrophe \t\t= array(\"\\'\"); // for fixing apostrophe issue\r\r\n\t\t\t$userFirstName \t\t= str_replace($apostrophe, \"'\", $userFirstName);\r\r\n\t\t\t$userLastName \t\t= str_replace($apostrophe, \"'\", $userLastName);\r\r\n\t\t\t$plannerFirstName \t\t= str_replace($apostrophe, \"'\", $plannerFirstName);\r\r\n\t\t\t$plannerLastName \t\t= str_replace($apostrophe, \"'\", $plannerLastName);\r\r\n\t\t\t$eventName \t\t\t= str_replace($apostrophe, \"'\", $eventName);\r\r\n\t\t\t\r\r\n\t\t \t$row = mysql_fetch_object($result);\r\r\n\t\r\r\n\t\t\t$email = $row -> emailAddress;\r\r\n\t\t\t\r\r\n\t\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'From: uGather <[email protected]>' . \"\\r\\n\";\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t$sub = \"uGather: \".$userID.\": Event Registration for \".$eventName.\"\";\r\r\n\t\t\t$mesg = \"<html>\r\r\n\t\t\t\t\t\t<head>\r\r\n\t\t\t\t\t\t\t<title>Someone has registered for your event!</title>\r\r\n\t\t\t\t\t\t</head>\r\r\n\t\t\t\t\t\t<body>\r\r\n\t\t\t\t\t\t<h2 style=\\\"font-family: 'Trebuchet MS', 'Helvetica Neue', Arial, Sans-serif; font-weight: bold; padding: 10px 0 5px 5px; color: #444; font-size: 2.5em; color: #88AC0B; border-bottom: 1px solid #E4F2C8; letter-spacing: -2px; margin-left: 5px; \\\">uGather Event Registration</h2>\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">Hello, \".$plannerFirstName.\" \".$plannerLastName.\"! </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">The user \".$userID.\" (\".$userFirstName.\" \".$userLastName.\") has registered for your event, <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">\".$eventName.\"</a>, at <a href=\\\"http://www.ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. <br />\r\r\n\t\t\t\t\t\t\".$userID.\"'s registration status for \".$eventName.\" is: \".$status.\". </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">You can find the event page for \".$eventName.\" here: <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view event \".$eventName.\"</a>. You can view all of the attendees to your event here: <a href=\\\"http://www.ugather.info/viewAttendees.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view attendees to \".$eventName.\"</a>. </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">This is an automatically generated email from <a href=\\\"http://ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. Please do not respond. Thank you.</p> \r\r\n\t\t\t\t\t\t</body>\r\r\n\t\t\t\t\t\t</html>\";\r\r\n\t\r\r\n\t\t\tif (mail($email, $sub, $mesg, $headers)) \r\r\n\t\t\t{\r\r\n\t\t\t\treturn true;\r\r\n\t\t\t} \r\r\n\t\t\telse \r\r\n\t\t\t{\r\r\n\t\t\t\tthrow new Exception('Could not send email.');\r\r\n\t\t\t}\r\r\n \t}\r\r\n\t}", "function new_user_email_admin_notice()\n {\n }", "public static function send_admin_expiring_notice() {\n\t\tself::maybe_init();\n\n\t\t$email_key = WP_Job_Manager_Email_Admin_Expiring_Job::get_key();\n\t\tif ( ! self::is_email_notification_enabled( $email_key ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$settings = self::get_email_settings( $email_key );\n\t\t$days_notice = WP_Job_Manager_Email_Admin_Expiring_Job::get_notice_period( $settings );\n\t\tself::send_expiring_notice( $email_key, $days_notice );\n\t}", "public static function stripe_notify()\n\t\t{\n\t\t\tglobal $current_site, $current_blog;\n\n\t\t\tif(!empty($_GET['s2member_pro_stripe_notify']) && $GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_stripe_api_secret_key'])\n\t\t\t{\n\t\t\t\t$stripe = array(); // Initialize array of Webhook/IPN event data and s2Member log details.\n\t\t\t\t@ignore_user_abort(TRUE); // Continue processing even if/when connection is broken.\n\n\t\t\t\tif(!class_exists('Stripe'))\n\t\t\t\t\trequire_once dirname(__FILE__).'/stripe-sdk/lib/Stripe.php';\n\t\t\t\tStripe::setApiKey($GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_stripe_api_secret_key']);\n\n\t\t\t\tif(is_object($event = c_ws_plugin__s2member_pro_stripe_utilities::get_event()) && ($stripe['event'] = $event))\n\t\t\t\t{\n\t\t\t\t\tswitch($event->type)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'invoice.payment_succeeded': // Subscription payments.\n\n\t\t\t\t\t\t\tif(!empty($event->data->object)\n\t\t\t\t\t\t\t && ($stripe_invoice = $event->data->object) instanceof Stripe_Invoice\n\t\t\t\t\t\t\t && !empty($stripe_invoice->customer) && !empty($stripe_invoice->subscription)\n\t\t\t\t\t\t\t && ($stripe_invoice_total = number_format(c_ws_plugin__s2member_pro_stripe_utilities::cents_to_dollar_amount($stripe_invoice->total, $stripe_invoice->currency), 2, '.', '')) > 0\n\t\t\t\t\t\t\t && is_object($stripe_subscription = c_ws_plugin__s2member_pro_stripe_utilities::get_customer_subscription($stripe_invoice->customer, $stripe_invoice->subscription))\n\t\t\t\t\t\t\t && ($ipn_signup_vars = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_vars(0, $stripe_subscription->id))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$processing = TRUE;\n\n\t\t\t\t\t\t\t\t$ipn['txn_type'] = 'subscr_payment';\n\t\t\t\t\t\t\t\t$ipn['txn_id'] = $stripe_invoice->id;\n\t\t\t\t\t\t\t\t$ipn['txn_cid'] = $ipn_signup_vars['subscr_cid'];\n\t\t\t\t\t\t\t\t$ipn['subscr_cid'] = $ipn_signup_vars['subscr_cid'];\n\t\t\t\t\t\t\t\t$ipn['subscr_id'] = $ipn_signup_vars['subscr_id'];\n\t\t\t\t\t\t\t\t$ipn['custom'] = $ipn_signup_vars['custom'];\n\n\t\t\t\t\t\t\t\t$ipn['mc_gross'] = $stripe_invoice_total;\n\t\t\t\t\t\t\t\t$ipn['mc_currency'] = strtoupper($stripe_invoice->currency);\n\t\t\t\t\t\t\t\t$ipn['tax'] = number_format(0, 2, '.', '');\n\n\t\t\t\t\t\t\t\t$ipn['period1'] = $ipn_signup_vars['period1'];\n\t\t\t\t\t\t\t\t$ipn['period3'] = $ipn_signup_vars['period3'];\n\n\t\t\t\t\t\t\t\t$ipn['payer_email'] = $ipn_signup_vars['payer_email'];\n\t\t\t\t\t\t\t\t$ipn['first_name'] = $ipn_signup_vars['first_name'];\n\t\t\t\t\t\t\t\t$ipn['last_name'] = $ipn_signup_vars['last_name'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name1'] = $ipn_signup_vars['option_name1'];\n\t\t\t\t\t\t\t\t$ipn['option_selection1'] = $ipn_signup_vars['option_selection1'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name2'] = $ipn_signup_vars['option_name2'];\n\t\t\t\t\t\t\t\t$ipn['option_selection2'] = $ipn_signup_vars['option_selection2'];\n\n\t\t\t\t\t\t\t\t$ipn['item_name'] = $ipn_signup_vars['item_name'];\n\t\t\t\t\t\t\t\t$ipn['item_number'] = $ipn_signup_vars['item_number'];\n\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy'] = 'stripe';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_use'] = 'pro-emails';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_verification'] = c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen();\n\n\t\t\t\t\t\t\t\tc_ws_plugin__s2member_utils_urls::remote(home_url('/?s2member_paypal_notify=1'), $ipn, array('timeout' => 20));\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Stripe Webhook/IPN event type identified as: `'.$event->type.'` on: '.date('D M j, Y g:i:s a T');\n\n\t\t\t\t\t\t\t\tif(($maybe_end_subscription = self::_maybe_end_subscription_after_payment($stripe_invoice->customer, $stripe_subscription)))\n\t\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = $maybe_end_subscription;\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Webhook/IPN event `'.$event->type.'` reformulated. Piping through s2Member\\'s core gateway processor as `txn_type` (`'.$ipn['txn_type'].'`).';\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Please check core IPN logs for further processing details.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak; // Break switch handler.\n\n\t\t\t\t\t\tcase 'invoice.payment_failed': // Subscription payment failures.\n\n\t\t\t\t\t\t\tif(!empty($event->data->object)\n\t\t\t\t\t\t\t && ($stripe_invoice = $event->data->object) instanceof Stripe_Invoice\n\t\t\t\t\t\t\t && !empty($stripe_invoice->customer) && !empty($stripe_invoice->subscription)\n\t\t\t\t\t\t\t && ($stripe_invoice_total = number_format(c_ws_plugin__s2member_pro_stripe_utilities::cents_to_dollar_amount($stripe_invoice->total, $stripe_invoice->currency), 2, '.', '')) > 0\n\t\t\t\t\t\t\t && is_object($stripe_subscription = c_ws_plugin__s2member_pro_stripe_utilities::get_customer_subscription($stripe_invoice->customer, $stripe_invoice->subscription))\n\t\t\t\t\t\t\t && ($ipn_signup_vars = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_vars(0, $stripe_subscription->id))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$processing = TRUE;\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Stripe Webhook/IPN event type identified as: `'.$event->type.'` on: '.date('D M j, Y g:i:s a T');\n\n\t\t\t\t\t\t\t\tif(($maybe_end_subscription = self::_maybe_end_subscription_after_payment($stripe_invoice->customer, $stripe_subscription)))\n\t\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = $maybe_end_subscription;\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Ignoring `'.$event->type.'`. s2Member does NOT respond to individual payment failures; only to subscription cancellations.';\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'You may control the behavior(s) associated w/ subscription payment failures from your Stripe Dashboard please.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak; // Break switch handler.\n\n\t\t\t\t\t\tcase 'customer.deleted': // Customer deletions.\n\n\t\t\t\t\t\t\tif(!empty($event->data->object)\n\t\t\t\t\t\t\t && ($stripe_customer = $event->data->object) instanceof Stripe_Customer\n\t\t\t\t\t\t\t && ($ipn_signup_vars = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_vars(0, $stripe_customer->id))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$processing = TRUE;\n\n\t\t\t\t\t\t\t\t$ipn['txn_type'] = 'subscr_eot';\n\t\t\t\t\t\t\t\t$ipn['subscr_cid'] = $ipn_signup_vars['subscr_cid'];\n\t\t\t\t\t\t\t\t$ipn['subscr_id'] = $ipn_signup_vars['subscr_id'];\n\t\t\t\t\t\t\t\t$ipn['custom'] = $ipn_signup_vars['custom'];\n\n\t\t\t\t\t\t\t\t$ipn['period1'] = $ipn_signup_vars['period1'];\n\t\t\t\t\t\t\t\t$ipn['period3'] = $ipn_signup_vars['period3'];\n\n\t\t\t\t\t\t\t\t$ipn['payer_email'] = $ipn_signup_vars['payer_email'];\n\t\t\t\t\t\t\t\t$ipn['first_name'] = $ipn_signup_vars['first_name'];\n\t\t\t\t\t\t\t\t$ipn['last_name'] = $ipn_signup_vars['last_name'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name1'] = $ipn_signup_vars['option_name1'];\n\t\t\t\t\t\t\t\t$ipn['option_selection1'] = $ipn_signup_vars['option_selection1'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name2'] = $ipn_signup_vars['option_name2'];\n\t\t\t\t\t\t\t\t$ipn['option_selection2'] = $ipn_signup_vars['option_selection2'];\n\n\t\t\t\t\t\t\t\t$ipn['item_name'] = $ipn_signup_vars['item_name'];\n\t\t\t\t\t\t\t\t$ipn['item_number'] = $ipn_signup_vars['item_number'];\n\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy'] = 'stripe';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_use'] = 'pro-emails';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_verification'] = c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen();\n\n\t\t\t\t\t\t\t\tc_ws_plugin__s2member_utils_urls::remote(home_url('/?s2member_paypal_notify=1'), $ipn, array('timeout' => 20));\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Stripe Webhook/IPN event type identified as: `'.$event->type.'` on: '.date('D M j, Y g:i:s a T');\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Webhook/IPN event `'.$event->type.'` reformulated. Piping through s2Member\\'s core gateway processor as `txn_type` (`'.$ipn['txn_type'].'`).';\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Please check core IPN logs for further processing details.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak; // Break switch handler.\n\n\t\t\t\t\t\tcase 'customer.subscription.deleted': // Customer subscription deletion.\n\n\t\t\t\t\t\t\tif(!empty($event->data->object)\n\t\t\t\t\t\t\t && ($stripe_subscription = $event->data->object) instanceof Stripe_Subscription\n\t\t\t\t\t\t\t && ($ipn_signup_vars = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_vars(0, $stripe_subscription->id))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$processing = TRUE;\n\n\t\t\t\t\t\t\t\t$ipn['txn_type'] = 'subscr_eot';\n\t\t\t\t\t\t\t\t$ipn['subscr_cid'] = $ipn_signup_vars['subscr_cid'];\n\t\t\t\t\t\t\t\t$ipn['subscr_id'] = $ipn_signup_vars['subscr_id'];\n\t\t\t\t\t\t\t\t$ipn['custom'] = $ipn_signup_vars['custom'];\n\n\t\t\t\t\t\t\t\t$ipn['period1'] = $ipn_signup_vars['period1'];\n\t\t\t\t\t\t\t\t$ipn['period3'] = $ipn_signup_vars['period3'];\n\n\t\t\t\t\t\t\t\t$ipn['payer_email'] = $ipn_signup_vars['payer_email'];\n\t\t\t\t\t\t\t\t$ipn['first_name'] = $ipn_signup_vars['first_name'];\n\t\t\t\t\t\t\t\t$ipn['last_name'] = $ipn_signup_vars['last_name'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name1'] = $ipn_signup_vars['option_name1'];\n\t\t\t\t\t\t\t\t$ipn['option_selection1'] = $ipn_signup_vars['option_selection1'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name2'] = $ipn_signup_vars['option_name2'];\n\t\t\t\t\t\t\t\t$ipn['option_selection2'] = $ipn_signup_vars['option_selection2'];\n\n\t\t\t\t\t\t\t\t$ipn['item_name'] = $ipn_signup_vars['item_name'];\n\t\t\t\t\t\t\t\t$ipn['item_number'] = $ipn_signup_vars['item_number'];\n\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy'] = 'stripe';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_use'] = 'pro-emails';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_verification'] = c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen();\n\n\t\t\t\t\t\t\t\tc_ws_plugin__s2member_utils_urls::remote(home_url('/?s2member_paypal_notify=1'), $ipn, array('timeout' => 20));\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Stripe Webhook/IPN event type identified as: `'.$event->type.'` on: '.date('D M j, Y g:i:s a T');\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Webhook/IPN event `'.$event->type.'` reformulated. Piping through s2Member\\'s core gateway processor as `txn_type` (`'.$ipn['txn_type'].'`).';\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Please check core IPN logs for further processing details.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak; // Break switch handler.\n\n\t\t\t\t\t\tcase 'charge.refunded': // Customer refund (partial or full).\n\n\t\t\t\t\t\t\tif(!empty($event->data->object)\n\t\t\t\t\t\t\t && ($stripe_charge = $event->data->object) instanceof Stripe_Charge\n\t\t\t\t\t\t\t && !empty($stripe_charge->amount_refunded) && !empty($stripe_charge->customer)\n\t\t\t\t\t\t\t && ($ipn_signup_vars = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_vars(0, $stripe_charge->customer))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$processing = TRUE;\n\n\t\t\t\t\t\t\t\t$ipn['payment_status'] = 'refunded';\n\t\t\t\t\t\t\t\t$ipn['subscr_cid'] = $ipn_signup_vars['subscr_cid'];\n\t\t\t\t\t\t\t\t$ipn['subscr_id'] = $ipn_signup_vars['subscr_id'];\n\t\t\t\t\t\t\t\t$ipn['parent_txn_id'] = $ipn_signup_vars['subscr_id'];\n\n\t\t\t\t\t\t\t\t$ipn['custom'] = $ipn_signup_vars['custom'];\n\n\t\t\t\t\t\t\t\t$ipn['mc_fee'] = '-'.number_format('0.00', 2, '.', '');\n\t\t\t\t\t\t\t\t$ipn['mc_gross'] = '-'.number_format(c_ws_plugin__s2member_pro_stripe_utilities::cents_to_dollar_amount(abs($stripe_charge->amount_refunded), $stripe_charge->currency), 2, '.', '');\n\t\t\t\t\t\t\t\t$ipn['mc_currency'] = strtoupper($stripe_charge->currency);\n\t\t\t\t\t\t\t\t$ipn['tax'] = '-'.number_format('0.00', 2, '.', '');\n\n\t\t\t\t\t\t\t\t$ipn['period1'] = $ipn_signup_vars['period1'];\n\t\t\t\t\t\t\t\t$ipn['period3'] = $ipn_signup_vars['period3'];\n\n\t\t\t\t\t\t\t\t$ipn['payer_email'] = $ipn_signup_vars['payer_email'];\n\t\t\t\t\t\t\t\t$ipn['first_name'] = $ipn_signup_vars['first_name'];\n\t\t\t\t\t\t\t\t$ipn['last_name'] = $ipn_signup_vars['last_name'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name1'] = $ipn_signup_vars['option_name1'];\n\t\t\t\t\t\t\t\t$ipn['option_selection1'] = $ipn_signup_vars['option_selection1'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name2'] = $ipn_signup_vars['option_name2'];\n\t\t\t\t\t\t\t\t$ipn['option_selection2'] = $ipn_signup_vars['option_selection2'];\n\n\t\t\t\t\t\t\t\t$ipn['item_name'] = $ipn_signup_vars['item_name'];\n\t\t\t\t\t\t\t\t$ipn['item_number'] = $ipn_signup_vars['item_number'];\n\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy'] = 'stripe';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_use'] = 'pro-emails';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_verification'] = c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen();\n\n\t\t\t\t\t\t\t\tc_ws_plugin__s2member_utils_urls::remote(home_url('/?s2member_paypal_notify=1'), $ipn, array('timeout' => 20));\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Stripe Webhook/IPN event type identified as: `'.$event->type.'` on: '.date('D M j, Y g:i:s a T');\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Webhook/IPN event `'.$event->type.'` reformulated. Piping through s2Member\\'s core gateway processor.';\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Please check core IPN logs for further processing details.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak; // Break switch handler.\n\n\t\t\t\t\t\tcase 'charge.dispute.created': // Customer dispute (chargeback).\n\n\t\t\t\t\t\t\tif(!empty($event->data->object->charge)\n\t\t\t\t\t\t\t && ($stripe_charge = c_ws_plugin__s2member_pro_stripe_utilities::get_charge($event->data->object->charge)) instanceof Stripe_Charge\n\t\t\t\t\t\t\t && !empty($stripe_charge->customer) // The charge that is being disputed must be associated with a customer that we know of.\n\t\t\t\t\t\t\t && ($ipn_signup_vars = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_vars(0, $stripe_charge->customer))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$processing = TRUE;\n\n\t\t\t\t\t\t\t\t$ipn['payment_status'] = 'reversed';\n\t\t\t\t\t\t\t\t$ipn['subscr_cid'] = $ipn_signup_vars['subscr_cid'];\n\t\t\t\t\t\t\t\t$ipn['subscr_id'] = $ipn_signup_vars['subscr_id'];\n\t\t\t\t\t\t\t\t$ipn['parent_txn_id'] = $ipn_signup_vars['subscr_id'];\n\n\t\t\t\t\t\t\t\t$ipn['custom'] = $ipn_signup_vars['custom'];\n\n\t\t\t\t\t\t\t\t$ipn['mc_fee'] = '-'.number_format('0.00', 2, '.', '');\n\t\t\t\t\t\t\t\t$ipn['mc_gross'] = '-'.number_format(c_ws_plugin__s2member_pro_stripe_utilities::cents_to_dollar_amount(abs($stripe_charge->amount), $stripe_charge->currency), 2, '.', '');\n\t\t\t\t\t\t\t\t$ipn['mc_currency'] = strtoupper($stripe_charge->currency);\n\t\t\t\t\t\t\t\t$ipn['tax'] = '-'.number_format('0.00', 2, '.', '');\n\n\t\t\t\t\t\t\t\t$ipn['period1'] = $ipn_signup_vars['period1'];\n\t\t\t\t\t\t\t\t$ipn['period3'] = $ipn_signup_vars['period3'];\n\n\t\t\t\t\t\t\t\t$ipn['payer_email'] = $ipn_signup_vars['payer_email'];\n\t\t\t\t\t\t\t\t$ipn['first_name'] = $ipn_signup_vars['first_name'];\n\t\t\t\t\t\t\t\t$ipn['last_name'] = $ipn_signup_vars['last_name'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name1'] = $ipn_signup_vars['option_name1'];\n\t\t\t\t\t\t\t\t$ipn['option_selection1'] = $ipn_signup_vars['option_selection1'];\n\n\t\t\t\t\t\t\t\t$ipn['option_name2'] = $ipn_signup_vars['option_name2'];\n\t\t\t\t\t\t\t\t$ipn['option_selection2'] = $ipn_signup_vars['option_selection2'];\n\n\t\t\t\t\t\t\t\t$ipn['item_name'] = $ipn_signup_vars['item_name'];\n\t\t\t\t\t\t\t\t$ipn['item_number'] = $ipn_signup_vars['item_number'];\n\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy'] = 'stripe';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_use'] = 'pro-emails';\n\t\t\t\t\t\t\t\t$ipn['s2member_paypal_proxy_verification'] = c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen();\n\n\t\t\t\t\t\t\t\tc_ws_plugin__s2member_utils_urls::remote(home_url('/?s2member_paypal_notify=1'), $ipn, array('timeout' => 20));\n\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Stripe Webhook/IPN event type identified as: `'.$event->type.'` on: '.date('D M j, Y g:i:s a T');\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Webhook/IPN event `'.$event->type.'` reformulated. Piping through s2Member\\'s core gateway processor.';\n\t\t\t\t\t\t\t\t$stripe['s2member_log'][] = 'Please check core IPN logs for further processing details.';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak; // Break switch handler.\n\t\t\t\t\t}\n\t\t\t\t\tif(empty($processing)) $stripe['s2member_log'][] = 'Ignoring this Webhook/IPN. The event does NOT require any action on the part of s2Member.';\n\t\t\t\t}\n\t\t\t\telse // Extensive log reporting here. This is an area where many site owners find trouble. Depending on server configuration; remote HTTPS connections may fail.\n\t\t\t\t{\n\t\t\t\t\t$stripe['s2member_log'][] = 'Unable to verify Webhook/IPN event ID. This is most likely related to an invalid Stripe configuration. Please check: s2Member → Stripe Options.';\n\t\t\t\t\t$stripe['s2member_log'][] = 'If you\\'re absolutely SURE that your Stripe configuration is valid, you may want to run some tests on your server, just to be sure \\$_POST variables (and php://input) are populated; and that your server is able to connect to Stripe over an HTTPS connection.';\n\t\t\t\t\t$stripe['s2member_log'][] = 's2Member uses the Stripe SDK for remote connections; which relies upon the cURL extension for PHP. Please make sure that your installation of PHP has the cURL extension; and that it\\'s configured together with OpenSSL for HTTPS communication.';\n\t\t\t\t\t$stripe['s2member_log'][] = var_export($_REQUEST, TRUE).\"\\n\".var_export(json_decode(@file_get_contents('php://input')), TRUE);\n\t\t\t\t}\n\t\t\t\tc_ws_plugin__s2member_utils_logs::log_entry('stripe-ipn', $stripe);\n\n\t\t\t\tstatus_header(200);\n\t\t\t\theader('Content-Type: text/plain; charset=UTF-8');\n\t\t\t\twhile(@ob_end_clean()); exit();\n\t\t\t}\n\t\t}", "function invite()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tlogout_invalid_user($this);\n\t\t\n\t\t# user has submitted the invitation\n\t\tif(!empty($_POST)){\n\t\t\t$response = $this->_tender->invite($_POST);\n\t\t\t$msg = (!empty($response) && $response['boolean'])? 'The Invitation for Bids/Quotations has been sent.' :'ERROR: The Invitation for Bids/Quotations could not be sent.';\n\t\t\t\n\t\t\t$this->native_session->set('__msg',$msg);\n\t\t}\n\t\telse if(!empty($data['a'])){\n\t\t\t$data['msg'] = $this->native_session->get('__msg');\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t\t$this->load->view('addons/basic_addons', $data);\n\t\t}\n\t\telse {\n\t\t\t$data['tender'] = $this->_tender->details($data['d']);\n\t\t\t$data['invited'] = $this->_tender->invitations($data['d']);\n\t\t\t$this->load->view('tenders/invite', $data);\n\t\t}\n\t}", "function add_actualisation()\n\t{\n\t\t$name=post_param('name');\n\t\t$subject=post_param('subject');\n\t\t$text=post_param('text');\n\t\t$send_time=post_param_integer('send_time');\n\t\tif (get_value('welcome_nw_choice')==='1')\n\t\t{\n\t\t\t$newsletter=post_param_integer('newsletter',NULL);\n\t\t} else\n\t\t{\n\t\t\t$newsletter=post_param_integer('newsletter',0);\n\t\t}\n\t\t$id=ocf_make_welcome_email($name,$subject,$text,$send_time,$newsletter);\n\t\treturn strval($id);\n\t}", "function _sf_send_user_publish_note($new_status, $old_status, $post) {\n\t\tif($post->post_type == 'spot') {\n\t\t\t\n\t\t\t$user = get_user_by('id', $post->post_author);\n\t\t\t\n\t\t\t//// IF THIS POST IS BEING PUBLISHED AND THE AUTHOR IS A SUBMITTER\n\t\t\tif($old_status != 'publish' && $new_status == 'publish' && isset($user->caps['submitter'])) {\n\t\t\t\t\n\t\t\t\t//// SENDS AN EMAIL SAYING HIS POST HAS BEEN SUBMITTED\n\t\t\t\t$message = sprintf2(__(\"Dear %user,\n\t\t\t\t\nThis is to inform you that your submission %title at %site_name has been approved and it is now published.\n\nYou can view it here at %link\n\nKind regards,\nthe %site_name team.\", 'btoa'), array(\n\t\t\t\n\t\t\t\t\t'user' => $user->display_name,\n\t\t\t\t\t'title' => $post->post_title,\n\t\t\t\t\t'site_name' => get_bloginfo('name'),\n\t\t\t\t\t'link' => get_permalink($post->ID),\n\t\t\t\t\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$subject = sprintf2(__('Submission approved at %site_name', 'btoa'), array('site_name' => get_bloginfo('name')));\n\t\t\t\t\n\t\t\t\t$headers = \"From: \".get_bloginfo('name').\" <\".get_option('admin_email').\">\";\n\t\t\t\t\n\t\t\t\twp_mail($user->user_email, $subject, $message, $headers);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t///// IF ITS A SPOT\n\t\t\tif($post->post_type == 'spot') {\n\t\t\t\t\n\t\t\t\tif(ddp('future_notification') == 'on' && $old_status != 'publish' && $new_status == 'publish') {\n\t\t\t\t\t\n\t\t\t\t\t//// ALSO CHECKS FOR USER NOTIFICATIONS FOR MATCHING CRITERIA\n\t\t\t\t\tif(function_exists('_sf_check_for_user_notifications_matching_spot')) { _sf_check_for_user_notifications_matching_spot($post->ID); }\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//// IF ITS BEING PUBLISHED AND WE HAVE AN EXPIRY DATE SET\n\t\t\t\tif($old_status != 'publish' && $new_status == 'publish' && ddp('submission_days') != '' && ddp('submission_days') != '0') {\n\t\t\t\t\t\n\t\t\t\t\t//// SETS UP OUR CRON JOB TO PUT IT BACK TO PENDING IN X AMOUNT OF DAYS\n\t\t\t\t\t_sf_set_spot_expiry_date($post);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//// IF ITS BEING PUBLISHED AND WE HAVE AN EXPIRY DATE SET FOR OUR FEATURED SUBMISSION - AND ITS INDEED FEATURED\n\t\t\t\tif($old_status != 'publish' && $new_status == 'publish' && ddp('price_featured_days') != '' && ddp('price_featured_days') != '0' && get_post_meta($post->ID, 'featured', true) == 'on') {\n\t\t\t\t\t\n\t\t\t\t\t//// SETS UP OUR CRON JOB TO PUT IT BACK TO NORMAL SUBMISSION AFTER X DAYS\n\t\t\t\t\t_sf_set_spot_expiry_date_featured($post);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "function invite_accept($from, $to, $togcm, $type, $message, $sender_name, $event_refrence){\n$arr = array(\"host\" => $from,\n\t \"to_id\" => $to,\n\t \"sender_name\" => $sender_name,\n\t \"event_reference\" => $event_refrence, \n\t \"payload_type\" => \"invite_accept\",\n \"payload_message\" => $message);\n$new_payload = json_encode($arr);\nsend_gcm_notify($togcm, $new_payload);\n}", "public function sendNotificationEmail(){\n $unsentNotifications = $this->unsentNotifications;\n $notificationCount = count($unsentNotifications);\n \n if($notificationCount > 0){\n //Send this employer all his \"unsent\" notifications \n if($this->employer_language_pref == \"en-US\"){\n //Set language based on preference stored in DB\n Yii::$app->view->params['isArabic'] = false;\n\n //Send English Email\n Yii::$app->mailer->compose([\n 'html' => \"employer/notification-html\",\n ], [\n 'employer' => $this,\n 'notifications' => $unsentNotifications,\n ])\n ->setFrom([\\Yii::$app->params['supportEmail'] => \\Yii::$app->name ])\n ->setTo([$this->employer_email])\n ->setSubject(\"[StudentHub] You've got $notificationCount new applicants!\")\n ->send();\n }else{\n //Set language based on preference stored in DB\n Yii::$app->view->params['isArabic'] = true;\n\n //Send Arabic Email\n Yii::$app->mailer->compose([\n 'html' => \"employer/notification-ar-html\",\n ], [\n 'employer' => $this,\n 'notifications' => $unsentNotifications,\n ])\n ->setFrom([\\Yii::$app->params['supportEmail'] => \\Yii::$app->name ])\n ->setTo([$this->employer_email])\n ->setSubject(\"[StudentHub] لقد حصلت على $notificationCount متقدمين جدد\")\n ->send();\n }\n \n \n return true;\n }\n \n return false;\n }", "function update_notif_accept ($id_notification)\n\t{\n\t\t$data_status_notif = array(\n\t\t\t\t\t\t\t\t\t'notification_status' => 1\n\t\t\t\t\t\t\t\t );\n\n\t\t//Update data status notification database\n\t\t$this->db->update('job_notification', $data_status_notif, array('id_notification'=>$id_notification));\n\n\t\t//Tampilkan halaman sukses terima respon \n\t\t$this->load->view('content_front_end/talent_respon_accept_page');\n\t}", "function sendAdminNotifications($type, $memberID, $member_name = null)\n{\n\tglobal $modSettings, $language;\n\n\t$db = database();\n\n\t// If the setting isn't enabled then just exit.\n\tif (empty($modSettings['notify_new_registration']))\n\t{\n\t\treturn;\n\t}\n\n\t// Needed to notify admins, or anyone\n\trequire_once(SUBSDIR . '/Mail.subs.php');\n\n\tif ($member_name === null)\n\t{\n\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\n\t\t// Get the new user's name....\n\t\t$member_info = getBasicMemberData($memberID);\n\t\t$member_name = $member_info['real_name'];\n\t}\n\n\t// All membergroups who can approve members.\n\t$groups = [];\n\t$db->fetchQuery('\n\t\tSELECT \n\t\t\tid_group\n\t\tFROM {db_prefix}permissions\n\t\tWHERE permission = {string:moderate_forum}\n\t\t\tAND add_deny = {int:add_deny}\n\t\t\tAND id_group != {int:id_group}',\n\t\t[\n\t\t\t'add_deny' => 1,\n\t\t\t'id_group' => 0,\n\t\t\t'moderate_forum' => 'moderate_forum',\n\t\t]\n\t)->fetch_callback(\n\t\tfunction ($row) use (&$groups) {\n\t\t\t$groups[] = $row['id_group'];\n\t\t}\n\t);\n\n\t// Add administrators too...\n\t$groups[] = 1;\n\t$groups = array_unique($groups);\n\n\t// Get a list of all members who have ability to approve accounts - these are the people who we inform.\n\t$current_language = User::$info->language;\n\t$db->query('', '\n\t\tSELECT \n\t\t\tid_member, lngfile, email_address\n\t\tFROM {db_prefix}members\n\t\tWHERE (id_group IN ({array_int:group_list}) OR FIND_IN_SET({raw:group_array_implode}, additional_groups) != 0)\n\t\t\tAND notify_types != {int:notify_types}\n\t\tORDER BY lngfile',\n\t\t[\n\t\t\t'group_list' => $groups,\n\t\t\t'notify_types' => 4,\n\t\t\t'group_array_implode' => implode(', additional_groups) != 0 OR FIND_IN_SET(', $groups),\n\t\t]\n\t)->fetch_callback(\n\t\tfunction ($row) use ($type, $member_name, $memberID, $language) {\n\t\t\tglobal $scripturl, $modSettings;\n\n\t\t\t$replacements = [\n\t\t\t\t'USERNAME' => $member_name,\n\t\t\t\t'PROFILELINK' => $scripturl . '?action=profile;u=' . $memberID\n\t\t\t];\n\t\t\t$emailtype = 'admin_notify';\n\n\t\t\t// If they need to be approved add more info...\n\t\t\tif ($type === 'approval')\n\t\t\t{\n\t\t\t\t$replacements['APPROVALLINK'] = $scripturl . '?action=admin;area=viewmembers;sa=browse;type=approve';\n\t\t\t\t$emailtype .= '_approval';\n\t\t\t}\n\n\t\t\t$emaildata = loadEmailTemplate($emailtype, $replacements, empty($row['lngfile']) || empty($modSettings['userLanguage']) ? $language : $row['lngfile']);\n\n\t\t\t// And do the actual sending...\n\t\t\tsendmail($row['email_address'], $emaildata['subject'], $emaildata['body'], null, null, false, 0);\n\t\t}\n\t);\n\n\tif (isset($current_language) && $current_language !== User::$info->language)\n\t{\n\t\t$lang_loader = new Loader(null, $txt, database());\n\t\t$lang_loader->load('Login', false);\n\t}\n}", "public function actionSuggestions(){\n return 0;\n $message = new YiiMailMessage;\n $message->view = 'system';\n $message->from = Yii::app()->params['noreplyEmail'];\n \n // send newsletter to all in waiting list\n $invites = Invite::model()->findAll(\"NOT ISNULL(`key`)\");\n foreach ($invites as $user){\n \n $create_at = strtotime($stat->time_invited);\n if ($create_at < strtotime('-8 week') || $create_at >= strtotime('-1 day')) continue; \n if (!\n (($create_at >= strtotime('-1 week')) || \n (($create_at >= strtotime('-4 week')) && ($create_at < strtotime('-3 week'))) || \n (($create_at >= strtotime('-8 week')) && ($create_at < strtotime('-7 week'))) )\n ) continue;\n \n //set mail tracking\n $mailTracking = mailTrackingCode($user->id);\n $ml = new MailLog();\n $ml->tracking_code = mailTrackingCodeDecode($mailTracking);\n $ml->type = 'suggestion-created';\n $ml->user_to_id = $user->id;\n $ml->save();\n\n $message->subject = \"We are happy to see you interested in Cofinder\"; // 11.6. title change\n \n $content = \"This is just a friendly reminder to activate your account on Cofinder.\n <br /><br />\n Cofinder is a web platform through which you can share your ideas with the like minded entrepreneurs, search for people to join your project or join an interesting project yourself.\n <br /><br />If we got your attention you can !\";\n \n $message->setBody(array(\"content\"=>$content,\"email\"=>$user->email,\"tc\"=>$mailTracking), 'text/html');\n $message->setTo($user->email);\n Yii::app()->mail->send($message);\n }\n return 0;\n\t}", "function anular($ewid = null) {\n if($this->auth_frr->es_admin()) {\n $data['ewarrants'] = $this->ewarrants_frr->get_warrants_habilitados();\n\t\t\t\t\t\t }\n else {\n \t $empresa_id = $this->auth_frr->get_empresa_id();\n $data['ewarrants'] = $this->ewarrants_frr->get_warrants_empresa_habilitados($empresa_id);\n }\n\n\t\t\t\t\t\t //Controlamos si el usuario tiene eWarrants para ser anular\n if($data['ewarrants'] != null) {\n \t if ($message = $this->session->flashdata('message')) {\n $data['message'] = $message;\n }\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t //Si entramos aca es porque se esta tratando de firmar un ewarrant\n\t\t\t\t\t\t\t if($ewid) {\n\t\t\t\t\t\t\t \t if($this->uri->segment(3)) {\n\t\t\t\t\t\t\t \t\t//Cargamos el archivo que contiene la info con la que se contruye el menu\n\t\t \t \t\t$this->config->load('menu_permisos', TRUE);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \t\t//Chequeamos que el warrant no este anulado\n\t\t if(!$this->ewarrants_frr->esta_anulado($ewid)) {\n\t\t //Chequeamos que el usuario que esta tratando de anular este habilitado para hacerlo\n\t\t if($this->ewarrants_frr->can_anular($ewid)) {\n\t\t \t //Si entramos aca estamos confirmando la anulacion del eWarrant\n\t\t \t if($this->ewarrants_frr->confirmar_anulacion($ewid)) {\n\t\t \t \t //Cargamos el item que contiene la info del mensaje\n\t\t\t $datos_mensaje = $this->config->item('ewarrant_confirmacion_anulacion', 'menu_permisos');\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t \t \t //Si la peticionon se hizo por medio de ajax devolvemos el resultado via JSON\n\t\t\t if($this->input->is_ajax_request()) {\n\t\t\t \t$resultados['ewid'] = $ewid;\n\t\t\t $resultados['message'] = $datos_mensaje['texto'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$resultados['icono'] = $datos_mensaje['icono'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t //Devolvemos los resultados en JSON\n\t\t\t echo json_encode($resultados);\n\t\t\t //Ya no tenemos nada que hacer en esta funcion\n\t\t\t return;\n\t\t\t } else {\n\t\t\t \t$message = $datos_mensaje['texto'];\n\t\t\t\t\t $this->session->set_flashdata('message', $message);\n\t\t\t\t\t redirect('ewarrants/'); \n\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t \n\t\t\t\t } \n\t\t }\n\t\t\t\t\t\t\t\t\t\t //El usuario no puede anular el eWarrant y devolvemos un mensaje explicando la situacion\n\t\t\t\t\t\t\t\t\t\t //El tipo de retorno del mensaje dependera si la peticion se hizo via Ajax o no \n\t\t else {\n\t\t \t //Cargamos el item que contiene la info del mensaje\n\t\t\t $datos_mensaje = $this->config->item('ewarrant_error_no_puede_firmar', 'menu_permisos');\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t //Si la peticionon se hizo por medio de ajax devolvemos el resultado via JSON\n\t\t if($this->input->is_ajax_request()) {\n\t\t $resultados['error'] = true;\n\t\t $resultados['message'] = $datos_mensaje['texto'];\n\t\t\t\t\t\t\t\t\t\t\t\t$resultados['icono'] = $datos_mensaje['icono'];\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t //Devolvemos los resultados en JSON\n\t\t echo json_encode($resultados);\n\t\t //Ya no tenemos nada que hacer en esta funcion\n\t\t return;\n\t\t } else { \n\t\t\t $this->template->set_content('ewarrants/sin_permiso', array('msg' => $datos_mensaje['texto']));\n\t\t\t $this->template->build();\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t }\n\t\t } \n\t\t //El eWarrant ya esta anulado =(\n\t\t else {\n\t\t \t //Cargamos el item que contiene la info del mensaje\n\t\t\t $datos_mensaje = $this->config->item('ewarrant_error_ya_anulado', 'menu_permisos');\n\t\t\t\t\t\t\t\t\t\t \n\t\t \t //Si la peticionon se hizo por medio de ajax devolvemos el resultado via JSON\n\t if($this->input->is_ajax_request()) {\n\t $resultados['error'] = true;\n\t $resultados['message'] = $datos_mensaje['texto'];\n\t\t\t\t\t\t\t\t\t\t\t$resultados['icono'] = $datos_mensaje['icono'];\n\t\t\t\t\t\t\t\t\t\t\t\n\t //Devolvemos los resultados en JSON\n\t echo json_encode($resultados);\n\t //Ya no tenemos nada que hacer en esta funcion\n\t return;\n\t } else { \n\t\t\t $this->template->set_content('ewarrants/sin_permiso', array('msg' => $datos_mensaje['texto']));\n\t\t\t $this->template->build();\n\t\t\t\t\t\t\t\t\t\t }\n\t\t }\n\t\t\t\t\t\t\t \t }\n\t\t\t\t\t\t\t }\n\n #Entramos aca cuando el usuario entra en la seccion\n\t\t\t\t\t\t\t #####################################################\n\t\t\t\t\t\t\t //Cargamos el archivo que contiene la info con la que se contruye el menu\n\t\t \t $this->config->load('menu_permisos', TRUE);\n\t\t\t\t\t\t\t \n\t\t \t //Obtenemos los permisos del usuario logueado asociados a la controladora seguridad y grupo gestionar_roles\n\t\t \t $data['permisos'] = $this->roles_frr->permisos_role_controladora_grupo($this->uri->segment(1));\n\n\t\t\t\t\t\t\t //Procesamos los permisos obtenidos\n\t\t\t\t\t\t\t if(count($data['permisos']) > 0) {\n\t\t\t\t\t\t\t \tforeach ($data['permisos'] as $key => $row) {\n\t\t\t\t\t\t\t\t $data['data_menu'][$row['permiso']] = $this->config->item($row['permiso'], 'menu_permisos');\n\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t \n $this->template->set_content('ewarrants/listar_ewarrants', $data);\n $this->template->build();\n }\n\t\t\t\t\t\t //El usuario no tiene eWarrants para anular \n else {\n $this->template->set_content('ewarrants/sin_permiso', array('msg' => 'Tu empresa no tiene eWarrants para anular'));\n $this->template->build();\n }\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new AffiliateVerifyEmail);\n }", "public function register_notifications();", "function success() {\n // or what have you. The order information at this point is in POST \n // variables. However, you don't want to \"process\" the order until you\n // get validation from the IPN. That's where you would have the code to\n // email an admin, update the database with payment status, activate a\n // membership, etc. \n // echo \"<br/><p><b>Thank you for your Donation. </b><br /></p>\";\n //\n // foreach ($_POST as $key => $value) {\n // echo \"$key: $value<br>\";\n // }\n // You could also simply re-direct them to another page, or your own \n // order status page which presents the user with the status of their\n // order based on a database (which can be modified with the IPN code \n // below).\n // Primera comprobación. Cerraremos este if más adelante\n if ($_POST) {\n // Obtenemos los datos en formato variable1=valor1&variable2=valor2&...\n $raw_post_data = file_get_contents('php://input');\n // Los separamos en un array\n $raw_post_array = explode('&', $raw_post_data);\n\n // Separamos cada uno en un array de variable y valor\n $myPost = array();\n foreach ($raw_post_array as $keyval) {\n $keyval = explode(\"=\", $keyval);\n if (count($keyval) == 2)\n $myPost[$keyval[0]] = urldecode($keyval[1]);\n }\n\n // Nuestro string debe comenzar con cmd=_notify-validate\n $req = 'cmd=_notify-validate';\n if (function_exists('get_magic_quotes_gpc')) {\n $get_magic_quotes_exists = true;\n }\n foreach ($myPost as $key => $value) {\n // Cada valor se trata con urlencode para poder pasarlo por GET\n if ($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) {\n $value = urlencode(stripslashes($value));\n } else {\n $value = urlencode($value);\n }\n\n //Añadimos cada variable y cada valor\n $req .= \"&$key=$value\";\n }\n $ch = curl_init('https://www.sandbox.paypal.com/cgi-bin/webscr'); // Esta URL debe variar dependiendo si usamos SandBox o no. Si lo usamos, se queda así.\n //$ch = curl_init('https://www.paypal.com/cgi-bin/webscr'); // Si no usamos SandBox, debemos usar esta otra linea en su lugar.\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $req);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n\n if (!($res = curl_exec($ch))) {\n // Ooops, error. Deberiamos guardarlo en algún log o base de datos para examinarlo después.\n curl_close($ch);\n exit;\n }\n curl_close($ch);\n if (strcmp($res, \"VERIFIED\") == 0) {\n $fileDir = $_SERVER['DOCUMENT_ROOT'] . '/log/success_' . $myPost['item_number'] . \"_\" . $myPost['payment_status'] . \"_\" . date(\"YmdHis\") . '.log';\n //$file= @file_get_contents($fileDir);\n //$file.=$res;\n $new_file = file_put_contents($fileDir, json_encode($myPost));\n\n \n $pagos = $this->stream->getRepository(\"stream\\stream_paypal_transactions\")->findBy(array(\n \"id_seguimiento\" => $myPost['item_number']\n ), array(\"id\" => \"desc\"));\n $pago = $pagos[0];\n $myPost['payment_status'] = \"Completed\";\n \n $paypal_transaction = new stream\\stream_paypal_transactions();\n $paypal_transaction->txn_id=$myPost['txn_id'];\n $paypal_transaction->ipn_track_id=$myPost['ipn_track_id'];\n $paypal_transaction->type_payment = $pago->type_payment;\n $paypal_transaction->amount = $pago->amount;\n $paypal_transaction->id_producto = $pago->id_producto;\n $paypal_transaction->notes =$pago->notes;\n $paypal_transaction->id_seguimiento = $myPost['item_number'];\n $paypal_transaction->id_usuario = $pago->id_usuario;\n $paypal_transaction->type_user = $pago->type_user;\n $paypal_transaction->fecha_hora = date(\"Y-m-d H:i:s\");\n $paypal_transaction->estatus=$myPost['payment_status'];\n\n $this->stream->persist($paypal_transaction);\n $this->stream->flush();\n// \n// \n \n \n \n /**\n * A partir de aqui, deberiamos hacer otras comprobaciones rutinarias antes de continuar. Son opcionales, pero recomiendo al menos las dos primeras. Por ejemplo:\n *\n * * Comprobar que $_POST[\"payment_status\"] tenga el valor \"Completed\", que nos confirma el pago como completado.\n * * Comprobar que no hemos tratado antes la misma id de transacción (txd_id)\n * * Comprobar que el email al que va dirigido el pago sea nuestro email principal de PayPal\n * * Comprobar que la cantidad y la divisa son correctas\n */\n // Después de las comprobaciones, toca el procesamiento de los datos.\n\n /**\n * En este punto tratamos la información.\n * Podemos hacer con ella muchas cosas:\n *\n * * Guardarla en una base de datos.\n * * Guardar cada linea del pedido en una linea diferente en la base de datos.\n * * Guardar un log.\n * * Restar las cantidades de los artículos del stock.\n * * Enviar un mensaje de confirmcaión al cliente.\n * * Enviar un mensaje al encargado de pedidos para que lo prepare.\n * * Comprobar mediante complejas operaciones matemáticas si el cliente es el número un millon y notificarle de que ha ganado dos noches de hotel en Torrevieja.\n * * ¡Imaginación!\n */\n } else if (strcmp($res, \"INVALID\") == 0) {\n // El estado que devuelve es INVALIDO, la información no ha sido enviada por PayPal. Deberías guardarla en un log para comprobarlo después\n }\n } else { // Si no hay datos $_POST\n // Podemos guardar la incidencia en un log, redirigir a una URL...\n }\n }", "function notify_reviewer( $post_ID, $post, $dowhat='publish' ) {\n\t\t\tglobal $wpdb, $current_user;\n\t\t\t$last_revision = $wpdb->get_var( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE post_parent=%d AND post_type=%s ORDER BY post_date DESC LIMIT 1\", $post_ID, 'revision' ) );\n\t\t\t$post_content = 'draft' == $dowhat ? get_post( $last_revision ) : get_post( $post_ID );\n\t\t\t$last_mod = $post_content->post_date;\n\t\t\t$post_content = $post_content->post_content;\n\t\t\t$revision_compare_link = admin_url( 'revision.php?action=diff&post_type=' . $post->post_type . '&right=' . $post->ID . '&left=' . $last_revision );\n\t\t\t$body = sprintf( __( \"New changes have been made to \\\"%s\\\" at <%s>. \", $this->text_domain ), $post->post_title, get_permalink( $post->ID ) );\n\t\t\tif( 'draft' == $dowhat ) {\n\t\t\t\t$body .= __( \"The author has requested that you review the new changes and determine whether to remove or approve them. These changes will not appear on the public website until you approve them.\\n\\n\", $this->text_domain );\n\t\t\t} else {\n\t\t\t\t$body .= __( \"The modifications have been published, but the author of the page has requested you be notified of them.\\n\\n\", $this->text_domain );\n\t\t\t}\n\t\t\t$body .= sprintf( __( \"The new content of the page is shown below if you would like to review it. You can also review %s the changes at %s. Thank you. \\n\\n======================================================= \\nRevisions made at %s \\n======================================================= \\n\\n%s\", $this->text_domain ), ( 'draft' == $dowhat ? __( \" and approve/reject \", $this->text_domain ) : '' ), $revision_compare_link, $last_mod, $post_content );\n\t\t\t\n\t\t\t$headers = \"From: {$current_user->display_name} <{$current_user->user_email}>\\r\\n\";\n\t\t\t\n\t\t\twp_mail( $this->reviewers, sprintf( __( '[%s] New modifications to %s' ), get_bloginfo('name'), $post->post_title ), $body, $headers );\n\t\t}", "public function sendPhoneVerificationNotification();", "public function cronNotifyRecipients()\n\t{\n\t\t// Check if notifications should be send.\n\t\tif (!$GLOBALS['TL_CONFIG']['avisota_send_notification'])\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->loadLanguageFile('avisota_subscription');\n\n\t\t$entityManager = EntityHelper::getEntityManager();\n\t\t$subscriptionRepository = $entityManager->getRepository('Avisota\\Contao:RecipientSubscription');\n\t\t$intCountSend = 0;\n\n\t\t$resendDate = $GLOBALS['TL_CONFIG']['avisota_notification_time'] * 24 * 60 * 60;\n\t\t$now = time();\n\n\t\t// Get all recipients.\n\t\t$queryBuilder = EntityHelper::getEntityManager()->createQueryBuilder();\n\t\t$queryBuilder\n\t\t\t\t->select('r')\n\t\t\t\t->from('Avisota\\Contao:Recipient', 'r')\n\t\t\t\t->innerJoin('Avisota\\Contao:RecipientSubscription', 's', 'WITH', 's.recipient=r.id')\n\t\t\t\t->where('s.confirmed=0')\n\t\t\t\t->andWhere('s.reminderCount < ?1')\n\t\t\t\t->setParameter(1, $GLOBALS['TL_CONFIG']['avisota_notification_count']);\n\t\t$queryBuilder->orderBy('r.email');\n\t\t\n\t\t// Execute Query.\n\t\t$query = $queryBuilder->getQuery();\n\t\t$integratedRecipients = $query->getResult();\n\t\t\n\t\t// Check each recipient with open subscription.\n\t\tforeach ($integratedRecipients as $integratedRecipient)\n\t\t{\n\t\t\t$subscriptions = $subscriptionRepository->findBy(array('recipient' => $integratedRecipient->id, 'confirmed' => 0), array('updatedAt' => 'asc'));\n\t\t\t$tokens = array();\n\t\t\t$blnNotify = false;\n\n\t\t\tforeach ($subscriptions as $subscription)\n\t\t\t{\n\t\t\t\t// Check if we are over the $resendDate date.\n\t\t\t\tif (($subscription->updatedAt->getTimestamp() + $resendDate) > $now)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Set some data.\n\t\t\t\t$blnNotify = true;\n\t\t\t\t$tokens[] = $subscription->getToken();\n\n\t\t\t\t// Update the subscription.\n\t\t\t\t$subscription->updatedAt = new \\Datetime();\n\t\t\t\t$subscription->reminderSent = new \\Datetime();\n\t\t\t\t$subscription->reminderCount = $subscription->reminderCount + 1;\n\n\t\t\t\t// Save.\n\t\t\t\t$entityManager->persist($subscription);\n\t\t\t}\n\n\t\t\t// Check if we have to send a notify and if we have a subscription module.\n\t\t\tif ($blnNotify && $subscription->getSubscriptionModule())\n\t\t\t{\n\t\t\t\t$subscription = $subscriptions[0];\n\n\t\t\t\t$parameters = array(\n\t\t\t\t\t'email' => $integratedRecipient->email,\n\t\t\t\t\t'token' => implode(',', $tokens),\n\t\t\t\t);\n\n\t\t\t\t$arrPage = $this->Database\n\t\t\t\t\t\t->prepare('SELECT * FROM tl_page WHERE id = (SELECT avisota_form_target FROM tl_module WHERE id = ?)')\n\t\t\t\t\t\t->limit(1)\n\t\t\t\t\t\t->execute($subscription->getSubscriptionModule())\n\t\t\t\t\t\t->fetchAssoc();\n\n\t\t\t\t$objNextPage = $this->getPageDetails($arrPage['id']);\n\t\t\t\t$strUrl = $this->generateFrontendUrl($objNextPage->row(), null, $objNextPage->rootLanguage);\n\n\t\t\t\t$url = $this->generateFrontendUrl($arrPage);\n\t\t\t\t$url .= (strpos($url, '?') === false ? '?' : '&');\n\t\t\t\t$url .= http_build_query($parameters);\n\n\t\t\t\t$newsletterData = array();\n\t\t\t\t$newsletterData['link'] = (object) array(\n\t\t\t\t\t\t\t'url' => \\Environment::getInstance()->base . $url,\n\t\t\t\t\t\t\t'text' => $GLOBALS['TL_LANG']['avisota_subscription']['confirmSubscription'],\n\t\t\t\t);\n\n\t\t\t\t// Try to send the email.\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$this->sendMessage($integratedRecipient, $GLOBALS['TL_CONFIG']['avisota_notification_mail'], $GLOBALS['TL_CONFIG']['avisota_default_transport'], $newsletterData);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exc)\n\t\t\t\t{\n\t\t\t\t\t$this->log(sprintf('Unable to send reminder to \"%s\" with error message - %s', $integratedRecipient->email, $exc->getMessage()), __CLASS__ . ' | ' . __FUNCTION__, TL_ERROR);\n\t\t\t\t}\n\n\t\t\t\t// Update recipient;\n\t\t\t\t$integratedRecipient->updatedAt = new \\DateTime();\n\n\t\t\t\t// Set counter.\n\t\t\t\t$intCountSend++;\n\t\t\t}\n\n\t\t\t// Send only 5 mails per run.\n\t\t\tif ($intCountSend >= 5)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$entityManager->flush();\n\t}", "public static function listen() {\n\t\tif ( filter_has_var( INPUT_GET, 'xml_notification' ) || filter_has_var( INPUT_GET, 'xml_notifaction' ) ) {\n\t\t\t$data = file_get_contents( 'php://input' );\n\n\t\t\t$xml = Pronamic_WP_Util::simplexml_load_string( $data );\n\n\t\t\tif ( ! is_wp_error( $xml ) ) {\n\t\t\t\t$notification = Pronamic_WP_Pay_Gateways_IDealBasic_XML_NotificationParser::parse( $xml );\n\n\t\t\t\t$purchase_id = $notification->get_purchase_id();\n\n\t\t\t\t$payment = get_pronamic_payment_by_meta( '_pronamic_payment_purchase_id', $purchase_id );\n\n\t\t\t\tif ( $payment ) {\n\t\t\t\t\t$payment->set_transaction_id( $notification->get_transaction_id() );\n\t\t\t\t\t$payment->set_status( $notification->get_status() );\n\n\t\t\t\t\tPronamic_WP_Pay_Plugin::update_payment( $payment );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static function sendActivationReminders(){\n self::$UserService->sendEmailActivationReminders();\n }", "public function accept_all()\n {\n $ids = $_POST['ids'];\n foreach ($ids as $id) {\n $accepted = EventMobile::find($id);\n $accepted->update(['event_status_id' => 2]);\n $accepted->save();\n //Notify Each event owner\n $event_owner = $accepted->user;\n if ($event_owner) {\n $notification_message['en'] = 'YOUR EVENT IS APPROVED';\n $notification_message['ar'] = 'تم الموافقة على الحدث';\n $notification = $this->NotifcationService->save_notification($notification_message, 3, 4, $accepted->id, $event_owner->id);\n $this->NotifcationService->PushToSingleUser($event_owner, $notification);\n }\n //get users have this event in their interests\n $this->NotifcationService->EventInterestsPush($accepted);\n }\n\n }", "private function approve() {\n\n }", "public function sendAssignmentNotification()\n {\n \t$ctime = date('Y-m-d'); //get current day\n \n \t//get facebook id from the user setting for facebook reminder\n \t$this->PleAssignmentReminder->virtualFields = array('tid' => 'PleUserMapTwitter.twitterId');\n \n \t//get last sent id\n \t$last_sent_id = $this->PleLastReminderSent->find('first',array('conditions' => array('PleLastReminderSent.date' => $ctime, 'PleLastReminderSent.type' => 'twitter')));\n \n \tif( count($last_sent_id) > 0 ) {\n \t\t$options['conditions'][] = array('PleAssignmentReminder.id >' => $last_sent_id['PleLastReminderSent']['last_sent_rid']);\n \t}\n \n \t//get appController class object\n \t$obj = new AppController();\n \t$assignments = $obj->getAssignmentConstraints();\n \n \t//get today assignments\n \n \t$options['conditions'][] = $assignments;\n \t$options['fields'] = array('id', 'user_id', 'assignment_uuid', 'assignment_title', 'due_date', 'course_id');\n \t$options['order'] = array('PleAssignmentReminder.id ASC');\n \n \t//execute query\n \t$assignmnet_details = $this->PleAssignmentReminder->find('all', $options);\n \t\n \n \t//send twitter reminder\n \tforeach( $assignmnet_details as $assignmnet_detail ) {\n\t $user_id = $assignmnet_detail['PleAssignmentReminder']['user_id'];\n \t\t//$to_twitter = $assignmnet_detail['PleAssignmentReminder']['tid'];\n \t\t$body = $assignmnet_detail['PleAssignmentReminder']['assignment_title'];\n\t\t$course_id = $assignmnet_detail['PleAssignmentReminder']['course_id'];\n \t\t\n\t\t//get twitter users array if user is instructor\n \t\t$twitter_users_array = $this->getChildren( $user_id, $course_id );\n\t\t\n \t\t//set display date for assignments\n \t\t$originalDate = $assignmnet_detail['PleAssignmentReminder']['due_date'];\n\t\tif($originalDate != \"\"){\n \t\t$newDate = date(\"F d, Y\", strtotime($originalDate));\n \t\t$due_date = \" due on $newDate\";\n\t\t}else{\n\t\t \t$due_date = \" is due on NA\";\n\t\t }\n \t\t\n \t\t//compose mail date\n \t\t$mail_data = \"Assignment Reminder! $course_id. Your assignment, $body, $due_date.\";\n \t\t$subject = $course_id.\" - \".$body;\n \n\t\t//send the reminder to multiple users\n \t\tforeach ($twitter_users_array as $to_twitter_data ) {\n\t\t$to_twitter = $to_twitter_data['twitter_id'];\n \t\t$to_id = $to_twitter_data['id'];\n \t\t$send_twitter = $this->sendNotification( $to_twitter, $mail_data );\n \n \t\t//check for if facebook reminder sent\n \t\tif ( $send_twitter == 1) {\n \n \t\t\t//remove the previous entry of current date\n \t\t\t$this->PleLastReminderSent->deleteAll(array('PleLastReminderSent.date'=>$ctime, 'PleLastReminderSent.type'=>'twitter'));\n \t\t\t$this->PleLastReminderSent->create();\n \n \t\t\t//update the table for sent facebook reminder\n \t\t\t$data['PleLastReminderSent']['last_sent_rid'] = $assignmnet_detail['PleAssignmentReminder']['id'];\n \t\t\t$data['PleLastReminderSent']['type'] = 'twitter';\n \t\t\t$data['PleLastReminderSent']['date'] = $ctime;\n \t\t\t$this->PleLastReminderSent->save($data);\n \n \t\t\t//create the CSV user data array\n \t\t\t$csv_data = array('id'=>$to_id, 'tid'=>$to_twitter, 'mail_data'=> $mail_data);\n \n \t\t\t//write the csv\n \t\t\t$this->writeTwitterCsv($csv_data);\n \n \t\t\t//unset the csv data array\n \t\t\tunset($csv_data);\n \t\t} else if ( $send_twitter == 2) { //twitter app not following case(can be used for future for notification on dashboard)\n \t\t\t\n \t\t} else {\n \t\t\t//handling for twitter reminder failure\n\t \t\t$tw_data = array();\n\t \t\t$tw_data['AssignmentTwitterFailure']['twitter_id'] = $to_twitter;\n\t \t\t$tw_data['AssignmentTwitterFailure']['mail_data'] = $mail_data;\n\t \t\t$this->AssignmentTwitterFailure->create();\n\t \t\t$this->AssignmentTwitterFailure->save($tw_data);\n \t\t}\n\t\t}\n \t}\n }" ]
[ "0.62606436", "0.6180774", "0.61513406", "0.61246234", "0.61131275", "0.6094431", "0.6070978", "0.60619646", "0.59795547", "0.59488064", "0.59305984", "0.5912467", "0.5911151", "0.5906732", "0.58812636", "0.5874269", "0.5858785", "0.58436203", "0.58351886", "0.582706", "0.5826177", "0.5810041", "0.5787935", "0.57841676", "0.5739503", "0.57172424", "0.57172424", "0.57104665", "0.5690964", "0.5688705", "0.5683292", "0.5677808", "0.5675939", "0.5674855", "0.5672114", "0.5665571", "0.566077", "0.5625794", "0.56252", "0.5622787", "0.56017816", "0.5594", "0.5590925", "0.5590069", "0.5586399", "0.5575645", "0.5575251", "0.5572923", "0.5571391", "0.55679077", "0.55667984", "0.55621225", "0.5561944", "0.55525863", "0.5551402", "0.5548505", "0.5541037", "0.5537943", "0.55279934", "0.5527734", "0.5526541", "0.55177295", "0.55147105", "0.5511958", "0.55018705", "0.5501143", "0.5497058", "0.54943496", "0.54925245", "0.5491766", "0.54899937", "0.5489497", "0.54890525", "0.5485769", "0.5481932", "0.54813755", "0.54779834", "0.5474624", "0.5468562", "0.54507095", "0.5450149", "0.5447871", "0.5445076", "0.5444284", "0.54421586", "0.5433956", "0.5430765", "0.5429865", "0.542786", "0.54225343", "0.5422434", "0.5420345", "0.5417165", "0.5414559", "0.54141325", "0.5409375", "0.5407936", "0.54000854", "0.5399799", "0.53926015", "0.53922564" ]
0.0
-1
Show item inner page
public function indexAction() { // Get item information from database $item = DB::select('catalog.*', array('brands.name', 'brand_name'), array('brands.alias', 'brand_alias'), array('models.name', 'model_name'), array('catalog_tree.name', 'parent_name')) ->from('catalog') ->join('catalog_tree', 'LEFT')->on('catalog.parent_id', '=', 'catalog_tree.id') ->join('brands', 'LEFT')->on('catalog.brand_id', '=', 'brands.id')->on('brands.status', '=', DB::expr('1')) ->join('models', 'LEFT')->on('catalog.model_id', '=', 'models.id')->on('models.status', '=', DB::expr('1')) ->where('catalog.status', '=', 1) ->where('catalog.alias', '=', Route::param('alias')) ->as_object()->execute()->current(); if( !$item ) { return Config::error(); } Route::factory()->setParam('id', $item->id); Route::factory()->setParam('group', $item->parent_id); // Add to cookie viewed list Catalog::factory()->addViewed($item->id); // Add plus one to views DB::update('catalog')->set(array('views' => (int) $item->views + 1))->where('id', '=', $item->id)->execute(); // Seo $this->setSeoForItem($item); // Get images $images = DB::select('image')->from('catalog_images')->where('catalog_id', '=', $item->id)->order_by('sort')->as_object()->execute(); // Get item sizes $sizes = DB::select('sizes.*')->from('sizes') ->join('catalog_sizes', 'LEFT')->on('catalog_sizes.size_id', '=', 'sizes.id') ->where('catalog_sizes.catalog_id', '=', $item->id) ->where('sizes.status', '=', 1) ->order_by('sizes.name') ->as_object()->execute(); // Get current item specifications list $specifications = DB::select('specifications.*')->from('specifications') ->join('catalog_tree_specifications', 'LEFT')->on('catalog_tree_specifications.specification_id', '=', 'specifications.id') ->where('catalog_tree_specifications.catalog_tree_id', '=', $item->parent_id) ->where('specifications.status', '=', 1) ->order_by('specifications.name') ->as_object()->execute(); $res = DB::select()->from('specifications_values') ->join('catalog_specifications_values', 'LEFT')->on('catalog_specifications_values.specification_value_id', '=', 'specifications_values.id') ->where('catalog_specifications_values.catalog_id', '=', $item->id) ->where('status', '=', 1) ->where('catalog_specifications_values.specification_value_id', '!=', 0) ->as_object()->execute(); $specValues = array(); foreach( $res AS $obj ) { $specValues[$obj->specification_id][] = $obj; } $spec = array(); foreach ($specifications as $obj) { if( isset($specValues[$obj->id]) AND is_array($specValues[$obj->id]) AND count($specValues[$obj->id]) ) { if( $obj->type_id == 3 ) { $spec[$obj->name] = ''; foreach($specValues[$obj->id] AS $o) { $spec[$obj->name] .= $o->name.', '; } $spec[$obj->name] = substr($spec[$obj->name], 0, -2); } else { $spec[$obj->name] = $specValues[$obj->id][0]->name; } } } // Render template $this->_content = View::tpl( array('obj' => $item, 'images' => $images, 'sizes' => $sizes, 'specifications' => $spec), 'Catalog/Item' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show() {\n $this->buildPage();\n echo $this->_page;\n }", "public function show(Item $item)\n {\n \n }", "public function show(Item $item)\n {\n //\n }", "public function show(Item $item)\n {\n //\n }", "public function show(Item $item)\n {\n }", "function item_page(item $item) {\n $item = DB::select(\"select * from item where id=$item->id\");\n return view('produit',['item'=>$item]);\n }", "public function show($id)\n {\n //$this->_DetailItem();\n }", "public function detailAction() {\n\n //GET THE LIST ITEM\n $this->view->listDetail = Engine_Api::_()->getItem('list_listing',(int) $this->_getParam('id'));\n }", "public function test_individual_item_is_displayed()\n {\n $response = $this->get(\"/item-detail/1\");\n $response->assertSeeInOrder(['<strong>Title :</strong>', '<strong>Category :</strong>', '<strong>Details :</strong>']);\n }", "public function show(Page $page)\n {\n\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function show(ExtraItem $extraItem)\n {\n //\n }", "public function showAction()\n {\n // Do not show pager when nothing to page.\n if ($this->pagerCollection->getItemCount() <= 0) {\n return '';\n }\n\n $pager = $this->pagerCollection->getPagerByIdentifier($this->pagerIdentifier);\n \n $this->view->assign('pagerCollection', $this->pagerCollection);\n $this->view->assign('pager', $pager);\n }", "public function show(Items $items)\n {\n //\n }", "private function item($page_name, $item_id, $item_name)\n {\n $item_id = substr($item_id, 1);\n $item = ORM::factory('showroom_cat_item')\n ->where(array(\n 'fk_site' => $this->site_id\n ))\n ->find($item_id);\n if(!$item->loaded)\n return '<div class=\"not_found\">Invalid item</div>';\n\n # get the category \n $category = ORM::factory('showroom_cat')\n ->where(array(\n 'fk_site' => $this->site_id\n ))\n ->find($item->showroom_cat_id);\n\n # get the path to this items category\n $path = ORM::factory('showroom_cat')\n ->where(array(\n 'fk_site' => $this->site_id,\n 'showroom_id' => $category->showroom_id,\n 'lft <' => $category->lft,\n 'rgt >' => $category->rgt,\n 'local_parent !='=> 0\n ))\n ->orderby(array('lft' => 'asc'))\n ->find_all();\n \n $view = new View('public_showroom/display/single_item');\n $view->item = $item;\n $view->path = $path;\n $view->category = $category;\n $view->page_name = $page_name;\n $view->img_path = $this->assets->assets_url();\n return $view;\n }", "public function show($id)\n {\n $item = $this->itemCRUD->find($id);\n\n $this->load->view('theme/header');\n $this->load->view('items/show',array('item'=>$item));\n $this->load->view('theme/footer');\n }", "public function show(Page $page)\n {\n //\n }", "public function show(Page $page)\n {\n //\n }", "public function show(Page $page)\n {\n //\n }", "abstract protected function showContent(): self;", "private function show_page()\n\t{\n\t\t$parse['user_link']\t= $this->_base_url . 'recruit/' . $this->_friends[0]['user_name'];\n\t\n\t\t$this->template->page ( FRIENDS_FOLDER . 'friends_view' , $parse );\t\n\t}", "public function detail() {\n $url = explode('/', $_GET['url']);\n $id = $url[2];\n $this->loadView('detail', 'content');\n $client = $this->em->selectById('client', $id);\n $village = $this->em->selectById('village', $client->getIdVillage());\n $this->loadHtml($client->getId(), 'id');\n $this->loadHtml($client->getNomFamille(), 'nomFamille');\n $this->loadHtml($village->getNom(), 'village');\n $this->loadHtml($client->getTelephone(), 'telephone');\n $this->dom->getElementById('lien_client')->href .= $id;\n }", "public function pageOne()\n {\n\n\n View::show(\"pageOne.php\", \"pageOne\");\n }", "public function show(ehPage $page)\n {\n\n\n\n ehLayout::initLayout();\n ehLayout::setOptionBlock(false);\n\n $linkbar = new ehLinkbar();\n ehLayout::setLinkbar($linkbar->getLinkbar());\n\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n ehLayout::setAutoload('unsaved'); // Include the form data changed check on any crud page.\n //ehLayout::setAutoload([3,6]);\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // Create the Dynamic header.\n $delimiter = '<span class=\"fw-light\"> | </span>';\n $display_parent = 'TOP LEVEL'; // Default if no parent id.\n if ($page->parent_id > 0) { $display_parent = $page->parent_id.'-'.ehPage::find($page->parent_id)->name; }\n\n switch ($page->security) {\n case 1:\n $display_security = 'PUBLIC';\n break;\n case 2:\n $display_security = 'AUTHENTICATED';\n break;\n case 3:\n $display_security = 'PERMISSIONS CHECK';\n break;\n\n default:\n $display_security = 'NO ACCESS';\n }\n $display_menu_item = 'NO';\n if ($page->menu_item == 1) { $display_menu_item = 'YES'; }\n\n ehLayout::setDynamic(\n $page->id.'-'.$page->name\n .$delimiter.'<em class=\"fw-light\">Parent: </em>'\n .$display_parent\n .$delimiter.'<em class=\"fw-light\">Access: </em>'\n .$display_security\n .$delimiter.'<em class=\"fw-light\">Type: </em>'\n .strtoupper($page->type)\n .$delimiter.'<em class=\"fw-light\">Menu Item: </em>'\n .$display_menu_item\n .$delimiter.'<em class=\"fw-light\">Route: /</em>'\n .$page->route\n\n );\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // Set the menu name in the dynamic header.\n if ($page->active) {\n //ehLayout::setAttention($page->id.'-<span class=\"fw-bold\">'.$page->name.'</span> is currently active.', 'bg-secondary');\n ehLayout::setAttention('Active','bg-secondary');\n } else {\n //ehLayout::setAttention($$page->id.'-<span class=\"fw-bold\">'.$page->name.'</span> is currently inactive.', 'bg-warning');\n ehLayout::setAttention('Not Active','bg-warning');\n }\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // Set up Save, New and Delete buttons based on this user's permissions.\n ehLayout::setStandardButtons();\n\n\n $form['layout'] = ehLayout::getLayout();\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // Set the <form> action and method.\n $form['layout']['form_action'] = config('app.url').'/pages/'.$page->id;\n $form['layout']['form_method'] = 'PATCH';\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // The Legend and Page Tree display explanation (set at top of this controller).\n $form['tree_layout_explanation'] = $this->tree_layout_explanation;\n\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // Prepare this menu items whole module structure for display in the sidebar.\n // Get a master dataset of all to parse and pull out the individual modules\n $menus = new ehMenus(false);\n $pages_all = $menus->getPages();\n\n // Who is the parent / base module over this whole menu/pages tree?\n $tmp = ehMenus::getMyModule($page->parent_id);\n\n // Assuming that if nothing is returned then this is the base module. (for now-see the function for TODOs)\n if ($tmp->count() == 0) {\n $id = $page->id;\n } else {\n $id = $tmp->id;\n }\n $form['module_id'] = $id; // Used to keep the Go-To Modules dropdown in sync with the currently selected module.\n\n // Pull out just this module (note: all the children were already added when we instantiated the menu).\n $form['whole_module'] = $pages_all->where('id',$id)->toArray();\n\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n return view('ecoHelpers::pages.page-detail',[\n 'form' => $form,\n 'page'=>$page\n ]);\n }", "public function detail($i)\n {\n $this->data['page_title'] = $i;\n $this->data['player-activity'] = $this->invidividual($i);\n $this->data['pagebody'] = '/portfolio';\n $this->render();\n }", "public function showitemAction() {\n\t\t$story_id \t\t= $this->getRequest()->getParam(\"story\");\n\t\t$source_id \t\t= $this->getRequest()->getParam(\"source\");\n\t\t$item_id\t\t= $this->getRequest()->getParam(\"item\");\n\t\t\n\t\t//Verify if the requested story exist\n\t\t$stories\t\t= new Stories();\n\t\tif (!($story\t= $stories->getStory($story_id))) {\n\t\t\treturn $this->_helper->json->sendJson(false);\n\t\t}\n\n\t\t// Check if we are the owner\n\t\tif ($this->_application->user->id != $story->user_id) {\n\t\t\treturn $this->_helper->json->sendJson(false);\n\t\t}\n\t\t\n\t\t// Ok, we can show the item\n\t\t$storyItems\t\t= new StoryItems();\n\t\t$storyItems->showItem($story_id, $source_id, $item_id);\n\t\treturn $this->_helper->json->sendJson(true);\n\t}", "public function show(items $items)\n {\n //\n }", "public function show(TipoItem $tipoItem)\n {\n //\n }", "public function item()\n\t{\n\t\t$data['itemResult'] = $this->ProcurementModel->item();\n\t\t$data['mfgco'] = $this->ProcurementModel->getMfgCo();\n\t\t$data['supplier'] = $this->ProcurementModel->getSupplier();\n\t\t$data['cat'] = $this->ProcurementModel->category();\n\t\t$data['pagename'] = \"item\";\n\t\t$data['category'] = \"master\";\n\t\t$data['active_menu'] = \"procurement\";\n\t\t$this->load->view('Director',$data);\n\n\t}", "function item( $args )\n {\n \n // if post id is null just display all\n if( $args['page'] === null || !is_numeric($args['page']) ){\n \n // redirect to browse all\n $this->app->redirect( 'browse/all' );\n }\n \n // get the post id from the page number\n $postid = (int)$args['page'];\n \n \n // initialize results\n $result = null;\n \n \n /* ======================\n * Get the listings model\n */\n $listing_model = $this->app->model('listings');\n \n \n // get the result\n $result = $listing_model->limit(1)->get_item( $postid );\n \n \n // add results to the view\n $this->view->add('listing_result', $result);\n \n /* Check for listing result */\n if( count($result) < 1 ){\n \n // item is not available, update title\n $this->view->add('page_title','Item Unavailable');\n \n // add error message\n $this->view->add('err_msg',\n 'It does not appear that this item is in our garage...'\n );\n \n // add err_msg subview to include\n $this->view->add('subviews',array('err_msg'));\n \n // end \n return;\n }\n \n // update the page title\n $this->view->add('page_title',\n $result[0]['title']\n );\n \n // set the self referencing links\n $this->view->add('self_link',\n $this->app->form_path('browse/item/'.$postid)\n );\n \n \n \n // init accepted to false\n $accepted = false;\n \n /* ===========================================\n * Load offers model to get offers for listing\n */\n \n // start the selection\n $offer_model = $this->app->model('offers');\n\t\t$limit = 10;\n\t\t$offer_page = 0;\n \n // add a test if this listing has already been accepted\n if( $result[0]['status'] ==\n GarageSale\\BaseDatabase::STATUS_ACCEPTED \n ){\n \n // get offer result\n $offers_result = $offer_model->limit(1)->get_accepted( \n (int) $result[0]['id']\n );\n \n // set accepted flag to true\n $accepted = true;\n \n } else {\n \n \n // limit to 10 displayed at a time\n $limit = 10;\n \n // default offer_page to 0\n $offer_page = 0;\n \n // set up offers page\n if( isset( $_GET['offerpage'] ) && \n is_numeric($_GET['offerpage']) \n ){\n \n // set offer_page to the user provided value\n $offer_page = ((int) $_GET['offerpage'] ) - 1;\n }\n \n $offers_result = $offer_model->limit($limit)->\n page($offer_page)->\n get_item_any_offer( (int) $result[0]['id'] );\n }\n \n \n // add to page\n $this->view->add( 'offers_result', $offers_result );\n \n \n \n /* =======================================\n * SQL Query to count the number of offers\n */\n \n if( $accepted === true ){\n \n // where accepted\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACCEPTED );\n } else {\n \n // and are active\n $offer_count_res = $offer_model->get_count($postid,\n GarageSale\\BaseDatabase::STATUS_ACTIVE );\n }\n \n // get the count\n $offer_count = (int)$offer_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $offer_page;\n \n // add comment count info to view\n $this->view->add( 'offer_count',\n array(\n // total numbr of offers that have been made\n 'total' => $offer_count,\n \n // where this set of offers starts\n 'begin' => ($offer_count > 0 ) ? $offset+1 : 0,\n \n // where this set of offers end\n 'end' => $offset + count($offers_result),\n \n // how many are selected per set\n 'per' => $limit\n )\n );\n \n \n \n /* ======================\n * Use the comments model\n */\n $comment_model = $this->app->model('comments');\n \n \n // limit to 10 for now, option for more later\n $limit = 10;\n \n // default comment page number is 0\n $comment_page = 0;\n // get comment page value\n if( isset($_GET['commentpage']) && \n is_numeric( $_GET['commentpage'])\n ){\n // convert to int and is one less than displayed.\n $comment_page = ((int) $_GET['commentpage']) - 1;\n }\n \n \n // get comment results\n $comment_result = $comment_model->limit($limit)->\n page($comment_page)->get_item( $postid );\n \n \n // add comment results to page\n if( count($comment_result) > 0 ){\n \n // add comment result response\n $this->view->add( 'listing_comments', $comment_result );\n } else {\n \n // add null for comment listings\n $this->view->add( 'listing_comments', null );\n }\n \n \n \n \n /* =========================================\n * SQL Query to count the number of comments\n */\n $comment_count_res = $comment_model->get_count($postid);\n \n // get the count\n $comment_count = (int)$comment_count_res[0]['id'];\n \n // calc offset\n $offset = $limit * $comment_page;\n \n // add comment count info to view\n $this->view->add( 'comment_count',\n array(\n // total numbr of comments that have been made\n 'total' => $comment_count,\n \n // where this set of comments starts\n 'begin' => ($comment_count > 0) ? $offset+1 : 0,\n \n // where this set of comments end\n 'end' => $offset + count($comment_result),\n \n // how many are comments per set\n 'per' => $limit\n )\n );\n \n \n\t // get wysiwyg extension\n\t $wysiwyg = $this->app->extension('wysiwyg');\n\t \n\t // load comment form\n\t $comment_form = $this->view->\n\t form('comment','listings/postcomment/'.$postid);\n\t $this->view->add('comment_form',$comment_form);\n\t \n\t \n /* -----------------------\n * Some neat Amazon stuff.\n */\n \n // require needed libraries\n $this->app->library('AmazonIntegration');\n \n $this->amazon = new \\AmazonFetcher();\n \n // get response from amazon\n $response = $this->amazon->medium($result[0]['title']);\n \n // add amazon's response to our view\n $this->view->add('amazon_response',$response);\n\t\t//Get users ID\n\t\t$row = $result[0];\n\t\t$sellerid = $row['userid'];\n\t\t\n\t\t//Get rating and number of reviews for retrieved user id\n\t\t$reviews_model = $this->app->model('reviews');\n\t\t$rating = $reviews_model->get_avg_reviews($sellerid);\n\t\t$review_count_res = $reviews_model->get_count($sellerid);\n\t\t$review_count = $review_count_res[0]['id'];\n\t\t\n\t\t//Add information to view\n\t\t$this->view->add('rating_count',$review_count);\n\t\t//$this->view->add('scripts',array('star-review'));\n\t\tif($rating[0]['rating_average'] != null){\n\t\t\t$this->view->add('rating',$rating[0]['rating_average']);\n\t\t}else{\n\t\t\t$this->view->add('rating',0);\n\t\t}\n \n }", "public function showAction()\n {\n $this->setPageTitle(sprintf($this->_('Show %s'), $this->getTopic()));\n\n $model = $this->getModel();\n // NEAR FUTURE:\n // $this->addSnippet('ModelVerticalTableSnippet', 'model', $model, 'class', 'displayer');\n $repeater = $model->loadRepeatable();\n $table = $this->getShowTable();\n $table->setOnEmpty(sprintf($this->_('Unknown %s.'), $this->getTopic(1)));\n $table->setRepeater($repeater);\n $table->tfrow($this->createMenuLinks($this->menuShowIncludeLevel), array('class' => 'centerAlign'));\n\n if ($menuItem = $this->findAllowedMenuItem('edit')) {\n $table->tbody()->onclick = array('location.href=\\'', $menuItem->toHRefAttribute($this->getRequest()), '\\';');\n }\n\n $tableContainer = \\MUtil_Html::create('div', array('class' => 'table-container'), $table);\n $this->html[] = $tableContainer;\n }", "public function page() {\n\t\t$this->page = $this->plugin->factory->adminPage;\n\t\t$this->page->show();\n\t}", "public function show() {\n\t\treturn view('page.telat',$this->page());\n\t}", "public function show($id)\n {\n $item = $this->itemCRUD->find_item($id);\n\n\n $this->load->view('theme/header');\n $this->load->view('itemCRUD/show',array('item'=>$item));\n $this->load->view('theme/footer');\n }", "function view_items() {\n $items = \\Model\\Item::all();\n \n $this->SC->CP->load_view('stock/view_items',array('items'=>$items));\n }", "public function indexAction() {\n\t\t\t$page_menu = $this->getPageMenu();\n\t\t\tif ( 'options' === $page_menu[ $this->getResultId() ]['type'] ) {\n\t\t\t\t$this->showOptions();\n\t\t\t} else {\n\t\t\t\t$this->showPage();\n\t\t\t}\n\t\t}", "public function detail()\n {\n $vereinRepository = new VereinRepository();\n\n $view = new View('verein_detail');\n $view->heading = \"\";\n $view->verein = $vereinRepository->readById($_GET['id']);\n $view->title = $view->verein->name;\n $view->display();\n }", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "public function show($orderItem)\n {\n }", "public function show_detail($i_id=0)\r\n {}", "public function show_detail($i_id=0)\r\n {}", "public function showAction() {\n $news = $this->newsRepository->findByUid($GLOBALS['TSFE']->id);\n $this->view->assign('news', $news)\n ->assign('settings', $this->settings);\n }", "public function show($id)\n {\n //\n $items = DB::table('items')->where('id_item',$id)->get();\n foreach($items as $item){\n $param['item']=$item;\n }\n return view('item.showItem')->with($param);\n }", "public function show()\n {\n return $this->view('resources.sections.components.index')->with('items', Content::with('sections')->get());\n }", "public function index()\n {\n if (null != $this->request->ifParameter(\"id\")) {\n $items_current_page = $this->request->getParameter(\"id\");\n } else {\n $items_current_page = 1;\n }\n $items = $this->item->getItemsFront($items_current_page);\n $previous_page = $items_current_page - 1;\n $next_page = $items_current_page + 1;\n $number_of_items_pages = $this->calculate->getNumberOfPagesOfExtHome();\n $number_of_items = $this->calculate->getTotalOfItemsHome();\n $number_of_cards = $this->calculate->getTotalOfCards();\n $number_of_links = $this->calculate->getTotalOfLinks();\n $this->generateView(array(\n 'items' => $items,\n 'number_of_items' => $number_of_items,\n 'number_of_cards' => $number_of_cards,\n 'number_of_links' => $number_of_links,\n 'items_current_page' => $items_current_page,\n 'previous_page' => $previous_page,\n 'next_page' => $next_page,\n 'number_of_items_pages' => $number_of_items_pages\n ));\n }", "function items(){\n $data['content_page']='admin/items';\n $this->load->view('common/base_template',$data);\n }", "public function display_items() {\n\t\t$wrap_class = str_replace( '_', '-', $this->parant_plugin_slug );\n\t\t?>\n\t\t<div id=\"wpaddons-io-wrap\" class=\"wrap <?php echo $wrap_class; ?>-wrap\">\n\n\t\t\t<?php\n\t\t\t// Get addon\n\t\t\t$addons = $this->get_addons();\n\n\t\t\t// Load the display template\n\t\t\tinclude_once( $this->view );\n\t\t\t?>\n\n\t\t</div>\n\t\t<?php\n\t}", "public function showAction() {\n\t\t$contentObject = $this->configurationManager->getContentObject()->data;\n\t\t$config = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);\n\n\t\t/** @var $dce Tx_Dce_Domain_Model_Dce */\n\t\t$dce = $this->dceRepository->findAndBuildOneByUid(\n\t\t\t$this->dceRepository->extractUidFromCType($config['pluginName']),\n\t\t\t$this->settings,\n\t\t\t$contentObject\n\t\t);\n\n\t\tif ($dce->getEnableDetailpage() && intval($contentObject['uid']) === intval(t3lib_div::_GP($dce->getDetailpageIdentifier()))) {\n\t\t\treturn $dce->renderDetailpage();\n\t\t} else {\n\t\t\treturn $dce->render();\n\t\t}\n\t}", "public function show(ResultItem $resultItem)\n {\n //\n }", "public function actionShow()\r\n\t{\r\n\t\t$this->render('show',array('model'=>$this->loadcontent()));\r\n\t}", "public function showDetails(){\n $this->_showDetails = true;\n }", "public function actionDetails()\n\t{\n\t\t$this->render('details',array('model'=>$this->loadarticles()));\n\t}", "public function displayPage()\n {\n\n // I check if there is a duplicate action\n $this->handleDuplicate();\n\n $formTable = new FormListTable();\n\n $formTable->prepare_items();\n require_once __DIR__ . '/templates/index.php';\n }", "function onShowDetail(&$pr, &$ds) {\n\t$hotel = $this->dTable->detailed($this->entryId)->execute()->getFirst();\n\n\t$this->dsDb->add(\"Hotel\",$hotel->toArray(true));\n\n\t$fn = $this->name() . \"/show.xml\";\n\t$pr->loadPage( $fn );\n }", "function viewPage( &$outPage )\n {\n #echo \"eZNewsFlowerArticleViewer::viewPage( \\$outPage = $outPage )<br />\\n\";\n $value = true;\n \n $this->IniObject->readAdminTemplate( \"eznewsflower/article\", \"view.php\" );\n \n $this->IniObject->set_file( array( \"article\" => \"view.tpl\" ) );\n $this->IniObject->set_block( \"article\", \"article_here_template\", \"article_here\" );\n $this->IniObject->set_block( \"article\", \"article_item_template\", \"article_item\" );\n $this->IniObject->set_block( \"article\", \"article_image_template\", \"article_image\" );\n $this->IniObject->set_block( \"article\", \"go_to_parent_template\", \"go_to_parent\" );\n $this->IniObject->set_block( \"article\", \"go_to_self_template\", \"go_to_self\" );\n $this->IniObject->set_block( \"article\", \"upload_picture_template\", \"upload_picture\" );\n $this->IniObject->set_block( \"article\", \"picture_uploaded_template\", \"picture_uploaded\" );\n $this->IniObject->set_block( \"article\", \"picture_template\", \"picture\" );\n $this->Item = new eZNewsArticle( $this->Item->id() );\n \n $this->doThis();\n\n $this->IniObject->setAllStrings();\n $this->IniObject->parse( \"article_item\", \"article_item_template\" );\n $this->IniObject->parse( \"article_here\", \"article_here_template\" );\n $outPage = $this->IniObject->parse( \"output\", \"article\" );\n \n return $value;\n }", "function showPage($page_name, $data)\n\t{\n\t\t$instance_name = & get_instance();\n\t\t$instance_name->load->view(\"admin/header\", $data);\n\t\t$instance_name->load->view(\"admin/navbar\", $data);\n\t\t$instance_name->load->view(\"admin/{$page_name}\", $data);\n\t\t$instance_name->load->view(\"admin/footer\", $data);\n\t}", "public function show($id)\n\t{\n\t\t//\n\t\t$data=StoreItem::find($id)->first();\n\t\t\n\t\treturn View::make('Items.show')->with('data',$data)->with('title','Show Item');\n\t\n\t}", "public function show($id)\n {\n return view('pages.show',[\n 'item' => Item::find($id),\n ]);\n }", "public function testimonialsDetail()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'contact');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Testimonials')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/testimonials_detail');\n }", "public function show($id)\n {\n $item = Item::with(['galleries'])->where('id', $id)->firstOrFail();\n\n return view('pages.item.detail',[\n 'item' => $item\n ]);\n }", "public function showItem(Request $req,$item){\n $i = $this->itemRepo->getItemById($item);\n return view('marketItem.showItem', [\n 'item' => $i,\n ]);\n }", "function view()\n\t{\n\t\tglobal $tree, $ilUser, $ilCtrl, $lng;\n\n\t\t$this->showHierarchy();\n\t}", "public function show() {\n if (!isset($_GET['id']))\n return call('pages', 'error');\n\n // we use the given id to get the right post\n $image = Gallery::find($_GET['id']);\n require_once('views/gallery/show.php');\n }", "public function show($id)\n {\n $item = Products::all()->find($id);\n return view('pages.shops_details',['item' => $item]);\n }", "abstract protected function show();", "public function show(PageHeader $pageHeader)\n {\n //\n }", "public function displayContentOverview() {}", "public function show()\n {\n //\n }", "public function show($i)\n {\n \n }", "public function show($id)\n {\n $itemIn = ItemIn::findOrFail($id);\n $DetailItemIns = $itemIn->DetailItemIns;\n\n if (is_null($itemIn)){\n return \"ga ada\";\n }else {\n return view('itemin.show', compact('itemIn','DetailItemIns')); \n }\n \n }", "public function display_item() {\n\n\t\t$id = $this->input->post('id');\n\t\t$event_id = $this->input->post('event_id');\n\n\t\t$result = $this->db->query(\"SELECT id, item_name, item_qty, item_price\n\t\t\t\t\t\t\t\t\t\t FROM events_hpp\n\t\t\t\t\t\t\t\t\t\t WHERE event_id = \" . $event_id . \"\n\t\t\t\t\t\t\t\t\t\t AND master_id = \" . $id);\n\n\t\t$attr = array(\n\t\t\t\t\t\t'count_events_hpp' \t=> $result->num_rows(),\n\t\t\t\t\t\t'events_master'\t=> $this->db->query(\"SELECT id, hpp_category, hpp_subcategory\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM events_master\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE id = \" . $id)->row_array(),\n\t\t\t\t\t\t'event_id'\t\t=> $event_id\n\t\t\t\t\t);\n\n\t\t$this->load->view('analisa/display-item', $attr);\n\n\t}", "public function show() {\n echo $this->mountElement();\n }", "public function index()\n\t{\n parent::show();\n\t\t//\n\t}", "public function hookBookReaderItemShow($args)\n {\n $view = $args['view'];\n $item = isset($args['item']) && !empty($args['item'])\n ? $args['item']\n : $view->item;\n $page = isset($args['page']) ? $args['page'] : '0';\n // Currently, all or none functions are enabled.\n $embed_functions = isset($args['embed_functions'])\n ? $args['embed_functions']\n : get_option('bookreader_embed_functions');\n\n $mode_page = isset($args['mode_page'])\n ? $args['mode_page']\n : get_option('bookreader_mode_page');\n\n // Build url of the page with iframe.\n $url = WEB_ROOT . '/viewer/show/' . $item->id;\n $url .= $embed_functions ? '' : '?ui=embed';\n $url .= '#';\n $url .= empty($page) ? '' : 'page/n' . $page . '/';\n $url .= 'mode/' . $mode_page . 'up';\n\n $class = get_option('bookreader_class');\n if (!empty($class)) {\n $class = ' class=\"' . $class . '\"';\n }\n $width = get_option('bookreader_width');\n if (!empty($width)) {\n $width = ' width=\"' . $width . '\"';\n }\n $height = get_option('bookreader_height');\n if (!empty($height)) {\n $height = ' height=\"' . $height . '\"';\n }\n\n $html = '<div><iframe src=\"' . $url . '\"' . $class . $width . $height . ' frameborder=\"0\"></iframe></div>';\n echo $html;\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}", "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 show()\n\t{\n\t\t\n\t}", "public static function view() \n {\n $articleDAO = new ArticleDAO();\n $articles = $articleDAO->load();\n\n $dispatch = new Dispatch();\n $dispatch->render(\n 'main_page', [\n 'articles' => $articles\n ]\n );\n }", "public function displayPage()\n\t{\n\t\t$this->assign('rightMenu', $this->rightMenu);\n\t\t$this->assign('content', $this->content);\n\t\t$this->display(\"main.tpl\");\n\t}", "public function show(Item $item)\n {\n // dd ($item);\n // return $item;\n //dump($item->name);\n //return view('show_item',['item' => $item]);\n return view('show_item',compact('item'));\n }", "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 }", "public static function view($item_id) { Events::view($item_id); }", "public function show()\n {\n $articles = $this->getArticles();\n $selectedTitle=$_GET['title'];\n\n foreach ($articles as $article)\n if ($selectedTitle== $article->title){\n $articleDescription = $article->description;\n } \n\n require 'View/articles/show.php';\n\n }", "public function show()\n {\n\t\t//$result = $a->selectAll();\n include(\"view/bureau.html\");\n }", "public function show($id)\n {\n \n $item=Item::find($id);\n \n return view('website.showsingle',compact('item'));\n }", "public function show_admin_page() {\n\t\t$this->view->render();\n\t}", "public function show($slug)\n { \n $results = $this->CC->getItem($slug);\n $item = $this->CC->parseItems($results['rows']);\n $params['item'] = (object) $item[0]; \n\n if(!$item[0]->url || !$item[0]->uri){\n $this->CC->setCanonical($item[0]->_qname);\n }\n\n if($item[0]->hasRelatedArticles > 0){\n $related = $this->CC->getAssociationSorted($item[0]->_qname, 'ers:related-association');\n $params['relatedItems'] = $this->CC->parseItems($related['rows']);\n }\n\n $results = $this->CC->getAssociation($item[0]->_qname);\n $items = $this->CC->parseItems($results['rows']);\n $params['items'] = $items;\n\n return view('professional.hermes-examinations')->with($params);\n }", "public function show()\n\t{\n\n\t}", "public function testPageShow()\n {\n $page = Page::inRandomOrder()->first();\n $response = $this->actingAs(User::inRandomOrder()->first(), 'api')->json('GET', '/api/pages/' . $page->slug);\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'data' => [\n \"name\",\n \"id\",\n \"slug\",\n ],\n 'links' => [\n \"self\",\n ],\n 'relationships' => [\n \"body\" => [\n \"links\" => [\n \"self\",\n ],\n \"data\" => [\n \"type\",\n \"content\",\n ],\n ],\n\n ],\n ]);\n }", "public function show()\n {\n /** Configure generic views */\n $this->setupViews();\n /** Render views */\n ?>\n <html>\n <body>\n <?php\n /** Render views */\n $this->head_view->render();\n $this->secondary_nav_bar->render();\n $this->tree_view->render();\n $this->title_view->render();\n $this->primary_nav_bar->render();\n $this->render_page();\n ?>\n </body>\n </html>\n <?php\n }", "static public function showOnParentPageCallback(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\tswitch($r->show_on_parent_page){\r\n\t\t\tcase \"box\": $r->show($params->layout(), \"box\"); break;\r\n\t\t\tcase \"announce\": $r->show($params->layout(), \"announce\"); break;\r\n\t\t\tcase \"content\": $r->show($params->layout(), \"content\"); break;\r\n\t\t}\r\n\t}", "public function hookPublicItemsShow($args) {\n $FILE_DIRECTORY = \"files/original/\";\n \n /*if (!get_option('viewer3d_append_items_show')) {\n //return;\n }*/\n if (!isset($args['view'])) {\n $args['view'] = get_view();\n }\n $directory = \"$FILE_DIRECTORY\".$args['item']['id'];\n $objFile = glob(\"$directory/*.obj\"); // Search for obj.\n \n if (count($objFile) > 0) {\n $mtlFile = glob(\"$directory/*.mtl\");\n if (count($mtlFile) > 0) {\n $objFile = basename($objFile[0]);\n $mtlFile = basename($mtlFile[0]);\n $directory = \"$directory\";\n //$src = \"../../plugins/Viewer3D/Viewer3D.php?absoluteDirectory=$ABSOLUTE_DIRECTORY&path=$directory&obj=\".$objFile.\"&mtl=\".$mtlFile;\n //$src = \"../../plugins/Viewer3D/top.png\";\n //echo \"<iframe width=\\\"100%\\\" height=\\\"400\\\" src=\\\"$src\\\"></iframe>\";\n $viewerArgs = new stdClass();\n $viewerArgs -> directory = $directory;\n $viewerArgs -> obj = $objFile;\n $viewerArgs -> mtl = $mtlFile;\n $viewerArgs -> options = get_option('viewer3d_options');\n if (isset($viewerArgs -> options)) {\n $viewerArgs -> options = json_decode($viewerArgs -> options);\n } else {\n $viewerArgs -> options = $this -> getDefaultOptions();\n }\n $this -> _showViewer($viewerArgs);\n }\n }\n }", "private static function display($data, ItemMasterItem $item) {\n\t\t$itm = self::getItm();\n\t\t$xrefs = self::xrefs();\n\t\t$session = self::pw('session');\n\t\t$config = self::pw('config');\n\n\t\t$html = '';\n\t\t$html .= self::breadCrumbs();\n\t\t// if ($session->getFor('response', 'cxm')) {\n\t\t// \t$html .= $config->twig->render('items/itm/response-alert.twig', ['response' => $session->getFor('response', 'cxm')]);\n\t\t// \t$session->removeFor('response', 'cxm');\n\t\t// }\n\t\t$response = $itm->getResponse(); \n\t\tif ($response && $response->has_success() === false) {\n\t\t\t$html .= $config->twig->render('items/itm/response-alert.twig', ['response' => $itm->getResponse()]);\n\t\t}\n\t\t$html .= self::lockItem($data->itemID);\n\t\t$html .= $config->twig->render('items/itm/itm-links.twig');\n\t\t$html .= $config->twig->render('items/itm/xrefs/page.twig', ['itm' => $itm, 'item' => $item, 'xrefs' => $xrefs]);\n\t\treturn $html;\n\t}", "public function admin() {\n $items = Item::orderBy('id','DESC')->paginate(15);\n return view('dashboard.item.item',compact('items'));\n }", "public function getSingleItemForm()\n\t{\n\t\t// Check if user or visitor\n\t\tif(! Sentry::check())\n\t\t{\n\t\t\t// Return to sign in page\n\t\t\treturn View::make('frontend/auth/signin');\n\t\t}\n\n\t\t// Get the parent category\n\t\t$categories = Category::where('parent_id', \"=\", NULL)->get();\n\t\t// Get the condition array\n\t\t$condition = Config::get('condition');\n\n\t\t// Show the publish item page\n\t\treturn View::make('frontend/item/publish-item', compact('categories','condition'));\n\t}", "public function page () {\n\t\tinclude _APP_ . '/views/pages/' . $this->_reg->controller . '/' . $this->_page . '.phtml';\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_contentcollection_add_list', array('content' => $content));\n }", "public function show()\n {\n require_once BFT_PATH_BASE.DS.'templates'.DS.'html-header.php';\n if ($this->section != 'start' and $this->template != 'infos') require_once BFT_PATH_BASE.DS.'templates'.DS.'box-header.php';\n require_once BFT_PATH_BASE.DS.'templates'.DS.$this->template.'.php';\n if ($this->section != 'start' and $this->template != 'infos') require_once BFT_PATH_BASE.DS.'templates'.DS.'box-footer.php';\n require_once BFT_PATH_BASE.DS.'templates'.DS.'html-footer.php';\n }", "function ShowItem($class, $ParamArr = array())\r\n\t{\r\n\t\tglobal $member_id, $metatags;\r\n\t\t\r\n\t\tif(isset($_GET['id'])&&$_GET['id']!=\"\")\r\n\t\t{\r\n\t\t\t$IId = $_GET['id'];\r\n\t\t\t$Items = $this->GetRecord($class, $IId);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$MesData = \"Неправильный запрос вы будете перенаправлены на главну страницу <br /><a href=\\\"\".$this->GetLinkTag(\"main\").\"\\\">На главную</a>\";\t\r\n\t\t\treturn $this->MakeTemplate($this->templates['message'], array(\"msg\"=>$MesData), \"content\");\r\n\t\t}\r\n\t\t\r\n\t\t$CurItem = $Items[0];\r\n\t\tif(isset($CurItem['id'])&&$CurItem['id']!=\"\")\r\n\t\t{\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$MesData = \"Неправильный запрос вы будете перенаправлены на главну страницу <br /><a href=\\\"\".$this->GetLinkTag(\"main\").\"\\\">На главную</a>\";\t\r\n\t\t\treturn $this->MakeTemplate($this->templates['message'], array(\"msg\"=>$MesData), \"content\");\r\n\t\t}\r\n\t\t$metatags['title'] \t= $CurItem['title'].\" :: \".$this->MyConfig['title']['value'];\r\n\t\tif(isset($CurItem['description']))\r\n\t\t{\r\n\t\t\t$metatags['description'] \t= $CurItem['description'];\r\n\t\t}\t\r\n\t\t$ArrVar = array();\r\n\t\t\r\n\t\t$ArrVar['breadcrumbs'] = $this->GenerateCrumbs($class, $CurItem);\r\n\t\t\r\n\t\t//$ArrVar = $this->ShowComments($CurItem);\r\n\t\tforeach($CurItem as $key=>$value)\r\n\t\t{\r\n\t\t\t$CurItem[$key] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key]);\r\n\t\t\t$CurItem[$key.\"_raw\"] = $value;\r\n\t\t\tif($this->MyClasses[$class]['db'][$key]==\"img\")\r\n\t\t\t{\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb_raw\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb_raw\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_raw\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_raw\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_complete\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_complete\");\r\n\t\t\t}\r\n\t\t\tif($this->MyClasses[$class]['db'][$key]==\"unlimg\")\r\n\t\t\t{\r\n\t\t\t\t$CurItem[\"\".$key.\"_thumb\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_thumb\");\r\n\t\t\t\t$CurItem[\"\".$key.\"_complete\"] = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key].\"_complete\");\r\n\t\t\t}\r\n\t\t\tif($this->MyClasses[$class]['db'][$key]==\"multifield\")\r\n\t\t\t{\r\n\t\t\t\t$ArrFields = $this->GetTrueValue($value, $this->MyClasses[$class]['db'][$key]);\r\n\t\t\t\tforeach($ArrFields as $gre=>$fee)\r\n\t\t\t\t{\r\n\t\t\t\t\t$CurItem[\"\".$gre.\"\"] = $fee;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(isset($this->MyClasses[$class]['commcl'])&&$this->MyClasses[$class]['commcl']!=\"\")\r\n\t\t{\r\n\t\t\tif(isset($CurItem['commpub'])&&$CurItem['commpub']==$this->GetLangVar(\"checkbox_yes\"))\r\n\t\t\t{\r\n\t\t\t\t$CurItem['comments'] = $this->ShowComments($class, $CurItem['id']);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$CurItem['comments'] = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$CurItem['comments'] = \"\";\r\n\t\t}\r\n\t\tif($member_id['user_group']==\"1\")\r\n\t\t{\r\n\t\t\t$CurItem[\"adm_links\"] = \"<a href=\\\"\".$this->GetLink($class, \"edit\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"Edit\").\"</a> | <a href=\\\"\".$this->GetLink($class, \"delete\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"Delete\").\"</a>\";\r\n\t\t\tif(isset($this->ModerSets[''.$class.'']))\r\n\t\t\t{\r\n\t\t\t\t// moderation links go here\r\n\t\t\t\tif($CurItem['published']==\"1\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$CurItem[\"adm_links\"] .= \" | <a href=\\\"\".$this->GetLink($class, \"unpublish\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"unpubl\").\"</a>\"; \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$CurItem[\"adm_links\"] .= \" | <a href=\\\"\".$this->GetLink($class, \"publish\", array(\"id\"=>$IId)).\"\\\">\".$this->GetLangVar(\"publ\").\"</a>\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$CurItem[\"adm_links\"] = \"\";\r\n\t\t}\r\n\t\t$ArrVar = array_merge($ArrVar, $CurItem);\r\n\t\t$PlugDataArr = array();\r\n\t\tforeach($this->Plugins as $key=>$value)\r\n\t\t{\r\n\t\t\t$PlugDataArr = $this->LoadPlugin($key, \"ShowFull\", $ArrVar);\r\n\t\t}\r\n\t\t$ArrVar = array_merge($ArrVar, $PlugDataArr);\r\n\t\t\r\n\t\tif(isset($ParamArr['tpl']))\r\n\t\t{\r\n\t\t\t$TemplateLoad = $ParamArr['tpl'];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$TemplateLoad = $this->MyClasses[$class]['tpl']['full'];\r\n\t\t}\r\n\t\t\t\r\n\t\t//$ArrVar = array_merge($ArrVar, $this->GetAdminLinks($class, \"ShowItem\"));\r\n\t\treturn $this->MakeTemplate($TemplateLoad, $ArrVar, \"content\");\r\n\t}" ]
[ "0.6770058", "0.6717506", "0.6716902", "0.6716902", "0.6634721", "0.6580484", "0.6391374", "0.6342621", "0.6319756", "0.6319161", "0.63163567", "0.6315422", "0.63134056", "0.6297786", "0.6296814", "0.62957454", "0.6286146", "0.6286146", "0.6286146", "0.6281663", "0.627638", "0.62548655", "0.623712", "0.62332", "0.620159", "0.61842275", "0.61796325", "0.6175303", "0.61617804", "0.61532354", "0.6140074", "0.61263585", "0.60988486", "0.60976", "0.6091455", "0.60874397", "0.60733026", "0.60572684", "0.6029682", "0.60070944", "0.60070944", "0.6001875", "0.5992229", "0.5989235", "0.5988686", "0.59806544", "0.59577507", "0.5957023", "0.5951945", "0.5936874", "0.59346545", "0.5917173", "0.59077805", "0.59027165", "0.5899006", "0.5878767", "0.58652127", "0.58643407", "0.586392", "0.5863251", "0.5843483", "0.5838846", "0.58345217", "0.583334", "0.5816793", "0.5816684", "0.58145446", "0.5813284", "0.5812994", "0.58122295", "0.5811011", "0.5794821", "0.57943535", "0.57905847", "0.57898897", "0.57898897", "0.57898897", "0.57847166", "0.57830054", "0.57689494", "0.5767339", "0.5760603", "0.5760486", "0.5758904", "0.5753797", "0.5749023", "0.5749002", "0.5746767", "0.5744618", "0.5743938", "0.57319707", "0.57263285", "0.5723887", "0.5723878", "0.5722032", "0.5719423", "0.5715072", "0.57131755", "0.57099164", "0.57082593", "0.57068354" ]
0.0
-1
Set seo tags from template for items
public function setSeoForItem($page) { $tpl = DB::select()->from('seo')->where('id', '=', 2)->as_object()->execute()->current(); $from = array('{{name}}', '{{group}}', '{{brand}}', '{{model}}'); $to = array($page->name, $page->parent_name, $page->brand_name, $page->model_name); $this->_seo['h1'] = str_replace($from, $to, $tpl->h1); $this->_seo['title'] = str_replace($from, $to, $tpl->title); $this->_seo['keywords'] = str_replace($from, $to, $tpl->keywords); $this->_seo['description'] = str_replace($from, $to, $tpl->description); $this->setBreadcrumbs( 'Каталог', '/catalog' ); $this->generateParentBreadcrumbs( $page->parent_id, 'catalog_tree', 'parent_id', '/catalog/' ); $this->setBreadcrumbs( $page->name ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function do_tags()\n\t{\n\t\tforeach ($this->values as $id => $block)\n\t\t{\n\t\t\tforeach ($block as $name => $replace)\n\t\t\t{\n\t\t\t\t$find = \"{:$name}\";\n\t\t\t\t$this->merged[$id] = str_replace($find, $replace, $this->merged[$id]);\n\t\t\t}\n\t\t}\n\n\t}", "function editTags($item, $_options = false) {\n\t\tglobal $model;\n\n\t\t$_ = '';\n\n\t\t$_ .= '<div class=\"tags i:defaultTags i:collapseHeader item_id:'.$item[\"id\"].'\"'.$this->jsData([\"tags\"]).'>';\n\t\t$_ .= '<h2>Tags ('.($item[\"tags\"] ? count($item[\"tags\"]) : 0).')</h2>';\n\t\t$_ .= $this->tagList($item[\"tags\"]);\n\t\t$_ .= '</div>';\n\n\t\treturn $_;\n\t}", "protected function setSeoTags()\n {\n global $APPLICATION;\n\n if ($this->arParams['SET_SEO_TAGS'] !== 'Y')\n {\n return false;\n }\n\n if ($this->arResult['SEO_TAGS']['TITLE'])\n {\n $APPLICATION->SetPageProperty('title', $this->arResult['SEO_TAGS']['TITLE']);\n }\n\n if ($this->arResult['SEO_TAGS']['DESCRIPTION'])\n {\n $APPLICATION->SetPageProperty('description', $this->arResult['SEO_TAGS']['DESCRIPTION']);\n }\n\n if ($this->arResult['SEO_TAGS']['KEYWORDS'])\n {\n $APPLICATION->SetPageProperty('keywords', $this->arResult['SEO_TAGS']['KEYWORDS']);\n }\n }", "public function action_register_stackitems()\r\n\t{\r\n\t\tStackItem::register( 'multicomplete', Site::get_url( 'vendor' ) . '/multicomplete.js' )->add_dependency( 'jquery.ui' );\r\n\t\t$url = '\"' . URL::get( 'ajax', array( 'context' => 'auto_tags' ) ) . '\"';\r\n\t\t$script = <<< HEADER_JS\r\n$(document).ready(function(){\r\n\t$(\"#tags\").multicomplete({\r\n\t\tsource: $url,\r\n\t\tminLength: 2,\r\n\t\tautoFocus: true,\r\n\t});\r\n});\r\nHEADER_JS;\r\n\t\tStackItem::register( 'tags_auto', $script )->add_dependency( 'multicomplete' );\r\n\t}", "protected function setNewsTags() {\r\n\t\t$newsTags = $this->newsItem->getTags();\r\n\t\tforeach ($newsTags as $tag) {\r\n\t\t\t$this->newsTags[] = $tag->getTitle();\r\n\t\t}\r\n\t}", "protected function setTags()\n {\n $this->authBasedTag();\n $this->nameBasedTag($this->relatedEntities);\n }", "function druplex_field__field_portfolio_tag($variables) {\n\n $output = '<ul class=\"submitted\"><li><i class=\"icon-tags\"></i></li>';\n\n foreach ($variables['items'] as $delta => $item) {\n $output .= '<li>' . drupal_render($item) . '</li>';\n }\n\n $output .= '</ul>';\n \n return $output;\n}", "abstract protected function setTemplate($item);", "public function saveSeoTags(Metable $model, array $values): void;", "function setupPreselectedTags() {\n\t\t$model_class = $this->modelClass;\n\t\t$tag_object = $this->$model_class->Tag;\n\t\t$selected_tags = array();\n\t\tif (isset($this->data['Tag'])) {\n\t\t\t$tags = $this->data['Tag'];\n\t\t\tforeach ($tags as $key => $tag) {\n\t\t\t\t$tag_id = (is_array($tag)) ? $tag['id'] : $tag;\n\t\t\t\t$tag_object->id = $tag_id;\n\t\t\t\tif (is_array($tag) && isset($tag['name'])) {\n\t\t\t\t\t$tag_name = $tag['name'];\n\t\t\t\t} else {\n\t\t\t\t\t$tag_name = $tag_object->field('name');\n\t\t\t\t}\n\t\t\t\t$selected_tags[] = array(\n\t\t\t\t\t'id' => $tag_id,\n\t\t\t\t\t'name' => $tag_name\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t$this->set('selected_tags', $selected_tags);\n\t}", "public function displayMetaTagsFromModel(Metable $model): void;", "private function initHtmlTags($di) {\n\t\t\t$di->set('htmlTags', function(){\n\t\t\t\n\t\t\t\treturn new TagCollection();\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t}", "public function saveSeoTagsFromRequest(Metable $model, Request $request): void;", "function custom_bcn_template_tag($replacements, $type, $id)\n{\n if (in_array('post-products', $type)) {\n $short_title = get_field('short_title', $id);\n $replacements['%short_title%'] = ($short_title) ? $short_title : $replacements['%htitle%'];\n } else {\n $replacements['%short_title%'] = $replacements['%htitle%'];\n }\n return $replacements;\n}", "protected function setTags()\n {\n /*todo check role and flush based on tags*/\n $this->authBasedTag();\n }", "function render_block_core_site_tagline($attributes)\n {\n }", "public function tag()\n\t{\n\t\t$crud = $this->generate_crud('blog_tags');\n\t\t$this->mPageTitle = 'Blog Tags';\n\t\t$this->render_crud();\n\t}", "function otm_render_global_tags() {\n\n\t$tags = get_tags();\n\n\t// If we have tags\n\tif ( $tags ) :\n\n\t\t// Render title\n\t\tprintf( '<h3 class=\"c-section-title\">%s</h3>', __( 'Tags', 'otm' ) );\n\n\t\t// Start a list\n\t\techo '<ul class=\"c-menu c-tag-list\">';\n\n\t\t// Render each tag\n\t\tforeach ( $tags as $tag ) {\n\t\t\techo '<li class=\"c-menu__item c-tag-list__item c-read-more c-content-filter__input js-no-menu-toggle\" data-tag=\"' . $tag->slug . '\">' . $tag->name . '</li>';\n\t\t}\n\tendif;\n}", "public function tags();", "public function processTag()\n {\n $tags = '';\n\n $articles = $this->dao->select('id, keywords')->from(TABLE_ARTICLE)->fetchPairs('id', 'keywords'); \n foreach($articles as $id => $keywords)\n {\n $keywords = seo::unify($keywords, ',');\n $this->dao->update(TABLE_ARTICLE)->set('keywords')->eq($keywords)->where('id')->eq($id)->exec();\n $tags = $keywords;\n }\n\n $products = $this->dao->select('id, keywords')->from(TABLE_PRODUCT)->fetchPairs('id', 'keywords'); \n foreach($products as $id => $keywords)\n {\n $keywords = seo::unify($keywords, ',');\n $this->dao->update(TABLE_PRODUCT)->set('keywords')->eq($keywords)->where('id')->eq($id)->exec();\n $tags .= ',' . $keywords;\n }\n\n $categories = $this->dao->select('id, keywords')->from(TABLE_CATEGORY)->fetchPairs('id', 'keywords'); \n foreach($categories as $id => $keywords)\n {\n $keywords = seo::unify($keywords, ',');\n $this->dao->update(TABLE_CATEGORY)->set('keywords')->eq($keywords)->where('id')->eq($id)->exec();\n $tags .= ',' . $keywords;\n }\n\n $this->loadModel('tag')->save($tags);\n }", "public function setTags($tags) {\n\t\tTemplate::setSiteMetaTags($tags);\n\t}", "function processCustomTags() {\n\t\t$model_class = $this->modelClass;\n\t\tif (! isset($this->data[$model_class]['custom_tags'])) {\n\t\t\treturn;\n\t\t}\n\t\tif (empty($this->data[$model_class]['custom_tags'])) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$custom_tags = $this->data[$model_class]['custom_tags'];\n\t\t$custom_tags = explode(',', $custom_tags);\n\t\tforeach ($custom_tags as $key => $ct) {\n\t\t\t$custom_tags[$key] = strtolower(trim($custom_tags[$key]));\n\t\t}\n\t\t$custom_tags = array_unique($custom_tags);\n\t\t\n\t\t$user_id = $this->Auth->user('id');\n\t\t$tag_object = $this->$model_class->Tag;\n\t\tforeach ($custom_tags as $ct) {\n\t\t\t$tag_id = $tag_object->field('id', array(\n\t\t\t\t'name' => $ct, \n\t\t\t\t'selectable' => 1\n\t\t\t));\n\t\t\t\n\t\t\t// Create the custom tag if it does not already exist\n\t\t\tif (! $tag_id) {\n\t\t\t\t$tag_object->create();\n\t\t\t\t$tag_object->set(array(\n\t\t\t\t\t'name' => $ct,\n\t\t\t\t\t'person_id' => $user_id\n\t\t\t\t));\n\t\t\t\t$tag_object->save();\n\t\t\t\t$tag_id = $tag_object->id;\n\t\t\t}\n\t\t\t\n\t\t\t$this->data['Tag'][] = $tag_id;\n\t\t}\n\t\t$this->data['Tag'] = array_unique($this->data['Tag']);\n\t\t$this->data[$model_class]['custom_tags'] = '';\n\t}", "function sailthru_horizon_meta_tags() {\n\n\t\t// only do this on pages and posts\n\t\tif ( ! is_single() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// filter to disable all output\n\t\tif ( false === apply_filters( 'sailthru_horizon_meta_tags_enable', true ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tglobal $post;\n\n\t\t$post_object = get_post();\n\n\t\t$horizon_tags = array();\n\n\t\t// date\n\t\t$post_date = get_the_date( 'Y-m-d H:i:s' );\n\t\t$horizon_tags['sailthru.date'] = esc_attr( $post_date );\n\n\t\t// title\n\t\t$post_title = get_the_title();\n\t\t$horizon_tags['sailthru.title'] = esc_attr( $post_title );\n\n\t\t// tags in the order of priority\n\t\t// first sailthru tags\n\t\t$post_tags = get_post_meta( $post_object->ID, 'sailthru_meta_tags', true );\n\n\t\t// WordPress tags\n\t\tif ( empty( $post_tags ) ) {\n\t\t\t$post_tags = get_the_tags();\n\t\t\tif ( $post_tags ) {\n\t\t\t\t$post_tags = esc_attr( implode( ', ', wp_list_pluck( $post_tags, 'name' ) ) );\n\t\t\t}\n\t\t}\n\n\t\t// WordPress categories\n\t\tif ( empty( $post_tags ) ) {\n\t\t\t$post_categories = get_the_category( $post_object->ID );\n\t\t\tforeach ( $post_categories as $post_category ) {\n\t\t\t\t$post_tags .= $post_category->name . ', ';\n\t\t\t}\n\t\t\t$post_tags = substr( $post_tags, 0, -2 );\n\t\t}\n\n\t\tif ( ! empty( $post_tags ) ) {\n\t\t\t$horizon_tags['sailthru.tags'] = $post_tags;\n\t\t}\n\n\t\t// author << works on display name. best option?\n\t\t$post_author = get_the_author();\n\t\tif ( ! empty( $post_author ) ) {\n\t\t\t$horizon_tags['sailthru.author'] = $post_author;\n\t\t}\n\n\t\t// description\n\t\t$post_description = get_the_excerpt();\n\t\tif ( empty( $post_description ) ) {\n\t\t\t$excerpt_length = 250;\n\t\t\t// get the entire post and then strip it down to just sentences.\n\t\t\t$text = $post_object->post_content;\n\t\t\t$text = apply_filters( 'the_content', $text );\n\t\t\t$text = str_replace( ']]>', ']]>', $text );\n\t\t\t$text = strip_shortcodes( $text );\n\t\t\t$text = wp_strip_all_tags( $text );\n\t\t\t$text = substr( $text, 0, $excerpt_length );\n\t\t\t$post_description = $this->reverse_strrchr( $text, '.', 1 );\n\t\t}\n\t\t$horizon_tags['sailthru.description'] = esc_html( $post_description );\n\n\t\t// image & thumbnail\n\t\tif ( has_post_thumbnail( $post_object->ID ) ) {\n\t\t\t$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );\n\t\t\t$thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'concierge-thumb' );\n\n\t\t\t$post_image = $image[0];\n\t\t\t$horizon_tags['sailthru.image.full'] = esc_attr( $post_image );\n\t\t\t$post_thumbnail = $thumb[0];\n\t\t\t$horizon_tags['sailthru.image.thumb'] = $post_thumbnail;\n\t\t}\n\n\t\t// expiration date\n\t\t$post_expiration = get_post_meta( $post_object->ID, 'sailthru_post_expiration', true );\n\n\t\tif ( ! empty( $post_expiration ) ) {\n\t\t\t$horizon_tags['sailthru.expire_date'] = esc_attr( $post_expiration );\n\t\t}\n\n\t\t$horizon_tags = apply_filters( 'sailthru_horizon_meta_tags', $horizon_tags, $post_object );\n\n\t\t$tag_output = \"\\n\\n<!-- BEGIN Sailthru Horizon Meta Information -->\\n\";\n\t\tforeach ( (array) $horizon_tags as $tag_name => $tag_content ) {\n\t\t\tif ( empty( $tag_content ) ) {\n\t\t\t\tcontinue; // Don't ever output empty tags\n\t\t\t}\n\t\t\t$meta_tag = sprintf( '<meta name=\"%s\" content=\"%s\" />', esc_attr( $tag_name ), esc_attr( $tag_content ) );\n\t\t\t$tag_output .= apply_filters( 'sailthru_horizon_meta_tags_output', $meta_tag );\n\t\t\t$tag_output .= \"\\n\";\n\t\t}\n\t\t$tag_output .= \"<!-- END Sailthru Horizon Meta Information -->\\n\\n\";\n\n\t\techo esc_html( $tag_output );\n\n\t}", "final public function set($tag, $content) {\n $this->template = str_replace(\"{\".$tag.\"}\", $content, $this->template);\n }", "function edd_incentives_render_template_tags() {\n global $post;\n\n if( $post->post_type == 'incentive' ) {\n ?>\n <div class=\"edd-incentive-template-tags postbox\">\n <h3><span><?php _e( 'Template Tags', 'edd-incentives' ); ?></span></h3>\n <div class=\"inside\">\n <?php\n echo '<h4>' . __( 'Use the following template tags for entering the given data in the modal.', 'edd-incentives' ) . '</h4>';\n\n $template_tags = edd_incentives_get_template_tags();\n foreach( $template_tags as $tag => $description ) {\n echo '<div class=\"edd-incentive-template-tag-block\">';\n echo '<span class=\"edd-incentive-template-tag\">{' . $tag . '}</span>';\n echo '<span class=\"edd-incentive-template-tag-description\">' . $description . '</span>';\n echo '</div>';\n }\n ?>\n <div class=\"edd-incentive-clear\"></div>\n <br />\n <p class=\"edd-incentive-tip description\"><?php printf( __( 'Need more help? <a href=\"%s\">Click here</a> for a more in-depth tutorial on creating Incentives!', 'edd-incentives' ), 'edit.php?post_type=download&page=incentives-tutorial&post=' . $post->ID ); ?></p>\n </div>\n </div>\n <?php\n }\n}", "function register_block_core_site_tagline()\n {\n }", "public function tags()\r\n {\r\n }", "public function do_meta_tags() {\n\t\tglobal $posts;\n\t\t$post = null;\n\t\tif ( ! is_array( $posts ) || ! isset( $posts[0] ) || ! is_a( $posts[0], 'WP_Post' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$post = $posts[0];\n\n\t\t$options = $this->get_saved_options();\n\t\t$site_wide_meta = '';\n\t\tif ( isset( $options['site_wide_meta'] ) ) {\n\t\t\t$site_wide_meta = $options['site_wide_meta'];\n\t\t}\n\n\t\t$cmpvalues = $this->get_enabled_singular_options( $post->post_type );\n\t\t$metatags = array();\n\n\t\t// Add META tags to Singular pages.\n\t\tif ( is_singular() ) {\n\t\t\tif ( ! in_array( '1', $cmpvalues, true ) && ! empty( $options['site_wide_meta'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$mt_seo_title = (string) get_post_meta( $post->ID, 'mt_seo_title', true );\n\t\t\t$mt_seo_description = (string) get_post_meta( $post->ID, 'mt_seo_description', true );\n\t\t\t$mt_seo_keywords = (string) get_post_meta( $post->ID, 'mt_seo_keywords', true );\n\t\t\t$mt_seo_google_news_meta = (string) get_post_meta( $post->ID, 'mt_seo_google_news_meta', true );\n\t\t\t$mt_seo_meta = (string) get_post_meta( $post->ID, 'mt_seo_meta', true );\n\n\t\t\tif ( '' === $mt_seo_title ) {\n\t\t\t\t$mt_seo_title = (string) get_post_meta( $post->ID, '_yoast_wpseo_title', true );\n\t\t\t}\n\n\t\t\tif ( '' === $mt_seo_description ) {\n\t\t\t\t$mt_seo_description = (string) get_post_meta( $post->ID, '_yoast_wpseo_metadesc', true );\n\t\t\t}\n\n\t\t\t/*\n\t\t\tDescription. Order of preference:\n\t\t\t1. The post meta value for 'mt_seo_description'\n\t\t\t2. The post excerpt\n\t\t\t*/\n\t\t\tif ( '1' === $cmpvalues['mt_seo_description'] ) {\n\t\t\t\t$meta_description = '';\n\n\t\t\t\tif ( ! empty( $mt_seo_description ) ) {\n\t\t\t\t\t$meta_description = $mt_seo_description;\n\t\t\t\t} elseif ( is_single() ) {\n\t\t\t\t\t$meta_description = $this->get_the_excerpt( $post );\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Filter the description for a singular post.\n\t\t\t\t *\n\t\t\t\t * @param string Contents of the post description field.\n\t\t\t\t */\n\t\t\t\t$meta_description = apply_filters( 'amt_meta_description', $meta_description );\n\n\t\t\t\tif ( ! empty( $meta_description ) ) {\n\t\t\t\t\t$metatags['description'] = $meta_description;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Custom Meta Tags. This is a fully-rendered META tag, so no need to build it up.\n\t\t\tif ( ! empty( $mt_seo_meta ) && '1' === $cmpvalues['mt_seo_meta'] ) {\n\t\t\t\t// This is a potential difference; no escaping was done on this value in previous versions.\n\t\t\t\t$metatags['custom'] = $mt_seo_meta;\n\t\t\t}\n\n\t\t\t// Google News Meta. From post meta field \"mt-seo-google-news-meta.\n\t\t\tif ( ! empty( $mt_seo_google_news_meta ) && '1' === $cmpvalues['mt_seo_google_news_meta'] ) {\n\t\t\t\t$metatags['news_keywords'] = $mt_seo_google_news_meta;\n\t\t\t}\n\n\t\t\t/*\n\t\t\tTitle is handled using filters\n\t\t\t*/\n\n\t\t\t/*\n\t\t\tKeywords. Created in the following order\n\t\t\t1. The post meta value for 'mt_seo_keywords'\n\t\t\t2. The post's categories and tags.\n\t\t\t*/\n\t\t\tif ( '1' === $cmpvalues['mt_seo_keywords'] ) {\n\t\t\t\tif ( ( self::INCLUDE_KEYWORDS_IN_SINGLE_POSTS && is_single() ) || is_page() ) {\n\t\t\t\t\tif ( ! empty( $mt_seo_keywords ) ) {\n\t\t\t\t\t\t// If there is a custom field, use it.\n\t\t\t\t\t\tif ( is_single() ) {\n\t\t\t\t\t\t\t// For single posts, the %cat% tag is replaced by the post's categories.\n\t\t\t\t\t\t\t$mt_seo_keywords = str_replace( '%cats%', $this->get_post_categories(), $mt_seo_keywords );\n\t\t\t\t\t\t\t// Also, the %tags% tag is replaced by the post's tags.\n\t\t\t\t\t\t\t$mt_seo_keywords = str_replace( '%tags%', $this->get_post_tags(), $mt_seo_keywords );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$metatags['keywords'] = $mt_seo_keywords;\n\t\t\t\t\t} elseif ( is_single() ) {\n\t\t\t\t\t\t// Add categories and tags for keywords.\n\t\t\t\t\t\t$post_keywords = strtolower( $this->get_post_categories() );\n\t\t\t\t\t\t$post_tags = strtolower( $this->get_post_tags() );\n\n\t\t\t\t\t\t$metatags['keywords'] = $post_keywords . ', ' . $post_tags;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ( is_home() ) {\n\t\t\t// Add META tags to Home Page.\n\t\t\t// Get set values.\n\t\t\t$site_description = $options['site_description'];\n\t\t\t$site_keywords = $options['site_keywords'];\n\n\t\t\t/*\n\t\t\tDescription\n\t\t\t*/\n\t\t\tif ( empty( $site_description ) ) {\n\t\t\t\t// If $site_description is empty, then use the blog description from the options.\n\t\t\t\t$metatags['description'] = get_bloginfo( 'description' );\n\t\t\t} else {\n\t\t\t\t// If $site_description has been set, then use it in the description meta-tag.\n\t\t\t\t$metatags['description'] = $site_description;\n\t\t\t}\n\n\t\t\t// Keywords.\n\t\t\tif ( empty( $site_keywords ) ) {\n\t\t\t\t// If $site_keywords is empty, then all the blog's categories are added as keywords.\n\t\t\t\t$metatags['keywords'] = $this->get_site_categories();\n\t\t\t} else {\n\t\t\t\t// If $site_keywords has been set, then these keywords are used.\n\t\t\t\t$metatags['keywords'] = $site_keywords;\n\t\t\t}\n\t\t} elseif ( is_tax() || is_tag() || is_category() ) {\n\t\t\t// taxonomy archive page.\n\t\t\t$term_desc = term_description();\n\t\t\tif ( $term_desc ) {\n\t\t\t\t$metatags['description'] = $term_desc;\n\t\t\t}\n\n\t\t\t// The keyword is the term name.\n\t\t\t$term_name = single_term_title( '', false );\n\t\t\tif ( $term_name ) {\n\t\t\t\t$metatags['keywords'] = $term_name;\n\t\t\t}\n\t\t}\n\n\t\tif ( $site_wide_meta ) {\n\t\t\t$metatags['site_wide'] = $site_wide_meta;\n\t\t}\n\n\t\t/**\n\t\t * Filter the generated meta tags. New filter to allow for easier use by passing an array\n\t\t * instead of a string.\n\t\t *\n\t\t * @param array $metatags Contains metatag key->value pairs.\n\t\t */\n\t\t$metatags = apply_filters( 'amt_metatags_array', $metatags );\n\n\t\tif ( is_array( $metatags ) && ! empty( $metatags ) ) {\n\t\t\t$actual_metatags = $this->create_metatags( $metatags );\n\t\t\t$metatags_as_string = implode( PHP_EOL, $actual_metatags );\n\n\t\t\t/**\n\t\t\t * Filter the generated meta tags. Preserved filter from old code that sends the metatags\n\t\t\t * as a string.\n\t\t\t *\n\t\t\t * @param array $metatags_as_string Contains each derived metatag as a return-separated string.\n\t\t\t */\n\t\t\t$metatags_as_string = apply_filters( 'amt_metatags', $metatags_as_string );\n\n\t\t\tif ( is_string( $metatags_as_string ) ) {\n\t\t\t\techo wp_kses( $metatags_as_string . PHP_EOL, $this->get_kses_valid_tags__metatags() );\n\t\t\t}\n\t\t}\n\t}", "function doTagStuff(){}", "protected function setUp()\n\t{\n\t\tif (isset($this->configurator->tags[$this->tagName]))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Create tag\n\t\t$tag = $this->configurator->tags->add($this->tagName);\n\n\t\t// Create attribute\n\t\t$tag->attributes->add($this->attrName);\n\n\t\t// Create a template that replaces its content with the replacement chat\n\t\t$tag->template\n\t\t\t= '<xsl:value-of select=\"@' . htmlspecialchars($this->attrName) . '\"/>';\n\t}", "protected function setOgTags()\n {\n if ($this->arResult['OG_TAGS']['TITLE'])\n {\n Asset::getInstance()->addString('<meta property=\"og:title\" content=\"'.$this->arResult['OG_TAGS']['TITLE'].'\" />', true);\n }\n\n if ($this->arResult['OG_TAGS']['DESCRIPTION'])\n {\n Asset::getInstance()->addString('<meta property=\"og:description\" content=\"'.$this->arResult['OG_TAGS']['DESCRIPTION'].'\" />', true);\n }\n\n if ($this->arResult['OG_TAGS']['URL'])\n {\n Asset::getInstance()->addString('<meta property=\"og:url\" content=\"'.$this->arResult['OG_TAGS']['URL'].'\" />', true);\n }\n\n if ($this->arResult['OG_TAGS']['IMAGE'])\n {\n Asset::getInstance()->addString('<meta property=\"og:image\" content=\"'.$this->arResult['OG_TAGS']['IMAGE'].'\" />', true);\n }\n }", "protected function tagTemplate($template)\n {\n $tags = $template->getTags();\n $tags[] = 'all_themes';\n\n foreach($tags as $tagName) {\n $tag = $this->getCreateTagModel($tagName);\n $template->save($tag); // save relation\n }\n }", "public function tags()\n {\n // the passed URL path segments in the request.\n\n $tags = $this->request->getParam('pass');\n\n // Use the BookmarksTable to find tagged bookmarks.\n $bookmarks = $this->Bookmarks->find('tagged', [\n 'tags' => $tags\n ]);\n\n // Pass variables into the view template context.\n $this->set([\n 'bookmarks' => $bookmarks,\n 'tags' => $tags\n ]);\n }", "function tagConfig() {\n\n global $SM_siteManager;\n\n // template tag\n // requires NAME tag\n if ($this->attributes['NAME']) {\n $this->templateName = $this->attributes['NAME'];\n }\n else {\n // warning -- type not found, ignore\n $this->debugLog(\"warning: SM tag type INCLUDE had no NAME parameter\");\n return;\n }\n\n // now load that template and stick it in the new area\n $tpt = $SM_siteManager->loadTemplate($this->templateName);\n if (is_object($tpt)) {\n\n // yes! convert it into a template and add it in\n $this->tptPointer = $tpt;\n\n }\n else { \n // if it wasn't an object (ie, the template failed to load)\n // it will be ignored by the template\n $this->debugLog(\"warning: SM tag type INCLUDE, file name ($templateName) failed to load, ignoring\");\n }\n\n }", "public function shop_item()\n {\n $this->el = new XTemplate($this->temp, $this->path);\n\n // for element that have wrapper and comment\n $this->el->assign('WRAPPER', $this->wrapper);\n $this->el->assign('LINK', $this->link);\n\n // scan all variables when using\n foreach ($this->shop_item as $key => $value) {\n\n // customize if need when more vars in html template *\n $this->el->assign('IMG', $value);\n\n // fixed loop\n $this->el->parse('shop_item');\n }\n\n // fixed out results\n echo $this->el->text('shop_item');\n\n }", "function metaTags() {\r\n\t\tif (!defined('IS_UWR1RESULTS_VIEW')) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$season = Uwr1resultsController::season();\r\n\t\t$season = $season.'/'.($season+1); // TODO: make a function for that\r\n\r\n\t\t$keywords = array('Unterwasserrugby', 'UWR', 'Liga', 'Ergebnisse', 'Unterwasser Rugby');\r\n\t\t$tags = array();\r\n\r\n\t\t$view = Uwr1resultsController::WhichView();\r\n\t\tif ('league' == $view) {\r\n\t\t\t$keywords[] = Uwr1resultsModelLeague::instance()->name();\r\n\t\t\t$tags['description'] = 'Ergebnisse der ' . Uwr1resultsModelLeague::instance()->name() . ' im UWR (Saison ' . $season . ') | ' . get_bloginfo('name');\r\n\t\t} else if ('tournament' == $view) {\r\n\t\t\t$keywords[] = Uwr1resultsModelLeague::instance()->name();\r\n\t\t\t$keywords[] = 'Turnier';\r\n\t\t\t$tags['description'] = 'Ergebnisse des UWR Turniers ' . Uwr1resultsModelLeague::instance()->name() . ' | ' . get_bloginfo('name');\r\n\t\t} else if ('index' == $view) {\r\n\t\t\t$keywords[] = 'Bundesliga';\r\n\t\t\t$keywords[] = 'Damenliga';\r\n\t\t\t$keywords[] = 'Landesliga';\r\n\t\t\t$keywords[] = 'Oberliga';\r\n\t\t\t$keywords[] = 'Bezirksliga';\r\n\t\t\t$keywords[] = 'Turniere';\r\n\t\t\t$keywords[] = 'Damen';\r\n\t\t\t$keywords[] = 'Jugend';\r\n\t\t\t$keywords[] = 'Junioren';\r\n\t\t\t$tags['description'] = 'UWR Ergebnisse aus der 1. und 2. Bundesliga, Damenliga, Landesliga, Oberliga und Bezirksliga im ' . get_bloginfo('name') . '.';\r\n\t\t}\r\n\t\t$tags['keywords'] = ((count($keywords) > 0)\r\n\t\t\t? implode(', ', $keywords) . ', '\r\n\t\t\t: '')\r\n\t\t\t. 'UW Rugby, Jugend, Junioren';\r\n\t\tforeach($tags as $name => $content) {\r\n\t\t\tprint '<meta name=\"'.$name.'\" content=\"'.$content.'\" />'.\"\\n\";\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function typoSearchTagsHandlesMultipleMarkerPairs() {}", "function htmltags($args) {\r\n\t\t$args['selections'] = $this->html_tags;\r\n\t\t$args['multiple'] = false;\r\n\t\t$args['width'] = '65';\r\n\t\t$args['tooltip'] = 'Choose the HTML tag to use';\r\n\t\t$this->select($args);\r\n\t}", "function mymodule_tag_iteminfo(&$items)\r\n{\r\n $items_id = array();\r\n foreach (array_keys($items) as $cat_id) {\r\n // Some handling here to build the link upon catid\r\n // If catid is not used, just skip it\r\n foreach (array_keys($items[$cat_id]) as $item_id) {\r\n // In article, the item_id is \"art_id\"\r\n $items_id[] = intval($item_id);\r\n }\r\n }\r\n $item_handler =& xoops_getmodulehandler(\"item\", \"module\");\r\n $items_obj = $item_handler->getObjects(new Criteria(\"itemid\", \"(\" . implode(\", \", $items_id) . \")\", \"IN\"), true);\r\n \r\n foreach (array_keys($items) as $cat_id) {\r\n foreach (array_keys($items[$cat_id]) as $item_id) {\r\n $item_obj =& $items_obj[$item_id];\r\n $items[$cat_id][$item_id] = array(\r\n \"title\" => $item_obj->getVar(\"item_title\"),\r\n \"uid\" => $item_obj->getVar(\"uid\"),\r\n \"link\" => \"view.item.php?itemid={$item_id}\",\r\n \"time\" => $item_obj->getVar(\"item_time\"),\r\n \"tags\" => tag_parse_tag($item_obj->getVar(\"item_tags\", \"n\")), // optional\r\n \"content\" => \"\",\r\n );\r\n }\r\n }\r\n unset($items_obj); \r\n}", "function gtags_make_tags_for_group() {\n\tglobal $bp, $wpdb;\n\t\n\t$group_tags = gtags_get_group_tags();\n\t$items = explode( \",\", $group_tags );\n\t$output = '';\n\tforeach( $items as $item ) {\n\t\t$item = trim( strtolower( $item ) );\n\t\tif ($item=='') continue;\n\t\t$link = $bp->root_domain . '/projets/tag/' . urlencode( $item );\n\t\t$output .= ' <a class=\"etiquette highlight\" href=\"'.$link.'\" title=\"Voir tous les projets ayant pour mots-clés '.$item.'\">#'.$item.'</a> ';\n\t}\n\n\treturn apply_filters( 'gtags_make_tags_for_group', $output, $items );\n}", "function change_tags($str){\r\n\r\n\t\t\t$str=str_replace('#ID#',$this->id,$str);\r\n\t\t\t$str=str_replace('#PAGE#',$this->page,$str);\r\n\t\t\t$str=str_replace('#ITEMS_PER_PAGE#',$this->items_per_page,$str);\r\n\t\t\t$str=str_replace('#TOTAL_ITEMS#',$this->total_items,$str);\r\n\r\n\t\t\treturn $str;\r\n\r\n\t}", "public function autoTag()\n {\n $tags = Tag::string2array($this->tags);\n \n if(isset($this->name) && !empty($this->name)) {\n $tags[] = $this->name;\n }\n \n $tags[] = $this->arena->name;\n $tags[] = $this->ltype->display_name;\n \n $this->tags = Tag::array2string(array_unique($tags));\n }", "protected function getTags(){\n $tags = Tag::all();\n foreach ($tags as $tag){\n $this->tags[$tag->id] = $tag->tag;\n }\n }", "public function getTags()\n {\n $title = \"Tags\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n // Get all the tags from db\n $tags = $this->di->get(\"tagModel\")->getAllTags();\n\n $data = [\n //\"items\" => $book->findAll(),\n \"tags\" => $tags,\n ];\n\n $view->add(\"pages/tags\", $data);\n //$view->add(\"blocks/footer\", $data);\n\n $pageRender->renderPage([\"title\" => $title]);\n }", "public function getTagList();", "public function ogTags()\n {\n include $this->partial_selector( 'head/og' );\n }", "function template_tags ($s_template, $a_values) {\n\tforeach ($a_values as $key=>&$value) $s_template = template_tag ($s_template, $key, $value);\n\treturn $s_template;\n}", "function acitpo_entry_tags() {\n\t$tags = get_the_tag_list('', __('', 'acitpo'));\n\tif ($tags) {\n\t\tprintf('<div class=\"entry-tags\">%s</div>', $tags);\n\t}\n}", "public function savetagsTask()\n\t{\n\t\t// Check if they are logged in\n\t\tif (User::isGuest())\n\t\t{\n\t\t\t$this->_task = 'page';\n\t\t\t$this->pageTask();\n\t\t\treturn;\n\t\t}\n\n\t\t// Incoming\n\t\t$id = Request::getInt('id', 0);\n\t\t$tags = Request::getString('tags', '');\n\t\t$no_html = Request::getInt('no_html', 0);\n\n\t\t// Process tags\n\t\t$rt = new Helpers\\Tags($this->database);\n\t\t$rt->tag_object(User::get('id'), $id, $tags, 1, 0);\n\n\t\tif (!$no_html)\n\t\t{\n\t\t\t// Push through to the resource view\n\t\t\t$this->_task = 'page';\n\t\t\t$this->pageTask();\n\t\t\treturn;\n\t\t}\n\t}", "function set_tags($tags) {\n $this->tags = $tags;\n }", "function calculer_meta_tags(){\n\n include_spip('inc/texte');\n\n\t/* CONFIG */\n\t$config = unserialize($GLOBALS['meta']['seo']);\n\n\tif (isset($GLOBALS['contexte']['id_article'])){\n\t\t$id_objet = $GLOBALS['contexte']['id_article'];\n\t\t$objet = 'article';\n\t} elseif (isset($GLOBALS['contexte']['id_rubrique'])) {\n\t\t$id_objet = $GLOBALS['contexte']['id_rubrique'];\n\t\t$objet = 'rubrique';\n\t} else {\n\t\t$objet = 'sommaire';\n\t}\n\n\t/* META TAGS */\n\n\t// If the meta tags configuration is activate\n\t$meta_tags = array();\n\n\tswitch ($objet) {\n\t\tcase 'sommaire':\n\t\t\t$meta_tags = $config['meta_tags']['tag'];\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$table = table_objet_sql($objet);\n\t\t\t$id_table_objet = id_table_objet($objet);\n\t\t\t$title = couper(sql_getfetsel(\"titre\", $table, \"$id_table_objet = \" . intval($id_objet)), 64);\n\t\t\t$requete = sql_allfetsel(\"descriptif,texte\", $table, \"$id_table_objet = \" . intval($id_objet));\n\t\t\tif ($requete) $description = couper(implode(\" \", $requete[0]), 150, '');\n\t\t\t// Get the value set by default\n\t\t\tforeach ($config['meta_tags']['default'] as $name => $option){\n\t\t\t\tif ($option=='sommaire'){\n\t\t\t\t\t$meta_tags[$name] = $config['meta_tags']['tag'][$name];\n\t\t\t\t} elseif ($option=='page') {\n\t\t\t\t\tif ($name=='title') $meta_tags['title'] = $title;\n\t\t\t\t\tif ($name=='description') $meta_tags['description'] = $description;\n\t\t\t\t} elseif ($option=='page_sommaire') {\n\t\t\t\t\tif ($name=='title') $meta_tags['title'] = $title . (($title!='') ? ' - ' : '') . $config['meta_tags']['tag'][$name];\n\t\t\t\t\tif ($name=='description') $meta_tags['description'] = $description . (($description!='') ? ' - ' : '') . $config['meta_tags']['tag'][$name];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If the meta tags rubrique and articles editing is activate (should overwrite other setting)\n\t\t\tif ($config['meta_tags']['activate_editing']=='yes' && ($objet=='article' || $objet=='rubrique')){\n\t\t\t\t$result = sql_select(\"*\", \"spip_seo\", \"id_objet = \" . intval($id_objet) . \" AND objet = \" . sql_quote($objet));\n\t\t\t\twhile ($r = sql_fetch($result)){\n\t\t\t\t\tif ($r['meta_content']!='')\n\t\t\t\t\t\t$meta_tags[$r['meta_name']] = $r['meta_content'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\treturn $meta_tags;\n}", "function render_block_core_tag_cloud($attributes)\n {\n }", "function template_tag_handler( $id = \"\", $pos = \"\", $dload = \"\", $play = \"\", $list = \"\" ) {\n\t\t\t\n\t\t\t$this->putTag_runCount++;\n\t\t\tif ( $this->theSettings['disable_template_tag'] == \"true\" ) { return; }\n\t\t\t\n\t\t\tif ( !empty($id) && !is_numeric($id) ) {\n\t\t\t\t$this->external_call = true;\n\t\t\t\t$shortcodes_return = do_shortcode( $id );\n\t\t\t\t$this->external_call = false;\n\t\t\t}\n\t\t\techo $shortcodes_return;\n\t\t\treturn;\t\t\t\n\t\t}", "public function generateTags() : array\n {\n return ['company'];\n }", "function eddc_get_email_template_tags() {\n\t$tags = array(\n\t\tarray(\n\t\t\t'tag' => 'download',\n\t\t\t'description' => sprintf( __( 'The name of the purchased %s', 'eddc' ), edd_get_label_singular() ),\n\t\t),\n\t\tarray(\n\t\t\t'tag' => 'amount',\n\t\t\t'description' => sprintf( __( 'The value of the purchased %s', 'eddc' ), edd_get_label_singular() ),\n\t\t),\n\t\tarray(\n\t\t\t'tag' => 'date',\n\t\t\t'description' => __( 'The date of the purchase', 'eddc' ),\n\t\t),\n\t\tarray(\n\t\t\t'tag' => 'rate',\n\t\t\t'description' => __( 'The commission rate of the user', 'eddc' ),\n\t\t),\n\t\tarray(\n\t\t\t'tag' => 'name',\n\t\t\t'description' => __( 'The first name of the user', 'eddc' ),\n\t\t),\n\t\tarray(\n\t\t\t'tag' => 'fullname',\n\t\t\t'description' => __( 'The full name of the user', 'eddc' ),\n\t\t),\n\t\tarray(\n\t\t\t'tag' => 'commission_id',\n\t\t\t'description' => __( 'The ID of the commission record', 'eddc' ),\n\t\t),\n\t\tarray(\n\t\t\t'tag' => 'item_price',\n\t\t\t'description' => __( 'The final price of the item sold', 'eddc' ),\n\t\t),\n\t\tarray(\n\t\t\t'tag' => 'item_tax',\n\t\t\t'description' => __( 'The amount of tax calculated for the item', 'eddc' ),\n\t\t),\n\t);\n\n\treturn apply_filters( 'eddc_email_template_tags', $tags );\n}", "function template_item ($name, $content) {\n $item['name'] = $name;\n $item['content'] = $content;\n\n return $item;\n }", "protected function _setTemplateMeta(){\n $this->template->project_name = $this->config['project']['name'] ;\n $this->template->title = $this->config['view']['title'] ;\n $this->template->keywords = $this->config['view']['keywords'];\n $this->template->description = $this->config['view']['description'];\n }", "private function processTags()\n {\n $dollarNotationPattern = \"~\" . REGEX_DOLLAR_NOTATION . \"~i\";\n $simpleTagPattern = \"~\" . REGEX_SIMPLE_TAG_PATTERN . \"~i\";\n $bodyTagPattern = \"~\" . REGEX_BODY_TAG_PATTERN . \"~is\";\n \n $tags = array();\n preg_match_all($this->REGEX_COMBINED, $this->view, $tags, PREG_SET_ORDER);\n \n foreach($tags as $tag)\n { \n $result = \"\";\n \n $tag = $tag[0];\n \n if (strlen($tag) == 0) continue;\n \n if (preg_match($simpleTagPattern, $tag) || preg_match($bodyTagPattern, $tag))\n {\n $this->handleTag($tag);\n }\n else if (preg_match($dollarNotationPattern, $tag))\n {\n $this->logger->log(Logger::LOG_LEVEL_DEBUG, 'View: processTags', \"Found ExpLang [$tag]\");\n $result = $this->EL_Engine->parse($tag);\n }\n \n if (isset ($result))\n {\n $this->update($tag, $result);\n }\n }\n }", "function tc_tag_list() {\r\n $post_terms = apply_filters( 'tc_tag_meta_list', $this -> _get_terms_of_tax_type( $hierarchical = false ) );\r\n $html = false;\r\n\r\n if ( false != $post_terms) {\r\n foreach( $post_terms as $term_id => $term ) {\r\n $html .= sprintf('<a class=\"%1$s\" href=\"%2$s\" title=\"%3$s\"> %4$s </a>',\r\n apply_filters( 'tc_tag_list_class', 'btn btn-mini btn-tag' ),\r\n get_term_link( $term_id , $term -> taxonomy ),\r\n esc_attr( sprintf( __( \"View all posts in %s\", 'customizr' ), $term -> name ) ),\r\n $term -> name\r\n );\r\n }//end foreach\r\n }//end if\r\n return apply_filters( 'tc_tag_list', $html );\r\n }", "function atwork_semantic_field__field_tags(&$variables) {\n $output = '';\n // Token support for nodes\n if (module_exists('token') == TRUE) {\n global $user;\n\n if (arg(0) == 'node') {\n $nid = arg(1);\n }\n if (isset($nid)) {\n $node = node_load($nid);\n $data = array('node' => $node, 'user' => $user);\n }\n }\n $tag_icon = '<i class=\"icon-tag\"></i> ';\n // Render the label, if it's not hidden.\n if (!$variables['label_hidden']) {\n if (!empty($variables['label_element'])) {\n $output .= $tag_icon . '<' . $variables['label_element'] . ' class=\"' . $variables['label_classes'] . '\"' . $variables['title_attributes'] . '>';\n }\n $output .= $variables['label'] . $variables['label_suffix'] . '&nbsp;';\n if (!empty($variables['label_element'])) {\n $output .= '</' . $variables['label_element'] . '>';\n }\n }\n // Render the items.\n if (!empty($variables['content_element'])) {\n $output .= '<' . $variables['content_element'] . ' class=\"' . $variables['content_classes'] . '\"' . $variables['content_attributes'] . '>';\n }\n foreach ($variables['items'] as $delta => $item) {\n if ($variables['item_element']) {\n $output .= '<' . $variables['item_element'] . ' class=\"' . $variables['item_classes'][$delta] . '\"' . $variables['item_attributes'][$delta] . '>';\n }\n $output .= drupal_render($item);\n if ($variables['item_element']) {\n $output .= '</' . $variables['item_element'] . '>';\n }\n if (!empty($variables['item_separator']) && $delta < (count($variables['items']) - 1)) {\n $output .= $variables['item_separator'];\n }\n }\n if (!empty($variables['content_element'])) {\n $output .= '</' . $variables['content_element'] . '>';\n }\n // Render the top-level DIV.\n if (!empty($variables['field_element'])) {\n $output = '<' . $variables['field_element'] . ' class=\"' . $variables['classes'] . '\"' . $variables['attributes'] . '>' . $output . '</' . $variables['field_element'] . '>';\n }\n // Add a prefix and suffix to the field, if specified\n if (!empty($variables['field_prefix'])) {\n $output = $variables['field_prefix'] . $output;\n }\n if (!empty($variables['field_suffix'])) {\n $output .= $variables['field_suffix'];\n }\n if (isset($nid)) {\n return token_replace($output, $data);\n }\n else {\n return $output;\n }\n}", "function get_tags( $sep = ', ', $before = '', $after = '' ) {\n\t\treturn get_the_term_list($this->id, 'product_tag', $before, $sep, $after);\n\t}", "function craft_tealium_tag() {\r\n global $post;\r\n\r\n // prefix, content, suffix for later\r\n $page_name = array(\"p\" => \"\", \"c\" => \"\", \"s\" => \"\");\r\n \r\n $this->setVariable( \"content_type\", \"navigation\" ); // default\r\n\r\n $this->setVariable( \"page_title\", $this->get_wordpress_title() );\r\n $this->setVariable( \"page_type\", get_bloginfo('name') );\r\n \r\n if( is_search() ) {\r\n $this->setVariable( \"search_keyword\", get_search_query() );\r\n \r\n $page_name['c'] = \"Search Results\";\r\n $page_name['s'] = $this->get_page_number();\r\n }\r\n \r\n if( is_author() ) {\r\n $page_name['p'] = \"Author\";\r\n $page_name['c'] = get_query_var('author_name');\r\n $page_name['s'] = $this->get_page_number();\r\n }\r\n \r\n if( is_date() ) {\r\n $d = get_query_var('day');\r\n $m = get_query_var('monthnum');\r\n $y = get_query_var('year');\r\n \r\n // zero pad if needed\r\n if( strlen($d) > 0 && intval($d) > 0 )\r\n \t$date_string[] = str_pad( $d, 2, \"0\", STR_PAD_LEFT );\r\n \r\n if( strlen($m) > 0 && intval($m) > 0 )\r\n \t$date_string[] = str_pad( $m, 2, \"0\", STR_PAD_LEFT );\r\n \r\n if( strlen($y) > 0 ) $date_string[] = $y;\r\n \r\n $page_name['p'] = \"Date\";\r\n $page_name['c'] = implode(\"/\", $date_string );\r\n $page_name['s'] = $this->get_page_number();\r\n }\r\n \r\n if( is_category() ) {\r\n $page_name['p'] = \"Category\";\r\n $page_name['c'] = single_cat_title( \"\", false );\r\n $page_name['s'] = $this->get_page_number();\r\n }\r\n \r\n if( is_tag() ) {\r\n $page_name['p'] = \"Tags\";\r\n $page_name['c'] = single_tag_title( \"\", false );\r\n $page_name['s'] = $this->get_page_number();\r\n }\r\n \r\n if( is_home() ) {\r\n $page_name['c'] = \"Home\";\r\n $page_name['s'] = $this->get_page_number();\r\n }\r\n \r\n if( is_404() ) {\r\n // copy blog name first\r\n $page_name['c'] = $this->getVariable(\"page_type\");\r\n \r\n // then change that to 404\r\n $this->setVariable( \"page_type\", \"404 Error\" );\r\n }\r\n \r\n // post, page, attachment\r\n if( is_singular() ) {\r\n\r\n $this->setVariable( \"article_cms_id\", $post->ID );\r\n $this->setVariable( \"article_uid\", $post->ID );\r\n $this->setVariable( \"slug\", $post->post_name );\r\n \r\n // headline, short_headline, long_headline - (all, 75, 255)\r\n $this->setVariable( \"headline\", get_the_title() );\r\n $this->setVariable( \"short_headline\",\r\n \tmb_strcut( $this->getVariable(\"headline\"), 0, 75, 'utf-8' )\r\n \t);\r\n $this->setVariable( \"long_headline\",\r\n \tmb_strcut( $this->getVariable(\"headline\"), 0, 255, 'utf-8' )\r\n \t);\r\n\r\n // byline: last, first - else, username\r\n $byline = sprintf(\r\n \"%s, %s\", \r\n get_the_author_meta('user_lastname'),\r\n get_the_author_meta('user_firstname')\r\n );\r\n if( strlen( trim($byline) ) == 1 ) {\r\n $byline = get_the_author_meta('user_login');\r\n }\r\n $this->setVariable( \"byline\", $byline );\r\n \r\n // timestamps\r\n $this->setVariable( \"pub_year\", get_the_date( \"Y\" ) );\r\n $this->setVariable( \"pub_month\", get_the_date( \"m\" ) );\r\n $this->setVariable( \"pub_day\", get_the_date( \"d\" ) );\r\n $this->setVariable( \"pub_weekday\",\tget_the_date( \"l\" ) );\r\n $this->setVariable( \"pub_hour\", get_the_date( \"H\" ) );\r\n $this->setVariable( \"pub_minute\", get_the_date( \"i\" ) );\r\n\r\n if( is_attachment() ) {\r\n $this->setVariable( \"content_type\", \"attachment\" );\r\n $this->setVariable( \"template\", \"attachment\" );\r\n \r\n $page_name['p'] = \"Attachment\";\r\n $page_name['c'] = $this->getVariable(\"headline\");\r\n } elseif( is_single() ) {\r\n $this->setVariable( \"content_type\", \"post\" );\r\n $this->setVariable( \"template\", \"post\" );\r\n \r\n $page_name['c'] = $this->getVariable(\"headline\");\r\n } elseif( is_page() ) {\r\n $this->setVariable( \"content_type\", \"page\" );\r\n $this->setVariable( \"template\", \"page\" );\r\n \r\n $page_name['p'] = \"Page\";\r\n $page_name['c'] = $this->getVariable(\"headline\");\r\n }\r\n \r\n // cats and tags\r\n $cats = $this->terms_as_string( get_the_category() );\r\n $tags = $this->terms_as_string( get_the_tags() );\r\n if( strlen($cats) > 0 ) $this->setVariable( \"categories\", $cats );\r\n if( strlen($tags) > 0 ) $this->setVariable( \"tags\", $tags );\r\n \r\n }\r\n \r\n \r\n /* ensure implode order is maintained */\r\n if( $page_name['p'] == '' ) unset( $page_name['p'] );\r\n if( $page_name['c'] == '' ) unset( $page_name['c'] );\r\n if( $page_name['s'] == '' ) unset( $page_name['s'] );\r\n $this->setVariable( \"page_name\", implode(\" - \", $page_name ) );\r\n \r\n $this->render_tealium_html();\r\n }", "function initialize () {\n $this->set_openingtag(\"<LI[attributes]>\");\n\t$this->set_closingtag(\"</LI>\");\n }", "public function setATagParts() {}", "function initialize () {\n $this->set_openingtag(\"<SPAN[attributes]>\");\n\t $this->set_closingtag(\"</SPAN>\");\n }", "public function tagsAction() {\n /**\n * Find all tags in the database.\n */\n $res = $this->tags->findTags();\n\n /**\n * Prepare the view.\n */\n $this->views->add('comment/tags', [\n 'tags' => $res,\n 'title' => 'i | Producer tags',\n ]);\n $this->views->add('me/page', [\n 'content' => '<br/><p> These tags are used in the discussions, if you are interested in seeing all discussions with a specific tag, you can do so by clicking on any of the tag links.</p>',\n ]);\n }", "protected function _initTag()\n {\n $tagId = (int)$this->getRequest()->getParam('tag_id', false);\n $storeId = (int)$this->getRequest()->getParam('store', false);\n $tag = $this->_objectManager->create(\\Magepow\\ProductTags\\Model\\Tag::class);\n if ($tagId) {\n $tag->load($tagId);\n }\n $coreRegistry = $this->_objectManager->get(\\Magento\\Framework\\Registry::class);\n $coreRegistry->register('tag', $tag);\n $coreRegistry->register('current_tag', $tag);\n $this->_objectManager->get(\\Magento\\Cms\\Model\\Wysiwyg\\Config::class)\n ->setStoreId($storeId);\n return $tag;\n }", "public function tags()\n {\n return array('html');\n }", "function initialize() {\n $this->set_openingtag(\"<STRIKE[attributes]>\");\n $this->set_closingtag(\"</STRIKE>\");\n }", "function setTag($name, $value) {\n if( is_array($name)) {\n foreach( $name as $n => $v) {\n $this -> $n = $v ;\n }\n } else {\n $this -> $name = $value ;\n }\n }", "private function set_tags($v)\n\t{\n\t\tUtil::validateArgCount(func_num_args(), 1);\n\t\tUtil::validateType($v, \"\\\\ArrayObject\");\n\t\tif (is_array($v)) $v = Client::array2ArrayObject($v);\n\t\t$this->m_tags = $v;\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}", "private function set_tags($v)\n\t{\n\t\tUtil::validateArgCount(func_num_args(), 1);\n\t\tUtil::validateType($v, \"\\\\ArrayObject\");\n\t\tif (is_array($v)) $v = Client::array2ArrayObject($v);\n\t\t$this->m_tags = $v;\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}", "public function renderTagView()\n {\n $tag = $this->di->get(\"tag\");\n $data = [\"title\" => \"guestbook\"];\n\n $tags = $tag->getAllTags();\n\n\n $this->di->get(\"view\")->add(\"components/tags\", [\"tags\" => $tags], \"main\");\n\n $this->di->get(\"pageRender\")->renderPage($data);\n }", "function balise_SEO_META_TAGS($p){\n\t$p->code = \"calculer_balise_SEO_META_TAGS()\";\n\treturn $p;\n}", "public function setMetaTags($seo)\n {\n $this->pageTitle = $seo->title;\n $this->keywords = $seo->keywords;\n $this->description = $seo->description;\n }", "public function registerMarkupTags() {\n return [\n 'filters' => [\n 'formatMoney' => ['Elearning\\System\\Classes\\Helper', 'formatMoney'],\n 'formatHtml' => ['Elearning\\System\\Classes\\Helper', 'formatHtml'],\n 'generateRating' => ['Elearning\\System\\Classes\\Helper', 'generateRating'],\n 'formatDate' => ['Elearning\\System\\Classes\\Helper', 'formatDate'],\n 'formatProvince' => ['Elearning\\System\\Classes\\Helper', 'formatProvince'],\n 'formatDistrict' => ['Elearning\\System\\Classes\\Helper', 'formatDistrict'],\n 'formatDateForm' => ['Elearning\\System\\Classes\\Helper', 'formatDateForm'],\n 'checkStudentCourse' => ['Elearning\\System\\Classes\\Helper', 'checkStudentCourse'] \n ]\n ];\n }", "public function available_items_template()\n {\n }", "function set_items() { \n\n\t\t$this->items = $this->get_items();\n\n\t}", "function start_el(&$output, $item, $depth=0, $args=array(), $id = 0) {\n $object = $item->object;\n $type = $item->type;\n $title = $item->title;\n $description = $item->description;\n $permalink = $item->url;\n \n $output .=\"<li class='\" . implode(\" \", $item->classes) . \"'>\";\n // loop\n \n \n // vars\n $fa_style = \"fas\";\n $icon = get_field('icon', $item);\n $cat_filter = get_field('cat_filter', $item);\n $output .= '<a href=\"' . $permalink . '\"';\n $output .= 'data-filter=\".' . $cat_filter . '\">';\n $output .= '<i class=\"'.$fa_style . ' '.$icon.'\"></i>';\n $output .= $title;\n $output .= '</a>';\n \n }", "function smarty_postfilter_process_tags ($source, Smarty_Internal_Template $template)\n{\n\t$extra = array (\n\t\t'include' => array(),\n\t\t'addon' => array(),\n\t\t'module' => array(),\n\t);\n\t$addSection = false;\n\tforeach ($template->used_tags as $tag) {\n\t\tif (!in_array($tag[0], array('addon','include','module','listing'))) {\n\t\t\t//not addon or include tag\n\t\t\tcontinue;\n\t\t}\n\t\t\t\n\t\t$vars = array();\n\t\tforeach ($tag[1] as $var) {\n\t\t\tforeach ($var as $name => $val) {\n\t\t\t\t$vars[$name] = trim($val,\"'\\\"\");\n\t\t\t}\n\t\t}\n\t\tif ($tag[0]=='include') {\n\t\t\t//go through includes as well\n\t\t\t$info = array();\n\t\t\t\n\t\t\t$info['file'] = $vars['file'];\n\t\t\t\n\t\t\tif (isset($vars['g_type'])) {\n\t\t\t\t$info['g_type'] = $vars['g_type'];\n\t\t\t}\n\t\t\tif (isset($vars['g_resource'])) {\n\t\t\t\t$info['g_resource'] = $vars['g_resource'];\n\t\t\t}\n\t\t\t//make key such that if same include is used multiple times, it is still\n\t\t\t//only added to the array once\n\t\t\t$extra['include'][implode(':',$info)] = $info;\n\t\t\tunset ($info);\n\t\t} else if ($tag[0]=='module') {\n\t\t\tif (isset($vars['tag']) && $vars['tag']) {\n\t\t\t\t$extra['module'][$vars['tag']] = $vars['tag'];\n\t\t\t}\n\t\t} else if ($tag[0] == 'addon' || $tag[0]=='listing') {\n\t\t\tif (!isset($vars['addon']) || !isset($vars['tag']) || $vars['addon']=='core') {\n\t\t\t\t//failsafe, required info missing, or this is a core tag\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//Note: Do NOT check to see if addon is enabled and has the tag\n\t\t\t//able to be used at this point, or template would need to be re-compiled\n\t\t\t//every time addon is enabled/disabled\n\t\t\t\n\t\t\t$info = array();\n\t\t\t\n\t\t\t$info['addon'] = $vars['addon'];\n\t\t\t$info['tag'] = $vars['tag'];\n\t\t\t\n\t\t\t//make key such that if the same addon tag is used multiple times, it is\n\t\t\t//still only added to the array once\n\t\t\t$extra['addon'][implode(':',$info)] = $info;\n\t\t\tunset($info);\n\t\t}\n\t\t$addSection = true;\n\t}\n\t$template->mustCompile();\n\tif ($addSection) {\n\t\t//there is stuff to process\n\t\t\n\t\t$section = '<?php $_smarty_tpl->used_tags = '.var_export($extra,1).'; ?>';\n\t\t\n\t\t$source = str_replace('/*/%%SmartyHeaderCode%%*/?>','/*/%%SmartyHeaderCode%%*/?>'.$section,$source);\n\t}\n\treturn $source;\n}", "function magimpact_entry_tags()\n\t{\n\t\t$tag_list = get_the_tag_list('', __(', ', 'twentythirteen'));\n\t\tif ($tag_list) {\n\t\t\techo '<span class=\"tags-links\">' . $tag_list . '</span>';\n\t\t}\n\n\t}", "function show_tags()\n{\n global $xoopsModule, $xoopsSecurity;\n\n MWFunctions::include_required_files();\n\n RMTemplate::get()->assign('xoops_pagetitle', __('Tags Management', 'mywords'));\n\n // More used tags\n $db = XoopsDatabaseFactory::getDatabaseConnection();\n $sql = 'SELECT * FROM ' . $db->prefix('mod_mywords_tags') . ' ORDER BY posts DESC LIMIT 0,30';\n $result = $db->query($sql);\n $mtags = [];\n $size = 0;\n while (false !== ($row = $db->fetchArray($result))) {\n $mtags[$row['tag']] = $row;\n $size = $row['posts'] > $size ? $row['posts'] : $size;\n }\n\n ksort($mtags);\n\n // All tags\n list($num) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('mod_mywords_tags')));\n $page = rmc_server_var($_GET, 'page', 1);\n $limit = isset($limit) && $limit > 0 ? $limit : 15;\n\n $tpages = ceil($num / $limit);\n $page = $page > $tpages ? $tpages : $page;\n\n $start = $num <= 0 ? 0 : ($page - 1) * $limit;\n\n $nav = new RMPageNav($num, $limit, $page, 5);\n $nav->target_url('tags.php?page={PAGE_NUM}');\n\n $sql = 'SELECT * FROM ' . $db->prefix('mod_mywords_tags') . \" ORDER BY id_tag DESC LIMIT $start,$limit\";\n\n $result = $db->query($sql);\n $tags = [];\n while (false !== ($row = $db->fetchArray($result))) {\n $tags[] = $row;\n }\n\n RMBreadCrumb::get()->add_crumb(__('Tags management', 'mywords'));\n\n xoops_cp_header();\n RMTemplate::get()->add_script(RMCURL . '/include/js/jquery.checkboxes.js');\n RMTemplate::get()->add_script('..//include/js/scripts.php?file=tags-list.js');\n RMTemplate::get()->add_style('jquery.css', 'rmcommon');\n include RMTemplate::get()->get_template('admin/mywords-tags.php', 'module', 'mywords');\n\n xoops_cp_footer();\n}", "public function setTags($t)\n\t{\n\t\tif (is_array($t)) {\n\t\t\t$this->tags = $t;\n\t\t}\n\t}", "public function toTags($prefix='') {\n foreach($this as $field => $data) {\n if(! is_object($data) && ! is_array($data)) {\n $this->registry->getObject('template')->getPage()->addTag($prefix.$field, $data);\n }\n }\n }", "public function addTagToPostInTheMiddle() {}", "public function registerMarkupTags()\n {\n // Check the translate plugin is installed\n if (class_exists('RainLab\\Translate\\Behaviors\\TranslatableModel')) {\n return ['filters' => [\n 'cast_to_array' => [$this, 'castToArray']\n ]];\n }\n\n return [\n 'filters' => [\n '_' => ['Lang', 'get'],\n '__' => ['Lang', 'choice'],\n 'cast_to_array' => [$this, 'castToArray']\n ]\n ];\n }", "public function tags()\n {\n $title = 'Tags';\n $tags = \\App\\Tag::get();\n return view('admin.modules.tags.list',['title' => $title, 'tags' => $tags]);\n }", "public function add_items_from_template() {\n global $CFG, $DB;\n\n $fs = get_file_storage();\n\n $this->templatename = $this->get_utemplate_name();\n $templatecontent = $this->get_utemplate_content();\n\n $simplexml = new \\SimpleXMLElement($templatecontent);\n // echo '<h2>Items saved in the file ('.count($simplexml->item).')</h2>';\n\n if (!$sortindexoffset = $DB->get_field('surveypro_item', 'MAX(sortindex)', ['surveyproid' => $this->surveypro->id])) {\n $sortindexoffset = 0;\n }\n\n $naturalsortindex = 0;\n foreach ($simplexml->children() as $xmlitem) {\n\n // Read the attributes of the item node:\n // The xmlitem looks like: <item type=\"field\" plugin=\"character\" version=\"2015123000\">.\n foreach ($xmlitem->attributes() as $attribute => $value) {\n if ($attribute == 'type') {\n $currenttype = (string)$value;\n }\n if ($attribute == 'plugin') {\n $currentplugin = (string)$value;\n }\n }\n\n // Take care to details.\n // Load the item class in order to call its methods to validate $record before saving it.\n $item = surveypro_get_item($this->cm, $this->surveypro, 0, $currenttype, $currentplugin);\n\n foreach ($xmlitem->children() as $xmltable) { // Tables are: surveypro_item and surveypro(field|format)_<<plugin>>.\n $tablename = $xmltable->getName();\n if ($tablename == 'surveypro_item') {\n $currenttablestructure = $this->get_table_structure();\n } else {\n $currenttablestructure = $this->get_table_structure($currenttype, $currentplugin);\n }\n\n $record = new \\stdClass();\n\n // Add to $record mandatory fields that will be overwritten, hopefully, with the content of the usertemplate.\n $record->surveyproid = (int)$this->surveypro->id;\n $record->type = $currenttype;\n $record->plugin = $currentplugin;\n if ($tablename == 'surveypro_item') {\n $item->item_add_mandatory_base_fields($record);\n } else {\n $item->item_add_mandatory_plugin_fields($record);\n }\n\n foreach ($xmltable->children() as $xmlfield) {\n $fieldname = $xmlfield->getName();\n\n // Tag <parent> always belong to surveypro_item table.\n if ($fieldname == 'parent') {\n // echo '<h5>Count of attributes of the field '.$fieldname.': '.count($xmlfield->children()).'</h5>';\n foreach ($xmlfield->children() as $xmlparentattribute) {\n $fieldname = $xmlparentattribute->getName();\n $fieldexists = in_array($fieldname, $currenttablestructure);\n if ($fieldexists) {\n $record->{$fieldname} = (string)$xmlparentattribute;\n }\n }\n continue;\n }\n\n // Tag <embedded> always belong to surveypro(field|format)_<<plugin>> table\n // so: ($fieldname == 'embedded') only when surveypro_item has already been saved...\n // so: $itemid is known.\n if ($fieldname == 'embedded') {\n // echo '<h5>Count of attributes of the field '.$fieldname.': '.count($xmlfield->children()).'</h5>';\n foreach ($xmlfield->children() as $xmlfileattribute) {\n $fileattributename = $xmlfileattribute->getName();\n if ($fileattributename == 'filename') {\n $filename = $xmlfileattribute;\n }\n if ($fileattributename == 'filecontent') {\n $filecontent = base64_decode($xmlfileattribute);\n }\n }\n\n // echo 'I need to add: \"'.$filename.'\" to the filearea<br />';\n\n // Add the file described by $filename and $filecontent to filearea,\n // alias, add pictures found in the utemplate to filearea.\n $filerecord = new \\stdClass();\n $filerecord->contextid = $this->context->id;\n $filerecord->component = 'mod_surveypro';\n $filerecord->filearea = SURVEYPRO_ITEMCONTENTFILEAREA;\n $filerecord->itemid = $itemid;\n $filerecord->filepath = '/';\n $filerecord->filename = $filename;\n $fileinfo = $fs->create_file_from_string($filerecord, $filecontent);\n continue;\n }\n\n // The method xml_validation checks only the formal schema validity.\n // It does not know whether the xml is old and holds no longer needed fields\n // or does not hold fields that are now mandatory.\n // Because of this, I can not SIMPLY add $fieldname to $record but I need to make some more investigation.\n // I neglect no longer used fields, here.\n // I will add mandatory (but missing because the usertemplate may be old) fields,\n // before saving in the frame of the $item->item_force_coherence.\n $fieldexists = in_array($fieldname, $currenttablestructure);\n if ($fieldexists) {\n $record->{$fieldname} = (string)$xmlfield;\n }\n }\n\n unset($record->id);\n\n if ($tablename == 'surveypro_item') {\n $naturalsortindex++;\n $record->sortindex = $naturalsortindex + $sortindexoffset;\n if (!empty($record->parentid)) {\n $whereparams = array();\n $whereparams['surveyproid'] = $this->surveypro->id;\n $whereparams['sortindex'] = $record->parentid + $sortindexoffset;\n $record->parentid = $DB->get_field('surveypro_item', 'id', $whereparams, MUST_EXIST);\n }\n\n $itemid = $DB->insert_record($tablename, $record);\n } else {\n // Take care to details.\n $item->item_force_coherence($record);\n $item->item_validate_variablename($record, $itemid);\n $record->itemid = $itemid;\n\n $DB->insert_record($tablename, $record, false);\n }\n }\n }\n }", "protected function make() {\n\n\t\tif ( ! is_null( $this->tag ) && isset( self::$aliases[ $this->tag ] ) ) {\n\t\t\t$this->set( 'key', self::$aliases[ $this->tag ] );\n\t\t}\n\n\t\t// Set Template\n\t\tif ( false !== $this->attributes['label'] ) {\n\t\t\t$template = 'shortcodes/metadata-label.php';\n\t\t} else {\n\t\t\t$template = 'shortcodes/metadata.php';\n\t\t}\n\n\t\t$this->template = new Template( $template );\n\t}", "public function Get_Tag() {\n // Populate the curly tags\n $tag = array(\n 'code' => $this->tag,\n 'category' => $this->category,\n 'hint' => $this->hint,\n 'name' => $this->name,\n 'method' => array($this,'_Render'),\n );\n // Return the tag\n return $tag;\n }", "public function quicktags()\n\t{\n\t\t/* Output */\n\t\t\\IPS\\Output::i()->title\t\t= \\IPS\\Member::loggedIn()->language()->addToStack( 'quick_tags' );\n\t\t\\IPS\\Output::i()->output \t= \\IPS\\Theme::i()->getTemplate( 'forms' )->quicktagsList();\n\t}", "public function getTags() {}", "function spyropress_generate_teaser_two( $spyropress_item, $spyropress_atts ){\n $spyropress_icons = array( 'icon' );\n if( isset( $spyropress_item['spyropress_icon'] ) ){\n $spyropress_icons[] = $spyropress_item['spyropress_icon'];\n }\n if( isset( $spyropress_item['spyropress_icon_color'] ) ){\n $spyropress_icons[] = $spyropress_item['spyropress_icon_color'];\n }\n if( isset( $spyropress_item['spyropress_icon_size'] ) ){\n $spyropress_icons[] = $spyropress_item['spyropress_icon_size'];\n }\n if( isset( $spyropress_item['spyropress_icon_pos'] ) ){\n $spyropress_icons[] = $spyropress_item['spyropress_icon_pos'];\n }\n $spyropress_title = isset($spyropress_item['spyropress_title']) ? $spyropress_item['spyropress_title'] : '';\n $spyropress_content = isset($spyropress_item['spyropress_content']) ? $spyropress_item['spyropress_content'] : '';\n \n if (!empty('spyropress_title') || !empty('spyropress_content')) :\n return \n '<li>\n <span class=\"'. esc_attr( spyropress_clean_cssclass( $spyropress_icons ) ) .'\"></span>\n <h5>'. esc_html( $spyropress_title ) .'</h5>\n <p>'. esc_html( $spyropress_content ) .'</p>\n </li>';\n endif;\n //Retrun Html\n \n }", "protected function _content_template()\n {\n ?>\n <div>\n <ul class=\"elementor-portfolio__filters cat-filter-for-{{ settings.post_id }}\">\n <li class=\"elementor-portfolio__filter elementor-active\">{{{ settings.all_text }}}</li>\n <li class=\"elementor-portfolio__filter\">{{{ settings.taxonomy }}} 1</li>\n <li class=\"elementor-portfolio__filter\">{{{ settings.taxonomy }}} 2</li>\n </ul>\n </div>\n<?php\n }", "public function setTags($newVal) {\n $this->tags = $newVal;\n }", "function process_tags() {\n\t\t$this->tags = apply_filters( 'wp_import_tags', $this->tags );\n\n\t\tif ( empty( $this->tags ) )\n\t\t\treturn;\n\n\t\tforeach ( $this->tags as $tag ) {\n\t\t\t// if the tag already exists leave it alone\n\t\t\t$term_id = term_exists( $tag['tag_slug'], 'post_tag' );\n\t\t\tif ( $term_id ) {\n\t\t\t\tif ( is_array($term_id) ) $term_id = $term_id['term_id'];\n\t\t\t\tif ( isset($tag['term_id']) )\n\t\t\t\t\t$this->processed_terms[intval($tag['term_id'])] = (int) $term_id;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$tag_desc = isset( $tag['tag_description'] ) ? $tag['tag_description'] : '';\n\t\t\t$tagarr = array( 'slug' => $tag['tag_slug'], 'description' => $tag_desc );\n\n\t\t\t$id = wp_insert_term( $tag['tag_name'], 'post_tag', $tagarr );\n\t\t\tif ( ! is_wp_error( $id ) ) {\n\t\t\t\tif ( isset($tag['term_id']) )\n\t\t\t\t\t$this->processed_terms[intval($tag['term_id'])] = $id['term_id'];\n\t\t\t} else {\n\t\t\t\tprintf( 'Failed to import post tag %s', esc_html($tag['tag_name']) );\n\t\t\t\tif ( defined('IMPORT_DEBUG') && IMPORT_DEBUG )\n\t\t\t\t\techo ': ' . $id->get_error_message();\n\t\t\t\techo '<br />';\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tunset( $this->tags );\n\t}", "public function Admin_Action_ShowDynamicContentTag() {\n \t$user = GetUser();\n $GLOBALS ['ContentArea'] = $_GET ['ContentArea'];\n $GLOBALS ['EditorName'] = 'myDeveditControl';\n if (isset ( $_GET ['EditorName'] )) {\n $GLOBALS ['EditorName'] = $_GET ['EditorName'];\n }\n\n // Query the tags\n $tmpTags = array ();\n $query = \"SELECT * FROM [|PREFIX|]dynamic_content_tags dct \";\n if (!$user->isAdmin()) {\n \t$query .= \" WHERE dct.ownerid = '{$user->Get('userid')}' \";\n }\n\n\n $result = $this->db->Query ( $query );\n while ( $row = $this->db->Fetch ( $result ) ) {\n $tmpTags [] = array ($row ['tagid'], $row ['name'], $row ['createdate'] );\n }\n\n if (sizeof ( $tmpTags )) {\n $this->template_system->ParseTemplate ( 'DynamicContentTags_List_Start' );\n $this->template_system->ParseTemplate ( 'DynamicContentTags_List_List_Start' );\n foreach ( $tmpTags as $tagEntry ) {\n $this->template_system->assign ( 'tagId', $tagEntry [0] );\n $this->template_system->assign ( 'tagName', (strlen($tagEntry [1]) >= 120)?substr($tagEntry [1], 0, 120).'...':$tagEntry [1] );\n $this->template_system->ParseTemplate ( 'DynamicContentTags_List_Tag' );\n }\n $this->template_system->ParseTemplate ( 'DynamicContentTags_List_List_End' );\n } else {\n\n FlashMessage(GetLang('Addon_dynamiccontenttags_NoTags'), SS_FLASH_MSG_SUCCESS);\n $flash_messages = GetFlashMessages ();\n $this->template_system->Assign ( 'FlashMessages', $flash_messages, false );\n $this->template_system->Assign ( 'ShowInfo', 'display:none;' );\n $this->template_system->Assign ( 'CloseButton', '<input type=\"button\" style=\"width: 50px;float:right;margin:0 10px; 0 0;\" class=\"FormButton\" value=\"'.GetLang('Close').'\" onclick=\"linkWin.close(); return false;\"/>' );\n $this->template_system->ParseTemplate ( 'DynamicContentTags_List_Start' );\n }\n $this->template_system->ParseTemplate ( 'DynamicContentTags_List_End' );\n }", "public function render_content() {\n\t\t$v = $this->value();\n\t\t$values = json_decode( $v );\n\t\twp_enqueue_script( 'json2' );\n\t\twp_enqueue_media();\n\n\t\t// Mode\n\t\t$mode = isset( $values->mode ) ? $values->mode : 'text';\n\t\t$label = $this->show_label && ! empty( $this->label );\n\n\t\t// Site Link\n\t\t$link = isset( $values->link ) ? $values->link : '';\n\t\t?>\n\n\t\t<?php if ( $label ) : ?>\n\t\t\t<span class=\"customize-control-title themify-control-title themify-suba-toggle\"><?php echo esc_html( $this->label ); ?></span>\n\t\t<?php endif; ?>\n\t\t\t\t<?php if ($label) : ?> \n\t\t\t\t\t<ul class=\"themify-control-sub-accordeon\">\n\t\t\t\t\t\t<li> \n\t\t\t\t<?php endif;?>\n\t\t\t\t\t<!-- Tagline Mode Selector -->\n\t\t\t\t\t<div class=\"themify-customizer-brick mode-switcher tagline-modes\">\n\t\t\t\t\t\t\t<label><input type=\"radio\" value=\"text\" class=\"tagline-mode\" name=\"tagline_mode\" <?php checked( $mode, 'text' ); ?> /><?php _e( 'Text', 'themify' ); ?></label>\n\t\t\t\t\t\t\t<label><input type=\"radio\" value=\"image\" class=\"tagline-mode\" name=\"tagline_mode\" <?php checked( $mode, 'image' ); ?>/><?php _e( 'Image', 'themify' ); ?></label>\n\t\t\t\t\t\t\t<label><input type=\"radio\" value=\"none\" class=\"tagline-mode\" name=\"tagline_mode\" <?php checked( $mode, 'none' ); ?>/><?php _e( 'None', 'themify' ); ?></label>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Tagline Text Mode -->\n\t\t\t\t\t<div class=\"tagline-mode-wrap tagline-text-mode\">\n\t\t\t\t\t\t\t<label><?php _e( 'Tagline', 'themify' ); ?><input type=\"text\" class=\"site-description\" value=\"<?php echo esc_attr( get_bloginfo('description') ); ?>\"/></label>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"tagline-mode-wrap tagline-text-mode\">\n\t\t\t\t\t\t\t<?php $this->render_fonts( $values ); ?>\n\t\t\t\t\t\t\t<div class=\"themify-customizer-brick\">\n\t\t\t\t\t\t\t\t\t<?php $this->render_color( $values, array( 'transparent' => false, 'side_label' => true ) ); ?>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Tagline Image Mode -->\n\t\t\t\t\t<div class=\"tagline-mode-wrap tagline-image-mode\">\n\t\t\t\t\t\t\t<div class=\"themify-customizer-brick\">\n\t\t\t\t\t\t\t\t\t<?php $this->render_image( $values, array( 'show_size_fields' => true ) ); ?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"themify-tagline-link tagline-mode-wrap tagline-text-mode tagline-image-mode\">\n\t\t\t\t\t\t<p><label><?php _e( 'Tagline Link', 'themify' ); ?><input type=\"text\" class=\"site-description-link\" value=\"<?php echo esc_url( $link ); ?>\"/></label></p>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<input <?php $this->link(); ?> value='<?php echo esc_attr( $v ); ?>' type=\"hidden\" class=\"<?php echo esc_attr( $this->type ); ?>_control themify-customizer-value-field\"/>\n\t\t\t\t<?php if ($label) : ?>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t<?php endif;?>\n\t\t<?php\n\t}", "public function buildMetaTags()\n\t{\n\t\t/* Set basic ones */\n\t\t$this->metaTags['og:site_name'] = \\IPS\\Settings::i()->board_name;\n\t\t$this->metaTags['og:locale'] = preg_replace( \"/^([a-zA-Z0-9\\-_]+?)(?:\\..*?)$/\", \"$1\", \\IPS\\Member::loggedIn()->language()->short );\n\t\t\n\t\t/* Add the site name to the title */\n\t\tif( \\IPS\\Settings::i()->board_name )\n\t\t{\n\t\t\t$this->title .= ' - ' . \\IPS\\Settings::i()->board_name;\n\t\t}\n\t\t\n\t\t/* Add Admin-specified ones */\n\t\tif( !$this->metaTagsUrl )\n\t\t{\n\t\t\t$protocol = ( \\IPS\\Request::i()->isSecure() ) ? \"https://\" : \"http://\";\n\t\t\t$this->metaTagsUrl\t= \\IPS\\Http\\Url::external( $protocol . parse_url( \\IPS\\Settings::i()->base_url, PHP_URL_HOST ) . $_SERVER['REQUEST_URI'] );\n\t\t\t$this->metaTagsUrl\t= urldecode( mb_substr( (string) $this->metaTagsUrl, mb_strlen( \\IPS\\Settings::i()->base_url ) ) );\n\t\n\t\t\tif ( isset( \\IPS\\Data\\Store::i()->metaTags ) )\n\t\t\t{\n\t\t\t\t$rows = \\IPS\\Data\\Store::i()->metaTags;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$rows = iterator_to_array( \\IPS\\Db::i()->select( '*', 'core_seo_meta' ) );\n\t\t\t\t\\IPS\\Data\\Store::i()->metaTags = $rows;\n\t\t\t}\n\t\t\t\n\t\t\tif( is_array( $rows ) )\n\t\t\t{\n\t\t\t\tforeach ( $rows as $row )\n\t\t\t\t{\n\t\t\t\t\tif( \\strpos( $row['meta_url'], '*' ) !== FALSE )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( preg_match( \"#^\" . str_replace( '*', '(.+?)', trim( $row['meta_url'], '/' ) ) . \"$#i\", trim( $this->metaTagsUrl, '/' ) ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_tags\t= json_decode( $row['meta_tags'], TRUE );\n\t\t\n\t\t\t\t\t\t\tif( is_array( $_tags ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach( $_tags as $_tagName => $_tagContent )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif( !isset( $this->metaTags[ $_tagName ] ) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$this->metaTags[ $_tagName ]\t= $_tagContent;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t/* Are we setting page title? */\n\t\t\t\t\t\t\tif( $row['meta_title'] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->title\t\t\t= $row['meta_title'];\n\t\t\t\t\t\t\t\t$this->metaTagsTitle\t= $row['meta_title'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif( trim( $row['meta_url'], '/' ) == trim( $this->metaTagsUrl, '/' ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_tags\t= json_decode( $row['meta_tags'], TRUE );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( is_array( $_tags ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach( $_tags as $_tagName => $_tagContent )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->metaTags[ $_tagName ]\t= $_tagContent;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Are we setting page title? */\n\t\t\t\t\t\t\tif( $row['meta_title'] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->title\t\t\t= $row['meta_title'];\n\t\t\t\t\t\t\t\t$this->metaTagsTitle\t= $row['meta_title'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function convert_tag( &$obj )\n\t{\n\t\t// set default photo\n\t\t$obj->default_photo = $this->get_default_photo( $obj->id, 'tag' );\n\n\t\t// set default icon \n\t\t$obj->default_icon = $this->get_default_photo( $obj->id, 'tag-icon' );\n\n\t}" ]
[ "0.63040787", "0.61946654", "0.61777127", "0.5997532", "0.5960643", "0.59487075", "0.5889107", "0.5859916", "0.57587415", "0.57409716", "0.56129956", "0.55561256", "0.55524826", "0.55466986", "0.55391574", "0.5537851", "0.5536989", "0.55143684", "0.55099845", "0.54984707", "0.548899", "0.54470384", "0.5438478", "0.54203725", "0.5401845", "0.53975415", "0.53962153", "0.5354042", "0.53401613", "0.5336469", "0.53321415", "0.5328839", "0.5317188", "0.53080493", "0.5306482", "0.5282221", "0.52582806", "0.5241402", "0.5239579", "0.5235893", "0.5231948", "0.52246225", "0.52075607", "0.52030426", "0.517818", "0.5168892", "0.5158891", "0.5144538", "0.5123604", "0.5094986", "0.50928384", "0.50883675", "0.50798386", "0.5051813", "0.50459", "0.50457513", "0.50434566", "0.5043343", "0.50348765", "0.5010316", "0.5004246", "0.50030655", "0.5000731", "0.4993794", "0.49935585", "0.49929145", "0.49871576", "0.49856383", "0.49851125", "0.49837595", "0.49727494", "0.49727494", "0.49717653", "0.4968075", "0.496162", "0.49552286", "0.495388", "0.4953513", "0.49514797", "0.4948834", "0.49461102", "0.4937563", "0.4933668", "0.49286276", "0.49267024", "0.49228856", "0.49197763", "0.491601", "0.49152255", "0.49134398", "0.49097243", "0.49049434", "0.489658", "0.48942187", "0.4894023", "0.48779902", "0.48766842", "0.48735434", "0.48699486", "0.48654985" ]
0.5937885
6
Get query source of dataTable.
public function query(Automobile $model) { return $model->newQuery()->with('category')->with('company'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchDataTableSource()\n { \n $dataTableConfig = [\n 'searchable' => [\n 'title' \n ]\n ];\n\n return SpecificationPreset::with([\n 'presetItem' => function($query) {\n $query->with('specification');\n }\n ])->dataTables($dataTableConfig)->toArray();\n }", "public function getSourceTable() {\n $this->resolve();\n return $this->sources[0]->getTable();\n }", "private function tableDataTable()\r\n\t{\r\n\t\t$source = $this->getSource();\r\n\r\n\t\t//$table = new TableExample\\DataTable();\r\n\t\t$table = new Model\\DataInsTable();\r\n\t\t$table->setAdapter($this->getDbAdapter())\r\n\t\t->setSource($source)\r\n\t\t->setParamAdapter(new AdapterDataTables($this->getRequest()->getPost()))\r\n\t\t;\r\n\t\treturn $table;\r\n\t}", "public function getDataSource()\n\t{\n\t\treturn $this->dataSource;\n\t}", "public function getDataSource() {\n\t\treturn $this->dataSource;\n\t}", "function getDataSource() { return $this->_datasource; }", "public function getDatasource()\n {\n return static::resolveDatasource($this->datasource);\n }", "function getDataSource() {return $this->_datasource;}", "public function getDatasource()\n {\n return $this->datasource;\n }", "public function getDatasource()\n {\n return $this->datasource;\n }", "public function getDataSource()\n {\n /** @var Model $modelClass */\n $modelClass = get_class($this);\n $parentModelName = get_parent_class($modelClass);\n\n if ($parentModelName == Model_Defined::getClass() || $parentModelName == Model_Factory::getClass()) {\n return Data_Source::getInstance(Object::getName($parentModelName) . ':model/' . $modelClass);\n }\n\n return Data_Source::getInstance($modelClass::getDataSourceKey());\n }", "public function getFrom() {\n\t\tif (!is_object($this->obj) && class_exists($this->obj) && \\System\\Library\\StdLib::is_interface_of($this->obj, \"\\Library\\Database\\LinqObject\")) {\n\t\t\t$o = $this->obj;\n\t\t\treturn \"`\".$o::getTable(true).\"`\";\n\t\t} else {\n\t\t\treturn \"(\".$this->obj->getSQL().\") AS \".$this->name;\n\t\t}\n\t}", "public function getDataSource()\n {\n return isset($this->DataSource) ? $this->DataSource : null;\n }", "public function getDataSourceDefinition()\n {\n return $this->data_source_definition;\n }", "public static function getDataSource()\n {\n return static::$_dataSource;\n }", "public function getSourceData();", "protected function dataSource()\n {\n $range = $this->sibling(\"PaymentDateRange\")->value();\n\n //Apply to query\n return AutoMaker::table(\"payments\")\n ->join(\"customers\",\"customers.customerNumber\",\"=\",\"payments.customerNumber\")\n ->whereBetween(\"paymentDate\",$range)\n ->select(\"customerName\",\"paymentDate\",\"checkNumber\",\"amount\");\n }", "protected function SourceDepartments() {\n\treturn $this->DepartmentTable()->SQO_Source('d');\n\t//return new fcSQL_TableSource($this->DepartmentTable()->Name(),'d');\n }", "public function getSourceData() {\n $plugin_id = $this->getActiveSource();\n $instance = $this->createInstance($plugin_id, []);\n return $instance->getData();\n }", "function readDataSource() {return $this->_datasource;}", "public function datasource() {\n if (!isset($this->datasource)) {\n $this->datasource = search_api_get_datasource_controller($this->item_type);\n }\n return $this->datasource;\n }", "public function getQueryDataProvider() {}", "private function getQuery()\n {\n return $this->connection->table($this->table);\n }", "protected function getQuery()\n {\n return $this->connection->table(\n $this->config['table']\n );\n }", "public function getDatasourceName()\n {\n return $this->datasource;\n }", "public function getTableSourceType()\n {\n return $this->table_source_type;\n }", "protected function getQuery()\n {\n return $this->connection->table($this->table);\n }", "public function getSource()\n\t{\n\t\treturn $this->source;\n\t}", "public static function getSourceTableOfContent() {\n\t\treturn self::$_sourceTableOfContent;\n\t}", "public function getSource()\r\n {\r\n return $this->source;\r\n }", "public function getSource();", "public function getSource();", "public function getSource();", "public function getSource();", "public function getSource();", "public function getSource()\n {\n return $this->_source;\n }", "public function getForDataTable()\n {\n return $this->query()\n ->select([\n config('module.locations.table').'.id',\n config('module.locations.table').'.country',\n config('module.locations.table').'.city',\n config('module.locations.table').'.created_at',\n config('module.locations.table').'.updated_at',\n ])->whereNull('user_id');\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getQuery()\r\n {\r\n return $this->db->table(self::TABLE);\r\n }", "abstract public function getSource();", "public function getSource() {\n return $this->source;\n }", "public function getSource() {\n return $this->source;\n }", "public function getSource() {\n return $this->source;\n }", "public function getSource()\n {\n return $this->data['fields']['source'];\n }", "public function getQuery()\n {\n return $this->db->table(self::TABLE);\n }", "public function getSource()\n {\n return 'data_diksar';\n }", "function getCmdbSource() {\n\treturn cmdbSource::getDB();\n}", "public function getSource()\n {\n return $this->source;\n }", "public function getSource() {\n return $this->source;\n }", "public function getSource() {\n return $this->source;\n }", "public function getSource()\n {\n return 'tabela_precos_has_produtoarea';\n }", "public function getSource(){\n\t\treturn $this->_source;\n\t}", "public function source()\n\t{\n\t\treturn $this->_source;\n\t}", "public function source()\n\t{\n\t\treturn $this->source;\n\t}", "public function getBigquerySource()\n {\n return $this->readOneof(5);\n }", "public final function getDataSet(): QueryDataSet {\n\t\t$dataset = new QueryDataSet($this->getConnection());\n\t\t$dataset->addTable(\"role\");\n\t\t$dataset->addTable(\"profile\");\n\t\t$dataset->addTable(\"posting\");\n\t\t$dataset->addTable(\"savedJob\");\n\t\treturn $dataset;\n\t}", "public function getSource()\n {\n return $this->identity ? $this->identity->getSource() : $this->source;\n }", "public static function get_query()\n\t{\n\t\treturn self::new_instance_records()->get_query();\n\t}", "public function getSource()\n {\n return 'shiiresaki_tanka_dts';\n }", "public function getSource()\n {\n return 'uriage_dts';\n }", "function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->Source;\n }", "public function getSource(){\n return $this->source();\n }", "public function getDataSourceView();", "public function Source(){\n return $this->connection;\n }", "public function source($source)\n {\n $this->query = $source;\n }", "public function getForDataTable()\n {\n\n $q = $this->query();\n if (request('module') == 'task') {\n $q->where('section', '=', 2);\n } else {\n $q->where('section', '=', 1);\n }\n return\n $q->get();\n }", "public function getSource()\n {\n }", "public function source()\n {\n return $this->source;\n }", "private function get_datatable_query()\n {\n if (permission('supplier-bulk-delete')){\n $this->column_order = [null,'id','name', 'address','mobile', 'email', 'city', 'country','status', null, null];\n }else{\n $this->column_order = ['id','name', 'address','mobile', 'email', 'city', 'country','status', null, null];\n }\n \n $query = self::toBase();\n\n //search query\n if (!empty($this->_name)) {\n $query->where('name', 'like', '%' . $this->_name . '%');\n }\n if (!empty($this->_mobile)) {\n $query->where('mobile', 'like', '%' . $this->_mobile . '%');\n }\n if (!empty($this->_email)) {\n $query->where('email', 'like', '%' . $this->_email . '%');\n }\n if (!empty($this->_status)) {\n $query->where('status', $this->_status);\n }\n\n //order by data fetching code\n if (isset($this->orderValue) && isset($this->dirValue)) { //orderValue is the index number of table header and dirValue is asc or desc\n $query->orderBy($this->column_order[$this->orderValue], $this->dirValue); //fetch data order by matching column\n } else if (isset($this->order)) {\n $query->orderBy(key($this->order), $this->order[key($this->order)]);\n }\n return $query;\n }", "public function getDataSourceHandler()\n {\n return $this->DataSourceInstance->getDataSourceHandler();\n }", "public function data() {\n\t\treturn $this->query;\n\t}", "public function getSource() {}", "public function getSource() {}", "public function get_source()\n {\n }", "public function getObjectDataTable()\n\t{\n\t\treturn $this->table_obj_data;\n\t}", "public function get_source() {\n\t\treturn $this->source;\n\t}", "function getSrcTableName() {\n return $this->srcTableName;\n }", "function datatable()\n {\n return $this->table($this->table);\n }", "public function getDataSourceType();", "static function custom_get_sql() {\n # this is the default functionality\n $table = static::get_tablename();\n return \"select * from $table\";\n }", "public function source() {\n return $this->source;\n }", "public static function baseQuery() {\n $sql = 'SELECT*FROM '.static::getTable();\n return $sql;\n }", "public function getSource() : ISource;", "private function getAllSourcesFromDB() {\n return $this->database->table(\"source\")->fetchAll();\n }", "public function getTargetTable()\n {\n return $this->provider->targetTable;\n }", "protected function getActiveDatasource()\n {\n return $this->datasources[$this->activeDatasourceKey];\n }", "public function dataSource($value) {\n return $this->setProperty('dataSource', $value);\n }", "public function dataSource($value) {\n return $this->setProperty('dataSource', $value);\n }" ]
[ "0.6895125", "0.6753405", "0.6509491", "0.64851296", "0.6465343", "0.64154166", "0.63834846", "0.6268942", "0.6261598", "0.6261598", "0.6227419", "0.6218134", "0.62151456", "0.61885744", "0.6168129", "0.6070435", "0.60309273", "0.60120887", "0.59311485", "0.5923787", "0.5901831", "0.58833104", "0.58629775", "0.5847676", "0.5820423", "0.5814423", "0.5761016", "0.57528543", "0.5744489", "0.57254255", "0.57136613", "0.57136613", "0.57136613", "0.57136613", "0.57136613", "0.56947064", "0.56895214", "0.56864", "0.56864", "0.56864", "0.56864", "0.56864", "0.56864", "0.56864", "0.56864", "0.56864", "0.56864", "0.56864", "0.56864", "0.56864", "0.56555", "0.56539464", "0.5647877", "0.5647877", "0.5647877", "0.5643869", "0.56295276", "0.5624637", "0.5624268", "0.56210655", "0.56156737", "0.56156737", "0.5614461", "0.56082594", "0.55954224", "0.5593298", "0.5586918", "0.55855995", "0.5583622", "0.55821687", "0.5572809", "0.55725145", "0.5571506", "0.5568237", "0.55657285", "0.5564538", "0.5559226", "0.5540687", "0.55316174", "0.5524922", "0.55237246", "0.5518017", "0.5511074", "0.5503848", "0.5496827", "0.5496827", "0.54925", "0.54865795", "0.5478658", "0.5474943", "0.5471213", "0.54610366", "0.54385364", "0.54352885", "0.5423599", "0.540908", "0.5408197", "0.5405982", "0.5405508", "0.5404731", "0.5404731" ]
0.0
-1
Optional method if you want to use html builder.
public function html() { return $this->builder() ->setTableId('automobile-table') ->columns($this->getColumns()) ->minifiedAjax() ->dom('frtip') ->orderBy(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function html() {}", "public function html();", "protected function generateHtml()\n\t{\n\t}", "abstract public function generateHtml();", "public function renderHTML()\n {\n }", "public abstract function asHTML();", "public static function html() {\n\n\t\treturn new BF_HTML_Generator;\n\t}", "public function toHTML()\n {\n }", "public abstract function html(): string;", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction([\n 'width' => '12%',\n 'printable' => false,\n 'exportable' => false,\n 'searchable' => false\n ])\n ->paging(true)\n ->lengthMenu([[50, 100,500, -1], [50, 100,500, 'All']])\n ->scrollX(true)\n ->parameters($this->getBuilderParameters());\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '80px'])\n ->parameters($this->getBuilderParameters());\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '80px'])\n ->parameters($this->getBuilderParameters());\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->ajax('')\n ->addAction(['width' => '80px'])\n ->parameters($this->getBuilderParameters());\n }", "public function html() {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '80px'])\n ->parameters($this->getBuilderParameters());\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->ajax('')\n ->addAction(['width' => '150px'])\n ->parameters($this->getBuilderParameters());\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->ajax('')\n ->addAction(['width' => '80px'])\n ->parameters($this->getBuilderParameters());\n }", "function html()\n {\n }", "function html()\n {\n }", "function html()\n {\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '120px'])\n ->parameters($this->getBuilderParameters());\n }", "public function html(): string;", "public function toHTML();", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->ajax('')\n ->parameters($this->getBuilderParameters());\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->ajax('')\n ->parameters($this->getBuilderParameters());\n }", "public function setHtml();", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->colReorderRealtime(true)\n ->minifiedAjax()\n ->addAction(['width' => '80px'])\n ->parameters($this->getBuilderParameters());\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '80px'])\n ->parameters([$this->getBuilderParameters(),\n 'buttons' => [\n 'reload',\n ]\n ]);\n }", "protected function _toHtml()\n{\n// use arguments like $this->getMyParam1() , $this->getAnotherParam()\n \nreturn $html;\n}", "function __toString () {\n return $this->compile_html ();\n }", "private static function html()\n {\n $files = ['Html', 'Form'];\n $folder = static::$root.'Html'.'/';\n\n self::call($files, $folder);\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->postAjax()\n ->parameters($this->getBuilderParameters());\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->postAjax()\n ->parameters($this->getBuilderParameters());\n }", "abstract public function getHtml();", "public function toHtml();", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->parameters([\n 'dom' => 'Bfrtip',\n 'buttons' => ['export', 'excel', 'pdf', 'print', 'reset', 'reload'],\n 'language' => ['url' => 'http://cdn.datatables.net/plug-ins/1.10.19/i18n/Russian.json'],\n ])\n ->minifiedAjax()\n// ->addAction(['width' => '80px'])\n ->parameters($this->getBuilderParameters());\n }", "public function getHtml();", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->ajax('')\n ->addAction(['width' => 'auto']);\n }", "public function html()\n {\n return $this->builder()->columns($this->getColumns())->ajax('')->parameters($this->getBuilderParameters());\n }", "public function html()\n {\n return $this->builder()->columns($this->getColumns())->ajax('')->parameters($this->getBuilderParameters());\n }", "protected function registerHtmlBuilder()\n {\n $this->app->singleton('html', function ($app) {\n return new HtmlComponent($app['url'], $app['view']);\n });\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumnsTable())\n ->minifiedAjax()\n ->addAction(['width' => '80px','printable' => false, 'exportable' => false,'title'=>'Acciones'])\n ->parameters($this->getBuilderParameters());\n }", "protected function registerHtmlBuilder()\n {\n $this->app->singleton('html', function ($app) {\n return new HtmlBuilder($app['url'], $app['view']);\n });\n }", "public function html(): Builder\n {\n /** @var Builder $table */\n $table = app('datatables.html');\n\n return $table\n ->columns($this->getColumns())\n ->ajax($this->getAjaxOptions())\n ->parameters($this->getParameters());\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '100px'])\n ->parameters([\n 'lengthMenu' => ['15', '25', '50'],\n 'order' => [[0, 'desc']],\n ]);\n }", "public abstract function get_html();", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->ajax('')\n ->addAction(['width' => '130px']);\n }", "public function getCompiledHtml();", "public function generate()\n {\n # Build teh Header\n $this->buildHeader();\n\n # Switch the Views\n switch ($this->view) {\n case 'day':\n $this->buildBodyDay();\n break;\n case 'week':\n $this->buildBodyWeek();\n break;\n default:\n $this->buildBody();\n break;\n }\n # return thr string\n return $this->html;\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n // ->addAction(['width' => '80px'])\n //->parameters($this->getBuilderParameters());\n ->parameters([\n 'dom' => 'Blfrtip',\n 'lengthMenu'=> [[10, 25, 50, 100,-1], [10, 25, 50, 100, 'All Rercords']],\n 'buttons' => [\n ['extend' =>'print','className' =>'btn btn-primary','text'=>'print Page'],\n \n ['extend' =>'csv','className' =>'btn btn-info','text'=>'CSV Page'],\n ['extend' =>'excel','className' =>'btn btn-info','text'=>'Excel Page'],\n ['extend' =>'reload','className' =>'btn btn-info','text'=>'Reload Page'],\n ['text' => '<i class=\"fa fa-plus\"></i> Add User','className' =>'btn btn-info'],\n ]\n ]);\n }", "public function asHtml()\n {\n return $this->asStatic();\n }", "public function render() {\n\n echo $this->html;\n\n }", "public function getHTML(): string;", "public function html(): Builder\n {\n return $this->builder()\n ->setTableId('floorsDatatable')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->orderBy(1)\n ->lengthMenu([[5, 10, 25, 50, -1], [5, 10, 25, 50, 'All']]);\n\n }", "public function html()\n {\n return $this->builder()\n ->setTableId('employees-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n // ->dom('Blfrtip')\n ->lengthMenu([5, 10, 25, 50, 100])\n ->orderBy(0)\n ->buttons(\n Button::make('csv')->text(__('app.csv')),\n Button::make('excel')->text(__('app.excel')),\n Button::make('copy')->text(__('app.copy')),\n Button::make('pdf')->text(__('app.pdf')),\n Button::make('print')->text(__('app.print')),\n );\n }", "function get_html()\n\t{\n\n\t// incrase views\n\n\t}", "public function buildHTML()\n {\n $view = $this->container;\n $attr = [];\n if (is_array($this->container)) {\n if (isset($this->container[0])) {\n list($view, $attr) = $this->container;\n } else {\n $view = 'webarq::manager.cms.form.element';\n $attr = $this->container;\n }\n }\n\n if ('hidden' === $this->type) {\n return $this->buildInput();\n }\n\n return view($view, [\n 'title' => $this->getTitle(),\n 'input' => $this->buildInput(),\n 'attribute' => Arr::merge((array)$attr, ['class' => 'form-group'], 'join'),\n 'info' => $this->info,\n 'type' => $this->type\n ] + get_object_vars($this))->render();\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->addAction()\n ->minifiedAjax()\n ->dom('lBfr<\"table-responsive\"t>ip')\n ->orderBy(0)\n ->buttons(\n ['csv','excel', 'print', 'reset']\n );\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 __construct()\n\t{\n\t\t$this->html = new HtmlBuilder;\n\t}", "public function html()\n {\n return Mailblade\\View::make($this->view)\n ->with($this->data)\n ->render();\n }", "protected abstract function generateHtmlBody() : string;", "public function __toString()\n {\n return $this->HtmlBuilder();\n }", "public function createHTML () {\r\n\t\t\r\n\t\t//Declare STD Object $res\r\n\t\t$res = $this->blogstate->blogStatement();\r\n\r\n\t\t$blogPost = \"\";\r\n\r\n\t\t//Adding news items contained in $res variable.\r\n\t\tforeach($res AS $key => $val) {\r\n\t\t\t$catLink = \"\";\r\n\t\t\t$categoryAnchors = explode(\",\",($val->category));\r\n\t\t\t\r\n\t\t\tforeach($categoryAnchors as $catVal) {\r\n\t\t\t\t$catLink .= \"<a href='\". $this->db->getQueryString(array('genre' => $catVal)) .\"'>$catVal</a> &nbsp;\";\r\n\t\t\t}\r\n\r\n\t\t\t//Calling the function handleString to handle the $val-data variable with the chosen filters.\r\n \t\t\t$blogPost .= \"\r\n \t\t\t\t<div class='one-blog-post'>\r\n \t\t\t\t\t<h2><a href='newsitem.php?slug=\". $val->slug .\"'>{$val->title}</a></h2>\r\n \t\t\t\t\t<p>{$this->handleString($val->DATA, $val->slug, $val->FILTER)}</p>\r\n\r\n \t\t\t\t\t<div class='container-fluid'>\r\n \t\t\t\t\t\t<p class='pull-right'>Kategori: \". $catLink .\" &nbsp; Publicerad: {$val->published}</p>\r\n \t\t\t\t\t</div>\r\n \t\t\t\t</div>\";\r\n\t\t}\r\n\r\n\t\t//Adding HTML markup to $out.\r\n\t\t$out = \"\r\n\t\t\t\t<div class='container-fluid text-center show-all-movies'>\r\n\t\t\t\t\tNyheter\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<div class='blog-posts'> \t\r\n\t\t\t\t\t{$blogPost}\r\n\t\t\t\t</div>\r\n\t\t\";\r\n\t\treturn $out;\r\n\t}", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n// ->addAction(['width' => '160px'])\n// ->minifiedAjax('', null, request()->only(['from', 'to', 'team', 'user', 'category', 'status']))\n ->parameters([\n 'dom' => 'Blfrtip',\n 'responsive' => true,\n 'autoWidth' => false,\n 'paging' => true,\n \"pagingType\" => \"full_numbers\",\n 'searching' => true,\n 'info' => true,\n 'searchDelay' => 350,\n \"serverSide\" => true,\n 'order' => [[1, 'asc']],\n 'buttons' => ['excel','csv', 'print', 'reset', 'reload'],\n 'pageLength' => 10,\n 'lengthMenu' => [[10, 20, 25, 50, 100, 500, -1], [10, 20, 25, 50, 100, 500, 'All']],\n ]);\n }", "protected function showBeginHTML(): self {\n echo <<<HTML\n<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>{$this->getTitle()}</title>\n <meta name=\"keywords\" content=\"{$this->getKeywords()}\">\n <meta name=\"description\" content=\"{$this->getDescription()}\">\n <meta name=\"author\" content=\"Dmitri Serõn\">\n <link rel=\"stylesheet\" href=\"/assets/css/styles.css\">\n</head>\n<body>\nHTML;\n\n return $this;\n }", "public function html(): YajraBuilder\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '80px'])\n ->parameters([\n 'dom' => 'frtip',\n 'order' => [[0, 'desc']],\n ]);\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction()\n ->dom('lBfr<\"table-responsive\"t>ip')\n ->orderBy(0,'DESC')\n ->buttons(\n ['csv', 'excel', 'print', 'reset']\n );\n }", "public function getHTML();", "public function buildHTML() {\n\n\t\t// Load the header\n\t\tinclude 'templates/header.php';\n\n\t\t// Load the content\n\t\t$this->contentHTML();\n\n\t\t// Load the footer\n\t\tinclude 'templates/footer.php';\n\n\t}", "abstract function get_html();", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->parameters([\n 'dom' => 'Blfrtip',\n\n 'lengthMenu' => [\n [10, 25, 50], [9, 25, 50, 'All Data'],\n ],\n 'buttons' => [\n ['text' => '<i class=\"fa fa-plus\"></i>' . 'إضافة مكاتبة جديدة', 'className' => 'btn btn-success btn-margin',\n \"action\" => \"function() {\n window.location.href = '\" . \\URL::current() . \"/create'\n }\",\n ],\n [ 'text' => '<i class=\"fa fa-plus\"></i>' . 'إضافة مكاتبة ذكية جديدة', 'className' => 'btn btn-success btn-margin',\n \"action\" => \"function() {\n window.location.href = '\" . \\URL::current() . \"/smart'\n }\",],\n ['extend' => 'reload', 'className' => 'btn-margin btn btn-default', 'text' => '<i class=\"fa fa-refresh\"></i>'],\n ], // for search form\n\n\n 'language' => self::lang(),\n\n \"order\"=> [[ 0, \"desc\" ]],\n\n ]);\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n //->dom('Bfrtip')\n ->orderBy(0,'ASC');\n // ->buttons(\n // Button::make('export'),\n // Button::make('print')\n // );\n }", "public function html()\n {\n $random_quote = $this->randomQuote();\n $cp_path = CP_ROUTE;\n return $this->view('widget', compact('random_quote','cp_path'))->render();\n }", "protected function registerHtmlBuilder()\n {\n $this->app->bindShared('html', function($app)\n {\n return new HtmlBuilder($app['url']);\n });\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->dom('lBfr<\"table-responsive\"t>ip')\n ->orderBy(0,'DESC')\n ->buttons(\n ['csv', 'excel', 'print', 'reset']\n );\n }", "public function getHtmlTemplate() {}", "public function outerHtml()\n {\n }", "function add_html () {\n //Adds a html block\n return '<div class=\"black\">Lorem ipsum dolor</div>';\n }", "protected function setHtmlContent() {}", "public function render() {\n echo $this->getHtml();\n }", "public function buildHTML() {\n $vars = array('page' => &$this);\n\n // Trigger various page hooks.\n // Page init.\n $this->env->hook('page_preload', $vars);\n\n // This is an AJAX request. Skip loading index.html and just provide requested content.\n if (isset($_REQUEST['ajax'])) {\n $this->html = NodeFactory::render($this->env);\n }\n // This is an actual HTML page request. Commonly index.html.\n elseif (!empty($this->getIndexFile())) {\n $this->html = file_get_contents($this->env->dir['docroot'] . '/' . $this->getIndexFile());\n }\n // In case of a special pre-loaded page request, i.e. Shadow node edit.\n elseif (!empty($this->getData('content'))) {\n $this->html = $this->getData('content');\n }\n elseif (!is_file($this->env->dir['docroot'] . '/' . $this->getIndexFile())) {\n $this->html = t('Hello! Quanta seems not installed (yet) in your system. Please follow the <a href=\"https://www.quanta.org/installation-instructions\">Installation Instructions</a><br /><br />Reason: file not found(' . $this->getIndexFile() . ')');\n }\n\n // Trigger various page hooks.\n // Page init.\n $this->env->hook('page_init', $vars);\n\n // Page's body classes. // TODO: deprecate, include in page init.\n $this->env->hook('body_classes', $vars);\n\n // Page after build.\n $this->env->hook('page_after_build', $vars);\n\n // Page complete.\n $this->env->hook('page_complete', $vars);\n\n }", "public function render() {\n $htmlContent = \"\";//Main Content\n\n return $htmlContent;\n}", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->parameters([\n 'dom' => 'Bfrtip',\n 'pageLength' => '25',\n 'order' => [[0, 'asc']],\n ]);\n }", "abstract public function convert_to_html();", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->parameters([\n 'dom' => 'Bfrtip',\n 'order' => [1, 'asc'],\n 'select' => [\n 'style' => 'os',\n 'selector' => 'td:first-child',\n ],\n 'buttons' => [\n /*['extend' => 'create', 'editor' => 'editor'],\n ['extend' => 'edit', 'editor' => 'editor'],\n ['extend' => 'remove', 'editor' => 'editor'],*/\n ]\n ]);\n }", "public function html()\n {\n return $this->builder()\n ->setTableId('books-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->orderBy(1)\n ->parameters([\n 'lengthMenu' => [\n [ 05, 10, 15, -1 ],\n [ '05 rows', '10 rows', '15 rows', 'Show all' ],\n ['align-left']\n ],\n 'order' => [[0, 'desc']]\n ]);\n }", "public function getHTML()\n {\n $config = $this->config[\"config\"];\n $items = $this->config[\"items\"];\n $itemsRight = $this->config[\"items-right\"];\n $html = \"<ul class='{$config['navbar-left-class']}'>\";\n foreach ($items as $item) {\n $html .= array_key_exists(\"dropdown-menu\", $item)\n ? $this->createDropdownItem($item, $item[\"text\"])\n : $this->createItem($item);\n }\n $html .= \"</ul>\";\n $html .= \"<ul class='{$config['navbar-right-class']}'>\";\n // Login and create account routes\n foreach ($itemsRight as $item) {\n $active = $item[\"route\"] == $this->currentRoute\n ? \"active\" : \"\";\n $route = call_user_func($this->urlCreator, $item[\"route\"]);\n $html .= \"<li class='{$active}'>\";\n // Check if user is logged in or not\n if ($item['route'] === \"login\" && $this->loggedIn) {\n if ($this->admin) {\n $route = call_user_func($this->urlCreator, \"admin\");\n } else {\n $route = call_user_func($this->urlCreator, \"profile\");\n }\n $html .= \"<a href='{$route}'>{$this->loggedIn}</a></li>\";\n } else {\n $html .= \"<a href='{$route}'>{$item['text']}</a></li>\";\n }\n }\n $html .= \"</ul>\";\n\n return $html;\n }", "public function toHtml()\n\t{\n\t\treturn $this->to(self::RENDER_HTML);\n\t}", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '280px'])\n ->parameters([\n 'dom' => 'Bfrtip',\n 'order' => [[0, 'desc']],\n 'buttons' => [\n //['extend' => 'create', 'className' => 'btn btn-default btn-sm no-corner',],\n ['extend' => 'export', 'className' => 'btn btn-default btn-sm no-corner',],\n ['extend' => 'print', 'className' => 'btn btn-default btn-sm no-corner',],\n //['extend' => 'reset', 'className' => 'btn btn-default btn-sm no-corner',],\n //['extend' => 'reload', 'className' => 'btn btn-default btn-sm no-corner',],\n ],\n ]);\n }", "public function get_html()\n\t{\n\t\tif ( empty($this->html) && $this->name ){\n\t\t\t\n\t\t\t$this->html .= '<'.$this->tag.' name=\"'.$this->name.'\"';\n\t\t\t\n\t\t\tif ( isset($this->id) ){\n\t\t\t\t$this->html .= ' id=\"'.$this->id.'\"';\n\t\t\t}\n\t\t\t\n\t\t\tif ( $this->tag === 'input' && isset($this->options['type']) ){\n\t\t\t\t$this->html .= ' type=\"'.$this->options['type'].'\"';\n\t\t\t\t\n\t\t\t\tif ( $this->options['type'] === 'text' || $this->options['type'] === 'number' || $this->options['type'] === 'password' || $this->options['type'] === 'email' ){\n\t\t\t\t\tif ( isset($this->options['maxlength']) && ( $this->options['maxlength'] > 0 ) && $this->options['maxlength'] <= 1000 ){\n\t\t\t\t\t\t$this->html .= ' maxlength=\"'.$this->options['maxlength'].'\"';\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset($this->options['minlength']) && ( $this->options['minlength'] > 0 ) && $this->options['minlength'] <= 1000 && ( \n\t\t\t\t\t( isset($this->options['maxlength']) && $this->options['maxlength'] > $this->options['minlength'] ) || !isset($this->options['maxlength']) ) ){\n\t\t\t\t\t\t$this->html .= ' minlength=\"'.$this->options['minlength'].'\"';\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset($this->options['size']) && ( $this->options['size'] > 0 ) && $this->options['size'] <= 100 ){\n\t\t\t\t\t\t$this->html .= ' size=\"'.$this->options['size'].'\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( $this->options['type'] === 'checkbox' ){\n\t\t\t\t\tif ( !isset($this->options['value']) ){\n\t\t\t\t\t\t$this->options['value'] = 1;\n\t\t\t\t\t}\n\t\t\t\t\t$this->html .= ' value=\"'.htmlentities($this->options['value']).'\"';\n\t\t\t\t\tif ( $this->value == $this->options['value'] ){\n\t\t\t\t\t\t$this->html .= ' checked=\"checked\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( $this->options['type'] === 'radio' ){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->html .= ' value=\"'.htmlentities($this->value).'\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( isset($this->options['title']) ){\n\t\t\t\t$this->html .= ' title=\"'.$this->options['title'].'\"';\n\t\t\t}\n\t\t\t\n\t\t\t$class = '';\n\t\t\t\n\t\t\tif ( isset($this->options['cssclass']) ){\n\t\t\t\t$class .= $this->options['cssclass'].' ';\n\t\t\t}\n\n\t\t\tif ( $this->required ){\n\t\t\t\t$class .= 'required ';\n\t\t\t}\n\t\t\tif ( isset($this->options['email']) ){\n\t\t\t\t$class .= 'email ';\n\t\t\t}\n\t\t\tif ( isset($this->options['url']) ){\n\t\t\t\t$class .= 'url ';\n\t\t\t}\n\t\t\tif ( isset($this->options['number']) ){\n\t\t\t\t$class .= 'number ';\n\t\t\t}\n\t\t\tif ( isset($this->options['digits']) ){\n\t\t\t\t$class .= 'digits ';\n\t\t\t}\n\t\t\tif ( isset($this->options['creditcard']) ){\n\t\t\t\t$class .= 'creditcard ';\n\t\t\t}\n\t\t\t\n\t\t\tif ( !empty($class) ){\n\t\t\t\t$this->html .= ' class=\"'.trim($class).'\"';\n\t\t\t}\n\t\t\t\n\t\t\t$this->html .= '>';\n\t\t\t\n\t\t\tif ( $this->tag === 'select' || $this->tag === 'textarea' ){\n\t\t\t\t$this->html .= '</'.$this->tag.'>';\n\t\t\t}\n\t\t\t\n\t\t\tif ( isset($this->options['placeholder']) && strpos($this->options['placeholder'],'%s') !== false ){\n\t\t\t\t$this->html = sprintf($this->options['placeholder'], $this->html);\n\t\t\t}\n\t\t}\n\t\treturn $this->html;\n\t}", "public function html()\n {\n return $this->builder()\n ->setTableId('user-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->dom($this->getDom());\n }", "public function html()\n {\n return $this->builder()\n ->setTableId('city_datatables')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->dom('Blfrtip')\n ->orderBy(1)\n ->buttons(\n Button::make('create'),\n Button::make('export'),\n Button::make('print'),\n Button::make('reset'),\n Button::make('reload')\n );\n }", "public function getHTML() {\t\n\t\t$html = '';\n\t\tif ($this->type != 'title') $html.= '<p>'.\"\\n\";\n\t\tif ($this->type != 'info' && $this->type != 'system' && $this->type != 'title') \n\t\t\t{\t\t\t\n\t\t\t$html.= '<label id=\"label_for_'. $this->name . '\" name=\"label_for_'. $this->name . '\" for=\"'. $this->name . '\">';\n\t\t\t// special check for files item\n\t\t\tif ($this->type == 'file')\n\t\t\t\t{\n\t\t\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].'/uploads/' . $this->name))\n\t\t\t\t\t{\n\t\t\t\t\t$html.= '<a href = \"/uploads/'. $this->name .'\">'.$this->label.'</a> \n\t\t\t\t\t\t(<a href=\"javascript:void Messi.ask(\\''.DELETE.' ' .$this->name.' ?\\', \n\t\t\t\t\t\tfunction(val) { if(val==\\'Y\\') formSubmit(\\'delete\\',\\'' . $this->name . '\\');});\">'.DELETE.'</a>)';\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t$html.= $this->label.' ('.NONE.')';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t$html.= $this->label;\n\t\t\t\t}\n\t\t\t$html.= '</label>'.\"\\n\";\n\t\t\t}\n\t\t// add dependence of the item for js managing in user interface\n\t\tif ($this->depend != 'none' or $this->depend != '') {\n\t\t\t$html.= '<input type=\"hidden\" id=\"dependance_for_'. $this->name . '\" value=\"'. $this->depend . '\" />'.\"\\n\";\n\t\t}\t\n\t\t$html.= '<input type=\"hidden\" id=\"title_for_'. $this->name . '\" value=\"'. $this->title . '\" />'.\"\\n\";\n\t\tswitch ($this->type)\n\t\t\t{\n\t\t\tcase 'text' : \n\t\t\t\t$html.= '<input id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" \n\t\t\t\t\tonchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'password' : \n\t\t\t\t$html.= '<input type=\"password\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" \n\t\t\t\t\tonchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'checkbox' : \n\t\t\t\t$html.= '<input type=\"checkbox\" id=\"'. $this->name . '\" name=\"'. $this->name . '\"' . ( ($this->value == 'on') ? \" \n\t\t\t\t\tchecked \" : \"\") . ' onchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'file' : \n\t\t\t\t$html.= '<input type=\"file\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'select' :\n\t\t\t\t$html.= '<select id=\"'. $this->name . '\" name=\"'. $this->name . '\" onchange=\"display_dependance();\" >'.\"\\n\";\n\t\t\t\t$valuesPossible = explode(',',$this->values);\n\t\t\t\tforeach ($valuesPossible as $valuePossible){\n\t\t\t\t\t$html.= '<option value=\"'. $valuePossible . '\" ' . (($valuePossible == $this->value) ? \" selected \" : \"\") . '>'.\n\t\t\t\t\t(($valuePossible == \"none\") ? NONE : $valuePossible) . '</option>'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t$html.= '</select><div style=\"clear:both\"></div>'.\"\\n\";\n\t\t\t\tbreak; \n\n\t\t\tcase 'title' : \n\t\t\t\t$html.= \"\\n\". '<h2>'.$this->label.'</h2><hr />'.\"\\n\\n\";\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t// system action items\n\t\t\tcase 'system' : \n\t\t\t\t// a system item will render a button that submit the form with the configured action name in the config-map.php\n\t\t\t\t$html.= '<label></label><input class=\"button\" type=\"button\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'.$this->label.'\" \n\t\t\t\tonclick=\"new Messi(\\''.addslashes($this->help).'\\', {\n\t\t\t\t\ttitle: \\''.addslashes($this->label).'?\\', \n\t\t\t\t\tmodal: true, buttons: [{id: 0, label: \\''.YES.'\\', val: \\'Y\\'}, {id: 1, label: \\''.NO.'\\', val: \\'N\\'}], \n\t\t\t\t\tcallback: function(val) { if(val==\\'Y\\') {openTerminal();formSubmit(\\''.$this->values.'\\');}}});\" />';\n\t\t\t\tbreak;\n\n\t\t\tcase 'html' : \n\t\t\t\t// this is only arbitrary html code to display\n\t\t\t\t$html.= $this->value;\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * HERE YOU CAN ADD THE TYPE RENDERER YOU NEED\n\t\t\t *\n\t\t\t * case 'YOUR_TYPE' : \n\t\t\t *\t$html.= 'ANY_HTML_CODE_TO_RENDER';\n\t\t\t *\tbreak;\n\t\t\t */\n\n\t\t\tdefault : \n\t\t\t\t$html.= '<b>'.NO_METHOD_TO_RENDER_THIS_ITEM .'</b><br />Item : '.$this->name. '<br />Type : '.$this->type. '<br />'.\"\\n\"; \n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\tif ($this->type != 'title') $html.= '</p>'.\"\\n\"; \t\t\n\t\treturn $html;\n\t}", "public function getHtmlBuilder()\n {\n if (! class_exists('\\Yajra\\DataTables\\Html\\Builder')) {\n throw new \\Exception('Please install yajra/laravel-datatables-html to be able to use this function.');\n }\n\n return $this->html ?: $this->html = app('datatables.html');\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax('')\n ->addAction(['width' => '80px'])\n ->parameters([\n 'dom' => 'Bfrtip',\n 'order' => [[0, 'desc']],\n 'buttons' => [\n\n ],\n ]);\n }", "function toHtml() \n {\n return $this->_html;\n }", "public function html()\n {\n return $this->builder()\n ->setTableId('designation-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->dom('Bfrtip')\n ->orderBy(1)\n ->buttons(\n Button::make('create'),\n Button::make('export'),\n Button::make('print'),\n Button::make('reset'),\n Button::make('reload')\n );\n }", "public function getHTML() {\n\t $markup = '';\n\n\t // open tags as required \n\t if($this->isBolded) {\n\t // add strong tag\n\t $markup .= '<strong>'; \n\t }\n\t\tif($this->isItalics) {\n\t // add emphisis tag\n\t $markup .= '<em>'; \n\t } \n\t\tif($this->isStrikethrough) {\n\t // add ?? tag\n\t } \n\t\tif($this->isUnderlined) {\n\t // add span tag with text decoration for underline\n\t $markup .= '<span style=\"text-decoration: underline;\">';\n\t }\n\n // add span tag to define color\n $markup .= '<span style=\"color: #' . $this->colour . ';\">';\n \n // TODO: add logic so the style is reused for each\n \n\t\t// add the text \n $markup .= $this->text;\n\n // add close tag for colour applicatoin\n $markup .= '</span>';\n\n // close tags as required\n\t if($this->isBolded) {\n\t // add close strong tag\n\t $markup .= '</strong>'; \n\t }\n\t\tif($this->isItalics) {\n\t // add close emphisis tag\n\t $markup .= '</em>'; \n\t } \n\t\tif($this->isStrikethrough) {\n\t // add close ?? tag \n\t } \n\t\tif($this->isUnderlined) {\n\t // add close span tag\n\t $markup .= '</span>';\n\t }\n\n\t\treturn $markup;\n\t}", "private function viewBuilder() {\n $html = '';\n $file = false;\n // Create fields\n foreach ($this->formDatas as $field) {\n $type = $field['type'];\n switch ($type) {\n case 'text' :\n case 'password' :\n case 'hidden' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n // Addon - 2013-07-31\n case 'date' :\n case 'datetime' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"text\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n\n\n if ($type == 'datetime') {\n $plugin = $this->addPlugin('widget', false);\n $plugin = $this->addPlugin('date');\n }\n $plugin = $this->addPlugin($type);\n if (!isset($this->js['script'])) {\n $this->js['script'] = '';\n }\n if ($type == 'datetime') {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datetimepicker({ dateFormat: \"yy-mm-dd\", timeFormat : \"HH:mm\"});});</script>';\n } else {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datepicker({ dateFormat: \"yy-mm-dd\"});});</script>';\n }\n break;\n // End Addon\n case 'select' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <select name=\"' . $field['name'] . '\">';\n // Add options\n foreach ($field['options'] as $option) {\n $html .= '\n <option value=\"' . $option . '\" <?php echo set_select(\"' . $field['name'] . '\", \"' . $option . '\"); ?>>' . $option . '</option>';\n }\n $html .= '\n </select>';\n break;\n case 'checkbox' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['checkbox'] as $option) {\n $html .= '\n <input type=\"checkbox\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'radio' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['radio'] as $option) {\n $html .= '\n <input type=\"radio\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'reset' :\n case 'submit' :\n $html .= '\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n case 'textarea' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <textarea name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\"><?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?></textarea>';\n break;\n case 'file' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"file\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" />';\n $file = true;\n break;\n }\n }\n\n $view = '\n <html>\n <head>\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php echo base_url() ?>assets/css/generator/' . $this->cssName . '.css\">\n '; // Addon - 2013-07-31\n foreach ($this->css as $css) {\n $view .= $css . '\n ';\n }\n foreach ($this->js as $js) {\n $view .= $js . '\n ';\n }\n // End Addon\n $view .= '\n </head>\n <body>\n <?php\n // Show errors\n if(isset($error)) {\n switch($error) {\n case \"validation\" :\n echo validation_errors();\n break;\n case \"save\" :\n echo \"<p class=\\'error\\'>Save error !</p>\";\n break;\n }\n }\n if(isset($errorfile)) {\n foreach($errorfile as $name => $value) {\n echo \"<p class=\\'error\\'>File \\\"\".$name.\"\\\" upload error : \".$value.\"</p>\";\n }\n }\n ?>\n <form action=\"<?php echo base_url() ?>' . $this->formName . '\" method=\"post\" ' . ($file == true ? 'enctype=\"multipart/form-data\"' : '') . '>\n ' . $html . '\n </form>\n </body>\n </html>';\n return array(str_replace('<', '&lt;', $view), $view);\n }", "public function build()\n {\n\n $this->load();\n $this->html = $this->buildTable() ;\n\n return $this->html;\n\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '120px', 'printable' => false])\n ->parameters([\n 'stateSave' => false,\n 'order' => [[($this->columnsLength-1), 'desc']],\n ]);\n }" ]
[ "0.8223474", "0.7832399", "0.77049524", "0.7642871", "0.75216883", "0.74815524", "0.7403877", "0.73037547", "0.72794753", "0.7205899", "0.7202348", "0.7202348", "0.7194561", "0.71864444", "0.7173879", "0.71675974", "0.716523", "0.716523", "0.716523", "0.71432114", "0.71009815", "0.70883846", "0.7083202", "0.70604897", "0.7051434", "0.69884425", "0.6938769", "0.6919563", "0.69078934", "0.69039255", "0.6885853", "0.6885853", "0.68824023", "0.6867917", "0.68485934", "0.6847267", "0.68417746", "0.68410504", "0.68410504", "0.6797269", "0.67965555", "0.678674", "0.6780618", "0.67804444", "0.6778738", "0.6769966", "0.67647886", "0.6764328", "0.67626995", "0.6758238", "0.675198", "0.6744942", "0.67252916", "0.67042804", "0.6702994", "0.66948694", "0.6693096", "0.66772485", "0.6670193", "0.66672665", "0.66556793", "0.6650841", "0.6649229", "0.66449744", "0.6632797", "0.6626289", "0.66238296", "0.6616949", "0.66112995", "0.6607428", "0.66073805", "0.6602486", "0.6599689", "0.6594298", "0.6573377", "0.6552674", "0.65201193", "0.65151393", "0.6509489", "0.65068984", "0.64992225", "0.64956474", "0.6490953", "0.648153", "0.6458993", "0.6445694", "0.64441186", "0.64386976", "0.64317065", "0.6429959", "0.6422132", "0.64204323", "0.6419403", "0.64188665", "0.6416345", "0.64120156", "0.64052486", "0.64009964", "0.639785", "0.6393767", "0.6392468" ]
0.0
-1
Get filename for export.
protected function filename() { return 'Automobile_' . date('YmdHis'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function filename()\n {\n return 'Export_' . date('YmdHis');\n }", "protected function filename () : string {\n return sprintf('%s/%s.csv', $this->instanceDirectory(), $this->guessName());\n }", "public function getFileName()\n {\n $fileName = $this->getInfo('fileName');\n if (!$fileName) {\n $fileName = $this->getInfo('title');\n }\n if (!$fileName) {\n $fileName = Zend_Controller_Front::getInstance()->getRequest()->getParam('controller') . '-' . date(\"Ymd\");\n }\n return $fileName . '.csv';\n }", "private static function getFileName()\n {\n return sprintf('Export %s.csv', Carbon::now()->toDateTimeString());\n }", "public function getFilename()\n {\n return static::filename($this->path);\n }", "public function getFilename();", "public function getFilename();", "public function getFilename() {}", "public function getFilename()\n {\n return $this->filename . '.pdf';\n }", "public function getFilename(): string\n {\n return $this->filename;\n }", "public function getFilename(): string\n {\n return $this->filename;\n }", "public function getFilename()\n {\n $file = basename($this->srcPath);\n\n $ops = str_replace(array('&', ':', ';', '?', '.', ','), '-', $this->operations);\n return trim($ops . '-' . $file, './');\n }", "public function getFilename() : string\n {\n return $this->fileName;\n }", "private function pathFilename() {\n return $this->directory . \"/\" . $this->formatFilename();\n }", "public function filename()\n\t{\n\t\treturn $this->_filename();\n\t}", "public function getFileName()\n {\n $value = $this->get(self::FILENAME);\n return $value === null ? (string)$value : $value;\n }", "protected function filename()\n {\n return 'ReclassExport_' . time();\n }", "private function getExportFileName($extension = 'csv')\n\t{\n\t\t$datetime = new DateTime();\n\t\t$timezone = new DateTimeZone(Mage::getStoreConfig('general/locale/timezone'));\n\t\t$datetime->setTimezone($timezone);\n\t\t$date = $datetime->format(\"Y-m-d\");\n\t\t$time = $datetime->format(\"His\");\n\t\treturn sprintf(\"%s-%s-%d.%s\",self::EXPORT_FILE_NAME, $date, $time, $extension);\n\t}", "private function getOutputFileName()\n {\n $formattedDate = date(self::DATE_FORMAT);\n $fileName = sprintf(self::FILE_NAME_PATTERN, $formattedDate);\n\n return $fileName;\n }", "public function getFileNameForExport($report, $file_type) {\r\n return $this->prefix_project_name . '_' . $report . '_' . time() . '.' . $file_type;\r\n }", "protected function filename()\n {\n return 'Reports_' . date('YmdHis');\n }", "public function getFileName()\n {\n return basename($this->path);\n }", "public function getFileName(): string\n {\n if (strpos($this->savefileName, '.php') === false) {\n return $this->savefileName . $this->extension;\n }\n return $this->savefileName;\n }", "private function getFilename()\n {\n if ($this->uniqueFile) {\n return $this->filename;\n }\n\n return $this->filename . self::SEPARATOR . $this->getCurrentSitemap();\n }", "public function getFileName()\n {\n return \"{$this->getUserOS()}-{$this->getDriver()}{$this->getFileExtension()}\";\n }", "public function getFileName();", "public function getFileName();", "public function getFileName();", "public function getFilename() {\n return $this->path;\n }", "public function getFilename()\n {\n return __FILE__;\n }", "public function getFilename() {\n return $this->getData('file');\n }", "public function getFilename()\n {\n return $this->filename;\n }", "public function getFilename()\n {\n return $this->filename;\n }", "public function getFilename()\n {\n return $this->filename;\n }", "public function getFilename()\n {\n return $this->filename;\n }", "public function getFilename()\n {\n return $this->filename;\n }", "public function getFilename()\n {\n return $this->filename;\n }", "protected function filename()\n {\n return 'Payment_'.date('YmdHis');\n }", "public function getFileName()\n {\n return $this->prefix.$this->scope.'_'.$this->comName;\n }", "public function myFilename()\r\n {\r\n $reflection = new ReflectionClass($this);\r\n\r\n return $reflection->getFileName();\r\n }", "public function get_filename()\n {\n }", "public function filename() : string {\n return $this->name;\n }", "public function getFilename()\n {\n return '';\n }", "public function getFilename(): string\n {\n return $this->getServer(self::SCRIPT_FILENAME);\n }", "protected function ___filename() {\n\t\treturn $this->pagefiles->path . $this->basename;\n\t}", "protected function filename()\n {\n return 'Delivery_' . date('YmdHis');\n }", "function getFilename()\n {\n return __FILE__;\n }", "public function getFilename()\r\n {\r\n return pathinfo($this->filename, PATHINFO_BASENAME);\r\n }", "public function getFileName()\n {\n return $this->getParam('flowFilename');\n }", "protected function filename()\n {\n return 'Egreso_' . date('YmdHis');\n }", "public function getFileName()\n {\n return $this->filename;\n }", "public function getFileName()\n {\n return $this->filename;\n }", "protected function filename()\n {\n return 'Orders_' . date('YmdHis');\n }", "public function getFileName()\n {\n return basename($this->file, '.' . $this->getExtension());\n }", "public function filename(): string\n {\n return Str::random(6) . '_' . $this->type . $this->fileExtension();\n }", "public function getFileName(){\n\t\t$filename = sprintf($this->format, $this->classname) . '.php';\n\t\t\n\t\treturn $filename;\n\t}", "public function getFilename()\n {\n return $this->_filename;\n }", "public function getFileName()\n {\n return $this->language.'/'.strtolower($this->getName());\n }", "public function fullFilename()\n {\n $ext = '.xml';\n if (strpos(strtolower($this->url), '.csv') > 0)\n $ext = '.csv';\n return $this->filename . $ext;\n }", "public function getFilename() {\n\t\treturn $this->filename;\n\t}", "public function getFilename() {\n\t\treturn $this->filename;\n\t}", "public function getFilename()\n {\n if (!$this->fileName) {\n $matcher = $this->getFileMatcher();\n $this->fileName = $this->searchFile($matcher);\n }\n\n return $this->fileName;\n }", "public function getFilename()\n\t\t{\n\t\t\treturn $this->_fileName;\n\t\t}", "public function getFileName() {\n\t\treturn $this->filename;\n\t}", "function rlip_get_export_filename($plugin, $tz = 99) {\n global $CFG;\n $tempexportdir = $CFG->dataroot . sprintf(RLIP_EXPORT_TEMPDIR, $plugin);\n $export = basename(get_config($plugin, 'export_file'));\n $timestamp = get_config($plugin, 'export_file_timestamp');\n if (!empty($timestamp)) {\n $timestamp = userdate(time(), get_string('export_file_timestamp',\n $plugin), $tz);\n if (($extpos = strrpos($export, '.')) !== false) {\n $export = substr($export, 0, $extpos) .\n \"_{$timestamp}\" . substr($export, $extpos);\n } else {\n $export .= \"_{$timestamp}.csv\";\n }\n }\n if (!file_exists($tempexportdir) && !@mkdir($tempexportdir, 0777, true)) {\n error_log(\"/blocks/rlip/lib.php::rlip_get_export_filename('{$plugin}', {$tz}) - Error creating directory: '{$tempexportdir}'\");\n }\n return $tempexportdir . $export;\n}", "protected function filename() {\n return 'Passport_report_' . date('YmdHis');\n }", "public function getFilename()\n\t\t{\n\t\t\treturn $this->filename;\n\t\t}", "protected function getFileName() {\n return $this->_dateTime->format('YmdHis') . '.xml';\n }", "protected function getFileName() {\n // Full file path.\n $path = $this->urls[$this->activeUrl];\n\n // Explode with the '/' to get the last element.\n $files = explode('/', $path);\n\n // File name without extension.\n $file_name = explode('.', end($files))[0];\n return $file_name;\n }", "protected function filename()\n {\n return 'account_list_' . date('Y_m_d_H_i_s');\n }", "public function getFilename() {\n return $this->filename;\n }", "public function getFilename() {\n\t\t\n\t\t$filename = $this->filename;\n\t\t\n\t\tif(file_exists($this->path . $filename) && $this->rename_if_exists === true) {\n\t\t\n\t\t\t//Explode the filename, pop off the extension and put it back together\n\t\t\t$parts = explode('.', $filename);\n\n\t\t\t$extension = array_pop($parts);\n\n\t\t\t$base_filename = implode('.', $parts);\n\t\t\t\n\t\t\t$count = 1;\n\t\t\t\n\t\t\tdo {\n\t\t\t\t$count++;\n\t\t\t} while(file_exists($this->path . $base_filename . '_' . $count . '.' . $extension));\n\t\t\t\n\t\t\t$filename = $base_filename . '_' . $count . '.' . $extension;\n\t\t\n\t\t}\n\t\t\n\t\treturn $filename;\n\t\t\n\t}", "protected function filename()\n {\n return 'playerBetFlowLogs';\n }", "private function exportFileName($attachment): string\n {\n\n return sprintf('%s-Attachment nr. %s - %s', $this->job->key, strval($attachment->id), $attachment->filename);\n }", "public function getFileName() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"filename\", FALSE);\n\t}", "public function getFileName(): string\n {\n return Str::studly(\n $this->getTable()\n );\n }", "function getExportFileName($objectsFileNamePart, $context) {\n\t\treturn $this->getExportPath() . date('Ymd-His') .'-' . $objectsFileNamePart .'-' . $context->getId() . '.xml';\n\t}", "public function getFileName() {\n return $this->name;\n }", "protected function filename()\n {\n return 'InvoicesSale_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Document_' . date('YeamdHis');\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "protected function filename()\n {\n return 'Order_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Contracts_' . date('YmdHis');\n }", "function _getFileName()\r\n\t{\r\n\t\t$f = $this->pathHomeDir . '/' . $this->pathLocale . '/' . $this->pathFile . \".\" . $this->pathEx;\r\n\t\treturn $f;\r\n\t}", "function getFilename();", "public function getFileName() {\n\n return $this->fileName;\n }", "public function getFilename(): string\n {\n return DIR_TESTS . '/' . $this->module . '/Controller/' . $this->controller . 'Test.php';\n }", "protected function filename()\n {\n return 'owe_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Invoices_' . date('YmdHis');\n }", "public function getBulkFilename()\n {\n return $this->filename . '.pdf';\n }", "public function getFileName()\n\t{\n\t\treturn $this->fileName;\n\t}", "public function getFileName()\n\t{\n\t\treturn $this->fileName;\n\t}", "private function genereteFilename(){\n return strtolower(md5(uniqid($this->document->baseName)) . '.' . $this->document->extension);\n }", "protected function filename() {\n\t\treturn 'Order_' . date('YmdHis');\n\t}", "public function getFileName(){\n return $this->finalFileName;\n }", "public function getFilename()\n {\n return 'test-file';\n }", "public function filename(): string;" ]
[ "0.8196528", "0.80591613", "0.7949222", "0.7926228", "0.76592237", "0.7587201", "0.7587201", "0.7554733", "0.75451165", "0.750201", "0.750201", "0.7494168", "0.74720484", "0.7440598", "0.7438713", "0.74358875", "0.7431382", "0.7413326", "0.7389984", "0.735199", "0.7335797", "0.73351353", "0.7334927", "0.7316822", "0.73054564", "0.728245", "0.728245", "0.728245", "0.7275521", "0.7269254", "0.7268183", "0.7258453", "0.7258453", "0.7258453", "0.7258453", "0.7258453", "0.7258453", "0.7250907", "0.7248147", "0.72442096", "0.72418547", "0.72405916", "0.72378516", "0.7231945", "0.7228207", "0.72274476", "0.7219302", "0.72191083", "0.72168005", "0.7213594", "0.72070825", "0.72070825", "0.7201815", "0.719634", "0.71956646", "0.7194918", "0.71839637", "0.71804535", "0.71567154", "0.71563834", "0.71563834", "0.7155306", "0.7146139", "0.7140778", "0.7128196", "0.7126538", "0.71086234", "0.7108268", "0.71058804", "0.71036285", "0.7088248", "0.7085628", "0.7077877", "0.70729536", "0.7064761", "0.7060098", "0.70597196", "0.70442694", "0.70408803", "0.70382166", "0.7035906", "0.7035906", "0.7035906", "0.7035906", "0.7035906", "0.70327896", "0.70262915", "0.7025894", "0.70084685", "0.70043564", "0.70036155", "0.7002965", "0.69966114", "0.69959754", "0.6994067", "0.6994067", "0.69926775", "0.69908285", "0.69870937", "0.6978238", "0.69774413" ]
0.0
-1
Creates a new login page flow
public function __construct( private Templating $templates, private Flow $flow, private Sessions $sessions, private Signed $signed, ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logInPage() {\n $view = new View('login');\n $view->generate();\n }", "public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}", "public function createLogin() {\n\t\treturn view('page.action_admin.login.create');\n\t}", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function getFormLoginPage();", "public function create()\n {\n return view('Admin.admin_pages.login');\n }", "public function login_page()\n\t{\n\t\t$this->redirect( EagleAdminRoute::get_login_route() );\n\t}", "public function login() {\n $login_err = \"<p class='flash_err'>\" . $this->_model->getFlash('login_err') . \"</p>\";\n $create_err = \"<p class='flash_err'>\" . $this->_model->getFlash('create_err') . \"</p>\";\n $create_success = \"<p class='flash_success'>\" . $this->_model->getFlash('create_success') . \"</p>\";\n $this->render('General.Login', compact('login_err', 'create_err', 'create_success'));\n }", "public function login_page_working()\n {\n $this->browse(function ($browser) {\n $browser->visit(new Login);\n });\n }", "function login() \n\t{\n // Specify the navigation column's path so we can include it based\n // on the action being rendered\n \n \n // check for cookies and if set validate and redirect to corresponding page\n\t\t$this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\t\t$this->renderWithTemplate('users/login', 'MemberPageBaseTemplate');\n\t\t\n }", "public function get_login()\n\t{\n\t\t$this->template->body = View::forge('user/login');\n\t}", "function Login()\n{\n\tglobal $txt, $context;\n\n\t// You're not a guest, why are you here?\n\tif (we::$is_member)\n\t\tredirectexit();\n\n\t// We need to load the Login template/language file.\n\tloadLanguage('Login');\n\tloadTemplate('Login');\n\twetem::load('login');\n\n\t// Get the template ready.... not really much else to do.\n\t$context['page_title'] = $txt['login'];\n\t$context['default_username'] =& $_REQUEST['u'];\n\t$context['default_password'] = '';\n\t$context['never_expire'] = false;\n\t$context['robot_no_index'] = true;\n\n\t// Add the login chain to the link tree.\n\tadd_linktree($txt['login'], '<URL>?action=login');\n\n\t// Set the login URL - will be used when the login process is done (but careful not to send us to an attachment).\n\tif (isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && strhas($_SESSION['old_url'], array('board=', 'topic=', 'board,', 'topic,')))\n\t\t$_SESSION['login_url'] = $_SESSION['old_url'];\n\telse\n\t\tunset($_SESSION['login_url']);\n}", "public function create()\n\t{\n\t\t$this->layout->content = View::make('login.sign-in');\n\t}", "public function login()\n {\n\t\t\n $data[\"base_dir\"]=__DIR__;\n $data[\"loc\"]=\"Login\";\n\t\t\n return $this->twig->render(\"pages/login.html\", $data);\n }", "public function login() {\n $page = 'login';\n\n require('./View/default.php');\n }", "public function actionLogin()\n {\n $this->layout = '/login';\n $manager = new Manager(['userId' => UsniAdaptor::app()->user->getId()]);\n $userFormDTO = new UserFormDTO();\n $model = new LoginForm();\n $postData = UsniAdaptor::app()->request->post();\n $userFormDTO->setPostData($postData);\n $userFormDTO->setModel($model);\n if (UsniAdaptor::app()->user->isGuest)\n {\n $manager->processLogin($userFormDTO);\n if($userFormDTO->getIsTransactionSuccess())\n {\n return $this->goBack();\n }\n }\n else\n {\n return $this->redirect($this->resolveDefaultAfterLoginUrl());\n }\n return $this->render($this->loginView,['userFormDTO' => $userFormDTO]);\n }", "public function loginAction() : object\n {\n $title = \"Logga in\";\n\n // Deal with incoming variables\n $user = getPost('user');\n $pass = getPost('pass');\n $pass = MD5($pass);\n\n if (hasKeyPost(\"login\")) {\n $sql = loginCheck();\n $res = $this->app->db->executeFetchAll($sql, [$user, $pass]);\n if ($res != null) {\n $this->app->session->set('user', $user);\n return $this->app->response->redirect(\"content\");\n }\n }\n\n // Add and render page to login\n $this->app->page->add(\"content/login\");\n return $this->app->page->render([\"title\" => $title,]);\n }", "public function create()\n\t{\n\t\t/*\n \t* This helps us to restrict the display of login page when clicked on browser back button after login.\n \t*/\n\n $headers = array();\n $headers['Expires'] = 'Tue, 1 Jan 1980 00:00:00 GMT';\n $headers['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0';\n $headers['Pragma'] = 'no-cache';\n\n return Response::make(View::make('login.login'), 200, $headers);\n //return View::make('login.login');\n\t}", "public function loginActivities();", "public function loginAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $loginUser = $this->view->loginUser;\n\n if ( $loginUser ) {\n $homeUrl = $site->getUrl( 'home' );\n return $this->_redirect( $homeUrl );\n }\n\n // set the input params\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authLogin' );\n }", "public function login()\n {\n if(is_logged_in()) {\n redirect_to(url('thread/index'));\n }\n\n $user = new User;\n $page = Param::get('page_next', 'login');\n\n switch($page) {\n case 'login':\n break;\n\n case 'lobby':\n $user->username = Param::get('username');\n $user->password = Param::get('password');\n\n try {\n $user = $user->verify();\n $_SESSION['id'] = $user['id'];\n } catch (UserNotFoundException $e) {\n $page = 'login';\n }\n break;\n\n default:\n throw new UserNotFoundException(\"User not found\");\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }", "function login() {\n $this->layout = \"no_header\";\n $this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'display', \"home\");\n }", "function login() {\n $this->checkAccess('user',true,true);\n\n\n $template = new Template;\n echo $template->render('header.html');\n echo $template->render('user/login.html');\n echo $template->render('footer.html');\n\n //clear error status\n $this->f3->set('SESSION.haserror', '');\n }", "public function login()\n\t{\n\t\tredirect($this->config->item('bizz_url_ui'));\n\t\t// show_404();\n\t\t// ////import helpers and models\n\n\t\t// ////get data from database\n\n\t\t// //set page info\n\t\t// $pageInfo['pageName'] = strtolower(__FUNCTION__);\n\n\t\t// ////sort\n\t\t\n\t\t// //render\n\t\t// $this->_render($pageInfo);\n\t}", "public function login()\n\t{\n\t\t$this->load->view('layout/layout_open');\n\t\t$this->load->view('login');\n\t\t$this->load->view('layout/layout_close');\n\t}", "public function create()\n {\n //加载登录模板\n return view(\"Home.Login.login\");\n }", "public function login()\n {\n $this->renderView('login');\n }", "private function login(){\n \n }", "public function create()\n\t{\n\t\treturn View::make('login.login');\n\t}", "public function loginpageAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::LOGINPAGE);\n \t$this->view->loginForm = new User_Form_Login();\n }", "public function getShowLoginPage()\n {\n echo $this->blade->render(\"login\", [\n 'signer' => $this->signer,\n ]);\n }", "public function login()\n {\n $this->set('title', 'Login');\n $this->render('login');\n }", "public function login()\n\t{\n\n\t\t$this->load->view('portal/templates/header');\n\t\t$this->load->view('portal/login');\n\t\t$this->load->view('portal/templates/footer');\n\t}", "public function create()\n\t{\n\t\treturn View::make('login');\n\t}", "public function create(): View\n {\n return view('pages.login');\n }", "public function login(){\n \n $this->data[\"title_tag\"]=\"Lobster | Accounts | Login\";\n \n $this->view(\"accounts/login\",$this->data);\n }", "public function loginPage() {\n if ($this->auth->isLogged())\n return $this->route('dashboard');\n\n return $this->responseFactory->html('user/login.html.twig');\n }", "private function formLogin(){\n\t\tView::show(\"user/login\");\n\t}", "public function login()\n\t{\n\t\t$this->layout->content = View::make('login.login');\n\t}", "public function showLogin(){\n $this->data['pagetitle'] = \"Login\";\n $this->data['page'] = 'login';\n // $this->data['pagecontent'] = 'login';\n $this->data['pagebody'] = 'login';\n \n $this->render();\n }", "public function webtestLogin() {\n //$this->open(\"{$this->sboxPath}user\");\n $password = $this->settings->adminPassword;\n $username = $this->settings->adminUsername;\n // Make sure login form is available\n $this->waitForElementPresent('edit-submit');\n $this->type('edit-name', $username);\n $this->type('edit-pass', $password);\n $this->click('edit-submit');\n $this->waitForPageToLoad('30000');\n }", "function renderLoginForm() {\n\t\t$tpl = DevblocksPlatform::getTemplateService();\n\t\t$tpl->cache_lifetime = \"0\";\n\t\t\n\t\t// add translations for calls from classes that aren't Page Extensions (mobile plugin, specifically)\n\t\t$translate = DevblocksPlatform::getTranslationService();\n\t\t$tpl->assign('translate', $translate);\n\t\t\n\t\t@$redir_path = explode('/',urldecode(DevblocksPlatform::importGPC($_REQUEST[\"url\"],\"string\",\"\")));\n\t\t$tpl->assign('original_path', (count($redir_path)==0) ? 'login' : implode(',',$redir_path));\n\t\t\n\t\t$tpl->display('file:' . dirname(dirname(__FILE__)) . '/templates/login/login_form_default.tpl');\n\t}", "public function PageLogin(){\n\t \tif($this->logged_in)\n\t\t\tredirect('Dashboard');\n\t\t$data = array(\n\t\t\t'aplikasi'\t\t=> $this->app_name,\n\t\t\t'title_page' \t=> 'Page Login',\n\t\t);\n\t\t$this->load->view('gate/V_login', $data);\n\t}", "function login() {\n\t\t$this->getModule('Laravel4')->seeCurrentUrlEquals('/libraries/login');\n\t\t$this->getModule('Laravel4')->fillField('Bibliotek', 'Eksempelbiblioteket');\n\t\t$this->getModule('Laravel4')->fillField('Passord', 'admin');\n\t\t$this->getModule('Laravel4')->click('Logg inn');\n }", "function Login()\n {\n $this->view->ShowLogin();\n }", "public function actionLogin() {\n $model = new AdminLoginForm();\n // collect user input data\n if (isset($_POST['AdminLoginForm'])) {\n $model->setScenario(\"login\");\n $model->attributes = $_POST['AdminLoginForm'];\n // validate user input and redirect to the previous page if valid\n if ($model->validate() && $model->login()) {\n $this->redirect(array('admin/index'));\n }\n }\n $data = array(\n 'model' => $model\n );\n $this->render('login', array('model' => $model));\n }", "public function getLogin() {\n $basic_data['title'] = 'Sign In';\n $basic_data['body_id'] = 'login';\n return ViewController::displayPage($basic_data,'auth.login',[]);\n }", "public function login()\n\t{\n\t\tif (isLogin()) {\n\t\t\tredirect('/backoffice');\n\t\t} else {\n\t\t\t$this->display(\n\t\t\t\t'backoffice/login.html.twig'\n\t\t\t);\n\t\t}\n\n\t}", "public function create()\n {\n //加载登录模板\n return view('Home.Login.login');\n\n }", "public function formLogin() {\n $this->view->addForm();\n }", "private function loginPanel() {\n $this->user_panel->processLogin();\n }", "function auth()\r\n{\r\n loadTemplate(\"login_template\", \"welcomePage\");\r\n}", "public function openLoginPage(\\FunctionalTester $I)\n {\n $I->see('Login', 'h1');\n $I->seeElement(\n 'input#loginform-username',\n ['name' => 'LoginForm[username]', 'value' => ''],\n );\n $I->seeCheckboxIsChecked('#loginform-rememberme');\n $I->seeElement(\n 'button',\n ['name' => 'login-button'],\n );\n }", "public function create(): View\n {\n return view('backend::auth.login');\n }", "public function login();", "public function login();", "public function actionLogin() {\n \n }", "public function create()\n {\n return View::make('admin.login');\n }", "function login()\n\t{\n\t\t$GLOBALS['appshore']->session->createSession();\n\n\t\t$GLOBALS['appshore_data']['layout'] = 'auth';\n\t\t\n\t\t// define next action\n\t\t$result['action']['auth'] = 'login';\n\n\t\t// if a query_string was passed without being auth we keep it to deliver it later\n\t\tif( strpos( $_SERVER[\"QUERY_STRING\"], 'op=') !== false )\n\t\t\t$result['nextop'] = base64_encode($_SERVER[\"QUERY_STRING\"]);\n\t\t\t\n\t\treturn $result;\n\t}", "public function login() {\n //TODO\n include 'views/login.php';\n }", "function _modallogin_create_login_action($action, $account, $connector) {\n // Redirect user to the page they were on or Drupal specified they were going to.\n if (isset($_GET['destination'])) {\n $destination = $_GET['destination'];\n }\n else {\n $destination = !empty($_COOKIE['modallogin_source']) ? $_COOKIE['modallogin_source'] : FALSE;\n }\n if (!$destination || !drupal_valid_path($destination)) {\n $destination = '<front>';\n }\n $destination_query = array();\n\n // Trigger events which send emails among other things.\n rules_invoke_event(\"modallogin_$action\", $account);\n $next_action = 'noop';\n $pre_auth = _modallogin_pre_auth();\n\n // Assign the pre auth role.\n switch ($action) {\n case 'create_login_verify':\n case 'create_verify':\n case 'create_approve':\n // Add logintoboggans pre auth role\n if ($pre_auth) {\n $validating_role = logintoboggan_validating_id();\n $account->roles[$validating_role] = 1;\n _logintoboggan_user_roles_alter($account);\n }\n // Mark this user as in need of pass.\n $account->data['modallogin_no_pass'] = TRUE;\n $account = user_save($account);\n break;\n case 'login':\n break;\n }\n\n switch ($action) {\n // User was created, and is now logged in and emailed a verification email.\n case 'create_login_verify':\n // Log in user\n global $user;\n $user = $account;\n user_login_finalize();\n // Let the user's password be changed without the current password check.\n $token = drupal_random_key();\n $_SESSION['pass_reset_' . $user->uid] = $token;\n\n // Password will be prompted via modallogin_init().\n // We wait with sending email until it has been set.\n $destination_query = array('pass-reset-token' => $token);\n // No message required as it's set in modallogin_init().\n\n $next_action = 'goto';\n break;\n\n // User was created but need to verify its email before logged in.\n case 'create_verify':\n $message = t('Your account is currently pending e-mail verification. You have receveid a email with further instructions. !link to start a new e-mail verification.', array('!link' => l('Request a new password', 'user/password')));\n $next_action = 'logout';\n break;\n\n // User was NOT necessarily created and is now logged in without requiring \n // email verification.\n // @TODO this runs when user logs in with an existing account, does it also run in other situations?\n case 'login':\n // drupal_set_message(t('Further instructions have been sent to your e-mail address.'));\n //Log in user\n $form_state['uid'] = $account->uid;\n // Redirect user to the page they were on or Drupal specified they were going to.\n user_login_submit(array(), $form_state);\n $next_action = 'goto';\n break;\n\n // User was created but needs administration approval before logged in.\n case 'create_approval':\n $message = t('Your account is currently pending approval by the site administrator.');\n $next_action = 'logout';\n break;\n }\n\n if (!empty($message)) {\n drupal_set_message($message);\n }\n\n switch ($next_action) {\n case 'logout':\n if (isset($connector['logout callback']) && is_callable($connector['logout callback'])) {\n call_user_func($connector['logout callback'], $connector, $connection->cid);\n }\n break;\n case 'goto':\n drupal_goto($destination, array('query' => $destination_query));\n break;\n }\n}", "public function testLoginPage()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->assertSee('Login');\n });\n }", "public function createNew() {\n\t\t$data['session'] = $this->getSession();\n\t\t$this -> load -> view('private/createNew', $data);\n\t}", "public function loginAction() {\n if ($this->_getSession()->isLoggedIn()) {\n $this->_redirect('*/*/');\n return;\n }\n $this->getResponse()->setHeader('Login-Required', 'true');\n $this->loadLayout();\n $this->_initLayoutMessages('customer/session');\n $this->_initLayoutMessages('catalog/session');\n $this->renderLayout();\n }", "public function actionLogin()\n\t{\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n $signup_model = new SignupForm();\n $login_model = new LoginForm();\n \n return $this->render('login', [\n 'login_model' => $login_model,\n 'signup_model' => $signup_model, 'modal' => true\n ]);\n\t}", "public function actionLogin()\n {\n $this->view->registerCssFile('/css/ShortPage.css');\n if (!Yii::$app->user->isGuest) {\n // return $this->goHome();\n return Yii::$app->getResponse()->redirect('../price');\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function getLogin() {\n // redirect if user has been logged in\n $view = new View('layout');\n $view->inject('navbar', 'navbar');\n $view->inject('content', 'login');\n $view->set('pageTitle', 'Login');\n\n $view->addJavascript('/assets/js/js-cookie.js');\n $view->addJavascript('/assets/js/login.js');\n $view->addJavascript('/assets/js/sha.js');\n\n // csrf\n $manager = SessionManager::getManager();\n $manager->generateCsrfToken();\n\n echo $view->output();\n }", "public function create()\n {\n return view('auth.login');\n }", "public function create()\n {\n return view('auth.login');\n }", "public function create()\n {\n return view('auth.login');\n }", "public function create()\n {\n return view('auth.login');\n }", "public function create()\n {\n return view('auth.login');\n }", "public function create()\n {\n return view('auth.login');\n }", "public function create()\n {\n return view('auth.login');\n }", "private function wsal_step_login() {\n\t\t?>\n\t\t<form method=\"post\" class=\"wsal-setup-form\">\n\t\t\t<?php wp_nonce_field( 'wsal-step-login' ); ?>\n\t\t\t<h4><?php esc_html_e( 'Do you or your users use other pages to log in to WordPress other than the default login page ( /wp-admin/ )?', 'wp-security-audit-log' ); ?></h4>\n\t\t\t<fieldset>\n\t\t\t\t<label for=\"wsal-frontend-events-login-yes\">\n\t\t\t\t\t<input id=\"wsal-frontend-events-login-yes\" name=\"wsal-frontend-login\" type=\"radio\" value=\"1\">\n\t\t\t\t\t<?php esc_html_e( 'Yes, we use other pages to login to WordPress.', 'wp-security-audit-log' ); ?>\n\t\t\t\t</label>\n\t\t\t\t<br />\n\t\t\t\t<label for=\"wsal-frontend-events-login-no\">\n\t\t\t\t\t<input id=\"wsal-frontend-events-login-no\" name=\"wsal-frontend-login\" type=\"radio\" value=\"0\" checked>\n\t\t\t\t\t<?php esc_html_e( 'No, we only use the default WordPress login page.', 'wp-security-audit-log' ); ?>\n\t\t\t\t</label>\n\t\t\t\t<p class=\"description\"><?php esc_html_e( 'If your website is a membership or ecommerce website most probably you have more than one area from where the users can login. If you are not sure, select Yes.', 'wp-security-audit-log' ); ?></p>\n\t\t\t</fieldset>\n\t\t\t<!-- Question -->\n\t\t\t<p class=\"description\"><?php esc_html_e( 'Note: You can change the WordPress activity log retention settings at any time from the plugin settings later on.', 'wp-security-audit-log' ); ?></p>\n\t\t\t<div class=\"wsal-setup-actions\">\n\t\t\t\t<button class=\"button button-primary\" type=\"submit\" name=\"save_step\" value=\"<?php esc_attr_e( 'Next', 'wp-security-audit-log' ); ?>\"><?php esc_html_e( 'Next', 'wp-security-audit-log' ); ?></button>\n\t\t\t</div>\n\t\t</form>\n\t\t<?php\n\t}", "public function testViewLogin() {\n $this->visit('http://londonce.lan/login')\n ->see('Login');\n }", "function loginBegin()\r\n\t{\r\n\t\t// if we have extra perm\r\n\t\tif( isset( $this->config[\"scope\"] ) && ! empty( $this->config[\"scope\"] ) )\r\n\t\t{\r\n\t\t\t$this->scope = $this->scope . \", \". $this->config[\"scope\"];\r\n\t\t}\r\n\r\n\t\t// get the login url \r\n\t\t$url = $this->api->getLoginUrl( array( 'scope' => $this->scope, 'redirect_uri' => $this->endpoint ) );\r\n\r\n\t\t// redirect to facebook\r\n\t\tHybrid_Auth::redirect( $url ); \r\n\t}", "public function create() {\n $page = 'createAccount';\n\n require('./View/default.php');\n }", "public function create(){\n \n $data = array();\n $data['login'] = $_POST['login'];\n $data['password'] = Hash::create('sha256', $_POST['password'], HASH_KEY);\n $data['role'] = $_POST['role'];\n \n //Do the Error checking\n \n $this->model->RunCreate($data);\n /*\n * After we Post the user info to create, the header is refereshed so that the data appears dynamically \n * below in the users list\n */\n header('location: ' . URL . 'users');\n }", "public function loginAction() {\n //initialize an emtpy message string\n $message = '';\n //check if we have a logged in user\n if ($this->has('security.context') && $this->getUser() && TRUE === $this->get('security.context')->isGranted('ROLE_NOTACTIVE')) {\n //set a hint message for the user\n $message = $this->get('translator')->trans('you will be logged out and logged in as the new user');\n }\n //get the request object\n $request = $this->getRequest();\n //get the session object\n $session = $request->getSession();\n // get the login error if there is one\n if ($request->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) {\n $error = $request->attributes->get(SecurityContext::AUTHENTICATION_ERROR);\n } else {\n $error = $session->get(SecurityContext::AUTHENTICATION_ERROR);\n $session->remove(SecurityContext::AUTHENTICATION_ERROR);\n }\n $view = 'ObjectsUserBundle:User:login.html.twig';\n if ($request->isXmlHttpRequest()) {\n $view = 'ObjectsUserBundle:User:login_popup.html.twig';\n }\n $container = $this->container;\n $twitterSignupEnabled = $container->getParameter('twitter_signup_enabled');\n $facebookSignupEnabled = $container->getParameter('facebook_signup_enabled');\n $linkedinSignupEnabled = $container->getParameter('linkedin_signup_enabled');\n $googleSignupEnabled = $container->getParameter('google_signup_enabled');\n return $this->render($view, array(\n 'last_username' => $session->get(SecurityContext::LAST_USERNAME),\n 'error' => $error,\n 'message' => $message,\n 'twitterSignupEnabled' => $twitterSignupEnabled,\n 'facebookSignupEnabled' => $facebookSignupEnabled,\n 'linkedinSignupEnabled' => $linkedinSignupEnabled,\n 'googleSignupEnabled' => $googleSignupEnabled,\n 'loginNameRequired' => $container->getParameter('login_name_required')\n ));\n }", "public function login()\n {\n }", "public function login()\n {\n }", "public function create()\n\t{\n\t\treturn View::make('login', $this->data);\n\t}", "public function loginAction()\r\n\t{\r\n\t\r\n\t\t$post_back = $this->request->getParam( \"postback\" );\r\n\t\t$config_https = $this->registry->getConfig( \"SECURE_LOGIN\", false, false );\r\n\t\r\n\t\t// if secure login is required, then force the user back thru https\r\n\t\r\n\t\tif ( $config_https == true && $this->request->uri()->getScheme() == \"http\" )\r\n\t\t{\r\n\t\t\t$uri = $this->request->uri();\r\n\t\t\t$uri->setScheme('https');\r\n\t\r\n\t\t\treturn $this->redirect()->toUrl((string) $uri);\r\n\t\t}\r\n\t\r\n\t\t### remote authentication\r\n\t\r\n\t\t$result = $this->authentication->onLogin();\r\n\t\r\n\t\tif ( $result == Scheme::REDIRECT )\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t\r\n\t\t### local authentication\r\n\t\r\n\t\t// if this is not a 'postback', then the user has not submitted the form, they are arriving\r\n\t\t// for first time so stop the flow and just show the login page with form\r\n\t\r\n\t\tif ( $post_back == null ) return 1;\r\n\t\r\n\t\t$bolAuth = $this->authentication->onCallBack();\r\n\t\r\n\t\tif ( $bolAuth == Scheme::FAILED )\r\n\t\t{\r\n\t\t\t// failed the login, so present a message to the user\r\n\t\r\n\t\t\treturn array(\"error\" => \"authentication\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t}", "public function login()\n {\n return $this->render('security/login.html.twig');\n }", "public function loginAction() {\n $user_session = new Container('user');\n $user_session->username = 'Andy0708';\n \n return $this->redirect()->toRoute('welcome');\n }", "public function actionLogin() {\n $sample_code = Yii::$app->request->post('sample_code');\n $collector_code = Yii::$app->request->post('collector_code');\n $full_name = Yii::$app->request->post('full_name');\n $password = Yii::$app->request->post('password');\n $user = new User();\n\n if(is_null($password)) {\n $user->scenario = User::SCENARIO_USER;\n $result = $user->loginOrCreate($sample_code,$collector_code,$full_name);\n } else {\n $user->scenario = User::SCENARIO_OPERATOR;\n $result = $user->loginOrCreate($sample_code,$collector_code,$password);\n }\n if(array_key_exists('error',$result))\n throw new \\yii\\web\\HttpException(400, 'An error occurred:'. json_encode($result['error']));\n return $result;\n }", "public function login() {\n if (isset($_SESSION['userid'])) {\n $this->redirect('?v=project&a=show');\n } else {\n $this->view->login();\n }\n }", "public function action_login()\n {\n if(\\Auth::check())\n {\n \\Response::redirect('admin/dashboard');\n }\n\n // Set validation\n $val = \\Validation::forge('login');\n $val->add_field('username', 'Name', 'required');\n $val->add_field('password', 'Password', 'required');\n\n // Run validation\n if($val->run())\n {\n if(\\Auth::instance()->login($val->validated('username'), $val->validated('password')))\n {\n \\Session::set_flash('success', \\Lang::get('nvadmin.public.login_success'));\n \\Response::redirect('admin/dashboard');\n }\n else\n {\n $this->data['page_values']['errors'] = \\Lang::get('nvadmin.public.login_error');\n }\n }\n else\n {\n $this->data['page_values']['errors'] = $val->show_errors();\n }\n\n // Set templates variables\n $this->data['template_values']['subtitle'] = 'Login';\n $this->data['template_values']['description'] = \\Lang::get('nvadmin.public.login');\n $this->data['template_values']['keywords'] = 'login, access denied';\n }", "public function actionLogin() {\n $this->layout = 'main-login';\n\n if (!\\Yii::$app->user->isGuest) {\n if (!$this->funcionario) {\n $this->redirect(\\yii\\helpers\\Url::to('index.php?r=estabelecimento/produto'));\n } else {\n $this->redirect(\\yii\\helpers\\Url::to('index.php?r=estabelecimento/delivery-dx'));\n }\n return;\n }\n\n $model = new LoginForm();\n $model->setScenario(LoginForm::SCENARIOESTABELECIMENTO);\n if ($model->load(Yii::$app->request->post()) && $model->loginCpfCnpj()) {\n return $this->goLogin();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n return view('login');\n }", "public function login() {\n $messages = $this->messages;\n require_once $this->root_path_views.\"login.php\";\n }", "public function login()\n {\n $login = new Login();\n\n $path = '/inloggen';\n if (CSRF::validate() && $login->check()) {\n // try to send the user to the reservation form or sign up for meet the expert page\n $path = Session::get('path');\n unset($_SESSION['path']);\n\n if (empty($path)) {\n $path = '/';\n }\n }\n\n return new RedirectResponse($path);\n }", "public function logInRegisterPage();", "abstract protected function doLogin();", "public function login() {\n $this->FormHandler->setRequired('employeeCode');\n $this->FormHandler->setRequired('employeePassword');\n\n\n if ($this->FormHandler->run() === true) {\n $employeeCode = $this->FormHandler->getPostValue('employeeCode');\n $employePassword = $this->FormHandler->getPostValue('employeePassword');\n if ($this->User->checkLoginCredentials($employeeCode, $employePassword) === true) {\n // Log them in and redirect\n $this->User->loginClient($_SESSION, $employeeCode);\n redirect('employee/dashboard');\n }\n }\n else if ($this->User->checkIfClientIsLoggedIn($_SESSION) === true) {\n redirect('employee/dashboard');\n }\n\n loadHeader();\n include APP_PATH . '/view/user/login.php';\n loadFooter();\n }", "public function testLoginExample()\n {\n $this->visit('/login')\n ->type('[email protected]', 'email')\n ->type('1234567', 'password')\n ->press('Login')\n ->seePageIs('/admin');\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login.twig', [\n 'model' => $model,\n ]);\n }\n }", "public function createAction(){\n \n $user = User::authenticate($_POST['email'], $_POST['password_hash']);\n \n $remember_me = isset($_POST['remember_me']);//checkbox \n if ($user) {\n\n Auth::login($user, $remember_me);\n //Remember the login here\n\n Flash::addMessage('Login Successful');\n\n //$this->redirect('/');\n $this->redirect(Auth::getReturnToPage(), true);\n\n } else {\n Flash::addMessage('Login unsuccessful, please try again.', Flash::WARNING);\n\n View::renderTemplate('Login/index.html', [\n 'email' => $_POST['email'],\n 'remember_me'=> $remember_me\n\n ]);\n }\n \n \n }", "public function create()\n {\n //for the PAGE on which to create\n }", "public function showLoginForm()\n {\n\n /** set session refferrer */\n $this->setPreviousUrl();\n\n /** @var String $title */\n $this->title = __(\"admin.pages_login_title\");\n /** @var String $content */\n $this->template = 'Admin::Auth.login';\n\n /**render output*/\n return $this->renderOutput();\n }" ]
[ "0.6779202", "0.67596084", "0.66695094", "0.65603447", "0.6458298", "0.6301873", "0.6299629", "0.62882304", "0.62091136", "0.6206878", "0.6197248", "0.61839783", "0.61629814", "0.6145641", "0.611917", "0.60974234", "0.6089907", "0.60892135", "0.6061534", "0.6060114", "0.6058518", "0.60439765", "0.60377145", "0.60202116", "0.6019476", "0.6018126", "0.6008288", "0.5984569", "0.5984143", "0.59804577", "0.59736514", "0.5963606", "0.5959119", "0.5952964", "0.5941822", "0.59363604", "0.59199035", "0.5912405", "0.59063464", "0.5883654", "0.58830225", "0.5876348", "0.58665174", "0.58368355", "0.5835453", "0.58245784", "0.5821116", "0.581834", "0.58176935", "0.580707", "0.58064824", "0.5801526", "0.57873976", "0.57861596", "0.57792914", "0.57792914", "0.57749754", "0.57713056", "0.57687306", "0.576292", "0.5759688", "0.57578963", "0.57481897", "0.57462645", "0.5736069", "0.573586", "0.57338935", "0.5732788", "0.5732788", "0.5732788", "0.5732788", "0.5732788", "0.5732788", "0.5732788", "0.5711012", "0.57108176", "0.57089484", "0.570723", "0.57016075", "0.5687624", "0.5676879", "0.5676879", "0.5672885", "0.5667213", "0.5662423", "0.5659055", "0.56583905", "0.5657559", "0.5651713", "0.56483984", "0.5648359", "0.56466913", "0.56417054", "0.56407505", "0.56398296", "0.56380016", "0.5634843", "0.5630976", "0.56278723", "0.56206214", "0.5615705" ]
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Show the application dashboard.
public function index(){ $Income = DB::table('cats')->where('type',1)->get()->sum('balance'); $Exp = DB::table('cats')->where('type',0)->get()->sum('balance'); $Expense = DB::table('expenses')->get()->sum('amount'); $Doctor = DB::table('users')->where('role',2)->get('id'); $Employee = DB::table('users')->where('role',7)->get('id'); $Appointment = DB::table('appointments')->latest()->take(5)->get()->sortByDesc('id'); $Services = DB::table('services')->latest()->take(5)->get()->sortByDesc('id'); $Appointments = DB::table('appointments') ->where('doctor_id','!=',null) ->where('status', 1) ->where('doctor_id', Auth()->user()->id) ->where('date' ,'=', Carbon::today()) ->get(); switch (Auth()->user()->role) { case '1': return view('Admin.Dashboard') ->with('Services',$Services) ->with('Doctor',$Doctor) ->with('Expense',$Expense) ->with('Employee',$Employee) ->with('Appointment',$Appointment); break; case '2': return view('Doctor.Dashboard') ->with('Appointments',$Appointments) ->with('Tests',Test::all()); break; case '3': $App = DB::table('appointments') ->where('doctor_id','!=',null) ->where('status', 2) ->get(); $TestInfo = DB::table('test_infos')->get(); return view('Laboratory.Dashboard') ->with('Appointments',$App) ->with('Tests',Test::all()) ->with('TestInfo',$TestInfo); break; case '4': $App = DB::table('appointments') ->where('doctor_id','!=',null) ->where('status', 4) ->get(); $diagnos = DB::table('diagnos')->get(); return view('Pharmacy.Dashboard') ->with('Appointments',$App) ->with('Diagnos',$diagnos); break; case '5': $Expenses = DB::table('expenses')->latest()->take(5)->get()->sortByDesc('id'); $Incomes = DB::table('incomes')->latest()->take(5)->get()->sortByDesc('id'); return view('Accounting.Dashboard') ->with('Expense',$Exp) ->with('Income',$Income) ->with('Incomes',$Incomes) ->with('Expenses',$Expenses); break; case '6': $Appoint= DB::table('appointments') ->where('status' ,'!=', 5) ->where('date' ,'=', Carbon::today()) ->get()->sortByDesc('created_at'); $DoneAppointment = DB::table('appointments')->where('status' , 5)->get(); $ServiceInfo = DB::table('service_infos')->get(); $Doctor = DB::table('users')->where('role',2)->get(); return view('Reception.Dashboard') ->with('Doctor',$Doctor) ->with('DoneAppointment',$DoneAppointment) ->with('Appointments',$Appoint) ->with('Service',Service::all()) ->with('ServiceInfo',$ServiceInfo); break; default: return view('/home'); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function show()\n {\n return view('dashboard');\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7241342", "0.7236133", "0.7235562", "0.7218318", "0.71989936", "0.7197427", "0.71913266", "0.71790016", "0.71684825", "0.71577966", "0.7146797", "0.7133428", "0.7132746", "0.71298903", "0.71249074", "0.71218014", "0.71170413", "0.7110151", "0.7109032", "0.7107029", "0.70974076", "0.708061", "0.7075653", "0.70751685", "0.7064041", "0.70550334", "0.7053102", "0.7051273", "0.70484304", "0.7043605", "0.70393986", "0.70197886", "0.70185125", "0.70139873", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.6992477", "0.6979631", "0.69741416", "0.69741327", "0.6968815", "0.6968294", "0.69677526", "0.69652885", "0.69586027", "0.6944985", "0.69432825", "0.69419175", "0.6941512", "0.6941439", "0.6938837", "0.6937524", "0.6937456", "0.6937456", "0.69276494", "0.6921651", "0.69074917", "0.69020325", "0.6882262", "0.6869339", "0.6867868", "0.68557185", "0.68479055", "0.684518", "0.68408877", "0.6838798", "0.6833479", "0.6832326", "0.68309164", "0.6826798", "0.6812457" ]
0.0
-1
Callback function to render the CDN URL field in the options.
public function render_settings_field( $args ) { echo "<input aria-describedby='cdn-description' name='cdn_url' class='regular-text code' type='text' id='" . $args[0] . "' value='" . $args[1] . "'/>"; echo "<p id='cdn-description' class='description'>Input the url of the CDN, starting with https://, to use with this site or leave this field blank to bypass the CDN."; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function render_field() {\n\t\t// Get hostname of current site.\n\t\t$hostname = wp_parse_url( site_url(), PHP_URL_HOST );\n\n\t\t// Get current CDN URL.\n\t\t$cdn_url = get_site_option( 'css_js_url_rewriter_cdn_url' );\n\n\t\t?>\n\t\t<label for=\"css_js_url_rewriter_cdn_url\">\n\t\t\t<input type=\"text\" id=\"css_js_url_rewriter_cdn_url\" class=\"regular-text ltr\" name=\"css_js_url_rewriter_cdn_url\" value=\"<?php echo esc_attr( $cdn_url ); ?>\" />\n\t\t</label>\n\t\t<br />\n\t\t<span class=\"description\">\n\t\t\t<?php\n\t\t\t/* translators: 1: Hostname of current site, 2: Hostname of current site */\n\t\t\techo sprintf( __( 'Hostname of CDN. That hostname must point to hostname of site, %1$s. Example of CDN hostname: <code>https://cdn.%2$s</code>.', 'css-js-url-rewriter' ), $hostname, $hostname ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\t?>\n\t\t</span>\n\t\t<?php\n\t}", "function wpcom_referral_footer_field_refer_url_render() {\n\t\t$options = get_option( 'wpcom_referral_footer_settings' );\n\t\t?>\n\t\t<input type='text' name='wpcom_referral_footer_settings[wpcom_referral_footer_field_refer_url]' value='<?php echo $options['wpcom_referral_footer_field_refer_url']; ?>' style='width:100%;max-width:760px'>\n\t\t<p class=\"description\"><?php _e( 'For example: https://refer.wordpress.com/r/01/wordpress-com/' ); ?></p>\n\t\t<?php\n\t}", "public function display_option_client_remote_url() {\n $client_remote_url = $this->options['client_remote_url'];\n $this->display_input_text_field('client_remote_url', $client_remote_url);\n?>\nThe URL of the remote instance on which to clear the cache.\n<?php\n }", "public function display_inf_url() {\r\n\t\t$key = 'inf_url';\r\n\r\n\t\tif ( isset( $this->existing_options[$key] ) && $this->existing_options[$key] )\r\n\t\t\t$existing_value = $this->existing_options[$key];\r\n\t\telse\r\n\t\t\t$existing_value = '';\r\n\r\n\t\t$id = $key;\r\n\t\tsettings_errors( $id );\r\n\t\techo 'http://<input type=\"text\" name=\"' . self::OPTION_NAME . '[' . $key . ']\" id=\"' . $id . '\"';\r\n\t\tif ( $existing_value )\r\n\t\t\techo ' value=\"' . esc_attr( $existing_value ) . '\"';\r\n\t\techo ' maxlength=\"32\" size=\"40\" pattern=\"[a-zA-Z0-9-_]+\" autocomplete=\"off\" />.infusionsoft.com';\r\n\r\n\t\techo '<p class=\"description\">' . esc_html( __( 'Your subdomain for Infusion login', 'inf-mem' ) ) . '</p>';\r\n\t}", "public function render_settings_field( $args ) {\n \techo \"<input aria-describedby='cdn-description' name='cdn_url' class='regular-text code' type='text' id='\" . $args[0] . \"' value='\" . $args[1] . \"'/>\";\n \techo \"<p id='cdn-description' class='description'>Input the url of the CDN to use with this site or leave this field blank to bypass the CDN.\";\n }", "function getCdnURL() {\n\t\treturn $this->_CdnURL;\n\t}", "function get_file_url_cdn($file) {\n // We only do the replacement if a CDN_URL has been set and is different than the BASE_URL\n // This allows a FILES URL to be used for static files while template files still remain in the local installation\n if(BASE_URL != CDN_URL) {\n return str_replace(FILES_URL,CDN_URL,get_file_url($file));\n } else {\n return get_file_url($file);\n }\n}", "private static function assemble_url() {\n\t\t$nerdpress_options = get_option( 'blog_tutor_support_settings' );\n\t\t$cloudflare_zone = $nerdpress_options['cloudflare_zone'];\n\t\tif ( $cloudflare_zone === 'dns1' ) {\n\t\t\tself::$cloudflare_zone = 'cc0e675a7bd4f65889c85ec3134dd6f3';\n\t\t} elseif ( $cloudflare_zone === 'dns2' ) {\n\t\t\tself::$cloudflare_zone = 'c14d1ac2b0e38a6d49d466ae32b1a6d7';\n\t\t} elseif ( $cloudflare_zone === 'dns3' ) {\n\t\t\tself::$cloudflare_zone = '2f9485f19471fe4fa78fb51590513297';\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t\treturn self::$cloudflare_api_url . self::$cloudflare_api_version . self::$cloudflare_zones_directory . self::$cloudflare_zone . '/';\n\t}", "function banner_link_callback() {\n $options = get_option( \"tb_theme_options\" );\n?>\n\n <label id=\"banner-link-label\">Enter the URL of the page you want the homepage banner to link to: </label>\n <input id=\"banner_link\" name=\"tb_theme_options[banner_link]\" value=\"<?php echo $options['banner_link']; ?>\" type=\"text\" />\n\n<?php\n}", "function labdevs_short_url_link()\n{\n return get_option(\"labdevs_settings_option_short_url\");\n}", "public function cdn($url = null)\n {\n if (is_null($url)) {\n $url = $this->cdnUrl;\n }\n return '<script src=\"' . $url . '\"></script>';\n }", "public function get_cdn_url() {\n if ( defined( 'S3_UPLOADS_BUCKET_URL' ) && ! empty( S3_UPLOADS_BUCKET_URL ) ) {\n return S3_UPLOADS_BUCKET_URL;\n }\n return false;\n }", "public function redirect_url_callback()\n {\n printf(\n '<input type=\"text\" id=\"redirect_url_callback\" name=\"linkedin_api_option[redirect_url_callback]\" value=\"%s\" />',\n isset( $this->options['redirect_url_callback'] ) ? esc_attr( $this->options['redirect_url_callback']) : ''\n );\n }", "public function filter_rewrite_url_for_cdn( $url = '' ) {\n if ( $this->get_cdn_url() ) {\n return str_replace( get_site_url(), $this->get_cdn_url(), $url );\n }\n return $url;\n }", "function facebook_url_callback() {\n\t$settings = (array) get_option( 'achilles-settings' );\n\t$facebookURL = esc_attr( $settings['facebook-url'] ); \n\techo \"<input type='text' name='achilles-settings[facebook-url]' value='$facebookURL' />\";\n}", "function render_field_settings( $field ) {\n /**\n * URL selection.json file generated by IcoMoon App\n */\n acf_render_field_setting( $field, [\n 'label' => __( 'URL JSON file', 'rhicomoon' ),\n 'instructions' => __( 'Insert URL of the JSON file (selection.json) to generate list of icons, necessary include font-face style in WordPress admin to show icons', 'rhicomoon' ),\n 'type' => 'url',\n 'name' => 'json_url'\n ] );\n }", "function wpcom_vip_load_custom_cdn( $args ) {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "function abecaf_get_donation_url() {\n return untrailingslashit( get_option( 'abecaf_url' ) );\n}", "function client_url() {\n\tglobal $post;\n\t$url = get_post_meta($post->ID, 'client_url', true);\n\tif ($url) {\n\t\t?>\n\t\t<a href=\"<?php echo $url; ?>\" target=\"_blank\">Live Preview →</a>\n <?php\n\t}\n}", "public static function add_settings() {\n\t\tif ( ! is_multisite() ) {\n\t\t\tadd_settings_field(\n\t\t\t\t'css_js_url_rewriter_cdn_url',\n\t\t\t\t__( 'CDN URL', 'css-js-url-rewriter' ),\n\t\t\t\t[ __CLASS__, 'render_field' ],\n\t\t\t\t'general'\n\t\t\t);\n\t\t}\n\t}", "function ywig_twitter_link_callback() {\n\techo '<p class=\"description\">Enter your Twitter url</p><input type=\"text\" name=\"twitter_link\" value=\"' . esc_url( get_option( 'twitter_link' ) ) . '\" placeholder=\"Twitter link\" />';\n}", "public function get_url()\r\n\t{\r\n\t\treturn $this->dropin_url;\r\n\t}", "function ywig_youtube_link_callback() {\n\techo '<p class=\"description\">Enter your Youtube url</p><input type=\"text\" name=\"youtube_link\" value=\"' . esc_url( get_option( 'youtube_link' ) ) . '\" placeholder=\"Youtube link\" />';\n}", "function slack_dash_widget_callback_function() {\n\techo '<input type=\"url\" name=\"slack_dash_widget_name\" value=\"' . esc_url( get_option('slack_dash_widget_name') ) .'\" /> Explanation text';\n}", "function ywig_facebook_link_callback() {\n\techo '<p class=\"description\">Enter your Facebook url</p><input type=\"text\" name=\"facebook_link\" value=\"' . esc_url( get_option( 'facebook_link' ) ) . '\" placeholder=\"Facebook link\" />';\n}", "public static function uses_cdn() {\r\n\t\treturn Config::get_value(ConfigJQueryUI::CDN) != '';\r\n\t}", "public function describe_client_options() {\n echo '<p>The following options configure what URL to access when a post is published in this blog.</p>';\n }", "function setUrlLink(){\n if( $this->id == 0 ) return;\n $url = $this->aFields[\"url\"]->toString();\n if( $url == \"\" ) return;\n $url = strip_tags( preg_replace( \"/[\\\"']/\", \"\", $url ) );\n if( !$this->aFields[\"url\"]->editable ) $this->aFields[\"url\"]->display = false;\n $this->aFields[\"url_link\"]->display = true;\n $this->aFields[\"url_link\"]->value = \"<a href=\\\"\".$url.\"\\\">\".$url.\"</a>\";\n }", "public function functional_asset_url() {\n\n\t\t$log_url = WP_CONTENT_URL . '/uploads/nginx-helper/';\n\n\t\treturn apply_filters( 'nginx_asset_url', $log_url );\n\n\t}", "public function getBlogUrl()\n {\n return '<a href=\"https://cart2quote.zendesk.com/hc/en-us/articles/360028730291-No-Custom-Form-Request\"->__(Here)</a>';\n }", "function setCdnURL($inCdnURL) {\n\t\tif ( $inCdnURL !== $this->_CdnURL ) {\n\t\t\t$this->_CdnURL = $inCdnURL;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "function widgetopts_addhttp($url) {\n if (!preg_match(\"~^(?:f|ht)tps?://~i\", $url)) {\n $url = \"http://\" . $url;\n }\n return $url;\n}", "public function get_url() {\r\n\t\t$upload_dir = wp_upload_dir();\r\n\t\treturn esc_url_raw( $upload_dir['baseurl'] . '/av5-css/styles.css' );\r\n\t}", "protected function generateCloudLink()\n\t{\n\t\t$this->instanceBucket();\n\n\t\tif ($this->checkCloudErrors())\n\t\t{\n\t\t\treturn $this->bucket->GetFileSRC($this->uploadPath);\n\t\t}\n\n\t\treturn '';\n\t}", "public function __construct( Options_Data $options, CDN $cdn ) {\r\n\t\t$this->options = $options;\r\n\t\t$this->cdn = $cdn;\r\n\t}", "public function get_url() {\n\n\t\t$upload_dir = wp_upload_dir();\n\t\treturn esc_url_raw( $upload_dir['baseurl'] . '/kirki-css/styles.css' );\n\n\t}", "function resident_portal_url_callback(){\n $settings = (array) get_option( 'achilles-settings' );\n $resPortalURL = esc_attr( $settings['resident-portal'] );\n echo \"<input type='text' name='achilles-settings[resident-portal]' value='$resPortalURL' />\";\n}", "public function getCustomUrl() : string;", "function acf_settings_url( $value ) {\n\t\treturn apply_filters( \"acf/settings/dir\", $value );\n\t}", "function ywig_company_address_3_callback() {\n\techo '<p class=\"description\">Company Address Line 3</p><input type=\"text\" name=\"company_address_3\" value=\"' . esc_html( get_option( 'company_address_3' ) ) . '\" placeholder=\"Company Address 3\" />';\n}", "abstract protected function getUrl(array $options);", "private function getCvvImageUrl()\n {\n return $this->ccConfig->getCvvImageUrl();\n }", "public function outputUrl()\n\t{\n\t\techo App::e($this->url);\n\t}", "public function options_form(&$form, &$form_state) {\n $form['render_link'] = array(\n '#title' => t('Render as link'),\n '#description' => t('Render \\'part of\\' as link to access point for more info (if available)'),\n '#type' => 'checkbox',\n '#default_value' => $this->options['render_link'],\n '#weight' => 1,\n );\n parent::options_form($form, $form_state);\n }", "public static function get_CDN_HTML(): string\n {\n $html = '\n <option value=\"jquery.1.11.1.js\" selected=\"selected\"> jquery.1.11.1.js</option>\n<option value=\"jquery.1.11.1 UI\"> jquery.1.11.1 UI</option>\n<option value=\"jquery.1.11.1 tablesorter\"> jquery.1.11.1 tablesorter</option>\n<option value=\"mustache.min.js\" selected=\"selected\"> mustache.min.js</option>\n<option value=\"copernicus.min.css\" selected=\"selected\"> copernicus.min.css</option>\n<option value=\"unsemantic.min.css\" selected=\"selected\"> unsemantic.min.css</option>\n<option value=\"copernicus.min.js\" selected=\"selected\"> copernicus.min.js</option>\n<option value=\"htmlgenerator-v2.js\" selected=\"selected\"> htmlgenerator-v2.js</option>\n<option value=\"photoswipe.css\" selected=\"selected\"> photoswipe.css</option>\n<option value=\"photoswipe.min.js\" selected=\"selected\"> photoswipe.min.js</option>\n<option value=\"bootstrap-2.3.2 (css &amp; js)\"> bootstrap-2.3.2 (css &amp; js)</option>\n<option value=\"bootstrap-3.3.7 (css &amp; js)\"> bootstrap-3.3.7 (css &amp; js)</option>\n<option value=\"bootstrap-4.0.0 (css &amp; js)\" selected=\"selected\"> bootstrap-4.0.0 (css &amp; js)</option>\n<option value=\"dszparallexer\" selected=\"selected\"> dszparallexer</option>\n<option value=\"fontawesome v4.7.0\" selected=\"selected\"> fontawesome v4.7.0</option>\n<option value=\"fontawesome v5.10.1\"> fontawesome v5.10.1</option>\n<option value=\"fontawesome v5.11.2 Pro (don\\'t use with version 4)\"> fontawesome v5.11.2 Pro (don\\'t use with version 4)</option>\n<option value=\"fontawesome v5.11.2 Pro (use only with version 4)\" selected=\"selected\"> fontawesome v5.11.2 Pro (use only with version 4)</option>\n ';\n\n return $html;\n }", "public function getIcsUrl($options = [])\n {\n return Calendarize::$plugin->ics->getUrl($this, $options);\n }", "function acf_get_url($filename = '')\n{\n}", "public function get_carrier_url() {\n\t\treturn $this->carrier_url;\n\t}", "function abecaf_options_page() {\n?>\n<div>\n <?php screen_icon(); ?>\n <h2>A Big Egg - CAF Donations</h2>\n <form method=\"post\" action=\"options.php\">\n <?php settings_fields( 'abecaf' ); ?>\n <p>Enter the URL of your CAF donation page, it should look something like this: https://cafdonate.cafonline.org/10805</p>\n <table>\n <tr valign=\"top\">\n <th scope=\"row\"><label for=\"abecaf_url\">CAF donation page URL</label></th>\n <td><input type=\"text\" id=\"abecaf_url\" name=\"abecaf_url\" value=\"<?php echo get_option('abecaf_url'); ?>\" /></td>\n </tr>\n </table>\n <?php submit_button(); ?>\n </form>\n</div>\n<?php\n}", "function link_wp_org_callback() {\n\t\t$wp_link_option_value = bp_get_option( 'thaim_link_wordpress_org', '' );\n\t\t?>\n\t\t<input id=\"thaim_link_wordpress_org\" name=\"thaim_link_wordpress_org\" type=\"text\" value=\"<?php echo esc_attr( $wp_link_option_value ); ?>\" />\n\t\t<label for=\"thaim_link_wordpress_org\"><?php esc_html_e( 'WordPress.org username', 'thaim-utilities' ); ?></label>\n\t\t<?php\n\t}", "function AWS_easy_page_head($initArray){\n $initArray['external_link_list_url'] = get_option('siteurl') . '/wp-content/plugins/aws-easy-page-link/link-list.php';\n return $initArray;\n}", "function kcs_client_meta_box( $object, $box ) { ?>\n\n <?php wp_nonce_field( basename( __FILE__ ), 'kcs_client_nonce' ); ?>\n\n <?php $kcs_client_url = esc_attr( get_post_meta( $object->ID, 'kcs-client-url', true ) ); ?>\n\n <p>\n <input id=\"kcs-client-url\" name=\"kcs-client-url\" type=\"text\" value=\"<?php if( '' == $kcs_client_url ) { echo 'http://'; } else { echo $kcs_client_url; } ?>\" />\n </p>\n<?php }", "function journalize_auto_link_urls_activate() {\n\t$options = get_option('journalize');\n\t$options['auto_link_urls'] = true;\n\tupdate_option('journalize', $options);\n}", "protected function ___url() {\n\t\treturn $this->pagefiles->url . $this->basename;\n\t}", "function style_cdn($path)\r\n{\r\n\t$path = (env('APP_ENV') === 'local') ? $path : env('CDN_URL') . $path;\r\n\r\n\treturn '<link media=\"all\" type=\"text/css\" rel=\"stylesheet\" href=\"' . $path . '\">';\r\n}", "function brv_url()\n{\n return brv_scheme() . brv_host();\n}", "function getURL() \n {\n return $this->getValueByFieldName( 'navbarlink_url' );\n }", "public function cdn($src, $handle = null) {\r\n\t\tif (array_key_exists($handle, $this->cdn)) {\r\n\t\t\t$cdn = $this->cdn[$handle];\r\n\t\t\t\r\n\t\t\techo \"<script src=\\\"{$cdn[0]}\\\"></script><script>{$cdn[1]}||document.write('<script src=\\\"{$src}\\\"></' + 'script>')</script>\";\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn $src;\r\n\t}", "public function optionsCallback($strField);", "public function getUrlAttribute(): string\n {\n return strtolower($this->type) . '-' . $this->year_from;\n }", "function dblions_fb_link() {\n\t$fblink = esc_attr( get_option( 'facebook_link' ) );\n\tcreate_input_field( array(\n\t\t\t'facebook_link', 'text', \n\t\t\t$fblink, 'Facebook Link'\n\t\t) );\n}", "function ywig_company_address_1_callback() {\n\techo '<p class=\"description\">Company Address Line 1</p><input type=\"text\" name=\"company_address_1\" value=\"' . esc_html( get_option( 'company_address_1' ) ) . '\" placeholder=\"Company Address 1\" />';\n}", "function renderFilterCreationLink() {\n\t\t$content = tslib_CObj::getSubpart($this->fileContent, '###NEWFILTER_LINK###');\n\n\t\tif (!isset($this->conf['newfilter_link.']['form_url.']['parameter'])) {\n\t\t\t$this->conf['newfilter_link.']['form_url.']['parameter'] = $GLOBALS['TSFE']->id;\n\t\t}\n\t\t$this->conf['newfilter_link.']['form_url.']['returnLast'] = 'url';\n\t\t$content = tslib_cObj::substituteMarker($content, '###FORM_URL###', $this->cObj->typolink('', $this->conf['newfilter_link.']['form_url.']));\n\n\t\treturn $content;\n\t}", "public function getURL() { return $this->url; }", "function cdn_filter($path)\n{\n static $cdn = null;\n if ($cdn === null) {\n $cdn = get_option('cdn');\n }\n static $knm = null;\n if ($knm === null) {\n $knm = get_param_integer('keep_no_minify', 0);\n }\n\n if (($cdn != '') && ($knm == 0)) {\n if ($cdn == '<autodetect>') {\n $cdn = get_value('cdn');\n if ($cdn === null) {\n require_code('themes2');\n $cdn = autoprobe_cdns();\n }\n }\n if ($cdn == '') {\n return $path;\n }\n\n global $CDN_CONSISTENCY_CHECK;\n\n if (isset($CDN_CONSISTENCY_CHECK[$path])) {\n return $CDN_CONSISTENCY_CHECK[$path];\n }\n\n static $cdn_parts = null;\n if ($cdn_parts === null) {\n $cdn_parts = explode(',', $cdn);\n }\n\n $sum_asc = 0;\n $basename = basename($path);\n $path_len = strlen($basename);\n for ($i = 0; $i < $path_len; $i++) {\n $sum_asc += ord($basename[$i]);\n }\n\n $cdn_part = $cdn_parts[$sum_asc % count($cdn_parts)]; // To make a consistent but fairly even distribution we do some modular arithmetic against the total of the ascii values\n static $normal_suffix = null;\n if ($normal_suffix === null) {\n $normal_suffix = '#(^https?://)' . str_replace('#', '#', preg_quote(get_domain())) . '(/)#';\n }\n $out = preg_replace($normal_suffix, '${1}' . $cdn_part . '${2}', $path);\n $CDN_CONSISTENCY_CHECK[$path] = $out;\n return $out;\n }\n\n return $path;\n}", "protected function setUrl() {\r\n\t\t$this->url = htmlspecialchars(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), ENT_QUOTES);\r\n\t}", "public function include_font_link_callback()\n {\n $checked = isset($this->general_options['include_font_link']) && $this->general_options['include_font_link'] ? 'checked=\"checked\"' : '';\n printf(\n '<fieldset>\n <legend class=\"screen-reader-text\"><span>%s</span></legend>\n <label for=\"include_font_link\">\n <input name=\"fo_general_options[include_font_link]\" type=\"checkbox\" id=\"include_font_link\" value=\"1\" %s>\n %s\n </label>\n </fieldset>',\n __('Include Font Family Preview', 'bk-fonts'),\n $checked,\n __('Show font preview when listing the fonts (might be slow)', 'bk-fonts')\n );\n }", "public function getUrl(): string\n {\n return $this->generateChoiceUrl();\n }", "function asset_url($uri = null)\n{\n $CI =& get_instance();\n\n $cdn = $CI->config->item('asset_url');\n if (!empty($cdn))\n return $cdn . $uri;\n\n return $CI->config->base_url($uri);\n}", "function ywig_company_address_2_callback() {\n\techo '<p class=\"description\">Company Address Line 2</p><input type=\"text\" name=\"company_address_2\" value=\"' . esc_html( get_option( 'company_address_2' ) ) . '\" placeholder=\"Company Address 2\" />';\n}", "public function get_url()\n {\n }", "public function setup_plugin_url()\n {\n }", "private function build_url_field($_meta, $_ptype = \"wccpf\", $_class = \"\", $_index, $_show_value = \"no\", $_readonly = \"\", $_cloneable = \"\", $_wrapper = true) {\r\n $html = '';\r\n if ($_ptype != \"wccaf\") {\r\n if (isset($_meta[\"default_value\"]) && $_meta[\"default_value\"] != \"\") {\r\n $visual_type = (isset($_meta[\"view_in\"]) && ! empty($_meta[\"view_in\"])) ? $_meta[\"view_in\"] : \"link\";\r\n $open_tab = (isset($_meta[\"tab_open\"]) && ! empty($_meta[\"tab_open\"])) ? $_meta[\"tab_open\"] : \"_blank\";\r\n if ($visual_type == \"link\") {\r\n /* Admin wants this url to be displayed as LINK */\r\n $html = '<a href=\"' . $_meta[\"default_value\"] . '\" class=\"' . $_class . '\" target=\"' . $open_tab . '\" title=\"' . $_meta[\"tool_tip\"] . '\" ' . $_cloneable . ' >' . $_meta[\"link_name\"] . '</a>';\r\n } else {\r\n /* Admin wants this url to be displayed as Button */\r\n $html = '<button onclick=\"window.open(\\'' . $_meta[\"default_value\"] . '\\', \\'' . $open_tab . '\\' )\" title=\"' . $_meta[\"tool_tip\"] . '\" class=\"' . $_class . '\" ' . $_cloneable . ' >' . $_meta[\"link_name\"] . '</button>';\r\n }\r\n } else {\r\n /* This means url value is empty so no need render the field */\r\n $_wrapper = false;\r\n }\r\n } else {\r\n $html .= '<input type=\"text\" name=\"' . esc_attr($_meta['key']) . '\" class=\"wccaf-field short\" id=\"' . esc_attr($_meta['key']) . '\" placeholder=\"http://example.com\" wccaf-type=\"url\" value=\"' . esc_attr($_meta['value']) . '\" wccaf-pattern=\"mandatory\" wccaf-mandatory=\"\">';\r\n }\r\n /* Add wrapper around the field, based on the user options */\r\n if ($_wrapper) {\r\n $html = $this->built_field_wrapper($html, $_meta, $_ptype, $_index);\r\n }\r\n return $html;\r\n }", "public function getUrl(){\n\t\t\n\t\tif (!$this->_url){\n\t\t\t\n\t\t\t$is_plugin = strpos($this->getReference(),'Plugin:');\n\t\t\tif ($this->getReference() == 'WordPress function'){\n\n\t\t\t\t$this->_url ='http://codex.wordpress.org/index.php?title=Special:Search&search='.$this->_shortcode.'_Shortcode';\n\t\t\t} else if ($is_plugin !== false){\n\t\t\t\t$plugin_info = get_plugin_data($this->_filepath);\n\t\t\t\t\n\t\t\t\tif (is_array($plugin_info) && key_exists('PluginURI',$plugin_info)){\n\t\t\t\t\t/**\n\t\t\t\t\t * If you can find the plugin-url, use that\n\t\t\t\t\t */\n\t\t\t\t\t$this->_url = $plugin_info['PluginURI'];\n\t\t\t\t} else if (is_array($plugin_info) && key_exists('AuthorURI',$plugin_info)){\n\t\t\t\t\t/**\n\t\t\t\t\t * Else use the author-URI\n\t\t\t\t\t */\n\t\t\t\t\t$this->_url = $plugin_info['AuthorURI'];\n\t\t\t\t} else {\n\t\t\t\t\t/**\n\t\t\t\t\t * If all else fails, Google is your friend\n\t\t\t\t\t */\n\t\t\t\t\t$this->_url = 'http://www.google.com/search?q=Wordpress+'.$plugin_path.'+'.$this->_shortcode;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->_url = 'http://www.php.net/'.$this->_shortcode;\n\t\t\t}\n\t\t}\n\t\treturn $this->_url;\n\t}", "protected function getPluginUrl()\n {\n $filename = 'jquery.colorbox.js';\n \n if ($this->isProduction()) {\n $filename = 'jquery.colorbox-min.js';\n }\n\n return $this->getLocationUrl() . '/jquery-colorbox/' . $filename;\n }", "protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }", "public function getCouncilUrl() {\n return $this->council_url;\n\n }", "public function showUrlShortenerSelect()\n\t{\n\t\t$id = 'revendless-url-shortener';\n\t\t$option = 'url_shortener';\n\n\t\t$selectedValue = (isset($this->options[$option]) && $this->options[$option]) ? esc_attr($this->options[$option]) : '';\n\n\t\t$options = '<option value=\"\"'.selected($selectedValue, '', false) . '>'.esc_html(__('No URL-Shortener', 'revendless')).'</option>';\n\t\tforeach(self::$urlShortenerChoices as $value => $label) {\n\t\t\t$options .= '<option value=\"' .$value. '\"'.selected($value, $selectedValue, false).'>'.esc_html(__($label, 'revendless')).'</option>';\n\t\t}\n\n\t\tprint '<select name=\"'.self::OPTION_NAME.'['.$option.']\"'.'\" id=\"'.$id.'\">'.$options.'</select>';\n\t\tprint '<p class=\"description\">'.esc_html(__('Use of an url shortener when generating the tracking links.', 'revendless')).'</p>';\n\t}", "function acf_get_admin_tools_url()\n{\n}", "public function url()\n\t{\n\t\t$this->buildImage();\n\t\treturn $this->buildCachedFileNameUrl;\n\t}", "public function setCanonical(string $url);", "public function wpseo_cdn_filter( $uri ) {\n\t\t$common = Dispatcher::component( 'Cdn_Core' );\n\t\t$cdn = $common->get_cdn();\n\t\t$parsed = parse_url( $uri );\n\t\t$path = $parsed['path'];\n\t\t$remote_path = $common->uri_to_cdn_uri( $path );\n\t\t$new_url = $cdn->format_url( $remote_path );\n\n\t\treturn $new_url;\n\t}", "function custom_url( $url ) {\n\treturn get_bloginfo( 'url' );\n}", "public function getUrl() {\n return $this->url;\n }", "public function getUrl() {\n return $this->url;\n }", "function jc_url() {\n\n}", "public function getUrl()\n {\n return $this->url;\n }", "function script_cdn($path)\r\n{\r\n\t$path = (env('APP_ENV') === 'local') ? $path : env('CDN_URL') . $path;\r\n\r\n\treturn '<script src=\"' . $path . '\"></script>';\r\n}", "public function getUrl($includeDomain = TRUE)\n\t{\n\t\treturn ($includeDomain ? $this->getDomain(TRUE) : '') . '/'. ltrim($this->getSlug(TRUE), '/');\n\t}", "function categ_url_hack_options() {\n\t\t $redirects = get_option('categ_url_hack');\n\n $categ_redirect = $redirects['categ'];\n\t\t $categ_url_url = $redirects['url'];\n \n $args = array(\n \t'hide_empty' => 0, \n \t'hierarchical' => 1, \n \t'name' => 'categ_url_hack[categ]',\n \t'id' => 'categ_redirect',\n \t'selected' => $categ_redirect,\n \t'show_option_none' => '-- ' . __('No redirect', 'categ_url_hack') . ' --'\n );\n ?>\n \n \n <div class=\"wrap\">\n <div id=\"icon-edit\" class=\"icon32\"></div>\n <h2><?php _e( 'Category redirect settings', 'categ_url_hack' ); ?></h2> \n <form method=\"post\" action=\"options-general.php?page=category-redirect\">\n <p><label for=\"categ_redirect\"><?php _e('Choose a category to redirect', 'categ_url_hack');?></label>&nbsp;<?php wp_dropdown_categories( $args ) ?></p>\n <p><label for=\"categ_url_url\"><?php _e(\"URL to redirect to:\", 'categ_url_hack' ); ?></label>&nbsp;<input type=\"text\" id=\"categ_url_url\" name=\"categ_url_hack[url]\" value=\"<?php echo $categ_url_url; ?>\" placeholder=\"<?php _e('Relative or Absolute URL', 'categ_url_hack' );?>\" size=\"20\">&nbsp;<?php _e(\"eg: /my-page or https://www.smol.org\" ); ?></p> \n \n <p class=\"submit\"><input type=\"submit\" name=\"submit_categ_url\" value=\"<?php _e('Save settings', 'categ_url_hack' ) ?>\" /></p>\n </form>\n </div>\n\t\t<?php\n\t\t}", "public function getUrl(): string\n {\n return self::URL;\n }", "public function cdn_metabox_header() {\r\n\t\t$this->view(\r\n\t\t\t'cdn/meta-box-header',\r\n\t\t\tarray(\r\n\t\t\t\t'title' => __( 'CDN', 'wp-smushit' ),\r\n\t\t\t\t'tooltip' => __( 'This feature is likely to work without issue, however our CDN is in beta stage and some issues are still present.', 'wp-smushit' ),\r\n\t\t\t)\r\n\t\t);\r\n\t}", "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}", "public function getURL(): string\n {\n return $this->url.$this->apiVersion.'/';\n }", "public function url()\n {\n return $this->url;\n }", "function fergcorp_blockquote( $source ) {\n\t$parsed_url = wp_parse_url( $source[1] );\n\t$host = explode( '\\.', $parsed_url['host'] );\n\t$found_image = false;\n\t$hose_count = count( $host );\n\tfor ( $i = 0; $i < $hose_count -1; $i++ ) {\n\t\tfor ( $k = $i; $k < $hose_count; $k++ ) {\n\t\t\t$this_host .= $host[ $k ] . '.';\n\t\t}\n\t\tif ( file_exists( dirname( __FILE__ ) . '/' . $this_host . 'png' ) ) {\n\t\t\t$img = '<img src=\"' . get_bloginfo( 'url' ) . '/wp-content/plugins/' . plugin_basename( dirname( __FILE__ ) ) . '/' . $this_host . 'png\" border=\"0\" align=\"left\" vspace=\"5\" hspace=\"5\" alt=\"From ' . $parsed_url['host'] . '\"/></a><br />';\n\t\t\t$found_image = true;\n\t\t\tbreak; // Escape if we find the image.\n\t\t}\n\t\t$this_host = '';\n\t}\n\tif ( ! $found_image ) {\n\t\t$img = 'From ' . $parsed_url['host'] . ':';\n\t}\n\treturn \"<a href=\\\"$source[1]\\\">$img</a><blockquote>\";\n}", "function sailthru_scout_options_callback() {\n\techo '<p>Scout is an on-site tool that displays relevant content to users when viewing a particular page.</p>';\n}", "function wp_customize_url($stylesheet = '')\n {\n }", "public function testUseCdn() {\n $this->config->set('use_cdn', TRUE)\n ->save();\n\n $libraries = $this->libraries;\n \\mask_library_info_alter($libraries, 'mask');\n\n $this->assertCount(1, $libraries['mask_plugin']['js']);\n $this->assertArrayHasKey(MASK_PLUGIN_CDN_URL, $libraries['mask_plugin']['js']);\n $this->assertEquals('external', $libraries['mask_plugin']['js'][MASK_PLUGIN_CDN_URL]['type']);\n $this->assertTrue($libraries['mask_plugin']['js'][MASK_PLUGIN_CDN_URL]['minified']);\n }", "function url_meta() {\n add_meta_box('url_meta', 'URL', 'url_callback', 'external_post', 'normal', 'high');\n add_meta_box('url_meta', 'URL', 'url_callback', 'external_tool', 'normal', 'high');\n}" ]
[ "0.6844422", "0.6784253", "0.63851154", "0.6297831", "0.6280108", "0.6234", "0.6209538", "0.6071348", "0.6034757", "0.6023877", "0.59781516", "0.5963266", "0.5903067", "0.58463186", "0.5783909", "0.57728815", "0.5761286", "0.57458043", "0.57237655", "0.5703305", "0.5690845", "0.56812716", "0.5676015", "0.5668574", "0.56611663", "0.56354696", "0.5627632", "0.5577157", "0.55743825", "0.5574092", "0.5554801", "0.5529136", "0.54743475", "0.54499763", "0.5437938", "0.54323184", "0.54197997", "0.54030985", "0.53859884", "0.5382597", "0.5343382", "0.5325549", "0.53086865", "0.53040653", "0.5296858", "0.5293823", "0.5291365", "0.5273677", "0.5272856", "0.5267771", "0.5267244", "0.5249885", "0.52365535", "0.52345264", "0.522667", "0.52071106", "0.51957905", "0.5195615", "0.51842284", "0.517524", "0.51729393", "0.5168417", "0.51682687", "0.5160758", "0.51600343", "0.51482594", "0.5145106", "0.51405185", "0.5131547", "0.51276845", "0.5122015", "0.51103514", "0.5103076", "0.50945675", "0.50939006", "0.50868267", "0.5086558", "0.5076926", "0.5073879", "0.5071319", "0.5070489", "0.50668126", "0.5065808", "0.50541955", "0.50541955", "0.5052021", "0.50402653", "0.5036623", "0.50342923", "0.5026382", "0.50231373", "0.5018452", "0.5018212", "0.50153446", "0.50152826", "0.5008883", "0.5008015", "0.50079334", "0.50063145", "0.50046885" ]
0.6390001
2
This function removes the description box from the post columns.
public function remove_post_tag_columns( $columns ) { if ( isset( $columns['description']) ) { unset( $columns['description'] ); } return $columns; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_description_taxonomy( $columns ) {\n\n if( isset( $columns['description'] ) )\n unset( $columns['description'] );\n\n return $columns;\n}", "public function column_desc($post)\n {\n }", "function column_description( $item ) {\r\n\t\treturn esc_textarea( $item->post_content );\r\n\t}", "function maker_4ym_remove_posts_listing_tags( $columns ) {\n unset( $columns[ 'comments' ] );\n unset( $columns[ 'date' ] );\n return $columns;\n}", "public function custom_category_description_editor() {\n\t\twp_editor( '', 'description' );\n\t}", "function remove_description_form() {\n echo \"<style> .term-description-wrap{display:none;}</style>\";\n}", "function remove_admin_columns() {\n remove_post_type_support( 'post', 'comments' );\n remove_post_type_support( 'page', 'comments' );\n remove_post_type_support( 'attachment', 'comments' );\n remove_post_type_support( 'post', 'author' );\n remove_post_type_support( 'page', 'author' );\n}", "public function discardPreviewColumns();", "function thb_remove_blog_grid_options() {\n\t\tif ( thb_get_admin_template() == 'template-blog-grid.php' ) {\n\t\t\t$fields_container = thb_theme()->getPostType( 'page' )->getMetabox( 'layout' )->getTab( 'blog_loop' )->getContainer( 'loop_container' );\n\t\t\t$fields_container->removeField( 'thumbnails_open_post' );\n\t\t}\n\t}", "function sunset_custom_columns_list($columns, $post_id)\n{\n switch ($columns) {\n case 'message':\n echo get_the_excerpt();\n break;\n case 'email':\n $email = get_post_meta($post_id, '_email_contact_value_key', true);\n echo '<a href=\"mailto:' . $email . '\">' . $email . '</a>';\n break;\n }\n}", "function removeAllButLongDescription(){\n # Remove Description Tab menu\n remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );\n add_action( 'woocommerce_after_single_product_summary', 'longDescriptionReplay', 10 );\n remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );\n remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );\n \n # Remove variations add to cart\n remove_action( 'woocommerce_single_variation', 'woocommerce_single_variation', 10 );\n remove_action( 'woocommerce_single_variation', 'woocommerce_single_variation_add_to_cart_button', 20 );\n remove_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart', 30 );\n \n # Remove SKU\n add_filter( 'wc_product_sku_enabled', '__return_false' );\n\t\n // Right column\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 ); \n}", "function remove_title_box()\n {\n remove_post_type_support('board_minutes', 'title');\n remove_post_type_support('floor_minutes', 'title');\n remove_post_type_support('board_agenda', 'title');\n remove_post_type_support('general_agenda', 'title');\n }", "public function customize_partial_blogdescription() {\n bloginfo('description');\n }", "public function daveyjacobson_customize_partial_blogdescription() {\n \tbloginfo( 'description' );\n }", "function stw_woo_single_rmv_description( $tabs ) {\n if ( isset( $tabs['description'] ) ) unset( $tabs['description'] );\n return $tabs;\n}", "public function remove_post_custom_fields() {\n\n\t\tremove_meta_box('postcustom' , 'post' , 'normal');\n\n\t}", "public function unsetDescription(): void\n {\n $this->description = [];\n }", "function GTPress_hide_postmeta() {\r\n\tif ($options['hide_postmeta'] == \"true\") {\r\n\t\tremove_meta_box( 'commentstatusdiv' , 'post' , 'normal' ); // allow comments for posts\r\n\t\tremove_meta_box( 'commentsdiv' , 'post' , 'normal' ); // recent comments for posts\r\n\t\tremove_meta_box( 'postcustom' , 'post' , 'normal' ); // custom fields for posts\r\n\t\tremove_meta_box( 'trackbacksdiv' , 'post' , 'normal' ); // post trackbacks\r\n\t\tremove_meta_box( 'postexcerpt' , 'post' , 'normal' ); // post excerpts\r\n\t\tremove_meta_box( 'tagsdiv-post_tag' , 'post' , 'side' ); // post tags\r\n\t\tremove_meta_box( 'slugdiv','post','normal'); // post slug\r\n\t}\r\n}", "function editdel_content($content) {\n global $post;\n\t\n $content = str_replace('<div class=\"cmsms_shortcode_edit_column\">Edit</div>', '', $content);\n $content = str_replace('<div class=\"cmsms_shortcode_edit_box\">Edit</div>', '', $content);\n $content = str_replace('<div class=\"cmsms_shortcode_edit_tab\">Edit</div>', '', $content);\n $content = str_replace('<div class=\"cmsms_shortcode_edit_price\">Edit</div>', '', $content);\n\t\n return $content;\n}", "function wooadmin_my_remove_columns1( $posts_columns ) {\n\n unset( $posts_columns['author'] );\n\n unset( $posts_columns['email'] );\n\n unset( $posts_columns['posts'] );\n\n unset( $posts_columns['posts'] );\n\n return $posts_columns;\n\n}", "function admin_speedup_remove_post_meta_box() {\n\tglobal $post_type;\n\tif ( is_admin() && post_type_supports( $post_type, 'custom-fields' )) {\n\t\tremove_meta_box( 'postcustom', $post_type, 'normal' );\n\t}\n}", "function get_the_post_type_description()\n {\n }", "function custom_theme_customize_partial_blogdescription()\n{\n bloginfo('description');\n}", "function _supply_ontario_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "public function be_hide_editor() {\n // Get the Post ID\n if (isset($_GET['post']))\n $post_id = $_GET['post'];\n elseif (isset($_POST['post_ID']))\n $post_id = $_POST['post_ID'];\n\n if (!isset($post_id))\n return;\n\n // Get the Page Template\n $template_file = get_post_meta($post_id, '_wp_page_template', TRUE);\n\n //if ('template-photos.php' == $template_file)\n //echo '<style>#postdivrich{display: none;}</style>';\n remove_post_type_support('post', 'editor');\n }", "function lgm_theme_remove_commentsart_column($defaults) {\n\t unset($defaults['comments']);\n\t return $defaults;\n\t}", "function remove_my_post_metaboxes() {\n remove_meta_box( 'formatdiv','post','normal' ); // Format Div\n remove_meta_box( 'postcustom','post','normal' ); // Custom Fields\n remove_meta_box( 'trackbacksdiv','post','normal' ); // Trackback and Pingback\n remove_meta_box( 'postexcerpt','post','normal' ); // Custom Excerpt\n remove_meta_box( 'slugdiv','post','normal' ); // Custom Slug\n}", "function deactivate() {\n global $wpdb;\n $wpdb->query(\"ALTER TABLE wp_posts DROP COLUMN primary_category\" );\n \n }", "function deft_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "function humcore_remove_meta_boxes() {\n\n\tremove_meta_box( 'humcore_deposit_subjectdiv', 'humcore_deposit', 'side' );\n\tremove_meta_box( 'tagsdiv-humcore_deposit_tag', 'humcore_deposit', 'side' );\n\n}", "function kpl_user_bio_visual_editor_unfiltered() {\r\n\tremove_all_filters('pre_user_description');\r\n}", "function lgm_theme_remove_commentspage_column($defaults) {\n\t unset($defaults['comments']);\n\t return $defaults;\n\t}", "function custom_hubpage_columns( $column ) {\r\n global $post;\r\n\r\n switch ( $column ) {\r\n case \"hub_title\" :\r\n $edit_link = get_edit_post_link( $post->ID );\r\n $title = _draft_or_post_title();\r\n $post_type_object = get_post_type_object( $post->post_type );\r\n $can_edit_post = current_user_can( $post_type_object->cap->edit_post, $post->ID );\r\n\r\n echo '<strong><a class=\"row-title\" href=\"'.$edit_link.'\">' . $title.'</a>';\r\n\r\n _post_states( $post );\r\n\r\n echo '</strong>';\r\n\r\n if ( $post->post_parent > 0 )\r\n echo '&nbsp;&nbsp;&larr; <a href=\"'. get_edit_post_link($post->post_parent) .'\">'. get_the_title($post->post_parent) .'</a>';\r\n\r\n // Excerpt view\r\n if (isset($_GET['mode']) && $_GET['mode']=='excerpt') echo apply_filters('the_excerpt', $post->post_excerpt);\r\n\r\n // Get actions\r\n $actions = array();\r\n\r\n $actions['edit'] = '<a href=\"' . get_edit_post_link( $post->ID, true ) . '\" title=\"' . esc_attr( __( 'Edit this item' ) ) . '\">' . __( 'Edit' ) . '</a>';\r\n\r\n if ( $can_edit_post && 'trash' != $post->post_status ) {\r\n $actions['inline hide-if-no-js'] = '<a href=\"#\" class=\"editinline\" title=\"' . esc_attr( __( 'Edit this item inline', WPC_CLIENT_TEXT_DOMAIN ) ) . '\">' . __( 'Quick&nbsp;Edit', WPC_CLIENT_TEXT_DOMAIN ) . '</a>';\r\n }\r\n if ( current_user_can( $post_type_object->cap->delete_post, $post->ID ) ) {\r\n if ( 'trash' == $post->post_status )\r\n $actions['untrash'] = \"<a title='\" . esc_attr( __( 'Restore this item from the Trash', WPC_CLIENT_TEXT_DOMAIN ) ) . \"' href='\" . wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&amp;action=untrash', $post->ID ) ), 'untrash-' . $post->post_type . '_' . $post->ID ) . \"'>\" . __( 'Restore', WPC_CLIENT_TEXT_DOMAIN ) . \"</a>\";\r\n elseif ( EMPTY_TRASH_DAYS )\r\n $actions['trash'] = \"<a class='submitdelete' title='\" . esc_attr( __( 'Move this item to the Trash', WPC_CLIENT_TEXT_DOMAIN ) ) . \"' href='\" . get_delete_post_link( $post->ID ) . \"'>\" . __( 'Trash', WPC_CLIENT_TEXT_DOMAIN ) . \"</a>\";\r\n if ( 'trash' == $post->post_status || !EMPTY_TRASH_DAYS )\r\n $actions['delete'] = \"<a class='submitdelete' title='\" . esc_attr( __( 'Delete this item permanently', WPC_CLIENT_TEXT_DOMAIN ) ) . \"' href='\" . get_delete_post_link( $post->ID, '', true ) . \"'>\" . __( 'Delete Permanently', WPC_CLIENT_TEXT_DOMAIN ) . \"</a>\";\r\n }\r\n if ( $post_type_object->public ) {\r\n if ( 'trash' != $post->post_status ) {\r\n $actions['view'] = '<a href=\"' . wpc_client_get_slug( 'hub_page_id' ) . $post->ID . '\" target=\"_blank\" title=\"' . esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;', WPC_CLIENT_TEXT_DOMAIN ), $title ) ) . '\" rel=\"permalink\">' . __( 'Preview', WPC_CLIENT_TEXT_DOMAIN ) . '</a>';\r\n }\r\n }\r\n $actions = apply_filters( 'post_row_actions', $actions, $post );\r\n\r\n echo '<div class=\"row-actions\">';\r\n\r\n $i = 0;\r\n $action_count = sizeof($actions);\r\n\r\n foreach ( $actions as $action => $link ) {\r\n ++$i;\r\n ( $i == $action_count ) ? $sep = '' : $sep = ' | ';\r\n echo \"<span class='$action'>$link$sep</span>\";\r\n }\r\n echo '</div>';\r\n\r\n get_inline_data( $post );\r\n\r\n break;\r\n\r\n case \"client\":\r\n $client = get_users( array( 'role' => 'wpc_client', 'meta_key' => 'wpc_cl_hubpage_id', 'meta_value' => $post->ID ) );\r\n\r\n if ( $client ) {\r\n echo $client[0]->user_login;\r\n }\r\n\r\n break;\r\n\r\n }\r\n }", "function sld_rm_post_custom_fields() {\n\t// pages\n\tremove_meta_box( 'postcustom' , 'page' , 'normal' );\n\tremove_meta_box( 'commentstatusdiv' , 'page' , 'normal' );\n\tremove_meta_box( 'commentsdiv' , 'page' , 'normal' );\n\tremove_meta_box( 'authordiv' , 'page' , 'normal' );\n\n\t// posts\n\tremove_meta_box( 'postcustom' , 'post' , 'normal' );\n\tremove_meta_box( 'postexcerpt' , 'post' , 'normal' );\n\tremove_meta_box( 'trackbacksdiv' , 'post' , 'normal' );\n}", "function hmg_remove_featured() {\n\n\tif( get_option( 'hmg_manage_featured', true ) && get_option( 'hmg_post_type' ) )\n\t\tforeach( get_option( 'hmg_post_type' ) as $post_type )\n\t\t\tremove_meta_box( 'postimagediv', $post_type, 'side' );\n\n}", "function acf_render_field_wrap_description($field)\n{\n}", "function bajweb_custom_meta_des(){\n if( is_single() ) {\n $des = get_post_meta( get_the_id(), 'description', true );\n if( ! empty( $des ) ){\n $des = esc_html( $des );\n echo \"<meta name='description' content='$des'>\";\n }\n }\n}", "function lalita_customize_partial_blogdescription() {\n\t\tbloginfo( 'description' );\n\t}", "public function remove_meta_box() {\n\t\tremove_meta_box( $this->tax_name . 'div', 'ctrs-projects', 'side' );\n\t}", "function remove_metaboxes() {\n //remove_meta_box( 'postcustom' , 'product' , 'normal' );\n remove_meta_box( 'postexcerpt' , 'product' , 'normal' );\n //remove_meta_box( 'commentsdiv' , 'product' , 'normal' );\n //remove_meta_box( 'tagsdiv-product_tag' , 'product' , 'normal' );\n}", "function customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "function my_custom_posts_listing_fields( $columns ) {\n error_log(print_r($columns, true));\n unset( $columns[ 'date' ] );\n return $columns;\n}", "function _excerpt_render_inner_columns_blocks($columns, $allowed_blocks)\n {\n }", "function superultra_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "function kpl_user_bio_visual_editor( $user ) {\r\n\t// Requires WP 3.3+ and author level capabilities\r\n\tif ( function_exists('wp_editor') && current_user_can('publish_posts') ):\r\n\t?>\r\n\t<script type=\"text/javascript\">\r\n\t(function($){\r\n\t\t// Remove the textarea before displaying visual editor\r\n\t\t$('#description').parents('tr').remove();\r\n\t})(jQuery);\r\n\t</script>\r\n\r\n\t<table class=\"form-table\">\r\n\t\t<tr>\r\n\t\t\t<th><label for=\"description\"><?php _e('Biographical Info'); ?></label></th>\r\n\t\t\t<td>\r\n\t\t\t\t<?php\r\n\t\t\t\t$description = get_user_meta( $user->ID, 'description', true);\r\n\t\t\t\twp_editor( $description, 'description' );\r\n\t\t\t\t?>\r\n\t\t\t\t<p class=\"description\"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></p>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</table>\r\n\t<?php\r\n\tendif;\r\n}", "function post_excerpt_meta_box($post)\n {\n }", "function remove_postcustom() {\n\tremove_meta_box( 'postcustom', null, 'normal' );\n}", "public function sunsetContactCustomColumns($column, $post_id)\n {\n switch ($column) {\n case 'message' :\n echo get_the_excerpt();\n break;\n case 'email' :\n $email = get_post_meta($post_id, '_email_key', true);\n echo '<a href=\"mailto:'.$email .'\">'.$email.'</a>';\n break;\n }\n }", "function theme_customize_partial_blogdescription() {\n\tbloginfo('description');\n}", "function emc_the_cpt_description(){\r\n\r\n\t$desc = get_page_by_path( 'description', OBJECT, 'emc_content_focus' );\r\n\t$html = apply_filters( 'the_content', $desc->post_content );\r\n\techo $html;\r\n\r\n}", "function fiveh_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "public function doNotWrapDescription($wrap);", "function wooadmin_my_remove_columns( $posts_columns ) {\n\n unset( $posts_columns['role'] );\n\n unset( $posts_columns['email'] );\n\n unset( $posts_columns['posts'] );\n\n unset( $posts_columns['posts'] );\n\n return $posts_columns;\n\n}", "private function initColumns(){\n //Initialize our custom post type column management\n $this->cptWPDSCols = new Columns($this->wpdsPostType);\n \n //Remove our title\n $this->cptWPDSCols->removeColumn('title');\n \n //Add our content column\n $this->cptWPDSCols->addColumn('content', 'Content', 2);\n \n //Add our content column content\n $this->cptWPDSCols->addColumnPostContent('content');\n \n //Add our content column content\n $this->cptWPDSCols->addColumnOptionData('content', 'site_url');\n \n //Reposition column\n $this->cptWPDSCols->reorderColumn('content', 1);\n }", "function dt_f_testimonials_att_fields($fields, $post) {\r\n\tif( 'dt_testimonials' == get_post_type($post->post_parent) ) {\r\n unset($fields['align']);\r\n unset($fields['image-size']);\r\n unset($fields['post_content']);\r\n unset($fields['image_alt']);\r\n unset($fields['url']);\r\n\t}\r\n\treturn $fields;\r\n}", "public function remove_categories_meta_box() {\r\n\t remove_meta_box( 'market_reports_categorydiv', 'market-reports', 'side' );// remove the Categories box\r\n\t}", "function rkv_remove_columns( $columns ) {\n\t// remove the Yoast SEO columns\n\tunset( $columns['wpseo-score'] );\n\tunset( $columns['wpseo-title'] );\n\tunset( $columns['wpseo-metadesc'] );\n\tunset( $columns['wpseo-focuskw'] );\n \n\treturn $columns;\n}", "public static function customize_partial_blogdescription() {\r\n\t\t\treturn get_bloginfo( 'description' );\r\n\t\t}", "public function column_description($theme)\n {\n }", "public function remove_meta_boxes(){\r\n remove_meta_box('slugdiv', 'cycloneslider', 'normal');\r\n }", "function testimonials_columns( $column, $post_id ) {\n\tswitch ( $column ) {\n\t\tcase 'testimonial':\n\t\t\tthe_excerpt();\n\t\t\tbreak;\n\t}\n}", "function cinerama_edge_remove_default_custom_fields() {\n\t\tforeach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n\t\t\tforeach ( apply_filters( 'cinerama_edge_filter_meta_box_post_types_remove', array( 'post', 'page' ) ) as $postType ) {\n\t\t\t\tremove_meta_box( 'postcustom', $postType, $context );\n\t\t\t}\n\t\t}\n\t}", "function twentytwelve_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "function the_block_editor_meta_box_post_form_hidden_fields($post)\n {\n }", "function poco_product_columns_wrapper_close() {\n echo '</div>';\n }", "function custom_columns( $columns ){\n\tif (current_user_can('administrator')) {\n\t\t// Remove 'Comments' Column\n\t\tunset($columns['comments']);\n\t}\n\telse {\n\t\t// Remove 'Comments' Column\n\t\tunset($columns['comments']);\n\t\tunset($columns['author']);\n\t}\n\treturn $columns;\n}", "function remove_metaboxes(){\n // remove_meta_box( 'tagsdiv-keywords', 'ticket', 'side' );\n remove_meta_box( 'versiondiv', 'ticket', 'side' );\n remove_meta_box( 'milestonediv', 'ticket', 'side' );\n remove_meta_box( 'componentdiv', 'ticket', 'side' );\n remove_meta_box( 'prioritydiv', 'ticket', 'side' );\n remove_meta_box( 'severitydiv', 'ticket', 'side' );\n remove_meta_box( 'ticket_typediv', 'ticket', 'side' );\n remove_meta_box( 'resolutiondiv', 'ticket', 'side' );\n //remove_meta_box( 'severitydiv', 'ticket', 'side' );\n //remove_meta_box( 'severitydiv', 'ticket', 'side' );\n }", "function ysg_posts_columns( $column, $post_id ) {\n switch ( $column ) {\n \tcase 'ysg_image':\n\t\t\t$ysgGetId = get_post_meta($post_id, 'valor_url', true );\n\t\t\t$ysgPrintId = ysg_youtubeEmbedFromUrl($ysgGetId);\n\t\t\techo sprintf( '<a href=\"%1$s\" title=\"%2$s\">', admin_url( 'post.php?post=' . $post_id . '&action=edit' ), get_the_title() );\n\t\t\tif ( has_post_thumbnail()) { \n\t\t\t\tthe_post_thumbnail(array(150,90)); \n\t\t\t}else{\n\t\t\t\techo '<img title=\"'. get_the_title().'\" alt=\"'. get_the_title().'\" src=\"http://img.youtube.com/vi/' . $ysgPrintId .'/mqdefault.jpg\" width=\"150\" height=\"90\" />';\t\n\t\t\t}\n\t\t\techo '</a>';\n break;\n\n case 'ysg_title':\n echo sprintf( '<a href=\"%1$s\" title=\"%2$s\">%2$s</a>', admin_url( 'post.php?post=' . $post_id . '&action=edit' ), get_the_title() );\n break;\n \n case \"ysg_categories\":\n\t\t$ysgTerms = get_the_terms($post_id, 'youtube-videos');\n\t\tif ( !empty( $ysgTerms ) )\n\t\t{\n\t\t\t$ysgOut = array();\n\t\t\tforeach ( $ysgTerms as $ysgTerm )\n\t\t\t\t$ysgOut[] = '<a href=\"edit.php?post_type=youtube-gallery&youtube-videos=' . $ysgTerm->slug . '\">' . esc_html(sanitize_term_field('name', $ysgTerm->name, $ysgTerm->term_id, 'youtube-videos', 'display')) . '</a>';\n\t\t\techo join( ', ', $ysgOut );\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo __( 'Sem Categoria', 'youtube-simple-gallery' );\n\t\t}\n\t\tbreak;\n\t\t\t\n case 'ysg_url':\n $idvideo = get_post_meta($post_id, 'valor_url', true ); \n echo ! empty( $idvideo ) ? sprintf( '<a href=\"%1$s\" target=\"_blank\">%1$s</a>', esc_url( $idvideo ) ) : '';\n break;\n }\n}", "protected function setDescription() {\r\n\t\t$descriptionCrop = intval($this->settings['news']['semantic']['general']['description']['crop']);\r\n\t\t$descriptionAction = $this->settings['news']['semantic']['general']['description']['action'];\r\n\t\t$descriptionText = $this->newsItem->getTeaser();\r\n\t\tif (empty($descriptionText)) {\r\n\t\t\t$descriptionText = $this->newsItem->getBodytext();\r\n\t\t}\r\n\t\tif (!empty($descriptionText) && !empty($descriptionAction)) {\r\n\t\t\tif (!empty($GLOBALS['TSFE']->page['description'])) {\r\n\t\t\t\tswitch ($descriptionAction) {\r\n\t\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t\t$descriptionText .= ': ' . $GLOBALS['TSFE']->page['description'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'append':\r\n\t\t\t\t\t\t$descriptionText = $GLOBALS['TSFE']->page['description'] . ': ' . $descriptionText;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->description = $this->contentObject->crop($descriptionText, $descriptionCrop . '|...|' . TRUE);\r\n\t\t}\r\n\t}", "function js_custom_set_custom_edit_project_columns( $columns ) {\n\tunset( $columns['author'] );\n\tunset( $columns['categories'] );\n\tunset( $columns['tags'] );\n\tunset( $columns['comments'] );\n\tunset( $columns['date'] );\n\tunset( $columns['title'] );\n\treturn $columns;\n}", "function remove_default_custom_fields( $type, $context, $post ) {\n foreach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n foreach ( $this->postTypes as $postType ) {\n remove_meta_box( 'postcustom', $postType, $context );\n }\n }\n }", "function quasar_get_post_loop_description(){\n\tglobal $post;\n\tif(!$post) return;\n\t\n\t$summary_choice = xr_get_option('post_summary','content');//or excerpt;\n\t\n\t$return = '';\n\t\n\tif($summary_choice === 'content'){\n\t\t$return = quasar_get_the_content();\n\t}elseif($summary_choice === 'excerpt'){\n\t\t$return = rock_check_p(get_the_excerpt());\n\t\t$return .= quasar_get_read_more_link();\n\t}\n\t\n\treturn $return;\n}", "function column_caption( $item ) {\r\n\t\treturn esc_attr( $item->post_excerpt );\r\n\t}", "function edithistory_uninstall()\n{\n\tglobal $db;\n\tif($db->table_exists(\"edithistory\"))\n\t{\n\t\t$db->drop_table(\"edithistory\");\n\t}\n\n\tif($db->field_exists(\"reason\", \"posts\"))\n\t{\n\t\t$db->drop_column(\"posts\", \"reason\");\n\t}\n}", "function wpse_remove_edit_post_link( $link ) {\nreturn '';\n}", "public function column_comments($post)\n {\n }", "public function column_comments($post)\n {\n }", "function disable_wpseo_remove_columns( $columns )\n {\n\t\tunset( $columns['wpseo-score'] );\n\t\tunset( $columns['wpseo-links'] );\n\t\tunset( $columns['wpseo-linked'] );\n\t\tunset( $columns['wpseo-score-readability'] );\n\t\t\t\n \treturn $columns;\n }", "function dfcg_help_desc() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help - Descriptions', DFCG_DOMAIN ); ?></h3>\n\t\n\t<p><?php _e( 'The Description is the text which appears below the post/Page title in the gallery Slide Pane.</p>\n\t<p>Four different options for creating the description are available: two \"auto\" options, one \"manual\" option, and one option to disable the description altogether.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'If you want total control over the text, check the <span class=\"bold-italic\">Manual</span> option and enter the descriptions in the in-post DCG Metabox for each post/Page. This option also allows you to set up a fallback description which will be displayed if a DCG Metabox description does not exist.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'The recommended \"auto\" option is <span class=\"bold-italic\">Auto</span>. This automatically creates a description from the post/Page content and allows you to specify the length of the description and customise its Read More link.', DFCG_DOMAIN ); ?></p>\n\t\n\t<p><?php _e( 'The alternative \"auto\" option is the <span class=\"bold-italic\">Excerpt</span> option. This will display the post/Page Excerpt - either the handcrafted one if it exists, or an automatic Excerpt of the first 55 words of the post/Page. Bear in mind using an automatic Excerpt will probably result in too much text for the Slide Pane, though this can be dealt with by using the WordPress excerpt filter. You can learn more about this filter <a href=\"http://www.studiograsshopper.ch/code-snippets/customising-the_excerpt/\" target=\"_blank\">here</a>.', DFCG_DOMAIN ); ?></p>\n\n<?php\n}", "function magazine_remove_entry_meta() {\n\tif ( ! is_single() ) {\n\t\tremove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );\n\t\tremove_action( 'genesis_entry_footer', 'genesis_post_meta' );\n\t\tremove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );\n\t}\n\n}", "public function custom_category_descriptions_allow_html() {\n\t\t$filters = array(\n\t\t\t'pre_term_description',\n\t\t\t'pre_link_description',\n\t\t\t'pre_link_notes',\n\t\t\t'pre_user_description',\n\t\t);\n\n\t\tforeach ( $filters as $filter ) {\n\t\t\tremove_filter( $filter, 'wp_filter_kses' );\n\t\t}\n\t\tremove_filter( 'term_description', 'wp_kses_data' );\n\t}", "static function cleanupDescription($string){\n \n }", "function description($d) {\r\n\t\treturn ( (!empty($d)) ? '<br />' . '<span class=\"description\">'.$d. '</span>' : '');\r\n\t}", "function remove_default_categories_box() {\n remove_meta_box('categorydiv', 'post', 'side');\n}", "public function blogdescription() {\n\n\t\tbloginfo( 'description' );\n\n\t}", "function excerpt_remove_blocks($content)\n {\n }", "public function metabox_field_description( $description, $name, $post_id ) {\n\n\t\t$field_object = get_field_object( $name, $post_id );\n\n\t\tif ( $field_object && isset( $field_object['label'] ) && isset( $field_object['type'] ) ) {\n\t\t\tif ( $this->acf_field_settings->field_should_be_set_to_copy_once( $field_object ) ) {\n\t\t\t\t$field_data = [\n\t\t\t\t\t__( 'This type of ACF field will always be set to \"Copy once\".', 'acfml' ),\n\t\t\t\t];\n\t\t\t} else {\n\t\t\t\t$field_data = array(\n\t\t\t\t\t__( 'ACF field name:', 'acfml' ),\n\t\t\t\t\t$field_object['label'],\n\t\t\t\t\t__( 'ACF field type:', 'acfml' ),\n\t\t\t\t\t$field_object['type'],\n\t\t\t\t);\n\t\t\t}\n\t\t\t$description .= implode( ' ', $field_data );\n\t\t}\n\n\t\treturn $description;\n\t}", "function ungrynerd_columns_content($column_name, $post_ID) {\n if ($column_name == 'project') {\n $post_type = get_post_type( $post_ID);\n $terms = get_the_terms($post_ID, 'project');\n if (!empty($terms) ) {\n foreach ( $terms as $term )\n $post_terms[] =\"<a href='edit.php?post_type={$post_type}&{$column_name}={$term->slug}'> \" .esc_html(sanitize_term_field('name', $term->name, $term->term_id, $taxonomy, 'edit')) . \"</a> <br>\";\n echo join('', $post_terms );\n }\n else echo '<i>Sin proyecto. </i>';\n }\n}", "public function remove_meta_box() {\r\n\r\n\t\tif( ! is_wp_error( $this->tax_obj ) && isset($this->tax_obj->object_type) ) foreach ( $this->tax_obj->object_type as $post_type ):\r\n\t\t\t$id = ! is_taxonomy_hierarchical( $this->taxonomy ) ? 'tagsdiv-'.$this->taxonomy : $this->taxonomy .'div' ;\r\n\t \t\tremove_meta_box( $id, $post_type, 'side' );\r\n\t \tendforeach;\r\n\t}", "function thumbnail_column_contents( $column_name, $post_id ) {\n\t\t\t\t\n\t\tif ( $column_name != 'logo' )\n\t\t\treturn;\n\t\t\t\t\n\t\tif ( function_exists('the_post_thumbnail') )\n\t\t\techo '<a href=\"' . get_edit_post_link( $post_id ) . '\" title=\"' . __( 'Edit Sponsor', self::$text_domain ) . '\">' . get_the_post_thumbnail( $post_id, 'sponsor-admin-thumb' ) . '</a>';\n\t\t\t\t\t\n\t}", "function emc_taxonomy_description( $description = null ) {\r\n\r\n\tif ( isset( $description ) ){\r\n\t\t$desc = $description;\r\n\t} else {\r\n\t\tglobal $wp_query;\r\n\t\t$term = $wp_query->get_queried_object();\r\n\t\t$desc = $term->description;\r\n\t}\r\n\r\n\t$html = apply_filters( 'the_content', $desc );\r\n\treturn $html;\r\n\r\n}", "function edit_columns_html($column, $post_id){\n // ...\n }", "function edit_columns_html($column, $post_id){\n \n switch($column){\n \n // Name\n case 'name':\n \n echo '<code style=\"font-size: 12px;\">' . $this->get_name($post_id) . '</code>';\n break;\n \n // Field Groups\n case 'field_groups':\n \n $return = '—';\n \n $field_groups = acf_get_array(get_field('acfe_form_field_groups', $post_id));\n \n if(!empty($field_groups)){\n \n $links = array();\n \n foreach($field_groups as $key){\n \n $field_group = acf_get_field_group($key);\n \n if(!$field_group)\n continue;\n \n if(acf_maybe_get($field_group, 'ID')){\n \n $links[] = '<a href=\"' . admin_url(\"post.php?post={$field_group['ID']}&action=edit\") . '\">' . $field_group['title'] . '</a>';\n \n }else{\n \n $links[] = $field_group['title'];\n \n }\n \n }\n \n $return = implode(', ', $links);\n \n }\n \n echo $return;\n break;\n \n // Actions\n case 'actions':\n \n $return = '—';\n \n $icons = array();\n \n if(have_rows('acfe_form_actions', $post_id)):\n while(have_rows('acfe_form_actions', $post_id)): the_row();\n \n // Custom\n if(get_row_layout() === 'custom'){\n \n $action_name = get_sub_field('acfe_form_custom_action');\n \n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-editor-code\" title=\"Custom action: ' . $action_name . '\"></span>';\n \n }\n \n // E-mail\n elseif(get_row_layout() === 'email'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-email\" title=\"E-mail\"></span>';\n }\n \n // Post\n elseif(get_row_layout() === 'post'){\n \n $action = get_sub_field('acfe_form_post_action');\n \n // Insert\n if($action === 'insert_post'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-edit\" title=\"Create post\"></span>';\n }\n \n // Update\n elseif($action === 'update_post'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-update\" title=\"Update post\"></span>';\n }\n \n }\n \n // Term\n elseif(get_row_layout() === 'term'){\n \n $action = get_sub_field('acfe_form_term_action');\n \n // Insert\n if($action === 'insert_term'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-category\" title=\"Create term\"></span>';\n }\n \n // Update\n elseif($action === 'update_term'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-category\" title=\"Update term\"></span>';\n }\n \n }\n \n // User\n elseif(get_row_layout() === 'user'){\n \n $action = get_sub_field('acfe_form_user_action');\n \n // Insert\n if($action === 'insert_user'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-admin-users\" title=\"Create user\"></span>';\n }\n \n // Update\n elseif($action === 'update_user'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-admin-users\" title=\"Update user\"></span>';\n }\n \n // Update\n elseif($action === 'log_user'){\n $icons[] = '<span class=\"acf-js-tooltip dashicons dashicons-migrate\" title=\"Log user\"></span>';\n }\n \n }\n \n endwhile;\n endif;\n \n if(!empty($icons)){\n $return = implode('', $icons);\n }\n \n echo $return;\n break;\n \n // Shortcode\n case 'shortcode':\n \n echo '<code style=\"font-size: 12px;\">[acfe_form name=\"' . $this->get_name($post_id) . '\"]</code>';\n break;\n \n }\n \n }", "public function render_meta_hide_fields_for_post($post){\n\n\t\t// Add an nonce field so we can check for it later.\n\t\twp_nonce_field('post_metabox_hide_fields_for_post', 'post_metabox_hide_fields_for_post_nonce');\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_box_author , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_box_author.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_box_author.'\">'.__('Hide about author', THEME_NAME).'</label></div>';\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_related , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_related.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_related.'\">'.__('Hide related', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_date , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_date.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_date.'\">'.__('Hide published date', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_author , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_author.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_author.'\">'.__('Hide meta author', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_categories , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_categories.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_categories.'\">'.__('Hide meta categories', THEME_NAME).'</label></div>';\n\n\t \t$value = get_post_meta( $post->ID, self::$checkbox_post_meta_tags , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_meta_tags.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for='.self::$checkbox_post_meta_tags.'\">'.__('Hide meta tags', THEME_NAME).'</label></div>';\n\n\t\t$value = get_post_meta( $post->ID, self::$checkbox_post_comments , true );\n\t\t$value = intval($value);\n\t\techo '<div><input type=\"checkbox\" name=\"'.self::$checkbox_post_comments.'\" value=\"1\" '.checked( $value, 1, false).'>&nbsp;';\n\t \techo '<label for=\"'.self::$checkbox_post_comments.'\">'.__('Hide comments', THEME_NAME).'</label></div>';\n\t}", "function replace_widjets_content() {\n remove_action( 'widgets_init', 'envo_storefront_widgets_init' );\n}", "function bpi_page_columns($columns) {\n\tunset($columns['author']); \n\tunset($columns['date']); \n\tunset($columns['comments']); \t\n\t$columns['template'] = 'Template';\n\t$columns['last_updated'] = 'Last Updated'; \t \n return $columns;\n}", "function remove_yoast_meta_boxes() {\n\t$post_types = array(\n\t\t'ucf_resource_link',\n\t\t'ucf_section'\n\t);\n\tforeach ( $post_types as $post_type ) {\n\t\tremove_meta_box( 'wpseo_meta', $post_type, 'normal' );\n\t}\n}", "public function get_description() {\n\t\treturn $this->_post->post_excerpt;\n\t}", "public function hideMetaBoxes()\n {\n remove_meta_box( 'pageparentdiv', 'playscripts', 'side' );\n // for some odd reason this doesn't always work. Very annoying.\n remove_meta_box( 'postimagediv', 'playscripts', 'side' );\n }", "public function processDescription($desc) {\n $desc = preg_replace('/\\s|<[^>]+>/m', ' ', $desc);\n $desc = preg_replace('/(.{69}\\S{0,10}\\s)/m', \"$1\\n * \", $desc);\n $desc = preg_replace('/[ \\t]{2,}/m', ' ', $desc);\n return $desc;\n }" ]
[ "0.736274", "0.65961874", "0.65634054", "0.6537477", "0.6525034", "0.6520288", "0.63983405", "0.63830006", "0.6341841", "0.6320486", "0.6189335", "0.61568725", "0.6150043", "0.6078403", "0.60531354", "0.6034847", "0.6015341", "0.6013556", "0.59744555", "0.59548175", "0.593562", "0.58976746", "0.5879324", "0.5878971", "0.5878215", "0.58749264", "0.5867155", "0.5850706", "0.58219326", "0.5820798", "0.5820781", "0.58014804", "0.58008546", "0.5794863", "0.57898223", "0.57883483", "0.57873875", "0.57817125", "0.5781367", "0.577044", "0.57567656", "0.5729786", "0.5724209", "0.57214874", "0.56968755", "0.56908023", "0.56843007", "0.5678155", "0.56635636", "0.56575006", "0.5623421", "0.55876386", "0.5583701", "0.55754113", "0.5574635", "0.5570422", "0.55699515", "0.55621034", "0.55584615", "0.55542415", "0.5539271", "0.5538793", "0.55386287", "0.55284184", "0.55130786", "0.5513", "0.55093896", "0.5509076", "0.55085635", "0.55081385", "0.5507786", "0.55044055", "0.54986894", "0.54917663", "0.5481564", "0.54812026", "0.548063", "0.54731536", "0.5461069", "0.5451921", "0.54430276", "0.54363114", "0.5431907", "0.5417496", "0.5404454", "0.5393504", "0.53842306", "0.5381233", "0.5380497", "0.53792757", "0.53758883", "0.5375829", "0.53733224", "0.53688776", "0.5358851", "0.5355301", "0.53541917", "0.53478247", "0.53474444", "0.53440064" ]
0.67448777
1
This function manages visibility of different parts of the Admin view.
public function manage_admin_menu_options() { global $submenu; remove_meta_box("dashboard_primary", "dashboard", "side"); // WordPress.com blog remove_meta_box("dashboard_secondary", "dashboard", "side"); // Other WordPress news add_post_type_support('prompts', 'comments'); remove_menu_page('index.php'); // Remove the dashboard link from the Wordpress sidebar. remove_menu_page('edit.php'); // remove default post type. remove_menu_page('edit.php?post_type=page'); // remove default page type. remove_menu_page('upload.php'); // remove default post type. add_menu_page('artworks', 'Artworks', 'manage_options', 'edit-tags.php?taxonomy=artworks&post_type=prompts', '', 'dashicons-format-image', 5); if ( !current_user_can( 'administrator' ) ) { if ( isset( $submenu['themes.php']) ) { foreach ($submenu['themes.php'] as $key => $menu_item ) { if ( in_array('Customize', $menu_item ) ) { unset( $submenu['themes.php'][$key] ); } if ( in_array('Themes', $menu_item ) ) { unset( $submenu['themes.php'][$key] ); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isAdminPanelVisible() {}", "function visible () {\n\t\treturn isadmin();\n\t}", "function visible_to_admin_user()\n\t{\n\t\treturn true;\n\t}", "public function setupVisibility();", "public function displayAdminPanel() {}", "function is_visible() {\n\t\tif ($this->visibility=='hidden') return false;\n\t\tif ($this->visibility=='visible') return true;\n\t\tif ($this->visibility=='search' && is_search()) return true;\n\t\tif ($this->visibility=='search' && !is_search()) return false;\n\t\tif ($this->visibility=='catalog' && is_search()) return false;\n\t\tif ($this->visibility=='catalog' && !is_search()) return true;\n\t}", "public function adminPanel() {\n $posts = $this->postManager->getPosts();\n $comments = $this->commentManager->getFlaggedComments();\n $view = new View(\"Administration\");\n $view->generate(array('posts' => $posts, 'comments' => $comments));\n }", "protected function matchHideForNonAdminsCondition() {}", "function isAdmin() {\n //FIXME: This needs to (eventually) evaluate that the user is both logged in *and* has admin credentials.\n //Change to false to see nav and detail buttons auto-magically disappear.\n return true;\n}", "function AdminVisible(){\n if(!LoggedIn()){\n if(isset($_SESSION['level'])){\n if($_SESSION['level'] == 1){\n return 1;\n }\n }\n }\n }", "private function showAdmin() : bool\n {\n return \\apply_filters(self::FILTER_SHOW_ADMIN, true) === true;\n }", "function audioman_section_visibility_options() {\n\t$options = array(\n\t\t'homepage' => esc_html__( 'Homepage / Frontpage', 'audioman' ),\n\t\t'entire-site' => esc_html__( 'Entire Site', 'audioman' ),\n\t\t'disabled' => esc_html__( 'Disabled', 'audioman' ),\n\t);\n\n\treturn apply_filters( 'audioman_section_visibility_options', $options );\n}", "public function show_admin_page() {\n\t\t$this->view->render();\n\t}", "public function setVisibility() {}", "function VisibleToAdminUser()\n {\n\tinclude (\"dom.php\");\n return $this->CheckPermission($pavad.' Use');\n }", "public function isVisible();", "public function isVisible();", "public function get_visibility()\n {\n }", "function load_sailthru_admin_display() {\n\n\t\t$active_tab = empty( $this->views[ current_filter() ] ) ? '' : $this->views[ current_filter() ];\n\t\t// display html\n\t\tinclude SAILTHRU_PLUGIN_PATH . 'views/admin.php';\n\n\t}", "function getVisible() {return $this->readVisible();}", "public function isAdmin(){\n\t\tparent::isAdmin();\n\t}", "public function adminOnly();", "public function adminOnly();", "private function add_model_visibility()\n {\n }", "private function adminContentArea(): void {\n global $security;\n global $media_admin;\n global $media_manager;\n\n // Prepare Query\n if(($absolute = MediaManager::absolute($_GET[\"path\"] ?? DS)) === null) {\n $absolute = PATH_UPLOADS_PAGES;\n $relative = DS;\n } else {\n $relative = MediaManager::relative($absolute);\n }\n\n // Load Main Content Modal\n include \"admin\" . DS . \"modal.php\";\n\n // Load Modals\n \trequire \"admin\" . DS . \"modal-folder.php\";\n if(PAW_MEDIA_PLUS) {\n require \"admin\" . DS . \"modal-search.php\";\n }\n }", "function xanthia_admin_view()\n{\n\t/** Security check - important to do this as early as possible to avoid\n\t * potential security holes or just too much wasted processing. For the\n\t * main function we want to check that the user has at least edit privilege\n\t * for some item within this component, or else they won't be able to do\n\t * anything and so we refuse access altogether. The lowest level of access\n\t * for administration depends on the particular module, but it is generally\n\t * either 'edit' or 'delete'\n\t */\n\tif (!pnSecAuthAction(0, 'Xanthia::', '::', ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n\t}\n\n\t// Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n \t}\n\n\t// Load admin API\n\tif (!pnModAPILoad('Xanthia', 'admin')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n \t}\n\n\t// Create output object - this object will store all of our output so that\n\t// we can return it easily when required\n\t$pnRender =& new pnRender('Xanthia');\n\n\t// As Admin output changes often, we do not want caching.\n\t$pnRender->caching = false;\n\n $pnRender->assign('showhelp', pnModGetVar('Xanthia','help'));\n\n\t// Themes\n\t// Get a list of all themes in the themes dir\n\t$allthemes = pnModAPIFunc('Xanthia','user','getAllThemes');\n\t// Get a list of all themes in database\n\t$allskins = pnModAPIFunc('Xanthia','user','getAllSkins');\n\n\t$skins = array();\n if ($allskins) {\n\t foreach($allskins as $allskin) {\n\t $skins[] = $allskin['name'];\n\t }\n\t}\n\n // Generate an Authorization ID\n $authid = pnSecGenAuthKey();\n\t$pnRender->assign('authid', $authid);\n\n if ($allthemes){\n //Start Foreach\n foreach($allthemes as $themes) {\n // Add applicable actions\n $actions = array();\n\n \t\tswitch ($themes) {\n //If theme is active in Xanthia then show the edit theme link\n\t\t case in_array($themes, $skins):\n $state = 1;\n break;\n //If theme is not active in Xanthia then show the add theme link \n\t\t\t default:\n $state = 0;\n break;\n\t\t\t}\n \n\t $theme[] = array('state' => $state,\n\t\t\t\t\t\t 'themename' => $themes);\n //End Foreach\n }\n }\n\t$pnRender->assign('theme', $theme);\n // Return the output that has been generated to the template\n return $pnRender->fetch('xanthiaadminviewmain.htm');\n}", "public function isAdmin();", "function isVisible() {\n return ($this->entry->staff_id || $this->entry->user_id)\n && $this->entry->type != 'R' && $this->isEnabled();\n }", "public function isAdmin() {}", "protected function isAdminSidebarSecondVisible()\n {\n return false;\n }", "protected function isVisible()\n {\n $result = parent::isVisible()\n && static::getWidgetTarget() != \\XLite\\Core\\Request::getInstance()->target\n && 0 < $this->getData(new \\XLite\\Core\\CommonCell, true);\n\n if ($result) {\n\n if (!\\XLite\\Core\\CMSConnector::isCMSStarted()) {\n\n if (self::WIDGET_TYPE_SIDEBAR == $this->getParam(self::PARAM_WIDGET_TYPE)) {\n $result = in_array($this->viewListName, array('sidebar.second', 'sidebar.single'));\n\n } elseif (self::WIDGET_TYPE_CENTER == $this->getParam(self::PARAM_WIDGET_TYPE)) {\n $result = ('center.bottom' == $this->viewListName);\n }\n }\n }\n\n return $result;\n }", "public function is_visible() {\n\t\treturn true;\n\t}", "public function isAdmin() {\n\t\treturn ($this->getModule() != RublonMagentoModule::FRONT);\n\t}", "public static function show(){\n return Auth::check() && Auth::user()->isAdmin();\n }", "function isVisible() {\n return $this->entry->staff_id && $this->entry->type == 'R'\n && !parent::isEnabled();\n }", "public function AdminView(){\n //Restricting this view for operators (Only SuperAdmins should be able to view)\n if(Auth::user()->role ==='Admin'){\n\n $data['allData'] = Admin::all();\n return view('backend.admin.view_admin',$data);\n\n }else{\n return redirect('admin/error')->with('error', 'You are not allowed to access this page');\n }\n }", "function starter_hide_acf_admin() {\n\t\t\t// Get the current site url.\n\t\t\t$site_url = get_bloginfo( 'url' );\n\n\t\t\t// An array of protected site urls.\n\t\t\t$protected_urls = array(\n\t\t\t\t'',\n\t\t\t);\n\t\t\t// Check if the current site url is in the protected urls array.\n\t\t\tif ( in_array( $site_url, $protected_urls, true ) ) {\n\t\t\t\t// Hide the acf menu item.\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\t// Show the acf menu item.\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}", "public function adminmenu()\n {\n\n $vue = new ViewAdmin(\"Administration\");\n $vue->generer(array());\n }", "function getVisible() { return $this->readVisible(); }", "function jmw_permit_admin_to_edit_field_visibility( $retval, $capability, $blog_id, $args ) {\n\n \tif( 'bp_xprofile_change_field_visibility' != $capability ) {\n \t\treturn $retval;\n \t}\n\n \tif( current_user_can( 'manage_options' ) ) {\n \t\t$retval = true;\n \t}\n \telse {\n \t\t$retval = false;\n \t}\n\n \treturn $retval;\n }", "public static function admin()\n {\n HRHarvardTheme::get_template_part( 'admin', 'nav-widget' );\n }", "function getVisible() { return $this->readVisible(); }", "public function adminPanel()\n {\n $userManager = new UserManager;\n $infoUser = $userManager->getInfo($_SESSION['id_user']);\n if ($_SESSION['id_user'] == $infoUser['id'] and $infoUser['rank_id'] == 1) {\n $postManager = new PostManager;\n $commentManager = new CommentManager;\n $findPost = $postManager->getPosts();\n $commentReport = $commentManager->getReport();\n $unpublished = $commentManager->getUnpublished();\n require('Views/Backend/panelAdminView.php');\n } else {\n throw new Exception('Vous n\\'êtes pas autorisé à faire cela');\n }\n }", "public function getAdminGrid(){\n return false;\n }", "public function isVisible()\n {\n return $this->attribute('state') != self::STATUS_MODERATED;\n }", "public function admin()\n {\n $this->template_admin->displayad('admin');\n }", "function cc_hide_admin_bar() {\n\t$adminBar = current_user_can_for_blog( get_current_blog_id(),'edit_others_posts' );\n\n\tif ( ! $adminBar ) {\n\t\tshow_admin_bar( false );\n\t}\n}", "function hide_admin_bar()\n\t{\n\t\tif (!current_user_can('administrator') && !is_admin()) {\n\t\t //show_admin_bar(false);\n\t\t}\n\t\tshow_admin_bar(false);\n\t}", "private function _showPublic(){\n $omenu = D('Menu');\n $amodules = $omenu->getModules();\n $this->assign('modules',$amodules);\n $amenu = $omenu->getMenuByModelName(MODULE_NAME);\n $asubNav = array();\n $amenus = array();\n $asubmenus = array();\n $temp = array();\n foreach($amenu as $v){\n if(!$this->_auth($v['name'])) continue;\n switch(count(explode(',',$v['level']))){\n case 2:\n $amenus[$v['id']] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL'],\n 'icon' => $v['icon']\n );\n if(MODULE_NAME == $v['name']){\n $anav[] = array(\n 'title' => $amodules[$v['pId']]['title'],\n 'URL' => $amodules[$v['pId']]['URL'],\n 'icon' => $amodules[$v['pId']]['icon']\n );\n $anav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL']\n );\n $amenus[$v['id']]['active'] = true;\n $icon = $v['icon'];\n }else{\n $amenus[$v['id']]['active'] = false;\n }\n break;\n case 3:\n $amenus[$v['pId']]['submenu'][$v['id']] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL']\n );\n if($foundSubNav){\n $stop = true;\n break;\n }else{\n $asubNav = array();\n }\n\n if($v['name'] == MODULE_NAME.'_'.ACTION_NAME){\n $bnatchNav || $bmatchNav = true;\n $foundSubNav = true;\n $anav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL'],\n 'class' => 'current'\n );\n $tcontentTitle = $v['title'];\n }else{\n $temp = array(\n 'title' => $v['title'],\n 'URL' => $v['URL'],\n );\n $bmatchNav && $bmatchNav = false;\n }\n break;\n case 4:\n if($foundSubNav && $stop) break;\n if($bmatchNav){\n $asubNav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL']\n );\n $tsubContentTitle = $tcontentTitle;\n }else{\n $asubNav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL']\n );\n //$tsubContentTitle = $temp['name'];\n if(MODULE_NAME.'_'.ACTION_NAME == $v['name']){\n $foundSubNav = true;\n $tsubContentTitle = $v['title'];\n $tcontentTitle = $temp['title'];\n $anav[] = array(\n 'title' => $temp['title'],\n 'URL' => $temp['URL']\n );\n $anav[] = array(\n 'title' => $v['title'],\n 'URL' => $v['URL'],\n 'class' => 'current'\n );\n $asubNav[count($asubNav)-1]['active'] = true;\n }\n }\n break;\n }\n }\n $this->assign('menu',$amenus);\n $this->assign('nav',$anav);\n $this->assign('contentTitle',$tcontentTitle);\n $this->assign('subnav',$asubNav);\n $this->assign('subContentTitle',$tsubContentTitle);\n $this->assign('icon',$icon);\n }", "protected function AdminPage() {\n\t$oMenu = fcApp::Me()->GetHeaderMenu();\n\t\n\t\t\t // ($sGroupKey,$sKeyValue=TRUE,$sDispOff=NULL,$sDispOn=NULL,$sPopup=NULL)\n $oMenu->SetNode($ol = new fcMenuOptionLink('show','all','show all',NULL,'show inactive as well as active'));\n\t $doAll = $ol->GetIsSelected();\n \n\tif ($doAll) {\n\t $rs = $this->SelectRecords(NULL,'Sort');\n\t} else {\n\t $rs = $this->ActiveRecords();\n\t}\n\treturn $rs->AdminRows();\n }", "public function isAdmin()\n {\n }", "function user_can_access_admin_page()\n {\n }", "public function show_in_admin_bar()\n\t{\n\t\treturn !( self::const_value( 'DEVDEBUG_NO_ADMIN_BAR' ) );\n\t}", "private function canHideLists() {\n\t\treturn $this->getUser()->isAllowed( 'gather-hidelist' );\n\t}", "public function displayInAdmin()\n {\n return self::_enabled();\n }", "public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }", "public function actionVisible ()\n\t\t{\n\t\t\tif (Yii::$app->request->isAjax)\n\t\t\t{\n\t\t\t\t$id = Yii::$app->request->post('id');\n\t\t\t\t$menu = Menu::findOne($id);\n\t\t\t\tif ($menu !== null)\n\t\t\t\t{\n\t\t\t\t\t$menu->setAttribute('visible', $menu->visible == 1 ? 0 : 1);\n\t\t\t\t\tif (!$menu->save())\n\t\t\t\t\t\techo Json::encode(current($menu->firstErrors));\n\t\t\t\t\telse\n\t\t\t\t\t\techo $menu->visible;\n\t\t\t\t}\n\t\t\t}\n\t\t\tYii::$app->end();\n\t\t}", "public function admin_page()\n {\n }", "public function admin_page()\n {\n }", "public function isVisible()\n {\n return true;\n }", "function miracle_add_visibility_fields($widget, $instance = false)\n {\n if ('advanced_text' == get_class($widget))\n return;\n\n $conditions = $this->miracle_widget_visibility_conditions();\n\n if (!$instance)\n {\n $widget_settings = get_option($widget->option_name);\n $instance = $widget_settings[$widget->number];\n }\n\n $allSelected = $homeSelected = $postSelected = $postInCategorySelected = $pageSelected =\n $categorySelected = $blogSelected = $searchSelected = false;\n switch ($instance['action'])\n {\n case \"1\":\n $showSelected = true;\n break;\n case \"0\":\n $dontshowSelected = true;\n break;\n }\n\n?>\t\t\t\n\t<div class=\"atw-conditions\">\n\t<strong><?php _e('Widget Visibility:', $this->textdomain);?></strong>\n <br /><br />\n\t<label for=\"<?php echo $widget->get_field_id('action');?>\" title=\"<?php _e('Show only on specified page(s)/post(s)/category. Default is All', $this->textdomain); ?>\" style=\"line-height:35px;\">\t\t\n\t<select name=\"<?php echo $widget->get_field_name('action');?>\">\n <option value=\"1\" <?php echo ($showSelected)? 'selected=\"selected\"':'';?>><?php _e('Show', $this->textdomain);?></option>\n\t\t\t<option value=\"0\" <?php echo ($dontshowSelected)? 'selected=\"selected\"':'';?>><?php _e('Do NOT show', $this->textdomain);?></option>\n\t\t</select> \n <?php _e('on', $this->textdomain); ?>\n\t\t<select name=\"<?php echo $widget->get_field_name('show');?>\" id=\"<?php echo $widget->get_field_id('show');?>\">\n <?php\n if (is_array($conditions) && !empty($conditions))\n {\n foreach ($conditions as $k => $item)\n {\n $output .= '<option label=\"' . $item['name'] . '\" value=\"' . $k . '\"' . selected($instance['show'],\n $k) . '>' . $item['name'] . '</option>';\n }\n }\n echo $output;\n ?>\n\t\t</select>\n\t</label>\n\t<br/> \n\t<label for=\"<?php echo $widget->get_field_id('slug'); ?>\" title=\"<?php _e('Optional limitation to specific page, post or category. Use ID, slug or title.',$this->textdomain);?>\"><?php _e('Slug/Title/ID:',$this->textdomain); ?> \n\t\t<input type=\"text\" style=\"width: 99%;\" id=\"<?php echo $widget->get_field_id('slug');?>\" name=\"<?php echo $widget->get_field_name('slug');?>\" value=\"<?php echo htmlspecialchars($instance['slug']); ?>\" />\n\t</label>\n\t<?php\n if ($postInCategorySelected)\n _e(\"<p>In <strong>Post In Category</strong> add one or more cat. IDs (not Slug or Title) comma separated!</p>\",$this->textdomain);\n ?>\n\t<br />\n\t<label for=\"<?php echo $widget->get_field_id('suppress_title'); ?>\" title=\"<?php _e('Do not output widget title in the front-end.', $this->textdomain);?>\">\n\t\t<input id=\"<?php echo $widget->get_field_name('suppress_title'); ?>\" name=\"<?php echo $widget->get_field_name('suppress_title'); ?>\" type=\"checkbox\" value=\"1\" <?php checked($instance['suppress_title'], '1', true);?> />\n <?php _e('Suppress Title Output', $this->textdomain); ?>\n\t</label>\n\t</div>\n<?php\n\n $return = null;\n }", "function __styleAdmin() {\n\t\tif (!empty($this->params['admin'])) {\n\t\t\t$this->layout = 'admin';\n\t\t}\n\t}", "public function is_admin_only()\n\t{\n\t\treturn false;\n\t}", "private function showAdminMenu() : bool\n {\n return \\apply_filters(self::FILTER_SHOW_ADMIN_MENU, true) === true;\n }", "public function IsAdmin ();", "function IsAdmin()\n{\n\treturn false;\n}", "protected function isAdminSidebarFirstVisible()\n {\n $widget = new \\Xlite\\View\\Controller;\n\n return $widget->isViewListVisible('admin.main.page.content.left')\n && !\\Xlite::getController()->isForceChangePassword();\n }", "public function getIsAdmin();", "public function getIsAdmin();", "function hide_admin_bar( $show ) {\n\tif ( ! current_user_can( 'administrator' ) ) {\n\t\treturn false;\n\t}\n\n\treturn $show;\n}", "protected function updateVisibility()\n {\n if($this->visibility === null) {\n return;\n }\n\n if ($this->instance->content->visibility != $this->visibility) {\n $this->instance->content->visibility = $this->visibility;\n\n $contentIds = [];\n foreach($this->instance->mediaList as $media) {\n $contentIds[] = $media->content->id;\n }\n\n Content::updateAll(['visibility' => $this->visibility], ['in', 'id', $contentIds]);\n }\n }", "function ParmsView() { \n $render = new AdminModel(); \n echo '<div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-md-1\"></div>\n <div class=\"col-md-4\">\n <h2>Administrators:\n <a href=\"'.DIR.'index.php?page=adminView&action=insertNewAdmin\"><i class=\"fa fa-plus-square\"></a></i>\n </h2><br>';\n \n $displayAdmins = $render->getAdmins();\n foreach ($displayAdmins as $admin) {\n echo '<div class=\"box\"><a href=\"'.DIR.'index.php/?page=adminView&action=adminDetails&id='.$admin['adminId'].'\">' .$admin['adminName'].'</a>, </br>'.\n '<img src=\"'.DIR.'upload/'.$admin['adminImage'].'\"/>'. $admin['adminPhone'] . '</br>'. $admin['adminRole'] . '</br>'. $admin['adminEmail'] .'</div></br>';\n };\n\n\t\techo '</div>\n <div class=\"col-md-5\">';\n }", "function SegmentAdmin()\n\t{\n\t\t// if we've already worked this out, return it.\n\t\tif (!is_null($this->segmentadmin)) {\n\t\t\treturn $this->segmentadmin;\n\t\t}\n\t\t\n\t\t$admin = false;\n\n\t\tif ($this->isAdmin()) {\n\t\t $admin = true;\n\t\t}\n\t\t\n\t\tif ($this->group->segmentadmin == 1) {\n\t\t $admin = true;\n\t\t}\n\t\t\n\t\t$this->segmentadmin = $admin;\n\t\t\n\t\treturn $this->segmentadmin;\n\t}", "public function showAdmins() { \n\t\n return View('admin.admins');\n\t\t\t\n }", "function isVisible() {\n return $this->entry->staff_id && $this->entry->type == 'R'\n && $this->isEnabled();\n }", "public function view_admin() {\n\t\t$this->layout = 'admin';\n\t\t$params = array('order' => 'Group.id DESC');\n\t\t$this->set('groups', $this->Group->find('all', $params));\n\t}", "public function index() {\n\n\t\t$this->Crud->addListener('SettingsSubSection', 'SettingsSubSection');\n\n\t\t$this->set('title_for_layout', __('Visualisation Settings'));\n\t\t$this->set('subtitle_for_layout', __('Use visualisations to control what is displayed to the logged user. By default they are enabled, meaning users will only see items that relate to them.'));\n\t\t\n\t\t$this->Crud->on('beforePaginate', array($this, '_beforePaginate'));\n\t\t$this->Crud->execute();\n\t}", "public function renderAdminSidebar()\r\n\t{\r\n\t\treturn;\r\n\t}", "public function renderAdminSidebar()\r\n\t{\r\n\t\treturn;\r\n\t}", "function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Error.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Error::error($error);\n return;\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }", "public function admin()\n {\n $this->view->books = $this->help->getBookList();\n $this->view->title = $this->lang->help->common;\n $this->display();\n }", "public function showAdmin() {\n\t\t// we've already done authorization to even show this link,\n\t\t// but let's double check our authorization before redirecting here too\n\t\treturn View::make('admin.index');\n\t}", "function getVisibility() {\n if($this->visibility === false) {\n $this->visibility = $this->canSeePrivate() ? VISIBILITY_PRIVATE : VISIBILITY_NORMAL;\n } // if\n return $this->visibility;\n }", "public function relatorio4(){\n $this->isAdmin();\n }", "public function isAdministrador(){ return false; }", "public function isAdmin()\n {\n return $this->group_id === 1;\n }", "public function isVisible() :bool {\n return false;\n }", "public function indexAdmin()\n {\n //\n $providers = DB::table('users')\n ->where('roles_id', '=', 1)\n ->orWhere('roles_id', '=', 4)\n ->get();\n //dd($providers);\n return view('map.adminmap')->with('parameters', Parameters::all()->sortBy('id'))\n ->with('parkingtypes', ParkingType::all()->sortBy('id'))->with('providers', $providers);\n\n }", "function adminSpecial() {\n\t\t$this->adminDefault();\n\t\t$this->baseLink = CMS_WWW_URI.'admin/special.php?module=picture_gallery';\n\t\t$this->setView('admin_list');\n\t}", "function showAllServiciosMVCadmin()\n {\n if ($this->admin) {\n $servicios = $this->serviciosModel->getServicios();\n $this->viewservices->showAllServicesPrintAdmin($servicios);\n } else {\n header(\"Location: \" . BASE_URL);\n }\n }", "function beforeRender(){\r\n //to which they have index action permission\r\n /*if($this->Auth->user()){\r\n $controllerList = Configure::listObjects('controller');\r\n $permittedControllers = array();\r\n foreach($controllerList as $controllerItem){\r\n if($controllerItem <> 'App'){\r\n if($this->__permitted($controllerItem,'index')){\r\n $permittedControllers[] = $controllerItem;\r\n }\r\n }\r\n }\r\n }\r\n $this->set(compact('permittedControllers'));*/\r\n \r\n if (isset($this->params[$this->admin]) && $this->params[$this->admin]) {\r\n $this->layout = 'admin';\r\n \r\n $action = $this->params[$this->admin];\r\n $parentId = isset($this->params['pass'][0]) ? $this->params['pass'][0] : 0;\r\n $parentUrl = isset($parentId) && !empty($parentId) ? '/' . $parentId : '';\r\n \r\n $this->set ( $this->strParentId, $parentId );\r\n $this->set ( $this->strParentUrl, $parentUrl );\r\n }\r\n \r\n if (!$this->isAuthorized) {\r\n \t$this->autoRender = false;\r\n \treturn '';\r\n }\r\n }", "public function isAdmin()\n {\n return $this->type == self::TYPE_ADMIN ;\n }", "function admin()\r\n\t{\r\n\t\t$this->permiso_model->need_admin_permition_level();\t\r\n\t\t\r\n\t\t$data = array();\r\n\t\t$data['main_content'] = 'admin_index';\r\n\r\n\t\t$this->load->model('tutor_model');\r\n\t\t$data['num_tutor'] = $this->tutor_model->count_all();\r\n\t\t\r\n\t\t$this->load->model('alumno_model');\r\n\t\t$data['num_alumno'] = $this->alumno_model->count_all();\r\n\t\t\r\n\t\t$this->load->model('tarea_model');\r\n\t\t$data['num_tarea'] = $this->tarea_model->count_all();\r\n\r\n\t\t$this->load->model('grupo_model');\r\n\t\t$data['num_grupo'] = $this->grupo_model->count_all();\r\n\r\n\t\t$this->load->view('includes/template',$data);\r\n\t}", "public function admin(){\n $data = array('page_title' => \"Admin home\");\n $this->view->load_admin('home/admin/admin_view', $data);\n }", "public function actionAdmin() {\n\t\ttry {\n\t\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.structure.controllers');\n\t\t\t$this->setCurrentNode($this->currentContent->node);\n\t\t\t$content = new FormContent();\n\t\t\t$content->targetContentId = $this->currentContent->contentId;\n\t\t\t$content->selected = false;\n\n\t\t\t$contentCriteriaBuilder = new CriteriaBuilder('content');\n\t\t\t$contentCriteriaBuilder->filterBy('contentId', $this->currentContent->contentId);\n\n\t\t\t$this->render('admin', array(\n\t\t\t\t'breadcrumb' => $this->buildBreadcrumb($this->currentContent->contentId),\n\t\t\t\t'mainMenu' => $this->buildMainMenu(2, 4),\n\t\t\t\t'content'=>$content,\n\t\t\t\t'sourceContent'=>$this->currentContent,\n\t\t\t\t'node' => $this->currentNode,\n\t\t\t\t'contentsDataProvider' => $contentCriteriaBuilder->getActiveDataProvider(array('pagination' => false))\n\t\t\t));\n\t\t} catch(\\Exception $e) {\n\t\t\t\\Yii::log('Error in '.__METHOD__.'():'.$e->getMessage(), \\CLogger::LEVEL_ERROR, 'sweelix.yii1.admin.structure.controllers');\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function admin()\n {\n if ($this->loggedIn()) {\n $data['flights'] = $this->modalPage->getFlights();\n $data['name'] = $_SESSION['user_name'];\n $data['title'] = 'dashboard ' . $_SESSION['user_name'];\n $this->view(\"dashboard/\" . $_SESSION['user_role'], $data);\n\n } else {\n redirect('users/login');\n }\n\n }", "public function showAdmin() {\n\n\t\tif(!isset($_SESSION)) \n\t\t{ \n\t\t\tsession_start(); \n\t\t} \n\t\tif(isset($_SESSION['nickname']))\n\t\t{\n\n\t\t\t$user_manager = new UserManager();\n\t\t\t$session_user = $user_manager->get($_SESSION['nickname']);\n\t\t\t$session_user_role = $session_user->role();\n\t\t\t// You're an admin\n\t\t\tif ($session_user_role === 'admin') {\n\n\t\t\t\t$comments = array();\n\n\t\t\t\t$comment_manager = new CommentManager();\n\t\t\t\t$post_manager = new PostManager();\n\n\t\t\t\t$posts = $post_manager->getList();\n\t\t\t\t$users = $user_manager->getList();\n\n\t\t\t\t$myView = new View('admin');\n\t\t\t\t$myView->render(array(\n\n\t\t\t\t\t'posts' \t\t\t=> $posts, \n\t\t\t\t\t'post_manager' \t\t=> $post_manager, \n\t\t\t\t\t'comment_manager' \t=> $comment_manager,\n\t\t\t\t\t'users'\t\t\t\t=> $users,\n\t\t\t\t\t'comments'\t\t\t=> $comments,\n\t\t\t\t));\n\t\t\t}else { // You're not an admin\n\t\t\t\t\t\techo \"PAS ADMINISTRATEUR\";\n\t\t\t\theader('Location: '.HOST.'home.html');\n\t\t\t}\n\n\t\t}else { // You're not connected\n\t\t\theader('Location: '.HOST.'home.html');\n\t\t}\n\t}", "function is_hidden() {\n trigger_error('Admin class does not implement method <strong>is_hidden()</strong>', E_USER_WARNING);\n return;\n }", "function types_visibility_build_in_types() {\n $custom_types = get_option( WPCF_OPTION_NAME_CUSTOM_TYPES, array() );\n\n // Type: Posts\n if( isset( $custom_types['post']['public'] )\n && $custom_types['post']['public'] == 'hidden' )\n remove_menu_page( 'edit.php' );\n\n // Type: Pages\n if( isset( $custom_types['page']['public'] )\n && $custom_types['page']['public'] == 'hidden' )\n remove_menu_page( 'edit.php?post_type=page' );\n\n // Type: Media\n if( isset( $custom_types['attachment']['public'] )\n && $custom_types['attachment']['public'] == 'hidden' )\n remove_menu_page( 'upload.php' );\n}", "public function is_admin()\n {\n return $this->type == 0;\n }", "public function Admin_Workspace_Menus()\n {\n view()->composer('workspace.admin.department.page_menu',function($view){\n $departments = Department::all();\n $view->with('departments',$departments);\n });\n }" ]
[ "0.7315768", "0.71258456", "0.7008198", "0.6878531", "0.6796061", "0.67022", "0.65499794", "0.65172553", "0.6506929", "0.64387506", "0.64338845", "0.64132166", "0.6391504", "0.63882697", "0.63812035", "0.6355856", "0.6355856", "0.63440967", "0.6327233", "0.62243503", "0.62203825", "0.6217226", "0.6217226", "0.6210291", "0.61900735", "0.6183671", "0.6183366", "0.6170557", "0.6156329", "0.6152934", "0.61433905", "0.6143275", "0.61376697", "0.6132662", "0.61168176", "0.6097377", "0.60810685", "0.60646665", "0.6063839", "0.60631424", "0.6062653", "0.6054277", "0.60541946", "0.60223067", "0.6017105", "0.60106003", "0.60083336", "0.60052764", "0.5983366", "0.59786844", "0.5976651", "0.5967824", "0.5950778", "0.5950275", "0.59417593", "0.59368676", "0.5933658", "0.5930629", "0.5930629", "0.592381", "0.5921567", "0.5915379", "0.59135306", "0.5909082", "0.5904029", "0.5899748", "0.5899075", "0.5898897", "0.5898897", "0.5898883", "0.5894888", "0.5882757", "0.5878487", "0.585045", "0.5847151", "0.5844005", "0.5833515", "0.58292085", "0.58292085", "0.58262587", "0.5817983", "0.581798", "0.58158755", "0.5808906", "0.57867026", "0.5768254", "0.5765688", "0.5762924", "0.57612354", "0.5760022", "0.57599485", "0.57515925", "0.5748133", "0.57447696", "0.5744211", "0.5740823", "0.57348007", "0.5734065", "0.5730313", "0.5729279", "0.5726619" ]
0.0
-1
Additional ACF options pages can be registered here.
public function add_options_pages() { if ( function_exists('acf_add_options_page') ) { acf_add_options_page(array( "page_title" => "Explanatory Text", "capability" => "edit_posts", "position" => 50, "icon_url" => "dashicons-format-aside" )); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function acf_options_page() { \n\n\t\t\t// Check ACF Admin OK\n\t\t\tif ( ! $this->admin_acf_active() ) { return; }\n\n\t\t\t// Check Options Page OK \n\t\t\tif ( ! function_exists('acf_add_options_page') ) { return; }\n\t\t\t\n\t\t\t// Add Options Page\n\t\t\t$parent = acf_add_options_page( [ \n\t\t\t\t'title' => apply_filters( 'ipress_acf_title', 'iPress' ), \n\t\t\t\t'capability' => 'manage_options', \n\t\t\t] ); \n\n\t\t\t// Set Options Page Subpages\n\t\t\t$subpages = apply_filters( 'ipress_acf_pages', [] );\n\t \n\t\t\t// Add Subpages? \n\t\t\tif ( $subpages ) {\n\t\t\t\tforeach ( $subpages as $k=>$v ) {\n\t\t\t\t\tacf_add_options_sub_page( $v );\n\t\t\t\t} \n\t\t\t}\n\t\t}", "private function registerOptionsPages()\n {\n // add a notice and return early if we don't have ACF Pro for options pages\n if (!function_exists('acf_add_options_page') && count($this->config['acf_options'])) {\n add_action('admin_notices', function () {\n echo '<div class=\"notice notice-error is-dismissible\"><p>You have added options pages in your configuration, but the ACF plugin is not currently active.</p></div>';\n });\n return;\n }\n\n foreach ($this->config['acf_options'] as $parent_slug => $name) {\n acf_add_options_page($name);\n }\n }", "public function acf_options_page()\n {\n if( function_exists('acf_add_options_page') ) {\n\n acf_add_options_page(array(\n 'page_title' \t=> 'Import / Export',\n 'menu_title'\t=> 'Import / Export',\n 'menu_slug' \t=> 'import-export-addressbook',\n 'capability'\t=> 'edit_posts',\n 'parent_slug' => 'edit.php?post_type=mv_address_book',\n 'redirect'\t\t=> false\n ));\n\n }\n }", "public function add_options_page()\n {\n }", "public function acf_wpi_option_page() {\n\t\t// Prevent init acf wpi options if acf/acf-pro not activated.\n\t\tif ( ! class_exists( 'acf' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tacf_add_options_page(\n\t\t\tarray(\n\t\t\t\t'page_title' => __( 'ACF Wpi Options', 'acf_wpi' ),\n\t\t\t\t'menu_slug' => 'acf_wpi_options_page',\n\t\t\t\t'parent_slug' => 'options-general.php',\n\t\t\t)\n\t\t);\n\t\tModuleLoader::get_instance()->register_options_container();\n\t}", "function abecaf_register_options_page() {\n add_options_page( 'CAF Donations', 'CAF Donations', 'manage_options', 'abe-caf', 'abecaf_options_page' );\n}", "function formation_acf_pages() {\n if(function_exists('acf_add_options_page')) {\n acf_add_options_sub_page(array(\n 'page_title' => 'Formation Archive Settings', /* Use whatever title you want */\n \n 'parent_slug' => 'edit.php?post_type=formation', /* Change \"services\" to fit your situation */\n 'capability' => 'manage_options'\n ));\n }\n }", "public function setup_options_page() {\n\t\tacf_add_options_sub_page( [\n\t\t\t'page_title' \t=> _x( 'Promotions', 'Promotions page title in WP Admin', 'my-listing' ),\n\t\t\t'menu_title'\t=> _x( 'Promotions', 'Promotions menu title in WP Admin', 'my-listing' ),\n\t\t\t'menu_slug' \t=> 'theme-promotions-settings',\n\t\t\t'capability'\t=> 'manage_options',\n\t\t\t'redirect'\t\t=> false,\n\t\t\t'parent_slug' => 'case27/tools.php',\n\t\t] );\n\t}", "function add_options_page() {\n\t\tadd_options_page(\n\t\t\t'AdControl',\n\t\t\t'AdControl',\n\t\t\t'manage_options',\n\t\t\t'adcontrol',\n\t\t\tarray( $this, 'options_page' )\n\t\t);\n\t}", "public static function add_options_page() {\n\n if ( is_admin() && function_exists( 'acf_add_options_page' ) ) {\n\n $dustpress_components = array(\n 'page_title' => __( 'DustPress components settings', 'dustpress-components' ),\n 'menu_title' => __( 'Components settings', 'dustpress-components' ),\n 'menu_slug' => __( 'components-settings', 'dustpress-components' ),\n 'capability' => 'manage_options',\n );\n acf_add_options_page( $dustpress_components );\n }\n\n }", "function add_options_page() {\n\t\t\t\tif ( function_exists('add_theme_page') ) {\n\t\t\t\t \tadd_theme_page( 'Cap &amp; Run', 'Cap &amp; Run', 'manage_options', \n\t\t\t\t\t\t\t\t\tbasename(__FILE__), array(&$this, 'options_page') );\n\t\t\t\t}\n\t\t\t}", "public function register(): void {\n\t\tacf_add_options_page($this->args);\n\t}", "function gallery_options_page() {\r\n\tadd_options_page('Featured Content Gallery Options', 'Featured Content Gallery', 10, 'featured-content-gallery/options.php');\r\n}", "private function acf_add_options_pages() {\n\t\t\tif (!function_exists('acf_add_options_sub_page')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// get all the options pages and add them\n\t\t\t$options_pages = array('top' => array(), 'sub' => array());\n\t\t\t$args = array('post_type' => $this->post_type,\n\t\t\t\t\t\t\t\t\t\t'post_status' => 'publish',\n\t\t\t\t\t\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t\t\t\t\t\t'order' => 'ASC');\n\t\t\t$page_query = new WP_Query($args);\n\t\t\tif (count($page_query->posts)) {\n\t\t\t\tforeach ($page_query->posts as $post) {\n\t\t\t\t\t$id = $post->ID;\n\t\t\t\t\t$title = get_the_title($id);\n\t\t\t\t\t$menu_text = trim(get_post_meta($id, '_acfop_menu', true));\n\t\t\t\t\tif (!$menu_text) {\n\t\t\t\t\t\t$menu_text = $title;\n\t\t\t\t\t}\n\t\t\t\t\t$slug = trim(get_post_meta($id, '_acfop_slug', true));\n\t\t\t\t\tif (!$slug) {\n\t\t\t\t\t\t$slug = strtolower(trim(preg_replace('/[^a-z0-9]+/i', '-', $title), '-'));\n\t\t\t\t\t}\n\t\t\t\t\t$parent = get_post_meta($id, '_acfop_parent', true);\n\t\t\t\t\t$capability = get_post_meta($id, '_acfop_capability', true);\n\t\t\t\t\t$post_id = 'options';\n\t\t\t\t\t$save_to = get_post_meta($id, '_acfop_save_to', true);\n\t\t\t\t\t$autoload = 0;\n\t\t\t\t\tif ($save_to == 'post') {\n\t\t\t\t\t\t$post_id = intval(get_post_meta($id, '_acfop_post_page', true));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$autoload = get_post_meta($id, '_acfop_autoload', true);\n\t\t\t\t\t}\n\t\t\t\t\tif ($parent == 'none') {\n\t\t\t\t\t\t$options_page = array('page_title' =>\t$title,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'menu_title' => $menu_text,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'menu_slug' => $slug,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'capability' => $capability,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'post_id' => $post_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'autoload' => $autoload);\n\t\t\t\t\t\t$redirect = true;\n\t\t\t\t\t\t$value = get_post_meta($id, '_acfop_redirect', true);\n\t\t\t\t\t\tif ($value == '0') {\n\t\t\t\t\t\t\t$redirect = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$options_page['redirect'] = $redirect;\n\t\t\t\t\t\tif ($redirect) {\n\t\t\t\t\t\t\t$options_page['slug'] = strtolower(trim(preg_replace('/[^a-z0-9]+/i', '-', $title), '-'));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$icon = '';\n\t\t\t\t\t\t$value = get_post_meta($id, '_acfop_icon', true);\n\t\t\t\t\t\tif ($value != '') {\n\t\t\t\t\t\t\t$icon = $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($icon) {\n\t\t\t\t\t\t\t$options_page['icon_url'] = $icon;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$menu_position = '';\n\t\t\t\t\t\t$value = get_post_meta($id, '_acfop_position', true);\n\t\t\t\t\t\tif ($value != '') {\n\t\t\t\t\t\t\t$menu_position = $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($menu_position) {\n\t\t\t\t\t\t\t$options_page['position'] = $menu_position;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$options_pages['top'][] = $options_page;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$order = 0;\n\t\t\t\t\t\t$value = get_post_meta($id, '_acfop_order', true);\n\t\t\t\t\t\tif ($value) {\n\t\t\t\t\t\t\t$order = $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$options_pages['sub'][] = array('title' => $title,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'menu' => $menu_text,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'parent' => $parent,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'slug' => $slug,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'capability' => $capability,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'order' => $order,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'post_id' => $post_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'autoload' => $autoload);\n\t\t\t\t\t}\n\t\t\t\t} // end foreach $post;\n\t\t\t} // end if have_posts\n\t\t\twp_reset_query();\n\t\t\tif (count($options_pages['top'])) {\n\t\t\t\tforeach ($options_pages['top'] as $options_page) {\n\t\t\t\t\tacf_add_options_page($options_page);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (count($options_pages['sub'])) {\n\t\t\t\tusort($options_pages['sub'], array($this, 'sort_by_order'));\n\t\t\t\tforeach ($options_pages['sub'] as $options_page) {\n\t\t\t\t\tacf_add_options_sub_page($options_page);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function addOptionsPage(){\n\t\tadd_options_page( 'Post icon', 'Post icon', 'manage_options', 'post_icon_options', array( $this, 'showPostIconOptions' ) );\n\t}", "public function add_options_page() {\n add_options_page($this->title, $this->title, 'manage_options', $this->page, array(&$this, 'display_options_page'));\n }", "public function add_admin_pages() {\n\n\t\tif ( ! function_exists( 'acf_add_options_page' ) ) {\n\t\t\t$this->add_default_options_page();\n\t\t\treturn;\n\t\t}\n\n\t\tacf_add_options_page(\n\t\t\t[\n\t\t\t\t'page_title' => self::OPTIONS_TITLE,\n\t\t\t\t'menu_title' => self::OPTIONS_MENU_TITLE,\n\t\t\t\t'capability' => self::OPTIONS_USER_CAP,\n\t\t\t\t'menu_slug' => self::OPTIONS_MENU_SLUG,\n\t\t\t] );\n\n\t\t$this->add_acf_fields();\n\t}", "public function options_page() {\n\t\t$this->render_settings();\n\t}", "public function plugin_add_options_page() {\r\n\t\t$this->page = add_options_page(__($this->options_page_title), __($this->options_page_name), 'manage_options', $this->slug, array($this, 'plugin_create_options_page'));\r\n\t\tadd_filter( 'plugin_action_links', array(&$this, 'plugin_add_settings_link'), 10, 2 );\r\n\t\t\r\n\t\t// Run stuff when the plugin options page loads\r\n\t\tadd_action('load-'.$this->page, array(&$this, 'plugin_loading_options_page'));\r\n\t}", "public function add_options_page()\n {\n $this->options_page = add_menu_page($this->title, $this->title, 'delete_others_pages', $this->key, array($this, 'admin_page_display'));\n // Include CMB CSS in the head to avoid FOUC\n add_action(\"admin_print_styles-{$this->options_page}\", array('CMB2_hookup', 'enqueue_cmb_css'));\n }", "function ba_options_page() {\n add_menu_page(\n 'ba Theme Options', // Page title\n 'Theme Options', // Menu title\n 'manage_options', // Capability\n 'ba_options', // Menu slug\n 'ba_options_page_html', // Display\n 'dashicons-format-video', // Icon\n 150\n );\n}", "public static function init_options_page() {\n\n\t\t$option_page = acf_add_options_page([\n\t\t\t'page_title' => __('Theme Options', 'sage'),\n\t\t\t'menu_title' => 'Theme Options',\n\t\t\t'menu_slug' => 'theme-options',\n\t\t\t'capability' => 'edit_posts',\n\t\t\t'redirect' => true,\n\t\t\t'icon_url' => false,\n\t\t\t'position' => 40,\n\t\t\t'autoload' => true\n\t\t]);\n\n\t\treturn $option_page;\n\t}", "function cmh_add_options_page() {\r\n\tadd_options_page('Correct My Headings Options Page', 'Correct My Headings', 'manage_options', __FILE__, 'cmh_render_form');\r\n}", "public static function register_page_options() {\n\n\t\t// Register settings\n\t\tregister_setting( 'wpex_under_construction', 'under_construction', array( 'WPEX_Under_Construction', 'sanitize' ) );\n\n\t\t// Add main section to our options page\n\t\tadd_settings_section( 'wpex_under_construction_main', false, array( 'WPEX_Under_Construction', 'section_main_callback' ), 'wpex-under-construction-admin' );\n\n\t\t// Redirect field\n\t\tadd_settings_field(\n\t\t\t'under_construction',\n\t\t\tesc_html__( 'Enable Under Constuction', 'total' ),\n\t\t\tarray( 'WPEX_Under_Construction', 'redirect_field_callback' ),\n\t\t\t'wpex-under-construction-admin',\n\t\t\t'wpex_under_construction_main'\n\t\t);\n\n\t\t// Custom Page ID\n\t\tadd_settings_field(\n\t\t\t'under_construction_page_id',\n\t\t\tesc_html__( 'Under Construction page', 'total' ),\n\t\t\tarray( 'WPEX_Under_Construction', 'content_id_field_callback' ),\n\t\t\t'wpex-under-construction-admin',\n\t\t\t'wpex_under_construction_main'\n\t\t);\n\n\t}", "function ajb_options_add_page() {\n\tadd_theme_page( __( 'Homepage Options', 'ajb' ), __( 'Theme Options', 'ajb' ), ajb_get_options_page_cap(), 'ajb_options', 'ajb_options_do_page' );\n}", "public function add_options_page() {\n\t\t$this->options_page = add_menu_page( $this->title, $this->title, 'manage_options', $this->key, array( $this, 'admin_page_display' ) );\n\t\t//$this->options_page = add_theme_page( $this->title, $this->title, 'manage_options', $this->key, array( $this, 'admin_page_display' ) );\n\t\t// Include CMB CSS in the head to avoid FOUC\n\t\tadd_action( \"admin_print_styles-{$this->options_page}\", array( 'CMB2_hookup', 'enqueue_cmb_css' ) );\n\t}", "function jr_ads_add_pages() {\r\n add_options_page('JR Ads', 'JR Ads', 'administrator', 'jr_ads', 'jr_ads_options_page');\r\n}", "function options() {\n\t\tif ( ! current_user_can( 'manage_options' ) )\t{\n\t\t\twp_die( __( 'You do not have sufficient permissions to access this page.' ) );\n\t\t}\n\t\tinclude WP_PLUGIN_DIR . '/qoorate/admin_options_page.php';\n\t}", "function civ_slider_options_page(){\n add_options_page('Civ Slider Options', 'Civ Slider Options', 8, 'civ_slider', 'civ_slider_options');\n}", "function optionsframework_options() {\n\t\t$options_pages = array(); \n\t\t$options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n\t\t$options_pages[''] = 'Select a page:';\n\t\tforeach ($options_pages_obj as $page):\n\t\t\t$options_pages[$page->ID] = $page->post_title;\n\t\tendforeach;\n\t\n\t\t// If using image radio buttons, define a directory path\n\t\t$imagepath = get_template_directory_uri() . '/lib/assets/images/icons/';\n\t\n\t\t$options = array();\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('General Settings', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Favicon', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('To upload your favicon to the site, simply add the URL to it or upload and select it using the Upload button here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_favicon',\n\t\t\t'type' \t\t=> 'upload');\n\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('RSS Link', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Add in the URL of your RSS feed here to overwrite the defaut WordPress ones.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_rss',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Custom CSS', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Not 100% happy with our lovely styles? Here you can add some custom CSS if you require minor changes to the ones we\\'ve created. We won\\'t be offended, honest :)', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_css',\n\t\t\t'type' \t\t=> 'textarea');\t\n\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Google Analytics (or custom Javascript)', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If you\\'re hooked up with Google Analytics you can paste the Javascript includes for it here (without the script tags). Or alternatively if you just want some custom Javascript added on top of ours, add that here too.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_js',\n\t\t\t'type' \t\t=> 'textarea');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Breadcrumb Trail?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the breadcrumb trail on all pages in the header.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_breadcrumbs',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Application Form ID', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_application_form_id',\n\t\t\t'desc'\t\t=> 'If you have added an applcation form for the jobs section of your site using the Contact Form & plugin, you can add the ID of the form here for it to be pulled out automatically.',\n\t\t\t'std' \t\t=> '',\n\t\t\t'type' \t\t=> 'text');\t\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Header', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Custom Logo', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('To upload a custom logo, simply add the URL to it or upload and select it using the Upload button here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_logo',\n\t\t\t'type' \t\t=> 'upload');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Header Text', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_header_text',\n\t\t\t'des'\t\t=> 'You can add some text to the header if you like. Keep it short and sweet mind; nobody likes a waffler :)',\n\t\t\t'std' \t\t=> '',\n\t\t\t'type' \t\t=> 'text');\t\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Contact Telephone', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your contact telephone number here to go in the header.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_header_phone',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Footer', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __('Copyright Text', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter the text for your copyright here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_footer_copyright',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Hide FrogsThemes Link?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will hide our link :\\'( <--sad face', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_hide_ft_link',\n\t\t\t'std' \t\t=> '0',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Blog', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Style', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Select if you prefer the blog to be as a list or in masonry.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_blog_style',\n\t\t\t'options' \t=> array('list' => __('List', 'frogsthemes'), 'masonry' => __('Masonry', 'frogsthemes')),\n\t\t\t'std'\t\t=> 'list',\n\t\t\t'type' \t\t=> 'select');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Share Links?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the share links on all posts.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_share_links',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Author Box?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the author box on all posts.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_author',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Next/Previous Links?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the next/previous post links on all posts.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_next_prev',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Related Posts?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the related posts section. These are related by tag.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_related_posts',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Slider', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Speed of Transition', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter the speed you would like the transition to be in milliseconds (1000 = 1 second).', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_speed',\n\t\t\t'std'\t\t=> '600',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Pause Time', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter the time you would like the gallery to pause between transitions in milliseconds (1000 = 1 second).', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_pause',\n\t\t\t'std'\t\t=> '7000',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Auto Start?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will automatically start the gallery.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_auto_start',\n\t\t\t'std' \t\t=> '0',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Auto Loop?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will automatically loop through the gallery.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_loop',\n\t\t\t'std' \t\t=> '0',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t/*\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Animation Type', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Select which effect you would like to use when going between slides.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_transition',\n\t\t\t'options' \t=> array('fade' => __('Fade', 'frogsthemes'), 'slide' => __('Slide', 'frogsthemes')),\n\t\t\t'std'\t\t=> 'fade',\n\t\t\t'type' \t\t=> 'select');\n\t\t*/\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Connections', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Facebook URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Facebook URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_facebook',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Twitter URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Twitter URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_twitter',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Google+ URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Google+ URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_google_plus',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'LinkedIn URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full LinkedIn URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_linkedin',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Pinterest URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Pinterest URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_pinterest',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'YouTube URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full YouTube URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_youtube',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Twitter API Options', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Twitter API', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('To use the Twitter API, you need to sign up for an <a href=\"https://dev.twitter.com/apps\" target=\"_blank\">app with Twitter</a>.', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'info');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Consumer Key', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'consumer_key',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Consumer Secret', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'consumer_secret',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Access Token', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'access_token',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Access Token Secret', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'access_token_secret',\n\t\t\t'type' \t\t=> 'text');\n\t\n\t\treturn apply_filters('optionsframework_options', $options);\n\t}", "function options_page(){\r\n include($this->plugin_dir.'/include/options-page.php');\r\n }", "public function add_options_page() {\n $this->options_page = add_menu_page( $this->title, $this->title, 'manage_options', $this->key, array( $this, 'admin_page_display' ) );\n }", "public function admin_init_theme_options_acf() {\n\n\t\t//Init vars\n\t\t$options = $this->theme_acf_options_args;\n\n\t\tif( function_exists('acf_add_options_page') ) {\n\n\t\t\t//Setup main options page\n\t\t\tif( isset($options['main_page']['page_title']) ) {\n\t\t\t\tacf_add_options_page( $options['main_page'] );\n\t\t\t}\n\n\t\t\t//Setup any sub pages\n\t\t\tif( isset($options['sub_pages']) && is_array($options['sub_pages']) ) {\n\t\t\t\tforeach( $options['sub_pages'] as $sub_page_args ) {\n\n\t\t\t\t\t$sub_page_args['parent_slug'] = $options['main_page']['menu_slug'];\n\n\t\t\t\t\tacf_add_options_sub_page( $sub_page_args );\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "public function add_options_page() {\n $this->options_page = add_menu_page( $this->title, $this->title, 'manage_options', self::$key, array( $this, 'admin_page_display' ) );\n }", "public function registerPage()\n\t{\n\t\tadd_options_page( \n\t\t\t'Gravity Forms Protected Downloads',\n\t\t\t'Gravity Forms Protected Downloads',\n\t\t\t'manage_options',\n\t\t\t'gfpd', \n\t\t\tarray( $this, 'settingsPage' ) \n\t\t);\n\t}", "function owa_options_page() {\r\n\t\r\n\t$owa = owa_getInstance();\r\n\t\r\n\t$params = array();\r\n\t$params['view'] = 'base.options';\r\n\t$params['subview'] = 'base.optionsGeneral';\r\n\techo $owa->handleRequest($params);\r\n\t\r\n\treturn;\r\n}", "public function render_options_page() {\r\n\r\n\t\tinclude( Views::load_view( TBSC_OPTIONS_PLUGIN_DIR . 'src/views/options-page/options-page.php' ) );\r\n\r\n\t}", "public function add_options_page() {\n\t\t$this->options_page = add_options_page( $this->title, $this->title, 'manage_options', $this->key, array( $this, 'admin_page_display' ) );\n\n\t\t// Include CMB CSS in the head to avoid FOUC\n\t\tadd_action( \"admin_print_styles-{$this->options_page}\", array( 'CMB2_hookup', 'enqueue_cmb_css' ) );\n\t}", "public function add_options_page() {\r\n\t\t$slug = $this->key;\r\n\t\t$function = array( $this, 'admin_page_display' );\r\n\t\t$capability = 'delete_others_pages';\r\n\t\t$Menutitle = $this->optionsTitle;\r\n\t\t$pageTitle = $this->optionsTitle;\r\n\t\tif(!$this->subpage) :\r\n\t\t\t$this->options_page = add_menu_page( $pageTitle,$Menutitle, $capability, $slug, $function, $this->icon, $this->index );\r\n\t\telse :\r\n\t\t\t$this->options_page = add_submenu_page( $this->subpage, $pageTitle, $Menutitle, $capability, $slug, $function );\r\n\t\tendif;\r\n\t\t// Include CMB CSS in the head\r\n\t\tadd_action( \"admin_print_styles-{$this->options_page}\", array( 'CMB2_hookup', 'enqueue_cmb_css' ) );\r\n\t}", "function owa_options_menu() {\r\n\t\r\n\tif (function_exists('add_options_page')):\r\n\t\tadd_options_page('Options', 'OWA', 8, basename(__FILE__), 'owa_options_page');\r\n\tendif;\r\n \r\n return;\r\n}", "public function addPages()\r\n {\r\n $settings = add_options_page(\r\n 'OHS Newsletter',\r\n 'OHS Newsletter',\r\n 'manage_options',\r\n 'ohs-newsletter',\r\n array($this, 'optionsPage')\r\n );\r\n }", "function fadingslider_admin_menu()\r\n\t{\r\n\t\tadd_options_page(__('Fading Content Slider options', 'wp-fading-content-slider-locale'), __('WP Fading Content Slider', 'wp-fading-content-slider-locale'), 10, 'wp-fading-content-slider/views/admin.php');\r\n\t}", "public function add_options_page() {\n add_options_page(\n __( 'Instagram Settings', 'bii-instagram' ),\n __( 'Instagram', 'bii-instagram' ),\n 'manage_options',\n 'bii-instagram',\n array( &$this, 'create_options_page' )\n );\n }", "public static function options_page()\n\t\t\t{\n\t\t\t\tif (!current_user_can('manage_options'))\n\t\t\t\t{\n\t\t\t\t\twp_die( __('You do not have sufficient permissions to access this page.') );\n\t\t\t\t}\n\t\n\t\t\t\t$plugin_id = HE_PLUGINOPTIONS_ID;\n\t\t\t\t// display options page\n\t\t\t\tinclude(self::file_path('options.php'));\n\t\t\t}", "function ctc_add_page() {\n add_options_page('CTC', 'CTC', 8, 'ctcoptions', 'ctc_options_page');\n}", "public function registerOptionsPage()\n {\n add_submenu_page(\n 'tools.php',\n 'PostmanCanFail Settings',\n 'PostmanCanFail',\n 'administrator',\n __FILE__,\n [$this, 'settingsPage']\n );\n }", "function wpcom_referral_footer_options() {\n\t\tadd_theme_page( \n\t\t\t'WordPress.com Referral Footer Options', \n\t\t\t'Referral Footer', 'manage_options', \n\t\t\t'wpcom_referral_footer_options', \n\t\t\tarray( $this, 'wpcom_referral_footer_options_page' ) \n\t\t);\n\t}", "public function optionsPage()\r\n {\r\n $this->updateOptions();\r\n include_once($this->path . '/views/options.php');\r\n }", "public function cfs_add_admin_menu( ) { \n\t\t\tadd_options_page( 'WP CoSign Forms Support', 'WP CoSign Forms Support', 'manage_options', 'cosign_forms_support', array($this,'cfs_options_page') );\n\t\t}", "function register_user_options_pages(){\n \n $settings = apply_filters('acfe/options_page/prepare_register', acfe_get_settings($this->settings));\n \n if(empty($settings))\n return;\n \n foreach($settings as $name => $args){\n \n // Bail early\n if(empty($name) || acf_get_options_page($name))\n continue;\n \n // Filters\n $args = apply_filters(\"acfe/options_page/register\", $args, $name);\n $args = apply_filters(\"acfe/options_page/register/name={$name}\", $args, $name);\n \n if($args === false)\n continue;\n \n // Register\n acf_add_options_page($args);\n \n }\n \n }", "public function custom_menu_page() {\n\t\tadd_menu_page(\n\t\t\t__( 'Options', 'plugintest' ),\n\t\t\t__( 'Options', 'plugintest' ),\n\t\t\t'manage_options',\n\t\t\t'options',\n\t\t\tarray( $this, 'view_option_page' )\n\t\t);\n\t}", "function ahr_menu() {\r\n \r\n\tglobal $AHR_SLUG;\r\n\t\r\n add_options_page( 'Advanced Https Redirection', 'Advanced Https Redirection', 'manage_options', $AHR_SLUG, 'ahr_render_options_page' );\r\n \r\n}", "function post_order_options_page(){\n\tadd_options_page(\n\t\t'Order Posts Manage Options',\n\t\t'Order Posts',\n\t\t'order_posts',\n\t\t'order-posts-options-page',\n\t\t'post_order_add_options_page' );\n}", "public function option_page() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\twp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'top-story' ) );\n\t\t}\n\n\t\tinclude_once( \"{$this->plugin->dir_path}/templates/option-page.php\" );\n\t}", "function eazy_legal_opt_page() {\n\tadd_menu_page( 'Privacy & Cookies', 'Privacy & Cookies', 'manage_options', 'eazy_legal_options', 'eazy_legal_display_opt_page', 'dashicons-visibility', 100 );\n // Call register settings function\n add_action( 'admin_init', 'eazy_legal_register_options_settings' );\n}", "function recurlywp_options_page() {\n add_submenu_page(\n 'options-general.php',\n 'Recurly API Settings',\n 'Recurly API',\n 'manage_options',\n 'recurlywp',\n 'recurlywp_options_page_html'\n );\n}", "function EWD_URP_Output_Options_Page() {\n\t\tglobal $URP_Full_Version;\n\t\t\n\t\tif (!isset($_GET['page'])) {$_GET['page'] = \"\";}\n\n\t\tinclude( plugin_dir_path( __FILE__ ) . '../html/AdminHeader.php');\n\t\tif ($_GET['page'] == 'urp-options') {include( plugin_dir_path( __FILE__ ) . '../html/OptionsPage.php');}\n\t\tif ($_GET['page'] == 'urp-woocommerce-import') {include( plugin_dir_path( __FILE__ ) . '../html/WooCommerceImportPage.php');}\n\t\tinclude( plugin_dir_path( __FILE__ ) . '../html/AdminFooter.php');\n}", "function wpec_gd_options_page() {\n\tadd_options_page( __( 'WPEC Group Deal Options', 'wpec-group-deals' ), __( 'Group Deals', 'wpec-group-deals' ), 'administrator', 'wpec_gd_options', 'wpec_gd_options_page_form' );\n}", "function ipay_payment_add_option_pages() {\n if (function_exists('add_options_page')) {\n add_options_page('WP iPay88 Payment Accept', 'WP iPay88 Payment', 'manage_options', __FILE__, 'ipay_payment_options_page');\n }\n}", "public function create_options_page() {\r\n\r\n\t\tadd_menu_page(\r\n\t\t\t$this->settings['heading'],\r\n\t\t\t$this->settings['menu_title'],\r\n\t\t\t'edit_theme_options',\r\n\t\t\t$this->settings['page_slug'],\r\n\t\t\tarray( $this, 'render_options_page' ),\r\n\t\t\t$this->settings['dashicon'],\r\n\t\t\t999 // Place at the bottom of the dash menu\r\n\t\t);\r\n\r\n\t}", "public function add_pages() {\n\t\t$admin_page = add_theme_page( __('Theme Options'), __('Theme Options'), 'manage_options', 'eaboot_options', array(&$this, 'display_page'));\n\n\t\tadd_action('admin_print_scripts-' . $admin_page, array(&$this, 'scripts'));\n\t\tadd_action('admin_print_styles-' . $admin_page, array(&$this, 'styles'));\n\t}", "function cpjr3_settings_page() {\n\n add_options_page( __( 'Click Points Settings', 'cpjr3' ), __( 'Click Points', 'cpjr3' ), 'administrator', __FILE__, 'cpjr3_settings_fn' );\n\n}", "public function add_options_page() {\n\t\t$this->options_page = add_menu_page( $this->metabox_id, $this->title, 'manage_options', $this->key, array( $this, 'admin_page_display' ) , 'dashicons-welcome-widgets-menus', 99);\n\n\t\t// Include CMB CSS in the head to avoid FOUC\n\t\t// wp_register_style( 'style_CMB2', THEME_URI.'/css/style_CMB2.css', false, '3', false );\n\t\tadd_action( \"admin_print_styles-{$this->options_page}\", array( 'CMB2_hookup', 'enqueue_cmb_css' ) );\n\t}", "function adminOptions() {\r\n\t\t\tTrackTheBookView::render('admin-options');\r\n\t\t}", "public function add_global_custom_options()\n {\n add_options_page('Plugin options', 'Plugin options', 'manage_options', 'functions','global_custom_options');\n }", "public function view_option_page() {\n\t\tinclude_once plugin_dir_path( __FILE__ ) . 'options.php';\n\t}", "function kulam_acf_init() {\n\n\tif ( function_exists( 'acf_add_options_page' ) ) {\n\n\t\tacf_add_options_page( array(\n\t\t\t'page_title'\t=> __( 'Site Setup', 'kulam-scoop' ),\n\t\t\t'menu_title'\t=> __( 'Site Setup', 'kulam-scoop' ),\n\t\t\t'menu_slug'\t\t=> 'site-options',\n\t\t\t'icon_url'\t\t=> 'dashicons-admin-tools',\n\t\t));\n\n\t\tacf_add_options_sub_page( array(\n\t\t\t'page_title' \t=> __( 'Header/Footer Settings', 'kulam-scoop' ),\n\t\t\t'menu_title' \t=> __( 'Header/Footer', 'kulam-scoop' ),\n\t\t\t'menu_slug' \t=> 'acf-options-header-footer',\n\t\t\t'parent_slug' \t=> 'site-options',\n\t\t));\n\n\t\tacf_add_options_sub_page( array(\n\t\t\t'page_title' \t=> __( 'Custom Taxonomies Settings', 'kulam-scoop' ),\n\t\t\t'menu_title' \t=> __( 'Custom Taxonomies', 'kulam-scoop' ),\n\t\t\t'menu_slug' \t=> 'acf-options-custom-taxonomies',\n\t\t\t'parent_slug' \t=> 'site-options',\n\t\t));\n\n\t\tacf_add_options_sub_page( array(\n\t\t\t'page_title' \t=> __( 'My Siddur Settings', 'kulam-scoop' ),\n\t\t\t'menu_title' \t=> __( 'My Siddur', 'kulam-scoop' ),\n\t\t\t'menu_slug' \t=> 'acf-options-my-siddur',\n\t\t\t'parent_slug' \t=> 'site-options',\n\t\t));\n\n\t\tacf_add_options_sub_page( array(\n\t\t\t'page_title' \t=> __( 'General Settings', 'kulam-scoop' ),\n\t\t\t'menu_title' \t=> __( 'General', 'kulam-scoop' ),\n\t\t\t'menu_slug' \t=> 'acf-options-general',\n\t\t\t'parent_slug' \t=> 'site-options',\n\t\t));\n\n\t}\n\n}", "function add_wporphanageex_options_page() {\n\n\tadd_options_page( __( 'WP Orphanage Extended', WPOEX_TD ), __( 'WP Orphanage Extended', WPOEX_TD ), 'administrator', 'wp-orphanage-extended', 'wporphanageex_menu_settings' );\n}", "function theme_options_add_page() {\n\tadd_theme_page( __( 'Theme Options', 'htmlks4wp' ), __( 'Theme Options', 'htmlks4wp' ), 'edit_theme_options', 'theme_options', 'theme_options_do_page' );\n}", "public function load_option_pages()\n {\n if (is_admin() || is_admin_bar_showing()) {\n include OXY_THEME_DIR . 'inc/option-pages.php';\n }\n }", "public function settings_admin_page()\n {\n add_action('wp_cspa_before_closing_header', [$this, 'back_to_optin_overview']);\n add_action('wp_cspa_before_post_body_content', array($this, 'optin_theme_sub_header'), 10, 2);\n add_filter('wp_cspa_main_content_area', [$this, 'optin_form_list']);\n\n $instance = Custom_Settings_Page_Api::instance();\n $instance->page_header(__('Add New Optin', 'mailoptin'));\n $this->register_core_settings($instance, true);\n $instance->build(true);\n }", "function add_options_page($page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = \\null)\n {\n }", "function chapel_hour_options() {\n acf_add_options_sub_page( array(\n 'page_title' => 'Podcast Settings',\n 'menu_title' => 'Podcast Settings',\n 'parent_slug' => 'edit.php?post_type=chapel_hour',\n ) );\n}", "public function add_options_page()\n {\n $parent_slug = null;\n $subpage_slug = $this->welcome_slug;\n\n //echo \">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> TEST: \" . FREEMIUS_NAVIGATION . '<br>';\n\n if (FREEMIUS_NAVIGATION === 'tabs') {\n // only show submenu page when tabs enabled if welcome tab is active\n if (isset($_GET['page']) && $_GET['page'] === $subpage_slug) {\n $parent_slug = $this->custom_plugin_data->parent_slug;\n }\n } else {\n // always use this if navigation is set to 'menu'\n $parent_slug = $this->custom_plugin_data->parent_slug;\n }\n\n if ($this->custom_plugin_data->menu_type === 'top') {\n $label = 'About';\n } else if ($this->custom_plugin_data->menu_type === 'sub') {\n $label = '<span class=\"fs-submenu-item fs-sub wpgo-plugins\">About</span>';\n }\n\n add_submenu_page($parent_slug, 'Welcome to ' . $this->custom_plugin_data->main_menu_label, $label, 'manage_options', $subpage_slug, array(&$this, 'render_sub_menu_form'));\n }", "function plugin_admin_add_page() {\n\t\tadd_options_page('Tupuk Sample Plugin Settings', 'Tupuk Sample Plugin', 'manage_options', 'tupuk_sample_plugin', array($this, 'plugin_options_page'));\n\t\tadd_action( 'admin_init', array($this, 'register_mysettings') ); //call register settings function\n\t}", "public function create_options_page() {\n print '<div class=\"wrap\">';\n screen_icon();\n printf( '<h2>%s</h2>', __( 'Instagram Settings', 'bii-instagram' ) );\n print '<form method=\"post\" action=\"options.php\">';\n settings_fields( 'bii_instagram' );\n do_settings_sections( 'bii-instagram' );\n submit_button();\n print '</form>';\n print '</div>';\n }", "public function add_option_pages(){\n $options = array(\n 'success_stories' => __('Success Stories', 'theme-translations'),\n 'team' => __('Team Page', 'theme-translations'),\n 'events' => __('Events Page', 'theme-translations'),\n );\n\n foreach ($options as $key => $name) {\n $option_name = 'theme_page_'.$key;\n\n register_setting( 'reading', $option_name );\n\n add_settings_field(\n 'theme_setting_'.$key,\n $name,\n\n array(__CLASS__, 'page_select_callback'),\n\n 'reading',\n 'theme-pages-section',\n\n array(\n 'id' => 'theme_setting_'.$key,\n 'option_name' => $option_name,\n )\n );\n }\n }", "public function renderOptions() {\n $tab \t\t= sienna_mikado_get_admin_tab();\n $active_page \t= sienna_mikado_framework()->mkdOptions->getAdminPageFromSlug($tab);\n $current_theme \t= wp_get_theme();\n\n if ($active_page == null) return;\n ?>\n <div class=\"mkdf-options-page mkdf-page\">\n\n <?php $this->getHeader($current_theme->get('Name'), $current_theme->get('Version')); ?>\n\n <div class=\"mkdf-page-content-wrapper\">\n <div class=\"mkdf-page-content\">\n <div class=\"mkdf-page-navigation mkdf-tabs-wrapper vertical left clearfix\">\n\n <?php $this->getPageNav($tab); ?>\n <?php $this->getPageContent($active_page, $tab); ?>\n\n\n </div> <!-- close div.mkdf-page-navigation -->\n\n </div> <!-- close div.mkdf-page-content -->\n\n </div> <!-- close div.mkdf-page-content-wrapper -->\n\n </div> <!-- close div.mkd-options-page -->\n\n <a id='back_to_top' href='#'>\n <span class=\"fa-stack\">\n <span class=\"fa fa-angle-up\"></span>\n </span>\n </a>\n <?php }", "public function add_option_pages(){\n $options = array(\n 'tower_revenue' => __('Tower Revenue', 'theme-translations'),\n );\n\n foreach ($options as $key => $name) {\n $option_name = 'theme_page_'.$key;\n\n register_setting( 'reading', $option_name );\n\n add_settings_field(\n 'theme_setting_'.$key,\n $name,\n\n array(__CLASS__, 'page_select_callback'),\n\n 'reading',\n 'theme-pages-section',\n\n array(\n 'id' => 'theme_setting_'.$key,\n 'option_name' => $option_name,\n )\n );\n }\n }", "function austeve_gallery_admin_add_page() {\n add_options_page('AUSteve Gallery settings', 'AUSteve Gallery settings', 'manage_options', 'austeve_image_gallery', 'austeve_image_gallery_options_page');\n}", "public function options_page_init(){\n\t\t\tadd_options_page(__('Breaking News options', 'text-domain'), __('Breaking News', 'text-domain'), 'manage_options', 'breakingnews', [ $this, 'options_page_content']);\n\t\t}", "public function admin_menu() {\n\t\tadd_options_page(__('Google Analytics', 'wp-google-analytics'), __('Google Analytics', 'wp-google-analytics'), 'manage_options', self::$page_slug, array( $this, 'settings_view' ) );\n\t}", "function adminMenu() {\r\n\t\t\tadd_options_page('Track The Book Settings', 'Track The Book', 8, 'trackthebook.php', array($this,'adminOptions'));\r\n\t\t}", "public function add_options_page() {\n\t\tadd_options_page( 'Import Users/Cron', 'Import Users/Cron', 'manage_options', 'import-users-cron-page', array( $this -> submenu_page, 'display' ) );\n\t}", "public function register_hooks() {\n\t\tadd_filter( 'acf/pre_render_fields', array( $this, 'fields_on_translated_options_page' ), 10, 2 );\n\t\tadd_filter( 'acf/update_value', array( $this, 'overwrite_option_value' ), 10, 4 );\n\t\tadd_filter( 'acf/validate_post_id', [ $this, 'append_language_code_for_option_pages' ] );\n\t}", "public function initializePage()\n\t{\n\t\tadd_menu_page('Thema opties', 'Thema opties', 'manage_options', 'theme-options');\n\t}", "function TencentMicroblogPage() {\r\n\tadd_options_page('腾讯微博插件', '腾讯微博插件', 'manage_options','WTM-options', 'TencentMicroblog_options_page');\r\n}", "function kleo_bp_page_options()\n {\n\n $current_page_id = kleo_bp_get_page_id();\n\n if (!$current_page_id) {\n return false;\n }\n\n $topbar_status = get_cfield('topbar_status', $current_page_id);\n //Top bar\n if (isset($topbar_status)) {\n if ($topbar_status === '1') {\n add_filter('kleo_show_top_bar', create_function('', 'return 1;'));\n } elseif ($topbar_status === '0') {\n add_filter('kleo_show_top_bar', create_function('', 'return 0;'));\n }\n }\n //Header and Footer settings\n if (get_cfield('hide_header', $current_page_id) == 1) {\n remove_action('kleo_header', 'kleo_show_header');\n }\n if (get_cfield('hide_footer', $current_page_id) == 1) {\n add_filter('kleo_footer_hidden', create_function('$status', 'return true;'));\n }\n if (get_cfield('hide_socket', $current_page_id) == 1) {\n remove_action('kleo_after_footer', 'kleo_show_socket');\n }\n\n //Custom logo\n if (get_cfield('logo', $current_page_id)) {\n global $kleo_custom_logo;\n $kleo_custom_logo = get_cfield('logo', $current_page_id);\n add_filter('kleo_logo', create_function(\"\", 'global $kleo_custom_logo; return $kleo_custom_logo;'));\n }\n\n //Transparent menu\n if (get_cfield('transparent_menu', $current_page_id)) {\n add_filter('body_class', create_function('$classes', '$classes[]=\"navbar-transparent\"; return $classes;'));\n }\n\n //Remove shop icon\n if (get_cfield('hide_shop_icon', $current_page_id) && get_cfield('hide_shop_icon', $current_page_id) == 1) {\n remove_filter('wp_nav_menu_items', 'kleo_woo_header_cart', 9);\n remove_filter('kleo_mobile_header_icons', 'kleo_woo_mobile_icon', 10);\n }\n //Remove search icon\n if (get_cfield('hide_search_icon', $current_page_id) && get_cfield('hide_search_icon', $current_page_id) == 1) {\n remove_filter('wp_nav_menu_items', 'kleo_search_menu_item', 10);\n }\n }", "public function define_settings_page() {\n\t\t$this->hook_suffix = add_options_page(\n\t\t\t__( 'Top Story Options', 'top-story' ),\n\t\t\t__( 'Top Story', 'top-story' ),\n\t\t\t'manage_options',\n\t\t\t$this->menu_slug,\n\t\t\tarray( $this, 'option_page' )\n\t\t);\n\t}", "public function create_options_menu() {\n add_options_page(\n 'CaseSwap Core', // page title\n 'CaseSwap Core', // menu name\n 'edit_theme_options', // Capability Required\n $this->options_page_slug, // Slug\n array( &$this, \"render_options_menu\" ) // Displaying function\n );\n }", "function post_order_add_options_page(){\n\n\tif( current_user_can( 'order_posts' ) ){\n\n\t\trequire 'inc/options-page-wrapper.php';\n\n\t}\n}", "public function add_analytics_options_page() {\n\t\t$this->settings_page = add_options_page( 'WSU Analytics', 'Analytics', 'manage_options', 'wsuwp-analytics', array( $this, 'display_analytics_options_page' ) );\n\n\t\tadd_settings_section( 'wsuwp-verification', 'Site Verification', array( $this, 'display_verification_settings' ), $this->settings_page );\n\t\tadd_settings_section( 'wsuwp-analytics', 'WSU Analytics', array( $this, 'display_analytics_settings' ), $this->settings_page );\n\t}", "function vmt_options_page()\n\t\t{\n\t\t\t// Create the options page\n\t\t\t$options_page = add_options_page(\n\t\t\t\t'Verify Meta Tags Plugin Options', \n\t\t\t\t'Verify Meta Tags',\n\t\t\t\t'manage_options',\n\t\t\t\t'vmt-options-page', \n\t\t\t\tarray(&$this, 'options_page_html')\n\t\t\t);\n\t\t\t\n\t\t\tadd_action( 'admin_print_styles-' . $options_page, array($this, 'enqueue_admin_styles'), 1000 );\n\t\t\t\n\t\t\t// Add settings section\n\t\t\t\n\t\t\tadd_settings_section( \n\t\t\t\t'vmt-options-section', \n\t\t\t\t'Owner Verification Meta Tags', \n\t\t\t\tarray( &$this, 'display_ID_section_html'), \n\t\t\t\t'vmt-options-page'\n\t\t\t);\n\t\t\t\n\t\t\t// Google verification ID\n\t\t\tadd_settings_field(\n\t\t\t\t'verify-meta-tags[google]',\t\n\t\t\t\t'Google Verification ID', \n\t\t\t\tarray( &$this, 'display_verify_id_html' ), \n\t\t\t\t'vmt-options-page', \n\t\t\t\t'vmt-options-section',\n\t\t\t\tarray('code'=>'google') \n\t\t\t);\n\n\t\t\t// Pinterest verification ID\n\t\t\tadd_settings_field(\n\t\t\t\t'verify-meta-tags[pinterest]',\t\n\t\t\t\t'Pinterest Verification ID', \n\t\t\t\tarray( &$this, 'display_verify_id_html' ), \n\t\t\t\t'vmt-options-page', \n\t\t\t\t'vmt-options-section',\n\t\t\t\tarray('code'=>'pinterest') \n\t\t\t);\n\t\t\t\n\t\t\t// Analytics Code block in it's own section\n\t\t\tadd_settings_section( \n\t\t\t\t'vmt-options-analytics-section', \n\t\t\t\t'Site Statistics Tracking', \n\t\t\t\tarray( &$this, 'display_analytics_section_html'), \n\t\t\t\t'vmt-options-page'\n\t\t\t);\n\t\t\tadd_settings_field(\n\t\t\t\t'verify-meta-tags[analytics]',\t\n\t\t\t\t'Analytics code', \n\t\t\t\tarray( &$this, 'display_analytics_html' ), \n\t\t\t\t'vmt-options-page', \n\t\t\t\t'vmt-options-analytics-section',\n\t\t\t\tarray('code'=>'analytics') \n\t\t\t);\n\t\t}", "public function adminPluginOptionsPage()\n {\n echo $this->_loadView('admin-settings-page');\n }", "public function display_options_page() {\n if (! current_user_can('manage_options')) {\n wp_die(__('You do not have sufficient permissions to access this page.'));\n }\n?>\n<div class=\"wrap\">\n <h2><?php esc_attr_e($this->title); ?> Options</h2>\n <form action=\"options.php\" method=\"post\">\n <?php if (function_exists('settings_errors')): settings_errors(); endif; ?>\n <?php settings_fields($this->group); ?>\n <?php foreach ($this->sections as $section): do_settings_sections($section); endforeach; ?>\n <p class=\"submit\">\n <input type=\"submit\" name=\"Submit\" value=\"<?php esc_attr_e('Save Changes'); ?>\" class=\"button-primary\" />\n </p>\n </form>\n</div>\n<?php\n }", "public function add_plugin_page()\n {\n // This page will be under \"Settings\"\n $hook = add_options_page(\n 'Settings Admin',\n __('Housename', 'bk-fonts'),\n 'manage_fonts',\n 'font-setting-admin',\n array( $this, 'create_font_settings_page' )\n );\n\n add_action( 'load-' . $hook, array( $this, 'init_page' ) );\n add_action( 'load-' . $hook, array( $this, 'register_scripts' ) );\n add_filter( 'option_page_capability_fo_general_options', array($this, 'options_capability') );\n add_filter( 'option_page_capability_fo_elements_options', array($this, 'options_capability') );\n add_filter( 'option_page_capability_fo_advanced_options', array($this, 'options_capability') );\n }", "public function options_page()\n\t\t{\n\t\t\tif (!@include 'options-page.php'):\n\t\t\t\tprintf(__('<div id=\"message\" class=\"updated fade\"><p>The options page for the <strong>Mailgun</strong> plugin cannot be displayed. The file <strong>%s</strong> is missing. Please reinstall the plugin.</p></div>',\n\t\t\t\t\t'mailgun'), dirname(__FILE__) . '/options-page.php');\n\t\t\tendif;\n\t\t}", "public function page_setup(){\n add_menu_page( PLUGIN_NAME, PLUGIN_NAME, 'manage_options', sanitize_key(PLUGIN_NAME), array($this, 'admin_page'), $this->icon, 3 );\n }", "public static function _options_page(){\n\t\tif( isset($_POST['urls']) ){\n\t\t\tself::updateUrls($_POST['urls']);\n\t\t}\n\t\t\n\t\t$vars = (object) array();\n\t\t$vars->messages = implode( \"\\n\", self::$messages );\n\t\t$vars->path = self::$path;\n\t\t$vars->urls = self::getUrls();\n\t\tself::render( 'admin', $vars );\n\t}", "function wpdc_divi_child_options_page(){\r\n\t\t\r\n\t\t$options = get_option('wpdc_options');\r\n\t\t\r\n echo '<div class=\"wrap\">';\r\n\t\techo '<h2>'.WPDC_THEME_NAME.' Options <span style=\"font-size:10px;\">Ver '.WPDC_VER.'</span></h2>';\r\n\t\techo '<form method=\"post\" action=\"options.php\">';\r\n\t\tsettings_fields('wpdc_plugin_options_group');\r\n\t\tsettings_errors();\r\n\t\trequire_once('views.php');\t\t// load table settings\r\n\t\techo '<div style=\"clear:both;\"></div>';\r\n\t\techo '</div>';\r\n\t\techo '<div style=\"clear:both;\"></div>';\r\n echo '</form>';\r\n }" ]
[ "0.83883166", "0.8345072", "0.82871836", "0.79288965", "0.7922873", "0.7890327", "0.7818423", "0.7816526", "0.77912223", "0.76465905", "0.76435196", "0.76419646", "0.7636485", "0.760936", "0.7524652", "0.75212675", "0.7429484", "0.7429062", "0.73888874", "0.73676383", "0.7359667", "0.7357426", "0.73528636", "0.73461384", "0.7342991", "0.73299825", "0.7327885", "0.7310327", "0.7302683", "0.7291787", "0.7288652", "0.7285199", "0.7260535", "0.7256847", "0.7252843", "0.72325116", "0.7227182", "0.7200628", "0.71833366", "0.71831954", "0.71631956", "0.71575624", "0.7148753", "0.7127741", "0.71185076", "0.70984447", "0.70830667", "0.7079023", "0.7073707", "0.7070391", "0.70571446", "0.70276564", "0.7025252", "0.70220625", "0.7002941", "0.69915605", "0.69903505", "0.69821966", "0.6979782", "0.6978473", "0.69736975", "0.6961672", "0.6959153", "0.6958321", "0.6944394", "0.6919215", "0.69076425", "0.6899715", "0.6899106", "0.688422", "0.68771005", "0.687092", "0.6861278", "0.68468803", "0.682986", "0.6825892", "0.6818725", "0.68167764", "0.6805713", "0.6804399", "0.6795287", "0.6779604", "0.6775549", "0.6763032", "0.67627925", "0.676064", "0.67591727", "0.67547196", "0.6742312", "0.6736073", "0.6732708", "0.67251486", "0.67247385", "0.671676", "0.6715747", "0.6713284", "0.6710396", "0.6710341", "0.6708816", "0.67085385" ]
0.84878016
0
Removes comments icon from the admin bar.
public function remove_admin_bar_items() { global $wp_admin_bar; $wp_admin_bar->remove_menu("comments"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gwt_disable_comments_admin_bar() {\r\n if (is_admin_bar_showing()) {\r\n remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);\r\n }\r\n}", "function df_disable_comments_admin_bar()\r\n\t{\r\n\t\tif (is_admin_bar_showing()) {\r\n\t\t\tremove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);\r\n\t\t}\r\n\t}", "function df_disable_comments_admin_bar() {\n\tif (is_admin_bar_showing()) {\n\t\tremove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);\n\t}\n}", "function df_disable_comments_admin_bar()\n{\n if (is_admin_bar_showing()) {\n remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);\n }\n}", "function wputh_disable_comments_admin_bar_render() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('comments');\n}", "function ah_admin_bar_render() {\n\t\tglobal $wp_admin_bar;\n\t\t$wp_admin_bar->remove_menu( 'comments' );\n\t}", "function ks_disable_comments_admin_bar($wp_admin_bar) {\n $wp_admin_bar->remove_node('comments');\n}", "function df_disable_comments_admin_menu()\r\n\t{\r\n\t\tremove_menu_page('edit-comments.php');\r\n\t}", "function mytheme_admin_bar_render() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('comments');\n}", "function my_admin_bar_render() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('comments');\n}", "function my_admin_bar_render() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('comments');\n}", "function remove_admin_bar() {\n\tshow_admin_bar(false);\n}", "function df_disable_comments_admin_menu() {\n\tremove_menu_page('edit-comments.php');\n}", "function df_disable_comments_admin_menu() {\n\tremove_menu_page('edit-comments.php');\n}", "function gwt_disable_comments_admin_menu() {\r\n remove_menu_page('edit-comments.php');\r\n}", "function df_disable_comments_admin_menu()\n{\n remove_menu_page('edit-comments.php');\n}", "function ot_filter_admin_bar() {\n\tif( is_admin_bar_showing() ) {\n\t\tremove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 );\t// WP 3.3\n\t}\n}", "function rgc_disable_comments_admin_menu() {\n remove_menu_page('edit-comments.php');\n}", "function rgc_disable_comments_admin_menu() {\n remove_menu_page('edit-comments.php');\n}", "function hide_admin_links() {\n\tremove_menu_page( 'edit-comments.php' );\n}", "function my_remove_admin_menus() {\n\t\t\tremove_menu_page('edit-comments.php');\n\t\t}", "function updateAdminMenu() {\n remove_menu_page( 'edit-comments.php' );\n }", "function ks_disable_comments_admin_menu() {\n\tremove_menu_page('edit-comments.php');\n remove_submenu_page('options-general.php', 'options-discussion.php');\n}", "function remove_admin_bar() {\n\tif ( !current_user_can ( 'delete_users' ) ) {\n\t\tshow_admin_bar(false);\n\t}\n}", "function gwt_disable_comments_dashboard() {\r\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\r\n}", "function wpdocs_dequeue_dashicon() {\n\tif ( current_user_can( 'update_core' ) ) {\n\t\treturn;\n\t}\n\twp_deregister_style( 'dashicons' );\n}", "function pilkie_remove_admin_menu () {\n\tremove_menu_page('edit-comments.php');\n\tremove_menu_page('edit.php');\n}", "function df_disable_comments_dashboard()\r\n\t{\r\n\t\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\r\n\t}", "function ks_disable_comments_dashboard() {\n\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "function df_disable_comments_dashboard() {\n\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "function df_disable_comments_dashboard() {\n\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "function wpdocs_dequeue_dashicon() {\n\tif (current_user_can( 'update_core' )) {\n\t\treturn;\n\t}\n\twp_deregister_style('dashicons');\n}", "function theme_remove_admin_bar() {\r\n\treturn false;\r\n}", "function wpdocs_dequeue_dashicon() {\n if (current_user_can( 'update_core' )) {\n return;\n }\n wp_deregister_style('dashicons');\n}", "function lgm_theme_edit_adminbar() {\n if (current_user_can('editor')) {\n global $wp_admin_bar;\n $wp_admin_bar->remove_node('customize');\n $wp_admin_bar->remove_node('comments');\n $wp_admin_bar->remove_menu('wp-logo');\n }\n }", "function df_disable_comments_dashboard()\n{\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "function rgc_disable_comments_dashboard() {\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "function rgc_disable_comments_dashboard() {\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "function mytheme_admin_bar_render() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('comments');\n $wp_admin_bar->remove_menu('new-post');\n}", "public function wp_admin_bar() {\n\t\t\t\n\t\t\tremove_action( 'wp_head', '_admin_bar_bump_cb' );\n\t\t\t\n\t\t}", "function wputh_disable_comments_admin_menus() {\n remove_menu_page('edit-comments.php');\n remove_submenu_page('options-general.php', 'options-discussion.php');\n $post_types = get_post_types(array('public' => true), 'names');\n foreach ($post_types as $post_type) {\n remove_meta_box('commentsdiv', $post_type, 'normal');\n remove_meta_box('commentstatusdiv', $post_type, 'normal');\n }\n}", "function remove_admin_bar() {\n\t\tif (!current_user_can('manage_options') && !is_admin()) {\n\t\t show_admin_bar(false);\n\t\t}\n\t}", "function remove_admin_bar_links() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu('updates');\n $wp_admin_bar->remove_menu('comments');\n}", "function cmt_removeAdminBarForSubscriber() {\n require_once(\"includes/cmt-remove-admin-bar.php\");\n CMT_Remove_Admin_Bar::init();\n}", "function wp_admin_bar_comments_menu($wp_admin_bar)\n {\n }", "function wputh_disable_comments_remove_dashboard_widgets() {\n global $wp_meta_boxes;\n if (isset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'])) {\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n }\n}", "function remove_admin_bar_from_head() {\n remove_action('wp_head', '_admin_bar_bump_cb');\n show_admin_bar(false);\n}", "function remove_admin() {\n\tremove_menu_page('link-manager.php');\n\tremove_menu_page('edit-comments.php');\n\tremove_menu_page('upload.php');\n}", "function shift_admin_menu_cleanup() {\n remove_menu_page( 'edit.php' );\n remove_menu_page( 'edit-comments.php' );\n}", "function remove_admin_bar_options() {\n global $wp_admin_bar;\n\n $wp_admin_bar->remove_menu('wp-logo');\n\t$wp_admin_bar->remove_menu('comments');\n\t$wp_admin_bar->remove_menu('updates');\n $wp_admin_bar->remove_menu('new-content');\n $wp_admin_bar->remove_menu('wpseo-menu');\n}", "function gatescarbondrive_disable_wp_emojicons() {\n\tremove_action( 'admin_print_styles', 'print_emoji_styles' );\n\tremove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n\tremove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n\tremove_action( 'wp_print_styles', 'print_emoji_styles' );\n\tremove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );\n\tremove_filter( 'the_content_feed', 'wp_staticize_emoji' );\n\tremove_filter( 'comment_text_rss', 'wp_staticize_emoji' );\n\t// filter to remove TinyMCE emojis\n\tadd_filter( 'tiny_mce_plugins', 'gatescarbondrive_disable_emojicons_tinymce' );\n}", "public function removeLogoFromAdminBar()\n {\n global $wp_admin_bar;\n\n $wp_admin_bar->remove_menu('wp-logo');\n }", "function clean_admin_bar() {\n global $wp_admin_bar;\n /* Remove their stuff */\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu( 'about' ); // Remove the about WordPress link\n $wp_admin_bar->remove_menu( 'wporg' ); // Remove the WordPress.org link\n $wp_admin_bar->remove_menu( 'documentation' ); // Remove the WordPress documentation link\n $wp_admin_bar->remove_menu( 'support-forums' ); // Remove the support forums link\n $wp_admin_bar->remove_menu( 'feedback' ); // Remove the feedback link\n $wp_admin_bar->remove_menu( 'updates' ); // Remove the updates link\n $wp_admin_bar->remove_menu( 'comments' ); // Remove the comments link\n}", "function my_remove_recent_comments_style() {\n\tadd_filter( 'show_recent_comments_widget_style', '__return_false' );\n}", "function cosmos_remove_recent_comments_style() {\n\n\tglobal $wp_widget_factory;\n\n\tif ( isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments']) ) {\n\n\t\tremove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));\n\t}\n}", "function roots_remove_recent_comments_style() {\n global $wp_widget_factory;\n if (isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments'])) {\n remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));\n }\n}", "function launchpad_remove_recent_comments_style() {\n\tglobal $wp_widget_factory;\n\tremove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));\n}", "function remove_admin_bar_style_backend() { // css override for the admin page\n echo '<style>body.admin-bar #wpcontent, body.admin-bar #adminmenu { padding-top: 0px !important; }</style>';\n }", "function remove_admin_bar_links()\n{\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo'); // Remove the WordPress logo\n}", "function hide_admin_bar()\n\t{\n\t\tif (!current_user_can('administrator') && !is_admin()) {\n\t\t //show_admin_bar(false);\n\t\t}\n\t\tshow_admin_bar(false);\n\t}", "function tempera_remove_recent_comments_style() {\n\tglobal $wp_widget_factory;\n\tremove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );\n}", "function wpgrade_remove_recent_comments_style() {\r\n global $wp_widget_factory;\r\n if (isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments'])) {\r\n remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));\r\n }\r\n}", "function flatsome_remove_recent_comments_style() {\n global $wp_widget_factory;\n remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );\n }", "function ks_remove_recent_comments_style() {\n\tglobal $wp_widget_factory;\n\tremove_action( 'wp_head', array(\n\t\t$wp_widget_factory->widgets['WP_Widget_Recent_Comments'],\n\t\t'recent_comments_style'\n\t) );\n}", "function remove_recent_comments_style() {\n\tglobal $wp_widget_factory;\n\tremove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );\n}", "function remove_recent_comments_style() {\n global $wp_widget_factory;\n remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));\n}", "function rusticmodern_remove_recent_comments_style() {\n\tadd_filter( 'show_recent_comments_widget_style', '__return_false' );\n}", "function my_remove_recent_comments_style()\n{\n\tglobal $wp_widget_factory;\n\tremove_action('wp_head', array(\n\t\t$wp_widget_factory->widgets['WP_Widget_Recent_Comments'],\n\t\t'recent_comments_style'\n\t));\n}", "function spartan_remove_recent_comments_style() {\n global $wp_widget_factory;\n if (isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments'])) {\n remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));\n }\n}", "function ti_wp_foundation_theme_remove_recent_comments_style(){\n global $wp_widget_factory;\n if ( isset( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'] ) ){\n remove_action( 'wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));\n }\n}", "public function remove_admin_bar_item() {\n\t\tglobal $wp_admin_bar;\n\n\t\tif ( is_tax( 'ctrs-groups' ) ) {\n\t\t\t$wp_admin_bar->remove_menu( 'edit' );\n\t\t}\n\t}", "function my_remove_comments_menu_items() {\n $user = wp_get_current_user();\n if ( ! $user->has_cap( 'manage_options' ) ) {\n remove_menu_page( 'edit-comments.php' );\n remove_menu_page( 'edit.php' );\n remove_menu_page( 'upload.php' );\n remove_menu_page( 'tools.php' );\n remove_menu_page( 'wpcf7' );\n }\n}", "function bones_remove_recent_comments_style()\n{\n\tglobal $wp_widget_factory;\n\tif (isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments'])) {\n\t\tremove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));\n\t}\n}", "function boiler_remove_recent_comments_style() {\n global $wp_widget_factory;\n if (isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments'])) {\n remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));\n }\n}", "function gwt_disable_comments_admin_menu_redirect() {\r\n global $pagenow;\r\n if ($pagenow === 'edit-comments.php') {\r\n wp_redirect(admin_url()); exit;\r\n }\r\n}", "function mdwpfp_remove_recent_comments_style() {\n global $wp_widget_factory;\n if (isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments'])) {\n remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));\n }\n}", "function theme_remove_recent_comments_style() {\n global $wp_widget_factory;\n if (isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments'])) {\n remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));\n }\n}", "function remove_menus(){\n\t\tremove_menu_page( 'edit-comments.php' );//Comments\n\t}", "function disableAdminBar(){\n //remove_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); // for the front end\n\n /*function remove_admin_bar_style_backend() { // css override for the admin page\n echo '<style>body.admin-bar #wpcontent, body.admin-bar #adminmenu { padding-top: 0px !important; }</style>';\n }*/\n\n //add_filter('admin_head','remove_admin_bar_style_backend');\n\n function remove_admin_bar_style_frontend() { // css override for the frontend\n echo '<style type=\"text/css\" media=\"screen\">\n html { margin-top: 0px !important; }\n * html body { margin-top: 0px !important; }\n </style>';\n }\n\n add_filter('wp_head','remove_admin_bar_style_frontend', 99);\n\n }", "function disable_wp_emojicons() {\n remove_action('admin_print_styles', 'print_emoji_styles');\n remove_action('wp_head', 'print_emoji_detection_script', 7);\n remove_action('admin_print_scripts', 'print_emoji_detection_script');\n remove_action('wp_print_styles', 'print_emoji_styles');\n remove_filter('wp_mail', 'wp_staticize_emoji_for_email');\n remove_filter('the_content_feed', 'wp_staticize_emoji');\n remove_filter('comment_text_rss', 'wp_staticize_emoji');\n}", "function fielding_remove_wpadminbar_margin() {\n\tremove_action( 'wp_head', '_admin_bar_bump_cb' );\n}", "function dashboard_tweaks() {\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->remove_menu('comments');\n\t$wp_admin_bar->remove_menu('about');\n\t$wp_admin_bar->remove_menu('wporg');\n\t$wp_admin_bar->remove_menu('documentation');\n\t$wp_admin_bar->remove_menu('support-forums');\n\t$wp_admin_bar->remove_menu('feedback');\n\t$wp_admin_bar->remove_menu('view-site');\n\t$wp_admin_bar->remove_menu('new-content');\n\t$wp_admin_bar->remove_menu('customize');\n\t$wp_admin_bar->remove_menu('search'); \n}", "function tlh_remove_recent_comments_style() {\n\tglobal $wp_widget_factory;\n\tif ( isset( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'] ) ) {\n\t\tremove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );\n\t}\n}", "function generate_disable_wp_emojicons() {\n remove_action( 'admin_print_styles', 'print_emoji_styles' );\n remove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n remove_action( 'wp_print_styles', 'print_emoji_styles' );\n remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );\n remove_filter( 'the_content_feed', 'wp_staticize_emoji' );\n remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );\n}", "function remove_pending_css_admin() { \n\t?>\n\n\t<link rel=\"stylesheet\" href=\"<?php echo get_bloginfo( 'home' ) . '/' . PLUGINDIR . '/remove-pending-comments/css/admin.css' ?>\" type=\"text/css\" media=\"all\" /> \n\n\t<?php\n}", "function remove_admin_bar_links() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu('about');\n $wp_admin_bar->remove_menu('wporg');\n $wp_admin_bar->remove_menu('documentation');\n $wp_admin_bar->remove_menu('support-forums');\n $wp_admin_bar->remove_menu('feedback');\n $wp_admin_bar->remove_menu('updates');\n $wp_admin_bar->remove_menu('comments');\n $wp_admin_bar->remove_menu('new-content');\n}", "function custom_remove_recent_comments_style() {\n\tglobal $wp_widget_factory;\n\n\tremove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );\n}", "function ea_remove_avatars_from_comments( $avatar ) {\n\tglobal $in_comment_loop;\n\treturn $in_comment_loop ? '' : $avatar;\n}", "function remove_admin_bar_links() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo'); // Remove the WordPress logo\n $wp_admin_bar->remove_menu('about'); // Remove the about WordPress link\n $wp_admin_bar->remove_menu('wporg'); // Remove the WordPress.org link\n $wp_admin_bar->remove_menu('documentation'); // Remove the WordPress documentation link\n $wp_admin_bar->remove_menu('support-forums'); // Remove the support forums link\n $wp_admin_bar->remove_menu('feedback'); // Remove the feedback link\n $wp_admin_bar->remove_menu('site-name'); // Remove the site name menu\n $wp_admin_bar->remove_menu('view-site'); // Remove the view site link\n $wp_admin_bar->remove_menu('updates'); // Remove the updates link\n $wp_admin_bar->remove_menu('comments'); // Remove the comments link\n $wp_admin_bar->remove_menu('new-content'); // Remove the content link\n $wp_admin_bar->remove_menu('w3tc'); // If you use w3 total cache remove the performance link\n //$wp_admin_bar->remove_menu('my-account'); // Remove the user details tab\n}", "function twentyten_remove_recent_comments_style() {\n\tadd_filter( 'show_recent_comments_widget_style', '__return_false' );\n}", "function my_remove_recent_comments_style()\n{\n global $wp_widget_factory;\n remove_action('wp_head', array(\n $wp_widget_factory->widgets['WP_Widget_Recent_Comments'],\n 'recent_comments_style'\n ));\n}", "function disable_wp_emojicons() {\r\n\t \tremove_action( 'admin_print_styles', 'print_emoji_styles' );\r\n\t \tremove_action( 'wp_head', 'print_emoji_detection_script', 7 );\r\n\t \tremove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\r\n\t \tremove_action( 'wp_print_styles', 'print_emoji_styles' );\r\n\t \tremove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );\r\n\t \tremove_filter( 'the_content_feed', 'wp_staticize_emoji' );\r\n\t \tremove_filter( 'comment_text_rss', 'wp_staticize_emoji' );\r\n\r\n\t \tadd_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce' );\r\n\t}", "function start_remove_recent_comments_style() {\n\tglobal $wp_widget_factory;\n\tif ( isset( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'] ) ) {\n\t\tremove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );\n\t}\n}", "function rgc_disable_comments_admin_menu_redirect() {\n global $pagenow;\n if ($pagenow === 'edit-comments.php') {\n wp_redirect(admin_url()); exit;\n }\n}", "function rgc_disable_comments_admin_menu_redirect() {\n global $pagenow;\n if ($pagenow === 'edit-comments.php') {\n wp_redirect(admin_url()); exit;\n }\n}", "function <%= functionPrefix %>_remove_admin_bar() {\n return false;\n}", "function twentyten_remove_recent_comments_style() {\n\tglobal $wp_widget_factory;\n\tremove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );\n}", "function df_disable_comments_admin_menu_redirect()\n{\n global $pagenow;\n if ($pagenow === 'edit-comments.php') {\n wp_redirect(admin_url());\n exit;\n }\n}", "function cc_hide_admin_bar() {\n\t$adminBar = current_user_can_for_blog( get_current_blog_id(),'edit_others_posts' );\n\n\tif ( ! $adminBar ) {\n\t\tshow_admin_bar( false );\n\t}\n}", "function disable_wp_emojicons() {\n remove_action( 'admin_print_styles', 'print_emoji_styles' );\n remove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n remove_action( 'wp_print_styles', 'print_emoji_styles' );\n remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );\n remove_filter( 'the_content_feed', 'wp_staticize_emoji' );\n remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );\n add_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce' );\n}" ]
[ "0.78403044", "0.77598006", "0.7736252", "0.76799655", "0.76010615", "0.7386835", "0.7361903", "0.7250317", "0.72267354", "0.7222358", "0.7222358", "0.71916944", "0.71463954", "0.71463954", "0.7060903", "0.7050019", "0.70280534", "0.70223075", "0.70223075", "0.69836855", "0.69721806", "0.69269127", "0.6901455", "0.6854965", "0.68150336", "0.6790254", "0.6768026", "0.67596513", "0.67468613", "0.674146", "0.674146", "0.67398095", "0.67359483", "0.6712739", "0.66887933", "0.66839385", "0.6678162", "0.6678162", "0.6670462", "0.66572255", "0.6600691", "0.6557034", "0.65416914", "0.6510393", "0.6475985", "0.64429045", "0.63833284", "0.6279924", "0.626456", "0.6264356", "0.62633395", "0.62494665", "0.619113", "0.61829114", "0.617562", "0.6170878", "0.61676204", "0.61327195", "0.6130428", "0.6128561", "0.6119297", "0.6113444", "0.61023426", "0.6099323", "0.6097685", "0.60948634", "0.60929984", "0.6076552", "0.60677314", "0.60642725", "0.6064161", "0.6057292", "0.60519904", "0.60496813", "0.6047827", "0.6043418", "0.60409653", "0.60258603", "0.6024353", "0.60186374", "0.6005282", "0.60031545", "0.59997857", "0.5992926", "0.598816", "0.59769213", "0.5974569", "0.5973032", "0.59728295", "0.5972524", "0.59696573", "0.5967468", "0.5967122", "0.595777", "0.595777", "0.5952822", "0.5944644", "0.5943282", "0.59430116", "0.59308106" ]
0.7861123
0
remove admin menu home page widgets
public function remove_dashboard_widgets() { remove_meta_box("dashboard_primary", "dashboard", "side"); // WordPress.com blog remove_meta_box("dashboard_secondary", "dashboard", "side"); // Other WordPress news global $wp_meta_boxes; unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']); unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_admin() {\n\tremove_menu_page('link-manager.php');\n\tremove_menu_page('edit-comments.php');\n\tremove_menu_page('upload.php');\n}", "function clean_admin_bar() {\n global $wp_admin_bar;\n /* Remove their stuff */\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu( 'about' ); // Remove the about WordPress link\n $wp_admin_bar->remove_menu( 'wporg' ); // Remove the WordPress.org link\n $wp_admin_bar->remove_menu( 'documentation' ); // Remove the WordPress documentation link\n $wp_admin_bar->remove_menu( 'support-forums' ); // Remove the support forums link\n $wp_admin_bar->remove_menu( 'feedback' ); // Remove the feedback link\n $wp_admin_bar->remove_menu( 'updates' ); // Remove the updates link\n $wp_admin_bar->remove_menu( 'comments' ); // Remove the comments link\n}", "function dashboard_tweaks() {\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->remove_menu('comments');\n\t$wp_admin_bar->remove_menu('about');\n\t$wp_admin_bar->remove_menu('wporg');\n\t$wp_admin_bar->remove_menu('documentation');\n\t$wp_admin_bar->remove_menu('support-forums');\n\t$wp_admin_bar->remove_menu('feedback');\n\t$wp_admin_bar->remove_menu('view-site');\n\t$wp_admin_bar->remove_menu('new-content');\n\t$wp_admin_bar->remove_menu('customize');\n\t$wp_admin_bar->remove_menu('search'); \n}", "function remove_admin_bar_options() {\n global $wp_admin_bar;\n\n $wp_admin_bar->remove_menu('wp-logo');\n\t$wp_admin_bar->remove_menu('comments');\n\t$wp_admin_bar->remove_menu('updates');\n $wp_admin_bar->remove_menu('new-content');\n $wp_admin_bar->remove_menu('wpseo-menu');\n}", "function shift_admin_menu_cleanup() {\n remove_menu_page( 'edit.php' );\n remove_menu_page( 'edit-comments.php' );\n}", "function remove_admin_bar_links() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu('updates');\n $wp_admin_bar->remove_menu('comments');\n}", "function remove_admin_bar_links() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo'); // Remove the WordPress logo\n $wp_admin_bar->remove_menu('about'); // Remove the about WordPress link\n $wp_admin_bar->remove_menu('wporg'); // Remove the WordPress.org link\n $wp_admin_bar->remove_menu('documentation'); // Remove the WordPress documentation link\n $wp_admin_bar->remove_menu('support-forums'); // Remove the support forums link\n $wp_admin_bar->remove_menu('feedback'); // Remove the feedback link\n $wp_admin_bar->remove_menu('site-name'); // Remove the site name menu\n $wp_admin_bar->remove_menu('view-site'); // Remove the view site link\n $wp_admin_bar->remove_menu('updates'); // Remove the updates link\n $wp_admin_bar->remove_menu('comments'); // Remove the comments link\n $wp_admin_bar->remove_menu('new-content'); // Remove the content link\n $wp_admin_bar->remove_menu('w3tc'); // If you use w3 total cache remove the performance link\n //$wp_admin_bar->remove_menu('my-account'); // Remove the user details tab\n}", "function remove_admin_bar_links() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu('about');\n $wp_admin_bar->remove_menu('wporg');\n $wp_admin_bar->remove_menu('documentation');\n $wp_admin_bar->remove_menu('support-forums');\n $wp_admin_bar->remove_menu('feedback');\n $wp_admin_bar->remove_menu('updates');\n $wp_admin_bar->remove_menu('comments');\n $wp_admin_bar->remove_menu('new-content');\n}", "function remove_admin_bar() {\n\tshow_admin_bar(false);\n}", "function my_remove_admin_menus() {\n\t\t\tremove_menu_page('edit-comments.php');\n\t\t}", "function remove_admin_bar_links() {\n // global $wp_admin_bar;\n\n //$wp_admin_bar->remove_menu('wp-logo');\n //$wp_admin_bar->remove_menu('updates');\n //$wp_admin_bar->remove_menu('my-account');\n //$wp_admin_bar->remove_menu('site-name');\n //$wp_admin_bar->remove_menu('my-sites');\n //$wp_admin_bar->remove_menu('get-shortlink');\n //$wp_admin_bar->remove_menu('edit');\n //$wp_admin_bar->remove_menu('new-content');\n //$wp_admin_bar->remove_menu('comments');\n //$wp_admin_bar->remove_menu('search');\n}", "function pilkie_remove_admin_menu () {\n\tremove_menu_page('edit-comments.php');\n\tremove_menu_page('edit.php');\n}", "function remove_admin_menus() {\n remove_menu_page( 'edit-comments.php' ); // Comments\n remove_menu_page( 'tools.php' ); // Tools\n}", "function remove_admin_bar_links() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('themes');\n $wp_admin_bar->remove_menu('background');\n $wp_admin_bar->remove_menu('header');\n $wp_admin_bar->remove_menu('documentation');\n $wp_admin_bar->remove_menu('about');\n $wp_admin_bar->remove_menu('wporg');\n $wp_admin_bar->remove_menu('support-forums');\n $wp_admin_bar->remove_menu('feedback');\n}", "function hide_menu() {\n // To remove the whole Appearance admin menu\n //remove_menu_page( 'themes.php' );\n\n // remove the theme editor and theme options submenus \n\n remove_submenu_page( 'themes.php', 'themes.php' );\n remove_submenu_page( 'themes.php', 'theme-editor.php' );\n remove_submenu_page( 'themes.php', 'customize.php' );\n remove_submenu_page( 'themes.php', 'theme_options' );\n remove_submenu_page( 'themes.php', 'options-framework' );\n\n}", "function mytheme_admin_bar_render() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('comments');\n $wp_admin_bar->remove_menu('new-post');\n}", "function updateAdminMenu() {\n remove_menu_page( 'edit-comments.php' );\n }", "function theme_remove_admin_bar() {\r\n\treturn false;\r\n}", "function remove_yoast_seo_admin_bar() {\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->remove_menu('wpseo-menu');\n}", "function kanso_custom_menu_page_removing() {\n //remove_menu_page( 'themes.php' ); // Appearance -- (!) There are other ways to do this\n //remove_menu_page( itsec ); // iThemes Security -- Very specific, consider revising\n}", "function remove_admin_bar_links()\n{\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo'); // Remove the WordPress logo\n}", "public function remove_admin_bar_items() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu(\"comments\");\n }", "function my_admin_bar_remove_menu() {\n\tglobal $wp_admin_bar;\n\tif (!current_user_can('manage_options')) {\n\t\t$wp_admin_bar->remove_menu('new-post');\n\t\t$wp_admin_bar->remove_menu('new-media');\n\t\t$wp_admin_bar->remove_menu('new-page');\n\t\t$wp_admin_bar->remove_menu('comments');\n\t\t$wp_admin_bar->remove_menu('wporg');\n \t$wp_admin_bar->remove_menu('documentation');\n \t$wp_admin_bar->remove_menu('support-forums');\n \t$wp_admin_bar->remove_menu('feedback');\n \t$wp_admin_bar->remove_menu('wp-logo');\n \t$wp_admin_bar->remove_menu('view-site');\n\t}\n}", "function fes_remove_posts_admin_bar() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('new-post');\n}", "function base_admin_bar_remove_menu_links_bloom() {\n\tglobal $wp_admin_bar;\n\n\t$wp_admin_bar->remove_menu( 'about' );\n\t$wp_admin_bar->remove_menu( 'wporg' );\n\t$wp_admin_bar->remove_menu( 'documentation' );\n\t$wp_admin_bar->remove_menu( 'support-forums' );\n\t$wp_admin_bar->remove_menu( 'feedback' );\n}", "function remove_wp_logo(){\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo');\n}", "function plasso_remove_menus() {\n\n\t// Removes unused top level menus.\n\tremove_menu_page('edit.php');\n\tremove_menu_page('edit-comments.php');\n}", "function sld_manage_menu_items() {\n\tif( !current_user_can( 'administrator' ) ) {\n\t}\n\tremove_menu_page('link-manager.php'); // Links\n\t// remove_menu_page('edit.php'); // Posts\n\tremove_menu_page('upload.php'); // Media\n\t// remove_menu_page('edit-comments.php'); // Comments\n\t// remove_menu_page('edit.php?post_type=page'); // Pages\n\t// remove_menu_page('plugins.php'); // Plugins\n\t// remove_menu_page('themes.php'); // Appearance\n\t// remove_menu_page('users.php'); // Users\n\t// remove_menu_page('tools.php'); // Tools\n\t// remove_menu_page('options-general.php'); // Settings\n}", "function remove_menus(){\n\tif ( ! current_user_can('update_core') ) {\n\t remove_menu_page( 'index.php' ); //Dashboard\n\t remove_menu_page( 'edit-comments.php' ); //Comments\n\t remove_menu_page( 'themes.php' ); //Appearance\n\t remove_menu_page( 'plugins.php' ); //Plugins\n\t remove_menu_page( 'users.php' ); //Users\n\t remove_menu_page( 'tools.php' ); //Tools\n\t remove_menu_page( 'profile.php' ); //Tools\n\t} \n}", "function remove_business_starter_widgets(){\n\n\tunregister_sidebar( 'sidebar-1' );\n\tunregister_sidebar( 'sidebar-2' );\n\tunregister_sidebar( 'sidebar-3' );\n}", "function templ_remove_dashboard_widgets()\r\n{\r\n /* Globalize the metaboxes array, this holds all the widgets for wp-admin*/\r\n global $wp_meta_boxes;\r\n /* Remove the Dashboard quickpress widget*/\r\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\r\n /* Remove the Dashboard incoming links widget*/\r\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\r\n /* Remove the Dashboard secondary widget*/\r\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\r\n}", "function remove_menus(){ \n\t// remove_menu_page('edit.php');\n\t// remove_menu_page('edit-comments.php');\n}", "function rad_remove_dash_widgets(){\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n}", "function carr_remove_menus() {\n\tremove_menu_page( 'link-manager.php' );\n\tremove_menu_page( 'edit-comments.php' );\n}", "function mitlibnews_remove_dashboard_menu_items() {\n\tif (!current_user_can('add_users')) {\n\t\tremove_menu_page('edit-comments.php');\n\t\tremove_menu_page('tools.php');\n\t}\n}", "function customize_dashboard_menu() {\n\t// Examples:\n\t// Removes the \"Comments\" item from the admin menu\n\t// remove_menu_page( 'edit-comments.php' );\n\t// Swaps the position of the \"Pages\" and \"Posts\" admin menu items\n\t// swap_admin_menu_sections('Pages','Posts');\n}", "function fes_remove_posts_admin_menus() {\n remove_menu_page( 'edit.php' );\n}", "function uam_announcements_remove_menu () {\n\n\tif ( ! is_network_admin() ) :\n\t\n\t\tremove_menu_page( \"UAMSiteAnnouncements\" );\n\t\n\tendif;\n\n}", "function remove_menus()\n{\n \tremove_menu_page('edit-comments.php');\n}", "function extamus_remove_menu_pages() {\n if ( ! current_user_can( 'administrator' ) ) {\n remove_menu_page( 'index.php' ); //Dashboard\n remove_menu_page( 'edit.php' ); //Posts\n remove_menu_page( 'upload.php' ); //Media\n remove_menu_page( 'edit.php?post_type=page' ); //Pages\n remove_menu_page( 'edit-comments.php' ); //Comments\n remove_menu_page( 'themes.php' ); //Appearance\n remove_menu_page( 'plugins.php' ); //Plugins\n remove_menu_page( 'users.php' ); //Users\n remove_menu_page( 'tools.php' ); //Tools\n remove_menu_page( 'options-general.php' ); //Settings\n remove_menu_page( 'acf.php' ); //Advanced Custom Fields\n}}", "public function admin_menus() {\n\t\t// this is an empty title because we do not want it to display.\n\t\tadd_dashboard_page( '', '', 'manage_options', 'wsal-setup', '' );\n\t\t// hide it via CSS as well so screen readers pass over it.\n\t\tadd_action(\n\t\t\t'admin_head',\n\t\t\tfunction() {\n\t\t\t\t?>\n\t\t\t\t<style>\n\t\t\t\t.wp-submenu a[href=\"wsal-setup\"]{\n\t\t\t\t\tdisplay: none !important;\n\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t\t<?php\n\t\t\t}\n\t\t);\n\t}", "function remove_menus(){\n\t\tremove_menu_page( 'edit-comments.php' );//Comments\n\t}", "function ah_admin_bar_render() {\n\t\tglobal $wp_admin_bar;\n\t\t$wp_admin_bar->remove_menu( 'comments' );\n\t}", "function ks_disable_posts_admin_menu() {\n remove_menu_page('edit.php');\n}", "function admin_remove_menus() {\n if ( ! current_user_can( 'manage_options' ) ) {\n remove_menu_page( 'themes.php' ); // Appearance\n remove_menu_page( 'plugins.php' ); // Plugins\n remove_menu_page( 'users.php' ); // Users\n remove_menu_page( 'profile.php' ); // Profile\n remove_menu_page( 'tools.php' ); // Tools\n remove_menu_page( 'options-general.php' ); // Settings\n }\n}", "function mytheme_admin_bar_render() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('comments');\n}", "function my_remove_menu_pages() {\n global $menu;\n if (!current_user_can('manage_options')) {\n remove_menu_page('tools.php');\n remove_menu_page('edit-comments.php');\n\t remove_menu_page('upload.php');\n\t remove_menu_page('edit.php');\n\t\tremove_menu_page('edit.php?post_type=page');\n\t\tremove_menu_page('index.php');\n\t\tunset($menu[4]);\n }\n}", "function edit_admin() {\n\n \t\t// remove all WordPress default dashboard widgets\n \t\tremove_meta_box( 'dashboard_activity', 'dashboard', 'core' );\n \t\tremove_meta_box( 'dashboard_right_now', 'dashboard', 'core' );\n \t\tremove_meta_box( 'dashboard_recent_comments', 'dashboard', 'core' );\n \t\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'core' );\n \t\tremove_meta_box( 'dashboard_plugins', 'dashboard', 'core' );\n \t\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'core' );\n \t\tremove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'core' );\n \t\tremove_meta_box( 'dashboard_primary', 'dashboard', 'core' );\n \t\tremove_meta_box( 'dashboard_secondary', 'dashboard', 'core' );\n\n \t\t// remove Tools menu\n \t\tremove_menu_page( 'tools.php' );\n\n \t\t// remove \"Header\" and \"Custom Background\" sub-menus from \"Appearance\"\n \t\tremove_submenu_page( 'themes.php', 'custom-header' );\n \t\tremove_submenu_page( 'themes.php', 'custom-background' );\n \t\t// remove Edit CSS sub-menu from \"Appearance\" (since WP 4.8)\n \t\tremove_submenu_page( 'themes.php', 'editcss-customizer-redirect' );\n\n\n \t}", "public function wp_admin_bar() {\n\t\t\t\n\t\t\tremove_action( 'wp_head', '_admin_bar_bump_cb' );\n\t\t\t\n\t\t}", "public static function admin()\n {\n HRHarvardTheme::get_template_part( 'admin', 'nav-widget' );\n }", "function h_remove_menu(array $args) {\n if (!is_admin()) { return; }\n\n $menu = new H_Sidenav($args);\n $menu->remove();\n}", "function lgm_theme_edit_adminbar() {\n if (current_user_can('editor')) {\n global $wp_admin_bar;\n $wp_admin_bar->remove_node('customize');\n $wp_admin_bar->remove_node('comments');\n $wp_admin_bar->remove_menu('wp-logo');\n }\n }", "function remove_menu_items() {\n remove_menu_page( 'edit.php' );\n}", "function wooadmin_wp_fluency_admin_bar_unhide_menu() {\n global $wp_admin_bar;\n ?> <span class=\"unique\"><?php $wp_admin_bar->add_menu( array( 'id' => 'wp-eshopbox-messages-menu', 'title' => __('Messages','eshopbox-admin'), 'href' => '#abc', 'meta'=>array('class'=>'unhidden') ) );?> </span><?php\n}", "function remove_admin_bar_from_head() {\n remove_action('wp_head', '_admin_bar_bump_cb');\n show_admin_bar(false);\n}", "function my_admin_bar_render() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('comments');\n}", "function my_admin_bar_render() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('comments');\n}", "function remove_menu_pages() {\n //remove_menu_page( 'upload.php' ); //Media\n remove_menu_page( 'edit-comments.php' ); //Comments\n //remove_menu_page( 'themes.php' ); //Appearance\n //remove_menu_page( 'tools.php' ); //Tools\n //remove_menu_page( 'options-general.php' ); //Settings\n //remove_menu_page( 'edit.php?post_type=page' );\n \n}", "function remove_widgets(){\r\n remove_meta_box('dashboard_right_now', 'dashboard', 'normal'); \r\n remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); \r\n remove_meta_box('dashboard_activity', 'dashboard', 'normal'); \r\n remove_meta_box('dashboard_primary', 'dashboard', 'side'); \r\n remove_meta_box('dashboard_site_health', 'dashboard', 'side'); \r\n \r\n // Eliminar widget de Elementor que aparece al activar su plugin\r\n remove_meta_box('e-dashboard-overview', 'dashboard', 'normal'); \r\n}", "function hide_admin_links() {\n\tremove_menu_page( 'edit-comments.php' );\n}", "function remove_menus() {\n\tremove_menu_page( 'edit-comments.php' );\n}", "function alt_remove_wp_logo()\n {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo');\n }", "function ks_disable_posts_admin_bar() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('new-post');\n}", "function remove_menus() {\n if( !current_user_can( 'administrator' ) ) {\n\n remove_menu_page( 'index.php' ); //Dashboard\n remove_menu_page( 'edit-comments.php' ); //Comments\n remove_menu_page( 'themes.php' ); //Appearance\n remove_menu_page( 'plugins.php' ); //Plugins\n remove_menu_page( 'tools.php' ); //Tools\n remove_menu_page( 'options-general.php' ); //Settings\n remove_menu_page( 'users.php' ); \n remove_menu_page( 'link-manager.php' ); \n remove_menu_page( 'responsive-menu' ); \n remove_menu_page( 'smush' ); \n remove_menu_page( 'edit.php?post_type=acf-field-group' ); \n }\n}", "function remove_editor_menu() {\n remove_action('admin_menu', '_add_themes_utility_last', 101);\n}", "function _mai_remove_widget_header_menu_args() {\n\tremove_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' );\n\tremove_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' );\n}", "function remove_admin_bar() {\n\t\tif (!current_user_can('manage_options') && !is_admin()) {\n\t\t show_admin_bar(false);\n\t\t}\n\t}", "function my_remove_menu_pages(){\n\t// remove_menu_page('edit.php?post_type=acf');\n\t// remove_menu_page( 'index.php' ); //Dashboard\n\t//remove_menu_page( 'edit.php' ); \t//Posts\n\t// remove_menu_page( 'upload.php' ); //Media\n\t// remove_menu_page( 'edit.php?post_type=page' ); \t//Pages\n\t//remove_menu_page( 'edit-comments.php' ); \t//Comments\n\t// remove_menu_page( 'themes.php' ); //Appearance\n\t// remove_menu_page( 'plugins.php' ); //Plugins\n\t#remove_menu_page( 'users.php' ); \t//Users\n\t//remove_menu_page( 'tools.php' ); \t//Tools\n\t// remove_menu_page( 'options-general.php' ); //Settings\n}", "public function removeLogoFromAdminBar()\n {\n global $wp_admin_bar;\n\n $wp_admin_bar->remove_menu('wp-logo');\n }", "function remove_parent_widgets(){\n\t\t\n\t// remove footer sidebars\n\tunregister_sidebar( 'sidebar-3' );\n\tunregister_sidebar( 'sidebar-4' );\n\tunregister_sidebar( 'sidebar-5' );\n\t\n\t\n}", "function remove_menus(){\n //remove_menu_page( 'index.php' ); //Dashboard\n //remove_menu_page( 'edit.php' ); //Posts\n //remove_menu_page( 'upload.php' ); //Media\n //remove_menu_page( 'edit.php?post_type=page' ); //Pages\n //remove_menu_page( 'edit-comments.php' ); //Comments\n //remove_menu_page( 'themes.php' ); //Appearance\n //remove_menu_page( 'plugins.php' ); //Plugins\n //remove_menu_page( 'users.php' ); //Users\n //remove_menu_page( 'tools.php' ); //Tools\n //remove_menu_page( 'options-general.php' ); //Settings\n\n }", "public static function remove_menu_pages() {\n\t\t$post_type = Registrations::get_post_type();\n\n\t\tremove_submenu_page( \"edit.php?post_type={$post_type}\", \"manage_frontend_uploader_{$post_type}s\" );\n\t\tremove_submenu_page( 'upload.php', 'manage_frontend_uploader' );\n\t}", "function rgc_remove_menus(){\n remove_menu_page( 'jetpack' ); //Jetpack* \n //remove_menu_page( 'edit.php' ); //Posts\n //remove_menu_page( 'upload.php' ); //Media\n //remove_menu_page( 'edit.php?post_type=page' ); //Pages\n remove_menu_page( 'edit-comments.php' ); //Comments\n //remove_menu_page( 'themes.php' ); //Appearance\n //remove_menu_page( 'plugins.php' ); //Plugins\n //remove_menu_page( 'users.php' ); //Users\n //remove_menu_page( 'tools.php' ); //Tools\n //remove_menu_page( 'options-general.php' ); //Settings\n}", "function rgc_remove_menus(){\n remove_menu_page( 'jetpack' ); //Jetpack* \n //remove_menu_page( 'edit.php' ); //Posts\n //remove_menu_page( 'upload.php' ); //Media\n //remove_menu_page( 'edit.php?post_type=page' ); //Pages\n remove_menu_page( 'edit-comments.php' ); //Comments\n //remove_menu_page( 'themes.php' ); //Appearance\n //remove_menu_page( 'plugins.php' ); //Plugins\n //remove_menu_page( 'users.php' ); //Users\n remove_menu_page( 'tools.php' ); //Tools\n //remove_menu_page( 'options-general.php' ); //Settings\n}", "function remove_menus_bloggood_ru(){\n// remove_menu_page( 'index.php' ); //Консоль\n// remove_menu_page( 'edit.php' ); //Записи\n// remove_menu_page( 'upload.php' ); //Медиафайлы\n// remove_menu_page( 'edit.php?post_ENGINE=page' ); //Страницы\n// remove_menu_page( 'edit-comments.php' ); //Комментарии\n// remove_menu_page( 'themes.php' ); //Внешний вид\n// remove_menu_page( 'plugins.php' ); //Плагины\n// remove_menu_page( 'users.php' ); //Пользователи\n// remove_menu_page( 'tools.php' ); //Инструменты\n// remove_menu_page( 'options-general.php' ); //Настройки\n\n}", "function remove_branding() {\n\n\t\tremove_action('thematic_header','thematic_brandingopen',1);\n\n\t\tremove_action('thematic_header','thematic_access',9);\n\n}", "function lose_the_widgets ()\r\n{\r\n unregister_sidebar( 'sidebar-1' );\r\n unregister_sidebar( 'sidebar-2' );\r\n unregister_sidebar( 'sidebar-3' );\r\n}", "function filter_admin_menues() {\n\t\t\n\t\t// If administrator then do nothing\n\t\tif (current_user_can('activate_plugins')) return;\n\t\t\n\t\t// Remove main menus\n\t\t$main_menus_to_stay = array(\n\t\t\t\n\t\t\t// Dashboard\n\t\t\t'index.php',\n\t\t\t\n\t\t\t// Edit\n\t\t\t'edit.php',\n\t\t\t\n\t\t\t// Media\n\t\t\t'upload.php'\n\t\t);\n\n\t\t// Remove sub menus\n\t\t$sub_menus_to_stay = array(\n\t\t\t\n\t\t\t// Dashboard\n\t\t\t'index.php' => ['index.php'],\n\t\t\t\n\t\t\t// Edit\n\t\t\t'edit.php' => ['edit.php', 'post-new.php'],\n\t\t\t\n\t\t\t// Media\n\t\t\t'upload.php' => ['upload.php', 'media-new.php'],\n\t\t\t\n\t\t\t\n\t\t);\n\n\n\t\tif (isset($GLOBALS['menu']) && is_array($GLOBALS['menu'])) {\n\t\t\tforeach ($GLOBALS['menu'] as $k => $main_menu_array) {\t\t\t\t\n\t\t\t\t// Remove main menu\n\t\t\t\tif (!in_array($main_menu_array[2], $main_menus_to_stay)) {\n\t\t\t\t\tremove_menu_page($main_menu_array[2]);\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t// Remove submenu\n\t\t\t\t\tforeach ($GLOBALS['submenu'][$main_menu_array[2]] as $k => $sub_menu_array) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!in_array($sub_menu_array[2], $sub_menus_to_stay[$main_menu_array[2]])) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tremove_submenu_page($main_menu_array[2], $sub_menu_array[2]);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function remove_menus(){\n \n remove_menu_page( 'edit.php' ); //Posts\n remove_menu_page( 'edit-comments.php' ); //Comments\n remove_menu_page( 'themes.php' ); //Appearance\n\t//remove_menu_page( 'plugins.php' ); //Plugins\n //remove_menu_page( 'users.php' ); //Users\n \n}", "function isf_remove_unused_menu_options() {\n\n\tremove_menu_page( 'edit.php' ); // Removes Posts.\n\tremove_menu_page( 'edit.php?post_type=page' ); // Removes Pages.\n\tremove_menu_page( 'edit-comments.php' ); // Removes Comments.\n\n}", "function mmc_dashboard(){\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n}", "function dwwp_remove_dashboard_widget() {\n remove_meta_box( 'dashboard_primary','dashboard','side' );\n}", "function d4tw_remove_menus(){\r\nif ( current_user_can( 'editor' ) ) {\r\nremove_menu_page( 'tools.php' );\r\n\t}\r\n}", "public function remove_admin_bar_item() {\n\t\tglobal $wp_admin_bar;\n\n\t\tif ( is_tax( 'ctrs-groups' ) ) {\n\t\t\t$wp_admin_bar->remove_menu( 'edit' );\n\t\t}\n\t}", "function fp_remove_default_dashboard_widgets() { \n\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n /*remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');*/\n}", "function wp_debranding_remove_wp_logo() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo');\n }", "function remove_admin_bar_style_backend() { // css override for the admin page\n echo '<style>body.admin-bar #wpcontent, body.admin-bar #adminmenu { padding-top: 0px !important; }</style>';\n }", "function maker_4ym_remove_dashboard_widgets() {\n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );\n}", "function remove_dashboard_widgets() {\n\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n\tremove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n\t// remove_meta_box( 'dashboard_primary', 'dashboard', 'normal' );\n\tremove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n}", "function admin_bar_remove_logo() {\n // if ( ! current_user_can( 'manage_options' ) ) {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu( 'wp-logo' );\n // }\n}", "function remove_menus(){\n\n remove_menu_page( 'edit-comments.php' ); //Comments\n\n}", "function bs_configure_remove_admin_links($args)\n{\n function bs_remove_admin_links()\n {\n global $bs_config;\n\n foreach ($bs_config[\"remove-admin-links\"] as $link) {\n if (is_array($link)) {\n remove_submenu_page($link[0], $link[1]);\n } else {\n remove_menu_page($link);\n }\n\n }\n }\n add_action(\"admin_menu\", \"bs_remove_admin_links\");\n}", "function torque_remove_menus(){\n\n //remove_menu_page( 'index.php' ); //Dashboard\n //remove_menu_page( 'edit.php' ); //Posts\n //remove_menu_page( 'upload.php' ); //Media\n //remove_menu_page( 'edit.php?post_type=page' ); //Pages\n //remove_menu_page( 'edit-comments.php' ); //Comments\n //remove_menu_page( 'themes.php' ); //Appearance\n //remove_menu_page( 'plugins.php' ); //Plugins\n //remove_menu_page( 'users.php' ); //Users\n //remove_menu_page( 'tools.php' ); //Tools\n //remove_menu_page( 'options-general.php' ); //Settings\n\n }", "private function removeFromAdminMenu()\n {\n if (array_key_exists('admin-menu', $this->features)\n && array_key_exists('remove', $this->features['admin-menu'])\n ) {\n $items = $this->features['admin-menu']['remove'];\n\n foreach ($items as $item) {\n if (is_string($item)) {\n add_action('admin_menu', function () use ($item) {\n remove_menu_page($item);\n });\n } elseif (is_array($item)) {\n $menu = array_keys($item)[0];\n foreach ($item as $submenus) {\n foreach ($submenus as $submenu) {\n add_action('admin_menu', function () use ($menu, $submenu) {\n remove_submenu_page($menu, $submenu);\n });\n }\n }\n }\n }\n }\n }", "function GTPress_unset_dashboard() {\r\n\t$disabled_menu_items = get_option('gtpressMenu_disabled_menu_items');\r\n\t$disabled_submenu_items = get_option('gtpressMenu_disabled_submenu_items');\r\n\tif (in_array('index.php', $disabled_menu_items)) {\r\n\t\tglobal $wp_meta_boxes;\r\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\r\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\r\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\r\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_wordpress_blog']);\r\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\r\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_other_wordpress_news']);\r\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\t\r\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\r\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\r\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\r\n\t}\r\n}", "function adminbar_remove_customise()\n{\n global $wp_admin_bar;\n if (!current_user_can('administrator')) {\n $wp_admin_bar->remove_menu('customize');\n }\n}", "function wp_admin_bar_site_menu($wp_admin_bar)\n {\n }", "function remove_menus(){\n\t// Remove Dashboard\n\tremove_menu_page('index.php');\n\t// Posts\n\t//remove_menu_page('edit.php');\n\t// Posts -> Categories\n\tremove_submenu_page('edit.php', 'edit-tags.php?taxonomy=category');\n\t// Posts -> Tags\n\tremove_submenu_page('edit.php', 'edit-tags.php?taxonomy=post_tag');\n\t// Media\n\tremove_menu_page('upload.php');\n\t// Media -> Library\n\tremove_submenu_page('upload.php', 'upload.php');\n\t// Media -> Add new media\n\tremove_submenu_page('upload.php', 'media-new.php');\n\t// Pages\n\tremove_menu_page('edit.php?post_type=page');\n\t// Pages -> All pages\n\tremove_submenu_page('edit.php?post_type=page', 'edit.php?post_type=page');\n\t// Pages -> Add new page\n\tremove_submenu_page('edit.php?post_type=page', 'post-new.php?post_type=page');\n\t// Comments\n\tremove_menu_page('edit-comments.php');\n\t// Appearance\n\t//remove_menu_page('themes.php');\n\t// Appearance -> Themes\n\tremove_submenu_page('themes.php', 'themes.php');\n\t// Appearance -> Customize\n\tremove_submenu_page('themes.php', 'customize.php?return=' . urlencode( $_SERVER['REQUEST_URI'] ));\n\t// Appearance -> Widgets\n\tremove_submenu_page('themes.php', 'widgets.php');\n\t// Appearance -> Menus\n\t//remove_submenu_page('themes.php', 'nav-menus.php');\n\t// Appearance -> Editor\n\tremove_submenu_page('themes.php', 'theme-editor.php');\n\t// Plugins\n\tremove_menu_page('plugins.php');\n\t// Plugins -> Installed plugins\n\tremove_submenu_page('plugins.php', 'plugins.php');\n\t// Plugins -> Add new plugins\n\tremove_submenu_page('plugins.php', 'plugin-install.php');\n\t// Plugins -> Plugin editor\n\tremove_submenu_page('plugins.php', 'plugin-editor.php');\n\t// Users\n\tremove_menu_page('users.php');\n\t// Users -> Users\n\tremove_submenu_page('users.php', 'users.php');\n\t// Users -> New user\n\tremove_submenu_page('users.php', 'user-new.php');\n\t// Users -> Your profile\n\tremove_submenu_page('users.php', 'profile.php');\n\t// Tools\n\tremove_menu_page('tools.php');\n\t// Tools -> Available Tools\n\tremove_submenu_page('tools.php', 'tools.php');\n\t// Tools -> Import\n\tremove_submenu_page('tools.php', 'import.php');\n\t// Tools -> Export\n\tremove_submenu_page('tools.php', 'export.php');\n\t// Settings\n\tremove_menu_page('options-general.php');\n\n\t// Settings -> Writing\n\tremove_submenu_page('options-general.php', 'options-writing.php');\n\n\t// Settings -> Reading\n\tremove_submenu_page('options-general.php', 'options-reading.php');\n\n\t// Settings -> Discussion\n\tremove_submenu_page('options-general.php', 'options-discussion.php');\n\n\t// Settings -> Media\n\tremove_submenu_page('options-general.php', 'options-media.php');\n\n\t// Settings -> Permalinks\n\tremove_submenu_page('options-general.php', 'options-permalink.php');\n\n\t// Кастом-филд\n\tremove_menu_page('edit.php?post_type=acf-field-group');\n}", "function kcsite_remove_dashboard_widgets() {\n\t\t// remove_meta_box('yoast_db_widget', 'dashboard', 'normal'); // Breadcrumbs\n\t\tremove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // incoming links\n\t\t//remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // plugins\n\t\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // plugins\n\t\t//remove_meta_box('dashboard_quick_press', 'dashboard', 'normal'); // quick press\n\t \tremove_meta_box('dashboard_recent_drafts', 'dashboard', 'normal'); // recent drafts\n\t \tremove_meta_box('dashboard_primary', 'dashboard', 'normal'); // wordpress blog\n\t \tremove_meta_box('dashboard_secondary', 'dashboard', 'normal'); // other wordpress news\n\t \tremove_meta_box('alo-easymail-widget', 'dashboard', 'normal'); // other wordpress news\n\t \tremove_meta_box('tribe_dashboard_widget', 'dashboard', 'normal'); // other wordpress news\n\t}", "function remove_menus(){\n// remove_menu_page( 'edit.php' ); //Posts\n\n// remove_menu_page( 'edit.php?post_type=page' ); //Pages\n\n\n}", "function mtws_remove_dashboard_widgets() {\n //remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );\n\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n}" ]
[ "0.7730001", "0.770985", "0.76792914", "0.75577825", "0.7529583", "0.75214356", "0.7463486", "0.7458044", "0.7457555", "0.74502224", "0.74107575", "0.7399816", "0.7398108", "0.7360523", "0.73506224", "0.7346158", "0.73318833", "0.73039687", "0.7277889", "0.7262905", "0.72608227", "0.72091454", "0.7158729", "0.7136628", "0.7129153", "0.7122975", "0.71187747", "0.7107956", "0.7104553", "0.7095578", "0.70850897", "0.70848656", "0.70291483", "0.7024318", "0.70201075", "0.70129603", "0.7006791", "0.6997165", "0.69781584", "0.6965974", "0.69412374", "0.6926479", "0.6920117", "0.6917414", "0.691227", "0.69099134", "0.6908987", "0.6904693", "0.6893713", "0.6888713", "0.68727773", "0.6861692", "0.6856579", "0.6851581", "0.6849674", "0.68467784", "0.68467784", "0.68447405", "0.68400186", "0.6827234", "0.68253374", "0.68251187", "0.6821391", "0.6819525", "0.6814603", "0.6800765", "0.6800373", "0.6795073", "0.67913973", "0.6788666", "0.6778863", "0.6777619", "0.6774903", "0.677465", "0.6768663", "0.67579794", "0.67502767", "0.6744191", "0.6737745", "0.67348534", "0.67207414", "0.6717398", "0.67169714", "0.6703337", "0.669745", "0.669176", "0.6691254", "0.6687842", "0.6680393", "0.6674856", "0.66633546", "0.66587913", "0.6650297", "0.6636061", "0.6626538", "0.66093236", "0.66066533", "0.66038907", "0.6603679", "0.66036236", "0.6602843" ]
0.0
-1
Gets the logged in user
public function getLoggedInUser() { return elgg_get_logged_in_user_entity(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLoggedInUser() {\n return $this->_user->getLoggedInUser();\n }", "public function get_user() {\n\t\treturn ($this->logged_in()) ? $this->session->get($this->config['session_key'], null) : null;\n\t}", "public function get_user() {\r\n\t\treturn ($this->user);\r\n\t}", "public function get_user() {\n\t\treturn $this->user;\n\t}", "public function getAuthenticatedUser()\n {\n return $this->getUnsplashClient()->sendRequest('GET', 'me');\n }", "private function getAuthenticatedUser()\r\n {\r\n $tokenStorage = $this->container->get('security.token_storage');\r\n return $tokenStorage->getToken()->getUser();\r\n }", "private function getAuthenticatedUser()\r\n {\r\n $tokenStorage = $this->container->get('security.token_storage');\r\n return $tokenStorage->getToken()->getUser();\r\n }", "function getLoggedInUser()\n{\n\tif(isLoggedIn()) {\n\t\treturn auth()->user();\n\t}\n\treturn null;\n}", "private function getLoggedInUser()\n {\n if (null !== $token = $this->securityContext->getToken()) {\n return $token->getUser();\n }\n\n return null;\n }", "public function getLoggedUser() {\n\t\t$session = $this->getUserSession();\n\t\treturn ($this->isAdmin()) ? $session->getUser() : $session->getCustomer();\n\t}", "public function getLoggedInUser()\n {\n $securityContext = $this->container->get('security.context');\n $consultant = $securityContext->getToken()->getUser();\n return $consultant;\n }", "public function getCurrentUser()\n {\n $this->validateUser();\n\n if ($this->session->has(\"user\")) {\n return $this->session->get(\"user\");\n }\n }", "public function getAuthenticatedUser()\n {\n // get the web-user\n $user = Auth::guard()->user();\n\n // get the api-user\n if(!isset($user) && $user == null) {\n $user = Auth::guard('api')->user();\n }\n return $user;\n }", "public function GetCurrentUser()\n {\n return $this->userManager->getCurrent();\n }", "public static function getUser()\n\t{\n\t\tif(isset($_SESSION['user_id'])){\n\t\t\t\n\t\t\treturn User::findByID($_SESSION['user_id']);\n\t\t\t\n\t\t}else{\n\t\t\n\t\t\treturn static::loginFromRememberCookie();\n\t\t\n\t\t}\n\t}", "public function getUser()\n {\n return Session::get(self::USER);\n }", "public static function getCurrentUser(){\r\n\t\treturn self::isLoggedIn() == true ? User::getUserById($_SESSION[\"id\"]) : null;\r\n\t}", "public static function getUser()\n {\n return self::getInstance()->_getUser();\n }", "public static function user()\n {\n if (isset($_SESSION['LOGGED_IN_USER'])){\n return $username;\n }\n }", "public function getCurrentUser()\n\t{\n\t\treturn $this->users->getCurrentUser();\n\t}", "public function get_user()\n\t{\n\t\tif ($this->logged_in())\n\t\t{\n\t\t\treturn $this->_session->get($this->_config['session_key']);\n\t\t}\n\n\t\treturn FALSE;\n\t}", "public static function user()\n {\n if (!isset(static::$user)) {\n $uid = static::getCurrentUserId();\n if ($uid) static::$user = static::fetchUserById($uid);\n }\n \n return static::$user;\n }", "public function getLoggedInUser()\n\t{\n\t\tif (!isset($this->loggedInUser)) {\n $this->loggedInUser = array();\n \n if ($this->getIsUserLoggedIn()) {\n // get the logged in user\n $this->loggedInUser = $this->getFamilyGraph()->api('me');\n }\n }\n \n return $this->loggedInUser;\n\t}", "static function getCurrentUser()\r\n {\r\n return self::getSingleUser('id', $_SESSION[\"user_id\"]);\r\n }", "public static function getUser() {\n return session(\"auth_user\", null);\n }", "public function getUser() {\n $user = $this->getSessionUser();\n\n return $user;\n }", "public static function user(){\n\t\treturn self::session()->user();\n\t}", "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 }", "private function getAuthenticatedUser()\n {\n return auth()->user();\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByLogin($this->login);\n }\n\n return $this->_user;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByLogin($this->login);\n }\n\n return $this->_user;\n }", "public function getLoggedIn()\n\t{\n\t\treturn auth()->user();\n\t}", "public static function get_user_logged_in() {\n if (isset($_SESSION['user'])) {\n $user_id = $_SESSION['user'];\n // Pyydetään User-mallilta käyttäjä session mukaisella id:llä\n $user = User::find($user_id);\n\n return $user;\n }\n\n // Käyttäjä ei ole kirjautunut sisään\n return null;\n }", "protected function getUser()\n {\n return $this->container->get('security.context')->getToken()->getUser();\n }", "static public function GetUser() {\n if (self::GetImpersonatedUser()) {\n return self::GetImpersonatedUser();\n }\n return self::GetAuthUser();\n }", "public function user() {\n\t\tif (!Auth::check()) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn Auth::getUser();\n\t}", "private function getUser()\n {\n return $this->user->getUser();\n }", "public function user()\n\t{\n\t\tif (is_null($this->user) and $this->session->has(static::$key))\n\t\t{\n\t\t\t$this->user = call_user_func(Config::get('auth.by_id'), $this->session->get(static::$key));\n\t\t}\n\n\t\treturn $this->user;\n\t}", "function getAuthenticatedUser()\n {\n if (isset($_SESSION['MFW_authenticated_user'])) {\n return $_SESSION['MFW_authenticated_user'];\n }\n\n return null;\n }", "public function getLoggedUser()\n {\n if (null === $token = $this->securityContext->getToken()) {\n return null;\n }\n\n if (!is_object($user = $token->getUser())) {\n return null;\n }\n\n return $user;\n }", "function user()\n\t{\n\t\t$ci =& get_instance();\n\t\t$user = $ci->auth_model->get_logged_user();\n\t\tif (empty($user)) {\n\t\t\t$ci->auth_model->logout();\n\t\t} else {\n\t\t\treturn $user;\n\t\t}\n\t}", "function user()\n\t{\n\t\t$ci =& get_instance();\n\t\t$user = $ci->auth_model->get_logged_user();\n\t\tif (empty($user)) {\n\t\t\t$ci->auth_model->logout();\n\t\t} else {\n\t\t\treturn $user;\n\t\t}\n\t}", "public static function getLoggedUser()\r\n {\r\n self::session_start();\r\n if (!isset($_SESSION['user'])) return false;\r\n return $_SESSION['user'];\r\n }", "public static function getAuthenticatedUser ()\n\t{\n\t\t$inst = self::getInstance();\n\t\t\n\t\tif ($inst->_authenticatedUser == null) \n\t\t{\n\t\t\t$user = $inst->_auth->getIdentity();\n\t\t\tif ($user)\n\t\t\t\t$inst->_authenticatedUser = Tg_User::getUserById($user['id']);\n\t\t\telse\n\t\t\t\t$inst->_authenticatedUser = false;\n\t\t}\n\t\t\t\n\t\treturn $inst->_authenticatedUser;\n\t}", "protected function getUser()\n {\n if ($this->_user === null) {\n $this->_user = Users::findByUsername($this->login);\n }\n\n return $this->_user;\n }", "public function getUser()\n {\n if(!$this->user)\n $this->user = User::getActive();\n\n return $this->user;\n }", "protected function getAuthUser () {\n return Auth::user();\n }", "public function user()\n {\n return $this->app->auth->user();\n }", "public function user()\n {\n return $this->app->auth->user();\n }", "protected function getLoggedUser()\n {\n if (isset($this->oUser) === true && $this->oUser->isLoaded() === true) {\n return $this->oUser;\n } elseif ($this->loadUserBySession() === true) {\n return $this->oUser;\n } else {\n return null;\n }\n }", "public function getUser() {\n\t\treturn $this->api->getUserById($this->getUserId());\n\t}", "public static function getUser() {\n return isset($_SESSION[Security::SESSION_USER]) ? $_SESSION[Security::SESSION_USER] : NULL;\n }", "public static function getLoggedInUser() {\n if (self::$loggedInUser == false) {\n //We need the Db class to escape the username, just in case.\n $db = Db::getInstance();\n\n // The email is used as the username to log into the service.\n $login = $db->escapeString($_SERVER['PHP_AUTH_USER']);\n $password = $db->escapeString($_SERVER['PHP_AUTH_PW']);\n \n $query = \"SELECT \".Config::AUTH_FIELD_UID.\", \".Config::AUTH_FIELD_LOGIN.\" \"\n .\"FROM \".Config::DB_DB.\".\".Config::AUTH_TABLE.\" WHERE \"\n .Config::AUTH_FIELD_LOGIN.\" = '$login' \"\n .\"AND `\".Config::AUTH_FIELD_PASSWORD.\"` = SHA1('$password')\";\n\n self::$loggedInUser = self::loadBySql($query);\n }\n\n return self::$loggedInUser;\n }", "function user()\n {\n return isset($_SESSION['user']) ? \\Models\\User::find($_SESSION['user']) : null;\n }", "public function get_user()\n {\n\n $user = $this->_session->get($this->_config['session_key']);\n\n // Check for \"remembered\" login\n if (!$user) {\n $user = $this->auto_login();\n }\n // refresh user session regularly to mitigate session fixation attacks\n\n if( ! $this->refresh_session()){\n return FALSE;\n }\n\n return $user;\n }", "public function findLoggedUser()\n {\n\t\t$auth = Zend_Auth::getInstance();\n\t\t$user = null;\n\n\t\tif($auth->hasIdentity()) {\n\t\t\t$user = $auth->getIdentity();\n\t\t}\n\n return $user;\n }", "public static function getCurrentUser()\n {\n /**\n * @var \\ZCMS\\Core\\ZSession $session\n */\n $session = Di::getDefault()->get('session');\n return $session->get('auth');\n }", "public function getUser() {\n if (!empty($_SESSION['user'])) {\n return $_SESSION['user'];\n } else {\n return false;\n }\n }", "public function user()\n {\n if ( ! Auth::check()) {\n return null;\n }\n\n return Auth::getUser();\n }", "function getUser() {\n return user_load($this->uid);\n }", "public static function user() {\n return Auth::currentUser();\n }", "public static function getLoggedUser()\n {\n $user = null;\n if(isset($_SESSION['loggedUser']))\n {\n $user = unserialize($_SESSION['loggedUser']);\n }\n return $user;\n }", "protected function getCurrentUser() {\n $userUtil = \\JumpUpUser\\Util\\ServicesUtil::getUserUtil($this->getServiceLocator());\n return $userUtil->getCurrentUser();\n }", "public function getUser ()\r\n\t{\r\n\t\treturn $this->user;\r\n\t}", "static function currentUser() {\n $cookie = new CookieSigner(Config::app()['BASE_KEY']);\n\n if (isset($_SESSION['userId']) && $userId = $_SESSION['userId']) {\n $user = new User();\n return $user->findOne($userId);\n } else if ($userId = $cookie->get('userId')) {\n $user = new User();\n $user->findOne($userId);\n\n if ($user && $user->isAuthenticated('remember', $cookie->get('rememberToken'))) {\n self::logIn($user);\n return $user;\n }\n }\n return null;\n }", "public function getUser() {\n if ($this->_user === false) {\n $this->_user = CoLogin::findByUsername($this->username);\n }\n\n return $this->_user;\n }", "public function user()\n {\n return $this->auth->user();\n }", "public function getUser() {\n\t\treturn $this->Session->read('UserAuth');\n\t}", "protected function getUser()\n {\n return $this->user;\n }", "public function user()\n {\n if (!Auth::check()) {\n return null;\n }\n\n return Auth::getUser();\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 get_current_user()\n\t{\n\t\treturn $this->current_user;\n\t}", "function get_user () {\n\t\treturn $this->user_id;\n\t}", "protected function getUser()\n {\n if ($this->_user === null) {\n $this->_user = User::findIdentity(Yii::$app->user->id);\n }\n\n return $this->_user;\n }", "public function getUser( ) {\n\t\treturn $this->user;\n\t}", "public function getUser( ) {\n\t\treturn $this->user;\n\t}", "public function getUser() {\n\t\treturn User::find($this->user_id);\n\t}", "public function getCurrentUser() {\n if (!property_exists($this, 'currentUser')) {\n $this->currentUser = null;\n $uid = isset($_SESSION['uid']) ? $_SESSION['uid'] : false;\n if ($uid) {\n $this->currentUser = User::find($uid);\n }\n }\n return $this->currentUser;\n }", "public function getUser() {\n\t\treturn $this->user;\n\t}", "public function getUser() {\n\t\treturn $this->user;\n\t}", "protected function getUser()\n {\n return $this->loadUser(array(\n 'user_name' => $this->context['admin'],\n ));\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByUsername($this->username);\n }\n\n return $this->_user;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByUsername($this->username);\n }\n\n return $this->_user;\n }", "function getUser(){\n\t\tif( $this->isGuest )\n\t\t\treturn;\n\t\tif( $this->_user === null ){\n\t\t\t$this->_user = User::model()->findByPk( $this->id );\n\t\t}\n\t\treturn $this->_user;\n\t}", "public final function getUser()\n {\n return $this->user;\n }", "public function getUser() {\n if ($this->_user === false) {\n $this->_user = User::findByUsername($this->username);\n }\n\n return $this->_user;\n }", "public static function getUser() \n {\n return $_SESSION['username'];\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByUsername(Yii::$app->user->identity->username);\n }\n return $this->_user;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByUsername($this->email);\n }\n return $this->_user;\n }", "public static function getCurrentUser()\n {\n if (isset($_SESSION['user'])) {\n return $_SESSION['user'];\n } else {\n return new User();\n }\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = Client::findByUsername($this->username);\n\n /** added login by email**/\n if($this->_user === false ){\n $this->_user = Client::findByEmail($this->username);\n }\n }\n\n return $this->_user;\n }", "public static function user ()\n {\n return self::$user;\n }", "public function user()\n {\n if (!Zend_Auth::getInstance()->hasIdentity()) {\n return FALSE;\n }\n //If user is logged in\n return Zend_Auth::getInstance()->getIdentity();\n }", "public function getUser()\n {\n if (!$membership = $this->getMembership()) {\n return false;\n }\n \n return $membership->getUser();\n }", "public static function getUser() {\n\t\t\tif(isset($_SESSION['user']))\n\t\t\t\t$user = $_SESSION['user'];\n\t\t\telse\n\t\t\t\t$user = new User();\n\t\t\treturn $user;\n\t\t}", "public static function getCurrentUser();", "public function getUser()\n {\n return $this->user;\n }" ]
[ "0.8618283", "0.85606086", "0.8316347", "0.83053005", "0.83018947", "0.8301516", "0.8301516", "0.82967776", "0.8270742", "0.8168932", "0.8168555", "0.8164507", "0.81431246", "0.812115", "0.8120799", "0.8101653", "0.80943346", "0.80841225", "0.8063729", "0.8049042", "0.80450493", "0.8040848", "0.80395186", "0.80308986", "0.80221355", "0.8019099", "0.8008822", "0.79940933", "0.79940933", "0.79940933", "0.79940933", "0.79705477", "0.7961248", "0.7961248", "0.79593533", "0.7948775", "0.7946818", "0.7946706", "0.794045", "0.7908382", "0.7901026", "0.7882982", "0.78813326", "0.7880404", "0.7880404", "0.7876211", "0.78734636", "0.7868792", "0.7864344", "0.7863587", "0.7854228", "0.7854228", "0.78492385", "0.7840239", "0.78391135", "0.78315157", "0.78241855", "0.7823444", "0.78185743", "0.7818262", "0.78137946", "0.7806115", "0.7797377", "0.77973723", "0.7793608", "0.77889717", "0.7786524", "0.7782253", "0.77803427", "0.7777795", "0.77737176", "0.7763874", "0.77600276", "0.7756796", "0.77487314", "0.7748348", "0.7744777", "0.77382267", "0.77382267", "0.77371585", "0.77269626", "0.7725878", "0.7725878", "0.7717715", "0.77007025", "0.77007025", "0.76895297", "0.7689302", "0.7685143", "0.7683133", "0.7677276", "0.76750386", "0.76738626", "0.7667286", "0.7665147", "0.76634085", "0.7662109", "0.76582754", "0.7656906", "0.76515007" ]
0.8445958
2
Return the current logged in user by guid
public function getLoggedInUserGuid() { $user = $this->getLoggedInUser(); return $user ? $user->guid : 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrentUserId();", "public function get_user_id();", "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();", "function getUser() {\n return user_load($this->uid);\n }", "function get_user () {\n\t\treturn $this->user_id;\n\t}", "public function user()\n\t{\n\t\tif (is_null($this->user) and $this->session->has(static::$key))\n\t\t{\n\t\t\t$this->user = call_user_func(Config::get('auth.by_id'), $this->session->get(static::$key));\n\t\t}\n\n\t\treturn $this->user;\n\t}", "public function getLoggedInUser() {\n\t\treturn elgg_get_logged_in_user_entity();\n\t}", "public static function user()\n {\n if (!isset(static::$user)) {\n $uid = static::getCurrentUserId();\n if ($uid) static::$user = static::fetchUserById($uid);\n }\n \n return static::$user;\n }", "public static function user()\n {\n if (isset($_SESSION['LOGGED_IN_USER'])){\n return $username;\n }\n }", "public function getUserid()\n {\n return $this->get(self::_USERID);\n }", "public function getUserid()\n {\n return $this->get(self::_USERID);\n }", "public function getUserid()\n {\n return $this->get(self::_USERID);\n }", "public function getCustomUserId();", "public function get( $arg ) {\n\n\t\tif ( is_numeric( $arg ) ) {\n\t\t\t$user = get_user_by( 'id', $arg );\n\t\t} elseif ( is_email( $arg ) ) {\n\t\t\t$user = get_user_by( 'email', $arg );\n\t\t\t// Logins can be emails.\n\t\t\tif ( ! $user ) {\n\t\t\t\t$user = get_user_by( 'login', $arg );\n\t\t\t}\n\t\t} else {\n\t\t\t$user = get_user_by( 'login', $arg );\n\t\t}\n\n\t\treturn $user;\n\t}", "public function get_current_user(){\n $username = $this->session->userdata['logged_in']['username'];\n return $user_id = $this->research_model->current_user($username);\n }", "function user()\n\t{\n\t\t$ci =& get_instance();\n\t\t$user = $ci->auth_model->get_logged_user();\n\t\tif (empty($user)) {\n\t\t\t$ci->auth_model->logout();\n\t\t} else {\n\t\t\treturn $user;\n\t\t}\n\t}", "function user()\n\t{\n\t\t$ci =& get_instance();\n\t\t$user = $ci->auth_model->get_logged_user();\n\t\tif (empty($user)) {\n\t\t\t$ci->auth_model->logout();\n\t\t} else {\n\t\t\treturn $user;\n\t\t}\n\t}", "public function get_user_id()\n {\n return self::getUser();\n }", "public function getAuthenticatedUser()\n {\n return $this->getUnsplashClient()->sendRequest('GET', 'me');\n }", "public function me() {\n\t\t\tif (!isset($this->oUser)) $this->oUser = user($this->iUser); \n\t\t\treturn $this->oUser; \n\t\t}", "public function getUserId ()\n {\n return $this->storage->get(self::$prefix . 'userId');\n }", "public static function userId()\r\n {\r\n return (new Session())->get(static::$userIdField);\r\n }", "public function getLoggedInUser() {\n return $this->_user->getLoggedInUser();\n }", "public static function get_user($user_id);", "public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }", "public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }", "public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }", "public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }", "public function get_user() {\n\t\treturn ($this->logged_in()) ? $this->session->get($this->config['session_key'], null) : null;\n\t}", "static function getCurrentUser()\r\n {\r\n return self::getSingleUser('id', $_SESSION[\"user_id\"]);\r\n }", "public function getLoggedInUser()\n {\n $securityContext = $this->container->get('security.context');\n $consultant = $securityContext->getToken()->getUser();\n return $consultant;\n }", "public static function getCurrentUser();", "private function getLoggedInUser()\n {\n if (null !== $token = $this->securityContext->getToken()) {\n return $token->getUser();\n }\n\n return null;\n }", "public function getCurrentUser();", "public function identity()\r\n {\r\n\t\t$storage = $this->get_storage();\r\n\r\n if ($storage->is_empty()) {\r\n return null;\r\n }\r\n if( is_null(self::$login_user) ){\r\n $u = $storage->read();\r\n\t\t\tself::$login_user = Model_User::instance()->user($u['uid']);\r\n \r\n global $VIEW_AUTH_USERID;\r\n $VIEW_AUTH_USERID = idtourl(self::$login_user['uid']);\r\n }\r\n return self::$login_user; \r\n }", "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 getUserId()\r\n \t{\r\n \treturn $this->_client->getUser();\r\n \t}", "public static function getCurrentUser() {\n return Users::model()->findByAttributes(array(\n // [NguyenPT]: TODO - Investigate should use 'username' or 'id'\n DomainConst::KEY_USERNAME => Yii::app()->user->id\n ));\n }", "public function GetCurrentUser()\n {\n return $this->userManager->getCurrent();\n }", "function getLoggedInUser()\n{\n\tif(isLoggedIn()) {\n\t\treturn auth()->user();\n\t}\n\treturn null;\n}", "public function get_user() {\r\n\t\treturn ($this->user);\r\n\t}", "public function getUser() {\n\t\treturn User::newFromName( $this->params['user'], false );\n\t}", "function getLoggedInUser($token)\n\t{\n\t\tglobal $db;\n\t\t$userId = $this->GetUserIdByToken($token);\n\t\tif(isset($userId))\n\t\t{\n\t\t\t$user = $db->smartQuery(array(\n\t\t\t\t\t'sql' => \"SELECT userid, email, isAdmin FROM `user` WHERE `userid`=:userId;\",\n\t\t\t\t\t'par' => array('userId' => $userId),\n\t\t\t\t\t'ret' => 'fetch-assoc'\n\t\t\t));\n\t\t\treturn $user;\n\t\t}\n\t\treturn (object)array(\"error\" => \"user not found\");\n\t}", "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 }", "function user()\n {\n return eZUser::fetch( $this->UserID );\n }", "static public function GetUser() {\n if (self::GetImpersonatedUser()) {\n return self::GetImpersonatedUser();\n }\n return self::GetAuthUser();\n }", "public static function getUser();", "public function findLoggedUser()\n {\n\t\t$auth = Zend_Auth::getInstance();\n\t\t$user = null;\n\n\t\tif($auth->hasIdentity()) {\n\t\t\t$user = $auth->getIdentity();\n\t\t}\n\n return $user;\n }", "public function getUserId(): string;", "function get_current_user_id()\n {\n }", "function getUserFromToken() {\n\t\treturn $this->_storage->loadUserFromToken();\n\t}", "function get_user( $user_id ){\n\t$app = \\Jolt\\Jolt::getInstance();\n\treturn $app->store('db')->findOne('user', array( '_id'=>$user_id ));\n}", "private function getAuthenticatedUser()\r\n {\r\n $tokenStorage = $this->container->get('security.token_storage');\r\n return $tokenStorage->getToken()->getUser();\r\n }", "private function getAuthenticatedUser()\r\n {\r\n $tokenStorage = $this->container->get('security.token_storage');\r\n return $tokenStorage->getToken()->getUser();\r\n }", "public function getUser()\n {\n return $this->getAuth()->getIdentity();\n }", "public function getUser($userId);", "public function getUser($userId);", "public function get_user() {\n\t\treturn $this->user;\n\t}", "function user()\n {\n return isset($_SESSION['user']) ? \\Models\\User::find($_SESSION['user']) : null;\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 getuser($aa_inst_id)\n {\n $session_key=generateSessionKey($aa_inst_id);\n $session=new Zend_Session_Namespace($session_key);\n\n if(!isset($session->facebook) || !isset($session->facebook['user']) )\n $user=false;\n else\n $user=$session->facebook['user'];\n\n return $user;\n }", "public function getCurrentUser()\n\t{\n\t\treturn $this->users->getCurrentUser();\n\t}", "public function loggedInUserId()\n\t{\n\t\treturn auth()->id();\n\t}", "public function getCertainUser($param) {\n return ModelLoader::getModel('UserData')->getUser($param['userId']);\n }", "public function getUser() {\n\t\treturn $this->api->getUserById($this->getUserId());\n\t}", "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 {\n $userId = Security::getUserId();\n if (!empty($userId)) {\n $this->uid = $userId;\n }\n }", "protected function getUserId() {}", "protected function getUserId() {}", "public static function getUser()\n\t{\n\t\tif(isset($_SESSION['user_id'])){\n\t\t\t\n\t\t\treturn User::findByID($_SESSION['user_id']);\n\t\t\t\n\t\t}else{\n\t\t\n\t\t\treturn static::loginFromRememberCookie();\n\t\t\n\t\t}\n\t}", "function get_user_id()\r\n {\r\n return $this->user->get_id();\r\n }", "public static function getCurrentUser(){\r\n\t\treturn self::isLoggedIn() == true ? User::getUserById($_SESSION[\"id\"]) : null;\r\n\t}", "public function user() {\n\t\tif (!Auth::check()) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn Auth::getUser();\n\t}", "function get_user($user_id)\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->get_user($user_id);\n\t}", "function get_user($user_id)\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->get_user($user_id);\n\t}", "public function getLoggedInUser()\n\t{\n\t\tif (!isset($this->loggedInUser)) {\n $this->loggedInUser = array();\n \n if ($this->getIsUserLoggedIn()) {\n // get the logged in user\n $this->loggedInUser = $this->getFamilyGraph()->api('me');\n }\n }\n \n return $this->loggedInUser;\n\t}", "public function get_logged_in_user_id()\n\t\t{\n\t\t\treturn $this->session->userdata('usr_id');\n\t\t}", "function current_user(){\n static $current_user;\n global $db;\n if(!$current_user){\n if(isset($_SESSION['user_id'])):\n $user_id = intval($_SESSION['user_id']);\n $current_user = find_by_id('users',$user_id);\n endif;\n }\n return $current_user;\n }", "protected function _current_user()\n {\n $user_id = $this->session->userdata(\"user_id\");\n \n if($user_id)\n {\n $this->load->model('user_model');\n $this->current_user = $this->user_model->getOne('' , ['user.user_id' => $user_id]);\n }\n \n return $this->current_user;\n }", "function getUserUID()\n{\n return Auth::check()?Auth::user()->uid:null;\n}", "public static function user(){\n\t\treturn self::session()->user();\n\t}", "protected function getUserId()\n {\n return object_get($this->getUser(), 'profile_id', $this->getDefaultProfileId() );\n }", "static function currentUser() {\n $cookie = new CookieSigner(Config::app()['BASE_KEY']);\n\n if (isset($_SESSION['userId']) && $userId = $_SESSION['userId']) {\n $user = new User();\n return $user->findOne($userId);\n } else if ($userId = $cookie->get('userId')) {\n $user = new User();\n $user->findOne($userId);\n\n if ($user && $user->isAuthenticated('remember', $cookie->get('rememberToken'))) {\n self::logIn($user);\n return $user;\n }\n }\n return null;\n }", "public function me()\n {\n $user_id = auth_user()->getUserId();\n return $this->repository->find($user_id);\n }", "protected function getCurrentUser()\n {\n return User::query()->findOrFail(Auth::user()->id);\n }", "protected static function retrieveCurrentUser()\n {\n global $user;\n\n return $user;\n }", "function getLoggedInAdminId(){\r\n $query = \"SELECT * FROM admins WHERE email='\" . getSessionUsername() . \"';\";\r\n $result = performSingleDbQueryGetRow($query);\r\n return $result['id'];\r\n}", "protected function _user() {\n return $this->_adapter_user->user();\n }", "public function getUser()\n {\n if (!$membership = $this->getMembership()) {\n return false;\n }\n \n return $membership->getUser();\n }" ]
[ "0.70025533", "0.6975075", "0.6959903", "0.6959903", "0.6959903", "0.6959903", "0.6959903", "0.6959903", "0.6959903", "0.6959903", "0.6959903", "0.69145393", "0.6890618", "0.6876107", "0.6861477", "0.68164146", "0.6786929", "0.6785448", "0.6785448", "0.6785448", "0.6773178", "0.67623407", "0.67613906", "0.6747272", "0.6747272", "0.6716634", "0.67104983", "0.6702017", "0.6685275", "0.66783464", "0.6677266", "0.6670754", "0.6665698", "0.6665698", "0.6665698", "0.6665123", "0.6663961", "0.66630477", "0.6655797", "0.6650109", "0.6647327", "0.66453785", "0.6642661", "0.66290325", "0.66164577", "0.6597962", "0.65958405", "0.6588644", "0.65777576", "0.6573691", "0.655203", "0.6550728", "0.6550728", "0.6550728", "0.6550728", "0.6549698", "0.6548471", "0.6533726", "0.6530777", "0.6520962", "0.65190995", "0.6518071", "0.65153205", "0.6514963", "0.6514963", "0.6503832", "0.6489087", "0.6489087", "0.6488852", "0.6487036", "0.6483063", "0.6473483", "0.64718425", "0.64696556", "0.6468013", "0.6466933", "0.64613605", "0.64613444", "0.6455024", "0.6455024", "0.6451452", "0.6444149", "0.6441584", "0.64299124", "0.64254117", "0.64254117", "0.6423674", "0.6421167", "0.64179796", "0.6416048", "0.6411041", "0.6409735", "0.640789", "0.63988334", "0.639439", "0.6387952", "0.6384185", "0.6369891", "0.6367447", "0.6365786" ]
0.73542225
0
Returns whether or not the viewer is currently logged in and an admin user
public function isAdminLoggedIn() { $user = $this->getLoggedInUser(); return $user && $user->isAdmin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAdmin() {\n //FIXME: This needs to (eventually) evaluate that the user is both logged in *and* has admin credentials.\n //Change to false to see nav and detail buttons auto-magically disappear.\n return true;\n}", "function is_admin()\n {\n //is a user logged in?\n\n //if so, check admin status\n\n //returns true/false\n\n }", "function isAdmin() {\n return !$this->isLoggedIn ? FALSE : ($this->member->adminID !== NULL ? TRUE : FALSE);\n }", "protected function isCurrentUserAdmin() {}", "protected function isCurrentUserAdmin() {}", "public static function am_i_admin() \n {\n return ($_SESSION['_user'] == AV_DEFAULT_ADMIN || $_SESSION['_is_admin']);\n }", "private function isAdmin() {\n\t\tif (Auth::user()->user == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "function is_admin_logged_in()\n\t{\n\t\tif(isset($_SESSION['admin']['au_id']))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public static function currentUserHasAccess() {\n return current_user_can('admin_access');\n }", "function getIsAdmin(){\n\t\treturn ( $this->user && $this->user->access_level >= User::LEVEL_ADMIN );\n\t}", "public function isAdmin()\n {\n return $this->authenticated;\n }", "public static function isAdminLoggedIn()\r\n\t\t{\r\n\r\n\t\t\tif(isset($_SESSION['admin_session']))\r\n\t\t\t{\r\n\r\n\t\t\t\treturn $_SESSION['admin_session'];\r\n\r\n\t\t\t}\r\n\r\n\t\t}", "function iAmAdmin(){\n $adminIDs = Array( 1, 2 );\n \n return in_array( $_SESSION['userid'], $adminIDs );\n }", "public function isUserOnAdminArea()\n\t{\n\t\treturn is_admin();\n\t}", "public function is_admin()\n\t{\n\t\t$user = $this->get_current_user();\n\t\tif($user !== NULL)\n\t\t{\n\t\t\tif($user['auth'] == 255)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function is_admin_logged_in()\n{\n global $current_user;\n return ($current_user != NULL && $current_user['un'] == 'admin');\n}", "function isAdmin(){\n\t\treturn ($this->userlevel == ADMIN_LEVEL || $this->username == ADMIN_NAME);\n\t}", "function isAdmin(){\r\n\r\n\t\tif($this->user_type == 'Admin'){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function visible () {\n\t\treturn isadmin();\n\t}", "public function is_admin() {\n if($this->is_logged_in() && $this->user_level == 'a') {\n return true;\n } else {\n // $session->message(\"Access denied.\");\n }\n }", "public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }", "public function checkIsAdmin() {\n\t\treturn Mage::getSingleton('admin/session')->isLoggedIn();\n\t}", "public function memberIsAdmin()\n {\n return $_SESSION['__COMMENTIA__']['member_role'] === 'admin';\n }", "function isAdmin() {\n return ($this->userType == 'admin');\n }", "public function isAdmin()\n {\n return $this->isSuperUser() || $this->isMemberOf('admin');\n }", "function isUserAdmin() {\r\n $user = $_SESSION['user'];\r\n return checkAdminStatus($user);\r\n }", "function isAdmin() {\n if (\\Illuminate\\Support\\Facades\\Auth::user()->rol_id == 1) {\n return true;\n } else {\n return false;\n }\n }", "public function isAdmin()\n {\n return ($this->username === \"admin\");\n }", "public function checkIsAdmin()\n {\n return $this->user_admin;\n }", "public static function isAdmin() {\r\n\r\n return Session::get('admin') == 1;\r\n\r\n }", "static public function isAdmin(){\n if ( isset($_SESSION['admin']) && ($_SESSION['admin'] == 1)){\n return true;\n } else {\n return false;\n }\n }", "function is_admin(){\r\n if (isset($_SESSION['admin']) && $_SESSION['admin']){\r\n return true;\r\n }\r\n return false;\r\n }", "public function is_logged_in() {\n return isset($this->admin_id) && $this->last_login_is_recent();\n \n }", "public function is_admin() {\n return $this->session->get(\"niveau_acces\") >= 2;\n }", "static function getIsAdmin() {\n\t\t$user = ctrl_users::GetUserDetail();\n\t\tif($user['usergroupid'] == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function isAdmin(){\n\t\treturn (isset($this->params['admin']) && $this->params['admin']);\n\t}", "function is_admin()\n{\n global $app;\n if (is_authenticated()) {\n $user = $app->auth->getUserData();\n return ($user['role'] === '1');\n } else {\n return false;\n }\n}", "public function isAdmin()\n {\n $quarkCookie = Mage::getModel('core/cookie')->get('quark_bar');\n\n $quarkSession = $this->getCollection()\n ->addFieldToFilter('identifier', $quarkCookie)\n ->getData();\n\n if (count($quarkSession)) {\n return true;\n }\n\n return false;\n }", "public function isAdmin()\n {\n return $this->hasCredential('admin');\n }", "public function isAdmin() {\n return ($this->userlevel == ADMIN_LEVEL ||\n $this->username == ADMIN_NAME);\n }", "protected function userIsAdmin ()\n {\n $tokenHeader = apache_request_headers();\n $token = $tokenHeader['token'];\n $datosUsers = JWT::decode($token, $this->key, $this->algorithm);\n\n if($datosUsers->nombre==\"admin\")\n {\n return true;\n }\n else\n {\n return false;\n } \n }", "protected function isAdminUser() {}", "protected function _login_admin()\n\t{\n\t\tif ( $this->auth->logged_in('login') AND $this->auth->get_user()->has_permission('admin_ui'))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "function isAdmin() {\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "public function isAdmin()\n {\n return ($this->role == 1) ? true : false;\n }", "function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "public static function isAdmin()\n {\n return auth()->check() && auth()->user()->panichd_admin;\n }", "public function isAdmin()\n {\n $p = User::getUser();\n if($p)\n {\n if($p->canAccess('Edit products') === TRUE)\n {\n return TRUE;\n }\n }\n return FALSE;\n }", "public static function is_current_user_portal_admin() {\n if(!is_user_logged_in()) return false;\n return self::is_portal_admin(self::get_current_user_party());\n }", "public function isAdminLogged() {\n\n $user_data = $this->getAdminUserFromSession();\n\n // musi existovat user data a v tom navic admin_token\n if ($user_data != null) {\n if (array_key_exists(\"admin_token\", $user_data)) {\n // vypada to dobre, je prihlasen\n return true;\n }\n }\n\n // defaultni vystup\n return false;\n\n }", "function userIsWikiAdmin() {\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->wikiAdmin(Yawp::authUsername());\n\t}", "public static function isAdmin()\n {\n \t$user = Session::get('loginuser');\n \tif ($user == env('ADMINEMAIL')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }", "public function isLoginAdmin()\n\t{\n\t\treturn (Bn::getValue('loginAuth') == 'A');\n\t}", "public function isLoggedIn()\n {\n $database = new Database();\n $loggedIn = $database->getAdminByUsername($_SESSION['user']);\n $admin = new Admin($loggedIn['adminId'], $loggedIn['username'], $loggedIn['adminLevel'], $loggedIn['active']);\n if(isset($_SESSION['user']) === true && strpos($admin->getAdminLevel(), Resources) !== false && $admin->getActive() == 1) {\n $testLogin = true;\n } else {\n $this->_f3->reroute('/Login');\n }\n $this->_f3->set('login', $testLogin);\n $this->_f3->set('admin', $admin);\n }", "public function isLoggedIn()\n {\n $database = new Database();\n $loggedIn = $database->getAdminByUsername($_SESSION['user']);\n $admin = new Admin($loggedIn['adminId'], $loggedIn['username'], $loggedIn['adminLevel'], $loggedIn['active']);\n if(isset($_SESSION['user']) === true && strpos($admin->getAdminLevel(), Partner) !== false && $admin->getActive() == 1) {\n $testLogin = true;\n } else {\n $this->_f3->reroute('/Login');\n }\n $this->_f3->set('login', $testLogin);\n $this->_f3->set('admin', $admin);\n }", "public function isAdmin() {\n return $this->admin; // cerca la colonna admin nella tabella users\n }", "public function isAdmin()\n {\n if ($this->is_logged_in()) {\n if (isset($_SESSION['user']['level']) && $_SESSION['user']['level'] >= self::ADMIN_USER_LEVEL) {\n return true;\n }\n }\n\n return false;\n }", "public function isAdmin()\n {\n return $this->role == 1;\n }", "function is_admin() {\n\tif(\n\t\tisset($_SESSION['admin']->iduser) \n\t\t&& !empty($_SESSION['admin']->iduser) \n\t\t&& $_SESSION['admin']->type = 'admin'\n\t\t&& $_SESSION['active']->type = 1\n\t\t&& $_SESSION['confirmed']->type = 1\n\t) return TRUE;\n\t\t\t\n\treturn FALSE;\n}", "public function getIsAdmin();", "public function getIsAdmin();", "public function isAdmin(){\r\n\t\tif(!isset($_SESSION)){\r\n\t\t\tsession_start();\r\n\t\t}\r\n\t\tif(isset($_SESSION['admin']) && $_SESSION['admin'] == true){\r\n\t\t\treturn true;\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function user_AuthIsAdmin() {\n\tglobal $AUTH;\n\t\n\treturn isset($AUTH['admin']) && ($AUTH['admin'] === 1);\n}", "function isAdmin() {\n\tif (isset($_SESSION['user']) && $_SESSION['user']['user_type'] == 'admin' ) {\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "public function isAdmin()\n {\n return in_array(Role::ADMINS_SYSTEM_ROLE, $this->getRoleNamesForCurrentViewer());\n }", "public function isAdmin() {\n\t\treturn (bool) $this->Session->read('Acl.isAdmin');\n\t}", "public function isAdmin() {\n\t\treturn $this->admin;\n\t}", "function is_admin()\n\t{\n\t\treturn strtolower($this->ci->session->userdata('DX_role_name')) == 'admin';\n\t}", "public function isAdmin(){\n if($this->role==\"admin\"){\n return true;\n }\n return false;\n }", "function isAdmin()\n\t{\n\t\treturn $this->role == 3;\n\t}", "public function isAdmin();", "public function isUserAdmin()\n\t{\n\t\treturn (Bn::getValue('user_type') == 'A');\n\t}", "public function admin()\n {\n if ( forum()->getCategory() ) {\n $admins = forum()->getCategory()->config['admins'];\n if ( is_array( $admins ) ) return in_array( user()->user_login, $admins );\n }\n return false;\n }", "public function hasadmin()\n {\n return $this->hasuser() && $this->user()->isadmin();\n }", "function logged_in() {\r\n\t\treturn isset($_SESSION[\"admin_id\"]);\r\n\t}", "protected function isAdmin()\n\t{\n\t\treturn is_admin();\n\t}", "public function isLoggedIn()\n {\n if($this->session->has('admin') && $this->session->has('token')){\n $admin = $this->session->get('admin');\n $token = $this->session->get('token');\n\n $admin = $this->adminRepo->findOneBy(array('login'=>$admin, 'token'=>$token));\n\n if(!empty($admin)){\n return true;\n }else{\n return false;\n }\n }\n return false; \n }", "public static function isLogged ()\r\n\t{\r\n\t\t$oAuth = Zend_Auth::getInstance()->setStorage(self::_getStorage());\r\n\r\n\t\tif ($oAuth->hasIdentity())\r\n\t\t{\r\n\t\t\t$aIdentity = $oAuth->getIdentity();\r\n\r\n\t\t\tif (! empty($aIdentity['Admin_id']))\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function is_user_admin()\n {\n }", "public function isAdmin()\n {\n return ((string) strtoupper($this->data->user_role) === \"ADMIN\") ? true : false;\n }", "public function isAdmin() {\n\t\t\n\t\treturn $this->is_admin;\n\t\t\n\t}", "public function currentUserHasManagerAccess()\n {\n $user = Service::getCurrentUser();\n \n if (!$user) {\n return false;\n }\n \n if ($this->userManagesSite($user)) {\n return true;\n }\n \n if ($user->isAdmin()) {\n return true;\n }\n \n return false;\n }", "protected function isAdmin()\n {\n if (session()->get('role') == 'admin') {\n return true;\n }\n return false;\n }", "public function isAdmin()\n {\n return isset($this->sessionStorage->user['role']) && $this->sessionStorage->user['role'] === Role::APP_ADMIN;\n }", "public static function show(){\n return Auth::check() && Auth::user()->isAdmin();\n }", "public function isAdmin() {\n return $this->hasPermission('is_admin');\n }", "public function isAdmin()\n {\n return $this->role == 'admin';\n }", "function visible_to_admin_user()\n\t{\n\t\treturn true;\n\t}", "public function isAdmin(){\n $user = Auth::guard('web') -> user();\n if ($user -> state != 1) {\n return 0;\n }\n else {\n return 1;\n }\n }", "function isAdmin(){\n\tif(isset($_SESSION['type']) && $_SESSION['type']!='user')\n\t\treturn true;\n\telse\n\t\treturn false;\n\t}", "public static function isAdmin()\n\t{\n\t\treturn in_array( Auth::user()->username, Config::get( 'admin.usernames' ) );\n\t}", "public function isAdmin()\n\t{\n\t\treturn $this->is_admin;\n\t}", "public function is_admin()\n {\n $session = $this->session->userdata('user');\n if($session)\n {\n if($session['role'] == 'ADMIN')\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }\n else\n {\n return FALSE;\n $this->log_out();\n }\n }", "public function isAdmin()\n {\n return ($this->type === User::ADMIN_USER);\n }", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "public static function isAdmin()\n {\n if (self::isConsole()) {\n return true;\n }\n \n return \\Craft\\craft()->getUser()->isAdmin();\n }", "function is_admin()\n {\n\tif(isset($_SESSION['ISADMIN']))\n\t {\n\t\treturn $this->check_session($_SESSION['ISADMIN']);\n\t }\n\t else\n\t {\n\t\t return false;\n\t }\n }", "function publisher_userIsAdmin()\r\n{\r\n global $xoopsUser;\r\n $publisher = PublisherPublisher::getInstance();\r\n\r\n static $publisher_isAdmin;\r\n\r\n if (isset($publisher_isAdmin)) {\r\n return $publisher_isAdmin;\r\n }\r\n\r\n if (!$xoopsUser) {\r\n $publisher_isAdmin = false;\r\n } else {\r\n $publisher_isAdmin = $xoopsUser->isAdmin($publisher->getModule()->getVar('mid'));\r\n }\r\n\r\n return $publisher_isAdmin;\r\n}" ]
[ "0.8149701", "0.8120138", "0.80907434", "0.8067327", "0.80663544", "0.8008301", "0.79916245", "0.79512244", "0.79316497", "0.7920257", "0.7903536", "0.7879554", "0.78785425", "0.7875852", "0.785753", "0.7857081", "0.7851301", "0.7825202", "0.782349", "0.7812325", "0.78090227", "0.78076416", "0.78026396", "0.77671224", "0.7763209", "0.77513874", "0.7749986", "0.77472615", "0.77204174", "0.77194005", "0.7717702", "0.7705065", "0.7699863", "0.7683351", "0.76813257", "0.7675097", "0.7673322", "0.76676965", "0.7667253", "0.7665327", "0.76607084", "0.76363003", "0.7621892", "0.76169276", "0.7604383", "0.7592634", "0.7592634", "0.75834304", "0.75800943", "0.7577524", "0.7576504", "0.75756395", "0.7575255", "0.7574166", "0.75724876", "0.7569652", "0.7567559", "0.7566884", "0.7561155", "0.7560799", "0.7543687", "0.7543687", "0.7535208", "0.7534619", "0.75290036", "0.7527806", "0.7525339", "0.75237215", "0.75227654", "0.75227463", "0.7522483", "0.7516393", "0.75099474", "0.75078326", "0.7507134", "0.75063294", "0.7500907", "0.7499276", "0.74925077", "0.74854106", "0.7478885", "0.7472615", "0.7466422", "0.7466171", "0.7456819", "0.7447032", "0.7445084", "0.7443169", "0.7443012", "0.7438551", "0.7438154", "0.743579", "0.7422775", "0.74210525", "0.74183995", "0.7417849", "0.7417849", "0.7417599", "0.7404979", "0.74041855" ]
0.80428535
5
Returns whether or not the user is currently logged in
public function isLoggedIn() { return (bool) $this->getLoggedInUser(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isLoggedIn()\n {\n return (bool)Users::getCurrentUser();\n }", "public function isLoggedIn()\n {\n return ($this->userInfo->userid ? true : false);\n }", "public function isUserLoggedIn()\n {\n return $this->user_is_logged_in;\n }", "public function is_user_logged_in()\n {\n $result = (boolean)self::getUser();\n return $result;\n }", "public function isLoggedIn() {\n\t\t\treturn $this->bLoggedInUser;\n\t\t}", "public function is_logged_in()\n {\n return isset($this->user);\n }", "static function isLoggedIn() {\n $user = self::currentUser();\n return isset($user) && $user != null;\n }", "public function isloggedin()\n {\n return Session::userIsLoggedIn();\n }", "public function is_user_logged_in(){\n\t\treturn $this->session->userdata('current_user_id') != FALSE;\n\t}", "public function is_logged_in() {\n\t\t\treturn $this->logged_in;\n\t\t}", "public function isCurrentlyLoggedIn() {}", "public function isUserLoggedIn() {\r\n\t\treturn ($this->coreAuthenticationFactory->isUserLoggedIn ());\r\n\t}", "public function isLoggedIn()\n {\n return $this->session->has('user');\n }", "public function isUserLoggedIn()\n {\n return $this->_customerSession->isLoggedIn();\n }", "public function isLoggedIn() {\n\t\treturn $this->loggedIn;\n\t}", "public function loggedIn()\n {\n if ($this->userId) {\n return true;\n } else {\n return false;\n }\n }", "public function loggedIn()\n {\n if($this->di->session->get('user'))\n {\n return true;\n }\n return false;\n }", "public function isLoggedIn() {\n\t\treturn $this->isLoggedin;\n\t}", "public function isLoggedIn() {\r\n\t\treturn $this->isLoggedIn;\r\n\t}", "public function isLoggedIn()\n {\n return isset($_SESSION['user']);\n }", "public function is_logged_in(){\n\t\treturn $this->_state_is_logged_in;\n\t}", "public function is_logged_in(){\r\n\t\t\treturn $this->logged_in;\r\n\t\t}", "public function isLoggedIn()\n {\n return $this->loggedIn;\n }", "public function isLoggedIn() {\n\t\t\treturn $this->loggedIn;\n\t\t}", "public function loggedIn()\n {\n return $this->user() != null;\n }", "public function getIsUserLoggedIn()\n {\n if (!isset($this->isUserLoggedIn)) {\n $userId = $this->getFamilyGraph()->getUserId();\n $this->isUserLoggedIn = (!empty($userId));\n }\n \n return $this->isUserLoggedIn;\n }", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "public function is_loggedin()\n {\n if (isset($_SESSION['user_session'])) {\n return true;\n }\n }", "function wv_is_user_loggedin() {\n $output = 0;\n if (is_user_logged_in()) {\n $output = 1;\n } else {\n $output = 0;\n }\n return $output;\n }", "public function isUserLoggedIn()\n {\n return (isset($this->session->sUserId) && !empty($this->session->sUserId));\n }", "function loggedIn()\n\t{\n\t\treturn $this->hasFunction(AUTH_FUNCTION_LOGGED_IN_ATTRIBUTE);\n\t}", "public function is_logged_in()\n\t{\n\t\treturn ($this->session->userdata('iduser') != FALSE);\n\t}", "public static function isLoggedIn()\n {\n if(isset($_SESSION[static::$sessionKey]))\n return (self::getUser(false) ? true : false);\n \n return false;\n }", "public function logged_in()\n\t{\n\t\treturn $this->_me != NULL;\n\t}", "public function isLoggedIn()\n {\n return $this->session->isLoggedIn();\n }", "protected function isLoggedIn()\n\t{\n\t\treturn is_user_logged_in();\n\t}", "public function is_logged_in()\n {\n if (isset($_SESSION['user_session'])) {\n return true;\n }\n }", "public function getIsLoggedIn()\n {\n return !$this->getIsGuest();\n }", "public function isLoggedIn()\n {\n // check session for user id\n if(isset($_SESSION['user']['id'])) {\n // return true;\n return $_SESSION['user']['id'];\n }\n else {\n return false;\n }\n }", "public static function is_user_logged_in() {\r\n if (isset($_SESSION['user_id'])) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "function is_logged_in()\n\t{\n\t\treturn require_login();\n\t}", "public function is_logged_in() {\n\t\treturn is_a($this->user, 'WP_User');\n\t}", "public static function isLoggedIn()\n {\n return !is_null(SessionService::getCurrent());\n }", "public function isUserLoggedIn()\n {\n if (isset($_SESSION['user_login_status']) AND $_SESSION['user_login_status'] == 1) {\n return true;\n }\n // default return\n return false;\n }", "public static function isLoggedin() {\n return self::$loggedin;\n }", "public static function isLoggedIn()\r\n\t\t{\r\n\r\n\t\t\tif(isset($_SESSION['user_session']))\r\n\t\t\t{\r\n\r\n\t\t\t\treturn $_SESSION['user_session'];\r\n\r\n\t\t\t}\r\n\r\n\t\t}", "function is_logged_in() \n {\n return (empty($this->userID) || $this->userID == \"\") ? false : true;\n }", "public static function loggedIn(): bool\n {\n // Check if user is in the session\n return isset($_SESSION['user']);\n }", "protected function is_logged_in( )\n\t{\n\t\t$this->user = $this->php_session->get('user');\n\t\tif( is_null($this->user))\n\t\t\treturn False;\n\t\tif( ! $this->is_timed_out() )\n\t\t\treturn False;\n\t\t$this->user['last_active'] = time();\n\t\t$this->php_session->set('user' , $this->user );\n\n\t\t//apply user permissions globally\n\t\t//@see user_helper\n\t\tapply_global_perms( $this->user );\n\n\n\t\t\n\t\treturn True;\n\t}", "public function is_logged_in() {\n\n\t}", "public static function isLoggedIn()\n {\n self::startSession();\n return isset($_SESSION['user']);\n }", "public function isUserLoggedIn() \n {\n if (!isset($_SESSION['user_id']) || !isset($_SESSION['is_logged_in'])) {\n return false;\n } else {\n return true;\n }\n }", "public function is_logged_in()\n\t{\n\t\tif(isset($_SESSION['userSession']))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "public function get_logged_in(): bool {\n\t\treturn $this->logged_in;\n\t}", "protected function isUserLoggedIn() {}", "protected function isUserLoggedIn() {}", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function is_loggedin(){\n if(isset($_SESSION['user_session'])){\n return true;\n }\n return false;\n }", "public function is_user_logged_in() {\n if ( $session_id = in('session_id') ) {\n return user()->check_session_id( $session_id );\n }\n else if ( is_user_logged_in() ) return wp_get_current_user()->ID;\n else return false;\n }", "public function is_logged_in()\n {\n // Check if user session has been set\n if (isset($_SESSION['session'])) {\n return true;\n }\n }", "public function isLoggedIn()\n {\n if(Session::get('user_id') != '') {\n $this->user_id=Session::get('user_id');\n $this->role_id=Session::get('role_id');\n return true;\n }else {\n return false;\n }\n }", "public static function isUserLoggedIn(): bool\n {\n if (isset($_SESSION['user_id'])) return true;\n return false;\n }", "public function is_logged_in() {\n\t\treturn (bool) $this->CI->session->userdata('is_logged_in');\n\t}", "public function isUserLoggedIn()\n {\n return $this->container->get('security.authorization_checker')\n ->isGranted('IS_AUTHENTICATED_FULLY');\n }", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "public function isLoggedIn()\r\n {\r\n if ($this->session->has('AUTH_NAME') AND $this->session->has('AUTH_EMAIL') AND $this->session->has('AUTH_CREATED') AND $this->session->has('AUTH_UPDATED')) {\r\n return true;\r\n }\r\n return false;\r\n }", "function IsLoggedIn() {\t\tif( Member::currentUserID() ) {\r\n\t\t return true;\r\n\t\t}\r\n }", "public function isLoggedin(){\n\n\t\treturn $this->_isLoggedin;\n\n\t}", "function is_logged_in()\n {\n //check session\n //return logged in user_id or false\n }", "public function isLoggedIn()\n {\n return $this->customerSession->isLoggedIn();\n }", "public static function is_logged_in()\n {\n return( isset( $_SESSION['login'] ) && !empty( $_SESSION['login'] ) ? true : false );\n }", "public function isLoggedIn()\n\t{\n\t\tif( isset($_SESSION['username']) )\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}", "public function isLoggedIn()\n {\n return true;\n }", "public function is_logged_in() {\n return isset($this->admin_id) && $this->last_login_is_recent();\n \n }", "public function isUserLoggedIn() {\n\n $this->restartSession();\n\n if ($this->checkLogin() == false) {\n return false;\n } else {\n return true;\n }\n }", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }", "public function loggedIn()\n {\n if(isset($_SESSION['user']) && !empty($_SESSION['user'])) {\n return true;\n }\n\n return false;\n }", "public function isLogged()\n {\n return $this->getID() && $this->getID() == get_current_user_id();\n }", "public static function isLoggedIn(){\r\n\t\treturn isset($_SESSION[\"id\"]);\r\n\t}", "function isLoggedIn() {\n\treturn isset($_SESSION['user']);\n}", "public function logged_in()\n {\n if (isset($_SESSION['user_data'])) {\n return true;\n } else {\n return false;\n }\n }", "function isLoggedIn() {\n\treturn isset($_SESSION['user_id']);\n}", "function isLoggedIn()\n\t{\n\t\tif ( $this->_isAuthorized() ){\t\n\t\t\treturn true;\n\t\t} else return false;\n\t\n\t}", "function loggedIn() {\n\t\treturn isset($_SESSION['username']);\n\t}", "public function loggedIn(){\r\n if (isset($_SESSION['user_session']))\r\n return true;\r\n else\r\n return false;\r\n }", "public function isLoggedIn(){\r\n\t\tif(!isset($_SESSION)){\r\n\t\t\tsession_start();\r\n\t\t}\r\n\t\tif(isset($_SESSION['logged_in']) && isset($_SESSION['userID']) && $_SESSION['logged_in'] == true){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function memberIsLoggedIn()\n {\n return $_SESSION['__COMMENTIA__']['member_is_logged_in'];\n }", "public function is_facebook_user_logged_in(){\n\t\treturn $this->session->userdata('current_fb_user_id') != FALSE;\n\t}", "public function isLoggedIn() {\n if (!property_exists($this, 'loggedIn')) {\n $this->loggedIn = false;\n $user = $this->getCurrentUser();\n if ($user) {\n $pass = $_SESSION['pass'];\n $this->loggedIn = password_verify($pass, $user->password);\n }\n }\n return $this->loggedIn;\n }", "public function isLoggedIn() {\n return isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_LOGGED_IN]) && $_SESSION[self::SESSION_FIELD_LOGGED_IN] === true;\n }", "public function isLoggedUser()\n {\n return $this->container->get('user')->isLogged();\n }", "public function isUserLogged(){\r\n return isset($_SESSION[$this->userSessionKey]);\r\n }", "private function checkLoggedIn()\n {\n $loggedin = false;\n $user = Account::checkLogin($this->getDb());\n\n if ($user) {\n $loggedin = true;\n }\n\n return $loggedin;\n }", "public function loggedIn()\n {\n $CI = &get_instance();\n if ($CI->session->has_userdata('user_id')) {\n return true;\n } else {\n return false;\n }\n }", "public function is_logged_in()\n\t{\n\t\tif ( ! $this->CI->session->userdata('id'))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "private function _isLoggedIn() {\n \n if ( ! is_multisite() ) { \n if ( ! function_exists( 'is_user_logged_in' ) ) {\n include( ABSPATH . \"wp-includes/pluggable.php\" ); \n } \n return is_user_logged_in();\n }\n \n // For multi-sites\n return is_user_member_of_blog( get_current_user_id(), get_current_blog_id() );\n\n }", "public static function loggedIn()\n\t{\n\t\treturn isset($_SESSION['id']);\n\t}", "public function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\n }" ]
[ "0.8876293", "0.88636667", "0.8750611", "0.8654105", "0.86281836", "0.8573027", "0.85722136", "0.85702586", "0.85643643", "0.8562636", "0.85463905", "0.85175234", "0.85167813", "0.84852666", "0.84636617", "0.8454894", "0.84546053", "0.8451479", "0.84406024", "0.84401214", "0.8430493", "0.8428264", "0.8419918", "0.84185314", "0.8401132", "0.836735", "0.83603513", "0.83603513", "0.8358385", "0.8351163", "0.8350014", "0.8342721", "0.8325091", "0.832042", "0.8311075", "0.83028203", "0.82984346", "0.82979214", "0.8289215", "0.8284557", "0.82726187", "0.8267077", "0.82670295", "0.8258235", "0.8248434", "0.8248246", "0.8233135", "0.82248604", "0.8221026", "0.8216901", "0.8205857", "0.82000214", "0.8185259", "0.81843895", "0.8166221", "0.81521064", "0.81521064", "0.8145943", "0.81405306", "0.8138864", "0.8135053", "0.81290424", "0.81268156", "0.81219774", "0.8109423", "0.81083256", "0.8103743", "0.8102649", "0.8091275", "0.80848026", "0.80801255", "0.80792505", "0.8077149", "0.807449", "0.8068863", "0.80664194", "0.80599767", "0.80524516", "0.80517226", "0.8050444", "0.80450493", "0.8041842", "0.80351245", "0.8006536", "0.7998798", "0.7998612", "0.79947656", "0.7983092", "0.7981046", "0.79722506", "0.7968816", "0.79679793", "0.7967656", "0.7958886", "0.7956458", "0.7956413", "0.79540604", "0.7951355", "0.7950974", "0.79506844" ]
0.8657391
3
Get current ignore access setting
public function getIgnoreAccess() { return elgg_get_ignore_access(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getImportIgnore() {\n return $this->getThirdPartySetting('config_import_ignore', 'import_ignore', $this->import_ignore);\n }", "public function getIgnore()\n {\n return $this->ignore;\n }", "public static function get_allowed_settings()\n {\n }", "public function settings(){\n if($this->isLogedin() && $this->hasAdminPanel())\n return $this->moduleSettings();\n return browser\\msg::pageAccessDenied();\n }", "function getDefaultAccess() {\n\t return $this->defaultAccess;\n\t}", "final public function getIgnore()\n {\n return (bool)$this->getOption('data-ignore');\n }", "static function getDefaultAccessId() {\n $access_id = Setting::get(\"default_access\");\n if (!$access_id) {\n $access_id = \"public\";\n }\n return $access_id;\n }", "static public function get_raw_settings() {\n\t\t$settings = FLBuilderModel::get_admin_settings_option( '_fl_builder_user_access', true );\n\n\t\tif ( ! is_array( $settings ) ) {\n\t\t\t$settings = array();\n\t\t}\n\n\t\treturn $settings;\n\t}", "public static function setIgnoreAclPermissions($ignore=true){\n\t\t\n\t\t\\GO::debug(\"setIgnoreAclPermissions(\".var_export($ignore, true).')');\n\t\t\n\t\t$oldValue = \\GO::$ignoreAclPermissions;\n\t\t\\GO::$ignoreAclPermissions=$ignore;\n\n\t\treturn $oldValue;\n\t}", "function get_setting() {\n // has to be overridden\n return NULL;\n }", "public function getSetting() {}", "public function getSetting() {}", "function getSettings()\n\t{\n\t\treturn false;\n\t}", "public function getIgnoreWarnings()\n {\n return $this->ignore_warnings;\n }", "public function getAccessConfig()\n {\n return $this->access_config;\n }", "public function getPermDenied()\n {\n return $this->getProperty('pd');\n }", "abstract protected function getSetting() ;", "public function getDontAutograntPermissions()\n {\n return $this->dont_autogrant_permissions;\n }", "public static function exclusive()\n {\n // Change setting\n self::$settings['exclude'] = true;\n\n // Return exclusion list\n return self::$exclude;\n }", "public function getConsentRejected()\r\n {\r\n if ($this->project->offsetExists('consentRejected')) {\r\n return $this->project->consentRejected;\r\n }\r\n\r\n // Remove in 1.7.3\r\n if ($this->project->offsetExists('concentRejected')) {\r\n throw new \\Gems_Exception_Coding('project.ini setting was changed from \"concentRejected\" to \"consentRejected\", please update your project.ini');\r\n }\r\n\r\n return 'do not use';\r\n }", "public function getConfigExclude()\n {\n return $this->configParams['sections_exclude'];\n }", "public function attestationExcludedCredentials(): array;", "public function getSettings() {\n $scenario = \\Drupal::installProfile();\n if ($scenario === 'dfs_obio_acm') {\n $scenario = 'dfs_obio';\n }\n return \\Drupal::config('as_lift.settings.' . $scenario);\n }", "public function getSiteaccess()\n {\n return $this->siteaccess;\n }", "private static function notAllowed() : array\n\t{\n\t\t$return = [];\n\n\t\t$aeSettings = \\MarkNotes\\Settings::getInstance();\n\n\t\t$return['count'] = 0;\n\t\t$return['status'] = 0;\n\t\t$return['message'] = $aeSettings->getText('not_authenticated');\n\n\t\t/*<!-- build:debug -->*/\n\t\tif ($aeSettings->getDebugMode()) {\n\t\t\t$return['debug'] = 'The show_login settings is set to ' .\n\t\t\t\t'1 and the user isn\\'t yet connected. In that case, ' .\n\t\t\t\t'the list of files should be keept hidden';\n\t\t}\n\t\t/*<!-- endbuild -->*/\n\n\t\treturn $return;\n\t}", "function get_setting() {\n return get_config(NULL, $this->name);\n }", "public function getExclude()\n {\n return $this->exclude;\n }", "function get_user_setting( $user, $key = false )\n {\n //Unimplemented\n }", "public function getAllowMissing()\n {\n return $this->allow_missing;\n }", "private function getFilteredConfig()\n {\n return array_diff_key($this->resolvedBaseSettings, array_flip($this->primaryReadReplicaConfigIgnored));\n }", "public static function getAccessState()\n {\n return self::$access;\n }", "private function _get_current_settings()\n\t{\n\t\t$query = ee()->db->select('settings')\n\t\t ->from('extensions')\n\t\t ->where('class', $this->class_name)\n\t\t ->limit(1)\n\t\t ->get();\n\n\t\treturn @unserialize($query->row('settings'));\n\t}", "private function getSetting()\n {\n $r = Session::get('setting');\n Session::forget('setting');\n\n return $r;\n }", "public static function getCurrentSettings() {\r\n\t\t$settings=Yii::app()->user->getState('settings');\r\n\t\t\r\n\t\tif(is_null($settings)) {\r\n\t\t\t//it can also happen that the current session is lost, but the user stays logged in - so pull it out of the db \r\n\t\t\t$settings=UserSettings::model()->findByAttributes(array('userId'=>Yii::app()->user->getId()));\r\n\r\n\t\t\tif(is_null($settings)) {\r\n\t\t\t\t$settings=new UserSettings();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tYii::app()->user->setState('settings', $settings);\r\n\t\t}\r\n\t\t\r\n\t\treturn $settings;\r\n\t}", "public function get_setting() {\n // $this->db->where('option_name', $opname);\n \n $query = $this->db->get('t_pref');\n return $query->row();\n }", "function getIgnoreEnableFields() ;", "function getEvaluationAccess() \n\t{\n\t\treturn ($this->evaluation_access) ? $this->evaluation_access : self::EVALUATION_ACCESS_OFF;\n\t}", "public function getIgnored() : bool\n {\n return $this->ignored;\n }", "function get_defaultsetting() {\n return $this->defaultsetting;\n }", "public function basic_settings(){\r\n \tif($this->has_admin_panel()){\r\n return $this->module_basic_settings();\r\n }\r\n else{\r\n //access denied\r\n \treturn $this->module_no_permission();\r\n }\r\n }", "public function getAccess()\n {\n return $this->_params['access'];\n }", "public function getAllowSpecific();", "public function core_settings(){\r\n\t\tif($this->has_admin_panel()) return $this->module_core_settings();\r\n return $this->module_no_permission();\r\n\t}", "public function getDeny(): string\n {\n return $this->deny;\n }", "public function getAccess()\n {\n return $this->access;\n }", "public function getIgnoreEnableFields() {}", "public function getDevModeSuppress()\n {\n return $this->devModeSuppress;\n }", "public static function getSettings()\n\t\t{\n\t\t\treturn self::$ettings;\n\t\t}", "public function ignoredActivityIDs() {\n\t\treturn $this->get('GARMIN_IGNORE_IDS');\n\t}", "public function isIpnUrlAccessRestricted()\n {\n return Mage::getStoreConfigFlag(self::GENERAL_SETTINGS_PATH . 'restrictaccess', $this->getStoreId());\n }", "function scs_get_option()\n\t{\n\t\t$option = get_option( basename(dirname(__FILE__)) );\n\t\tif ( !$option ) {\n\t\t\t$option = array( 'state' => 'normal', 'logged_in_permission' => true );\n\t\t\tadd_option(basename(dirname(__FILE__)), $option);\n\t\t}\n\n\t\treturn $option;\n\t}", "public function getReadPreference();", "function __getPrivacyConfig(){\n\t\t$privacy['Asset'][519]=\"<b>Public</b> - are publicly listed and visible to anyone.\";\n\t\t$privacy['Asset'][71]=\"<b>Members only </b> - are NOT publicly listed, and are visible only when shared in Groups or Events, and only by Group members.\";\n\t\t$privacy['Asset'][7]=\"<b>Private</b> - are NOT publicly listed and visible only to me.\";\n\n\t\t// TODO: possibly redundant? isn't it set in Asset????\n\t\t$privacy['Groups'][519]=\"Public - are visible to anyone.\";\n\t\t$privacy['Groups'][79]=\"Members only - visible to all common members.\";\n\t\t$privacy['Groups'][7]=\"Private - visible only to designated Admins.\";\n\n\t\t$privacy['SecretKey'][1]=\"Members - are visible to all site members.\";\n\t\t$privacy['SecretKey'][2]=\"Admins - are visible only to Owners and Admins \";\n\t\t$privacy['SecretKey'][4]=\"Nobody - disable Secret Key sharing\";\n\t\treturn $privacy;\n\t}", "public function get_settings() {\n return self::$settings;\n }", "public function getAccess() {\n\t\treturn $this->_access;\n\t}", "public function getSettings()\n {\n if ($this->config['use_cookie'] && !empty($_COOKIE[$this->config['force_browser_variable']])) {\n return $_COOKIE[$this->config['force_browser_variable']];\n }\n\n return '';\n }", "public function stone_setting() {\r\n return $this->stone_setting;\r\n }", "public function basic_settings_edite(){\r\n if($this->has_admin_panel()){\r\n return $this->module_basic_settings_edite();\r\n }\r\n else{\r\n //access denied\r\n \treturn $this->module_no_permission();\r\n }\r\n }", "public function getEnableDashboardAccess()\n {\n return $this->enable_dashboard_access;\n }", "public static function getSettings()\n {\n return [\n 'login' => 'editor',\n 'legalTemplates' => ['city'],\n 'access' => [\n 'templates' => [\n [\n 'name' => 'city',\n 'roles' => ['editor'],\n // 'editRoles' => ['editor'], // <-- user has no edit permission\n ],\n ]\n ]\n ];\n }", "public function encryption_setting()\n\t{\n\t\t$this->db->join('account_management_others_setup b','a.account_management_policy_id=a.account_management_policy_id');\n\t\t$this->db->join('account_management_others_data c','c.account_management_others_setup_id=b.account_management_others_setup_id');\n\t\t$query = $this->db->get('account_management_policy_settings a');\n\t\t$setting = $query->row('datas');\n\t\treturn $setting;\n\t}", "public function getStealthModeBlocked()\n {\n if (array_key_exists(\"stealthModeBlocked\", $this->_propDict)) {\n return $this->_propDict[\"stealthModeBlocked\"];\n } else {\n return null;\n }\n }", "public function get_readonly() {\n return $this->readonly;\n }", "private function settings()\n {\n if (!$this->settings) {\n $this->settings = userSettings::findOrMake($this->tid);\n }\n return $this->settings;\n }", "public function getAccess(): string\n {\n return $this->access;\n }", "function getEnableFieldsToBeIgnored() ;", "public function getNluSettings()\n {\n return isset($this->nlu_settings) ? $this->nlu_settings : null;\n }", "private function eOrEd(){\n $ci = &get_instance();\n return $ci->config->item('MemcacheOrMemcached');\n }", "public function getPersonalMessageTurnedOff() {\r\n return Mage::getStoreConfig(\r\n 'giftwrap/message/personal_message_disable_msg');\r\n }", "function getClearSettings() {\n /*reserved for future use*/\n }", "private static function default_settings() {\n\t\treturn array(\n\t\t\t'module_ga' => true,\n\t\t\t'module_ip' => true,\n\t\t\t'module_log' => true,\n\t\t\t'sent_data' => false,\n\t\t\t'api_key' => '',\n\t\t\t'mark_as_approved' => true,\n\t\t);\n\t}", "public function getEnableFieldsToBeIgnored() {}", "public function getProfileDefault()\n {\n return $this->getConfig('packages/global_settings_default-profile');\n }", "function getLocked() {\n\t\treturn $this->get(\"locked\");\n\t}", "public function getBypassDirSyncOverridesEnabled()\n {\n if (array_key_exists(\"bypassDirSyncOverridesEnabled\", $this->_propDict)) {\n return $this->_propDict[\"bypassDirSyncOverridesEnabled\"];\n } else {\n return null;\n }\n }", "public function get_setting( $name ){\n $setting = '';\n if( isset($this->settings[$name]) )\n $setting = $this->settings[$name];\n return $setting;\n }", "public function get_setting( $name ){\n $setting = '';\n if( isset($this->settings[$name]) )\n $setting = $this->settings[$name];\n return $setting;\n }", "public function get_setting( $name ){\n $setting = '';\n if( isset($this->settings[$name]) )\n $setting = $this->settings[$name];\n return $setting;\n }", "public function getLoyaltyAllowedInd()\n {\n return $this->loyaltyAllowedInd;\n }", "public function getCustom()\n {\n return config('cms-acl-module.permissions', []);\n }", "function _get_maintainance() \n { \n return $this->admin_setting_model->get_maintainance();\n }", "function get_settings() {\n\t\treturn $this->settings;\n\t}", "public function getExclude() {\n \treturn array_keys($this->exclude);\n }", "public function getSpecialReqPref()\n {\n return $this->specialReqPref;\n }", "public function getSpecialReqPref()\n {\n return $this->specialReqPref;\n }", "public function get_settings()\n {\n }", "function get_settings(){\n //get settings stored in settings.con\n if( array_key_exists('settings.conf', $_SESSION) !== true ){\n $ret = $this->load_settings();\n if( $ret !== false ){\n return $ret;\n }\n }\n return $_SESSION['settings.conf'];\n }", "abstract public function get_settings();", "public function getExplicitlyAllowAndDeny() {}", "public function getIgnoreModule() {\n\t\treturn array('cms', 'modulemanager', 'srbac', 'gii', 'thememanager');\n\t}", "function getShareAccess() {\n return SPlugin::ACCESS_SHAREDOWNER;\n }", "public function getSettings()\n {\n return self::$settings;\n }", "function getToolSettings() {\n /*reserved for future use*/\n }", "function get_user_settings( $user )\n {\n //Unimplemented\n }", "function getTokenUsePickupFile()\n {\n return $this->_props['TokenUsePickupFile'];\n }", "public function getExcludeHideFromSearch()\n {\n return $this->excludeHideFromSearch;\n }", "function getRestoreSettings() {\n /*reserved for future use*/\n }", "function getCanDisable() {\n\t\treturn $this->getData('canDisable');\n\t}", "protected function define_my_settings() {\n // No particular settings for this activity\n }", "public function getSettings();" ]
[ "0.71325946", "0.6565561", "0.6179892", "0.61780983", "0.61391526", "0.6031406", "0.6016636", "0.5997274", "0.5991056", "0.59624046", "0.59275246", "0.59275246", "0.5904087", "0.58565366", "0.58426017", "0.580923", "0.57551706", "0.57441086", "0.5730593", "0.5713319", "0.5698828", "0.5684397", "0.5667896", "0.5657486", "0.56558377", "0.5628642", "0.5592282", "0.5590211", "0.5585513", "0.5584747", "0.55819154", "0.5576452", "0.5576284", "0.557271", "0.5548413", "0.55441356", "0.5525351", "0.55215657", "0.5516118", "0.5513224", "0.54948896", "0.54891443", "0.5488178", "0.54806757", "0.5471694", "0.54547554", "0.545302", "0.5439224", "0.5438022", "0.5437443", "0.5429831", "0.5418866", "0.5408943", "0.54040205", "0.54023945", "0.5401654", "0.5390182", "0.53856474", "0.537609", "0.53756565", "0.53739476", "0.5363879", "0.53543943", "0.5353523", "0.53385776", "0.53280675", "0.5323416", "0.5322029", "0.5304443", "0.53022105", "0.5291343", "0.5288944", "0.52856356", "0.5280818", "0.526692", "0.52594715", "0.52594715", "0.52594715", "0.52549624", "0.5254491", "0.52538407", "0.5245546", "0.5244299", "0.5241755", "0.5241755", "0.5240418", "0.5226361", "0.5219155", "0.52169776", "0.5206151", "0.520564", "0.52012557", "0.52001095", "0.5192771", "0.51871425", "0.5183076", "0.51817346", "0.51811075", "0.5179039", "0.51776636" ]
0.752403
0
/ Initialize action controller here
public function init() { include("Url.php"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init()\n {\n /* Initialize action controller here */\n }", "public function init()\n {\n /* Initialize action controller here */\n }", "protected function initializeController() {}", "protected function initializeAction() {}", "protected function initializeAction() {}", "protected function initializeAction() {}", "protected function initAction()\n {\n }", "protected function initializeAction() {\n\t\t/* Merge flexform and setup settings\n\t\t * \n\t\t */\n\t\t$this->settings['action'] = $this->actionMethodName;\n\t}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {\n\n\t}", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "protected function initializeAction() {\n\t\t$this->akismetService->setCurrentRequest($this->request->getHttpRequest());\n\t}", "public function __construct($controller,$action) {\n\t\tparent::__construct($controller, $action);\n\t\t\n\t}", "public function init()\n {\n $controller = $this->router->getController();\n $action = $this->router->getAction();\n $params = $this->router->getParams();\n\n $objController = registerObject($controller);\n\n call_user_func_array([$objController, $action], $params);\n }", "public function __construct($controller, $action) {\n parent::__construct($controller, $action); //parent is Controller.php\n }", "protected function initAction()\r\n {\r\n $return = false;\r\n\r\n // parse request URI\r\n $parts_url = parse_url(strtolower(trim($_SERVER['REQUEST_URI'], '/')));\r\n // @TODO: fix\r\n $parts_url_array = explode('/', $parts_url['path']);\r\n list($this->controllerName, $this->itemId) = $parts_url_array;\r\n\r\n // parse method\r\n $this->requestMethod = strtolower($_SERVER['REQUEST_METHOD']);\r\n\r\n switch ($this->requestMethod) {\r\n case 'get':\r\n // default actions for GET\r\n if ($this->controllerName == 'login' || $this->controllerName == 'logout') {\r\n $this->actionName = $this->controllerName;\r\n $this->controllerName = 'users';\r\n } elseif (is_null($this->itemId)) {\r\n $this->actionName = 'index';\r\n } else {\r\n $this->actionName = 'view';\r\n }\r\n break;\r\n case 'post':\r\n // default action for POST\r\n $this->actionName = 'add';\r\n break;\r\n case 'put':\r\n // default action for PUT\r\n $this->actionName = 'edit';\r\n break;\r\n case 'delete':\r\n // default action for DELETE\r\n $this->actionName = 'delete';\r\n break;\r\n }\r\n\r\n if (!$this->controllerName) {\r\n $this->controllerName = 'main';\r\n }\r\n if (!$this->actionName) {\r\n $this->actionName = 'index';\r\n }\r\n\r\n // get, check & requre class\r\n $className = sprintf('mob%s', ucfirst($this->controllerName));\r\n $className = 'pages\\\\' . $className;\r\n \r\n if (class_exists($className)) {\r\n //create a instance of the controller\r\n $this->controller = new $className();\r\n\r\n //check if the action exists in the controller. if not, throw an exception.\r\n $actionName = sprintf('action%s', ucfirst($this->actionName));\r\n if (method_exists($this->controller, $actionName) !== false) {\r\n $this->action = $actionName;\r\n // set request params\r\n if ($this->itemId) {\r\n $this->controller->setParams(array('id' => $this->itemId));\r\n }\r\n $this->controller->setRequestParams($this->requestMethod);\r\n\r\n $return = true;\r\n } else {\r\n $this->controller->httpStatusCode = HTTP_STATUS_METHOD_NOT_ALLOWED;\r\n// throw new \\Exception('Action is invalid.');\r\n }\r\n } else {\r\n $this->controller = new clsMobController();\r\n $this->controller->httpStatusCode = HTTP_STATUS_NOT_FOUND;\r\n// throw new \\Exception('Controller class is invalid.');\r\n }\r\n\r\n return $return;\r\n }", "public function __construct()\n {\n // Prepare the action for execution, leveraging constructor injection.\n }", "public function __construct() {\n // filter controller, action and params\n $url = filter_input(INPUT_GET, 'url', FILTER_SANITIZE_URL); // $_GET['url']\n $params = explode('/', trim($url, '/'));\n\n // store first and seccond params, removing them from params list\n $controller_name = ucfirst(array_shift($params)); // uppercase classname\n $action_name = array_shift($params);\n\n require_once APP . 'config.php';\n\n // default controller and action\n if (empty($controller_name)) {\n $controller_name = AppConfig::DEFAULT_CONTROLLER;\n }\n if (empty($action_name)) {\n $action_name = AppConfig::DEFAULT_ACTION;\n }\n\n // load requested controller\n if (file_exists(APP . \"Controller/$controller_name.php\")) {\n require CORE . \"Controller.php\";\n require CORE . \"Model.php\";\n require APP . \"Controller/$controller_name.php\";\n $controller = new $controller_name();\n\n // verify if action is valid\n if (method_exists($controller, $action_name)) {\n call_user_func_array(array($controller, $action_name), $params);\n $controller->render(\"$controller_name/$action_name\"); // skipped if already rendered\n } else {\n // action not found\n $this->notFound();\n }\n } else {\n // controller not found\n $this->notFound();\n }\n }", "public static function init() {\n\t\tself::setup_actions();\n\t}", "protected function initializeAction()\n\t{\n\t\tparent::init('Form');\n\t}", "public function initController()\n {\n $this->model = new AliveSettingServiceMeta();\n\n $this->middleware([\n\n ]);\n }", "public function init() {\n\n $this->jobs = new Hb_Jobs();\n if ($this->_request->getActionName() == 'view') {\n\n $this->_request->setActionName('index');\n }\n\n $this->searchParams = $this->_request->getParams();\n $this->view->searchParams = $this->searchParams;\n\n $this->view->actionName = $this->_request->getActionName();\n }", "protected function initializeAction()\n {\n $this->extKey = GeneralUtility::camelCaseToLowerCaseUnderscored('BwrkOnepage');\n /** @var LanguageAspect $languageAspect */\n $languageAspect = GeneralUtility::makeInstance(Context::class)->getAspect('language');\n $this->languageUid = $languageAspect->getId();\n }", "protected function initializeAction()\n {\n parent::initializeAction();\n $this->customer = SubjectResolver::get()\n ->forClassName(Customer::class)\n ->forPropertyName('user')\n ->resolve();\n }", "public function initialize()\n {\n parent::initialize();\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Cookie');\n $this->cors();\n\n $currentController = $this->request->getParam('controller');\n // pr($currentController); die();\n if($currentController == 'Tenants'){\n $currentController = 'TenantUsers';\n }\n if($currentController == 'CorporateClients'){\n $currentController = 'CorporateClientUsers';\n // pr($currentController);die();\n }\n // $currentController = $this->request->params['controller'];\n $loginAction = $this->Cookie->read('loginAction');\n if(!$loginAction){\n $loginAction = ['controller' => $currentController,'action' => 'login'];\n }\n // pr($loginAction);die;\n $this->loadComponent('Auth',[\n 'loginAction' => ['controller' => $currentController,'action' => 'login'],\n 'authenticate' => [\n 'Form' =>\n [\n 'userModel' => $currentController,\n 'fields' => ['username' => 'email', 'password' => 'password']\n ]\n ],\n 'authorize'=> ['Controller'],\n 'loginAction' => $loginAction,\n 'loginRedirect' => $loginAction,\n 'logoutRedirect' => $loginAction \n\n ]);\n // $this->loadComponent('Auth', [\n\n // 'unauthorizedRedirect' => false,\n // 'checkAuthIn' => 'Controller.initialize',\n\n // // If you don't have a login action in your application set\n // // 'loginAction' to false to prevent getting a MissingRouteException.\n // 'loginAction' => false\n // ]);\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see https://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n }", "public function init() {\n\t\t$this->load_actions();\n\t}", "public function init()\r\n {\r\n\r\n /* Initialize action controller here */\r\n\r\n //=====================================must add in all Controller class constructor ===================================//\r\n if(defined('SITEURL')) $this->site_url = SITEURL;\r\n if(defined('SITEASSET')) $this->site_asset = SITEASSET;\r\n $this->view->site_url = $this->site_url;\r\n $this->view->site_asset = $this->site_asset;\r\n Zend_Loader::loadClass('Signup');\r\n Zend_Loader::loadClass('User');\r\n Zend_Loader::loadClass('Request');\r\n //Zend_Loader::loadClass('mailerphp');\r\n\t\t//Zend_Loader::loadClass('Permission');\r\n\r\n\r\n //-----------------------------------------------authenticate logged in user---------------------------------------------//\r\n Zend_Loader::loadClass('LoginAuth');\r\n $this->view->ob_LoginAuth = $this->sessionAuth = new LoginAuth();\r\n\r\n $this->sessionAuth->login_user_check();\r\n\r\n $this->sessionAuth->cookie_check();\r\n $this->view->server_msg = $this->sessionAuth->msg_centre();\r\n\r\n //-----------------------------------------------authenticate logged in user---------------------------------------------//\r\n unset($_SESSION['tranzgo_session']['export_list']);\r\n $this->view->ControllerName = $this->_request->getControllerName();\r\n $this->view->page_id = ($_SESSION['tranzgo_session']['role_id']==1)?'5':'7';\r\n //______________________________________must add in all Controller class constructor _____________________________________//\r\n\r\n\r\n }", "public function __construct() {\n\t\t\t$this->init_globals();\n\t\t\t$this->init_actions();\n\t\t}", "public function __construct()\n\t{\n\t\t$this->actionable = \"\";\n\t\t$this->action_taken = \"\";\n\t\t$this->action_summary = \"\";\n\t\t$this->resolution_summary = \"\";\n\t\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __init()\n\t{\n\t\t// This code will run before your controller's code is called\n\t}", "function __construct()\n\t\t{\n\t\t\tparent::__construct();\n\t\t\t$this->_actionModel = new Action_Model();//khoi tao class\n\t\t}", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "protected function initializeAction() {\t\n\t\t$this->persdataRepository = t3lib_div::makeInstance('Tx_PtConference_Domain_Repository_persdataRepository');\n\t}", "public function __construct()\n\t{\n\t\t$this->actionable = \"\";\n\t\t$this->action_taken = \"\";\n\t\t$this->action_summary = \"\";\n\t\t$this->media_values = array(\n\t\t\t101 => Kohana::lang('ui_main.all'),\n\t\t\t102 => Kohana::lang('actionable.actionable'),\n\t\t\t103 => Kohana::lang('actionable.urgent'),\n\t\t\t104 => Kohana::lang('actionable.action_taken')\n\t\t);\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __construct() {\n\n list($null,$controller, $action, $id) = explode(\"/\", $_SERVER['PATH_INFO']);\n \n $this->urlValues['base'] = \"http://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n $this->urlValues['controller'] = $controller ? $controller : \"home\";\n $this->urlValues['action'] = $action;\n $this->urlValues['id'] = $id;\n\n $this->controllerName = strtolower($this->urlValues['controller']);\n $this->controllerClass = ucfirst(strtolower($this->urlValues['controller'])) . \"Controller\";\n\n if ($this->urlValues['action'] == \"\") {\n $this->action = \"index\";\n } else {\n $this->action = $this->urlValues['action'];\n }\n }", "protected function _initControllers()\n\t{\n\t\treturn;\n\t}", "public function init()\n {\n $this->vars['CRUD']['Object'] = $this;\n $this->kernel = kernel();\n\n // Dynamic initialization\n if (! $this->modelName) {\n $modelRefl = new ReflectionClass($this->modelClass);\n $this->modelName = $modelRefl->getShortName();\n }\n\n\n if (! $this->crudId) {\n $this->crudId = \\Phifty\\Inflector::getInstance()->underscore($this->modelName);;\n }\n if (! $this->templateId) {\n $this->templateId = $this->crudId;\n }\n\n // Derive options from request\n if ($request = $this->getRequest()) {\n if ($useFormControls = $request->param('_form_controls')) {\n $this->actionViewOptions['submit_btn'] = true;\n $this->actionViewOptions['_form_controls'] = true;\n }\n }\n\n $this->reflect = new ReflectionClass($this);\n $this->namespace = $ns = $this->reflect->getNamespaceName();\n\n // XXX: currently we use FooBundle\\FooBundle as the main bundle class.\n $bundleClass = \"$ns\\\\$ns\";\n if (class_exists($bundleClass)) {\n $this->bundle = $this->vars['Bundle'] = $bundleClass::getInstance($this->kernel);\n } else {\n $bundleClass = \"$ns\\\\Application\";\n $this->bundle = $this->vars['Bundle'] = $bundleClass::getInstance($this->kernel);\n }\n\n $this->vars['Handler'] = $this;\n $this->vars['Controller'] = $this;\n\n // anyway, we have the model classname, and the namespace, \n // we should be able to registerRecordAction automatically, so we don't have to write the code.\n if ($this->registerRecordAction) {\n $self = $this;\n $this->kernel->event->register('phifty.before_action',function() use($self) {\n $self->kernel->action->registerAction('RecordActionTemplate', array(\n 'namespace' => $self->namespace,\n 'model' => $self->modelName,\n 'types' => (array) $self->registerRecordAction\n ));\n });\n }\n\n\n $this->initPermissions();\n\n /*\n * TODO: Move this to before render CRUD page, keep init method simple\n\n if ( $this->isI18NEnabled() ) {\n $this->primaryFields[] = 'lang';\n }\n */\n $this->initNavBar();\n }", "public function _initialize()\n {\n $this->cate=CONTROLLER_NAME;\n }", "protected function initializeActionEntries() {}", "protected function initializeAction() {\n\t\t$this->feusers = $this->feusersRepository->findByUid( $GLOBALS['TSFE']->fe_user->user['uid'] ) ;\n\t\t$this->schule = $this->feusers->getSchule();\n\t\n\t\t$this->extKey = $this->request->getControllerExtensionKey();\n\t\t$this->extPath = t3lib_extMgm::extPath($this->extKey);\n\t\n\t\t$this->importClassFile = $this->extPath.'Classes/tmp/class.importtext.php';\n\t\t$this->importClass = 'ImportText';\n\t \n\t\tif ( $this->settings[pidAjaxContainerKlassenuebersicht] > 0) $this->pidAjaxContainerKlassenuebersicht = (int) $this->settings[pidAjaxContainerKlassenuebersicht];\n\t\n\t}", "public function init(){\r\n\t$this->_helper->_acl->allow('public',NULL);\r\n\t$this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\r\n\t$this->_contexts = array('xml','json');\r\n\t$this->_helper->contextSwitch()\r\n\t\t->setAutoDisableLayout(true)\r\n\t\t->addActionContext('oneto50k',$this->_contexts)\r\n\t\t->addActionContext('index',$this->_contexts)\r\n\t\t->initContext();\r\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function initBaseController();", "public function init() {\n $this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\n\t\t$this->_helper->acl->allow('public',null);\n\t\t$this->_helper->contextSwitch()\n\t\t\t ->setAutoDisableLayout(true)\n\t\t\t ->addActionContext('index', array('xml','json'))\n ->initContext();\n\t}", "public function __construct()\n {\n // Call the CI_Controller constructor\n parent::__construct();\n }", "public function __construct()\n\t{\t\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function initAction() : object\n {\n /**\n * Show all movies.\n */\n $response = $this->app->response;\n return $response->redirect(\"cms/posts\");\n }", "protected function initializeAction() {\n\t\t$this->frontendUserRepository = t3lib_div::makeInstance('Tx_GrbFeusermanager_Domain_Repository_FrontendUserRepository');\n\t}", "public function contentControllerInit()\n\t{\n\t}", "protected function initializeAction()\n {\n parent::initializeAction();\n\n $query = GeneralUtility::_GET('q');\n if ($query !== null) {\n $this->request->setArgument('q', $query);\n }\n }", "public function __construct()\n {\n $this->setAction('index', array('idle', 'toggleEnabled', 'expunge'));\n }", "public static function init() {\n\t\t$_GET = App::filterGET();\n\t\t\n\t\t// Checken of er params zijn meegegeven\n\t\ttry {\n\t\t\tif (count($_GET) == 0) {\n\t\t\t\t$_GET[0] = '';\n\t\t\t}\n\t\t\t\n\t\t\t// Is de eerste param een controller ? Anders een pageView\n\t\t\tif (self::isController($_GET[0])) {\n\t\t\t\t$controllerName = self::formatAsController($_GET[0]);\n\t\t\t\t$controller = self::loadController($controllerName);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Er is sprake van een pageview\n\t\t\t\t$controllerName = 'PagesController';\n\t\t\t\t$controller = self::loadController($controllerName);\n\t\t\t}\n\t\t\t\n\t\t\t$action = self::getAction($controller);\n\t\t\t$controller->setAction($action);\n\n\t\t\t// Try to exec the action\n\t\t\ttry {\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t}\n\t\t\tcatch(ActionDoesNotExistException $ex) {\n\n\t\t\t\techo $action;\n\t\t\t\t// Action bestaat niet\n\t\t\t\t$controller = self::loadController('ErrorController');\n\t\t\t\t\n\t\t\t\t// Als development is ingeschakeld, dan de ware error tonen, anders een 404 pagina\n\t\t\t\tif (Config::DEVELOPMENT)\n\t\t\t\t\t$action = self::formatAsAction('invalidAction');\n\t\t\t\telse\n\t\t\t\t\t$action = self::formatAsAction('notFound');\n\t\t\t\t\t\n\t\t\t\t$controller->setAction($action);\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t}\n\t\t\tcatch(MissingArgumentsException $ex) {\n\t\t\t\t$controller = self::loadController('ErrorController');\n\t\t\t\t\n\t\t\t\t// Als development is ingeschakeld, dan de ware error tonen, anders een 404 pagina\n\t\t\t\tif (Config::DEVELOPMENT)\n\t\t\t\t\t$action = self::formatAsAction('missingArguments');\n\t\t\t\telse\n\t\t\t\t\t$action = self::formatAsAction('notFound');\n\t\t\t\t\t\n\t\t\t\t$controller->setAction($action);\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t}\n\t\t\t\n\t\t\t// Try to render the view\n\t\t\ttry {\n\t\t\t\t$controller->render();\n\t\t\t}\n\t\t\tcatch(ViewDoesNotExistException $ex) {\n\t\t\t\t// View bestaat niet\n\t\t\t\t$controller = self::loadController('ErrorController');\n\t\t\t\tif (Config::DEVELOPMENT)\n\t\t\t\t\t$action = self::formatAsAction('invalidView');\n\t\t\t\telse\n\t\t\t\t\t$action = self::formatAsAction('notFound');\n\t\t\t\t\n\t\t\t\t$controller->setAction($action);\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t\t\n\t\t\t\t$controller->render();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch(NoValidTemplateException $ex) {\n\t\t\techo 'Invalid template';\n\t\t}\n\t\tcatch(IsNotControllerException $ex) {\n\t\t\techo 'Controller not found';\n\t\t}\n\t}", "public function init()\r\n { \r\n //date_default_timezone_set('America/Phoenix');\r\n $ajaxContext = $this->_helper->getHelper('AjaxContext');\r\n\t$ajaxContext->addActionContext('list', 'html')\r\n ->addActionContext('edit', 'html')\r\n ->addActionContext('dashboard', 'html')\r\n ->addActionContext('handler', 'html')\r\n ->initContext();\r\n $auth = Zend_Auth::getInstance();\r\n $action = Zend_Controller_Front::getInstance()->getRequest()->getActionName();\r\n $type = $this->getRequest()->getParam('type');\r\n if (!$auth->hasIdentity() && $action!='handler') {\r\n //echo \"THIS IS AN ERROR: \".$action;\r\n $this->_redirect('login', array('UseBaseUrl' => true));\r\n }\r\n }", "public function __construct()\n {\n $this->model = new MainModel();\n $this->params[\"pagination\"][\"totalItemsPerPage\"] = 5;\n view()->share ('controllerName', $this->controllerName);//đặt controllerName cho all action\n }", "public function __construct()\n\t{\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __construct()\n\t{\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function init() {\n $this->_temporizador = new Trf1_Admin_Timer ();\n $this->_temporizador->Inicio();\n\n /* Initialize action controller here */\n $this->view->titleBrowser = 'e-Sisad';\n }", "public function __construct()\n\t{\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "function __construct()\n {\n parent::Controller();\n }", "public function controller()\n\t{\n\t\n\t}", "public function init() {\n\t\t\t\t\t\t$this->view->controller = $this->_request->getParam ( 'controller' );\n\t\t\t\t\t\t$this->view->action = $this->_request->getParam ( 'action' );\n\t\t\t\t\t\t$this->getLibBaseUrl = new Zend_View_Helper_BaseUrl ();\n\t\t\t\t\t\t$this->GetModelOrganize = new Application_Model_ModOrganizeDb ();\n\t\t\t\t\t\t$this->_helper->ajaxContext->addActionContext('deleteOrganisme1','json')->initContext();\n\t\t\t\t\t\t// call function for dynamic sidebar\n\t\t\t\t\t\t$this->_Categories = new Application_Model_ModCatTerm ();\n\t\t\t\t\t\t$parent_id = $this->_getParam ( 'controller' );\n\t\t\t\t\t\t$this->view->secondSideBar = $this->_Categories->showCateParent ( $parent_id );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public function initializeAction() {\t\t\n\t\t$this->contactRepository = t3lib_div::makeInstance('Tx_Addresses_Domain_Repository_ContactRepository');\t\n\t}", "public function init() {\n\t$this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\n\t$this->_helper->acl->allow('public',null);\n\t$this->_helper->contextSwitch()\n\t\t->setAutoDisableLayout(true)\n\t\t->addActionContext('index', array('xml','json'))\n\t\t->addActionContext('mint', array('xml','json'))\n\t\t->initContext();\n }", "public function __construct()\n {\n if (get_called_class() != 'ApplicationController') {\n $this->_set_default_layout();\n $this->_vars = new stdClass();\n $this->_init();\n }\n }", "public function initializeAction() {\n parent::initializeAction();\n $this->umDiv = new Tx_Magenerator_Domain_UserManagement_Div();\n }", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "public function actionInit()\n {\n $this->initRoles($this->roles);\n $this->initPermissions($this->permissions);\n $this->initDependencies($this->dependencies);\n }", "public function getControllerAction() {}", "public function __construct($action = '') {\n\t\t$this->app = Application::app();\n\t\t$this->setAction($action);\n\t}", "function initialize(Controller $controller) {\n $this->controller=&$controller;\n \t}", "public function __construct($controller, $action) {\n parent::__construct($controller, $action);\n $this->loadModel('Baskets');\n $this->loadModel('Orders');\n $this->loadModel('Messages');\n $this->loadModel('Products');\n\n if(Session::exists(BUYER_SESSION_NAME)) {\n $this->view->totalProductInBasket = $this->BasketsModel->countProductInBasket();\n $this->view->totalOrders = $this->OrdersModel->countSentOrder();\n $this->view->msgCount = $this->MessagesModel->unReadMessages();\n } elseif(Session::exists(STORE_SESSION_NAME)) {\n $this->view->msgCount = $this->MessagesModel->unReadMessages();\n $this->view->newOrders = $this->OrdersModel->newOrders(Session::get(STORE_SESSION_NAME));\n }\n\n $this->view->setLayout('details');\n }", "function initialize(Controller $controller) {\n $this->controller = $controller;\n }", "public function __construct() {\n if (isset($_GET['rc'])) {\n $this->url = rtrim($_GET['rc'], '/'); // We don't want no empty arg\n $this->args = explode('/', $this->url);\n }\n \n // Load index controller by default, or first arg if specified\n $controller = ($this->url === null) ? 'null' : array_shift($this->args);\n $this->controllerName = ucfirst($controller);\n\n // Create controller and call method\n $this->route();\n // Make the controller display something\n $this->controllerClass->render();\n }", "public function __construct() {\r\n\t\t\r\n\t\tSession::init();\n\t\tif (!Session::get('local'))\n\t\t\tSession::set('local', DEFAULT_LANGUAGE);\r\n\t\t\r\n\t\t$this->getUrl();\r\n\t\t\r\n\t\t//No controller is specified.\r\n\t\tif (empty($this->url[0])) {\r\n\t\t\t$this->loadDefaultController();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$this->loadCurrentController();\r\n\t\t$this->callControllerMethod();\r\n\r\n\t}", "public function __construct() {\n $this->urlValues = $_GET;\n if (!isset($this->urlValues['c'])) {\n $this->controllerName = \"home\";\n $this->controllerClass = \"HomeController\";\n } else {\n $this->controllerName = strtolower($this->urlValues['c']);\n $this->controllerClass = ucfirst(strtolower($this->urlValues['c'])) . \"Controller\";\n }\n \n if (!isset($this->urlValues['a'])) {\n $this->action = \"index\";\n } else {\n $this->action = $this->urlValues['a']; \n }\n }", "public function preAction() {\n $this->apiBrowser = new ApiBrowser();\n\n $basePath = $this->request->getBasePath();\n $this->namespaceAction = $basePath . '/namespace/';\n $this->classAction = $basePath . '/class/';\n $this->searchAction = $basePath . '/search';\n }", "function __construct($controller, $action)\n {\n global $inflect;\n\n $this->renderPage = true;\n $this->renderHeader = true;\n \t\n\t\t$this->requireUser = false;\n\t\t \n $this->_controller = ucfirst($controller);\n $this->_action = $action;\n \n $model = ucfirst($inflect->singularize($controller));\n $this->$model = new $model;\n\n $this->_template = new Template($controller, $action);\n }", "public function init()\n {\n $this->ctrlModel = new Admin_Model_Acl_ControllersActions();\n $this->dbCtrl = new Admin_Model_DbTable_Acl_ModuleController();\n }", "public function setup_actions() {}", "public function init(){\r\n\t\t$this->_data = $this->_request->getParams();\r\n $controller = $this->_data['controller']; //Get controller\r\n $action = $this->_data['action']; //Get action\r\n \r\n $loadfunction = new Default_Model_Common();\r\n foreach($loadfunction->loadFunction($controller) as $value){\r\n if($action == $value['action']){\r\n $load = new $value['model_load']();\r\n $this->view->$value['varname'] = $load->$value['function_load']();\r\n }\r\n }\r\n\r\n $this->view->lang = Zend_Registry::get(\"lang\"); //load language\r\n \r\n //List menu\r\n $listmenu = Zend_Registry::get(\"listmenu\");\r\n $this->view->listmenu = $listmenu;\r\n \r\n $this->view->selectaccount = ' class=\"selected\"';\r\n }", "function __construct() {\n\t\t\n\t\tparent::__construct();\n\t\t\n\t\t// skip the timestamp check for this app\n\t\tSession::check(true);\n\t\t$this->data[\"showActions\"] = true;\n\t\t$this->data[\"csrfToken\"] = CSRF::generateToken();\n\t\t\n\t}", "abstract public function getControllerAction();", "public function _construct($controller,$view){\r\n $this->controller = $controller;\r\n }", "public function initialize()\n { $model= new \\Yabasi\\ModelController();\n $this->setSchema($model->model());\n $this->setSource(\"notification\");\n }", "protected function __construct() {\n\t\t\tadd_action( 'init', array( $this, 'action__init' ), 11 );\n\t\t}", "public function init()\n {\n $this->ctrlActionModel = new Admin_Model_Acl_ControllersActions();\n $this->dbController = new Admin_Model_DbTable_Acl_ModuleController();\n $this->dbAction = new Admin_Model_DbTable_Acl_Action();\n }", "public function init()\n {\n $this->projectController->init();\n }", "function __construct() {\n\t\t\t$this->register_actions();\t\t\n\t\t\t$this->register_filters();\n\t\t}", "public function __construct() {\n // Call Module constructur\n parent::__construct();\n\n // Add additional route\n $this->_actions['GET']['/people/:id'] = 'people';\n }", "public function initialize()\n {\n $model= new \\Yabasi\\ModelController();\n $this->setSchema($model->model());\n $this->setSource(\"refund\");\n }", "function Controller()\n\t{\t\t\n\t\t$this->method = \"showView\";\n\t\tif (array_key_exists(\"method\", $_REQUEST))\n\t\t\t$this->method = $_REQUEST[\"method\"];\n\t\t\t\t\n\t\t$this->icfTemplating = new IcfTemplating();\n\t\t$this->tpl =& $this->icfTemplating->getTpl();\n\t\t$this->text =& $this->icfTemplating->getText();\t\t\n\t\t$this->controllerMessageArray = array();\n\t\t$this->pageTitle = \"\";\n\t\t$this->dateFormat = DateFormatFactory::getDateFormat();\n\t\t$this->controllerData =& $this->newControllerData();\n\t}", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "function __construct($module,$controller,$action) {\n\t\t$this->action = $action;\n\t\t$this->controller = preg_replace('%Controller$%','',$controller);\n\t\t$this->module = $module;\n\n\t\t$jadeCacheDir = J::path(\"App/Cache/Jade/$this->module/$this->controller\");\n\t\t(is_dir($jadeCacheDir)) || mkdir($jadeCacheDir,0777,true);\n\t\t$this->cacheFile = J::path(\"$jadeCacheDir/$this->action.php\");\n\t\t$this->viewFile = J::path(\"App/Modules/$this->module/Views/$this->controller/$this->action.jade\");\n\t}", "public function __construct()\n {\n $url = $this->getUrl();\n // Look in controllers folder for first value and ucwords(); will capitalise first letter \n if (isset($url[0]) && file_exists('../app/controllers/' . ucwords($url[0]) . '.php')) {\n $this->currentController = ucwords($url[0]); // Setting the current controllers name to the name capitilised first letter\n unset($url[0]); \n }\n\n // Require the controller\n require_once '../app/controllers/' . $this->currentController . '.php';\n // Taking the current controller and instantiating the controller class \n $this->currentController = new $this->currentController;\n // This is checking for the second part of the URL\n if (isset($url[1])) {\n if (method_exists($this->currentController, $url[1])) { // Checking the seond part of the url which is the corresponding method from the controller class\n $this->currentMethod = $url[1];\n unset($url[1]);\n }\n }\n\n // Get params, if no params, keep it empty\n $this->params = $url ? array_values($url) : []; \n\n // Call a callback with array of params\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->view = new ViewController();\t\t\n\t}", "public function __construct()\n {\n $this->controller = new Controller;\n $this->error_message = 'bad request or duplicate data';\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }" ]
[ "0.89566046", "0.89566046", "0.82057846", "0.80040884", "0.80040884", "0.8004028", "0.7928566", "0.7802862", "0.7750365", "0.7750365", "0.7750365", "0.7750365", "0.7750365", "0.7741994", "0.76497424", "0.7542271", "0.7541656", "0.7458589", "0.7430627", "0.7382884", "0.73493266", "0.73307425", "0.7321889", "0.73055863", "0.7295852", "0.7274981", "0.72531754", "0.7246773", "0.7212456", "0.72057885", "0.71661454", "0.71535975", "0.7130195", "0.7116122", "0.70873964", "0.7080964", "0.7078719", "0.70654655", "0.7053619", "0.7048942", "0.7036025", "0.7028192", "0.6996098", "0.69914645", "0.6983108", "0.69822043", "0.6978827", "0.69710267", "0.69653803", "0.6934731", "0.69341296", "0.6926329", "0.692468", "0.69113386", "0.6909758", "0.6896174", "0.68904704", "0.6874338", "0.68700373", "0.68700373", "0.6862786", "0.6847179", "0.6844484", "0.68443036", "0.68056643", "0.6804595", "0.68018633", "0.67917275", "0.6769771", "0.676602", "0.6765842", "0.67582476", "0.67257833", "0.6721477", "0.6721169", "0.67196625", "0.67082113", "0.6707143", "0.6706214", "0.67023355", "0.6700337", "0.669937", "0.6695276", "0.66930395", "0.6692887", "0.6688026", "0.66866106", "0.66839683", "0.6674853", "0.6667438", "0.6658782", "0.66509074", "0.6642763", "0.66400504", "0.6634305", "0.6610988", "0.6610453", "0.66071516", "0.66062886", "0.6600459", "0.6599095" ]
0.0
-1
/ page mobilisateur/addmobilisateur Ajout d'une mobilisateur
public function addmobilisateurindexAction() { $sessionmcnp = new Zend_Session_Namespace('mcnp'); //$this->_helper->layout->disableLayout(); $this->_helper->layout()->setLayout('layoutpublicesmc'); if (isset($_POST['ok']) && $_POST['ok'] == "ok") { if (isset($_POST['code_membre']) && $_POST['code_membre'] != "") { $request = $this->getRequest(); if ($request->isPost ()) { $db = Zend_Db_Table::getDefaultAdapter(); $db->beginTransaction(); try { /////////////////////////////////////controle code membre if(isset($_POST['code_membre']) && $_POST['code_membre']!=""){ if(strlen($_POST['code_membre']) != 20) { $db->rollback(); $sessionmcnp->error = "Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci..."; //$this->_redirect('/mobilisateur/addmobilisateurindex'); return; }else{ if(substr($_POST['code_membre'], -1, 1) == 'P'){ $membre = new Application_Model_EuMembre(); $membre_mapper = new Application_Model_EuMembreMapper(); $membre_mapper->find($_POST['code_membre'], $membre); if(count($membre) == 0){ $db->rollback(); $sessionmcnp->error = "Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ..."; //$this->_redirect('/mobilisateur/addmobilisateurindex'); return; } }else if(substr($_POST['code_membre'], -1, 1) == 'M'){ $membremorale = new Application_Model_EuMembreMorale(); $membremorale_mapper = new Application_Model_EuMembreMoraleMapper(); $membremorale_mapper->find($_POST['code_membre'], $membremorale); if(count($membremorale) == 0){ $db->rollback(); $sessionmcnp->error = "Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ..."; //$this->_redirect('/mobilisateur/addmobilisateurindex'); return; } } } $date_id = new Zend_Date(Zend_Date::ISO_8601); $mobilisateur = new Application_Model_EuMobilisateur(); $m_mobilisateur = new Application_Model_EuMobilisateurMapper(); $id_mobilisateur = $m_mobilisateur->findConuter() + 1; $mobilisateur->setId_mobilisateur($id_mobilisateur); $mobilisateur->setCode_membre($_POST['code_membre']); $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss')); $mobilisateur->setId_utilisateur(0); $mobilisateur->setEtat(1); $m_mobilisateur->save($mobilisateur); //////////////////////////////////////////////////////////////////////////////// $db->commit(); $sessionmcnp->error = "Operation bien effectuee ..."; $this->_redirect('/mobilisateur/addmobilisateurindex'); }else{ $db->rollback(); $sessionmcnp->error = "Veuillez renseigner le Code Membre ..."; } } catch (Exception $exc) { $db->rollback(); $sessionmcnp->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); return; } } } else { $sessionmcnp->error = "Champs * obligatoire"; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addmobilisateurAction() {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembre->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/listmobilisateur');\n \n } catch (Exception $exc) { \n $db->rollback();\n $this->view->message = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $this->view->error = \"Champs * obligatoire\";\n }\n }\n }", "public function etatmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function addmobilisateurintegrateurAction() {\n $sessionmembreasso = new Zend_Session_Namespace('membreasso');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcint');\n if (!isset($sessionmembreasso->login)) {$this->_redirect('/integrateur/login');}\n\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\n/////////////////////////////////////controle code membre\nif(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\nif(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n}else{\nif(substr($_POST['code_membre'], -1, 1) == 'P'){\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0){\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }else if(substr($_POST['code_membre'], -1, 1) == 'M'){\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0){\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n}\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembreasso->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n}else{\n $db->rollback();\n $sessionmembreasso->error = \"Veuillez renseigner le Code Membre ...\";\n\n} \n } catch (Exception $exc) { \n $db->rollback();\n $sessionmembreasso->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionmembreasso->error = \"Champs * obligatoire\";\n }\n }\n }", "public function addmobilisateuradminAction() {\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');}\n if($sessionutilisateur->confirmation != \"\") {$this->_redirect('/administration/confirmation');}\n\n\n\n if(isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if(isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if($request->isPost()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n /////////////////////////////////////controle code membre\n if(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\n if(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n } else {\n if(substr($_POST['code_membre'], -1, 1) == 'P') {\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n } else if(substr($_POST['code_membre'], -1, 1) == 'M') {\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n }\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n ////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionutilisateur->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateuradmin');\n } else {\n $db->rollback();\n $sessionutilisateur->error = \"Veuillez renseigner le Code Membre ...\";\n } \n } catch(Exception $exc) { \n $db->rollback();\n $sessionutilisateur->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionutilisateur->error = \"Champs * obligatoire\";\n }\n }\n }", "public function suppmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if ($id > 0) {\n\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->delete($id);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function add() {\n\n if (isset($_POST['valider'])) {\n \n extract($_POST);\n $data['ok'] = 0;\n \n if (!empty($_POST)) {\n\n $clientM = new ClientMoral();\n $clientMoralRepository = new ClientMoralRepository();\n \n $clientM->setNom($_POST['nom']);\n $clientM->setRaisonSociale($_POST['raisonSociale']);\n $clientM->setAdresse($_POST['adresse']);\n $clientM->setTel($_POST['tel']);\n $clientM->setEmail($_POST['email']);\n $clientM->setNinea($_POST['ninea']);\n $clientM->setRegiscom($_POST['registreCommerce']);\n \n\n $data['ok'] = $clientMoralRepository->add($clientM);\n }\n return $this->view->load(\"clientMoral/ajout\", $data);\n }\n else {\n return $this->view->load(\"clientMoral/ajout\");\n }\n }", "public function add_post(){\n $response = $this->BayiM->add(\n $this->post('iduser'),\n $this->post('nama'),\n $this->post('gender')\n );\n $this->response($response);\n }", "public function etatmobilisateuradminAction()\n {\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 $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateuradmin');\n }", "function alta_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->fecha_alta=date(\"Y-m-d\");\n\t\t$u->estatus_general_id=1;\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 registrado los datos de la Unidad de Medida.\\\"); 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 membre(){\n\n\t\t$user_id = Input::get('user_id');\n\n\t\t$redirectTo = ( $user_id ? 'admin/users/'.$user_id : 'admin/adresses/'.Input::get('adresse_id') );\n\n if( $this->adresse->addMembre(Input::get('membre_id') , Input::get('adresse_id')) )\n {\n return Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'L\\'appartenance comme membre a été ajouté') );\n }\n\n return Redirect::to($redirectTo)->with( array('status' => 'danger' , 'message' => 'L\\'utilisateur à déjà l\\'appartenance comme membre') );\n\n\t}", "function add()\n {\n if($this->acceso(15)){\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'reunion_id' => $this->input->post('reunion_id'),\n 'usuario_id' => $this->input->post('usuario_id'),\n 'multa_monto' => $this->input->post('multa_monto'),\n 'multa_fecha' => $this->input->post('multa_fecha'),\n 'multa_hora' => $this->input->post('multa_hora'),\n 'multa_detalle' => $this->input->post('multa_detalle'),\n 'multa_numrec' => $this->input->post('multa_numrec'),\n );\n $multa_id = $this->Multa_model->add_multa($params);\n redirect('multa/index');\n }\n else\n {\n $this->load->model('Reunion_model');\n $data['all_reunion'] = $this->Reunion_model->get_all_reunion();\n\n $this->load->model('Usuario_model');\n $data['all_usuario'] = $this->Usuario_model->get_all_usuario();\n\n $data['_view'] = 'multa/add';\n $this->load->view('layouts/main',$data);\n }\n }\n }", "public function store(MobiliariosRequest $request)\n {\n Bitacoras::bitacora(\"Registro de nuevo mobiliario: \".$request['nombre']);\n $mobiliario = new Mobiliarios;\n $mobiliario->codigo = $request->codigo;\n $mobiliario->nombre= $request->nombre;\n $mobiliario->fecha_compra= $request->fecha_compra;\n $mobiliario->precio= $request->precio;\n $mobiliario->descripcion =$request->descripcion;\n $mobiliario->estado = $request->estado;\n $mobiliario->nuevo = $request->nuevo;\n if($request->nuevo == 1){\n $mobiliario->anios=null;\n }else\n {\n if($request->anios == '' && $request->anios2 != ''){\n $mobiliario->anios = $request->anios2;\n }else{\n $mobiliario->anios = $request->anios;\n }\n }\n $mobiliario->proveedor_id = $request->proveedor_id;\n $mobiliario->tipo_id = $request->tipo_id;\n $mobiliario->credito = $request->credito;\n $mobiliario->iva=$request->iva;\n if($request->credito == 0 )\n {\n $mobiliario->interes=null;\n $mobiliario->num_cuotas=null;\n $mobiliario->val_cuotas=null;\n $mobiliario->tiempo_pago=null;\n $mobiliario->cuenta=null;\n }else\n {\n $mobiliario->interes= $request->interes;\n $mobiliario->num_cuotas= $request->num_cuotas;\n $mobiliario->val_cuotas= $request->val_cuotas;\n $mobiliario->tiempo_pago= $request->tiempo_pago;\n $mobiliario->cuenta= $request->cuenta;\n }\n\n $mobiliario->save();\n return redirect('/mobiliarios')->with('mensaje','Registro Guardado');\n }", "public function add_post()\n {\n $response = $this->UserM->add_user(\n $this->post('email'),\n $this->post('nama'),\n $this->post('nohp'),\n $this->post('pekerjaan')\n );\n $this->response($response);\n }", "function adminadduser()\n {\n //Check Login\n if ($this->cek_login() != true) {\n return redirect()->to(base_url('login'));\n }\n //Check Role\n if ($this->cek_role() != true) {\n return redirect()->to(base_url('login'));\n }\n $email = $this->request->getPost('email_add');\n $email = esc($email);\n $password = $this->request->getPost('password_add');\n $password = esc($password);\n $name = $this->request->getPost('name_add');\n $name = esc($name);\n $birthdate = $this->request->getPost('birthdate_add');\n $role = $this->request->getPost('role_add');\n $link_foto = '';\n\n $addresult = $this->user_model->addUser($email, $password, $name, $birthdate, $role, $link_foto);\n if ($addresult) {\n session()->setFlashdata('sekolah.project_uas.success', 'User created successfully');\n return redirect()->to(base_url('adminuser'));\n } else {\n //kalo gagal ngapain\n session()->setFlashdata('sekolah.project_uas.fail', 'User cannot created');\n return redirect()->to(base_url('adminuser'));\n }\n }", "public function create(){\n\t\t$this->autenticate();\n\t\t$user_id = $_POST['id'];\n\t\t$nombre = \"'\".$_POST['nombre'].\"'\";\n\t\t$cedula = \"'\".$_POST['cedula'].\"'\";\n\t\t$nacimiento = \"'2000/1/1'\"; //fecha de nacimiento default, despues el mismo usuario la puede editar\n\t\trequire_once(\"../app/models/administrativo.php\");//conexion entre los controladores\n\t\t$administrativo=new Administrativo();// crea el perfil administrativo vacio\n\t\t$administrativo->new($nombre,$cedula,$nacimiento); // inserta la informacion antes ingresada en la base de datos\n\t\t$administrativo_id = $administrativo->where(\"cedula\",$cedula); // se trae el perfil administrativo recien creado con la cedula\n\t\t$administrativo_id = $administrativo_id[0][\"id\"];\n\t\t$administrativo->attach_user($user_id,$administrativo_id); // amarra el usuario a su nuevo perfil docente\n\t\t$administrativo_id = strval($user_id);//convierte el user_id de entero a string\n\t\theader(\"Location: http://localhost:8000/usuarios/show/$user_id\");\n\t\texit;\n\t\t$this->view('administrativos/index', []);\n\t}", "public function add() {\n if (isAuthorized('utilisateurs', 'add')) :\n $this->Utilisateur->Societe->recursive = -1;\n $societe = $this->Utilisateur->Societe->find('list',array('fields' => array('id', 'NOM'),'order'=>array('NOM'=>'asc')));\n $ObjEntites = new EntitesController(); \n $ObjAssoentiteutilisateurs = new AssoentiteutilisateursController(); \n $cercles = $ObjEntites->find_list_all_cercle();\n $this->set(compact('societe','cercles'));\n $matinformatique = array(); \n $activites = array(); \n $utilisateurs = array();\n $outils = array();\n $listediffusions = array();\n $partages = array();\n $etats = array();\n $this->set(compact('matinformatique','activites','utilisateurs','outils','listediffusions','partages','etats'));\n if ($this->request->is('post')) :\n if (isset($this->params['data']['cancel'])) :\n $this->Utilisateur->validate = array();\n $this->History->goBack(1);\n else: \n $this->Utilisateur->create();\n $this->request->data['Utilisateur']['NEW']=1;\n if ($this->Utilisateur->save($this->request->data)) {\n $lastid = $this->Utilisateur->getLastInsertID();\n $utilisateur = $this->Utilisateur->find('first',array('conditions'=>array('Utilisateur.id'=>$lastid),'recursive'=>0));\n if($utilisateur['Utilisateur']['profil_id']>0 || $utilisateur['Utilisateur']['profil_id']==-2):\n $this->sendmailnewutilisateur($utilisateur);\n endif;\n $this->addnewaction($lastid);\n $entite_id = $this->request->data['Utilisateur']['entite_id'];\n $ObjAssoentiteutilisateurs->silent_save($entite_id,$lastid);\n $this->save_history($lastid, \"Utilisateur créé\"); \n $this->Session->setFlash(__('Utilisateur sauvegardé',true),'flash_success');\n $this->History->goBack(1);\n } else {\n $this->Session->setFlash(__('Utilisateur incorrect, veuillez corriger l\\'utilisateur',true),'flash_failure');\n }\n endif;\n endif;\n else :\n $this->Session->setFlash(__('Action non autorisée, veuillez contacter l\\'administrateur.',true),'flash_warning');\n throw new UnauthorizedException(\"Vous n'êtes pas autorisé à utiliser cette fonctionnalité de l'outil\");\n endif; \n }", "public function addUmpireAction() {\n\t\t// Création du formulaire\n\t\t$oUmpire = new Umpire;\n\t\t$oForm = $this->createForm(new UmpireType(), $oUmpire);\n\n\t\t// Traitement du formulaire\n\t\t$oFormHandler = new UmpireHandler($oForm, $this->get('request'), $this->getDoctrine()->getEntityManager());\n\t\tif ($oFormHandler->process()) {\n\t\t\treturn $this->redirect($this->generateUrl('Umpires'));\n\t\t}\n\n\t\treturn $this->render('YBTournamentBundle:Umpire:form_create.html.twig', array('form' => $oForm->createView()));\n\t}", "function newuser(){\n\t\t\tif(!empty($_POST['newemail']) && !empty($_POST['newpassword']) && !empty($_POST['newnombre']) && !empty($_POST['newpoblacion']) && !empty($_POST['newrol'])){\n\t\t\t\t$poblacion = filter_input(INPUT_POST,'newpoblacion',FILTER_SANITIZE_STRING);\n\t\t\t\t$nombre = filter_input(INPUT_POST,'newnombre',FILTER_SANITIZE_STRING);\n\t\t\t\t$password = filter_input(INPUT_POST,'newpassword',FILTER_SANITIZE_STRING);\n\t\t\t\t$email = filter_input(INPUT_POST,'newemail',FILTER_SANITIZE_STRING);\n\t\t\t\t$rol = filter_input(INPUT_POST,'newrol',FILTER_SANITIZE_STRING);\n\t\t\t\t$list = $this -> model -> adduser($nombre,$password,$email,$poblacion,$rol);\n \t\t$this -> ajax_set(array('redirect'=>APP_W.'admin'));\n\t\t\t}\n\t\t}", "public function ajouter() {\n $this->loadView('ajouter', 'content');\n $arr = $this->em->selectAll('client');\n $optionsClient = '';\n foreach ($arr as $entity) {\n $optionsClient .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNomFamille() . '</option>';\n }\n $this->loadHtml($optionsClient, 'clients');\n $arr = $this->em->selectAll('compteur');\n $optionsCompteur = '';\n foreach ($arr as $entity) {\n $optionsCompteur .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNumero() . '</option>';\n }\n $this->loadHtml($optionsCompteur, 'compteurs');\n if(isset($this->post->numero)){\n $abonnement = new Abonnement($this->post);\n $this->em->save($abonnement);\n $this->handleStatus('Abonnement ajouté avec succès.');\n }\n }", "public function addMo()\n\t{\n\t\n\t\t$this->Checklogin();\n\t\tif (isset($_POST ['btnSubmit']))\n\t\t{\n\t\n\t\t\t$data ['admin_section']='MO';\n\t\t\t$id=$this->setting_model->addMo();\n\t\t\tif ($id)\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Mobile has been added successfully.');\n\t\t\t\tredirect('admin/setting/moRegistration');\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Unable to save mobile.');\n\t\t\t\tredirect('admin/setting/moRegistration');\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\tredirect('admin/setting/moRegistration');\n\t\t}\n\t\n\t}", "public function add(){\n if (isset($_SESSION['identity'])) {// Comprobamos que hay un usuario logueado\n $usuario_id = $_SESSION['identity']->id;// Obtenemos el ID del Usuario logueado\n $sProvincia = isset($_POST['province']) ? $_POST['province'] : false;\n $sLocalidad = isset($_POST['location']) ? $_POST['location'] : false;\n $sDireccion = isset($_POST['address']) ? $_POST['address'] : false;\n\n $stats = Utils::statsCarrito();\n $coste = $stats['total'];// Obtenemos el coste total del pedido\n\n\n if ($sProvincia && $sLocalidad && $sDireccion){\n // Guardar datos en bd\n $oPedido = new Pedido();\n $oPedido->setUsuarioId($usuario_id);\n $oPedido->setProvincia($sProvincia);\n $oPedido->setLocalidad($sLocalidad);\n $oPedido->setDireccion($sDireccion);\n $oPedido->setCoste($coste);\n\n $save = $oPedido->savePedido();// Insertamos el Pedido en BD\n\n // Guardar Linea Pedido\n $save_linea = $oPedido->save_linea();\n\n if ($save && $save_linea){// Comprobamos que La inserccion a sido correcta\n $_SESSION['pedido'] = \"complete\";\n }else{\n $_SESSION['pedido'] = \"failed\";\n }\n }else{\n $_SESSION['pedido'] = \"failed\";\n\n }\n header(\"Location:\" . base_url .'pedido/confirmado');\n }else{\n // Redirigir al Index\n header(\"Location:\" . base_url);\n }\n }", "public function NewMobidul ()\n {\n \\Log::info(\"New Mobidul begin!\");\n\n $request = Request::instance();\n $content = $request->getContent();\n\n $json = json_decode($content);\n $code = $json->code;\n $name = $json->name;\n $mode = $json->mode;\n\n $description = isset($json->description)\n ? $json->description\n : 'Ein tolles Mobidul entsteht hier.';\n\n //check if mobidul code is a protected key word\n if ( $this->isMobidulCodeProtected($code) )\n return $response = [\n 'success' => false,\n 'msg' => 'WSC_MOBIDUL_PROTECTED'\n ];\n\n\n if ( ! Mobidul::HasMobidulId($code) )\n {\n \\Log::info(\"Mobidul gets created!\");\n\n $mobidul = Mobidul::create(\n [\n 'name' => $name,\n 'code' => $code,\n 'description' => $description,\n 'mode' => $mode\n ]);\n\n $userId = Auth::id();\n //$category = Category::create(['name' => 'Allgemein', 'mobidulId' => $mobidul->id]);\n\n DB::table('user2mobidul')->insert(\n [\n 'userId' => $userId,\n 'mobidulId' => $mobidul->id,\n 'rights' => 1\n ]);\n\n\n return $response = [\n 'success' => true,\n 'msg' => 'WSC_MOBIDUL_SUCCESS',\n 'code' => $code\n ];\n }\n else\n return $response = [\n 'success' => false,\n 'msg' => 'WSC_MOBIDUL_IN_USE'\n ];\n }", "private function insertUser(){\n\t\t$data['tipoUsuario'] = Seguridad::getTipo();\n\t\tView::show(\"user/insertForm\", $data);\n\t}", "public function add(){\n $data = array(\n \"user_nim\" => $this->input->post('user_nim'),\n \"user_fullname\" => $this->input->post('user_fullname'),\n \"user_password\" => md5($this->input->post('user_password')),\n \"user_email\" => $this->input->post('user_email'),\n \"user_semester\" => $this->input->post('user_semester'),\n \"user_level\" => $this->input->post('user_level'),\n \"user_aktif\" => $this->input->post('user_aktif'),\n \"user_creator\" => $this->session->userdata('nim')\n );\n \n $this->db->insert('tbl_users', $data); // Untuk mengeksekusi perintah insert data\n }", "function act_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 de la Unidad de Medida.\\\"); 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 ajoutauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t$this->_ctrlAuteur->auteurAjoute();\n\t}", "public function action_add(){\n\t\t$monumentId = $this->request->param('id');\n\t\t$user = Auth::instance()->get_user();\n\t\t\n\t\t// Add the monument to the favorite list of the current user\n\t\t$favoriteList = new Model_List_Favorite();\t\t\n\t\t$favoriteList->add($monumentId, $user->UserID);\n\t\t\n\t\t// Redirect the user back to the monument page\n\t\t$this->request->redirect('monument/view/' . $monumentId);\n\t}", "public function add() {\r\n\t\t// init view variables\r\n\t\t// ---\r\n\t\t\r\n\t\t// receive userright token\r\n\t\t$urtoken\t= $this->MediawikiAPI->mw_getUserrightToken()->query->tokens->userrightstoken;\r\n\t\t$this->set( 'urtoken', $urtoken );\r\n\t\t\r\n\t\t// receive usergrouplist\r\n\t\t$ugroups\t\t= $this->Users->Groups->find( 'all' )->all()->toArray();\r\n\t\t$this->set( 'ugroups', $ugroups );\r\n\t\t\r\n\t\tif( $this->request->is( 'post' ) ) {\r\n\t\t\t// required fields empty?\r\n\t\t\tif( empty( $this->request->data[\"username\"] ) || empty( $this->request->data[\"email\"] ) ) {\r\n\t\t\t\t$this->set( 'notice', 'Es wurden nicht alle Pflichtfelder ausgefüllt. Pflichtfelder sind all jene Felder die kein (optional) Vermerk tragen.' );\r\n\t\t\t\t$this->set( 'cssInfobox', 'danger' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// usergroups\r\n\t\t\t$addGroups\t\t= '';\r\n\t\t\t\t\t\t\r\n\t\t\tforeach( $this->request->data[\"group\"] as $grpname => $grpvalue ) {\r\n\t\t\t\tif( $grpvalue == true ) {\r\n\t\t\t\t\t$addGroups\t.= $grpname . '|';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$addGroups\t\t= substr( $addGroups, 0, -1 );\r\n\t\t\t\r\n\t\t\t// create new mediawiki user\t\t\t\r\n\t\t\t$result\t\t= $this->create(\r\n\t\t\t\t$this->request->data[\"username\"],\r\n\t\t\t\t$this->request->data[\"email\"],\r\n\t\t\t\t$this->request->data[\"realname\"],\r\n\t\t\t\t$addGroups,\r\n\t\t\t\t'',\r\n\t\t\t\t$this->request->data[\"urtoken\"],\r\n\t\t\t\t$this->request->data[\"mailsender\"],\r\n\t\t\t\t$this->request->data[\"mailsubject\"],\r\n\t\t\t\t$this->request->data[\"mailtext\"]\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( $result != 'Success' ) {\r\n\t\t\t\t$this->set( 'notice', 'Beim Anlegen des Benutzer_inaccounts ist ein Fehler aufgetreten.</p><p>' . $result );\r\n\t\t\t\t$this->set( 'cssInfobox', 'danger' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->set( 'notice', 'Der / Die Benutzer_in wurde erfolgreich angelegt. Er / Sie wurde via E-Mail informiert.' );\r\n\t\t\t$this->set( 'cssInfobox', 'success' );\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// set view variables\r\n\t\t$this->set( 'notice', '' );\r\n\t\t$this->set( 'cssInfobox', '' );\r\n\t}", "public function addAction(){\n\t\t\t$emp = new Empresa();\n\t\t\t//cargamos el objeto mediantes los metodos setters\n\t\t\t$emp->id = '0';\n\t\t\t$emp->nombre_empresa = $this->getPostParam(\"nombre_empresa\");\n\t\t\t$emp->nit = $this->getPostParam(\"nit\");\n\t\t\t$emp->direccion = $this->getPostParam(\"direccion\");\n\t\t\t$emp->logo = $this->getPostParam(\"imagen\");\n\t\t\t$emp->regimen_id = $this->getPostParam(\"regimen_id\");\n\t\t\t\t\t\t\t\t\n\t\t\tif($emp->save()){\n\t\t\t\tFlash::success(\"Se insertó correctamente el registro\");\n\t\t\t\tprint(\"<script>document.location.replace(\".core::getInstancePath().\"'empresa/mostrar/$emp->id');</script>\");\n\t\t\t}else{\n\t\t\t\tFlash::error(\"Error: No se pudo insertar registro\");\t\n\t\t\t}\n\t\t\t\t\t\n\t }", "public function add() {\n if ($_POST){\n \n $username = filter_input(INPUT_POST, 'username');\n $password = filter_input(INPUT_POST, 'password');\n $password2 = filter_input(INPUT_POST, 'password2');\n $fullname = filter_input(INPUT_POST, 'fullname');\n $email = filter_input(INPUT_POST, 'email');\n \n if (!preg_match('/^[a-z0-9]{4,}$/', $username) or !preg_match('/[A-z 0-9\\-]+$/', $fullname) or $email == '' or $password != $password2) {\n $this->setData('message', 'Podaci nisu tačno uneti.');\n } else {\n $passwordHash = hash('sha512', $password . Configuration::SALT);\n $res = HomeModel::add($username, $passwordHash , $fullname, $email);\n if ($res){\n Misc::redirect('successfull_registration');\n } else {\n $this->setData('message', 'Došlo je do greške prilikom dodavanja. Korisničko ime je verovatno zauzeto.');\n }\n } \n }\n }", "public function add()\n {\n $data = [\n 'NamaMusyrif' => $this->input->post('nama_musyrif'),\n 'Email' => $this->input->post('email'),\n 'NoHp' => $this->input->post('no_hp'),\n ];\n $this->Musyrif_M->addMusyrif($data);\n $this->session->set_flashdata('pesan', 'Berhasil ditambahkan!');\n redirect('musyrif');\n }", "function add() {\n\t\t$this->account();\n\t\tif (!empty($this->data)) {\n\t\t\t$this->Album->create();\n $data['Album'] = $this->data['Album'];\n\t\t\t$data['Album']['images']=$_POST['userfile'];\n\t\t\tif ($this->Album->save($data['Album'])){\n\t\t\t\t$this->Session->setFlash(__('Thêm mới danh mục thành công', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Thêm mơi danh mục thất bại. Vui long thử lại', true));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function actionRegister()\n {\n $this->view->title = DetailesForm::TITLE_REGISTER_FORM;\n $model = new UserInfo();\n $items = DetailesForm ::getItems();\n if (Yii::$app->request->post()) {\n $data = Yii::$app->request->post();\n $resultSave = UserInfo::setSave($model , $data);\n if ($resultSave->success)\n {\n Yii::$app->session->setFlash('success', 'ثبت با موفقیت انجام شد');\n $this->redirect( Url::to(['view','id'=> $resultSave->result['id']] ));\n }\n elseif (!$resultSave->success && !empty($resultSave->message))\n {\n $msg = '';\n foreach ($resultSave->message as $text)\n {\n $msg .= $text . \"<br>\";\n }\n Yii::$app->session->setFlash('danger', $msg);\n }\n else\n Yii::$app->session->setFlash('danger', 'عملیات ناموفق به پایین رسید');\n }\n\n return $this->render('_form',\n [\n 'model' => $model,\n 'items' => $items,\n ]);\n\n }", "private function ajoutuser() {\n\t\t$this->_ctrlAdmin = new ControleurAdmin();\n\t\t$this->_ctrlAdmin->userAjout();\n\t}", "public function agregar_usuario_controlador()\n {\n $nombres = strtoupper(mainModel::limpiar_cadena($_POST['usu_nombres_reg']));\n $apellidos = strtoupper(mainModel::limpiar_cadena($_POST['usu_apellidos_reg']));\n $identidad=mainModel::limpiar_cadena($_POST['usu_identidad_reg']);\n $puesto=mainModel::limpiar_cadena($_POST['usu_puesto_reg']);\n $unidad=mainModel::limpiar_cadena($_POST['usu_unidad_reg']);\n $rol = mainModel::limpiar_cadena($_POST['usu_rol_reg']);\n $celular = mainModel::limpiar_cadena($_POST['usu_celular_reg']);\n $usuario = strtolower(mainModel::limpiar_cadena($_POST['usu_usuario_reg']));\n $email=$usuario . '@didadpol.gob.hn' ;\n\n\n /*comprobar campos vacios*/\n if ($nombres == \"\" || $apellidos == \"\" || $usuario == \"\" || $email == \"\" || $rol == \"\" || $identidad == \"\" || $puesto == \"\" || $unidad == \"\") {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO HAS COMPLETADO TODOS LOS CAMPOS QUE SON OBLIGATORIOS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n if (mainModel::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $nombres)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRES SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if (mainModel::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $apellidos)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO APELLIDOS SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if ($celular != \"\") {\n if (mainModel::verificar_datos(\"[0-9]{8}\", $celular)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE CELULAR NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n if (mainModel::verificar_datos(\"[0-9]{13}\", $identidad)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE IDENTIDAD NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar DNI*/\n $check_dni = mainModel::ejecutar_consulta_simple(\"SELECT identidad FROM tbl_usuarios WHERE identidad='$identidad'\");\n if ($check_dni->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE IDENTIDAD YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n if (mainModel::verificar_datos(\"[a-z]{3,15}\", $usuario)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRE DE USUARIO SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 5 Y UN MAXIMO DE 15 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n /*validar usuario*/\n $check_user = mainModel::ejecutar_consulta_simple(\"SELECT nom_usuario FROM tbl_usuarios WHERE nom_usuario='$usuario'\");\n if ($check_user->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL USUARIO YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar email*/\n\n \n $caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n $pass = \"\";\n for ($i = 0; $i < 8; $i++) {\n $pass .= substr($caracteres, rand(0, 64), 1);\n }\n $message = \"<html><body><p>Hola, \" . $nombres . \" \" . $apellidos;\n $message .= \" Estas son tus credenciales para ingresar al sistema de DIDADPOL\";\n $message .= \"</p><p>Usuario: \" . $usuario;\n $message .= \"</p><p>Correo: \" . $email;\n $message .= \"</p><p>Contraseña: \" . $pass;\n $message .= \"</p><p>Inicie sesión aquí para cambiar la contraseña por defecto \" . SERVERURL . \"login\";\n $message .= \"<p></body></html>\";\n\n $res = mainModel::enviar_correo($message, $nombres, $apellidos, $email);\n if (!$res) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE ENVIÓ CORREO ELECTRÓNICO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n $passcifrado = mainModel::encryption($pass);\n\n $datos_usuario_reg = [\n \"rol\" => $rol,\n \"puesto\"=>$puesto,\n \"unidad\"=>$unidad,\n \"usuario\" => $usuario,\n \"nombres\" => $nombres,\n \"apellidos\" => $apellidos,\n \"dni\"=>$identidad,\n \"clave\" => $passcifrado,\n \"estado\" => \"NUEVO\",\n \"email\" => $email,\n \"celular\" => $celular\n ];\n $agregar_usuario = usuarioModelo::agregar_usuario_modelo($datos_usuario_reg);\n if ($agregar_usuario->rowCount() == 1) {\n $alerta = [\n \"Alerta\" => \"limpiar\",\n \"Titulo\" => \"USUARIO REGISTRADO\",\n \"Texto\" => \"LOS DATOS DEL USUARIO SE HAN REGISTRADO CON ÉXITO\",\n \"Tipo\" => \"success\"\n ];\n } else {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE HA PODIDO REGISTRAR EL USUARIO\",\n \"Tipo\" => \"error\"\n ];\n }\n echo json_encode($alerta);\n }", "public function crearUsuario() {\n\n\n if ($this->seguridad->esAdmin()) {\n $id = $this->usuario->getLastId();\n $usuario = $_REQUEST[\"usuario\"];\n $contrasenya = $_REQUEST[\"contrasenya\"];\n $email = $_REQUEST[\"email\"];\n $nombre = $_REQUEST[\"nombre\"];\n $apellido1 = $_REQUEST[\"apellido1\"];\n $apellido2 = $_REQUEST[\"apellido2\"];\n $dni = $_REQUEST[\"dni\"];\n $imagen = $_FILES[\"imagen\"];\n $borrado = 'no';\n if (isset($_REQUEST[\"roles\"])) {\n $roles = $_REQUEST[\"roles\"];\n } else {\n $roles = array(\"2\");\n }\n\n if ($this->usuario->add($id,$usuario,$contrasenya,$email,$nombre,$apellido1,$apellido2,$dni,$imagen,$borrado,$roles) > 1) {\n $this->perfil($id);\n } else {\n echo \"<script>\n i=5;\n setInterval(function() {\n if (i==0) {\n location.href='index.php';\n }\n document.body.innerHTML = 'Ha ocurrido un error. Redireccionando en ' + i;\n i--;\n },1000);\n </script>\";\n } \n } else {\n $this->gestionReservas();\n }\n \n }", "public function actionaddUniquePhone()\n\t{\n\t\t\n\t\tif($this->isAjaxRequest())\n\t\t{\n\t\t\tif(isset($_POST['userphoneNumber'])) \n\t\t\t{\n\t\t\t\t$sessionArray['loginId']=Yii::app()->session['loginId'];\n\t\t\t\t$sessionArray['userId']=Yii::app()->session['userId'];\n\t\t\t\t$loginObj=new Login();\n\t\t\t\t$total=$loginObj->gettotalPhone($sessionArray['userId'],1);\n\t\t\t\tif($total > 1)\n\t\t\t\t{\n\t\t\t\t\techo \"Limit Exist!\";\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t$totalUnverifiedPhone=$loginObj->gettotalUnverifiedPhone($sessionArray['userId'],1);\n\t\t\t\tif($totalUnverifiedPhone==1)\n\t\t\t\t{\n\t\t\t\t\techo \"Please first verify unverified phone.\";\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$result=$loginObj->addPhone($_POST,1,$sessionArray);\n\t\t\t\t\n\t\t\t\tif($result['status']==0)\n\t\t\t\t{\n\t\t\t\t\techo \"success\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo $result['message']; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->render(\"/site/error\");\n\t\t}\n\t}", "public function add()\n {\n $data=$this->M_mtk->add();\n echo json_encode($data);\n }", "function ajax_add()\n {\n\tif ($this->form_validation->run($this, 'users') == TRUE) {\n\t //get data from post\n\t $data = $this->_get_data_from_post();\n\t $return = [];\n\t //$data['photo'] = Modules::run('upload_manager/upload','image');\n\n\t $return['status'] = $this->mdl_users->_insert($data) ? TRUE : FALSE;\n\t $return['msg'] = $data['status'] ? NULL : 'An error occured trying to insert data please try again';\n\t $return['node'] = [\n\t\t'users' => $data['users'],\n\t\t'slug' => $data['users_slug'],\n\t\t'id' => $this->db->insert_id()\n\t ];\n\n\n\t echo json_encode($return);\n\t}\n }", "public function addAction()\n {\n $form = new RobotForm;\n $user = Users::findFirst($this->session->get(\"auth-id\"));\n\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Добавить робота :: \");\n }\n\n if ($this->request->isPost()) {\n if (!$form->isValid($this->request->getPost())) {\n foreach ($form->getMessages() as $message) {\n $this->flashSession->error($message);\n }\n return $this->response->redirect(\n [\n \"for\" => \"robot-add\",\n \"name\" => $user->name\n ]\n );\n } else {\n\n $robot = new Robots();\n $robot->name = $this->request->getPost(\"name\");\n $robot->type = $this->request->getPost(\"type\");\n $robot->year = $this->request->getPost(\"year\");\n $robot->users_id = $user->id;\n\n\n if ($robot->save()) {\n $this->flashSession->success(\"Вы добавили нового робота !\");\n $this->session->set(\"robot-id\", $robot->id);\n return $this->response->redirect(\n [\n\n \"for\" => \"user-show\",\n \"name\" => $this->session->get(\"auth-name\")\n ]\n );\n\n } else {\n\n $this->flashSession->error($robot->getMessages());\n }\n\n }\n }\n\n return $this->view->form = $form;\n\n }", "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增用户';\n $this->global['pageName'] = 'user_add';\n\n if(empty($_POST)){\n $data['roles'] = $this->user_model->getRoles($this->global['login_id']);\n\n $this->loadViews(\"user_manage/user_add\", $this->global, $data, NULL);\n }else{\n $this->item_validate();\n }\n }\n }", "public function AddMentoratUser($id){\n if($user = User::where(['id' => $id,'mentorat' => User::not_mentorat,'type' => User::user])->first()){\n $this->mail->ID840231($user->id,Session::get('userData'));\n toastr()->success('This user has been emailed to approve mentor');\n\n $user->mentorat = User::in_standby_mentorat;\n $user->save();\n }else{\n toastr()->error('Something is wrong!');\n }\n return Redirect::back();\n }", "public function add(){\r\n\t\t//$this->auth->set_access('add');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function agregar(){\n if(!isLoggedIn()){\n redirect('usuarios/login');\n }\n //check User Role -- Only ADMINISTRADOR allowed\n if(!checkLoggedUserRol(\"ADMINISTRADOR\")){\n redirect('dashboard');\n }\n\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n \n // Sanitize POST array\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n $data = [\n 'nombreEspecialidad' => trim($_POST['nombreEspecialidad'])\n ];\n\n // Validar Nombre Especialidad obligatorio\n if(empty($data['nombreEspecialidad'])){\n $data['nombreEspecialidad_error'] = 'Por favor ingrese un titulo para la especialidad';\n }\n\n // Validar Nombre Especialidad existente\n if($this->especialidadModel->checkEspecialidad($data['nombreEspecialidad'])){\n $data['nombreEspecialidad_error'] = 'La especialidad que intentó agregar ya existe';\n }\n\n // Asegurarse que no haya errores\n if(empty($data['nombreEspecialidad_error'])){\n // Crear especialidad\n if($this->especialidadModel->agregarEspecialidad($data['nombreEspecialidad'])){\n flash('especialidad_success', 'Especialidad creada correctamente');\n redirect('especialidades');\n }\n else{\n die('Ocurrió un error inesperado');\n }\n }\n else{\n flash('especialidad_error', $data['nombreEspecialidad_error'], 'alert alert-danger');\n redirect('especialidades');\n }\n }\n }", "public function addMembro($id_usuario, $id_grupo) {\n $sql = \"INSERT INTO grupos_membros SET id_usuario = '$id_usuario', id_grupo = '$id_grupo'\";\n $this->db->query($sql);\n }", "public function agregarUsuario(){\n \n }", "public function add_friend($user_to = null) {\n\n\t\t\n\t\t$this->request->data['User']['id'] = $this->getUserId();\n\t\t$this->request->data['Friend']['id'] = $user_to;\n\n\t\tif($result = $this->User->saveAll($this->request->data)) {\n\t\t\t$this->redirect(array('action' => 'view', $user_to));\n\t\t} else {\n\t\t\t$this->redirect(array('action' => 'view', $user_to));\n\t\t}\n\n\t}", "public function addUser(){\n\t}", "public function Add_medico($array = array()){\n \t\t $request['inp_document'];\n \t\t $request['inp_nomb'];\n \t\t $request['inp_apell'];\n \t\t $request['inp_tel'];\n \t\t $request['inp_cel'];\n \t\t $request['rdio_sex'];\n \t\t $request['slt_especia'];\t\n \t\t $request['inp_nick'];\n\t\t $person = new Persona();\n\t\t $respon = $person->crearPersona($array); // dentro de esta funcion debe insertar en la tabla persona, si es exitoso la insercion, debe pasar el if siguiente e insertar en la tabla medicos\n\t\t if(isset($respon['exito'])){\n\t\t $request['slt_especia'];\n\t\t $request['inp_document'];\t\n\t\t\n\n\t\t\t //insercion del packete\n\t\t }\n\t\t}", "public function admin_add()\n {\n if ($this->request->is('post')) {\n $this->User->create();\n\n $this->request->data['Impi']['auth_scheme'] = 127;\n\n if ($this->User->saveAll($this->request->data)) {\n $this->Session->setFlash(__('The user has been saved'));\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n }\n }\n $utilityFunctions = $this->User->UtilityFunction->find('list');\n\n $this->set(compact('utilityFunctions', 'utilityFunctionsParameters'));\n }", "public function postAjouter() {\n \t$d['resultat']= 0;\n \tif(!Auth::user()) {\n \t\t$d['message'] = \"Vous devez être identifié pour participer.\";\n \t} else {\n\t\t\tif (Input::get('valeur')==\"\") {\n\t\t\t\t$d['message'] = \"Vous devez écrire quelque chose pour participer.\";\n\t\t\t} else {\n\t\t\t\t// Enregistre le message\n\t\t\t\t$message = new \\App\\Models\\Message;\n\t\t\t\t$message->user_id = Auth::user()->id;\n\t\t\t\t$message->texte = Input::get('valeur');\n\t\t\t\t$message->save();\n\t\t\t\t$d['resultat'] = 1;\n\t\t\t\t$d['message'] = \"\";\n\t\t\t}\n\t\t}\n\t\t// Le refresh est fait via un autre appel ajax\n\t\t// On envoi la réponse\n\t\treturn response()->json($d);\n\t}", "private function inserirUnidade()\n {\n $cadUnidade = new \\App\\adms\\Models\\helper\\AdmsCreate;\n $cadUnidade->exeCreate(\"adms_unidade_policial\", $this->Dados);\n if ($cadUnidade->getResultado()) {\n $_SESSION['msg'] = \"<div class='alert alert-success'>Unidade cadastrada com sucesso!</div>\";\n $this->Resultado = true;\n } else {\n $_SESSION['msg'] = \"<div class='alert alert-danger'>Erro: A Unidade não foi cadastrada!</div>\";\n $this->Resultado = false;\n }\n }", "public function addUtilisateur()\n\t{\n\t\t\t$sql = \"INSERT INTO utilisateur SET\n\t\t\tut_nom=?,\n\t\t\tut_prenom=?,\n\t\t\tut_pseudo=?,\n\t\t\tut_mail=?,\n\t\t\tut_mdp=?,\n\t\t\tut_date_inscription=NOW(),\n\t\t\tut_hash_validation =?\";\n\n\t\t\t$res = $this->addTuple($sql,array($this->nom,\n\t\t\t\t$this->prenom,\n\t\t\t\t$this->pseudo,\n\t\t\t\t$this->email,\n\t\t\t\t$this->pass,\n\t\t\t\t$this->hashValidation()\n\t\t\t\t));\n\t\t\treturn $res;\n\t}", "public function AddSocial(){\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n $id_empresa = 1;\n $facebook = trim($_POST['facebook']);\n $twitter = trim($_POST['twitter']);\n $google_plus = trim($_POST['google_plus']);\n $linkedin = trim($_POST['linkedin']);\n $instagram = trim($_POST['instagram']);\n $pinterest = trim($_POST['pinterest']);\n $whatsapp = trim($_POST['whatsapp']);\n\n $columnas = array(\"id_empresa\", \"facebook\", \"twitter\", \"google_plus\", \"linkedin\", \"instagram\", \"pinterest\", \"whatsapp\");\n $datos = array($id_empresa, $facebook, $twitter, $google_plus, $linkedin, $instagram, $pinterest, $whatsapp);\n\n //ejecyta la insercion\n if($this->ConfigModelo->insert('red_social', $columnas, $datos)){\n\n $_SESSION[\"success\"]=true;\n redireccionar('pages/contacto');\n\n }else{\n echo false;\n }\n\n }else{\n\n $columnas = \"\";\n $datos = \"\";\n\n }\n\n }", "public static function append_into_contact_list(){\n\n\n $id_added_user = $_SESSION[\"user_id_added\"]; // usuario que acabamos de agregar\n\t$current_user_id = $_SESSION[\"id_user\"]; // este soy yo osea el que agrega\n\n\t$QUERY = \"INSERT INTO contact values(NULL,$current_user_id ,$id_added_user) \";\n\n\n\t mysql_query( $QUERY , Conectar::con());\n\n\n\n\t}", "public function addUser(){}", "public function create()\n {\n \n echo \"Syntax: POST: /api?telefon=*telefon*&id_agencija=*id*<br>/api?email=*email*&id_agencija=*id*\";\n \n }", "public function actionRegister()\n {\n if (isset($this->request['mobile'])) {\n $mobile = $this->request['mobile'];\n $user = Users::model()->find('username = :mobile', [':mobile' => $mobile]);\n\n $code = Controller::generateRandomInt();\n if (!$user) {\n $user = new Users();\n $user->username = $mobile;\n $user->password = $mobile;\n $user->status = Users::STATUS_PENDING;\n $user->mobile = $mobile;\n }\n\n $user->verification_token = $code;\n if ($user->save()) {\n $userDetails = UserDetails::model()->findByAttributes(['user_id' => $user->id]);\n $userDetails->credit = SiteSetting::getOption('base_credit');\n $userDetails->save();\n }\n\n Notify::SendSms(\"کد فعال سازی شما در آچارچی:\\n\" . $code, $mobile);\n\n $this->_sendResponse(200, CJSON::encode(['status' => true]));\n } else\n $this->_sendResponse(400, CJSON::encode(['status' => false, 'message' => 'Mobile variable is required.']));\n }", "public function addNewRegiuneByAdmin($data)\n {\n $nume = $data['nume'];\n\n $checkRegiune = $this->checkExistRegiune($nume);\n\n\n if ($nume == \"\") {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Câmpurile de introducere nu trebuie să fie Golite!</div>';\n return $msg;\n } elseif (strlen($nume) < 2) {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Numele regiunii este prea scurt, cel puțin 2 caractere!</div>';\n return $msg;\n } elseif ($checkRegiune == TRUE) {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Regiunea există deja, vă rugăm să încercați o alta regiune ...!</div>';\n return $msg;\n } else {\n\n $sql = \"INSERT INTO regiune(nume ) VALUES(:nume)\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->bindValue(':nume', $nume);\n $result = $stmt->execute();\n if ($result) {\n $msg = '<div class=\"alert alert-success alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Success !</strong> Ați înregistrat cu succes!</div>';\n return $msg;\n } else {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Error !</strong> Ceva n-a mers bine !</div>';\n return $msg;\n }\n }\n }", "public function actionCreate() {\n $id_user = Yii::app()->user->getId();\n $model = User::model()->findByPk($id_user);\n $tipo = $model->id_tipoUser;\n if ($tipo == \"1\") {\n $model = new Consultor;\n $modelUser = new User;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Consultor'])) {\n $model->attributes = $_POST['Consultor'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n \n \n \n $senha = uniqid(\"\", true);\n $modelUser->password = $senha;\n $modelUser->username = $_POST['username'];\n $modelUser->email = trim($model->email);\n $modelUser->attributes = $modelUser;\n $modelUser->id_tipoUser = 4;\n $modelUser->senha = '0';\n\n if ($modelUser->save()) {\n\n $model->id_user = $modelUser->id;\n if ($model->save()) {\n $this->redirect(array('EnviaEmail', 'nomedestinatario' => $model->nome, \"emaildestinatario\" => $model->email, \"nomedeusuario\" => $modelUser->username, \"senha\" => $modelUser->password));\n }\n }\n \n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n \n }else {\n $this->redirect(array('User/ChecaTipo'));\n }\n }", "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }", "function add()\n {\n //load chuc vu ra\n $this->load->model('chucvu_model');\n $input = array();\n $chucvu = $this->chucvu_model->getList($input);\n $this->data['chucvu'] = $chucvu;\n \n //thoa dieu kien dau vao moi insert vao\n $this->load->library('form_validation');\n $this->load->helper('form');\n if($this->input->post())\n {\n $this->form_validation->set_rules('password', 'Mật khẩu', 'min_length[8]'); \n $this->form_validation->set_rules('repassword', 'Nhập lại mật khẩu', 'matches[password]');\n \n if($this->form_validation->run())\n {\n //lay DL tu view\n $ho = $this->input->post('ho');\n $ten = $this->input->post('ten');\n $luong = $this->input->post('luong');\n $chucvu = $this->input->post('chucvuid');\n $password = $this->input->post('password'); \n //do use plugin jQuery number --> chuyen ve dang so moi insert duoc\n $luong = str_replace(',', '', $luong);\n \n $data = array(\n 'ho' => $ho,\n 'ten' => $ten,\n 'chucvuid' => $chucvu, \n 'password' => md5($password),\n 'luong' => $luong\n );\n if($this->nhanvien_model->add($data))\n {\n $message = $this->session->set_flashdata('message', 'Thêm mới dữ liệu thành công'); \n }\n else {\n $this->session->set_flashdata('message', 'Không thể thêm mới');\n } \n //chuyen ve trang index\n redirect(admin_url('nhanvien'));\n }\n }\n \n $this->data['temp'] = 'admin/nhanvien/add';\n $this->load->view('admin/main', $this->data);\n }", "protected function register(MembreRequest $data)\n {\n\t\t\t//check if is Avatar img exist\n\t\t$custom_file_name =\"\";\n\t\t/*if ($request->hasFile('image')) {\n\t\t\t$file = $request->file('image');\n\t\t\t$custom_file_name = time().'-'.$request->file('image')->getClientOriginalName(); // customer the name of img uploded \n\t\t\t$file->move('avatar_membre/', $custom_file_name); // save img ine the folder Public/Avatars\n\t\t\t\n\t\t}*/\t\n\t $membre=Membre::create([\n 'nom' => $data['nom'],\n 'email' => $data['email'],\n\t\t\t'prenom' => $data['prenom'],\n\t\t\t'tel' => $data['tel'],\n\t\t\t'state_id' => $data['state_id'],\n\t\t\t'address' => $data['address'],\n\t\t\t'nbr_annonce_autorise' => 5,\n 'password' => Hash::make($data['password']),\n ]);\n\t\t\n\t \n\t\t$this->guard()->login($membre);\n\t\treturn redirect()->intended( 'membre' ); \n }", "public function agregarUsuarioController(){\n //se verifica que el ultimo elemento de la lista contenga algo \n if(isset($_POST[\"tipo_cliente\"]) && $_POST[\"tipo_cliente\"] != \"\"){\n //Se almacena la informacion en un arreglo asociativo\n $datosController = array( \"tipo_cliente\"=>$_POST[\"tipo_cliente\"],\n \"telefono\"=>$_POST[\"telefono\"],\n \"nombre\"=>$_POST[\"nombre\"],\n \"ap_paterno\"=>$_POST[\"ap_paterno\"],\n \"ap_materno\"=>$_POST[\"ap_materno\"]\n );\n //Se habla a la clase DATOS para poder enviarle la peticion de agregar un nuevo registro, enviandole el arreglo y la tabla.\n $respuesta = Datos::agregarUsuariosModel($datosController,\"clientes\");\n\n if($respuesta == true){\n //En caso positivo nos redirecciona al cliente.\n echo '<script>\t\t\n\t\t\t location.href= \"index.php?action=cliente\";\n\t\t </script>';\n \n }else{\n //En caso negativo nos deja en la misma ventana.\n echo '<div class=\"alert alert-warning\" role=\"alert\"> <strong>Error!</strong> Revise el contenido que desea agregar. </div>';/*\n echo '<script>\t\t\n\t\t\t location.href= \"index.php?action=agregar_cliente\";\n\t\t </script>';*/\n }\n }\n }", "function registerMadMimi() {\n\t\t//\n\t\tApp::import('Vendor', 'MadMimi', array('file' => 'madmimi' . DS . 'MadMimi.class.php'));\n\t\tApp::import('Vendor', 'MadMimi', array('file' => 'madmimi' . DS . 'Spyc.class.php'));\n\n\t\t// Crear el objeto de Mad Mimi\n\t\t//\n\t\t$mailer = new MadMimi(Configure::read('madmimiEmail'), Configure::read('madmimiKey'));\n\t\t$userMimi = array('email' => $_POST[\"email\"], 'firstName' => $_POST[\"name\"], 'add_list' => 'mailing');\n\t\t$mailer -> AddUser($userMimi);\n\t\techo true;\n\t\tConfigure::write(\"debug\", 0);\n\t\t$this -> autoRender = false;\n\t\texit(0);\n\t}", "public function addMonumentAction(Request $request){\n if(($this->container->get('security.authorization_checker')->isGranted('ROLE_CLIENT'))){\n throw new AccessDeniedException('Access Denied!!!!!');\n }\n else{\n $monument = new Monument();\n $test = \"ajout\";\n $form = $this->createForm(MonumentType::class, $monument);\n $form = $form->handleRequest($request);\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($monument);\n $em->flush();\n return $this->redirectToRoute('museum_showMonumentspage');\n }\n return $this->render('@Museum/Monument/addMonument.html.twig', array('form' => $form->createView(), 'test' => $test));\n }}", "function store()\n {\n $name = $_REQUEST['name'];\n $email = $_REQUEST['email'];\n $address = $_REQUEST['address'];\n $password = $_REQUEST['password'];\n $group_id = $_REQUEST['group_id'];\n $this->userModel->add($name, $email, $address, $password, $group_id);\n // quay tro lai trang danh sach -> thay doi thuoc tinh: location cua header\n header('location:index.php?page=users');\n }", "public function add()\n {\n\n // Reglas de validación del formulario\n /*\n required: indica que el campo es obligatorio.\n min_length: indica que la cadena debe tener al menos una cantidad determinada de caracteres.\n max_length: indica que la cadena debe tener como máximo una cantidad determinada de caracteres.\n valid_email: indica que el valor debe ser un correo con formato válido.\n */\n $this->form_validation->set_error_delimiters('', '');\n $this->form_validation->set_rules(\"nombre\", \"Nombre\", \"required|max_length[100]\");\n $this->form_validation->set_rules(\"apellido\", \"Apellido\", \"required|max_length[100]\");\n $this->form_validation->set_rules(\"email\", \"Email\", \"required|valid_email|max_length[150]|is_unique[profesores.email]\");\n $this->form_validation->set_rules(\"fecha_nacimiento\", \"Fecha de Nacimiento\", \"required\");\n $this->form_validation->set_rules(\"profesion\", \"Profesion\", \"required|max_length[100]\");\n\n // Modificando el mensaje de validación para los errores\n $this->form_validation->set_message('required', 'El campo %s es requerido.');\n $this->form_validation->set_message('min_length', 'El campo %s debe tener al menos %s caracteres.');\n $this->form_validation->set_message('max_length', 'El campo %s debe tener como máximo %s caracteres.');\n $this->form_validation->set_message('valid_email', 'El campo %s no es un correo válido.');\n $this->form_validation->set_message('is_unique', 'El campo %s ya existe.');\n\n //echo \"Genero => \" . $this->input->post(\"genero\");\n\n // Parámetros de respuesta\n header('Content-type: application/json');\n $statusCode = 200;\n $msg = \"\";\n\n // Se ejecuta la validación de los campos\n if ($this->form_validation->run()) {\n // Si la validación es correcta entra acá\n try {\n $this->load->model('ProfesoresModel');\n $data = array(\n \"nombre\" => $this->input->post(\"nombre\"),\n \"apellido\" => $this->input->post(\"apellido\"),\n \"email\" => $this->input->post(\"email\"),\n \"profesion\" => $this->input->post(\"profesion\"),\n \"genero\" => $this->input->post(\"genero\"),\n \"fecha_nacimiento\" => $this->input->post(\"fecha_nacimiento\"),\n );\n $rows = $this->ProfesoresModel->insert($data);\n if ($resMo > 0) {\n $msg = \"Información guardada correctamente.\";\n } else {\n $statusCode = 500;\n $msg = \"No se pudo guardar la información.\";\n }\n } catch (Exception $ex) {\n $statusCode = 500;\n $msg = \"Ocurrió un error.\" . $ex->getMessage();\n }\n } else {\n // Si la validación da error, entonces se ejecuta acá\n $statusCode = 400;\n $msg = \"Ocurrieron errores de validación.\";\n $errors = array();\n foreach ($this->input->post() as $key => $value) {\n $errors[$key] = form_error($key);\n }\n $this->data['errors'] = $errors;\n }\n // Se asigna el mensaje que llevará la respuesta\n $this->data['msg'] = $msg;\n // Se asigna el código de Estado HTTP\n $this->output->set_status_header($statusCode);\n // Se envía la respuesta en formato JSON\n echo json_encode($this->data);\n }", "public function addNew()\n {\n $this->load->model('user_model');\n $data['roles'] = $this->user_model->getUserRoles();\n $data['divisi'] = $this->user_model->getUserDivisi();\n $data['pangkat'] = $this->user_model->getUserPangkat();\n $this->global['pageTitle'] = 'Tambahkan Data Rescuer';\n $this->load->view('includes/header', $this->global);\n $this->load->view('rescuer/addNew', $data);\n $this->load->view('includes/footer');\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 add(){\n\t\t$data = array();\n\t\t$postData = array();\n\n\t\t//zistenie, ci bola zaslana poziadavka na pridanie zaznamu\n\t\tif($this->input->post('postSubmit')){\n\t\t\t//definicia pravidiel validacie\n\t\t\t$this->form_validation->set_rules('mesto', 'Pole mesto', 'required');\n\t\t\t$this->form_validation->set_rules('PSČ', 'Pole PSČ', 'required');\n\t\t\t$this->form_validation->set_rules('email', 'Pole email', 'required');\n\t\t\t$this->form_validation->set_rules('mobil', 'Pole mobil', 'required');\n\n\n\n\t\t\t//priprava dat pre vlozenie\n\t\t\t$postData = array(\n\t\t\t\t'mesto' => $this->input->post('mesto'),\n\t\t\t\t'PSČ' => $this->input->post('PSČ'),\n\t\t\t\t'email' => $this->input->post('email'),\n\t\t\t\t'mobil' => $this->input->post('mobil'),\n\n\n\t\t\t);\n\n\t\t\t//validacia zaslanych dat\n\t\t\tif($this->form_validation->run() == true){\n\t\t\t\t//vlozenie dat\n\t\t\t\t$insert = $this->Kontakt_model->insert($postData);\n\n\t\t\t\tif($insert){\n\t\t\t\t\t$this->session->set_userdata('success_msg', 'Záznam o kontakte bol úspešne vložený');\n\t\t\t\t\tredirect('/kontakt');\n\t\t\t\t}else{\n\t\t\t\t\t$data['error_msg'] = 'Nastal problém.';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$data['post'] = $postData;\n\t\t$data['title'] = 'Pridať kontakt';\n\t\t$data['action'] = 'add';\n\n\t\t//zobrazenie formulara pre vlozenie a editaciu dat\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('kontakt/add-edit', $data);\n\t\t$this->load->view('templates/footer');\n\t}", "function create()\r\n\t{\r\n\r\n\t\t$this->form_validation->set_rules('nom', 'le nom', 'trim|required|min_length[2]|max_length[12]');\r\n\r\n\t\tif ($this->form_validation->run() == TRUE ) {\r\n\t\t\r\n\t\t$this->e->ajouter($this->input->post());\r\n\r\n\t\t$this->_notice=\"Ajout effectué avec succéss\";\r\n\r\n\t\t$this->index();\r\n\t\t} \r\n\t\telse {\r\n\t\t\t$this->index();\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public function create_post(){\n\n $this->form_validation->set_rules('domicilio[latitud]', 'Latitud del Domicilio', 'required|trim');\n $this->form_validation->set_rules('domicilio[longitud]', 'Longitud del Domicilio', 'required|trim');\n $this->form_validation->set_rules('domicilio[image]', 'Imagen del Mapa', 'required|trim');\n\n\t\tif( $this->form_validation->run() == true){\n \n $data = $this->security->xss_clean($this->input->post()); # XSS filtering\n\n $token = $this->security->xss_clean($this->input->post('auth', TRUE)); //token de authentication\n $is_valid_token = $this->authorization_token->validateToken($token);\n\n if(null !== $is_valid_token && $is_valid_token['status'] === TRUE){\n $usuario = $this->Usuario_model->getByTokenJWT($is_valid_token['data']);\n $domicilio = $data[\"domicilio\"];\n\n if (array_key_exists('persona', $data)) {\n $domicilio['id_persona'] = $data[\"persona\"]['id'];\n }\n $domicilio['id_usuario'] = $usuario->id;\n $out_domicilio = $this->Domicilio_model->create( $domicilio );\n\n if($out_domicilio != null){\n\n $this->response([\n 'status' => true,\n 'message' => $this->lang->line('item_was_has_add'),\n $this->lang->line('domicilio') => $out_domicilio\n ], REST_Controller::HTTP_OK);\n }else{\n $this->response([\n 'status' => false,\n 'message' => $this->lang->line('no_item_was_has_add')\n ], REST_Controller::HTTP_CREATED);\n }\n }else{\n $this->response([\n 'status' => false,\n 'message' => $this->lang->line('token_is_invalid'),\n ], REST_Controller::HTTP_NETWORK_AUTHENTICATION_REQUIRED); // NOT_FOUND (400) being the HTTP response code\n }\n\t\t}else{\n $this->response([\n 'status' => false,\n 'message' => validation_errors()\n ], REST_Controller::HTTP_ACCEPTED); \n\t\t}\n $this->set_response($this->lang->line('server_successfully_create_new_resource'), REST_Controller::HTTP_RESET_CONTENT);\n }", "public function add(){\n\t\tif($this->request->is('post'))\n\t\t{\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['role'] = 'user';\n\t\t\tif($this->User->save($this->request->data))\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario creado');\n\t\t\t\treturn $this-redirect(array('action' =>'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario no creado');\n\t\t\t}\n\t\t}\n\n\t}", "public function add_to_cart_friend() {\n $id_item = $_POST['id_item'];\n $this->view->id_item = $id_item;\n\n $nr_friends = count($_POST['name']);\n $friendsDetails = array();\n\n //validam daca a completat numele la toti\n for ($i = 0; $i < $nr_friends; $i++) {\n if (strlen($_POST['name'][$i]) < 1 || !filter_var($_POST['email'][$i], FILTER_VALIDATE_EMAIL)) {\n $errors = \"Va rugam completati corect datele prietenilor !\";\n break 1;\n }\n $friendsDetails[] = array(\"name\" => $_POST['name'][$i], \"email\" => $_POST['email'][$i]);\n }\n if ($errors) {\n $this->view->errors = $errors;\n $this->view->nr_friends = $nr_friends;\n $this->view->post = $_POST;\n $this->view->render(\"popups/addFriend\", false, \"popup\");\n }\n\n //totul e ok aici, salvam item-urile in shopping cart\n //Intai cream tipul de date pentru metoda NeoCartModel\\addToCart\n $params['quantity'] = $nr_friends;\n $params['id_item'] = $id_item;\n $params['is_gift'] = true;\n $params['details'] = json_encode($friendsDetails);\n\n $hash = self::getHash();\n $cart = $this->NeoCartModel->getCart($hash);\n\n $this->NeoCartModel->addToCart($params, $cart);\n $this->view->errors = \"Multumim ! Produsele au fost adaugate in cos.\";\n $this->view->render(\"popups/addFriend\", false, \"popup\");\n }", "public function addUser(UserAddForm $form);", "public function addType()\r\n\t{\r\n\t\tif(isset($_SESSION['auth']) && $_SESSION['users']['niveau'] == 3){\r\n\t\tif(isset($_POST['dataF'])){\r\n\t\t\t$spe = str_replace('&', '=', $_POST['dataF']);\r\n\t\t\t$data = $this->convertArray($spe);\r\n\t\t\t//print_r($data);die();\r\n\t\t\t$spec = $this->model('type');\r\n\t\t\t$id = $spec->addType($data);\r\n\t\t\tif($id){\r\n\t\t\t\techo json_encode(['SUCCESS'=>true]);\r\n\t\t\t}else{\r\n\t\t\t\techo json_encode(['SUCCESS'=>true]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t}else{\r\n\t\t\t$this->view('login',['page'=>'Speciality','msg'=>'you should to connect first']);\r\n\t\t}\r\n\t}", "function newactor(){\n\t\t$client = new \\GuzzleHttp\\Client();\n\t\t$url = 'http://localhost:8080/codeIgniter3/index.php/actor/add';\n\t\t$data = [\n\t\t\t'form_params'=>[\n\t\t\t\t'first_name'=>'John',\n\t\t\t\t'last_name'=>'Doe'\n\t\t\t]\t\t\t\t\n\t\t];\n\n $res = $client->request('POST', $url, $data);\n\t}", "function add()\n { \n\t\tif ($this->auth->loggedin()) {\n\t\t\t$id = $this->auth->userid();\n\t\t\tif(!($this->User_model->hasPermission('add',$id)&&($this->User_model->hasPermission('person',$id)||$this->User_model->hasPermission('WILD_CARD',$id)))){\n\t\t\t\tshow_error('You Don\\'t have permission to perform this operation.');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$this->form_validation->set_rules('username', '<b>Username</b>', 'trim|required|min_length[5]|max_length[12]');\n\t\t\t$this->form_validation->set_rules('password', '<b>Password</b>', 'trim|required');\n\t\t\t$this->form_validation->set_rules('first_name', '<b>First Name</b>', 'trim|required|min_length[2]|max_length[12]');\n\t\t\t$this->form_validation->set_rules('Last_name', '<b>Last Name</b>', 'trim|required|min_length[2]|max_length[12]');\n\t\t\t\n\t\t\t$this->form_validation->set_rules('gender', '<b>Gender</b>', 'trim|required');\n\t\t\t$this->form_validation->set_rules('mobile', '<b>Mobile</b>', 'trim|required|integer|min_length[10]|max_length[11]');\n\t\t\t$this->form_validation->set_rules('role_id', '<b>Role</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t$this->form_validation->set_rules('location_id', '<b>Location</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t$this->form_validation->set_rules('status_id', '<b>Status</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t\t\t\t\n\t\t\tif(isset($_POST) && count($_POST) > 0 && $this->form_validation->run()) \n\t\t\t{ \n\t\t\t\t$person_id = $this->User_model->register_user(); \n\t\t\t\t//$person_id = $this->Person_model->add_person($params);\n\t\t\t\t$params1 = array(\n\t\t\t\t\t\t\t'person_id' => $person_id,\n\t\t\t\t\t\t\t'role_id' => $this->input->post('role_id'),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->Person_role_model->update_person_role($person_id,$params1);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$params2 = array(\n\t\t\t\t\t\t\t'person_id' => $person_id,\n\t\t\t\t\t\t\t'location_id' => $this->input->post('location_id'),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->Person_location_model->update_person_location($person_id,$params2);\t\n\t\t\t\tredirect('person/index');\n\t\t\t}\n\t\t\telse\n\t\t\t{ \n\t\t\t\t\n\t\t\t\t$user = $this->User_model->get('person_id', $id);\n\t\t\t\tunset($user['password']);\n\t\t\t\t\n\t\t\t\t$user_role = $this->User_model->loadRoles($user['person_id']);\n\t\t\t\t\t$this->data['user'] = $user['username'];\n\t\t\t\t\t$this->data['role'] = $user_role;\n\t\t\t\t\t$this->data['gender'] = $user['gender'];\n\t\t\t\t\t$specialPerm = $this->User_model->loadSpecialPermission($id);\n\t\t\t\t\t\n\t\t\t\t\t$this->data['pp'] = $specialPerm;\n\t\t\t\t\t$this->data['p_role'] = $this->Person_role_model->get_person_role($id);\n\t\t\t\t\t$this->data['role'] = $this->Role_model->get_all_role();\n\t\t\t\t\t$this->data['location'] = $this->Location_model->get_all_location();\n\t\t\t\t\t$this->data['status'] = $this->Statu_model->get_all_status();\n\t\t\t\t\t\n\t\t\t\t$this->template\n\t\t\t\t\t->title('Welcome','My Aapp')\n\t\t\t\t\t->build('person/add',$this->data);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->template\n\t\t\t\t\t->title('Login Admin','Login Page')\n\t\t\t\t\t->set_layout('access')\n\t\t\t\t\t->build('access/login');\n\t\t}\n }", "function incluir_click($sender, $param)\n {\n if ($this->IsValid)\n {\n $this->incluir->Enabled=False;//Se deshabilita boton incluir\n // se capturan los valores de los controles\n $aleatorio = $this->numero->Text;\n $cod_direccion = usuario_actual('cod_direccion');\n $cod_direccion=substr($cod_direccion, 1);\n $siglas = usuario_actual('siglas_direccion');\n $ano = $this->lbl_ano->Text;\n $asunto = str_replace(\"'\", '\\\\\\'', $this->txt_asunto->Text );\n $destinatario = str_replace(\"'\", '\\\\\\'', $this->txt_destinatario->Text );\n $enviadopor=usuario_actual('login');\n $fecha = cambiaf_a_mysql ($this->txt_fecha->Text);\n //$memo=$this->html1->text;\n //busca el nombre del remitente\n $sql3=\"select cedula from intranet.usuarios where(login='$enviadopor')\";\n $resultado3=cargar_data($sql3, $sender);\n $cedula=$resultado3[0]['cedula'];\n $sql3=\"select nombres, apellidos from organizacion.personas where(cedula='$cedula')\";\n $resultado3=cargar_data($sql3, $sender);\n $remitente=$resultado3[0]['nombres'].' '.$resultado3[0]['apellidos'];\n $criterios_adicionales=array('direccion' => $cod_direccion, 'ano' => $ano);\n $numero=proximo_numero(\"organizacion.memoranda\",\"correlativo\",$criterios_adicionales,$this);\n $numero=rellena($numero,4,\"0\");\n // se inserta en la base de datos\n $sql = \"insert into organizacion.memoranda\n (direccion, siglas, correlativo, ano, fecha, asunto, destinatario, status, memo, remitente)\n values ('$cod_direccion','$siglas','$numero','$ano','$fecha','$asunto','$destinatario','1','$memo', '$remitente')\"; \n $resultado=modificar_data($sql,$sender);\n /*$sql2=\"update organizacion.adjuntos set correlativo='$numero' where (correlativo='$aleatorio')\";\n $resultado2=modificar_data($sql2, $sender);*/ \n /* Se incluye el rastro en el archivo de bitácora */\n $descripcion_log = \"Incluido el Memorando: \".$siglas.\"-\".$numero.\"-\".$ano;\n inserta_rastro(usuario_actual('login'),usuario_actual('cedula'),'I',$descripcion_log,\"\",$sender);\n $this->LTB->titulo->Text = \"Solicitud de número de Memorando\";\n $this->LTB->texto->Text = \"Se ha registrado exitosamente el nuevo Memorando con el \".\n \"número: <strong>\".$siglas.\"-\".$numero.\"-\".$ano.\"</strong>\";\n $this->LTB->imagen->Imageurl = \"imagenes/botones/memoranda.png\";\n $this->LTB->redir->Text = \"epaper.incluir_memo\";\n $params = array('mensaje');\n $this->getPage()->getCallbackClient()->callClientFunction('muestra_mensaje', $params);\n\n //$this->mensaje2->setSuccessMessage($sender, \"Se ha registrado exitosamente el nuevo Memorando con el numero:\".$siglas.\"-\".$numero.\"-\".$ano, 'grow');\n\n }\n }", "public function insertar($nombreMiembro,$apellido1Miembro,$apellido2Miembro,$correo,$contrasenna,$rol){ \n $miembro = new Miembro();\n \n $miembro->nombreMiembro = $nombreMiembro;\n $miembro->apellido1Miembro = $apellido1Miembro;\n $miembro->apellido2Miembro = $apellido2Miembro;\n $miembro->correo = $correo;\n $miembro->contrasenna = $contrasenna;\n $miembro->rol = $rol;\n \n $miembro->save();\n }", "public function user_add()\n\t{\n\t\t$data = array( 'isi' \t=> 'admin/user/v_user_add',\n\t\t\t\t\t\t'nav'\t=>\t'admin/nav',\n\t\t\t\t\t\t'title' => 'Tampil Dashboard Admin');\n\t\t$this->load->view('layout/wrapper',$data);\n\t}", "public function add(){\n\t\t$nama = $_POST['nama_sekolah'];\n\t\t$lati = $_POST['latitude'];\n\t\t$longi = $_POST['longitude'];\n\t\t$alamat = $_POST['alamat'];\n\n\t\t$data['nama_sekolah'] = $nama;\n\t\t$data['latitude'] = $lati;\n\t\t$data['longitude'] = $longi;\n\t\t$data['alamat'] = $alamat;\n\n\t\t$this->m_sekolah->addData($data);\n\t\tredirect('Welcome/index');\n\t}", "function get_add_movilidad($post){\n\t$Id_tienda = $this->session->userdata('Id_tienda');\n\t\t$data=array(\n\t\t\t'Id_movilidad'=>'',\n\t\t\t'Placa'=>$post['placa'],\n\t\t\t'Estado'=>1,\n\t\t\t'Id_tienda'=>$Id_tienda\n\t\t);\n\t\t\n\t\t$this->db->insert('jam_movilidad',$data);\n\t}", "public function createPost(){\n \t//di chuyen den url: /admin/users/read\n if($this->model->modelCreate())\n //di chuyen den url\n return redirect(\"admin/users\");\n else{\n Session::flash(\"error\",\"email da ton tai\");\n return redirect(\"admin/users/addUser\")->withInput();\n }\n }", "function add($nombre,$correo){\n\t\tglobal $conn;\n\t\t//$sql = \"INSERT INTO usuario (nombre,correo) VALUES ('$nombre','$correo')\";\n\t\t$stmt = $conn->prepare('INSERT INTO user (email,nombre) VALUES ( :email,:password)');\n\t\t//$stmt->bindParam(':nombre', $nombre);\n\t\t$stmt->bindParam(':email', $nombre);\n\t\t$stmt->bindParam(':password', $correo);\n\t\t$stmt->execute();\n\t\t//$conn->query($sql);\n\t}", "static function addUser(){\n\n $controller = new UserController();\n $validation = $controller->signupValid();\n\n if($validation === \"OK\"){\n $base = new ConnexionDb;\n\n $base->query(\"INSERT INTO user(username, firstname, email, pass, valid)\n VALUES (:username, :firstname, :email, :pass, 1)\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR),\n array('firstname',$_POST['firstname'],\\PDO::PARAM_STR),\n array('email',$_POST['email'],\\PDO::PARAM_STR),\n array('pass',$_POST['pass'],\\PDO::PARAM_STR)\n )\n );\n // $userM = new User($_POST);\n\n }else{\n echo 'erreur d\\'inscription';\n }\n }", "public function add() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['password'] = AuthComponent::password($this->request->data['User']['password']);\n\t\t\tif ($this->User->save($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('The user has been saved'));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t} else {\n\t\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t\t$lookupSupported = isset($queryURL) && \"\" <> $queryURL;\r\n\t\t\t$this->set('lookupSupported', $lookupSupported);\n\t\t\t$this->set('userType', $user['User']['type']);\n\t\t}\n\t}", "public function store(Request $request)\n {\n // dd($request->all());\n $this->validate($request, [\n 'matiere_id' => 'required',\n 'professeur_id'=>'required',\n 'school_id' => 'required',\n //'professeur_id'=>'required'\n ]);\n\n\n $professeur = User::findOrFail($request->professeur_id);\n\n $matiere = Matiere::findOrFail($request->matiere_id);\n\n $professeur->matieres()->attach($matiere->id);\n \n flash('success')->success();\n\n return redirect()->route('professeursMatieres.index');\n\n\n }", "function postAdd($request){\r\n global $context;\r\n $data= new $this->model;\r\n foreach($data->fields as $key=>$field){\r\n if($field['type']!='One2many' && $field['type']!='Many2many' ){\r\n $data->data[$key]=$request->post[$key];\r\n }\r\n }\r\n\r\n if(!$data->insert()){\r\n if($request->isAjax()) return json_error($data->error);\r\n throw new \\Exception($data->error);\r\n }\r\n if($request->isAjax()) return json_success(\"Save Success !!\".$data->error,$data);\r\n\r\n\r\n redirectTo($context->controller_path.\"/all\");\r\n }", "public function nuevo() {\n\n /* Si NO esta autenticado redirecciona a auth */\n if (!$this->ion_auth->logged_in()) {\n\n redirect('auth', 'refresh');\n }\n \n \n\n $this->load->library('form_validation');\n\n if ($this->form_validation->run('clientes')) {\n\n $data = $this->clientes->add();\n\n $index = array();\n\n $index['id'] = $data['id_cliente'];\n\n $index['type'] = \"clientes\";\n\n $this->session->set_flashdata('message', custom_lang('sima_client_created_message', 'Cliente creado correctamente'));\n\n redirect('clientes/index');\n } else {\n\n\n $data = array();\n\n $data['tipo_identificacion'] = $this->clientes->get_tipo_identificacion();\n\n $data['pais'] = $this->clientes->get_pais();\n $data['grupo'] = $this->grupo->getAll();\n $data_empresa = $this->miempresa->get_data_empresa();\n $data[\"tipo_negocio\"] = $data_empresa['data']['tipo_negocio']; \n $this->layout->template('member')->show('clientes/nuevo', array('data' => $data));\n }\n }", "function add() {\n $this->layout = \"no_header\";\n if (!empty($this->data)) {\n if ($this->User->save($this->data)) {\n $this->Session->setFlash(\"Your account has been created successfully\");\n $this->go_back(\"login\");\n }\n }\n }", "public function p_add() {\n $_POST['user_id'] = $this->user->user_id;\n\n # Unix timestamp of when this post was created / modified\n $_POST['created'] = Time::now();\n $_POST['modified'] = Time::now();\n\n\n # Insert\n # Note we didn't have to sanitize any of the $_POST data because we're using the insert method which does it for us\n DB::instance(DB_NAME)->insert('activities', $_POST);\n\n # Send them back to home page\n Router::redirect('/activities/index');\n\n }", "function insert(){\n //Declarar variables para recibir los datos del formuario nuevo\n $nombre=$_POST['nombre'];\n $apellido=$_POST['apellido'];\n $telefono=$_POST['telefono'];\n\n $this->model->insert(['nombre'=>$nombre,'apellido'=>$apellido,'telefono'=>$telefono]);\n $this->index();\n }", "public function addAction() {\n\t\t$this->view->addLayoutVar(\"onglet\", 2);\n\t\t$uid = Annuaire_User::getCurrentUserId();\n\t\t$this->view->title = t_('Add');\n\t\t$db = Gears_Db::getDb();\n\t\t$clients = Array();\n\t\t$result = $db->fetchAll(\"SELECT * FROM ANNUAIRE_SOCIETE WHERE USER_ID = ?\", Array($uid));\n\t\tforeach ($result as $info) {\n\t\t\t$clients[$info['SOCIETE_ID']][0] = $info['SOCIETE_ID'];\n\t\t\t$clients[$info['SOCIETE_ID']][1] = $info['SOCIETE_NOM'];\n\t\t}\n\t\t$this->view->clients = ($clients);\n\t\t$this->view->addcontact = t_(\"Add a contact\");\n\t\t$this->view->name = t_(\"Name\");\n\t\t$this->view->firstname = t_(\"First Name\");\n\t\t$this->view->address = t_(\"Address\");\n\t\t$this->view->mail = t_(\"Mail\");\n\t\t$this->view->phone = t_(\"Phone Number\");\n\t\t$this->view->cell = t_(\"Cellphone number\");\n\t\t$this->view->fax = t_(\"Fax\");\n\t\t$this->view->site = t_(\"Website\");\n\t\t$this->view->comment = t_(\"Comment\");\n\t\t$this->view->society = t_(\"Companie\");\n\t\t$this->view->none = t_(\"none\");\n\t\t$this->view->send = t_(\"Send\");\n\t\t$this->view->addsociety = t_(\"Add a companie\");\n\t\t$this->view->activity = t_(\"Activity\");\n\t}", "public function addAction() {\n $form = new JogoEmpresa_Form_JogoEmpresa();\n $model = new JogoEmpresa_Model_JogoEmpresa();\n $idJogo = $this->_getParam('idJogo');\n $idEmpresa = $this->_getParam('idEmpresa');\n if ($this->_request->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n $data = $form->getValues();\n if ($idJogo) {\n $db = $model->getAdapter();\n $where = $db->quoteInto('jog_codigo=?',$idJogo)\n . $db->quoteInto(' AND emp_codigo=?',$idEmpresa);\n $model->update($data, $where);\n } else {\n $model->insert($data);\n }\n $this->_redirect('/jogoEmpresa');\n }\n } elseif ($idJogo) {\n $data = $model->busca($idJogo,$idEmpresa);\n if (is_array($data)) {\n $form->setAction('/jogoEmpresa/index/add/idJogo/' . $idJogo . '/idEmpresa/' . $idEmpresa);\n $form->populate($data);\n }\n }\n $this->view->form = $form;\n }", "public function createAction()\n {\n $entity = new Titeur();\n $request = $this->getRequest();\n\t\t\t\t$user = $this->get('security.context')->getToken()->getUser();\n $form = $this->createForm(new TiteurType(), $entity, array('user' => $user));\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n\t\t\t\t\t\t$this->get('session')->set('titeur_id', $entity->getId());\n\t\t\t\t\t\t$this->get('session')->setFlash('notice', 'Titeur a été ajouté avec succès');\n\n return $this->redirect($this->generateUrl('enfant_new'));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function add_post(){\n $response = $this->PersonM->add_person(\n $this->post('name'),\n $this->post('hp'),\n $this->post('email'),\n $this->post('message')\n );\n $this->response($response);\n }", "function add()\n { \n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'descripcion' => $this->input->post('descripcion'),\n 'nombre' => $this->input->post('nombre'),\n );\n \n $estadousuario_id = $this->Estadousuario_model->add_estadousuario($params);\n redirect('estadousuario/index');\n }\n else\n { $this->load->view(\"header\",[\"title\"=>\"Registro estado\"]);\n $this->load->view('estadousuario/add');\n $this->load->view('footer');\n }\n }", "public function add()\n\t{\n\t\t// TODO\n\t\t// if(user has permissions){}\n\t\t$this -> loadModel('User');\n\t\tif($this -> request -> is('post') && !$this -> User -> exists($this -> request -> data['SgaPerson']['user_id']))\n\t\t{\n\t\t\t$this -> Session -> setFlash(\"Please select a valid JacketPages user to add.\");\n\t\t\t$this -> redirect(array('action' => 'index',$id));\n\t\t}\n\t\t$this -> loadModel('User');\n\t\tif ($this -> request -> is('post'))\n\t\t{\n\t\t\t$this -> SgaPerson -> create();\n\t\t\tif ($this -> SgaPerson -> save($this -> data))\n\t\t\t{\n\t\t\t\t$user = $this -> User -> read(null, $this -> data['SgaPerson']['user_id']);\n\t\t\t\t$this -> User -> set('level', 'sga_user');\n\t\t\t\t$this -> User -> set('sga_id', $this -> SgaPerson -> getInsertID());\n\t\t\t\t$this -> User -> save();\n\t\t\t\t$this -> Session -> setFlash(__('The user has been added to SGA.', true));\n\t\t\t\t$this -> redirect(array('action' => 'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this -> Session -> setFlash(__('Invalid user. User may already be assigned a role in SGA. Please try again.', true));\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.73490244", "0.6996486", "0.67863035", "0.67594904", "0.6687043", "0.6593787", "0.65594697", "0.6516573", "0.6493912", "0.64913505", "0.6476363", "0.64708674", "0.6396816", "0.63368696", "0.6277763", "0.6256368", "0.6238567", "0.6175691", "0.6147944", "0.6109554", "0.6107172", "0.6096277", "0.60947514", "0.6072273", "0.6069374", "0.60574263", "0.60120815", "0.6009598", "0.598856", "0.59873366", "0.5987212", "0.59806067", "0.5976745", "0.5958336", "0.5953061", "0.59503406", "0.59444153", "0.59443283", "0.5942349", "0.5936447", "0.592873", "0.5924991", "0.591932", "0.5917082", "0.59160876", "0.59102124", "0.5909148", "0.5905945", "0.5898064", "0.5897572", "0.589745", "0.5887155", "0.58815026", "0.5876411", "0.5870115", "0.58623374", "0.5860169", "0.5851283", "0.58503515", "0.5849323", "0.58487326", "0.5845528", "0.5839962", "0.58364516", "0.5836064", "0.5835355", "0.5831011", "0.5828898", "0.58288145", "0.5823841", "0.5822774", "0.5818648", "0.58171535", "0.58148235", "0.5807028", "0.5799433", "0.5788815", "0.5784627", "0.578362", "0.5783155", "0.5779736", "0.57756937", "0.577335", "0.576813", "0.5767043", "0.5756272", "0.57545394", "0.57534724", "0.57521635", "0.574909", "0.5747554", "0.5744805", "0.57447505", "0.57430774", "0.5742756", "0.57381725", "0.5735221", "0.57327384", "0.5730366", "0.57297623" ]
0.63455445
13
/ page mobilisateur/addmobilisateurintegrateur Ajout d'une mobilisateur
public function addmobilisateurintegrateurAction() { $sessionmembreasso = new Zend_Session_Namespace('membreasso'); //$this->_helper->layout->disableLayout(); $this->_helper->layout()->setLayout('layoutpublicesmcint'); if (!isset($sessionmembreasso->login)) {$this->_redirect('/integrateur/login');} if (isset($_POST['ok']) && $_POST['ok'] == "ok") { if (isset($_POST['code_membre']) && $_POST['code_membre'] != "" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != "") { $request = $this->getRequest(); if ($request->isPost ()) { $db = Zend_Db_Table::getDefaultAdapter(); $db->beginTransaction(); try { /////////////////////////////////////controle code membre if(isset($_POST['code_membre']) && $_POST['code_membre']!=""){ if(strlen($_POST['code_membre']) != 20) { $db->rollback(); $sessionmembreasso->error = "Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci..."; //$this->_redirect('/mobilisateur/addmobilisateurintegrateur'); return; }else{ if(substr($_POST['code_membre'], -1, 1) == 'P'){ $membre = new Application_Model_EuMembre(); $membre_mapper = new Application_Model_EuMembreMapper(); $membre_mapper->find($_POST['code_membre'], $membre); if(count($membre) == 0){ $db->rollback(); $sessionmembreasso->error = "Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ..."; //$this->_redirect('/mobilisateur/addmobilisateurintegrateur'); return; } }else if(substr($_POST['code_membre'], -1, 1) == 'M'){ $membremorale = new Application_Model_EuMembreMorale(); $membremorale_mapper = new Application_Model_EuMembreMoraleMapper(); $membremorale_mapper->find($_POST['code_membre'], $membremorale); if(count($membremorale) == 0){ $db->rollback(); $sessionmembreasso->error = "Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ..."; //$this->_redirect('/mobilisateur/addmobilisateurintegrateur'); return; } } } $date_id = new Zend_Date(Zend_Date::ISO_8601); $mobilisateur = new Application_Model_EuMobilisateur(); $m_mobilisateur = new Application_Model_EuMobilisateurMapper(); $id_mobilisateur = $m_mobilisateur->findConuter() + 1; $mobilisateur->setId_mobilisateur($id_mobilisateur); $mobilisateur->setCode_membre($_POST['code_membre']); $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss')); $mobilisateur->setId_utilisateur($_POST['id_utilisateur']); $mobilisateur->setEtat(1); $m_mobilisateur->save($mobilisateur); //////////////////////////////////////////////////////////////////////////////// $db->commit(); $sessionmembreasso->error = "Operation bien effectuee ..."; $this->_redirect('/mobilisateur/addmobilisateurintegrateur'); }else{ $db->rollback(); $sessionmembreasso->error = "Veuillez renseigner le Code Membre ..."; } } catch (Exception $exc) { $db->rollback(); $sessionmembreasso->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); return; } } } else { $sessionmembreasso->error = "Champs * obligatoire"; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addmobilisateurAction() {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembre->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/listmobilisateur');\n \n } catch (Exception $exc) { \n $db->rollback();\n $this->view->message = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $this->view->error = \"Champs * obligatoire\";\n }\n }\n }", "public function addmobilisateuradminAction() {\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');}\n if($sessionutilisateur->confirmation != \"\") {$this->_redirect('/administration/confirmation');}\n\n\n\n if(isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if(isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if($request->isPost()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n /////////////////////////////////////controle code membre\n if(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\n if(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n } else {\n if(substr($_POST['code_membre'], -1, 1) == 'P') {\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n } else if(substr($_POST['code_membre'], -1, 1) == 'M') {\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n }\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n ////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionutilisateur->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateuradmin');\n } else {\n $db->rollback();\n $sessionutilisateur->error = \"Veuillez renseigner le Code Membre ...\";\n } \n } catch(Exception $exc) { \n $db->rollback();\n $sessionutilisateur->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionutilisateur->error = \"Champs * obligatoire\";\n }\n }\n }", "public function add() {\n\n if (isset($_POST['valider'])) {\n \n extract($_POST);\n $data['ok'] = 0;\n \n if (!empty($_POST)) {\n\n $clientM = new ClientMoral();\n $clientMoralRepository = new ClientMoralRepository();\n \n $clientM->setNom($_POST['nom']);\n $clientM->setRaisonSociale($_POST['raisonSociale']);\n $clientM->setAdresse($_POST['adresse']);\n $clientM->setTel($_POST['tel']);\n $clientM->setEmail($_POST['email']);\n $clientM->setNinea($_POST['ninea']);\n $clientM->setRegiscom($_POST['registreCommerce']);\n \n\n $data['ok'] = $clientMoralRepository->add($clientM);\n }\n return $this->view->load(\"clientMoral/ajout\", $data);\n }\n else {\n return $this->view->load(\"clientMoral/ajout\");\n }\n }", "public function addCommande() {\n try {\n $pdo = PdoMedProjet::$conn;\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $isUser = $_SESSION['compte']->getId();\n $pdoStat = $pdo->prepare('INSERT INTO commande (id_user) VALUES (:id)');\n $pdoStat->bindParam(':id', $isUser, PDO::PARAM_INT);\n $pdoStat->execute();\n $idCom = $pdo->lastInsertId();\n foreach ($_SESSION['panier'] as $idMed => $qtx) {\n $pdoStat = $pdo->prepare('INSERT INTO commande_ligne (id_commande, id_media, qtx) VALUES (:idCom, :idMed, :qtx)');\n $pdoStat->bindParam(':idCom', $idCom, PDO::PARAM_INT);\n $pdoStat->bindParam(':idMed', $idMed, PDO::PARAM_INT);\n $pdoStat->bindParam(':qtx', $qtx, PDO::PARAM_INT);\n $pdoStat->execute();\n }\n return false;\n } catch (PDOException $erreur) {\n return $erreur->getMessage();\n }\n }", "function agregarIntegrante($fomrEquipo){\n\t$objResponse = new xajaxResponse();\n\n\tif(isset($fomrEquipo['checkItemIntegrante'])){\n\t\tforeach($fomrEquipo['checkItemIntegrante'] as $indice => $valor){\n\t\t\t// ACTUALIZA EL ESTADO DEL INTEGRANTE\n\t\t\t$queryInte = sprintf(\"UPDATE crm_integrantes_equipos \n\t\t\t\t\t\t\t\t\tSET activo = %s\n\t\t\t\t\t\t\t\t\tWHERE id_integrante_equipo = %s\",\n\t\t\t\t\t\t\tvalTpDato(1, \"int\"), // 0 = INACTIVO; 1 ACTIVO\n\t\t\t\t\t\t\tvalTpDato($fomrEquipo['hddIintegrante'.$valor] , \"int\"));\n\t\t\t$rsInte = mysql_query($queryInte);\n\t\t\tif (!$rsInte) $objResponse->alert(mysql_error().\"\\nError Nro: \".mysql_errno().\"\\nLine: \".__LINE__.\"\\n\".$query);\n\t\t\t$objResponse->assign(\"tdImg\".$valor,\"innerHTML\",sprintf(\"<img id=\\\"icorojo%s\\\" src=\\\"../img/iconos/ico_verde.gif\\\">\",$valor));\n\t\t}\n\t\t$objResponse->script(\"\n\t\tif(byId('checkItemIntegrante').checked == true){\n\t\t\tbyId('checkItemIntegrante').click();\n\t\t}\");\n\t} else {\n\t\t$objResponse->script(\"openImg(divFlotante3);\");\n\t\t$valBusq = sprintf(\"%s|%s||addIntegrante\",\n\t\t\t$fomrEquipo['txtIdEmpresa'],\n\t\t\t$fomrEquipo['comboxTipoEquipo']\n\t\t);\n\t\t$objResponse->loadCommands(listaEmpleado(\"\",\"\",\"\",$valBusq));\n\t}\n\t\n\treturn $objResponse;\n}", "public function etatmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "function add()\n {\n if($this->acceso(15)){\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'reunion_id' => $this->input->post('reunion_id'),\n 'usuario_id' => $this->input->post('usuario_id'),\n 'multa_monto' => $this->input->post('multa_monto'),\n 'multa_fecha' => $this->input->post('multa_fecha'),\n 'multa_hora' => $this->input->post('multa_hora'),\n 'multa_detalle' => $this->input->post('multa_detalle'),\n 'multa_numrec' => $this->input->post('multa_numrec'),\n );\n $multa_id = $this->Multa_model->add_multa($params);\n redirect('multa/index');\n }\n else\n {\n $this->load->model('Reunion_model');\n $data['all_reunion'] = $this->Reunion_model->get_all_reunion();\n\n $this->load->model('Usuario_model');\n $data['all_usuario'] = $this->Usuario_model->get_all_usuario();\n\n $data['_view'] = 'multa/add';\n $this->load->view('layouts/main',$data);\n }\n }\n }", "public function add() {\n if (isAuthorized('utilisateurs', 'add')) :\n $this->Utilisateur->Societe->recursive = -1;\n $societe = $this->Utilisateur->Societe->find('list',array('fields' => array('id', 'NOM'),'order'=>array('NOM'=>'asc')));\n $ObjEntites = new EntitesController(); \n $ObjAssoentiteutilisateurs = new AssoentiteutilisateursController(); \n $cercles = $ObjEntites->find_list_all_cercle();\n $this->set(compact('societe','cercles'));\n $matinformatique = array(); \n $activites = array(); \n $utilisateurs = array();\n $outils = array();\n $listediffusions = array();\n $partages = array();\n $etats = array();\n $this->set(compact('matinformatique','activites','utilisateurs','outils','listediffusions','partages','etats'));\n if ($this->request->is('post')) :\n if (isset($this->params['data']['cancel'])) :\n $this->Utilisateur->validate = array();\n $this->History->goBack(1);\n else: \n $this->Utilisateur->create();\n $this->request->data['Utilisateur']['NEW']=1;\n if ($this->Utilisateur->save($this->request->data)) {\n $lastid = $this->Utilisateur->getLastInsertID();\n $utilisateur = $this->Utilisateur->find('first',array('conditions'=>array('Utilisateur.id'=>$lastid),'recursive'=>0));\n if($utilisateur['Utilisateur']['profil_id']>0 || $utilisateur['Utilisateur']['profil_id']==-2):\n $this->sendmailnewutilisateur($utilisateur);\n endif;\n $this->addnewaction($lastid);\n $entite_id = $this->request->data['Utilisateur']['entite_id'];\n $ObjAssoentiteutilisateurs->silent_save($entite_id,$lastid);\n $this->save_history($lastid, \"Utilisateur créé\"); \n $this->Session->setFlash(__('Utilisateur sauvegardé',true),'flash_success');\n $this->History->goBack(1);\n } else {\n $this->Session->setFlash(__('Utilisateur incorrect, veuillez corriger l\\'utilisateur',true),'flash_failure');\n }\n endif;\n endif;\n else :\n $this->Session->setFlash(__('Action non autorisée, veuillez contacter l\\'administrateur.',true),'flash_warning');\n throw new UnauthorizedException(\"Vous n'êtes pas autorisé à utiliser cette fonctionnalité de l'outil\");\n endif; \n }", "function alta_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->fecha_alta=date(\"Y-m-d\");\n\t\t$u->estatus_general_id=1;\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 registrado los datos de la Unidad de Medida.\\\"); 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 addintegrante_post()\n {\n $input = Input::all();\n $regla = [ 'Nombre'=>'required','Rol'=>'required'];\n $validacion = Validator::make($input,$regla);\n if($validacion->fails())\n {\n return Redirect::back()->withErrors($validacion);\n }\n else {\n //verificamos que el docente exista\n $iddocente = substr(Input::get('Nombre'), 0, 5);\n if ($docente = Docente::where('coddocente', '=', $iddocente)->first())\n {\n //verificamos de que las funcines no se repitan\n $rol = Input::get('Rol');\n $idcom_orgdor = Session::get('user_idcom_orgdor');\n if ($data = IntegrantesCO::where('idcom_orgdor', '=', $idcom_orgdor)->where('rol','=',$rol)->first())\n {\n $error = ['wilson' => 'El '.$rol.' es '.$data->DataDocente[0]->nombre.' '.$data->DataDocente[0]\n ->apellidopaterno.' '.$data->DataDocente[0]->apellidomaterno.' nose aceptan dos '.$rol.'s'];\n return Redirect::back()->withInput()->withErrors($error);\n }\n else\n {\n if ($data = IntegrantesCO::where('idcom_orgdor', '=', $idcom_orgdor)->where('coddocente','=',$iddocente)->first())\n {\n $error = ['wilson' => 'El docente que ingreso ya es '.$rol.' por favor ingrese otro docente'];\n return Redirect::back()->withInput()->withErrors($error);\n }\n else\n {\n $newIntegrante = new IntegrantesCO();\n $newIntegrante->rol = Input::get('Rol');\n $newIntegrante->idcom_orgdor = $idcom_orgdor;\n $newIntegrante->coddocente = $iddocente;\n $newIntegrante->save();\n $success = ['wilson' => 'Integrante Agregado Satisfactoriamente'];\n return Redirect::to('comision/integrantes/list.html')->withErrors($success);\n }\n }\n }\n else\n {\n $error = ['wilson' => 'Este docente no existe en la base de datos'];\n return Redirect::back()->withInput()->withErrors($error);\n }\n }\n }", "public function addUmpireAction() {\n\t\t// Création du formulaire\n\t\t$oUmpire = new Umpire;\n\t\t$oForm = $this->createForm(new UmpireType(), $oUmpire);\n\n\t\t// Traitement du formulaire\n\t\t$oFormHandler = new UmpireHandler($oForm, $this->get('request'), $this->getDoctrine()->getEntityManager());\n\t\tif ($oFormHandler->process()) {\n\t\t\treturn $this->redirect($this->generateUrl('Umpires'));\n\t\t}\n\n\t\treturn $this->render('YBTournamentBundle:Umpire:form_create.html.twig', array('form' => $oForm->createView()));\n\t}", "public function etatmobilisateuradminAction()\n {\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 $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateuradmin');\n }", "public static function add($entreprise){\n $con=new connexion();\n $resultat=$con->executeactualisation(\"insert into tblentreprise (id_entreprise,admin_id,nom,logo,ville_id,adresse_complete,etat,date_ajout,date_modifier)\n values('\" . $entreprise->ident . \"','\" . $entreprise->adminid . \"','\" . $entreprise->nom . \"','\" . $entreprise->logo . \"','\" . $entreprise->villeid . \"','\" . $entreprise->adressecomp . \"',1,NOW(),NOW())\");\n $con->closeconnexion();\n\n }", "public function suppmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if ($id > 0) {\n\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->delete($id);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function addUtilisateur()\n\t{\n\t\t\t$sql = \"INSERT INTO utilisateur SET\n\t\t\tut_nom=?,\n\t\t\tut_prenom=?,\n\t\t\tut_pseudo=?,\n\t\t\tut_mail=?,\n\t\t\tut_mdp=?,\n\t\t\tut_date_inscription=NOW(),\n\t\t\tut_hash_validation =?\";\n\n\t\t\t$res = $this->addTuple($sql,array($this->nom,\n\t\t\t\t$this->prenom,\n\t\t\t\t$this->pseudo,\n\t\t\t\t$this->email,\n\t\t\t\t$this->pass,\n\t\t\t\t$this->hashValidation()\n\t\t\t\t));\n\t\t\treturn $res;\n\t}", "public function addRecordInDB($id_utente_registrato){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n //Escaping\r\n $id_utente_registrato = DB_Functions::esc($id_utente_registrato);\r\n\r\n //inserimento nuovo AMMINISTRATORE\r\n $query = \"INSERT INTO AMMINISTRATORE (ID_UTENTE_REGISTRATO)\r\n\t VALUES ($id_utente_registrato)\";\r\n $resQuery = $db->executeQuery($query);\r\n\r\n return $resQuery;\r\n }", "function insertarUcedifobracivil(){\n\t\t$this->procedimiento='snx.ft_ucedifobracivil_ime';\n\t\t$this->transaccion='SNX_UDOC_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_ucedifsubgrupo','id_ucedifsubgrupo','int4');\n\t\t$this->setParametro('cantidadobracivil','cantidadobracivil','numeric');\n\t\t$this->setParametro('id_obracivilmoe','id_obracivilmoe','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function inserCompte()\n {\n $username = \"Numherit\";\n $userId = 1;\n $token = $this->utils->getToken($userId);\n\n $nom = $this->utils->securite_xss($_POST['nom']);\n $prenom = $this->utils->securite_xss($_POST['prenom']);\n $adresse = $this->utils->securite_xss($_POST['adresse']);\n $email = $this->utils->securite_xss($_POST['email']);\n $password = $this->utils->generation_code(12);\n $dateNaissance = $this->utils->securite_xss($_POST['datenaiss']);\n $typePiece = $this->utils->securite_xss($_POST['typepiece']);\n $numPiece = $this->utils->securite_xss($_POST['piece']);\n $dateDeliv = $this->utils->securite_xss($_POST['datedelivrancepiece']);\n $telephone = trim(str_replace(\"+\", \"00\", $this->utils->securite_xss($_POST['phone'])));\n $sexe = $this->utils->securite_xss($_POST['sexe']);\n $user_creation = $this->userConnecter->rowid;\n $agence = $this->userConnecter->fk_agence;\n $response = $this->api_numherit->creerCompte($username, $token, $nom, $prenom, $adresse, $email, $password, $dateNaissance, $telephone, $user_creation, $agence, $sexe, $typePiece, $numPiece, $dateDeliv);\n\n $tab = json_decode($response);\n if (is_object($tab)) {\n if ($tab->{'statusCode'} == '000') {\n @$num_transac = $this->utils->generation_numTransaction();\n @$idcompte = $this->utils->getCarteTelephone($telephone);\n @$this->utils->SaveTransaction($num_transac, $service = ID_SERVICE_CREATION_COMPTE, $montant = 0, $idcompte, $user_creation, $statut = 0, 'SUCCESS: CREATION COMPTE', $frais = 0, $agence, 0);\n $true = 'bon';\n $this->utils->log_journal('Creation compte', 'Client:' . $nom . ' ' . $prenom . ' Agence:' . $agence, 'succes', 1, $user_creation);\n $this->rediriger('compte', 'compte/' . base64_encode($true));\n } else {\n $this->utils->log_journal('Creation compte', 'Client:' . $nom . ' ' . $prenom . ' Agence:' . $agence, 'echec', 1, $user_creation);\n $this->rediriger('compte', 'compte/' . base64_encode($tab->{'statusMessage'}));\n }\n }\n }", "private function inserirUnidade()\n {\n $cadUnidade = new \\App\\adms\\Models\\helper\\AdmsCreate;\n $cadUnidade->exeCreate(\"adms_unidade_policial\", $this->Dados);\n if ($cadUnidade->getResultado()) {\n $_SESSION['msg'] = \"<div class='alert alert-success'>Unidade cadastrada com sucesso!</div>\";\n $this->Resultado = true;\n } else {\n $_SESSION['msg'] = \"<div class='alert alert-danger'>Erro: A Unidade não foi cadastrada!</div>\";\n $this->Resultado = false;\n }\n }", "function insertarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_ime';\n\t\t$this->transaccion='GEM_GEMETO_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function ajouter() {\n $this->loadView('ajouter', 'content');\n $arr = $this->em->selectAll('client');\n $optionsClient = '';\n foreach ($arr as $entity) {\n $optionsClient .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNomFamille() . '</option>';\n }\n $this->loadHtml($optionsClient, 'clients');\n $arr = $this->em->selectAll('compteur');\n $optionsCompteur = '';\n foreach ($arr as $entity) {\n $optionsCompteur .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNumero() . '</option>';\n }\n $this->loadHtml($optionsCompteur, 'compteurs');\n if(isset($this->post->numero)){\n $abonnement = new Abonnement($this->post);\n $this->em->save($abonnement);\n $this->handleStatus('Abonnement ajouté avec succès.');\n }\n }", "function add()\n { \n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n\t\t\t\t'id_commission' => $this->input->post('id_commission'),\n\t\t\t\t'id_user' => $this->input->post('id_user'),\n );\n \n $commission_groupe_id = $this->Commission_groupe_model->add_commission_groupe($params);\n redirect('commission_groupe/index');\n }\n else\n {\n\t\t\t$this->load->model('Commission_tech_model');\n\t\t\t$data['all_commission_tech'] = $this->Commission_tech_model->get_all_commission_tech();\n\n\t\t\t$this->load->model('User_model');\n\t\t\t$data['all_user'] = $this->User_model->get_all_user();\n\n\t\t\t$this->load->view('include/header');\n\t\t\t$this->load->view('advocate/commission_groupe/add',$data);\n\t\t\t$this->load->view('include/footer');\n }\n }", "public function agregar_usuario_controlador()\n {\n $nombres = strtoupper(mainModel::limpiar_cadena($_POST['usu_nombres_reg']));\n $apellidos = strtoupper(mainModel::limpiar_cadena($_POST['usu_apellidos_reg']));\n $identidad=mainModel::limpiar_cadena($_POST['usu_identidad_reg']);\n $puesto=mainModel::limpiar_cadena($_POST['usu_puesto_reg']);\n $unidad=mainModel::limpiar_cadena($_POST['usu_unidad_reg']);\n $rol = mainModel::limpiar_cadena($_POST['usu_rol_reg']);\n $celular = mainModel::limpiar_cadena($_POST['usu_celular_reg']);\n $usuario = strtolower(mainModel::limpiar_cadena($_POST['usu_usuario_reg']));\n $email=$usuario . '@didadpol.gob.hn' ;\n\n\n /*comprobar campos vacios*/\n if ($nombres == \"\" || $apellidos == \"\" || $usuario == \"\" || $email == \"\" || $rol == \"\" || $identidad == \"\" || $puesto == \"\" || $unidad == \"\") {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO HAS COMPLETADO TODOS LOS CAMPOS QUE SON OBLIGATORIOS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n if (mainModel::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $nombres)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRES SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if (mainModel::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $apellidos)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO APELLIDOS SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if ($celular != \"\") {\n if (mainModel::verificar_datos(\"[0-9]{8}\", $celular)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE CELULAR NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n if (mainModel::verificar_datos(\"[0-9]{13}\", $identidad)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE IDENTIDAD NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar DNI*/\n $check_dni = mainModel::ejecutar_consulta_simple(\"SELECT identidad FROM tbl_usuarios WHERE identidad='$identidad'\");\n if ($check_dni->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE IDENTIDAD YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n if (mainModel::verificar_datos(\"[a-z]{3,15}\", $usuario)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRE DE USUARIO SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 5 Y UN MAXIMO DE 15 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n /*validar usuario*/\n $check_user = mainModel::ejecutar_consulta_simple(\"SELECT nom_usuario FROM tbl_usuarios WHERE nom_usuario='$usuario'\");\n if ($check_user->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL USUARIO YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar email*/\n\n \n $caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n $pass = \"\";\n for ($i = 0; $i < 8; $i++) {\n $pass .= substr($caracteres, rand(0, 64), 1);\n }\n $message = \"<html><body><p>Hola, \" . $nombres . \" \" . $apellidos;\n $message .= \" Estas son tus credenciales para ingresar al sistema de DIDADPOL\";\n $message .= \"</p><p>Usuario: \" . $usuario;\n $message .= \"</p><p>Correo: \" . $email;\n $message .= \"</p><p>Contraseña: \" . $pass;\n $message .= \"</p><p>Inicie sesión aquí para cambiar la contraseña por defecto \" . SERVERURL . \"login\";\n $message .= \"<p></body></html>\";\n\n $res = mainModel::enviar_correo($message, $nombres, $apellidos, $email);\n if (!$res) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE ENVIÓ CORREO ELECTRÓNICO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n $passcifrado = mainModel::encryption($pass);\n\n $datos_usuario_reg = [\n \"rol\" => $rol,\n \"puesto\"=>$puesto,\n \"unidad\"=>$unidad,\n \"usuario\" => $usuario,\n \"nombres\" => $nombres,\n \"apellidos\" => $apellidos,\n \"dni\"=>$identidad,\n \"clave\" => $passcifrado,\n \"estado\" => \"NUEVO\",\n \"email\" => $email,\n \"celular\" => $celular\n ];\n $agregar_usuario = usuarioModelo::agregar_usuario_modelo($datos_usuario_reg);\n if ($agregar_usuario->rowCount() == 1) {\n $alerta = [\n \"Alerta\" => \"limpiar\",\n \"Titulo\" => \"USUARIO REGISTRADO\",\n \"Texto\" => \"LOS DATOS DEL USUARIO SE HAN REGISTRADO CON ÉXITO\",\n \"Tipo\" => \"success\"\n ];\n } else {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE HA PODIDO REGISTRAR EL USUARIO\",\n \"Tipo\" => \"error\"\n ];\n }\n echo json_encode($alerta);\n }", "public function AddSocial(){\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n $id_empresa = 1;\n $facebook = trim($_POST['facebook']);\n $twitter = trim($_POST['twitter']);\n $google_plus = trim($_POST['google_plus']);\n $linkedin = trim($_POST['linkedin']);\n $instagram = trim($_POST['instagram']);\n $pinterest = trim($_POST['pinterest']);\n $whatsapp = trim($_POST['whatsapp']);\n\n $columnas = array(\"id_empresa\", \"facebook\", \"twitter\", \"google_plus\", \"linkedin\", \"instagram\", \"pinterest\", \"whatsapp\");\n $datos = array($id_empresa, $facebook, $twitter, $google_plus, $linkedin, $instagram, $pinterest, $whatsapp);\n\n //ejecyta la insercion\n if($this->ConfigModelo->insert('red_social', $columnas, $datos)){\n\n $_SESSION[\"success\"]=true;\n redireccionar('pages/contacto');\n\n }else{\n echo false;\n }\n\n }else{\n\n $columnas = \"\";\n $datos = \"\";\n\n }\n\n }", "function inserisci_tipo_immobile($nome_immobile=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$nome_immobile= sistemaTesto($nome_immobile);\n\t$q=\"INSERT INTO tipo_immobile (id_tipo_immobile, nome) VALUES (null,'$nome_immobile')\";\n\t$r=$db->query($q);\n\t$id=mysql_insert_id();\n\treturn $id;\n}", "function insertarUsuariostribia($refparticipantes,$cantidadaciertos,$intento,$refestados,$refpremios,$puntobonusa,$aciertobonusa,$puntobonusb,$aciertobonusb) {\r\n$sql = \"insert into dbusuariostribia(idusuariotribia,refparticipantes,cantidadaciertos,intento,refestados,refpremios,puntobonusa,aciertobonusa,puntobonusb,aciertobonusb)\r\nvalues ('',\".$refparticipantes.\",\".$cantidadaciertos.\",\".$intento.\",\".$refestados.\",\".$refpremios.\",\".$puntobonusa.\",\".$aciertobonusa.\",\".$puntobonusb.\",\".$aciertobonusb.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function ulogiraj_registiraj()\r\n\t{\r\n\t\tif(isset($_POST['ulogiraj']))\r\n\t\t{\r\n\t\t\t$this->registry->template->title = 'Login';\r\n\t\t\t$this->registry->template->show( 'login' );\r\n\t\t}\r\n\t\tif(isset($_POST['registriraj']))\r\n\t\t{\r\n\t\t\t$this->registry->template->title = 'Registriraj se';\r\n\t\t\t$this->registry->template->show( 'register' );\r\n\t\t}\r\n\r\n\t}", "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 addmobilisateurindexAction() {\n $sessionmcnp = new Zend_Session_Namespace('mcnp');\n\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmc');\n\n\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\n/////////////////////////////////////controle code membre\nif(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\nif(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n}else{\nif(substr($_POST['code_membre'], -1, 1) == 'P'){\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0){\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n }\n }else if(substr($_POST['code_membre'], -1, 1) == 'M'){\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0){\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n }\n }\n}\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur(0);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmcnp->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateurindex');\n}else{\n $db->rollback();\n $sessionmcnp->error = \"Veuillez renseigner le Code Membre ...\";\n\n} \n } catch (Exception $exc) { \n $db->rollback();\n $sessionmcnp->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionmcnp->error = \"Champs * obligatoire\";\n }\n }\n }", "function incluir_click($sender, $param)\n {\n if ($this->IsValid)\n {\n $this->incluir->Enabled=False;//Se deshabilita boton incluir\n // se capturan los valores de los controles\n $aleatorio = $this->numero->Text;\n $cod_direccion = usuario_actual('cod_direccion');\n $cod_direccion=substr($cod_direccion, 1);\n $siglas = usuario_actual('siglas_direccion');\n $ano = $this->lbl_ano->Text;\n $asunto = str_replace(\"'\", '\\\\\\'', $this->txt_asunto->Text );\n $destinatario = str_replace(\"'\", '\\\\\\'', $this->txt_destinatario->Text );\n $enviadopor=usuario_actual('login');\n $fecha = cambiaf_a_mysql ($this->txt_fecha->Text);\n //$memo=$this->html1->text;\n //busca el nombre del remitente\n $sql3=\"select cedula from intranet.usuarios where(login='$enviadopor')\";\n $resultado3=cargar_data($sql3, $sender);\n $cedula=$resultado3[0]['cedula'];\n $sql3=\"select nombres, apellidos from organizacion.personas where(cedula='$cedula')\";\n $resultado3=cargar_data($sql3, $sender);\n $remitente=$resultado3[0]['nombres'].' '.$resultado3[0]['apellidos'];\n $criterios_adicionales=array('direccion' => $cod_direccion, 'ano' => $ano);\n $numero=proximo_numero(\"organizacion.memoranda\",\"correlativo\",$criterios_adicionales,$this);\n $numero=rellena($numero,4,\"0\");\n // se inserta en la base de datos\n $sql = \"insert into organizacion.memoranda\n (direccion, siglas, correlativo, ano, fecha, asunto, destinatario, status, memo, remitente)\n values ('$cod_direccion','$siglas','$numero','$ano','$fecha','$asunto','$destinatario','1','$memo', '$remitente')\"; \n $resultado=modificar_data($sql,$sender);\n /*$sql2=\"update organizacion.adjuntos set correlativo='$numero' where (correlativo='$aleatorio')\";\n $resultado2=modificar_data($sql2, $sender);*/ \n /* Se incluye el rastro en el archivo de bitácora */\n $descripcion_log = \"Incluido el Memorando: \".$siglas.\"-\".$numero.\"-\".$ano;\n inserta_rastro(usuario_actual('login'),usuario_actual('cedula'),'I',$descripcion_log,\"\",$sender);\n $this->LTB->titulo->Text = \"Solicitud de número de Memorando\";\n $this->LTB->texto->Text = \"Se ha registrado exitosamente el nuevo Memorando con el \".\n \"número: <strong>\".$siglas.\"-\".$numero.\"-\".$ano.\"</strong>\";\n $this->LTB->imagen->Imageurl = \"imagenes/botones/memoranda.png\";\n $this->LTB->redir->Text = \"epaper.incluir_memo\";\n $params = array('mensaje');\n $this->getPage()->getCallbackClient()->callClientFunction('muestra_mensaje', $params);\n\n //$this->mensaje2->setSuccessMessage($sender, \"Se ha registrado exitosamente el nuevo Memorando con el numero:\".$siglas.\"-\".$numero.\"-\".$ano, 'grow');\n\n }\n }", "public function actionAgregar(){\n\t\tif(!in_array($_REQUEST[\"jnfe\"], $_SESSION['datosKey'])){\n\t\t\theader(\"Location: /error.html?error=Your session has Changed\");\n\t\t\texit();\n\t\t}\n\n\t\tif(isset($_REQUEST[\"jnfe\"])){\n\t\t\t$_sql = \"Select venta_id from venta where venta_session_id Like '\" . $_SESSION[\"config\"][\"token\"] . \"' and venta_estt = '1' and venta_fecha Like '\" . date(\"Y-m-d\") . \"%'\";\n\t\t\t$_vValidator = Venta::model()->findAllBySql($_sql);\n\n\t\t\tif( !($_vValidator[0]->venta_id == 0 || $_vValidator[0]->venta_id == \"\")){\n\t\t\t\t$Venta = $_vValidator[0]->venta_id;\n\t\t\t}else{\n\t\t\t\t$_venta = new Venta;\n\t\t\t\t$_SESSION[\"config\"][\"token\"] = Yii::app()->WebServices->getSecureKey(150);\n\t\t\t\t$_venta->venta_session_id \t= $_SESSION[\"config\"][\"token\"];\n\t\t\t\t$_venta->venta_moneda \t\t= $_SESSION[\"config\"][\"currency\"];\n\t\t\t\t$_venta->venta_site_id \t\t= ((Yii::app()->language == \"es\") ? 2 : 1);\n\t\t\t\t$_venta->venta_user_id \t\t= 0;\n\t\t\t\t$_venta->venta_estt \t\t= 1;\n\t\t\t\t$_venta->venta_total \t\t= 0;\n\t\t\t\t$_venta->venta_fecha \t\t= date(\"Y-m-d H:i:s\");\n\t\t\t\t$_venta->venta_ip \t\t\t= Yii::app()->GenericFunctions->getRealIpAddr();\n\t\t\t\t$_venta->save();\n\t\t\t\t$Venta = $_venta->venta_id;\n\t\t\t}\n\n\t\t\t$_Productos = VentaDescripcion::model()->findAll(\"descripcion_venta = :venta\", array(\n\t\t\t\t\":venta\" => $Venta\n\t\t\t));\n\t\t\t/* From the CheckOut */\n\t\t\tif(!isset($_REQUEST['fromDetails'])) {\n\t\t\t\t\n\t\t\t\tif(!in_array($_REQUEST[\"jnfe\"], $_SESSION['datosKey'])){\n\t\t\t\t\theader(\"Location: /error.html?error=Your session has Changed\");\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\n\t\t\t\t$data = explode(\"@@\", Yii::app()->GenericFunctions->ShowVar($_REQUEST[\"jnfe\"]));\n\n\t\t\t\tforeach ($_Productos as $p) {\n\t\t\t\t\tif ($p->descripcion_tipo_producto == 2) {\n\t\t\t\t\t\tif($p->descripcion_producto_id == $data[1]){\n\t\t\t\t\t\t\t$p->delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$promo_seg = \"\";\n\t\t\t\tif(isset($_REQUEST[\"promo_seg\"])){\n\t\t\t\t\t$promo_seg = $_REQUEST[\"promo_seg\"];\n\t\t\t\t}\n\n\n\t\t\t\t$t = new VentaDescripcion;\n\t\t\t\t$t->descripcion_producto \t= ($data[3]);\n\t\t\t\t$t->descripcion_destino \t= $data[12];\n\t\t\t\t$t->descripcion_brief \t\t= addslashes($data[5]);\n\t\t\t\t$t->descripcion_tarifa \t\t= $data[4];\n\t\t\t\t$t->descripcion_venta \t\t= $Venta;\n\t\t\t\t$t->descripcion_fecha \t\t= date(\"Y-m-d H:i:s\");\n\t\t\t\t$t->descripcion_fecha1 \t\t= $data[9];\n\t\t\t\t$t->descripcion_fecha2 \t\t= $data[9];\n\t\t\t\t$t->descripcion_adultos \t= $data[10];\n\t\t\t\t$t->descripcion_menores \t= $data[11];\n\t\t\t\t$t->descripcion_infantes \t= 0;\n\t\t\t\t$t->descripcion_cuartos \t= 1;\n\t\t\t\t$t->descripcion_precio \t\t= $data[15];\n\t\t\t\t$t->descripcion_total \t\t= (str_replace(\",\",\"\",$data[7]) * 1);\n\t\t\t\t$t->descripcion_tipo_producto = 2;\n\t\t\t\t$t->descripcion_tarifa_id \t= $data[0];\n\t\t\t\t$t->descripcion_producto_id = $data[1];\n\t\t\t\t$t->descripcion_servicio_id = $data[2];\n\t\t\t\t$t->descripcion_thumb \t\t= $data[13];\n\t\t\t\t$t->descripcion_reservable \t= $data[8];\n\t\t\t\t$t->descripcion_pagado \t\t= 0;\n\t\t\t\t$t->descripcion_id_cupon \t= $data[14];\t//para el open ticket\n\t\t\t\t$t->descripcion_seg \t\t= substr($promo_seg,1);\t//guarda valor de ofertas\n\t\t\t\t$t->descripcion_seg_tipo \t= substr($promo_seg,0,1);\t//guarda valor del tipo de ofertas\n\t\t\t\t$t->descripcion_precio_nino = $data[16];\n\t\t\t\t$t->save();\n\n\n\t\t\t/* From the Tours details*/\n\t\t\t}else{\n\t\t\t\t$data = unserialize(Yii::app()->GenericFunctions->ShowVar($_REQUEST[\"jnfe\"]));\n\n\t\t\t\tforeach ($_Productos as $p) {\n\t\t\t\t\t//print_r($p->descripcion_producto);\n\t\t\t\t\tif ($p->descripcion_tipo_producto == 2) {\n\t\t\t\t\t\tif($p->descripcion_producto_id == $data['descripcion_producto_id']){\n\t\t\t\t\t\t\t$p->delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\t$promo_seg = \"\";\n\t\t\t\tif(isset($_REQUEST[\"promo_seg\"])){\n\t\t\t\t\t$promo_seg = $_REQUEST[\"promo_seg\"];\n\t\t\t\t}\n\n\n\t\t\t\t$t = new VentaDescripcion;\n\t\t\t\t$t->descripcion_producto \t= $data['descripcion_producto'];\n\t\t\t\t$t->descripcion_destino \t= $data['descripcion_destino'];\n\t\t\t\t$t->descripcion_brief \t\t= addslashes($data['descripcion_brief']);\n\t\t\t\t$t->descripcion_tarifa \t\t= $data['descripcion_tarifa'];\n\t\t\t\t$t->descripcion_venta \t\t= $Venta;\n\t\t\t\t$t->descripcion_fecha \t\t= date(\"Y-m-d H:i:s\");\n\t\t\t\t$t->descripcion_fecha1 \t\t= $data['descripcion_fecha1'];\n\t\t\t\t$t->descripcion_fecha2 \t\t= $data['descripcion_fecha2'];\n\t\t\t\t$t->descripcion_adultos \t= $data['descripcion_adultos'];\n\t\t\t\t$t->descripcion_menores \t= $data['descripcion_menores'];\n\t\t\t\t$t->descripcion_infantes \t= 0;\n\t\t\t\t$t->descripcion_cuartos \t= 1;\n\t\t\t\t$t->descripcion_precio \t\t= $data['descripcion_precio'];\n\t\t\t\t$t->descripcion_total \t\t= (str_replace(\",\",\"\",$data['descripcion_total']) * 1);\n\t\t\t\t$t->descripcion_tipo_producto = 2;\n\t\t\t\t$t->descripcion_tarifa_id \t= $data['descripcion_tarifa_id'];\n\t\t\t\t$t->descripcion_producto_id = $data['descripcion_producto_id'];\n\t\t\t\t$t->descripcion_servicio_id = $data['descripcion_servicio_id'];\n\t\t\t\t$t->descripcion_thumb \t\t= $data['descripcion_thumb'];\n\t\t\t\t$t->descripcion_reservable \t= $data['descripcion_reservable'];\n\t\t\t\t$t->descripcion_pagado \t\t= 0;\n\t\t\t\t$t->descripcion_id_cupon \t= 0;\t//para el open ticket\n\t\t\t\t$t->descripcion_seg \t\t= substr($promo_seg,1);\t//guarda valor de ofertas\n\t\t\t\t$t->descripcion_seg_tipo \t= substr($promo_seg,0,1);\t//guarda valor del tipo de ofertas\n\t\t\t\t$t->descripcion_precio_nino = $data['descripcion_precio_nino'];\n\t\t\t\t$t->save();\n\t\t\t}\n\n\n\t\t\t$this->redirect(array(\"checkout/index\"));\n\t\t}else{\n\t\t\t$this->redirect(array(\"activities/index\"));\n\t\t}\n\n\t}", "public function add(){\n if (isset($_SESSION['identity'])) {// Comprobamos que hay un usuario logueado\n $usuario_id = $_SESSION['identity']->id;// Obtenemos el ID del Usuario logueado\n $sProvincia = isset($_POST['province']) ? $_POST['province'] : false;\n $sLocalidad = isset($_POST['location']) ? $_POST['location'] : false;\n $sDireccion = isset($_POST['address']) ? $_POST['address'] : false;\n\n $stats = Utils::statsCarrito();\n $coste = $stats['total'];// Obtenemos el coste total del pedido\n\n\n if ($sProvincia && $sLocalidad && $sDireccion){\n // Guardar datos en bd\n $oPedido = new Pedido();\n $oPedido->setUsuarioId($usuario_id);\n $oPedido->setProvincia($sProvincia);\n $oPedido->setLocalidad($sLocalidad);\n $oPedido->setDireccion($sDireccion);\n $oPedido->setCoste($coste);\n\n $save = $oPedido->savePedido();// Insertamos el Pedido en BD\n\n // Guardar Linea Pedido\n $save_linea = $oPedido->save_linea();\n\n if ($save && $save_linea){// Comprobamos que La inserccion a sido correcta\n $_SESSION['pedido'] = \"complete\";\n }else{\n $_SESSION['pedido'] = \"failed\";\n }\n }else{\n $_SESSION['pedido'] = \"failed\";\n\n }\n header(\"Location:\" . base_url .'pedido/confirmado');\n }else{\n // Redirigir al Index\n header(\"Location:\" . base_url);\n }\n }", "function addpanier($user, $product, $quantite, $poids){\t// Fonction pour ajouter un produit au panier\n\n\t\tinclude(\"../../modele/modele.php\"); // Inclue la base de donnée + connexion.\n\t\t\n\t\t$actif = '1' ;\n\t\t$sql = 'INSERT INTO detailcommande(id_product, id_user, quantite, poids, actif) VALUES (:id_product , :id_user , :quantite , :poids, :actif) '; // Ajout d'une ligne dans la table detailCommande \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // suivant les informations entrer dans la fonction panier.\n\t\t$reponse = $bdd->prepare($sql);\t\t\t// Preparation de la requete SQL.\n\t\t$reponse -> bindParam(':id_product', $product);\n\t\t$reponse -> bindParam(':id_user', $user);\n\t\t$reponse -> bindParam(':quantite', $quantite);\n\t\t$reponse -> bindParam(':poids', $poids);\n\t\t$reponse -> bindParam(':actif', $actif );\n\t\t$reponse ->execute();\t\t\t\t\t// Execution de la requete SQL.\n\n\t\t$sql3 = 'SELECT * FROM detailcommande WHERE id_product = \"'.$product.'\" AND id_user = \"'.$user.'\" AND quantite = \"'.$quantite.'\" AND poids=\"'.$poids.'\" AND actif = 1 ';\n\t\t$reponse3 = $bdd->query($sql3);\n\t\twhile ($donnees = $reponse3 -> fetch())\t\t// Mise en forme de tableau.\n\t\t\t{\n\t\t\t\t$actif = '1' ;\n\t\t\t\t$id_detailCommande = $donnees['id'];\n\t\t\t\t$sql2 = 'INSERT INTO commande(id_user, id_detailCommande, date, actif) VALUES (:id_user, :id_detailCommande, CURDATE(), :actif)'; \t// Ajout d'une ligne dans la table commande\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// suivant les informations d'entrées\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Ajout date ???\n\t\t\t\t$reponse2 = $bdd->prepare($sql2);\n\t\t\t\t$reponse2 -> bindParam(':id_user', $user);\n\t\t\t\t$reponse2 -> bindParam(':id_detailCommande', $id_detailCommande);\n\t\t\t\t$reponse2 -> bindParam(':actif', $actif );\n\t\t\t\t$reponse2 ->execute();\n\t\t\t}\n\t}", "public function creerAgence() {\n $resultPersonne = false;\n $resultMor = false;\n $resultPersRole = false;\n $resultUser = false;\n\n\n $denom = $this->input->post('denom');\n $siege = $this->input->post('siege');\n $email = $this->input->post('email');\n $username = $this->input->post('login');\n $motdepasse = $this->input->post('motdepasse');\n\n if (!empty($denom) && !empty($siege) && !empty($email) && !empty($username) && !empty($motdepasse)) {\n\n //var_dump($_POST['nom']);\n //Insertion dans la table Personne\n $resultPersonne = $this->Personne->creerPersonne($siege, $email, null, null, null, null, null);\n\n //Recuperation de l'ID de la personne via son email\n $resuultPersonneEmail = $this->Personne->getPersonne_ByMail($email);\n foreach ($resuultPersonneEmail->result() as $row) {\n $idPersonneCree = $row->idPersonne;\n }\n\n //Insertion dans la table Morale\n $resultMor = $this->Morale->creerMorale($idPersonneCree, $denom, $siege);\n\n //Insertion dans la table Personne_has_role (Liaison Personne et role\n $resultRole = $this->Role->getRole_ByLibelle('agence');\n foreach ($resultRole->result() as $row) {\n $idRoleAgence = $row->idrole;\n }\n\n //INSERTION\n $resultPersRole = $this->Personne_has_role->creerPersonneHasRole($idPersonneCree, $idRoleAgence,$idPersonneCree);\n\n //Insertion dans la table USER\n $resultUser = $this->User->creerUser($idPersonneCree, $username, $motdepasse, $email, null);\n\n if ($resultPersonne == true and $resultMor == true and $resultPersRole == true and $resultUser == true) {\n echo \"Success\";\n //redirect('login/login');\n } else {\n echo \"Echec au niveau des insertions\";\n }\n } else {\n echo \"Echec\";\n }\n }", "function add_nuevo_simbolo($id_palabra,$tipo_simbolo,$idioma,$estado,$castellano,$registrado,$mayusculas,$contraste,$marco) {\n\t\t$timestamp=time();\n\t\t$fecha=date(\"Y-m-d H:i:s\",$timestamp);\n\t\t\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$ssql = \"INSERT INTO simbolos \n\t\t(id_palabra, id_tipo_simbolo, id_idioma, castellano, mayusculas, marco, contraste, estado, fecha_alta, fecha_modificado, registrado) \n\t\tVALUES ('$id_palabra', '$tipo_simbolo', '$idioma', '$castellano', '$mayusculas', '$marco', '$contraste', '$estado', '$fecha', '$fecha','$registrado')\";\n\t\t\t\n\t\t\t//lo inserto en la base de datos\n\t\t\tif (mysql_query($ssql,$connection)){\n\t\t\t\t//recibo el último id\n\t\t\t\t$ultimo_id = mysql_insert_id($connection);\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn $ultimo_id;\n\t\t\t}else{\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn false;\n\t\t\t} \t\t\n\t}", "public function store(MobiliariosRequest $request)\n {\n Bitacoras::bitacora(\"Registro de nuevo mobiliario: \".$request['nombre']);\n $mobiliario = new Mobiliarios;\n $mobiliario->codigo = $request->codigo;\n $mobiliario->nombre= $request->nombre;\n $mobiliario->fecha_compra= $request->fecha_compra;\n $mobiliario->precio= $request->precio;\n $mobiliario->descripcion =$request->descripcion;\n $mobiliario->estado = $request->estado;\n $mobiliario->nuevo = $request->nuevo;\n if($request->nuevo == 1){\n $mobiliario->anios=null;\n }else\n {\n if($request->anios == '' && $request->anios2 != ''){\n $mobiliario->anios = $request->anios2;\n }else{\n $mobiliario->anios = $request->anios;\n }\n }\n $mobiliario->proveedor_id = $request->proveedor_id;\n $mobiliario->tipo_id = $request->tipo_id;\n $mobiliario->credito = $request->credito;\n $mobiliario->iva=$request->iva;\n if($request->credito == 0 )\n {\n $mobiliario->interes=null;\n $mobiliario->num_cuotas=null;\n $mobiliario->val_cuotas=null;\n $mobiliario->tiempo_pago=null;\n $mobiliario->cuenta=null;\n }else\n {\n $mobiliario->interes= $request->interes;\n $mobiliario->num_cuotas= $request->num_cuotas;\n $mobiliario->val_cuotas= $request->val_cuotas;\n $mobiliario->tiempo_pago= $request->tiempo_pago;\n $mobiliario->cuenta= $request->cuenta;\n }\n\n $mobiliario->save();\n return redirect('/mobiliarios')->with('mensaje','Registro Guardado');\n }", "function inserir() {\n\t\t$this->sql = mysql_query(\"INSERT INTO suporte (user_cad, data_cad, id_regiao, exibicao, tipo, prioridade, assunto, mensagem, arquivo, status, status_reg,suporte_pagina)\n\t\t\t\t\t VALUES\t('$this->id_user_cad ','$this->data_cad','$this->id_regiao', '$this->exibicao', '$this->tipo','$this->prioridade', '$this->assunto', '$this->menssagem', '$this->tipo_arquivo','1','1','$this->pagina');\") or die(mysql_error());\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\n\t\t}", "function ADD()\n{\n\t$comprobar = $this->comprobar_atributos(); //Busca si la tupla es correcta o tiene algun error\n\n\tif($comprobar == true)//si la tupla no tiene errores\n\t{\n\t\t$sql = \"select * from USUARIOS where login = '\".$this->login.\"'\";\n\n\t\tif (!$result = $this->mysqli->query($sql)) //Si la sentencia sql no devuelve información\n\t\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t\t}\n\n\t\tif ($result->num_rows == 1){ // existe el usuario\n\t\t\t\treturn 'Inserción fallida: el elemento ya existe';\n\t\t\t}\n\n\t\t$sql = \"INSERT INTO USUARIOS (\n\t\t\tlogin,\n\t\t\tpassword,\n\t\t\tDNI,\n\t\t\tnombre,\n\t\t\tapellidos,\n\t\t\ttelefono,\n\t\t\temail,\n\t\t\tFechaNacimiento,\n\t\t\tfotopersonal,\n\t\t\tsexo\n\t\t\t) \n\t\t\t\tVALUES (\n\t\t\t\t\t'\".$this->login.\"',\n\t\t\t\t\t'\".$this->password.\"',\n\t\t\t\t\t'\".$this->DNI.\"',\n\t\t\t\t\t'\".$this->nombre.\"',\n\t\t\t\t\t'\".$this->apellidos.\"',\n\t\t\t\t\t'\".$this->telefono.\"',\n\t\t\t\t\t'\".$this->email.\"',\n\t\t\t\t\t'\".$this->FechaNacimiento.\"',\n\t\t\t\t\t'\".$this->fotopersonal.\"',\n\t\t\t\t\t'\".$this->sexo.\"'\n\t\t\t\t\t)\";\n\n\t\tif (!$this->mysqli->query($sql)) { //Si la sentencia sql no devuelve información\n\t\t\treturn 'Error de gestor de base de datos';\n\t\t}\n\t\telse{\n\t\t\treturn 'Inserción realizada con éxito'; //operacion de insertado correcta\n\t\t}\n\t}\t\t\t\n\telse\n\t{\n\t\treturn $comprobar;\n\t}\t\n}", "function registrar(){\n\n\t\t\t\n\t\t$sql = \"INSERT INTO USUARIOS (\n\t\t\tlogin,\n\t\t\tpassword,\n\t\t\tnombre,\n\t\t\tapellidos,\n\t\t\temail,\n\t\t\tDNI,\n\t\t\ttelefono,\n\t\t\tFechaNacimiento,\n\t\t\tfotopersonal,\n\t\t\tsexo\n\t\t\t) \n\t\t\t\tVALUES (\n\t\t\t\t\t'\".$this->login.\"',\n\t\t\t\t\t'\".$this->password.\"',\n\t\t\t\t\t'\".$this->nombre.\"',\n\t\t\t\t\t'\".$this->apellidos.\"',\n\t\t\t\t\t'\".$this->email.\"',\n\t\t\t\t\t'\".$this->DNI.\"',\n\t\t\t\t\t'\".$this->telefono.\"',\n\t\t\t\t\t'\".$this->FechaNacimiento.\"',\n\t\t\t\t\t'\".$this->fotopersonal.\"',\n\t\t\t\t\t'\".$this->sexo.\"'\n\n\t\t\t\t\t)\";\n\t\t\t\t\t\t\t\t\n\t\tif (!$this->mysqli->query($sql)) { //Si la sentencia sql no devuelve información\n\t\t\treturn 'Error de gestor de base de datos';\n\t\t}\n\t\telse{\n\t\t\treturn 'Inserción realizada con éxito'; //si es correcta\n\t\t}\t\t\n\t}", "public function create_post(){\n\n $this->form_validation->set_rules('domicilio[latitud]', 'Latitud del Domicilio', 'required|trim');\n $this->form_validation->set_rules('domicilio[longitud]', 'Longitud del Domicilio', 'required|trim');\n $this->form_validation->set_rules('domicilio[image]', 'Imagen del Mapa', 'required|trim');\n\n\t\tif( $this->form_validation->run() == true){\n \n $data = $this->security->xss_clean($this->input->post()); # XSS filtering\n\n $token = $this->security->xss_clean($this->input->post('auth', TRUE)); //token de authentication\n $is_valid_token = $this->authorization_token->validateToken($token);\n\n if(null !== $is_valid_token && $is_valid_token['status'] === TRUE){\n $usuario = $this->Usuario_model->getByTokenJWT($is_valid_token['data']);\n $domicilio = $data[\"domicilio\"];\n\n if (array_key_exists('persona', $data)) {\n $domicilio['id_persona'] = $data[\"persona\"]['id'];\n }\n $domicilio['id_usuario'] = $usuario->id;\n $out_domicilio = $this->Domicilio_model->create( $domicilio );\n\n if($out_domicilio != null){\n\n $this->response([\n 'status' => true,\n 'message' => $this->lang->line('item_was_has_add'),\n $this->lang->line('domicilio') => $out_domicilio\n ], REST_Controller::HTTP_OK);\n }else{\n $this->response([\n 'status' => false,\n 'message' => $this->lang->line('no_item_was_has_add')\n ], REST_Controller::HTTP_CREATED);\n }\n }else{\n $this->response([\n 'status' => false,\n 'message' => $this->lang->line('token_is_invalid'),\n ], REST_Controller::HTTP_NETWORK_AUTHENTICATION_REQUIRED); // NOT_FOUND (400) being the HTTP response code\n }\n\t\t}else{\n $this->response([\n 'status' => false,\n 'message' => validation_errors()\n ], REST_Controller::HTTP_ACCEPTED); \n\t\t}\n $this->set_response($this->lang->line('server_successfully_create_new_resource'), REST_Controller::HTTP_RESET_CONTENT);\n }", "private function ajoutauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t$this->_ctrlAuteur->auteurAjoute();\n\t}", "function act_subfamilia(){\n\t\t$u= new Subfamilia_producto();\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\n\t\t$related = $u->from_array($_POST);\n\t\tif($u->save($related)) {\n\t\t\techo \"<html> <script>alert(\\\"Se han registrado los datos de la Subfamilia de Productos.\\\"); window.location='\".base_url().\"index.php/\".$GLOBALS['ruta'].\"/productos_c/formulario/list_subfamilias';</script></html>\";\n\t\t} else\n\t\t\tshow_error(\"\".$u->error->string);\n\t}", "function registrarProducto(){\n\n //recoge el json enviado por ajax\n $json = json_decode(file_get_contents('php://input'), true);\n $mensaje = \"\";\n\n try{\n //por cada producto hace una insercion\n foreach ($json as $product) {\n\n $nombre = $product[\"nombre\"];\n $codigo = $product[\"codigo\"];\n $descripcion = $product[\"descripcion\"];\n\n\n $this->model->insertProducto([\n 'nombre' => $nombre,\n 'codigo' => $codigo,\n 'descripcion' => $descripcion\n ]);\n }\n echo \"ok\";\n }catch(PDOException $e){\n echo \"ko\";\n }\n\n $this->view->mensaje = $mensaje;\n $this->render();\n }", "public function NewMobidul ()\n {\n \\Log::info(\"New Mobidul begin!\");\n\n $request = Request::instance();\n $content = $request->getContent();\n\n $json = json_decode($content);\n $code = $json->code;\n $name = $json->name;\n $mode = $json->mode;\n\n $description = isset($json->description)\n ? $json->description\n : 'Ein tolles Mobidul entsteht hier.';\n\n //check if mobidul code is a protected key word\n if ( $this->isMobidulCodeProtected($code) )\n return $response = [\n 'success' => false,\n 'msg' => 'WSC_MOBIDUL_PROTECTED'\n ];\n\n\n if ( ! Mobidul::HasMobidulId($code) )\n {\n \\Log::info(\"Mobidul gets created!\");\n\n $mobidul = Mobidul::create(\n [\n 'name' => $name,\n 'code' => $code,\n 'description' => $description,\n 'mode' => $mode\n ]);\n\n $userId = Auth::id();\n //$category = Category::create(['name' => 'Allgemein', 'mobidulId' => $mobidul->id]);\n\n DB::table('user2mobidul')->insert(\n [\n 'userId' => $userId,\n 'mobidulId' => $mobidul->id,\n 'rights' => 1\n ]);\n\n\n return $response = [\n 'success' => true,\n 'msg' => 'WSC_MOBIDUL_SUCCESS',\n 'code' => $code\n ];\n }\n else\n return $response = [\n 'success' => false,\n 'msg' => 'WSC_MOBIDUL_IN_USE'\n ];\n }", "public function agregar(){\n if(!isLoggedIn()){\n redirect('usuarios/login');\n }\n //check User Role -- Only ADMINISTRADOR allowed\n if(!checkLoggedUserRol(\"ADMINISTRADOR\")){\n redirect('dashboard');\n }\n\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n \n // Sanitize POST array\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n $data = [\n 'nombreEspecialidad' => trim($_POST['nombreEspecialidad'])\n ];\n\n // Validar Nombre Especialidad obligatorio\n if(empty($data['nombreEspecialidad'])){\n $data['nombreEspecialidad_error'] = 'Por favor ingrese un titulo para la especialidad';\n }\n\n // Validar Nombre Especialidad existente\n if($this->especialidadModel->checkEspecialidad($data['nombreEspecialidad'])){\n $data['nombreEspecialidad_error'] = 'La especialidad que intentó agregar ya existe';\n }\n\n // Asegurarse que no haya errores\n if(empty($data['nombreEspecialidad_error'])){\n // Crear especialidad\n if($this->especialidadModel->agregarEspecialidad($data['nombreEspecialidad'])){\n flash('especialidad_success', 'Especialidad creada correctamente');\n redirect('especialidades');\n }\n else{\n die('Ocurrió un error inesperado');\n }\n }\n else{\n flash('especialidad_error', $data['nombreEspecialidad_error'], 'alert alert-danger');\n redirect('especialidades');\n }\n }\n }", "function Integrar()\n\t{\n\t\t$usuario = UsuarioFacebook::ObtenerUsuarioActivo();\n\t\tif(!$usuario->TienePermiso('IntegrarUsuarios'))\n\t\tthrow new Exception('No puede integrar usuarios al club porque no tiene permisos para hacerlo');\n\t\tif($this->EsMiembroClubOrion)\n\t\tthrow new Exception('Este usuario ya está vinculado al club');\n\t\t$conexionBd = new ConectorBaseDatos();\n\t\t$conexionBd->Sentencia = sprintf(\"UPDATE UsuarioFacebook SET ValidadoPor = %s WHERE IdFacebook = %s\",\n\t\t$conexionBd->Escapar($usuario->IdFacebook),\n\t\t$conexionBd->Escapar($this->IdFacebook)\n\t\t);\n\t\t$conexionBd->EjecutarComando();\n\t\t$conexionBd->Desconectar();\n\t\t$this->validadoPorIdFacebook = $usuario->IdFacebook;\n\t\tGrupo::RegistrarEnPredeterminados($this);\n\t}", "protected function fijarSentenciaInsert(){}", "function inscription()\n{\n $token = bin2hex(random_bytes(64));\n $codeHebergement = substr($token,0,13);\n $nom = $_POST['nom'];\n $paye = $_POST['paye'];\n $ville = $_POST['ville'];\n $adress = $_POST['adress'];\n $adressMap = $_POST['adressMap'];\n $responsable = $_POST['responsable'];\n $description = $_POST['description'];\n $logo = upload();\n $telephon = $_POST['telephon'];\n $email = $_POST['email'];\n $password = $_POST['password'];\n\n // echo json_encode([\n // 'imputs' => $_POST,\n // 'logo' => $logo\n // ]);\n\n\n $hebergementService = new HebergementService();\n\n echo json_encode($hebergementService->inscription(new Hebergement($codeHebergement, $nom, $paye, $ville, $adress, $adressMap, $responsable, $description, $logo, $telephon, $email, $password)));\n echo 'message de serveur : ' . '\\' ca marche le nom est : ' . $codeHebergement . ' \\'';\n\n}", "public function ocenture_insert() {\r\n\r\n Logger::log(\"inserting user manually into ocenture\");\r\n require_once( OCENTURE_PLUGIN_DIR . 'lib/Ocenture.php' );\r\n\r\n $ocenture = new Ocenture_Client($this->clientId);\r\n\r\n $params = [\r\n 'args' => [\r\n 'ProductCode' => 'YP83815',\r\n 'ClientMemberID' => 'R26107633',\r\n 'FirstName' => 'Francoise ',\r\n 'LastName' => 'Rannis Arjaans',\r\n 'Address' => '801 W Whittier Blvd',\r\n 'City' => 'La Habra',\r\n 'State' => 'CA',\r\n 'Zipcode' => '90631-3742',\r\n 'Phone' => '(562) 883-3000',\r\n 'Email' => '[email protected]',\r\n 'Gender' => 'Female',\r\n 'RepID' => '101269477',\r\n ]\r\n ];\r\n \r\n Logger::log($params);\r\n $result = $ocenture->createAccount($params);\r\n //if ($result->Status == 'Account Created') \r\n {\r\n $params['args']['ocenture'] = $result;\r\n $this->addUser($params['args']); \r\n }\r\n Logger::log($result);\r\n \r\n }", "function add_multi() {\n \t\t//-- step 1 pilih kode pelanggan\n \t\t$this->load->model('customer_model');\n\t\t$this->load->model('bank_accounts_model');\n \t\t$data['no_bukti']=$this->nomor_bukti();\n\t\t$data['date_paid']=date('Y-m-d');\n\t\t$data['how_paid']='Cash';\n\t\t$data['amount_paid']=0;\n\t\t$data['mode']='add';\n\t\t$data['customer_number']='';\n\t\t$data['how_paid_acct_id']='';\n\t\t$data['how_paid']='';\n\t\t$data['customer_list']=$this->customer_model->customer_list();\n\t\t$data['account_list']=$this->bank_accounts_model->account_number_list();\n\t\t$data['credit_card_number']='';\n\t\t$data['expiration_date']=date('Y-m-d');\n\t\t$data['from_bank']='';\n\t\t$this->template->display_form_input('sales/payment_multi',$data,'');\t\t\t\n\t\t\n }", "function alta_familia(){\n\t\t$u= new Familia_producto();\n\t\t$u->fecha_alta=date(\"Y/m/d\");\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 ha registrado los datos de la Familia de Productos.\\\"); 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 actionCreate($id_informacion = NULL) {\n $model = new GestionComentarios;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['GestionComentarios'])) {\n $model->attributes = $_POST['GestionComentarios'];\n date_default_timezone_set('America/Guayaquil'); // Zona horaria de Guayaquil Ecuador\n $model->fecha = date(\"Y-m-d H:i:s\");\n $model->id_vehiculo = $_POST['GestionComentarios']['id_vehiculo'];\n\n if ($model->save()) {\n $cargo_id = (int) Yii::app()->user->getState('cargo_id');\n $grupo_id = (int) Yii::app()->user->getState('grupo_id');\n $id_asesor = Yii::app()->user->getId();\n $dealer_id = $this->getDealerId($id_asesor);\n $concesionarioid = $this->getConcesionarioDealerId($_POST['GestionComentarios']['id_responsable_enviado']);\n $not = new GestionNotificaciones;\n require_once 'email/mail_func.php';\n if ($cargo_id == 70) { // jefe de almacen\n // enviar notificacion al jefe de almacen\n $not->tipo = 5; // tipo seguimiento\n $not->paso = 12;\n $not->id_informacion = $_POST['GestionComentarios']['id_informacion'];\n $not->id_asesor = $_POST['GestionComentarios']['id_responsable_recibido'];\n $not->id_dealer = $this->getDealerId(Yii::app()->user->getId());\n $not->descripcion = 'Se ha creado un nuevo comentario';\n $not->fecha = date(\"Y-m-d H:i:s\");\n $not->id_asesor_envia = $_POST['GestionComentarios']['id_responsable_enviado'];\n $not->id_agendamiento = $model->id;\n $not->save();\n\n $asunto = 'Kia Motors Ecuador - Comentario enviado por Jefe de Sucursal; ' . $this->getResponsable($_POST['GestionComentarios']['id_responsable_enviado']) . '.';\n $email = $this->getAsesorEmail($_POST['GestionComentarios']['id_responsable_recibido']);\n //die('email asesor: '.$email);\n $general = '<body style=\"margin: 10px;\">\n <div style=\"width:600px; margin:0 auto; font-family:Arial, Helvetica, sans-serif; font-size: 11px;\">\n <div align=\"\">\n <img src=\"images/header_mail.jpg\"><br>\n <p style=\"margin: 2px 0;\">Señor(a): Asesor de Ventas: ' . $this->getResponsable($_POST['GestionComentarios']['id_responsable_recibido']) . '</p>\n <p></p> <br /> \n\n <p style=\"margin: 2px 0;\">Se ha generado un comentario desde la plataforma de comentarios.</p><br /> \n \n <p style=\"margin: 2px 0;\">A continuación le presentamos el detalle:</p><br /><br />\n \n <table width=\"600\">\n <tr><td><strong>Jefe Comercial:</strong></td><td>' . $this->getResponsable($id_asesor) . '</td></tr>\n <tr><td><strong>Concesionario:</strong></td><td>' . $this->getNombreConcesionario($concesionarioid) . '</td></tr> \n <tr><td><strong>Modelo:</strong></td><td>' . $this->getModeloTestDrive($_POST['GestionComentarios']['id_vehiculo']) . '</td></tr>\n <tr><td><strong>Fecha:</strong></td><td>' . date(\"d\") . \"/\" . date(\"m\") . \"/\" . date(\"Y\") . '</td></tr>\n <tr><td><strong>Hora:</strong></td><td>' . date(\"H:i:s\") . '</td></tr>\n </table>\n <br/><br />\n <p style=\"margin: 2px 0;\">Por favor ingresar a la plataforma,<a href=\"' . Yii::app()->createAbsoluteUrl('gestionComentarios/create', array('id_informacion' => $_POST['GestionComentarios']['id_informacion'], 'id' => $model->id, 'validate' => 'true')) . '\">Aquí</a></p><br />\n <p>Kia Motors Ecuador</p><br /><br />\n\n \n </div>\n </div>\n </body>';\n }\n if ($cargo_id == 71) { // asesor de ventas\n \n // enviar notificacion al asesor de ventas\n $not->tipo = 5; // tipo seguimiento\n $not->paso = 12;\n $not->id_informacion = $_POST['GestionComentarios']['id_informacion'];\n $not->id_asesor = $_POST['GestionComentarios']['id_responsable_recibido'];\n $not->id_dealer = $this->getDealerId(Yii::app()->user->getId());\n $not->descripcion = 'Se ha creado un nuevo comentario';\n $not->fecha = date(\"Y-m-d H:i:s\");\n $not->id_asesor_envia = $_POST['GestionComentarios']['id_responsable_enviado'];\n $not->id_agendamiento = $model->id;\n $not->save();\n $nombre_jefe_sucursal = $this->getNombresJefeConcesion(70, $grupo_id, $dealer_id);\n $email = $this->getEmailJefeConcesion(70, $grupo_id, $dealer_id); //email jefe de sucursal\n //die('nombre jefe de sucursal; '.$nombre_jefe_sucursal);\n $asunto = 'Kia Motors Ecuador - Comentario enviado por Asesor de Ventas: ' . $this->getResponsable($_POST['GestionComentarios']['id_responsable_recibido']) . '.';\n $general = '<body style=\"margin: 10px;\">\n <div style=\"width:600px; margin:0 auto; font-family:Arial, Helvetica, sans-serif; font-size: 11px;\">\n <div align=\"\">\n <img src=\"images/header_mail.jpg\"><br>\n <p style=\"margin: 2px 0;\">Señor(a): Jefe de Sucursal: ' . $nombre_jefe_sucursal . '</p>\n <p></p> <br /> \n\n <p style=\"margin: 2px 0;\">Se ha generado un comentario desde la plataforma de comentarios.</p><br /> \n \n <p style=\"margin: 2px 0;\">A continuación le presentamos el detalle:</p><br /><br />\n \n <table width=\"600\">\n <tr><td><strong>Asesor de Ventas:</strong></td><td>' . $this->getResponsable($id_asesor) . '</td></tr>\n <tr><td><strong>Concesionario:</strong></td><td>' . $this->getNombreConcesionario($concesionarioid) . '</td></tr> \n <tr><td><strong>Modelo:</strong></td><td>' . $this->getModeloTestDrive($_POST['GestionComentarios']['id_vehiculo']) . '</td></tr>\n <tr><td><strong>Fecha:</strong></td><td>' . date(\"d\") . \"/\" . date(\"m\") . \"/\" . date(\"Y\") . '</td></tr>\n <tr><td><strong>Hora:</strong></td><td>' . date(\"H:i:s\") . '</td></tr>\n </table>\n <br/><br />\n <p style=\"margin: 2px 0;\">Por favor ingresar a la plataforma,<a href=\"' . Yii::app()->createAbsoluteUrl('gestionComentarios/create', array('id_informacion' => $_POST['GestionComentarios']['id_informacion'], 'id' => $model->id, 'validate' => 'true')) . '\">Aquí</a></p><br />\n <p>Kia Motors Ecuador</p><br /><br />\n\n \n </div>\n </div>\n </body>';\n }\n $codigohtml = $general;\n $headers = 'From: [email protected]' . \"\\r\\n\";\n $headers .= 'Content-type: text/html' . \"\\r\\n\";\n //$email = '[email protected]'; //email administrador\n\n $send = sendEmailInfo('[email protected]', \"Kia Motors Ecuador\", $email, html_entity_decode($asunto), $codigohtml);\n\n $this->render('create', array(\n 'model' => $model,\n ));\n exit();\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function setInsert() {\n //monta um array com os dados do formulario de inclusao\n $agenda = array('nome' => $this->input->post('nome'),\n 'email' => $this->input->post('email'),\n 'telefone' => $this->input->post('telefone'),\n 'CELULAR' => $this->input->post('CELULAR'));\n //salva os registro no banco de dados \n if ($this->AgendaModel->save($agenda)){\n echo json_encode(array('success'=>true));\n } else {\n echo json_encode(array('msg'=>'Ocorreio um erro, ao incluir o registro.'));\n }\n }", "public function insert($usuario_has_hojaruta);", "public function adiciona1()\n\t {\n\t\t\t$car=$_REQUEST['car'];\n\t\t\t$per=$_REQUEST['per'];\n\t\t\t$logi=$_REQUEST['logi'];\n\t\t\t$pas=$_REQUEST['pas'];\n\t\t\t$obs=$_REQUEST['obs'];\n\t\t\t$est=$_REQUEST['est'];\n\t\t\t//$usu=$_REQUEST['usu'];\n\t\t\t$user_data=array();\n\t\t\t$user_data['carnet']=$car;\n\t\t\t$user_data['login']=$logi;\n\t\t\t$user_data['password']=$pas;\n\t\t\t$user_data['estado']=$est;\n\t\t\t$user_data['observacion']=$obs;\n\t\t\t$user_data['perfil']=$per;\n\t\t\t//print_r($user_data);\n\t\t\t$usuario=new Usuarios;\n\t\t\t$usuario->set($user_data);\n\t\t\t//print_r($_SERVER['REQUEST_URI']);\n\t\t\t$data1=$usuario->lista();\n\t\t\t$this->principal();\n\t }", "public function create()\n {\n \n echo \"Syntax: POST: /api?telefon=*telefon*&id_agencija=*id*<br>/api?email=*email*&id_agencija=*id*\";\n \n }", "function registerMadMimi() {\n\t\t//\n\t\tApp::import('Vendor', 'MadMimi', array('file' => 'madmimi' . DS . 'MadMimi.class.php'));\n\t\tApp::import('Vendor', 'MadMimi', array('file' => 'madmimi' . DS . 'Spyc.class.php'));\n\n\t\t// Crear el objeto de Mad Mimi\n\t\t//\n\t\t$mailer = new MadMimi(Configure::read('madmimiEmail'), Configure::read('madmimiKey'));\n\t\t$userMimi = array('email' => $_POST[\"email\"], 'firstName' => $_POST[\"name\"], 'add_list' => 'mailing');\n\t\t$mailer -> AddUser($userMimi);\n\t\techo true;\n\t\tConfigure::write(\"debug\", 0);\n\t\t$this -> autoRender = false;\n\t\texit(0);\n\t}", "public function registrar(){\n $cedula = $_POST['cedula'];\n $nombre = $_POST['nombre'];\n $apellido = $_POST['apellido'];\n $edad = $_POST['edad'];\n \n //2. Crear un objeto Estudiante y enviar a actualizar\n $estudiante = new Estudiante($cedula,$nombre,$apellido,$edad); \n \n //3. llamar al modelo para registar un Estudiante\n $this->model->registrarEstudiante($estudiante);\n \n //4. redirección index. \n $mensaje= \"El estudiante fue registrado de manera correcta!\";\n Util::mostarAlerta($mensaje);\n }", "public function agregarUsuarioController(){\n //se verifica que el ultimo elemento de la lista contenga algo \n if(isset($_POST[\"tipo_cliente\"]) && $_POST[\"tipo_cliente\"] != \"\"){\n //Se almacena la informacion en un arreglo asociativo\n $datosController = array( \"tipo_cliente\"=>$_POST[\"tipo_cliente\"],\n \"telefono\"=>$_POST[\"telefono\"],\n \"nombre\"=>$_POST[\"nombre\"],\n \"ap_paterno\"=>$_POST[\"ap_paterno\"],\n \"ap_materno\"=>$_POST[\"ap_materno\"]\n );\n //Se habla a la clase DATOS para poder enviarle la peticion de agregar un nuevo registro, enviandole el arreglo y la tabla.\n $respuesta = Datos::agregarUsuariosModel($datosController,\"clientes\");\n\n if($respuesta == true){\n //En caso positivo nos redirecciona al cliente.\n echo '<script>\t\t\n\t\t\t location.href= \"index.php?action=cliente\";\n\t\t </script>';\n \n }else{\n //En caso negativo nos deja en la misma ventana.\n echo '<div class=\"alert alert-warning\" role=\"alert\"> <strong>Error!</strong> Revise el contenido que desea agregar. </div>';/*\n echo '<script>\t\t\n\t\t\t location.href= \"index.php?action=agregar_cliente\";\n\t\t </script>';*/\n }\n }\n }", "public function inserir_anuncio(){\n if(!isset($_SESSION))session_start();\n\n $cliente = unserialize($_SESSION['cliente']);\n\n $id_veiculo = $_POST['cb_veiculos'];\n $data_inicial = $_POST['data_inicial'];\n $data_final = $_POST['data_final'];\n $hora_inicial = $_POST['hora_inicial'];\n $hora_final = $_POST['hora_final'];\n $descricao = $_POST['descricao'];\n $valor_hora = $_POST['valor_hora'];\n $id_cliente = $cliente->getId();\n\n $anuncio = new Anuncio();\n $anuncio->setDescricao($descricao)\n ->setIdClienteLocador($id_cliente)\n ->setIdVeiculo($id_veiculo)\n ->setHorarioInicio($hora_inicial)\n ->setHorarioTermino($hora_final)\n ->setDataInicial($data_inicial)\n ->setDataFinal($data_final)\n ->setValor($valor_hora);\n\n\n $this->anunciosDAO->insert($anuncio);\n\n }", "public function actionaddUniquePhone()\n\t{\n\t\t\n\t\tif($this->isAjaxRequest())\n\t\t{\n\t\t\tif(isset($_POST['userphoneNumber'])) \n\t\t\t{\n\t\t\t\t$sessionArray['loginId']=Yii::app()->session['loginId'];\n\t\t\t\t$sessionArray['userId']=Yii::app()->session['userId'];\n\t\t\t\t$loginObj=new Login();\n\t\t\t\t$total=$loginObj->gettotalPhone($sessionArray['userId'],1);\n\t\t\t\tif($total > 1)\n\t\t\t\t{\n\t\t\t\t\techo \"Limit Exist!\";\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t$totalUnverifiedPhone=$loginObj->gettotalUnverifiedPhone($sessionArray['userId'],1);\n\t\t\t\tif($totalUnverifiedPhone==1)\n\t\t\t\t{\n\t\t\t\t\techo \"Please first verify unverified phone.\";\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$result=$loginObj->addPhone($_POST,1,$sessionArray);\n\t\t\t\t\n\t\t\t\tif($result['status']==0)\n\t\t\t\t{\n\t\t\t\t\techo \"success\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo $result['message']; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->render(\"/site/error\");\n\t\t}\n\t}", "function __registerContribution()\n {\n\n $db = Database::getInstance();\n $mysqli = $db->getConnection();\n\n $amount = $this->Fillables['AmountContributed'];\n //The JSON data.\n\n $url = 'http://achors.hipipo.mojaloop-hackathon.io:4101/transfers';\n\n //Initiate cURL.\n $ch = curl_init( $url );\n\n //The JSON data.\n $jsonData = array(\n 'from' =>array(\n 'displayName'=> 'Lwanga',\n 'idType'=> 'MSISDN',\n 'idValue'=> '260222222222'\n ), 'to'=>array(\n 'idType'=> 'MSISDN',\n 'idValue'=> '610298765432'\n ),\n 'amountType'=> 'SEND',\n 'currency'=>'ZMW',\n 'amount'=> $amount,\n 'transactionType'=> 'TRANSFER',\n 'initiatorType'=> 'CONSUMER',\n 'note'=> 'test payment',\n 'homeTransactionId'=> '{{}}' );\n\n //Encode the array into JSON.\n $jsonDataEncoded = json_encode( $jsonData );\n\n //Tell cURL that we want to send a POST request.\n curl_setopt( $ch, CURLOPT_POST, 1 );\n\n //Attach our encoded JSON string to the POST fields.\n curl_setopt( $ch, CURLOPT_POSTFIELDS, $jsonDataEncoded );\n\n //Set the content type to application/json\n curl_setopt( $ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json' ) );\n\n // Return response instead of outputting\n curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n\n //Execute the request\n $result = curl_exec( $ch );\n\n // json_decode( $result );\n $data = json_decode( $result );\n \n if ( is_null($data) ) {\n $this->Error = 'Un error occured';\n return null;\n }\n\n $query = \"INSERT INTO `Contribution`(\n `amount_contributed`,\n `contribution_date`,\n `member_id`,\n `payment_type_id`)\n VALUES(\";\n\n $query .= \" '{$this->Fillables['AmountContributed']}'\n ,now()\n ,'{$this->Fillables['MemberId']}',\n '{$this->Fillables['PaymentType']}'\";\n $query .= ')';\n\n $result = $mysqli->query( $query );\n echo $mysqli->error;\n $loan_id = $mysqli->insert_id;\n if ( !$loan_id ) {\n $this->Error = 'Un error occured while adding a new record';\n } else {\n $this->Success = 'Thanks for you contribution';\n return $data;\n }\n\n }", "public function recuperarregistropapeleraAction()\r\n {\r\n $this->_helper->viewRenderer->setNoRender();\r\n $this->_helper->layout->disableLayout();\r\n $id = $this->_getParam('id');\r\n $this->model->recuperaEntrada($id);\r\n $this->_helper->json->sendJson(\"OK\");\r\n }", "private function insertNew() {\n $sth=NULL;\n $array=array();\n $query=\"INSERT INTO table_spectacles (libelle) VALUES (?)\";\n $sth=$this->dbh->prepare($query);\n $array=array($this->libelle);\n $sth->execute($array);\n $this->message=\"\\\"\".$this->getLibelle().\"\\\" enregistré !\";\n $this->blank();\n $this->test=1;\n }", "function act_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 de la Unidad de Medida.\\\"); 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 registrarCliente($dados){\n //$conexao = $c->conexao();\n $tipoCadastro = $_POST['tipocad'];\n $tipoCliente = $_POST['tipo'];\n $iss = $_POST['iss'];\n $nome = trim($_POST['nome']);\n // $nomeJuridico = trim($_POST['nomeJuridico']);\n $nomeFantasia = trim($_POST['nomeFantasia']);\n $apelido = trim($_POST['apelido']);\n $cnpj = $_POST['cnpj'];\n $cpf = $_POST['cpf'];\n $rg = trim($_POST['rg']);\n $dt_nascimento = trim($_POST['dtnascimento']);\n $telefone = $_POST['telefone'];\n // $telefoneJ = $_POST['telefoneJ'];\n $telefone2J = $_POST['telefone2J'];\n $cep = $_POST['cep'];\n $endereco = $_POST['endereco'];\n $bairro = $_POST['bairro'];\n $uf = $_POST['uf'];\n $cidade = $_POST['cidade'];\n $complemento = $_POST['complemento'];\n $numero = trim($_POST['numero']);\n $usuid = $_SESSION['usuid'];\n\n $sql = \"SELECT count(*) as total from tbclientes WHERE rg = '$rg' or cnpj = '$cnpj' or cpf = '$cpf' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n\n if($row['total'] == 1){\n return 0;\n }else{\n\n $sql = \"INSERT INTO tbclientes (nome, nomefantasia, apelido, tipocad, tipopessoa, iss, cpf, cnpj, rg, telefone, telefone2, dt_nascimento, data_cadastro, usuid, habilitado, cep, endereco, bairro, uf, cidade, complemento, numero) VALUES ('$nome', '$nomeFantasia', '$apelido', '$tipoCadastro', '$tipoCliente', '$iss', '$cpf', '$cnpj', '$rg', '$telefone', '$telefone2J', '$dt_nascimento', NOW(), '$usuid', 'S', '$cep', '$endereco', '$bairro', '$uf', '$cidade', '$complemento', '$numero') \";\n\n $mensagem = \"O Usuário \".$_SESSION['email'].\" cadastrou o Cliente $nome \";\n $this->salvaLog($mensagem);\n\n return $this->conexao->query($sql);\n\n }\n\n }", "public function addAction()\n {\n $form = new RobotForm;\n $user = Users::findFirst($this->session->get(\"auth-id\"));\n\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Добавить робота :: \");\n }\n\n if ($this->request->isPost()) {\n if (!$form->isValid($this->request->getPost())) {\n foreach ($form->getMessages() as $message) {\n $this->flashSession->error($message);\n }\n return $this->response->redirect(\n [\n \"for\" => \"robot-add\",\n \"name\" => $user->name\n ]\n );\n } else {\n\n $robot = new Robots();\n $robot->name = $this->request->getPost(\"name\");\n $robot->type = $this->request->getPost(\"type\");\n $robot->year = $this->request->getPost(\"year\");\n $robot->users_id = $user->id;\n\n\n if ($robot->save()) {\n $this->flashSession->success(\"Вы добавили нового робота !\");\n $this->session->set(\"robot-id\", $robot->id);\n return $this->response->redirect(\n [\n\n \"for\" => \"user-show\",\n \"name\" => $this->session->get(\"auth-name\")\n ]\n );\n\n } else {\n\n $this->flashSession->error($robot->getMessages());\n }\n\n }\n }\n\n return $this->view->form = $form;\n\n }", "function insertarRelacionProceso(){\n\n $this->objFunc=$this->create('MODObligacionPago');\n if($this->objParam->insertar('id_relacion_proceso_pago')){\n $this->res=$this->objFunc->insertarRelacionProceso($this->objParam);\n } else{\n $this->res=$this->objFunc->modificarRelacionProceso($this->objParam);\n }\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "function tb_ajuste_colaborador_insert(){\n\tglobal $Translation;\n\n\t// mm: can member insert record?\n\t$arrPerm=getTablePermissions('tb_ajuste_colaborador');\n\tif(!$arrPerm[1]){\n\t\treturn false;\n\t}\n\n\t$data['str_responsavel'] = parseCode('<%%creatorUsername%%>', true);\n\t$data['dta_data'] = intval($_REQUEST['dta_dataYear']) . '-' . intval($_REQUEST['dta_dataMonth']) . '-' . intval($_REQUEST['dta_dataDay']);\n\t$data['dta_data'] = parseMySQLDate($data['dta_data'], '<%%creationDate%%>');\n\t$data['colaborador_id'] = makeSafe($_REQUEST['colaborador_id']);\n\t\tif($data['colaborador_id'] == empty_lookup_value){ $data['colaborador_id'] = ''; }\n\t$data['str_ajuste'] = makeSafe($_REQUEST['str_ajuste']);\n\t\tif($data['str_ajuste'] == empty_lookup_value){ $data['str_ajuste'] = ''; }\n\t$data['bol_evidencia'] = makeSafe($_REQUEST['bol_evidencia']);\n\t\tif($data['bol_evidencia'] == empty_lookup_value){ $data['bol_evidencia'] = ''; }\n\t$data['int_quantidade'] = makeSafe($_REQUEST['int_quantidade']);\n\t\tif($data['int_quantidade'] == empty_lookup_value){ $data['int_quantidade'] = ''; }\n\t$data['gestor_id'] = makeSafe($_REQUEST['gestor_id']);\n\t\tif($data['gestor_id'] == empty_lookup_value){ $data['gestor_id'] = ''; }\n\t$data['bol_notificacao'] = makeSafe($_REQUEST['bol_notificacao']);\n\t\tif($data['bol_notificacao'] == empty_lookup_value){ $data['bol_notificacao'] = ''; }\n\tif($data['colaborador_id']== ''){\n\t\techo StyleSheet() . \"\\n\\n<div class=\\\"alert alert-danger\\\">\" . $Translation['error:'] . \" 'Colaborador': \" . $Translation['field not null'] . '<br><br>';\n\t\techo '<a href=\"\" onclick=\"history.go(-1); return false;\">'.$Translation['< back'].'</a></div>';\n\t\texit;\n\t}\n\tif($data['str_ajuste']== ''){\n\t\techo StyleSheet() . \"\\n\\n<div class=\\\"alert alert-danger\\\">\" . $Translation['error:'] . \" 'Tipo de ajuste': \" . $Translation['field not null'] . '<br><br>';\n\t\techo '<a href=\"\" onclick=\"history.go(-1); return false;\">'.$Translation['< back'].'</a></div>';\n\t\texit;\n\t}\n\tif($data['int_quantidade'] == '') $data['int_quantidade'] = \"1\";\n\tif($data['gestor_id']== ''){\n\t\techo StyleSheet() . \"\\n\\n<div class=\\\"alert alert-danger\\\">\" . $Translation['error:'] . \" 'Gestor': \" . $Translation['field not null'] . '<br><br>';\n\t\techo '<a href=\"\" onclick=\"history.go(-1); return false;\">'.$Translation['< back'].'</a></div>';\n\t\texit;\n\t}\n\n\t// hook: tb_ajuste_colaborador_before_insert\n\tif(function_exists('tb_ajuste_colaborador_before_insert')){\n\t\t$args=array();\n\t\tif(!tb_ajuste_colaborador_before_insert($data, getMemberInfo(), $args)){ return false; }\n\t}\n\n\t$o = array('silentErrors' => true);\n\tsql('insert into `tb_ajuste_colaborador` set `str_responsavel`=' . \"'{$data['str_responsavel']}'\" . ', `dta_data`=' . (($data['dta_data'] !== '' && $data['dta_data'] !== NULL) ? \"'{$data['dta_data']}'\" : 'NULL') . ', `colaborador_id`=' . (($data['colaborador_id'] !== '' && $data['colaborador_id'] !== NULL) ? \"'{$data['colaborador_id']}'\" : 'NULL') . ', `str_ajuste`=' . (($data['str_ajuste'] !== '' && $data['str_ajuste'] !== NULL) ? \"'{$data['str_ajuste']}'\" : 'NULL') . ', `bol_evidencia`=' . (($data['bol_evidencia'] !== '' && $data['bol_evidencia'] !== NULL) ? \"'{$data['bol_evidencia']}'\" : 'NULL') . ', `int_quantidade`=' . (($data['int_quantidade'] !== '' && $data['int_quantidade'] !== NULL) ? \"'{$data['int_quantidade']}'\" : 'NULL') . ', `gestor_id`=' . (($data['gestor_id'] !== '' && $data['gestor_id'] !== NULL) ? \"'{$data['gestor_id']}'\" : 'NULL') . ', `bol_notificacao`=' . (($data['bol_notificacao'] !== '' && $data['bol_notificacao'] !== NULL) ? \"'{$data['bol_notificacao']}'\" : 'NULL'), $o);\n\tif($o['error']!=''){\n\t\techo $o['error'];\n\t\techo \"<a href=\\\"tb_ajuste_colaborador_view.php?addNew_x=1\\\">{$Translation['< back']}</a>\";\n\t\texit;\n\t}\n\n\t$recID = db_insert_id(db_link());\n\n\t// hook: tb_ajuste_colaborador_after_insert\n\tif(function_exists('tb_ajuste_colaborador_after_insert')){\n\t\t$res = sql(\"select * from `tb_ajuste_colaborador` where `id`='\" . makeSafe($recID, false) . \"' limit 1\", $eo);\n\t\tif($row = db_fetch_assoc($res)){\n\t\t\t$data = array_map('makeSafe', $row);\n\t\t}\n\t\t$data['selectedID'] = makeSafe($recID, false);\n\t\t$args=array();\n\t\tif(!tb_ajuste_colaborador_after_insert($data, getMemberInfo(), $args)){ return $recID; }\n\t}\n\n\t// mm: save ownership data\n\tset_record_owner('tb_ajuste_colaborador', $recID, getLoggedMemberID());\n\n\treturn $recID;\n}", "public function add(){\n\t\t//$this->errorCore(\"percobaan\");\n\t\tif($this->loginFilter->isLogin($this->owner)){\n\t\t\t//redirect(base_url());\n\t\t}else{\n\t\t\t$this->reloadCore();\n\t\t}\n\t\t$kodeForm = $this->isNullPost('kodeForm',\"anda melakukan debugging\");\n if($kodeForm != 'J453RVT3CH@W3N4@FORM') $this->errorCore(\"token diperlukan\");\n\t\t$nama = $this->isNullPost('nama',\"nama tidak boleh kosong\");\n\t\t$kepsek = $this->isNullPost('kepsek',\"nama kepala sekolah tidak boleh kosong\");\n\t\t$nip = $this->isNullPost('nip',\"nip harus diisi\");\n\t\t$email = $this->isNullPost('email',\"email harus diisi\");\n\t\t$nohp = $this->isNullPost('nohp',\"no handphone harus diisi\");\n\t\t$idline = $this->isNullPost('idline',\"\",false);\n\t\tif(!$idline){\n\t\t\t$idLine=\"\";\n\t\t}else{\n\t\t\t$idline = htmlspecialchars(htmlentities($this->isNullPost('idline')));\n\t\t}\n\t\t\n\t\t$aktor=null;\n\t\tif($this->loginFilter->isLogin($this->owner)){\n\t\t\t$aktor=$this->owner;\n\t\t}else if($this->loginFilter->isLogin($this->sekolah)){\n\t\t\t$aktor = $this->sekolah;\n\t\t}else if($this->loginFilter->isLogin($this->worker)){\n\t\t\t$aktor = $this->worker;\n\t\t}else{\n\t\t\t$this->reloadCore();\n\t\t}\n\t\t$temp = $this->inputJaservFilter->nameSchoolFiltering($nama);\n\t\tif(!$temp[0]) $this->errorCore($temp[1]);\n\t\t\n\t\t$aktor->initial($this->inputJaservFilter);\n\t\t$temp = $aktor->getCheckName($kepsek,1);\n\t\tif(!$temp[0]) $this->errorCore($temp[1]);\n\t\t\n\t\t$temp = $aktor->getCheckNip($nip,1);\n\t\tif(!$temp[0]) $this->errorCore($temp[1]);\n\t\t$temp = $aktor->getCheckEmail($email,1);\n\t\tif(!$temp[0]) $this->errorCore($temp[1]);\n\t\t\n\t\t$temp = $aktor->getCheckNuTelphone($nohp,1);\n\t\tif(!$temp[0]) $this->errorCore($temp[1]);\n\t\t$this->loadLib(\"ControlPengguna\");\n\t\t$this->loadLib(\"ControlSekolah\");\n\t\t$this->loadLib(\"ControlPekerja\");\n\t\t$controlPengguna = new ControlPengguna($this->gateControlModel);\n\t\t$controlSekolah = new ControlSekolah($this->gateControlModel);\n\t\t$controlPekerja = new ControlPekerja($this->gateControlModel);\n\t\t$tempObjectDB = $controlSekolah->getDataByNama($nama);\n\t\tif($tempObjectDB && $tempObjectDB->getNextCursor()) $this->errorCore(\"Nama sekolah ini sudah terdaftar\");\n\t\t\n\t\t\n\t\t$identifiedSekolah = $controlPengguna->generateIdentified(2);\n\t\t$identifiedKepSek = $controlPengguna->generateIdentified(3);\n\t\t$nick = \"KEP-SEK-\".date(\"Ymd-His\");\n\t\t$nickName = $this->loginFilter->getHashNickName($nick);\n\t\t$key = \"H\".substr(date(\"Y\"),0,2).\"E\".substr(date(\"Y\"),2,2).\"A\".date(\"m\").\"D\".date(\"d\").\"a\".date(\"H\").\"e\".date(\"i\").\"h\".date(\"s\");\n\t\t$keyPass = $this->loginFilter->getHashKeyWord($key);\n\t\t$emailCI = $this->loadLib(\"ControlEmail\",true);\n\t\t$emailCI->pushTarget($email);\n\t\t$emailCI->addSubject(\"Permintaan pembuatan Akun\");\n\t\t$emailCI->addMessageByView(\"Accountsekolah.html\",array(\n\t\t\t\"nickname\" => $nick,\n\t\t\t\"keypass\" => $key,\n\t\t\t\"url\" => base_url(),\n\t\t\t\"nama\" => $nama,\n\t\t\t\"kepsek\" => $kepsek,\n\t\t\t\"hari\" => date(\"Y m d\").\" Pukul \".date(\"H:i:s\")\n\t\t));\n\t\t//not connect to internet, \n\t\t//$result = $emailCI->send();\n\t\t$result = true;\n\t\tif(!$result){\n\t\t\t$this->errorCore(\"email tidak valid\");\n\t\t}\n\t\t$tempObjectDB = $controlPengguna->getObject();\n\t\t$tempObjectDB->setIdentified($identifiedSekolah);\n\t\t$tempObjectDB->setNickName($nickName);\n\t\t$tempObjectDB->setKeyWord($keyPass);\n\t\tif(!$controlPengguna->addData($tempObjectDB)){\n\t\t\t$this->errorCore(\"gagal menambahkan Sekolah\");\n\t\t}\n\t\t$tempObjectDB = $controlSekolah->getObject();\n\t\t$tempObjectDB->setIdentified($identifiedSekolah);\n\t\t$tempObjectDB->setNama($nama);\n\t\t$tempObjectDB->setKepSek($identifiedKepSek);\n\t\tif(!$controlSekolah->addData($tempObjectDB)){\n\t\t\t$controlPengguna->removeByIdentified($identifiedSekolah);\n\t\t\t$this->errorCore(\"gagal menambahkan Sekolah\");\n\t\t}\n\t\t$tempObjectDB = $controlPekerja->getObject();\n\t\t$tempObjectDB->setIdentified($identifiedKepSek);\n\t\t$tempObjectDB->setNama($kepsek);\n\t\t$tempObjectDB->setNip($nip);\n\t\t$tempObjectDB->setEmail($email);\n\t\t$tempObjectDB->setNoHp($nohp);\n\t\t$tempObjectDB->setIdLine($idline);\n\t\tif(!$controlSekolah->addData($tempObjectDB)){\n\t\t\t$controlPengguna->removeByIdentified($identifiedSekolah);\n\t\t\t$controlSekolah->removeByIdentified($identifiedSekolah);\n\t\t\t$this->errorCore(\"gagal menambahkan Sekolah\");\n\t\t}\n\t\t$this->trueCore(\"Berhasil menambahkan sekolah\");\n\t}", "function addSocial(){\n\t$request = Slim::getInstance()->request();\n\t$evaluation = $request->getBody();\n\t$social = array(\"mercury_room_id\"=>\"\", \"mercry_room_social_type\"=>\"\", \"mercury_room_social_data\"=>\"\", \"mercury_user_id\"=>\"\");\n\t\n\t// construct data object\n\tforeach (explode('&', $evaluation) as $chunk) {\n\t $social = explode(\"=\", $chunk);\n\n\t if ($param) {\n\t \t$social[$param[0]] = $param[1];\n\t }\n\t}\n\n\t$mercury_room_social_url = \"\";\n\n\t// check if the user exists\n\t$sql = \"INSERT INTO mercury_rooms_social (mercury_room_social_type, mercury_room_social_data, mercury_user_id, mercury_room_social_url) VALUES (:mercury_room_social_type, :mercury_room_social_data, :mercury_user_id, :mercury_room_social_url)\";\n\ttry {\n\t\t$db = getConnection();\n\t\t$stmt = $db->prepare($sql); \n\t\t$stmt->bindParam(\"mercury_room_social_type\", $social[\"mercury_room_social_type\"]);\n\t\t$stmt->bindParam(\"mercury_room_social_data\", $social[\"mercury_room_social_data\"]);\n\t\t$stmt->bindParam(\"mercury_user_id\", $social[\"mercury_user_id\"]);\n\t\t$stmt->bindParam(\"mercury_room_social_url\", $social[\"mercury_room_social_url\"]);\n\t\t$stmt->execute();\n\t\t$social[\"mercury_room_id\"] = $db->lastInsertId();\n\t\t$db = null;\n\t\techo json_encode($user); \n\t} catch(PDOException $e) {\n\t\terror_log($e->getMessage(), 3, '/var/tmp/php.log');\n\t\techo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n\t}\n\n}", "public function agregar_banco(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n if(empty($_POST[\"pregunta\"])){\r\n header(\"Location:\".Conectar::ruta().\"admin/banco/crear.php?m=1\");\r\n exit();\r\n }\r\n $contra='activo';\r\n $conectar=parent::conexion();\r\n $sql=\"insert into banco values(null,?,?,?,now());\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->bindValue(1, $_POST[\"pregunta\"]);\r\n $sql->bindValue(2, $_SESSION[\"id\"]);\r\n $sql->bindValue(3, $contra);\r\n $sql->execute();\r\n $resultado=$sql->fetch(PDO::FETCH_ASSOC);\r\n \r\n header(\"Location:\".Conectar::ruta().\"admin/banco/index.php?m=2\");\r\n \r\n }", "public function addByAdmin()\n {\n if (!session()->get('username')) {\n return redirect()->to('/login');\n }\n $pj = $this->request->getVar('hubungan');\n if ($pj == \"Mandiri\") {\n if (!$this->validate($this->validation)) {\n return $this->validasiDataByAdmin();\n } else {\n return $this->addDataByAdmin();\n }\n } else {\n if (!$this->validate(array_merge($this->validation, $this->val_pj))) {\n return $this->validasiDataByAdmin();\n } else {\n return $this->addDataByAdmin();\n }\n }\n }", "public function registrarAdministrador(){\n\n $datos = array(\n \t'ID_ADMINISTRADOR'=>NULL,\n \t'NOMBRE'=>$_POST['NOMBRE'],\n \t'APELLIDO'=>$_POST['APELLIDO'],\n \t'EMAIL'=>$_POST['EMAIL'],\n \t'USERNAME'=>$_POST['USERNAME'],\n \t'PASS'=>$_POST['PASS'],\n \t'DESCRIPCION'=>$_POST['DESCRIPCION'],\n \t'PORTAFOLIO'=>$_POST['PORTAFOLIO'],\n \t'TELEFONO'=>$_POST['TELEFONO'],\n \t'DIRECCION'=>$_POST['DIRECCION'],\n \t'ID_ROL'=>$_POST['ID_ROL']\n \t);//fin del array con los datos del administrador\n\n $result = $this->Administrador_model->registrarAdministrador($datos);\n\n if($result){\n\t\t echo \"<script> \n\t\t alert('Administrador registrado sucessfull...!!!'); \n\t\t window.location='./Agregar_Administrador'\n\t\t </script>\";\n\t\t // header(\"Location:\".base_url()); // si ponemos esto obviaria el alert() de javaScript. por eso redirecionamos en el mismo script con window.location\n\n\t\t }else{\n\t\t \t echo \"<script> \n\t\t \t alert('Error al registrar Administrador. Intentelo mas tarde.'); \n\t\t window.location='./Agregar_Administrador'\n\t\t </script>\";\n\t\t }\n \n }", "public static function inserirProdutoCarrinho(){\n if(isset($_SESSION['user'])){\n //USUARIO LOGADO COM CARRINHO\n if(isset($_SESSION['user']['carrinhoId'])){\n $conn = \\App\\lib\\Database\\Conexao::connect();\n $expPro = explode(';',self::$carrinho->produto_id);\n $expQuant = explode(';',self::$carrinho->quantidade);\n\n $expPro[] = self::$produto['produto_id'];\n $expQuant[] = self::$produto['quantidade'];\n\n $impPro = implode(';',$expPro);\n $impQuant = implode(';',$expQuant);\n\n $conn = \\App\\lib\\Database\\Conexao::connect();\n $query = \"UPDATE carrinhos SET produto_id=:idp, quantidade=:qnt, idCliente=:idC WHERE id=:id\";\n $stmt = $conn->prepare($query);\n $stmt->bindValue(1,$impPro);\n $stmt->bindValue(2,$impQuant);\n $stmt->bindValue(3,$_SESSION['user']['id']);\n $stmt->bindValue(4,self::$carrinho->id);\n $stmt->execute();\n\n //USUARIO LOGADO SEM CARRINHO\n }else{\n $conn = \\App\\lib\\Database\\Conexao::connect();\n $query = \"INSERT INTO carrinhos(produto_id,quantidade,idCliente) VALUES (:prodId, :qnt, :idCliente)\";\n $stmt = $conn->prepare($query);\n $stmt->bindValue(1,self::$produto['produto_id']);\n $stmt->bindValue(2,self::$produto['quantidade']);\n $stmt->bindValue(3,$_SESSION['user']['id']);\n $stmt->execute();\n if($stmt->rowCount()){\n return true;\n }throw new \\Exception(\"Nao Foi Possivel adicionar produto ao carrinho\");\n }\n\n //USUARIO NAO LOGADO\n }else{\n //USUARIO NAO LOGADO COM CARRINHO\n if(isset($_SESSION['carrinho'])){\n $expPro = explode(';',$_SESSION['carrinho']['produto_id']);\n $expQuant = explode(';',$_SESSION['carrinho']['quantidade']);\n $expPro[] = self::$produto['produto_id'];\n $expQuant[] = self::$produto['quantidade'];\n $impPro = implode(';',$expPro);\n $impQuant = implode(';',$expQuant);\n $_SESSION['carrinho'] = array('produto_id'=>$impPro,'quantidade'=>$impQuant);\n return true;\n //USUARIO NAO LOGADO SEM CARRINHO\n }else{\n $_SESSION['carrinho'] = array('produto_id'=>self::$produto['produto_id'],'quantidade'=>self::$produto['quantidade']);\n return true;\n \n }\n \n }\n }", "public function addberita()\n\t{\n\t\t# code...\n\t\t$data_sender = $this->input->post('data_sender');\n//\t\tprint_r($data_sender);die();\t\t\n\t\t$this->Allcrud->addData('berita',$data_sender);\n\t}", "public function add()\n {\n $data=$this->M_mtk->add();\n echo json_encode($data);\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 add() {\r\n\t\t// init view variables\r\n\t\t// ---\r\n\t\t\r\n\t\t// receive userright token\r\n\t\t$urtoken\t= $this->MediawikiAPI->mw_getUserrightToken()->query->tokens->userrightstoken;\r\n\t\t$this->set( 'urtoken', $urtoken );\r\n\t\t\r\n\t\t// receive usergrouplist\r\n\t\t$ugroups\t\t= $this->Users->Groups->find( 'all' )->all()->toArray();\r\n\t\t$this->set( 'ugroups', $ugroups );\r\n\t\t\r\n\t\tif( $this->request->is( 'post' ) ) {\r\n\t\t\t// required fields empty?\r\n\t\t\tif( empty( $this->request->data[\"username\"] ) || empty( $this->request->data[\"email\"] ) ) {\r\n\t\t\t\t$this->set( 'notice', 'Es wurden nicht alle Pflichtfelder ausgefüllt. Pflichtfelder sind all jene Felder die kein (optional) Vermerk tragen.' );\r\n\t\t\t\t$this->set( 'cssInfobox', 'danger' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// usergroups\r\n\t\t\t$addGroups\t\t= '';\r\n\t\t\t\t\t\t\r\n\t\t\tforeach( $this->request->data[\"group\"] as $grpname => $grpvalue ) {\r\n\t\t\t\tif( $grpvalue == true ) {\r\n\t\t\t\t\t$addGroups\t.= $grpname . '|';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$addGroups\t\t= substr( $addGroups, 0, -1 );\r\n\t\t\t\r\n\t\t\t// create new mediawiki user\t\t\t\r\n\t\t\t$result\t\t= $this->create(\r\n\t\t\t\t$this->request->data[\"username\"],\r\n\t\t\t\t$this->request->data[\"email\"],\r\n\t\t\t\t$this->request->data[\"realname\"],\r\n\t\t\t\t$addGroups,\r\n\t\t\t\t'',\r\n\t\t\t\t$this->request->data[\"urtoken\"],\r\n\t\t\t\t$this->request->data[\"mailsender\"],\r\n\t\t\t\t$this->request->data[\"mailsubject\"],\r\n\t\t\t\t$this->request->data[\"mailtext\"]\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( $result != 'Success' ) {\r\n\t\t\t\t$this->set( 'notice', 'Beim Anlegen des Benutzer_inaccounts ist ein Fehler aufgetreten.</p><p>' . $result );\r\n\t\t\t\t$this->set( 'cssInfobox', 'danger' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->set( 'notice', 'Der / Die Benutzer_in wurde erfolgreich angelegt. Er / Sie wurde via E-Mail informiert.' );\r\n\t\t\t$this->set( 'cssInfobox', 'success' );\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// set view variables\r\n\t\t$this->set( 'notice', '' );\r\n\t\t$this->set( 'cssInfobox', '' );\r\n\t}", "function add()\n {\n //load chuc vu ra\n $this->load->model('chucvu_model');\n $input = array();\n $chucvu = $this->chucvu_model->getList($input);\n $this->data['chucvu'] = $chucvu;\n \n //thoa dieu kien dau vao moi insert vao\n $this->load->library('form_validation');\n $this->load->helper('form');\n if($this->input->post())\n {\n $this->form_validation->set_rules('password', 'Mật khẩu', 'min_length[8]'); \n $this->form_validation->set_rules('repassword', 'Nhập lại mật khẩu', 'matches[password]');\n \n if($this->form_validation->run())\n {\n //lay DL tu view\n $ho = $this->input->post('ho');\n $ten = $this->input->post('ten');\n $luong = $this->input->post('luong');\n $chucvu = $this->input->post('chucvuid');\n $password = $this->input->post('password'); \n //do use plugin jQuery number --> chuyen ve dang so moi insert duoc\n $luong = str_replace(',', '', $luong);\n \n $data = array(\n 'ho' => $ho,\n 'ten' => $ten,\n 'chucvuid' => $chucvu, \n 'password' => md5($password),\n 'luong' => $luong\n );\n if($this->nhanvien_model->add($data))\n {\n $message = $this->session->set_flashdata('message', 'Thêm mới dữ liệu thành công'); \n }\n else {\n $this->session->set_flashdata('message', 'Không thể thêm mới');\n } \n //chuyen ve trang index\n redirect(admin_url('nhanvien'));\n }\n }\n \n $this->data['temp'] = 'admin/nhanvien/add';\n $this->load->view('admin/main', $this->data);\n }", "public function addNewRegiuneByAdmin($data)\n {\n $nume = $data['nume'];\n\n $checkRegiune = $this->checkExistRegiune($nume);\n\n\n if ($nume == \"\") {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Câmpurile de introducere nu trebuie să fie Golite!</div>';\n return $msg;\n } elseif (strlen($nume) < 2) {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Numele regiunii este prea scurt, cel puțin 2 caractere!</div>';\n return $msg;\n } elseif ($checkRegiune == TRUE) {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Regiunea există deja, vă rugăm să încercați o alta regiune ...!</div>';\n return $msg;\n } else {\n\n $sql = \"INSERT INTO regiune(nume ) VALUES(:nume)\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->bindValue(':nume', $nume);\n $result = $stmt->execute();\n if ($result) {\n $msg = '<div class=\"alert alert-success alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Success !</strong> Ați înregistrat cu succes!</div>';\n return $msg;\n } else {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Error !</strong> Ceva n-a mers bine !</div>';\n return $msg;\n }\n }\n }", "public function utilisateurAjouterUn($utilisateur)\n\t{\n\t\tGestion::ajouter($utilisateur);// votre code ici\n\t}", "public function inscription(){\n // envoi de mail lors de l'inscription d'un produit ?\n $this->load->model('produit');\n\t\t\t\t$this->load->helper('form');\n\t\t\t\t$this->load->view('produit/inscription');\n $data=array(\n \"nomProduit\"=> htmlspecialchars($_GET['nomProduit']),\n \"descriptionProduit\"=> htmlspecialchars($_GET['descriptionProduit']),\n \"prixUnitaireProduit\" => htmlspecialchars($_GET['prixUnitaireProduit']),\n \"reducProduit\" => htmlspecialchars($_GET['reducProduit']),\n\t\t\t );\n \t\t $this->produit->insert($data);\n\t }", "function submitAddLogistik()\n\t{\n\t\t$queryInsert['nama'] = ucwords($this->input->post('nama'));\n\t\t$queryInsert['stok'] = $this->input->post('stok');\n\t\t$queryInsert['satuan'] = $this->input->post('satuan');\n\t\t$queryInsert['kadaluarsa'] = $this->input->post('kadaluarsa');\n\t\t\n\t\t// cek adakah duplikasi nama obat\n\t\t$cekDuplikasiObat = $this->Kesehatan_M->read('logistik',array('nama' => $queryInsert['nama']));\n\t\tif ($cekDuplikasiObat->num_rows() == 0) {\n\t\t\t$execQueryInsert = $this->Kesehatan_M->create('logistik',$queryInsert);\n\t\t\t$execQueryInsert = json_decode($execQueryInsert);\n\t\t\tif ($execQueryInsert->status) {\n\t\t\t\talert('alert','success','Berhasil','Data berhasil dimasukkan');\n\t\t\t\tredirect(\"Dokter/logistik\");\n\t\t\t}else{\n\t\t\t\tvar_dump($execQueryInsert->message);\n\t\t\t}\n\t\t}else{\n\t\t\talert('alert','danger','Gagal','Obat sudah ada');\n\t\t\tredirect(\"Dokter/logistik\");\n\t\t}\n\t}", "public function ajouter()\n {\n $ajout_return = $this->loadModel('SallesManagerModel')->add_item('salles');\n $this->quit( '/gestionsalles', 'events.gestionsalles.msg', $ajout_return );\n }", "function nouveau()\n {\n $data['scripts'] = array('jquery', 'bootstrap', 'lte', 'datepicker','cssMessagerie' );\n\n // Creation du bandeau\n $data['titre'] = array(\"Messagerie\", \"fas fa-envelope\");\n\n \n \n\n // si la session est null c'est que l'utilisateur n'est pas connecté donc retour à la page de login\n if(!isset($_SESSION['dataUser']))\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-sync\", $this->dir_login, null),\n array(\"Retour\", \"fas fa-sync\", $this->dir_retour, null),\n );\n }\n \n $data['ActiveConv'] = false;\n \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 $data['profils'] = $this->m_messagerie->get_all_profil();\n\n $this->form_validation->set_rules(\"inputMessage\",\"inputMessage\",\"required\");\n if($this->form_validation->run()){\n $data['id_profils'] = $this->input->post('id_profils');\n $data[\"message\"] = $this->input->post('inputMessage');\n $data['date'] = date(\"Y-m-d H:i:s\"); \n $this->m_messagerie->set_message($data['userId'],$data['id_profils'],$data['message'],$data['date']);\n var_dump($data['id_profils']);\n var_dump($data[\"message\"]);\n var_dump($data['date']);\n var_dump($data['userId']);\n //redirect($this->dir_controlleur);\n }\n \n\n // On charge les differents modules neccessaires a l'affichage d'une page\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/nouveau',$data);\n }", "public function addMotifAction(Request $request, $id)\n {\n \n $lebelle = new Libelles_motif();\n $em = $this->getDoctrine()->getManager();\n $produit_1 = $em->getRepository('KountacBundle:Produits_1')->find($id);\n $form = $this->createForm('Kountac\\KountacBundle\\Form\\Libelles_motifType', $lebelle);\n \n $form->handleRequest($request);\n //var_dump($form['file']->getData());die();\n $em->persist($lebelle);\n $em->flush();\n \n $this->get('session')->getFlashBag()->add('success','Nouveau motif ajouté avec succès');\n return $this->redirectToRoute('adminProduits_new2', array('id' => $produit_1->getId()));\n }", "function insereMomentoCredito( $momentoCredito )\n{\n\tglobal $db;\n\t$sql = \"select nextval( 'elabrev.momentocredito_mcrid_seq' )\";\n\t$mcrid = $db->pegaUm( $sql );\n\t$sql = sprintf(\n\t\t\"insert into elabrev.momentocredito \n\t\t(\n\t\t\t mcrid, \n\t\t\t mcrdsc, \n\t\t\t mcrdatainiciouo, \n\t\t\t mcrdatainiciocgo, \n\t\t\t mcrdatafimcgo, \n\t\t\t mcrdatafimuo, \n\t\t\t mcrstatus,\n\t\t\t mcrano\n\t\t) values ( %d, '%s', '%s', '%s', '%s', '%s', 'A' , '%s') \",\n\t\t\t$mcrid,\n\t\t\t$momentoCredito['mcrdsc'],\n\t\t\t$momentoCredito['mcrdatainiciouo'],\n\t\t\t$momentoCredito['mcrdatainiciocgo'],\n\t\t\t$momentoCredito['mcrdatafimcgo'],\n\t\t\t$momentoCredito['mcrdatafimuo'],\n\t\t\t$_SESSION['exercicio']\n\t);\n\t$db->executar( $sql );\n\t\n\t//insere unidades\n\tif($_POST['unicod'][0]){\n\t\tforeach($_POST['unicod'] as $d){\n\t\t\t$sql = \"INSERT INTO elabrev.momentocreditounid(unicod, mcrid) VALUES ($d, $mcrid)\";\t\n\t\t\t$db->executar($sql);\n\t\t}\n\t}\n\t\n\treturn $mcrid ? $mcrid : null;\n}", "public function addCom(com $user){\n $query = $this->db->prepare(\"INSERT INTO commentaires(id_annonce, commentaire, note) VALUES(:id_annonce, :commentaire, :note)\");\n\n $query->bindValue(':id_annonce', $user->id_annonce());\n $query->bindValue(':commentaire', $user->commentaire());\n $query->bindValue(':note', $user->note());\n\n $query->execute();\n }", "function registrati()\n{\n global $connection;\n if (isset($_POST['registrati'])) {\n $name = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['name']);\n $cognome = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['cognome']);\n $email = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['email']);\n $citta = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['citta']);\n $telefono = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['telefono']);\n $username = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['username']);\n $password = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['password']);\n\n $select_username = \"SELECT * FROM users WHERE user_username='$username'\";\n $result_select = mysqli_query($connection, $select_username);\n\n if (mysqli_num_rows($result_select) == 0) {\n $registrati_dati_user = \"INSERT INTO users (user_name,user_surname,user_username,user_password,user_email,user_phone,user_city,user_livel) VALUES ('$name','$cognome','$username','$password','$email','$telefono','$citta',1)\";\n\n $result_registrati = mysqli_query($connection, $registrati_dati_user);\n\n if ($result_registrati) {\n echo \"<script>\n alert('I datti sono stati registrati');\n window.location.href='loginPage.php';\n </script>\";\n }\n } else {\n echo \"<script>\n alert('Non puoi usare questo username');\n window.location.href='registrati.php';\n </script>\";\n }\n }\n}", "function add()\n { \n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n\t\t\t\t'id_user' => $this->input->post('id_user'),\n\t\t\t\t'secteur' => $this->input->post('secteur'),\n\t\t\t\t'nom_organisation' => $this->input->post('nom_organisation'),\n\t\t\t\t'numero_enregistrement' => $this->input->post('numero_enregistrement'),\n\t\t\t\t'pays' => $this->input->post('pays'),\n\t\t\t\t'ville' => $this->input->post('ville'),\n\t\t\t\t'province' => $this->input->post('province'),\n\t\t\t\t'site_internet' => $this->input->post('site_internet'),\n );\n \n $organisation_id = $this->Organisation_model->add_organisation($params);\n redirect('organisation/index');\n }\n else\n {\n\t\t\t$this->load->model('User_model');\n\t\t\t$data['all_user'] = $this->User_model->get_all_user();\n\n\t\t\t$this->load->model('Secteur_model');\n\t\t\t$data['all_secteur'] = $this->Secteur_model->get_all_secteur();\n\n\t\t\t$this->load->view('include/header');\n\t\t\t$this->load->view('advocate/organisation/add',$data);\n\t\t\t$this->load->view('include/footer');\n }\n }", "public function add() \n { \n $data['piutang'] = $this->piutangs->add();\n $data['action'] = 'piutang/save';\n \n $tmp_statuss = $this->statuss->get_all();\n foreach($tmp_statuss as $row){\n $statuss[$row['id']] = $row['status'];\n }\n $data['statuss'] = $statuss;\n \n $this->template->js_add('\n $(document).ready(function(){\n // binds form submission and fields to the validation engine\n $(\"#form_piutang\").parsley();\n });','embed');\n \n $this->template->render('piutang/form',$data);\n\n }", "public function addMo()\n\t{\n\t\n\t\t$this->Checklogin();\n\t\tif (isset($_POST ['btnSubmit']))\n\t\t{\n\t\n\t\t\t$data ['admin_section']='MO';\n\t\t\t$id=$this->setting_model->addMo();\n\t\t\tif ($id)\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Mobile has been added successfully.');\n\t\t\t\tredirect('admin/setting/moRegistration');\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Unable to save mobile.');\n\t\t\t\tredirect('admin/setting/moRegistration');\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\tredirect('admin/setting/moRegistration');\n\t\t}\n\t\n\t}", "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }", "public function registrarNacimiento($valor){\n\n $objeto = new ServNacimientoController;\n $json_enviado = json_decode($valor,true);\n\n\n $nombre = $json_enviado['nombre'];\n $apellido = $json_enviado['apellido'];\n $genero = $json_enviado['genero'];\n $fechaNacimiento = $json_enviado['fechaNacimiento'];\n $municipio = $json_enviado['municipio'];\n $lugarNacimiento = $json_enviado['lugarNacimiento'];\n $cuiPadre = $json_enviado['cuiPadre'];\n $cuiMadre = $json_enviado['cuiMadre'];\n\n $validadorExistencia = false;\n $cui_generado = 0;\n\n $id_departamento = json_decode($objeto->obtenerDepartamento($municipio),true);\n \n do{\n $cui_generado = $objeto->generarCUI();\n if(strlen($municipio) == 1)\n {\n $municipio = \"0\".$municipio;\n }\n\n //$valor_depto = \"1\";//\n $valor_depto = $id_departamento[0]['id_dpto']; \n //echo \"<BR> VALOR DEPTO: \".json_encode($id_departamento).\"<BR>\";\n \n if(strlen((string)$valor_depto) == 1){\n $valor_depto = \"0\".$valor_depto;\n }\n\n //echo \"<BR> VALOR DEPTO despues : \".$valor_depto.\"<BR>\";\n\n $cui_final_generado = $cui_generado.$valor_depto.$municipio;\n $validadorExistencia = $objeto->validarExistenciaCUI($cui_final_generado);\n }while($validadorExistencia == false);\n\n $valor_cui_valodi = $objeto->valida_CUI_Nacimiento($cui_final_generado);\n $valor_fake = $objeto->valida_CUI_Nacimiento(256461546);\n\n \n //REGISTRO DEL NACIMIENTO EN LA BD\n\n $valor_id = $objeto->obtenerIdPersona();\n\n $existe_madre = $objeto->validarExistenciaCUI($cuiMadre);\n $existe_padre = $objeto->validarExistenciaCUI($cuiPadre);\n\n if($existe_madre == false && $existe_padre == false){\n echo \"se pudo realizar el ingreso!!1\";\n }\n\n if($existe_padre == false && $existe_madre == false){\n\n DB::table('PERSONA')\n ->insert(\n [ 'cui'=>$cui_final_generado,\n 'id'=>$valor_id,\n 'nombres'=>$nombre,\n 'apellidos'=>$apellido,\n 'genero'=>$genero,\n 'estado_civil'=>1,\n 'huella'=>\"sin valor\",\n 'direccion'=>\"ciudad\",\n 'vivo_muerto'=>1,\n 'id_muni'=>$municipio\n ]\n );\n\n DB::table('NACIMIENTO')\n ->insert([\n 'cui' => $cui_final_generado,\n 'cui_padre' => $cuiPadre,\n 'cui_madre' => $cuiMadre,\n 'id_muni' => $municipio,\n 'fecha' => Carbon::now(),\n 'direccion_nac' => \"ciudad\",\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n \n $resultado_final = [\n 'cui' => $cui_final_generado,\n 'status' => 1,\n 'mensaje' => \"Registro de persona añadido\"\n ];\n\n return response()->json($resultado_final);\n \n }else{\n \n $resultado_final = [\n 'cui' => 0,\n 'status' => 0,\n 'mensaje' => \"Registro de persona no realizado, no existe padre o madre\"\n ];\n\n return response()->json($resultado_final);\n\n }\n\n }", "public function registrarNewJurado() {\n\t\t$jurado = new Jurado();\n\n\t\tif (isset($_POST[\"DniJur\"])) {\n\t\t\t$jurado -> setDniJurado($_POST[\"DniJur\"]);\n\t\t\t$jurado -> setNombreJurado($_POST[\"Nombre\"]);\n\t\t\t$jurado -> setPasswordJurado($_POST[\"PasswordJ\"]);\n\t\t\t$jurado -> setIsProfesional(0);\n\n\t\t\ttry {\n\t\t\t\t$jurado -> checkIsValidForRegisterJurado();\n\t\t\t\tif (!$this -> JuradoMapper -> juradoExistsByDNI($_POST[\"DniJur\"])) {\n\t\t\t\t\t$this -> JuradoMapper -> save($jurado);\n\t\t\t\t\t//$this->view->setFlash(\"dniJurado \".$jurado->getNombreJurado().\" successfully added. Please login now\");\n\t\t\t\t\t$this -> view -> redirect(\"users\", \"login\");\n\t\t\t\t\t//falta cambiar\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = array();\n\t\t\t\t\t$errors[\"dniJurado\"] = \"Ya existe un jurado con ese mismo DNI\";\n\t\t\t\t\t$this -> view -> setVariable(\"errors\", $errors);\n\t\t\t\t}\n\t\t\t} catch(ValidationException $ex) {\n\t\t\t\t$errors = $ex -> getErrors();\n\t\t\t\t$this -> view -> setVariable(\"errors\", $errors);\n\t\t\t}\n\t\t}\n\t\t$this -> view -> setVariable(\"jurado\", $jurado);\n\t\t//falta cambiar\n\t\t$this -> view -> render(\"jurado\", \"registroJurado\");\n\t\t//falta cambiar\n\t}", "function insert_motif(Motif $motif_object) {\n $connexion = get_connexion();\n $sql = \"INSERT INTO motif (id_motif, libelle_motif) VALUES (:id_motif, :libelle_motif)\";\n try {\n $sth = $connexion->prepare($sql);\n $sth->execute(\n array(\n \":id_motif\" => $motif_object->get_id_motif(),\n \":libelle_motif\" => $motif_object->get_libelle_motif(),\n ));\n } catch (PDOException $e) {\n throw new Exception(\"Erreur lors de la requête SQL : \" . $e->getMessage());\n }\n $nb = $sth->rowcount();\n return $nb; // Retourne le nombre d'insertion\n}", "function Signaler($signaleur,$signale,$motif){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"INSERT INTO signalement VALUES(NULL,'$signaleur','$signale','$motif')\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\r\n\t\tmysqli_close($conn);\r\n\t\t}", "function alta_marca(){\n\t\t$u= new Marca_producto();\n\t\t$related = $u->from_array($_POST);\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\n\t\t// save with the related objects\n\t\tif($u->save($related)) {\n\t\t\techo \"<html> <script>alert(\\\"Se han actualizado los datos de la Subfamilia de Productos.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t} else\n\t\t\tshow_error(\"\".$u->error->string);\n\t}", "public function add_familiar(){\n\t\t$this->autenticate();//verifica si el usuario este ingresado al sistema\n\t\t$nombre = \"'\".$_POST['nombre'].\"'\";\n\t\t$localizar_emergencia = \"'\".$_POST['localizar_emergencia'].\"'\";\n\t\t$prioridad_localizar = $_POST['prioridad_localizar'];\n\t\t$parentesco = \"'\".$_POST['parentesco'].\"'\";\n\t\t$fecha_nacimiento = \"'\".$_POST['fecha_nacimiento'].\"'\";\n\t\t$telefono = \"'\".$_POST['telefono'].\"'\";\n\t\t$correo = \"'\".$_POST['correo'].\"'\";\n\t\t$administrativo_id = $_POST['administrativo_id'];\n\t\trequire_once(\"../app/models/administrativo.php\");//conexion entre los controladores\n\t\t$administrativo=new Administrativo();\n\t\t$administrativo->new_familiar($nombre,$localizar_emergencia,$prioridad_localizar,$parentesco,$fecha_nacimiento,$telefono,$correo,$administrativo_id);//ingresa los datos a la base de datos\n\t\t$administrativo_id = strval($administrativo_id);//convierte el administrativo_id de entero a string\n\t\theader(\"Location: http://localhost:8000/administrativos/show/$administrativo_id\");\n\t\texit;\n\t\t$this->view('administrativos/index', []);\n\t}" ]
[ "0.66522086", "0.6312662", "0.6301799", "0.624737", "0.6217515", "0.61687094", "0.6107106", "0.6038897", "0.6025775", "0.59778976", "0.59043247", "0.58878046", "0.58420146", "0.5832781", "0.58291453", "0.5824512", "0.5820897", "0.581881", "0.5770557", "0.5766486", "0.5765413", "0.57470405", "0.57389927", "0.5715943", "0.5713244", "0.57092994", "0.5707853", "0.56908673", "0.56573945", "0.5643951", "0.5642435", "0.56376857", "0.56313825", "0.5627346", "0.5617639", "0.5614496", "0.5611694", "0.5611448", "0.56056964", "0.5596674", "0.559421", "0.55898076", "0.55869853", "0.55815774", "0.55812377", "0.5562322", "0.55590945", "0.55547035", "0.55519307", "0.55461395", "0.5540318", "0.553994", "0.553389", "0.5530765", "0.5530174", "0.55247355", "0.55162835", "0.5513652", "0.5506987", "0.5504698", "0.549783", "0.5496626", "0.5493493", "0.5489966", "0.5483889", "0.5482681", "0.5481669", "0.5468255", "0.546641", "0.5463581", "0.546357", "0.5461288", "0.54594654", "0.5456956", "0.54536957", "0.54536587", "0.544878", "0.5446449", "0.54457426", "0.5445657", "0.5442212", "0.543779", "0.5433561", "0.54307795", "0.5430743", "0.54279625", "0.542626", "0.542069", "0.54185635", "0.5415107", "0.54133654", "0.5410541", "0.5404512", "0.5403521", "0.5402519", "0.5402368", "0.53972006", "0.539604", "0.53943306", "0.5393396" ]
0.6849948
0
/ page mobilisateur/addmobilisateur Ajout d'une mobilisateur
public function addmobilisateurAction() { $sessionmembre = new Zend_Session_Namespace('membre'); //$this->_helper->layout->disableLayout(); $this->_helper->layout()->setLayout('layoutpublicesmcperso'); if (!isset($sessionmembre->code_membre)) { $this->_redirect('/'); } if (isset($_POST['ok']) && $_POST['ok'] == "ok") { if (isset($_POST['code_membre']) && $_POST['code_membre'] != "" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != "") { $request = $this->getRequest(); if ($request->isPost ()) { $db = Zend_Db_Table::getDefaultAdapter(); $db->beginTransaction(); try { $date_id = new Zend_Date(Zend_Date::ISO_8601); $mobilisateur = new Application_Model_EuMobilisateur(); $m_mobilisateur = new Application_Model_EuMobilisateurMapper(); $id_mobilisateur = $m_mobilisateur->findConuter() + 1; $mobilisateur->setId_mobilisateur($id_mobilisateur); $mobilisateur->setCode_membre($_POST['code_membre']); $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss')); $mobilisateur->setId_utilisateur($_POST['id_utilisateur']); $mobilisateur->setEtat(1); $m_mobilisateur->save($mobilisateur); //////////////////////////////////////////////////////////////////////////////// $db->commit(); $sessionmembre->error = "Operation bien effectuee ..."; $this->_redirect('/mobilisateur/listmobilisateur'); } catch (Exception $exc) { $db->rollback(); $this->view->message = $exc->getMessage() . ': ' . $exc->getTraceAsString(); return; } } } else { $this->view->error = "Champs * obligatoire"; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function etatmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function addmobilisateurintegrateurAction() {\n $sessionmembreasso = new Zend_Session_Namespace('membreasso');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcint');\n if (!isset($sessionmembreasso->login)) {$this->_redirect('/integrateur/login');}\n\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\n/////////////////////////////////////controle code membre\nif(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\nif(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n}else{\nif(substr($_POST['code_membre'], -1, 1) == 'P'){\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0){\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }else if(substr($_POST['code_membre'], -1, 1) == 'M'){\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0){\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n}\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembreasso->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n}else{\n $db->rollback();\n $sessionmembreasso->error = \"Veuillez renseigner le Code Membre ...\";\n\n} \n } catch (Exception $exc) { \n $db->rollback();\n $sessionmembreasso->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionmembreasso->error = \"Champs * obligatoire\";\n }\n }\n }", "public function addmobilisateuradminAction() {\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');}\n if($sessionutilisateur->confirmation != \"\") {$this->_redirect('/administration/confirmation');}\n\n\n\n if(isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if(isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if($request->isPost()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n /////////////////////////////////////controle code membre\n if(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\n if(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n } else {\n if(substr($_POST['code_membre'], -1, 1) == 'P') {\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n } else if(substr($_POST['code_membre'], -1, 1) == 'M') {\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n }\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n ////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionutilisateur->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateuradmin');\n } else {\n $db->rollback();\n $sessionutilisateur->error = \"Veuillez renseigner le Code Membre ...\";\n } \n } catch(Exception $exc) { \n $db->rollback();\n $sessionutilisateur->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionutilisateur->error = \"Champs * obligatoire\";\n }\n }\n }", "public function suppmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if ($id > 0) {\n\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->delete($id);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function add() {\n\n if (isset($_POST['valider'])) {\n \n extract($_POST);\n $data['ok'] = 0;\n \n if (!empty($_POST)) {\n\n $clientM = new ClientMoral();\n $clientMoralRepository = new ClientMoralRepository();\n \n $clientM->setNom($_POST['nom']);\n $clientM->setRaisonSociale($_POST['raisonSociale']);\n $clientM->setAdresse($_POST['adresse']);\n $clientM->setTel($_POST['tel']);\n $clientM->setEmail($_POST['email']);\n $clientM->setNinea($_POST['ninea']);\n $clientM->setRegiscom($_POST['registreCommerce']);\n \n\n $data['ok'] = $clientMoralRepository->add($clientM);\n }\n return $this->view->load(\"clientMoral/ajout\", $data);\n }\n else {\n return $this->view->load(\"clientMoral/ajout\");\n }\n }", "public function add_post(){\n $response = $this->BayiM->add(\n $this->post('iduser'),\n $this->post('nama'),\n $this->post('gender')\n );\n $this->response($response);\n }", "public function etatmobilisateuradminAction()\n {\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 $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateuradmin');\n }", "function alta_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->fecha_alta=date(\"Y-m-d\");\n\t\t$u->estatus_general_id=1;\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 registrado los datos de la Unidad de Medida.\\\"); 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 membre(){\n\n\t\t$user_id = Input::get('user_id');\n\n\t\t$redirectTo = ( $user_id ? 'admin/users/'.$user_id : 'admin/adresses/'.Input::get('adresse_id') );\n\n if( $this->adresse->addMembre(Input::get('membre_id') , Input::get('adresse_id')) )\n {\n return Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'L\\'appartenance comme membre a été ajouté') );\n }\n\n return Redirect::to($redirectTo)->with( array('status' => 'danger' , 'message' => 'L\\'utilisateur à déjà l\\'appartenance comme membre') );\n\n\t}", "function add()\n {\n if($this->acceso(15)){\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'reunion_id' => $this->input->post('reunion_id'),\n 'usuario_id' => $this->input->post('usuario_id'),\n 'multa_monto' => $this->input->post('multa_monto'),\n 'multa_fecha' => $this->input->post('multa_fecha'),\n 'multa_hora' => $this->input->post('multa_hora'),\n 'multa_detalle' => $this->input->post('multa_detalle'),\n 'multa_numrec' => $this->input->post('multa_numrec'),\n );\n $multa_id = $this->Multa_model->add_multa($params);\n redirect('multa/index');\n }\n else\n {\n $this->load->model('Reunion_model');\n $data['all_reunion'] = $this->Reunion_model->get_all_reunion();\n\n $this->load->model('Usuario_model');\n $data['all_usuario'] = $this->Usuario_model->get_all_usuario();\n\n $data['_view'] = 'multa/add';\n $this->load->view('layouts/main',$data);\n }\n }\n }", "public function store(MobiliariosRequest $request)\n {\n Bitacoras::bitacora(\"Registro de nuevo mobiliario: \".$request['nombre']);\n $mobiliario = new Mobiliarios;\n $mobiliario->codigo = $request->codigo;\n $mobiliario->nombre= $request->nombre;\n $mobiliario->fecha_compra= $request->fecha_compra;\n $mobiliario->precio= $request->precio;\n $mobiliario->descripcion =$request->descripcion;\n $mobiliario->estado = $request->estado;\n $mobiliario->nuevo = $request->nuevo;\n if($request->nuevo == 1){\n $mobiliario->anios=null;\n }else\n {\n if($request->anios == '' && $request->anios2 != ''){\n $mobiliario->anios = $request->anios2;\n }else{\n $mobiliario->anios = $request->anios;\n }\n }\n $mobiliario->proveedor_id = $request->proveedor_id;\n $mobiliario->tipo_id = $request->tipo_id;\n $mobiliario->credito = $request->credito;\n $mobiliario->iva=$request->iva;\n if($request->credito == 0 )\n {\n $mobiliario->interes=null;\n $mobiliario->num_cuotas=null;\n $mobiliario->val_cuotas=null;\n $mobiliario->tiempo_pago=null;\n $mobiliario->cuenta=null;\n }else\n {\n $mobiliario->interes= $request->interes;\n $mobiliario->num_cuotas= $request->num_cuotas;\n $mobiliario->val_cuotas= $request->val_cuotas;\n $mobiliario->tiempo_pago= $request->tiempo_pago;\n $mobiliario->cuenta= $request->cuenta;\n }\n\n $mobiliario->save();\n return redirect('/mobiliarios')->with('mensaje','Registro Guardado');\n }", "public function add_post()\n {\n $response = $this->UserM->add_user(\n $this->post('email'),\n $this->post('nama'),\n $this->post('nohp'),\n $this->post('pekerjaan')\n );\n $this->response($response);\n }", "public function addmobilisateurindexAction() {\n $sessionmcnp = new Zend_Session_Namespace('mcnp');\n\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmc');\n\n\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\n/////////////////////////////////////controle code membre\nif(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\nif(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n}else{\nif(substr($_POST['code_membre'], -1, 1) == 'P'){\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0){\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n }\n }else if(substr($_POST['code_membre'], -1, 1) == 'M'){\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0){\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n }\n }\n}\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur(0);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmcnp->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateurindex');\n}else{\n $db->rollback();\n $sessionmcnp->error = \"Veuillez renseigner le Code Membre ...\";\n\n} \n } catch (Exception $exc) { \n $db->rollback();\n $sessionmcnp->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionmcnp->error = \"Champs * obligatoire\";\n }\n }\n }", "function adminadduser()\n {\n //Check Login\n if ($this->cek_login() != true) {\n return redirect()->to(base_url('login'));\n }\n //Check Role\n if ($this->cek_role() != true) {\n return redirect()->to(base_url('login'));\n }\n $email = $this->request->getPost('email_add');\n $email = esc($email);\n $password = $this->request->getPost('password_add');\n $password = esc($password);\n $name = $this->request->getPost('name_add');\n $name = esc($name);\n $birthdate = $this->request->getPost('birthdate_add');\n $role = $this->request->getPost('role_add');\n $link_foto = '';\n\n $addresult = $this->user_model->addUser($email, $password, $name, $birthdate, $role, $link_foto);\n if ($addresult) {\n session()->setFlashdata('sekolah.project_uas.success', 'User created successfully');\n return redirect()->to(base_url('adminuser'));\n } else {\n //kalo gagal ngapain\n session()->setFlashdata('sekolah.project_uas.fail', 'User cannot created');\n return redirect()->to(base_url('adminuser'));\n }\n }", "public function create(){\n\t\t$this->autenticate();\n\t\t$user_id = $_POST['id'];\n\t\t$nombre = \"'\".$_POST['nombre'].\"'\";\n\t\t$cedula = \"'\".$_POST['cedula'].\"'\";\n\t\t$nacimiento = \"'2000/1/1'\"; //fecha de nacimiento default, despues el mismo usuario la puede editar\n\t\trequire_once(\"../app/models/administrativo.php\");//conexion entre los controladores\n\t\t$administrativo=new Administrativo();// crea el perfil administrativo vacio\n\t\t$administrativo->new($nombre,$cedula,$nacimiento); // inserta la informacion antes ingresada en la base de datos\n\t\t$administrativo_id = $administrativo->where(\"cedula\",$cedula); // se trae el perfil administrativo recien creado con la cedula\n\t\t$administrativo_id = $administrativo_id[0][\"id\"];\n\t\t$administrativo->attach_user($user_id,$administrativo_id); // amarra el usuario a su nuevo perfil docente\n\t\t$administrativo_id = strval($user_id);//convierte el user_id de entero a string\n\t\theader(\"Location: http://localhost:8000/usuarios/show/$user_id\");\n\t\texit;\n\t\t$this->view('administrativos/index', []);\n\t}", "public function add() {\n if (isAuthorized('utilisateurs', 'add')) :\n $this->Utilisateur->Societe->recursive = -1;\n $societe = $this->Utilisateur->Societe->find('list',array('fields' => array('id', 'NOM'),'order'=>array('NOM'=>'asc')));\n $ObjEntites = new EntitesController(); \n $ObjAssoentiteutilisateurs = new AssoentiteutilisateursController(); \n $cercles = $ObjEntites->find_list_all_cercle();\n $this->set(compact('societe','cercles'));\n $matinformatique = array(); \n $activites = array(); \n $utilisateurs = array();\n $outils = array();\n $listediffusions = array();\n $partages = array();\n $etats = array();\n $this->set(compact('matinformatique','activites','utilisateurs','outils','listediffusions','partages','etats'));\n if ($this->request->is('post')) :\n if (isset($this->params['data']['cancel'])) :\n $this->Utilisateur->validate = array();\n $this->History->goBack(1);\n else: \n $this->Utilisateur->create();\n $this->request->data['Utilisateur']['NEW']=1;\n if ($this->Utilisateur->save($this->request->data)) {\n $lastid = $this->Utilisateur->getLastInsertID();\n $utilisateur = $this->Utilisateur->find('first',array('conditions'=>array('Utilisateur.id'=>$lastid),'recursive'=>0));\n if($utilisateur['Utilisateur']['profil_id']>0 || $utilisateur['Utilisateur']['profil_id']==-2):\n $this->sendmailnewutilisateur($utilisateur);\n endif;\n $this->addnewaction($lastid);\n $entite_id = $this->request->data['Utilisateur']['entite_id'];\n $ObjAssoentiteutilisateurs->silent_save($entite_id,$lastid);\n $this->save_history($lastid, \"Utilisateur créé\"); \n $this->Session->setFlash(__('Utilisateur sauvegardé',true),'flash_success');\n $this->History->goBack(1);\n } else {\n $this->Session->setFlash(__('Utilisateur incorrect, veuillez corriger l\\'utilisateur',true),'flash_failure');\n }\n endif;\n endif;\n else :\n $this->Session->setFlash(__('Action non autorisée, veuillez contacter l\\'administrateur.',true),'flash_warning');\n throw new UnauthorizedException(\"Vous n'êtes pas autorisé à utiliser cette fonctionnalité de l'outil\");\n endif; \n }", "public function addUmpireAction() {\n\t\t// Création du formulaire\n\t\t$oUmpire = new Umpire;\n\t\t$oForm = $this->createForm(new UmpireType(), $oUmpire);\n\n\t\t// Traitement du formulaire\n\t\t$oFormHandler = new UmpireHandler($oForm, $this->get('request'), $this->getDoctrine()->getEntityManager());\n\t\tif ($oFormHandler->process()) {\n\t\t\treturn $this->redirect($this->generateUrl('Umpires'));\n\t\t}\n\n\t\treturn $this->render('YBTournamentBundle:Umpire:form_create.html.twig', array('form' => $oForm->createView()));\n\t}", "function newuser(){\n\t\t\tif(!empty($_POST['newemail']) && !empty($_POST['newpassword']) && !empty($_POST['newnombre']) && !empty($_POST['newpoblacion']) && !empty($_POST['newrol'])){\n\t\t\t\t$poblacion = filter_input(INPUT_POST,'newpoblacion',FILTER_SANITIZE_STRING);\n\t\t\t\t$nombre = filter_input(INPUT_POST,'newnombre',FILTER_SANITIZE_STRING);\n\t\t\t\t$password = filter_input(INPUT_POST,'newpassword',FILTER_SANITIZE_STRING);\n\t\t\t\t$email = filter_input(INPUT_POST,'newemail',FILTER_SANITIZE_STRING);\n\t\t\t\t$rol = filter_input(INPUT_POST,'newrol',FILTER_SANITIZE_STRING);\n\t\t\t\t$list = $this -> model -> adduser($nombre,$password,$email,$poblacion,$rol);\n \t\t$this -> ajax_set(array('redirect'=>APP_W.'admin'));\n\t\t\t}\n\t\t}", "public function ajouter() {\n $this->loadView('ajouter', 'content');\n $arr = $this->em->selectAll('client');\n $optionsClient = '';\n foreach ($arr as $entity) {\n $optionsClient .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNomFamille() . '</option>';\n }\n $this->loadHtml($optionsClient, 'clients');\n $arr = $this->em->selectAll('compteur');\n $optionsCompteur = '';\n foreach ($arr as $entity) {\n $optionsCompteur .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNumero() . '</option>';\n }\n $this->loadHtml($optionsCompteur, 'compteurs');\n if(isset($this->post->numero)){\n $abonnement = new Abonnement($this->post);\n $this->em->save($abonnement);\n $this->handleStatus('Abonnement ajouté avec succès.');\n }\n }", "public function addMo()\n\t{\n\t\n\t\t$this->Checklogin();\n\t\tif (isset($_POST ['btnSubmit']))\n\t\t{\n\t\n\t\t\t$data ['admin_section']='MO';\n\t\t\t$id=$this->setting_model->addMo();\n\t\t\tif ($id)\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Mobile has been added successfully.');\n\t\t\t\tredirect('admin/setting/moRegistration');\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Unable to save mobile.');\n\t\t\t\tredirect('admin/setting/moRegistration');\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\tredirect('admin/setting/moRegistration');\n\t\t}\n\t\n\t}", "public function add(){\n if (isset($_SESSION['identity'])) {// Comprobamos que hay un usuario logueado\n $usuario_id = $_SESSION['identity']->id;// Obtenemos el ID del Usuario logueado\n $sProvincia = isset($_POST['province']) ? $_POST['province'] : false;\n $sLocalidad = isset($_POST['location']) ? $_POST['location'] : false;\n $sDireccion = isset($_POST['address']) ? $_POST['address'] : false;\n\n $stats = Utils::statsCarrito();\n $coste = $stats['total'];// Obtenemos el coste total del pedido\n\n\n if ($sProvincia && $sLocalidad && $sDireccion){\n // Guardar datos en bd\n $oPedido = new Pedido();\n $oPedido->setUsuarioId($usuario_id);\n $oPedido->setProvincia($sProvincia);\n $oPedido->setLocalidad($sLocalidad);\n $oPedido->setDireccion($sDireccion);\n $oPedido->setCoste($coste);\n\n $save = $oPedido->savePedido();// Insertamos el Pedido en BD\n\n // Guardar Linea Pedido\n $save_linea = $oPedido->save_linea();\n\n if ($save && $save_linea){// Comprobamos que La inserccion a sido correcta\n $_SESSION['pedido'] = \"complete\";\n }else{\n $_SESSION['pedido'] = \"failed\";\n }\n }else{\n $_SESSION['pedido'] = \"failed\";\n\n }\n header(\"Location:\" . base_url .'pedido/confirmado');\n }else{\n // Redirigir al Index\n header(\"Location:\" . base_url);\n }\n }", "public function NewMobidul ()\n {\n \\Log::info(\"New Mobidul begin!\");\n\n $request = Request::instance();\n $content = $request->getContent();\n\n $json = json_decode($content);\n $code = $json->code;\n $name = $json->name;\n $mode = $json->mode;\n\n $description = isset($json->description)\n ? $json->description\n : 'Ein tolles Mobidul entsteht hier.';\n\n //check if mobidul code is a protected key word\n if ( $this->isMobidulCodeProtected($code) )\n return $response = [\n 'success' => false,\n 'msg' => 'WSC_MOBIDUL_PROTECTED'\n ];\n\n\n if ( ! Mobidul::HasMobidulId($code) )\n {\n \\Log::info(\"Mobidul gets created!\");\n\n $mobidul = Mobidul::create(\n [\n 'name' => $name,\n 'code' => $code,\n 'description' => $description,\n 'mode' => $mode\n ]);\n\n $userId = Auth::id();\n //$category = Category::create(['name' => 'Allgemein', 'mobidulId' => $mobidul->id]);\n\n DB::table('user2mobidul')->insert(\n [\n 'userId' => $userId,\n 'mobidulId' => $mobidul->id,\n 'rights' => 1\n ]);\n\n\n return $response = [\n 'success' => true,\n 'msg' => 'WSC_MOBIDUL_SUCCESS',\n 'code' => $code\n ];\n }\n else\n return $response = [\n 'success' => false,\n 'msg' => 'WSC_MOBIDUL_IN_USE'\n ];\n }", "private function insertUser(){\n\t\t$data['tipoUsuario'] = Seguridad::getTipo();\n\t\tView::show(\"user/insertForm\", $data);\n\t}", "public function add(){\n $data = array(\n \"user_nim\" => $this->input->post('user_nim'),\n \"user_fullname\" => $this->input->post('user_fullname'),\n \"user_password\" => md5($this->input->post('user_password')),\n \"user_email\" => $this->input->post('user_email'),\n \"user_semester\" => $this->input->post('user_semester'),\n \"user_level\" => $this->input->post('user_level'),\n \"user_aktif\" => $this->input->post('user_aktif'),\n \"user_creator\" => $this->session->userdata('nim')\n );\n \n $this->db->insert('tbl_users', $data); // Untuk mengeksekusi perintah insert data\n }", "function act_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 de la Unidad de Medida.\\\"); 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 ajoutauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t$this->_ctrlAuteur->auteurAjoute();\n\t}", "public function action_add(){\n\t\t$monumentId = $this->request->param('id');\n\t\t$user = Auth::instance()->get_user();\n\t\t\n\t\t// Add the monument to the favorite list of the current user\n\t\t$favoriteList = new Model_List_Favorite();\t\t\n\t\t$favoriteList->add($monumentId, $user->UserID);\n\t\t\n\t\t// Redirect the user back to the monument page\n\t\t$this->request->redirect('monument/view/' . $monumentId);\n\t}", "public function add() {\r\n\t\t// init view variables\r\n\t\t// ---\r\n\t\t\r\n\t\t// receive userright token\r\n\t\t$urtoken\t= $this->MediawikiAPI->mw_getUserrightToken()->query->tokens->userrightstoken;\r\n\t\t$this->set( 'urtoken', $urtoken );\r\n\t\t\r\n\t\t// receive usergrouplist\r\n\t\t$ugroups\t\t= $this->Users->Groups->find( 'all' )->all()->toArray();\r\n\t\t$this->set( 'ugroups', $ugroups );\r\n\t\t\r\n\t\tif( $this->request->is( 'post' ) ) {\r\n\t\t\t// required fields empty?\r\n\t\t\tif( empty( $this->request->data[\"username\"] ) || empty( $this->request->data[\"email\"] ) ) {\r\n\t\t\t\t$this->set( 'notice', 'Es wurden nicht alle Pflichtfelder ausgefüllt. Pflichtfelder sind all jene Felder die kein (optional) Vermerk tragen.' );\r\n\t\t\t\t$this->set( 'cssInfobox', 'danger' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// usergroups\r\n\t\t\t$addGroups\t\t= '';\r\n\t\t\t\t\t\t\r\n\t\t\tforeach( $this->request->data[\"group\"] as $grpname => $grpvalue ) {\r\n\t\t\t\tif( $grpvalue == true ) {\r\n\t\t\t\t\t$addGroups\t.= $grpname . '|';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$addGroups\t\t= substr( $addGroups, 0, -1 );\r\n\t\t\t\r\n\t\t\t// create new mediawiki user\t\t\t\r\n\t\t\t$result\t\t= $this->create(\r\n\t\t\t\t$this->request->data[\"username\"],\r\n\t\t\t\t$this->request->data[\"email\"],\r\n\t\t\t\t$this->request->data[\"realname\"],\r\n\t\t\t\t$addGroups,\r\n\t\t\t\t'',\r\n\t\t\t\t$this->request->data[\"urtoken\"],\r\n\t\t\t\t$this->request->data[\"mailsender\"],\r\n\t\t\t\t$this->request->data[\"mailsubject\"],\r\n\t\t\t\t$this->request->data[\"mailtext\"]\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( $result != 'Success' ) {\r\n\t\t\t\t$this->set( 'notice', 'Beim Anlegen des Benutzer_inaccounts ist ein Fehler aufgetreten.</p><p>' . $result );\r\n\t\t\t\t$this->set( 'cssInfobox', 'danger' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->set( 'notice', 'Der / Die Benutzer_in wurde erfolgreich angelegt. Er / Sie wurde via E-Mail informiert.' );\r\n\t\t\t$this->set( 'cssInfobox', 'success' );\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// set view variables\r\n\t\t$this->set( 'notice', '' );\r\n\t\t$this->set( 'cssInfobox', '' );\r\n\t}", "public function addAction(){\n\t\t\t$emp = new Empresa();\n\t\t\t//cargamos el objeto mediantes los metodos setters\n\t\t\t$emp->id = '0';\n\t\t\t$emp->nombre_empresa = $this->getPostParam(\"nombre_empresa\");\n\t\t\t$emp->nit = $this->getPostParam(\"nit\");\n\t\t\t$emp->direccion = $this->getPostParam(\"direccion\");\n\t\t\t$emp->logo = $this->getPostParam(\"imagen\");\n\t\t\t$emp->regimen_id = $this->getPostParam(\"regimen_id\");\n\t\t\t\t\t\t\t\t\n\t\t\tif($emp->save()){\n\t\t\t\tFlash::success(\"Se insertó correctamente el registro\");\n\t\t\t\tprint(\"<script>document.location.replace(\".core::getInstancePath().\"'empresa/mostrar/$emp->id');</script>\");\n\t\t\t}else{\n\t\t\t\tFlash::error(\"Error: No se pudo insertar registro\");\t\n\t\t\t}\n\t\t\t\t\t\n\t }", "public function add() {\n if ($_POST){\n \n $username = filter_input(INPUT_POST, 'username');\n $password = filter_input(INPUT_POST, 'password');\n $password2 = filter_input(INPUT_POST, 'password2');\n $fullname = filter_input(INPUT_POST, 'fullname');\n $email = filter_input(INPUT_POST, 'email');\n \n if (!preg_match('/^[a-z0-9]{4,}$/', $username) or !preg_match('/[A-z 0-9\\-]+$/', $fullname) or $email == '' or $password != $password2) {\n $this->setData('message', 'Podaci nisu tačno uneti.');\n } else {\n $passwordHash = hash('sha512', $password . Configuration::SALT);\n $res = HomeModel::add($username, $passwordHash , $fullname, $email);\n if ($res){\n Misc::redirect('successfull_registration');\n } else {\n $this->setData('message', 'Došlo je do greške prilikom dodavanja. Korisničko ime je verovatno zauzeto.');\n }\n } \n }\n }", "public function add()\n {\n $data = [\n 'NamaMusyrif' => $this->input->post('nama_musyrif'),\n 'Email' => $this->input->post('email'),\n 'NoHp' => $this->input->post('no_hp'),\n ];\n $this->Musyrif_M->addMusyrif($data);\n $this->session->set_flashdata('pesan', 'Berhasil ditambahkan!');\n redirect('musyrif');\n }", "function add() {\n\t\t$this->account();\n\t\tif (!empty($this->data)) {\n\t\t\t$this->Album->create();\n $data['Album'] = $this->data['Album'];\n\t\t\t$data['Album']['images']=$_POST['userfile'];\n\t\t\tif ($this->Album->save($data['Album'])){\n\t\t\t\t$this->Session->setFlash(__('Thêm mới danh mục thành công', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Thêm mơi danh mục thất bại. Vui long thử lại', true));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function actionRegister()\n {\n $this->view->title = DetailesForm::TITLE_REGISTER_FORM;\n $model = new UserInfo();\n $items = DetailesForm ::getItems();\n if (Yii::$app->request->post()) {\n $data = Yii::$app->request->post();\n $resultSave = UserInfo::setSave($model , $data);\n if ($resultSave->success)\n {\n Yii::$app->session->setFlash('success', 'ثبت با موفقیت انجام شد');\n $this->redirect( Url::to(['view','id'=> $resultSave->result['id']] ));\n }\n elseif (!$resultSave->success && !empty($resultSave->message))\n {\n $msg = '';\n foreach ($resultSave->message as $text)\n {\n $msg .= $text . \"<br>\";\n }\n Yii::$app->session->setFlash('danger', $msg);\n }\n else\n Yii::$app->session->setFlash('danger', 'عملیات ناموفق به پایین رسید');\n }\n\n return $this->render('_form',\n [\n 'model' => $model,\n 'items' => $items,\n ]);\n\n }", "private function ajoutuser() {\n\t\t$this->_ctrlAdmin = new ControleurAdmin();\n\t\t$this->_ctrlAdmin->userAjout();\n\t}", "public function agregar_usuario_controlador()\n {\n $nombres = strtoupper(mainModel::limpiar_cadena($_POST['usu_nombres_reg']));\n $apellidos = strtoupper(mainModel::limpiar_cadena($_POST['usu_apellidos_reg']));\n $identidad=mainModel::limpiar_cadena($_POST['usu_identidad_reg']);\n $puesto=mainModel::limpiar_cadena($_POST['usu_puesto_reg']);\n $unidad=mainModel::limpiar_cadena($_POST['usu_unidad_reg']);\n $rol = mainModel::limpiar_cadena($_POST['usu_rol_reg']);\n $celular = mainModel::limpiar_cadena($_POST['usu_celular_reg']);\n $usuario = strtolower(mainModel::limpiar_cadena($_POST['usu_usuario_reg']));\n $email=$usuario . '@didadpol.gob.hn' ;\n\n\n /*comprobar campos vacios*/\n if ($nombres == \"\" || $apellidos == \"\" || $usuario == \"\" || $email == \"\" || $rol == \"\" || $identidad == \"\" || $puesto == \"\" || $unidad == \"\") {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO HAS COMPLETADO TODOS LOS CAMPOS QUE SON OBLIGATORIOS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n if (mainModel::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $nombres)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRES SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if (mainModel::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $apellidos)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO APELLIDOS SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if ($celular != \"\") {\n if (mainModel::verificar_datos(\"[0-9]{8}\", $celular)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE CELULAR NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n if (mainModel::verificar_datos(\"[0-9]{13}\", $identidad)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE IDENTIDAD NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar DNI*/\n $check_dni = mainModel::ejecutar_consulta_simple(\"SELECT identidad FROM tbl_usuarios WHERE identidad='$identidad'\");\n if ($check_dni->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE IDENTIDAD YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n if (mainModel::verificar_datos(\"[a-z]{3,15}\", $usuario)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRE DE USUARIO SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 5 Y UN MAXIMO DE 15 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n /*validar usuario*/\n $check_user = mainModel::ejecutar_consulta_simple(\"SELECT nom_usuario FROM tbl_usuarios WHERE nom_usuario='$usuario'\");\n if ($check_user->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL USUARIO YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar email*/\n\n \n $caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n $pass = \"\";\n for ($i = 0; $i < 8; $i++) {\n $pass .= substr($caracteres, rand(0, 64), 1);\n }\n $message = \"<html><body><p>Hola, \" . $nombres . \" \" . $apellidos;\n $message .= \" Estas son tus credenciales para ingresar al sistema de DIDADPOL\";\n $message .= \"</p><p>Usuario: \" . $usuario;\n $message .= \"</p><p>Correo: \" . $email;\n $message .= \"</p><p>Contraseña: \" . $pass;\n $message .= \"</p><p>Inicie sesión aquí para cambiar la contraseña por defecto \" . SERVERURL . \"login\";\n $message .= \"<p></body></html>\";\n\n $res = mainModel::enviar_correo($message, $nombres, $apellidos, $email);\n if (!$res) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE ENVIÓ CORREO ELECTRÓNICO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n $passcifrado = mainModel::encryption($pass);\n\n $datos_usuario_reg = [\n \"rol\" => $rol,\n \"puesto\"=>$puesto,\n \"unidad\"=>$unidad,\n \"usuario\" => $usuario,\n \"nombres\" => $nombres,\n \"apellidos\" => $apellidos,\n \"dni\"=>$identidad,\n \"clave\" => $passcifrado,\n \"estado\" => \"NUEVO\",\n \"email\" => $email,\n \"celular\" => $celular\n ];\n $agregar_usuario = usuarioModelo::agregar_usuario_modelo($datos_usuario_reg);\n if ($agregar_usuario->rowCount() == 1) {\n $alerta = [\n \"Alerta\" => \"limpiar\",\n \"Titulo\" => \"USUARIO REGISTRADO\",\n \"Texto\" => \"LOS DATOS DEL USUARIO SE HAN REGISTRADO CON ÉXITO\",\n \"Tipo\" => \"success\"\n ];\n } else {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE HA PODIDO REGISTRAR EL USUARIO\",\n \"Tipo\" => \"error\"\n ];\n }\n echo json_encode($alerta);\n }", "public function crearUsuario() {\n\n\n if ($this->seguridad->esAdmin()) {\n $id = $this->usuario->getLastId();\n $usuario = $_REQUEST[\"usuario\"];\n $contrasenya = $_REQUEST[\"contrasenya\"];\n $email = $_REQUEST[\"email\"];\n $nombre = $_REQUEST[\"nombre\"];\n $apellido1 = $_REQUEST[\"apellido1\"];\n $apellido2 = $_REQUEST[\"apellido2\"];\n $dni = $_REQUEST[\"dni\"];\n $imagen = $_FILES[\"imagen\"];\n $borrado = 'no';\n if (isset($_REQUEST[\"roles\"])) {\n $roles = $_REQUEST[\"roles\"];\n } else {\n $roles = array(\"2\");\n }\n\n if ($this->usuario->add($id,$usuario,$contrasenya,$email,$nombre,$apellido1,$apellido2,$dni,$imagen,$borrado,$roles) > 1) {\n $this->perfil($id);\n } else {\n echo \"<script>\n i=5;\n setInterval(function() {\n if (i==0) {\n location.href='index.php';\n }\n document.body.innerHTML = 'Ha ocurrido un error. Redireccionando en ' + i;\n i--;\n },1000);\n </script>\";\n } \n } else {\n $this->gestionReservas();\n }\n \n }", "public function actionaddUniquePhone()\n\t{\n\t\t\n\t\tif($this->isAjaxRequest())\n\t\t{\n\t\t\tif(isset($_POST['userphoneNumber'])) \n\t\t\t{\n\t\t\t\t$sessionArray['loginId']=Yii::app()->session['loginId'];\n\t\t\t\t$sessionArray['userId']=Yii::app()->session['userId'];\n\t\t\t\t$loginObj=new Login();\n\t\t\t\t$total=$loginObj->gettotalPhone($sessionArray['userId'],1);\n\t\t\t\tif($total > 1)\n\t\t\t\t{\n\t\t\t\t\techo \"Limit Exist!\";\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t$totalUnverifiedPhone=$loginObj->gettotalUnverifiedPhone($sessionArray['userId'],1);\n\t\t\t\tif($totalUnverifiedPhone==1)\n\t\t\t\t{\n\t\t\t\t\techo \"Please first verify unverified phone.\";\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$result=$loginObj->addPhone($_POST,1,$sessionArray);\n\t\t\t\t\n\t\t\t\tif($result['status']==0)\n\t\t\t\t{\n\t\t\t\t\techo \"success\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo $result['message']; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->render(\"/site/error\");\n\t\t}\n\t}", "public function add()\n {\n $data=$this->M_mtk->add();\n echo json_encode($data);\n }", "function ajax_add()\n {\n\tif ($this->form_validation->run($this, 'users') == TRUE) {\n\t //get data from post\n\t $data = $this->_get_data_from_post();\n\t $return = [];\n\t //$data['photo'] = Modules::run('upload_manager/upload','image');\n\n\t $return['status'] = $this->mdl_users->_insert($data) ? TRUE : FALSE;\n\t $return['msg'] = $data['status'] ? NULL : 'An error occured trying to insert data please try again';\n\t $return['node'] = [\n\t\t'users' => $data['users'],\n\t\t'slug' => $data['users_slug'],\n\t\t'id' => $this->db->insert_id()\n\t ];\n\n\n\t echo json_encode($return);\n\t}\n }", "public function addAction()\n {\n $form = new RobotForm;\n $user = Users::findFirst($this->session->get(\"auth-id\"));\n\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Добавить робота :: \");\n }\n\n if ($this->request->isPost()) {\n if (!$form->isValid($this->request->getPost())) {\n foreach ($form->getMessages() as $message) {\n $this->flashSession->error($message);\n }\n return $this->response->redirect(\n [\n \"for\" => \"robot-add\",\n \"name\" => $user->name\n ]\n );\n } else {\n\n $robot = new Robots();\n $robot->name = $this->request->getPost(\"name\");\n $robot->type = $this->request->getPost(\"type\");\n $robot->year = $this->request->getPost(\"year\");\n $robot->users_id = $user->id;\n\n\n if ($robot->save()) {\n $this->flashSession->success(\"Вы добавили нового робота !\");\n $this->session->set(\"robot-id\", $robot->id);\n return $this->response->redirect(\n [\n\n \"for\" => \"user-show\",\n \"name\" => $this->session->get(\"auth-name\")\n ]\n );\n\n } else {\n\n $this->flashSession->error($robot->getMessages());\n }\n\n }\n }\n\n return $this->view->form = $form;\n\n }", "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增用户';\n $this->global['pageName'] = 'user_add';\n\n if(empty($_POST)){\n $data['roles'] = $this->user_model->getRoles($this->global['login_id']);\n\n $this->loadViews(\"user_manage/user_add\", $this->global, $data, NULL);\n }else{\n $this->item_validate();\n }\n }\n }", "public function AddMentoratUser($id){\n if($user = User::where(['id' => $id,'mentorat' => User::not_mentorat,'type' => User::user])->first()){\n $this->mail->ID840231($user->id,Session::get('userData'));\n toastr()->success('This user has been emailed to approve mentor');\n\n $user->mentorat = User::in_standby_mentorat;\n $user->save();\n }else{\n toastr()->error('Something is wrong!');\n }\n return Redirect::back();\n }", "public function add(){\r\n\t\t//$this->auth->set_access('add');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function agregar(){\n if(!isLoggedIn()){\n redirect('usuarios/login');\n }\n //check User Role -- Only ADMINISTRADOR allowed\n if(!checkLoggedUserRol(\"ADMINISTRADOR\")){\n redirect('dashboard');\n }\n\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n \n // Sanitize POST array\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n $data = [\n 'nombreEspecialidad' => trim($_POST['nombreEspecialidad'])\n ];\n\n // Validar Nombre Especialidad obligatorio\n if(empty($data['nombreEspecialidad'])){\n $data['nombreEspecialidad_error'] = 'Por favor ingrese un titulo para la especialidad';\n }\n\n // Validar Nombre Especialidad existente\n if($this->especialidadModel->checkEspecialidad($data['nombreEspecialidad'])){\n $data['nombreEspecialidad_error'] = 'La especialidad que intentó agregar ya existe';\n }\n\n // Asegurarse que no haya errores\n if(empty($data['nombreEspecialidad_error'])){\n // Crear especialidad\n if($this->especialidadModel->agregarEspecialidad($data['nombreEspecialidad'])){\n flash('especialidad_success', 'Especialidad creada correctamente');\n redirect('especialidades');\n }\n else{\n die('Ocurrió un error inesperado');\n }\n }\n else{\n flash('especialidad_error', $data['nombreEspecialidad_error'], 'alert alert-danger');\n redirect('especialidades');\n }\n }\n }", "public function addMembro($id_usuario, $id_grupo) {\n $sql = \"INSERT INTO grupos_membros SET id_usuario = '$id_usuario', id_grupo = '$id_grupo'\";\n $this->db->query($sql);\n }", "public function agregarUsuario(){\n \n }", "public function add_friend($user_to = null) {\n\n\t\t\n\t\t$this->request->data['User']['id'] = $this->getUserId();\n\t\t$this->request->data['Friend']['id'] = $user_to;\n\n\t\tif($result = $this->User->saveAll($this->request->data)) {\n\t\t\t$this->redirect(array('action' => 'view', $user_to));\n\t\t} else {\n\t\t\t$this->redirect(array('action' => 'view', $user_to));\n\t\t}\n\n\t}", "public function addUser(){\n\t}", "public function Add_medico($array = array()){\n \t\t $request['inp_document'];\n \t\t $request['inp_nomb'];\n \t\t $request['inp_apell'];\n \t\t $request['inp_tel'];\n \t\t $request['inp_cel'];\n \t\t $request['rdio_sex'];\n \t\t $request['slt_especia'];\t\n \t\t $request['inp_nick'];\n\t\t $person = new Persona();\n\t\t $respon = $person->crearPersona($array); // dentro de esta funcion debe insertar en la tabla persona, si es exitoso la insercion, debe pasar el if siguiente e insertar en la tabla medicos\n\t\t if(isset($respon['exito'])){\n\t\t $request['slt_especia'];\n\t\t $request['inp_document'];\t\n\t\t\n\n\t\t\t //insercion del packete\n\t\t }\n\t\t}", "public function admin_add()\n {\n if ($this->request->is('post')) {\n $this->User->create();\n\n $this->request->data['Impi']['auth_scheme'] = 127;\n\n if ($this->User->saveAll($this->request->data)) {\n $this->Session->setFlash(__('The user has been saved'));\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n }\n }\n $utilityFunctions = $this->User->UtilityFunction->find('list');\n\n $this->set(compact('utilityFunctions', 'utilityFunctionsParameters'));\n }", "public function postAjouter() {\n \t$d['resultat']= 0;\n \tif(!Auth::user()) {\n \t\t$d['message'] = \"Vous devez être identifié pour participer.\";\n \t} else {\n\t\t\tif (Input::get('valeur')==\"\") {\n\t\t\t\t$d['message'] = \"Vous devez écrire quelque chose pour participer.\";\n\t\t\t} else {\n\t\t\t\t// Enregistre le message\n\t\t\t\t$message = new \\App\\Models\\Message;\n\t\t\t\t$message->user_id = Auth::user()->id;\n\t\t\t\t$message->texte = Input::get('valeur');\n\t\t\t\t$message->save();\n\t\t\t\t$d['resultat'] = 1;\n\t\t\t\t$d['message'] = \"\";\n\t\t\t}\n\t\t}\n\t\t// Le refresh est fait via un autre appel ajax\n\t\t// On envoi la réponse\n\t\treturn response()->json($d);\n\t}", "private function inserirUnidade()\n {\n $cadUnidade = new \\App\\adms\\Models\\helper\\AdmsCreate;\n $cadUnidade->exeCreate(\"adms_unidade_policial\", $this->Dados);\n if ($cadUnidade->getResultado()) {\n $_SESSION['msg'] = \"<div class='alert alert-success'>Unidade cadastrada com sucesso!</div>\";\n $this->Resultado = true;\n } else {\n $_SESSION['msg'] = \"<div class='alert alert-danger'>Erro: A Unidade não foi cadastrada!</div>\";\n $this->Resultado = false;\n }\n }", "public function addUtilisateur()\n\t{\n\t\t\t$sql = \"INSERT INTO utilisateur SET\n\t\t\tut_nom=?,\n\t\t\tut_prenom=?,\n\t\t\tut_pseudo=?,\n\t\t\tut_mail=?,\n\t\t\tut_mdp=?,\n\t\t\tut_date_inscription=NOW(),\n\t\t\tut_hash_validation =?\";\n\n\t\t\t$res = $this->addTuple($sql,array($this->nom,\n\t\t\t\t$this->prenom,\n\t\t\t\t$this->pseudo,\n\t\t\t\t$this->email,\n\t\t\t\t$this->pass,\n\t\t\t\t$this->hashValidation()\n\t\t\t\t));\n\t\t\treturn $res;\n\t}", "public function AddSocial(){\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n $id_empresa = 1;\n $facebook = trim($_POST['facebook']);\n $twitter = trim($_POST['twitter']);\n $google_plus = trim($_POST['google_plus']);\n $linkedin = trim($_POST['linkedin']);\n $instagram = trim($_POST['instagram']);\n $pinterest = trim($_POST['pinterest']);\n $whatsapp = trim($_POST['whatsapp']);\n\n $columnas = array(\"id_empresa\", \"facebook\", \"twitter\", \"google_plus\", \"linkedin\", \"instagram\", \"pinterest\", \"whatsapp\");\n $datos = array($id_empresa, $facebook, $twitter, $google_plus, $linkedin, $instagram, $pinterest, $whatsapp);\n\n //ejecyta la insercion\n if($this->ConfigModelo->insert('red_social', $columnas, $datos)){\n\n $_SESSION[\"success\"]=true;\n redireccionar('pages/contacto');\n\n }else{\n echo false;\n }\n\n }else{\n\n $columnas = \"\";\n $datos = \"\";\n\n }\n\n }", "public static function append_into_contact_list(){\n\n\n $id_added_user = $_SESSION[\"user_id_added\"]; // usuario que acabamos de agregar\n\t$current_user_id = $_SESSION[\"id_user\"]; // este soy yo osea el que agrega\n\n\t$QUERY = \"INSERT INTO contact values(NULL,$current_user_id ,$id_added_user) \";\n\n\n\t mysql_query( $QUERY , Conectar::con());\n\n\n\n\t}", "public function addUser(){}", "public function create()\n {\n \n echo \"Syntax: POST: /api?telefon=*telefon*&id_agencija=*id*<br>/api?email=*email*&id_agencija=*id*\";\n \n }", "public function actionRegister()\n {\n if (isset($this->request['mobile'])) {\n $mobile = $this->request['mobile'];\n $user = Users::model()->find('username = :mobile', [':mobile' => $mobile]);\n\n $code = Controller::generateRandomInt();\n if (!$user) {\n $user = new Users();\n $user->username = $mobile;\n $user->password = $mobile;\n $user->status = Users::STATUS_PENDING;\n $user->mobile = $mobile;\n }\n\n $user->verification_token = $code;\n if ($user->save()) {\n $userDetails = UserDetails::model()->findByAttributes(['user_id' => $user->id]);\n $userDetails->credit = SiteSetting::getOption('base_credit');\n $userDetails->save();\n }\n\n Notify::SendSms(\"کد فعال سازی شما در آچارچی:\\n\" . $code, $mobile);\n\n $this->_sendResponse(200, CJSON::encode(['status' => true]));\n } else\n $this->_sendResponse(400, CJSON::encode(['status' => false, 'message' => 'Mobile variable is required.']));\n }", "public function addNewRegiuneByAdmin($data)\n {\n $nume = $data['nume'];\n\n $checkRegiune = $this->checkExistRegiune($nume);\n\n\n if ($nume == \"\") {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Câmpurile de introducere nu trebuie să fie Golite!</div>';\n return $msg;\n } elseif (strlen($nume) < 2) {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Numele regiunii este prea scurt, cel puțin 2 caractere!</div>';\n return $msg;\n } elseif ($checkRegiune == TRUE) {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Regiunea există deja, vă rugăm să încercați o alta regiune ...!</div>';\n return $msg;\n } else {\n\n $sql = \"INSERT INTO regiune(nume ) VALUES(:nume)\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->bindValue(':nume', $nume);\n $result = $stmt->execute();\n if ($result) {\n $msg = '<div class=\"alert alert-success alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Success !</strong> Ați înregistrat cu succes!</div>';\n return $msg;\n } else {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Error !</strong> Ceva n-a mers bine !</div>';\n return $msg;\n }\n }\n }", "public function actionCreate() {\n $id_user = Yii::app()->user->getId();\n $model = User::model()->findByPk($id_user);\n $tipo = $model->id_tipoUser;\n if ($tipo == \"1\") {\n $model = new Consultor;\n $modelUser = new User;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Consultor'])) {\n $model->attributes = $_POST['Consultor'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n \n \n \n $senha = uniqid(\"\", true);\n $modelUser->password = $senha;\n $modelUser->username = $_POST['username'];\n $modelUser->email = trim($model->email);\n $modelUser->attributes = $modelUser;\n $modelUser->id_tipoUser = 4;\n $modelUser->senha = '0';\n\n if ($modelUser->save()) {\n\n $model->id_user = $modelUser->id;\n if ($model->save()) {\n $this->redirect(array('EnviaEmail', 'nomedestinatario' => $model->nome, \"emaildestinatario\" => $model->email, \"nomedeusuario\" => $modelUser->username, \"senha\" => $modelUser->password));\n }\n }\n \n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n \n }else {\n $this->redirect(array('User/ChecaTipo'));\n }\n }", "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }", "function add()\n {\n //load chuc vu ra\n $this->load->model('chucvu_model');\n $input = array();\n $chucvu = $this->chucvu_model->getList($input);\n $this->data['chucvu'] = $chucvu;\n \n //thoa dieu kien dau vao moi insert vao\n $this->load->library('form_validation');\n $this->load->helper('form');\n if($this->input->post())\n {\n $this->form_validation->set_rules('password', 'Mật khẩu', 'min_length[8]'); \n $this->form_validation->set_rules('repassword', 'Nhập lại mật khẩu', 'matches[password]');\n \n if($this->form_validation->run())\n {\n //lay DL tu view\n $ho = $this->input->post('ho');\n $ten = $this->input->post('ten');\n $luong = $this->input->post('luong');\n $chucvu = $this->input->post('chucvuid');\n $password = $this->input->post('password'); \n //do use plugin jQuery number --> chuyen ve dang so moi insert duoc\n $luong = str_replace(',', '', $luong);\n \n $data = array(\n 'ho' => $ho,\n 'ten' => $ten,\n 'chucvuid' => $chucvu, \n 'password' => md5($password),\n 'luong' => $luong\n );\n if($this->nhanvien_model->add($data))\n {\n $message = $this->session->set_flashdata('message', 'Thêm mới dữ liệu thành công'); \n }\n else {\n $this->session->set_flashdata('message', 'Không thể thêm mới');\n } \n //chuyen ve trang index\n redirect(admin_url('nhanvien'));\n }\n }\n \n $this->data['temp'] = 'admin/nhanvien/add';\n $this->load->view('admin/main', $this->data);\n }", "protected function register(MembreRequest $data)\n {\n\t\t\t//check if is Avatar img exist\n\t\t$custom_file_name =\"\";\n\t\t/*if ($request->hasFile('image')) {\n\t\t\t$file = $request->file('image');\n\t\t\t$custom_file_name = time().'-'.$request->file('image')->getClientOriginalName(); // customer the name of img uploded \n\t\t\t$file->move('avatar_membre/', $custom_file_name); // save img ine the folder Public/Avatars\n\t\t\t\n\t\t}*/\t\n\t $membre=Membre::create([\n 'nom' => $data['nom'],\n 'email' => $data['email'],\n\t\t\t'prenom' => $data['prenom'],\n\t\t\t'tel' => $data['tel'],\n\t\t\t'state_id' => $data['state_id'],\n\t\t\t'address' => $data['address'],\n\t\t\t'nbr_annonce_autorise' => 5,\n 'password' => Hash::make($data['password']),\n ]);\n\t\t\n\t \n\t\t$this->guard()->login($membre);\n\t\treturn redirect()->intended( 'membre' ); \n }", "public function agregarUsuarioController(){\n //se verifica que el ultimo elemento de la lista contenga algo \n if(isset($_POST[\"tipo_cliente\"]) && $_POST[\"tipo_cliente\"] != \"\"){\n //Se almacena la informacion en un arreglo asociativo\n $datosController = array( \"tipo_cliente\"=>$_POST[\"tipo_cliente\"],\n \"telefono\"=>$_POST[\"telefono\"],\n \"nombre\"=>$_POST[\"nombre\"],\n \"ap_paterno\"=>$_POST[\"ap_paterno\"],\n \"ap_materno\"=>$_POST[\"ap_materno\"]\n );\n //Se habla a la clase DATOS para poder enviarle la peticion de agregar un nuevo registro, enviandole el arreglo y la tabla.\n $respuesta = Datos::agregarUsuariosModel($datosController,\"clientes\");\n\n if($respuesta == true){\n //En caso positivo nos redirecciona al cliente.\n echo '<script>\t\t\n\t\t\t location.href= \"index.php?action=cliente\";\n\t\t </script>';\n \n }else{\n //En caso negativo nos deja en la misma ventana.\n echo '<div class=\"alert alert-warning\" role=\"alert\"> <strong>Error!</strong> Revise el contenido que desea agregar. </div>';/*\n echo '<script>\t\t\n\t\t\t location.href= \"index.php?action=agregar_cliente\";\n\t\t </script>';*/\n }\n }\n }", "function registerMadMimi() {\n\t\t//\n\t\tApp::import('Vendor', 'MadMimi', array('file' => 'madmimi' . DS . 'MadMimi.class.php'));\n\t\tApp::import('Vendor', 'MadMimi', array('file' => 'madmimi' . DS . 'Spyc.class.php'));\n\n\t\t// Crear el objeto de Mad Mimi\n\t\t//\n\t\t$mailer = new MadMimi(Configure::read('madmimiEmail'), Configure::read('madmimiKey'));\n\t\t$userMimi = array('email' => $_POST[\"email\"], 'firstName' => $_POST[\"name\"], 'add_list' => 'mailing');\n\t\t$mailer -> AddUser($userMimi);\n\t\techo true;\n\t\tConfigure::write(\"debug\", 0);\n\t\t$this -> autoRender = false;\n\t\texit(0);\n\t}", "public function addMonumentAction(Request $request){\n if(($this->container->get('security.authorization_checker')->isGranted('ROLE_CLIENT'))){\n throw new AccessDeniedException('Access Denied!!!!!');\n }\n else{\n $monument = new Monument();\n $test = \"ajout\";\n $form = $this->createForm(MonumentType::class, $monument);\n $form = $form->handleRequest($request);\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($monument);\n $em->flush();\n return $this->redirectToRoute('museum_showMonumentspage');\n }\n return $this->render('@Museum/Monument/addMonument.html.twig', array('form' => $form->createView(), 'test' => $test));\n }}", "function store()\n {\n $name = $_REQUEST['name'];\n $email = $_REQUEST['email'];\n $address = $_REQUEST['address'];\n $password = $_REQUEST['password'];\n $group_id = $_REQUEST['group_id'];\n $this->userModel->add($name, $email, $address, $password, $group_id);\n // quay tro lai trang danh sach -> thay doi thuoc tinh: location cua header\n header('location:index.php?page=users');\n }", "public function add()\n {\n\n // Reglas de validación del formulario\n /*\n required: indica que el campo es obligatorio.\n min_length: indica que la cadena debe tener al menos una cantidad determinada de caracteres.\n max_length: indica que la cadena debe tener como máximo una cantidad determinada de caracteres.\n valid_email: indica que el valor debe ser un correo con formato válido.\n */\n $this->form_validation->set_error_delimiters('', '');\n $this->form_validation->set_rules(\"nombre\", \"Nombre\", \"required|max_length[100]\");\n $this->form_validation->set_rules(\"apellido\", \"Apellido\", \"required|max_length[100]\");\n $this->form_validation->set_rules(\"email\", \"Email\", \"required|valid_email|max_length[150]|is_unique[profesores.email]\");\n $this->form_validation->set_rules(\"fecha_nacimiento\", \"Fecha de Nacimiento\", \"required\");\n $this->form_validation->set_rules(\"profesion\", \"Profesion\", \"required|max_length[100]\");\n\n // Modificando el mensaje de validación para los errores\n $this->form_validation->set_message('required', 'El campo %s es requerido.');\n $this->form_validation->set_message('min_length', 'El campo %s debe tener al menos %s caracteres.');\n $this->form_validation->set_message('max_length', 'El campo %s debe tener como máximo %s caracteres.');\n $this->form_validation->set_message('valid_email', 'El campo %s no es un correo válido.');\n $this->form_validation->set_message('is_unique', 'El campo %s ya existe.');\n\n //echo \"Genero => \" . $this->input->post(\"genero\");\n\n // Parámetros de respuesta\n header('Content-type: application/json');\n $statusCode = 200;\n $msg = \"\";\n\n // Se ejecuta la validación de los campos\n if ($this->form_validation->run()) {\n // Si la validación es correcta entra acá\n try {\n $this->load->model('ProfesoresModel');\n $data = array(\n \"nombre\" => $this->input->post(\"nombre\"),\n \"apellido\" => $this->input->post(\"apellido\"),\n \"email\" => $this->input->post(\"email\"),\n \"profesion\" => $this->input->post(\"profesion\"),\n \"genero\" => $this->input->post(\"genero\"),\n \"fecha_nacimiento\" => $this->input->post(\"fecha_nacimiento\"),\n );\n $rows = $this->ProfesoresModel->insert($data);\n if ($resMo > 0) {\n $msg = \"Información guardada correctamente.\";\n } else {\n $statusCode = 500;\n $msg = \"No se pudo guardar la información.\";\n }\n } catch (Exception $ex) {\n $statusCode = 500;\n $msg = \"Ocurrió un error.\" . $ex->getMessage();\n }\n } else {\n // Si la validación da error, entonces se ejecuta acá\n $statusCode = 400;\n $msg = \"Ocurrieron errores de validación.\";\n $errors = array();\n foreach ($this->input->post() as $key => $value) {\n $errors[$key] = form_error($key);\n }\n $this->data['errors'] = $errors;\n }\n // Se asigna el mensaje que llevará la respuesta\n $this->data['msg'] = $msg;\n // Se asigna el código de Estado HTTP\n $this->output->set_status_header($statusCode);\n // Se envía la respuesta en formato JSON\n echo json_encode($this->data);\n }", "public function addNew()\n {\n $this->load->model('user_model');\n $data['roles'] = $this->user_model->getUserRoles();\n $data['divisi'] = $this->user_model->getUserDivisi();\n $data['pangkat'] = $this->user_model->getUserPangkat();\n $this->global['pageTitle'] = 'Tambahkan Data Rescuer';\n $this->load->view('includes/header', $this->global);\n $this->load->view('rescuer/addNew', $data);\n $this->load->view('includes/footer');\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 add(){\n\t\t$data = array();\n\t\t$postData = array();\n\n\t\t//zistenie, ci bola zaslana poziadavka na pridanie zaznamu\n\t\tif($this->input->post('postSubmit')){\n\t\t\t//definicia pravidiel validacie\n\t\t\t$this->form_validation->set_rules('mesto', 'Pole mesto', 'required');\n\t\t\t$this->form_validation->set_rules('PSČ', 'Pole PSČ', 'required');\n\t\t\t$this->form_validation->set_rules('email', 'Pole email', 'required');\n\t\t\t$this->form_validation->set_rules('mobil', 'Pole mobil', 'required');\n\n\n\n\t\t\t//priprava dat pre vlozenie\n\t\t\t$postData = array(\n\t\t\t\t'mesto' => $this->input->post('mesto'),\n\t\t\t\t'PSČ' => $this->input->post('PSČ'),\n\t\t\t\t'email' => $this->input->post('email'),\n\t\t\t\t'mobil' => $this->input->post('mobil'),\n\n\n\t\t\t);\n\n\t\t\t//validacia zaslanych dat\n\t\t\tif($this->form_validation->run() == true){\n\t\t\t\t//vlozenie dat\n\t\t\t\t$insert = $this->Kontakt_model->insert($postData);\n\n\t\t\t\tif($insert){\n\t\t\t\t\t$this->session->set_userdata('success_msg', 'Záznam o kontakte bol úspešne vložený');\n\t\t\t\t\tredirect('/kontakt');\n\t\t\t\t}else{\n\t\t\t\t\t$data['error_msg'] = 'Nastal problém.';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$data['post'] = $postData;\n\t\t$data['title'] = 'Pridať kontakt';\n\t\t$data['action'] = 'add';\n\n\t\t//zobrazenie formulara pre vlozenie a editaciu dat\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('kontakt/add-edit', $data);\n\t\t$this->load->view('templates/footer');\n\t}", "function create()\r\n\t{\r\n\r\n\t\t$this->form_validation->set_rules('nom', 'le nom', 'trim|required|min_length[2]|max_length[12]');\r\n\r\n\t\tif ($this->form_validation->run() == TRUE ) {\r\n\t\t\r\n\t\t$this->e->ajouter($this->input->post());\r\n\r\n\t\t$this->_notice=\"Ajout effectué avec succéss\";\r\n\r\n\t\t$this->index();\r\n\t\t} \r\n\t\telse {\r\n\t\t\t$this->index();\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public function create_post(){\n\n $this->form_validation->set_rules('domicilio[latitud]', 'Latitud del Domicilio', 'required|trim');\n $this->form_validation->set_rules('domicilio[longitud]', 'Longitud del Domicilio', 'required|trim');\n $this->form_validation->set_rules('domicilio[image]', 'Imagen del Mapa', 'required|trim');\n\n\t\tif( $this->form_validation->run() == true){\n \n $data = $this->security->xss_clean($this->input->post()); # XSS filtering\n\n $token = $this->security->xss_clean($this->input->post('auth', TRUE)); //token de authentication\n $is_valid_token = $this->authorization_token->validateToken($token);\n\n if(null !== $is_valid_token && $is_valid_token['status'] === TRUE){\n $usuario = $this->Usuario_model->getByTokenJWT($is_valid_token['data']);\n $domicilio = $data[\"domicilio\"];\n\n if (array_key_exists('persona', $data)) {\n $domicilio['id_persona'] = $data[\"persona\"]['id'];\n }\n $domicilio['id_usuario'] = $usuario->id;\n $out_domicilio = $this->Domicilio_model->create( $domicilio );\n\n if($out_domicilio != null){\n\n $this->response([\n 'status' => true,\n 'message' => $this->lang->line('item_was_has_add'),\n $this->lang->line('domicilio') => $out_domicilio\n ], REST_Controller::HTTP_OK);\n }else{\n $this->response([\n 'status' => false,\n 'message' => $this->lang->line('no_item_was_has_add')\n ], REST_Controller::HTTP_CREATED);\n }\n }else{\n $this->response([\n 'status' => false,\n 'message' => $this->lang->line('token_is_invalid'),\n ], REST_Controller::HTTP_NETWORK_AUTHENTICATION_REQUIRED); // NOT_FOUND (400) being the HTTP response code\n }\n\t\t}else{\n $this->response([\n 'status' => false,\n 'message' => validation_errors()\n ], REST_Controller::HTTP_ACCEPTED); \n\t\t}\n $this->set_response($this->lang->line('server_successfully_create_new_resource'), REST_Controller::HTTP_RESET_CONTENT);\n }", "public function add(){\n\t\tif($this->request->is('post'))\n\t\t{\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['role'] = 'user';\n\t\t\tif($this->User->save($this->request->data))\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario creado');\n\t\t\t\treturn $this-redirect(array('action' =>'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario no creado');\n\t\t\t}\n\t\t}\n\n\t}", "public function add_to_cart_friend() {\n $id_item = $_POST['id_item'];\n $this->view->id_item = $id_item;\n\n $nr_friends = count($_POST['name']);\n $friendsDetails = array();\n\n //validam daca a completat numele la toti\n for ($i = 0; $i < $nr_friends; $i++) {\n if (strlen($_POST['name'][$i]) < 1 || !filter_var($_POST['email'][$i], FILTER_VALIDATE_EMAIL)) {\n $errors = \"Va rugam completati corect datele prietenilor !\";\n break 1;\n }\n $friendsDetails[] = array(\"name\" => $_POST['name'][$i], \"email\" => $_POST['email'][$i]);\n }\n if ($errors) {\n $this->view->errors = $errors;\n $this->view->nr_friends = $nr_friends;\n $this->view->post = $_POST;\n $this->view->render(\"popups/addFriend\", false, \"popup\");\n }\n\n //totul e ok aici, salvam item-urile in shopping cart\n //Intai cream tipul de date pentru metoda NeoCartModel\\addToCart\n $params['quantity'] = $nr_friends;\n $params['id_item'] = $id_item;\n $params['is_gift'] = true;\n $params['details'] = json_encode($friendsDetails);\n\n $hash = self::getHash();\n $cart = $this->NeoCartModel->getCart($hash);\n\n $this->NeoCartModel->addToCart($params, $cart);\n $this->view->errors = \"Multumim ! Produsele au fost adaugate in cos.\";\n $this->view->render(\"popups/addFriend\", false, \"popup\");\n }", "public function addUser(UserAddForm $form);", "public function addType()\r\n\t{\r\n\t\tif(isset($_SESSION['auth']) && $_SESSION['users']['niveau'] == 3){\r\n\t\tif(isset($_POST['dataF'])){\r\n\t\t\t$spe = str_replace('&', '=', $_POST['dataF']);\r\n\t\t\t$data = $this->convertArray($spe);\r\n\t\t\t//print_r($data);die();\r\n\t\t\t$spec = $this->model('type');\r\n\t\t\t$id = $spec->addType($data);\r\n\t\t\tif($id){\r\n\t\t\t\techo json_encode(['SUCCESS'=>true]);\r\n\t\t\t}else{\r\n\t\t\t\techo json_encode(['SUCCESS'=>true]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t}else{\r\n\t\t\t$this->view('login',['page'=>'Speciality','msg'=>'you should to connect first']);\r\n\t\t}\r\n\t}", "function newactor(){\n\t\t$client = new \\GuzzleHttp\\Client();\n\t\t$url = 'http://localhost:8080/codeIgniter3/index.php/actor/add';\n\t\t$data = [\n\t\t\t'form_params'=>[\n\t\t\t\t'first_name'=>'John',\n\t\t\t\t'last_name'=>'Doe'\n\t\t\t]\t\t\t\t\n\t\t];\n\n $res = $client->request('POST', $url, $data);\n\t}", "function add()\n { \n\t\tif ($this->auth->loggedin()) {\n\t\t\t$id = $this->auth->userid();\n\t\t\tif(!($this->User_model->hasPermission('add',$id)&&($this->User_model->hasPermission('person',$id)||$this->User_model->hasPermission('WILD_CARD',$id)))){\n\t\t\t\tshow_error('You Don\\'t have permission to perform this operation.');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$this->form_validation->set_rules('username', '<b>Username</b>', 'trim|required|min_length[5]|max_length[12]');\n\t\t\t$this->form_validation->set_rules('password', '<b>Password</b>', 'trim|required');\n\t\t\t$this->form_validation->set_rules('first_name', '<b>First Name</b>', 'trim|required|min_length[2]|max_length[12]');\n\t\t\t$this->form_validation->set_rules('Last_name', '<b>Last Name</b>', 'trim|required|min_length[2]|max_length[12]');\n\t\t\t\n\t\t\t$this->form_validation->set_rules('gender', '<b>Gender</b>', 'trim|required');\n\t\t\t$this->form_validation->set_rules('mobile', '<b>Mobile</b>', 'trim|required|integer|min_length[10]|max_length[11]');\n\t\t\t$this->form_validation->set_rules('role_id', '<b>Role</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t$this->form_validation->set_rules('location_id', '<b>Location</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t$this->form_validation->set_rules('status_id', '<b>Status</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t\t\t\t\n\t\t\tif(isset($_POST) && count($_POST) > 0 && $this->form_validation->run()) \n\t\t\t{ \n\t\t\t\t$person_id = $this->User_model->register_user(); \n\t\t\t\t//$person_id = $this->Person_model->add_person($params);\n\t\t\t\t$params1 = array(\n\t\t\t\t\t\t\t'person_id' => $person_id,\n\t\t\t\t\t\t\t'role_id' => $this->input->post('role_id'),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->Person_role_model->update_person_role($person_id,$params1);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$params2 = array(\n\t\t\t\t\t\t\t'person_id' => $person_id,\n\t\t\t\t\t\t\t'location_id' => $this->input->post('location_id'),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->Person_location_model->update_person_location($person_id,$params2);\t\n\t\t\t\tredirect('person/index');\n\t\t\t}\n\t\t\telse\n\t\t\t{ \n\t\t\t\t\n\t\t\t\t$user = $this->User_model->get('person_id', $id);\n\t\t\t\tunset($user['password']);\n\t\t\t\t\n\t\t\t\t$user_role = $this->User_model->loadRoles($user['person_id']);\n\t\t\t\t\t$this->data['user'] = $user['username'];\n\t\t\t\t\t$this->data['role'] = $user_role;\n\t\t\t\t\t$this->data['gender'] = $user['gender'];\n\t\t\t\t\t$specialPerm = $this->User_model->loadSpecialPermission($id);\n\t\t\t\t\t\n\t\t\t\t\t$this->data['pp'] = $specialPerm;\n\t\t\t\t\t$this->data['p_role'] = $this->Person_role_model->get_person_role($id);\n\t\t\t\t\t$this->data['role'] = $this->Role_model->get_all_role();\n\t\t\t\t\t$this->data['location'] = $this->Location_model->get_all_location();\n\t\t\t\t\t$this->data['status'] = $this->Statu_model->get_all_status();\n\t\t\t\t\t\n\t\t\t\t$this->template\n\t\t\t\t\t->title('Welcome','My Aapp')\n\t\t\t\t\t->build('person/add',$this->data);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->template\n\t\t\t\t\t->title('Login Admin','Login Page')\n\t\t\t\t\t->set_layout('access')\n\t\t\t\t\t->build('access/login');\n\t\t}\n }", "function incluir_click($sender, $param)\n {\n if ($this->IsValid)\n {\n $this->incluir->Enabled=False;//Se deshabilita boton incluir\n // se capturan los valores de los controles\n $aleatorio = $this->numero->Text;\n $cod_direccion = usuario_actual('cod_direccion');\n $cod_direccion=substr($cod_direccion, 1);\n $siglas = usuario_actual('siglas_direccion');\n $ano = $this->lbl_ano->Text;\n $asunto = str_replace(\"'\", '\\\\\\'', $this->txt_asunto->Text );\n $destinatario = str_replace(\"'\", '\\\\\\'', $this->txt_destinatario->Text );\n $enviadopor=usuario_actual('login');\n $fecha = cambiaf_a_mysql ($this->txt_fecha->Text);\n //$memo=$this->html1->text;\n //busca el nombre del remitente\n $sql3=\"select cedula from intranet.usuarios where(login='$enviadopor')\";\n $resultado3=cargar_data($sql3, $sender);\n $cedula=$resultado3[0]['cedula'];\n $sql3=\"select nombres, apellidos from organizacion.personas where(cedula='$cedula')\";\n $resultado3=cargar_data($sql3, $sender);\n $remitente=$resultado3[0]['nombres'].' '.$resultado3[0]['apellidos'];\n $criterios_adicionales=array('direccion' => $cod_direccion, 'ano' => $ano);\n $numero=proximo_numero(\"organizacion.memoranda\",\"correlativo\",$criterios_adicionales,$this);\n $numero=rellena($numero,4,\"0\");\n // se inserta en la base de datos\n $sql = \"insert into organizacion.memoranda\n (direccion, siglas, correlativo, ano, fecha, asunto, destinatario, status, memo, remitente)\n values ('$cod_direccion','$siglas','$numero','$ano','$fecha','$asunto','$destinatario','1','$memo', '$remitente')\"; \n $resultado=modificar_data($sql,$sender);\n /*$sql2=\"update organizacion.adjuntos set correlativo='$numero' where (correlativo='$aleatorio')\";\n $resultado2=modificar_data($sql2, $sender);*/ \n /* Se incluye el rastro en el archivo de bitácora */\n $descripcion_log = \"Incluido el Memorando: \".$siglas.\"-\".$numero.\"-\".$ano;\n inserta_rastro(usuario_actual('login'),usuario_actual('cedula'),'I',$descripcion_log,\"\",$sender);\n $this->LTB->titulo->Text = \"Solicitud de número de Memorando\";\n $this->LTB->texto->Text = \"Se ha registrado exitosamente el nuevo Memorando con el \".\n \"número: <strong>\".$siglas.\"-\".$numero.\"-\".$ano.\"</strong>\";\n $this->LTB->imagen->Imageurl = \"imagenes/botones/memoranda.png\";\n $this->LTB->redir->Text = \"epaper.incluir_memo\";\n $params = array('mensaje');\n $this->getPage()->getCallbackClient()->callClientFunction('muestra_mensaje', $params);\n\n //$this->mensaje2->setSuccessMessage($sender, \"Se ha registrado exitosamente el nuevo Memorando con el numero:\".$siglas.\"-\".$numero.\"-\".$ano, 'grow');\n\n }\n }", "public function insertar($nombreMiembro,$apellido1Miembro,$apellido2Miembro,$correo,$contrasenna,$rol){ \n $miembro = new Miembro();\n \n $miembro->nombreMiembro = $nombreMiembro;\n $miembro->apellido1Miembro = $apellido1Miembro;\n $miembro->apellido2Miembro = $apellido2Miembro;\n $miembro->correo = $correo;\n $miembro->contrasenna = $contrasenna;\n $miembro->rol = $rol;\n \n $miembro->save();\n }", "public function user_add()\n\t{\n\t\t$data = array( 'isi' \t=> 'admin/user/v_user_add',\n\t\t\t\t\t\t'nav'\t=>\t'admin/nav',\n\t\t\t\t\t\t'title' => 'Tampil Dashboard Admin');\n\t\t$this->load->view('layout/wrapper',$data);\n\t}", "public function add(){\n\t\t$nama = $_POST['nama_sekolah'];\n\t\t$lati = $_POST['latitude'];\n\t\t$longi = $_POST['longitude'];\n\t\t$alamat = $_POST['alamat'];\n\n\t\t$data['nama_sekolah'] = $nama;\n\t\t$data['latitude'] = $lati;\n\t\t$data['longitude'] = $longi;\n\t\t$data['alamat'] = $alamat;\n\n\t\t$this->m_sekolah->addData($data);\n\t\tredirect('Welcome/index');\n\t}", "function get_add_movilidad($post){\n\t$Id_tienda = $this->session->userdata('Id_tienda');\n\t\t$data=array(\n\t\t\t'Id_movilidad'=>'',\n\t\t\t'Placa'=>$post['placa'],\n\t\t\t'Estado'=>1,\n\t\t\t'Id_tienda'=>$Id_tienda\n\t\t);\n\t\t\n\t\t$this->db->insert('jam_movilidad',$data);\n\t}", "public function createPost(){\n \t//di chuyen den url: /admin/users/read\n if($this->model->modelCreate())\n //di chuyen den url\n return redirect(\"admin/users\");\n else{\n Session::flash(\"error\",\"email da ton tai\");\n return redirect(\"admin/users/addUser\")->withInput();\n }\n }", "function add($nombre,$correo){\n\t\tglobal $conn;\n\t\t//$sql = \"INSERT INTO usuario (nombre,correo) VALUES ('$nombre','$correo')\";\n\t\t$stmt = $conn->prepare('INSERT INTO user (email,nombre) VALUES ( :email,:password)');\n\t\t//$stmt->bindParam(':nombre', $nombre);\n\t\t$stmt->bindParam(':email', $nombre);\n\t\t$stmt->bindParam(':password', $correo);\n\t\t$stmt->execute();\n\t\t//$conn->query($sql);\n\t}", "static function addUser(){\n\n $controller = new UserController();\n $validation = $controller->signupValid();\n\n if($validation === \"OK\"){\n $base = new ConnexionDb;\n\n $base->query(\"INSERT INTO user(username, firstname, email, pass, valid)\n VALUES (:username, :firstname, :email, :pass, 1)\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR),\n array('firstname',$_POST['firstname'],\\PDO::PARAM_STR),\n array('email',$_POST['email'],\\PDO::PARAM_STR),\n array('pass',$_POST['pass'],\\PDO::PARAM_STR)\n )\n );\n // $userM = new User($_POST);\n\n }else{\n echo 'erreur d\\'inscription';\n }\n }", "public function add() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['password'] = AuthComponent::password($this->request->data['User']['password']);\n\t\t\tif ($this->User->save($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('The user has been saved'));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t} else {\n\t\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t\t$lookupSupported = isset($queryURL) && \"\" <> $queryURL;\r\n\t\t\t$this->set('lookupSupported', $lookupSupported);\n\t\t\t$this->set('userType', $user['User']['type']);\n\t\t}\n\t}", "public function store(Request $request)\n {\n // dd($request->all());\n $this->validate($request, [\n 'matiere_id' => 'required',\n 'professeur_id'=>'required',\n 'school_id' => 'required',\n //'professeur_id'=>'required'\n ]);\n\n\n $professeur = User::findOrFail($request->professeur_id);\n\n $matiere = Matiere::findOrFail($request->matiere_id);\n\n $professeur->matieres()->attach($matiere->id);\n \n flash('success')->success();\n\n return redirect()->route('professeursMatieres.index');\n\n\n }", "function postAdd($request){\r\n global $context;\r\n $data= new $this->model;\r\n foreach($data->fields as $key=>$field){\r\n if($field['type']!='One2many' && $field['type']!='Many2many' ){\r\n $data->data[$key]=$request->post[$key];\r\n }\r\n }\r\n\r\n if(!$data->insert()){\r\n if($request->isAjax()) return json_error($data->error);\r\n throw new \\Exception($data->error);\r\n }\r\n if($request->isAjax()) return json_success(\"Save Success !!\".$data->error,$data);\r\n\r\n\r\n redirectTo($context->controller_path.\"/all\");\r\n }", "public function nuevo() {\n\n /* Si NO esta autenticado redirecciona a auth */\n if (!$this->ion_auth->logged_in()) {\n\n redirect('auth', 'refresh');\n }\n \n \n\n $this->load->library('form_validation');\n\n if ($this->form_validation->run('clientes')) {\n\n $data = $this->clientes->add();\n\n $index = array();\n\n $index['id'] = $data['id_cliente'];\n\n $index['type'] = \"clientes\";\n\n $this->session->set_flashdata('message', custom_lang('sima_client_created_message', 'Cliente creado correctamente'));\n\n redirect('clientes/index');\n } else {\n\n\n $data = array();\n\n $data['tipo_identificacion'] = $this->clientes->get_tipo_identificacion();\n\n $data['pais'] = $this->clientes->get_pais();\n $data['grupo'] = $this->grupo->getAll();\n $data_empresa = $this->miempresa->get_data_empresa();\n $data[\"tipo_negocio\"] = $data_empresa['data']['tipo_negocio']; \n $this->layout->template('member')->show('clientes/nuevo', array('data' => $data));\n }\n }", "function add() {\n $this->layout = \"no_header\";\n if (!empty($this->data)) {\n if ($this->User->save($this->data)) {\n $this->Session->setFlash(\"Your account has been created successfully\");\n $this->go_back(\"login\");\n }\n }\n }", "public function p_add() {\n $_POST['user_id'] = $this->user->user_id;\n\n # Unix timestamp of when this post was created / modified\n $_POST['created'] = Time::now();\n $_POST['modified'] = Time::now();\n\n\n # Insert\n # Note we didn't have to sanitize any of the $_POST data because we're using the insert method which does it for us\n DB::instance(DB_NAME)->insert('activities', $_POST);\n\n # Send them back to home page\n Router::redirect('/activities/index');\n\n }", "function insert(){\n //Declarar variables para recibir los datos del formuario nuevo\n $nombre=$_POST['nombre'];\n $apellido=$_POST['apellido'];\n $telefono=$_POST['telefono'];\n\n $this->model->insert(['nombre'=>$nombre,'apellido'=>$apellido,'telefono'=>$telefono]);\n $this->index();\n }", "public function addAction() {\n\t\t$this->view->addLayoutVar(\"onglet\", 2);\n\t\t$uid = Annuaire_User::getCurrentUserId();\n\t\t$this->view->title = t_('Add');\n\t\t$db = Gears_Db::getDb();\n\t\t$clients = Array();\n\t\t$result = $db->fetchAll(\"SELECT * FROM ANNUAIRE_SOCIETE WHERE USER_ID = ?\", Array($uid));\n\t\tforeach ($result as $info) {\n\t\t\t$clients[$info['SOCIETE_ID']][0] = $info['SOCIETE_ID'];\n\t\t\t$clients[$info['SOCIETE_ID']][1] = $info['SOCIETE_NOM'];\n\t\t}\n\t\t$this->view->clients = ($clients);\n\t\t$this->view->addcontact = t_(\"Add a contact\");\n\t\t$this->view->name = t_(\"Name\");\n\t\t$this->view->firstname = t_(\"First Name\");\n\t\t$this->view->address = t_(\"Address\");\n\t\t$this->view->mail = t_(\"Mail\");\n\t\t$this->view->phone = t_(\"Phone Number\");\n\t\t$this->view->cell = t_(\"Cellphone number\");\n\t\t$this->view->fax = t_(\"Fax\");\n\t\t$this->view->site = t_(\"Website\");\n\t\t$this->view->comment = t_(\"Comment\");\n\t\t$this->view->society = t_(\"Companie\");\n\t\t$this->view->none = t_(\"none\");\n\t\t$this->view->send = t_(\"Send\");\n\t\t$this->view->addsociety = t_(\"Add a companie\");\n\t\t$this->view->activity = t_(\"Activity\");\n\t}", "public function addAction() {\n $form = new JogoEmpresa_Form_JogoEmpresa();\n $model = new JogoEmpresa_Model_JogoEmpresa();\n $idJogo = $this->_getParam('idJogo');\n $idEmpresa = $this->_getParam('idEmpresa');\n if ($this->_request->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n $data = $form->getValues();\n if ($idJogo) {\n $db = $model->getAdapter();\n $where = $db->quoteInto('jog_codigo=?',$idJogo)\n . $db->quoteInto(' AND emp_codigo=?',$idEmpresa);\n $model->update($data, $where);\n } else {\n $model->insert($data);\n }\n $this->_redirect('/jogoEmpresa');\n }\n } elseif ($idJogo) {\n $data = $model->busca($idJogo,$idEmpresa);\n if (is_array($data)) {\n $form->setAction('/jogoEmpresa/index/add/idJogo/' . $idJogo . '/idEmpresa/' . $idEmpresa);\n $form->populate($data);\n }\n }\n $this->view->form = $form;\n }", "public function createAction()\n {\n $entity = new Titeur();\n $request = $this->getRequest();\n\t\t\t\t$user = $this->get('security.context')->getToken()->getUser();\n $form = $this->createForm(new TiteurType(), $entity, array('user' => $user));\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n\t\t\t\t\t\t$this->get('session')->set('titeur_id', $entity->getId());\n\t\t\t\t\t\t$this->get('session')->setFlash('notice', 'Titeur a été ajouté avec succès');\n\n return $this->redirect($this->generateUrl('enfant_new'));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function add_post(){\n $response = $this->PersonM->add_person(\n $this->post('name'),\n $this->post('hp'),\n $this->post('email'),\n $this->post('message')\n );\n $this->response($response);\n }", "function add()\n { \n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'descripcion' => $this->input->post('descripcion'),\n 'nombre' => $this->input->post('nombre'),\n );\n \n $estadousuario_id = $this->Estadousuario_model->add_estadousuario($params);\n redirect('estadousuario/index');\n }\n else\n { $this->load->view(\"header\",[\"title\"=>\"Registro estado\"]);\n $this->load->view('estadousuario/add');\n $this->load->view('footer');\n }\n }", "public function add()\n\t{\n\t\t// TODO\n\t\t// if(user has permissions){}\n\t\t$this -> loadModel('User');\n\t\tif($this -> request -> is('post') && !$this -> User -> exists($this -> request -> data['SgaPerson']['user_id']))\n\t\t{\n\t\t\t$this -> Session -> setFlash(\"Please select a valid JacketPages user to add.\");\n\t\t\t$this -> redirect(array('action' => 'index',$id));\n\t\t}\n\t\t$this -> loadModel('User');\n\t\tif ($this -> request -> is('post'))\n\t\t{\n\t\t\t$this -> SgaPerson -> create();\n\t\t\tif ($this -> SgaPerson -> save($this -> data))\n\t\t\t{\n\t\t\t\t$user = $this -> User -> read(null, $this -> data['SgaPerson']['user_id']);\n\t\t\t\t$this -> User -> set('level', 'sga_user');\n\t\t\t\t$this -> User -> set('sga_id', $this -> SgaPerson -> getInsertID());\n\t\t\t\t$this -> User -> save();\n\t\t\t\t$this -> Session -> setFlash(__('The user has been added to SGA.', true));\n\t\t\t\t$this -> redirect(array('action' => 'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this -> Session -> setFlash(__('Invalid user. User may already be assigned a role in SGA. Please try again.', true));\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6996486", "0.67863035", "0.67594904", "0.6687043", "0.6593787", "0.65594697", "0.6516573", "0.6493912", "0.64913505", "0.6476363", "0.64708674", "0.6396816", "0.63455445", "0.63368696", "0.6277763", "0.6256368", "0.6238567", "0.6175691", "0.6147944", "0.6109554", "0.6107172", "0.6096277", "0.60947514", "0.6072273", "0.6069374", "0.60574263", "0.60120815", "0.6009598", "0.598856", "0.59873366", "0.5987212", "0.59806067", "0.5976745", "0.5958336", "0.5953061", "0.59503406", "0.59444153", "0.59443283", "0.5942349", "0.5936447", "0.592873", "0.5924991", "0.591932", "0.5917082", "0.59160876", "0.59102124", "0.5909148", "0.5905945", "0.5898064", "0.5897572", "0.589745", "0.5887155", "0.58815026", "0.5876411", "0.5870115", "0.58623374", "0.5860169", "0.5851283", "0.58503515", "0.5849323", "0.58487326", "0.5845528", "0.5839962", "0.58364516", "0.5836064", "0.5835355", "0.5831011", "0.5828898", "0.58288145", "0.5823841", "0.5822774", "0.5818648", "0.58171535", "0.58148235", "0.5807028", "0.5799433", "0.5788815", "0.5784627", "0.578362", "0.5783155", "0.5779736", "0.57756937", "0.577335", "0.576813", "0.5767043", "0.5756272", "0.57545394", "0.57534724", "0.57521635", "0.574909", "0.5747554", "0.5744805", "0.57447505", "0.57430774", "0.5742756", "0.57381725", "0.5735221", "0.57327384", "0.5730366", "0.57297623" ]
0.73490244
0
/ page mobilisateur/addmobilisateur Ajout d'une mobilisateur
public function editmobilisateurAction() { $sessionmembre = new Zend_Session_Namespace('membre'); //$this->_helper->layout->disableLayout(); $this->_helper->layout()->setLayout('layoutpublicesmcperso'); if (!isset($sessionmembre->code_membre)) { $this->_redirect('/'); } if (isset($_POST['ok']) && $_POST['ok'] == "ok") { if (isset($_POST['code_membre']) && $_POST['code_membre'] != "" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != "") { $request = $this->getRequest(); if ($request->isPost ()) { $db = Zend_Db_Table::getDefaultAdapter(); $db->beginTransaction(); try { $date_id = new Zend_Date(Zend_Date::ISO_8601); $mobilisateur = new Application_Model_EuMobilisateur(); $m_mobilisateur = new Application_Model_EuMobilisateurMapper(); $m_mobilisateur->find($_POST['id_mobilisateur'], $mobilisateur); //$mobilisateur->setId_mobilisateur($id_mobilisateur); $mobilisateur->setCode_membre($_POST['code_membre']); //$mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss')); $$mobilisateur->setId_utilisateur($_POST['id_utilisateur']); //$mobilisateur->setEtat(0); $m_mobilisateur->update($mobilisateur); //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// $db->commit(); $sessionmembre->error = "Operation bien effectuee ..."; $this->_redirect('/mobilisateur/listmobilisateur'); } catch (Exception $exc) { $db->rollback(); $this->view->message = $exc->getMessage() . ': ' . $exc->getTraceAsString(); return; } } } else { $sessionmembre->error = "Champs * obligatoire"; $id = (int)$this->_request->getParam('id'); if($id != 0) { $mobilisateur = new Application_Model_EuMobilisateur(); $mmobilisateur = new Application_Model_EuMobilisateurMapper(); $mmobilisateur->find($id,$mobilisateur); $this->view->mobilisateur = $mobilisateur; } } } else { $id = (int)$this->_request->getParam('id'); if($id != 0) { $mobilisateur = new Application_Model_EuMobilisateur(); $mmobilisateur = new Application_Model_EuMobilisateurMapper(); $mmobilisateur->find($id,$mobilisateur); $this->view->mobilisateur = $mobilisateur; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addmobilisateurAction() {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembre->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/listmobilisateur');\n \n } catch (Exception $exc) { \n $db->rollback();\n $this->view->message = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $this->view->error = \"Champs * obligatoire\";\n }\n }\n }", "public function etatmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function addmobilisateurintegrateurAction() {\n $sessionmembreasso = new Zend_Session_Namespace('membreasso');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcint');\n if (!isset($sessionmembreasso->login)) {$this->_redirect('/integrateur/login');}\n\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\n/////////////////////////////////////controle code membre\nif(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\nif(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n}else{\nif(substr($_POST['code_membre'], -1, 1) == 'P'){\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0){\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }else if(substr($_POST['code_membre'], -1, 1) == 'M'){\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0){\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n}\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembreasso->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n}else{\n $db->rollback();\n $sessionmembreasso->error = \"Veuillez renseigner le Code Membre ...\";\n\n} \n } catch (Exception $exc) { \n $db->rollback();\n $sessionmembreasso->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionmembreasso->error = \"Champs * obligatoire\";\n }\n }\n }", "public function addmobilisateuradminAction() {\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');}\n if($sessionutilisateur->confirmation != \"\") {$this->_redirect('/administration/confirmation');}\n\n\n\n if(isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if(isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if($request->isPost()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n /////////////////////////////////////controle code membre\n if(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\n if(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n } else {\n if(substr($_POST['code_membre'], -1, 1) == 'P') {\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n } else if(substr($_POST['code_membre'], -1, 1) == 'M') {\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n }\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n ////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionutilisateur->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateuradmin');\n } else {\n $db->rollback();\n $sessionutilisateur->error = \"Veuillez renseigner le Code Membre ...\";\n } \n } catch(Exception $exc) { \n $db->rollback();\n $sessionutilisateur->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionutilisateur->error = \"Champs * obligatoire\";\n }\n }\n }", "public function suppmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if ($id > 0) {\n\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->delete($id);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function add() {\n\n if (isset($_POST['valider'])) {\n \n extract($_POST);\n $data['ok'] = 0;\n \n if (!empty($_POST)) {\n\n $clientM = new ClientMoral();\n $clientMoralRepository = new ClientMoralRepository();\n \n $clientM->setNom($_POST['nom']);\n $clientM->setRaisonSociale($_POST['raisonSociale']);\n $clientM->setAdresse($_POST['adresse']);\n $clientM->setTel($_POST['tel']);\n $clientM->setEmail($_POST['email']);\n $clientM->setNinea($_POST['ninea']);\n $clientM->setRegiscom($_POST['registreCommerce']);\n \n\n $data['ok'] = $clientMoralRepository->add($clientM);\n }\n return $this->view->load(\"clientMoral/ajout\", $data);\n }\n else {\n return $this->view->load(\"clientMoral/ajout\");\n }\n }", "public function add_post(){\n $response = $this->BayiM->add(\n $this->post('iduser'),\n $this->post('nama'),\n $this->post('gender')\n );\n $this->response($response);\n }", "public function etatmobilisateuradminAction()\n {\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 $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateuradmin');\n }", "function alta_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->fecha_alta=date(\"Y-m-d\");\n\t\t$u->estatus_general_id=1;\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 registrado los datos de la Unidad de Medida.\\\"); 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 membre(){\n\n\t\t$user_id = Input::get('user_id');\n\n\t\t$redirectTo = ( $user_id ? 'admin/users/'.$user_id : 'admin/adresses/'.Input::get('adresse_id') );\n\n if( $this->adresse->addMembre(Input::get('membre_id') , Input::get('adresse_id')) )\n {\n return Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'L\\'appartenance comme membre a été ajouté') );\n }\n\n return Redirect::to($redirectTo)->with( array('status' => 'danger' , 'message' => 'L\\'utilisateur à déjà l\\'appartenance comme membre') );\n\n\t}", "function add()\n {\n if($this->acceso(15)){\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'reunion_id' => $this->input->post('reunion_id'),\n 'usuario_id' => $this->input->post('usuario_id'),\n 'multa_monto' => $this->input->post('multa_monto'),\n 'multa_fecha' => $this->input->post('multa_fecha'),\n 'multa_hora' => $this->input->post('multa_hora'),\n 'multa_detalle' => $this->input->post('multa_detalle'),\n 'multa_numrec' => $this->input->post('multa_numrec'),\n );\n $multa_id = $this->Multa_model->add_multa($params);\n redirect('multa/index');\n }\n else\n {\n $this->load->model('Reunion_model');\n $data['all_reunion'] = $this->Reunion_model->get_all_reunion();\n\n $this->load->model('Usuario_model');\n $data['all_usuario'] = $this->Usuario_model->get_all_usuario();\n\n $data['_view'] = 'multa/add';\n $this->load->view('layouts/main',$data);\n }\n }\n }", "public function store(MobiliariosRequest $request)\n {\n Bitacoras::bitacora(\"Registro de nuevo mobiliario: \".$request['nombre']);\n $mobiliario = new Mobiliarios;\n $mobiliario->codigo = $request->codigo;\n $mobiliario->nombre= $request->nombre;\n $mobiliario->fecha_compra= $request->fecha_compra;\n $mobiliario->precio= $request->precio;\n $mobiliario->descripcion =$request->descripcion;\n $mobiliario->estado = $request->estado;\n $mobiliario->nuevo = $request->nuevo;\n if($request->nuevo == 1){\n $mobiliario->anios=null;\n }else\n {\n if($request->anios == '' && $request->anios2 != ''){\n $mobiliario->anios = $request->anios2;\n }else{\n $mobiliario->anios = $request->anios;\n }\n }\n $mobiliario->proveedor_id = $request->proveedor_id;\n $mobiliario->tipo_id = $request->tipo_id;\n $mobiliario->credito = $request->credito;\n $mobiliario->iva=$request->iva;\n if($request->credito == 0 )\n {\n $mobiliario->interes=null;\n $mobiliario->num_cuotas=null;\n $mobiliario->val_cuotas=null;\n $mobiliario->tiempo_pago=null;\n $mobiliario->cuenta=null;\n }else\n {\n $mobiliario->interes= $request->interes;\n $mobiliario->num_cuotas= $request->num_cuotas;\n $mobiliario->val_cuotas= $request->val_cuotas;\n $mobiliario->tiempo_pago= $request->tiempo_pago;\n $mobiliario->cuenta= $request->cuenta;\n }\n\n $mobiliario->save();\n return redirect('/mobiliarios')->with('mensaje','Registro Guardado');\n }", "public function add_post()\n {\n $response = $this->UserM->add_user(\n $this->post('email'),\n $this->post('nama'),\n $this->post('nohp'),\n $this->post('pekerjaan')\n );\n $this->response($response);\n }", "public function addmobilisateurindexAction() {\n $sessionmcnp = new Zend_Session_Namespace('mcnp');\n\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmc');\n\n\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\n/////////////////////////////////////controle code membre\nif(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\nif(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n}else{\nif(substr($_POST['code_membre'], -1, 1) == 'P'){\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0){\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n }\n }else if(substr($_POST['code_membre'], -1, 1) == 'M'){\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0){\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n }\n }\n}\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur(0);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmcnp->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateurindex');\n}else{\n $db->rollback();\n $sessionmcnp->error = \"Veuillez renseigner le Code Membre ...\";\n\n} \n } catch (Exception $exc) { \n $db->rollback();\n $sessionmcnp->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionmcnp->error = \"Champs * obligatoire\";\n }\n }\n }", "function adminadduser()\n {\n //Check Login\n if ($this->cek_login() != true) {\n return redirect()->to(base_url('login'));\n }\n //Check Role\n if ($this->cek_role() != true) {\n return redirect()->to(base_url('login'));\n }\n $email = $this->request->getPost('email_add');\n $email = esc($email);\n $password = $this->request->getPost('password_add');\n $password = esc($password);\n $name = $this->request->getPost('name_add');\n $name = esc($name);\n $birthdate = $this->request->getPost('birthdate_add');\n $role = $this->request->getPost('role_add');\n $link_foto = '';\n\n $addresult = $this->user_model->addUser($email, $password, $name, $birthdate, $role, $link_foto);\n if ($addresult) {\n session()->setFlashdata('sekolah.project_uas.success', 'User created successfully');\n return redirect()->to(base_url('adminuser'));\n } else {\n //kalo gagal ngapain\n session()->setFlashdata('sekolah.project_uas.fail', 'User cannot created');\n return redirect()->to(base_url('adminuser'));\n }\n }", "public function create(){\n\t\t$this->autenticate();\n\t\t$user_id = $_POST['id'];\n\t\t$nombre = \"'\".$_POST['nombre'].\"'\";\n\t\t$cedula = \"'\".$_POST['cedula'].\"'\";\n\t\t$nacimiento = \"'2000/1/1'\"; //fecha de nacimiento default, despues el mismo usuario la puede editar\n\t\trequire_once(\"../app/models/administrativo.php\");//conexion entre los controladores\n\t\t$administrativo=new Administrativo();// crea el perfil administrativo vacio\n\t\t$administrativo->new($nombre,$cedula,$nacimiento); // inserta la informacion antes ingresada en la base de datos\n\t\t$administrativo_id = $administrativo->where(\"cedula\",$cedula); // se trae el perfil administrativo recien creado con la cedula\n\t\t$administrativo_id = $administrativo_id[0][\"id\"];\n\t\t$administrativo->attach_user($user_id,$administrativo_id); // amarra el usuario a su nuevo perfil docente\n\t\t$administrativo_id = strval($user_id);//convierte el user_id de entero a string\n\t\theader(\"Location: http://localhost:8000/usuarios/show/$user_id\");\n\t\texit;\n\t\t$this->view('administrativos/index', []);\n\t}", "public function add() {\n if (isAuthorized('utilisateurs', 'add')) :\n $this->Utilisateur->Societe->recursive = -1;\n $societe = $this->Utilisateur->Societe->find('list',array('fields' => array('id', 'NOM'),'order'=>array('NOM'=>'asc')));\n $ObjEntites = new EntitesController(); \n $ObjAssoentiteutilisateurs = new AssoentiteutilisateursController(); \n $cercles = $ObjEntites->find_list_all_cercle();\n $this->set(compact('societe','cercles'));\n $matinformatique = array(); \n $activites = array(); \n $utilisateurs = array();\n $outils = array();\n $listediffusions = array();\n $partages = array();\n $etats = array();\n $this->set(compact('matinformatique','activites','utilisateurs','outils','listediffusions','partages','etats'));\n if ($this->request->is('post')) :\n if (isset($this->params['data']['cancel'])) :\n $this->Utilisateur->validate = array();\n $this->History->goBack(1);\n else: \n $this->Utilisateur->create();\n $this->request->data['Utilisateur']['NEW']=1;\n if ($this->Utilisateur->save($this->request->data)) {\n $lastid = $this->Utilisateur->getLastInsertID();\n $utilisateur = $this->Utilisateur->find('first',array('conditions'=>array('Utilisateur.id'=>$lastid),'recursive'=>0));\n if($utilisateur['Utilisateur']['profil_id']>0 || $utilisateur['Utilisateur']['profil_id']==-2):\n $this->sendmailnewutilisateur($utilisateur);\n endif;\n $this->addnewaction($lastid);\n $entite_id = $this->request->data['Utilisateur']['entite_id'];\n $ObjAssoentiteutilisateurs->silent_save($entite_id,$lastid);\n $this->save_history($lastid, \"Utilisateur créé\"); \n $this->Session->setFlash(__('Utilisateur sauvegardé',true),'flash_success');\n $this->History->goBack(1);\n } else {\n $this->Session->setFlash(__('Utilisateur incorrect, veuillez corriger l\\'utilisateur',true),'flash_failure');\n }\n endif;\n endif;\n else :\n $this->Session->setFlash(__('Action non autorisée, veuillez contacter l\\'administrateur.',true),'flash_warning');\n throw new UnauthorizedException(\"Vous n'êtes pas autorisé à utiliser cette fonctionnalité de l'outil\");\n endif; \n }", "public function addUmpireAction() {\n\t\t// Création du formulaire\n\t\t$oUmpire = new Umpire;\n\t\t$oForm = $this->createForm(new UmpireType(), $oUmpire);\n\n\t\t// Traitement du formulaire\n\t\t$oFormHandler = new UmpireHandler($oForm, $this->get('request'), $this->getDoctrine()->getEntityManager());\n\t\tif ($oFormHandler->process()) {\n\t\t\treturn $this->redirect($this->generateUrl('Umpires'));\n\t\t}\n\n\t\treturn $this->render('YBTournamentBundle:Umpire:form_create.html.twig', array('form' => $oForm->createView()));\n\t}", "function newuser(){\n\t\t\tif(!empty($_POST['newemail']) && !empty($_POST['newpassword']) && !empty($_POST['newnombre']) && !empty($_POST['newpoblacion']) && !empty($_POST['newrol'])){\n\t\t\t\t$poblacion = filter_input(INPUT_POST,'newpoblacion',FILTER_SANITIZE_STRING);\n\t\t\t\t$nombre = filter_input(INPUT_POST,'newnombre',FILTER_SANITIZE_STRING);\n\t\t\t\t$password = filter_input(INPUT_POST,'newpassword',FILTER_SANITIZE_STRING);\n\t\t\t\t$email = filter_input(INPUT_POST,'newemail',FILTER_SANITIZE_STRING);\n\t\t\t\t$rol = filter_input(INPUT_POST,'newrol',FILTER_SANITIZE_STRING);\n\t\t\t\t$list = $this -> model -> adduser($nombre,$password,$email,$poblacion,$rol);\n \t\t$this -> ajax_set(array('redirect'=>APP_W.'admin'));\n\t\t\t}\n\t\t}", "public function ajouter() {\n $this->loadView('ajouter', 'content');\n $arr = $this->em->selectAll('client');\n $optionsClient = '';\n foreach ($arr as $entity) {\n $optionsClient .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNomFamille() . '</option>';\n }\n $this->loadHtml($optionsClient, 'clients');\n $arr = $this->em->selectAll('compteur');\n $optionsCompteur = '';\n foreach ($arr as $entity) {\n $optionsCompteur .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNumero() . '</option>';\n }\n $this->loadHtml($optionsCompteur, 'compteurs');\n if(isset($this->post->numero)){\n $abonnement = new Abonnement($this->post);\n $this->em->save($abonnement);\n $this->handleStatus('Abonnement ajouté avec succès.');\n }\n }", "public function addMo()\n\t{\n\t\n\t\t$this->Checklogin();\n\t\tif (isset($_POST ['btnSubmit']))\n\t\t{\n\t\n\t\t\t$data ['admin_section']='MO';\n\t\t\t$id=$this->setting_model->addMo();\n\t\t\tif ($id)\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Mobile has been added successfully.');\n\t\t\t\tredirect('admin/setting/moRegistration');\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Unable to save mobile.');\n\t\t\t\tredirect('admin/setting/moRegistration');\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\tredirect('admin/setting/moRegistration');\n\t\t}\n\t\n\t}", "public function add(){\n if (isset($_SESSION['identity'])) {// Comprobamos que hay un usuario logueado\n $usuario_id = $_SESSION['identity']->id;// Obtenemos el ID del Usuario logueado\n $sProvincia = isset($_POST['province']) ? $_POST['province'] : false;\n $sLocalidad = isset($_POST['location']) ? $_POST['location'] : false;\n $sDireccion = isset($_POST['address']) ? $_POST['address'] : false;\n\n $stats = Utils::statsCarrito();\n $coste = $stats['total'];// Obtenemos el coste total del pedido\n\n\n if ($sProvincia && $sLocalidad && $sDireccion){\n // Guardar datos en bd\n $oPedido = new Pedido();\n $oPedido->setUsuarioId($usuario_id);\n $oPedido->setProvincia($sProvincia);\n $oPedido->setLocalidad($sLocalidad);\n $oPedido->setDireccion($sDireccion);\n $oPedido->setCoste($coste);\n\n $save = $oPedido->savePedido();// Insertamos el Pedido en BD\n\n // Guardar Linea Pedido\n $save_linea = $oPedido->save_linea();\n\n if ($save && $save_linea){// Comprobamos que La inserccion a sido correcta\n $_SESSION['pedido'] = \"complete\";\n }else{\n $_SESSION['pedido'] = \"failed\";\n }\n }else{\n $_SESSION['pedido'] = \"failed\";\n\n }\n header(\"Location:\" . base_url .'pedido/confirmado');\n }else{\n // Redirigir al Index\n header(\"Location:\" . base_url);\n }\n }", "public function NewMobidul ()\n {\n \\Log::info(\"New Mobidul begin!\");\n\n $request = Request::instance();\n $content = $request->getContent();\n\n $json = json_decode($content);\n $code = $json->code;\n $name = $json->name;\n $mode = $json->mode;\n\n $description = isset($json->description)\n ? $json->description\n : 'Ein tolles Mobidul entsteht hier.';\n\n //check if mobidul code is a protected key word\n if ( $this->isMobidulCodeProtected($code) )\n return $response = [\n 'success' => false,\n 'msg' => 'WSC_MOBIDUL_PROTECTED'\n ];\n\n\n if ( ! Mobidul::HasMobidulId($code) )\n {\n \\Log::info(\"Mobidul gets created!\");\n\n $mobidul = Mobidul::create(\n [\n 'name' => $name,\n 'code' => $code,\n 'description' => $description,\n 'mode' => $mode\n ]);\n\n $userId = Auth::id();\n //$category = Category::create(['name' => 'Allgemein', 'mobidulId' => $mobidul->id]);\n\n DB::table('user2mobidul')->insert(\n [\n 'userId' => $userId,\n 'mobidulId' => $mobidul->id,\n 'rights' => 1\n ]);\n\n\n return $response = [\n 'success' => true,\n 'msg' => 'WSC_MOBIDUL_SUCCESS',\n 'code' => $code\n ];\n }\n else\n return $response = [\n 'success' => false,\n 'msg' => 'WSC_MOBIDUL_IN_USE'\n ];\n }", "private function insertUser(){\n\t\t$data['tipoUsuario'] = Seguridad::getTipo();\n\t\tView::show(\"user/insertForm\", $data);\n\t}", "public function add(){\n $data = array(\n \"user_nim\" => $this->input->post('user_nim'),\n \"user_fullname\" => $this->input->post('user_fullname'),\n \"user_password\" => md5($this->input->post('user_password')),\n \"user_email\" => $this->input->post('user_email'),\n \"user_semester\" => $this->input->post('user_semester'),\n \"user_level\" => $this->input->post('user_level'),\n \"user_aktif\" => $this->input->post('user_aktif'),\n \"user_creator\" => $this->session->userdata('nim')\n );\n \n $this->db->insert('tbl_users', $data); // Untuk mengeksekusi perintah insert data\n }", "function act_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 de la Unidad de Medida.\\\"); 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 ajoutauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t$this->_ctrlAuteur->auteurAjoute();\n\t}", "public function action_add(){\n\t\t$monumentId = $this->request->param('id');\n\t\t$user = Auth::instance()->get_user();\n\t\t\n\t\t// Add the monument to the favorite list of the current user\n\t\t$favoriteList = new Model_List_Favorite();\t\t\n\t\t$favoriteList->add($monumentId, $user->UserID);\n\t\t\n\t\t// Redirect the user back to the monument page\n\t\t$this->request->redirect('monument/view/' . $monumentId);\n\t}", "public function add() {\r\n\t\t// init view variables\r\n\t\t// ---\r\n\t\t\r\n\t\t// receive userright token\r\n\t\t$urtoken\t= $this->MediawikiAPI->mw_getUserrightToken()->query->tokens->userrightstoken;\r\n\t\t$this->set( 'urtoken', $urtoken );\r\n\t\t\r\n\t\t// receive usergrouplist\r\n\t\t$ugroups\t\t= $this->Users->Groups->find( 'all' )->all()->toArray();\r\n\t\t$this->set( 'ugroups', $ugroups );\r\n\t\t\r\n\t\tif( $this->request->is( 'post' ) ) {\r\n\t\t\t// required fields empty?\r\n\t\t\tif( empty( $this->request->data[\"username\"] ) || empty( $this->request->data[\"email\"] ) ) {\r\n\t\t\t\t$this->set( 'notice', 'Es wurden nicht alle Pflichtfelder ausgefüllt. Pflichtfelder sind all jene Felder die kein (optional) Vermerk tragen.' );\r\n\t\t\t\t$this->set( 'cssInfobox', 'danger' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// usergroups\r\n\t\t\t$addGroups\t\t= '';\r\n\t\t\t\t\t\t\r\n\t\t\tforeach( $this->request->data[\"group\"] as $grpname => $grpvalue ) {\r\n\t\t\t\tif( $grpvalue == true ) {\r\n\t\t\t\t\t$addGroups\t.= $grpname . '|';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$addGroups\t\t= substr( $addGroups, 0, -1 );\r\n\t\t\t\r\n\t\t\t// create new mediawiki user\t\t\t\r\n\t\t\t$result\t\t= $this->create(\r\n\t\t\t\t$this->request->data[\"username\"],\r\n\t\t\t\t$this->request->data[\"email\"],\r\n\t\t\t\t$this->request->data[\"realname\"],\r\n\t\t\t\t$addGroups,\r\n\t\t\t\t'',\r\n\t\t\t\t$this->request->data[\"urtoken\"],\r\n\t\t\t\t$this->request->data[\"mailsender\"],\r\n\t\t\t\t$this->request->data[\"mailsubject\"],\r\n\t\t\t\t$this->request->data[\"mailtext\"]\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( $result != 'Success' ) {\r\n\t\t\t\t$this->set( 'notice', 'Beim Anlegen des Benutzer_inaccounts ist ein Fehler aufgetreten.</p><p>' . $result );\r\n\t\t\t\t$this->set( 'cssInfobox', 'danger' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->set( 'notice', 'Der / Die Benutzer_in wurde erfolgreich angelegt. Er / Sie wurde via E-Mail informiert.' );\r\n\t\t\t$this->set( 'cssInfobox', 'success' );\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// set view variables\r\n\t\t$this->set( 'notice', '' );\r\n\t\t$this->set( 'cssInfobox', '' );\r\n\t}", "public function addAction(){\n\t\t\t$emp = new Empresa();\n\t\t\t//cargamos el objeto mediantes los metodos setters\n\t\t\t$emp->id = '0';\n\t\t\t$emp->nombre_empresa = $this->getPostParam(\"nombre_empresa\");\n\t\t\t$emp->nit = $this->getPostParam(\"nit\");\n\t\t\t$emp->direccion = $this->getPostParam(\"direccion\");\n\t\t\t$emp->logo = $this->getPostParam(\"imagen\");\n\t\t\t$emp->regimen_id = $this->getPostParam(\"regimen_id\");\n\t\t\t\t\t\t\t\t\n\t\t\tif($emp->save()){\n\t\t\t\tFlash::success(\"Se insertó correctamente el registro\");\n\t\t\t\tprint(\"<script>document.location.replace(\".core::getInstancePath().\"'empresa/mostrar/$emp->id');</script>\");\n\t\t\t}else{\n\t\t\t\tFlash::error(\"Error: No se pudo insertar registro\");\t\n\t\t\t}\n\t\t\t\t\t\n\t }", "public function add() {\n if ($_POST){\n \n $username = filter_input(INPUT_POST, 'username');\n $password = filter_input(INPUT_POST, 'password');\n $password2 = filter_input(INPUT_POST, 'password2');\n $fullname = filter_input(INPUT_POST, 'fullname');\n $email = filter_input(INPUT_POST, 'email');\n \n if (!preg_match('/^[a-z0-9]{4,}$/', $username) or !preg_match('/[A-z 0-9\\-]+$/', $fullname) or $email == '' or $password != $password2) {\n $this->setData('message', 'Podaci nisu tačno uneti.');\n } else {\n $passwordHash = hash('sha512', $password . Configuration::SALT);\n $res = HomeModel::add($username, $passwordHash , $fullname, $email);\n if ($res){\n Misc::redirect('successfull_registration');\n } else {\n $this->setData('message', 'Došlo je do greške prilikom dodavanja. Korisničko ime je verovatno zauzeto.');\n }\n } \n }\n }", "public function add()\n {\n $data = [\n 'NamaMusyrif' => $this->input->post('nama_musyrif'),\n 'Email' => $this->input->post('email'),\n 'NoHp' => $this->input->post('no_hp'),\n ];\n $this->Musyrif_M->addMusyrif($data);\n $this->session->set_flashdata('pesan', 'Berhasil ditambahkan!');\n redirect('musyrif');\n }", "function add() {\n\t\t$this->account();\n\t\tif (!empty($this->data)) {\n\t\t\t$this->Album->create();\n $data['Album'] = $this->data['Album'];\n\t\t\t$data['Album']['images']=$_POST['userfile'];\n\t\t\tif ($this->Album->save($data['Album'])){\n\t\t\t\t$this->Session->setFlash(__('Thêm mới danh mục thành công', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Thêm mơi danh mục thất bại. Vui long thử lại', true));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function actionRegister()\n {\n $this->view->title = DetailesForm::TITLE_REGISTER_FORM;\n $model = new UserInfo();\n $items = DetailesForm ::getItems();\n if (Yii::$app->request->post()) {\n $data = Yii::$app->request->post();\n $resultSave = UserInfo::setSave($model , $data);\n if ($resultSave->success)\n {\n Yii::$app->session->setFlash('success', 'ثبت با موفقیت انجام شد');\n $this->redirect( Url::to(['view','id'=> $resultSave->result['id']] ));\n }\n elseif (!$resultSave->success && !empty($resultSave->message))\n {\n $msg = '';\n foreach ($resultSave->message as $text)\n {\n $msg .= $text . \"<br>\";\n }\n Yii::$app->session->setFlash('danger', $msg);\n }\n else\n Yii::$app->session->setFlash('danger', 'عملیات ناموفق به پایین رسید');\n }\n\n return $this->render('_form',\n [\n 'model' => $model,\n 'items' => $items,\n ]);\n\n }", "private function ajoutuser() {\n\t\t$this->_ctrlAdmin = new ControleurAdmin();\n\t\t$this->_ctrlAdmin->userAjout();\n\t}", "public function agregar_usuario_controlador()\n {\n $nombres = strtoupper(mainModel::limpiar_cadena($_POST['usu_nombres_reg']));\n $apellidos = strtoupper(mainModel::limpiar_cadena($_POST['usu_apellidos_reg']));\n $identidad=mainModel::limpiar_cadena($_POST['usu_identidad_reg']);\n $puesto=mainModel::limpiar_cadena($_POST['usu_puesto_reg']);\n $unidad=mainModel::limpiar_cadena($_POST['usu_unidad_reg']);\n $rol = mainModel::limpiar_cadena($_POST['usu_rol_reg']);\n $celular = mainModel::limpiar_cadena($_POST['usu_celular_reg']);\n $usuario = strtolower(mainModel::limpiar_cadena($_POST['usu_usuario_reg']));\n $email=$usuario . '@didadpol.gob.hn' ;\n\n\n /*comprobar campos vacios*/\n if ($nombres == \"\" || $apellidos == \"\" || $usuario == \"\" || $email == \"\" || $rol == \"\" || $identidad == \"\" || $puesto == \"\" || $unidad == \"\") {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO HAS COMPLETADO TODOS LOS CAMPOS QUE SON OBLIGATORIOS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n if (mainModel::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $nombres)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRES SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if (mainModel::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $apellidos)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO APELLIDOS SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if ($celular != \"\") {\n if (mainModel::verificar_datos(\"[0-9]{8}\", $celular)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE CELULAR NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n if (mainModel::verificar_datos(\"[0-9]{13}\", $identidad)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE IDENTIDAD NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar DNI*/\n $check_dni = mainModel::ejecutar_consulta_simple(\"SELECT identidad FROM tbl_usuarios WHERE identidad='$identidad'\");\n if ($check_dni->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE IDENTIDAD YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n if (mainModel::verificar_datos(\"[a-z]{3,15}\", $usuario)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRE DE USUARIO SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 5 Y UN MAXIMO DE 15 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n /*validar usuario*/\n $check_user = mainModel::ejecutar_consulta_simple(\"SELECT nom_usuario FROM tbl_usuarios WHERE nom_usuario='$usuario'\");\n if ($check_user->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL USUARIO YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar email*/\n\n \n $caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n $pass = \"\";\n for ($i = 0; $i < 8; $i++) {\n $pass .= substr($caracteres, rand(0, 64), 1);\n }\n $message = \"<html><body><p>Hola, \" . $nombres . \" \" . $apellidos;\n $message .= \" Estas son tus credenciales para ingresar al sistema de DIDADPOL\";\n $message .= \"</p><p>Usuario: \" . $usuario;\n $message .= \"</p><p>Correo: \" . $email;\n $message .= \"</p><p>Contraseña: \" . $pass;\n $message .= \"</p><p>Inicie sesión aquí para cambiar la contraseña por defecto \" . SERVERURL . \"login\";\n $message .= \"<p></body></html>\";\n\n $res = mainModel::enviar_correo($message, $nombres, $apellidos, $email);\n if (!$res) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE ENVIÓ CORREO ELECTRÓNICO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n $passcifrado = mainModel::encryption($pass);\n\n $datos_usuario_reg = [\n \"rol\" => $rol,\n \"puesto\"=>$puesto,\n \"unidad\"=>$unidad,\n \"usuario\" => $usuario,\n \"nombres\" => $nombres,\n \"apellidos\" => $apellidos,\n \"dni\"=>$identidad,\n \"clave\" => $passcifrado,\n \"estado\" => \"NUEVO\",\n \"email\" => $email,\n \"celular\" => $celular\n ];\n $agregar_usuario = usuarioModelo::agregar_usuario_modelo($datos_usuario_reg);\n if ($agregar_usuario->rowCount() == 1) {\n $alerta = [\n \"Alerta\" => \"limpiar\",\n \"Titulo\" => \"USUARIO REGISTRADO\",\n \"Texto\" => \"LOS DATOS DEL USUARIO SE HAN REGISTRADO CON ÉXITO\",\n \"Tipo\" => \"success\"\n ];\n } else {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE HA PODIDO REGISTRAR EL USUARIO\",\n \"Tipo\" => \"error\"\n ];\n }\n echo json_encode($alerta);\n }", "public function crearUsuario() {\n\n\n if ($this->seguridad->esAdmin()) {\n $id = $this->usuario->getLastId();\n $usuario = $_REQUEST[\"usuario\"];\n $contrasenya = $_REQUEST[\"contrasenya\"];\n $email = $_REQUEST[\"email\"];\n $nombre = $_REQUEST[\"nombre\"];\n $apellido1 = $_REQUEST[\"apellido1\"];\n $apellido2 = $_REQUEST[\"apellido2\"];\n $dni = $_REQUEST[\"dni\"];\n $imagen = $_FILES[\"imagen\"];\n $borrado = 'no';\n if (isset($_REQUEST[\"roles\"])) {\n $roles = $_REQUEST[\"roles\"];\n } else {\n $roles = array(\"2\");\n }\n\n if ($this->usuario->add($id,$usuario,$contrasenya,$email,$nombre,$apellido1,$apellido2,$dni,$imagen,$borrado,$roles) > 1) {\n $this->perfil($id);\n } else {\n echo \"<script>\n i=5;\n setInterval(function() {\n if (i==0) {\n location.href='index.php';\n }\n document.body.innerHTML = 'Ha ocurrido un error. Redireccionando en ' + i;\n i--;\n },1000);\n </script>\";\n } \n } else {\n $this->gestionReservas();\n }\n \n }", "public function actionaddUniquePhone()\n\t{\n\t\t\n\t\tif($this->isAjaxRequest())\n\t\t{\n\t\t\tif(isset($_POST['userphoneNumber'])) \n\t\t\t{\n\t\t\t\t$sessionArray['loginId']=Yii::app()->session['loginId'];\n\t\t\t\t$sessionArray['userId']=Yii::app()->session['userId'];\n\t\t\t\t$loginObj=new Login();\n\t\t\t\t$total=$loginObj->gettotalPhone($sessionArray['userId'],1);\n\t\t\t\tif($total > 1)\n\t\t\t\t{\n\t\t\t\t\techo \"Limit Exist!\";\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t$totalUnverifiedPhone=$loginObj->gettotalUnverifiedPhone($sessionArray['userId'],1);\n\t\t\t\tif($totalUnverifiedPhone==1)\n\t\t\t\t{\n\t\t\t\t\techo \"Please first verify unverified phone.\";\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$result=$loginObj->addPhone($_POST,1,$sessionArray);\n\t\t\t\t\n\t\t\t\tif($result['status']==0)\n\t\t\t\t{\n\t\t\t\t\techo \"success\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo $result['message']; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->render(\"/site/error\");\n\t\t}\n\t}", "public function add()\n {\n $data=$this->M_mtk->add();\n echo json_encode($data);\n }", "function ajax_add()\n {\n\tif ($this->form_validation->run($this, 'users') == TRUE) {\n\t //get data from post\n\t $data = $this->_get_data_from_post();\n\t $return = [];\n\t //$data['photo'] = Modules::run('upload_manager/upload','image');\n\n\t $return['status'] = $this->mdl_users->_insert($data) ? TRUE : FALSE;\n\t $return['msg'] = $data['status'] ? NULL : 'An error occured trying to insert data please try again';\n\t $return['node'] = [\n\t\t'users' => $data['users'],\n\t\t'slug' => $data['users_slug'],\n\t\t'id' => $this->db->insert_id()\n\t ];\n\n\n\t echo json_encode($return);\n\t}\n }", "public function addAction()\n {\n $form = new RobotForm;\n $user = Users::findFirst($this->session->get(\"auth-id\"));\n\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Добавить робота :: \");\n }\n\n if ($this->request->isPost()) {\n if (!$form->isValid($this->request->getPost())) {\n foreach ($form->getMessages() as $message) {\n $this->flashSession->error($message);\n }\n return $this->response->redirect(\n [\n \"for\" => \"robot-add\",\n \"name\" => $user->name\n ]\n );\n } else {\n\n $robot = new Robots();\n $robot->name = $this->request->getPost(\"name\");\n $robot->type = $this->request->getPost(\"type\");\n $robot->year = $this->request->getPost(\"year\");\n $robot->users_id = $user->id;\n\n\n if ($robot->save()) {\n $this->flashSession->success(\"Вы добавили нового робота !\");\n $this->session->set(\"robot-id\", $robot->id);\n return $this->response->redirect(\n [\n\n \"for\" => \"user-show\",\n \"name\" => $this->session->get(\"auth-name\")\n ]\n );\n\n } else {\n\n $this->flashSession->error($robot->getMessages());\n }\n\n }\n }\n\n return $this->view->form = $form;\n\n }", "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增用户';\n $this->global['pageName'] = 'user_add';\n\n if(empty($_POST)){\n $data['roles'] = $this->user_model->getRoles($this->global['login_id']);\n\n $this->loadViews(\"user_manage/user_add\", $this->global, $data, NULL);\n }else{\n $this->item_validate();\n }\n }\n }", "public function AddMentoratUser($id){\n if($user = User::where(['id' => $id,'mentorat' => User::not_mentorat,'type' => User::user])->first()){\n $this->mail->ID840231($user->id,Session::get('userData'));\n toastr()->success('This user has been emailed to approve mentor');\n\n $user->mentorat = User::in_standby_mentorat;\n $user->save();\n }else{\n toastr()->error('Something is wrong!');\n }\n return Redirect::back();\n }", "public function add(){\r\n\t\t//$this->auth->set_access('add');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function agregar(){\n if(!isLoggedIn()){\n redirect('usuarios/login');\n }\n //check User Role -- Only ADMINISTRADOR allowed\n if(!checkLoggedUserRol(\"ADMINISTRADOR\")){\n redirect('dashboard');\n }\n\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n \n // Sanitize POST array\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n $data = [\n 'nombreEspecialidad' => trim($_POST['nombreEspecialidad'])\n ];\n\n // Validar Nombre Especialidad obligatorio\n if(empty($data['nombreEspecialidad'])){\n $data['nombreEspecialidad_error'] = 'Por favor ingrese un titulo para la especialidad';\n }\n\n // Validar Nombre Especialidad existente\n if($this->especialidadModel->checkEspecialidad($data['nombreEspecialidad'])){\n $data['nombreEspecialidad_error'] = 'La especialidad que intentó agregar ya existe';\n }\n\n // Asegurarse que no haya errores\n if(empty($data['nombreEspecialidad_error'])){\n // Crear especialidad\n if($this->especialidadModel->agregarEspecialidad($data['nombreEspecialidad'])){\n flash('especialidad_success', 'Especialidad creada correctamente');\n redirect('especialidades');\n }\n else{\n die('Ocurrió un error inesperado');\n }\n }\n else{\n flash('especialidad_error', $data['nombreEspecialidad_error'], 'alert alert-danger');\n redirect('especialidades');\n }\n }\n }", "public function addMembro($id_usuario, $id_grupo) {\n $sql = \"INSERT INTO grupos_membros SET id_usuario = '$id_usuario', id_grupo = '$id_grupo'\";\n $this->db->query($sql);\n }", "public function agregarUsuario(){\n \n }", "public function add_friend($user_to = null) {\n\n\t\t\n\t\t$this->request->data['User']['id'] = $this->getUserId();\n\t\t$this->request->data['Friend']['id'] = $user_to;\n\n\t\tif($result = $this->User->saveAll($this->request->data)) {\n\t\t\t$this->redirect(array('action' => 'view', $user_to));\n\t\t} else {\n\t\t\t$this->redirect(array('action' => 'view', $user_to));\n\t\t}\n\n\t}", "public function addUser(){\n\t}", "public function Add_medico($array = array()){\n \t\t $request['inp_document'];\n \t\t $request['inp_nomb'];\n \t\t $request['inp_apell'];\n \t\t $request['inp_tel'];\n \t\t $request['inp_cel'];\n \t\t $request['rdio_sex'];\n \t\t $request['slt_especia'];\t\n \t\t $request['inp_nick'];\n\t\t $person = new Persona();\n\t\t $respon = $person->crearPersona($array); // dentro de esta funcion debe insertar en la tabla persona, si es exitoso la insercion, debe pasar el if siguiente e insertar en la tabla medicos\n\t\t if(isset($respon['exito'])){\n\t\t $request['slt_especia'];\n\t\t $request['inp_document'];\t\n\t\t\n\n\t\t\t //insercion del packete\n\t\t }\n\t\t}", "public function admin_add()\n {\n if ($this->request->is('post')) {\n $this->User->create();\n\n $this->request->data['Impi']['auth_scheme'] = 127;\n\n if ($this->User->saveAll($this->request->data)) {\n $this->Session->setFlash(__('The user has been saved'));\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n }\n }\n $utilityFunctions = $this->User->UtilityFunction->find('list');\n\n $this->set(compact('utilityFunctions', 'utilityFunctionsParameters'));\n }", "public function postAjouter() {\n \t$d['resultat']= 0;\n \tif(!Auth::user()) {\n \t\t$d['message'] = \"Vous devez être identifié pour participer.\";\n \t} else {\n\t\t\tif (Input::get('valeur')==\"\") {\n\t\t\t\t$d['message'] = \"Vous devez écrire quelque chose pour participer.\";\n\t\t\t} else {\n\t\t\t\t// Enregistre le message\n\t\t\t\t$message = new \\App\\Models\\Message;\n\t\t\t\t$message->user_id = Auth::user()->id;\n\t\t\t\t$message->texte = Input::get('valeur');\n\t\t\t\t$message->save();\n\t\t\t\t$d['resultat'] = 1;\n\t\t\t\t$d['message'] = \"\";\n\t\t\t}\n\t\t}\n\t\t// Le refresh est fait via un autre appel ajax\n\t\t// On envoi la réponse\n\t\treturn response()->json($d);\n\t}", "private function inserirUnidade()\n {\n $cadUnidade = new \\App\\adms\\Models\\helper\\AdmsCreate;\n $cadUnidade->exeCreate(\"adms_unidade_policial\", $this->Dados);\n if ($cadUnidade->getResultado()) {\n $_SESSION['msg'] = \"<div class='alert alert-success'>Unidade cadastrada com sucesso!</div>\";\n $this->Resultado = true;\n } else {\n $_SESSION['msg'] = \"<div class='alert alert-danger'>Erro: A Unidade não foi cadastrada!</div>\";\n $this->Resultado = false;\n }\n }", "public function addUtilisateur()\n\t{\n\t\t\t$sql = \"INSERT INTO utilisateur SET\n\t\t\tut_nom=?,\n\t\t\tut_prenom=?,\n\t\t\tut_pseudo=?,\n\t\t\tut_mail=?,\n\t\t\tut_mdp=?,\n\t\t\tut_date_inscription=NOW(),\n\t\t\tut_hash_validation =?\";\n\n\t\t\t$res = $this->addTuple($sql,array($this->nom,\n\t\t\t\t$this->prenom,\n\t\t\t\t$this->pseudo,\n\t\t\t\t$this->email,\n\t\t\t\t$this->pass,\n\t\t\t\t$this->hashValidation()\n\t\t\t\t));\n\t\t\treturn $res;\n\t}", "public function AddSocial(){\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n $id_empresa = 1;\n $facebook = trim($_POST['facebook']);\n $twitter = trim($_POST['twitter']);\n $google_plus = trim($_POST['google_plus']);\n $linkedin = trim($_POST['linkedin']);\n $instagram = trim($_POST['instagram']);\n $pinterest = trim($_POST['pinterest']);\n $whatsapp = trim($_POST['whatsapp']);\n\n $columnas = array(\"id_empresa\", \"facebook\", \"twitter\", \"google_plus\", \"linkedin\", \"instagram\", \"pinterest\", \"whatsapp\");\n $datos = array($id_empresa, $facebook, $twitter, $google_plus, $linkedin, $instagram, $pinterest, $whatsapp);\n\n //ejecyta la insercion\n if($this->ConfigModelo->insert('red_social', $columnas, $datos)){\n\n $_SESSION[\"success\"]=true;\n redireccionar('pages/contacto');\n\n }else{\n echo false;\n }\n\n }else{\n\n $columnas = \"\";\n $datos = \"\";\n\n }\n\n }", "public static function append_into_contact_list(){\n\n\n $id_added_user = $_SESSION[\"user_id_added\"]; // usuario que acabamos de agregar\n\t$current_user_id = $_SESSION[\"id_user\"]; // este soy yo osea el que agrega\n\n\t$QUERY = \"INSERT INTO contact values(NULL,$current_user_id ,$id_added_user) \";\n\n\n\t mysql_query( $QUERY , Conectar::con());\n\n\n\n\t}", "public function addUser(){}", "public function create()\n {\n \n echo \"Syntax: POST: /api?telefon=*telefon*&id_agencija=*id*<br>/api?email=*email*&id_agencija=*id*\";\n \n }", "public function actionRegister()\n {\n if (isset($this->request['mobile'])) {\n $mobile = $this->request['mobile'];\n $user = Users::model()->find('username = :mobile', [':mobile' => $mobile]);\n\n $code = Controller::generateRandomInt();\n if (!$user) {\n $user = new Users();\n $user->username = $mobile;\n $user->password = $mobile;\n $user->status = Users::STATUS_PENDING;\n $user->mobile = $mobile;\n }\n\n $user->verification_token = $code;\n if ($user->save()) {\n $userDetails = UserDetails::model()->findByAttributes(['user_id' => $user->id]);\n $userDetails->credit = SiteSetting::getOption('base_credit');\n $userDetails->save();\n }\n\n Notify::SendSms(\"کد فعال سازی شما در آچارچی:\\n\" . $code, $mobile);\n\n $this->_sendResponse(200, CJSON::encode(['status' => true]));\n } else\n $this->_sendResponse(400, CJSON::encode(['status' => false, 'message' => 'Mobile variable is required.']));\n }", "public function addNewRegiuneByAdmin($data)\n {\n $nume = $data['nume'];\n\n $checkRegiune = $this->checkExistRegiune($nume);\n\n\n if ($nume == \"\") {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Câmpurile de introducere nu trebuie să fie Golite!</div>';\n return $msg;\n } elseif (strlen($nume) < 2) {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Numele regiunii este prea scurt, cel puțin 2 caractere!</div>';\n return $msg;\n } elseif ($checkRegiune == TRUE) {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Regiunea există deja, vă rugăm să încercați o alta regiune ...!</div>';\n return $msg;\n } else {\n\n $sql = \"INSERT INTO regiune(nume ) VALUES(:nume)\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->bindValue(':nume', $nume);\n $result = $stmt->execute();\n if ($result) {\n $msg = '<div class=\"alert alert-success alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Success !</strong> Ați înregistrat cu succes!</div>';\n return $msg;\n } else {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Error !</strong> Ceva n-a mers bine !</div>';\n return $msg;\n }\n }\n }", "public function actionCreate() {\n $id_user = Yii::app()->user->getId();\n $model = User::model()->findByPk($id_user);\n $tipo = $model->id_tipoUser;\n if ($tipo == \"1\") {\n $model = new Consultor;\n $modelUser = new User;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Consultor'])) {\n $model->attributes = $_POST['Consultor'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n \n \n \n $senha = uniqid(\"\", true);\n $modelUser->password = $senha;\n $modelUser->username = $_POST['username'];\n $modelUser->email = trim($model->email);\n $modelUser->attributes = $modelUser;\n $modelUser->id_tipoUser = 4;\n $modelUser->senha = '0';\n\n if ($modelUser->save()) {\n\n $model->id_user = $modelUser->id;\n if ($model->save()) {\n $this->redirect(array('EnviaEmail', 'nomedestinatario' => $model->nome, \"emaildestinatario\" => $model->email, \"nomedeusuario\" => $modelUser->username, \"senha\" => $modelUser->password));\n }\n }\n \n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n \n }else {\n $this->redirect(array('User/ChecaTipo'));\n }\n }", "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }", "function add()\n {\n //load chuc vu ra\n $this->load->model('chucvu_model');\n $input = array();\n $chucvu = $this->chucvu_model->getList($input);\n $this->data['chucvu'] = $chucvu;\n \n //thoa dieu kien dau vao moi insert vao\n $this->load->library('form_validation');\n $this->load->helper('form');\n if($this->input->post())\n {\n $this->form_validation->set_rules('password', 'Mật khẩu', 'min_length[8]'); \n $this->form_validation->set_rules('repassword', 'Nhập lại mật khẩu', 'matches[password]');\n \n if($this->form_validation->run())\n {\n //lay DL tu view\n $ho = $this->input->post('ho');\n $ten = $this->input->post('ten');\n $luong = $this->input->post('luong');\n $chucvu = $this->input->post('chucvuid');\n $password = $this->input->post('password'); \n //do use plugin jQuery number --> chuyen ve dang so moi insert duoc\n $luong = str_replace(',', '', $luong);\n \n $data = array(\n 'ho' => $ho,\n 'ten' => $ten,\n 'chucvuid' => $chucvu, \n 'password' => md5($password),\n 'luong' => $luong\n );\n if($this->nhanvien_model->add($data))\n {\n $message = $this->session->set_flashdata('message', 'Thêm mới dữ liệu thành công'); \n }\n else {\n $this->session->set_flashdata('message', 'Không thể thêm mới');\n } \n //chuyen ve trang index\n redirect(admin_url('nhanvien'));\n }\n }\n \n $this->data['temp'] = 'admin/nhanvien/add';\n $this->load->view('admin/main', $this->data);\n }", "protected function register(MembreRequest $data)\n {\n\t\t\t//check if is Avatar img exist\n\t\t$custom_file_name =\"\";\n\t\t/*if ($request->hasFile('image')) {\n\t\t\t$file = $request->file('image');\n\t\t\t$custom_file_name = time().'-'.$request->file('image')->getClientOriginalName(); // customer the name of img uploded \n\t\t\t$file->move('avatar_membre/', $custom_file_name); // save img ine the folder Public/Avatars\n\t\t\t\n\t\t}*/\t\n\t $membre=Membre::create([\n 'nom' => $data['nom'],\n 'email' => $data['email'],\n\t\t\t'prenom' => $data['prenom'],\n\t\t\t'tel' => $data['tel'],\n\t\t\t'state_id' => $data['state_id'],\n\t\t\t'address' => $data['address'],\n\t\t\t'nbr_annonce_autorise' => 5,\n 'password' => Hash::make($data['password']),\n ]);\n\t\t\n\t \n\t\t$this->guard()->login($membre);\n\t\treturn redirect()->intended( 'membre' ); \n }", "public function agregarUsuarioController(){\n //se verifica que el ultimo elemento de la lista contenga algo \n if(isset($_POST[\"tipo_cliente\"]) && $_POST[\"tipo_cliente\"] != \"\"){\n //Se almacena la informacion en un arreglo asociativo\n $datosController = array( \"tipo_cliente\"=>$_POST[\"tipo_cliente\"],\n \"telefono\"=>$_POST[\"telefono\"],\n \"nombre\"=>$_POST[\"nombre\"],\n \"ap_paterno\"=>$_POST[\"ap_paterno\"],\n \"ap_materno\"=>$_POST[\"ap_materno\"]\n );\n //Se habla a la clase DATOS para poder enviarle la peticion de agregar un nuevo registro, enviandole el arreglo y la tabla.\n $respuesta = Datos::agregarUsuariosModel($datosController,\"clientes\");\n\n if($respuesta == true){\n //En caso positivo nos redirecciona al cliente.\n echo '<script>\t\t\n\t\t\t location.href= \"index.php?action=cliente\";\n\t\t </script>';\n \n }else{\n //En caso negativo nos deja en la misma ventana.\n echo '<div class=\"alert alert-warning\" role=\"alert\"> <strong>Error!</strong> Revise el contenido que desea agregar. </div>';/*\n echo '<script>\t\t\n\t\t\t location.href= \"index.php?action=agregar_cliente\";\n\t\t </script>';*/\n }\n }\n }", "function registerMadMimi() {\n\t\t//\n\t\tApp::import('Vendor', 'MadMimi', array('file' => 'madmimi' . DS . 'MadMimi.class.php'));\n\t\tApp::import('Vendor', 'MadMimi', array('file' => 'madmimi' . DS . 'Spyc.class.php'));\n\n\t\t// Crear el objeto de Mad Mimi\n\t\t//\n\t\t$mailer = new MadMimi(Configure::read('madmimiEmail'), Configure::read('madmimiKey'));\n\t\t$userMimi = array('email' => $_POST[\"email\"], 'firstName' => $_POST[\"name\"], 'add_list' => 'mailing');\n\t\t$mailer -> AddUser($userMimi);\n\t\techo true;\n\t\tConfigure::write(\"debug\", 0);\n\t\t$this -> autoRender = false;\n\t\texit(0);\n\t}", "public function addMonumentAction(Request $request){\n if(($this->container->get('security.authorization_checker')->isGranted('ROLE_CLIENT'))){\n throw new AccessDeniedException('Access Denied!!!!!');\n }\n else{\n $monument = new Monument();\n $test = \"ajout\";\n $form = $this->createForm(MonumentType::class, $monument);\n $form = $form->handleRequest($request);\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($monument);\n $em->flush();\n return $this->redirectToRoute('museum_showMonumentspage');\n }\n return $this->render('@Museum/Monument/addMonument.html.twig', array('form' => $form->createView(), 'test' => $test));\n }}", "function store()\n {\n $name = $_REQUEST['name'];\n $email = $_REQUEST['email'];\n $address = $_REQUEST['address'];\n $password = $_REQUEST['password'];\n $group_id = $_REQUEST['group_id'];\n $this->userModel->add($name, $email, $address, $password, $group_id);\n // quay tro lai trang danh sach -> thay doi thuoc tinh: location cua header\n header('location:index.php?page=users');\n }", "public function add()\n {\n\n // Reglas de validación del formulario\n /*\n required: indica que el campo es obligatorio.\n min_length: indica que la cadena debe tener al menos una cantidad determinada de caracteres.\n max_length: indica que la cadena debe tener como máximo una cantidad determinada de caracteres.\n valid_email: indica que el valor debe ser un correo con formato válido.\n */\n $this->form_validation->set_error_delimiters('', '');\n $this->form_validation->set_rules(\"nombre\", \"Nombre\", \"required|max_length[100]\");\n $this->form_validation->set_rules(\"apellido\", \"Apellido\", \"required|max_length[100]\");\n $this->form_validation->set_rules(\"email\", \"Email\", \"required|valid_email|max_length[150]|is_unique[profesores.email]\");\n $this->form_validation->set_rules(\"fecha_nacimiento\", \"Fecha de Nacimiento\", \"required\");\n $this->form_validation->set_rules(\"profesion\", \"Profesion\", \"required|max_length[100]\");\n\n // Modificando el mensaje de validación para los errores\n $this->form_validation->set_message('required', 'El campo %s es requerido.');\n $this->form_validation->set_message('min_length', 'El campo %s debe tener al menos %s caracteres.');\n $this->form_validation->set_message('max_length', 'El campo %s debe tener como máximo %s caracteres.');\n $this->form_validation->set_message('valid_email', 'El campo %s no es un correo válido.');\n $this->form_validation->set_message('is_unique', 'El campo %s ya existe.');\n\n //echo \"Genero => \" . $this->input->post(\"genero\");\n\n // Parámetros de respuesta\n header('Content-type: application/json');\n $statusCode = 200;\n $msg = \"\";\n\n // Se ejecuta la validación de los campos\n if ($this->form_validation->run()) {\n // Si la validación es correcta entra acá\n try {\n $this->load->model('ProfesoresModel');\n $data = array(\n \"nombre\" => $this->input->post(\"nombre\"),\n \"apellido\" => $this->input->post(\"apellido\"),\n \"email\" => $this->input->post(\"email\"),\n \"profesion\" => $this->input->post(\"profesion\"),\n \"genero\" => $this->input->post(\"genero\"),\n \"fecha_nacimiento\" => $this->input->post(\"fecha_nacimiento\"),\n );\n $rows = $this->ProfesoresModel->insert($data);\n if ($resMo > 0) {\n $msg = \"Información guardada correctamente.\";\n } else {\n $statusCode = 500;\n $msg = \"No se pudo guardar la información.\";\n }\n } catch (Exception $ex) {\n $statusCode = 500;\n $msg = \"Ocurrió un error.\" . $ex->getMessage();\n }\n } else {\n // Si la validación da error, entonces se ejecuta acá\n $statusCode = 400;\n $msg = \"Ocurrieron errores de validación.\";\n $errors = array();\n foreach ($this->input->post() as $key => $value) {\n $errors[$key] = form_error($key);\n }\n $this->data['errors'] = $errors;\n }\n // Se asigna el mensaje que llevará la respuesta\n $this->data['msg'] = $msg;\n // Se asigna el código de Estado HTTP\n $this->output->set_status_header($statusCode);\n // Se envía la respuesta en formato JSON\n echo json_encode($this->data);\n }", "public function addNew()\n {\n $this->load->model('user_model');\n $data['roles'] = $this->user_model->getUserRoles();\n $data['divisi'] = $this->user_model->getUserDivisi();\n $data['pangkat'] = $this->user_model->getUserPangkat();\n $this->global['pageTitle'] = 'Tambahkan Data Rescuer';\n $this->load->view('includes/header', $this->global);\n $this->load->view('rescuer/addNew', $data);\n $this->load->view('includes/footer');\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 add(){\n\t\t$data = array();\n\t\t$postData = array();\n\n\t\t//zistenie, ci bola zaslana poziadavka na pridanie zaznamu\n\t\tif($this->input->post('postSubmit')){\n\t\t\t//definicia pravidiel validacie\n\t\t\t$this->form_validation->set_rules('mesto', 'Pole mesto', 'required');\n\t\t\t$this->form_validation->set_rules('PSČ', 'Pole PSČ', 'required');\n\t\t\t$this->form_validation->set_rules('email', 'Pole email', 'required');\n\t\t\t$this->form_validation->set_rules('mobil', 'Pole mobil', 'required');\n\n\n\n\t\t\t//priprava dat pre vlozenie\n\t\t\t$postData = array(\n\t\t\t\t'mesto' => $this->input->post('mesto'),\n\t\t\t\t'PSČ' => $this->input->post('PSČ'),\n\t\t\t\t'email' => $this->input->post('email'),\n\t\t\t\t'mobil' => $this->input->post('mobil'),\n\n\n\t\t\t);\n\n\t\t\t//validacia zaslanych dat\n\t\t\tif($this->form_validation->run() == true){\n\t\t\t\t//vlozenie dat\n\t\t\t\t$insert = $this->Kontakt_model->insert($postData);\n\n\t\t\t\tif($insert){\n\t\t\t\t\t$this->session->set_userdata('success_msg', 'Záznam o kontakte bol úspešne vložený');\n\t\t\t\t\tredirect('/kontakt');\n\t\t\t\t}else{\n\t\t\t\t\t$data['error_msg'] = 'Nastal problém.';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$data['post'] = $postData;\n\t\t$data['title'] = 'Pridať kontakt';\n\t\t$data['action'] = 'add';\n\n\t\t//zobrazenie formulara pre vlozenie a editaciu dat\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('kontakt/add-edit', $data);\n\t\t$this->load->view('templates/footer');\n\t}", "function create()\r\n\t{\r\n\r\n\t\t$this->form_validation->set_rules('nom', 'le nom', 'trim|required|min_length[2]|max_length[12]');\r\n\r\n\t\tif ($this->form_validation->run() == TRUE ) {\r\n\t\t\r\n\t\t$this->e->ajouter($this->input->post());\r\n\r\n\t\t$this->_notice=\"Ajout effectué avec succéss\";\r\n\r\n\t\t$this->index();\r\n\t\t} \r\n\t\telse {\r\n\t\t\t$this->index();\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public function create_post(){\n\n $this->form_validation->set_rules('domicilio[latitud]', 'Latitud del Domicilio', 'required|trim');\n $this->form_validation->set_rules('domicilio[longitud]', 'Longitud del Domicilio', 'required|trim');\n $this->form_validation->set_rules('domicilio[image]', 'Imagen del Mapa', 'required|trim');\n\n\t\tif( $this->form_validation->run() == true){\n \n $data = $this->security->xss_clean($this->input->post()); # XSS filtering\n\n $token = $this->security->xss_clean($this->input->post('auth', TRUE)); //token de authentication\n $is_valid_token = $this->authorization_token->validateToken($token);\n\n if(null !== $is_valid_token && $is_valid_token['status'] === TRUE){\n $usuario = $this->Usuario_model->getByTokenJWT($is_valid_token['data']);\n $domicilio = $data[\"domicilio\"];\n\n if (array_key_exists('persona', $data)) {\n $domicilio['id_persona'] = $data[\"persona\"]['id'];\n }\n $domicilio['id_usuario'] = $usuario->id;\n $out_domicilio = $this->Domicilio_model->create( $domicilio );\n\n if($out_domicilio != null){\n\n $this->response([\n 'status' => true,\n 'message' => $this->lang->line('item_was_has_add'),\n $this->lang->line('domicilio') => $out_domicilio\n ], REST_Controller::HTTP_OK);\n }else{\n $this->response([\n 'status' => false,\n 'message' => $this->lang->line('no_item_was_has_add')\n ], REST_Controller::HTTP_CREATED);\n }\n }else{\n $this->response([\n 'status' => false,\n 'message' => $this->lang->line('token_is_invalid'),\n ], REST_Controller::HTTP_NETWORK_AUTHENTICATION_REQUIRED); // NOT_FOUND (400) being the HTTP response code\n }\n\t\t}else{\n $this->response([\n 'status' => false,\n 'message' => validation_errors()\n ], REST_Controller::HTTP_ACCEPTED); \n\t\t}\n $this->set_response($this->lang->line('server_successfully_create_new_resource'), REST_Controller::HTTP_RESET_CONTENT);\n }", "public function add(){\n\t\tif($this->request->is('post'))\n\t\t{\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['role'] = 'user';\n\t\t\tif($this->User->save($this->request->data))\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario creado');\n\t\t\t\treturn $this-redirect(array('action' =>'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario no creado');\n\t\t\t}\n\t\t}\n\n\t}", "public function add_to_cart_friend() {\n $id_item = $_POST['id_item'];\n $this->view->id_item = $id_item;\n\n $nr_friends = count($_POST['name']);\n $friendsDetails = array();\n\n //validam daca a completat numele la toti\n for ($i = 0; $i < $nr_friends; $i++) {\n if (strlen($_POST['name'][$i]) < 1 || !filter_var($_POST['email'][$i], FILTER_VALIDATE_EMAIL)) {\n $errors = \"Va rugam completati corect datele prietenilor !\";\n break 1;\n }\n $friendsDetails[] = array(\"name\" => $_POST['name'][$i], \"email\" => $_POST['email'][$i]);\n }\n if ($errors) {\n $this->view->errors = $errors;\n $this->view->nr_friends = $nr_friends;\n $this->view->post = $_POST;\n $this->view->render(\"popups/addFriend\", false, \"popup\");\n }\n\n //totul e ok aici, salvam item-urile in shopping cart\n //Intai cream tipul de date pentru metoda NeoCartModel\\addToCart\n $params['quantity'] = $nr_friends;\n $params['id_item'] = $id_item;\n $params['is_gift'] = true;\n $params['details'] = json_encode($friendsDetails);\n\n $hash = self::getHash();\n $cart = $this->NeoCartModel->getCart($hash);\n\n $this->NeoCartModel->addToCart($params, $cart);\n $this->view->errors = \"Multumim ! Produsele au fost adaugate in cos.\";\n $this->view->render(\"popups/addFriend\", false, \"popup\");\n }", "public function addUser(UserAddForm $form);", "public function addType()\r\n\t{\r\n\t\tif(isset($_SESSION['auth']) && $_SESSION['users']['niveau'] == 3){\r\n\t\tif(isset($_POST['dataF'])){\r\n\t\t\t$spe = str_replace('&', '=', $_POST['dataF']);\r\n\t\t\t$data = $this->convertArray($spe);\r\n\t\t\t//print_r($data);die();\r\n\t\t\t$spec = $this->model('type');\r\n\t\t\t$id = $spec->addType($data);\r\n\t\t\tif($id){\r\n\t\t\t\techo json_encode(['SUCCESS'=>true]);\r\n\t\t\t}else{\r\n\t\t\t\techo json_encode(['SUCCESS'=>true]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t}else{\r\n\t\t\t$this->view('login',['page'=>'Speciality','msg'=>'you should to connect first']);\r\n\t\t}\r\n\t}", "function newactor(){\n\t\t$client = new \\GuzzleHttp\\Client();\n\t\t$url = 'http://localhost:8080/codeIgniter3/index.php/actor/add';\n\t\t$data = [\n\t\t\t'form_params'=>[\n\t\t\t\t'first_name'=>'John',\n\t\t\t\t'last_name'=>'Doe'\n\t\t\t]\t\t\t\t\n\t\t];\n\n $res = $client->request('POST', $url, $data);\n\t}", "function add()\n { \n\t\tif ($this->auth->loggedin()) {\n\t\t\t$id = $this->auth->userid();\n\t\t\tif(!($this->User_model->hasPermission('add',$id)&&($this->User_model->hasPermission('person',$id)||$this->User_model->hasPermission('WILD_CARD',$id)))){\n\t\t\t\tshow_error('You Don\\'t have permission to perform this operation.');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$this->form_validation->set_rules('username', '<b>Username</b>', 'trim|required|min_length[5]|max_length[12]');\n\t\t\t$this->form_validation->set_rules('password', '<b>Password</b>', 'trim|required');\n\t\t\t$this->form_validation->set_rules('first_name', '<b>First Name</b>', 'trim|required|min_length[2]|max_length[12]');\n\t\t\t$this->form_validation->set_rules('Last_name', '<b>Last Name</b>', 'trim|required|min_length[2]|max_length[12]');\n\t\t\t\n\t\t\t$this->form_validation->set_rules('gender', '<b>Gender</b>', 'trim|required');\n\t\t\t$this->form_validation->set_rules('mobile', '<b>Mobile</b>', 'trim|required|integer|min_length[10]|max_length[11]');\n\t\t\t$this->form_validation->set_rules('role_id', '<b>Role</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t$this->form_validation->set_rules('location_id', '<b>Location</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t$this->form_validation->set_rules('status_id', '<b>Status</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t\t\t\t\n\t\t\tif(isset($_POST) && count($_POST) > 0 && $this->form_validation->run()) \n\t\t\t{ \n\t\t\t\t$person_id = $this->User_model->register_user(); \n\t\t\t\t//$person_id = $this->Person_model->add_person($params);\n\t\t\t\t$params1 = array(\n\t\t\t\t\t\t\t'person_id' => $person_id,\n\t\t\t\t\t\t\t'role_id' => $this->input->post('role_id'),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->Person_role_model->update_person_role($person_id,$params1);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$params2 = array(\n\t\t\t\t\t\t\t'person_id' => $person_id,\n\t\t\t\t\t\t\t'location_id' => $this->input->post('location_id'),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->Person_location_model->update_person_location($person_id,$params2);\t\n\t\t\t\tredirect('person/index');\n\t\t\t}\n\t\t\telse\n\t\t\t{ \n\t\t\t\t\n\t\t\t\t$user = $this->User_model->get('person_id', $id);\n\t\t\t\tunset($user['password']);\n\t\t\t\t\n\t\t\t\t$user_role = $this->User_model->loadRoles($user['person_id']);\n\t\t\t\t\t$this->data['user'] = $user['username'];\n\t\t\t\t\t$this->data['role'] = $user_role;\n\t\t\t\t\t$this->data['gender'] = $user['gender'];\n\t\t\t\t\t$specialPerm = $this->User_model->loadSpecialPermission($id);\n\t\t\t\t\t\n\t\t\t\t\t$this->data['pp'] = $specialPerm;\n\t\t\t\t\t$this->data['p_role'] = $this->Person_role_model->get_person_role($id);\n\t\t\t\t\t$this->data['role'] = $this->Role_model->get_all_role();\n\t\t\t\t\t$this->data['location'] = $this->Location_model->get_all_location();\n\t\t\t\t\t$this->data['status'] = $this->Statu_model->get_all_status();\n\t\t\t\t\t\n\t\t\t\t$this->template\n\t\t\t\t\t->title('Welcome','My Aapp')\n\t\t\t\t\t->build('person/add',$this->data);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->template\n\t\t\t\t\t->title('Login Admin','Login Page')\n\t\t\t\t\t->set_layout('access')\n\t\t\t\t\t->build('access/login');\n\t\t}\n }", "function incluir_click($sender, $param)\n {\n if ($this->IsValid)\n {\n $this->incluir->Enabled=False;//Se deshabilita boton incluir\n // se capturan los valores de los controles\n $aleatorio = $this->numero->Text;\n $cod_direccion = usuario_actual('cod_direccion');\n $cod_direccion=substr($cod_direccion, 1);\n $siglas = usuario_actual('siglas_direccion');\n $ano = $this->lbl_ano->Text;\n $asunto = str_replace(\"'\", '\\\\\\'', $this->txt_asunto->Text );\n $destinatario = str_replace(\"'\", '\\\\\\'', $this->txt_destinatario->Text );\n $enviadopor=usuario_actual('login');\n $fecha = cambiaf_a_mysql ($this->txt_fecha->Text);\n //$memo=$this->html1->text;\n //busca el nombre del remitente\n $sql3=\"select cedula from intranet.usuarios where(login='$enviadopor')\";\n $resultado3=cargar_data($sql3, $sender);\n $cedula=$resultado3[0]['cedula'];\n $sql3=\"select nombres, apellidos from organizacion.personas where(cedula='$cedula')\";\n $resultado3=cargar_data($sql3, $sender);\n $remitente=$resultado3[0]['nombres'].' '.$resultado3[0]['apellidos'];\n $criterios_adicionales=array('direccion' => $cod_direccion, 'ano' => $ano);\n $numero=proximo_numero(\"organizacion.memoranda\",\"correlativo\",$criterios_adicionales,$this);\n $numero=rellena($numero,4,\"0\");\n // se inserta en la base de datos\n $sql = \"insert into organizacion.memoranda\n (direccion, siglas, correlativo, ano, fecha, asunto, destinatario, status, memo, remitente)\n values ('$cod_direccion','$siglas','$numero','$ano','$fecha','$asunto','$destinatario','1','$memo', '$remitente')\"; \n $resultado=modificar_data($sql,$sender);\n /*$sql2=\"update organizacion.adjuntos set correlativo='$numero' where (correlativo='$aleatorio')\";\n $resultado2=modificar_data($sql2, $sender);*/ \n /* Se incluye el rastro en el archivo de bitácora */\n $descripcion_log = \"Incluido el Memorando: \".$siglas.\"-\".$numero.\"-\".$ano;\n inserta_rastro(usuario_actual('login'),usuario_actual('cedula'),'I',$descripcion_log,\"\",$sender);\n $this->LTB->titulo->Text = \"Solicitud de número de Memorando\";\n $this->LTB->texto->Text = \"Se ha registrado exitosamente el nuevo Memorando con el \".\n \"número: <strong>\".$siglas.\"-\".$numero.\"-\".$ano.\"</strong>\";\n $this->LTB->imagen->Imageurl = \"imagenes/botones/memoranda.png\";\n $this->LTB->redir->Text = \"epaper.incluir_memo\";\n $params = array('mensaje');\n $this->getPage()->getCallbackClient()->callClientFunction('muestra_mensaje', $params);\n\n //$this->mensaje2->setSuccessMessage($sender, \"Se ha registrado exitosamente el nuevo Memorando con el numero:\".$siglas.\"-\".$numero.\"-\".$ano, 'grow');\n\n }\n }", "public function insertar($nombreMiembro,$apellido1Miembro,$apellido2Miembro,$correo,$contrasenna,$rol){ \n $miembro = new Miembro();\n \n $miembro->nombreMiembro = $nombreMiembro;\n $miembro->apellido1Miembro = $apellido1Miembro;\n $miembro->apellido2Miembro = $apellido2Miembro;\n $miembro->correo = $correo;\n $miembro->contrasenna = $contrasenna;\n $miembro->rol = $rol;\n \n $miembro->save();\n }", "public function user_add()\n\t{\n\t\t$data = array( 'isi' \t=> 'admin/user/v_user_add',\n\t\t\t\t\t\t'nav'\t=>\t'admin/nav',\n\t\t\t\t\t\t'title' => 'Tampil Dashboard Admin');\n\t\t$this->load->view('layout/wrapper',$data);\n\t}", "public function add(){\n\t\t$nama = $_POST['nama_sekolah'];\n\t\t$lati = $_POST['latitude'];\n\t\t$longi = $_POST['longitude'];\n\t\t$alamat = $_POST['alamat'];\n\n\t\t$data['nama_sekolah'] = $nama;\n\t\t$data['latitude'] = $lati;\n\t\t$data['longitude'] = $longi;\n\t\t$data['alamat'] = $alamat;\n\n\t\t$this->m_sekolah->addData($data);\n\t\tredirect('Welcome/index');\n\t}", "function get_add_movilidad($post){\n\t$Id_tienda = $this->session->userdata('Id_tienda');\n\t\t$data=array(\n\t\t\t'Id_movilidad'=>'',\n\t\t\t'Placa'=>$post['placa'],\n\t\t\t'Estado'=>1,\n\t\t\t'Id_tienda'=>$Id_tienda\n\t\t);\n\t\t\n\t\t$this->db->insert('jam_movilidad',$data);\n\t}", "public function createPost(){\n \t//di chuyen den url: /admin/users/read\n if($this->model->modelCreate())\n //di chuyen den url\n return redirect(\"admin/users\");\n else{\n Session::flash(\"error\",\"email da ton tai\");\n return redirect(\"admin/users/addUser\")->withInput();\n }\n }", "function add($nombre,$correo){\n\t\tglobal $conn;\n\t\t//$sql = \"INSERT INTO usuario (nombre,correo) VALUES ('$nombre','$correo')\";\n\t\t$stmt = $conn->prepare('INSERT INTO user (email,nombre) VALUES ( :email,:password)');\n\t\t//$stmt->bindParam(':nombre', $nombre);\n\t\t$stmt->bindParam(':email', $nombre);\n\t\t$stmt->bindParam(':password', $correo);\n\t\t$stmt->execute();\n\t\t//$conn->query($sql);\n\t}", "static function addUser(){\n\n $controller = new UserController();\n $validation = $controller->signupValid();\n\n if($validation === \"OK\"){\n $base = new ConnexionDb;\n\n $base->query(\"INSERT INTO user(username, firstname, email, pass, valid)\n VALUES (:username, :firstname, :email, :pass, 1)\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR),\n array('firstname',$_POST['firstname'],\\PDO::PARAM_STR),\n array('email',$_POST['email'],\\PDO::PARAM_STR),\n array('pass',$_POST['pass'],\\PDO::PARAM_STR)\n )\n );\n // $userM = new User($_POST);\n\n }else{\n echo 'erreur d\\'inscription';\n }\n }", "public function add() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['password'] = AuthComponent::password($this->request->data['User']['password']);\n\t\t\tif ($this->User->save($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('The user has been saved'));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t} else {\n\t\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t\t$lookupSupported = isset($queryURL) && \"\" <> $queryURL;\r\n\t\t\t$this->set('lookupSupported', $lookupSupported);\n\t\t\t$this->set('userType', $user['User']['type']);\n\t\t}\n\t}", "public function store(Request $request)\n {\n // dd($request->all());\n $this->validate($request, [\n 'matiere_id' => 'required',\n 'professeur_id'=>'required',\n 'school_id' => 'required',\n //'professeur_id'=>'required'\n ]);\n\n\n $professeur = User::findOrFail($request->professeur_id);\n\n $matiere = Matiere::findOrFail($request->matiere_id);\n\n $professeur->matieres()->attach($matiere->id);\n \n flash('success')->success();\n\n return redirect()->route('professeursMatieres.index');\n\n\n }", "function postAdd($request){\r\n global $context;\r\n $data= new $this->model;\r\n foreach($data->fields as $key=>$field){\r\n if($field['type']!='One2many' && $field['type']!='Many2many' ){\r\n $data->data[$key]=$request->post[$key];\r\n }\r\n }\r\n\r\n if(!$data->insert()){\r\n if($request->isAjax()) return json_error($data->error);\r\n throw new \\Exception($data->error);\r\n }\r\n if($request->isAjax()) return json_success(\"Save Success !!\".$data->error,$data);\r\n\r\n\r\n redirectTo($context->controller_path.\"/all\");\r\n }", "public function nuevo() {\n\n /* Si NO esta autenticado redirecciona a auth */\n if (!$this->ion_auth->logged_in()) {\n\n redirect('auth', 'refresh');\n }\n \n \n\n $this->load->library('form_validation');\n\n if ($this->form_validation->run('clientes')) {\n\n $data = $this->clientes->add();\n\n $index = array();\n\n $index['id'] = $data['id_cliente'];\n\n $index['type'] = \"clientes\";\n\n $this->session->set_flashdata('message', custom_lang('sima_client_created_message', 'Cliente creado correctamente'));\n\n redirect('clientes/index');\n } else {\n\n\n $data = array();\n\n $data['tipo_identificacion'] = $this->clientes->get_tipo_identificacion();\n\n $data['pais'] = $this->clientes->get_pais();\n $data['grupo'] = $this->grupo->getAll();\n $data_empresa = $this->miempresa->get_data_empresa();\n $data[\"tipo_negocio\"] = $data_empresa['data']['tipo_negocio']; \n $this->layout->template('member')->show('clientes/nuevo', array('data' => $data));\n }\n }", "function add() {\n $this->layout = \"no_header\";\n if (!empty($this->data)) {\n if ($this->User->save($this->data)) {\n $this->Session->setFlash(\"Your account has been created successfully\");\n $this->go_back(\"login\");\n }\n }\n }", "public function p_add() {\n $_POST['user_id'] = $this->user->user_id;\n\n # Unix timestamp of when this post was created / modified\n $_POST['created'] = Time::now();\n $_POST['modified'] = Time::now();\n\n\n # Insert\n # Note we didn't have to sanitize any of the $_POST data because we're using the insert method which does it for us\n DB::instance(DB_NAME)->insert('activities', $_POST);\n\n # Send them back to home page\n Router::redirect('/activities/index');\n\n }", "function insert(){\n //Declarar variables para recibir los datos del formuario nuevo\n $nombre=$_POST['nombre'];\n $apellido=$_POST['apellido'];\n $telefono=$_POST['telefono'];\n\n $this->model->insert(['nombre'=>$nombre,'apellido'=>$apellido,'telefono'=>$telefono]);\n $this->index();\n }", "public function addAction() {\n\t\t$this->view->addLayoutVar(\"onglet\", 2);\n\t\t$uid = Annuaire_User::getCurrentUserId();\n\t\t$this->view->title = t_('Add');\n\t\t$db = Gears_Db::getDb();\n\t\t$clients = Array();\n\t\t$result = $db->fetchAll(\"SELECT * FROM ANNUAIRE_SOCIETE WHERE USER_ID = ?\", Array($uid));\n\t\tforeach ($result as $info) {\n\t\t\t$clients[$info['SOCIETE_ID']][0] = $info['SOCIETE_ID'];\n\t\t\t$clients[$info['SOCIETE_ID']][1] = $info['SOCIETE_NOM'];\n\t\t}\n\t\t$this->view->clients = ($clients);\n\t\t$this->view->addcontact = t_(\"Add a contact\");\n\t\t$this->view->name = t_(\"Name\");\n\t\t$this->view->firstname = t_(\"First Name\");\n\t\t$this->view->address = t_(\"Address\");\n\t\t$this->view->mail = t_(\"Mail\");\n\t\t$this->view->phone = t_(\"Phone Number\");\n\t\t$this->view->cell = t_(\"Cellphone number\");\n\t\t$this->view->fax = t_(\"Fax\");\n\t\t$this->view->site = t_(\"Website\");\n\t\t$this->view->comment = t_(\"Comment\");\n\t\t$this->view->society = t_(\"Companie\");\n\t\t$this->view->none = t_(\"none\");\n\t\t$this->view->send = t_(\"Send\");\n\t\t$this->view->addsociety = t_(\"Add a companie\");\n\t\t$this->view->activity = t_(\"Activity\");\n\t}", "public function addAction() {\n $form = new JogoEmpresa_Form_JogoEmpresa();\n $model = new JogoEmpresa_Model_JogoEmpresa();\n $idJogo = $this->_getParam('idJogo');\n $idEmpresa = $this->_getParam('idEmpresa');\n if ($this->_request->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n $data = $form->getValues();\n if ($idJogo) {\n $db = $model->getAdapter();\n $where = $db->quoteInto('jog_codigo=?',$idJogo)\n . $db->quoteInto(' AND emp_codigo=?',$idEmpresa);\n $model->update($data, $where);\n } else {\n $model->insert($data);\n }\n $this->_redirect('/jogoEmpresa');\n }\n } elseif ($idJogo) {\n $data = $model->busca($idJogo,$idEmpresa);\n if (is_array($data)) {\n $form->setAction('/jogoEmpresa/index/add/idJogo/' . $idJogo . '/idEmpresa/' . $idEmpresa);\n $form->populate($data);\n }\n }\n $this->view->form = $form;\n }", "public function createAction()\n {\n $entity = new Titeur();\n $request = $this->getRequest();\n\t\t\t\t$user = $this->get('security.context')->getToken()->getUser();\n $form = $this->createForm(new TiteurType(), $entity, array('user' => $user));\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n\t\t\t\t\t\t$this->get('session')->set('titeur_id', $entity->getId());\n\t\t\t\t\t\t$this->get('session')->setFlash('notice', 'Titeur a été ajouté avec succès');\n\n return $this->redirect($this->generateUrl('enfant_new'));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function add_post(){\n $response = $this->PersonM->add_person(\n $this->post('name'),\n $this->post('hp'),\n $this->post('email'),\n $this->post('message')\n );\n $this->response($response);\n }", "function add()\n { \n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'descripcion' => $this->input->post('descripcion'),\n 'nombre' => $this->input->post('nombre'),\n );\n \n $estadousuario_id = $this->Estadousuario_model->add_estadousuario($params);\n redirect('estadousuario/index');\n }\n else\n { $this->load->view(\"header\",[\"title\"=>\"Registro estado\"]);\n $this->load->view('estadousuario/add');\n $this->load->view('footer');\n }\n }", "public function add()\n\t{\n\t\t// TODO\n\t\t// if(user has permissions){}\n\t\t$this -> loadModel('User');\n\t\tif($this -> request -> is('post') && !$this -> User -> exists($this -> request -> data['SgaPerson']['user_id']))\n\t\t{\n\t\t\t$this -> Session -> setFlash(\"Please select a valid JacketPages user to add.\");\n\t\t\t$this -> redirect(array('action' => 'index',$id));\n\t\t}\n\t\t$this -> loadModel('User');\n\t\tif ($this -> request -> is('post'))\n\t\t{\n\t\t\t$this -> SgaPerson -> create();\n\t\t\tif ($this -> SgaPerson -> save($this -> data))\n\t\t\t{\n\t\t\t\t$user = $this -> User -> read(null, $this -> data['SgaPerson']['user_id']);\n\t\t\t\t$this -> User -> set('level', 'sga_user');\n\t\t\t\t$this -> User -> set('sga_id', $this -> SgaPerson -> getInsertID());\n\t\t\t\t$this -> User -> save();\n\t\t\t\t$this -> Session -> setFlash(__('The user has been added to SGA.', true));\n\t\t\t\t$this -> redirect(array('action' => 'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this -> Session -> setFlash(__('Invalid user. User may already be assigned a role in SGA. Please try again.', true));\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.73490244", "0.6996486", "0.67863035", "0.67594904", "0.6687043", "0.6593787", "0.65594697", "0.6516573", "0.6493912", "0.64913505", "0.6476363", "0.64708674", "0.6396816", "0.63455445", "0.63368696", "0.6277763", "0.6256368", "0.6238567", "0.6175691", "0.6147944", "0.6109554", "0.6107172", "0.6096277", "0.60947514", "0.6072273", "0.6069374", "0.60574263", "0.60120815", "0.6009598", "0.598856", "0.59873366", "0.5987212", "0.59806067", "0.5976745", "0.5958336", "0.5953061", "0.59503406", "0.59444153", "0.59443283", "0.5942349", "0.5936447", "0.592873", "0.5924991", "0.591932", "0.5917082", "0.59160876", "0.59102124", "0.5909148", "0.5905945", "0.5898064", "0.5897572", "0.589745", "0.5887155", "0.58815026", "0.5876411", "0.5870115", "0.58623374", "0.5860169", "0.5851283", "0.58503515", "0.5849323", "0.58487326", "0.5845528", "0.5839962", "0.58364516", "0.5836064", "0.5835355", "0.5831011", "0.5828898", "0.58288145", "0.5823841", "0.5822774", "0.5818648", "0.58171535", "0.58148235", "0.5807028", "0.5799433", "0.5788815", "0.5784627", "0.578362", "0.5783155", "0.5779736", "0.57756937", "0.577335", "0.576813", "0.5767043", "0.5756272", "0.57545394", "0.57534724", "0.57521635", "0.574909", "0.5747554", "0.5744805", "0.57447505", "0.57430774", "0.5742756", "0.57381725", "0.5735221", "0.57327384", "0.5730366", "0.57297623" ]
0.0
-1
/ page mobilisateur/listmobilisateur liste des mobilisateurs
public function listmobilisateurAction() { $sessionmembre = new Zend_Session_Namespace('membre'); //$this->_helper->layout->disableLayout(); $this->_helper->layout()->setLayout('layoutpublicesmcperso'); if (!isset($sessionmembre->code_membre)) { $this->_redirect('/'); } $mobilisateur = new Application_Model_EuMobilisateurMapper(); $this->view->entries = $mobilisateur->fetchAllByMembre($sessionmembre->code_membre); $this->view->tabletri = 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "public function listMembres() {\n\t\t$membreManager = $this->membreManager;\n\t\t$membres = $membreManager->listMembres();\n\t\t$success = ( isset( $_SESSION['success'] ) ? $_SESSION['success'] : null );\n\t\t$error = ( isset( $_SESSION['error'] ) ? $_SESSION['error'] : null );\n\t\t$myView = new View( 'listmembres' );\n\t\t$myView->renderView( array( 'membres' => $membres, 'success' => $success, 'error' => $error ) );\n\t}", "public function actionMultaList()\n {\n $data = [];\n $objectUser = Multas::getInstancia();\n $users = $objectUser->getAllMultas();\n\n $this->renderHtml('../views/listMultas_view.php', $users);\n }", "function listuser(){\n\t\t\tif(!empty($_GET['paginado'])){\n\t\t\t\t$pag = $_GET['paginado'];\n\t\t\t\t$list = $this -> model -> selectuser($pag);\n\t\t\t}else{\n\t\t\t\t$list = $this -> model -> selectuser();\n\t\t\t}\n\t\t\t$this -> ajax_set($list);\n\t\t}", "public function membres()\n {\n $this->membres = $this->Member->list($_SESSION['guild_id']);\n }", "public function get_list() {\r\n try {\r\n $limit = $this->getSafe('limit', $this->app->appConf->page_size);\r\n $page_number = $this->getSafe('page_number', 1);\r\n $where = $this->getSafe('where', '');\r\n $order_by = $this->getSafe('order_by', '');\r\n $keywords = $this->getSafe('keywords', '');\r\n \r\n $page_number = empty($page_number) ? 1 : $page_number;\r\n \r\n $start_index = ($page_number -1) * $limit;\r\n \r\n $db = $this->app->getDbo();\r\n \r\n $search = '';\r\n \r\n if (!empty($keywords)) {\r\n $keywords = $db->quote('%' . $keywords . '%');\r\n // search theo email\r\n $search .= $db->quoteName('email') . ' LIKE ' . $keywords;\r\n // search theo mobile\r\n $search .= ' OR ' . $db->quoteName('mobile') . ' LIKE ' . $keywords;\r\n // search theo display_name\r\n $search .= ' OR ' . $db->quoteName('display_name') . ' COLLATE utf8_general_ci LIKE ' . $keywords;\r\n }\r\n \r\n if (!empty ($where)) {\r\n if (!empty ($search)) {\r\n $where = ' AND (' . $search . ')';\r\n }\r\n } else {\r\n $where = $search;\r\n }\r\n \r\n $data = array (\r\n 'limit' => $limit,\r\n 'start_index' => $start_index,\r\n 'order_by' => $order_by,\r\n 'where' => $where\r\n );\r\n \r\n $user_list = $this->user_model->get_list($data);\r\n \r\n $total_user_list = $this->user_model->get_list_total($where);\r\n \r\n $ret = array (\r\n 'users' => $user_list,\r\n 'total' => $total_user_list\r\n );\r\n \r\n $this->renderJson($ret);\r\n \r\n } catch (Exception $ex) {\r\n $this->app->write_log('user_get_list_exception - ' . $ex->getMessage());\r\n \r\n $ret = $this->message(1, 'user_get_list_exception', EXCEPTION_ERROR_MESSAGE);\r\n $this->renderJson($ret);\r\n }\r\n }", "function mentor_list($limit='',$start=0,$condition='')\n{\n\tglobal $DB;\n\t$sql =\"SELECT u.id,u.firstname,u.lastname,u.email,u.city,u.picture,u.department FROM {user} u left join {user_info_data} ud on ud.userid=u.id \";\n\t$sql.=\"WHERE ud.data='mentor data' and ud.acceptterms=1 and u.deleted=0 $condition order by u.timemodified desc limit $start,$limit\";\n\t//echo $sql;die;\n\t$result = $DB->get_records_sql($sql);\n\tif(count($result)>0){\n\t\tforeach($result as $mentordata)\n\t\t{\n\t\t\t$user = new stdClass();\n\t\t\t$user->id = $mentordata->id;\n\t\t\t//$picture = get_userprofilepic($user);\n\t\t\t$userurl = getuser_profilelink($user->id);\n\t\t\t$usrimg = get_userprofilepic($user);\n\t\t\t$picture ='<div class=\"left picture\"><a href=\"'.$userurl.'\" >'.$usrimg.'</a></div>'; \n\t\t\t$mentordata->picture = $picture;\n\t\t}\n\t}\n\treturn $result;\n}", "public function pagelisteMembre(){\n \n $userModel = new User();\n $lisAllUser = $userModel->getAllUser(bdd::GetInstance());\n\n //Récupération du rôle du compte\n $role = UserController::roleNeed();\n $isConnected = 1;\n\n return $this->twig->render('Dashboard/listeMembre.html.twig',[\n 'allContact'=> $lisAllUser,\n 'role'=>$role,\n 'isConnected' => $isConnected\n ]);\n\n }", "public function lst(){\n\t\t$args = $this->getArgs();\n\t\t$uid = $_SESSION[\"user\"][\"uid\"];\n\t\t$base_url = substr($_SERVER[\"REQUEST_URI\"], 0, strrpos($_SERVER[\"REQUEST_URI\"], \"/\") + 1);\n\t\t$header = array(\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_ID)),\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_EMAIL)),\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_FNAME)),\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_LNAME)),\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_PHONE))\n\t\t);\n\t\t\n\t\t$config = array(\n\t\t\t\t\"config\" => array(\n\t\t\t\t\t\t\"page\" => (isset($args[\"GET\"][\"page\"]) ? $args[\"GET\"][\"page\"] : System::PAGE_ACTUAL_DEFAULT),\n\t\t\t\t\t\t\"column\" => (isset($args[\"GET\"][\"column\"]) ? $args[\"GET\"][\"column\"] : System::SORT_DEFAULT_COLUMN),\n\t\t\t\t\t\t\"direction\" => (isset($args[\"GET\"][\"direction\"]) ? $args[\"GET\"][\"direction\"] : System::SORT_DES),\n\t\t\t\t\t\t\"actual_pagesize\" => (isset($_SESSION[\"page_size\"]) ? $_SESSION[\"page_size\"] : System::PAGE_SIZE_DEFAULT),\n\t\t\t\t\t\t\"data_count\" => $this->getModel()->getCountUserList(),\n\t\t\t\t\t\t\"disable_menu\" => true,\n\t\t\t\t\t\t\"disable_select\" => true,\n\t\t\t\t\t\t\"disable_pagging\" => false,\n\t\t\t\t\t\t\"disable_set_pagesize\" => false\n\t\t\t\t),\n\t\t\t\t\"form_url\" => array(\n\t\t\t\t\t\t\"page\" => $base_url . \"-%d-%d-%s\",\n\t\t\t\t\t\t\"header_sort\" => $base_url . \"-%d-%d-%s\",\n\t\t\t\t\t\t\"form_action\" => $base_url\n\t\t\t\t),\n\t\t\t\t\"item_menu\" => array(),\n\t\t\t\t\"select_item_action\" => array(),\n\t\t\t\t\"style\" => array(\n\t\t\t\t\t\t\"marked_row_class\" => \"marked\",\n\t\t\t\t\t\t\"count_box_class\" => \"count_box\",\n\t\t\t\t\t\t\"pagging_box_class\" => \"pagging_box\",\n\t\t\t\t\t\t\"actual_page_class\" => \"actual_page\",\n\t\t\t\t\t\t\"table_header_class\" => \"head\",\n\t\t\t\t\t\t\"table_id\" => \"user_lst\",\n\t\t\t\t\t\t\"select_form_id\" => \"\",\n\t\t\t\t\t\t\"pagesize_form_id\" => \"pagesize_box\",\n\t\t\t\t\t\t\"list_footer_id\" => \"\"\n\t\t\t\t)\n\t\t);\n\t\t$data = $this->getModel()->getUserList($config[\"config\"][\"page\"], $config[\"config\"][\"actual_pagesize\"], $config[\"config\"][\"column\"], $config[\"config\"][\"direction\"], $config[\"config\"][\"disable_pagging\"]);\n\t\t$out = Paginator::generatePage($header, $data, $config);\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "public function listar()\n {\n return $this->request('GET', 'unidadesmedida');\n }", "public function list_user()\n\t{\n\t\tcheck_access_level_superuser();\n\t\t$data = [\n\t\t\t'list_user' => $this->user_m->get_cabang(),\n\t\t\t'list_cabang' => $this->data_m->get('tb_cabang')\n\t\t];\n\t\t$this->template->load('template2', 'user/list_user', $data);\n\t}", "public function userlist()\n\t{\n\t\t$data['page']='Userlist';\n\t\t$data['users_list']=$this->users->get_many_by('userlevel_id',2);\n\t\t$view = 'admin/userlist/admin_userlist_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "function user_list()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '运营人员列表';\n $this->global['pageName'] = 'userlist';\n\n $data['searchType'] = '0';\n $data['searchName'] = '';\n\n $this->loadViews(\"user_manage/users\", $this->global, $data, NULL);\n }\n }", "public function utilisateurListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Utilisateur\");//type array\n\t}", "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 suppmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if ($id > 0) {\n\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->delete($id);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function liste(){\n $clientMdb = new clientMoralRepository();\n \n $data['clientsM'] = $clientMdb->liste();\n return $this->view->load(\"clientMoral/liste\", $data);\n }", "public function lista() { // 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('user_contact', $dados);\n }else { $this->loadTemplate('users_list', $dados);\n }\n }", "public function listobjetuserAction()\n {\n $user = $this->getUser();\n\n $em = $this->getDoctrine()->getManager();\n\n $objets = $em->getRepository('AppBundle:Objet')->findBy(['user'=>$user], array('date' => 'desc'));\n $contacdejaenvoyer=$this->getDoctrine()->getManager()->getRepository('AppBundle:Contact')->findAll();\n\n\n return $this->render(':objet:listobjetutilisateur.html.twig', array(\n 'objets' => $objets,\n 'contactdejaenvoyer'=>$contacdejaenvoyer,\n 'user'=>$user,\n ));\n }", "public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\t\t$tUsers = model_user::getInstance()->findAll();\n\n\t\t$oView = new _view('users::list');\n\t\t$oView->tUsers = $tUsers;\n\t\t$oView->showGroup = true;\n\t\t$oView->title = 'Tous les utilisateurs';\n\n\t\t$this->oLayout->add('work', $oView);\n\t}", "public function mylistAction() {\n $em = $this->container->get('doctrine')->getEntityManager();\n\n // appel du gestionnaire d'entites de FOSUserBundle permettant de manipuler nos objets (persistance, etc.)\n $userManager = $this->container->get('fos_user.user_manager');\n // recuperation du user connecte\n $user = $userManager->findUserByUsername($this->container->get('security.context')->getToken()->getUser());\n\n // recuperation de tous les votes de reves\n $voteDreams = $em->getRepository('DreamsDreamBundle:VoteDream')->findAll();\n\n // recuperation uniquement des reves du user connecte\n $dreams = $em->getRepository('DreamsDreamBundle:Dream')->getUserDreams($user);\n\n $paginator = $this->container->get('knp_paginator');\n $pagination = $paginator->paginate(\n $dreams,\n $this->container->get('request')->query->get('page', 1)/*page number*/,\n 5/*limit per page*/\n );\n\n // affichage du template mylist.html.twig avec les reves du user connecte en parametres\n return $this->container->get('templating')->renderResponse(\n 'DreamsDreamBundle:Dream:mylist.html.twig',\n array(\n 'pagination' => $pagination,\n 'voteDreams' => $voteDreams\n ));\n }", "public function etatmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function get_lists_meta( $user_id, $page, $list, $un, $limit=NULL ) {\n \n if ( $un == 1 ) {\n \n $args = ['user_id' => $user_id, 'list_id' => $list, 'active' => 0];\n \n } else {\n \n $args = ['user_id' => $user_id, 'list_id' => $list];\n \n }\n \n if ( $un == 3 ) {\n \n $this->db->select('lists_meta.meta_id,networks.network_id,networks.expires,networks.network_name,networks.user_id,networks.user_name');\n $this->db->from('lists_meta');\n $this->db->join('networks', 'lists_meta.body=networks.network_id', 'left');\n $this->db->where(['lists_meta.user_id' => $user_id, 'lists_meta.list_id' => $list, 'networks.user_id' => $user_id]);\n $this->db->order_by('lists_meta.meta_id', 'desc');\n \n } else if ( $un == 4 ) {\n \n $this->db->select('lists_meta.meta_id,networks.network_id,networks.expires,networks.network_name,networks.user_id,networks.user_name');\n $this->db->from('lists_meta');\n $this->db->join('networks', 'lists_meta.body=networks.network_id', 'left');\n $this->db->like(['lists_meta.user_id' => $user_id, 'lists_meta.list_id' => $list, 'user_name' => $limit]);\n $this->db->order_by('lists_meta.meta_id', 'desc');\n \n } else {\n \n $this->db->select('*');\n $this->db->from('lists_meta');\n $this->db->where($args);\n $this->db->order_by('meta_id', 'desc');\n \n }\n \n if ( $limit || ( $un == 3 ) || ( $un == 4 ) ) {\n \n $this->db->limit($limit, $page);\n \n $query = $this->db->get();\n \n if ( $query->num_rows() > 0 ) {\n \n $result = $query->result();\n return $result;\n \n } else {\n \n return false;\n \n }\n \n } else {\n \n $query = $this->db->get();\n return $query->num_rows();\n \n }\n \n }", "public function display_all()\n {\n if ( ! file_exists(APPPATH.'views/pages/list.php'))\n {\n // Whoops, we don't have a page for that!\n show_404();\n }\n if (!isset($this->session->userdata['user_role']) || $this->session->userdata['user_role'] < 40)\n {\n $this->session->set_flashdata('message', 'Vous devez avoir les droits de superviseur');\n redirect($_SERVER['HTTP_REFERER']); \n } \n \n $data['title'] = 'Liste des Membres'; // Capitalize the first letter\n $data['membres'] = $this->member_model->get_member();\n\n // breadcrumb\n $data['breadcrumbs'] = $this->breadcrumbs('liste');\n \n $this->load->template('pages/list_members',$data);\n }", "public function meList( )\n\t{\n\t\t$userId = $this->getCurrentUserId();\n\t\treturn $this->adminListByUser($userId);\n\t}", "function listarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_sel';\n\t\t$this->transaccion='GEM_GEMETO_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_metodologia','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function listAction(){\n $r=$this->getRequest();\n $query=Doctrine_Query::create()\n ->select(\"uo.orgid, u.ID, u.nome,u.cognome,u.user,u.active,u.data_iscrizione,r.role\")\n ->from(\"Users u\")\n ->leftJoin(\"u.Role r\")\n ->leftJoin(\"u.UsersOrganizations uo\")\n ->where(\"uo.orgid=\".$r->getParam('orgid'))\n ->addWhere(\"uo.active=\".Constants::UTENTE_ATTIVO);\n list($users,$total)=DBUtils::pageQuery($query,array(),$this->getLimit(),$this->getOffset());\n $this->emitTableResult($users,$total);\n }", "public function getAllMobile(){\n\t\treturn $this->mobiles;\n\t}", "function modele_get_liste_user() {\n\n\t\t$req = 'SELECT * FROM p_user ';\n\n\t\t$reqPrep = self::$connexion->prepare($req);\n\n\t\t$reqPrep->execute();\n\n\t\t$enregistrement = $reqPrep->fetchall(PDO::FETCH_ASSOC);\n\n\t\treturn $enregistrement;\n\t}", "public static function getlist(){\n $sql = new Sql();\n \n return $sql->select(\"SELECT * FROM tb_usuarios ORDER BY deslogin\");\n }", "public function listadoUnidadmedida(){\n \n\t\t$data= $this->Model_maestras->BuscarUmedida();\n\t\n\t\techo($data); \n\t \n\n\t}", "public function all_londontec_users(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/viewusers';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'londontec LMS users lists',\n\t\t\t'userslist' => $this->setting_model->Get_All('londontec_users'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\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 }", "public function getUsersList()\n {\n }", "function mentors(){\n $uid = $this->session->userdata('user_id');\n // Login verification and user stats update\n if ($this->socialkit->SK_isLogged()) {\n $data['title'] = 'List of Mentors';\n $data['mentorSuggestions'] = $this->model_user->getUserMentorshipSuggestions($uid);\n $this->load->view('user/mentors', $data);\n } else {\n redirect(base_url('login').'?url='.base64_encode(uri_string()));\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 listeuserAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $users = $em->getRepository('FrontBundle:user')->findAll();\n\n return $this->render('FrontBundle::Admin/listeutilisateur.html.twig', array(\n 'users' => $users,\n ));\n }", "function listerUtilisateur()\n\t{\n\t\t$req=\"select idUti, nomUti, prenomUti, photoUti, telPorUti, mailUti, statutUti from utilisateur\";\n\t\t$exereq = mysql_query($req) or die(mysql_error());\n\t\n\t\twhile($ligne=mysql_fetch_array($exereq))\n\t\t{\n\t\t\t$tab[]=$ligne;\n\t\t}\n\n\t\treturn $tab;\n\t}", "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 user_list()\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$this->load->model('User_Profiles', 'up');\n\t\t\t$data['users'] = $this->up->get_all_users();\n\t\t\t$this->load->view('user_list-admin',$data);\n\t\t}", "public function userlistAction()\n\t{\n\t\t$users = $this->userService->getUserList(array(), false);\n\n\t\t$this->view->roles = za()->getUser()->getAvailableRoles();\n\t\t$this->view->users = $users;\n\t\t$this->renderView('admin/user-list.php');\n\t}", "public function action_listar() {\r\n $auth = Auth::instance();\r\n if ($auth->logged_in()) {\r\n $oNuri = New Model_Asignados();\r\n $count = $oNuri->count($auth->get_user());\r\n //$count2= $oNuri->count2($auth->get_user()); \r\n if ($count) {\r\n // echo $oNuri->count2($auth->get_user());\r\n $pagination = Pagination::factory(array(\r\n 'total_items' => $count,\r\n 'current_page' => array('source' => 'query_string', 'key' => 'page'),\r\n 'items_per_page' => 40,\r\n 'view' => 'pagination/floating',\r\n ));\r\n $result = $oNuri->nuris($auth->get_user(), $pagination->offset, $pagination->items_per_page);\r\n $page_links = $pagination->render();\r\n $this->template->title = 'Hojas de Seguimiento';\r\n $this->template->styles = array('media/css/tablas.css' => 'screen');\r\n $this->template->content = View::factory('nur/listar')\r\n ->bind('result', $result)\r\n ->bind('page_links', $page_links);\r\n } else {\r\n $this->template->content = View::factory('errors/general');\r\n }\r\n } else {\r\n $this->request->redirect('login');\r\n }\r\n }", "public function user_lists(){\n return get_instance()->ecl('Instance')->mod('lists', 'user_lists', [get_instance()->ecl('Instance')->user(),'email']);\n }", "public function userlist()\n {\n $users = array('users' => UserModel::getPublicProfilesOfAllUsers(),'dynatable'=>'userlist');\n $this->View->render('user/userlist',$users);\n }", "public static function getList(){\n\t\t\t$sql = new sql();\n\n\t\t\treturn $sql->select(\"SELECT * FROM tb_usuarios ORDER BY deslogim\");\n\t\t}", "public function getPartinUsersList(){\n return $this->_get(2);\n }", "public function adminMessageList()\n {\n\n $users=[];\n $em = $this->getDoctrine()->getManager();\n $messageRepository = $em->getRepository(Message::class);\n $userRepository = $em->getRepository(User::class);\n\n $Ids = $messageRepository->findByDistinct();\n foreach ($Ids as $id)\n {\n $users[] = $userRepository->findOneBy(array('id'=>$id));\n }\n return $this->render(\"admin/message/list.html.twig\",\n array(\n 'users' => $users,\n ));\n }", "function get_user_list(){\n\t\treturn array();\n\t}", "public function userList(){\n $this->db->select(\"ui.user_id,\n CONCAT(ui.lname, ', ' ,ui.fname, ' ', ui.mname) name, u.user_type,\n ui.fname f_name,ui.lname l_name, ui.mname m_name , ui.email, \n u.username, u.password, uat.article_type_id, at.type article_type\n \")\n ->from(\"tbl_user_info ui\")\n ->join(\"tbl_user u\",\"ON u.id = ui.user_id\",\"inner\")\n ->join(\"tbl_user_article_type uat\",\"ON uat.user_id = ui.user_id\",\"left\")\n ->join(\"tbl_article_type at\",\"ON at.id = uat.article_type_id\",\"left\");\n $this->db->where(\"u.status\", \"saved\");\n $this->db->order_by(\"ui.lname\");\n $query = $this->db->get();\n \n foreach($query->result() as $each){\n $each->password = $this->encryptpass->pass_crypt($each->password, 'd');\n }\n\n return $query->result();\n }", "function listUsers()\n{\n require_once($_SERVER[\"DOCUMENT_ROOT\"].\"/config/config.php\");\n require_once($_SERVER[\"DOCUMENT_ROOT\"].\"/class/autoload.php\");\n require_once($_SERVER[\"DOCUMENT_ROOT\"].\"/vendor/autoload.php\");\n $db = new cMariaDb($Cfg);\n\n // Generateur de templates\n $tpl = new Smarty();\n $tpl->template_dir = $_SERVER[\"DOCUMENT_ROOT\"].\"/tools/templates\";\n $tpl->compile_dir = $_SERVER[\"DOCUMENT_ROOT\"].\"/templates_c\";\n\n $sSQL = \"SELECT id, sNom, sPrenom, sEmail, sTelMobile, sLogin FROM sys_user WHERE bActive=1 ORDER BY sNom, sPrenom;\";\n\n // Récupérer les éléments \n $tpl->assign(\"Users\",$db->getAllFetch($sSQL));\n $sHtml = $tpl->fetch(\"editUsers.smarty\");\n return [\"Errno\" => 0, \"html\" => $sHtml ];\n}", "public function GetAllUnite() {\n if ($this->get_request_method() != \"GET\") {\n $this->response('', 406);\n }\n\n $sql = $this->db->prepare(\"SELECT * FROM unite\");\n $sql->execute();\n if ($sql->rowCount() > 0) {\n $result = array();\n while ($rlt = $sql->fetchAll()) {\n $result[] = $rlt;\n }\n // If success everythig is good send header as \"OK\" and return list of users in JSON format\n $this->response($this->json($result[0]), 200);\n }\n $this->response('', 204); // If no records \"No Content\" status\n }", "public function display_all_supervisor()\n {\n \n if ( ! file_exists(APPPATH.'views/pages/list.php'))\n {\n // Whoops, we don't have a page for that!\n show_404();\n }\n if (!isset($this->session->userdata['user_role']) || $this->session->userdata['user_role'] < 50)\n {\n $this->session->set_flashdata('message', 'Vous devez avoir les droits d\\'administrateur');\n redirect($_SERVER['HTTP_REFERER']); \n } \n \n $data['title'] = 'Liste des superviseurs'; // Capitalize the first letter\n $data['membres'] = $this->member_model->get_by_type('name = \"Superviseur\"');\n \n // breadcrumb\n $data['breadcrumbs'] = $this->breadcrumbs('liste');\n \n $this->load->template('pages/list_members',$data);\n }", "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 }", "public function getList(){\n if ($this->request->isAJAX()) {\n $M_User = new M_User();\n $data = array();\n $data['data'] = $M_User->getAll(TRUE);\n }\n else {\n $data['status'] = \"Forbidden access : Not an AJAX request\";\n }\n return json_encode($data);\n }", "protected function getUserList() {\n\t$controller = new ChatMySQLDAO();\n\tif(!isset($_SESSION['username'])) {\n\t return;\n\t}\n\t$users = $controller->getUserList($_SESSION['username']);\n\t$data = array();\n\t$i = 0;\n\tforeach ($users as $user) {\n\t $data[$i++] = $user['user_name'];\n\t}\n\treturn $data;\n }", "public function index()\n {\n $this->user_list();\n }", "public function admin_user_list() {\n $this->paginate = array(\n 'limit' => 10,\n 'order' => array('User.created' => 'desc' ),\n 'conditions' => array('User.status' => 1),\n );\n $data = $this->paginate('User');\n $this->set('user', $data);\n $this->render('/Users/user_list');\n }", "public function mlist()\n\t{\n\t\t// init params\n $params = array();\n $limit_per_page = 10;\n $page = ($this->uri->segment(4)) ? ($this->uri->segment(4) - 1) : 0;\n $total_records = $this->Mentor_model->get_mentor_total();\n if ($total_records > 0)\n {\n // get current page records\n $params[\"results\"] = $this->Mentor_model->get_mentor_page_records($limit_per_page, $page*$limit_per_page);\n $config['base_url'] = base_url() . 'admin/mentor/mlist';\n $config['total_rows'] = $total_records;\n $config['per_page'] = $limit_per_page;\n $config[\"uri_segment\"] = 4;\n // custom paging configuration\n $config['num_links'] = 2;\n $config['use_page_numbers'] = TRUE;\n $config['reuse_query_string'] = TRUE;\n \n $config['full_tag_open'] = '<div class=\"pagination\">';\n $config['full_tag_close'] = '</div>';\n \n $this->pagination->initialize($config);\n \n // build paging links\n $params[\"links\"] = $this->pagination->create_links();\n }\n\t\t$this->template->load('admin/layout/admin_tpl','admin/mentor/list',$params);\n\t}", "public function index()\n {\n $users = (new User)->findAll();\n $title = 'Liste des membres';\n\n $data = compact('title', 'users');\n\n return $this->view('user/list', $data);\n\t}", "function AllMembres(){\n return $this->db->get($this->membre)->result();\n }", "public function index()\n {\n $lists=UserModel::find(\\Auth::user()->id)->lists()->paginate(5);//постраничный вывод paginate\n return view('lists.index',['lists'=>$lists]);\n //return view('lists.index',['lists'=>ListModel::all()]);//передаем все листы\n }", "public function listUser() {\n\t\t$users = new Model_Users();\n\t\t$listeUsers = $users->listUsers();\n\t\trequire_once($_SERVER['DOCUMENT_ROOT'].\"/ecommerce/views/admin/users/liste_users.php\");\n\t}", "public function usersListAction()\n\t{\n\t\t$em = $this->getDoctrine()->getEntityManager();\n\n\t\t$users = $em->getRepository('McmsUserBundle:User')->findAll();\n\n\t\treturn array('users' => $users);\n\t}", "public function getList(){\n\t\t$model=new Model();\n\t\treturn $model->select(\"SELECT * FROM tb_usuarios ORDER BY idusuario\");\n\t}", "function user_index()\n\t{\n\t\t$contact = $this->contact_details();\n\t\t$credentials = $this->MailchimpCredential->first();\n\t\tif(!empty($credentials))\n\t\t{\n\t\t\t# Copy access_token\n\t\t\t# GET LIST FROM MAILCHIMP\n\t\t\t$lists = $this->Mailchimp->get(\"lists\");\n\n\t\t\t# ALWAYS MAKE SURE WE HAVE CORE LISTS\n\t\t\t$listNames = Set::extract($lists['lists'], \"{n}.name\");\n\n\n\t\t\t$missingListNames = array_diff($this->listNames,$listNames);\n\n\t\t\t# Create initial list.\n\t\t\tif(!empty($missingListNames))\n\t\t\t{\n\t\t\t\tforeach($missingListNames as $listName)\n\t\t\t\t{\n\t\t\t\t\t# Make 'Subscribers' default list (ie for subscribe form on homepage)\n\t\t\t\t\t$this->Mailchimp->create_list($listName,$contact);\n\n\t\t\t\t}\n\n\t\t\t\t$lists = $this->Mailchimp->get(\"lists\");\n\t\t\t}\n\n\t\t\t$subscribers = $list_names = array();\n\n\t\t\tforeach($lists['lists'] as $l)\n\t\t\t{\n\t\t\t\t$lid = $l['id'];\n\t\t\t\t$lname = $l['name'];\n\t\t\t\t#echo \"LID=$lid, LNAME=$lname\\n\";\n\t\t\t\t$list_names[$lid] = $lname;\n\t\t\t\t$list_totals[$lid] = $l['stats']['member_count'];\n\t\t\t\t$subscribers[$lid] = $this->Mailchimp->members($lid);\n\t\t\t}\n\n\t\t\t$this->set(\"lists\", $subscribers);\n\t\t\t$this->set(\"list_names\", $list_names);\n\t\t\t$this->set(\"list_totals\", $list_totals);\n\t\t}\n\t}", "public function getUsers()\n {\n $request = \"SELECT user.*, rank.name as rank_name FROM `user` join rank on user.rank = rank.id order by rank.id\";\n $request = $this->connexion->query($request);\n $newsList = $request->fetchAll(PDO::FETCH_ASSOC);\n // var_dump($newsList);\n return $newsList;\n }", "public function type_movie_list() {\n\n // Capa de Modelo, carga la data \n $data[\"types_movie\"] = $this->Type_movie->findAll();\n\n // Capa de la Vista\n $view['body'] = $this->load->view(\"core/types_movie/list\", $data, TRUE);\n $view['title'] = \"Listado de tipos de películas\";\n $this->parser->parse('core/templates/body', $view);\n }", "public function mooduplistAction()\n {\n $uid = $this->_USER_ID;\n $floorId = $this->getParam('CF_floorId');\n $storeType = $this->getParam(\"CF_storeType\");\n //chairId,oidMood from giveservice page\n $chairId = $this->getParam(\"CF_chairid\");\n $oldMood = $this->getParam(\"CF_oldMood\");\n\n $mbllApi = new Mbll_Tower_ServiceApi($uid);\n $aryRst = $mbllApi->getMoodUpList($floorId);\n $moodUpList = $aryRst['result'];\n\n if (!$aryRst) {\n $errParam = '-1';\n if (!empty($aryRst['errno'])) {\n $errParam = $aryRst['errno'];\n }\n return $this->_redirectErrorMsg($errParam);\n }\n\n\n if (!isset($moodUpList[22])) {\n $moodUpList[22]['id'] = 22;\n $moodUpList[22]['nm'] = 0;\n }\n if (!isset($moodUpList[23])) {\n $moodUpList[23]['id'] = 23;\n $moodUpList[23]['nm'] = 0;\n }\n if (!isset($moodUpList[24])) {\n $moodUpList[24]['id'] = 24;\n $moodUpList[24]['nm'] = 0;\n }\n\n if (!empty($moodUpList)) {\n foreach ($moodUpList as $key => $value) {\n $item = Mbll_Tower_ItemTpl::getItemDescription($value['id']);\n $moodUpList[$key]['name'] = $item['name'];\n $moodUpList[$key]['des'] = $item['desc'];\n\n if ($item['buy_mb'] > 0) {\n $moodUpList[$key]['money_type'] = 'm';\n }\n else if ($item['buy_gb'] > 0) {\n $moodUpList[$key]['money_type'] = 'g';\n }\n }\n }\n $this->view->moodUpList = $moodUpList;\n $this->view->floorId = $floorId;\n $this->view->chairId = $chairId;\n $this->view->storeType = $storeType;\n $this->view->oldMood = $oldMood;\n $this->render();\n }", "public function getList($user);", "public function userlist()\n {\n $filter = Param::get('filter');\n\n $current_page = max(Param::get('page'), SimplePagination::MIN_PAGE_NUM);\n $pagination = new SimplePagination($current_page, MAX_ITEM_DISPLAY);\n $users = User::filter($filter);\n $other_users = array_slice($users, $pagination->start_index + SimplePagination::MIN_PAGE_NUM);\n $pagination->checkLastPage($other_users);\n $page_links = createPageLinks(count($users), $current_page, $pagination->count, 'filter=' . $filter);\n $users = array_slice($users, $pagination->start_index -1, $pagination->count);\n \n $this->set(get_defined_vars());\n }", "public function 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 userList() {\n /** @var User[] $users */\n $users = $this->entityManager->getRepository(\"Entity\\\\User\")->findAll(); // Retrieve all User objects registered in database\n echo $this->twig->render('admin/lists/users.html.twig', ['users' => $users]);\n }", "function ulist_op()\n\t{\n\t\t$club_id = 0;\n\t\tif (isset($_REQUEST['club_id']))\n\t\t{\n\t\t\t$club_id = (int)$_REQUEST['club_id'];\n\t\t}\n\t\t\n\t\t$num = 0;\n\t\tif (isset($_REQUEST['num']))\n\t\t{\n\t\t\t$num = (int)$_REQUEST['num'];\n\t\t}\n\t\t\n\t\t$name = '';\n\t\tif (isset($_REQUEST['name']))\n\t\t{\n\t\t\t$name = $_REQUEST['name'];\n\t\t}\n\t\t\n\t\tarray();\n\t\tif (!empty($name))\n\t\t{\n\t\t\t$name_wildcard = '%' . $name . '%';\n\t\t\t$query = new DbQuery(\n\t\t\t\t'SELECT u.id, u.name as _name, NULL, u.flags, c.name FROM users u' .\n\t\t\t\t\t' LEFT OUTER JOIN clubs c ON c.id = u.club_id' .\n\t\t\t\t\t' WHERE (u.name LIKE ? OR u.email LIKE ?) AND (u.flags & ' . USER_FLAG_BANNED . ') = 0' .\n\t\t\t\t\t' UNION' .\n\t\t\t\t\t' SELECT DISTINCT u.id, u.name as _name, r.nick_name, u.flags, c.name FROM users u' .\n\t\t\t\t\t' LEFT OUTER JOIN clubs c ON c.id = u.club_id' .\n\t\t\t\t\t' JOIN registrations r ON r.user_id = u.id' .\n\t\t\t\t\t' WHERE r.nick_name <> u.name AND (u.flags & ' . USER_FLAG_BANNED . ') = 0 AND r.nick_name LIKE ? ORDER BY _name',\n\t\t\t\t$name_wildcard,\n\t\t\t\t$name_wildcard,\n\t\t\t\t$name_wildcard);\n\t\t}\n\t\telse if ($club_id > 0)\n\t\t{\n\t\t\t$query = new DbQuery('SELECT u.id, u.name, NULL, u.flags, c.name FROM users u JOIN user_clubs uc ON u.id = uc.user_id LEFT OUTER JOIN clubs c ON c.id = u.club_id WHERE uc.club_id = ? AND (uc.flags & ' . USER_CLUB_FLAG_BANNED . ') = 0 AND (u.flags & ' . USER_FLAG_BANNED . ') = 0 ORDER BY rating DESC', $club_id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = new DbQuery('SELECT u.id, u.name, NULL, u.flags, c.name FROM users u LEFT OUTER JOIN clubs c ON c.id = u.club_id WHERE (u.flags & ' . USER_FLAG_BANNED . ') = 0 ORDER BY rating DESC');\n\t\t}\n\t\t\n\t\tif ($num > 0)\n\t\t{\n\t\t\t$query->add(' LIMIT ' . $num);\n\t\t}\n\t\t\n\t\t$list = array();\n\t\twhile ($row = $query->next())\n\t\t{\n\t\t\tlist ($u_id, $u_name, $nick, $u_flags, $club_name) = $row;\n\t\t\t$p = new GPlayer($u_id, $u_name, $club_name, $u_flags, USER_CLUB_PERM_PLAYER);\n\t\t\tif ($nick != NULL && $nick != $u_name)\n\t\t\t{\n\t\t\t\t$p->nicks[$nick] = 1; \n\t\t\t}\n\t\t\t$list[] = $p;\n\t\t}\n\t\t$this->response['list'] = $list;\n\t}", "public function membresAction()\n {\n // Les modèles\n $model_types = new Model_DbTable_Type();\n $model_membres = new Model_DbTable_CommissionMembre();\n\n // On récupère les règles de la commission\n $this->view->array_membres = $model_membres->get($this->_request->id_commission);\n\n // On met le libellé du type dans le tableau des activités\n $types = $model_types->fetchAll()->toArray();\n $types_sort = [];\n\n foreach ($types as $_type) {\n $types_sort[$_type['ID_TYPE']] = $_type;\n }\n\n foreach ($this->view->array_membres as &$membre) {\n $type_sort = [];\n\n foreach ($membre['types'] as $type) {\n if (!array_key_exists($types_sort[$type['ID_TYPE']]['LIBELLE_TYPE'], $type_sort)) {\n $type_sort[$types_sort[$type['ID_TYPE']]['LIBELLE_TYPE']] = [];\n }\n\n $type_sort[$types_sort[$type['ID_TYPE']]['LIBELLE_TYPE']][] = $type;\n }\n\n $membre['types'] = $type_sort;\n }\n }", "public function index()\n {\n $this->data['immobilisations'] = Immobli::latest()\n ->crossJoin('departements')\n ->crossJoin('categories')->crossJoin('users')\n ->select([\n \"immoblis.*\",\n \"categories.designation as category\",\n \"departements.designation as departement\",\n \"users.prenom as prenom\",\n\n ])\n ->get();\n $this->data['immobilisations'] = collect($this->data['immobilisations'])->keyBy('id');\n $ctgs = array();\n foreach ($this->data['immobilisations'] as $key => $values) :\n $ctgs[$values->codeAbar][] = $values->category;\n endforeach;\n $this->data['immobilisations'] = collect($this->data['immobilisations'])->keyBy('codeAbar');\n foreach ($this->data['immobilisations'] as $key => $values) :\n $values->category = implode(',', $ctgs[$key]);\n endforeach;\n $pageSize = 10;\n $this->data['immobilisations'] = $this->PaginationHelper($this->data['immobilisations'], $pageSize);\n\n return view('immobilisations.index', $this->data);\n }", "public function members_list() {\n\t\tif (!in_array($this->type, $this->membership_types)) {\n\t\t\tredirect(base_url('members/list/active'));\n\t\t}\n\n\t\t$data['type'] = ($this->type === NULL)? 'active': $this->type;\n\t\t$data['user_mode'] = $this->session->userdata('mode');\n\t\t$data['members'] = $this->get_members($this->type);\n\t\t$data['api_ver_url'] = FINGERPRINT_API_URL . \"?action=verification&member_id=\";\n\t\t$data['total_count'] = count($this->get_members($this->type));\n\n\t\t$this->breadcrumbs->set([ucfirst($data['type']) => 'members/list/' . $data['type']]);\n\n\t\tif ($this->type === 'guest') {\n\t\t\t$data['guests'] = $this->get_guests();\n\t\t}\n\n\t\t$this->render('list', $data);\n\t}", "public function listAction()\n {\t\n\t\t$this->createActivity(\"Admin\",\"List view\");\n $em = $this->getDoctrine()->getManager();\n\t\t$oEmTeacher=$em->getRepository('BoAdminBundle:Admin');\n $admin = $oEmTeacher->getTeacherList(\"Teacher\");\n\t\t$nb_tc = count($admin);\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null) $page=1;\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$admin = $oEmTeacher->getTeacherList(\"Teacher\",$offset,$nb_cpp);\n return $this->render('admin/index.html.twig', array(\n 'admin' => $admin,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\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'=>\"personnel\",\n\t\t\t'sm'=>\"admin\",\n ));\n }", "public function movie_list() {\n $data[\"movies\"] = $this->Movie->findAll();\n\n // Capa de la Vista\n $view['body'] = $this->load->view(\"core/movies/list\", $data, TRUE);\n $view['title'] = \"Listado de películas\";\n $this->parser->parse('core/templates/body', $view);\n }", "function mentees(){\n $uid = $this->session->userdata('user_id');\n if ($this->socialkit->SK_isLogged()) {\n $data['title'] = 'List of Mentees';\n $this->load->view('user/mentees', $data);\n \n } else {\n redirect(base_url('login').'?url='.base64_encode(uri_string()));\n }\n }", "public function display_all_client()\n {\n \n if ( ! file_exists(APPPATH.'views/pages/list.php'))\n {\n // Whoops, we don't have a page for that!\n show_404();\n }\n if (!isset($this->session->userdata['user_role']) || $this->session->userdata['user_role'] < 30)\n {\n $this->session->set_flashdata('message', 'Vous devez avoir les droits de superviseur');\n redirect($_SERVER['HTTP_REFERER']); \n } \n \n $data['title'] = 'Liste des Clients'; \n $data['membres'] = $this->member_model->get_by_type('name = \"Client\"'); \n \n // breadcrumb\n $data['breadcrumbs'] = $this->breadcrumbs('liste');\n \n $this->load->template('pages/list_members',$data);\n }", "private function getUserList()\n {\n $users = User::getUsers();\n $users = ArrayHelper::map($users, 'id', 'username');\n \n return $users;\n }", "public function getList(){\n\t\t$resultsUsers = [];\n\t\t$q = $this->pdo->query('SELECT * FROM utilisateur');\n\t\twhile ($donnee = $q->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$resultsUsers[] = new Utilisateur($donnee);\n\t\t}\n\t\treturn $resultsUsers;\n\t}", "public function getAvatarList(){\n return $this->_get(5);\n }", "function retourneListeUtilisateur(){\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\");\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}", "public function index()\n {\n $this->userlist();\n }", "function liste_utilisateur(){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT id_utilisateur, pseudo FROM utilisateur WHERE status_utilisateur = ? AND fqdn_blog NOT LIKE 'supprimer'\");\n\t\t$req->execute(array(0));\n\t\t$result = $req->fetchAll();\n\t\t\n\t\t$req->closeCursor();\n\t\treturn $result;\n\t}", "public function getList($u_id){\n\t\t$this->db->select('*');\n\t\t$this->db->from('medicines');\n\t\t$this->db->join('lists','medicines.id = lists.m_id');\n\t\t$this->db->where('lists.u_id',$u_id);\n\t\treturn $this->db->get()->result_array();\n\t}", "public function getAutoposList(){\n return $this->_get(2);\n }", "function ListaUsuarios() {\n\t//obtiene el id del usuario\n $sql = \"SELECT usuario.id, usuario.nombre_usuario, persona.primer_nombre, persona.primer_apellido, usuario.estado, rol.descripcion FROM usuario INNER JOIN persona ON usuario.persona_id = persona.id INNER JOIN rol ON usuario.rol_id = rol.id WHERE usuario.estado = 'ACTIVO'\";\n\n\t$db = new conexion();\n\t$result = $db->consulta($sql);\n\t$num = $db->encontradas($result);\n\n\t$respuesta->datos = [];\n\t$respuesta->mensaje = \"\";\n\t$respuesta->codigo = \"\";\n\n\tif ($num != 0) {\n\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t}\n\t\t$respuesta->mensaje = \"Usuarios listados\";\n\t\t$respuesta->codigo = 1;\n\t} else {\n\t\t$respuesta->mensaje = \"No existen registros de usuarios !\";\n\t\t$respuesta->codigo = 0;\n\t}\n\treturn json_encode($respuesta);\n}", "public function listar(){\r\n }", "public function getUserList($type = 'all'): void{\n\n if(Session::isLogin()){\n\n if($type === 'anime'){\n $userList = UserList::where('user_list.user_id', Session::getUser()['id'])->where('type', 'Anime')->getAll();\n }else if($type === 'manga'){\n $userList = UserList::where('user_list.user_id', Session::getUser()['id'])->where('type', 'Manga')->getAll();\n }else{\n $userList = UserList::where('user_list.user_id', Session::getUser()['id'])->getAll();\n }\n \n if(isset($_GET['id'])){\n foreach($userList as $artwork){\n if($artwork->id === $_GET['id']){\n echo json_encode($userList);\n exit;\n }\n }\n }\n }\n \n if(!empty($userList))\n echo json_encode($userList);\n else\n echo json_encode([]);\n }", "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 listado_membresia(){\n $listado = [];\n $resultados = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array('eliminado'=>false,'status'=>true,\"cancelado\"=>false))->get(\"membresia\");\n foreach ($resultados as $clave => $valor) {\n if($valor[\"tipo_persona\"]==\"fisica\"){\n //---\n $valores = $valor;\n $valores[\"id_membresia\"] = (string)$valor[\"_id\"]->{'$id'};\n #Consulto datos personales\n $rfc = $valor[\"identificador_prospecto_cliente\"];\n $res_dt = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array('eliminado'=>false,\"rfc_datos_personales\"=>$rfc))->get(\"datos_personales\");\n $nombre_datos_personales = $res_dt[0][\"nombre_datos_personales\"];\n\n if(isset($res_dt[0][\"apellido_p_datos_personales\"])){\n $nombre_datos_personales.=\" \".$res_dt[0][\"apellido_p_datos_personales\"];\n }\n\n if(isset($res_dt[0][\"apellido_m_datos_personales\"])){\n $nombre_datos_personales.=\" \".$res_dt[0][\"apellido_m_datos_personales\"];\n }\n\n $valores[\"nombre_datos_personales\"] = $rfc.\"-\".$nombre_datos_personales.\"(\".$valores[\"serial_acceso\"].\")\";\n //---\n //Consultando al cliente pagador para obtener su imagen\n $valores[\"id_datos_personales\"] = (string)$res_dt[0][\"_id\"]->{'$id'};\n $res_cliente_pagador = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array('eliminado'=>false,'id_datos_personales'=>$valores[\"id_datos_personales\"]))->get($this->tabla_clientePagador);\n #Obtengo la imagen del cliente \n (isset($res_cliente_pagador[0][\"imagenCliente\"]))? $valores[\"imagenCliente\"] = $res_cliente_pagador[0][\"imagenCliente\"]:$valores[\"imagenCliente\"] = \"default-img.png\";\n //---\n //---\n $listado[] = $valores;\n }\n }\n return $listado;\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 listarParaUnirP() {\n\t\t//de sesion, falta cambiar\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\", \"listarParaPincho\");\n\t\t//falta cambiar\n\t}", "function listadeTodosLiderDao(){\r\n require_once (\"../conexao.php\");\r\n require_once (\"../modelo/objetoMembro.php\");\r\n \r\n $objDao = Connection::getInstance();\r\n \r\n $resultado = mysql_query(\"Select Matricula,Nome from membros where LiderCelula = 'S' order by Nome\") or die (\"Nao foi possivel realizar a busca\".mysql_error());\r\n $listaMembro = array();\r\n \r\n $i=0;\r\n \r\n \r\n while ($registro = mysql_fetch_assoc($resultado)){\r\n \r\n if($registro[\"Nome\"] != \"\"){\r\n \r\n\t $membro = new objetoMembro();\r\n \r\n $membro->setMatricula($registro['Matricula']);\r\n $membro->setNome($registro['Nome']);\r\n \r\n\t $listaMembro[$i] = $membro;\r\n\t}\r\n $i++;\r\n }\r\n\t\treturn $listaMembro;\r\n\t\tmysql_free_result($resultado);\r\n $objDao->freebanco();\r\n }", "function my_list()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['list'] = $this->_bid->my_list();\n\t\t\n\t\t$this->load->view('bids/my_list', $data);\n\t}", "public function get_list_user()\n {\n $this->db->where('type', 0);\n $query = $this->db->get('user');\n return $query->result();\n }", "public function getUserList() {\n $where = [];\n $this->usersModel->setTableName(\"cvd_users\");\n\n $role_name = $this->request->input(\"role_name\");\n if ($role_name) {\n $where[] = [\"roles.role_name\", \"=\", $role_name];\n }\n\n $user_id = $this->request->input(\"user_id\");\n if ($user_id) {\n $where[] = [\"users.user_id\", \"=\", $user_id];\n }\n $orderBy = \"users.user_id\";\n $this->usersModel->setWhere($where);\n $users = $this->usersModel->getUsers($orderBy);\n\n return $users;\n }", "public function mobiteli()\n {\n return $this->belongsToMany('App\\Mobitel', 'mobitel_trgovina'); //m:n\n }" ]
[ "0.74364346", "0.6760778", "0.66017264", "0.64315945", "0.63633835", "0.6343412", "0.6278696", "0.62405926", "0.62229973", "0.620715", "0.61971295", "0.61780566", "0.616878", "0.6152387", "0.6104882", "0.61015016", "0.6100804", "0.608719", "0.60731655", "0.6067534", "0.60223126", "0.6020592", "0.60121304", "0.5998952", "0.59579444", "0.5919842", "0.5899501", "0.5893768", "0.5892878", "0.5886834", "0.58610755", "0.58464897", "0.5844185", "0.58403987", "0.5835264", "0.583506", "0.581616", "0.58061296", "0.5805462", "0.5797104", "0.5772679", "0.5764212", "0.5763823", "0.5753297", "0.57493144", "0.57477075", "0.5736915", "0.5730609", "0.5725875", "0.57012665", "0.5695982", "0.5690616", "0.5679494", "0.5676043", "0.56689656", "0.5665364", "0.56630564", "0.5658164", "0.5657966", "0.5653789", "0.5652949", "0.56458294", "0.564234", "0.5640418", "0.56393945", "0.5638668", "0.5624975", "0.56249654", "0.5621433", "0.56163055", "0.56140804", "0.5603639", "0.56019944", "0.55978346", "0.55793095", "0.55757296", "0.5569036", "0.5554083", "0.55501044", "0.55449784", "0.5542122", "0.5539782", "0.5539172", "0.55374527", "0.5535325", "0.55352515", "0.55299056", "0.55252373", "0.5516281", "0.5515581", "0.5509919", "0.5509518", "0.5508941", "0.55081826", "0.5504512", "0.5502852", "0.54995143", "0.54981536", "0.5497475", "0.5496215" ]
0.8546509
0
/ page mobilisateur/etatmobilisateur Etat une mobilisateur
public function etatmobilisateurAction() { $sessionmembre = new Zend_Session_Namespace('membre'); //$this->_helper->layout->disableLayout(); $this->_helper->layout()->setLayout('layoutpublicesmcperso'); if (!isset($sessionmembre->code_membre)) { $this->_redirect('/'); } $id = (int) $this->_request->getParam('id'); if (isset($id) && $id != 0) { $mobilisateur = new Application_Model_EuMobilisateur(); $mobilisateurM = new Application_Model_EuMobilisateurMapper(); $mobilisateurM->find($id, $mobilisateur); $mobilisateur->setEtat($this->_request->getParam('etat')); $mobilisateurM->update($mobilisateur); } $this->_redirect('/mobilisateur/listmobilisateur'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listmobilisateurAction() {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $mobilisateur = new Application_Model_EuMobilisateurMapper();\n $this->view->entries = $mobilisateur->fetchAllByMembre($sessionmembre->code_membre);\n\n $this->view->tabletri = 1;\n }", "public function suppmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if ($id > 0) {\n\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->delete($id);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function etatmobilisateuradminAction()\n {\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 $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateuradmin');\n }", "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 mentees(){\n $uid = $this->session->userdata('user_id');\n if ($this->socialkit->SK_isLogged()) {\n $data['title'] = 'List of Mentees';\n $this->load->view('user/mentees', $data);\n \n } else {\n redirect(base_url('login').'?url='.base64_encode(uri_string()));\n }\n }", "public function pagelisteMembre(){\n \n $userModel = new User();\n $lisAllUser = $userModel->getAllUser(bdd::GetInstance());\n\n //Récupération du rôle du compte\n $role = UserController::roleNeed();\n $isConnected = 1;\n\n return $this->twig->render('Dashboard/listeMembre.html.twig',[\n 'allContact'=> $lisAllUser,\n 'role'=>$role,\n 'isConnected' => $isConnected\n ]);\n\n }", "function act_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 de la Unidad de Medida.\\\"); 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 userMobile()\n {\n $data = [\n 'title' => \"Pengguna Mobile | SIPENPAS\",\n 'menu_open' => \"Manajemen Pengguna\",\n 'menu_active' => \"Pengguna Mobile\",\n 'breadCrumb' => [\"Manajemen Pengguna\", \"Pengguna Mobile\"]\n ];\n\n return view('pages/manaj-user/mobile/main', $data);\n }", "public function AjaxTelevision() {\n\t\t\t$data = $this->Modelo->avisos();\n\t\t\t$pagina = (count($data) >= 1) ? array_chunk($data, 4) : array();\n\t\t\t\n\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t$plantilla->Parametro('cantidad', count($data));\n\t\t\t$plantilla->Parametro('paginas', count($pagina));\n\t\t\t$plantilla->Parametro('listado', $pagina);\n\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'AjaxTelevision.html')));\n\t\t}", "function mentors(){\n $uid = $this->session->userdata('user_id');\n // Login verification and user stats update\n if ($this->socialkit->SK_isLogged()) {\n $data['title'] = 'List of Mentors';\n $data['mentorSuggestions'] = $this->model_user->getUserMentorshipSuggestions($uid);\n $this->load->view('user/mentors', $data);\n } else {\n redirect(base_url('login').'?url='.base64_encode(uri_string()));\n }\n }", "function alta_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->fecha_alta=date(\"Y-m-d\");\n\t\t$u->estatus_general_id=1;\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 registrado los datos de la Unidad de Medida.\\\"); 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 mobiteli()\n {\n return $this->belongsToMany('App\\Mobitel', 'mobitel_trgovina'); //m:n\n }", "public function actionMultiregionalManajemenUser() {\n $model = $this->findModel(Yii::$app->user->identity->id);\n return $this->render('multiregional/multiregional-manajemen-user', [\n 'model' => $model,\n ]);\n }", "public function Television() {\n\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t$plantilla->Parametro('Titulo', 'Service-Co');\n\t\t\t$plantilla->Parametro('avisos', array_chunk($this->Modelo->avisos(), 4));\n\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'Television.html')));\n\t\t}", "function informationsUsersMdp($id_user){\n $informationsUserMdpEdition = new \\Project\\Models\\InformationsUsersManager();\n $informationsUsersMdpAdmin = $informationsUserMdpEdition->informationsUsersMdpEdition($id_user);\n\n require 'app/views/back/informationsUsersMdp.php';\n }", "public function usermobilebyLocationsAction() {\n $this->_helper->content->setEnabled();\n }", "public function showDetailMobi(Request $request){\n $mobi = Item::find($request->id);\n\n if ($mobi->clasificacion != 'Pc') {\n if ($mobi->user_id != 0 || $mobi->user_id != null) {\n $user_add_mobi = User::where('id',$mobi->user_id)->first();\n }else{\n $user_add_mobi = array(\n 'nombre' => 'Cristian',\n 'apellido' => 'Ruiz'\n );\n }\n if ($mobi->user_edit != 0 || $mobi->user_edit != null) {\n $user_edit_mobi = User::where('id',$mobi->user_edit)->first();\n }else{\n $user_edit_mobi = array(\n 'nombre' => 'Nadie',\n );\n }\n\n return response()->json(['mobi' => $mobi,'user_add' => $user_add_mobi,'user_edit' => $user_edit_mobi]);\n }else{\n $pc = Pc::where('item_id',$mobi->id)->first();\n\n if ($mobi->user_id != 0 || $mobi->user_id != null) {\n $user_add_mobi = User::where('id',$mobi->user_id)->first();\n }else{\n $user_add_mobi = array(\n 'nombre' => 'Cristian',\n 'apellido' => 'Ruiz'\n );\n }\n if ($mobi->user_edit != 0 || $mobi->user_edit != null) {\n $user_edit_mobi = User::where('id',$mobi->user_edit)->first();\n }else{\n $user_edit_mobi = array(\n 'nombre' => 'Nadie',\n );\n }\n\n return response()->json(['mobi' => $mobi,'pc' => $pc,'user_add' => $user_add_mobi,'user_edit' => $user_edit_mobi]);\n }\n }", "public function showSomeMonumentsMobileAction()\n {\n //la création de l'entité Manager par l'appel de doctrine (notre ORM)\n $em=$this->getDoctrine()->getManager();\n //la récupération de données avec Repository\n $tab=$em->getRepository(Monument::class)->findAll();\n $serializer = new Serializer([new ObjectNormalizer()]);\n $formatted = $serializer->normalize($tab);\n return new JsonResponse($formatted);\n }", "public function actionTemoignageAboutUs() {\n //for tour Type\n if(Yii::$app->request->isAjax){\n $page = Yii::$app->request->get('page');\n $testis = \\app\\modules\\whoarewe\\api\\Catalog::items([\n 'where' => [\n 'category_id' => 13\n ],\n 'pagination' => ['pageSize' => 5, 'pageSizeLimit' => [$page, $page + 1]]\n ]);\n return $this->renderPartial(IS_MOBILE ? '//page2016/mobile/confiance' : '//page2016/temoignage',[\n 'testis' => $testis,\n ]);\n }\n $type = Yii::$app->request->get('type');\n $filterType = [];\n if($type && $type != 'all')\n $filterType = ['tTourTypes' => $type];\n //for tour themes\n $theme = Yii::$app->request->get('theme');\n $filterTheme = [];\n if($theme && $theme != 'all')\n $filterTheme = ['tTourThemes' => $theme];\n //for country\n $country = Yii::$app->request->get('country');\n $filterCountry = [];\n if($country && $country != 'all'){\n if(strpos($country, '-') === false){\n $filterCountry = ['countries' => ['IN', [$country]]];\n }\n else{\n foreach (explode('-',$country) as $key => $value) {\n $filterCountry[] = $value;\n }\n $filterCountry = ['countries' => ['IN', $filterCountry]];\n }\n }\n \n $filter = [];\n $filter = $filter + $filterCountry + $filterTheme + $filterType;\n \n $theEntry = \\app\\modules\\whoarewe\\api\\Catalog::cat(URI);\n $this->entry = $theEntry;\n $this->getSeo($theEntry->model->seo);\n //get data category & items portrain\n $thePortrait = \\app\\modules\\whoarewe\\api\\Catalog::cat(12);\n $queryPort = clone $thePortrait;\n $queryFindLarge = clone $queryPort;\n $topPortrait = $queryFindLarge->items(['filters' => [\n 'islarge' => 'on'\n ]]);\n $topPortrait = $topPortrait[0];\n $portraits = $thePortrait->items([\n 'pagination'=>['pageSize' => 0],\n 'where' => ['!=','item_id', $topPortrait->model->item_id],\n 'orderBy' => ['on_top_flag' => SORT_ASC, 'on_top' => SORT_ASC]\n ]);\n $totalCountPort = count($queryPort->items(['pagination' => ['pageSize'=>0],\n 'where' => ['!=','item_id', $topPortrait->model->item_id]\n ]));\n \n $pagesPort = new Pagination([\n 'totalCount' => $totalCountPort,\n 'defaultPageSize' => 3\n ]);\n //get data category & items testi\n //process data testi\n $theTesti = \\app\\modules\\whoarewe\\api\\Catalog::cat(13);\n $totalCountTesti = count($theTesti->items(['pagination' => ['pageSize'=>0],\n 'filters' => $filter]));\n //$queryTesti = clone $theTesti;\n if(Yii::$app->request->get('see-more') != NULL){\n $pagesize = Yii::$app->request->get('see-more');\n }else{\n $pagesize = 5;\n }\n \n $testis = \\app\\modules\\whoarewe\\api\\Catalog::items([\n 'where' => [\n 'category_id' => 13\n ],\n 'pagination' => ['pageSize' => $pagesize],\n 'filters' => $filter\n ]);\n \n\n// $pageTesti = new Pagination([\n// 'totalCount' => $totalCountTesti,\n// 'defaultPageSize' => 5,\n// ]);\n// $this->pagination = $pageTesti->pageCount;\n return $this->render(IS_MOBILE ? '//page2016/mobile/confiance' : '//page2016/temoignage',[\n 'theEntry' => $theEntry,\n 'thePortrait' => $thePortrait,\n 'portraits' => $portraits,\n 'topPortrait' => $topPortrait,\n 'pagesPort' => $pagesPort,\n 'theTesti' => $theTesti,\n 'testis' => $testis,\n 'pagesize' => $pagesize,\n 'totalCountTesti' => $totalCountTesti,\n 'root' => $this->getRootAboutUs()\n ]);\n }", "public function invitMembre($slug)\n {\n if(isset($_SESSION['user']))\n {\n if($this->allowToTwo('Admin','Assoc',$slug)){\n\n $donnee = $this->listing('Assoc',$slug);\n\n if($_POST){\n $r_POST = $this->nettoyage($_POST);\n $error['mail'] = ValidationTools::emailValid($r_POST['mail']);\n\n $assocModel = new AssocModel;\n $nom_assoc = $assocModel->FindElementByElement('nom','slug',$slug);\n $id_assoc = $assocModel->FindElementByElement('id','slug',$slug);\n\n if(ValidationTools::IsValid($error)){\n if(!is_numeric($r_POST['mail'])){ //si c'est ce n'est pas id on verifie si eventuelemt il le mail\n //exist en base en base de donnee\n $UserModel = new UserModel;\n $contactModel = new ContactModel;\n\n if($UserModel->emailExists($r_POST['mail'])){ //si oui on recupere l'id\n $r_POST['mail'] = $UserModel->FindElementByElement('id','mail',$r_POST['mail']);\n $r_POST['destinataire_orga'] = 'users';\n $RolesModel = new RolesModel;\n $roleRetourner = $RolesModel->FindRole($id_assoc,$r_POST['mail']);\n\n if(!empty($roleRetourner)){\n\n $confirmation ='Cet utilisateur fait déjà partie de l\\'Association';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n\n }\n\n }else {\n $r_POST['destinataire_orga'] = 'public';\n $r_POST['destinataire_status'] = 'del';\n }\n\n $invitation = $contactModel->findInvitation($r_POST['mail'],$id_assoc);\n if(!empty($invitation)){\n $confirmation ='Une invitation a déjà été envoyée à cette personne';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n }\n\n if($contactModel->findDemande($r_POST['mail'],$id_assoc)){\n $confirmation ='Une demande pour rejoindre l\\'Association a déjà faite par ce membre, merci de consulter les messages reçus de l\\'Association pour pouvoir y répondre';\n\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n }\n }\n\n unset($r_POST['submit']);\n\n $r_POST['emeteur_pseudo'] = $nom_assoc;\n $r_POST['objet'] = 'Invitation a rejoindre '.$nom_assoc ;\n $r_POST['emeteur_mailOrId'] = $id_assoc;\n $r_POST['destinataire_mailOrId'] = $r_POST['mail'];\n $r_POST['emeteur_orga'] = 'assoc';\n $r_POST['date_envoi'] = date('Y-m-d H:i:s');\n $r_POST['status'] = 'non-lu';\n $ok = false;\n\n\n if(is_numeric($r_POST['mail'])){\n //on envoi en interne une invite\n\n unset($r_POST['mail']);\n\n $r_POST['contenu'] = 'Bonjour,<br/>\n Nous serions très heureux de pouvoir vous compter parmi nous et vous invitons donc à rejoindre notre Association ! Pour en savoir plus sur nos activités n\\'hésitez pas à visiter <a href=\"'.$this->generateUrl('racine_assoc',['orga'=>'assoc','slug'=>$slug],true).'\">notre page</a> !<br/>\n A bientôt !';\n\n if($contactModel->insert($r_POST,false)){\n $ok = true;\n }\n }else {\n unset($r_POST['mail']);\n\n\n $r_POST['contenu'] = 'Bonjour, <br/>\n Nous serions très heureux de pouvoir vous compter parmi nous ! Pour en savoir plus sur nos activités n\\'hésitez pas à visiter <a href=\"'.$this->generateUrl('racine_assoc',['orga'=>'assoc','slug'=>$slug],true).'\">notre page</a> !<br/>\n Cependant, vous devez au préalable être inscrit sur le site.<br/>\n <a href=\"'.$this->generateUrl('racine_inscriptForm',[],true).'\">Cliquez ici</a> pour vous inscrire et devenir aussitôt un de nos membres !<br/>\n A bientôt !';\n\n $contactModel = new ContactModel;\n $contactModel->insert($r_POST,false);\n $mail = new PHPMailer();\n $mail->CharSet = \"utf8\";\n //$mail->SMTPDebug = 3; // Enable verbose debug output\n $mail->isMail();\n $mail->setFrom('[email protected]', 'Mailer');\n $mail->addAddress($r_POST['destinataire_mailOrId'], '[email protected]');\n $mail->addReplyTo('no-reply@as-co-ma', 'Information');\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = $r_POST['objet'];\n $mail->Body = $r_POST['contenu'];\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n if($mail->send()) {\n $ok = true;\n }\n }\n if($ok){\n $confirmation = 'L\\'invitation a bien été envoyée';\n }else {\n $confirmation = 'L\\'invitation n\\'a pas pu être envoyée suite à un problème technique';\n }\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'confirmation'=>$confirmation]);\n }else {\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'error'=>$error]);\n }\n\n }else {\n\n $error['mail']= 'Merci de saisir un mail';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'error'=>$error]);\n\n }\n\n }\n }else{\n $this->redirectToRoute('racine_form');\n }\n }", "function opzioni_immobile($id_tipo_locazione=\"\", $id_imm=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$visualizza =\"<a href=\\\"immobile_show.php?id_imm=\".$id_imm.\"\\\"><img src=\\\"images/immobile_dati.gif\\\" title=\\\"Visualizza Dati Dell'immobile\\\"/></a>\";\n\t\n\t$str=\"\";\n\n\tswitch ($id_tipo_locazione) {\n\t\t\n\t\t\n\t\tcase 1: // venditore\n\t\t\t$richieste = \"<a href=\\\"richiesta_ricerca_trova.php?id_imm=\".$id_imm.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/immobile_vendo.gif\\\" title=\\\"Mostra Richieste Correlate all'immobile\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t\t$str.= $richieste;\n\t\t\n\t\t\tbreak;\n\t\t\n\t\tcase 2: // cerca affitto\n\t\t\t\n\t\t\t$richieste = \"<a href=\\\"richiesta_ricerca_trova.php?id_imm=\".$id_imm.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/immobile_affitti.gif\\\" title=\\\"Mostra tutti i clienti disposti predere in affitto l'immobile\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t\t$str.= $richieste;\n\t\t\n\t\t\tbreak;\n\t\tcase null:\n\t\tdefault:\n\t\t\t\n\t\t\t$str.=\"Nessuna Opzione\";\n\t\t\tbreak;\n\t}\n\treturn $str;\n}", "public function listobjetuserAction()\n {\n $user = $this->getUser();\n\n $em = $this->getDoctrine()->getManager();\n\n $objets = $em->getRepository('AppBundle:Objet')->findBy(['user'=>$user], array('date' => 'desc'));\n $contacdejaenvoyer=$this->getDoctrine()->getManager()->getRepository('AppBundle:Contact')->findAll();\n\n\n return $this->render(':objet:listobjetutilisateur.html.twig', array(\n 'objets' => $objets,\n 'contactdejaenvoyer'=>$contacdejaenvoyer,\n 'user'=>$user,\n ));\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 cl_moblevantamentoedi() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamentoedi\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function mostrar_vista_respaldo(){\n // $reunionesM->setConnection('mysql2');\n //$reuniones = $reunionesM->get();\n $usrLog= Auth::user()->id_usuario;\n $usuarioM = new \\App\\usuario;\n $usuarioM->setConnection('mysql2');\n $usuarioL = $usuarioM->find($usrLog);\n if($usuarioL == NULL){\n return view('Paginas.respaldo',['reuniones'=> []]);\n }else{\n return view('Paginas.respaldo',['reuniones'=>$usuarioL->reuniones_historial()]);\n }\n\n //return $reuniones->minuta->id_minuta;\n // return view('Paginas.respaldo',['reuniones'=>$usuarioL->reuniones_historial()]);\n }", "public function getInformacionMujeres() {\n $arraymujeres = Mujer::all();\n \n if(Auth::check() ) {\n $usuario = Auth::user();\n } else {\n $usuario = \"anonimo\";\n }\n\n return view('imprimir.mujeres', compact(\"usuario\", \"arraymujeres\"));\n }", "public function membresAction()\n {\n // Les modèles\n $model_types = new Model_DbTable_Type();\n $model_membres = new Model_DbTable_CommissionMembre();\n\n // On récupère les règles de la commission\n $this->view->array_membres = $model_membres->get($this->_request->id_commission);\n\n // On met le libellé du type dans le tableau des activités\n $types = $model_types->fetchAll()->toArray();\n $types_sort = [];\n\n foreach ($types as $_type) {\n $types_sort[$_type['ID_TYPE']] = $_type;\n }\n\n foreach ($this->view->array_membres as &$membre) {\n $type_sort = [];\n\n foreach ($membre['types'] as $type) {\n if (!array_key_exists($types_sort[$type['ID_TYPE']]['LIBELLE_TYPE'], $type_sort)) {\n $type_sort[$types_sort[$type['ID_TYPE']]['LIBELLE_TYPE']] = [];\n }\n\n $type_sort[$types_sort[$type['ID_TYPE']]['LIBELLE_TYPE']][] = $type;\n }\n\n $membre['types'] = $type_sort;\n }\n }", "public function TresorieManager() {\n \n $em = $this->getDoctrine()->getManager();\n $entityManager=$em->getRepository('RuffeCardUserGestionBundle:User')->findClientNoPaiment(2);\n return $this->render ( \"RuffeCardTresorieBundle:Default:managerPaiement.html.twig\", array ('Manager'=>$entityManager));\n \n }", "public function getMobile();", "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 }", "public function membre(){\n\n\t\t$user_id = Input::get('user_id');\n\n\t\t$redirectTo = ( $user_id ? 'admin/users/'.$user_id : 'admin/adresses/'.Input::get('adresse_id') );\n\n if( $this->adresse->addMembre(Input::get('membre_id') , Input::get('adresse_id')) )\n {\n return Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'L\\'appartenance comme membre a été ajouté') );\n }\n\n return Redirect::to($redirectTo)->with( array('status' => 'danger' , 'message' => 'L\\'utilisateur à déjà l\\'appartenance comme membre') );\n\n\t}", "public function listMembres() {\n\t\t$membreManager = $this->membreManager;\n\t\t$membres = $membreManager->listMembres();\n\t\t$success = ( isset( $_SESSION['success'] ) ? $_SESSION['success'] : null );\n\t\t$error = ( isset( $_SESSION['error'] ) ? $_SESSION['error'] : null );\n\t\t$myView = new View( 'listmembres' );\n\t\t$myView->renderView( array( 'membres' => $membres, 'success' => $success, 'error' => $error ) );\n\t}", "public function utilisateurListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Utilisateur\");//type array\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 tomarTarea(){\n $id = $this->input->post('id');\n $rsp = $this->bpm->setUsuario($id, userId());\n $rsp['status'] ? $rsp['user_id'] = userId() : '';\n echo json_encode($rsp);\n }", "public function manage(){\n helper(['form','url']);\n return render(INTEGRATION_BASE_MODULE.\"\\Views\\Users\\V_UserManager\", [\n 'title' => 'Gestion des utilisateurs',\n 'script' => self::ENCRYPTION_URL\n ]);\n }", "public function themLoaiMon(){\n \treturn view(\"admin.loaimon.them\");\t\n }", "public function peticion(){\n\t\t//1' el nombre del nonce que creamos\n\t\t//2' par es el argumento de la consulta recibida desde la peticion de js con ajax\n\t\tcheck_ajax_referer('mp_seg', 'nonce');\n\t\t\n\t\tif( isset($_POST['action'] ) ) {\n\t\t\t\n\t\t\n\t\t\t//procesar informacion\n\t\t\t//guardad DDBB, guardar algunas opciomnes un USER_meta, metadato\n\t\t\t$nombre = $_POST['nombre'];\n\t\t\techo json_encode([\"resultado\" => \"Hemos recibido correctamente el nombre: $nombre\"]);\n\t\t\t\n\t\t\twp_die();//cortar toda comunicacion\n\t\t}\n\t}", "function listarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_sel';\n\t\t$this->transaccion='GEM_GEMETO_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_metodologia','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function cl_moblevantamento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function create()\n {\n $mobil = Mobil::all();\n return view('detail.create',compact('mobil'));\n }", "public function user_social(){\n\t\tcheck_ajax_referer('mp_seg', 'nonce');\n\t\t\n\t\tif( isset($_POST['action'] ) ) {\n\t\t\t$user_id = $_POST['userid'];\n\t\t\t\n\t\t\tif( $_POST['tipo'] == 'cargando' ){\n\t\t\t\t$social = get_user_meta( $user_id, 'mp_social', true );\n \n\t\t\t\tif( isset($social) && is_array($social) ) {\n\n\t\t\t\t\textract( $social, EXTR_OVERWRITE );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t$facebook = '';\n\t\t\t\t\t$twitter = '';\n\t\t\t\t\t$instagram = '';\n\n\t\t\t\t}\n\t\t\t\t$json = [\n\t\t\t\t\t'facebook' \t=> $facebook,\n\t\t\t\t\t'twitter' \t=> $twitter,\n\t\t\t\t\t'instagram' => $instagram\n\t\t\t\t];\n\t\t\t}elseif($_POST['tipo'] == 'guardando'){\n \n \n\t\t\t\t$facebook = sanitize_text_field( $_POST['facebook'] );\n\t\t\t\t$twitter = sanitize_text_field( $_POST['twitter'] );\n\t\t\t\t$instagram = sanitize_text_field( $_POST['instagram'] );\n\t\t\t\t$mp_social = [\n\t\t\t\t\t'facebook' \t=> $facebook,\n\t\t\t\t\t'twitter' \t=> $twitter,\n\t\t\t\t\t'instagram' => $instagram\t\n\t\t\t\t];\n \n \t$resultado =update_user_meta( $user_id, 'mp_social', $mp_social );\n\t\t\t\t$usuario = new WP_User($user_id);\n \tif($resultado != false){\n\t\t\t\t\t$json = [\n\t\t\t\t\t\t'resultado' => 'exitoso',\n\t\t\t\t\t\t'usuario' => $usuario->display_name\n\t\t\t\t\t];\n\t\t\t\t}else{\n\t\t\t\t\t$json = [\n\t\t\t\t\t\t'resultado' => 'error'\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t\techo json_encode($json);\n\t\t\twp_die();\n\t\t}\n\t}", "function isMobile($ua)\n{\n global $defaultJSON;\n $isMob='0'; \n $tree = Mobi_Mtld_DA_Api::getTreeFromFile($defaultJSON);\n if (Mobi_Mtld_DA_Api::getProperty($tree,$ua,\"mobileDevice\")=='1')\n $isMob='1';\n return $isMob;\n}", "public function selectMedecin(){\n $bdd=Connexion::getInstance();\n $req=\" select * from utilisateur u ,specialite s,service ser \n WHERE u.idSpecialite=s.idSpecialite and s.idService=ser.idService\n AND idStatus=\".self::NIVEAU_1;\n $rep=$bdd->query($req);\n return $rep->fetchall();\n \n }", "public function detaliiAction()\r\n {\r\n // $this->_checkFurnizoriGroup();\r\n \r\n /**\r\n * Check if customer has this option available\r\n */\r\n // if (!$this->_getSession()->getCustomer()->getAcOpNotificariEmail()) {\r\n // $this->_redirect('customer/account/');\r\n // return;\r\n // }\r\n \r\n /**\r\n * check if the customer has rights to read selected message\r\n */\r\n \r\n if (!Mage::getSingleton('customer/session')->isLoggedIn()) {\r\n $this->_redirect('customer/account/');\r\n return;\r\n }\r\n \r\n $messageId = $this->getRequest()->getParam('id');\r\n $customerId = $this->_getSession()->getCustomer()->getId();\r\n $message = Mage::getModel('conturifurnizori/usermessage')->load($messageId);\r\n \r\n $permisions = array($message->getReceverId(), $message->getSenderId());\r\n \r\n if (!in_array($customerId, $permisions)) {\r\n $this->_redirect('conturifurnizori/mesaje/casutapostala/');\r\n return;\r\n }\r\n \r\n /**\r\n * continue, everything seems to be OK \r\n */\r\n $this->loadLayout();\r\n \r\n $this->_initLayoutMessages('customer/session');\r\n $this->_initLayoutMessages('catalog/session');\r\n \r\n $this->getLayout()->getBlock('head')->setTitle($this->__('Detalii mesaj'));\r\n $this->renderLayout();\r\n }", "public function information_user()\n {\n //Model\n $username = $_SESSION['username'];\n $rs = $this->Nhansu->get_information_user($username);\n if ($rs) {\n $this->view(\"master_page\", [\n \"page\" => \"information_user\",\n \"url\" => \"../\",\n \"info_user\" => $rs,\n \"phongban\" => $this->Phongban->ListAll(),\n \"chucvu\" => $this->Chucvu->ListAll(),\n\n ]);\n }\n }", "public function AjaxTablet() {\n\t\t\tif(AppValidar::PeticionAjax() == true):\n\t\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t\t$plantilla->Parametro('avisos', $this->Modelo->avisos());\n\t\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'AjaxTablet.html')));\n\t\t\telse:\n\t\t\t\techo 'No es posible cargar la información';\n\t\t\tendif;\n\t\t}", "public function actionMultaList()\n {\n $data = [];\n $objectUser = Multas::getInstancia();\n $users = $objectUser->getAllMultas();\n\n $this->renderHtml('../views/listMultas_view.php', $users);\n }", "public function viewAction() {\n // neu chua khoi tao\n // neu roi add them 1 phan tu vao sesion voi id va uenc da duoc tao\n $this->layout('layout/bags');\n $getuser = $this->forward()->dispatch('Admin\\Controller\\Index', array(\n 'action' => 'getuser'\n ));\n // var_dump($getuser);\n $this->layout()->getuser = $getuser;\n\n $id = $this->params()->fromRoute('id');\n $uenc = $this->params()->fromRoute('uenc');\n\n echo \"id :\";\n var_dump($id);\n echo \"</br>\";\n echo \"uenc :\";\n var_dump($uenc);\n die(\"view is update\");\n }", "public function tutti()\n {\n\n $utentiDao = new AutoreDao();\n $res = $utentiDao->read();\n\n $view = new ViewCore();\n echo $view->render(\n 'gestione_utenti\\tutti_gli_utenti.html',\n ['autori' => $res]\n );\n\n\n\n //print_r($twig);\n }", "function user() {\n $user = $this->ion_auth->user()->row();\n //\n //get id\n $data['profic'] = $this->model_portofolio->select_profic_user($user->id)->row();\n $data['user'] = $user;\n if ($this->model_portofolio->select_metadata($user->id, 1)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 1);\n $data['profil'] = $this->model_portofolio->select_metadata($user->id, 1)->row();\n } else {\n $data['profil'] = $this->model_portofolio->select_metadata($user->id, 1)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 2)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 2);\n $data['pengajaran'] = $this->model_portofolio->select_metadata($user->id, 2)->row();\n } else {\n $data['pengajaran'] = $this->model_portofolio->select_metadata($user->id, 2)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 3)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 3);\n $data['riset'] = $this->model_portofolio->select_metadata($user->id, 3)->row();\n } else {\n $data['riset'] = $this->model_portofolio->select_metadata($user->id, 3)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 4)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 4);\n $data['publikasi'] = $this->model_portofolio->select_metadata($user->id, 4)->row();\n } else {\n $data['publikasi'] = $this->model_portofolio->select_metadata($user->id, 4)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 5)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 5);\n $data['pengalaman'] = $this->model_portofolio->select_metadata($user->id, 5)->row();\n } else {\n $data['pengalaman'] = $this->model_portofolio->select_metadata($user->id, 5)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 6)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 6);\n $data['pendidikan'] = $this->model_portofolio->select_metadata($user->id, 6)->row();\n } else {\n $data['pendidikan'] = $this->model_portofolio->select_metadata($user->id, 6)->row();\n }\n\n //print_r($data['profic']);\n //print_r($data['user']);\n //print_r($data['publikasi']);\n //print_r($data);\n $this->load->view('portofolio/profil', $data);\n }", "public function recepcionCamion()\n {\n $data['movimientosTransporte'] = $this->Camiones->listaTransporte()['data'];\n\n $this->load->view('camion/listado_recepcion_camion', $data);\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 Preferiti() {\n $session = Sessione::getInstance();\n if($session->isLoggedUtente()){\n $utente = $session->getUtente();\n $idutente = $utente->getId();\n $pm = FPersistentManager::getInstance();\n $ut = $pm->loadById(\"utente\", $idutente);\n $ricette = $ut->getPreferiti();\n if($ricette!=null){\n $msg = \"\";\n } else {\n $msg = \"Non hai ricette preferite\";\n }\n $view = new VPreferiti();\n $view->mostraPreferiti($ricette, $msg);\n\n } else {\n header('Location: /myRecipes/web/Utente/Login');\n }\n }", "public function addmobilisateuradminAction() {\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');}\n if($sessionutilisateur->confirmation != \"\") {$this->_redirect('/administration/confirmation');}\n\n\n\n if(isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if(isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if($request->isPost()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n /////////////////////////////////////controle code membre\n if(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\n if(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n } else {\n if(substr($_POST['code_membre'], -1, 1) == 'P') {\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n } else if(substr($_POST['code_membre'], -1, 1) == 'M') {\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n }\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n ////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionutilisateur->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateuradmin');\n } else {\n $db->rollback();\n $sessionutilisateur->error = \"Veuillez renseigner le Code Membre ...\";\n } \n } catch(Exception $exc) { \n $db->rollback();\n $sessionutilisateur->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionutilisateur->error = \"Champs * obligatoire\";\n }\n }\n }", "function api_chat_me_info() {\n\tif (session_check()) {\n\t\t$db = new db;\n\t\t$info = $db->getRow(\"SELECT CONCAT(fname, ' ', lname) as fio, avatar,id FROM users WHERE id = ?i\", $_SESSION[\"user_id\"]);\n\t\taok($info);\n\t} else {\n\t\taerr(array(\"Пожалуйста войдите.\"));\n\t}\n\t\n}", "public function view(User $user, MuzaiEducation $muzaiEducation)\n {\n\n \n\n }", "public function connexion()\n {\n # echo '<h1>JE SUIS LA PAGE CONNEXION</h1>';\n $this->render('membre/connexion');\n }", "public function social_media()\n {\n $result = $this->dtbs->list('social');\n $data['info'] = $result;\n $this->load->view('back/social/anasehife',$data);\n }", "private function GererUtilisateus() {\r\n if (isset($_GET['limiteBasse'])) {\r\n $limiteBasse = $_GET['limiteBasse'];\r\n } else {\r\n $limiteBasse = $_GET['limiteBasse'] = 0;\r\n }\r\n // -- Determine la pagination de l'affichage des restaurants\r\n $this->pagination = 50;\r\n $this->userCount = $this->CNX->countUsers();\r\n $this->afficherUsers = $this->CNX->showUsers(null, $limiteBasse, $this->pagination);\r\n $this->action = \"GererUtilisateurs\";\r\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 addmobilisateurAction() {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembre->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/listmobilisateur');\n \n } catch (Exception $exc) { \n $db->rollback();\n $this->view->message = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $this->view->error = \"Champs * obligatoire\";\n }\n }\n }", "public function actionAutorizaListadoUser() { \n if (Yii::app()->request->isPostRequest) {\n //$info = isset($_POST['info']) ? $_POST['info'] : \"\";\n $res = new PERSONA;\n $arroout = $res->autorizarUserCliente();\n $dataMail = new mailSystem; \n $htmlMail = $this->renderPartial('mensajeautoriza', array(\n //'CabPed' => $CabPed,\n ), true); \n $arroout=$dataMail->enviarAutoriza($htmlMail);\n header('Content-type: application/json');\n echo CJavaScript::jsonEncode($arroout); \n return;\n }\n \n }", "public function getMovimientoCamion(){\n log_message('DEBUG', \"#TRAZA | #TRAZ-PROD-TRAZASOFT | Camion | getMovimientoCamion()\");\n \n $motr_id = $this->input->post(\"motr_id\");\n $resp = $this->Camiones->getMovimientoTransporte($motr_id);\n\n echo json_encode($resp);\n }", "public function informacionViaje(){\n $this->view->informacionDetalladaViaje();\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}", "public function mojProfil(){\n $korisnik=$this->session->get('korisnik');\n $this->prikaz('mojProfil', ['korisnik'=>$korisnik]);\n }", "public function AjaxMovil() {\n\t\t\tif(AppValidar::PeticionAjax() == true):\n\t\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t\t$plantilla->Parametro('avisos', $this->Modelo->avisos());\n\t\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'AjaxMovil.html')));\n\t\t\telse:\n\t\t\t\techo 'No es posible cargar la información';\n\t\t\tendif;\n\t\t}", "function index_get($id=null){\n\t\t$response['SUCCESS'] = array('status' => TRUE, 'message' => 'Success get mobil' , 'data' => null );\n\t\t\n\t\t#Set response API if Not Found\n\t\t$response['NOT_FOUND']=array('status' => FALSE, 'message' => 'No mobil were found' , 'data' => null );\n \n\t\t#\n\t\tif (!empty($this->get('ID_MOBIL')))\n\t\t\t$id=$this->get('ID_MOBIL');\n \n\n\t\tif ($id==null) {\n\t\t\t#Call methode get_all from m_mobil model\n\t\t\t$mobil=$this->m_mobil->get_all();\n\t\t\n\t\t}\n\n\n\t\tif ($id!=null) {\n\t\t\t\n\t\t\t#Check if id <= 0\n\t\t\tif ($id<=0) {\n\t\t\t\t$this->response($response['NOT_FOUND'], REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code\n\t\t\t}\n\n\t\t\t#Call methode get_by_id from m_mobil model\n\t\t\t$mobil=$this->m_mobil->get_by_id($id);\n\t\t}\n\n\n # Check if the mobil data store contains mobil\n\t\tif ($mobil) {\n\t\t\tif (count($mobil)==1)\n\t\t\t\tif (isset($mobil->IMAGE)) {\n\t\t\t\t\t$mobil->IMAGE=explode(',', $mobil->IMAGE);\n\t\t\t\t}else{\n\t\t\t\t\t$mobil[0]->IMAGE=explode(',', $mobil[0]->IMAGE);\n\t\t\t\t}\n\t\t\telse\n\t\t\t\tfor ($i=0; $i <count($mobil) ; $i++)\n\t\t\t\t\t$mobil[$i]->IMAGE=explode(',', $mobil[$i]->IMAGE);\n\t\t\t// exit();\n\t\t\t$response['SUCCESS']['data']=$mobil;\n\n\t\t\t#if found mobil\n\t\t\t$this->response($response['SUCCESS'] , REST_Controller::HTTP_OK);\n\n\t\t}else{\n\n\t #if Not found mobil\n\t $this->response($response['NOT_FOUND'], REST_Controller::HTTP_NOT_FOUND); # NOT_FOUND (404) being the HTTP response code\n\n\t\t}\n\n\t}", "public function membres()\n {\n $this->membres = $this->Member->list($_SESSION['guild_id']);\n }", "function medias_autoriser(){}", "public function tellAFriendAction() {\r\n\r\n //DEFAULT LAYOUT\r\n $sitemobile = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemobile');\r\n if ($sitemobile && !Engine_Api::_()->sitemobile()->checkMode('mobile-mode'))\r\n\t\t\t$this->_helper->layout->setLayout('default-simple');\r\n\r\n //GET VIEWER DETAIL\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $viewr_id = $viewer->getIdentity();\r\n\r\n //GET PAGE ID AND PAGE OBJECT\r\n $page_id = $this->_getParam('page_id', $this->_getParam('id', null));\r\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\r\n if (empty($sitepage))\r\n return $this->_forwardCustom('notfound', 'error', 'core');\r\n //AUTHORIZATION CHECK FOR TELL A FRIEND\r\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'tfriend');\r\n if (empty($isManageAdmin)) {\r\n return $this->_forwardCustom('requireauth', 'error', 'core');\r\n }\r\n\r\n //FORM GENERATION\r\n $this->view->form = $form = new Sitepage_Form_TellAFriend();\r\n \r\n if (!empty($viewr_id)) {\r\n $value['sender_email'] = $viewer->email;\r\n $value['sender_name'] = $viewer->displayname;\r\n $form->populate($value);\r\n }\r\n \r\n //IF THE MODE IS APP MODE THEN\r\n if (Engine_Api::_()->seaocore()->isSitemobileApp()) {\r\n Zend_Registry::set('setFixedCreationForm', true);\r\n Zend_Registry::set('setFixedCreationFormBack', 'Back');\r\n Zend_Registry::set('setFixedCreationHeaderTitle', Zend_Registry::get('Zend_Translate')->_('Tell a friend'));\r\n Zend_Registry::set('setFixedCreationHeaderSubmit', Zend_Registry::get('Zend_Translate')->_('Send'));\r\n $this->view->form->setAttrib('id', 'tellAFriendFrom');\r\n Zend_Registry::set('setFixedCreationFormId', '#tellAFriendFrom');\r\n $this->view->form->removeElement('sitepage_send');\r\n $this->view->form->removeElement('sitepage_cancel');\r\n $form->setTitle('');\r\n }\r\n\r\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\r\n\r\n $values = $form->getValues();\r\n\r\n //EDPLODES EMAIL IDS\r\n $reciver_ids = explode(',', $values['sitepage_reciver_emails']);\r\n\r\n if (!empty($values['sitepage_send_me'])) {\r\n $reciver_ids[] = $values['sitepage_sender_email'];\r\n }\r\n $sender_email = $values['sitepage_sender_email'];\r\n\r\n //CHECK VALID EMAIL ID FORMITE\r\n $validator = new Zend_Validate_EmailAddress();\r\n\r\n if (!$validator->isValid($sender_email)) {\r\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Invalid sender email address value'));\r\n return;\r\n }\r\n foreach ($reciver_ids as $reciver_id) {\r\n $reciver_id = trim($reciver_id, ' ');\r\n if (!$validator->isValid($reciver_id)) {\r\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter correct email address of the receiver(s).'));\r\n return;\r\n }\r\n }\r\n $sender = $values['sitepage_sender_name'];\r\n $message = $values['sitepage_message'];\r\n $heading = ucfirst($sitepage->getTitle());\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($reciver_ids, 'SITEPAGE_TELLAFRIEND_EMAIL', array(\r\n 'host' => $_SERVER['HTTP_HOST'],\r\n 'sender_name' => $sender,\r\n 'page_title' => $heading,\r\n 'message' => '<div>' . $message . '</div>',\r\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] . Engine_Api::_()->sitepage()->getHref($sitepage->page_id, $sitepage->owner_id, $sitepage->getSlug()),\r\n 'sender_email' => $sender_email,\r\n 'queue' => true\r\n ));\r\n\r\n if ($sitemobile && Engine_Api::_()->sitemobile()->checkMode('mobile-mode'))\r\n\t\t\t\t$this->_forwardCustom('success', 'utility', 'core', array( \r\n 'parentRedirect' => $sitepage->getHref(), \r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your message to your friend has been sent successfully.'))\r\n ));\r\n\t\t else\t\r\n $this->_forwardCustom('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => false,\r\n 'format' => 'smoothbox',\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your message to your friend has been sent successfully.'))\r\n ));\r\n }\r\n }", "public function indexMuellim()\n {\n \t$mails=elaqe::where([['reciever_id',$_SESSION['muellimID']],['reciever_type','m']])->orderBy('id','desc')->get();\n \treturn view('muellim.elaqe.index',compact('mails'));\n }", "public function actionSeguir(){\r\n $me = new MetodosExtras();\r\n \r\n $ss = new Sessao();\r\n $sm = new SeguirModel();\r\n $sm->setId($ss->devSessao('id'));\r\n $sm->setIdSeguir($_GET['usu']);\r\n \r\n $sd = new SeguirDAO();\r\n if($sd->insereSeguir($sm)):\r\n if($_GET['tp'] == 1):\r\n $me->redireciona('Artista/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=um&en=sim');\r\n else:\r\n $me->redireciona('Companhia/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=um&en=sim');\r\n endif;\r\n else:\r\n if($_GET['tp'] == 1):\r\n $me->redireciona('Artista/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=dois');\r\n else:\r\n $me->redireciona('Companhia/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=dois');\r\n endif;\r\n endif;\r\n }", "public function actionManagerial() {\n $jabatan = new WJabatan('search');\n $jabatan->unsetAttributes(); // clear any default values\n if (isset($_GET['WJabatan']))\n $jabatan->attributes = $_GET['WJabatan'];\n $this->render('managerial', array(\n 'jabatan' => $jabatan,\n ));\n }", "public function get_mention(){retrun($id_local_mention); }", "function informacao() {\n $this->layout = '_layout.perfilUsuario';\n $usuario = new Usuario();\n $api = new ApiUsuario();\n $usuario->codgusario = $this->getParametro(0);\n\n $this->dados = array(\n 'dados' => $api->Listar_informacao_cliente($usuario)\n );\n $this->view();\n }", "function retrieve_users_fftt()\n\t{\n\t\tglobal $gCms;\n\t\t$adherents = new adherents();\n\t\t$ping = cms_utils::get_module('Ping');\n\t\t$saison = $ping->GetPreference ('saison_en_cours');\n\t\t$ping_ops = new ping_admin_ops();\n\t\t$db = cmsms()->GetDb();\n\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t$aujourdhui = date('Y-m-d');\n\t\t$club_number = $adherents->GetPreference('club_number');\n\t\t//echo $club_number;\n\t\t\n\t\t\n\t\t\t$page = \"xml_liste_joueur\";\n\t\t\t$service = new Servicen();\n\t\t\t//paramètres nécessaires \n\t\t\t\n\t\t\t$var = \"club=\".$club_number;\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\t\n\t\t\tif($xml === FALSE)\n\t\t\t{\n\t\t\t\t$array = 0;\n\t\t\t\t$lignes = 0;\n\t\t\t\treturn FALSE;\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$lignes = count($array['joueur']);\n\t\t\t}\n\t\t\t//echo \"le nb de lignes est : \".$lignes;\n\t\t\tif($lignes == 0)\n\t\t\t{\n\t\t\t\t$message = \"Pas de lignes à récupérer !\";\n\t\t\t\t//$this->SetMessage(\"$message\");\n\t\t\t\t//$this->RedirectToAdminTab('joueurs');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//on supprime tt\n\t\t\t\t$query = \"TRUNCATE TABLE \".cms_db_prefix().\"module_ping_joueurs\";\n\t\t\t\t$dbresult = $db->Execute($query);\n\t\t\t\tif($dbresult)\n\t\t\t\t{\n\t\t\t\t\t$i =0;//compteur pour les nouvelles inclusions\n\t\t\t\t\t$a = 0;//compteur pour les mises à jour\n\t\t\t\t\t$joueurs_ops = new ping_admin_ops();\n\t\t\t\t\tforeach($xml as $tab)\n\t\t\t\t\t{\n\t\t\t\t\t\t$licence = (isset($tab->licence)?\"$tab->licence\":\"\");\n\t\t\t\t\t\t$nom = (isset($tab->nom)?\"$tab->nom\":\"\");\n\t\t\t\t\t\t$prenom = (isset($tab->prenom)?\"$tab->prenom\":\"\");\n\t\t\t\t\t\t$club = (isset($tab->club)?\"$tab->club\":\"\");\n\t\t\t\t\t\t$nclub = (isset($tab->nclub)?\"$tab->nclub\":\"\");\n\t\t\t\t\t\t$clast = (isset($tab->clast)?\"$tab->clast\":\"\");\n\t\t\t\t\t\t$actif = 1;\n\n\t\t\t\t\t\t$insert = $joueurs_ops->add_joueur($actif, $licence, $nom, $prenom, $club, $nclub, $clast);\n\t\t\t\t\t\t$player_exists = $joueurs_ops->player_exists($licence);\n\t\t\t\t\t//\tvar_dump($player_exists);\n\t\t\t\t\t\tif($insert === TRUE && $player_exists === FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$query = \"INSERT INTO \".cms_db_prefix().\"module_ping_recup_parties (saison, datemaj, licence, sit_mens, fftt, maj_fftt, spid, maj_spid) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t\t\t\t\t\t$dbresult = $db->Execute($query, array($saison,$aujourdhui,$licence,'Janvier 2000', '0', '1970-01-01', '0', '1970-01-01'));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}//$a++;\n\t\t\t\t\t \t\n\n\t\t\t\t\t}// fin du foreach\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t//on redirige sur l'onglet joueurs\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t}", "function abmUsuarios()\n {\n $this->checkCredentials();\n $users = $this->modelUser->getAllUsers();\n $this->view->showAbmUsuarios($users);\n }", "function manage_user(){\n\t\t$a['data']\t= $this->model_admin->tampil_user()->result_object();\n\t\t$a['page']\t= \"manage_user\";\n\t\t\n\t\t$this->load->view('admin/index', $a);\n\t}", "public function actionProvManajemenUser() {\n $model = $this->findModel(Yii::$app->user->identity->id);\n return $this->render('prov/prov-manajemen-user', [\n 'model' => $model,\n ]);\n }", "public function profil()\n {\n # echo '<h1>JE SUIS LA PAGE PROFIL</h1>';\n $this->render('membre/profil');\n }", "public function indexAction(){\n\n // Appel à la base de donnée\n //getDoctrine appel la methode Doctrine\n //getManager appel des ORM\n $em = $this->getDoctrine()->getManager();\n\n // Appel à l'entity\n $phone = $em->getRepository('FamilyBundle:User')->findAll();\n\n // Retour à la page concernée avec une valeur appelée\n return $this->render('@Family/Default/phone.html.twig', array(\n 'phones'=>$phone,\n ));\n }", "public function get_start_member_page($uid) {\n global $base_secure_url;\n //start get social media items PER USER\n $vid = 'social_media_networks';\n $terms = \\Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadTree($vid);\n $social_network = [];\n foreach ($terms as $term) {\n $term_id = $term->tid;\n $terms_obj = \\Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($term_id);\n if (isset($terms_obj->field_icon) && isset($terms_obj->field_icon->target_id)) {\n $network_statu = $terms_obj->field_status->value;\n $network_icon_target = $terms_obj->field_icon->target_id;\n $file = \\Drupal::entityTypeManager()->getStorage('file')->load($network_icon_target);\n // $social_icon_path = $file->url();\n $social_icon_path = file_create_url($file->getFileUri());\n $network_status_unfiltered = $this->get_network_status($terms_obj->tid->value, $uid);\n if (array_key_exists('status', $network_status_unfiltered) && $network_status_unfiltered['status'] == 1) {\n if (array_key_exists('token_validated', $network_status_unfiltered) && $network_status_unfiltered['token_validated'] == 1) {\n //acive and validated network, filter network status array\n $network_status['status'] = 1;\n }\n else {\n //active but not validated network\n $network_status['status'] = 0;\n }\n }\n else {\n //neither active nor validated\n $network_status['status'] = 0;\n }\n $social_network[] = ['name' => $terms_obj->name->value, 'tid' => $terms_obj->tid->value, 'network_icon' => $social_icon_path, 'network_status' => $network_status];\n }\n }\n //$data['member_network_settings'] = $social_network;\n //$data['uid'] = $uid;\n return $social_network;\n }", "public function mobilebyLocationsAction() {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('group')) {\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('group_main', array(), 'sitetagcheckin_main_grouplocation');\n $this->_helper->content->setEnabled();\n } elseif (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('advgroup')) {\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('advgroup_main', array(), 'sitetagcheckin_main_groupbylocation');\n $this->_helper->content->setEnabled();\n } else {\n return $this->_forward('notfound', 'error', 'core');\n }\n }", "public function addmobilisateurintegrateurAction() {\n $sessionmembreasso = new Zend_Session_Namespace('membreasso');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcint');\n if (!isset($sessionmembreasso->login)) {$this->_redirect('/integrateur/login');}\n\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\n/////////////////////////////////////controle code membre\nif(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\nif(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n}else{\nif(substr($_POST['code_membre'], -1, 1) == 'P'){\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0){\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }else if(substr($_POST['code_membre'], -1, 1) == 'M'){\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0){\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n}\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembreasso->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n}else{\n $db->rollback();\n $sessionmembreasso->error = \"Veuillez renseigner le Code Membre ...\";\n\n} \n } catch (Exception $exc) { \n $db->rollback();\n $sessionmembreasso->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionmembreasso->error = \"Champs * obligatoire\";\n }\n }\n }", "public function SeeMyPage() {\n\n // $id = $_SESSION['userID'];\n $id = $_SESSION[PREFIX . 'userID'];\n\n try {\n /* * * * * * * * * * * * * * * * * * * * * * * *\n * Get All the informations about the user from the ID\n */\n $select = $this->connexion->prepare(\"SELECT *\n FROM \" . PREFIX . \"user\n WHERE user_id = :userID\");\n \n $select->bindValue(':userID', $id, PDO::PARAM_INT);\n $select->execute();\n $select->setFetchMode(PDO::FETCH_ASSOC);\n $user = $select->FetchAll();\n $select->closeCursor(); \n\n if(isset($user[0])){\n $retour = $user[0];\n } else {\n $retour = $user;\n }\n\n if(!empty($user)){\n\n $select2 = $this->connexion->prepare(\"SELECT *\n FROM \" . PREFIX . \"phone\n WHERE user_user_id = :userID\");\n \n $select2->bindValue(':userID', $id, PDO::PARAM_INT);\n $select2->execute();\n $select2->setFetchMode(PDO::FETCH_ASSOC);\n $phone = $select2->FetchAll();\n $select2->closeCursor(); \n\n if(!empty($phone[0])){\n $retour = array_merge($retour, $phone[0]);\n }\n \n $select3 = $this->connexion->prepare(\"SELECT *\n FROM \" . PREFIX . \"adress\n WHERE user_user_id = :userID\");\n \n $select3->bindValue(':userID', $id, PDO::PARAM_INT);\n $select3->execute();\n $select3->setFetchMode(PDO::FETCH_ASSOC);\n $adress = $select3->FetchAll();\n $select3->closeCursor(); \n\n if(!empty($adress[0])){\n $retour = array_merge($retour, $adress[0]);\n }\n \n $select4 = $this->connexion->prepare(\"SELECT *\n FROM \" . PREFIX . \"bank_details\n WHERE user_user_id = :userID\");\n \n $select4->bindValue(':userID', $id, PDO::PARAM_INT);\n $select4->execute();\n $select4->setFetchMode(PDO::FETCH_ASSOC);\n $adress2 = $select4->FetchAll();\n $select4->closeCursor(); \n\n if(!empty($adress2)){\n $retour = array_merge($retour, $adress2[0]);\n }\n\n }\n return $retour;\n \n \n } catch (Exception $e) {\n echo 'Message:' . $e->getMessage();\n }\n }", "function modificarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_ime';\n\t\t$this->transaccion='GEM_GEMETO_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_metodologia','id_metodologia','int4');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function index($page = 'user/riwayatsewa/v_riwayatsewa')\n\t{\n\t\t$data['admin'] = $this->db->get_where('admin',['email'=>$this->session->userdata('email')])->row_array();\n\t\t$data['penyewa'] = $this->db->get_where('penyewa',['email'=>$this->session->userdata('email')])->row_array();\n\t\t$admin = $this->db->get_where('admin',['email'=>$this->session->userdata('email')])->row_array();\n\t\t$penyewa = $this->db->get_where('penyewa',['email'=>$this->session->userdata('email')])->row_array();\n\n\t\t$data['kontenDinamis']\t=\t$page;\n\t\t$riwayatsewa\t=\t$this->M_riwayatsewa;\n\n\t\t$data['content'] = $riwayatsewa->get();\n\n\t\t\n\t\t/*cek user apakah ada didalam database*/\n\t\tif ($penyewa || $admin ) {\n\t\t\t$this->load->view($this->template,$data);\n\t\t} else {\n\n\t\t\t/* Pesan cek user jika email tidak terdaftar*/\n\t\t\t$this->session->sess_destroy();\n\t\t\tredirect('');\n\t\t}\n\t}", "public function viajesFuturos(){\n // $viajes = $this->model->viajesFuturos($usuario, $email);\n $this->view->viajesFuturos();\n}", "public function twitterAction()\r\n {\r\n if(!($userInfo = Mage::getSingleton('customer/session')\r\n ->getSocialLogonTwitterUserinfo()) || !$userInfo->hasData()) {\r\n \r\n $userInfo = Mage::getSingleton('SocialLogon/twitter_info_user')\r\n ->load();\r\n\r\n Mage::getSingleton('customer/session')\r\n ->setSocialLogonTwitterUserinfo($userInfo);\r\n }\r\n\r\n Mage::register('SocialLogon_twitter_userinfo', $userInfo);\r\n\r\n $this->loadLayout();\r\n $this->renderLayout();\r\n }", "public function infoutilisateur($id){\n $this->autoRender = false;\n $id = isset($id) ? $id : $this->request->data('id');\n $utilisateur = $this->Utilisateur->find('first',array('conditions'=>array('Utilisateur.id'=>$id),'recursive'=>0));\n $user[\"ETP\"] = $utilisateur['Utilisateur']['WORKCAPACITY']/100;\n $user[\"TJM\"] = $utilisateur['Tjmagent']['TARIFTTC']==null ? '' : $utilisateur['Tjmagent']['TARIFTTC'];\n $result = json_encode($user);\n return $result;\n }", "public function superMng() {\r\n\t\tif ($this->user['user_type_id'] != 19) {\r\n\t\t\t$this->error('无权限访问');\r\n\t\t}\r\n\t\t/*\r\n\t\tif (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {\r\n\t\t\t$data = array();\r\n\t\t\t$data['page'] = I('post.page', 1);\r\n\t\t\t$data['rows'] = I('post.rows', 20);\r\n\t\t\t$data['sort'] = I('post.sort', 'id');\r\n\t\t\t$data['order_by'] = I('post.order', 'ASC');\r\n\t\t\t\r\n\t\t\t$data['city_id'] = $this->city['city_id'];\r\n\t\t\t$data['advance'] = true;\r\n\t\t\t\r\n\t\t\t$id = I('post.id', 0);\r\n\t\t\t$status_id = I('post.status_id', 0);\r\n\t\t\t$area_id = I('post.area_id', 0);\r\n\t\t\t$target_id = I('post.target_id', 0);\r\n\t\t\t$area_names = I('post.area_names', '');\r\n\t\t\t$target_names = I('post.target_names', '');\r\n\t\t\t$start_date = I('post.start_date', '');\r\n\t\t\t$end_date = I('post.end_date', '');\r\n\t\t\t!empty($id) && $data['id'] = $id;\r\n\t\t\t!empty($status_id) && $data['status_id'] = $status_id;\r\n\t\t\t!empty($start_date) && $data['exm_start_date'] = $start_date;\r\n\t\t\t!empty($end_date) && $data['exm_end_date'] = $end_date;\r\n\t\t\t\r\n\t\t\tif (!empty($area_id)) {\r\n\t\t\t\t$data['area_id'] = $area_id;\r\n\t\t\t}else if (!empty($area_names)) {\r\n\t\t\t\t$arr = explode(',', $area_names);\r\n\t\t\t\tforeach($arr as $k=>$v) {\r\n\t\t\t\t\t$data['area' . ($k+1)] = $v;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (!empty($target_id)) {\r\n\t\t\t\t$data['target_id'] = $target_id;\r\n\t\t\t}else if (!empty($target_names)) {\r\n\t\t\t\t$arr = explode(',', $target_names);\r\n\t\t\t\tforeach($arr as $k=>$v) {\r\n\t\t\t\t\t$data['target' . ($k+1)] = $v;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//print_r($data);exit;\r\n\t\t\t$IssueEvent = A('Issue', 'Event');\r\n\t\t\t\r\n\t\t\t$res = $IssueEvent->getIssueList($data);\r\n\t\t\t\t\r\n\t\t\techo $this->generateDataForDataGrid($res['total'], $res['data']);\r\n\t\t\texit;\r\n\t\t}*/\r\n\t\t$AreaEvent = A('Area', 'Event');\r\n\t\t$area_list = $AreaEvent->getAreaList($this->city['city_id'], 0);\r\n\t\t$this->assign('area_list', $area_list);\r\n\t\t\r\n\t\t$TargetEvent = A('Target', 'Event');\r\n\t\t$target_list = $TargetEvent->getTargetList($this->city['city_id'], 0);\r\n\t\t$this->assign('target_list', $target_list);\r\n\t\t\r\n\t\t$IssueEvent = A('Issue', 'Event');\r\n\t\t$status_list = M('IssueStatus')->select();\r\n\t\tforeach($status_list as $key=>$row) {\r\n\t\t\t\t$status_list[$key]['name'] = $IssueEvent->getStatusName($row['status_id'], $this->user['user_type_id'], $row['name']);\r\n\t\t}\r\n\t\t$this->assign('status_list', $status_list);\r\n\t\t\r\n\t\t$this->assign('title', '数据管理');\r\n\t\t$this->display('Issue:superMng');\r\n\t}", "public function getSubscriberMobile()\n {\n $mobile = parent::getSubscriberMobile(); \n return $mobile;\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}", "function processPetition()\r\n {\r\n $user_id = $this->getSessionElement( 'userinfo', 'user_id' );\r\n if ( isset($user_id) && $user_id != '' ) {\r\n $this->setViewVariable('user_id', $user_id );\r\n switch ($this->getViewVariable('option')) {\r\n case show:\r\n $ext_id = $this->getViewVariable('user');\r\n\t\t\t\t\t\t\t\t\t\t$this->_setContactLists($ext_id);\r\n $this->setViewClass('miguel_VMain');\r\n break;\r\n case detail:\r\n //$this->addNavElement(Util::format_URLPath('contact/index.php'), agt('miguel_Contact') );\r\n $contact_id=$this->getViewVariable('contact_id');\r\n $detail_contacts = $this->obj_data->getContact($user_id, $contact_id);\r\n $this->setViewVariable('detail_contacts', $detail_contacts);\r\n $this->setViewClass('miguel_VDetail');\r\n break;\r\n case insert:\r\n\t\t\t\t\t\t\t\t\t $id_profile = $this->getViewVariable('profile');\r\n\t\t\t\t\t\t\t\t\t\tswitch($id_profile)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tcase '2':\r\n\t\t\t\t\t\t\t\t\t\t\tcase '3':\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$arrUsers = $this->obj_data->getUsers(2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$arrUsers += $this->obj_data->getUsers(3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$arrUsers = $this->obj_data->getUsers($id_profile);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t$this->setViewVariable('arrUsers', $arrUsers);\r\n $this->setViewClass('miguel_VNewContact');\r\n break;\r\n case newdata:\r\n\t\t\t\t\t\t\t\t\t\t$contact_user_id = $this->getViewVariable('uname');\r\n $this->obj_data->insertContact($user_id, $this->getViewVariable('nom_form'), $this->getViewVariable('prenom_form'), $contact_user_id, $this->getViewVariable('email'), $this->getViewVariable('jabber'), $this->getViewVariable('comentario'), $contact_user_id!=null);\r\n $this->setViewClass('miguel_VMain');\r\n\t\t\t\t\t\t\t\t\t\t$this->_setContactLists($user_id);\r\n $this->setViewClass('miguel_VMain');\r\n break;\r\n case delete:\r\n $this->obj_data->deleteContact($this->getViewVariable('contact_id'));\r\n\t\t\t\t\t\t\t\t\t\t$this->_setContactLists($user_id);\r\n $this->setViewClass('miguel_VMain');\r\n break;\r\n default:\r\n $this->clearNavBarr();\r\n\t\t\t\t\t\t\t\t\t\t$this->_setContactLists($user_id);\r\n\t\t\t\t\t\t\t\t\t\t$this->setViewClass('miguel_VMain');\r\n break;\r\n }\r\n\r\n $this->clearNavBarr();\r\n $this->addNavElement(Util::format_URLPath('contact/index.php'), agt('Contactos') );\r\n $this->setCacheFile(\"miguel_VMain_Contact_\" . $this->getSessionElement(\"userinfo\", \"user_id\"));\r\n $this->setMessage('' );\r\n $this->setPageTitle( 'Contactos' );\r\n\r\n $this->setCacheFlag(true);\r\n $this->setHelp(\"EducContent\");\r\n } else {\r\n header('Location:' . Util::format_URLPath('main/index.php') );\r\n }\r\n }", "function archobjet_autoriser() {\n}", "public function getTelefone()\n {\n return $this->telefone;\n }", "public function affFormModifInfos(){\n $error = \"\";\n $idVisiteur = Session::get('id');\n $gsbFrais = new GsbFrais();\n $info = $gsbFrais->getInfosPerso($idVisiteur);\n return view('formModifInfos', compact('info', 'error'));\n }", "function act_tipo_pago(){\n\t\t$u= new Tipo_pago();\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 actualizado los datos del Tipo de Pago.\\\"); 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}" ]
[ "0.69084173", "0.65400565", "0.6421847", "0.64147466", "0.6007604", "0.5999295", "0.57086396", "0.56602204", "0.5631701", "0.562128", "0.55559045", "0.5512703", "0.5449182", "0.5439828", "0.5439595", "0.54266036", "0.5416764", "0.54119074", "0.53777695", "0.5373076", "0.53597635", "0.53329897", "0.5306293", "0.5293653", "0.5286562", "0.5284682", "0.5277989", "0.5273588", "0.5264262", "0.526399", "0.52492654", "0.5242967", "0.5234219", "0.5223978", "0.52231324", "0.52212787", "0.5220161", "0.5216821", "0.52153647", "0.5205624", "0.5189799", "0.51826376", "0.51825917", "0.51771003", "0.5176424", "0.51722825", "0.5167327", "0.5165033", "0.5159911", "0.5157915", "0.5152741", "0.51475096", "0.5143035", "0.5141411", "0.51406074", "0.5138544", "0.5125642", "0.51212436", "0.5120003", "0.5107983", "0.5107534", "0.50990653", "0.50954986", "0.5082652", "0.50793743", "0.5073799", "0.5065287", "0.50644207", "0.5053362", "0.5052219", "0.5051152", "0.5048931", "0.50348043", "0.50333035", "0.5031975", "0.5029714", "0.5027803", "0.5024297", "0.50223315", "0.5021901", "0.50193834", "0.50192624", "0.5017794", "0.50160825", "0.50091505", "0.50085557", "0.5006714", "0.49973705", "0.49961758", "0.4989343", "0.49883988", "0.4987044", "0.49869186", "0.4975887", "0.49668652", "0.49658054", "0.49568984", "0.49565098", "0.49514413", "0.4951413" ]
0.74121654
0
/ page mobilisateur/suppmobilisateur Suppression d'une mobilisateur
public function suppmobilisateurAction() { $sessionmembre = new Zend_Session_Namespace('membre'); //$this->_helper->layout->disableLayout(); $this->_helper->layout()->setLayout('layoutpublicesmcperso'); if (!isset($sessionmembre->code_membre)) { $this->_redirect('/'); } $id = (int) $this->_request->getParam('id'); if ($id > 0) { $mobilisateurM = new Application_Model_EuMobilisateurMapper(); $mobilisateurM->delete($id); } $this->_redirect('/mobilisateur/listmobilisateur'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function detaliiAction()\r\n {\r\n // $this->_checkFurnizoriGroup();\r\n \r\n /**\r\n * Check if customer has this option available\r\n */\r\n // if (!$this->_getSession()->getCustomer()->getAcOpNotificariEmail()) {\r\n // $this->_redirect('customer/account/');\r\n // return;\r\n // }\r\n \r\n /**\r\n * check if the customer has rights to read selected message\r\n */\r\n \r\n if (!Mage::getSingleton('customer/session')->isLoggedIn()) {\r\n $this->_redirect('customer/account/');\r\n return;\r\n }\r\n \r\n $messageId = $this->getRequest()->getParam('id');\r\n $customerId = $this->_getSession()->getCustomer()->getId();\r\n $message = Mage::getModel('conturifurnizori/usermessage')->load($messageId);\r\n \r\n $permisions = array($message->getReceverId(), $message->getSenderId());\r\n \r\n if (!in_array($customerId, $permisions)) {\r\n $this->_redirect('conturifurnizori/mesaje/casutapostala/');\r\n return;\r\n }\r\n \r\n /**\r\n * continue, everything seems to be OK \r\n */\r\n $this->loadLayout();\r\n \r\n $this->_initLayoutMessages('customer/session');\r\n $this->_initLayoutMessages('catalog/session');\r\n \r\n $this->getLayout()->getBlock('head')->setTitle($this->__('Detalii mesaj'));\r\n $this->renderLayout();\r\n }", "public function removeMembre(){\n\n\t\t$user_id = Input::get('user_id');\n\n\t\t$redirectTo = ( $user_id != 0 ? 'admin/users/'.Input::get('user_id') : 'admin/adresses/'.Input::get('adresse_id') );\n\n\t\tif ( $this->adresse->removeMembre(Input::get('membre_id'),Input::get('adresse_id')) )\n\t\t{\n return Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'Le membre a été supprimé')); \n }\n\n return Redirect::to($redirectTo)->with( array('status' => 'danger' , 'message' => 'Problème avec la suppression') );\t\t\t\n\t}", "public function remplirFormulaireSuppressionUtilisateur($nom, $prenom){\r\n \r\n $utilisateur = array('nom' => $nom, 'prenom' => $prenom);\r\n \r\n $this->load->view('accueil/accueil_v');\r\n $this->load->view('suppression/suppressionUtilisateurFormulaire_v', $utilisateur);\r\n \r\n }", "private function negarDetalleSolicitud()\r\n {\r\n $result = false;\r\n $modelInscripcion = self::findInscripcionSucursal();\r\n if ( $modelInscripcion !== null ) {\r\n if ( $modelInscripcion['id_contribuyente'] == $this->_model->id_contribuyente ) {\r\n $result = self::updateSolicitudInscripcion($modelInscripcion);\r\n } else {\r\n self::setErrors(Yii::t('backend', 'Error in the ID of taxpayer'));\r\n }\r\n }\r\n\r\n return $result;\r\n }", "public function findPagoDetalleMontoNegativo()\r\n\t\t{\r\n\t\t\t$registers = self::findPagoDetalleMontoNegativoModel();\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Montos Negativos'));\r\n\t\t\t}\r\n\t\t}", "public function etatmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function suppression($id,$ajax=false) {\n $resultat = $this->m_correspondants->suppression($id);\n if ($resultat === false) {\n $this->my_set_display_response($ajax,false);\n }\n else {\n $this->my_set_action_response($ajax,true,\"Le correspondant a été supprimé\");\n }\n if ($ajax) {\n return;\n }\n $redirection = $this->session->userdata('_url_retour');\n if (! $redirection) $redirection = '';\n redirect($redirection);\n }", "public function promovisati()\n {\n \n $promovisaniIme=$this->request->getVar('korisnik');\n $korisnikModel=new KorisnikModel();\n $promovisani=$korisnikModel->dohvati_korisnika($promovisaniIme);\n $stara_uloga=$korisnikModel->pronadjiUlogu($promovisani);\n if($stara_uloga=='OBICAN' || $stara_uloga==\"ADMIN\") { \n return redirect()->to( $_SERVER['HTTP_REFERER']);\n }\n $uloga=$this->request->getVar('uloga');\n if($uloga=='admin') $nova_uloga='ADMIN';\n else if($uloga=='mod') $nova_uloga='MODERATOR';\n $korisnikModel->promovisi($promovisani, $stara_uloga, $nova_uloga);\n return redirect()->to( $_SERVER['HTTP_REFERER']);\n \n }", "public function etatmobilisateuradminAction()\n {\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 $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateuradmin');\n }", "public function invitMembre($slug)\n {\n if(isset($_SESSION['user']))\n {\n if($this->allowToTwo('Admin','Assoc',$slug)){\n\n $donnee = $this->listing('Assoc',$slug);\n\n if($_POST){\n $r_POST = $this->nettoyage($_POST);\n $error['mail'] = ValidationTools::emailValid($r_POST['mail']);\n\n $assocModel = new AssocModel;\n $nom_assoc = $assocModel->FindElementByElement('nom','slug',$slug);\n $id_assoc = $assocModel->FindElementByElement('id','slug',$slug);\n\n if(ValidationTools::IsValid($error)){\n if(!is_numeric($r_POST['mail'])){ //si c'est ce n'est pas id on verifie si eventuelemt il le mail\n //exist en base en base de donnee\n $UserModel = new UserModel;\n $contactModel = new ContactModel;\n\n if($UserModel->emailExists($r_POST['mail'])){ //si oui on recupere l'id\n $r_POST['mail'] = $UserModel->FindElementByElement('id','mail',$r_POST['mail']);\n $r_POST['destinataire_orga'] = 'users';\n $RolesModel = new RolesModel;\n $roleRetourner = $RolesModel->FindRole($id_assoc,$r_POST['mail']);\n\n if(!empty($roleRetourner)){\n\n $confirmation ='Cet utilisateur fait déjà partie de l\\'Association';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n\n }\n\n }else {\n $r_POST['destinataire_orga'] = 'public';\n $r_POST['destinataire_status'] = 'del';\n }\n\n $invitation = $contactModel->findInvitation($r_POST['mail'],$id_assoc);\n if(!empty($invitation)){\n $confirmation ='Une invitation a déjà été envoyée à cette personne';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n }\n\n if($contactModel->findDemande($r_POST['mail'],$id_assoc)){\n $confirmation ='Une demande pour rejoindre l\\'Association a déjà faite par ce membre, merci de consulter les messages reçus de l\\'Association pour pouvoir y répondre';\n\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n }\n }\n\n unset($r_POST['submit']);\n\n $r_POST['emeteur_pseudo'] = $nom_assoc;\n $r_POST['objet'] = 'Invitation a rejoindre '.$nom_assoc ;\n $r_POST['emeteur_mailOrId'] = $id_assoc;\n $r_POST['destinataire_mailOrId'] = $r_POST['mail'];\n $r_POST['emeteur_orga'] = 'assoc';\n $r_POST['date_envoi'] = date('Y-m-d H:i:s');\n $r_POST['status'] = 'non-lu';\n $ok = false;\n\n\n if(is_numeric($r_POST['mail'])){\n //on envoi en interne une invite\n\n unset($r_POST['mail']);\n\n $r_POST['contenu'] = 'Bonjour,<br/>\n Nous serions très heureux de pouvoir vous compter parmi nous et vous invitons donc à rejoindre notre Association ! Pour en savoir plus sur nos activités n\\'hésitez pas à visiter <a href=\"'.$this->generateUrl('racine_assoc',['orga'=>'assoc','slug'=>$slug],true).'\">notre page</a> !<br/>\n A bientôt !';\n\n if($contactModel->insert($r_POST,false)){\n $ok = true;\n }\n }else {\n unset($r_POST['mail']);\n\n\n $r_POST['contenu'] = 'Bonjour, <br/>\n Nous serions très heureux de pouvoir vous compter parmi nous ! Pour en savoir plus sur nos activités n\\'hésitez pas à visiter <a href=\"'.$this->generateUrl('racine_assoc',['orga'=>'assoc','slug'=>$slug],true).'\">notre page</a> !<br/>\n Cependant, vous devez au préalable être inscrit sur le site.<br/>\n <a href=\"'.$this->generateUrl('racine_inscriptForm',[],true).'\">Cliquez ici</a> pour vous inscrire et devenir aussitôt un de nos membres !<br/>\n A bientôt !';\n\n $contactModel = new ContactModel;\n $contactModel->insert($r_POST,false);\n $mail = new PHPMailer();\n $mail->CharSet = \"utf8\";\n //$mail->SMTPDebug = 3; // Enable verbose debug output\n $mail->isMail();\n $mail->setFrom('[email protected]', 'Mailer');\n $mail->addAddress($r_POST['destinataire_mailOrId'], '[email protected]');\n $mail->addReplyTo('no-reply@as-co-ma', 'Information');\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = $r_POST['objet'];\n $mail->Body = $r_POST['contenu'];\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n if($mail->send()) {\n $ok = true;\n }\n }\n if($ok){\n $confirmation = 'L\\'invitation a bien été envoyée';\n }else {\n $confirmation = 'L\\'invitation n\\'a pas pu être envoyée suite à un problème technique';\n }\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'confirmation'=>$confirmation]);\n }else {\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'error'=>$error]);\n }\n\n }else {\n\n $error['mail']= 'Merci de saisir un mail';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'error'=>$error]);\n\n }\n\n }\n }else{\n $this->redirectToRoute('racine_form');\n }\n }", "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 }", "public function pagelisteMembre(){\n \n $userModel = new User();\n $lisAllUser = $userModel->getAllUser(bdd::GetInstance());\n\n //Récupération du rôle du compte\n $role = UserController::roleNeed();\n $isConnected = 1;\n\n return $this->twig->render('Dashboard/listeMembre.html.twig',[\n 'allContact'=> $lisAllUser,\n 'role'=>$role,\n 'isConnected' => $isConnected\n ]);\n\n }", "public function removeSpecialisation(){\n\n\t\t$user_id = Input::get('user_id');\n\t\t\n\t\t$redirectTo = ( $user_id != 0 ? 'admin/users/'.$user_id : 'admin/adresses/'.Input::get('adresse_id') );\n\n\t\t$this->adresse->removeSpecialisation(Input::get('specialisation_id'),Input::get('adresse_id'));\n\n return Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'La spécialisation a été supprimé'));\n\n\t}", "public function custompromotion() {\n\n $sessionstaff = $this->Session->read('staff');\n $options6['conditions'] = array('Promotion.clinic_id' => $sessionstaff['clinic_id'], 'Promotion.default' => 0, 'Promotion.is_lite' => 0,'Promotion.is_global'=>0);\n $Promotionlist = $this->Promotion->find('all', $options6);\n $this->set('Promotions', $Promotionlist);\n\n $checkaccess = $this->Api->accesscheck($sessionstaff['clinic_id'], 'Promotions');\n if ($checkaccess == 0) {\n $this->render('/Elements/access');\n }\n }", "public function suprDiplomePossede()\n {\n //sécurité :\n $action = 'deleteFolderInformation';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n //on réccupère l'id à supr (clée primaire)\n $id = $this->request->getGetAttribute('id');\n //ajout d'une entrée dans le fichier de log\n $data = DossierManager::getPossedeByClef($id);\n $auth = AuthenticationManager::getInstance();\n $username = $auth->getMatricule();\n $type = 'possedeDiplome';\n self::logDeletedInformation($data, $username, $type);\n //on supprime (retourne le matricule)\n $matricule = DossierManager::suprDiplomePossedeById($id);\n //on réaffiche le dossier actualisé\n $dossier = DossierManager::getOneFromId($matricule);\n $prez = self::afficheDossierComplet($dossier);\n $this->response->setPart('contenu', $prez);\n } else{\n header(\"location: index.php\");\n die($error);\n }\n }", "public function peticion(){\n\t\t//1' el nombre del nonce que creamos\n\t\t//2' par es el argumento de la consulta recibida desde la peticion de js con ajax\n\t\tcheck_ajax_referer('mp_seg', 'nonce');\n\t\t\n\t\tif( isset($_POST['action'] ) ) {\n\t\t\t\n\t\t\n\t\t\t//procesar informacion\n\t\t\t//guardad DDBB, guardar algunas opciomnes un USER_meta, metadato\n\t\t\t$nombre = $_POST['nombre'];\n\t\t\techo json_encode([\"resultado\" => \"Hemos recibido correctamente el nombre: $nombre\"]);\n\t\t\t\n\t\t\twp_die();//cortar toda comunicacion\n\t\t}\n\t}", "function manage_mobile_number() {\n\n\t\t$this->authentication->is_user_logged_in(TRUE, 'user/login');\n\n\t\t$iAccountNo = s('ACCOUNT_NO');\n\t\t$aWhere = array(\n\t\t\t\t\t\t'status' => $this->aUserStatus['active'],\n\t\t\t\t\t);\n\t\tif( ! $this->mcontents['oUser'] = $this->user_model->getUserBy('account_no', $iAccountNo, 'basic', $aWhere) ) {\n\n\t\t\tsf('error_message', 'You cannot access this section right now');\n\t\t\tredirect('home');\n\t\t}\n\n\n\n\n\n\t\tif( isset($_POST) && ! empty($_POST) ) {\n\n\t\t\tif( safeText('verification_request') == '1' ) {\n\n\t\t\t\tif($this->mcontents['oUser']->mobile_verification_status == $this->mcontents['aUserMobileVerificationStatus']['no_sms_verification_done']) {\n\n\t\t\t\t\t// initiate steps to verify mobile number\n\t\t\t\t\t$this->user_model->initiateMobileNumVerification($iAccountNo);\n\t\t\t\t\tredirect('user/verify_mobile_number');\n\n\t\t\t\t} else {\n\n\t\t\t\t\t$this->merror['error'][] = 'There is some issue issue with mobile number verification. Please contact website admin';\n\t\t\t\t\tlog_message('error',\n\t\t\t\t\t\t\t\t\t\"controller => manage_mobile_number\".\n\t\t\t\t\t\t\t\t\t\"/n Account NO: \" . $iAccountNo .\n\t\t\t\t\t\t\t\t\t\"/nIssue : Undesired Else condition encountered\"\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tloadTemplate('user/manage_mobile_number');\n\t}", "public function choosePrize(){\n if($this->adminVerify()){\n\n }else{\n echo \"Vous devez avoir les droits administrateur pour accéder à cette page\";\n }\n }", "function deletepanier($user, $product){\t\t// Fonction pour supprimer un produit du panier\n\n\t\tinclude(\"../../modele/modele.php\");\n\n\t\t$sql = 'SELECT * FROM detailcommande WHERE id_product= \"'.$product.'\" AND id_user= \"'.$user.'\" AND actif = 1';\n\t\t$reponse = $bdd->query($sql);\n\t\t\n\t\twhile ($donnees = $reponse->fetch())\n\t\t{\n\t\t\t$sql2 = 'DELETE FROM commande WHERE id_user = \"'.$user.'\" AND id_detailCommande = \"'.$donnees['id'].'\" AND actif = 1 ';\n\t\t\t$reponse2 = $bdd->prepare($sql2);\n\t\t\t$reponse2 ->execute();\n\t\t}\n\t\t$sql3 = 'DELETE FROM detailcommande WHERE id_product= \"'.$product.'\" AND id_user= \"'.$user.'\" AND actif = 1 ';\n\t\t$reponse3 = $bdd->prepare($sql3);\n\t\t$reponse3 ->execute();\n\n\t}", "public function ratereviewpromotion() {\n\n $sessionstaff = $this->Session->read('staff');\n $options6['conditions'] = array('Promotion.clinic_id' => $sessionstaff['clinic_id'], 'Promotion.is_global' => 0,'Promotion.default'=>2,'Promotion.is_lite'=>0);\n $Promotionlist = $this->Promotion->find('all', $options6);\n $this->set('promotionlist', $Promotionlist);\n //function to check access control for practice staff\n if($sessionstaff['staff_role']=='Doctor' && $sessionstaff['staffaccess']['AccessStaff']['rate_review']==1){\n \n }else{\n $this->render('/Elements/access');\n }\n }", "function delete_form()\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\tif ($this->ipsclass->input['id'] < 5)\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Вы не можете перемещать группы, которые используются в данный момент, но переименовать и отредактировать функции можно\");\n\t\t}\n\n\t\t$this->ipsclass->admin->page_title = \"Удаление пользовательской группы\";\n\n\t\t$this->ipsclass->admin->page_detail = \"Пожалуйста, убедитесь в том, что хотите удалить данную группу.\";\n\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as users', 'from' => 'members', 'where' => \"mgroup=\".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t$black_adder = $this->ipsclass->DB->fetch_row();\n\n\t\tif ($black_adder['users'] < 1)\n\t\t{\n\t\t\t$black_adder['users'] = 0;\n\t\t}\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as users', 'from' => 'members', 'where' => \"mgroup_others LIKE '%\".intval($this->ipsclass->input['id']).\"%'\" ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t$extra_group = $this->ipsclass->DB->fetch_row();\n\n\t\tif ($extra_group['users'] < 1)\n\t\t{\n\t\t\t$extra_group['users'] = 0;\n\t\t}\n\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'g_title', 'from' => 'groups', 'where' => \"g_id=\".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t$group = $this->ipsclass->DB->fetch_row();\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'where' => \"g_id <> \".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t$mem_groups = array();\n\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Leave out root admin group\n\t\t\t//-----------------------------------------\n\n\t\t\tif ( $this->ipsclass->vars['admin_group'] == $r['g_id'] )\n\t\t\t{\n\t\t\t\tif ( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'] )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$mem_groups[] = array( $r['g_id'], $r['g_title'] );\n\t\t}\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dodelete' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'act' , 'group' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 3 => array( 'id' , $this->ipsclass->input['id'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 4 => array( 'name' , $group['g_title'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 5 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\n\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"40%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"60%\" );\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Подтверждение перемещения: \".$group['g_title'] );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Количество пользователей в этой группе</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t \"<b>\".$black_adder['users'].\"</b>\",\n\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Количество пользователей с этой группой, как <u>вторичная</u> группа</b><br /><i>Эта вторичная группа будет удалена у этих пользователей.</i>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t \"<b>\".$extra_group['users'].\"</b>\",\n\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Переместить пользователей из этой группы в...</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_dropdown(\"to_id\", $mem_groups )\n\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form(\"Удалить эту группу\");\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\t\t$this->ipsclass->admin->output();\n\t}", "public function commandeSpecialFormTraitement(){\n\n // Récupération des informations du formulaire de contact\n $nom = $this->verifierSaisie(\"nom\");\n $prenom = $this->verifierSaisie(\"prenom\");\n $email = $this->verifierSaisie(\"email\");\n $sujet = $this->verifierSaisie(\"sujet\");\n $message = $this->verifierSaisie(\"message\");\n\n // Sécurité\n if ( $this->verifierEmail($email)\n && ($nom != \"\")\n && ($prenom != \"\")\n && ($sujet != \"\")\n && ($message != \"\") ){\n\n \n // message pour l'utilisateur\n // $GLOBALS[\"contactRetour\"] = \"<p class='bg-success'>Merci $prenom, votre message est bien envoyé !</p>\";\n $GLOBALS[\"commandeSpecialRetour\"] = \"<span class='glyphicon glyphicon-ok' aria-hidden='true'></span> Merci $prenom, votre message a bien été envoyé !\";\n }\n\n else{\n // $GLOBALS[\"contactRetour\"] = \"Il manque des informations\";\n $GLOBALS[\"commandeSpecialRetour\"] = \"<span class='glyphicon glyphicon-alert' aria-hidden='true'></span> Il manque des informations !\";\n }\n\n }", "private function aprobarDetalleSolicitud()\r\n {\r\n $result = false;\r\n $idGenerado = 0;\r\n // modelo de InscripcionSucursal.\r\n $modelInscripcion = self::findInscripcionSucursal();\r\n if ( $modelInscripcion !== null ) {\r\n if ( $modelInscripcion['id_contribuyente'] == $this->_model->id_contribuyente ) {\r\n $result = self::updateSolicitudInscripcion($modelInscripcion);\r\n if ( $result ) {\r\n $idGenerado = self::crearContribuyente($modelInscripcion);\r\n if ( $idGenerado > 0 ) {\r\n $result = true;\r\n } else {\r\n $result = false;\r\n }\r\n }\r\n } else {\r\n self::setErrors(Yii::t('backend', 'Error in the ID of taxpayer'));\r\n }\r\n } else {\r\n self::setErrors(Yii::t('backend', 'Request not find'));\r\n }\r\n\r\n return $result;\r\n }", "public function listmobilisateurAction() {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $mobilisateur = new Application_Model_EuMobilisateurMapper();\n $this->view->entries = $mobilisateur->fetchAllByMembre($sessionmembre->code_membre);\n\n $this->view->tabletri = 1;\n }", "function form_action()\r\n {\r\n $success = true ;\r\n\r\n $swimmeet = new SwimMeet() ;\r\n $swimmeet->PurgeSwimMeets() ;\r\n\r\n $this->set_action_message(html_div(sprintf('ft-%s-msg',\r\n $swimmeet->getAffectedRows() == 0 ? 'warning' : 'note'),\r\n sprintf('%d record%s purged from Swim Meets database.',\r\n $swimmeet->getAffectedRows(),\r\n $swimmeet->getAffectedRows() == 1 ? '' : 's'))) ;\r\n\r\n unset($swimmeet) ;\r\n\r\n return $success ;\r\n }", "public function Preferiti() {\n $session = Sessione::getInstance();\n if($session->isLoggedUtente()){\n $utente = $session->getUtente();\n $idutente = $utente->getId();\n $pm = FPersistentManager::getInstance();\n $ut = $pm->loadById(\"utente\", $idutente);\n $ricette = $ut->getPreferiti();\n if($ricette!=null){\n $msg = \"\";\n } else {\n $msg = \"Non hai ricette preferite\";\n }\n $view = new VPreferiti();\n $view->mostraPreferiti($ricette, $msg);\n\n } else {\n header('Location: /myRecipes/web/Utente/Login');\n }\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 verificarenvio($expediente,$usuario){\n \n $parametros=array($expediente);\n $query=$this->db->query(\"select t.cTramiteTipoPersona,e.nExpedienteCodigo from tb_sistram_expediente as e inner join tb_sistram_tramite as t on e.nTramiteId=t.nTramiteId where e.nExpedienteId=?\",$parametros);\n if($query){\n $row=$query->row();\n $tipopersona=$row->cTramiteTipoPersona;\n if($usuario==$tipopersona){\n return true;\n }\n else {\n $this->setExpGenerado($row->nExpedienteCodigo);\n return false;\n }\n \n }\n \n \n }", "public static function disabilita(MImmobile $immobile) :bool\n {\n $db=FDataBase::getInstance();\n return $db->updateDB(self::class,\"attivo\",false,\"id\",$immobile->getId());\n }", "public function suprAffectation()\n {\n //sécurité :\n $action = 'deleteFolderInformation';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n //on réccupère l'id à supr (clée primaire)\n $id = $this->request->getGetAttribute('id');\n //ajout d'une entrée dans le fichier de log\n $data = DossierManager::getAffectationByClef($id);\n $auth = AuthenticationManager::getInstance();\n $username = $auth->getMatricule();\n $type = 'affectationCaserne';\n self::logDeletedInformation($data, $username, $type);\n //on supprime (retourne le matricule)\n $matricule = DossierManager::suprAffectationById($id);\n //on réaffiche le dossier actualisé\n $dossier = DossierManager::getOneFromId($matricule);\n $prez = self::afficheDossierComplet($dossier);\n $this->response->setPart('contenu', $prez);\n } else{\n header(\"location: index.php\");\n die($error);\n }\n }", "public function negados(): void\n {\n $dados['title'] = 'Negados';\n $dados['procedimentos'] = $this->Procedimentos->porPaciente(['negado_por !=' => NULL]);\n\n $this->view('regulacao/procedimentos/Negados_view', $dados);\n }", "public function decopersonnel()\n {\n $this->session-> unset_userdata('admin','info','id');\n $this ->session->sess_destroy();\n $this->template->display('acceuil');\n }", "public function supprimmerPanier($numPanier)\n { $reqSupprimmerPanier = \"DELETE FROM panier WHERE numPanier = '$numPanier'\" ;\n mysqli_query($this->co, $reqSupprimmerPanier) or die(\"erreur suppression du panier dans la BD\") ;\n }", "function eliminarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_ime';\n\t\t$this->transaccion='GEM_GEMETO_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_metodologia','id_metodologia','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "static public function ctrEliminarRepuesto(){\n\n\t\tif(isset($_GET[\"idProducto\"])){\n\n\t\t\t$tabla =\"repuestos\";\n\t\t\t$datos = $_GET[\"idProducto\"];\n\n\t\t\tif($_GET[\"imagen\"] != \"\" && $_GET[\"imagen\"] != \"vistas/img/productos/default/anonymous.png\"){\n\n\t\t\t\tunlink($_GET[\"imagen\"]);\n\t\t\t\trmdir('vistas/img/productos/'.$_GET[\"codigo\"]);\n\n\t\t\t}\n\n\t\t\t$respuesta = ModeloProductos::mdlEliminarRepuesto($tabla, $datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El producto ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"productos\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t}\n\n\n\t}", "public function usermobilebyLocationsAction() {\n $this->_helper->content->setEnabled();\n }", "public function supprimerPersonne($nump){\n $requete = $this->db->prepare(\n \"DELETE from personne where per_num='$nump';\");\n\n $retour=$requete->execute();\n return $retour;\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 exec_groupe_supprimer_dist() {\r\n\tif (!autoriser('voir', 'nom')) {\r\n\t\tinclude_spip('inc/minipres');\r\n\t\techo minipres();\r\n\t\texit;\r\n\t}\r\n\r\n\r\n\tsupprimer_groupe_func(_request('id_groupe'));\r\n}", "public function affichageAction() {\r\n \r\n $em=$this->getDoctrine()->getManager();\r\n $products=$em->getRepository('HologramBundle:Product')->findBy(array('etat'=>'en attente'));\r\n return $this->render('HologramBundle:Back:produitsNonValides.html.twig',array('prod'=>$products));\r\n }", "public function displayPanier($id_utilisateur)\n {\n $model = new \\Model\\Panier();\n $tab = $model->selectAllWhereFetchAll('panier', 'id_utilisateur', $id_utilisateur);\n echo \"<div class='mise_en_page_panier'>\n <h2>Mon Panier</h2>\";\n echo \"<table>\";\n // $sumPrix = 0;\n foreach ($tab as $value) {\n echo \" <tr>\n <td><img class='img_panier' src='\" . $value['image_article'] . \"'></td>\n <td>\" . $value['titre'] . \"</td>\n <td>\" . $value['prix'] . \"€</td>\n\n <form action='' method='GET'>\n <td><button type='submit' id='suppr_element_panier' name='suppr_element_panier' value='\" . $value['id'] . \"'>Supprimer</button></td>\n </form>\n \n </tr>\";\n if (isset($_GET['suppr_element_panier'])) {\n $model->deleteOneWhereId('panier', $_GET['suppr_element_panier']);\n $Http = new \\http();\n $Http->redirect('panier.php');\n }\n $controller = new \\Controller\\Panier();\n\n $sumPrix = $controller->sumPrice($id_utilisateur);\n // $sumPrix += $int = intval($value['prix']);\n\n }\n echo \"</table>\";\n echo \"</div>\";\n\n\n\n // il faut incorporer le choix de l'adresse de paiement avant cette etape et \n // faire un récapitulatif de paiement et historique \n\n // ADRESSE \n // echo \"<div class='adress_block'>\";\n $controllerDisplayProfil = new \\Controller\\DisplayProfil();\n $controllerDisplayProfil->displayAdressPanier();\n // echo \"</div>\";\n\n // foreach($tab as $value){\n // $id_utilisateur = $value['id_utilisateur'];\n // $id_article = $value['id_article'];\n // $image_article = $value['image_article'];\n // $titre = $value['titre'];\n // $prix = $value['prix'];\n\n // $model->insertCommande($id_utilisateur, $id_article, $image_article, $titre, $prix, $_POST['profilAdressSelect']);\n echo \"<span class='prix'>Montant Total:\" . $sumPrix . \"€</span>\";\n\n\n if (isset($_POST['profilAdressSelect'])) {\n\n echo \"<form action='paiement.php' method='POST'>\n <button type='submit' class='paiement_button' id='prix' name='prix' value='\" . $sumPrix . \"'><span>Proceder au paiement</span></button>\n \n </form>\";\n $_SESSION['adresseSelected'] = $_POST['profilAdressSelect'];\n } else {\n echo \"\n <button type='submit' class='paiement_button_disabled' id='prix' name='prix' ><span>Proceder au paiement</span></button>\";\n }\n\n echo \"<p class='p_indication'>Veuillez choisir une adresse parmis celle(s) que vous avez renseigné</p>\";\n }", "function getNumUnsubmit($conn,$user='') {\n\t\t\t$periode = Akademik::getPeriode();\n\t\t\tif(empty($user))\n\t\t\t\t$user = Modul::getUserName();\n\t\t\t\n\t\t\t$sql = \"select count(t.*) from \".static::table().\" t\n\t\t\t\t\tjoin akademik.ak_krs k using (thnkurikulum,kodemk,kodeunit,periode,kelasmk)\n\t\t\t\t\tleft join \".static::table('el_tugasdikumpulkan').\" s on s.idtugas = t.idtugas and s.nim = '$user'\n\t\t\t\t\twhere t.periode = '$periode' and k.nim = '$user' and s.nim is null\";\n\t\t\t\n\t\t\treturn $conn->GetOne($sql);\n\t\t}", "public function noPrivilege() {\n \n $this->view->incarcaPagina('noPrivilege.php');\n }", "public function actionDevis() {\n // $this->metaD = 'Demandez un devis et votre conseiller personnel vous répondra sous 48h et vous aidera à construire le circuit le mieux adapté à votre demande.';\n if(!$_POST){\n Yii::$app->session->set('backUrl', Yii::$app->request->referrer);\n }\n $this->layout = 'main-form';\n if(IS_MOBILE)\n $this->layout = 'mobile-form';\n\t\t $theEntry = Page::get(20);\n $this->root = $theEntry;\n if (!$theEntry) throw new HttpException(404, 'Page ne pas trouvé!');\n\t\t $this->getSeo($theEntry->model->seo);\n\t\t \n $allCountries = Country::find()->select(['code', 'dial_code', 'name_fr'])->orderBy('name_fr')->asArray()->all();\n $allDialCodes = Country::find()->select(['code', 'CONCAT(name_fr, \" (+\", dial_code, \")\") AS xcode'])->where('dial_code!=\"\"')->orderBy('name_fr')->asArray()->all();\n\n $model = new DevisForm;\n \n $model->scenario = 'devis_short';\n if(IS_MOBILE) {\n $model = new DevisFormMobile;\n $model->scenario = 'devis_short_mobile';\n \n }\n \n\n $model->country = isset($_SERVER['HTTP_CF_IPCOUNTRY']) ? strtolower($_SERVER['HTTP_CF_IPCOUNTRY']) : 'fr';\n $model->countryCallingCode = isset($_SERVER['HTTP_CF_IPCOUNTRY']) ? strtolower($_SERVER['HTTP_CF_IPCOUNTRY']) : 'fr';\n \n \n if ($model->load($_POST) && $model->validate()) {\n \n// $model->fname = preg_split(\"/\\s+(?=\\S*+$)/\", $model->fullName)[0];\n// $model->lname = '';\n// if (isset(preg_split(\"/\\s+(?=\\S*+$)/\", $model->fullName)[1])) {\n// $model->lname = preg_split(\"/\\s+(?=\\S*+$)/\", $model->fullName)[1];\n// }\n \n $data2 = $this->processingDataAllForm($model); \n\n $data = [\n // 'firstname' => $model->fname,\n // 'lastname' => $model->lname,\n 'fullName' => $model->fullName,\n 'codecontry' => $model->country,\n 'sex' => $model->prefix\n ];\n if($model->newsletter)\n $data = [\n // 'firstname' => $model->fname,\n // 'lastname' => $model->lname,\n 'fullName' => $model->fullName,\n 'codecontry' => $model->country,\n 'source' => 'newsletter',\n 'newsletter_insc' => date('d/m/Y'),\n 'statut' => 'prospect',\n 'birmanie' => false,\n 'vietnam' => false,\n 'cambodia' => false,\n 'laos' => false\n ];\n $listID = $model->newsletter ? 1688900 : 1711181;\n $this->addContactToMailjet($model->email, $listID, $data); \n // Email me\n $this->notifyAmica('Devis from ' . $model->email, '//page2016/email_template', ['data2' => $data2]);\n $this->confirmAmicaDevis($model->email, ['reasonEmail' => 'contact', 'name' => $model->prefix.' '.$model->fullName, 'data' => $model]);\n \n if (IS_MOBILE) {\n \n// $model->fname = preg_split(\"/\\s+(?=\\S*+$)/\", $model->fullName)[0];\n// $model->lname = '';\n// if (isset(preg_split(\"/\\s+(?=\\S*+$)/\", $model->fullName)[1])) {\n// $model->lname = preg_split(\"/\\s+(?=\\S*+$)/\", $model->fullName)[1];\n// }\n if (!$model->has_date) {\n $model->departureDate = null;\n $model->tourLength = null;\n }\n $contact = '';\n if($model->contactEmail) $contact .= $model->email;\n if($model->contactEmail && $model->contactPhone) $contact .= ' ,';\n if($model->contactPhone) $contact .= $model->phone;\n \n \n \n $this->saveInquiry($model, 'Form-devis-mobile', $data2);\n } else { \n // var_dump($model);exit; \n\n\n $this->saveInquiry($model, 'Form-devis', $data2);\n // If he subscribes to our newsletter\n // if ($model->newsletter == 1) $this->saveNlsub($model, 'Form-devis');\n \n }\n \n Yii::$app->session->set('sex', $model->prefix);\n Yii::$app->session->set('name', $model->fullName);\n return Yii::$app->response->redirect(DIR.'merci?from=devis&id='.$this->id_inquiry);\n }\n\n return $this->render(IS_MOBILE ? '//page2016/mobile/devis_short_mobile' : '//page2016/devis-short', [\n\t\t\t\t\t'theEntry' => $theEntry,\n 'model' => $model,\n 'allCountries' => $allCountries,\n 'allDialCodes' => $allDialCodes,\n ]);\n }", "public function membre(){\n\n\t\t$user_id = Input::get('user_id');\n\n\t\t$redirectTo = ( $user_id ? 'admin/users/'.$user_id : 'admin/adresses/'.Input::get('adresse_id') );\n\n if( $this->adresse->addMembre(Input::get('membre_id') , Input::get('adresse_id')) )\n {\n return Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'L\\'appartenance comme membre a été ajouté') );\n }\n\n return Redirect::to($redirectTo)->with( array('status' => 'danger' , 'message' => 'L\\'utilisateur à déjà l\\'appartenance comme membre') );\n\n\t}", "function delete_motif($id_motif) {\n $connexion = get_connexion();\n $sql = \"DELETE FROM motif WHERE id_motif =:id_motif\";\n try {\n $sth = $connexion->prepare($sql);\n $sth->execute(array(\":id_motif\" => $id_motif));\n } catch (PDOException $e) {\n throw new Exception(\"Erreur lors de la requête SQL : \" . $e->getMessage());\n }\n $nb = $sth->rowcount();\n return $nb; // Retourne le nombre de suppression\n}", "public function addmobilisateuradminAction() {\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');}\n if($sessionutilisateur->confirmation != \"\") {$this->_redirect('/administration/confirmation');}\n\n\n\n if(isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if(isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if($request->isPost()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n /////////////////////////////////////controle code membre\n if(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\n if(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n } else {\n if(substr($_POST['code_membre'], -1, 1) == 'P') {\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n } else if(substr($_POST['code_membre'], -1, 1) == 'M') {\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n }\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n ////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionutilisateur->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateuradmin');\n } else {\n $db->rollback();\n $sessionutilisateur->error = \"Veuillez renseigner le Code Membre ...\";\n } \n } catch(Exception $exc) { \n $db->rollback();\n $sessionutilisateur->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionutilisateur->error = \"Champs * obligatoire\";\n }\n }\n }", "public function suprRegimentAppartenance()\n {\n //sécurité :\n $action = 'deleteFolderInformation';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n //on réccupère l'id à supr (clée primaire)\n $id = $this->request->getGetAttribute('id');\n //ajout d'une entrée dans le fichier de log\n $data = DossierManager::getAppartenanceByClef($id);\n $auth = AuthenticationManager::getInstance();\n $username = $auth->getMatricule();\n $type = 'appartenanceRegiment';\n self::logDeletedInformation($data, $username, $type);\n //on supprime (retourne le matricule)\n $matricule = DossierManager::suprRegimentAppartenanceById($id);\n //on réaffiche le dossier actualisé\n $dossier = DossierManager::getOneFromId($matricule);\n $prez = self::afficheDossierComplet($dossier);\n $this->response->setPart('contenu', $prez);\n } else{\n header(\"location: index.php\");\n die($error);\n }\n }", "public function verifArticle(){//Fonction qui s'active après qu'il y ait eu Validation\n\n //mettre les $_POST en variable.\n if (isset($_POST['nom_article'])&& !empty($_POST['nom_article'])&& isset($_POST['theme1'])&& ($_POST['theme1']!=\"choix\") && isset($_POST['contenu'])&& !empty($_POST['contenu'])){\n $this->recordArticle();\n\n } else {\n\n \t$_SESSION['nom_article']=$_POST['nom_article'];//permet de maintenir le nom de l'article en place si il y a des champs manquant\n \t$_SESSION['contenu']=$_POST['contenu'];//conserve le contenu si il y a des champs manquant\n\n\n $message='Oups, on dirait que tout les champs n&#8217ont pas été remplis, si vous changez de page maintenant, vos données seront perdu';\n\n echo '<script type=\"text/javascript\">window.alert(\"'.$message.'\");</script>';\n\n\n \t\t}\n \t}", "function supprimePanier()\n {\n\tif (isset($_SESSION['panier']))\n\t{\n unset($_SESSION['panier']);\n\t}\n}", "public function noownershipAction() {\n \t// assegno i valori alla view\n $this->viewInit();\n \t$this->view->title = parent::$_config->application->name.\" - Accesso Negato\";\n \t$this->view->pagetitle = \"Accesso Negato\";\n \t$this->view->message = \"Stai tentando di accedere a una risorsa che non possiedi. Per quale motivo stai facendo questo?\";\n }", "public function VerificaDisponibilidade()\n\t{\n\t\t$this->loadModel('Cliente');\n\t\t$disponibilidade = $this->Cliente->find('count', array(\n\t\t\t'conditions' => \n\t\t\t\tarray(\n\n\t\t\t\t\t'Cliente.id' => $this->request->data['id_cliente'],\n\t\t\t\t\t'Cliente.site_no_ar' => 'S'\n\t\t\t\t)\n\t\t\t));\n\t\t\n\t\tif($disponibilidade == 0)\n\t\t{\n\t\t\t$this->Return = false;\n\t\t\t$this->Message = 'SITEFECHADO';\n\t\t\t$this->EncodeReturn();\t\n\t\t}\n\t}", "public function deleteUser($email,$telefon=''){\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n if (isAdmin($_SESSION[\"jog\"])) {\n try{\n if ($this->userModel->deleteUserByAdmin($telefon) && $this->userModel->deleteUserByAdmin0($email) && $this->userModel->deleteFromUserCartItems($email)) { \n flash('deleted','A '.$email.' felhasználó törlése sikeres volt!','alert alert-success');\n redirect('admins/userHandler');\n }else{\n flash('deleted','A '.$email.' felhasználó törlése sikertelen volt sajnos!','alert alert-danger');\n redirect('admins/userHandler');\n }\n }catch(PDOException $ex){\n flash('deleted',$ex->getMessage(),'alert alert-danger');\n redirect('admins/userHandler');\n }finally{\n flash('deleted', 'Egyéb hiba történt');\n redirect('admins/userHandler');\n }\n }else{\n redirect('index');\n }\n }\n }", "public function customerForgotpassword($observer)\n {\n \n $settings = Mage::helper('smsnotifications/data')->getSettings();\n\n $customer_email =$_POST[\"email\"];\n $customer = Mage::getModel(\"customer/customer\");\n $customer->setWebsiteId(Mage::app()->getWebsite()->getId());\n $customer->loadByEmail($customer_email);\n $fname=$customer->getFirstname();\n $lname=$customer->getLastname();\n $email= $customer->getEmail();\n$telephone= $customer->getAddressesCollection()->getFirstitem()->getTelephone();\n\nif ($telephone) {\n $text = Mage::getStoreConfig('smsnotifications/customer_notification/password_status');\n $text = str_replace('{{firstname}}', $fname, $text);\n $text = str_replace('{{lastname}}', $lname, $text);\n $text = str_replace('{{emailid}}', $email, $text);\n //$text = str_replace('{{name}}', $customer_name, $text);\n $link=Mage::helper('customer')->getForgotPasswordUrl();\n $text = str_replace('{{link}}', $link, $text);\n array_push($settings['order_noficication_recipients'], $telephone);\n\n $result = Mage::helper('smsnotifications/data')->sendSms($text, $settings['order_noficication_recipients']);\n return;\n }\n\n }", "function usuarios_tesoreria_distintos()\n\t{\n\t\tif($_POST['responsable_tecnico_id']==$_POST['valuador_tesoreria_id'])\n\t\t{\n\t\t\t$this->CI->form_validation->set_message('usuarios_tesoreria_distintos', \"El responsable t&eacute;cnico y el valuador de Tesorer&iacute;a deben ser diferentes.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "public function verif()\n {;\n if(empty($_SESSION['pseudo']))\n {\n $_SESSION['erreur2'] = \"Vous devez vous connecter !\";\n header('Location:ContenuRecette?id='.$_SESSION['recette']);\n }\n else\n {\n if(empty($_POST['commentaireRecette']))\n {\n echo 'vide';\n }\n else\n {\n $commentaire = htmlspecialchars($_POST['commentaireRecette']);\n $test = new RecetteModel();\n $test->postCommentaire($commentaire,$_SESSION['pseudo'],$_SESSION['recette']);\n header('Location:ContenuRecette?id='.$_SESSION['recette']);\n }\n }\n \t\n }", "private function addRestrictionToMedInfo(){\n if (LoginHelper::isACurrentPatient() || !LoginHelper::isLoggedIn()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized........!!</p>');\n }\n }", "function SupprimerMessage($Utilisateur1,$Utilisateur2){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"DELETE FROM Messages WHERE ((mp_receveur='$Utilisateur1')||(mp_expediteur='$Utilisateur1'))&&((mp_receveur='$Utilisateur2')||(mp_expediteur='$Utilisateur2'))\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\t\r\n\t\tmysqli_close($conn);\r\n\t\t}", "function trouver_nombre_notification($id_auteur) {\n return sql_countsel('spip_notifications', 'id_auteur = '.intval($id_auteur).' AND lu != 1');\n}", "public function TresorieCommerciaux() {\n \n $em = $this->getDoctrine()->getManager();\n $entityCommercial=$em->getRepository('RuffeCardUserGestionBundle:User')->findClientNoPaiment(1);\n return $this->render ( \"RuffeCardTresorieBundle:Default:commerciauxPaiement.html.twig\", array ('Commercial'=>$entityCommercial));\n \n }", "function deleteThemengebietes() {\n\t\t$status = $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_topic_detail', 'uid='.intval(t3lib_div::_POST('uid')));\n\t\treturn $status;\n\t}", "function confirmRemoveImportantPagesObject()\n\t{\n\t\tglobal $ilCtrl, $tpl, $lng;\n\n\t\tif (!is_array($_POST[\"imp_page_id\"]) || count($_POST[\"imp_page_id\"]) == 0)\n\t\t{\n\t\t\tilUtil::sendInfo($lng->txt(\"no_checkbox\"), true);\n\t\t\t$ilCtrl->redirect($this, \"editImportantPages\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinclude_once(\"./Services/Utilities/classes/class.ilConfirmationGUI.php\");\n\t\t\t$cgui = new ilConfirmationGUI();\n\t\t\t$cgui->setFormAction($ilCtrl->getFormAction($this));\n\t\t\t$cgui->setHeaderText($lng->txt(\"wiki_sure_remove_imp_pages\"));\n\t\t\t$cgui->setCancel($lng->txt(\"cancel\"), \"editImportantPages\");\n\t\t\t$cgui->setConfirm($lng->txt(\"remove\"), \"removeImportantPages\");\n\n\t\t\tforeach ($_POST[\"imp_page_id\"] as $i)\n\t\t\t{\n\t\t\t\t$cgui->addItem(\"imp_page_id[]\", $i, ilWikiPage::lookupTitle((int) $i));\n\t\t\t}\n\n\t\t\t$tpl->setContent($cgui->getHTML());\n\t\t}\n\t}", "public function nieuwAction()\n\t\t{\n\t\t\t$this->requireUserType(array(CT_User::Directie));\n\n\t\t\t$this->getResponse()->appendBody(\n\t\t\t\t$this->_smarty->fetch('emailtemplate/nieuw.tpl'));\n\t\t}", "public function removeOneAction()\n\t{\n\t\t//vérification du statut d'admin\n\t\t$customersManager = new CustomersManager();\n\t\t$customer = $customersManager -> getLoginInfo();\n\t\tif (empty($customer) OR $customer['email'] != ADMIN_EMAIL)\n\t\t{\n\t\t\theader('Location:'.CLIENT_ROOT.'customers/account');\n\t\t\texit();\n\t\t}\n\n\t\t//sécurisation CSRF\n\t\tif(!array_key_exists('CSRFToken', $customer) OR !array_key_exists('CSRFToken', $_GET) OR $_GET['CSRFToken'] !== $customer['CSRFToken'])\n\t\t{\n\t\t\theader('Location:'.CLIENT_ROOT.'customers/account');\n exit();\n\t\t}\n\n\t\t//vérification des données reçues\n\t\tif (!isset($_GET) OR !isset($_GET['id']))\n\t\t{\n\t\t\theader('Location:'.CLIENT_ROOT.'customers/account');\n\t\t\texit();\n\t\t}\n\n\t\t//suppression du produit dans la BDD\n\t\t$id = $_GET['id'];\n\t\t$productsManager = new ProductsManager();\n\t\t$productRemoved = $productsManager -> removeOne($id);\n\t\tif ($productRemoved)\n\t\t{\n\t\t\t$_SESSION['alertMessages']['success'][] = 'Le produit a bien été supprimé.';\n\t\t\theader('Location: manageForm');\n\t\t\texit();\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$_SESSION['alertMessages']['error'][] = 'La suppression du produit a échoué.';\n\t\t\theader('Location: manageForm');\n\t\t\texit();\n\t\t}\n\t}", "function suppr_tache($id_tache)\r\n{\r\n\tglobal $objet;\r\n\tif(droit_acces($objet[\"tache\"],$id_tache)>=2){\r\n\t\tsuppr_objet($objet[\"tache\"],$id_tache);\r\n\t\tdb_query(\"DELETE FROM gt_tache_responsable WHERE id_tache=\".db_format($id_tache));\r\n\t}\r\n}", "function nbErreurs()\r\n{\r\n if (!isset($_REQUEST['erreurs'])) {\r\n return 0;\r\n } else {\r\n return count($_REQUEST['erreurs']);\r\n }\r\n/**\r\n * \\brief Ajoute le libellé d'une information au tableau des informations\r\n *\r\n * \\param String $msg Libellé de l'information\r\n *\r\n * \\return null\r\n */\r\n}", "public function actionDeixarSeguir(){\r\n $me = new MetodosExtras();\r\n \r\n $ss = new Sessao();\r\n $sm = new SeguirModel();\r\n $sm->setId($ss->devSessao('id'));\r\n $sm->setIdSeguir($_GET['usu']);\r\n \r\n \r\n $sd = new SeguirDAO();\r\n if($sd->dexarSeguir($sm) == 2):\r\n if($_GET['tp'] == 1):\r\n $me->redireciona('Artista/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=tres');\r\n else:\r\n $me->redireciona('Companhia/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=tres');\r\n endif;\r\n else:\r\n if($_GET['tp'] == 1):\r\n $me->redireciona('Artista/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=quatro');\r\n else:\r\n $me->redireciona('Companhia/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=quatro');\r\n endif;\r\n endif;\r\n }", "function action_instituer_forms_donnee_dist() {\n\t//$securiser_action();\n\t$arg = _request('arg');\n\t$hash = _request('hash');\n\t$id_auteur = $auteur_session['id_auteur'];\n\t$redirect = _request('redirect');\n\tif ($redirect==NULL) $redirect=\"\";\n\tif (!include_spip(\"inc/securiser_action\"))\n\t\tinclude_spip(\"inc/actions\");\n\tif (verifier_action_auteur(\"instituer_forms_donnee-$arg\",$hash,$id_auteur)==TRUE) {\n\t\n\t\tlist($id_donnee, $statut) = preg_split('/\\W/', $arg);\n\t\tif (!$statut) $statut = _request('statut_nouv'); // cas POST\n\t\tif (!$statut) return; // impossible mais sait-on jamais\n\n\t\t// if ($GLOBALS['spip_version_code']<1.92)\n\t\t\t// include_spip('inc/forms_compat_191');\n\t\t$id_donnee = intval($id_donnee);\n\n\t\tsql_update('spip_forms_donnees', array('statut'=>_q($statut)), \"id_donnee=\"._q($id_donnee));\n\t\t// spip_query(\"UPDATE spip_forms_donnees SET statut=\"._q($statut).\" WHERE id_donnee=\"._q($id_donnee));\n\t\t\n\t\tif ($rang_nouv = intval(_request('rang_nouv'))){\n\t\t\tinclude_spip(\"inc/forms\");\n\t\t\tForms_rang_update($id_donnee,$rang_nouv);\n\t\t}\n\t}\n}", "function incluir_click($sender, $param)\n {\n if ($this->IsValid)\n {\n $this->incluir->Enabled=False;//Se deshabilita boton incluir\n // se capturan los valores de los controles\n $aleatorio = $this->numero->Text;\n $cod_direccion = usuario_actual('cod_direccion');\n $cod_direccion=substr($cod_direccion, 1);\n $siglas = usuario_actual('siglas_direccion');\n $ano = $this->lbl_ano->Text;\n $asunto = str_replace(\"'\", '\\\\\\'', $this->txt_asunto->Text );\n $destinatario = str_replace(\"'\", '\\\\\\'', $this->txt_destinatario->Text );\n $enviadopor=usuario_actual('login');\n $fecha = cambiaf_a_mysql ($this->txt_fecha->Text);\n //$memo=$this->html1->text;\n //busca el nombre del remitente\n $sql3=\"select cedula from intranet.usuarios where(login='$enviadopor')\";\n $resultado3=cargar_data($sql3, $sender);\n $cedula=$resultado3[0]['cedula'];\n $sql3=\"select nombres, apellidos from organizacion.personas where(cedula='$cedula')\";\n $resultado3=cargar_data($sql3, $sender);\n $remitente=$resultado3[0]['nombres'].' '.$resultado3[0]['apellidos'];\n $criterios_adicionales=array('direccion' => $cod_direccion, 'ano' => $ano);\n $numero=proximo_numero(\"organizacion.memoranda\",\"correlativo\",$criterios_adicionales,$this);\n $numero=rellena($numero,4,\"0\");\n // se inserta en la base de datos\n $sql = \"insert into organizacion.memoranda\n (direccion, siglas, correlativo, ano, fecha, asunto, destinatario, status, memo, remitente)\n values ('$cod_direccion','$siglas','$numero','$ano','$fecha','$asunto','$destinatario','1','$memo', '$remitente')\"; \n $resultado=modificar_data($sql,$sender);\n /*$sql2=\"update organizacion.adjuntos set correlativo='$numero' where (correlativo='$aleatorio')\";\n $resultado2=modificar_data($sql2, $sender);*/ \n /* Se incluye el rastro en el archivo de bitácora */\n $descripcion_log = \"Incluido el Memorando: \".$siglas.\"-\".$numero.\"-\".$ano;\n inserta_rastro(usuario_actual('login'),usuario_actual('cedula'),'I',$descripcion_log,\"\",$sender);\n $this->LTB->titulo->Text = \"Solicitud de número de Memorando\";\n $this->LTB->texto->Text = \"Se ha registrado exitosamente el nuevo Memorando con el \".\n \"número: <strong>\".$siglas.\"-\".$numero.\"-\".$ano.\"</strong>\";\n $this->LTB->imagen->Imageurl = \"imagenes/botones/memoranda.png\";\n $this->LTB->redir->Text = \"epaper.incluir_memo\";\n $params = array('mensaje');\n $this->getPage()->getCallbackClient()->callClientFunction('muestra_mensaje', $params);\n\n //$this->mensaje2->setSuccessMessage($sender, \"Se ha registrado exitosamente el nuevo Memorando con el numero:\".$siglas.\"-\".$numero.\"-\".$ano, 'grow');\n\n }\n }", "function eliminarPreguntaAction ()\r\n {\r\n $this->view->volver=$this->session->avisoUrl;\r\n if ($this->_request->isGet()) {\r\n $mMensajeDetalle = new MensajeDetalle();\r\n // Consultamos el detalle mensaje\r\n $mensajeDetalle = $mMensajeDetalle->find($this->_request->getParam('id'));\r\n $data['idMensaje'] = $mensajeDetalle->ID_MENSAJE;\r\n $data['idDetalleMensaje'] = $mensajeDetalle->ID_DETALLE_MENSAJE;\r\n $data['idTipoMensaje'] = 2;\r\n $data['idUsr'] = $this->identity->ID_USR;\r\n if (count($mMensajeDetalle->getNroRespuestasMensaje($data)) == 0) {\r\n // Eliminamos el detalle mensaje\r\n $mMensajeDetalle->eliminarDetalleMensaje($data['idDetalleMensaje']);\r\n require_once 'Mensaje.php';\r\n $mMensaje = new Mensaje();\r\n $mUsuarioPortal = new UsuarioPortal();\r\n // Eliminamos el mensaje\r\n $mMensaje->eliminarMensaje($data['idMensaje']);\r\n try {\r\n $mAvisoInfo = new AvisoInfo();\r\n $datosAviso = $mAvisoInfo->obtenerDatos($mensajeDetalle->ID_REGISTRO);\r\n $emailDueno = $mUsuarioPortal->find($mensajeDetalle->IDCOMPRADOR);\r\n $datosUsuario = $mUsuarioPortal->find($this->identity->ID_USR);\r\n $emailModelo = new UsuarioPortal();\r\n $retornoEmail = $emailModelo->extraerEmail($mensajeDetalle->APODO);\r\n // Envio de correo a usuario que realizo la pregunta\r\n $correoUsuario = $retornoEmail[0]->K_MSG;\r\n $this->_helper->layout->setLayout('clear');\r\n $template = new Devnet_TemplateLoad('eliminar_pregunta');\r\n $template->replace(\r\n array(\r\n '[COMPRADOR]' => $emailDueno->APODO,\r\n '[VENDEDOR]' => $datosUsuario->APODO,\r\n '[URL_AVISO]' => $mensajeDetalle->ID_REGISTRO . '-' . $datosAviso[0]->URL,\r\n '[AVISO]' => $datosAviso[0]->TIT\r\n )\r\n );\r\n //Nuevo envio de mail\r\n $correo = Zend_Registry::get('mail');\r\n $correo->addTo($emailDueno->EMAIL, $emailDueno->NOM)\r\n ->setSubject('¡Eliminaron tu pregunta!')->setBodyHtml($template->getTemplate());\r\n $correo->send();\r\n $this->json(array('code'=>0, 'msg'=>'La pregunta recibida fue eliminada.'));\r\n } catch (Exception $e) {\r\n $this->json(\r\n array(\r\n 'code'=>1,\r\n 'msg'=>'Ha ocurrido un error interno del sistema. Intentelo mas tarde por favor.'\r\n )\r\n );\r\n $this->log->err($e->getMessage());\r\n }\r\n } else {\r\n echo \"Existen respuestas o la pregunta no es del usuario\";\r\n }\r\n }\r\n }", "public function verPuntosConductor ($id_User){\r\n $this->db->query(\"SELECT * FROM viaje WHERE conductor_id = '$id_User' AND borrado_logico='-1'\");\r\n $res1 = $this->db->registrorowCount();\r\n $this->db->query(\"SELECT SUM(b.calificacion_conductor) AS suma \r\n FROM viaje a LEFT JOIN pasajero b ON a.id = b.viaje_id\r\n WHERE a.conductor_id = '$id_User'\r\n \");\r\n $suma = $this->db->registro()->suma - $res1;\r\n return $suma;\r\n }", "public function actionrevisaPendientes()\n\t{\n \n $valores=OperaCodep::getEp();\n $codigobarco=$valores['barco'];\n $codofi=$valores['ofic'];\n //var_dump($valores);die();\n if(!is_null($codigobarco)){\n\t if(!isset($_GET['ajax'])){\n \n $proveedor=OperaPlanes::model()->search_por_mot($codigobarco, $codofi);\n $registros=$proveedor->getdata();\n //borarndo lo anteriors \n OperaTempplan::model()->deleteAll(\"iduser=:viduser\",array(\":viduser\"=>yii::app()->user->id));\n foreach($registros as $fila){ //creando nuevos \n $fila->createmp();\n }\n } \n $model=new OperaTempplan('search_por_user');\n\t\t$model->unsetAttributes(); // clear any default values\n\t\tif(isset($_GET['OperaTempplan']))\n\t\t\t$model->attributes=$_GET['OperaTempplan'];\n $proveedor2= $model->search_por_user();\n $this->render('admin_por_pend',array(\n\t\t\t'model'=>$model,'proveedor'=>$proveedor2\n\t\t));\n }else{\n $model=new OperaTempplan();\n $this->render('reject',array(\n\t\t\t'model'=>$model,\n\t\t)); \n }\n\t}", "public function VoirOublieMotDePasse() {\n return view('Visiteur/VoirOublieMotDePasse');\n }", "public function presolicitud(){\n \n $this->data['notificacion_count'] = $this->process_model->get_num_notify();\n $this->data['notificacion_msj'] = $this->process_model->get_notificacion();\n// if(!$this->data['notificacion_msj']):\n// $this->data['notificacion_msj'] = $this->process_model->get_notificacion_old();\n// endif;\n $this->data['vista'] = 'vistas/presolicitudes/importar';\n $this->load->view('layouts/dashboard');\n \n }", "function produit(){\n \n require(\"./modele/visiteur/visiteurBD.php\");\n if (count($_POST) == 0) {\n $view = new View('visiteur/produit');\n $view->generate();\n }else{\n $view = new View('visiteur/produit');\n $contenu = array();\n $contenu=recupProduit($_POST['produit']);\n $view->setContentArray($contenu);\n $view->generate();\n }\n\n \n}", "function modificar(){\n if(isset($_POST['nombreact'])){ \n $nombre=filter_input(INPUT_POST, 'nombreact', FILTER_SANITIZE_STRING);\n $nusuario=filter_input(INPUT_POST, 'nombre', FILTER_SANITIZE_STRING);\n $email=filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\n $password=filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n $user=$this->model->modificar($nombre,$nusuario,$email,$password); //Mandamos al modelo las variables para que las gestione\n echo $user;\n if ($user==1){\n // Pagina correcta\n header('Location:'.APP_W.'correcto');\n //echo $email;\n }\n else{\n // Error\n header('Location:'.APP_W.'error');\n }\n }\n }", "function confirmation_delete(){\n\t\t\tif($this->check_session->user_session() && $this->check_session->get_level()==100){\n\t\t\t\tif($this->uri->segment(3)!='99'){ //jika bukan user pusat\n\t\t\t\t\t$data['url']\t\t= site_url('rsa_tambah_em/exec_delete/'.$this->uri->segment(3));\n\t\t\t\t\t$data['message']\t= \"Apakah anda yakin akan menghapus data ini ( kode : \".$this->uri->segment(3).\") ?\";\n\t\t\t\t\t$this->load->view('confirmation_',$data);\n\t\t\t\t}else{ //jika user pusat\n\t\t\t\t\t$data['class']\t = 'option box';\n\t\t\t\t\t$data['class_btn']\t = 'ya';\n\t\t\t\t\t$data['message'] = 'Unit pusat tidak diijinkan untuk dihapus';\n\t\t\t\t\t$this->load->view('messagebox_',$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tshow_404('page');\n\t\t\t}\n\t\t}", "function delUser_ant () // Renomeada para n�o ser usada. Antiga delUser() \n{\n\tglobal $xoopsDB, $myts, $xoopsConfig, $xoopsModule;\n\n\t$query = \"SELECT * FROM \". $xoopsDB->prefix('xmail_newsletter') .\" WHERE user_email='\" . $myts->makeTboxData4Save($_POST['user_mail']) . \"' \";\n\t$result = $xoopsDB->query($query);\n\t$myarray = $xoopsDB->fetchArray($result);\n\n\t$mymail = $myts->makeTboxData4Save($_POST['user_mail']);\n\tif ($myarray) {\n\t\tif ($myarray['confirmed'] == '0')\n\t\t\treturn -1;\n\n\t\t$query = \"UPDATE \" . $xoopsDB->prefix('xmail_newsletter') . \" SET confirmed='0' WHERE user_email='$mymail'\";\n\t\t$result = $xoopsDB->queryF($query);\n\t\t\n\t\t// eliminar o perfil\n\t\t$sql=' delete from '.$xoopsDB->prefix('xmail_perfil_news').' where user_id='.$myarray['user_id'];\n\t\t$result2=$xoopsDB->queryf($sql);\n\t\tif(!$result2){\n\t\t\txoops_error('Erro ao eliminar perfil'.$xoopsDB->error());\n\t\t}\n\t\t\t\n\t\t\n\t\treturn 1;\n\t} else {\n\t\treturn -2;\n\t}\n}", "public function prosesinput_detail_matkul_dosen(){\n\t\t$this->m_aka->prosesinput_detail_matkul_dosen();\n\t\tredirect('c_index_aka/data_dosen');\n\t}", "public static function supprimer() {\n if(!UserModel::isConnected())\n Controller::goTo(\"\", \"\", \"Vous devez être connecté pour accéder à cette section.\");\n \n if(!UserModel::estAdmin())\n Controller::goTo(\"\", \"\", \"Vous n'avez pas les droits suffisants.\");\n \n // L'utilisateur a annulé\n if(isset($_POST['btnAnnuler']))\n Controller::goTo(\"ecs/index.php\", \"L'EC n'a pas été supprimé.\");\n \n // Le formulaire a été validé\n $data = [];\n if(isset($_POST['btnSupprimer'])) {\n if(!isset($_SESSION['current']['EC']))\n Controller::goTo(\"ecs/index.php\", \"L'EC n'a pas été supprimé.\");\n \n if(ECModel::delete($_SESSION['current']['EC']))\n Controller::goTo(\"ecs/index.php\", \"L'EC a été supprimé.\");\n else {\n WebPage::setCurrentErrorMsg(\"L'EC n'a pas été supprimé de la base de données.\");\n if(($data['EC'] = ECModel::read($_SESSION['current']['EC'])) === null)\n Controller::goTo(\"ecs/index.php\", \"\", \"Erreur lors de la récupération de l'EC.\");\n }\n }\n else {\n if(($data['EC'] = ECModel::read(intval($_POST['idSupp']))) == null)\n return Controller::goTo(\"ecs/index.php\", \"\", \"Erreur lors de la récupération de l'EC.\");\n $_SESSION['current']['EC'] = intval($_POST['idSupp']);\n }\n\n return Controller::push(\"Supprimer un EC\", \"./view/ecs/supprimer.php\", $data);\n }", "public function verPuestos(){\n\t\t/* Esto se usa si la consulta se hace por post normal y no por angular \n\t\t$post_data = $this->input->post(NULL, TRUE);\n\t\tif($post_data!=null){\t\t\n\t\t\texit(var_export($post_data));\n\t\t}*/\n\t\t$acceso = $this->m_general->validarRol($this->router->class.'_puestos', 'list');\n\t\tif($acceso){\n\t\t\t$this->data['title'] = 'Colaboradores - Puestos';\n\t\t\t$this->load->view($this->vista_master, $this->data);\n\t\t}else{\n\t\t\tredirect('/acceso-denegado', 'refresh');\n\t\t}\n\t}", "function valideInfosCompteUtilisateur($utilisateur, $motDePasse) {\n return existeCompteVisiteur($utilisateur, md5($motDePasse));\n}", "public function Afficher_Panier($id_commande) {\n \n // requete sur la base de donnée\n $sql = \"SELECT tb_article.id_article,a_designation,a_pht,qte_cmde,url_image,t_taux, tb_ligne_commande.id_commande, a_pht*(1+tb_tva.t_taux) AS PRIX\n FROM tb_article,tb_commande,tb_ligne_commande, tb_tva \n WHERE tb_article.id_article = tb_ligne_commande.id_article \n AND tb_ligne_commande.id_commande = tb_commande.id_commande \n AND tb_article.id_tva = tb_tva.id_tva \n AND tb_commande.id_commande =$id_commande\";\n \n $req = $this->db->query($sql);\n\n $enteteTableau = '<table class=\"tableauPanier\">\n <caption>Contenu du panier</caption>\n <tr>\n <th>image</th>\n <th>Désignation</th>\n <th>Prix</th>\n <th>Quantité</th>\n <th></th>\n <th>modification</th>\n <th></th>\n </tr>';\n $contenuTableau =\"\"; \n while ($resultat =$req->fetch(PDO::FETCH_OBJ)) {\n\n $contenuTableau .= \"\n\n <tr>\n <td><img src= \\\"$resultat->url_image\\\"/> </td>\n <td>$resultat->a_designation</td>\n <td>$resultat->PRIX €</td>\n <td>$resultat->qte_cmde</td>\n <td><a href=\\\"?id_article=$resultat->id_article&action=add\\\"> Ajouter</a></td>\n// <td><a href=\\\"?id_article=$resultat->id_article&action=substract\\\">RETIRER</a> </td>\n <td><a href=\\\"?id_article=$resultat->id_article&action=del\\\"> Supprimer</a></td>\n </tr>\n \";\n }\n $finTableau = '</table>';\n \n $tableau = $enteteTableau\n .$contenuTableau\n .$finTableau;\n \n return $tableau;\n \n }", "function del_compte()\r\n\t{\r\n\t\tglobal $nuked, $user, $language, $repertoire;\r\n\r\n\t\tif($user[1] >= \"1\")\r\n\t\t{\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_GALERY_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\r\n\t\t\tif ($rep = @opendir($repertoire.$user[0]))\r\n\t\t\t{\r\n\t\t\t\twhile ($file = readdir($rep)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif($file != \"..\") \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($file != \".\") \r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t@unlink($repertoire.$user[0].\"/\".$file);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t@rmdir($repertoire.$user[0]);\r\n\t\t\techo\"<div style=\\\"text-align: center;\\\"><br /><br /><b>\"._COMTPEDELETE.\"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\",3);\r\n\t\t}else{\r\n\t\t\techo\"\t<div style=\\\"text-align: center;\\\"><br /><br /><b>\" . _NOTACCES . \"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\", 3);\r\n\t\t}\r\n\t}", "function cuantos_son_sms_noreg($where)\n\t{\n\t\t//calculo cuantos son..\n $this->sql=\"SELECT \n \t\t\t\t\tcount(*) \n \t\t\t\tFROM\n\t\t\t \t\t\tcontactos_no_reg\n\t\t\t\t\tINNER JOIN \n\t\t\t\t\t \tgrupos\n\t\t\t\t\tON \n\t\t\t\t\t \tcontactos_no_reg.id_grupos=grupos.id\n\t\t\t\t\tWHERE 1=1 \".$where.\";\";\n $rs2=$this->procesar_query($this->sql);\n $this->num_rows2=$rs2[0][0];\n ////////////////////////////////////////////\n\t}", "function eliminarPresupuesto(){\n\t\t$this->procedimiento='pre.ft_presupuesto_ime';\n\t\t$this->transaccion='PRE_PRE_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_presupuesto','id_presupuesto','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function inscription()\n {\n $promotion = Promotion::where('page', 'INSCRIPCIÓN')->first();\n $user = Auth::user();\n\n if($user->hasPromotion($promotion)){\n return redirect('/');\n }\n\n return view('applications.inscription', ['promotion' => $promotion, 'user' => $user]);\n }", "function afficherListeUtis() {\r\n\r\n\t $result=mysql_query(\"SELECT numuti FROM if_utilisateur ORDER BY nom,prenom\"); \r\n\t while ($row=mysql_fetch_row($result)) {\r\n\t \t$unUti=new Utilisateur();\t \r\n\t\t$unUti->numuti=$row[0]; \r\n\t\t$unUti->infosUti();\r\n\t\t$this->utis[]=$unUti;\r\n\t } \r\n\t if (count($this->utis)>=1) return true;\r\n }", "function userRecompensa($username){ \n\t$elements = recompensasController::getListUserAction(\" AND recompensa_user='\".$username.\"' \");\n\tif ($elements['total_reg'] > 0): ?>\n\t<br /><p class=\"text-center\">\n\t<?php foreach($elements['items'] as $element): ?>\n\t\t<span style=\"width:100px;height: 150px;margin-right: 15px;display:inline-block;position:relative\">\n\t\t\t<span width=\"60px\" style=\"position: relative\">\n\t\t\t\t<img width=\"60px\" src=\"<?php echo PATH_REWARDS.$element['recompensa_image'];?>\" />\n\t\t\t\t<span style=\"color:#fff; font-size: 26px; display: block;text-align: center;margin-top: -44px; font-weight: bolder; line-height: 40px;\"><?php echo $element['total'];?></span>\n\t\t\t</span>\n\t\t\t<small class=\"text-muted\"><?php echo $element['recompensa_name'];?></small>\n\t\t\t</td>\n\t\t</span>\t\n\t<?php endforeach; ?>\n\t</p>\n\t<?php endif; ?>\n<?php }", "static public function ctrEliminarMoneda(){\n\t\tif(isset($_POST[\"accionMoneda\"]) && $_POST[\"accionMoneda\"] == \"eliminar\"){\n\t\t\t$tabla =\"vtama_moneda\";\n\t\t\t$datos = $_POST[\"codigoMoneda\"];\n\t\t\t$respuesta = ModeloMoneda::mdlEliminarMoneda($tabla,$datos);\n\t\t\treturn $respuesta;\n\t\t}//if\n\t}", "function acesso_negado() {\n\t\t$this->output->set_template(\"blank\");\n $this->load->view('erros/acesso_negado');\n }", "function verif_codigo_componente(){\n if($this->input->is_ajax_request()){\n $post = $this->input->post();\n $codigo = $this->security->xss_clean($post['cod']); /// Codigo\n $pfec_id = $this->security->xss_clean($post['pfec_id']); /// pfec id\n $fase = $this->model_faseetapa->get_fase($pfec_id);\n $proyecto = $this->model_proyecto->get_id_proyecto($fase[0]['proy_id']); \n\n $variable= $this->model_componente->get_fase_componente_nro($pfec_id,$codigo,1);\n if(count($variable)==0){\n echo \"true\"; /// Codigo Habilitado\n }\n else{\n echo \"false\"; /// No Existe Registrado\n }\n }else{\n show_404();\n }\n }", "function Inc(){\n\t$obj_mun = new ClsMunicipio();\n\t$obj_mun->recibir2($_POST['nom_mun'],$_POST['cod_est_m']);\n\t$rs = $obj_mun->ConsultarPorDescripcion();\n\n if($tupla = $obj_mun->converArray($rs)){\n \t\t$_SESSION['res'] = \"yaexiste\";\n }else{\n \t\t$obj_mun->incluir();\n\t\t$_SESSION['res'] = \"registrado\";\n }\n header('location: ../../vista/protegidas/v_Perfil_Admin.php?accion=municipio');\n}", "function suppMembre($id)\n\t{\n\n\t\t$this->db->where('id', $id);\n\t\t$this->db->delete('membres');\n\t}", "public function confirmForget() {\n $user_id = $_GET['id'];\n $token = $_GET['token'];\n $userForgetConfirmed = $this->model->confirmTokenAfterForget($user_id, $token);\n\n if ($userForgetConfirmed) {\n $this->model->setFlash('success', 'Votre compte est à nouveau validé');\n // $_SESSION['flash']['success'] = 'Votre compte est à nouveau validé';\n header('location:index.php?controller=security&action=formReset');\n } else {\n $this->model->setFlash('danger', \"Ce token n'est plus valide\");\n // $_SESSION['flash']['danger'] = \"Ce token n'est plus valide\";\n header('location:index.php?controller=security&action=formLogin');\n }\n }", "public function inscrire(){\r\n $nb = 0 ;\r\n $pseudo = $this -> getPseudo();\r\n $q = \"update UserTab set User_inscrit = 1 where User_pseudo = '\".$pseudo.\"'\";\r\n $nb = execute($q) ;\r\n \r\n return $nb ;\r\n\r\n }", "public function prosesedit_mata_kuliah()\n\t{\n\n\t\t$this->m_aka->prosesedit_mata_kuliah();\n\t\tredirect('c_index_aka/data_mata_kuliah');\n\t}", "function nouveau()\n {\n $data['scripts'] = array('jquery', 'bootstrap', 'lte', 'datepicker','cssMessagerie' );\n\n // Creation du bandeau\n $data['titre'] = array(\"Messagerie\", \"fas fa-envelope\");\n\n \n \n\n // si la session est null c'est que l'utilisateur n'est pas connecté donc retour à la page de login\n if(!isset($_SESSION['dataUser']))\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-sync\", $this->dir_login, null),\n array(\"Retour\", \"fas fa-sync\", $this->dir_retour, null),\n );\n }\n \n $data['ActiveConv'] = false;\n \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 $data['profils'] = $this->m_messagerie->get_all_profil();\n\n $this->form_validation->set_rules(\"inputMessage\",\"inputMessage\",\"required\");\n if($this->form_validation->run()){\n $data['id_profils'] = $this->input->post('id_profils');\n $data[\"message\"] = $this->input->post('inputMessage');\n $data['date'] = date(\"Y-m-d H:i:s\"); \n $this->m_messagerie->set_message($data['userId'],$data['id_profils'],$data['message'],$data['date']);\n var_dump($data['id_profils']);\n var_dump($data[\"message\"]);\n var_dump($data['date']);\n var_dump($data['userId']);\n //redirect($this->dir_controlleur);\n }\n \n\n // On charge les differents modules neccessaires a l'affichage d'une page\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/nouveau',$data);\n }", "public function productcompareclearallAction() {\n $this->layout('layout/bags');\n $getuser = $this->forward()->dispatch('Admin\\Controller\\Index', array(\n 'action' => 'getuser'\n ));\n // var_dump($getuser);\n $this->layout()->getuser = $getuser;\n\n $id = $this->params()->fromRoute('id');\n $uenc = $this->params()->fromRoute('uenc');\n\n echo \"id :\";\n var_dump($id);\n echo \"</br>\";\n echo \"uenc :\";\n var_dump($uenc);\n }", "private function factuurAction()\n {\n if (isset($_POST) && !empty($_POST))\n {\n //productenOud zijn de producten die gekozen zijn in de webpagina\n // productenNieuw zijn de producten die gekozen zijn en daarna zijn verkregen van de database.\n $productenOud = $this->model->maakPDF();\n if ($productenOud === 'DUPS')\n {\n $this->model->foutGoedMelding('danger', '<strong> Foutmelding </strong> U heeft 2 dezelfde producten gekozen, gebruik hiervoor het aantal!');\n } else\n {\n $productNieuw = $this->model->geefBesteldeProducten($productenOud);\n $t = 1;\n for ($i = 0; $i < count($productenOud); $i++)\n {\n // van alle producten die zijn gekozen wordt de aantal voorraad gepakt\n $voorraadNieuw[$i] = $productNieuw[$i][0]->geefVoorraad();\n $gekozenAantal[$i] = $productenOud[$i][1];\n //de einde van de producten wordt d.m.v. count verkregen\n $eindeArray = count($productenOud);\n\n if ($voorraadNieuw[$i] > $gekozenAantal[$i])\n {\n $goeieVoorraad = true;\n } else\n {\n $goeieVoorraad = false;\n }\n\n if ($goeieVoorraad !== true)\n {\n $this->model->foutGoedMelding('danger', 'Gekozen product(en) is(zijn) niet op voorraad! Controleer het <a href=\".?action=magazijn&control=admin\">Magazijn <span class=\"glyphicon glyphicon-link\"></span></a>');\n } else\n {\n if ($t === $eindeArray)\n {\n $_SESSION['geselecteerdeProducten'] = $productenOud;\n $this->model->pdfToevoegen();\n $this->forward('factuurVerzend', 'admin');\n }\n }\n\n $goeieVoorraad = false;\n $t++;\n }\n }\n }\n\n $producten = $this->model->geefProducten();\n $this->view->set('producten', $producten);\n $klanten = $this->model->geefKlanten();\n $this->view->set('klanten', $klanten);\n }" ]
[ "0.6012983", "0.59206307", "0.5838047", "0.5780838", "0.5762003", "0.5739976", "0.56077456", "0.5574298", "0.5567176", "0.5459834", "0.54563195", "0.5445559", "0.5442986", "0.5439094", "0.5438246", "0.5423301", "0.5420289", "0.53965056", "0.53962356", "0.53917736", "0.53678703", "0.5358535", "0.5352804", "0.53385866", "0.5306019", "0.5300094", "0.5295725", "0.5279549", "0.5279518", "0.52451843", "0.52419347", "0.5232502", "0.52282256", "0.52232784", "0.52134037", "0.5206046", "0.5202177", "0.51988715", "0.5192494", "0.51907617", "0.5187538", "0.5183035", "0.51748616", "0.51657647", "0.5140121", "0.51396847", "0.5131035", "0.51282835", "0.5126206", "0.51240784", "0.5123187", "0.5110024", "0.50909835", "0.50880176", "0.50837094", "0.5082679", "0.50794774", "0.5075299", "0.5075169", "0.5073371", "0.5069039", "0.5055071", "0.50509536", "0.5050507", "0.5036741", "0.502571", "0.5024907", "0.50237477", "0.50211924", "0.50181884", "0.501657", "0.50126183", "0.50122434", "0.5011062", "0.501086", "0.5008692", "0.50074714", "0.50073814", "0.49984145", "0.49975842", "0.49969172", "0.49914765", "0.4989258", "0.49882773", "0.49836126", "0.49817476", "0.4978422", "0.49752298", "0.49750614", "0.4973345", "0.4971534", "0.49694312", "0.4968632", "0.4967542", "0.49638626", "0.49595326", "0.49543548", "0.4953405", "0.49522823", "0.49489906" ]
0.681243
0
/ page mobilisateur/addmobilisateuradmin Ajout d'une mobilisateur
public function addmobilisateuradminAction() { $sessionutilisateur = new Zend_Session_Namespace('utilisateur'); //$this->_helper->layout->disableLayout(); $this->_helper->layout()->setLayout('layoutpublicesmcadmin'); if(!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');} if($sessionutilisateur->confirmation != "") {$this->_redirect('/administration/confirmation');} if(isset($_POST['ok']) && $_POST['ok'] == "ok") { if(isset($_POST['code_membre']) && $_POST['code_membre'] != "" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != "") { $request = $this->getRequest(); if($request->isPost()) { $db = Zend_Db_Table::getDefaultAdapter(); $db->beginTransaction(); try { /////////////////////////////////////controle code membre if(isset($_POST['code_membre']) && $_POST['code_membre']!=""){ if(strlen($_POST['code_membre']) != 20) { $db->rollback(); $sessionutilisateur->error = "Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci..."; //$this->_redirect('/mobilisateur/addmobilisateurintegrateur'); return; } else { if(substr($_POST['code_membre'], -1, 1) == 'P') { $membre = new Application_Model_EuMembre(); $membre_mapper = new Application_Model_EuMembreMapper(); $membre_mapper->find($_POST['code_membre'], $membre); if(count($membre) == 0) { $db->rollback(); $sessionutilisateur->error = "Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ..."; //$this->_redirect('/mobilisateur/addmobilisateurintegrateur'); return; } } else if(substr($_POST['code_membre'], -1, 1) == 'M') { $membremorale = new Application_Model_EuMembreMorale(); $membremorale_mapper = new Application_Model_EuMembreMoraleMapper(); $membremorale_mapper->find($_POST['code_membre'], $membremorale); if(count($membremorale) == 0) { $db->rollback(); $sessionutilisateur->error = "Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ..."; //$this->_redirect('/mobilisateur/addmobilisateurintegrateur'); return; } } } $date_id = new Zend_Date(Zend_Date::ISO_8601); $mobilisateur = new Application_Model_EuMobilisateur(); $m_mobilisateur = new Application_Model_EuMobilisateurMapper(); $id_mobilisateur = $m_mobilisateur->findConuter() + 1; $mobilisateur->setId_mobilisateur($id_mobilisateur); $mobilisateur->setCode_membre($_POST['code_membre']); $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss')); $mobilisateur->setId_utilisateur($_POST['id_utilisateur']); $mobilisateur->setEtat(1); $m_mobilisateur->save($mobilisateur); //////////////////////////////////////////////////////////////////////////////// $db->commit(); $sessionutilisateur->error = "Operation bien effectuee ..."; $this->_redirect('/mobilisateur/addmobilisateuradmin'); } else { $db->rollback(); $sessionutilisateur->error = "Veuillez renseigner le Code Membre ..."; } } catch(Exception $exc) { $db->rollback(); $sessionutilisateur->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); return; } } } else { $sessionutilisateur->error = "Champs * obligatoire"; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function etatmobilisateuradminAction()\n {\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 $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateuradmin');\n }", "public function addmobilisateurAction() {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembre->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/listmobilisateur');\n \n } catch (Exception $exc) { \n $db->rollback();\n $this->view->message = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $this->view->error = \"Champs * obligatoire\";\n }\n }\n }", "public function etatmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function suppmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if ($id > 0) {\n\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->delete($id);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "function adminadduser()\n {\n //Check Login\n if ($this->cek_login() != true) {\n return redirect()->to(base_url('login'));\n }\n //Check Role\n if ($this->cek_role() != true) {\n return redirect()->to(base_url('login'));\n }\n $email = $this->request->getPost('email_add');\n $email = esc($email);\n $password = $this->request->getPost('password_add');\n $password = esc($password);\n $name = $this->request->getPost('name_add');\n $name = esc($name);\n $birthdate = $this->request->getPost('birthdate_add');\n $role = $this->request->getPost('role_add');\n $link_foto = '';\n\n $addresult = $this->user_model->addUser($email, $password, $name, $birthdate, $role, $link_foto);\n if ($addresult) {\n session()->setFlashdata('sekolah.project_uas.success', 'User created successfully');\n return redirect()->to(base_url('adminuser'));\n } else {\n //kalo gagal ngapain\n session()->setFlashdata('sekolah.project_uas.fail', 'User cannot created');\n return redirect()->to(base_url('adminuser'));\n }\n }", "private function ajoutuser() {\n\t\t$this->_ctrlAdmin = new ControleurAdmin();\n\t\t$this->_ctrlAdmin->userAjout();\n\t}", "public function addmobilisateurintegrateurAction() {\n $sessionmembreasso = new Zend_Session_Namespace('membreasso');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcint');\n if (!isset($sessionmembreasso->login)) {$this->_redirect('/integrateur/login');}\n\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\n/////////////////////////////////////controle code membre\nif(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\nif(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n}else{\nif(substr($_POST['code_membre'], -1, 1) == 'P'){\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0){\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }else if(substr($_POST['code_membre'], -1, 1) == 'M'){\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0){\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n}\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembreasso->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n}else{\n $db->rollback();\n $sessionmembreasso->error = \"Veuillez renseigner le Code Membre ...\";\n\n} \n } catch (Exception $exc) { \n $db->rollback();\n $sessionmembreasso->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionmembreasso->error = \"Champs * obligatoire\";\n }\n }\n }", "function alta_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->fecha_alta=date(\"Y-m-d\");\n\t\t$u->estatus_general_id=1;\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 registrado los datos de la Unidad de Medida.\\\"); 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 create(){\n\t\t$this->autenticate();\n\t\t$user_id = $_POST['id'];\n\t\t$nombre = \"'\".$_POST['nombre'].\"'\";\n\t\t$cedula = \"'\".$_POST['cedula'].\"'\";\n\t\t$nacimiento = \"'2000/1/1'\"; //fecha de nacimiento default, despues el mismo usuario la puede editar\n\t\trequire_once(\"../app/models/administrativo.php\");//conexion entre los controladores\n\t\t$administrativo=new Administrativo();// crea el perfil administrativo vacio\n\t\t$administrativo->new($nombre,$cedula,$nacimiento); // inserta la informacion antes ingresada en la base de datos\n\t\t$administrativo_id = $administrativo->where(\"cedula\",$cedula); // se trae el perfil administrativo recien creado con la cedula\n\t\t$administrativo_id = $administrativo_id[0][\"id\"];\n\t\t$administrativo->attach_user($user_id,$administrativo_id); // amarra el usuario a su nuevo perfil docente\n\t\t$administrativo_id = strval($user_id);//convierte el user_id de entero a string\n\t\theader(\"Location: http://localhost:8000/usuarios/show/$user_id\");\n\t\texit;\n\t\t$this->view('administrativos/index', []);\n\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 }", "public function membre(){\n\n\t\t$user_id = Input::get('user_id');\n\n\t\t$redirectTo = ( $user_id ? 'admin/users/'.$user_id : 'admin/adresses/'.Input::get('adresse_id') );\n\n if( $this->adresse->addMembre(Input::get('membre_id') , Input::get('adresse_id')) )\n {\n return Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'L\\'appartenance comme membre a été ajouté') );\n }\n\n return Redirect::to($redirectTo)->with( array('status' => 'danger' , 'message' => 'L\\'utilisateur à déjà l\\'appartenance comme membre') );\n\n\t}", "public function addmobilisateurindexAction() {\n $sessionmcnp = new Zend_Session_Namespace('mcnp');\n\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmc');\n\n\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\n/////////////////////////////////////controle code membre\nif(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\nif(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n}else{\nif(substr($_POST['code_membre'], -1, 1) == 'P'){\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0){\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n }\n }else if(substr($_POST['code_membre'], -1, 1) == 'M'){\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0){\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n }\n }\n}\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur(0);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmcnp->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateurindex');\n}else{\n $db->rollback();\n $sessionmcnp->error = \"Veuillez renseigner le Code Membre ...\";\n\n} \n } catch (Exception $exc) { \n $db->rollback();\n $sessionmcnp->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionmcnp->error = \"Champs * obligatoire\";\n }\n }\n }", "public function addMo()\n\t{\n\t\n\t\t$this->Checklogin();\n\t\tif (isset($_POST ['btnSubmit']))\n\t\t{\n\t\n\t\t\t$data ['admin_section']='MO';\n\t\t\t$id=$this->setting_model->addMo();\n\t\t\tif ($id)\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Mobile has been added successfully.');\n\t\t\t\tredirect('admin/setting/moRegistration');\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Unable to save mobile.');\n\t\t\t\tredirect('admin/setting/moRegistration');\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\tredirect('admin/setting/moRegistration');\n\t\t}\n\t\n\t}", "public function admin_add(){\n $content = $this->load->view(\"users/users_form\",\"\",true);\n echo Modules::run(\"template/load_admin\", \"Add New User\", $content);\n }", "public function admin_add()\n {\n if ($this->request->is('post')) {\n $this->User->create();\n\n $this->request->data['Impi']['auth_scheme'] = 127;\n\n if ($this->User->saveAll($this->request->data)) {\n $this->Session->setFlash(__('The user has been saved'));\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n }\n }\n $utilityFunctions = $this->User->UtilityFunction->find('list');\n\n $this->set(compact('utilityFunctions', 'utilityFunctionsParameters'));\n }", "function add()\n {\n if($this->acceso(15)){\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'reunion_id' => $this->input->post('reunion_id'),\n 'usuario_id' => $this->input->post('usuario_id'),\n 'multa_monto' => $this->input->post('multa_monto'),\n 'multa_fecha' => $this->input->post('multa_fecha'),\n 'multa_hora' => $this->input->post('multa_hora'),\n 'multa_detalle' => $this->input->post('multa_detalle'),\n 'multa_numrec' => $this->input->post('multa_numrec'),\n );\n $multa_id = $this->Multa_model->add_multa($params);\n redirect('multa/index');\n }\n else\n {\n $this->load->model('Reunion_model');\n $data['all_reunion'] = $this->Reunion_model->get_all_reunion();\n\n $this->load->model('Usuario_model');\n $data['all_usuario'] = $this->Usuario_model->get_all_usuario();\n\n $data['_view'] = 'multa/add';\n $this->load->view('layouts/main',$data);\n }\n }\n }", "public function addByAdmin()\n {\n if (!session()->get('username')) {\n return redirect()->to('/login');\n }\n $pj = $this->request->getVar('hubungan');\n if ($pj == \"Mandiri\") {\n if (!$this->validate($this->validation)) {\n return $this->validasiDataByAdmin();\n } else {\n return $this->addDataByAdmin();\n }\n } else {\n if (!$this->validate(array_merge($this->validation, $this->val_pj))) {\n return $this->validasiDataByAdmin();\n } else {\n return $this->addDataByAdmin();\n }\n }\n }", "function act_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 de la Unidad de Medida.\\\"); 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 add() {\n\n if (isset($_POST['valider'])) {\n \n extract($_POST);\n $data['ok'] = 0;\n \n if (!empty($_POST)) {\n\n $clientM = new ClientMoral();\n $clientMoralRepository = new ClientMoralRepository();\n \n $clientM->setNom($_POST['nom']);\n $clientM->setRaisonSociale($_POST['raisonSociale']);\n $clientM->setAdresse($_POST['adresse']);\n $clientM->setTel($_POST['tel']);\n $clientM->setEmail($_POST['email']);\n $clientM->setNinea($_POST['ninea']);\n $clientM->setRegiscom($_POST['registreCommerce']);\n \n\n $data['ok'] = $clientMoralRepository->add($clientM);\n }\n return $this->view->load(\"clientMoral/ajout\", $data);\n }\n else {\n return $this->view->load(\"clientMoral/ajout\");\n }\n }", "public function crearadmin()\n {\n //busca en la tabla usuarios los campos donde el alias sea igual a admin si no encuentra nada devuelve null\n $usuarios = R::findOne('usuarios', 'alias=?', [\n \"admin\"\n ]);\n \n \n // ok es igual a true siempre y cuando usuarios sea distinto de null\n $ok = ($usuarios == null );\n if ($ok) {\n // crea la tabla usuarios\n $usuarios = R::dispense('usuarios');\n //crea los campos de la tabla usuarios\n $usuarios->nombre=\"admin\";\n $usuarios->primer_apellido=\"admin\";\n $usuarios->segundo_apellido=\"admin\";\n $usuarios-> fecha_nacimiento=\"1998/03/12\";\n $usuarios->fecha_de_registro=date('Y-m-d');\n $usuarios->email=\"[email protected]\";\n $usuarios->telefono=\"6734687\";\n $usuarios->contrasena=password_hash(\"admin\", PASSWORD_DEFAULT);\n $usuarios->confirmar_contrasena=password_hash(\"admin\", PASSWORD_DEFAULT);\n $usuarios->alias=\"admin\";\n $usuarios->foto = null;\n //almacena los datos en la tabla usuarios\n R::store($usuarios);\n \n \n \n \n }\n \n \n \n \n \n \n }", "private function ajoutauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t$this->_ctrlAuteur->auteurAjoute();\n\t}", "function newuser(){\n\t\t\tif(!empty($_POST['newemail']) && !empty($_POST['newpassword']) && !empty($_POST['newnombre']) && !empty($_POST['newpoblacion']) && !empty($_POST['newrol'])){\n\t\t\t\t$poblacion = filter_input(INPUT_POST,'newpoblacion',FILTER_SANITIZE_STRING);\n\t\t\t\t$nombre = filter_input(INPUT_POST,'newnombre',FILTER_SANITIZE_STRING);\n\t\t\t\t$password = filter_input(INPUT_POST,'newpassword',FILTER_SANITIZE_STRING);\n\t\t\t\t$email = filter_input(INPUT_POST,'newemail',FILTER_SANITIZE_STRING);\n\t\t\t\t$rol = filter_input(INPUT_POST,'newrol',FILTER_SANITIZE_STRING);\n\t\t\t\t$list = $this -> model -> adduser($nombre,$password,$email,$poblacion,$rol);\n \t\t$this -> ajax_set(array('redirect'=>APP_W.'admin'));\n\t\t\t}\n\t\t}", "public function addNewRegiuneByAdmin($data)\n {\n $nume = $data['nume'];\n\n $checkRegiune = $this->checkExistRegiune($nume);\n\n\n if ($nume == \"\") {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Câmpurile de introducere nu trebuie să fie Golite!</div>';\n return $msg;\n } elseif (strlen($nume) < 2) {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Numele regiunii este prea scurt, cel puțin 2 caractere!</div>';\n return $msg;\n } elseif ($checkRegiune == TRUE) {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Regiunea există deja, vă rugăm să încercați o alta regiune ...!</div>';\n return $msg;\n } else {\n\n $sql = \"INSERT INTO regiune(nume ) VALUES(:nume)\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->bindValue(':nume', $nume);\n $result = $stmt->execute();\n if ($result) {\n $msg = '<div class=\"alert alert-success alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Success !</strong> Ați înregistrat cu succes!</div>';\n return $msg;\n } else {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Error !</strong> Ceva n-a mers bine !</div>';\n return $msg;\n }\n }\n }", "function addNew()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $data['roles'] = $this->user_model->getUserRoles();\n\n $this->global['pageTitle'] = '添加人员';\n\n $this->loadViews(\"addNew\", $this->global, $data, NULL);\n }\n }", "public function addadminAction()\n {\n $this->doNotRender();\n\n $email = $this->getParam('email');\n $user = \\Entity\\User::getOrCreate($email);\n\n $user->stations->add($this->station);\n $user->save();\n\n \\App\\Messenger::send(array(\n 'to' => $user->email,\n 'subject' => 'Access Granted to Station Center',\n 'template' => 'newperms',\n 'vars' => array(\n 'areas' => array('Station Center: '.$this->station->name),\n ),\n ));\n\n $this->redirectFromHere(array('action' => 'index', 'id' => NULL, 'email' => NULL));\n }", "function admin_add()\n\t{\n\t $this->set('pagetitle',\"Add Page\");\t\n\t $this->loadModel('User');\n\t $userlists = array();\n\t $userlists = array_merge($userlists,array('0'=>'Admin'));\n\t $allClientLists = $this->User->find('list',array('conditions'=>array('User.user_type_id'=>1),'fields'=>array('id','fname')));\n $userlists = array_merge($userlists,$allClientLists);\n\t $this->set('userlists',$userlists);\n\t \n\t if(!empty($this->data))\n\t {\n\t\tif($this->Page->save($this->data))\n\t\t{\n\t\t $this->Session->setFlash('The Page has been created','message/green');\n\t\t $this->redirect(array('action' => 'index'));\n\t\t}\n\t\telse\n\t\t{\n\t\t $this->Session->setFlash('The Page could not be saved. Please, try again.','message/yellow');\n\t\t}\n\t }\n\t}", "private function insertUser(){\n\t\t$data['tipoUsuario'] = Seguridad::getTipo();\n\t\tView::show(\"user/insertForm\", $data);\n\t}", "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增用户';\n $this->global['pageName'] = 'user_add';\n\n if(empty($_POST)){\n $data['roles'] = $this->user_model->getRoles($this->global['login_id']);\n\n $this->loadViews(\"user_manage/user_add\", $this->global, $data, NULL);\n }else{\n $this->item_validate();\n }\n }\n }", "public function getPostCreateUserAdmin()\n {\n if (!$this->di->get(\"session\")->has(\"account\")) {\n $this->di->get(\"response\")->redirect(\"user/login\");\n }\n\n $title = \"A create user page\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n\n $user = new User();\n $username = $this->di->get(\"session\")->get(\"account\");\n $user->setDb($this->di->get(\"db\"));\n $user->find(\"username\", $username);\n\n if ($user->admin != 1) {\n $this->di->get(\"response\")->redirect(\"user\");\n }\n\n $form = new CreateUserAdminForm($this->di);\n\n $form->check();\n\n $data = [\n \"content\" => $form->getHTML(),\n ];\n\n $view->add(\"default2/article\", $data);\n\n $pageRender->renderPage([\"title\" => $title]);\n }", "public function editmobilisateuradminAction() {\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\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n $m_mobilisateur->find($_POST['id_mobilisateur'], $mobilisateur);\n\n //$mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n //$mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n //$mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n //$mobilisateur->setEtat(0);\n $m_mobilisateur->update($mobilisateur);\n\n////////////////////////////////////////////////////////////////////////////////\n \n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionutilisateur->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/listmobilisateuradmin');\n \n } catch (Exception $exc) { \n $db->rollback();\n $this->view->message = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionutilisateur->error = \"Champs * obligatoire\";\n $id = (int)$this->_request->getParam('id');\n if($id != 0) {\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mmobilisateur = new Application_Model_EuMobilisateurMapper();\n $mmobilisateur->find($id,$mobilisateur);\n $this->view->mobilisateur = $mobilisateur;\n } \n }\n } else {\n $id = (int)$this->_request->getParam('id');\n if($id != 0) {\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mmobilisateur = new Application_Model_EuMobilisateurMapper();\n $mmobilisateur->find($id,$mobilisateur);\n $this->view->mobilisateur = $mobilisateur;\n } \n }\n\n }", "function add()\n {\n //load chuc vu ra\n $this->load->model('chucvu_model');\n $input = array();\n $chucvu = $this->chucvu_model->getList($input);\n $this->data['chucvu'] = $chucvu;\n \n //thoa dieu kien dau vao moi insert vao\n $this->load->library('form_validation');\n $this->load->helper('form');\n if($this->input->post())\n {\n $this->form_validation->set_rules('password', 'Mật khẩu', 'min_length[8]'); \n $this->form_validation->set_rules('repassword', 'Nhập lại mật khẩu', 'matches[password]');\n \n if($this->form_validation->run())\n {\n //lay DL tu view\n $ho = $this->input->post('ho');\n $ten = $this->input->post('ten');\n $luong = $this->input->post('luong');\n $chucvu = $this->input->post('chucvuid');\n $password = $this->input->post('password'); \n //do use plugin jQuery number --> chuyen ve dang so moi insert duoc\n $luong = str_replace(',', '', $luong);\n \n $data = array(\n 'ho' => $ho,\n 'ten' => $ten,\n 'chucvuid' => $chucvu, \n 'password' => md5($password),\n 'luong' => $luong\n );\n if($this->nhanvien_model->add($data))\n {\n $message = $this->session->set_flashdata('message', 'Thêm mới dữ liệu thành công'); \n }\n else {\n $this->session->set_flashdata('message', 'Không thể thêm mới');\n } \n //chuyen ve trang index\n redirect(admin_url('nhanvien'));\n }\n }\n \n $this->data['temp'] = 'admin/nhanvien/add';\n $this->load->view('admin/main', $this->data);\n }", "public function user_add()\n\t{\n\t\t$data = array( 'isi' \t=> 'admin/user/v_user_add',\n\t\t\t\t\t\t'nav'\t=>\t'admin/nav',\n\t\t\t\t\t\t'title' => 'Tampil Dashboard Admin');\n\t\t$this->load->view('layout/wrapper',$data);\n\t}", "public function add() {\n if (isAuthorized('utilisateurs', 'add')) :\n $this->Utilisateur->Societe->recursive = -1;\n $societe = $this->Utilisateur->Societe->find('list',array('fields' => array('id', 'NOM'),'order'=>array('NOM'=>'asc')));\n $ObjEntites = new EntitesController(); \n $ObjAssoentiteutilisateurs = new AssoentiteutilisateursController(); \n $cercles = $ObjEntites->find_list_all_cercle();\n $this->set(compact('societe','cercles'));\n $matinformatique = array(); \n $activites = array(); \n $utilisateurs = array();\n $outils = array();\n $listediffusions = array();\n $partages = array();\n $etats = array();\n $this->set(compact('matinformatique','activites','utilisateurs','outils','listediffusions','partages','etats'));\n if ($this->request->is('post')) :\n if (isset($this->params['data']['cancel'])) :\n $this->Utilisateur->validate = array();\n $this->History->goBack(1);\n else: \n $this->Utilisateur->create();\n $this->request->data['Utilisateur']['NEW']=1;\n if ($this->Utilisateur->save($this->request->data)) {\n $lastid = $this->Utilisateur->getLastInsertID();\n $utilisateur = $this->Utilisateur->find('first',array('conditions'=>array('Utilisateur.id'=>$lastid),'recursive'=>0));\n if($utilisateur['Utilisateur']['profil_id']>0 || $utilisateur['Utilisateur']['profil_id']==-2):\n $this->sendmailnewutilisateur($utilisateur);\n endif;\n $this->addnewaction($lastid);\n $entite_id = $this->request->data['Utilisateur']['entite_id'];\n $ObjAssoentiteutilisateurs->silent_save($entite_id,$lastid);\n $this->save_history($lastid, \"Utilisateur créé\"); \n $this->Session->setFlash(__('Utilisateur sauvegardé',true),'flash_success');\n $this->History->goBack(1);\n } else {\n $this->Session->setFlash(__('Utilisateur incorrect, veuillez corriger l\\'utilisateur',true),'flash_failure');\n }\n endif;\n endif;\n else :\n $this->Session->setFlash(__('Action non autorisée, veuillez contacter l\\'administrateur.',true),'flash_warning');\n throw new UnauthorizedException(\"Vous n'êtes pas autorisé à utiliser cette fonctionnalité de l'outil\");\n endif; \n }", "function addModeratorUser($argArrPost) {\n// pre($argArrPost);\n $objCore = new Core;\n $varName = addslashes($argArrPost['frmName']);\n $varEmail = $argArrPost['frmUserEmail'];\n\n $varUserWhere = \" AdminUserName='\" . $varName . \"' OR AdminEmail='\" . $argArrPost['frmUserEmail'] . \"'\";\n $arrClms = array('pkAdminID', 'AdminUserName', 'AdminEmail');\n $arrUserList = $this->select(TABLE_ADMIN, $arrClms, $varUserWhere);\n\n\n if (isset($arrUserList[0]['pkAdminID']) && $arrUserList[0]['pkAdminID'] <> '') {\n\n\n $arrUserName = array();\n $arrUserEmail = array();\n foreach ($arrUserList as $key => $val) {\n if ($val['AdminUserName'] == $varName) {\n $arrUserName[] = $val['AdminUserName'];\n }\n if ($val['AdminEmail'] == $varEmail) {\n $arrUserEmail[] = $val['AdminEmail'];\n }\n }\n $varCountName = count($arrUserName);\n $varCountEmail = count($arrUserEmail);\n if ($varCountName > 0) {\n $_SESSION['sessArrUsers'] = $argArrPost;\n $objCore->setErrorMsg(ADMIN_USER_NAME_ALREADY_EXIST);\n return false;\n } else if ($varCountEmail > 0) {\n $_SESSION['sessArrUsers'] = $argArrPost;\n $objCore->setErrorMsg(ADMIN_USE_EMAIL_ALREADY_EXIST);\n return false;\n }\n } else {\n\n $varUserWhere = \" pkAdminRoleId='\" . $argArrPost['frmAdminRoll'] . \"'\";\n $arrClms = array('AdminRoleName');\n $arrRoleName = $this->select(TABLE_ADMIN_ROLL, $arrClms, $varUserWhere);\n //pre($arrRoleName[0]['AdminRoleName']);\n\n $arrColumnAdd = array(\n 'AdminTitle' => trim($argArrPost['frmTitle']),\n 'AdminUserName' => trim(stripslashes($argArrPost['frmName'])),\n 'AdminEmail' => trim(stripslashes($argArrPost['frmUserEmail'])),\n 'AdminPassword' => md5(trim($argArrPost['frmPassword'])),\n 'fkAdminRollId' => $argArrPost['frmAdminRoll'],\n 'AdminOldPass' => trim($argArrPost['frmPassword']),\n 'AdminCountry' => trim($argArrPost['frmCountry']),\n 'AdminType' => 'user-moderator',\n //'AdminRegion' => trim($argArrPost['frmRegion']),\n 'AdminDateAdded' => date(DATE_TIME_FORMAT_DB)\n );\n //pre($arrColumnAdd);\n $varUserID = $this->insert(TABLE_ADMIN, $arrColumnAdd);\n if ($_SERVER[HTTP_HOST] != '192.168.100.97') {\n\n //Send Mail To User\n $varPath = '<img src=\"' . SITE_ROOT_URL . 'common/images/logo.png' . '\"/>';\n $varToUser = $argArrPost['frmUserEmail'];\n $varFromUser = SITE_EMAIL_ADDRESS;\n $varSubject = SITE_NAME . ':Login Details';\n $varOutput = file_get_contents(SITE_ROOT_URL . 'common/email_template/html/admin_user_registration.html');\n $varUnsubscribeLink = 'Click <a href=\"' . SITE_ROOT_URL . 'unsubscribe.php?user=' . md5($argArrPost['frmUserEmail']) . '\" target=\"_blank\">here</a> to unsubscribe.';\n $varActivationLink = '';\n $arrBodyKeywords = array('{USER}', '{USER_NAME}', '{PASSWORD}', '{EMAIL}', '{ROLE}', '{SITE_NAME}', '{ACTIVATION_LINK}', '{IMAGE_PATH}', '{UNSUBSCRIBE_LINK}');\n $arrBodyKeywordsValues = array(trim(stripslashes($argArrPost['frmName'])), trim(stripslashes($argArrPost['frmName'])), trim($argArrPost['frmPassword']), trim(stripslashes($argArrPost['frmUserEmail'])), $arrRoleName[0]['AdminRoleName'], SITE_NAME, $varActivationLink, $varPath); //,$varUnsubscribeLink\n $varBody = str_replace($arrBodyKeywords, $arrBodyKeywordsValues, $varOutput);\n $objCore->sendMail($varToUser, $varFromUser, $varSubject, $varBody);\n $_SESSION['sessArrUsers'] = '';\n }\n $objCore->setSuccessMsg(ADMIN_USER_ADD_SUCCUSS_MSG);\n return true;\n }\n }", "function incluir_click($sender, $param)\n {\n if ($this->IsValid)\n {\n $this->incluir->Enabled=False;//Se deshabilita boton incluir\n // se capturan los valores de los controles\n $aleatorio = $this->numero->Text;\n $cod_direccion = usuario_actual('cod_direccion');\n $cod_direccion=substr($cod_direccion, 1);\n $siglas = usuario_actual('siglas_direccion');\n $ano = $this->lbl_ano->Text;\n $asunto = str_replace(\"'\", '\\\\\\'', $this->txt_asunto->Text );\n $destinatario = str_replace(\"'\", '\\\\\\'', $this->txt_destinatario->Text );\n $enviadopor=usuario_actual('login');\n $fecha = cambiaf_a_mysql ($this->txt_fecha->Text);\n //$memo=$this->html1->text;\n //busca el nombre del remitente\n $sql3=\"select cedula from intranet.usuarios where(login='$enviadopor')\";\n $resultado3=cargar_data($sql3, $sender);\n $cedula=$resultado3[0]['cedula'];\n $sql3=\"select nombres, apellidos from organizacion.personas where(cedula='$cedula')\";\n $resultado3=cargar_data($sql3, $sender);\n $remitente=$resultado3[0]['nombres'].' '.$resultado3[0]['apellidos'];\n $criterios_adicionales=array('direccion' => $cod_direccion, 'ano' => $ano);\n $numero=proximo_numero(\"organizacion.memoranda\",\"correlativo\",$criterios_adicionales,$this);\n $numero=rellena($numero,4,\"0\");\n // se inserta en la base de datos\n $sql = \"insert into organizacion.memoranda\n (direccion, siglas, correlativo, ano, fecha, asunto, destinatario, status, memo, remitente)\n values ('$cod_direccion','$siglas','$numero','$ano','$fecha','$asunto','$destinatario','1','$memo', '$remitente')\"; \n $resultado=modificar_data($sql,$sender);\n /*$sql2=\"update organizacion.adjuntos set correlativo='$numero' where (correlativo='$aleatorio')\";\n $resultado2=modificar_data($sql2, $sender);*/ \n /* Se incluye el rastro en el archivo de bitácora */\n $descripcion_log = \"Incluido el Memorando: \".$siglas.\"-\".$numero.\"-\".$ano;\n inserta_rastro(usuario_actual('login'),usuario_actual('cedula'),'I',$descripcion_log,\"\",$sender);\n $this->LTB->titulo->Text = \"Solicitud de número de Memorando\";\n $this->LTB->texto->Text = \"Se ha registrado exitosamente el nuevo Memorando con el \".\n \"número: <strong>\".$siglas.\"-\".$numero.\"-\".$ano.\"</strong>\";\n $this->LTB->imagen->Imageurl = \"imagenes/botones/memoranda.png\";\n $this->LTB->redir->Text = \"epaper.incluir_memo\";\n $params = array('mensaje');\n $this->getPage()->getCallbackClient()->callClientFunction('muestra_mensaje', $params);\n\n //$this->mensaje2->setSuccessMessage($sender, \"Se ha registrado exitosamente el nuevo Memorando con el numero:\".$siglas.\"-\".$numero.\"-\".$ano, 'grow');\n\n }\n }", "public function addAction() {\n $form = new Admin_Form_CreateAdminUser();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n $values = $form->getValues();\n $adminMapper = new Application_Model_Table_AdminUsers();\n $userFound = $adminMapper->fetchByUsername($values['username']);\n if(!$userFound){\n $values['is_active'] = 1;\n $values['is_admin'] = 1;\n $adminUser = $adminMapper->createRow($values);\n $adminUser->hashPassword($values['new_password']);\n $adminUser->save();\n $this->_helper->FlashMessenger->addMessage('The user has been created' , 'successful');\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-users', true);\n } else {\n $this->view->messages['error'] = \"This username already exists\";\n }\n }\n }\n $this->view->form = $form;\n }", "public function add_post()\n {\n $response = $this->UserM->add_user(\n $this->post('email'),\n $this->post('nama'),\n $this->post('nohp'),\n $this->post('pekerjaan')\n );\n $this->response($response);\n }", "public function add() {\n\n $this->viewBuilder()->layout('admin');\n $doctor = $this->Admins->newEntity();\n if ($this->request->is('post')) {\n// if(!empty($this->request->data['allpermissions']))\n// {\n// $this->request->data['permissions'] = implode(',',$this->request->data['allpermissions']);\n// }\n $doctors = $this->Admins->patchEntity($doctor, $this->request->data);\n \n $this->request->data['created'] = gmdate(\"Y-m-d h:i:s\");\n $this->request->data['modified'] = gmdate(\"Y-m-d h:i:s\"); \n \n if ($this->Admins->save($doctors)) {\n $this->Flash->success(__('The Admin has been saved.'));\n //pr($this->request->data); pr($doctors); exit;\n return $this->redirect(['action' => 'index']);\n } else {\n $this->Flash->error(__('The Admin could not be saved. Please, try again.'));\n }\n } else {\n $this->request->data['first_name'] = '';\n $this->request->data['last_name'] = '';\n $this->request->data['phone'] = '';\n $this->request->data['username'] = '';\n $this->request->data['email'] = '';\n }\n //$this->loadModel('AdminMenus');\n //$menus = $this->AdminMenus->find()->all();\n $this->set(compact('doctor','menus'));\n $this->set('_serialize', ['doctor']);\n }", "public function add_post(){\n $response = $this->BayiM->add(\n $this->post('iduser'),\n $this->post('nama'),\n $this->post('gender')\n );\n $this->response($response);\n }", "function addNew()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n $this->load->model('user_model');\n $data['roles'] = $this->user_model->getUserRoles();\n \n $this->global['pageTitle'] = 'Garuda Informatics : Add New User';\n\n $this->loadViews($this->view.\"addNew\", $this->global, $data, NULL);\n }\n }", "public function crear_usuario_admin()\n {\n \n $nombre = $_REQUEST['Name'];\n $correo = $_REQUEST['Email'];\n $password = $_REQUEST['Password'];\n $type = $_REQUEST['Type'];\n $nombre_proveedor = $_REQUEST['nombre_proveedor'];\n\n if (isset($correo) && isset($password) && isset($type)) {\n\n\n $consulta_correo_admin = $this->db->query(\"SELECT * FROM MA_LOGIN_ADMIN WHERE correo = '$correo'\");\n $respuesta_correo_admin = $consulta_correo_admin->row();\n\n\n //comprobacion de si el correo del usuario existe\n if ($respuesta_correo_admin != null) {\n \n $respuesta = '0';\n\n $response = array(\n\n 'respuesta' => $respuesta\n\n );\n\n echo json_encode($response);\n\n return;\n }\n\n //crear correlativo de numero de registro para el usuario\n $this->load->model('functions_model');\n $valor = $this->functions_model->GetCorrelative(\"REGISTRO_USER\",true);\n\n \n $token = bin2hex( openssl_random_pseudo_bytes(20) );\n\n $token_correo = hash( 'ripemd160', $correo );\n\n $token_clave= hash('ripemd160', $password);\n\n //data que se enviar a la tabla MA_LOGIN_ADMIN\n $data_reg_admin = array(\n\n 'num_registro' => $valor,\n 'correo' => $correo,\n 'nombre_proveedor' => $nombre_proveedor,\n 'clave' => $token_clave,\n 'token' => $token_correo,\n 'tipo' => $type,\n 'description' => $nombre\n\n );\n\n\n //metodo para insertar en la tabla de usuarios admin\n //$consulta_registro = $this->db->query(\"INSERT INTO MA_LOGIN_ADMIN (correo, nombre_proveedor, )\")\n\n if ($this->db->insert('MA_LOGIN_ADMIN', $data_reg_admin)) {\n \n $respuesta = '1';\n\n $response = array(\n\n 'respuesta' => $respuesta\n\n );\n\n echo json_encode($response);\n\n } else {\n \n $respuesta = '2';\n\n $response = array(\n\n 'respuesta' => $respuesta\n\n );\n\n echo json_encode($response);\n\n }\n \n\n }\n\n }", "public function admin_add()\n\t{\n\t\tif (!empty( $this->request->data)) {\n\t\t\t$this->Role->create();\n\t\t\tif ( $this->Role->save( $this->request->data ) ) {\n\t\t\t\t$this->Session->setFlash(__d('admin', 'Role created.'), 'flash_success', array('plugin' => 'Pukis'));\n\t\t\t\t$this->ajaxRedirect('/admin/users/roles/index');\n\t\t\t}\n\t\t\t\n\t\t\t$this->Session->setFlash(__d('users', 'Unknown error occured!'), 'flash_error', array('plugin' => 'Pukis'));\n\t\t\t$this->ajaxRedirect('/admin/users/roles/index');\n\t\t}\n\t}", "public function add(){\n\t\t\tif(isset($_POST['submit'])){\n\t\t\t\t//MAP DATA\n\t\t\t\t$admin = $this->_map_posted_data();\n\t\t\t\t$this->adminrepository->insert($admin);\n\t\t\t\theader(\"Location: \".BASE_URL.\"admin/admin\");\n\n\t\t\t}else{\n\t\t\t\t$view_page =\"adminsview/add\";\n\t\t\t\tinclude_once(ROOT_PATH.\"admin/views/admin/container.php\");\n\t\t\t\t}\n\t\t}", "public function ajouter() {\n $this->loadView('ajouter', 'content');\n $arr = $this->em->selectAll('client');\n $optionsClient = '';\n foreach ($arr as $entity) {\n $optionsClient .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNomFamille() . '</option>';\n }\n $this->loadHtml($optionsClient, 'clients');\n $arr = $this->em->selectAll('compteur');\n $optionsCompteur = '';\n foreach ($arr as $entity) {\n $optionsCompteur .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNumero() . '</option>';\n }\n $this->loadHtml($optionsCompteur, 'compteurs');\n if(isset($this->post->numero)){\n $abonnement = new Abonnement($this->post);\n $this->em->save($abonnement);\n $this->handleStatus('Abonnement ajouté avec succès.');\n }\n }", "public function add_familiar(){\n\t\t$this->autenticate();//verifica si el usuario este ingresado al sistema\n\t\t$nombre = \"'\".$_POST['nombre'].\"'\";\n\t\t$localizar_emergencia = \"'\".$_POST['localizar_emergencia'].\"'\";\n\t\t$prioridad_localizar = $_POST['prioridad_localizar'];\n\t\t$parentesco = \"'\".$_POST['parentesco'].\"'\";\n\t\t$fecha_nacimiento = \"'\".$_POST['fecha_nacimiento'].\"'\";\n\t\t$telefono = \"'\".$_POST['telefono'].\"'\";\n\t\t$correo = \"'\".$_POST['correo'].\"'\";\n\t\t$administrativo_id = $_POST['administrativo_id'];\n\t\trequire_once(\"../app/models/administrativo.php\");//conexion entre los controladores\n\t\t$administrativo=new Administrativo();\n\t\t$administrativo->new_familiar($nombre,$localizar_emergencia,$prioridad_localizar,$parentesco,$fecha_nacimiento,$telefono,$correo,$administrativo_id);//ingresa los datos a la base de datos\n\t\t$administrativo_id = strval($administrativo_id);//convierte el administrativo_id de entero a string\n\t\theader(\"Location: http://localhost:8000/administrativos/show/$administrativo_id\");\n\t\texit;\n\t\t$this->view('administrativos/index', []);\n\t}", "function admin_insert_new_user(){\r\n\t\tif(isset($_POST['doctor_create_user'])){\r\n\t\t\t$result['insert_new_user_data'] = $this->model->insert_new_user();\r\n\t\t\tredirect('Doctor_control/admin_create_new_user'); \r\n\t\t}\r\n\t\tif(isset($_POST['doctor_update_user'])){\r\n\t\t\tif($this->model->update_new_user_record()){\r\n\t\t\t\tredirect('Doctor_control/admin_create_new_user'); \r\n\t\t\t} \r\n\t\t} \r\n\t}", "public function create()\n\t{\n\t\t$data = ['user_role_id' => USER_ROLE_ADMINISTRATOR];\n\t\tif ($id = $this->users_model->save($data)) {\n\n\t\t\t//if user has not access to update\n\t\t\t$this->session->set_userdata(['new_item' => ['module' => 'administrators', 'id' => $id]]);\n\n\t\t\tredirect(\"/admin/users/update/$id\");\n\t\t}\n\t\telse {\n\t\t\t$this->pls_alert_lib->set_flash_messages('error', lang('admin_create_failed'));\n\t\t\tredirect(\"/admin/administrators\");\n\t\t}\n\t}", "public function createadmin(){\n if($this->check() == true){\n if(isset($_POST['submit'])){\n $name = $_POST['name'];\n $surname = $_POST['surname'];\n $email = $_POST['email'];\n $pass = $_POST['password'];\n $this->admindb->insert('admin', array(\n 'name' => $name,\n 'surname' => $surname,\n 'email' => $email,\n 'password' => password_hash($pass, PASSWORD_BCRYPT, [12])\n ))->get();\n }else{\n // die(\"There's some problem with creating admin...\");\n }\n $this->view('admin/createadmin');\n// $this->view('admin/createadmin');\n }\n }", "public function addOneAction()\n\t{\n\t\t//vérification du statut d'admin\n\t\t$customersManager = new CustomersManager();\n\t\t$customer = $customersManager -> getLoginInfo();\n\t\tif (empty($customer) OR $customer['email'] != ADMIN_EMAIL)\n\t\t{\n\t\t\theader('Location:'.CLIENT_ROOT.'customers/account');\n\t\t\texit();\n\t\t}\n\n\t\t//sécurisation CSRF\n\t\tif(!array_key_exists('CSRFToken', $customer) OR !array_key_exists('CSRFToken', $_POST) OR $_POST['CSRFToken'] != $customer['CSRFToken'])\n\t\t{\n\t\t\theader('Location:'.CLIENT_ROOT.'customers/account');\n exit();\n\t\t}\n\n\t\t//vérification des données reçues\n\t\t$enteredData =\n\t\t[\n\t\t\t'name' => trim($_POST['productName']),\n\t\t\t'description' => trim($_POST['description']),\n\t\t\t'imagePath' => (!empty($_POST['imagePath']))? trim($_POST['imagePath']) : null,\n\t\t\t'priceHT' => trim($_POST['priceHT']),\n\t\t\t'VATRate' => trim($_POST['VATRate']),\n\t\t\t'idCategory' => trim($_POST['idCategory']),\n\t\t];\n\n\t\t//mémorisation pour ré-afficher les données entrées en cas d'erreur\n\t\t$_SESSION['forms']['adminAddProduct']['fieldsContent'] = $enteredData;\n\t\t$requiredFields = ['name', 'description', 'imagePath', 'priceHT', 'VATRate', 'idCategory'];\n\t\t$requiredFieldsNumber = count($requiredFields);\n\n\t\tfor ($i=0; $i < $requiredFieldsNumber; $i++) { \n\t\t\tif(!array_key_exists($requiredFields[$i], $enteredData))\n\t\t\t{\n\t\t\t\t$_SESSION['alertMessages']['error'][] ='Veuillez entrer des informations valides.';\n\t\t\t\theader('Location:'.CLIENT_ROOT.'products/manageForm');\n\t\t\t\texit();\n\t\t\t}\n\t\t\tif(empty($enteredData[$requiredFields[$i]]))\n\t\t\t{\n\t\t\t\t$_SESSION['alertMessages']['error'][] = 'Veuillez remplir tous les champs obligatoires.';\n\t\t\t\theader('Location:'.CLIENT_ROOT.'products/manageForm');\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\n\t\t//ajout dans la BDD\n\t\t$requiredData = $enteredData;\n\t\t$productsManager = new ProductsManager();\n\t\t$productAdded = $productsManager -> addOne($requiredData);\n\n\t\tif($productAdded)\n\t\t{\n\t\t\t$_SESSION['alertMessages']['success'][] = 'Le produit a bien été ajouté !';\n\t\t\tunset($_SESSION['forms']['adminAddProduct']['fieldsContent']);\n\t\t\theader('Location:'.CLIENT_ROOT.'products/manageForm');\n\t\t\texit();\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_SESSION['alertMessages']['error'][] = 'L\\'ajout du produit a échoué !';\n\t\t\theader('Location:'.CLIENT_ROOT.'products/manageForm');\n\t\t\texit();\n\t\t}\n\t}", "public function addUmpireAction() {\n\t\t// Création du formulaire\n\t\t$oUmpire = new Umpire;\n\t\t$oForm = $this->createForm(new UmpireType(), $oUmpire);\n\n\t\t// Traitement du formulaire\n\t\t$oFormHandler = new UmpireHandler($oForm, $this->get('request'), $this->getDoctrine()->getEntityManager());\n\t\tif ($oFormHandler->process()) {\n\t\t\treturn $this->redirect($this->generateUrl('Umpires'));\n\t\t}\n\n\t\treturn $this->render('YBTournamentBundle:Umpire:form_create.html.twig', array('form' => $oForm->createView()));\n\t}", "public function admin_add() {\n\t\tparent::admin_add();\n\n\t\t$users = $this->ShopList->User->find('list');\n\t\t$shopShippingMethods = $this->ShopList->ShopShippingMethod->find('list');\n\t\t$shopPaymentMethods = $this->ShopList->ShopPaymentMethod->find('list');\n\t\t$this->set(compact('users', 'shopShippingMethods', 'shopPaymentMethods'));\n\t}", "function ajax_add()\n {\n\tif ($this->form_validation->run($this, 'users') == TRUE) {\n\t //get data from post\n\t $data = $this->_get_data_from_post();\n\t $return = [];\n\t //$data['photo'] = Modules::run('upload_manager/upload','image');\n\n\t $return['status'] = $this->mdl_users->_insert($data) ? TRUE : FALSE;\n\t $return['msg'] = $data['status'] ? NULL : 'An error occured trying to insert data please try again';\n\t $return['node'] = [\n\t\t'users' => $data['users'],\n\t\t'slug' => $data['users_slug'],\n\t\t'id' => $this->db->insert_id()\n\t ];\n\n\n\t echo json_encode($return);\n\t}\n }", "private function inserirUnidade()\n {\n $cadUnidade = new \\App\\adms\\Models\\helper\\AdmsCreate;\n $cadUnidade->exeCreate(\"adms_unidade_policial\", $this->Dados);\n if ($cadUnidade->getResultado()) {\n $_SESSION['msg'] = \"<div class='alert alert-success'>Unidade cadastrada com sucesso!</div>\";\n $this->Resultado = true;\n } else {\n $_SESSION['msg'] = \"<div class='alert alert-danger'>Erro: A Unidade não foi cadastrada!</div>\";\n $this->Resultado = false;\n }\n }", "function insert(){\n //Declarar variables para recibir los datos del formuario nuevo\n $nombre=$_POST['nombre'];\n $apellido=$_POST['apellido'];\n $telefono=$_POST['telefono'];\n\n $this->model->insert(['nombre'=>$nombre,'apellido'=>$apellido,'telefono'=>$telefono]);\n $this->index();\n }", "function alta_marca(){\n\t\t$u= new Marca_producto();\n\t\t$related = $u->from_array($_POST);\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\n\t\t// save with the related objects\n\t\tif($u->save($related)) {\n\t\t\techo \"<html> <script>alert(\\\"Se han actualizado los datos de la Subfamilia de Productos.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t} else\n\t\t\tshow_error(\"\".$u->error->string);\n\t}", "function alta_material(){\n\t\t$u= new Material_producto();\n\t\t$related = $u->from_array($_POST);\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\n\t\t// save with the related objects\n\t\tif($u->save($related)) {\n\t\t\techo \"<html> <script>alert(\\\"Se han registrado los datos del Material del Productos.\\\"); window.location='\".base_url().\"index.php/almacen/productos_c/formulario/list_materiales';</script></html>\";\n\t\t} else\n\t\t\tshow_error(\"\".$u->error->string);\n\t}", "public function agregarUsuarioController(){\n //se verifica que el ultimo elemento de la lista contenga algo \n if(isset($_POST[\"tipo_cliente\"]) && $_POST[\"tipo_cliente\"] != \"\"){\n //Se almacena la informacion en un arreglo asociativo\n $datosController = array( \"tipo_cliente\"=>$_POST[\"tipo_cliente\"],\n \"telefono\"=>$_POST[\"telefono\"],\n \"nombre\"=>$_POST[\"nombre\"],\n \"ap_paterno\"=>$_POST[\"ap_paterno\"],\n \"ap_materno\"=>$_POST[\"ap_materno\"]\n );\n //Se habla a la clase DATOS para poder enviarle la peticion de agregar un nuevo registro, enviandole el arreglo y la tabla.\n $respuesta = Datos::agregarUsuariosModel($datosController,\"clientes\");\n\n if($respuesta == true){\n //En caso positivo nos redirecciona al cliente.\n echo '<script>\t\t\n\t\t\t location.href= \"index.php?action=cliente\";\n\t\t </script>';\n \n }else{\n //En caso negativo nos deja en la misma ventana.\n echo '<div class=\"alert alert-warning\" role=\"alert\"> <strong>Error!</strong> Revise el contenido que desea agregar. </div>';/*\n echo '<script>\t\t\n\t\t\t location.href= \"index.php?action=agregar_cliente\";\n\t\t </script>';*/\n }\n }\n }", "public function agregarUsuario(){\n \n }", "public function addNew()\n {\n $this->load->model('user_model');\n $data['roles'] = $this->user_model->getUserRoles();\n $data['divisi'] = $this->user_model->getUserDivisi();\n $data['pangkat'] = $this->user_model->getUserPangkat();\n $this->global['pageTitle'] = 'Tambahkan Data Rescuer';\n $this->load->view('includes/header', $this->global);\n $this->load->view('rescuer/addNew', $data);\n $this->load->view('includes/footer');\n }", "function addAdmin($username, $raw_password, $email, $phone) {\n // TODO\n }", "public function addAdmin(){\n\t\t//restricted this area, only for admin\n\t\tpermittedArea();\n\n\t\t$data['countries'] = $this->db->get('countries');\n\n\t\tif($this->input->post())\n\t\t{\n\t\t\tif($this->input->post('submit') != 'addAdmin') die('Error! sorry');\n\n\t\t\t$this->form_validation->set_rules('first_name', 'First Name', 'required|trim');\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'required|trim|is_unique[users.email]');\n\t\t\t$this->form_validation->set_rules('password', 'Password', 'required|matches[passconf]');\n\t\t\t$this->form_validation->set_rules('passconf', 'Password Confirmation', 'required');\n\t\t\t$this->form_validation->set_rules('gender', 'Gender', 'required');\n\t\t\t$this->form_validation->set_rules('country', 'Country', 'required');\n\n\t\t\tif($this->form_validation->run() == true)\n\t\t\t{\n\t\t\t\t$insert = $this->settings_model->addAdmin();\n\t\t\t\tif($insert)\n\t\t\t\t{\n\t\t\t\t\t$this->session->set_flashdata('successMsg', 'Admin Created Success');\n\t\t\t\t\tredirect(base_url('admin_settings/addAdmin'));\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\ttheme('addAdmin', $data);\n\t}", "function default_add(){\n\tglobal $assign_list, $_CONFIG, $_SITE_ROOT, $mod;\n\tglobal $core, $clsModule, $clsButtonNav;\n\t$tableName = \"mdl_user\";\n\t$classTable = \"User\";\n\t$pkeyTable = \"id\";\n\t\n\trequire_once DIR_COMMON.\"/clsForm.php\";\n\t//get _GET, _POST\n\t$pvalTable = isset($_REQUEST[$pkeyTable])? $_REQUEST[$pkeyTable] : \"\";\n\t$btnSave = isset($_POST[\"btnSave\"])? $_POST[\"btnSave\"] : \"\";\n\t//get Mode\n\t$mode = ($pvalTable!=\"\")? \"Edit\" : \"New\";\n\t//init Button\n\t$clsButtonNav->set(\"Save\", \"/icon/disks.png\", \"Save\", 1, \"save\");\n\tif ($mode==\"Edit\"){\n\t\t$clsButtonNav->set(\"New\", \"/icon/add2.png\", \"?admin&mod=$mod&act=add\",1);\n\t\t$clsButtonNav->set(\"Delete\", \"/icon/delete2.png\", \"?admin&mod=$mod&act=delete&$pkeyTable=$pvalTable\");\n\t}\n\t$clsButtonNav->set(\"Cancel\", \"/icon/undo.png\", \"?topica&mod=$mod\");\n\t//################### CHANGE BELOW CODE ###################\n\t$clsUserGroup = new UserGroup();\n\t$arrListUserGroup = $clsUserGroup->getAll();\n\t$arrOptionsUserGroup = array();\n\tif (is_array($arrListUserGroup))\n\tforeach ($arrListUserGroup as $key => $val){\n\t\t$arrOptionsUserGroup[$val[\"user_group_id\"]] = $val[\"display_name\"];\n\t}\n\t//init Form\n\t$arrPositionOptions = array(\"L\"=>\"LEFT\", \"R\"=>\"RIGHT\", \"B\"=>\"BOTTOM\", \"T\"=>\"TOP\");\n\t$arrYesNoOptions = array(\"NO\", \"YES\");\n\t$arrGenderOptions = array(\"Male\", \"Female\");\n\t$clsForm = new Form();\n\t$clsForm->setDbTable($tableName, $pkeyTable, $pvalTable);\n\t$clsForm->setTitle($core->getLang(\"Sửa thông tin sinh viên\"));\n\t//$clsForm->addInputText(\"username\", \"\", \"User Name\", 32, 0, \"style='width:200px'\");\n\t//$clsForm->addInputPassword(\"user_pass\", \"\", \"Password\", 255, 0, \"style='width:200px'\");\n\t//$user_pass_hint = ($mode==\"Edit\")? \"Leave if no change password\" : \"\";\n\t//$clsForm->addHint(\"user_pass\", $user_pass_hint);\n\t$clsForm->addInputText(\"firstname\", \"\", \"Họ\", 255, 1, \"style='width:200px'\");\n\t$clsForm->addInputText(\"lastname\", \"\", \"Tên\", 255, 1, \"style='width:200px'\");\n\t$clsForm->addInputText(\"username\", \"\", \"Username\", 255, 1, \"style='width:200px'\");\n\t$clsForm->addInputText(\"topica_lop\", \"\", \"Lớp\", 255, 1, \"style='width:200px'\");\n\t$clsForm->addInputText(\"topica_nganh\", \"\", \"Ngành\", 255, 1, \"style='width:200px'\");\n\t$clsForm->addInputText(\"topica_nhom\", \"\", \"Nhóm\", 255, 1, \"style='width:200px'\");\n\t$clsForm->addInputText(\"topica_coquan\", \"\", \"Cơ quan\", 255, 1, \"style='width:200px'\");\n\t$clsForm->addInputText(\"topica_chucdanh\", \"\", \"Chức danh\", 255, 1, \"style='width:200px'\");\n\t$clsForm->addInputText(\"topica_chucvutronglop\", \"\", \"Chức vụ trong lớp\", 255, 1, \"style='width:200px'\");\n\t$clsForm->addInputText(\"topica_chucvutrongnhom\", \"\", \"Chức vụ trong nhóm\", 255, 1, \"style='width:200px'\");\n\t$clsForm->addInputText(\"topica_trinhdo\", \"\", \"Trình độ\", 255, 1, \"style='width:200px'\");\n\t$clsForm->addInputText(\"topica_doituongtuyensinh\", \"\", \"Đối tượng tuyển sinh\", 255, 1, \"style='width:200px'\");\n\t\n\t//####################### ENG CHANGE ######################\n\t//do Action\n\tif ($btnSave!=\"\"){\n\t\tif ($clsForm->validate()){\n\t\t\tif ($clsForm->saveData($mode)){\n\t\t\t\theader(\"location: ?$_SITE_ROOT&mod=$mod\");\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$assign_list[\"clsModule\"] = $clsModule;\n\t$assign_list[\"clsForm\"] = $clsForm;\n\t$assign_list[$pkeyTable] = $pvalTable;\n}", "public function addAction(){\n\t\t\t$emp = new Empresa();\n\t\t\t//cargamos el objeto mediantes los metodos setters\n\t\t\t$emp->id = '0';\n\t\t\t$emp->nombre_empresa = $this->getPostParam(\"nombre_empresa\");\n\t\t\t$emp->nit = $this->getPostParam(\"nit\");\n\t\t\t$emp->direccion = $this->getPostParam(\"direccion\");\n\t\t\t$emp->logo = $this->getPostParam(\"imagen\");\n\t\t\t$emp->regimen_id = $this->getPostParam(\"regimen_id\");\n\t\t\t\t\t\t\t\t\n\t\t\tif($emp->save()){\n\t\t\t\tFlash::success(\"Se insertó correctamente el registro\");\n\t\t\t\tprint(\"<script>document.location.replace(\".core::getInstancePath().\"'empresa/mostrar/$emp->id');</script>\");\n\t\t\t}else{\n\t\t\t\tFlash::error(\"Error: No se pudo insertar registro\");\t\n\t\t\t}\n\t\t\t\t\t\n\t }", "public function crearUsuario() {\n\n\n if ($this->seguridad->esAdmin()) {\n $id = $this->usuario->getLastId();\n $usuario = $_REQUEST[\"usuario\"];\n $contrasenya = $_REQUEST[\"contrasenya\"];\n $email = $_REQUEST[\"email\"];\n $nombre = $_REQUEST[\"nombre\"];\n $apellido1 = $_REQUEST[\"apellido1\"];\n $apellido2 = $_REQUEST[\"apellido2\"];\n $dni = $_REQUEST[\"dni\"];\n $imagen = $_FILES[\"imagen\"];\n $borrado = 'no';\n if (isset($_REQUEST[\"roles\"])) {\n $roles = $_REQUEST[\"roles\"];\n } else {\n $roles = array(\"2\");\n }\n\n if ($this->usuario->add($id,$usuario,$contrasenya,$email,$nombre,$apellido1,$apellido2,$dni,$imagen,$borrado,$roles) > 1) {\n $this->perfil($id);\n } else {\n echo \"<script>\n i=5;\n setInterval(function() {\n if (i==0) {\n location.href='index.php';\n }\n document.body.innerHTML = 'Ha ocurrido un error. Redireccionando en ' + i;\n i--;\n },1000);\n </script>\";\n } \n } else {\n $this->gestionReservas();\n }\n \n }", "public function editmobilisateurAction() {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n $m_mobilisateur->find($_POST['id_mobilisateur'], $mobilisateur);\n\n //$mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n //$mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $$mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n //$mobilisateur->setEtat(0);\n $m_mobilisateur->update($mobilisateur);\n\n////////////////////////////////////////////////////////////////////////////////\n \n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembre->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/listmobilisateur');\n \n } catch (Exception $exc) { \n $db->rollback();\n $this->view->message = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionmembre->error = \"Champs * obligatoire\";\n $id = (int)$this->_request->getParam('id');\n if($id != 0) {\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mmobilisateur = new Application_Model_EuMobilisateurMapper();\n $mmobilisateur->find($id,$mobilisateur);\n $this->view->mobilisateur = $mobilisateur;\n } \n }\n } else {\n $id = (int)$this->_request->getParam('id');\n if($id != 0) {\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mmobilisateur = new Application_Model_EuMobilisateurMapper();\n $mmobilisateur->find($id,$mobilisateur);\n $this->view->mobilisateur = $mobilisateur;\n } \n }\n\n }", "function insertAdminUser() {\n // Insert Admin info;\n $userController = new UserController;\n $this->db->exec(\n \"INSERT INTO users (username, password) VALUES (?, ?)\",\n [\n 1 => $this->formValues['adminUsername'],\n 2 => $userController->cryptPassword($this->formValues['adminPassword_1']),\n ]\n );\n }", "public function add() {\r\n\t\t// init view variables\r\n\t\t// ---\r\n\t\t\r\n\t\t// receive userright token\r\n\t\t$urtoken\t= $this->MediawikiAPI->mw_getUserrightToken()->query->tokens->userrightstoken;\r\n\t\t$this->set( 'urtoken', $urtoken );\r\n\t\t\r\n\t\t// receive usergrouplist\r\n\t\t$ugroups\t\t= $this->Users->Groups->find( 'all' )->all()->toArray();\r\n\t\t$this->set( 'ugroups', $ugroups );\r\n\t\t\r\n\t\tif( $this->request->is( 'post' ) ) {\r\n\t\t\t// required fields empty?\r\n\t\t\tif( empty( $this->request->data[\"username\"] ) || empty( $this->request->data[\"email\"] ) ) {\r\n\t\t\t\t$this->set( 'notice', 'Es wurden nicht alle Pflichtfelder ausgefüllt. Pflichtfelder sind all jene Felder die kein (optional) Vermerk tragen.' );\r\n\t\t\t\t$this->set( 'cssInfobox', 'danger' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// usergroups\r\n\t\t\t$addGroups\t\t= '';\r\n\t\t\t\t\t\t\r\n\t\t\tforeach( $this->request->data[\"group\"] as $grpname => $grpvalue ) {\r\n\t\t\t\tif( $grpvalue == true ) {\r\n\t\t\t\t\t$addGroups\t.= $grpname . '|';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$addGroups\t\t= substr( $addGroups, 0, -1 );\r\n\t\t\t\r\n\t\t\t// create new mediawiki user\t\t\t\r\n\t\t\t$result\t\t= $this->create(\r\n\t\t\t\t$this->request->data[\"username\"],\r\n\t\t\t\t$this->request->data[\"email\"],\r\n\t\t\t\t$this->request->data[\"realname\"],\r\n\t\t\t\t$addGroups,\r\n\t\t\t\t'',\r\n\t\t\t\t$this->request->data[\"urtoken\"],\r\n\t\t\t\t$this->request->data[\"mailsender\"],\r\n\t\t\t\t$this->request->data[\"mailsubject\"],\r\n\t\t\t\t$this->request->data[\"mailtext\"]\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( $result != 'Success' ) {\r\n\t\t\t\t$this->set( 'notice', 'Beim Anlegen des Benutzer_inaccounts ist ein Fehler aufgetreten.</p><p>' . $result );\r\n\t\t\t\t$this->set( 'cssInfobox', 'danger' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->set( 'notice', 'Der / Die Benutzer_in wurde erfolgreich angelegt. Er / Sie wurde via E-Mail informiert.' );\r\n\t\t\t$this->set( 'cssInfobox', 'success' );\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// set view variables\r\n\t\t$this->set( 'notice', '' );\r\n\t\t$this->set( 'cssInfobox', '' );\r\n\t}", "public function agregar_usuario_controlador()\n {\n $nombres = strtoupper(mainModel::limpiar_cadena($_POST['usu_nombres_reg']));\n $apellidos = strtoupper(mainModel::limpiar_cadena($_POST['usu_apellidos_reg']));\n $identidad=mainModel::limpiar_cadena($_POST['usu_identidad_reg']);\n $puesto=mainModel::limpiar_cadena($_POST['usu_puesto_reg']);\n $unidad=mainModel::limpiar_cadena($_POST['usu_unidad_reg']);\n $rol = mainModel::limpiar_cadena($_POST['usu_rol_reg']);\n $celular = mainModel::limpiar_cadena($_POST['usu_celular_reg']);\n $usuario = strtolower(mainModel::limpiar_cadena($_POST['usu_usuario_reg']));\n $email=$usuario . '@didadpol.gob.hn' ;\n\n\n /*comprobar campos vacios*/\n if ($nombres == \"\" || $apellidos == \"\" || $usuario == \"\" || $email == \"\" || $rol == \"\" || $identidad == \"\" || $puesto == \"\" || $unidad == \"\") {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO HAS COMPLETADO TODOS LOS CAMPOS QUE SON OBLIGATORIOS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n if (mainModel::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $nombres)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRES SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if (mainModel::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $apellidos)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO APELLIDOS SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if ($celular != \"\") {\n if (mainModel::verificar_datos(\"[0-9]{8}\", $celular)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE CELULAR NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n if (mainModel::verificar_datos(\"[0-9]{13}\", $identidad)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE IDENTIDAD NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar DNI*/\n $check_dni = mainModel::ejecutar_consulta_simple(\"SELECT identidad FROM tbl_usuarios WHERE identidad='$identidad'\");\n if ($check_dni->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE IDENTIDAD YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n if (mainModel::verificar_datos(\"[a-z]{3,15}\", $usuario)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRE DE USUARIO SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 5 Y UN MAXIMO DE 15 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n /*validar usuario*/\n $check_user = mainModel::ejecutar_consulta_simple(\"SELECT nom_usuario FROM tbl_usuarios WHERE nom_usuario='$usuario'\");\n if ($check_user->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL USUARIO YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar email*/\n\n \n $caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n $pass = \"\";\n for ($i = 0; $i < 8; $i++) {\n $pass .= substr($caracteres, rand(0, 64), 1);\n }\n $message = \"<html><body><p>Hola, \" . $nombres . \" \" . $apellidos;\n $message .= \" Estas son tus credenciales para ingresar al sistema de DIDADPOL\";\n $message .= \"</p><p>Usuario: \" . $usuario;\n $message .= \"</p><p>Correo: \" . $email;\n $message .= \"</p><p>Contraseña: \" . $pass;\n $message .= \"</p><p>Inicie sesión aquí para cambiar la contraseña por defecto \" . SERVERURL . \"login\";\n $message .= \"<p></body></html>\";\n\n $res = mainModel::enviar_correo($message, $nombres, $apellidos, $email);\n if (!$res) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE ENVIÓ CORREO ELECTRÓNICO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n $passcifrado = mainModel::encryption($pass);\n\n $datos_usuario_reg = [\n \"rol\" => $rol,\n \"puesto\"=>$puesto,\n \"unidad\"=>$unidad,\n \"usuario\" => $usuario,\n \"nombres\" => $nombres,\n \"apellidos\" => $apellidos,\n \"dni\"=>$identidad,\n \"clave\" => $passcifrado,\n \"estado\" => \"NUEVO\",\n \"email\" => $email,\n \"celular\" => $celular\n ];\n $agregar_usuario = usuarioModelo::agregar_usuario_modelo($datos_usuario_reg);\n if ($agregar_usuario->rowCount() == 1) {\n $alerta = [\n \"Alerta\" => \"limpiar\",\n \"Titulo\" => \"USUARIO REGISTRADO\",\n \"Texto\" => \"LOS DATOS DEL USUARIO SE HAN REGISTRADO CON ÉXITO\",\n \"Tipo\" => \"success\"\n ];\n } else {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE HA PODIDO REGISTRAR EL USUARIO\",\n \"Tipo\" => \"error\"\n ];\n }\n echo json_encode($alerta);\n }", "function insertadmin(){\n $sql=\"INSERT INTO medewerkers (medewerkerscode, voorletters, voorvoegsel, achternaam, gebruikersnaam, wachtwoord) VALUES (:medewerkerscode, :voorletters, :voorvoegsel, :achternaam, :gebruikersnaam, :wachtwoord);\";\n \n $stmt=$this->conn->prepare($sql);\n \n $stmt->execute([\n 'medewerkerscode'=>Null,\n 'voorletters'=>'w',\n 'voorvoegsel'=>Null,\n 'achternaam'=>'Hoek',\n 'gebruikersnaam'=>'Wessel',\n 'wachtwoord'=>password_hash('test', PASSWORD_DEFAULT)\n ]);\n }", "public function registrarAdministrador(){\n\n $datos = array(\n \t'ID_ADMINISTRADOR'=>NULL,\n \t'NOMBRE'=>$_POST['NOMBRE'],\n \t'APELLIDO'=>$_POST['APELLIDO'],\n \t'EMAIL'=>$_POST['EMAIL'],\n \t'USERNAME'=>$_POST['USERNAME'],\n \t'PASS'=>$_POST['PASS'],\n \t'DESCRIPCION'=>$_POST['DESCRIPCION'],\n \t'PORTAFOLIO'=>$_POST['PORTAFOLIO'],\n \t'TELEFONO'=>$_POST['TELEFONO'],\n \t'DIRECCION'=>$_POST['DIRECCION'],\n \t'ID_ROL'=>$_POST['ID_ROL']\n \t);//fin del array con los datos del administrador\n\n $result = $this->Administrador_model->registrarAdministrador($datos);\n\n if($result){\n\t\t echo \"<script> \n\t\t alert('Administrador registrado sucessfull...!!!'); \n\t\t window.location='./Agregar_Administrador'\n\t\t </script>\";\n\t\t // header(\"Location:\".base_url()); // si ponemos esto obviaria el alert() de javaScript. por eso redirecionamos en el mismo script con window.location\n\n\t\t }else{\n\t\t \t echo \"<script> \n\t\t \t alert('Error al registrar Administrador. Intentelo mas tarde.'); \n\t\t window.location='./Agregar_Administrador'\n\t\t </script>\";\n\t\t }\n \n }", "public function post_add_users() {\n\t}", "function admin_add() {\n\t\tif (!empty($this->data)) {\n\t\t\t$this->Project->create();\n\t\t\t$status = $this->Project->saveAll($this->data);\n\t\t\tif ($status) {\n\t\t\t\t$name = Set::classicExtract($this->data, 'Upload.0.file.name');\n\t\t\t\tif(empty($name)){\n\t\t\t\t\t$this->Session->setFlash(__('The project has been saved', true));\n\t\t\t\t\t$this->redirect(array('action'=>'dashboard', $this->Project->getLastInsertId()));\n\t\t\t\t}else{\n\t\t\t\t\t$this->redirect(array(\n\t\t\t\t\t\t'action' => 'add_members', \n\t\t\t\t\t\t'admin' => true, \n\t\t\t\t\t\t$this->Project->getLastInsertId(),\n\t\t\t\t\t\t$this->Project->Upload->getLastInsertId()\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The project could not be saved. Please, try again.', true));\n\t\t\t}\n\t\t}else{\n\t\t\t//make it so that the person who's creating is one of the admin by default.\n\t\t\t$this->data['Admin']['Admin'] = array($this->Auth->user('id'));\n\t\t}\n\t\t$admins = $this->Project->Admin->find('list');\n\t\t\n\t\t\n\t\t$this->set(compact('admins'));\n\t}", "public function add(){\n $data = array(\n \"user_nim\" => $this->input->post('user_nim'),\n \"user_fullname\" => $this->input->post('user_fullname'),\n \"user_password\" => md5($this->input->post('user_password')),\n \"user_email\" => $this->input->post('user_email'),\n \"user_semester\" => $this->input->post('user_semester'),\n \"user_level\" => $this->input->post('user_level'),\n \"user_aktif\" => $this->input->post('user_aktif'),\n \"user_creator\" => $this->session->userdata('nim')\n );\n \n $this->db->insert('tbl_users', $data); // Untuk mengeksekusi perintah insert data\n }", "public function add() {\n $this->autoRender = false;\n\n if ($this->request->is('post')) {\n $param = $this->request->getData();\n\n $role_id = $this->viewVars['roleID'];\n if ($role_id == 'ADMIN') {\n $addMember = [];\n $addMember['user_id'] = $member_id = isset($param['member_id']) ? $param['member_id'] : '';\n $addMember['project_id'] = $project_id = isset($param['project_id']) ? $param['project_id'] : '';\n $addMember['is_leader'] = $is_leader = isset($param['is_leader']) ? $param['is_leader'] : '';\n\n $info = $this->Members->find()\n ->where(['user_id' => $member_id,\n 'project_id' => $project_id\n ])->toArray();\n // pr($info);die;\n\n $member = $this->Members->newEntity($addMember);\n $add = $this->Members->patchEntity($member, $addMember);\n// pr($add);die;\n if (empty($member->errors())) {\n if (empty($info) || isset($info['user_id'])) {\n if ($this->Members->save($add)) {\n $arrJson = array(\n 'http' => 200,\n 'message' => 'success'\n );\n die(json_encode($arrJson));\n }\n } else {\n http_response_code('401');\n $arrJson = array(\n 'http' => 401,\n 'message' => 'error'\n );\n }\n die(json_encode($arrJson));\n } else {\n http_response_code('400');\n $arrJson = array(\n 'http' => 400,\n 'message' => 'bad request'\n );\n die(json_encode($arrJson));\n }\n } else {\n http_response_code('404');\n $arrJson = array(\n 'http' => 404,\n 'message' => 'Ban khong du tham quyen truy cap trang',\n );\n die(json_encode($arrJson));\n }\n } else {\n http_response_code('404');\n $arrJson = array(\n 'http' => 404,\n 'message' => 'not found',\n );\n die(json_encode($arrJson));\n }\n }", "public function addMonumentAction(Request $request){\n if(($this->container->get('security.authorization_checker')->isGranted('ROLE_CLIENT'))){\n throw new AccessDeniedException('Access Denied!!!!!');\n }\n else{\n $monument = new Monument();\n $test = \"ajout\";\n $form = $this->createForm(MonumentType::class, $monument);\n $form = $form->handleRequest($request);\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($monument);\n $em->flush();\n return $this->redirectToRoute('museum_showMonumentspage');\n }\n return $this->render('@Museum/Monument/addMonument.html.twig', array('form' => $form->createView(), 'test' => $test));\n }}", "function saveAdmin(Usuario $objeto) {\n $campos = $this->_getCampos($objeto);\n \n $id = $campos['id'];\n unset($campos['id']);\n unset($campos['falta']);\n unset($campos['activa']);\n \n if($objeto->getPassword() === null || $objeto->getPassword() === ''){\n unset($campos['password']);\n }\n return $this->db->updateParameters(self::TABLA, $campos, array('id' => $id));\n }", "function add() {\n RR_Session::start();\n $get = RR_Session::get('loggedin');\n if ($get == true) {\n // blijf op de pagina\n // en laad de admin view\n $this->validateUser(true, 'newuser');\n } else {\n // anders redirect trug naar de login pagina\n $this->validateUser(false);\n }\n }", "public function createAdmin() {\n if(User::where('email', '[email protected]')->count() == 0) {\n $admin = new User();\n $admin->name = \"Administrador\";\n $admin->email = \"[email protected]\";\n $admin->password = bcrypt(\"admin\");\n $admin->user_type = User::UserTypeAdmin;\n $admin->save();\n }\n }", "function createMembreGestionForm(){\n\n\t$toReturn = '';\n\t$toReturn .='<h3><span class=\"to_edit\"><a href=\"administration.php?membre=gestion&page=1&order=membre_date_modif\">Membres</a></span>gérer</h3>';\n\t\n\t$toReturn .='<hr/>';\n\t$toReturn .='<form action=\"admin_traitement_membre.php\" method=\"post\" enctype=\"multipart/form-data\">';\n\n\n\t//-----------filtre de tri-----------//\n\t$toReturn .= '<p><select id=\"order\" name=\"order\">';\n \t$toReturn .= '<option value=\"membre_date_modif\"';\n \tif($_GET['order']==\"membre_date_modif\"){\n \t\t$toReturn .= ' selected';\n \t}\n \t$toReturn .= '>trier par derniers modifiés</option>';\n \t$toReturn .= '<option value=\"membre_date_inscription\"';\n \tif($_GET['order']==\"membre_date_inscription\"){\n \t\t$toReturn .= ' selected';\n \t}\n \t$toReturn .= '>trier par derniers inscrits</option>'; \n \t$toReturn .= '<option value=\"pseudo\"';\n \tif($_GET['order']==\"pseudo\"){\n \t\t$toReturn .= ' selected';\n \t}\n \t$toReturn .= '>trier par pseudo</option>';\n \t\n\t$toReturn .= '</select></p>';\n\t////-----------filtre de tri-----------//\n\t$nb_element_par_page=50;\n\t// ------les dev les uns aux dessus des autres------- //\n\t$result = mysqlSelectAllMembresWithPageNumber($_GET['page'], $_GET['order'], $nb_element_par_page);\n\t$toReturn .='<fieldset>';\n\t$toReturn .='<table>';\n\t$toReturn .='<tr>\n\t\t\t\t<th class=\"center\" ><input id=\"select_all\" type=\"checkbox\"/></th>\n\t\t\t\t<th></th>\n\t\t\t\t<th></th>\n \t\t\t<th>pseudo</th>\n \t\t\t<th>email</th>\n \t\t\t<th>inscription</th>\n \t\t\t<th>dernière connexion</th>\n \t\t\t<th>groupe</th>\n \t\t\t\t</tr>';\n\twhile($data=mysql_fetch_array($result)) {\n \t\t$toReturn .='<tr>';\n\t\t$toReturn .= '<td class=\"center\"><input type=\"checkbox\" name=\"membres[]\" value=\"'.htmlspecialchars(trim($data[\"id_membre\"])).'\"/></td>';\n\t\t$toReturn .= '<td class=\"center delete_item_table\"><a href=\"admin_traitement_membre.php?submit_membre=delete&id_membre='.htmlspecialchars(trim($data[\"id_membre\"])).'&order='.$_GET['order'].'\"><span>supprimer</span></a></td>';\n\t\t$toReturn .= '<td class=\"center edit_item_table\"><a href=\"admin_traitement_membre.php?submit_membre=edit&id_membre='.htmlspecialchars(trim($data[\"id_membre\"])).'&order='.$_GET['order'].'\"><span>modifier</span></a></td>';\n\t\t$toReturn .= '<td><span>'.htmlspecialchars(trim($data[\"pseudo\"])).'</span></td>';\n\t\t$toReturn .= '<td><span>'.htmlspecialchars(trim($data[\"email\"])).'</span></td>';\n\t\t$toReturn .= '<td><span>'.htmlspecialchars(trim($data[\"membre_date_inscription\"])).'</span></td>';\n\t\t$toReturn .= '<td><span>'.htmlspecialchars(trim($data[\"membre_date_derniere_connexion\"])).'</span></td>';\n\n\t\t$toReturn .= '<td><span>'.htmlspecialchars(trim($data[\"groupe\"])).'</span></td>';\n\t\t$toReturn .='</tr>';\n\t}\n\t$toReturn .='</table>';\n\t$toReturn .='</fieldset>';\n\t\n\t$toReturn .='<p><input id=\"submit\" type=\"submit\" value=\"supprimer la selection\" name=\"submit_membre\"/></p>';\n\n\t// ------page------- //\n\t$resultDev = mysqlSelectAllMembres();\n\t$nbElements = mysql_num_rows($resultDev);\t\n\tif(\tceil($nbElements/$nb_element_par_page) > 1){\n\t$toReturn .= '<div class=\"numeros_pages\">';\n\tif($_GET['page']!=1){\n\t\t$toReturn .= '<a href=\"administration.php?membre=gestion&page='.($_GET['page']-1).'&order='.($_GET['order']).'\"> << </a>';\n\t}\n\t$toReturn .='<select name=\"page\" class=\"page_selector\">';\n\tfor($i = 1; $i <= ceil($nbElements/$nb_element_par_page); $i++){\n\t\t$toReturn .= '<option value=\"'.$i.'\"';\n\t\tif($i == $_GET['page']){\n\t\t\t$toReturn .= 'selected=\"selected\"';\n\t\t}\n\t\t$toReturn .= '>'.$i.'</option>';\n\t}\n\t$toReturn .='</select>';\n\tif($_GET['page']!=ceil($nbElements/$nb_element_par_page)){\n\t\t$toReturn .= '<a href=\"administration.php?membre=gestion&page='.($_GET['page']+1).'&order='.($_GET['order']).'\"> >> </a>';\n\t}\n\t$toReturn .= '</div>';\n\t}\n\t// ------page------- //\n\n\t// ------les dev les uns aux dessus des autres------- //\n\t$toReturn .='<input type=\"hidden\" id=\"admin\" value=\"advance\"/>';\n\t$toReturn .='<input type=\"hidden\" id=\"admin_rubrique\" value=\"membre\"/>';\n\t$toReturn .='<input type=\"hidden\" id=\"admin_operation\" value=\"gestion\"/>';\n\t$toReturn .='</form>';\n\treturn $toReturn;\n\t\n\t\n}", "function addManagement(){\n\t\tif(isset($_POST['insertManagement'])){\n\t\t\t//assign variables\n\n\t\t\t$managementName= isset($_POST['managementName'])? filter_var($_POST['managementName'],FILTER_SANITIZE_STRING) : '';\n\n\t\t\t// creating array of errors\n\t\t\t$formErrors = array();\n\n\t\t\tif (empty($managementName) ){\n\t\t\t\t//$formErrors[] = 'username must be larger than chars';\n\t\t\t\techo \"management cant be empty\";\n\t\t\t\t// print_r($formErrors) ;\n\t\t\t} else {\n\t\t\t\t$con = connect();\n\t\t\t\t$sql= \"INSERT INTO managements(Management)VALUES ('\".$managementName.\"')\" ;\n\t\t\t\t$stmt = $con->prepare($sql);\n\t\t\t\t$stmt->execute();\n\t\t\t\techo \"done\";\n\t\t\t}\n\t\t}\n\t}", "public function add()\n\t{\n\t\t$nama = html_escape($this->input->post('nama', true));\n\t\t$username = html_escape(str_replace(' ', '', strtolower($this->input->post('username', true))));\n\t\t$password = html_escape(sha1($this->input->post('password', true)));\n\t\t$level = html_escape($this->input->post('level', true));\n\n\t\t$data = [\n\t\t\t'username' => $username,\n\t\t\t'password' => $password,\n\t\t\t'nama_user' => $nama,\n\t\t\t'level' => $level\n\t\t];\n\n\t\t$this->User_m->insert('users', $data);\n\t\t$this->session->set_flashdata('pesan', '<div class=\"alert alert-success\">Data User Berhasil Ditambahkan.</div>');\n\t\tredirect('admin/user');\n\t}", "public function AddMentoratUser($id){\n if($user = User::where(['id' => $id,'mentorat' => User::not_mentorat,'type' => User::user])->first()){\n $this->mail->ID840231($user->id,Session::get('userData'));\n toastr()->success('This user has been emailed to approve mentor');\n\n $user->mentorat = User::in_standby_mentorat;\n $user->save();\n }else{\n toastr()->error('Something is wrong!');\n }\n return Redirect::back();\n }", "public function action_add(){\n\t\t$monumentId = $this->request->param('id');\n\t\t$user = Auth::instance()->get_user();\n\t\t\n\t\t// Add the monument to the favorite list of the current user\n\t\t$favoriteList = new Model_List_Favorite();\t\t\n\t\t$favoriteList->add($monumentId, $user->UserID);\n\t\t\n\t\t// Redirect the user back to the monument page\n\t\t$this->request->redirect('monument/view/' . $monumentId);\n\t}", "public function addMembro($id_usuario, $id_grupo) {\n $sql = \"INSERT INTO grupos_membros SET id_usuario = '$id_usuario', id_grupo = '$id_grupo'\";\n $this->db->query($sql);\n }", "public function store(MobiliariosRequest $request)\n {\n Bitacoras::bitacora(\"Registro de nuevo mobiliario: \".$request['nombre']);\n $mobiliario = new Mobiliarios;\n $mobiliario->codigo = $request->codigo;\n $mobiliario->nombre= $request->nombre;\n $mobiliario->fecha_compra= $request->fecha_compra;\n $mobiliario->precio= $request->precio;\n $mobiliario->descripcion =$request->descripcion;\n $mobiliario->estado = $request->estado;\n $mobiliario->nuevo = $request->nuevo;\n if($request->nuevo == 1){\n $mobiliario->anios=null;\n }else\n {\n if($request->anios == '' && $request->anios2 != ''){\n $mobiliario->anios = $request->anios2;\n }else{\n $mobiliario->anios = $request->anios;\n }\n }\n $mobiliario->proveedor_id = $request->proveedor_id;\n $mobiliario->tipo_id = $request->tipo_id;\n $mobiliario->credito = $request->credito;\n $mobiliario->iva=$request->iva;\n if($request->credito == 0 )\n {\n $mobiliario->interes=null;\n $mobiliario->num_cuotas=null;\n $mobiliario->val_cuotas=null;\n $mobiliario->tiempo_pago=null;\n $mobiliario->cuenta=null;\n }else\n {\n $mobiliario->interes= $request->interes;\n $mobiliario->num_cuotas= $request->num_cuotas;\n $mobiliario->val_cuotas= $request->val_cuotas;\n $mobiliario->tiempo_pago= $request->tiempo_pago;\n $mobiliario->cuenta= $request->cuenta;\n }\n\n $mobiliario->save();\n return redirect('/mobiliarios')->with('mensaje','Registro Guardado');\n }", "public function actionCreate() {\n $id_user = Yii::app()->user->getId();\n $model = User::model()->findByPk($id_user);\n $tipo = $model->id_tipoUser;\n if ($tipo == \"1\") {\n $model = new Consultor;\n $modelUser = new User;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Consultor'])) {\n $model->attributes = $_POST['Consultor'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n \n \n \n $senha = uniqid(\"\", true);\n $modelUser->password = $senha;\n $modelUser->username = $_POST['username'];\n $modelUser->email = trim($model->email);\n $modelUser->attributes = $modelUser;\n $modelUser->id_tipoUser = 4;\n $modelUser->senha = '0';\n\n if ($modelUser->save()) {\n\n $model->id_user = $modelUser->id;\n if ($model->save()) {\n $this->redirect(array('EnviaEmail', 'nomedestinatario' => $model->nome, \"emaildestinatario\" => $model->email, \"nomedeusuario\" => $modelUser->username, \"senha\" => $modelUser->password));\n }\n }\n \n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n \n }else {\n $this->redirect(array('User/ChecaTipo'));\n }\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 }", "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 }", "function agregar_campos_personalizados_usuario_backend($user) {\n\t$user_coupon_visible = esc_attr(get_the_author_meta('user_coupon_visible', $user->ID ));\n\t$user_es_regalo = esc_attr(get_the_author_meta('user_es_regalo', $user->ID ));?>\n \n\t<h3>Campos adicionales</h3>\n \n\t<table class=\"form-table\">\n\t\t<th><label for=\"user_coupon_visible\">¿Coupon Visible?</label></th>\n\t <tr>\n\t\t<td><input type=\"text\" name=\"user_coupon_visible\" id=\"user_coupon_visible\" class=\"regular-text\" value=\"<?php echo $user_coupon_visible;?>\" /></td>\n\t </tr>\n\t <th><label for=\"user_regalo_visible\">¿Es un regalo?</label></th>\n\t <tr>\n\t\t<td><input type=\"text\" name=\"user_es_regalo\" id=\"user_es_regalo\" class=\"regular-text\" value=\"<?php echo $user_es_regalo;?>\" /></td>\n\t </tr>\n\t</table>\n \n <?php }", "public function NewMobidul ()\n {\n \\Log::info(\"New Mobidul begin!\");\n\n $request = Request::instance();\n $content = $request->getContent();\n\n $json = json_decode($content);\n $code = $json->code;\n $name = $json->name;\n $mode = $json->mode;\n\n $description = isset($json->description)\n ? $json->description\n : 'Ein tolles Mobidul entsteht hier.';\n\n //check if mobidul code is a protected key word\n if ( $this->isMobidulCodeProtected($code) )\n return $response = [\n 'success' => false,\n 'msg' => 'WSC_MOBIDUL_PROTECTED'\n ];\n\n\n if ( ! Mobidul::HasMobidulId($code) )\n {\n \\Log::info(\"Mobidul gets created!\");\n\n $mobidul = Mobidul::create(\n [\n 'name' => $name,\n 'code' => $code,\n 'description' => $description,\n 'mode' => $mode\n ]);\n\n $userId = Auth::id();\n //$category = Category::create(['name' => 'Allgemein', 'mobidulId' => $mobidul->id]);\n\n DB::table('user2mobidul')->insert(\n [\n 'userId' => $userId,\n 'mobidulId' => $mobidul->id,\n 'rights' => 1\n ]);\n\n\n return $response = [\n 'success' => true,\n 'msg' => 'WSC_MOBIDUL_SUCCESS',\n 'code' => $code\n ];\n }\n else\n return $response = [\n 'success' => false,\n 'msg' => 'WSC_MOBIDUL_IN_USE'\n ];\n }", "public function add() {\n if ($_POST){\n \n $username = filter_input(INPUT_POST, 'username');\n $password = filter_input(INPUT_POST, 'password');\n $password2 = filter_input(INPUT_POST, 'password2');\n $fullname = filter_input(INPUT_POST, 'fullname');\n $email = filter_input(INPUT_POST, 'email');\n \n if (!preg_match('/^[a-z0-9]{4,}$/', $username) or !preg_match('/[A-z 0-9\\-]+$/', $fullname) or $email == '' or $password != $password2) {\n $this->setData('message', 'Podaci nisu tačno uneti.');\n } else {\n $passwordHash = hash('sha512', $password . Configuration::SALT);\n $res = HomeModel::add($username, $passwordHash , $fullname, $email);\n if ($res){\n Misc::redirect('successfull_registration');\n } else {\n $this->setData('message', 'Došlo je do greške prilikom dodavanja. Korisničko ime je verovatno zauzeto.');\n }\n } \n }\n }", "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 }", "function getAdd($usuario)\n {\n $html = new HTML();\n $tpl= new IUGOTemplate(\"admin/user/add.html\");//ubicacion del html con el contenido\n $tpl = $this->generateCommonAssigns($tpl,$html);\n $tpl->assign(\"js_usuario\", $html->includeJs('views/admin/user/add'));\n $tpl->assign(\"msg_error\", Session::instance()->getAndClearFlash());\n \n $tpl->assign(\"start_form\",$html->startForm('form_user','form_user','/admin/user/add','','','form'));\n $tpl->assign(\"btn_save\",'<button class=\"button\" type=\"submit\" onclick=\"$(\\'#form_user\\').submit();\">'.$html->image('admin/icons/tick.png', 'Save').' Save </button>');\n $tpl->assign(\"close\",$html->link('Cancel','admin/user/index/','','','text_button_padding link_button'));\n $tpl->assign(\"end_form\",$html->endForm(''));\n\n $tpl->assign(\"id_user\",$usuario['User']['id']);\n $tpl->assign(\"usuario_user\",$usuario['User']['usuario']);\n $tpl->assign(\"nombre_user\",$usuario['User']['nombre']);\n if(isset($usuario['User']['id'])){\n $tpl->assign(\"display_pass\",\"style='display:none;'\");\n $tpl->assign(\"mod_pass\",'<a id=\"mensaje_pass\" href=\"#\" onclick=\"modificarPass();\">Cambiar contrase&ntilde;a</a>');\n }\n\n return $tpl;\n }", "function add_process()\r\r\r\n\t{\t\r\r\r\n\t\t\r\r\r\n\t\tif($this->session->userdata('login_admin') == true)\r\r\r\n\t\t{\r\r\r\n\r\r\r\n\t\t\t$user_id \t\t\t\t= $this->session->userdata('id_user');\r\r\r\n\t\t\t$judul\t\t\t\t\t= $this->model_utama->get_detail('1','setting_id','setting')->row()->website_name;\r\r\r\n\t\t\t$data['title'] \t\t\t= 'Halaman Tambah customer | '.$judul;\r\r\r\n\t\t\t$data['heading'] \t\t= 'Add customer List';\r\r\r\n\t\t\t$data['customer_list']\t= $this->model_utama->get_order('create_date','desc','customers');\r\r\r\n\t\t\t$data['form_action'] \t= site_url('index.php/admin/customer/add_process');\r\r\r\n\t\t\t$data['page']\t\t\t= 'admin/customer/page_form';\r\r\r\n\r\r\r\n\t\t\t/*===================================================\r\r\r\n\t\t\t\t1.\tREGISTER PROCESS\r\r\r\n\t\t\t===================================================*/\r\r\r\n\t\t\t$redirect\t\t\t\t=\t'admin/customer/add';\r\r\r\n\t\t\t$upload_image \t\t\t= \ttrue;\r\r\r\n\t\t\t$view\t\t\t\t\t= \t'template';\r\r\r\n\t\t\t$create_by \t\t\t\t= \t'admin';\r\r\r\n\t\t\t$this->customer_register_helper(\t$redirect,\r\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t$upload_image,\r\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t$view,\r\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t$data,\r\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t$create_by\t\r\r\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\r\r\n\r\r\r\n\t\t}\r\r\r\n\t\telse\r\r\r\n\t\t{\r\r\r\n\t\t\tredirect(base_url().'login');\r\r\r\n\t\t}\r\r\r\n\t}", "public function create_admin() {\n\t\t$data['school_id'] = html_escape($this->input->post('school_id'));\n\t\t$data['name'] = html_escape($this->input->post('name'));\n\t\t$data['email'] = html_escape($this->input->post('email'));\n\t\t$data['password'] = sha1($this->input->post('password'));\n\t\t$data['phone'] = html_escape($this->input->post('phone'));\n\t\t$data['gender'] = html_escape($this->input->post('gender'));\n\t\t$data['blood_group'] = html_escape($this->input->post('blood_group'));\n\t\t$data['address'] = html_escape($this->input->post('address'));\n\t\t$data['role'] = 'admin';\n\t\t$data['watch_history'] = '[]';\n\n\t\t// check email duplication\n\t\t$duplication_status = $this->check_duplication('on_create', $data['email']);\n\t\tif($duplication_status){\n\t\t\t$this->db->insert('users', $data);\n\n\t\t\t$response = array(\n\t\t\t\t'status' => true,\n\t\t\t\t'notification' => get_phrase('admin_added_successfully')\n\t\t\t);\n\t\t}else{\n\t\t\t$response = array(\n\t\t\t\t'status' => false,\n\t\t\t\t'notification' => get_phrase('sorry_this_email_has_been_taken')\n\t\t\t);\n\t\t}\n\n\t\treturn json_encode($response);\n\t}", "public function admin_add(){\n \n $this->set(\"title_for_layout\",\"Create a Satellite Group\");\n \n // Load all existing satellites\n $this->set('satellites', $this->Satellite->find('all'));\n }", "public function add() \n { \n $data['piutang'] = $this->piutangs->add();\n $data['action'] = 'piutang/save';\n \n $tmp_statuss = $this->statuss->get_all();\n foreach($tmp_statuss as $row){\n $statuss[$row['id']] = $row['status'];\n }\n $data['statuss'] = $statuss;\n \n $this->template->js_add('\n $(document).ready(function(){\n // binds form submission and fields to the validation engine\n $(\"#form_piutang\").parsley();\n });','embed');\n \n $this->template->render('piutang/form',$data);\n\n }", "function createNewAdminOfEvent() \n {\n \n echo \"<div class=''>\";\n // SPEICHERUNG\n if (isset($_GET['newuserid']) AND isset($_GET['neweventid'])) {\n $eventid = $_GET['neweventid'];\n $userid = $_GET['newuserid'];\n\n if (is_numeric($eventid) == true AND is_numeric($userid) == true) {\n // Check ob User existiert:\n $correctuserid = $this->sqlselect(\"SELECT id,Name FROM benutzer WHERE id=$userid LIMIT 1\");\n if (isset($correctuserid[0]->id)) {\n // Benutzer existiert\n $newuserid = $correctuserid[0]->id;\n\n // Check ob Event existiert:\n $correcteventid = $this->sqlselect(\"SELECT id,eventname FROM eventlist WHERE id=$eventid LIMIT 1\");\n if (isset($correcteventid[0]->id)) {\n // Event existiert\n $neweventid = $correcteventid[0]->id;\n\n $sql = \"INSERT INTO eventadministrators (eventid, userid) VALUES ('$neweventid','$newuserid')\";\n if ($this->sqlInsertUpdateDelete($sql) == true) {\n $this->erfolgMessage(\"Administrator gespeichert\");\n } else {\n $this->errorMessage(\"Fehler beim speichern des neuen Administrators\");\n }\n } else {\n $this->errorMessage(\"Das Event existiert nicht.\");\n }\n } else {\n $this->errorMessage(\"Benutzer existiert nicht.\");\n }\n\n\n }\n }\n\n // AUSGABE\n $eventlist = $this->sqlselect(\"SELECT * FROM eventlist\");\n $userlist = $this->sqlselect(\"SELECT * FROM benutzer\");\n\n echo \"<form method=get action='#admins'>\";\n echo \"<select name=neweventid>\";\n for ($i = 0; $i < sizeof($eventlist); $i++) {\n echo \"<option value=\".$eventlist[$i]->id.\">\".$eventlist[$i]->eventname.\"</option>\";\n }\n echo \"</select>\";\n\n echo \"<select name=newuserid>\";\n for ($j = 0; $j < sizeof($userlist); $j++) {\n echo \"<option value=\".$userlist[$j]->id.\">\".$userlist[$j]->Name.\"</option>\";\n }\n echo \"</select>\";\n echo \"<button type=submit>OK</button>\";\n echo \"</form>\";\n\n echo \"<div>\";\n }", "function inserir() {\n\t\t$this->sql = mysql_query(\"INSERT INTO suporte (user_cad, data_cad, id_regiao, exibicao, tipo, prioridade, assunto, mensagem, arquivo, status, status_reg,suporte_pagina)\n\t\t\t\t\t VALUES\t('$this->id_user_cad ','$this->data_cad','$this->id_regiao', '$this->exibicao', '$this->tipo','$this->prioridade', '$this->assunto', '$this->menssagem', '$this->tipo_arquivo','1','1','$this->pagina');\") or die(mysql_error());\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\n\t\t}", "public function enregister_utilisateur(){\n $this->layout ='admin';\n $title=\"Ets MAKI | Utilisateurs\";\n\n $utilisateur=$this->User->find('all');\n #Ajouter de l'utilisateur\n if($this->request->is('post')){\n $data=$this->request->data; #Récuperation des données du formulaire\n #Récuperation du champs utilisateur\n $username=$data[\"Users\"][\"username\"];\n #Vérification de l'utilisateur\n $utilisateur=$this->User->find('all',array('conditions'=>array('username'=>$username)));\n if(empty($utilisateur)){\n $this->User->create($data, true);\n if($this->User->save(array(\n 'nom'=>strtoupper($data[\"Users\"][\"nom\"]),\n 'post_nom'=>strtoupper($data[\"Users\"][\"post_nom\"]),\n 'prenom'=>ucfirst($data[\"Users\"][\"prenom\"]),\n 'role'=>$data[\"Users\"][\"role\"],\n 'username'=>$data[\"Users\"][\"username\"],\n 'password'=>$this->Auth->password($data[\"Users\"][\"password\"]), \n \"statut\"=>true\n ))){\n $this->Session->setFlash(\"Succès d'enregistrement\",'succes');\n return $this->redirect(array('action'=>'enregister_utilisateur'));\n }else{\n $this->Session->setFlash(\"Tous le champs en alpha numerique avec 4 caractères au minimu sauf mot de passe 6 caractères\",'danger');\n return $this->redirect(array('action'=>'enregister_utilisateur'));\n }\n\n }else{\n $this->Session->setFlash(\"Ce nom d'utilisateur existe\",'danger');\n return $this->redirect(array('action'=>'enregister_utilisateur'));\n }\n\n }\n\n #Envoi des informations \n $this->set('title',$title);\n $this->set('utilisateur',$utilisateur);\n\n }" ]
[ "0.72520816", "0.6916917", "0.6912907", "0.6775734", "0.668698", "0.6587203", "0.6540747", "0.6518672", "0.648188", "0.642208", "0.63547915", "0.63450366", "0.6344053", "0.63303715", "0.63109416", "0.6275563", "0.62674415", "0.6258151", "0.62400585", "0.6233684", "0.62166566", "0.62110883", "0.6192501", "0.61380845", "0.6121884", "0.61213964", "0.6108543", "0.6068011", "0.6067034", "0.60643977", "0.60539234", "0.6049102", "0.60183376", "0.60124385", "0.6012186", "0.59950215", "0.5987816", "0.5982988", "0.5982489", "0.5979204", "0.5978578", "0.59587914", "0.5954636", "0.5947798", "0.5935807", "0.59143597", "0.5909772", "0.5899612", "0.58953583", "0.5887893", "0.5881846", "0.58728564", "0.58571404", "0.5855021", "0.5853087", "0.5843718", "0.5835458", "0.5834442", "0.58290166", "0.582364", "0.5816147", "0.58156127", "0.5810906", "0.5807472", "0.58072394", "0.58066493", "0.5805133", "0.58046114", "0.5802759", "0.57942957", "0.57923335", "0.5791085", "0.5786519", "0.57796", "0.57613957", "0.5745503", "0.5743353", "0.5742409", "0.5735652", "0.57341963", "0.5733239", "0.57318974", "0.5729605", "0.5722035", "0.5721618", "0.57214296", "0.57186633", "0.57142055", "0.5713455", "0.57108164", "0.57072544", "0.5704571", "0.5691805", "0.5682512", "0.5681532", "0.5680525", "0.5680293", "0.567802", "0.5670961", "0.5670243" ]
0.71627903
1
/ page mobilisateur/addmobilisateur Ajout d'une mobilisateur
public function editmobilisateuradminAction() { $sessionutilisateur = new Zend_Session_Namespace('utilisateur'); //$this->_helper->layout->disableLayout(); $this->_helper->layout()->setLayout('layoutpublicesmcadmin'); if (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');} if($sessionutilisateur->confirmation != ""){$this->_redirect('/administration/confirmation');} if (isset($_POST['ok']) && $_POST['ok'] == "ok") { if (isset($_POST['code_membre']) && $_POST['code_membre'] != "") { $request = $this->getRequest(); if ($request->isPost ()) { $db = Zend_Db_Table::getDefaultAdapter(); $db->beginTransaction(); try { $date_id = new Zend_Date(Zend_Date::ISO_8601); $mobilisateur = new Application_Model_EuMobilisateur(); $m_mobilisateur = new Application_Model_EuMobilisateurMapper(); $m_mobilisateur->find($_POST['id_mobilisateur'], $mobilisateur); //$mobilisateur->setId_mobilisateur($id_mobilisateur); $mobilisateur->setCode_membre($_POST['code_membre']); //$mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss')); //$mobilisateur->setId_utilisateur($_POST['id_utilisateur']); //$mobilisateur->setEtat(0); $m_mobilisateur->update($mobilisateur); //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// $db->commit(); $sessionutilisateur->error = "Operation bien effectuee ..."; $this->_redirect('/mobilisateur/listmobilisateuradmin'); } catch (Exception $exc) { $db->rollback(); $this->view->message = $exc->getMessage() . ': ' . $exc->getTraceAsString(); return; } } } else { $sessionutilisateur->error = "Champs * obligatoire"; $id = (int)$this->_request->getParam('id'); if($id != 0) { $mobilisateur = new Application_Model_EuMobilisateur(); $mmobilisateur = new Application_Model_EuMobilisateurMapper(); $mmobilisateur->find($id,$mobilisateur); $this->view->mobilisateur = $mobilisateur; } } } else { $id = (int)$this->_request->getParam('id'); if($id != 0) { $mobilisateur = new Application_Model_EuMobilisateur(); $mmobilisateur = new Application_Model_EuMobilisateurMapper(); $mmobilisateur->find($id,$mobilisateur); $this->view->mobilisateur = $mobilisateur; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addmobilisateurAction() {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembre->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/listmobilisateur');\n \n } catch (Exception $exc) { \n $db->rollback();\n $this->view->message = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $this->view->error = \"Champs * obligatoire\";\n }\n }\n }", "public function etatmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function addmobilisateurintegrateurAction() {\n $sessionmembreasso = new Zend_Session_Namespace('membreasso');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcint');\n if (!isset($sessionmembreasso->login)) {$this->_redirect('/integrateur/login');}\n\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\n/////////////////////////////////////controle code membre\nif(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\nif(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n}else{\nif(substr($_POST['code_membre'], -1, 1) == 'P'){\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0){\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }else if(substr($_POST['code_membre'], -1, 1) == 'M'){\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0){\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n}\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembreasso->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n}else{\n $db->rollback();\n $sessionmembreasso->error = \"Veuillez renseigner le Code Membre ...\";\n\n} \n } catch (Exception $exc) { \n $db->rollback();\n $sessionmembreasso->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionmembreasso->error = \"Champs * obligatoire\";\n }\n }\n }", "public function addmobilisateuradminAction() {\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');}\n if($sessionutilisateur->confirmation != \"\") {$this->_redirect('/administration/confirmation');}\n\n\n\n if(isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if(isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if($request->isPost()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n /////////////////////////////////////controle code membre\n if(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\n if(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n } else {\n if(substr($_POST['code_membre'], -1, 1) == 'P') {\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n } else if(substr($_POST['code_membre'], -1, 1) == 'M') {\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n }\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n ////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionutilisateur->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateuradmin');\n } else {\n $db->rollback();\n $sessionutilisateur->error = \"Veuillez renseigner le Code Membre ...\";\n } \n } catch(Exception $exc) { \n $db->rollback();\n $sessionutilisateur->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionutilisateur->error = \"Champs * obligatoire\";\n }\n }\n }", "public function suppmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if ($id > 0) {\n\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->delete($id);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function add() {\n\n if (isset($_POST['valider'])) {\n \n extract($_POST);\n $data['ok'] = 0;\n \n if (!empty($_POST)) {\n\n $clientM = new ClientMoral();\n $clientMoralRepository = new ClientMoralRepository();\n \n $clientM->setNom($_POST['nom']);\n $clientM->setRaisonSociale($_POST['raisonSociale']);\n $clientM->setAdresse($_POST['adresse']);\n $clientM->setTel($_POST['tel']);\n $clientM->setEmail($_POST['email']);\n $clientM->setNinea($_POST['ninea']);\n $clientM->setRegiscom($_POST['registreCommerce']);\n \n\n $data['ok'] = $clientMoralRepository->add($clientM);\n }\n return $this->view->load(\"clientMoral/ajout\", $data);\n }\n else {\n return $this->view->load(\"clientMoral/ajout\");\n }\n }", "public function add_post(){\n $response = $this->BayiM->add(\n $this->post('iduser'),\n $this->post('nama'),\n $this->post('gender')\n );\n $this->response($response);\n }", "public function etatmobilisateuradminAction()\n {\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 $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateuradmin');\n }", "function alta_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->fecha_alta=date(\"Y-m-d\");\n\t\t$u->estatus_general_id=1;\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 registrado los datos de la Unidad de Medida.\\\"); 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 membre(){\n\n\t\t$user_id = Input::get('user_id');\n\n\t\t$redirectTo = ( $user_id ? 'admin/users/'.$user_id : 'admin/adresses/'.Input::get('adresse_id') );\n\n if( $this->adresse->addMembre(Input::get('membre_id') , Input::get('adresse_id')) )\n {\n return Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'L\\'appartenance comme membre a été ajouté') );\n }\n\n return Redirect::to($redirectTo)->with( array('status' => 'danger' , 'message' => 'L\\'utilisateur à déjà l\\'appartenance comme membre') );\n\n\t}", "function add()\n {\n if($this->acceso(15)){\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'reunion_id' => $this->input->post('reunion_id'),\n 'usuario_id' => $this->input->post('usuario_id'),\n 'multa_monto' => $this->input->post('multa_monto'),\n 'multa_fecha' => $this->input->post('multa_fecha'),\n 'multa_hora' => $this->input->post('multa_hora'),\n 'multa_detalle' => $this->input->post('multa_detalle'),\n 'multa_numrec' => $this->input->post('multa_numrec'),\n );\n $multa_id = $this->Multa_model->add_multa($params);\n redirect('multa/index');\n }\n else\n {\n $this->load->model('Reunion_model');\n $data['all_reunion'] = $this->Reunion_model->get_all_reunion();\n\n $this->load->model('Usuario_model');\n $data['all_usuario'] = $this->Usuario_model->get_all_usuario();\n\n $data['_view'] = 'multa/add';\n $this->load->view('layouts/main',$data);\n }\n }\n }", "public function store(MobiliariosRequest $request)\n {\n Bitacoras::bitacora(\"Registro de nuevo mobiliario: \".$request['nombre']);\n $mobiliario = new Mobiliarios;\n $mobiliario->codigo = $request->codigo;\n $mobiliario->nombre= $request->nombre;\n $mobiliario->fecha_compra= $request->fecha_compra;\n $mobiliario->precio= $request->precio;\n $mobiliario->descripcion =$request->descripcion;\n $mobiliario->estado = $request->estado;\n $mobiliario->nuevo = $request->nuevo;\n if($request->nuevo == 1){\n $mobiliario->anios=null;\n }else\n {\n if($request->anios == '' && $request->anios2 != ''){\n $mobiliario->anios = $request->anios2;\n }else{\n $mobiliario->anios = $request->anios;\n }\n }\n $mobiliario->proveedor_id = $request->proveedor_id;\n $mobiliario->tipo_id = $request->tipo_id;\n $mobiliario->credito = $request->credito;\n $mobiliario->iva=$request->iva;\n if($request->credito == 0 )\n {\n $mobiliario->interes=null;\n $mobiliario->num_cuotas=null;\n $mobiliario->val_cuotas=null;\n $mobiliario->tiempo_pago=null;\n $mobiliario->cuenta=null;\n }else\n {\n $mobiliario->interes= $request->interes;\n $mobiliario->num_cuotas= $request->num_cuotas;\n $mobiliario->val_cuotas= $request->val_cuotas;\n $mobiliario->tiempo_pago= $request->tiempo_pago;\n $mobiliario->cuenta= $request->cuenta;\n }\n\n $mobiliario->save();\n return redirect('/mobiliarios')->with('mensaje','Registro Guardado');\n }", "public function add_post()\n {\n $response = $this->UserM->add_user(\n $this->post('email'),\n $this->post('nama'),\n $this->post('nohp'),\n $this->post('pekerjaan')\n );\n $this->response($response);\n }", "public function addmobilisateurindexAction() {\n $sessionmcnp = new Zend_Session_Namespace('mcnp');\n\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmc');\n\n\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\n/////////////////////////////////////controle code membre\nif(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\nif(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n}else{\nif(substr($_POST['code_membre'], -1, 1) == 'P'){\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0){\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n }\n }else if(substr($_POST['code_membre'], -1, 1) == 'M'){\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0){\n $db->rollback();\n $sessionmcnp->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurindex');\n return;\n }\n }\n}\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur(0);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmcnp->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateurindex');\n}else{\n $db->rollback();\n $sessionmcnp->error = \"Veuillez renseigner le Code Membre ...\";\n\n} \n } catch (Exception $exc) { \n $db->rollback();\n $sessionmcnp->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionmcnp->error = \"Champs * obligatoire\";\n }\n }\n }", "function adminadduser()\n {\n //Check Login\n if ($this->cek_login() != true) {\n return redirect()->to(base_url('login'));\n }\n //Check Role\n if ($this->cek_role() != true) {\n return redirect()->to(base_url('login'));\n }\n $email = $this->request->getPost('email_add');\n $email = esc($email);\n $password = $this->request->getPost('password_add');\n $password = esc($password);\n $name = $this->request->getPost('name_add');\n $name = esc($name);\n $birthdate = $this->request->getPost('birthdate_add');\n $role = $this->request->getPost('role_add');\n $link_foto = '';\n\n $addresult = $this->user_model->addUser($email, $password, $name, $birthdate, $role, $link_foto);\n if ($addresult) {\n session()->setFlashdata('sekolah.project_uas.success', 'User created successfully');\n return redirect()->to(base_url('adminuser'));\n } else {\n //kalo gagal ngapain\n session()->setFlashdata('sekolah.project_uas.fail', 'User cannot created');\n return redirect()->to(base_url('adminuser'));\n }\n }", "public function create(){\n\t\t$this->autenticate();\n\t\t$user_id = $_POST['id'];\n\t\t$nombre = \"'\".$_POST['nombre'].\"'\";\n\t\t$cedula = \"'\".$_POST['cedula'].\"'\";\n\t\t$nacimiento = \"'2000/1/1'\"; //fecha de nacimiento default, despues el mismo usuario la puede editar\n\t\trequire_once(\"../app/models/administrativo.php\");//conexion entre los controladores\n\t\t$administrativo=new Administrativo();// crea el perfil administrativo vacio\n\t\t$administrativo->new($nombre,$cedula,$nacimiento); // inserta la informacion antes ingresada en la base de datos\n\t\t$administrativo_id = $administrativo->where(\"cedula\",$cedula); // se trae el perfil administrativo recien creado con la cedula\n\t\t$administrativo_id = $administrativo_id[0][\"id\"];\n\t\t$administrativo->attach_user($user_id,$administrativo_id); // amarra el usuario a su nuevo perfil docente\n\t\t$administrativo_id = strval($user_id);//convierte el user_id de entero a string\n\t\theader(\"Location: http://localhost:8000/usuarios/show/$user_id\");\n\t\texit;\n\t\t$this->view('administrativos/index', []);\n\t}", "public function add() {\n if (isAuthorized('utilisateurs', 'add')) :\n $this->Utilisateur->Societe->recursive = -1;\n $societe = $this->Utilisateur->Societe->find('list',array('fields' => array('id', 'NOM'),'order'=>array('NOM'=>'asc')));\n $ObjEntites = new EntitesController(); \n $ObjAssoentiteutilisateurs = new AssoentiteutilisateursController(); \n $cercles = $ObjEntites->find_list_all_cercle();\n $this->set(compact('societe','cercles'));\n $matinformatique = array(); \n $activites = array(); \n $utilisateurs = array();\n $outils = array();\n $listediffusions = array();\n $partages = array();\n $etats = array();\n $this->set(compact('matinformatique','activites','utilisateurs','outils','listediffusions','partages','etats'));\n if ($this->request->is('post')) :\n if (isset($this->params['data']['cancel'])) :\n $this->Utilisateur->validate = array();\n $this->History->goBack(1);\n else: \n $this->Utilisateur->create();\n $this->request->data['Utilisateur']['NEW']=1;\n if ($this->Utilisateur->save($this->request->data)) {\n $lastid = $this->Utilisateur->getLastInsertID();\n $utilisateur = $this->Utilisateur->find('first',array('conditions'=>array('Utilisateur.id'=>$lastid),'recursive'=>0));\n if($utilisateur['Utilisateur']['profil_id']>0 || $utilisateur['Utilisateur']['profil_id']==-2):\n $this->sendmailnewutilisateur($utilisateur);\n endif;\n $this->addnewaction($lastid);\n $entite_id = $this->request->data['Utilisateur']['entite_id'];\n $ObjAssoentiteutilisateurs->silent_save($entite_id,$lastid);\n $this->save_history($lastid, \"Utilisateur créé\"); \n $this->Session->setFlash(__('Utilisateur sauvegardé',true),'flash_success');\n $this->History->goBack(1);\n } else {\n $this->Session->setFlash(__('Utilisateur incorrect, veuillez corriger l\\'utilisateur',true),'flash_failure');\n }\n endif;\n endif;\n else :\n $this->Session->setFlash(__('Action non autorisée, veuillez contacter l\\'administrateur.',true),'flash_warning');\n throw new UnauthorizedException(\"Vous n'êtes pas autorisé à utiliser cette fonctionnalité de l'outil\");\n endif; \n }", "public function addUmpireAction() {\n\t\t// Création du formulaire\n\t\t$oUmpire = new Umpire;\n\t\t$oForm = $this->createForm(new UmpireType(), $oUmpire);\n\n\t\t// Traitement du formulaire\n\t\t$oFormHandler = new UmpireHandler($oForm, $this->get('request'), $this->getDoctrine()->getEntityManager());\n\t\tif ($oFormHandler->process()) {\n\t\t\treturn $this->redirect($this->generateUrl('Umpires'));\n\t\t}\n\n\t\treturn $this->render('YBTournamentBundle:Umpire:form_create.html.twig', array('form' => $oForm->createView()));\n\t}", "function newuser(){\n\t\t\tif(!empty($_POST['newemail']) && !empty($_POST['newpassword']) && !empty($_POST['newnombre']) && !empty($_POST['newpoblacion']) && !empty($_POST['newrol'])){\n\t\t\t\t$poblacion = filter_input(INPUT_POST,'newpoblacion',FILTER_SANITIZE_STRING);\n\t\t\t\t$nombre = filter_input(INPUT_POST,'newnombre',FILTER_SANITIZE_STRING);\n\t\t\t\t$password = filter_input(INPUT_POST,'newpassword',FILTER_SANITIZE_STRING);\n\t\t\t\t$email = filter_input(INPUT_POST,'newemail',FILTER_SANITIZE_STRING);\n\t\t\t\t$rol = filter_input(INPUT_POST,'newrol',FILTER_SANITIZE_STRING);\n\t\t\t\t$list = $this -> model -> adduser($nombre,$password,$email,$poblacion,$rol);\n \t\t$this -> ajax_set(array('redirect'=>APP_W.'admin'));\n\t\t\t}\n\t\t}", "public function ajouter() {\n $this->loadView('ajouter', 'content');\n $arr = $this->em->selectAll('client');\n $optionsClient = '';\n foreach ($arr as $entity) {\n $optionsClient .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNomFamille() . '</option>';\n }\n $this->loadHtml($optionsClient, 'clients');\n $arr = $this->em->selectAll('compteur');\n $optionsCompteur = '';\n foreach ($arr as $entity) {\n $optionsCompteur .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNumero() . '</option>';\n }\n $this->loadHtml($optionsCompteur, 'compteurs');\n if(isset($this->post->numero)){\n $abonnement = new Abonnement($this->post);\n $this->em->save($abonnement);\n $this->handleStatus('Abonnement ajouté avec succès.');\n }\n }", "public function addMo()\n\t{\n\t\n\t\t$this->Checklogin();\n\t\tif (isset($_POST ['btnSubmit']))\n\t\t{\n\t\n\t\t\t$data ['admin_section']='MO';\n\t\t\t$id=$this->setting_model->addMo();\n\t\t\tif ($id)\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Mobile has been added successfully.');\n\t\t\t\tredirect('admin/setting/moRegistration');\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Unable to save mobile.');\n\t\t\t\tredirect('admin/setting/moRegistration');\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\tredirect('admin/setting/moRegistration');\n\t\t}\n\t\n\t}", "public function add(){\n if (isset($_SESSION['identity'])) {// Comprobamos que hay un usuario logueado\n $usuario_id = $_SESSION['identity']->id;// Obtenemos el ID del Usuario logueado\n $sProvincia = isset($_POST['province']) ? $_POST['province'] : false;\n $sLocalidad = isset($_POST['location']) ? $_POST['location'] : false;\n $sDireccion = isset($_POST['address']) ? $_POST['address'] : false;\n\n $stats = Utils::statsCarrito();\n $coste = $stats['total'];// Obtenemos el coste total del pedido\n\n\n if ($sProvincia && $sLocalidad && $sDireccion){\n // Guardar datos en bd\n $oPedido = new Pedido();\n $oPedido->setUsuarioId($usuario_id);\n $oPedido->setProvincia($sProvincia);\n $oPedido->setLocalidad($sLocalidad);\n $oPedido->setDireccion($sDireccion);\n $oPedido->setCoste($coste);\n\n $save = $oPedido->savePedido();// Insertamos el Pedido en BD\n\n // Guardar Linea Pedido\n $save_linea = $oPedido->save_linea();\n\n if ($save && $save_linea){// Comprobamos que La inserccion a sido correcta\n $_SESSION['pedido'] = \"complete\";\n }else{\n $_SESSION['pedido'] = \"failed\";\n }\n }else{\n $_SESSION['pedido'] = \"failed\";\n\n }\n header(\"Location:\" . base_url .'pedido/confirmado');\n }else{\n // Redirigir al Index\n header(\"Location:\" . base_url);\n }\n }", "public function NewMobidul ()\n {\n \\Log::info(\"New Mobidul begin!\");\n\n $request = Request::instance();\n $content = $request->getContent();\n\n $json = json_decode($content);\n $code = $json->code;\n $name = $json->name;\n $mode = $json->mode;\n\n $description = isset($json->description)\n ? $json->description\n : 'Ein tolles Mobidul entsteht hier.';\n\n //check if mobidul code is a protected key word\n if ( $this->isMobidulCodeProtected($code) )\n return $response = [\n 'success' => false,\n 'msg' => 'WSC_MOBIDUL_PROTECTED'\n ];\n\n\n if ( ! Mobidul::HasMobidulId($code) )\n {\n \\Log::info(\"Mobidul gets created!\");\n\n $mobidul = Mobidul::create(\n [\n 'name' => $name,\n 'code' => $code,\n 'description' => $description,\n 'mode' => $mode\n ]);\n\n $userId = Auth::id();\n //$category = Category::create(['name' => 'Allgemein', 'mobidulId' => $mobidul->id]);\n\n DB::table('user2mobidul')->insert(\n [\n 'userId' => $userId,\n 'mobidulId' => $mobidul->id,\n 'rights' => 1\n ]);\n\n\n return $response = [\n 'success' => true,\n 'msg' => 'WSC_MOBIDUL_SUCCESS',\n 'code' => $code\n ];\n }\n else\n return $response = [\n 'success' => false,\n 'msg' => 'WSC_MOBIDUL_IN_USE'\n ];\n }", "private function insertUser(){\n\t\t$data['tipoUsuario'] = Seguridad::getTipo();\n\t\tView::show(\"user/insertForm\", $data);\n\t}", "public function add(){\n $data = array(\n \"user_nim\" => $this->input->post('user_nim'),\n \"user_fullname\" => $this->input->post('user_fullname'),\n \"user_password\" => md5($this->input->post('user_password')),\n \"user_email\" => $this->input->post('user_email'),\n \"user_semester\" => $this->input->post('user_semester'),\n \"user_level\" => $this->input->post('user_level'),\n \"user_aktif\" => $this->input->post('user_aktif'),\n \"user_creator\" => $this->session->userdata('nim')\n );\n \n $this->db->insert('tbl_users', $data); // Untuk mengeksekusi perintah insert data\n }", "function act_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 de la Unidad de Medida.\\\"); 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 ajoutauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t$this->_ctrlAuteur->auteurAjoute();\n\t}", "public function action_add(){\n\t\t$monumentId = $this->request->param('id');\n\t\t$user = Auth::instance()->get_user();\n\t\t\n\t\t// Add the monument to the favorite list of the current user\n\t\t$favoriteList = new Model_List_Favorite();\t\t\n\t\t$favoriteList->add($monumentId, $user->UserID);\n\t\t\n\t\t// Redirect the user back to the monument page\n\t\t$this->request->redirect('monument/view/' . $monumentId);\n\t}", "public function add() {\r\n\t\t// init view variables\r\n\t\t// ---\r\n\t\t\r\n\t\t// receive userright token\r\n\t\t$urtoken\t= $this->MediawikiAPI->mw_getUserrightToken()->query->tokens->userrightstoken;\r\n\t\t$this->set( 'urtoken', $urtoken );\r\n\t\t\r\n\t\t// receive usergrouplist\r\n\t\t$ugroups\t\t= $this->Users->Groups->find( 'all' )->all()->toArray();\r\n\t\t$this->set( 'ugroups', $ugroups );\r\n\t\t\r\n\t\tif( $this->request->is( 'post' ) ) {\r\n\t\t\t// required fields empty?\r\n\t\t\tif( empty( $this->request->data[\"username\"] ) || empty( $this->request->data[\"email\"] ) ) {\r\n\t\t\t\t$this->set( 'notice', 'Es wurden nicht alle Pflichtfelder ausgefüllt. Pflichtfelder sind all jene Felder die kein (optional) Vermerk tragen.' );\r\n\t\t\t\t$this->set( 'cssInfobox', 'danger' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// usergroups\r\n\t\t\t$addGroups\t\t= '';\r\n\t\t\t\t\t\t\r\n\t\t\tforeach( $this->request->data[\"group\"] as $grpname => $grpvalue ) {\r\n\t\t\t\tif( $grpvalue == true ) {\r\n\t\t\t\t\t$addGroups\t.= $grpname . '|';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$addGroups\t\t= substr( $addGroups, 0, -1 );\r\n\t\t\t\r\n\t\t\t// create new mediawiki user\t\t\t\r\n\t\t\t$result\t\t= $this->create(\r\n\t\t\t\t$this->request->data[\"username\"],\r\n\t\t\t\t$this->request->data[\"email\"],\r\n\t\t\t\t$this->request->data[\"realname\"],\r\n\t\t\t\t$addGroups,\r\n\t\t\t\t'',\r\n\t\t\t\t$this->request->data[\"urtoken\"],\r\n\t\t\t\t$this->request->data[\"mailsender\"],\r\n\t\t\t\t$this->request->data[\"mailsubject\"],\r\n\t\t\t\t$this->request->data[\"mailtext\"]\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( $result != 'Success' ) {\r\n\t\t\t\t$this->set( 'notice', 'Beim Anlegen des Benutzer_inaccounts ist ein Fehler aufgetreten.</p><p>' . $result );\r\n\t\t\t\t$this->set( 'cssInfobox', 'danger' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->set( 'notice', 'Der / Die Benutzer_in wurde erfolgreich angelegt. Er / Sie wurde via E-Mail informiert.' );\r\n\t\t\t$this->set( 'cssInfobox', 'success' );\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// set view variables\r\n\t\t$this->set( 'notice', '' );\r\n\t\t$this->set( 'cssInfobox', '' );\r\n\t}", "public function addAction(){\n\t\t\t$emp = new Empresa();\n\t\t\t//cargamos el objeto mediantes los metodos setters\n\t\t\t$emp->id = '0';\n\t\t\t$emp->nombre_empresa = $this->getPostParam(\"nombre_empresa\");\n\t\t\t$emp->nit = $this->getPostParam(\"nit\");\n\t\t\t$emp->direccion = $this->getPostParam(\"direccion\");\n\t\t\t$emp->logo = $this->getPostParam(\"imagen\");\n\t\t\t$emp->regimen_id = $this->getPostParam(\"regimen_id\");\n\t\t\t\t\t\t\t\t\n\t\t\tif($emp->save()){\n\t\t\t\tFlash::success(\"Se insertó correctamente el registro\");\n\t\t\t\tprint(\"<script>document.location.replace(\".core::getInstancePath().\"'empresa/mostrar/$emp->id');</script>\");\n\t\t\t}else{\n\t\t\t\tFlash::error(\"Error: No se pudo insertar registro\");\t\n\t\t\t}\n\t\t\t\t\t\n\t }", "public function add() {\n if ($_POST){\n \n $username = filter_input(INPUT_POST, 'username');\n $password = filter_input(INPUT_POST, 'password');\n $password2 = filter_input(INPUT_POST, 'password2');\n $fullname = filter_input(INPUT_POST, 'fullname');\n $email = filter_input(INPUT_POST, 'email');\n \n if (!preg_match('/^[a-z0-9]{4,}$/', $username) or !preg_match('/[A-z 0-9\\-]+$/', $fullname) or $email == '' or $password != $password2) {\n $this->setData('message', 'Podaci nisu tačno uneti.');\n } else {\n $passwordHash = hash('sha512', $password . Configuration::SALT);\n $res = HomeModel::add($username, $passwordHash , $fullname, $email);\n if ($res){\n Misc::redirect('successfull_registration');\n } else {\n $this->setData('message', 'Došlo je do greške prilikom dodavanja. Korisničko ime je verovatno zauzeto.');\n }\n } \n }\n }", "public function add()\n {\n $data = [\n 'NamaMusyrif' => $this->input->post('nama_musyrif'),\n 'Email' => $this->input->post('email'),\n 'NoHp' => $this->input->post('no_hp'),\n ];\n $this->Musyrif_M->addMusyrif($data);\n $this->session->set_flashdata('pesan', 'Berhasil ditambahkan!');\n redirect('musyrif');\n }", "function add() {\n\t\t$this->account();\n\t\tif (!empty($this->data)) {\n\t\t\t$this->Album->create();\n $data['Album'] = $this->data['Album'];\n\t\t\t$data['Album']['images']=$_POST['userfile'];\n\t\t\tif ($this->Album->save($data['Album'])){\n\t\t\t\t$this->Session->setFlash(__('Thêm mới danh mục thành công', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Thêm mơi danh mục thất bại. Vui long thử lại', true));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function actionRegister()\n {\n $this->view->title = DetailesForm::TITLE_REGISTER_FORM;\n $model = new UserInfo();\n $items = DetailesForm ::getItems();\n if (Yii::$app->request->post()) {\n $data = Yii::$app->request->post();\n $resultSave = UserInfo::setSave($model , $data);\n if ($resultSave->success)\n {\n Yii::$app->session->setFlash('success', 'ثبت با موفقیت انجام شد');\n $this->redirect( Url::to(['view','id'=> $resultSave->result['id']] ));\n }\n elseif (!$resultSave->success && !empty($resultSave->message))\n {\n $msg = '';\n foreach ($resultSave->message as $text)\n {\n $msg .= $text . \"<br>\";\n }\n Yii::$app->session->setFlash('danger', $msg);\n }\n else\n Yii::$app->session->setFlash('danger', 'عملیات ناموفق به پایین رسید');\n }\n\n return $this->render('_form',\n [\n 'model' => $model,\n 'items' => $items,\n ]);\n\n }", "private function ajoutuser() {\n\t\t$this->_ctrlAdmin = new ControleurAdmin();\n\t\t$this->_ctrlAdmin->userAjout();\n\t}", "public function agregar_usuario_controlador()\n {\n $nombres = strtoupper(mainModel::limpiar_cadena($_POST['usu_nombres_reg']));\n $apellidos = strtoupper(mainModel::limpiar_cadena($_POST['usu_apellidos_reg']));\n $identidad=mainModel::limpiar_cadena($_POST['usu_identidad_reg']);\n $puesto=mainModel::limpiar_cadena($_POST['usu_puesto_reg']);\n $unidad=mainModel::limpiar_cadena($_POST['usu_unidad_reg']);\n $rol = mainModel::limpiar_cadena($_POST['usu_rol_reg']);\n $celular = mainModel::limpiar_cadena($_POST['usu_celular_reg']);\n $usuario = strtolower(mainModel::limpiar_cadena($_POST['usu_usuario_reg']));\n $email=$usuario . '@didadpol.gob.hn' ;\n\n\n /*comprobar campos vacios*/\n if ($nombres == \"\" || $apellidos == \"\" || $usuario == \"\" || $email == \"\" || $rol == \"\" || $identidad == \"\" || $puesto == \"\" || $unidad == \"\") {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO HAS COMPLETADO TODOS LOS CAMPOS QUE SON OBLIGATORIOS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n if (mainModel::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $nombres)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRES SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if (mainModel::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $apellidos)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO APELLIDOS SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if ($celular != \"\") {\n if (mainModel::verificar_datos(\"[0-9]{8}\", $celular)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE CELULAR NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n if (mainModel::verificar_datos(\"[0-9]{13}\", $identidad)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE IDENTIDAD NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar DNI*/\n $check_dni = mainModel::ejecutar_consulta_simple(\"SELECT identidad FROM tbl_usuarios WHERE identidad='$identidad'\");\n if ($check_dni->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL NÚMERO DE IDENTIDAD YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n if (mainModel::verificar_datos(\"[a-z]{3,15}\", $usuario)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRE DE USUARIO SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 5 Y UN MAXIMO DE 15 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n /*validar usuario*/\n $check_user = mainModel::ejecutar_consulta_simple(\"SELECT nom_usuario FROM tbl_usuarios WHERE nom_usuario='$usuario'\");\n if ($check_user->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL USUARIO YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar email*/\n\n \n $caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n $pass = \"\";\n for ($i = 0; $i < 8; $i++) {\n $pass .= substr($caracteres, rand(0, 64), 1);\n }\n $message = \"<html><body><p>Hola, \" . $nombres . \" \" . $apellidos;\n $message .= \" Estas son tus credenciales para ingresar al sistema de DIDADPOL\";\n $message .= \"</p><p>Usuario: \" . $usuario;\n $message .= \"</p><p>Correo: \" . $email;\n $message .= \"</p><p>Contraseña: \" . $pass;\n $message .= \"</p><p>Inicie sesión aquí para cambiar la contraseña por defecto \" . SERVERURL . \"login\";\n $message .= \"<p></body></html>\";\n\n $res = mainModel::enviar_correo($message, $nombres, $apellidos, $email);\n if (!$res) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE ENVIÓ CORREO ELECTRÓNICO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n\n $passcifrado = mainModel::encryption($pass);\n\n $datos_usuario_reg = [\n \"rol\" => $rol,\n \"puesto\"=>$puesto,\n \"unidad\"=>$unidad,\n \"usuario\" => $usuario,\n \"nombres\" => $nombres,\n \"apellidos\" => $apellidos,\n \"dni\"=>$identidad,\n \"clave\" => $passcifrado,\n \"estado\" => \"NUEVO\",\n \"email\" => $email,\n \"celular\" => $celular\n ];\n $agregar_usuario = usuarioModelo::agregar_usuario_modelo($datos_usuario_reg);\n if ($agregar_usuario->rowCount() == 1) {\n $alerta = [\n \"Alerta\" => \"limpiar\",\n \"Titulo\" => \"USUARIO REGISTRADO\",\n \"Texto\" => \"LOS DATOS DEL USUARIO SE HAN REGISTRADO CON ÉXITO\",\n \"Tipo\" => \"success\"\n ];\n } else {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE HA PODIDO REGISTRAR EL USUARIO\",\n \"Tipo\" => \"error\"\n ];\n }\n echo json_encode($alerta);\n }", "public function crearUsuario() {\n\n\n if ($this->seguridad->esAdmin()) {\n $id = $this->usuario->getLastId();\n $usuario = $_REQUEST[\"usuario\"];\n $contrasenya = $_REQUEST[\"contrasenya\"];\n $email = $_REQUEST[\"email\"];\n $nombre = $_REQUEST[\"nombre\"];\n $apellido1 = $_REQUEST[\"apellido1\"];\n $apellido2 = $_REQUEST[\"apellido2\"];\n $dni = $_REQUEST[\"dni\"];\n $imagen = $_FILES[\"imagen\"];\n $borrado = 'no';\n if (isset($_REQUEST[\"roles\"])) {\n $roles = $_REQUEST[\"roles\"];\n } else {\n $roles = array(\"2\");\n }\n\n if ($this->usuario->add($id,$usuario,$contrasenya,$email,$nombre,$apellido1,$apellido2,$dni,$imagen,$borrado,$roles) > 1) {\n $this->perfil($id);\n } else {\n echo \"<script>\n i=5;\n setInterval(function() {\n if (i==0) {\n location.href='index.php';\n }\n document.body.innerHTML = 'Ha ocurrido un error. Redireccionando en ' + i;\n i--;\n },1000);\n </script>\";\n } \n } else {\n $this->gestionReservas();\n }\n \n }", "public function actionaddUniquePhone()\n\t{\n\t\t\n\t\tif($this->isAjaxRequest())\n\t\t{\n\t\t\tif(isset($_POST['userphoneNumber'])) \n\t\t\t{\n\t\t\t\t$sessionArray['loginId']=Yii::app()->session['loginId'];\n\t\t\t\t$sessionArray['userId']=Yii::app()->session['userId'];\n\t\t\t\t$loginObj=new Login();\n\t\t\t\t$total=$loginObj->gettotalPhone($sessionArray['userId'],1);\n\t\t\t\tif($total > 1)\n\t\t\t\t{\n\t\t\t\t\techo \"Limit Exist!\";\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t$totalUnverifiedPhone=$loginObj->gettotalUnverifiedPhone($sessionArray['userId'],1);\n\t\t\t\tif($totalUnverifiedPhone==1)\n\t\t\t\t{\n\t\t\t\t\techo \"Please first verify unverified phone.\";\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$result=$loginObj->addPhone($_POST,1,$sessionArray);\n\t\t\t\t\n\t\t\t\tif($result['status']==0)\n\t\t\t\t{\n\t\t\t\t\techo \"success\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo $result['message']; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->render(\"/site/error\");\n\t\t}\n\t}", "public function add()\n {\n $data=$this->M_mtk->add();\n echo json_encode($data);\n }", "function ajax_add()\n {\n\tif ($this->form_validation->run($this, 'users') == TRUE) {\n\t //get data from post\n\t $data = $this->_get_data_from_post();\n\t $return = [];\n\t //$data['photo'] = Modules::run('upload_manager/upload','image');\n\n\t $return['status'] = $this->mdl_users->_insert($data) ? TRUE : FALSE;\n\t $return['msg'] = $data['status'] ? NULL : 'An error occured trying to insert data please try again';\n\t $return['node'] = [\n\t\t'users' => $data['users'],\n\t\t'slug' => $data['users_slug'],\n\t\t'id' => $this->db->insert_id()\n\t ];\n\n\n\t echo json_encode($return);\n\t}\n }", "public function addAction()\n {\n $form = new RobotForm;\n $user = Users::findFirst($this->session->get(\"auth-id\"));\n\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Добавить робота :: \");\n }\n\n if ($this->request->isPost()) {\n if (!$form->isValid($this->request->getPost())) {\n foreach ($form->getMessages() as $message) {\n $this->flashSession->error($message);\n }\n return $this->response->redirect(\n [\n \"for\" => \"robot-add\",\n \"name\" => $user->name\n ]\n );\n } else {\n\n $robot = new Robots();\n $robot->name = $this->request->getPost(\"name\");\n $robot->type = $this->request->getPost(\"type\");\n $robot->year = $this->request->getPost(\"year\");\n $robot->users_id = $user->id;\n\n\n if ($robot->save()) {\n $this->flashSession->success(\"Вы добавили нового робота !\");\n $this->session->set(\"robot-id\", $robot->id);\n return $this->response->redirect(\n [\n\n \"for\" => \"user-show\",\n \"name\" => $this->session->get(\"auth-name\")\n ]\n );\n\n } else {\n\n $this->flashSession->error($robot->getMessages());\n }\n\n }\n }\n\n return $this->view->form = $form;\n\n }", "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增用户';\n $this->global['pageName'] = 'user_add';\n\n if(empty($_POST)){\n $data['roles'] = $this->user_model->getRoles($this->global['login_id']);\n\n $this->loadViews(\"user_manage/user_add\", $this->global, $data, NULL);\n }else{\n $this->item_validate();\n }\n }\n }", "public function AddMentoratUser($id){\n if($user = User::where(['id' => $id,'mentorat' => User::not_mentorat,'type' => User::user])->first()){\n $this->mail->ID840231($user->id,Session::get('userData'));\n toastr()->success('This user has been emailed to approve mentor');\n\n $user->mentorat = User::in_standby_mentorat;\n $user->save();\n }else{\n toastr()->error('Something is wrong!');\n }\n return Redirect::back();\n }", "public function add(){\r\n\t\t//$this->auth->set_access('add');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function agregar(){\n if(!isLoggedIn()){\n redirect('usuarios/login');\n }\n //check User Role -- Only ADMINISTRADOR allowed\n if(!checkLoggedUserRol(\"ADMINISTRADOR\")){\n redirect('dashboard');\n }\n\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n \n // Sanitize POST array\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n $data = [\n 'nombreEspecialidad' => trim($_POST['nombreEspecialidad'])\n ];\n\n // Validar Nombre Especialidad obligatorio\n if(empty($data['nombreEspecialidad'])){\n $data['nombreEspecialidad_error'] = 'Por favor ingrese un titulo para la especialidad';\n }\n\n // Validar Nombre Especialidad existente\n if($this->especialidadModel->checkEspecialidad($data['nombreEspecialidad'])){\n $data['nombreEspecialidad_error'] = 'La especialidad que intentó agregar ya existe';\n }\n\n // Asegurarse que no haya errores\n if(empty($data['nombreEspecialidad_error'])){\n // Crear especialidad\n if($this->especialidadModel->agregarEspecialidad($data['nombreEspecialidad'])){\n flash('especialidad_success', 'Especialidad creada correctamente');\n redirect('especialidades');\n }\n else{\n die('Ocurrió un error inesperado');\n }\n }\n else{\n flash('especialidad_error', $data['nombreEspecialidad_error'], 'alert alert-danger');\n redirect('especialidades');\n }\n }\n }", "public function addMembro($id_usuario, $id_grupo) {\n $sql = \"INSERT INTO grupos_membros SET id_usuario = '$id_usuario', id_grupo = '$id_grupo'\";\n $this->db->query($sql);\n }", "public function agregarUsuario(){\n \n }", "public function add_friend($user_to = null) {\n\n\t\t\n\t\t$this->request->data['User']['id'] = $this->getUserId();\n\t\t$this->request->data['Friend']['id'] = $user_to;\n\n\t\tif($result = $this->User->saveAll($this->request->data)) {\n\t\t\t$this->redirect(array('action' => 'view', $user_to));\n\t\t} else {\n\t\t\t$this->redirect(array('action' => 'view', $user_to));\n\t\t}\n\n\t}", "public function addUser(){\n\t}", "public function Add_medico($array = array()){\n \t\t $request['inp_document'];\n \t\t $request['inp_nomb'];\n \t\t $request['inp_apell'];\n \t\t $request['inp_tel'];\n \t\t $request['inp_cel'];\n \t\t $request['rdio_sex'];\n \t\t $request['slt_especia'];\t\n \t\t $request['inp_nick'];\n\t\t $person = new Persona();\n\t\t $respon = $person->crearPersona($array); // dentro de esta funcion debe insertar en la tabla persona, si es exitoso la insercion, debe pasar el if siguiente e insertar en la tabla medicos\n\t\t if(isset($respon['exito'])){\n\t\t $request['slt_especia'];\n\t\t $request['inp_document'];\t\n\t\t\n\n\t\t\t //insercion del packete\n\t\t }\n\t\t}", "public function admin_add()\n {\n if ($this->request->is('post')) {\n $this->User->create();\n\n $this->request->data['Impi']['auth_scheme'] = 127;\n\n if ($this->User->saveAll($this->request->data)) {\n $this->Session->setFlash(__('The user has been saved'));\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n }\n }\n $utilityFunctions = $this->User->UtilityFunction->find('list');\n\n $this->set(compact('utilityFunctions', 'utilityFunctionsParameters'));\n }", "public function postAjouter() {\n \t$d['resultat']= 0;\n \tif(!Auth::user()) {\n \t\t$d['message'] = \"Vous devez être identifié pour participer.\";\n \t} else {\n\t\t\tif (Input::get('valeur')==\"\") {\n\t\t\t\t$d['message'] = \"Vous devez écrire quelque chose pour participer.\";\n\t\t\t} else {\n\t\t\t\t// Enregistre le message\n\t\t\t\t$message = new \\App\\Models\\Message;\n\t\t\t\t$message->user_id = Auth::user()->id;\n\t\t\t\t$message->texte = Input::get('valeur');\n\t\t\t\t$message->save();\n\t\t\t\t$d['resultat'] = 1;\n\t\t\t\t$d['message'] = \"\";\n\t\t\t}\n\t\t}\n\t\t// Le refresh est fait via un autre appel ajax\n\t\t// On envoi la réponse\n\t\treturn response()->json($d);\n\t}", "private function inserirUnidade()\n {\n $cadUnidade = new \\App\\adms\\Models\\helper\\AdmsCreate;\n $cadUnidade->exeCreate(\"adms_unidade_policial\", $this->Dados);\n if ($cadUnidade->getResultado()) {\n $_SESSION['msg'] = \"<div class='alert alert-success'>Unidade cadastrada com sucesso!</div>\";\n $this->Resultado = true;\n } else {\n $_SESSION['msg'] = \"<div class='alert alert-danger'>Erro: A Unidade não foi cadastrada!</div>\";\n $this->Resultado = false;\n }\n }", "public function addUtilisateur()\n\t{\n\t\t\t$sql = \"INSERT INTO utilisateur SET\n\t\t\tut_nom=?,\n\t\t\tut_prenom=?,\n\t\t\tut_pseudo=?,\n\t\t\tut_mail=?,\n\t\t\tut_mdp=?,\n\t\t\tut_date_inscription=NOW(),\n\t\t\tut_hash_validation =?\";\n\n\t\t\t$res = $this->addTuple($sql,array($this->nom,\n\t\t\t\t$this->prenom,\n\t\t\t\t$this->pseudo,\n\t\t\t\t$this->email,\n\t\t\t\t$this->pass,\n\t\t\t\t$this->hashValidation()\n\t\t\t\t));\n\t\t\treturn $res;\n\t}", "public function AddSocial(){\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n $id_empresa = 1;\n $facebook = trim($_POST['facebook']);\n $twitter = trim($_POST['twitter']);\n $google_plus = trim($_POST['google_plus']);\n $linkedin = trim($_POST['linkedin']);\n $instagram = trim($_POST['instagram']);\n $pinterest = trim($_POST['pinterest']);\n $whatsapp = trim($_POST['whatsapp']);\n\n $columnas = array(\"id_empresa\", \"facebook\", \"twitter\", \"google_plus\", \"linkedin\", \"instagram\", \"pinterest\", \"whatsapp\");\n $datos = array($id_empresa, $facebook, $twitter, $google_plus, $linkedin, $instagram, $pinterest, $whatsapp);\n\n //ejecyta la insercion\n if($this->ConfigModelo->insert('red_social', $columnas, $datos)){\n\n $_SESSION[\"success\"]=true;\n redireccionar('pages/contacto');\n\n }else{\n echo false;\n }\n\n }else{\n\n $columnas = \"\";\n $datos = \"\";\n\n }\n\n }", "public static function append_into_contact_list(){\n\n\n $id_added_user = $_SESSION[\"user_id_added\"]; // usuario que acabamos de agregar\n\t$current_user_id = $_SESSION[\"id_user\"]; // este soy yo osea el que agrega\n\n\t$QUERY = \"INSERT INTO contact values(NULL,$current_user_id ,$id_added_user) \";\n\n\n\t mysql_query( $QUERY , Conectar::con());\n\n\n\n\t}", "public function addUser(){}", "public function create()\n {\n \n echo \"Syntax: POST: /api?telefon=*telefon*&id_agencija=*id*<br>/api?email=*email*&id_agencija=*id*\";\n \n }", "public function actionRegister()\n {\n if (isset($this->request['mobile'])) {\n $mobile = $this->request['mobile'];\n $user = Users::model()->find('username = :mobile', [':mobile' => $mobile]);\n\n $code = Controller::generateRandomInt();\n if (!$user) {\n $user = new Users();\n $user->username = $mobile;\n $user->password = $mobile;\n $user->status = Users::STATUS_PENDING;\n $user->mobile = $mobile;\n }\n\n $user->verification_token = $code;\n if ($user->save()) {\n $userDetails = UserDetails::model()->findByAttributes(['user_id' => $user->id]);\n $userDetails->credit = SiteSetting::getOption('base_credit');\n $userDetails->save();\n }\n\n Notify::SendSms(\"کد فعال سازی شما در آچارچی:\\n\" . $code, $mobile);\n\n $this->_sendResponse(200, CJSON::encode(['status' => true]));\n } else\n $this->_sendResponse(400, CJSON::encode(['status' => false, 'message' => 'Mobile variable is required.']));\n }", "public function addNewRegiuneByAdmin($data)\n {\n $nume = $data['nume'];\n\n $checkRegiune = $this->checkExistRegiune($nume);\n\n\n if ($nume == \"\") {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Câmpurile de introducere nu trebuie să fie Golite!</div>';\n return $msg;\n } elseif (strlen($nume) < 2) {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Numele regiunii este prea scurt, cel puțin 2 caractere!</div>';\n return $msg;\n } elseif ($checkRegiune == TRUE) {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n<strong>Error !</strong> Regiunea există deja, vă rugăm să încercați o alta regiune ...!</div>';\n return $msg;\n } else {\n\n $sql = \"INSERT INTO regiune(nume ) VALUES(:nume)\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->bindValue(':nume', $nume);\n $result = $stmt->execute();\n if ($result) {\n $msg = '<div class=\"alert alert-success alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Success !</strong> Ați înregistrat cu succes!</div>';\n return $msg;\n } else {\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Error !</strong> Ceva n-a mers bine !</div>';\n return $msg;\n }\n }\n }", "public function actionCreate() {\n $id_user = Yii::app()->user->getId();\n $model = User::model()->findByPk($id_user);\n $tipo = $model->id_tipoUser;\n if ($tipo == \"1\") {\n $model = new Consultor;\n $modelUser = new User;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Consultor'])) {\n $model->attributes = $_POST['Consultor'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n \n \n \n $senha = uniqid(\"\", true);\n $modelUser->password = $senha;\n $modelUser->username = $_POST['username'];\n $modelUser->email = trim($model->email);\n $modelUser->attributes = $modelUser;\n $modelUser->id_tipoUser = 4;\n $modelUser->senha = '0';\n\n if ($modelUser->save()) {\n\n $model->id_user = $modelUser->id;\n if ($model->save()) {\n $this->redirect(array('EnviaEmail', 'nomedestinatario' => $model->nome, \"emaildestinatario\" => $model->email, \"nomedeusuario\" => $modelUser->username, \"senha\" => $modelUser->password));\n }\n }\n \n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n \n }else {\n $this->redirect(array('User/ChecaTipo'));\n }\n }", "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }", "function add()\n {\n //load chuc vu ra\n $this->load->model('chucvu_model');\n $input = array();\n $chucvu = $this->chucvu_model->getList($input);\n $this->data['chucvu'] = $chucvu;\n \n //thoa dieu kien dau vao moi insert vao\n $this->load->library('form_validation');\n $this->load->helper('form');\n if($this->input->post())\n {\n $this->form_validation->set_rules('password', 'Mật khẩu', 'min_length[8]'); \n $this->form_validation->set_rules('repassword', 'Nhập lại mật khẩu', 'matches[password]');\n \n if($this->form_validation->run())\n {\n //lay DL tu view\n $ho = $this->input->post('ho');\n $ten = $this->input->post('ten');\n $luong = $this->input->post('luong');\n $chucvu = $this->input->post('chucvuid');\n $password = $this->input->post('password'); \n //do use plugin jQuery number --> chuyen ve dang so moi insert duoc\n $luong = str_replace(',', '', $luong);\n \n $data = array(\n 'ho' => $ho,\n 'ten' => $ten,\n 'chucvuid' => $chucvu, \n 'password' => md5($password),\n 'luong' => $luong\n );\n if($this->nhanvien_model->add($data))\n {\n $message = $this->session->set_flashdata('message', 'Thêm mới dữ liệu thành công'); \n }\n else {\n $this->session->set_flashdata('message', 'Không thể thêm mới');\n } \n //chuyen ve trang index\n redirect(admin_url('nhanvien'));\n }\n }\n \n $this->data['temp'] = 'admin/nhanvien/add';\n $this->load->view('admin/main', $this->data);\n }", "protected function register(MembreRequest $data)\n {\n\t\t\t//check if is Avatar img exist\n\t\t$custom_file_name =\"\";\n\t\t/*if ($request->hasFile('image')) {\n\t\t\t$file = $request->file('image');\n\t\t\t$custom_file_name = time().'-'.$request->file('image')->getClientOriginalName(); // customer the name of img uploded \n\t\t\t$file->move('avatar_membre/', $custom_file_name); // save img ine the folder Public/Avatars\n\t\t\t\n\t\t}*/\t\n\t $membre=Membre::create([\n 'nom' => $data['nom'],\n 'email' => $data['email'],\n\t\t\t'prenom' => $data['prenom'],\n\t\t\t'tel' => $data['tel'],\n\t\t\t'state_id' => $data['state_id'],\n\t\t\t'address' => $data['address'],\n\t\t\t'nbr_annonce_autorise' => 5,\n 'password' => Hash::make($data['password']),\n ]);\n\t\t\n\t \n\t\t$this->guard()->login($membre);\n\t\treturn redirect()->intended( 'membre' ); \n }", "public function agregarUsuarioController(){\n //se verifica que el ultimo elemento de la lista contenga algo \n if(isset($_POST[\"tipo_cliente\"]) && $_POST[\"tipo_cliente\"] != \"\"){\n //Se almacena la informacion en un arreglo asociativo\n $datosController = array( \"tipo_cliente\"=>$_POST[\"tipo_cliente\"],\n \"telefono\"=>$_POST[\"telefono\"],\n \"nombre\"=>$_POST[\"nombre\"],\n \"ap_paterno\"=>$_POST[\"ap_paterno\"],\n \"ap_materno\"=>$_POST[\"ap_materno\"]\n );\n //Se habla a la clase DATOS para poder enviarle la peticion de agregar un nuevo registro, enviandole el arreglo y la tabla.\n $respuesta = Datos::agregarUsuariosModel($datosController,\"clientes\");\n\n if($respuesta == true){\n //En caso positivo nos redirecciona al cliente.\n echo '<script>\t\t\n\t\t\t location.href= \"index.php?action=cliente\";\n\t\t </script>';\n \n }else{\n //En caso negativo nos deja en la misma ventana.\n echo '<div class=\"alert alert-warning\" role=\"alert\"> <strong>Error!</strong> Revise el contenido que desea agregar. </div>';/*\n echo '<script>\t\t\n\t\t\t location.href= \"index.php?action=agregar_cliente\";\n\t\t </script>';*/\n }\n }\n }", "function registerMadMimi() {\n\t\t//\n\t\tApp::import('Vendor', 'MadMimi', array('file' => 'madmimi' . DS . 'MadMimi.class.php'));\n\t\tApp::import('Vendor', 'MadMimi', array('file' => 'madmimi' . DS . 'Spyc.class.php'));\n\n\t\t// Crear el objeto de Mad Mimi\n\t\t//\n\t\t$mailer = new MadMimi(Configure::read('madmimiEmail'), Configure::read('madmimiKey'));\n\t\t$userMimi = array('email' => $_POST[\"email\"], 'firstName' => $_POST[\"name\"], 'add_list' => 'mailing');\n\t\t$mailer -> AddUser($userMimi);\n\t\techo true;\n\t\tConfigure::write(\"debug\", 0);\n\t\t$this -> autoRender = false;\n\t\texit(0);\n\t}", "public function addMonumentAction(Request $request){\n if(($this->container->get('security.authorization_checker')->isGranted('ROLE_CLIENT'))){\n throw new AccessDeniedException('Access Denied!!!!!');\n }\n else{\n $monument = new Monument();\n $test = \"ajout\";\n $form = $this->createForm(MonumentType::class, $monument);\n $form = $form->handleRequest($request);\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($monument);\n $em->flush();\n return $this->redirectToRoute('museum_showMonumentspage');\n }\n return $this->render('@Museum/Monument/addMonument.html.twig', array('form' => $form->createView(), 'test' => $test));\n }}", "function store()\n {\n $name = $_REQUEST['name'];\n $email = $_REQUEST['email'];\n $address = $_REQUEST['address'];\n $password = $_REQUEST['password'];\n $group_id = $_REQUEST['group_id'];\n $this->userModel->add($name, $email, $address, $password, $group_id);\n // quay tro lai trang danh sach -> thay doi thuoc tinh: location cua header\n header('location:index.php?page=users');\n }", "public function add()\n {\n\n // Reglas de validación del formulario\n /*\n required: indica que el campo es obligatorio.\n min_length: indica que la cadena debe tener al menos una cantidad determinada de caracteres.\n max_length: indica que la cadena debe tener como máximo una cantidad determinada de caracteres.\n valid_email: indica que el valor debe ser un correo con formato válido.\n */\n $this->form_validation->set_error_delimiters('', '');\n $this->form_validation->set_rules(\"nombre\", \"Nombre\", \"required|max_length[100]\");\n $this->form_validation->set_rules(\"apellido\", \"Apellido\", \"required|max_length[100]\");\n $this->form_validation->set_rules(\"email\", \"Email\", \"required|valid_email|max_length[150]|is_unique[profesores.email]\");\n $this->form_validation->set_rules(\"fecha_nacimiento\", \"Fecha de Nacimiento\", \"required\");\n $this->form_validation->set_rules(\"profesion\", \"Profesion\", \"required|max_length[100]\");\n\n // Modificando el mensaje de validación para los errores\n $this->form_validation->set_message('required', 'El campo %s es requerido.');\n $this->form_validation->set_message('min_length', 'El campo %s debe tener al menos %s caracteres.');\n $this->form_validation->set_message('max_length', 'El campo %s debe tener como máximo %s caracteres.');\n $this->form_validation->set_message('valid_email', 'El campo %s no es un correo válido.');\n $this->form_validation->set_message('is_unique', 'El campo %s ya existe.');\n\n //echo \"Genero => \" . $this->input->post(\"genero\");\n\n // Parámetros de respuesta\n header('Content-type: application/json');\n $statusCode = 200;\n $msg = \"\";\n\n // Se ejecuta la validación de los campos\n if ($this->form_validation->run()) {\n // Si la validación es correcta entra acá\n try {\n $this->load->model('ProfesoresModel');\n $data = array(\n \"nombre\" => $this->input->post(\"nombre\"),\n \"apellido\" => $this->input->post(\"apellido\"),\n \"email\" => $this->input->post(\"email\"),\n \"profesion\" => $this->input->post(\"profesion\"),\n \"genero\" => $this->input->post(\"genero\"),\n \"fecha_nacimiento\" => $this->input->post(\"fecha_nacimiento\"),\n );\n $rows = $this->ProfesoresModel->insert($data);\n if ($resMo > 0) {\n $msg = \"Información guardada correctamente.\";\n } else {\n $statusCode = 500;\n $msg = \"No se pudo guardar la información.\";\n }\n } catch (Exception $ex) {\n $statusCode = 500;\n $msg = \"Ocurrió un error.\" . $ex->getMessage();\n }\n } else {\n // Si la validación da error, entonces se ejecuta acá\n $statusCode = 400;\n $msg = \"Ocurrieron errores de validación.\";\n $errors = array();\n foreach ($this->input->post() as $key => $value) {\n $errors[$key] = form_error($key);\n }\n $this->data['errors'] = $errors;\n }\n // Se asigna el mensaje que llevará la respuesta\n $this->data['msg'] = $msg;\n // Se asigna el código de Estado HTTP\n $this->output->set_status_header($statusCode);\n // Se envía la respuesta en formato JSON\n echo json_encode($this->data);\n }", "public function addNew()\n {\n $this->load->model('user_model');\n $data['roles'] = $this->user_model->getUserRoles();\n $data['divisi'] = $this->user_model->getUserDivisi();\n $data['pangkat'] = $this->user_model->getUserPangkat();\n $this->global['pageTitle'] = 'Tambahkan Data Rescuer';\n $this->load->view('includes/header', $this->global);\n $this->load->view('rescuer/addNew', $data);\n $this->load->view('includes/footer');\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 add(){\n\t\t$data = array();\n\t\t$postData = array();\n\n\t\t//zistenie, ci bola zaslana poziadavka na pridanie zaznamu\n\t\tif($this->input->post('postSubmit')){\n\t\t\t//definicia pravidiel validacie\n\t\t\t$this->form_validation->set_rules('mesto', 'Pole mesto', 'required');\n\t\t\t$this->form_validation->set_rules('PSČ', 'Pole PSČ', 'required');\n\t\t\t$this->form_validation->set_rules('email', 'Pole email', 'required');\n\t\t\t$this->form_validation->set_rules('mobil', 'Pole mobil', 'required');\n\n\n\n\t\t\t//priprava dat pre vlozenie\n\t\t\t$postData = array(\n\t\t\t\t'mesto' => $this->input->post('mesto'),\n\t\t\t\t'PSČ' => $this->input->post('PSČ'),\n\t\t\t\t'email' => $this->input->post('email'),\n\t\t\t\t'mobil' => $this->input->post('mobil'),\n\n\n\t\t\t);\n\n\t\t\t//validacia zaslanych dat\n\t\t\tif($this->form_validation->run() == true){\n\t\t\t\t//vlozenie dat\n\t\t\t\t$insert = $this->Kontakt_model->insert($postData);\n\n\t\t\t\tif($insert){\n\t\t\t\t\t$this->session->set_userdata('success_msg', 'Záznam o kontakte bol úspešne vložený');\n\t\t\t\t\tredirect('/kontakt');\n\t\t\t\t}else{\n\t\t\t\t\t$data['error_msg'] = 'Nastal problém.';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$data['post'] = $postData;\n\t\t$data['title'] = 'Pridať kontakt';\n\t\t$data['action'] = 'add';\n\n\t\t//zobrazenie formulara pre vlozenie a editaciu dat\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('kontakt/add-edit', $data);\n\t\t$this->load->view('templates/footer');\n\t}", "function create()\r\n\t{\r\n\r\n\t\t$this->form_validation->set_rules('nom', 'le nom', 'trim|required|min_length[2]|max_length[12]');\r\n\r\n\t\tif ($this->form_validation->run() == TRUE ) {\r\n\t\t\r\n\t\t$this->e->ajouter($this->input->post());\r\n\r\n\t\t$this->_notice=\"Ajout effectué avec succéss\";\r\n\r\n\t\t$this->index();\r\n\t\t} \r\n\t\telse {\r\n\t\t\t$this->index();\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public function create_post(){\n\n $this->form_validation->set_rules('domicilio[latitud]', 'Latitud del Domicilio', 'required|trim');\n $this->form_validation->set_rules('domicilio[longitud]', 'Longitud del Domicilio', 'required|trim');\n $this->form_validation->set_rules('domicilio[image]', 'Imagen del Mapa', 'required|trim');\n\n\t\tif( $this->form_validation->run() == true){\n \n $data = $this->security->xss_clean($this->input->post()); # XSS filtering\n\n $token = $this->security->xss_clean($this->input->post('auth', TRUE)); //token de authentication\n $is_valid_token = $this->authorization_token->validateToken($token);\n\n if(null !== $is_valid_token && $is_valid_token['status'] === TRUE){\n $usuario = $this->Usuario_model->getByTokenJWT($is_valid_token['data']);\n $domicilio = $data[\"domicilio\"];\n\n if (array_key_exists('persona', $data)) {\n $domicilio['id_persona'] = $data[\"persona\"]['id'];\n }\n $domicilio['id_usuario'] = $usuario->id;\n $out_domicilio = $this->Domicilio_model->create( $domicilio );\n\n if($out_domicilio != null){\n\n $this->response([\n 'status' => true,\n 'message' => $this->lang->line('item_was_has_add'),\n $this->lang->line('domicilio') => $out_domicilio\n ], REST_Controller::HTTP_OK);\n }else{\n $this->response([\n 'status' => false,\n 'message' => $this->lang->line('no_item_was_has_add')\n ], REST_Controller::HTTP_CREATED);\n }\n }else{\n $this->response([\n 'status' => false,\n 'message' => $this->lang->line('token_is_invalid'),\n ], REST_Controller::HTTP_NETWORK_AUTHENTICATION_REQUIRED); // NOT_FOUND (400) being the HTTP response code\n }\n\t\t}else{\n $this->response([\n 'status' => false,\n 'message' => validation_errors()\n ], REST_Controller::HTTP_ACCEPTED); \n\t\t}\n $this->set_response($this->lang->line('server_successfully_create_new_resource'), REST_Controller::HTTP_RESET_CONTENT);\n }", "public function add(){\n\t\tif($this->request->is('post'))\n\t\t{\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['role'] = 'user';\n\t\t\tif($this->User->save($this->request->data))\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario creado');\n\t\t\t\treturn $this-redirect(array('action' =>'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario no creado');\n\t\t\t}\n\t\t}\n\n\t}", "public function add_to_cart_friend() {\n $id_item = $_POST['id_item'];\n $this->view->id_item = $id_item;\n\n $nr_friends = count($_POST['name']);\n $friendsDetails = array();\n\n //validam daca a completat numele la toti\n for ($i = 0; $i < $nr_friends; $i++) {\n if (strlen($_POST['name'][$i]) < 1 || !filter_var($_POST['email'][$i], FILTER_VALIDATE_EMAIL)) {\n $errors = \"Va rugam completati corect datele prietenilor !\";\n break 1;\n }\n $friendsDetails[] = array(\"name\" => $_POST['name'][$i], \"email\" => $_POST['email'][$i]);\n }\n if ($errors) {\n $this->view->errors = $errors;\n $this->view->nr_friends = $nr_friends;\n $this->view->post = $_POST;\n $this->view->render(\"popups/addFriend\", false, \"popup\");\n }\n\n //totul e ok aici, salvam item-urile in shopping cart\n //Intai cream tipul de date pentru metoda NeoCartModel\\addToCart\n $params['quantity'] = $nr_friends;\n $params['id_item'] = $id_item;\n $params['is_gift'] = true;\n $params['details'] = json_encode($friendsDetails);\n\n $hash = self::getHash();\n $cart = $this->NeoCartModel->getCart($hash);\n\n $this->NeoCartModel->addToCart($params, $cart);\n $this->view->errors = \"Multumim ! Produsele au fost adaugate in cos.\";\n $this->view->render(\"popups/addFriend\", false, \"popup\");\n }", "public function addUser(UserAddForm $form);", "public function addType()\r\n\t{\r\n\t\tif(isset($_SESSION['auth']) && $_SESSION['users']['niveau'] == 3){\r\n\t\tif(isset($_POST['dataF'])){\r\n\t\t\t$spe = str_replace('&', '=', $_POST['dataF']);\r\n\t\t\t$data = $this->convertArray($spe);\r\n\t\t\t//print_r($data);die();\r\n\t\t\t$spec = $this->model('type');\r\n\t\t\t$id = $spec->addType($data);\r\n\t\t\tif($id){\r\n\t\t\t\techo json_encode(['SUCCESS'=>true]);\r\n\t\t\t}else{\r\n\t\t\t\techo json_encode(['SUCCESS'=>true]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t}else{\r\n\t\t\t$this->view('login',['page'=>'Speciality','msg'=>'you should to connect first']);\r\n\t\t}\r\n\t}", "function newactor(){\n\t\t$client = new \\GuzzleHttp\\Client();\n\t\t$url = 'http://localhost:8080/codeIgniter3/index.php/actor/add';\n\t\t$data = [\n\t\t\t'form_params'=>[\n\t\t\t\t'first_name'=>'John',\n\t\t\t\t'last_name'=>'Doe'\n\t\t\t]\t\t\t\t\n\t\t];\n\n $res = $client->request('POST', $url, $data);\n\t}", "function add()\n { \n\t\tif ($this->auth->loggedin()) {\n\t\t\t$id = $this->auth->userid();\n\t\t\tif(!($this->User_model->hasPermission('add',$id)&&($this->User_model->hasPermission('person',$id)||$this->User_model->hasPermission('WILD_CARD',$id)))){\n\t\t\t\tshow_error('You Don\\'t have permission to perform this operation.');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$this->form_validation->set_rules('username', '<b>Username</b>', 'trim|required|min_length[5]|max_length[12]');\n\t\t\t$this->form_validation->set_rules('password', '<b>Password</b>', 'trim|required');\n\t\t\t$this->form_validation->set_rules('first_name', '<b>First Name</b>', 'trim|required|min_length[2]|max_length[12]');\n\t\t\t$this->form_validation->set_rules('Last_name', '<b>Last Name</b>', 'trim|required|min_length[2]|max_length[12]');\n\t\t\t\n\t\t\t$this->form_validation->set_rules('gender', '<b>Gender</b>', 'trim|required');\n\t\t\t$this->form_validation->set_rules('mobile', '<b>Mobile</b>', 'trim|required|integer|min_length[10]|max_length[11]');\n\t\t\t$this->form_validation->set_rules('role_id', '<b>Role</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t$this->form_validation->set_rules('location_id', '<b>Location</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t$this->form_validation->set_rules('status_id', '<b>Status</b>', 'trim|required|integer|min_length[1]|max_length[4]');\n\t\t\t\t\t\t\n\t\t\tif(isset($_POST) && count($_POST) > 0 && $this->form_validation->run()) \n\t\t\t{ \n\t\t\t\t$person_id = $this->User_model->register_user(); \n\t\t\t\t//$person_id = $this->Person_model->add_person($params);\n\t\t\t\t$params1 = array(\n\t\t\t\t\t\t\t'person_id' => $person_id,\n\t\t\t\t\t\t\t'role_id' => $this->input->post('role_id'),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->Person_role_model->update_person_role($person_id,$params1);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$params2 = array(\n\t\t\t\t\t\t\t'person_id' => $person_id,\n\t\t\t\t\t\t\t'location_id' => $this->input->post('location_id'),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->Person_location_model->update_person_location($person_id,$params2);\t\n\t\t\t\tredirect('person/index');\n\t\t\t}\n\t\t\telse\n\t\t\t{ \n\t\t\t\t\n\t\t\t\t$user = $this->User_model->get('person_id', $id);\n\t\t\t\tunset($user['password']);\n\t\t\t\t\n\t\t\t\t$user_role = $this->User_model->loadRoles($user['person_id']);\n\t\t\t\t\t$this->data['user'] = $user['username'];\n\t\t\t\t\t$this->data['role'] = $user_role;\n\t\t\t\t\t$this->data['gender'] = $user['gender'];\n\t\t\t\t\t$specialPerm = $this->User_model->loadSpecialPermission($id);\n\t\t\t\t\t\n\t\t\t\t\t$this->data['pp'] = $specialPerm;\n\t\t\t\t\t$this->data['p_role'] = $this->Person_role_model->get_person_role($id);\n\t\t\t\t\t$this->data['role'] = $this->Role_model->get_all_role();\n\t\t\t\t\t$this->data['location'] = $this->Location_model->get_all_location();\n\t\t\t\t\t$this->data['status'] = $this->Statu_model->get_all_status();\n\t\t\t\t\t\n\t\t\t\t$this->template\n\t\t\t\t\t->title('Welcome','My Aapp')\n\t\t\t\t\t->build('person/add',$this->data);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$this->template\n\t\t\t\t\t->title('Login Admin','Login Page')\n\t\t\t\t\t->set_layout('access')\n\t\t\t\t\t->build('access/login');\n\t\t}\n }", "function incluir_click($sender, $param)\n {\n if ($this->IsValid)\n {\n $this->incluir->Enabled=False;//Se deshabilita boton incluir\n // se capturan los valores de los controles\n $aleatorio = $this->numero->Text;\n $cod_direccion = usuario_actual('cod_direccion');\n $cod_direccion=substr($cod_direccion, 1);\n $siglas = usuario_actual('siglas_direccion');\n $ano = $this->lbl_ano->Text;\n $asunto = str_replace(\"'\", '\\\\\\'', $this->txt_asunto->Text );\n $destinatario = str_replace(\"'\", '\\\\\\'', $this->txt_destinatario->Text );\n $enviadopor=usuario_actual('login');\n $fecha = cambiaf_a_mysql ($this->txt_fecha->Text);\n //$memo=$this->html1->text;\n //busca el nombre del remitente\n $sql3=\"select cedula from intranet.usuarios where(login='$enviadopor')\";\n $resultado3=cargar_data($sql3, $sender);\n $cedula=$resultado3[0]['cedula'];\n $sql3=\"select nombres, apellidos from organizacion.personas where(cedula='$cedula')\";\n $resultado3=cargar_data($sql3, $sender);\n $remitente=$resultado3[0]['nombres'].' '.$resultado3[0]['apellidos'];\n $criterios_adicionales=array('direccion' => $cod_direccion, 'ano' => $ano);\n $numero=proximo_numero(\"organizacion.memoranda\",\"correlativo\",$criterios_adicionales,$this);\n $numero=rellena($numero,4,\"0\");\n // se inserta en la base de datos\n $sql = \"insert into organizacion.memoranda\n (direccion, siglas, correlativo, ano, fecha, asunto, destinatario, status, memo, remitente)\n values ('$cod_direccion','$siglas','$numero','$ano','$fecha','$asunto','$destinatario','1','$memo', '$remitente')\"; \n $resultado=modificar_data($sql,$sender);\n /*$sql2=\"update organizacion.adjuntos set correlativo='$numero' where (correlativo='$aleatorio')\";\n $resultado2=modificar_data($sql2, $sender);*/ \n /* Se incluye el rastro en el archivo de bitácora */\n $descripcion_log = \"Incluido el Memorando: \".$siglas.\"-\".$numero.\"-\".$ano;\n inserta_rastro(usuario_actual('login'),usuario_actual('cedula'),'I',$descripcion_log,\"\",$sender);\n $this->LTB->titulo->Text = \"Solicitud de número de Memorando\";\n $this->LTB->texto->Text = \"Se ha registrado exitosamente el nuevo Memorando con el \".\n \"número: <strong>\".$siglas.\"-\".$numero.\"-\".$ano.\"</strong>\";\n $this->LTB->imagen->Imageurl = \"imagenes/botones/memoranda.png\";\n $this->LTB->redir->Text = \"epaper.incluir_memo\";\n $params = array('mensaje');\n $this->getPage()->getCallbackClient()->callClientFunction('muestra_mensaje', $params);\n\n //$this->mensaje2->setSuccessMessage($sender, \"Se ha registrado exitosamente el nuevo Memorando con el numero:\".$siglas.\"-\".$numero.\"-\".$ano, 'grow');\n\n }\n }", "public function insertar($nombreMiembro,$apellido1Miembro,$apellido2Miembro,$correo,$contrasenna,$rol){ \n $miembro = new Miembro();\n \n $miembro->nombreMiembro = $nombreMiembro;\n $miembro->apellido1Miembro = $apellido1Miembro;\n $miembro->apellido2Miembro = $apellido2Miembro;\n $miembro->correo = $correo;\n $miembro->contrasenna = $contrasenna;\n $miembro->rol = $rol;\n \n $miembro->save();\n }", "public function user_add()\n\t{\n\t\t$data = array( 'isi' \t=> 'admin/user/v_user_add',\n\t\t\t\t\t\t'nav'\t=>\t'admin/nav',\n\t\t\t\t\t\t'title' => 'Tampil Dashboard Admin');\n\t\t$this->load->view('layout/wrapper',$data);\n\t}", "public function add(){\n\t\t$nama = $_POST['nama_sekolah'];\n\t\t$lati = $_POST['latitude'];\n\t\t$longi = $_POST['longitude'];\n\t\t$alamat = $_POST['alamat'];\n\n\t\t$data['nama_sekolah'] = $nama;\n\t\t$data['latitude'] = $lati;\n\t\t$data['longitude'] = $longi;\n\t\t$data['alamat'] = $alamat;\n\n\t\t$this->m_sekolah->addData($data);\n\t\tredirect('Welcome/index');\n\t}", "function get_add_movilidad($post){\n\t$Id_tienda = $this->session->userdata('Id_tienda');\n\t\t$data=array(\n\t\t\t'Id_movilidad'=>'',\n\t\t\t'Placa'=>$post['placa'],\n\t\t\t'Estado'=>1,\n\t\t\t'Id_tienda'=>$Id_tienda\n\t\t);\n\t\t\n\t\t$this->db->insert('jam_movilidad',$data);\n\t}", "public function createPost(){\n \t//di chuyen den url: /admin/users/read\n if($this->model->modelCreate())\n //di chuyen den url\n return redirect(\"admin/users\");\n else{\n Session::flash(\"error\",\"email da ton tai\");\n return redirect(\"admin/users/addUser\")->withInput();\n }\n }", "function add($nombre,$correo){\n\t\tglobal $conn;\n\t\t//$sql = \"INSERT INTO usuario (nombre,correo) VALUES ('$nombre','$correo')\";\n\t\t$stmt = $conn->prepare('INSERT INTO user (email,nombre) VALUES ( :email,:password)');\n\t\t//$stmt->bindParam(':nombre', $nombre);\n\t\t$stmt->bindParam(':email', $nombre);\n\t\t$stmt->bindParam(':password', $correo);\n\t\t$stmt->execute();\n\t\t//$conn->query($sql);\n\t}", "static function addUser(){\n\n $controller = new UserController();\n $validation = $controller->signupValid();\n\n if($validation === \"OK\"){\n $base = new ConnexionDb;\n\n $base->query(\"INSERT INTO user(username, firstname, email, pass, valid)\n VALUES (:username, :firstname, :email, :pass, 1)\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR),\n array('firstname',$_POST['firstname'],\\PDO::PARAM_STR),\n array('email',$_POST['email'],\\PDO::PARAM_STR),\n array('pass',$_POST['pass'],\\PDO::PARAM_STR)\n )\n );\n // $userM = new User($_POST);\n\n }else{\n echo 'erreur d\\'inscription';\n }\n }", "public function add() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['password'] = AuthComponent::password($this->request->data['User']['password']);\n\t\t\tif ($this->User->save($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('The user has been saved'));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t} else {\n\t\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t\t$lookupSupported = isset($queryURL) && \"\" <> $queryURL;\r\n\t\t\t$this->set('lookupSupported', $lookupSupported);\n\t\t\t$this->set('userType', $user['User']['type']);\n\t\t}\n\t}", "public function store(Request $request)\n {\n // dd($request->all());\n $this->validate($request, [\n 'matiere_id' => 'required',\n 'professeur_id'=>'required',\n 'school_id' => 'required',\n //'professeur_id'=>'required'\n ]);\n\n\n $professeur = User::findOrFail($request->professeur_id);\n\n $matiere = Matiere::findOrFail($request->matiere_id);\n\n $professeur->matieres()->attach($matiere->id);\n \n flash('success')->success();\n\n return redirect()->route('professeursMatieres.index');\n\n\n }", "function postAdd($request){\r\n global $context;\r\n $data= new $this->model;\r\n foreach($data->fields as $key=>$field){\r\n if($field['type']!='One2many' && $field['type']!='Many2many' ){\r\n $data->data[$key]=$request->post[$key];\r\n }\r\n }\r\n\r\n if(!$data->insert()){\r\n if($request->isAjax()) return json_error($data->error);\r\n throw new \\Exception($data->error);\r\n }\r\n if($request->isAjax()) return json_success(\"Save Success !!\".$data->error,$data);\r\n\r\n\r\n redirectTo($context->controller_path.\"/all\");\r\n }", "public function nuevo() {\n\n /* Si NO esta autenticado redirecciona a auth */\n if (!$this->ion_auth->logged_in()) {\n\n redirect('auth', 'refresh');\n }\n \n \n\n $this->load->library('form_validation');\n\n if ($this->form_validation->run('clientes')) {\n\n $data = $this->clientes->add();\n\n $index = array();\n\n $index['id'] = $data['id_cliente'];\n\n $index['type'] = \"clientes\";\n\n $this->session->set_flashdata('message', custom_lang('sima_client_created_message', 'Cliente creado correctamente'));\n\n redirect('clientes/index');\n } else {\n\n\n $data = array();\n\n $data['tipo_identificacion'] = $this->clientes->get_tipo_identificacion();\n\n $data['pais'] = $this->clientes->get_pais();\n $data['grupo'] = $this->grupo->getAll();\n $data_empresa = $this->miempresa->get_data_empresa();\n $data[\"tipo_negocio\"] = $data_empresa['data']['tipo_negocio']; \n $this->layout->template('member')->show('clientes/nuevo', array('data' => $data));\n }\n }", "function add() {\n $this->layout = \"no_header\";\n if (!empty($this->data)) {\n if ($this->User->save($this->data)) {\n $this->Session->setFlash(\"Your account has been created successfully\");\n $this->go_back(\"login\");\n }\n }\n }", "public function p_add() {\n $_POST['user_id'] = $this->user->user_id;\n\n # Unix timestamp of when this post was created / modified\n $_POST['created'] = Time::now();\n $_POST['modified'] = Time::now();\n\n\n # Insert\n # Note we didn't have to sanitize any of the $_POST data because we're using the insert method which does it for us\n DB::instance(DB_NAME)->insert('activities', $_POST);\n\n # Send them back to home page\n Router::redirect('/activities/index');\n\n }", "function insert(){\n //Declarar variables para recibir los datos del formuario nuevo\n $nombre=$_POST['nombre'];\n $apellido=$_POST['apellido'];\n $telefono=$_POST['telefono'];\n\n $this->model->insert(['nombre'=>$nombre,'apellido'=>$apellido,'telefono'=>$telefono]);\n $this->index();\n }", "public function addAction() {\n\t\t$this->view->addLayoutVar(\"onglet\", 2);\n\t\t$uid = Annuaire_User::getCurrentUserId();\n\t\t$this->view->title = t_('Add');\n\t\t$db = Gears_Db::getDb();\n\t\t$clients = Array();\n\t\t$result = $db->fetchAll(\"SELECT * FROM ANNUAIRE_SOCIETE WHERE USER_ID = ?\", Array($uid));\n\t\tforeach ($result as $info) {\n\t\t\t$clients[$info['SOCIETE_ID']][0] = $info['SOCIETE_ID'];\n\t\t\t$clients[$info['SOCIETE_ID']][1] = $info['SOCIETE_NOM'];\n\t\t}\n\t\t$this->view->clients = ($clients);\n\t\t$this->view->addcontact = t_(\"Add a contact\");\n\t\t$this->view->name = t_(\"Name\");\n\t\t$this->view->firstname = t_(\"First Name\");\n\t\t$this->view->address = t_(\"Address\");\n\t\t$this->view->mail = t_(\"Mail\");\n\t\t$this->view->phone = t_(\"Phone Number\");\n\t\t$this->view->cell = t_(\"Cellphone number\");\n\t\t$this->view->fax = t_(\"Fax\");\n\t\t$this->view->site = t_(\"Website\");\n\t\t$this->view->comment = t_(\"Comment\");\n\t\t$this->view->society = t_(\"Companie\");\n\t\t$this->view->none = t_(\"none\");\n\t\t$this->view->send = t_(\"Send\");\n\t\t$this->view->addsociety = t_(\"Add a companie\");\n\t\t$this->view->activity = t_(\"Activity\");\n\t}", "public function addAction() {\n $form = new JogoEmpresa_Form_JogoEmpresa();\n $model = new JogoEmpresa_Model_JogoEmpresa();\n $idJogo = $this->_getParam('idJogo');\n $idEmpresa = $this->_getParam('idEmpresa');\n if ($this->_request->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n $data = $form->getValues();\n if ($idJogo) {\n $db = $model->getAdapter();\n $where = $db->quoteInto('jog_codigo=?',$idJogo)\n . $db->quoteInto(' AND emp_codigo=?',$idEmpresa);\n $model->update($data, $where);\n } else {\n $model->insert($data);\n }\n $this->_redirect('/jogoEmpresa');\n }\n } elseif ($idJogo) {\n $data = $model->busca($idJogo,$idEmpresa);\n if (is_array($data)) {\n $form->setAction('/jogoEmpresa/index/add/idJogo/' . $idJogo . '/idEmpresa/' . $idEmpresa);\n $form->populate($data);\n }\n }\n $this->view->form = $form;\n }", "public function createAction()\n {\n $entity = new Titeur();\n $request = $this->getRequest();\n\t\t\t\t$user = $this->get('security.context')->getToken()->getUser();\n $form = $this->createForm(new TiteurType(), $entity, array('user' => $user));\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n\t\t\t\t\t\t$this->get('session')->set('titeur_id', $entity->getId());\n\t\t\t\t\t\t$this->get('session')->setFlash('notice', 'Titeur a été ajouté avec succès');\n\n return $this->redirect($this->generateUrl('enfant_new'));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function add_post(){\n $response = $this->PersonM->add_person(\n $this->post('name'),\n $this->post('hp'),\n $this->post('email'),\n $this->post('message')\n );\n $this->response($response);\n }", "function add()\n { \n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'descripcion' => $this->input->post('descripcion'),\n 'nombre' => $this->input->post('nombre'),\n );\n \n $estadousuario_id = $this->Estadousuario_model->add_estadousuario($params);\n redirect('estadousuario/index');\n }\n else\n { $this->load->view(\"header\",[\"title\"=>\"Registro estado\"]);\n $this->load->view('estadousuario/add');\n $this->load->view('footer');\n }\n }", "public function add()\n\t{\n\t\t// TODO\n\t\t// if(user has permissions){}\n\t\t$this -> loadModel('User');\n\t\tif($this -> request -> is('post') && !$this -> User -> exists($this -> request -> data['SgaPerson']['user_id']))\n\t\t{\n\t\t\t$this -> Session -> setFlash(\"Please select a valid JacketPages user to add.\");\n\t\t\t$this -> redirect(array('action' => 'index',$id));\n\t\t}\n\t\t$this -> loadModel('User');\n\t\tif ($this -> request -> is('post'))\n\t\t{\n\t\t\t$this -> SgaPerson -> create();\n\t\t\tif ($this -> SgaPerson -> save($this -> data))\n\t\t\t{\n\t\t\t\t$user = $this -> User -> read(null, $this -> data['SgaPerson']['user_id']);\n\t\t\t\t$this -> User -> set('level', 'sga_user');\n\t\t\t\t$this -> User -> set('sga_id', $this -> SgaPerson -> getInsertID());\n\t\t\t\t$this -> User -> save();\n\t\t\t\t$this -> Session -> setFlash(__('The user has been added to SGA.', true));\n\t\t\t\t$this -> redirect(array('action' => 'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this -> Session -> setFlash(__('Invalid user. User may already be assigned a role in SGA. Please try again.', true));\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.73490244", "0.6996486", "0.67863035", "0.67594904", "0.6687043", "0.6593787", "0.65594697", "0.6516573", "0.6493912", "0.64913505", "0.6476363", "0.64708674", "0.6396816", "0.63455445", "0.63368696", "0.6277763", "0.6256368", "0.6238567", "0.6175691", "0.6147944", "0.6109554", "0.6107172", "0.6096277", "0.60947514", "0.6072273", "0.6069374", "0.60574263", "0.60120815", "0.6009598", "0.598856", "0.59873366", "0.5987212", "0.59806067", "0.5976745", "0.5958336", "0.5953061", "0.59503406", "0.59444153", "0.59443283", "0.5942349", "0.5936447", "0.592873", "0.5924991", "0.591932", "0.5917082", "0.59160876", "0.59102124", "0.5909148", "0.5905945", "0.5898064", "0.5897572", "0.589745", "0.5887155", "0.58815026", "0.5876411", "0.5870115", "0.58623374", "0.5860169", "0.5851283", "0.58503515", "0.5849323", "0.58487326", "0.5845528", "0.5839962", "0.58364516", "0.5836064", "0.5835355", "0.5831011", "0.5828898", "0.58288145", "0.5823841", "0.5822774", "0.5818648", "0.58171535", "0.58148235", "0.5807028", "0.5799433", "0.5788815", "0.5784627", "0.578362", "0.5783155", "0.5779736", "0.57756937", "0.577335", "0.576813", "0.5767043", "0.5756272", "0.57545394", "0.57534724", "0.57521635", "0.574909", "0.5747554", "0.5744805", "0.57447505", "0.57430774", "0.5742756", "0.57381725", "0.5735221", "0.57327384", "0.5730366", "0.57297623" ]
0.0
-1
/ page mobilisateur/listmobilisateur liste des mobilisateurs
public function listmobilisateuradminAction() { $sessionutilisateur = new Zend_Session_Namespace('utilisateur'); //$this->_helper->layout->disableLayout(); $this->_helper->layout()->setLayout('layoutpublicesmcadmin'); if (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');} if($sessionutilisateur->confirmation != ""){$this->_redirect('/administration/confirmation');} $mobilisateur = new Application_Model_EuMobilisateurMapper(); //$this->view->entries = $mobilisateur->fetchAllByCanton($sessionutilisateur->id_utilisateur); $this->view->entries = $mobilisateur->fetchAll(); $this->view->tabletri = 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listmobilisateurAction() {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $mobilisateur = new Application_Model_EuMobilisateurMapper();\n $this->view->entries = $mobilisateur->fetchAllByMembre($sessionmembre->code_membre);\n\n $this->view->tabletri = 1;\n }", "public function listMembres() {\n\t\t$membreManager = $this->membreManager;\n\t\t$membres = $membreManager->listMembres();\n\t\t$success = ( isset( $_SESSION['success'] ) ? $_SESSION['success'] : null );\n\t\t$error = ( isset( $_SESSION['error'] ) ? $_SESSION['error'] : null );\n\t\t$myView = new View( 'listmembres' );\n\t\t$myView->renderView( array( 'membres' => $membres, 'success' => $success, 'error' => $error ) );\n\t}", "public function actionMultaList()\n {\n $data = [];\n $objectUser = Multas::getInstancia();\n $users = $objectUser->getAllMultas();\n\n $this->renderHtml('../views/listMultas_view.php', $users);\n }", "function listuser(){\n\t\t\tif(!empty($_GET['paginado'])){\n\t\t\t\t$pag = $_GET['paginado'];\n\t\t\t\t$list = $this -> model -> selectuser($pag);\n\t\t\t}else{\n\t\t\t\t$list = $this -> model -> selectuser();\n\t\t\t}\n\t\t\t$this -> ajax_set($list);\n\t\t}", "public function membres()\n {\n $this->membres = $this->Member->list($_SESSION['guild_id']);\n }", "public function get_list() {\r\n try {\r\n $limit = $this->getSafe('limit', $this->app->appConf->page_size);\r\n $page_number = $this->getSafe('page_number', 1);\r\n $where = $this->getSafe('where', '');\r\n $order_by = $this->getSafe('order_by', '');\r\n $keywords = $this->getSafe('keywords', '');\r\n \r\n $page_number = empty($page_number) ? 1 : $page_number;\r\n \r\n $start_index = ($page_number -1) * $limit;\r\n \r\n $db = $this->app->getDbo();\r\n \r\n $search = '';\r\n \r\n if (!empty($keywords)) {\r\n $keywords = $db->quote('%' . $keywords . '%');\r\n // search theo email\r\n $search .= $db->quoteName('email') . ' LIKE ' . $keywords;\r\n // search theo mobile\r\n $search .= ' OR ' . $db->quoteName('mobile') . ' LIKE ' . $keywords;\r\n // search theo display_name\r\n $search .= ' OR ' . $db->quoteName('display_name') . ' COLLATE utf8_general_ci LIKE ' . $keywords;\r\n }\r\n \r\n if (!empty ($where)) {\r\n if (!empty ($search)) {\r\n $where = ' AND (' . $search . ')';\r\n }\r\n } else {\r\n $where = $search;\r\n }\r\n \r\n $data = array (\r\n 'limit' => $limit,\r\n 'start_index' => $start_index,\r\n 'order_by' => $order_by,\r\n 'where' => $where\r\n );\r\n \r\n $user_list = $this->user_model->get_list($data);\r\n \r\n $total_user_list = $this->user_model->get_list_total($where);\r\n \r\n $ret = array (\r\n 'users' => $user_list,\r\n 'total' => $total_user_list\r\n );\r\n \r\n $this->renderJson($ret);\r\n \r\n } catch (Exception $ex) {\r\n $this->app->write_log('user_get_list_exception - ' . $ex->getMessage());\r\n \r\n $ret = $this->message(1, 'user_get_list_exception', EXCEPTION_ERROR_MESSAGE);\r\n $this->renderJson($ret);\r\n }\r\n }", "function mentor_list($limit='',$start=0,$condition='')\n{\n\tglobal $DB;\n\t$sql =\"SELECT u.id,u.firstname,u.lastname,u.email,u.city,u.picture,u.department FROM {user} u left join {user_info_data} ud on ud.userid=u.id \";\n\t$sql.=\"WHERE ud.data='mentor data' and ud.acceptterms=1 and u.deleted=0 $condition order by u.timemodified desc limit $start,$limit\";\n\t//echo $sql;die;\n\t$result = $DB->get_records_sql($sql);\n\tif(count($result)>0){\n\t\tforeach($result as $mentordata)\n\t\t{\n\t\t\t$user = new stdClass();\n\t\t\t$user->id = $mentordata->id;\n\t\t\t//$picture = get_userprofilepic($user);\n\t\t\t$userurl = getuser_profilelink($user->id);\n\t\t\t$usrimg = get_userprofilepic($user);\n\t\t\t$picture ='<div class=\"left picture\"><a href=\"'.$userurl.'\" >'.$usrimg.'</a></div>'; \n\t\t\t$mentordata->picture = $picture;\n\t\t}\n\t}\n\treturn $result;\n}", "public function pagelisteMembre(){\n \n $userModel = new User();\n $lisAllUser = $userModel->getAllUser(bdd::GetInstance());\n\n //Récupération du rôle du compte\n $role = UserController::roleNeed();\n $isConnected = 1;\n\n return $this->twig->render('Dashboard/listeMembre.html.twig',[\n 'allContact'=> $lisAllUser,\n 'role'=>$role,\n 'isConnected' => $isConnected\n ]);\n\n }", "public function lst(){\n\t\t$args = $this->getArgs();\n\t\t$uid = $_SESSION[\"user\"][\"uid\"];\n\t\t$base_url = substr($_SERVER[\"REQUEST_URI\"], 0, strrpos($_SERVER[\"REQUEST_URI\"], \"/\") + 1);\n\t\t$header = array(\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_ID)),\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_EMAIL)),\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_FNAME)),\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_LNAME)),\n\t\t\t\tsprintf(\"%s\", Translate::get(Translator::USER_LIST_HEADER_PHONE))\n\t\t);\n\t\t\n\t\t$config = array(\n\t\t\t\t\"config\" => array(\n\t\t\t\t\t\t\"page\" => (isset($args[\"GET\"][\"page\"]) ? $args[\"GET\"][\"page\"] : System::PAGE_ACTUAL_DEFAULT),\n\t\t\t\t\t\t\"column\" => (isset($args[\"GET\"][\"column\"]) ? $args[\"GET\"][\"column\"] : System::SORT_DEFAULT_COLUMN),\n\t\t\t\t\t\t\"direction\" => (isset($args[\"GET\"][\"direction\"]) ? $args[\"GET\"][\"direction\"] : System::SORT_DES),\n\t\t\t\t\t\t\"actual_pagesize\" => (isset($_SESSION[\"page_size\"]) ? $_SESSION[\"page_size\"] : System::PAGE_SIZE_DEFAULT),\n\t\t\t\t\t\t\"data_count\" => $this->getModel()->getCountUserList(),\n\t\t\t\t\t\t\"disable_menu\" => true,\n\t\t\t\t\t\t\"disable_select\" => true,\n\t\t\t\t\t\t\"disable_pagging\" => false,\n\t\t\t\t\t\t\"disable_set_pagesize\" => false\n\t\t\t\t),\n\t\t\t\t\"form_url\" => array(\n\t\t\t\t\t\t\"page\" => $base_url . \"-%d-%d-%s\",\n\t\t\t\t\t\t\"header_sort\" => $base_url . \"-%d-%d-%s\",\n\t\t\t\t\t\t\"form_action\" => $base_url\n\t\t\t\t),\n\t\t\t\t\"item_menu\" => array(),\n\t\t\t\t\"select_item_action\" => array(),\n\t\t\t\t\"style\" => array(\n\t\t\t\t\t\t\"marked_row_class\" => \"marked\",\n\t\t\t\t\t\t\"count_box_class\" => \"count_box\",\n\t\t\t\t\t\t\"pagging_box_class\" => \"pagging_box\",\n\t\t\t\t\t\t\"actual_page_class\" => \"actual_page\",\n\t\t\t\t\t\t\"table_header_class\" => \"head\",\n\t\t\t\t\t\t\"table_id\" => \"user_lst\",\n\t\t\t\t\t\t\"select_form_id\" => \"\",\n\t\t\t\t\t\t\"pagesize_form_id\" => \"pagesize_box\",\n\t\t\t\t\t\t\"list_footer_id\" => \"\"\n\t\t\t\t)\n\t\t);\n\t\t$data = $this->getModel()->getUserList($config[\"config\"][\"page\"], $config[\"config\"][\"actual_pagesize\"], $config[\"config\"][\"column\"], $config[\"config\"][\"direction\"], $config[\"config\"][\"disable_pagging\"]);\n\t\t$out = Paginator::generatePage($header, $data, $config);\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "public function listar()\n {\n return $this->request('GET', 'unidadesmedida');\n }", "public function list_user()\n\t{\n\t\tcheck_access_level_superuser();\n\t\t$data = [\n\t\t\t'list_user' => $this->user_m->get_cabang(),\n\t\t\t'list_cabang' => $this->data_m->get('tb_cabang')\n\t\t];\n\t\t$this->template->load('template2', 'user/list_user', $data);\n\t}", "public function userlist()\n\t{\n\t\t$data['page']='Userlist';\n\t\t$data['users_list']=$this->users->get_many_by('userlevel_id',2);\n\t\t$view = 'admin/userlist/admin_userlist_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "function user_list()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '运营人员列表';\n $this->global['pageName'] = 'userlist';\n\n $data['searchType'] = '0';\n $data['searchName'] = '';\n\n $this->loadViews(\"user_manage/users\", $this->global, $data, NULL);\n }\n }", "public function utilisateurListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Utilisateur\");//type array\n\t}", "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 suppmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if ($id > 0) {\n\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->delete($id);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function liste(){\n $clientMdb = new clientMoralRepository();\n \n $data['clientsM'] = $clientMdb->liste();\n return $this->view->load(\"clientMoral/liste\", $data);\n }", "public function lista() { // 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('user_contact', $dados);\n }else { $this->loadTemplate('users_list', $dados);\n }\n }", "public function listobjetuserAction()\n {\n $user = $this->getUser();\n\n $em = $this->getDoctrine()->getManager();\n\n $objets = $em->getRepository('AppBundle:Objet')->findBy(['user'=>$user], array('date' => 'desc'));\n $contacdejaenvoyer=$this->getDoctrine()->getManager()->getRepository('AppBundle:Contact')->findAll();\n\n\n return $this->render(':objet:listobjetutilisateur.html.twig', array(\n 'objets' => $objets,\n 'contactdejaenvoyer'=>$contacdejaenvoyer,\n 'user'=>$user,\n ));\n }", "public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\t\t$tUsers = model_user::getInstance()->findAll();\n\n\t\t$oView = new _view('users::list');\n\t\t$oView->tUsers = $tUsers;\n\t\t$oView->showGroup = true;\n\t\t$oView->title = 'Tous les utilisateurs';\n\n\t\t$this->oLayout->add('work', $oView);\n\t}", "public function mylistAction() {\n $em = $this->container->get('doctrine')->getEntityManager();\n\n // appel du gestionnaire d'entites de FOSUserBundle permettant de manipuler nos objets (persistance, etc.)\n $userManager = $this->container->get('fos_user.user_manager');\n // recuperation du user connecte\n $user = $userManager->findUserByUsername($this->container->get('security.context')->getToken()->getUser());\n\n // recuperation de tous les votes de reves\n $voteDreams = $em->getRepository('DreamsDreamBundle:VoteDream')->findAll();\n\n // recuperation uniquement des reves du user connecte\n $dreams = $em->getRepository('DreamsDreamBundle:Dream')->getUserDreams($user);\n\n $paginator = $this->container->get('knp_paginator');\n $pagination = $paginator->paginate(\n $dreams,\n $this->container->get('request')->query->get('page', 1)/*page number*/,\n 5/*limit per page*/\n );\n\n // affichage du template mylist.html.twig avec les reves du user connecte en parametres\n return $this->container->get('templating')->renderResponse(\n 'DreamsDreamBundle:Dream:mylist.html.twig',\n array(\n 'pagination' => $pagination,\n 'voteDreams' => $voteDreams\n ));\n }", "public function etatmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function get_lists_meta( $user_id, $page, $list, $un, $limit=NULL ) {\n \n if ( $un == 1 ) {\n \n $args = ['user_id' => $user_id, 'list_id' => $list, 'active' => 0];\n \n } else {\n \n $args = ['user_id' => $user_id, 'list_id' => $list];\n \n }\n \n if ( $un == 3 ) {\n \n $this->db->select('lists_meta.meta_id,networks.network_id,networks.expires,networks.network_name,networks.user_id,networks.user_name');\n $this->db->from('lists_meta');\n $this->db->join('networks', 'lists_meta.body=networks.network_id', 'left');\n $this->db->where(['lists_meta.user_id' => $user_id, 'lists_meta.list_id' => $list, 'networks.user_id' => $user_id]);\n $this->db->order_by('lists_meta.meta_id', 'desc');\n \n } else if ( $un == 4 ) {\n \n $this->db->select('lists_meta.meta_id,networks.network_id,networks.expires,networks.network_name,networks.user_id,networks.user_name');\n $this->db->from('lists_meta');\n $this->db->join('networks', 'lists_meta.body=networks.network_id', 'left');\n $this->db->like(['lists_meta.user_id' => $user_id, 'lists_meta.list_id' => $list, 'user_name' => $limit]);\n $this->db->order_by('lists_meta.meta_id', 'desc');\n \n } else {\n \n $this->db->select('*');\n $this->db->from('lists_meta');\n $this->db->where($args);\n $this->db->order_by('meta_id', 'desc');\n \n }\n \n if ( $limit || ( $un == 3 ) || ( $un == 4 ) ) {\n \n $this->db->limit($limit, $page);\n \n $query = $this->db->get();\n \n if ( $query->num_rows() > 0 ) {\n \n $result = $query->result();\n return $result;\n \n } else {\n \n return false;\n \n }\n \n } else {\n \n $query = $this->db->get();\n return $query->num_rows();\n \n }\n \n }", "public function display_all()\n {\n if ( ! file_exists(APPPATH.'views/pages/list.php'))\n {\n // Whoops, we don't have a page for that!\n show_404();\n }\n if (!isset($this->session->userdata['user_role']) || $this->session->userdata['user_role'] < 40)\n {\n $this->session->set_flashdata('message', 'Vous devez avoir les droits de superviseur');\n redirect($_SERVER['HTTP_REFERER']); \n } \n \n $data['title'] = 'Liste des Membres'; // Capitalize the first letter\n $data['membres'] = $this->member_model->get_member();\n\n // breadcrumb\n $data['breadcrumbs'] = $this->breadcrumbs('liste');\n \n $this->load->template('pages/list_members',$data);\n }", "public function meList( )\n\t{\n\t\t$userId = $this->getCurrentUserId();\n\t\treturn $this->adminListByUser($userId);\n\t}", "function listarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_sel';\n\t\t$this->transaccion='GEM_GEMETO_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_metodologia','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function listAction(){\n $r=$this->getRequest();\n $query=Doctrine_Query::create()\n ->select(\"uo.orgid, u.ID, u.nome,u.cognome,u.user,u.active,u.data_iscrizione,r.role\")\n ->from(\"Users u\")\n ->leftJoin(\"u.Role r\")\n ->leftJoin(\"u.UsersOrganizations uo\")\n ->where(\"uo.orgid=\".$r->getParam('orgid'))\n ->addWhere(\"uo.active=\".Constants::UTENTE_ATTIVO);\n list($users,$total)=DBUtils::pageQuery($query,array(),$this->getLimit(),$this->getOffset());\n $this->emitTableResult($users,$total);\n }", "public function getAllMobile(){\n\t\treturn $this->mobiles;\n\t}", "function modele_get_liste_user() {\n\n\t\t$req = 'SELECT * FROM p_user ';\n\n\t\t$reqPrep = self::$connexion->prepare($req);\n\n\t\t$reqPrep->execute();\n\n\t\t$enregistrement = $reqPrep->fetchall(PDO::FETCH_ASSOC);\n\n\t\treturn $enregistrement;\n\t}", "public static function getlist(){\n $sql = new Sql();\n \n return $sql->select(\"SELECT * FROM tb_usuarios ORDER BY deslogin\");\n }", "public function listadoUnidadmedida(){\n \n\t\t$data= $this->Model_maestras->BuscarUmedida();\n\t\n\t\techo($data); \n\t \n\n\t}", "public function all_londontec_users(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/viewusers';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'londontec LMS users lists',\n\t\t\t'userslist' => $this->setting_model->Get_All('londontec_users'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\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 }", "public function getUsersList()\n {\n }", "function mentors(){\n $uid = $this->session->userdata('user_id');\n // Login verification and user stats update\n if ($this->socialkit->SK_isLogged()) {\n $data['title'] = 'List of Mentors';\n $data['mentorSuggestions'] = $this->model_user->getUserMentorshipSuggestions($uid);\n $this->load->view('user/mentors', $data);\n } else {\n redirect(base_url('login').'?url='.base64_encode(uri_string()));\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 listeuserAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $users = $em->getRepository('FrontBundle:user')->findAll();\n\n return $this->render('FrontBundle::Admin/listeutilisateur.html.twig', array(\n 'users' => $users,\n ));\n }", "function listerUtilisateur()\n\t{\n\t\t$req=\"select idUti, nomUti, prenomUti, photoUti, telPorUti, mailUti, statutUti from utilisateur\";\n\t\t$exereq = mysql_query($req) or die(mysql_error());\n\t\n\t\twhile($ligne=mysql_fetch_array($exereq))\n\t\t{\n\t\t\t$tab[]=$ligne;\n\t\t}\n\n\t\treturn $tab;\n\t}", "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 user_list()\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$this->load->model('User_Profiles', 'up');\n\t\t\t$data['users'] = $this->up->get_all_users();\n\t\t\t$this->load->view('user_list-admin',$data);\n\t\t}", "public function userlistAction()\n\t{\n\t\t$users = $this->userService->getUserList(array(), false);\n\n\t\t$this->view->roles = za()->getUser()->getAvailableRoles();\n\t\t$this->view->users = $users;\n\t\t$this->renderView('admin/user-list.php');\n\t}", "public function action_listar() {\r\n $auth = Auth::instance();\r\n if ($auth->logged_in()) {\r\n $oNuri = New Model_Asignados();\r\n $count = $oNuri->count($auth->get_user());\r\n //$count2= $oNuri->count2($auth->get_user()); \r\n if ($count) {\r\n // echo $oNuri->count2($auth->get_user());\r\n $pagination = Pagination::factory(array(\r\n 'total_items' => $count,\r\n 'current_page' => array('source' => 'query_string', 'key' => 'page'),\r\n 'items_per_page' => 40,\r\n 'view' => 'pagination/floating',\r\n ));\r\n $result = $oNuri->nuris($auth->get_user(), $pagination->offset, $pagination->items_per_page);\r\n $page_links = $pagination->render();\r\n $this->template->title = 'Hojas de Seguimiento';\r\n $this->template->styles = array('media/css/tablas.css' => 'screen');\r\n $this->template->content = View::factory('nur/listar')\r\n ->bind('result', $result)\r\n ->bind('page_links', $page_links);\r\n } else {\r\n $this->template->content = View::factory('errors/general');\r\n }\r\n } else {\r\n $this->request->redirect('login');\r\n }\r\n }", "public function user_lists(){\n return get_instance()->ecl('Instance')->mod('lists', 'user_lists', [get_instance()->ecl('Instance')->user(),'email']);\n }", "public function userlist()\n {\n $users = array('users' => UserModel::getPublicProfilesOfAllUsers(),'dynatable'=>'userlist');\n $this->View->render('user/userlist',$users);\n }", "public static function getList(){\n\t\t\t$sql = new sql();\n\n\t\t\treturn $sql->select(\"SELECT * FROM tb_usuarios ORDER BY deslogim\");\n\t\t}", "public function getPartinUsersList(){\n return $this->_get(2);\n }", "public function adminMessageList()\n {\n\n $users=[];\n $em = $this->getDoctrine()->getManager();\n $messageRepository = $em->getRepository(Message::class);\n $userRepository = $em->getRepository(User::class);\n\n $Ids = $messageRepository->findByDistinct();\n foreach ($Ids as $id)\n {\n $users[] = $userRepository->findOneBy(array('id'=>$id));\n }\n return $this->render(\"admin/message/list.html.twig\",\n array(\n 'users' => $users,\n ));\n }", "function get_user_list(){\n\t\treturn array();\n\t}", "public function userList(){\n $this->db->select(\"ui.user_id,\n CONCAT(ui.lname, ', ' ,ui.fname, ' ', ui.mname) name, u.user_type,\n ui.fname f_name,ui.lname l_name, ui.mname m_name , ui.email, \n u.username, u.password, uat.article_type_id, at.type article_type\n \")\n ->from(\"tbl_user_info ui\")\n ->join(\"tbl_user u\",\"ON u.id = ui.user_id\",\"inner\")\n ->join(\"tbl_user_article_type uat\",\"ON uat.user_id = ui.user_id\",\"left\")\n ->join(\"tbl_article_type at\",\"ON at.id = uat.article_type_id\",\"left\");\n $this->db->where(\"u.status\", \"saved\");\n $this->db->order_by(\"ui.lname\");\n $query = $this->db->get();\n \n foreach($query->result() as $each){\n $each->password = $this->encryptpass->pass_crypt($each->password, 'd');\n }\n\n return $query->result();\n }", "function listUsers()\n{\n require_once($_SERVER[\"DOCUMENT_ROOT\"].\"/config/config.php\");\n require_once($_SERVER[\"DOCUMENT_ROOT\"].\"/class/autoload.php\");\n require_once($_SERVER[\"DOCUMENT_ROOT\"].\"/vendor/autoload.php\");\n $db = new cMariaDb($Cfg);\n\n // Generateur de templates\n $tpl = new Smarty();\n $tpl->template_dir = $_SERVER[\"DOCUMENT_ROOT\"].\"/tools/templates\";\n $tpl->compile_dir = $_SERVER[\"DOCUMENT_ROOT\"].\"/templates_c\";\n\n $sSQL = \"SELECT id, sNom, sPrenom, sEmail, sTelMobile, sLogin FROM sys_user WHERE bActive=1 ORDER BY sNom, sPrenom;\";\n\n // Récupérer les éléments \n $tpl->assign(\"Users\",$db->getAllFetch($sSQL));\n $sHtml = $tpl->fetch(\"editUsers.smarty\");\n return [\"Errno\" => 0, \"html\" => $sHtml ];\n}", "public function GetAllUnite() {\n if ($this->get_request_method() != \"GET\") {\n $this->response('', 406);\n }\n\n $sql = $this->db->prepare(\"SELECT * FROM unite\");\n $sql->execute();\n if ($sql->rowCount() > 0) {\n $result = array();\n while ($rlt = $sql->fetchAll()) {\n $result[] = $rlt;\n }\n // If success everythig is good send header as \"OK\" and return list of users in JSON format\n $this->response($this->json($result[0]), 200);\n }\n $this->response('', 204); // If no records \"No Content\" status\n }", "public function display_all_supervisor()\n {\n \n if ( ! file_exists(APPPATH.'views/pages/list.php'))\n {\n // Whoops, we don't have a page for that!\n show_404();\n }\n if (!isset($this->session->userdata['user_role']) || $this->session->userdata['user_role'] < 50)\n {\n $this->session->set_flashdata('message', 'Vous devez avoir les droits d\\'administrateur');\n redirect($_SERVER['HTTP_REFERER']); \n } \n \n $data['title'] = 'Liste des superviseurs'; // Capitalize the first letter\n $data['membres'] = $this->member_model->get_by_type('name = \"Superviseur\"');\n \n // breadcrumb\n $data['breadcrumbs'] = $this->breadcrumbs('liste');\n \n $this->load->template('pages/list_members',$data);\n }", "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 }", "public function getList(){\n if ($this->request->isAJAX()) {\n $M_User = new M_User();\n $data = array();\n $data['data'] = $M_User->getAll(TRUE);\n }\n else {\n $data['status'] = \"Forbidden access : Not an AJAX request\";\n }\n return json_encode($data);\n }", "protected function getUserList() {\n\t$controller = new ChatMySQLDAO();\n\tif(!isset($_SESSION['username'])) {\n\t return;\n\t}\n\t$users = $controller->getUserList($_SESSION['username']);\n\t$data = array();\n\t$i = 0;\n\tforeach ($users as $user) {\n\t $data[$i++] = $user['user_name'];\n\t}\n\treturn $data;\n }", "public function index()\n {\n $this->user_list();\n }", "public function admin_user_list() {\n $this->paginate = array(\n 'limit' => 10,\n 'order' => array('User.created' => 'desc' ),\n 'conditions' => array('User.status' => 1),\n );\n $data = $this->paginate('User');\n $this->set('user', $data);\n $this->render('/Users/user_list');\n }", "public function mlist()\n\t{\n\t\t// init params\n $params = array();\n $limit_per_page = 10;\n $page = ($this->uri->segment(4)) ? ($this->uri->segment(4) - 1) : 0;\n $total_records = $this->Mentor_model->get_mentor_total();\n if ($total_records > 0)\n {\n // get current page records\n $params[\"results\"] = $this->Mentor_model->get_mentor_page_records($limit_per_page, $page*$limit_per_page);\n $config['base_url'] = base_url() . 'admin/mentor/mlist';\n $config['total_rows'] = $total_records;\n $config['per_page'] = $limit_per_page;\n $config[\"uri_segment\"] = 4;\n // custom paging configuration\n $config['num_links'] = 2;\n $config['use_page_numbers'] = TRUE;\n $config['reuse_query_string'] = TRUE;\n \n $config['full_tag_open'] = '<div class=\"pagination\">';\n $config['full_tag_close'] = '</div>';\n \n $this->pagination->initialize($config);\n \n // build paging links\n $params[\"links\"] = $this->pagination->create_links();\n }\n\t\t$this->template->load('admin/layout/admin_tpl','admin/mentor/list',$params);\n\t}", "public function index()\n {\n $users = (new User)->findAll();\n $title = 'Liste des membres';\n\n $data = compact('title', 'users');\n\n return $this->view('user/list', $data);\n\t}", "function AllMembres(){\n return $this->db->get($this->membre)->result();\n }", "public function index()\n {\n $lists=UserModel::find(\\Auth::user()->id)->lists()->paginate(5);//постраничный вывод paginate\n return view('lists.index',['lists'=>$lists]);\n //return view('lists.index',['lists'=>ListModel::all()]);//передаем все листы\n }", "public function listUser() {\n\t\t$users = new Model_Users();\n\t\t$listeUsers = $users->listUsers();\n\t\trequire_once($_SERVER['DOCUMENT_ROOT'].\"/ecommerce/views/admin/users/liste_users.php\");\n\t}", "public function usersListAction()\n\t{\n\t\t$em = $this->getDoctrine()->getEntityManager();\n\n\t\t$users = $em->getRepository('McmsUserBundle:User')->findAll();\n\n\t\treturn array('users' => $users);\n\t}", "public function getList(){\n\t\t$model=new Model();\n\t\treturn $model->select(\"SELECT * FROM tb_usuarios ORDER BY idusuario\");\n\t}", "function user_index()\n\t{\n\t\t$contact = $this->contact_details();\n\t\t$credentials = $this->MailchimpCredential->first();\n\t\tif(!empty($credentials))\n\t\t{\n\t\t\t# Copy access_token\n\t\t\t# GET LIST FROM MAILCHIMP\n\t\t\t$lists = $this->Mailchimp->get(\"lists\");\n\n\t\t\t# ALWAYS MAKE SURE WE HAVE CORE LISTS\n\t\t\t$listNames = Set::extract($lists['lists'], \"{n}.name\");\n\n\n\t\t\t$missingListNames = array_diff($this->listNames,$listNames);\n\n\t\t\t# Create initial list.\n\t\t\tif(!empty($missingListNames))\n\t\t\t{\n\t\t\t\tforeach($missingListNames as $listName)\n\t\t\t\t{\n\t\t\t\t\t# Make 'Subscribers' default list (ie for subscribe form on homepage)\n\t\t\t\t\t$this->Mailchimp->create_list($listName,$contact);\n\n\t\t\t\t}\n\n\t\t\t\t$lists = $this->Mailchimp->get(\"lists\");\n\t\t\t}\n\n\t\t\t$subscribers = $list_names = array();\n\n\t\t\tforeach($lists['lists'] as $l)\n\t\t\t{\n\t\t\t\t$lid = $l['id'];\n\t\t\t\t$lname = $l['name'];\n\t\t\t\t#echo \"LID=$lid, LNAME=$lname\\n\";\n\t\t\t\t$list_names[$lid] = $lname;\n\t\t\t\t$list_totals[$lid] = $l['stats']['member_count'];\n\t\t\t\t$subscribers[$lid] = $this->Mailchimp->members($lid);\n\t\t\t}\n\n\t\t\t$this->set(\"lists\", $subscribers);\n\t\t\t$this->set(\"list_names\", $list_names);\n\t\t\t$this->set(\"list_totals\", $list_totals);\n\t\t}\n\t}", "public function getUsers()\n {\n $request = \"SELECT user.*, rank.name as rank_name FROM `user` join rank on user.rank = rank.id order by rank.id\";\n $request = $this->connexion->query($request);\n $newsList = $request->fetchAll(PDO::FETCH_ASSOC);\n // var_dump($newsList);\n return $newsList;\n }", "public function type_movie_list() {\n\n // Capa de Modelo, carga la data \n $data[\"types_movie\"] = $this->Type_movie->findAll();\n\n // Capa de la Vista\n $view['body'] = $this->load->view(\"core/types_movie/list\", $data, TRUE);\n $view['title'] = \"Listado de tipos de películas\";\n $this->parser->parse('core/templates/body', $view);\n }", "public function mooduplistAction()\n {\n $uid = $this->_USER_ID;\n $floorId = $this->getParam('CF_floorId');\n $storeType = $this->getParam(\"CF_storeType\");\n //chairId,oidMood from giveservice page\n $chairId = $this->getParam(\"CF_chairid\");\n $oldMood = $this->getParam(\"CF_oldMood\");\n\n $mbllApi = new Mbll_Tower_ServiceApi($uid);\n $aryRst = $mbllApi->getMoodUpList($floorId);\n $moodUpList = $aryRst['result'];\n\n if (!$aryRst) {\n $errParam = '-1';\n if (!empty($aryRst['errno'])) {\n $errParam = $aryRst['errno'];\n }\n return $this->_redirectErrorMsg($errParam);\n }\n\n\n if (!isset($moodUpList[22])) {\n $moodUpList[22]['id'] = 22;\n $moodUpList[22]['nm'] = 0;\n }\n if (!isset($moodUpList[23])) {\n $moodUpList[23]['id'] = 23;\n $moodUpList[23]['nm'] = 0;\n }\n if (!isset($moodUpList[24])) {\n $moodUpList[24]['id'] = 24;\n $moodUpList[24]['nm'] = 0;\n }\n\n if (!empty($moodUpList)) {\n foreach ($moodUpList as $key => $value) {\n $item = Mbll_Tower_ItemTpl::getItemDescription($value['id']);\n $moodUpList[$key]['name'] = $item['name'];\n $moodUpList[$key]['des'] = $item['desc'];\n\n if ($item['buy_mb'] > 0) {\n $moodUpList[$key]['money_type'] = 'm';\n }\n else if ($item['buy_gb'] > 0) {\n $moodUpList[$key]['money_type'] = 'g';\n }\n }\n }\n $this->view->moodUpList = $moodUpList;\n $this->view->floorId = $floorId;\n $this->view->chairId = $chairId;\n $this->view->storeType = $storeType;\n $this->view->oldMood = $oldMood;\n $this->render();\n }", "public function getList($user);", "public function userlist()\n {\n $filter = Param::get('filter');\n\n $current_page = max(Param::get('page'), SimplePagination::MIN_PAGE_NUM);\n $pagination = new SimplePagination($current_page, MAX_ITEM_DISPLAY);\n $users = User::filter($filter);\n $other_users = array_slice($users, $pagination->start_index + SimplePagination::MIN_PAGE_NUM);\n $pagination->checkLastPage($other_users);\n $page_links = createPageLinks(count($users), $current_page, $pagination->count, 'filter=' . $filter);\n $users = array_slice($users, $pagination->start_index -1, $pagination->count);\n \n $this->set(get_defined_vars());\n }", "public function 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 userList() {\n /** @var User[] $users */\n $users = $this->entityManager->getRepository(\"Entity\\\\User\")->findAll(); // Retrieve all User objects registered in database\n echo $this->twig->render('admin/lists/users.html.twig', ['users' => $users]);\n }", "function ulist_op()\n\t{\n\t\t$club_id = 0;\n\t\tif (isset($_REQUEST['club_id']))\n\t\t{\n\t\t\t$club_id = (int)$_REQUEST['club_id'];\n\t\t}\n\t\t\n\t\t$num = 0;\n\t\tif (isset($_REQUEST['num']))\n\t\t{\n\t\t\t$num = (int)$_REQUEST['num'];\n\t\t}\n\t\t\n\t\t$name = '';\n\t\tif (isset($_REQUEST['name']))\n\t\t{\n\t\t\t$name = $_REQUEST['name'];\n\t\t}\n\t\t\n\t\tarray();\n\t\tif (!empty($name))\n\t\t{\n\t\t\t$name_wildcard = '%' . $name . '%';\n\t\t\t$query = new DbQuery(\n\t\t\t\t'SELECT u.id, u.name as _name, NULL, u.flags, c.name FROM users u' .\n\t\t\t\t\t' LEFT OUTER JOIN clubs c ON c.id = u.club_id' .\n\t\t\t\t\t' WHERE (u.name LIKE ? OR u.email LIKE ?) AND (u.flags & ' . USER_FLAG_BANNED . ') = 0' .\n\t\t\t\t\t' UNION' .\n\t\t\t\t\t' SELECT DISTINCT u.id, u.name as _name, r.nick_name, u.flags, c.name FROM users u' .\n\t\t\t\t\t' LEFT OUTER JOIN clubs c ON c.id = u.club_id' .\n\t\t\t\t\t' JOIN registrations r ON r.user_id = u.id' .\n\t\t\t\t\t' WHERE r.nick_name <> u.name AND (u.flags & ' . USER_FLAG_BANNED . ') = 0 AND r.nick_name LIKE ? ORDER BY _name',\n\t\t\t\t$name_wildcard,\n\t\t\t\t$name_wildcard,\n\t\t\t\t$name_wildcard);\n\t\t}\n\t\telse if ($club_id > 0)\n\t\t{\n\t\t\t$query = new DbQuery('SELECT u.id, u.name, NULL, u.flags, c.name FROM users u JOIN user_clubs uc ON u.id = uc.user_id LEFT OUTER JOIN clubs c ON c.id = u.club_id WHERE uc.club_id = ? AND (uc.flags & ' . USER_CLUB_FLAG_BANNED . ') = 0 AND (u.flags & ' . USER_FLAG_BANNED . ') = 0 ORDER BY rating DESC', $club_id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = new DbQuery('SELECT u.id, u.name, NULL, u.flags, c.name FROM users u LEFT OUTER JOIN clubs c ON c.id = u.club_id WHERE (u.flags & ' . USER_FLAG_BANNED . ') = 0 ORDER BY rating DESC');\n\t\t}\n\t\t\n\t\tif ($num > 0)\n\t\t{\n\t\t\t$query->add(' LIMIT ' . $num);\n\t\t}\n\t\t\n\t\t$list = array();\n\t\twhile ($row = $query->next())\n\t\t{\n\t\t\tlist ($u_id, $u_name, $nick, $u_flags, $club_name) = $row;\n\t\t\t$p = new GPlayer($u_id, $u_name, $club_name, $u_flags, USER_CLUB_PERM_PLAYER);\n\t\t\tif ($nick != NULL && $nick != $u_name)\n\t\t\t{\n\t\t\t\t$p->nicks[$nick] = 1; \n\t\t\t}\n\t\t\t$list[] = $p;\n\t\t}\n\t\t$this->response['list'] = $list;\n\t}", "public function membresAction()\n {\n // Les modèles\n $model_types = new Model_DbTable_Type();\n $model_membres = new Model_DbTable_CommissionMembre();\n\n // On récupère les règles de la commission\n $this->view->array_membres = $model_membres->get($this->_request->id_commission);\n\n // On met le libellé du type dans le tableau des activités\n $types = $model_types->fetchAll()->toArray();\n $types_sort = [];\n\n foreach ($types as $_type) {\n $types_sort[$_type['ID_TYPE']] = $_type;\n }\n\n foreach ($this->view->array_membres as &$membre) {\n $type_sort = [];\n\n foreach ($membre['types'] as $type) {\n if (!array_key_exists($types_sort[$type['ID_TYPE']]['LIBELLE_TYPE'], $type_sort)) {\n $type_sort[$types_sort[$type['ID_TYPE']]['LIBELLE_TYPE']] = [];\n }\n\n $type_sort[$types_sort[$type['ID_TYPE']]['LIBELLE_TYPE']][] = $type;\n }\n\n $membre['types'] = $type_sort;\n }\n }", "public function index()\n {\n $this->data['immobilisations'] = Immobli::latest()\n ->crossJoin('departements')\n ->crossJoin('categories')->crossJoin('users')\n ->select([\n \"immoblis.*\",\n \"categories.designation as category\",\n \"departements.designation as departement\",\n \"users.prenom as prenom\",\n\n ])\n ->get();\n $this->data['immobilisations'] = collect($this->data['immobilisations'])->keyBy('id');\n $ctgs = array();\n foreach ($this->data['immobilisations'] as $key => $values) :\n $ctgs[$values->codeAbar][] = $values->category;\n endforeach;\n $this->data['immobilisations'] = collect($this->data['immobilisations'])->keyBy('codeAbar');\n foreach ($this->data['immobilisations'] as $key => $values) :\n $values->category = implode(',', $ctgs[$key]);\n endforeach;\n $pageSize = 10;\n $this->data['immobilisations'] = $this->PaginationHelper($this->data['immobilisations'], $pageSize);\n\n return view('immobilisations.index', $this->data);\n }", "public function members_list() {\n\t\tif (!in_array($this->type, $this->membership_types)) {\n\t\t\tredirect(base_url('members/list/active'));\n\t\t}\n\n\t\t$data['type'] = ($this->type === NULL)? 'active': $this->type;\n\t\t$data['user_mode'] = $this->session->userdata('mode');\n\t\t$data['members'] = $this->get_members($this->type);\n\t\t$data['api_ver_url'] = FINGERPRINT_API_URL . \"?action=verification&member_id=\";\n\t\t$data['total_count'] = count($this->get_members($this->type));\n\n\t\t$this->breadcrumbs->set([ucfirst($data['type']) => 'members/list/' . $data['type']]);\n\n\t\tif ($this->type === 'guest') {\n\t\t\t$data['guests'] = $this->get_guests();\n\t\t}\n\n\t\t$this->render('list', $data);\n\t}", "public function listAction()\n {\t\n\t\t$this->createActivity(\"Admin\",\"List view\");\n $em = $this->getDoctrine()->getManager();\n\t\t$oEmTeacher=$em->getRepository('BoAdminBundle:Admin');\n $admin = $oEmTeacher->getTeacherList(\"Teacher\");\n\t\t$nb_tc = count($admin);\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null) $page=1;\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$admin = $oEmTeacher->getTeacherList(\"Teacher\",$offset,$nb_cpp);\n return $this->render('admin/index.html.twig', array(\n 'admin' => $admin,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\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'=>\"personnel\",\n\t\t\t'sm'=>\"admin\",\n ));\n }", "public function movie_list() {\n $data[\"movies\"] = $this->Movie->findAll();\n\n // Capa de la Vista\n $view['body'] = $this->load->view(\"core/movies/list\", $data, TRUE);\n $view['title'] = \"Listado de películas\";\n $this->parser->parse('core/templates/body', $view);\n }", "function mentees(){\n $uid = $this->session->userdata('user_id');\n if ($this->socialkit->SK_isLogged()) {\n $data['title'] = 'List of Mentees';\n $this->load->view('user/mentees', $data);\n \n } else {\n redirect(base_url('login').'?url='.base64_encode(uri_string()));\n }\n }", "public function display_all_client()\n {\n \n if ( ! file_exists(APPPATH.'views/pages/list.php'))\n {\n // Whoops, we don't have a page for that!\n show_404();\n }\n if (!isset($this->session->userdata['user_role']) || $this->session->userdata['user_role'] < 30)\n {\n $this->session->set_flashdata('message', 'Vous devez avoir les droits de superviseur');\n redirect($_SERVER['HTTP_REFERER']); \n } \n \n $data['title'] = 'Liste des Clients'; \n $data['membres'] = $this->member_model->get_by_type('name = \"Client\"'); \n \n // breadcrumb\n $data['breadcrumbs'] = $this->breadcrumbs('liste');\n \n $this->load->template('pages/list_members',$data);\n }", "private function getUserList()\n {\n $users = User::getUsers();\n $users = ArrayHelper::map($users, 'id', 'username');\n \n return $users;\n }", "public function getList(){\n\t\t$resultsUsers = [];\n\t\t$q = $this->pdo->query('SELECT * FROM utilisateur');\n\t\twhile ($donnee = $q->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$resultsUsers[] = new Utilisateur($donnee);\n\t\t}\n\t\treturn $resultsUsers;\n\t}", "public function getAvatarList(){\n return $this->_get(5);\n }", "function retourneListeUtilisateur(){\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\");\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}", "public function index()\n {\n $this->userlist();\n }", "function liste_utilisateur(){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT id_utilisateur, pseudo FROM utilisateur WHERE status_utilisateur = ? AND fqdn_blog NOT LIKE 'supprimer'\");\n\t\t$req->execute(array(0));\n\t\t$result = $req->fetchAll();\n\t\t\n\t\t$req->closeCursor();\n\t\treturn $result;\n\t}", "public function getList($u_id){\n\t\t$this->db->select('*');\n\t\t$this->db->from('medicines');\n\t\t$this->db->join('lists','medicines.id = lists.m_id');\n\t\t$this->db->where('lists.u_id',$u_id);\n\t\treturn $this->db->get()->result_array();\n\t}", "public function getAutoposList(){\n return $this->_get(2);\n }", "function ListaUsuarios() {\n\t//obtiene el id del usuario\n $sql = \"SELECT usuario.id, usuario.nombre_usuario, persona.primer_nombre, persona.primer_apellido, usuario.estado, rol.descripcion FROM usuario INNER JOIN persona ON usuario.persona_id = persona.id INNER JOIN rol ON usuario.rol_id = rol.id WHERE usuario.estado = 'ACTIVO'\";\n\n\t$db = new conexion();\n\t$result = $db->consulta($sql);\n\t$num = $db->encontradas($result);\n\n\t$respuesta->datos = [];\n\t$respuesta->mensaje = \"\";\n\t$respuesta->codigo = \"\";\n\n\tif ($num != 0) {\n\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t}\n\t\t$respuesta->mensaje = \"Usuarios listados\";\n\t\t$respuesta->codigo = 1;\n\t} else {\n\t\t$respuesta->mensaje = \"No existen registros de usuarios !\";\n\t\t$respuesta->codigo = 0;\n\t}\n\treturn json_encode($respuesta);\n}", "public function listar(){\r\n }", "public function getUserList($type = 'all'): void{\n\n if(Session::isLogin()){\n\n if($type === 'anime'){\n $userList = UserList::where('user_list.user_id', Session::getUser()['id'])->where('type', 'Anime')->getAll();\n }else if($type === 'manga'){\n $userList = UserList::where('user_list.user_id', Session::getUser()['id'])->where('type', 'Manga')->getAll();\n }else{\n $userList = UserList::where('user_list.user_id', Session::getUser()['id'])->getAll();\n }\n \n if(isset($_GET['id'])){\n foreach($userList as $artwork){\n if($artwork->id === $_GET['id']){\n echo json_encode($userList);\n exit;\n }\n }\n }\n }\n \n if(!empty($userList))\n echo json_encode($userList);\n else\n echo json_encode([]);\n }", "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 listado_membresia(){\n $listado = [];\n $resultados = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array('eliminado'=>false,'status'=>true,\"cancelado\"=>false))->get(\"membresia\");\n foreach ($resultados as $clave => $valor) {\n if($valor[\"tipo_persona\"]==\"fisica\"){\n //---\n $valores = $valor;\n $valores[\"id_membresia\"] = (string)$valor[\"_id\"]->{'$id'};\n #Consulto datos personales\n $rfc = $valor[\"identificador_prospecto_cliente\"];\n $res_dt = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array('eliminado'=>false,\"rfc_datos_personales\"=>$rfc))->get(\"datos_personales\");\n $nombre_datos_personales = $res_dt[0][\"nombre_datos_personales\"];\n\n if(isset($res_dt[0][\"apellido_p_datos_personales\"])){\n $nombre_datos_personales.=\" \".$res_dt[0][\"apellido_p_datos_personales\"];\n }\n\n if(isset($res_dt[0][\"apellido_m_datos_personales\"])){\n $nombre_datos_personales.=\" \".$res_dt[0][\"apellido_m_datos_personales\"];\n }\n\n $valores[\"nombre_datos_personales\"] = $rfc.\"-\".$nombre_datos_personales.\"(\".$valores[\"serial_acceso\"].\")\";\n //---\n //Consultando al cliente pagador para obtener su imagen\n $valores[\"id_datos_personales\"] = (string)$res_dt[0][\"_id\"]->{'$id'};\n $res_cliente_pagador = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array('eliminado'=>false,'id_datos_personales'=>$valores[\"id_datos_personales\"]))->get($this->tabla_clientePagador);\n #Obtengo la imagen del cliente \n (isset($res_cliente_pagador[0][\"imagenCliente\"]))? $valores[\"imagenCliente\"] = $res_cliente_pagador[0][\"imagenCliente\"]:$valores[\"imagenCliente\"] = \"default-img.png\";\n //---\n //---\n $listado[] = $valores;\n }\n }\n return $listado;\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 listarParaUnirP() {\n\t\t//de sesion, falta cambiar\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\", \"listarParaPincho\");\n\t\t//falta cambiar\n\t}", "function listadeTodosLiderDao(){\r\n require_once (\"../conexao.php\");\r\n require_once (\"../modelo/objetoMembro.php\");\r\n \r\n $objDao = Connection::getInstance();\r\n \r\n $resultado = mysql_query(\"Select Matricula,Nome from membros where LiderCelula = 'S' order by Nome\") or die (\"Nao foi possivel realizar a busca\".mysql_error());\r\n $listaMembro = array();\r\n \r\n $i=0;\r\n \r\n \r\n while ($registro = mysql_fetch_assoc($resultado)){\r\n \r\n if($registro[\"Nome\"] != \"\"){\r\n \r\n\t $membro = new objetoMembro();\r\n \r\n $membro->setMatricula($registro['Matricula']);\r\n $membro->setNome($registro['Nome']);\r\n \r\n\t $listaMembro[$i] = $membro;\r\n\t}\r\n $i++;\r\n }\r\n\t\treturn $listaMembro;\r\n\t\tmysql_free_result($resultado);\r\n $objDao->freebanco();\r\n }", "function my_list()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['list'] = $this->_bid->my_list();\n\t\t\n\t\t$this->load->view('bids/my_list', $data);\n\t}", "public function get_list_user()\n {\n $this->db->where('type', 0);\n $query = $this->db->get('user');\n return $query->result();\n }", "public function getUserList() {\n $where = [];\n $this->usersModel->setTableName(\"cvd_users\");\n\n $role_name = $this->request->input(\"role_name\");\n if ($role_name) {\n $where[] = [\"roles.role_name\", \"=\", $role_name];\n }\n\n $user_id = $this->request->input(\"user_id\");\n if ($user_id) {\n $where[] = [\"users.user_id\", \"=\", $user_id];\n }\n $orderBy = \"users.user_id\";\n $this->usersModel->setWhere($where);\n $users = $this->usersModel->getUsers($orderBy);\n\n return $users;\n }", "public function mobiteli()\n {\n return $this->belongsToMany('App\\Mobitel', 'mobitel_trgovina'); //m:n\n }" ]
[ "0.8546509", "0.6760778", "0.66017264", "0.64315945", "0.63633835", "0.6343412", "0.6278696", "0.62405926", "0.62229973", "0.620715", "0.61971295", "0.61780566", "0.616878", "0.6152387", "0.6104882", "0.61015016", "0.6100804", "0.608719", "0.60731655", "0.6067534", "0.60223126", "0.6020592", "0.60121304", "0.5998952", "0.59579444", "0.5919842", "0.5899501", "0.5893768", "0.5892878", "0.5886834", "0.58610755", "0.58464897", "0.5844185", "0.58403987", "0.5835264", "0.583506", "0.581616", "0.58061296", "0.5805462", "0.5797104", "0.5772679", "0.5764212", "0.5763823", "0.5753297", "0.57493144", "0.57477075", "0.5736915", "0.5730609", "0.5725875", "0.57012665", "0.5695982", "0.5690616", "0.5679494", "0.5676043", "0.56689656", "0.5665364", "0.56630564", "0.5658164", "0.5657966", "0.5653789", "0.5652949", "0.56458294", "0.564234", "0.5640418", "0.56393945", "0.5638668", "0.5624975", "0.56249654", "0.5621433", "0.56163055", "0.56140804", "0.5603639", "0.56019944", "0.55978346", "0.55793095", "0.55757296", "0.5569036", "0.5554083", "0.55501044", "0.55449784", "0.5542122", "0.5539782", "0.5539172", "0.55374527", "0.5535325", "0.55352515", "0.55299056", "0.55252373", "0.5516281", "0.5515581", "0.5509919", "0.5509518", "0.5508941", "0.55081826", "0.5504512", "0.5502852", "0.54995143", "0.54981536", "0.5497475", "0.5496215" ]
0.74364346
1
/ page mobilisateur/etatmobilisateur Etat une mobilisateur
public function etatmobilisateuradminAction() { $sessionutilisateur = new Zend_Session_Namespace('utilisateur'); //$this->_helper->layout->disableLayout(); $this->_helper->layout()->setLayout('layoutpublicesmcadmin'); if (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');} if($sessionutilisateur->confirmation != ""){$this->_redirect('/administration/confirmation');} $id = (int) $this->_request->getParam('id'); if (isset($id) && $id != 0) { $mobilisateur = new Application_Model_EuMobilisateur(); $mobilisateurM = new Application_Model_EuMobilisateurMapper(); $mobilisateurM->find($id, $mobilisateur); $mobilisateur->setEtat($this->_request->getParam('etat')); $mobilisateurM->update($mobilisateur); } $this->_redirect('/mobilisateur/listmobilisateuradmin'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function etatmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $mobilisateur = new Application_Model_EuMobilisateur();\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->find($id, $mobilisateur);\n \n $mobilisateur->setEtat($this->_request->getParam('etat'));\n $mobilisateurM->update($mobilisateur);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "public function listmobilisateurAction() {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $mobilisateur = new Application_Model_EuMobilisateurMapper();\n $this->view->entries = $mobilisateur->fetchAllByMembre($sessionmembre->code_membre);\n\n $this->view->tabletri = 1;\n }", "public function suppmobilisateurAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if ($id > 0) {\n\n $mobilisateurM = new Application_Model_EuMobilisateurMapper();\n $mobilisateurM->delete($id);\n }\n\n $this->_redirect('/mobilisateur/listmobilisateur');\n }", "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 mentees(){\n $uid = $this->session->userdata('user_id');\n if ($this->socialkit->SK_isLogged()) {\n $data['title'] = 'List of Mentees';\n $this->load->view('user/mentees', $data);\n \n } else {\n redirect(base_url('login').'?url='.base64_encode(uri_string()));\n }\n }", "public function pagelisteMembre(){\n \n $userModel = new User();\n $lisAllUser = $userModel->getAllUser(bdd::GetInstance());\n\n //Récupération du rôle du compte\n $role = UserController::roleNeed();\n $isConnected = 1;\n\n return $this->twig->render('Dashboard/listeMembre.html.twig',[\n 'allContact'=> $lisAllUser,\n 'role'=>$role,\n 'isConnected' => $isConnected\n ]);\n\n }", "function act_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 de la Unidad de Medida.\\\"); 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 userMobile()\n {\n $data = [\n 'title' => \"Pengguna Mobile | SIPENPAS\",\n 'menu_open' => \"Manajemen Pengguna\",\n 'menu_active' => \"Pengguna Mobile\",\n 'breadCrumb' => [\"Manajemen Pengguna\", \"Pengguna Mobile\"]\n ];\n\n return view('pages/manaj-user/mobile/main', $data);\n }", "public function AjaxTelevision() {\n\t\t\t$data = $this->Modelo->avisos();\n\t\t\t$pagina = (count($data) >= 1) ? array_chunk($data, 4) : array();\n\t\t\t\n\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t$plantilla->Parametro('cantidad', count($data));\n\t\t\t$plantilla->Parametro('paginas', count($pagina));\n\t\t\t$plantilla->Parametro('listado', $pagina);\n\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'AjaxTelevision.html')));\n\t\t}", "function mentors(){\n $uid = $this->session->userdata('user_id');\n // Login verification and user stats update\n if ($this->socialkit->SK_isLogged()) {\n $data['title'] = 'List of Mentors';\n $data['mentorSuggestions'] = $this->model_user->getUserMentorshipSuggestions($uid);\n $this->load->view('user/mentors', $data);\n } else {\n redirect(base_url('login').'?url='.base64_encode(uri_string()));\n }\n }", "function alta_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->fecha_alta=date(\"Y-m-d\");\n\t\t$u->estatus_general_id=1;\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\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 registrado los datos de la Unidad de Medida.\\\"); 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 mobiteli()\n {\n return $this->belongsToMany('App\\Mobitel', 'mobitel_trgovina'); //m:n\n }", "public function actionMultiregionalManajemenUser() {\n $model = $this->findModel(Yii::$app->user->identity->id);\n return $this->render('multiregional/multiregional-manajemen-user', [\n 'model' => $model,\n ]);\n }", "public function Television() {\n\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t$plantilla->Parametro('Titulo', 'Service-Co');\n\t\t\t$plantilla->Parametro('avisos', array_chunk($this->Modelo->avisos(), 4));\n\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'Television.html')));\n\t\t}", "function informationsUsersMdp($id_user){\n $informationsUserMdpEdition = new \\Project\\Models\\InformationsUsersManager();\n $informationsUsersMdpAdmin = $informationsUserMdpEdition->informationsUsersMdpEdition($id_user);\n\n require 'app/views/back/informationsUsersMdp.php';\n }", "public function usermobilebyLocationsAction() {\n $this->_helper->content->setEnabled();\n }", "public function showDetailMobi(Request $request){\n $mobi = Item::find($request->id);\n\n if ($mobi->clasificacion != 'Pc') {\n if ($mobi->user_id != 0 || $mobi->user_id != null) {\n $user_add_mobi = User::where('id',$mobi->user_id)->first();\n }else{\n $user_add_mobi = array(\n 'nombre' => 'Cristian',\n 'apellido' => 'Ruiz'\n );\n }\n if ($mobi->user_edit != 0 || $mobi->user_edit != null) {\n $user_edit_mobi = User::where('id',$mobi->user_edit)->first();\n }else{\n $user_edit_mobi = array(\n 'nombre' => 'Nadie',\n );\n }\n\n return response()->json(['mobi' => $mobi,'user_add' => $user_add_mobi,'user_edit' => $user_edit_mobi]);\n }else{\n $pc = Pc::where('item_id',$mobi->id)->first();\n\n if ($mobi->user_id != 0 || $mobi->user_id != null) {\n $user_add_mobi = User::where('id',$mobi->user_id)->first();\n }else{\n $user_add_mobi = array(\n 'nombre' => 'Cristian',\n 'apellido' => 'Ruiz'\n );\n }\n if ($mobi->user_edit != 0 || $mobi->user_edit != null) {\n $user_edit_mobi = User::where('id',$mobi->user_edit)->first();\n }else{\n $user_edit_mobi = array(\n 'nombre' => 'Nadie',\n );\n }\n\n return response()->json(['mobi' => $mobi,'pc' => $pc,'user_add' => $user_add_mobi,'user_edit' => $user_edit_mobi]);\n }\n }", "public function showSomeMonumentsMobileAction()\n {\n //la création de l'entité Manager par l'appel de doctrine (notre ORM)\n $em=$this->getDoctrine()->getManager();\n //la récupération de données avec Repository\n $tab=$em->getRepository(Monument::class)->findAll();\n $serializer = new Serializer([new ObjectNormalizer()]);\n $formatted = $serializer->normalize($tab);\n return new JsonResponse($formatted);\n }", "public function actionTemoignageAboutUs() {\n //for tour Type\n if(Yii::$app->request->isAjax){\n $page = Yii::$app->request->get('page');\n $testis = \\app\\modules\\whoarewe\\api\\Catalog::items([\n 'where' => [\n 'category_id' => 13\n ],\n 'pagination' => ['pageSize' => 5, 'pageSizeLimit' => [$page, $page + 1]]\n ]);\n return $this->renderPartial(IS_MOBILE ? '//page2016/mobile/confiance' : '//page2016/temoignage',[\n 'testis' => $testis,\n ]);\n }\n $type = Yii::$app->request->get('type');\n $filterType = [];\n if($type && $type != 'all')\n $filterType = ['tTourTypes' => $type];\n //for tour themes\n $theme = Yii::$app->request->get('theme');\n $filterTheme = [];\n if($theme && $theme != 'all')\n $filterTheme = ['tTourThemes' => $theme];\n //for country\n $country = Yii::$app->request->get('country');\n $filterCountry = [];\n if($country && $country != 'all'){\n if(strpos($country, '-') === false){\n $filterCountry = ['countries' => ['IN', [$country]]];\n }\n else{\n foreach (explode('-',$country) as $key => $value) {\n $filterCountry[] = $value;\n }\n $filterCountry = ['countries' => ['IN', $filterCountry]];\n }\n }\n \n $filter = [];\n $filter = $filter + $filterCountry + $filterTheme + $filterType;\n \n $theEntry = \\app\\modules\\whoarewe\\api\\Catalog::cat(URI);\n $this->entry = $theEntry;\n $this->getSeo($theEntry->model->seo);\n //get data category & items portrain\n $thePortrait = \\app\\modules\\whoarewe\\api\\Catalog::cat(12);\n $queryPort = clone $thePortrait;\n $queryFindLarge = clone $queryPort;\n $topPortrait = $queryFindLarge->items(['filters' => [\n 'islarge' => 'on'\n ]]);\n $topPortrait = $topPortrait[0];\n $portraits = $thePortrait->items([\n 'pagination'=>['pageSize' => 0],\n 'where' => ['!=','item_id', $topPortrait->model->item_id],\n 'orderBy' => ['on_top_flag' => SORT_ASC, 'on_top' => SORT_ASC]\n ]);\n $totalCountPort = count($queryPort->items(['pagination' => ['pageSize'=>0],\n 'where' => ['!=','item_id', $topPortrait->model->item_id]\n ]));\n \n $pagesPort = new Pagination([\n 'totalCount' => $totalCountPort,\n 'defaultPageSize' => 3\n ]);\n //get data category & items testi\n //process data testi\n $theTesti = \\app\\modules\\whoarewe\\api\\Catalog::cat(13);\n $totalCountTesti = count($theTesti->items(['pagination' => ['pageSize'=>0],\n 'filters' => $filter]));\n //$queryTesti = clone $theTesti;\n if(Yii::$app->request->get('see-more') != NULL){\n $pagesize = Yii::$app->request->get('see-more');\n }else{\n $pagesize = 5;\n }\n \n $testis = \\app\\modules\\whoarewe\\api\\Catalog::items([\n 'where' => [\n 'category_id' => 13\n ],\n 'pagination' => ['pageSize' => $pagesize],\n 'filters' => $filter\n ]);\n \n\n// $pageTesti = new Pagination([\n// 'totalCount' => $totalCountTesti,\n// 'defaultPageSize' => 5,\n// ]);\n// $this->pagination = $pageTesti->pageCount;\n return $this->render(IS_MOBILE ? '//page2016/mobile/confiance' : '//page2016/temoignage',[\n 'theEntry' => $theEntry,\n 'thePortrait' => $thePortrait,\n 'portraits' => $portraits,\n 'topPortrait' => $topPortrait,\n 'pagesPort' => $pagesPort,\n 'theTesti' => $theTesti,\n 'testis' => $testis,\n 'pagesize' => $pagesize,\n 'totalCountTesti' => $totalCountTesti,\n 'root' => $this->getRootAboutUs()\n ]);\n }", "public function invitMembre($slug)\n {\n if(isset($_SESSION['user']))\n {\n if($this->allowToTwo('Admin','Assoc',$slug)){\n\n $donnee = $this->listing('Assoc',$slug);\n\n if($_POST){\n $r_POST = $this->nettoyage($_POST);\n $error['mail'] = ValidationTools::emailValid($r_POST['mail']);\n\n $assocModel = new AssocModel;\n $nom_assoc = $assocModel->FindElementByElement('nom','slug',$slug);\n $id_assoc = $assocModel->FindElementByElement('id','slug',$slug);\n\n if(ValidationTools::IsValid($error)){\n if(!is_numeric($r_POST['mail'])){ //si c'est ce n'est pas id on verifie si eventuelemt il le mail\n //exist en base en base de donnee\n $UserModel = new UserModel;\n $contactModel = new ContactModel;\n\n if($UserModel->emailExists($r_POST['mail'])){ //si oui on recupere l'id\n $r_POST['mail'] = $UserModel->FindElementByElement('id','mail',$r_POST['mail']);\n $r_POST['destinataire_orga'] = 'users';\n $RolesModel = new RolesModel;\n $roleRetourner = $RolesModel->FindRole($id_assoc,$r_POST['mail']);\n\n if(!empty($roleRetourner)){\n\n $confirmation ='Cet utilisateur fait déjà partie de l\\'Association';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n\n }\n\n }else {\n $r_POST['destinataire_orga'] = 'public';\n $r_POST['destinataire_status'] = 'del';\n }\n\n $invitation = $contactModel->findInvitation($r_POST['mail'],$id_assoc);\n if(!empty($invitation)){\n $confirmation ='Une invitation a déjà été envoyée à cette personne';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n }\n\n if($contactModel->findDemande($r_POST['mail'],$id_assoc)){\n $confirmation ='Une demande pour rejoindre l\\'Association a déjà faite par ce membre, merci de consulter les messages reçus de l\\'Association pour pouvoir y répondre';\n\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n }\n }\n\n unset($r_POST['submit']);\n\n $r_POST['emeteur_pseudo'] = $nom_assoc;\n $r_POST['objet'] = 'Invitation a rejoindre '.$nom_assoc ;\n $r_POST['emeteur_mailOrId'] = $id_assoc;\n $r_POST['destinataire_mailOrId'] = $r_POST['mail'];\n $r_POST['emeteur_orga'] = 'assoc';\n $r_POST['date_envoi'] = date('Y-m-d H:i:s');\n $r_POST['status'] = 'non-lu';\n $ok = false;\n\n\n if(is_numeric($r_POST['mail'])){\n //on envoi en interne une invite\n\n unset($r_POST['mail']);\n\n $r_POST['contenu'] = 'Bonjour,<br/>\n Nous serions très heureux de pouvoir vous compter parmi nous et vous invitons donc à rejoindre notre Association ! Pour en savoir plus sur nos activités n\\'hésitez pas à visiter <a href=\"'.$this->generateUrl('racine_assoc',['orga'=>'assoc','slug'=>$slug],true).'\">notre page</a> !<br/>\n A bientôt !';\n\n if($contactModel->insert($r_POST,false)){\n $ok = true;\n }\n }else {\n unset($r_POST['mail']);\n\n\n $r_POST['contenu'] = 'Bonjour, <br/>\n Nous serions très heureux de pouvoir vous compter parmi nous ! Pour en savoir plus sur nos activités n\\'hésitez pas à visiter <a href=\"'.$this->generateUrl('racine_assoc',['orga'=>'assoc','slug'=>$slug],true).'\">notre page</a> !<br/>\n Cependant, vous devez au préalable être inscrit sur le site.<br/>\n <a href=\"'.$this->generateUrl('racine_inscriptForm',[],true).'\">Cliquez ici</a> pour vous inscrire et devenir aussitôt un de nos membres !<br/>\n A bientôt !';\n\n $contactModel = new ContactModel;\n $contactModel->insert($r_POST,false);\n $mail = new PHPMailer();\n $mail->CharSet = \"utf8\";\n //$mail->SMTPDebug = 3; // Enable verbose debug output\n $mail->isMail();\n $mail->setFrom('[email protected]', 'Mailer');\n $mail->addAddress($r_POST['destinataire_mailOrId'], '[email protected]');\n $mail->addReplyTo('no-reply@as-co-ma', 'Information');\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = $r_POST['objet'];\n $mail->Body = $r_POST['contenu'];\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n if($mail->send()) {\n $ok = true;\n }\n }\n if($ok){\n $confirmation = 'L\\'invitation a bien été envoyée';\n }else {\n $confirmation = 'L\\'invitation n\\'a pas pu être envoyée suite à un problème technique';\n }\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'confirmation'=>$confirmation]);\n }else {\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'error'=>$error]);\n }\n\n }else {\n\n $error['mail']= 'Merci de saisir un mail';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'error'=>$error]);\n\n }\n\n }\n }else{\n $this->redirectToRoute('racine_form');\n }\n }", "function opzioni_immobile($id_tipo_locazione=\"\", $id_imm=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$visualizza =\"<a href=\\\"immobile_show.php?id_imm=\".$id_imm.\"\\\"><img src=\\\"images/immobile_dati.gif\\\" title=\\\"Visualizza Dati Dell'immobile\\\"/></a>\";\n\t\n\t$str=\"\";\n\n\tswitch ($id_tipo_locazione) {\n\t\t\n\t\t\n\t\tcase 1: // venditore\n\t\t\t$richieste = \"<a href=\\\"richiesta_ricerca_trova.php?id_imm=\".$id_imm.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/immobile_vendo.gif\\\" title=\\\"Mostra Richieste Correlate all'immobile\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t\t$str.= $richieste;\n\t\t\n\t\t\tbreak;\n\t\t\n\t\tcase 2: // cerca affitto\n\t\t\t\n\t\t\t$richieste = \"<a href=\\\"richiesta_ricerca_trova.php?id_imm=\".$id_imm.\"\\\"><img class=\\\"cliente_opzioni\\\" src=\\\"images/immobile_affitti.gif\\\" title=\\\"Mostra tutti i clienti disposti predere in affitto l'immobile\\\"/></a>\";\n\t\t\t$str.= $visualizza;\n\t\t\t$str.= $richieste;\n\t\t\n\t\t\tbreak;\n\t\tcase null:\n\t\tdefault:\n\t\t\t\n\t\t\t$str.=\"Nessuna Opzione\";\n\t\t\tbreak;\n\t}\n\treturn $str;\n}", "public function listobjetuserAction()\n {\n $user = $this->getUser();\n\n $em = $this->getDoctrine()->getManager();\n\n $objets = $em->getRepository('AppBundle:Objet')->findBy(['user'=>$user], array('date' => 'desc'));\n $contacdejaenvoyer=$this->getDoctrine()->getManager()->getRepository('AppBundle:Contact')->findAll();\n\n\n return $this->render(':objet:listobjetutilisateur.html.twig', array(\n 'objets' => $objets,\n 'contactdejaenvoyer'=>$contacdejaenvoyer,\n 'user'=>$user,\n ));\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 cl_moblevantamentoedi() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamentoedi\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function mostrar_vista_respaldo(){\n // $reunionesM->setConnection('mysql2');\n //$reuniones = $reunionesM->get();\n $usrLog= Auth::user()->id_usuario;\n $usuarioM = new \\App\\usuario;\n $usuarioM->setConnection('mysql2');\n $usuarioL = $usuarioM->find($usrLog);\n if($usuarioL == NULL){\n return view('Paginas.respaldo',['reuniones'=> []]);\n }else{\n return view('Paginas.respaldo',['reuniones'=>$usuarioL->reuniones_historial()]);\n }\n\n //return $reuniones->minuta->id_minuta;\n // return view('Paginas.respaldo',['reuniones'=>$usuarioL->reuniones_historial()]);\n }", "public function getInformacionMujeres() {\n $arraymujeres = Mujer::all();\n \n if(Auth::check() ) {\n $usuario = Auth::user();\n } else {\n $usuario = \"anonimo\";\n }\n\n return view('imprimir.mujeres', compact(\"usuario\", \"arraymujeres\"));\n }", "public function membresAction()\n {\n // Les modèles\n $model_types = new Model_DbTable_Type();\n $model_membres = new Model_DbTable_CommissionMembre();\n\n // On récupère les règles de la commission\n $this->view->array_membres = $model_membres->get($this->_request->id_commission);\n\n // On met le libellé du type dans le tableau des activités\n $types = $model_types->fetchAll()->toArray();\n $types_sort = [];\n\n foreach ($types as $_type) {\n $types_sort[$_type['ID_TYPE']] = $_type;\n }\n\n foreach ($this->view->array_membres as &$membre) {\n $type_sort = [];\n\n foreach ($membre['types'] as $type) {\n if (!array_key_exists($types_sort[$type['ID_TYPE']]['LIBELLE_TYPE'], $type_sort)) {\n $type_sort[$types_sort[$type['ID_TYPE']]['LIBELLE_TYPE']] = [];\n }\n\n $type_sort[$types_sort[$type['ID_TYPE']]['LIBELLE_TYPE']][] = $type;\n }\n\n $membre['types'] = $type_sort;\n }\n }", "public function TresorieManager() {\n \n $em = $this->getDoctrine()->getManager();\n $entityManager=$em->getRepository('RuffeCardUserGestionBundle:User')->findClientNoPaiment(2);\n return $this->render ( \"RuffeCardTresorieBundle:Default:managerPaiement.html.twig\", array ('Manager'=>$entityManager));\n \n }", "public function getMobile();", "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 }", "public function membre(){\n\n\t\t$user_id = Input::get('user_id');\n\n\t\t$redirectTo = ( $user_id ? 'admin/users/'.$user_id : 'admin/adresses/'.Input::get('adresse_id') );\n\n if( $this->adresse->addMembre(Input::get('membre_id') , Input::get('adresse_id')) )\n {\n return Redirect::to($redirectTo)->with( array('status' => 'success' , 'message' => 'L\\'appartenance comme membre a été ajouté') );\n }\n\n return Redirect::to($redirectTo)->with( array('status' => 'danger' , 'message' => 'L\\'utilisateur à déjà l\\'appartenance comme membre') );\n\n\t}", "public function listMembres() {\n\t\t$membreManager = $this->membreManager;\n\t\t$membres = $membreManager->listMembres();\n\t\t$success = ( isset( $_SESSION['success'] ) ? $_SESSION['success'] : null );\n\t\t$error = ( isset( $_SESSION['error'] ) ? $_SESSION['error'] : null );\n\t\t$myView = new View( 'listmembres' );\n\t\t$myView->renderView( array( 'membres' => $membres, 'success' => $success, 'error' => $error ) );\n\t}", "public function utilisateurListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Utilisateur\");//type array\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 tomarTarea(){\n $id = $this->input->post('id');\n $rsp = $this->bpm->setUsuario($id, userId());\n $rsp['status'] ? $rsp['user_id'] = userId() : '';\n echo json_encode($rsp);\n }", "public function manage(){\n helper(['form','url']);\n return render(INTEGRATION_BASE_MODULE.\"\\Views\\Users\\V_UserManager\", [\n 'title' => 'Gestion des utilisateurs',\n 'script' => self::ENCRYPTION_URL\n ]);\n }", "public function themLoaiMon(){\n \treturn view(\"admin.loaimon.them\");\t\n }", "public function peticion(){\n\t\t//1' el nombre del nonce que creamos\n\t\t//2' par es el argumento de la consulta recibida desde la peticion de js con ajax\n\t\tcheck_ajax_referer('mp_seg', 'nonce');\n\t\t\n\t\tif( isset($_POST['action'] ) ) {\n\t\t\t\n\t\t\n\t\t\t//procesar informacion\n\t\t\t//guardad DDBB, guardar algunas opciomnes un USER_meta, metadato\n\t\t\t$nombre = $_POST['nombre'];\n\t\t\techo json_encode([\"resultado\" => \"Hemos recibido correctamente el nombre: $nombre\"]);\n\t\t\t\n\t\t\twp_die();//cortar toda comunicacion\n\t\t}\n\t}", "function listarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_sel';\n\t\t$this->transaccion='GEM_GEMETO_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_metodologia','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function cl_moblevantamento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function create()\n {\n $mobil = Mobil::all();\n return view('detail.create',compact('mobil'));\n }", "public function user_social(){\n\t\tcheck_ajax_referer('mp_seg', 'nonce');\n\t\t\n\t\tif( isset($_POST['action'] ) ) {\n\t\t\t$user_id = $_POST['userid'];\n\t\t\t\n\t\t\tif( $_POST['tipo'] == 'cargando' ){\n\t\t\t\t$social = get_user_meta( $user_id, 'mp_social', true );\n \n\t\t\t\tif( isset($social) && is_array($social) ) {\n\n\t\t\t\t\textract( $social, EXTR_OVERWRITE );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t$facebook = '';\n\t\t\t\t\t$twitter = '';\n\t\t\t\t\t$instagram = '';\n\n\t\t\t\t}\n\t\t\t\t$json = [\n\t\t\t\t\t'facebook' \t=> $facebook,\n\t\t\t\t\t'twitter' \t=> $twitter,\n\t\t\t\t\t'instagram' => $instagram\n\t\t\t\t];\n\t\t\t}elseif($_POST['tipo'] == 'guardando'){\n \n \n\t\t\t\t$facebook = sanitize_text_field( $_POST['facebook'] );\n\t\t\t\t$twitter = sanitize_text_field( $_POST['twitter'] );\n\t\t\t\t$instagram = sanitize_text_field( $_POST['instagram'] );\n\t\t\t\t$mp_social = [\n\t\t\t\t\t'facebook' \t=> $facebook,\n\t\t\t\t\t'twitter' \t=> $twitter,\n\t\t\t\t\t'instagram' => $instagram\t\n\t\t\t\t];\n \n \t$resultado =update_user_meta( $user_id, 'mp_social', $mp_social );\n\t\t\t\t$usuario = new WP_User($user_id);\n \tif($resultado != false){\n\t\t\t\t\t$json = [\n\t\t\t\t\t\t'resultado' => 'exitoso',\n\t\t\t\t\t\t'usuario' => $usuario->display_name\n\t\t\t\t\t];\n\t\t\t\t}else{\n\t\t\t\t\t$json = [\n\t\t\t\t\t\t'resultado' => 'error'\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t\techo json_encode($json);\n\t\t\twp_die();\n\t\t}\n\t}", "function isMobile($ua)\n{\n global $defaultJSON;\n $isMob='0'; \n $tree = Mobi_Mtld_DA_Api::getTreeFromFile($defaultJSON);\n if (Mobi_Mtld_DA_Api::getProperty($tree,$ua,\"mobileDevice\")=='1')\n $isMob='1';\n return $isMob;\n}", "public function selectMedecin(){\n $bdd=Connexion::getInstance();\n $req=\" select * from utilisateur u ,specialite s,service ser \n WHERE u.idSpecialite=s.idSpecialite and s.idService=ser.idService\n AND idStatus=\".self::NIVEAU_1;\n $rep=$bdd->query($req);\n return $rep->fetchall();\n \n }", "public function detaliiAction()\r\n {\r\n // $this->_checkFurnizoriGroup();\r\n \r\n /**\r\n * Check if customer has this option available\r\n */\r\n // if (!$this->_getSession()->getCustomer()->getAcOpNotificariEmail()) {\r\n // $this->_redirect('customer/account/');\r\n // return;\r\n // }\r\n \r\n /**\r\n * check if the customer has rights to read selected message\r\n */\r\n \r\n if (!Mage::getSingleton('customer/session')->isLoggedIn()) {\r\n $this->_redirect('customer/account/');\r\n return;\r\n }\r\n \r\n $messageId = $this->getRequest()->getParam('id');\r\n $customerId = $this->_getSession()->getCustomer()->getId();\r\n $message = Mage::getModel('conturifurnizori/usermessage')->load($messageId);\r\n \r\n $permisions = array($message->getReceverId(), $message->getSenderId());\r\n \r\n if (!in_array($customerId, $permisions)) {\r\n $this->_redirect('conturifurnizori/mesaje/casutapostala/');\r\n return;\r\n }\r\n \r\n /**\r\n * continue, everything seems to be OK \r\n */\r\n $this->loadLayout();\r\n \r\n $this->_initLayoutMessages('customer/session');\r\n $this->_initLayoutMessages('catalog/session');\r\n \r\n $this->getLayout()->getBlock('head')->setTitle($this->__('Detalii mesaj'));\r\n $this->renderLayout();\r\n }", "public function information_user()\n {\n //Model\n $username = $_SESSION['username'];\n $rs = $this->Nhansu->get_information_user($username);\n if ($rs) {\n $this->view(\"master_page\", [\n \"page\" => \"information_user\",\n \"url\" => \"../\",\n \"info_user\" => $rs,\n \"phongban\" => $this->Phongban->ListAll(),\n \"chucvu\" => $this->Chucvu->ListAll(),\n\n ]);\n }\n }", "public function AjaxTablet() {\n\t\t\tif(AppValidar::PeticionAjax() == true):\n\t\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t\t$plantilla->Parametro('avisos', $this->Modelo->avisos());\n\t\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'AjaxTablet.html')));\n\t\t\telse:\n\t\t\t\techo 'No es posible cargar la información';\n\t\t\tendif;\n\t\t}", "public function actionMultaList()\n {\n $data = [];\n $objectUser = Multas::getInstancia();\n $users = $objectUser->getAllMultas();\n\n $this->renderHtml('../views/listMultas_view.php', $users);\n }", "public function viewAction() {\n // neu chua khoi tao\n // neu roi add them 1 phan tu vao sesion voi id va uenc da duoc tao\n $this->layout('layout/bags');\n $getuser = $this->forward()->dispatch('Admin\\Controller\\Index', array(\n 'action' => 'getuser'\n ));\n // var_dump($getuser);\n $this->layout()->getuser = $getuser;\n\n $id = $this->params()->fromRoute('id');\n $uenc = $this->params()->fromRoute('uenc');\n\n echo \"id :\";\n var_dump($id);\n echo \"</br>\";\n echo \"uenc :\";\n var_dump($uenc);\n die(\"view is update\");\n }", "public function tutti()\n {\n\n $utentiDao = new AutoreDao();\n $res = $utentiDao->read();\n\n $view = new ViewCore();\n echo $view->render(\n 'gestione_utenti\\tutti_gli_utenti.html',\n ['autori' => $res]\n );\n\n\n\n //print_r($twig);\n }", "function user() {\n $user = $this->ion_auth->user()->row();\n //\n //get id\n $data['profic'] = $this->model_portofolio->select_profic_user($user->id)->row();\n $data['user'] = $user;\n if ($this->model_portofolio->select_metadata($user->id, 1)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 1);\n $data['profil'] = $this->model_portofolio->select_metadata($user->id, 1)->row();\n } else {\n $data['profil'] = $this->model_portofolio->select_metadata($user->id, 1)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 2)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 2);\n $data['pengajaran'] = $this->model_portofolio->select_metadata($user->id, 2)->row();\n } else {\n $data['pengajaran'] = $this->model_portofolio->select_metadata($user->id, 2)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 3)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 3);\n $data['riset'] = $this->model_portofolio->select_metadata($user->id, 3)->row();\n } else {\n $data['riset'] = $this->model_portofolio->select_metadata($user->id, 3)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 4)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 4);\n $data['publikasi'] = $this->model_portofolio->select_metadata($user->id, 4)->row();\n } else {\n $data['publikasi'] = $this->model_portofolio->select_metadata($user->id, 4)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 5)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 5);\n $data['pengalaman'] = $this->model_portofolio->select_metadata($user->id, 5)->row();\n } else {\n $data['pengalaman'] = $this->model_portofolio->select_metadata($user->id, 5)->row();\n }\n if ($this->model_portofolio->select_metadata($user->id, 6)->row() == NULL) {\n $this->model_portofolio->insert_usermeta($user->id, 6);\n $data['pendidikan'] = $this->model_portofolio->select_metadata($user->id, 6)->row();\n } else {\n $data['pendidikan'] = $this->model_portofolio->select_metadata($user->id, 6)->row();\n }\n\n //print_r($data['profic']);\n //print_r($data['user']);\n //print_r($data['publikasi']);\n //print_r($data);\n $this->load->view('portofolio/profil', $data);\n }", "public function recepcionCamion()\n {\n $data['movimientosTransporte'] = $this->Camiones->listaTransporte()['data'];\n\n $this->load->view('camion/listado_recepcion_camion', $data);\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 Preferiti() {\n $session = Sessione::getInstance();\n if($session->isLoggedUtente()){\n $utente = $session->getUtente();\n $idutente = $utente->getId();\n $pm = FPersistentManager::getInstance();\n $ut = $pm->loadById(\"utente\", $idutente);\n $ricette = $ut->getPreferiti();\n if($ricette!=null){\n $msg = \"\";\n } else {\n $msg = \"Non hai ricette preferite\";\n }\n $view = new VPreferiti();\n $view->mostraPreferiti($ricette, $msg);\n\n } else {\n header('Location: /myRecipes/web/Utente/Login');\n }\n }", "public function addmobilisateuradminAction() {\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');}\n if($sessionutilisateur->confirmation != \"\") {$this->_redirect('/administration/confirmation');}\n\n\n\n if(isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if(isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if($request->isPost()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n /////////////////////////////////////controle code membre\n if(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\n if(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n } else {\n if(substr($_POST['code_membre'], -1, 1) == 'P') {\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n } else if(substr($_POST['code_membre'], -1, 1) == 'M') {\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0) {\n $db->rollback();\n $sessionutilisateur->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n }\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n ////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionutilisateur->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateuradmin');\n } else {\n $db->rollback();\n $sessionutilisateur->error = \"Veuillez renseigner le Code Membre ...\";\n } \n } catch(Exception $exc) { \n $db->rollback();\n $sessionutilisateur->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionutilisateur->error = \"Champs * obligatoire\";\n }\n }\n }", "function api_chat_me_info() {\n\tif (session_check()) {\n\t\t$db = new db;\n\t\t$info = $db->getRow(\"SELECT CONCAT(fname, ' ', lname) as fio, avatar,id FROM users WHERE id = ?i\", $_SESSION[\"user_id\"]);\n\t\taok($info);\n\t} else {\n\t\taerr(array(\"Пожалуйста войдите.\"));\n\t}\n\t\n}", "public function view(User $user, MuzaiEducation $muzaiEducation)\n {\n\n \n\n }", "public function connexion()\n {\n # echo '<h1>JE SUIS LA PAGE CONNEXION</h1>';\n $this->render('membre/connexion');\n }", "public function social_media()\n {\n $result = $this->dtbs->list('social');\n $data['info'] = $result;\n $this->load->view('back/social/anasehife',$data);\n }", "private function GererUtilisateus() {\r\n if (isset($_GET['limiteBasse'])) {\r\n $limiteBasse = $_GET['limiteBasse'];\r\n } else {\r\n $limiteBasse = $_GET['limiteBasse'] = 0;\r\n }\r\n // -- Determine la pagination de l'affichage des restaurants\r\n $this->pagination = 50;\r\n $this->userCount = $this->CNX->countUsers();\r\n $this->afficherUsers = $this->CNX->showUsers(null, $limiteBasse, $this->pagination);\r\n $this->action = \"GererUtilisateurs\";\r\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 addmobilisateurAction() {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembre->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/listmobilisateur');\n \n } catch (Exception $exc) { \n $db->rollback();\n $this->view->message = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $this->view->error = \"Champs * obligatoire\";\n }\n }\n }", "public function actionAutorizaListadoUser() { \n if (Yii::app()->request->isPostRequest) {\n //$info = isset($_POST['info']) ? $_POST['info'] : \"\";\n $res = new PERSONA;\n $arroout = $res->autorizarUserCliente();\n $dataMail = new mailSystem; \n $htmlMail = $this->renderPartial('mensajeautoriza', array(\n //'CabPed' => $CabPed,\n ), true); \n $arroout=$dataMail->enviarAutoriza($htmlMail);\n header('Content-type: application/json');\n echo CJavaScript::jsonEncode($arroout); \n return;\n }\n \n }", "public function getMovimientoCamion(){\n log_message('DEBUG', \"#TRAZA | #TRAZ-PROD-TRAZASOFT | Camion | getMovimientoCamion()\");\n \n $motr_id = $this->input->post(\"motr_id\");\n $resp = $this->Camiones->getMovimientoTransporte($motr_id);\n\n echo json_encode($resp);\n }", "public function informacionViaje(){\n $this->view->informacionDetalladaViaje();\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}", "public function mojProfil(){\n $korisnik=$this->session->get('korisnik');\n $this->prikaz('mojProfil', ['korisnik'=>$korisnik]);\n }", "public function AjaxMovil() {\n\t\t\tif(AppValidar::PeticionAjax() == true):\n\t\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t\t$plantilla->Parametro('avisos', $this->Modelo->avisos());\n\t\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'AjaxMovil.html')));\n\t\t\telse:\n\t\t\t\techo 'No es posible cargar la información';\n\t\t\tendif;\n\t\t}", "function index_get($id=null){\n\t\t$response['SUCCESS'] = array('status' => TRUE, 'message' => 'Success get mobil' , 'data' => null );\n\t\t\n\t\t#Set response API if Not Found\n\t\t$response['NOT_FOUND']=array('status' => FALSE, 'message' => 'No mobil were found' , 'data' => null );\n \n\t\t#\n\t\tif (!empty($this->get('ID_MOBIL')))\n\t\t\t$id=$this->get('ID_MOBIL');\n \n\n\t\tif ($id==null) {\n\t\t\t#Call methode get_all from m_mobil model\n\t\t\t$mobil=$this->m_mobil->get_all();\n\t\t\n\t\t}\n\n\n\t\tif ($id!=null) {\n\t\t\t\n\t\t\t#Check if id <= 0\n\t\t\tif ($id<=0) {\n\t\t\t\t$this->response($response['NOT_FOUND'], REST_Controller::HTTP_BAD_REQUEST); // BAD_REQUEST (400) being the HTTP response code\n\t\t\t}\n\n\t\t\t#Call methode get_by_id from m_mobil model\n\t\t\t$mobil=$this->m_mobil->get_by_id($id);\n\t\t}\n\n\n # Check if the mobil data store contains mobil\n\t\tif ($mobil) {\n\t\t\tif (count($mobil)==1)\n\t\t\t\tif (isset($mobil->IMAGE)) {\n\t\t\t\t\t$mobil->IMAGE=explode(',', $mobil->IMAGE);\n\t\t\t\t}else{\n\t\t\t\t\t$mobil[0]->IMAGE=explode(',', $mobil[0]->IMAGE);\n\t\t\t\t}\n\t\t\telse\n\t\t\t\tfor ($i=0; $i <count($mobil) ; $i++)\n\t\t\t\t\t$mobil[$i]->IMAGE=explode(',', $mobil[$i]->IMAGE);\n\t\t\t// exit();\n\t\t\t$response['SUCCESS']['data']=$mobil;\n\n\t\t\t#if found mobil\n\t\t\t$this->response($response['SUCCESS'] , REST_Controller::HTTP_OK);\n\n\t\t}else{\n\n\t #if Not found mobil\n\t $this->response($response['NOT_FOUND'], REST_Controller::HTTP_NOT_FOUND); # NOT_FOUND (404) being the HTTP response code\n\n\t\t}\n\n\t}", "public function membres()\n {\n $this->membres = $this->Member->list($_SESSION['guild_id']);\n }", "function medias_autoriser(){}", "public function tellAFriendAction() {\r\n\r\n //DEFAULT LAYOUT\r\n $sitemobile = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemobile');\r\n if ($sitemobile && !Engine_Api::_()->sitemobile()->checkMode('mobile-mode'))\r\n\t\t\t$this->_helper->layout->setLayout('default-simple');\r\n\r\n //GET VIEWER DETAIL\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $viewr_id = $viewer->getIdentity();\r\n\r\n //GET PAGE ID AND PAGE OBJECT\r\n $page_id = $this->_getParam('page_id', $this->_getParam('id', null));\r\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\r\n if (empty($sitepage))\r\n return $this->_forwardCustom('notfound', 'error', 'core');\r\n //AUTHORIZATION CHECK FOR TELL A FRIEND\r\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'tfriend');\r\n if (empty($isManageAdmin)) {\r\n return $this->_forwardCustom('requireauth', 'error', 'core');\r\n }\r\n\r\n //FORM GENERATION\r\n $this->view->form = $form = new Sitepage_Form_TellAFriend();\r\n \r\n if (!empty($viewr_id)) {\r\n $value['sender_email'] = $viewer->email;\r\n $value['sender_name'] = $viewer->displayname;\r\n $form->populate($value);\r\n }\r\n \r\n //IF THE MODE IS APP MODE THEN\r\n if (Engine_Api::_()->seaocore()->isSitemobileApp()) {\r\n Zend_Registry::set('setFixedCreationForm', true);\r\n Zend_Registry::set('setFixedCreationFormBack', 'Back');\r\n Zend_Registry::set('setFixedCreationHeaderTitle', Zend_Registry::get('Zend_Translate')->_('Tell a friend'));\r\n Zend_Registry::set('setFixedCreationHeaderSubmit', Zend_Registry::get('Zend_Translate')->_('Send'));\r\n $this->view->form->setAttrib('id', 'tellAFriendFrom');\r\n Zend_Registry::set('setFixedCreationFormId', '#tellAFriendFrom');\r\n $this->view->form->removeElement('sitepage_send');\r\n $this->view->form->removeElement('sitepage_cancel');\r\n $form->setTitle('');\r\n }\r\n\r\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\r\n\r\n $values = $form->getValues();\r\n\r\n //EDPLODES EMAIL IDS\r\n $reciver_ids = explode(',', $values['sitepage_reciver_emails']);\r\n\r\n if (!empty($values['sitepage_send_me'])) {\r\n $reciver_ids[] = $values['sitepage_sender_email'];\r\n }\r\n $sender_email = $values['sitepage_sender_email'];\r\n\r\n //CHECK VALID EMAIL ID FORMITE\r\n $validator = new Zend_Validate_EmailAddress();\r\n\r\n if (!$validator->isValid($sender_email)) {\r\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Invalid sender email address value'));\r\n return;\r\n }\r\n foreach ($reciver_ids as $reciver_id) {\r\n $reciver_id = trim($reciver_id, ' ');\r\n if (!$validator->isValid($reciver_id)) {\r\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter correct email address of the receiver(s).'));\r\n return;\r\n }\r\n }\r\n $sender = $values['sitepage_sender_name'];\r\n $message = $values['sitepage_message'];\r\n $heading = ucfirst($sitepage->getTitle());\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($reciver_ids, 'SITEPAGE_TELLAFRIEND_EMAIL', array(\r\n 'host' => $_SERVER['HTTP_HOST'],\r\n 'sender_name' => $sender,\r\n 'page_title' => $heading,\r\n 'message' => '<div>' . $message . '</div>',\r\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] . Engine_Api::_()->sitepage()->getHref($sitepage->page_id, $sitepage->owner_id, $sitepage->getSlug()),\r\n 'sender_email' => $sender_email,\r\n 'queue' => true\r\n ));\r\n\r\n if ($sitemobile && Engine_Api::_()->sitemobile()->checkMode('mobile-mode'))\r\n\t\t\t\t$this->_forwardCustom('success', 'utility', 'core', array( \r\n 'parentRedirect' => $sitepage->getHref(), \r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your message to your friend has been sent successfully.'))\r\n ));\r\n\t\t else\t\r\n $this->_forwardCustom('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => false,\r\n 'format' => 'smoothbox',\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your message to your friend has been sent successfully.'))\r\n ));\r\n }\r\n }", "public function indexMuellim()\n {\n \t$mails=elaqe::where([['reciever_id',$_SESSION['muellimID']],['reciever_type','m']])->orderBy('id','desc')->get();\n \treturn view('muellim.elaqe.index',compact('mails'));\n }", "public function actionSeguir(){\r\n $me = new MetodosExtras();\r\n \r\n $ss = new Sessao();\r\n $sm = new SeguirModel();\r\n $sm->setId($ss->devSessao('id'));\r\n $sm->setIdSeguir($_GET['usu']);\r\n \r\n $sd = new SeguirDAO();\r\n if($sd->insereSeguir($sm)):\r\n if($_GET['tp'] == 1):\r\n $me->redireciona('Artista/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=um&en=sim');\r\n else:\r\n $me->redireciona('Companhia/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=um&en=sim');\r\n endif;\r\n else:\r\n if($_GET['tp'] == 1):\r\n $me->redireciona('Artista/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=dois');\r\n else:\r\n $me->redireciona('Companhia/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=dois');\r\n endif;\r\n endif;\r\n }", "public function actionManagerial() {\n $jabatan = new WJabatan('search');\n $jabatan->unsetAttributes(); // clear any default values\n if (isset($_GET['WJabatan']))\n $jabatan->attributes = $_GET['WJabatan'];\n $this->render('managerial', array(\n 'jabatan' => $jabatan,\n ));\n }", "public function get_mention(){retrun($id_local_mention); }", "function informacao() {\n $this->layout = '_layout.perfilUsuario';\n $usuario = new Usuario();\n $api = new ApiUsuario();\n $usuario->codgusario = $this->getParametro(0);\n\n $this->dados = array(\n 'dados' => $api->Listar_informacao_cliente($usuario)\n );\n $this->view();\n }", "function retrieve_users_fftt()\n\t{\n\t\tglobal $gCms;\n\t\t$adherents = new adherents();\n\t\t$ping = cms_utils::get_module('Ping');\n\t\t$saison = $ping->GetPreference ('saison_en_cours');\n\t\t$ping_ops = new ping_admin_ops();\n\t\t$db = cmsms()->GetDb();\n\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t$aujourdhui = date('Y-m-d');\n\t\t$club_number = $adherents->GetPreference('club_number');\n\t\t//echo $club_number;\n\t\t\n\t\t\n\t\t\t$page = \"xml_liste_joueur\";\n\t\t\t$service = new Servicen();\n\t\t\t//paramètres nécessaires \n\t\t\t\n\t\t\t$var = \"club=\".$club_number;\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\t\n\t\t\tif($xml === FALSE)\n\t\t\t{\n\t\t\t\t$array = 0;\n\t\t\t\t$lignes = 0;\n\t\t\t\treturn FALSE;\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$lignes = count($array['joueur']);\n\t\t\t}\n\t\t\t//echo \"le nb de lignes est : \".$lignes;\n\t\t\tif($lignes == 0)\n\t\t\t{\n\t\t\t\t$message = \"Pas de lignes à récupérer !\";\n\t\t\t\t//$this->SetMessage(\"$message\");\n\t\t\t\t//$this->RedirectToAdminTab('joueurs');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//on supprime tt\n\t\t\t\t$query = \"TRUNCATE TABLE \".cms_db_prefix().\"module_ping_joueurs\";\n\t\t\t\t$dbresult = $db->Execute($query);\n\t\t\t\tif($dbresult)\n\t\t\t\t{\n\t\t\t\t\t$i =0;//compteur pour les nouvelles inclusions\n\t\t\t\t\t$a = 0;//compteur pour les mises à jour\n\t\t\t\t\t$joueurs_ops = new ping_admin_ops();\n\t\t\t\t\tforeach($xml as $tab)\n\t\t\t\t\t{\n\t\t\t\t\t\t$licence = (isset($tab->licence)?\"$tab->licence\":\"\");\n\t\t\t\t\t\t$nom = (isset($tab->nom)?\"$tab->nom\":\"\");\n\t\t\t\t\t\t$prenom = (isset($tab->prenom)?\"$tab->prenom\":\"\");\n\t\t\t\t\t\t$club = (isset($tab->club)?\"$tab->club\":\"\");\n\t\t\t\t\t\t$nclub = (isset($tab->nclub)?\"$tab->nclub\":\"\");\n\t\t\t\t\t\t$clast = (isset($tab->clast)?\"$tab->clast\":\"\");\n\t\t\t\t\t\t$actif = 1;\n\n\t\t\t\t\t\t$insert = $joueurs_ops->add_joueur($actif, $licence, $nom, $prenom, $club, $nclub, $clast);\n\t\t\t\t\t\t$player_exists = $joueurs_ops->player_exists($licence);\n\t\t\t\t\t//\tvar_dump($player_exists);\n\t\t\t\t\t\tif($insert === TRUE && $player_exists === FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$query = \"INSERT INTO \".cms_db_prefix().\"module_ping_recup_parties (saison, datemaj, licence, sit_mens, fftt, maj_fftt, spid, maj_spid) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t\t\t\t\t\t$dbresult = $db->Execute($query, array($saison,$aujourdhui,$licence,'Janvier 2000', '0', '1970-01-01', '0', '1970-01-01'));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}//$a++;\n\t\t\t\t\t \t\n\n\t\t\t\t\t}// fin du foreach\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t//on redirige sur l'onglet joueurs\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t}", "function abmUsuarios()\n {\n $this->checkCredentials();\n $users = $this->modelUser->getAllUsers();\n $this->view->showAbmUsuarios($users);\n }", "function manage_user(){\n\t\t$a['data']\t= $this->model_admin->tampil_user()->result_object();\n\t\t$a['page']\t= \"manage_user\";\n\t\t\n\t\t$this->load->view('admin/index', $a);\n\t}", "public function actionProvManajemenUser() {\n $model = $this->findModel(Yii::$app->user->identity->id);\n return $this->render('prov/prov-manajemen-user', [\n 'model' => $model,\n ]);\n }", "public function profil()\n {\n # echo '<h1>JE SUIS LA PAGE PROFIL</h1>';\n $this->render('membre/profil');\n }", "public function indexAction(){\n\n // Appel à la base de donnée\n //getDoctrine appel la methode Doctrine\n //getManager appel des ORM\n $em = $this->getDoctrine()->getManager();\n\n // Appel à l'entity\n $phone = $em->getRepository('FamilyBundle:User')->findAll();\n\n // Retour à la page concernée avec une valeur appelée\n return $this->render('@Family/Default/phone.html.twig', array(\n 'phones'=>$phone,\n ));\n }", "public function get_start_member_page($uid) {\n global $base_secure_url;\n //start get social media items PER USER\n $vid = 'social_media_networks';\n $terms = \\Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadTree($vid);\n $social_network = [];\n foreach ($terms as $term) {\n $term_id = $term->tid;\n $terms_obj = \\Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($term_id);\n if (isset($terms_obj->field_icon) && isset($terms_obj->field_icon->target_id)) {\n $network_statu = $terms_obj->field_status->value;\n $network_icon_target = $terms_obj->field_icon->target_id;\n $file = \\Drupal::entityTypeManager()->getStorage('file')->load($network_icon_target);\n // $social_icon_path = $file->url();\n $social_icon_path = file_create_url($file->getFileUri());\n $network_status_unfiltered = $this->get_network_status($terms_obj->tid->value, $uid);\n if (array_key_exists('status', $network_status_unfiltered) && $network_status_unfiltered['status'] == 1) {\n if (array_key_exists('token_validated', $network_status_unfiltered) && $network_status_unfiltered['token_validated'] == 1) {\n //acive and validated network, filter network status array\n $network_status['status'] = 1;\n }\n else {\n //active but not validated network\n $network_status['status'] = 0;\n }\n }\n else {\n //neither active nor validated\n $network_status['status'] = 0;\n }\n $social_network[] = ['name' => $terms_obj->name->value, 'tid' => $terms_obj->tid->value, 'network_icon' => $social_icon_path, 'network_status' => $network_status];\n }\n }\n //$data['member_network_settings'] = $social_network;\n //$data['uid'] = $uid;\n return $social_network;\n }", "public function mobilebyLocationsAction() {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('group')) {\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('group_main', array(), 'sitetagcheckin_main_grouplocation');\n $this->_helper->content->setEnabled();\n } elseif (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('advgroup')) {\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('advgroup_main', array(), 'sitetagcheckin_main_groupbylocation');\n $this->_helper->content->setEnabled();\n } else {\n return $this->_forward('notfound', 'error', 'core');\n }\n }", "public function addmobilisateurintegrateurAction() {\n $sessionmembreasso = new Zend_Session_Namespace('membreasso');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcint');\n if (!isset($sessionmembreasso->login)) {$this->_redirect('/integrateur/login');}\n\n\n\n if (isset($_POST['ok']) && $_POST['ok'] == \"ok\") {\n if (isset($_POST['code_membre']) && $_POST['code_membre'] != \"\" && isset($_POST['id_utilisateur']) && $_POST['id_utilisateur'] != \"\") {\n \n $request = $this->getRequest();\n if ($request->isPost ()) {\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\n/////////////////////////////////////controle code membre\nif(isset($_POST['code_membre']) && $_POST['code_membre']!=\"\"){\nif(strlen($_POST['code_membre']) != 20) {\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Vérifiez bien le nombre de caractères du Code Membre. Merci...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n}else{\nif(substr($_POST['code_membre'], -1, 1) == 'P'){\n $membre = new Application_Model_EuMembre();\n $membre_mapper = new Application_Model_EuMembreMapper();\n $membre_mapper->find($_POST['code_membre'], $membre);\n if(count($membre) == 0){\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PP ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }else if(substr($_POST['code_membre'], -1, 1) == 'M'){\n $membremorale = new Application_Model_EuMembreMorale();\n $membremorale_mapper = new Application_Model_EuMembreMoraleMapper();\n $membremorale_mapper->find($_POST['code_membre'], $membremorale);\n if(count($membremorale) == 0){\n $db->rollback();\n $sessionmembreasso->error = \"Le Code Membre est erroné. Veuillez bien saisir le Code Membre PM ...\";\n //$this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n return;\n }\n }\n}\n\n\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $mobilisateur = new Application_Model_EuMobilisateur();\n $m_mobilisateur = new Application_Model_EuMobilisateurMapper();\n\n $id_mobilisateur = $m_mobilisateur->findConuter() + 1;\n\n $mobilisateur->setId_mobilisateur($id_mobilisateur);\n $mobilisateur->setCode_membre($_POST['code_membre']);\n $mobilisateur->setDatecreat($date_id->toString('yyyy-MM-dd HH:mm:ss'));\n $mobilisateur->setId_utilisateur($_POST['id_utilisateur']);\n $mobilisateur->setEtat(1);\n $m_mobilisateur->save($mobilisateur);\n\n////////////////////////////////////////////////////////////////////////////////\n\n $db->commit();\n $sessionmembreasso->error = \"Operation bien effectuee ...\";\n $this->_redirect('/mobilisateur/addmobilisateurintegrateur');\n}else{\n $db->rollback();\n $sessionmembreasso->error = \"Veuillez renseigner le Code Membre ...\";\n\n} \n } catch (Exception $exc) { \n $db->rollback();\n $sessionmembreasso->error = $exc->getMessage() . ': ' . $exc->getTraceAsString(); \n return;\n } \n \n } \n \n } else {\n $sessionmembreasso->error = \"Champs * obligatoire\";\n }\n }\n }", "public function SeeMyPage() {\n\n // $id = $_SESSION['userID'];\n $id = $_SESSION[PREFIX . 'userID'];\n\n try {\n /* * * * * * * * * * * * * * * * * * * * * * * *\n * Get All the informations about the user from the ID\n */\n $select = $this->connexion->prepare(\"SELECT *\n FROM \" . PREFIX . \"user\n WHERE user_id = :userID\");\n \n $select->bindValue(':userID', $id, PDO::PARAM_INT);\n $select->execute();\n $select->setFetchMode(PDO::FETCH_ASSOC);\n $user = $select->FetchAll();\n $select->closeCursor(); \n\n if(isset($user[0])){\n $retour = $user[0];\n } else {\n $retour = $user;\n }\n\n if(!empty($user)){\n\n $select2 = $this->connexion->prepare(\"SELECT *\n FROM \" . PREFIX . \"phone\n WHERE user_user_id = :userID\");\n \n $select2->bindValue(':userID', $id, PDO::PARAM_INT);\n $select2->execute();\n $select2->setFetchMode(PDO::FETCH_ASSOC);\n $phone = $select2->FetchAll();\n $select2->closeCursor(); \n\n if(!empty($phone[0])){\n $retour = array_merge($retour, $phone[0]);\n }\n \n $select3 = $this->connexion->prepare(\"SELECT *\n FROM \" . PREFIX . \"adress\n WHERE user_user_id = :userID\");\n \n $select3->bindValue(':userID', $id, PDO::PARAM_INT);\n $select3->execute();\n $select3->setFetchMode(PDO::FETCH_ASSOC);\n $adress = $select3->FetchAll();\n $select3->closeCursor(); \n\n if(!empty($adress[0])){\n $retour = array_merge($retour, $adress[0]);\n }\n \n $select4 = $this->connexion->prepare(\"SELECT *\n FROM \" . PREFIX . \"bank_details\n WHERE user_user_id = :userID\");\n \n $select4->bindValue(':userID', $id, PDO::PARAM_INT);\n $select4->execute();\n $select4->setFetchMode(PDO::FETCH_ASSOC);\n $adress2 = $select4->FetchAll();\n $select4->closeCursor(); \n\n if(!empty($adress2)){\n $retour = array_merge($retour, $adress2[0]);\n }\n\n }\n return $retour;\n \n \n } catch (Exception $e) {\n echo 'Message:' . $e->getMessage();\n }\n }", "function modificarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_ime';\n\t\t$this->transaccion='GEM_GEMETO_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_metodologia','id_metodologia','int4');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function index($page = 'user/riwayatsewa/v_riwayatsewa')\n\t{\n\t\t$data['admin'] = $this->db->get_where('admin',['email'=>$this->session->userdata('email')])->row_array();\n\t\t$data['penyewa'] = $this->db->get_where('penyewa',['email'=>$this->session->userdata('email')])->row_array();\n\t\t$admin = $this->db->get_where('admin',['email'=>$this->session->userdata('email')])->row_array();\n\t\t$penyewa = $this->db->get_where('penyewa',['email'=>$this->session->userdata('email')])->row_array();\n\n\t\t$data['kontenDinamis']\t=\t$page;\n\t\t$riwayatsewa\t=\t$this->M_riwayatsewa;\n\n\t\t$data['content'] = $riwayatsewa->get();\n\n\t\t\n\t\t/*cek user apakah ada didalam database*/\n\t\tif ($penyewa || $admin ) {\n\t\t\t$this->load->view($this->template,$data);\n\t\t} else {\n\n\t\t\t/* Pesan cek user jika email tidak terdaftar*/\n\t\t\t$this->session->sess_destroy();\n\t\t\tredirect('');\n\t\t}\n\t}", "public function viajesFuturos(){\n // $viajes = $this->model->viajesFuturos($usuario, $email);\n $this->view->viajesFuturos();\n}", "public function twitterAction()\r\n {\r\n if(!($userInfo = Mage::getSingleton('customer/session')\r\n ->getSocialLogonTwitterUserinfo()) || !$userInfo->hasData()) {\r\n \r\n $userInfo = Mage::getSingleton('SocialLogon/twitter_info_user')\r\n ->load();\r\n\r\n Mage::getSingleton('customer/session')\r\n ->setSocialLogonTwitterUserinfo($userInfo);\r\n }\r\n\r\n Mage::register('SocialLogon_twitter_userinfo', $userInfo);\r\n\r\n $this->loadLayout();\r\n $this->renderLayout();\r\n }", "public function infoutilisateur($id){\n $this->autoRender = false;\n $id = isset($id) ? $id : $this->request->data('id');\n $utilisateur = $this->Utilisateur->find('first',array('conditions'=>array('Utilisateur.id'=>$id),'recursive'=>0));\n $user[\"ETP\"] = $utilisateur['Utilisateur']['WORKCAPACITY']/100;\n $user[\"TJM\"] = $utilisateur['Tjmagent']['TARIFTTC']==null ? '' : $utilisateur['Tjmagent']['TARIFTTC'];\n $result = json_encode($user);\n return $result;\n }", "public function superMng() {\r\n\t\tif ($this->user['user_type_id'] != 19) {\r\n\t\t\t$this->error('无权限访问');\r\n\t\t}\r\n\t\t/*\r\n\t\tif (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {\r\n\t\t\t$data = array();\r\n\t\t\t$data['page'] = I('post.page', 1);\r\n\t\t\t$data['rows'] = I('post.rows', 20);\r\n\t\t\t$data['sort'] = I('post.sort', 'id');\r\n\t\t\t$data['order_by'] = I('post.order', 'ASC');\r\n\t\t\t\r\n\t\t\t$data['city_id'] = $this->city['city_id'];\r\n\t\t\t$data['advance'] = true;\r\n\t\t\t\r\n\t\t\t$id = I('post.id', 0);\r\n\t\t\t$status_id = I('post.status_id', 0);\r\n\t\t\t$area_id = I('post.area_id', 0);\r\n\t\t\t$target_id = I('post.target_id', 0);\r\n\t\t\t$area_names = I('post.area_names', '');\r\n\t\t\t$target_names = I('post.target_names', '');\r\n\t\t\t$start_date = I('post.start_date', '');\r\n\t\t\t$end_date = I('post.end_date', '');\r\n\t\t\t!empty($id) && $data['id'] = $id;\r\n\t\t\t!empty($status_id) && $data['status_id'] = $status_id;\r\n\t\t\t!empty($start_date) && $data['exm_start_date'] = $start_date;\r\n\t\t\t!empty($end_date) && $data['exm_end_date'] = $end_date;\r\n\t\t\t\r\n\t\t\tif (!empty($area_id)) {\r\n\t\t\t\t$data['area_id'] = $area_id;\r\n\t\t\t}else if (!empty($area_names)) {\r\n\t\t\t\t$arr = explode(',', $area_names);\r\n\t\t\t\tforeach($arr as $k=>$v) {\r\n\t\t\t\t\t$data['area' . ($k+1)] = $v;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (!empty($target_id)) {\r\n\t\t\t\t$data['target_id'] = $target_id;\r\n\t\t\t}else if (!empty($target_names)) {\r\n\t\t\t\t$arr = explode(',', $target_names);\r\n\t\t\t\tforeach($arr as $k=>$v) {\r\n\t\t\t\t\t$data['target' . ($k+1)] = $v;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//print_r($data);exit;\r\n\t\t\t$IssueEvent = A('Issue', 'Event');\r\n\t\t\t\r\n\t\t\t$res = $IssueEvent->getIssueList($data);\r\n\t\t\t\t\r\n\t\t\techo $this->generateDataForDataGrid($res['total'], $res['data']);\r\n\t\t\texit;\r\n\t\t}*/\r\n\t\t$AreaEvent = A('Area', 'Event');\r\n\t\t$area_list = $AreaEvent->getAreaList($this->city['city_id'], 0);\r\n\t\t$this->assign('area_list', $area_list);\r\n\t\t\r\n\t\t$TargetEvent = A('Target', 'Event');\r\n\t\t$target_list = $TargetEvent->getTargetList($this->city['city_id'], 0);\r\n\t\t$this->assign('target_list', $target_list);\r\n\t\t\r\n\t\t$IssueEvent = A('Issue', 'Event');\r\n\t\t$status_list = M('IssueStatus')->select();\r\n\t\tforeach($status_list as $key=>$row) {\r\n\t\t\t\t$status_list[$key]['name'] = $IssueEvent->getStatusName($row['status_id'], $this->user['user_type_id'], $row['name']);\r\n\t\t}\r\n\t\t$this->assign('status_list', $status_list);\r\n\t\t\r\n\t\t$this->assign('title', '数据管理');\r\n\t\t$this->display('Issue:superMng');\r\n\t}", "public function getSubscriberMobile()\n {\n $mobile = parent::getSubscriberMobile(); \n return $mobile;\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}", "function processPetition()\r\n {\r\n $user_id = $this->getSessionElement( 'userinfo', 'user_id' );\r\n if ( isset($user_id) && $user_id != '' ) {\r\n $this->setViewVariable('user_id', $user_id );\r\n switch ($this->getViewVariable('option')) {\r\n case show:\r\n $ext_id = $this->getViewVariable('user');\r\n\t\t\t\t\t\t\t\t\t\t$this->_setContactLists($ext_id);\r\n $this->setViewClass('miguel_VMain');\r\n break;\r\n case detail:\r\n //$this->addNavElement(Util::format_URLPath('contact/index.php'), agt('miguel_Contact') );\r\n $contact_id=$this->getViewVariable('contact_id');\r\n $detail_contacts = $this->obj_data->getContact($user_id, $contact_id);\r\n $this->setViewVariable('detail_contacts', $detail_contacts);\r\n $this->setViewClass('miguel_VDetail');\r\n break;\r\n case insert:\r\n\t\t\t\t\t\t\t\t\t $id_profile = $this->getViewVariable('profile');\r\n\t\t\t\t\t\t\t\t\t\tswitch($id_profile)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tcase '2':\r\n\t\t\t\t\t\t\t\t\t\t\tcase '3':\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$arrUsers = $this->obj_data->getUsers(2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$arrUsers += $this->obj_data->getUsers(3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$arrUsers = $this->obj_data->getUsers($id_profile);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t$this->setViewVariable('arrUsers', $arrUsers);\r\n $this->setViewClass('miguel_VNewContact');\r\n break;\r\n case newdata:\r\n\t\t\t\t\t\t\t\t\t\t$contact_user_id = $this->getViewVariable('uname');\r\n $this->obj_data->insertContact($user_id, $this->getViewVariable('nom_form'), $this->getViewVariable('prenom_form'), $contact_user_id, $this->getViewVariable('email'), $this->getViewVariable('jabber'), $this->getViewVariable('comentario'), $contact_user_id!=null);\r\n $this->setViewClass('miguel_VMain');\r\n\t\t\t\t\t\t\t\t\t\t$this->_setContactLists($user_id);\r\n $this->setViewClass('miguel_VMain');\r\n break;\r\n case delete:\r\n $this->obj_data->deleteContact($this->getViewVariable('contact_id'));\r\n\t\t\t\t\t\t\t\t\t\t$this->_setContactLists($user_id);\r\n $this->setViewClass('miguel_VMain');\r\n break;\r\n default:\r\n $this->clearNavBarr();\r\n\t\t\t\t\t\t\t\t\t\t$this->_setContactLists($user_id);\r\n\t\t\t\t\t\t\t\t\t\t$this->setViewClass('miguel_VMain');\r\n break;\r\n }\r\n\r\n $this->clearNavBarr();\r\n $this->addNavElement(Util::format_URLPath('contact/index.php'), agt('Contactos') );\r\n $this->setCacheFile(\"miguel_VMain_Contact_\" . $this->getSessionElement(\"userinfo\", \"user_id\"));\r\n $this->setMessage('' );\r\n $this->setPageTitle( 'Contactos' );\r\n\r\n $this->setCacheFlag(true);\r\n $this->setHelp(\"EducContent\");\r\n } else {\r\n header('Location:' . Util::format_URLPath('main/index.php') );\r\n }\r\n }", "function archobjet_autoriser() {\n}", "public function getTelefone()\n {\n return $this->telefone;\n }", "public function affFormModifInfos(){\n $error = \"\";\n $idVisiteur = Session::get('id');\n $gsbFrais = new GsbFrais();\n $info = $gsbFrais->getInfosPerso($idVisiteur);\n return view('formModifInfos', compact('info', 'error'));\n }", "function act_tipo_pago(){\n\t\t$u= new Tipo_pago();\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 actualizado los datos del Tipo de Pago.\\\"); 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}" ]
[ "0.74121654", "0.69084173", "0.65400565", "0.64147466", "0.6007604", "0.5999295", "0.57086396", "0.56602204", "0.5631701", "0.562128", "0.55559045", "0.5512703", "0.5449182", "0.5439828", "0.5439595", "0.54266036", "0.5416764", "0.54119074", "0.53777695", "0.5373076", "0.53597635", "0.53329897", "0.5306293", "0.5293653", "0.5286562", "0.5284682", "0.5277989", "0.5273588", "0.5264262", "0.526399", "0.52492654", "0.5242967", "0.5234219", "0.5223978", "0.52231324", "0.52212787", "0.5220161", "0.5216821", "0.52153647", "0.5205624", "0.5189799", "0.51826376", "0.51825917", "0.51771003", "0.5176424", "0.51722825", "0.5167327", "0.5165033", "0.5159911", "0.5157915", "0.5152741", "0.51475096", "0.5143035", "0.5141411", "0.51406074", "0.5138544", "0.5125642", "0.51212436", "0.5120003", "0.5107983", "0.5107534", "0.50990653", "0.50954986", "0.5082652", "0.50793743", "0.5073799", "0.5065287", "0.50644207", "0.5053362", "0.5052219", "0.5051152", "0.5048931", "0.50348043", "0.50333035", "0.5031975", "0.5029714", "0.5027803", "0.5024297", "0.50223315", "0.5021901", "0.50193834", "0.50192624", "0.5017794", "0.50160825", "0.50091505", "0.50085557", "0.5006714", "0.49973705", "0.49961758", "0.4989343", "0.49883988", "0.4987044", "0.49869186", "0.4975887", "0.49668652", "0.49658054", "0.49568984", "0.49565098", "0.49514413", "0.4951413" ]
0.6421847
3
Verificar que esten seteadas las variables para hacer login.
public function run() { if( isset($_POST['session_login']) && isset($_POST['session_pass']) ) { $this->login($_POST['session_login'],$_POST['session_pass']); } //Validar que el login se haya hecho correctamente. if( $this->isLogged() ) { switch($_GET['act']) { case "insert" : { //Solo administradores y empleados pueden hacer inserciones de Registros de Eventos. if( !$this->isClient() ) { //Comprobamos que el $_POST no esté vacío, si lo está se mostrará la vista con el formulario para insertar. if(empty($_POST)) { //Cargamos el formulario $view = file_get_contents("View/EventRegistryForm.html"); $header = file_get_contents("View/header.html"); $footer = file_get_contents("View/footer.html"); //Traer el idEvent, la condicion es 0=0 para que los traiga todos (crear funcion en modelo) $result = $this -> model -> getEvents("0=0"); //Obtengo la posicion donde se van a insertar los option $row_start = strrpos($view,'{event-options-start}') + 21; $row_end= strrpos($view,'{event-options-end}'); //Hacer copia de la fila donde se va a reemplazar el contenido $base_row = substr($view,$row_start,$row_end-$row_start); //Acceder al resultado y crear el diccionario //Revisar que el nombre de los campos coincida con los de la base de datos $rows = ''; foreach ($result as $row) { $new_row = $base_row; $dictionary = array( '{id-event}' => $row['idEvent'], '{event}' => $row['Event'] ); $new_row = strtr($new_row,$dictionary); $rows .= $new_row; } //Reemplazar en la vista la fila base por los option creados y eliminar inicio y fin del option $view = str_replace($base_row, $rows, $view); $view = str_replace('{event-options-start}', '', $view); $view = str_replace('{event-options-end}', '', $view); //Creamos el diccionario //Para el insert los campos van vacios y los input estan activos $dictionary = array( '{value-idEventRegistry}' => '', '{value-idVehicle}' => '', //'{value-idEvent}' => '', '{value-Reason}' => '', '{active}' => '', '{action}' => 'insert' ); //Sustituir los valores en la plantilla $view = strtr($view,$dictionary); //Sustituir el usuario en el header $dictionary = array( '{user-name}' => $_SESSION['user'], '{log-link}' => 'index.php?ctl=logout', '{log-type}' => 'Logout' ); $header = strtr($header,$dictionary); //Agregamos el header y el footer a la vista $view = $header.$view.$footer; //Mostramos la vista echo $view; //require_once("View/Formulario.html"); } else { //Limpiamos los datos. //Obtenemos la llave primaria require_once("Model/PKGenerator.php"); $idEventRegistry = PKGenerator::getPK('EventRegistry','idEventRegistry'); $idVehicle = $this->cleanInt($_POST['idVehicle']); $idUser = $_SESSION['id_user']; //Se pone el id del usuario que está logeado $idEvent = $this->cleanInt($_POST['idEvent']); $date_array = getdate(); $Date = $date_array['year']."-".$date_array['mon']."-".$date_array['mday']; $Reason = $this->cleanText($_POST['Reason']); //Recogemos el resultado de la inserción e imprimimos un mensaje //en base a este resultado. if($result = $this->model->insert($idEventRegistry,$idVehicle,$idUser,$idEvent,$Date,$Reason)) { //Cargamos el formulario $view = file_get_contents("View/EventRegistryForm.html"); $header = file_get_contents("View/header.html"); $footer = file_get_contents("View/footer.html"); //Traer el idEvent insertado, ahora si se pone condicion en el comando $result = $this -> model -> getEvents("idEvent=".$idEvent); //Obtengo la posicion donde se van a insertar los option $row_start = strrpos($view,'{event-options-start}') + 21; $row_end= strrpos($view,'{event-options-end}'); //Hacer copia de la fila donde se va a reemplazar el contenido $base_row = substr($view,$row_start,$row_end-$row_start); //Acceder al resultado y crear el diccionario //Revisar que el nombre de los campos coincida con los de la base de datos $rows = ''; foreach ($result as $row) { $new_row = $base_row; $dictionary = array( '{id-event}' => $row['idEvent'], '{event}' => $row['Event'] ); $new_row = strtr($new_row,$dictionary); $rows .= $new_row; } //Reemplazar en la vista la fila base por los option creados y eliminar inicio y fin del option $view = str_replace($base_row, $rows, $view); $view = str_replace('{event-options-start}', '', $view); $view = str_replace('{event-options-end}', '', $view); //Creamos el diccionario //Despues de insertar los campos van con la info insertada y los input estan inactivos $dictionary = array( '{value-idEventRegistry}' => $idEventRegistry, '{value-idVehicle}' => $_POST['idVehicle'], //'{value-idEvent}' => $_POST['idEvent'], '{value-Reason}' => $_POST['Reason'], '{active}' => 'disabled', '{action}' => 'insert' ); //Sustituir los valores en la plantilla $view = strtr($view,$dictionary); //Sustituir el usuario en el header $dictionary = array( '{user-name}' => $_SESSION['user'], '{log-link}' => 'index.php?ctl=logout', '{log-type}' => 'Logout' ); $header = strtr($header,$dictionary); //Agregamos el header y el footer $view = $header.$view.$footer; echo $view; //require_once("View/ShowUser.php"); //Enviamos el correo de que se ha añadido un Registro de Evento. require_once("Controller/mail.php"); //Mandamos como parámetro el asunto, cuerpo y tipo de destinatario*. $subject = "Alta de Registro de Evento"; $body = "El Registro de Evento con los siguientes datos se ha añadido:". "\nId : ". $idEventRegistry. "\nIdVehicle : ". $idVehicle. "\nIdUser : ". $idUser. "\nIdEvent : ". $idEvent. "\nFecha: ". $Date. "\nReason : ". $Reason; //Manadamos el correo solo a administradores y empleados - 6 if(Mailer::sendMail($subject, $body, 6)) { //echo "<br>Correo enviado con éxito."; } else { /*$error = "<br>Error al enviar el correo."; $this -> showErrorView($error);*/ } } else { $error = "Error al insertar el nuevo registro de evento"; $this -> showErrorView($error); } } } else { $error = "No tiene permisos para realizar esta acción"; $this -> showErrorView($error); } break; } case "update" : { //Solo administradores y empleados pueden actualizar los Registros de Eventos. if( !$this->isClient() ) { //Comprobamos que el $_POST no esté vacío, si lo está se mostrará la vista con el formulario para actualizar la información. if(empty($_POST)) { //Se envia como parametro el controlador, la accion, el campo como nos lo va a regresar ne $_POST y el texto a mostrar en el label del input $this -> showGetIdView("eventregistry","update","idEventRegistry","Id RegistroEvento:"); } else { //Comprobamos que el id esté seteado. if(isset($_POST['idEventRegistry'])) { //Limpiamos el id. $idEventRegistry = $this->cleanInt($_POST['idEventRegistry']); //Primero mostramos el id que se quire modificar. //Comprobamos si están seteadas las variables en el POST if(isset($_POST['idVehicle']) && isset($_POST['idEvent']) && isset($_POST['Reason'])) { //La modificación se realizará en base al id. $idVehicle = $this->cleanInt($_POST['idVehicle']); $idUser = $_SESSION['id_user']; //Se pone el id del usuario logueado $idEvent = $this->cleanInt($_POST['idEvent']); $date_array = getdate(); $Date = $date_array['year']."-".$date_array['mon']."-".$date_array['mday']; $Reason = $this->cleanText($_POST['Reason']); //Se llama a la función de modificación. //Se recoge el resultado y en base a este resultado //se imprime un mensaje. if($this->model->update($idEventRegistry,$idVehicle,$idUser,$idEvent,$Reason)) { //Cargamos el formulario $view = file_get_contents("View/EventRegistryForm.html"); $header = file_get_contents("View/header.html"); $footer = file_get_contents("View/footer.html"); //Traer el idEvent insertado, ahora si se pone condicion en el comando $result = $this -> model -> getEvents("idEvent=".$idEvent); //Obtengo la posicion donde se van a insertar los option $row_start = strrpos($view,'{event-options-start}') + 21; $row_end= strrpos($view,'{event-options-end}'); //Hacer copia de la fila donde se va a reemplazar el contenido $base_row = substr($view,$row_start,$row_end-$row_start); //Acceder al resultado y crear el diccionario //Revisar que el nombre de los campos coincida con los de la base de datos $rows = ''; foreach ($result as $row) { $new_row = $base_row; $dictionary = array( '{id-event}' => $row['idEvent'], '{event}' => $row['Event'] ); $new_row = strtr($new_row,$dictionary); $rows .= $new_row; } //Reemplazar en la vista la fila base por los option creados y eliminar inicio y fin del option $view = str_replace($base_row, $rows, $view); $view = str_replace('{event-options-start}', '', $view); $view = str_replace('{event-options-end}', '', $view); //Creamos el diccionario //Despues de insertar los campos van con la info insertada y los input estan inactivos $dictionary = array( '{value-idEventRegistry}' => $idEventRegistry, '{value-idVehicle}' => $idVehicle, //'{value-idEvent}' => $idEvent, '{value-Reason}' => $Reason, '{active}' => 'disabled', '{action}' => 'update' ); //Sustituir los valores en la plantilla $view = strtr($view,$dictionary); //Sustituir el usuario en el header $dictionary = array( '{user-name}' => $_SESSION['user'], '{log-link}' => 'index.php?ctl=logout', '{log-type}' => 'Logout' ); $header = strtr($header,$dictionary); //Agregamos el header y el footer $view = $header.$view.$footer; echo $view; //require_once("View/UpdateUserShow.php"); //Enviamos el correo de que se ha modificado un Registro de Evento. require_once("Controller/mail.php"); //Mandamos como parámetro el asunto, cuerpo y tipo de destinatario*. $subject = "Modificación de Registro de Evento"; $body = "El Registro de Evento con los siguientes datos se ha modificado:". "\nId : ". $idEventRegistry. "\nIdVehicle : ". $idVehicle. "\nIdUser : ". $idUser. "\nIdEvent : ". $idEvent. "\nDate: ". $Date. "\nReason : ". $Reason; //Manadamos el correo solo a administradores y empleados - 6 if(Mailer::sendMail($subject, $body, 6)) { //echo "<br>Correo enviado con éxito."; } else { /*$error = "Error al enviar el correo."; $this -> showErrorView($error);*/ } } else { $error = "Error al modificar el registro de evento."; $this -> showErrorView($error); } } //Si no estan seteadas mostramos la info para actualizar else { if(($result = $this->model->select($idEventRegistry)) != null) { //Cargamos el formulario $view = file_get_contents("View/EventRegistryForm.html"); $header = file_get_contents("View/header.html"); $footer = file_get_contents("View/footer.html"); //Creamos el diccionario //Despues de insertar los campos van con la info insertada y los input estan inactivos $dictionary = array( '{value-idEventRegistry}' => $result[0]['idEventRegistry'], '{value-idVehicle}' => $result[0]['idVehicle'], //'{value-idEvent}' => $result[0]['idEvent'], '{value-Reason}' => $result[0]['Reason'], '{active}' => '', '{action}' => 'update' ); //Sustituir los valores en la plantilla $view = strtr($view,$dictionary); //Poner despues de sustituir los demas datos para no perder la información del select //Para actualizar no se pone condicion, para que esten todas las opciones disponibles $result = $this -> model -> getEvents("0=0"); //Obtengo la posicion donde se van a insertar los option $row_start = strrpos($view,'{event-options-start}') + 21; $row_end= strrpos($view,'{event-options-end}'); //Hacer copia de la fila donde se va a reemplazar el contenido $base_row = substr($view,$row_start,$row_end-$row_start); //Acceder al resultado y crear el diccionario //Revisar que el nombre de los campos coincida con los de la base de datos $rows = ''; foreach ($result as $row) { $new_row = $base_row; $dictionary = array( '{id-event}' => $row['idEvent'], '{event}' => $row['Event'] ); $new_row = strtr($new_row,$dictionary); $rows .= $new_row; } //Reemplazar en la vista la fila base por los option creados y eliminar inicio y fin del option $view = str_replace($base_row, $rows, $view); $view = str_replace('{event-options-start}', '', $view); $view = str_replace('{event-options-end}', '', $view); //Sustituir el usuario en el header $dictionary = array( '{user-name}' => $_SESSION['user'], '{log-link}' => 'index.php?ctl=logout', '{log-type}' => 'Logout' ); $header = strtr($header,$dictionary); //Agregamos el header y el footer $view = $header.$view.$footer; echo $view; } //Si el resultado no contiene información, mostramos el error. else { $error = "Error al traer la información para modificar."; $this -> showErrorView($error); } } } //Sino está seteado, imprimimos el mensaje y se mostrará la vista con el formulario para actualizar la información. else { $error = "Error al tratar de modificar el registro, el id no está seteado."; $this -> showErrorView($error); } } } else { $error = "No tiene permisos para realizar esta acción"; $this -> showErrorView($error); } break; } case "select" : { //Solo administradores y empleados pueden ver los Resgistros de Eventos. if( !$this->isClient() ) { //Comprobamos que el $_POST no esté vacío, si lo está se mostrará la vista con el formulario para hacer select. if(empty($_POST)) { //Si el post está vacio cargamos la vista para solicitar el id a consultar //Se envia como parametro el controlador, la accion, el campo como nos lo va a regresar ne $_POST y el texto a mostrar en el label del input $this -> showGetIdView("eventregistry","select","idEventRegistry","Id RegistroEvento:"); } else { //Comprobamos que el id esté seteado. if(isset($_POST['idEventRegistry'])) { //Limpiamos el id. $idEventRegistry = $this->cleanInt($_POST['idEventRegistry']); //Recogemos el resultado y si contiene información, la mostramos. if(($result = $this->model->select($idEventRegistry)) != null) { //Cargamos el formulario $view = file_get_contents("View/EventRegistryForm.html"); $header = file_get_contents("View/header.html"); $footer = file_get_contents("View/footer.html"); //Acceder al resultado y crear el diccionario //Revisar que el nombre de los campos coincida con los de la base de datos $dictionary = array( '{value-idEventRegistry}' => $result[0]['idEventRegistry'], '{value-idVehicle}' => $result[0]['idVehicle'], //'{value-idEvent}' => $result[0]['idEvent'], '{value-Reason}' => $result[0]['Reason'], '{active}' => 'disabled', '{action}' => 'select' ); //Sustituir los valores en la plantilla $view = strtr($view,$dictionary); //Poner despues de sustituir los demas datos para no perder la información del select //Para actualizar no se pone condicion, para que esten todas las opciones disponibles //Traer el idEvent, ahora si se pone condicion en el comando $result = $this -> model -> getEvents("idEvent=".$result[0]['idEvent']); //Obtengo la posicion donde se van a insertar los option $row_start = strrpos($view,'{event-options-start}') + 21; $row_end= strrpos($view,'{event-options-end}'); //Hacer copia de la fila donde se va a reemplazar el contenido $base_row = substr($view,$row_start,$row_end-$row_start); //Acceder al resultado y crear el diccionario //Revisar que el nombre de los campos coincida con los de la base de datos $rows = ''; foreach ($result as $row) { $new_row = $base_row; $dictionary = array( '{id-event}' => $row['idEvent'], '{event}' => $row['Event'] ); $new_row = strtr($new_row,$dictionary); $rows .= $new_row; } //Reemplazar en la vista la fila base por los option creados y eliminar inicio y fin del option $view = str_replace($base_row, $rows, $view); $view = str_replace('{event-options-start}', '', $view); $view = str_replace('{event-options-end}', '', $view); //Sustituir el usuario en el header $dictionary = array( '{user-name}' => $_SESSION['user'], '{log-link}' => 'index.php?ctl=logout', '{log-type}' => 'Logout' ); $header = strtr($header,$dictionary); //Agregamos el header y el footer $view = $header.$view.$footer; echo $view; } //Si el resultado no contiene información, mostramos el error. else { $error = "Error al tratar de mostrar el registro."; $this -> showErrorView($error); } } //Si el ID no está seteado, se marcará el error y se mostrará la vista con el formulario para hacer select. else { $error = "Error al mostrar el registro, el id no está seteado."; $this -> showErrorView($error); } } } else { $error = "No tiene permisos para realizar esta acción"; $this -> showErrorView($error); } break; } case "delete" : { //Solo administradores y empleados pueden eliminar Registros de Eventos. if( !$this -> isClient() ) { //Comprobamos que el $_POST no esté vacío, si lo está se mostrará la vista con el formulario para eliminar un Registro de Evento. if(empty($_POST)) { //Si el post está vacio cargamos la vista para solicitar el id a eliminar //Se envia como parametro el controlador, la accion, el campo como nos lo va a regresar de $_POST y el texto a mostrar en el label del input $this -> showGetIdView("eventregistry","delete","idEventRegistry","Id RegistroEvento:"); } else { //Comprobamos que el id esté seteado. if(isset($_POST['idEventRegistry'])) { //Limpiamos el id. $idEventRegistry = $this->cleanInt($_POST['idEventRegistry']); //Recogemos el resultado de la eliminación. $result = $this->model->delete($idEventRegistry); //Si la eliminación fue exitosa, mostramos el mensaje. if($result) { //Muestra la vista de que la eliminación se realizó con éxito $this -> showDeleteView(); //Enviamos el correo de que se ha eliminado un Registro de Evento. require_once("Controller/mail.php"); //Mandamos como parámetro el asunto, cuerpo y tipo de destinatario*. $subject = "Eliminación de Registro de Evento"; $body = "El Registro de Evento con los siguientes datos se ha eliminado:". "\nId : ". $idEventRegistry. "\nIdVehicle : ". $idVehicle. "\nIdUser : ". $idUser. "\nIdEvent : ". $idEvent. "\nDate: ". $Date. "\nReason : ". $Reason; //Manadamos el correo solo a administradores y empleados - 6 if(Mailer::sendMail($subject, $body, 6)) { //echo "<br>Correo enviado con éxito."; } else { /*$error = "<br>Error al enviar el correo."; $this -> showErrorView($error);*/ } } //Si no pudimos eliminar, señalamos el error. else { $error = "Error al elimiar el registro de eventos."; $this -> showErrorView($error); } } //Si el id no está seteado, marcamos el error. else { $error = 'No se ha especificado el ID del registro a eliminar'; $this -> showErrorView($error); } } } else { $error = "No tiene permisos para realizar esta acción"; require_once("View/Error.php"); } break; } case "list" : { //Solo si es empleado o administrador puede consultar la lista de eventos if(!$this -> isClient()) { //Revisar si hay un filtro, sino hay se queda el filtro po default $filter = "0=0"; if(isset($_POST['filter_condition'])){ //Creamos la condicion con el campo seleccionadoo y el filtro $filter = $_POST['filter_select']." = '".$_POST['filter_condition']."';"; } //Ejecutamos el query y guardamos el resultado. $result = $this -> model -> getList($filter); if($result !== FALSE) { //Cargamos el formulario $view = file_get_contents("View/EventRegistryTable.html"); $header = file_get_contents("View/header.html"); $footer = file_get_contents("View/footer.html"); //Obtengo la posicion donde va a insertar los registros $row_start = strrpos($view,'{row-start}') + 11; $row_end = strrpos($view,'{row-end}'); //Hacer copia de la fila donde se va a reemplazar el contenido $base_row = substr($view,$row_start,$row_end-$row_start); //Acceder al resultado y crear el diccionario //Revisar que el nombre de los campos coincida con los de la base de datos $rows = ''; foreach ($result as $row) { $new_row = $base_row; $dictionary = array( '{value-idEventRegistry}' => $row['idEventRegistry'], '{value-idVehicle}' => $row['idVehicle'], '{value-idUser}' => $row['User'], '{value-idEvent}' => $row['Event'], '{value-Date}' => $row['Date'], '{value-Reason}' => $row['Reason'], '{active}' => 'disabled' ); $new_row = strtr($new_row,$dictionary); $rows .= $new_row; } //Reemplazar en la vista la fila base por las filas creadas $view = str_replace($base_row, $rows, $view); $view = str_replace('{row-start}', '', $view); $view = str_replace('{row-end}', '', $view); //Sustituir el usuario en el header $dictionary = array( '{user-name}' => $_SESSION['user'], '{log-link}' => 'index.php?ctl=logout', '{log-type}' => 'Logout' ); $header = strtr($header,$dictionary); //Agregamos el header y el footer $view = $header.$view.$footer; echo $view; } else { $error = "No hay registros para mostrar."; $this -> showErrorView($error); } } else { $error = "No tiene permisos para ver esta lista"; $this -> showErrorView($error); } break; } } /* fin switch */ //El logout se hace cuando se especifica //$this -> logout(); } else { //Si no ha iniciado sesion mostrar la vista para hacer login $this -> showLoginView($_GET['ctl'],$_GET['act']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateLogin(){\n // store fieldnames inside the $fieldnames variable\n $fieldnames = ['email', 'password'];\n\n // initialize $error variable and set it as FALSE\n $error = FALSE;\n\n // for each $fieldname, check if its set or empty, if the fieldname is not set or empty then set $error as TRUE\n foreach($fieldnames as $fieldname){\n if(!isset($_POST[$fieldname]) || empty($_POST[$fieldname])){\n $error = TRUE;\n }\n }\n\n // if $error is FALSE\n if(!$error){\n // create variables with $_POST data\n $email = $_POST[\"email\"];\n $wachtwoord = $_POST[\"password\"];\n\n // create new db connection \n $db = new Db('localhost', 'root', '', 'project1', 'utf8');\n\n // login the user\n $db->login($email, $wachtwoord);\n } else{\n // if $error is equal to TRUE then echo Verkeerd wachtwoord of username\n echo '<label>Verkeerd wachtwoord of username</label>';\n }\n }", "public function loginCheck()\n\t{\n\t}", "function verificalogin(){\n if(!isset($this->session->datosusu)){\n return true;\n }\n }", "public function _check_login()\n {\n\n }", "private function check_stored_login() {\n if(isset($_SESSION['admin_id'])) {\n $this->admin_id = $_SESSION['admin_id'];\n $this->username = $_SESSION['username'];\n $this->user_level = $_SESSION['user_level'];\n $this->last_login = $_SESSION['last_login'];\n }\n }", "private function check_login()\n {\n if (self::exists('user_id')) {\n $this->user_id = self::get('user_id');\n $this->logged_in = true;\n } else {\n unset($this->user_id);\n $this->logged_in = false;\n }\n }", "private function compare_with_login()\n {\n }", "public function estValide () {\n // Si les clefs n'existent pas on retourne false\n if (! key_exists(self::PASSWORD_REF, $_POST) or ! key_exists(self::LOGIN_REF, $_POST)) {\n return false;\n }\n $login_valide = $this->loginValide();\n $password_valide = $this->passwordValide();\n return $login_valide and $password_valide;\n }", "public function userWantsToLogin(){\n\t\tif(isset($_POST[self::$login]) && trim($_POST[self::$password]) != '' && trim($_POST[self::$name]) != '') {\n\t\t\t$this->username = $_POST[self::$name];\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function loginValide () {\n $login = $this->donnees[self::LOGIN_REF];\n // Le champ login ne doit pas ?tre vide\n if ($login == null) {\n $this->erreur[self::LOGIN_REF] = \"Veuillez remplir le champ login\";\n return false;\n // Le champ login doit contenir un login pr?sent dans la base de donn?es\n } else if (! $this->utilisateurs->exist($login)) {\n $this->erreur[self::LOGIN_REF] .= \"ce login est inconnu\";\n return false;\n }\n return true;\n }", "function is_login ()\r\n {\r\n if (($this->get_login()) && ($this->get_id() != USER_ID_RESET_VALUE) && ($this->get_name() != USER_NAME_RESET_VALUE) && ($this->get_name() != \"\"))\r\n return TRUE;\r\n return FALSE;\r\n }", "private function validateUserInput() {\n\t\ttry {\n\t\t\t$this->clientUserName = $this->loginObserver->getClientUserName();\n\t\t\t$this->clientPassword = $this->loginObserver->getClientPassword();\n\t\t\t$this->loginModel->validateForm($this->clientUserName, $this->clientPassword);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->message = $e->getMessage();\n\t\t}\n\t}", "public function setLogin(){\n \n\t\t\t$obUser = Model::getUserByEmail($this->table, $this->camp,$this->email);\n\t\t\tif (!$obUser instanceof Model) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\tif (!password_verify($this->password, $obUser->senha)) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\t\n\t\t\t$this->session($obUser);\n\n\t\t\theader('location: '.$this->location);\n\t\t\texit;\n\n\t\t}", "private function check_the_login(){\n \n if(isset($_SESSION['login_user'])){\n \n $this->login_user = $_SESSION['login_user'];\n $this->signed_in = true;\n \n }else{\n unset($this->login_user);\n $this->signed_in = false;\n }\n \n }", "private function check_login(){\n if (isset($_SESSION['email'])){\n $this->email=$_SESSION['email'];\n\t\t\t$this->role=$_SESSION['role'];\n\t\t\t$this->id=$_SESSION['id'];\n $this->signed_in=true;\n }\n else{\n unset($this->email);\n $this->signed_in=false;\n }\n }", "function validate_login($username, $password){\n if (empty($this->username) or empty($this->password)){\n // User has not set its credentials\n print 'Error user has not set user and password.';\n return False;\n }\n if (empty($username) or empty($password)){\n // Empty username or password\n print 'Cannot ser username or password as null.';\n return False;\n }\n if ($username == $this->username and $password == $this->password){\n print 'Username and password are correct.';\n return True;\n }\n }", "public function checkAuthentication() \n {\n if(!isset($this->userInfo['admin_id']) && empty($this->userInfo['admin_id'])) \n {\n redirect('login/loginPage');\n }\n }", "function verificar_login()\n {\n if (!isset($_SESSION['usuario'])) {\n $this->sign_out();\n }\n }", "private function sessionLogin() {\r\n $this->uid = $this->sess->getUid();\r\n $this->email = $this->sess->getEmail();\r\n $this->fname = $this->sess->getFname();\r\n $this->lname = $this->sess->getLname();\r\n $this->isadmin = $this->sess->isAdmin();\r\n }", "public function check_login()\n\t{\n\t\tif(isset($_SESSION[\"user_id\"]))\n\t\t{\n\t\t $this->_user_id = $_SESSION[\"user_id\"];\n\t\t\t$this->_client = $_SESSION[\"client\"];\n\t\t\t$this->_loged_in = true;\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_loged_in = false;\n\t\t\t$this->_client = false;\n\t\t\tunset($this->_user_id);\n\t\t}\n\t}", "public function CheckLogin()\r\n {\r\n $visiteur = new Visiteur();\r\n \r\n //Appelle la fonction Attempt pour verifier le login et le password, si cela correspond $result prends la valeur ID correspondant a l'utilisateur\r\n $result = $visiteur->Attempt($_POST['login'],$_POST['password']);\r\n \r\n //SI l'ID a une valeur, stocke l'ID dans $_SESSION et ramene a la main mage\r\n if (isset($result)){\r\n $_SESSION['uid'] = $result->id;\r\n $this->MainPage();\r\n }\r\n //Sinon, ramene a la page de connexion\r\n else{\r\n $this->LoginPage();\r\n } \r\n }", "public function validateLogin()\n {\n $this->userMapper->validateUserLogin($_POST); // should I use a global directly here?\n }", "private function check_auth( $var ) {\n\t\t\t\n\t\t\tif( $var != null ) {\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function hasLogin()\r\n\t{\r\n\t\treturn (!empty($this->username) && !empty($this->password));\r\n\t}", "private function processFormLogin(){\n\t\t$username = $_REQUEST[\"usuario\"];\n\t\t$password = $_REQUEST[\"password\"];\n\t\t$validar = $this->users->getProcessUser($username, $password);\n\t\tif($validar){\n\t\t\tif (Seguridad::getTipo() == \"0\")\n\t\t\t\tView::redireccion(\"selectTable\", \"userController\");\n\t\t\telse\n\t\t\t\tView::redireccion(\"selectTable\", \"userController\");\n\t\t} else {\n\t\t\t$data[\"informacion\"] = \"Nombre de usuario o contraseña incorrecta.\";\n\t\t\tView::show(\"user/login\", $data);\n\t\t}\n\t}", "function checkLogin() {\n /* Check if user has been remembered */\n if (isset($_COOKIE['cook_VenusetP_UserEmail']) && isset($_COOKIE['cook_Venueset_UserPassword'])) {\n $varUserEmail = $_COOKIE['cook_VenusetP_UserEmail'];\n $varUserPassword = $_COOKIE['cook_Venueset_UserPassword'];\n /* Confirm that username and password are valid */\n $arrUserFlds = array('pkUserID', 'UserEmail', 'UserPassword', 'UserFirstName');\n $varUserWhere = ' 1 AND UserEmail = \\'' . $varUserEmail . '\\' AND UserPassword = \\'' . md5(trim($varUserPassword)) . '\\'';\n //echo '<pre>';print_r($varUserWhere);exit;\n $arrUserList = $this->select(TABLE_USERS, $arrUserFlds, $varUserWhere);\n if (count($arrUserList) > 0) {\n /* $_SESSION['VenusetP_UserEmail'] = $arrUserList[0]['UserEmail'];\n $_SESSION['VenusetP_UserID'] = $arrUserList[0]['pkUserID'];\n $_SESSION['VenusetP_UserName'] = $arrUserList[0]['UserFirstName']; */\n }\n return true;\n } else {\n return false;\n }\n }", "public static function checkCredentials()\n {\n if (null === self::username() || null === self::password()) {\n echo self::errorMessage();\n die(1);\n }\n\n return true;\n }", "function checkValuesExist()\n\t\t\t{\n\t\t\t\tif (!array_key_exists(\"txt_username\", $_POST) || !array_key_exists(\"txt_password\", $_POST) || !isset($_POST[\"txt_username\"]) || !isset($_POST[\"txt_password\"]) || $_POST[\"txt_username\"] == \"\" || $_POST[\"txt_password\"] == \"\")\n\t\t\t\t\treturn \"You must fill in every field.\";\n\t\t\t\t\t\n\t\t\t\treturn null;\n\t\t\t}", "public function v_nuevo(){\n\t\tif($this -> e_user === '' && $this -> e_pass === '' && $this -> e_email === ''){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected function checkLogin()\n {\n if (LOCATION == 'Live') {\n $this->markTestSkipped('Cannot run in Live environment');\n return;\n }\n $this->loginPage->open()\n ->navigateToContactUsViaSideButton()\n ->open()\n ->verifyPageIsLoaded()\n ->checkPageTitle('log in to My Account')\n ->enterUserId($this->userData['standard']['uid'])\n ->enterUserPassword($this->userData['standard']['pwd'])\n ->clickButton();\n }", "public function isLoginRequired()\r\n\t{\r\n\t\treturn true;\r\n\t}", "private function checkLogin()\n {\n if ($this->verifySession()) {\n $this->userId = $this->session['id'];\n }\n if ($this->userId === 0) {\n if ($this->verifyCookie()) {\n $this->userId = $this->cookie['userid'];\n $this->createSession();\n }\n }\n }", "public function check_login(): void\n {\n if ($this->email_activation && $this->user && !$this->user['email_verified']) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect('/register');\n }\n\n if (!$this->user) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect('/login');\n }\n }", "function comprobar_login()\n\t{\n\t$correcto = true; //variable booleana que comprueba si el atributo cuumple o no lo especificado\n\n\t//si los atributos estan vacios\n\tif (strlen($this->login) == 0)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"login\", \"codigoincidencia\" => \"00001\" ,\"mensajeerror\" => \"login vacio\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\tif (strlen($this->login) < 3)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"login\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"]);\n\n\t\t$correcto = false;\n\t}\n\n\t//si los atributos estan vacios\n\tif (strlen($this->login) > 15)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"login\", \"codigoincidencia\" => \"00002\" ,\"mensajeerror\" => \"login demasiado largo, maximo 10 caracteres\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\treturn $correcto;\n}", "public function testLoginValidation() {\n $this->visit('http://londonce.lan/login')\n ->submitForm('Login', ['log' => '', 'password' => ''])\n ->see('Please enter a valid username.')\n ->see('Please enter a valid password.');\n }", "public function chkLogin()\r\n {\r\n global $cookie_prefix;\r\n\t\t\r\n if(\r\n isset($_COOKIE[$cookie_prefix . \"id\"])\r\n &&\r\n isset($_COOKIE[$cookie_prefix . \"pass\"])\r\n )\r\n\t{\r\n #<!-- Sanitize ID -->\r\n $id = $_COOKIE[$cookie_prefix . \"id\"];\r\n\t\t/*$id = mysql_real_escape_string($id);\r\n\t\t$id = strip_tags($id);*/\r\n\t\t$id = parent::protect($id);\r\n\t\t\t\r\n #<!-- Sanitize Pass -->\r\n\t\t$pass = $_COOKIE[$cookie_prefix . \"pass\"];\r\n\t\t/*$pass = mysql_real_escape_string($pass);\r\n\t\t$pass = strip_tags($pass);*/\r\n\t\t$pass = parent::protect($pass);\r\n\t\t\r\n $query = mysql_query(\"SELECT * FROM `hxm_members` WHERE `id` = '$id' AND `password` = '$pass'\");\r\n $result = mysql_num_rows($query);\r\n $data = mysql_fetch_array($query);\r\n\t\t\t\r\n if( $result != 1 )\r\n {\r\n header(\"Location: \" . AUTH);\r\n }\r\n\t\t\t\r\n if( $data[\"group\"] == \"0\" )\r\n {\r\n header(\"Location: \" . AUTH);\r\n }\r\n\t}\r\n\telse\r\n\t{\r\n header(\"Location: \" . AUTH);\r\n\t\t\t\t\r\n\t}\r\n }", "function dame1(){\n\tif(isset($_POST[\"enviando\"])){\n\t\t$usuario = $_POST[\"nombre_usuario\"];\n\t\t$password = $_POST[\"pass_usuario\"];\n\n\t\tif ($usuario==\"jeyson\"&& $password==\"1234\") {\n\t\t\techo \"<p class='validado'> Bienvenido </p>\";\n\n\t\t} else {\n\t\t\techo \"<p class='no_validado'> Usuario y/o password incorrecta </p>\";\n\t\t}\n\t\t\n\n\t}\n}", "public function validate_login() {\n\t\t$userid=$_POST['user_id'];\n\t\t$password=$_POST['password'];\n\t\t$compid=$_POST['company_id'];\n\t\t\n\n\t\t$sql=\"SELECT u.id, u.user_name FROM users u, hmz_cust_info ci where ci.id=u.cust_id\n\t\t\tand u.user_id='$userid' and u.password='$password' and ci.cust_id='$compid';\";\n\t\t$result=$this->runQuery(\"getAll\",$sql);\n\t\tif(count($result)>0) {\n\t\t\t$_SESSION['user_id']=$result[0];\n\t\t\t$_SESSION['user_name']=$result[1];\n\t\t\theader('location: ?a=P&b=dashboard');\n\t\t}\n\t\telse\n\t\t\theader('location: ?a=login&b=f');\n\n\t}", "public function check_login(): void\n {\n if ($this->email_activation and $this->user and !$this->user['email_verified']) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect('/register');\n }\n\n if (!$this->user) {\n $_SESSION['request'] = $_SERVER['REQUEST_URI'];\n redirect($this->login);\n }\n }", "public function isLoginDataFilled()\n {\n $client = $this->Client();\n $credentials = $client->getCredentials();\n\n if (!empty($credentials['bearerToken']) || !empty($credentials['login']) || !empty($credentials['password'])) {\n return true;\n }\n\n return false;\n }", "public function validaDadosLogin()\n {\n $errors = '';\n\n $errors .= $this->validaEmail();\n $errors .= $this->validaSenha();\n\n $userDb = $this->getUserEmail();\n\n if (!strlen($errors)) {\n if (!$userDb instanceof $this) {\n $errors .= 'Usuário não cadastrado!';\n } else {\n //Verifica se a senha informada é a mesma salva no banco\n if (!password_verify($this->senha, $userDb->senha)) {\n $errors .= 'Senha inválida!';\n }\n }\n }\n\n $errors = $this->getMsgFormat($errors, 'alert-danger');\n\n //Se o login deu certo, cria uma sessão com alguns dados\n if (!strlen($errors)) {\n $_SESSION['ADM'] = strtoupper($userDb->administrador) === 'S';\n $_SESSION['CLIENTE'] = strtoupper($userDb->cliente) === 'S';\n $_SESSION['USER_ID'] = $userDb->id;\n $_SESSION['lOGADO'] = true;\n }\n\n return $errors;\n }", "protected function hasLoginBeenProcessed() {}", "private static function isLoginPOST() {\n return isset($_POST[\"LoginView::Login\"]);\n }", "public function is_login(){\n if (empty($this->user['userid'])){\n return false;\n }\n return true;\n }", "private function checkLogin() {\n $login_safe = 0;\n\n if (\\Drupal::moduleHandler()->moduleExists('securelogin')) {\n $secureLoginConfig = $this->config('securelogin.settings')->get();\n if ($secureLoginConfig['all_forms']) {\n $forms_safe = TRUE;\n }\n else {\n // All the required forms should be enabled.\n $required_forms = array(\n 'form_user_login_form',\n 'form_user_form',\n 'form_user_register_form',\n 'form_user_pass_reset',\n 'form_user_pass',\n );\n $forms_safe = TRUE;\n foreach ($required_forms as $form_variable) {\n if (!$secureLoginConfig[$form_variable]) {\n $forms_safe = FALSE;\n break;\n }\n }\n }\n // \\Drupal::request()->isSecure() ($conf['https'] in D7) should be false\n // for expected behavior.\n if ($forms_safe && !\\Drupal::request()->isSecure()) {\n $login_safe = 1;\n }\n }\n\n return $login_safe;\n }", "public function validarCredenciales() {\n try {\n $host = $this->dataPost->getServer('HTTP_HOST');\n $dr = $this->dataPost->getServer('DOCUMENT_ROOT');\n if (!isset($this->dataSession->logged)) {\n header('HTTP/1.0 401 Unauthorized');\n header(\"Location: http://$host/comun/Security/Header/401.html\");\n exit();\n } else {\n if (isset($this->dataSession->lastAccess)) {\n $lastAccessed = $this->dataSession->lastAccess;\n $currentAccessed = $this->dataSession->currentAccess;\n $passedTime = (strtotime($currentAccessed) - strtotime($lastAccessed));\n $fileConfigSystem = $dr . \"/comun/comun/xml/system.xml\";\n $xmlConfigSystem = simplexml_load_file($fileConfigSystem);\n $sessiontime = ($xmlConfigSystem != false) ? (int) $xmlConfigSystem->environment->sessiontime : 900;\n if ($passedTime >= $sessiontime) {\n $this->dataSession->destroy();\n header(\"Location: http://$host/app/index/index.php/index/expired\");\n exit();\n } else {\n $this->dataSession->lastAccess = date(\"Y-n-j H:i:s\");\n }\n } else {\n $this->dataSession->lastAccess = date(\"Y-n-j H:i:s\");\n }\n }\n } catch (Exception $exc) {\n throw $exc;\n }\n }", "public function loginForm(){\n self::$loginEmail = $_POST['login-email'];\n self::$loginPassword = $_POST['login-password'];\n \n self::sanitize();\n $this->tryLogIn();\n }", "public function check_login(){\n\t\t\tif( isset( $_SESSION['user_id'] ) ) {\n\t\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset( $this->user_id );\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function checkFirstLogin();", "public function loginValidate()\n\t{\n\n\t\t$this->__set('email', $_POST['email']);\n\t\t$this->__set('password', $_POST['password']);\n\n\t\t$result = $this->validar();\n\n\t\tif (empty($result)) {\n\t\t\theader('location: /?erro=0');\n\t\t} else {\n\t\t\tsession_start();\n\t\t\t$_SESSION = $result;\n\t\t\theader('location: /main');\n\t\t}\n\t}", "function validate() {\n\t\t\t$email = htmlspecialchars($_POST['email']);\n\t\t\t$ad = Admin::auth($email);\n\t\t\t$pass = $_POST['pass']; \n\t\t\tif ($pass== $ad['contrasenia']) {\n\t\t\t\t$_SESSION['admin'] = $ad;\n\t\t\t\theader(\"Location: ../../contenido/principal/\");\n\t\t\t}else {\n\t\t\t\theader(\"Location: ../../login/\");\n\t\t\t}\n\n\t\t}", "public function Login_Validation($sorce){\r\n\r\n // Set validation flag as true\r\n $this->_flag = true;\r\n\r\n // Validate $username\r\n self::Username_Login_Validation($sorce);\r\n\r\n // Validate $username\r\n self::Password_Login_Validation($sorce);\r\n }", "public function isLogin();", "public function checkLogin() {\n\n /* Check if user has been remembered */\n if (isset($_COOKIE['cookname']) && isset($_COOKIE['cookid'])) {\n $this->username = $_SESSION['username'] = $_COOKIE['cookname'];\n $this->userid = $_SESSION['user_id'] = $_COOKIE['cookid'];\n }\n\n /* Username and userid have been set and not guest */\n if (isset($_SESSION['username']) && isset($_SESSION['user_id']) &&\n $_SESSION['username'] != GUEST_NAME) {\n /* Confirm that username and userid are valid */\n if ($this->connection->confirmUserID($_SESSION['username'], $_SESSION['user_id']) != 0) {\n /* Variables are incorrect, user not logged in */\n unset($_SESSION['username']);\n unset($_SESSION['user_id']);\n return false;\n }\n\n /* User is logged in, set class variables */\n $this->userinfo = $this->connection->getUserInfo($_SESSION['username']);\n $this->username = $this->userinfo['username'];\n $this->userid = $this->userinfo['user_id'];\n $this->userlevel = $this->userinfo['userlevel'];\n return true;\n }\n /* User not logged in */ else {\n return false;\n }\n }", "public function check(){ \r\n $username = $this->validate($_POST['username']);\r\n $password = md5($this->validate($_POST['password']));\r\n \r\n $query = $this->admin->selectWhere(array('username'=>$username, 'password'=>$password));\r\n \r\n $data = $this->admin->getResult($query);\r\n $jml = $this->admin->getRows($query);\r\n \r\n if($jml>0){\r\n $data = $data[0];\r\n $_SESSION['username'] = $data['username'];\r\n $_SESSION['password'] = $data['password'];\r\n \r\n $this->redirect('admin');\r\n }else{\r\n $view = $this->view('admin/login');\r\n $view->bind('msg', 'Username atau Password salah!');\r\n }\r\n \r\n }", "public function checkLogin(){\n $dbQuery = new DBQuery(\"\", \"\", \"\");\n $this->email = $dbQuery->clearSQLInjection($this->email);\n $this->senha = $dbQuery->clearSQLInjection($this->senha);\n \n // Verificar quantas linhas um Select por Email e Senha realiza \n $resultSet = $this->usuarioDAO->select(\" email='\".$this->email.\"' and senha='\".$this->senha.\"' \");\n $qtdLines = mysqli_num_rows($resultSet);\n \n // Pegar o idUsuario da 1ª linha retornada do banco\n $lines = mysqli_fetch_assoc($resultSet);\n $idUsuario = $lines[\"idUsuario\"];\n \n\n \n // retorna aonde a função foi chamada TRUE ou FALSE para se tem mais de 0 linhas\n if ( $qtdLines > 0 ){\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n $_SESSION[\"idUsuario\"] = $idUsuario;\n $_SESSION[\"email\"] = $this->email;\n return(true);\n }else{\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n unset($_SESSION[\"idUsuario\"]);\n unset($_SESSION[\"email\"]);\n return(false);\n }\n }", "public function verifierChamps(){\n $test = false;\n if((!empty($this->get_l_name())) && !empty($this->get_f_name()) && !empty($this->get_user_name()) && !empty($this->get_email()) && !empty($this->get_password()) && !empty($this->get_filier()) && !empty($this->get_phone()) && !empty($this->get_gender()) && !empty($this->get_level())){\n $test = true;\n }\n return $test;\n }", "public function checkAuthentication() {}", "public function testCheckIfAllLoginFieldsHaveInput()\n {\n $validate = new Validate();\n $_POST['username'] = 'Alexander';\n $_POST['password'] = '123';\n\n $validate->check($_POST, array(\n 'username' => array(\n 'required' => true,\n ),\n 'password' => array(\n 'required' => true,\n ),\n ));\n\n $this->assertTrue($validate->passed());\n }", "public function testLoginValidationPass() {\n $this->visit('http://londonce.lan/login')\n ->submitForm('Login', ['log' => '', 'password' => 'sfaff'])\n ->see('Please enter a valid username.');\n }", "public function checkLogin() {\r\n\t\t$post = $this -> sanitize();\r\n\t\textract($post);\r\n\t\t// Hash the password that was entered into the form (if it was correct, it will match the hashed password in the database)\r\n\t\t$password = sha1($password);\r\n\t\t// Query\r\n\t\t$query = \"SELECT username, userID, profilePic, access, email FROM users WHERE username='$username' AND password='$password'\";\r\n\t\t$data = $this -> singleSelectQuery($query);\r\n\t\tif($data){\r\n\t\t\t//set up the session\r\n\t\t\t$_SESSION['userID'] = $data['userID'];\r\n\t\t\t$_SESSION['username'] = $data['username'];\r\n\t\t\t$_SESSION['profilePic'] = $data['profilePic'];\r\n\t\t\t$_SESSION['userType'] = $data['userType'];\r\n\t\t\t$_SESSION['access'] = $data['access'];\r\n\t\t\t//redirects to their profile\r\n\t\t\theader('location: index.php?page=profile&userID='.$_SESSION['userID']);\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "function is_login()\n {\n }", "function read(){\n\t\t\t\t\tif(isset($_POST['username']) && isset($_POST['password']) ){\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t$this->_username = $_POST['username'];\n\t\t\t\t\t\t\t\t$this->_password = $_POST['password'];\n\t\t\t\t\t\t\t\t$this->_flag=true;\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}catch(Exception $e){\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}//if\n\t\t\t\t}", "private function checkLogin()\n {\n // save the user's destination in case we direct them to authenticate\n\n // whitelist authentication mechanisms\n if($this->_controller == \"authenticate\")\n return;\n\n // whitelist database reload\n if($this->_controller == \"populatetestdata\")\n return;\n\n if(!isset($_SESSION['userid']))\n {\n // Don't redirect the user to an error page just in principle\n // @todo possible @bug why would it do this?\n if($this->_controller != \"error\" && $this->_controller != \"undefined\")\n {\n $this->slogger->slog(\"saving destination to \" . $this->_controller, SLOG_DEBUG);\n $_SESSION['destination'] = $this->_controller;\n }\n redirect('authenticate');\n\n }\n\n }", "public function testLoginValid(){\r\n\t\t\t$testLogin = [\r\n\t\t\t\t'username' => 'Right',\r\n\t\t\t\t'password' => 'Wrong'\r\n\t\t\t];\r\n\t\t\t$validLogin = loginTest($testLogin);\r\n\t\t\t$this->assertTrue($validLogin);\r\n\t\t}", "function verificarlogin(){\n\t\t//Verificar si estan los datos\n\t\tif((!isset($_POST[\"nomUsuario\"]) || (!isset($_POST[\"pass\"])))){\n\n\t\t}\n\t\t//Variables a usar\n\t\t$nomUsuario=$_POST['nomUsuario'];\n \t\t$contrasenia=$_POST['pass'];\n \t\t//Se llama al metodo y pasan parametros\n \t\t$verificar = Usuario::verificarUsuario($nomUsuario,$contrasenia);\n \t\tif(!$verificar){\n \t\t\t $estatus = \"Datos incorrectos\";\n \t\t\trequire \"app/Views/login.php\";\n\n }else{\n \n \t\t // $_SESSION['Usuarios']=$verificar;\n \t$_SESSION['Usuarios']=$nomUsuario;\n header(\"Location:/Proyecto/index.php?controller=Publicaciones&action=home\");\n }\n\n\t}", "private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public function loginDefaultValues(){\n return [\n 'username' => '',\n 'password' => ''\n ];\n }", "private function setUserPass(){\n if($this->_request->get(login_user)){\n $this->_user = $this->_request->get(login_user);\n }else{\n $this->_user = $this->getCookie();\n }\n $this->_pass = $this->_request->get('login-password');\n }", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "function _genLogin()\n {\n $this->mismatch = false;\n if (isset($_POST['login']) && $this->_verify() == \"\") {\n $this->name_post = $_POST['gebruikersnaam'];\n $this->pass_post = $_POST['wachtwoord'];\n\n $this->_getFromGebruikersDb($this->name_post);\n if ($this->_isMatch()) {\n $_SESSION['ingelogd'] = true;\n //toegevoegd door rens om een gebruikersnaam en rol te krijgen\n $_SESSION['gebruikersnaam'] = $this->name_post;\n $_SESSION['Rol'] = $this->role_db;\n header('location: Login_Redir.php');\n }\n }\n }", "public static function check_log_in ()\n {\n session_start();\n\n if (!$_SESSION['user_data']) {\n header('Location: ./../index.php');\n exit;\n }\n }", "function CheckLogin(){\n\tif($_SESSION['userid']==''||!isset($_SESSION['userid'])){\n\t\tdie();\n\t}\n}", "function get_info() {\n\n\n\n echo $this->username;\n echo $this->password;\n\n\n if ( ! $this->username || ! $this->password) {\n // CODE TO RELOAD SIGN-IN PAGE WITH 'ERROR' MESSAGE\n }\n\n else {\n echo $this->username;\n echo $this->password;\n\n $this->setup_page();\n\n // $this->connect_to_database();\n }\n }", "function user_pass_ok($user_login, $user_pass)\n {\n }", "public static function checkLoginCookie() {\n\t\tif (!LoginHandler::userIsLoggedIn()) {\n\t\t\tif (CookieHandler::isSetCookie(\"user_name\") && CookieHandler::isSetCookie(\"password\")) {\n\t\t\t\t$cookieUserName = CookieHandler::getCookie(\"user_name\");\n\t\t\t\t$cookiePassword = CookieHandler::getCookie(\"password\");\t\t\t\n\t\t\t\tif (LoginHandler::checkLogin($cookieUserName, $cookiePassword) == \"ok\") {\n\t\t\t\t\tLoginHandler::loginUser($cookieUserName, $cookiePassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function testLoginname(){\r\n\t\t\t$testLogin = [\r\n\t\t\t\t'username' => '',\r\n\t\t\t\t'password' => ''\r\n\t\t\t];\r\n\t\t\t$validLogin = loginTest($testLogin);\r\n\t\t\t$this->assertFalse($validLogin);\r\n\t\t}", "public function checkLogin(): bool{\n\t\treturn isset($_SESSION['user']['role']);\n\t}", "private function login(){\n \n }", "public function authUser()\n {\n //я не знаю почему, что эти функции возвращают пустые строки...\n //$login = mysql_real_escape_string($_POST['login']);\n //$password = mysql_real_escape_string($_POST['password']);\n $login = $_POST['login'];\n $password = $_POST['password'];\n if(DBunit::checkLoginPassword($login, $password)){\n DBunit::createUserSession(DBunit::getUser($login, $password));\n return true;\n }\n else {\n return false;\n }\n }", "public function vxLoginCheck() {\n\t\t$rt = array();\n\t\t\n\t\t$rt['target'] = 'welcome';\n\t\t$rt['return'] = '';\n\t\t\n\t\t$rt['errors'] = 0;\n\t\t\n\t\t$rt['usr_value'] = '';\n\t\t$rt['usr_email_value'] = '';\n\t\t/* usr_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t999 => unspecific */\n\t\t$rt['usr_error'] = 0;\n\t\t$rt['usr_error_msg'] = array(1 => '你忘记填写名字了');\n\t\t\n\t\t$rt['usr_password_value'] = '';\n\t\t/* usr_password_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => mismatch\n\t\t999 => unspecific */\n\t\t$rt['usr_password_error'] = 0;\n\t\t$rt['usr_password_error_msg'] = array(1 => '你忘记填写密码了', 2 => '名字或者密码有错误');\n\n\t\tif (isset($_POST['return'])) {\n\t\t\t$rt['return'] = trim($_POST['return']);\n\t\t}\n\t\t\n\t\tif (isset($_POST['usr'])) {\n\t\t\t$rt['usr_value'] = strtolower(make_single_safe($_POST['usr']));\n\t\t\tif (strlen($rt['usr_value']) == 0) {\n\t\t\t\t$rt['usr_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif ($rt['errors'] > 0) {\n\t\t\t$rt['target'] = 'error';\n\t\t\treturn $rt;\n\t\t}\n\t\t\n\t\tif (isset($_POST['usr_password'])) {\n\t\t\t$rt['usr_password_value'] = make_single_safe($_POST['usr_password']);\n\t\t\tif (strlen($rt['usr_password_value']) == 0) {\n\t\t\t\t$rt['usr_password_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_password_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif ($rt['errors'] > 0) {\n\t\t\t$rt['target'] = 'error';\n\t\t\treturn $rt;\n\t\t}\n\t\t\n\t\t$sql = \"SELECT usr_id FROM babel_user WHERE usr_email = '\" . $rt['usr_value'] . \"' AND usr_password = '\" . sha1($rt['usr_password_value']) . \"'\";\n\t\t$rs = mysql_query($sql, $this->db);\n\t\tif (mysql_num_rows($rs) == 1) {\n\t\t\t$rt['usr_email_value'] = $rt['usr_value'];\n\t\t\t$rt['target'] = 'ok';\n\t\t} else {\n\t\t\t$sql = \"SELECT usr_id, usr_email FROM babel_user WHERE usr_nick = '\" . $rt['usr_value'] . \"' AND usr_password = '\" . sha1($rt['usr_password_value']) . \"'\";\n\t\t\t$rs = mysql_query($sql, $this->db);\n\t\t\tif (mysql_num_rows($rs) == 1) {\n\t\t\t\t$O = mysql_fetch_object($rs);\n\t\t\t\t$rt['usr_email_value'] = $O->usr_email;\n\t\t\t\t$rt['target'] = 'ok';\n\t\t\t} else {\n\t\t\t\t$rt['target'] = 'error';\n\t\t\t\t$rt['usr_password_error'] = 2;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t}\n\t\tmysql_free_result($rs);\n\t\t\n\t\treturn $rt;\n\t}", "function checkLogin(){\n $sql = \"SELECT * FROM settings\";\n $result = mysql_query($sql);\n $row = mysql_fetch_array($result);\n $_SESSION['points_on'] = $row['points_on'];\n $_SESSION['system_name'] = $row['system_name'];\n /* Username and password have been set */\n if(isset($_SESSION['username']) && isset($_SESSION['password'])){\n /* Confirm that username and password are valid */\n if(confirmUser($_SESSION['username'], $_SESSION['password']) != 0){\n /* Variables are incorrect, user not logged in */\n unset($_SESSION['username']);\n unset($_SESSION['password']);\n return false;\n }\n return true;\n }\n /* User not logged in */\n else{\n return false;\n }\n}", "function emptyInputLogin($username, $password){\r\n $result;\r\n if(empty($username) || empty($password)){\r\n $result = true;\r\n }else{\r\n $result = false;\r\n }\r\n return $result;\r\n }", "private function initAuthVariables() {\n\t\t\n\t\tif($this->Auth->user(\"user_group_id\")) {\n\t\t\t\n\t\t\t$this->auth_user_group_id = $this->Auth->user(\"user_group_id\");\n\t\t\t\n\t\t}\n\t\t\n\t\tif($this->Auth->user(\"id\")) {\n\t\t\t\n\t\t\t$this->auth_user_id = $this->Auth->user(\"id\");\n\t\t\t$this->user_id_scope = $this->Auth->user(\"id\");\n\t\t\t$this->Session->write(\"user_id_scope\",$this->Auth->User(\"id\"));\n\t\t\t\n\t\t}\n\t\t\n\t\tif($this->Auth->user(\"parent_id\")) {\n\t\t\t\n\t\t\t$this->user_id_scope = $this->Auth->user(\"parent_id\");\n\t\t\t$this->Session->write(\"user_id_scope\",$this->Auth->User(\"parent_id\"));\n\t\t}\n\t\t\n\t\tif($this->Auth->user(\"user_group_id\")==10) {\n\t\t\t\n\t\t\t$this->setAdmin(true);\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t$this->setAdmin(false);\n\t\t\t\n\t\t}\n\t\t\n\t}", "function validateLogin() {\n $this->check_lang();\n $logged_in = $this->session->userdata('logged_in');\n if ((isset($logged_in) || $logged_in == true)) {\n if ($logged_in != \"admin\") {\n redirect('/admin/index/login', 'refresh');\n }\n } else {\n redirect('/admin/index/login', 'refresh');\n }\n }", "public function validateLogin() {\n if (isset($_POST['submit'])) {\n $errors = array();\n\n $required_fields = array('username', 'password');\n $errors = array_merge($errors, checkRequiredFields($required_fields));\n\n $username = trim($_POST['username']);\n $password = trim($_POST['password']);\n\n if (empty($errors)) {\n $conn = CTSQLite::connect();\n\n\n //check database if user and password exist\n $query = \"SELECT id, username ,role \";\n $query .= \"FROM ic_user \";\n $query .= \"WHERE username = '{$username}' \";\n $query .= \"password = '{$password}' \";\n $query .= \"LIMIT 1\";\n\n $result = $conn->query($query);\n confirm_query($result);\n\n if (sqlite_num_rows($result) == 1) {\n $user = $result->fetchArray();\n $role = $user['role'];\n CT::user()->setRole($role);\n }\n } else {\n if (count($errors) == 1) {\n // 1 error ocurred\n $message = \"There was 1 error in the form\";\n } else {\n //more than 1 error occured\n $message = \"There were\" . count($errors) . \"errors in the form\";\n }\n }\n } else {\n //form has not been submitted\n }\n }", "private function _checkAuth()\n { if(!(isset($_SERVER['HTTP_X_USERNAME']) and isset($_SERVER['HTTP_X_PASSWORD']))) {\n // Error: Unauthorized\n $this->_sendResponse(401);\n }\n $username = $_SERVER['HTTP_X_USERNAME'];\n $password = $_SERVER['HTTP_X_PASSWORD'];\n // Find the user\n $user=User::model()->find('LOWER(username)=?',array(strtolower($username)));\n if($user===null) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: User Name is invalid');\n } else if(!$user->validatePassword($password)) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: User Password is invalid');\n }\n }", "public function validateLogin() {\n $email = valOr($_REQUEST,'email','');\n $password = valOr($_REQUEST,'pwd','');\n\n $stmt = $this->hcatServer->dbh->prepare(\"select * from hcat.user where email=:email\");\n $stmt->bindValue(':email', $email, PDO::PARAM_STR);\n $stmt->execute();\n $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n $_SESSION['email']='';\n $_SESSION['uid']=0;\n\n $message = '';\n if (sizeof($rows)==1) {\n $hash = $rows[0]['pwdhash'];\n if ( password_verify ( $password , $hash )) {\n $_SESSION['email']=$email;\n $_SESSION['uid']=$rows[0]['uid'];\n $this->hcatServer->setLogin();\n\n } else {\n $message = 'Bad password';\n }\n\n } else {\n $message = 'Bad email';\n }\n\n\n $_SESSION['message']=$message;\n return ($_SESSION['email']!='');\n }", "private function checkSignIn () {\n\n if (!empty($_POST)) {\n if (!isset($_POST['nickname']) || empty($_POST['nickname'])) {\n $_SESSION['errors']['nickname'] = \"Veuillez remplir le champ 'nickname' pour finaliser votre inscription.\";\n }\n else {\n $this->nickname = htmlentities($_POST['nickname']);\n }\n\n if (!isset($_POST['birthdate']) || empty($_POST['birthdate'])) {\n $_SESSION['errors']['birthdate'] = \"Veuillez indiquez votre dâte de naissance pour finaliser votre inscription.\";\n }\n else {\n $this->birthdate = htmlentities($_POST['birthdate']);\n }\n\n if (!isset($_POST['email']) || empty($_POST['email'])) {\n $_SESSION['errors']['email'] = \"Veuillez indiquez une adresse e-mail pour finaliser votre inscription.\";\n }\n else if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) {\n $_SESSION['errors']['validateMail'] = \"Veuillez indiquez une adresse e-mail au format e-mail tel que : '[email protected]' pour finaliser votre inscription.\";\n }\n else if ($this->checkMail($_POST['email'])) {\n $_SESSION['errors']['email'] = \"L'adresse e-mail indiquée est déjà utilisé par un autre utilisateur. Veuillez en choisir une autre pour finaliser votre inscription.\";\n }\n else if (empty($_POST['validateMail'])) {\n $_SESSION['errors']['validateMail'] = \"Veuillez indiquez votre adresse e-mail une seconde fois pour finaliser votre inscription.\";\n }\n else if ($_POST['email'] !== $_POST['validateMail']) {\n $_SESSION['errors']['validateMail'] = \"Veuillez indiquez deux adresse e-mail identiques pour finaliser votre inscription.\";\n }\n else {\n $this->email = htmlentities($_POST['email']);\n }\n\n if (empty($_POST['location'])) {\n $_SESSION['errors']['location'] = \"Veuillez indiquez votre adresse pour finaliser l'inscription.\";\n } else {\n $this->location = htmlentities($_POST['location']);\n }\n\n if (empty($_POST['phone'])) {\n $_SESSION['errors']['phone'] = \"Veuillez indiquez votre numero de phone pour finaliser l'inscription.\";\n }\n else {\n $this->phone = htmlentities($_POST['phone']);\n }\n\n if (empty($_POST['password'])) {\n $_SESSION['errors']['password'] = \"Veuillez indiquez un mot de passe pour finaliser votre inscription\";\n }\n else if (strlen($_POST['password']) < 8) {\n $_SESSION['errors']['password'] = \"Votre mot de passe doit contenir au minimum 8 caractères pour finaliser votre inscription.\";\n }\n else if (empty($_POST['passwordConfirm'])) {\n $_SESSION['errors']['passwordConfirm'] = \"Veuillez indiquez un mot de passe pour finaliser votre inscription\";\n }\n else if ($_POST['password'] != $_POST['passwordConfirm']) {\n $_SESSION['errors']['password'] = \"Veuillez indiquez deux mots de passes identiques pour finaliser votre inscription.\";\n }\n else {\n $this->password = UtilsClass::hash($_POST['password']);\n }\n\n if (empty($_POST['username'])) {\n $_SESSION['errors']['username'] = \"Veuillez remplir le champs login pour poursuivre votre inscription\";\n }\n else if (UsersClass::checkLogin($_POST['username'])) {\n $_SESSION['errors']['username'] = \"Le login indiqué est déjà utilisé par un autre utilisateur. Veuillez en choisir un autre pour finaliser votre inscription.\";\n }\n else {\n $this->username = htmlentities($_POST['username']);\n }\n }\n }", "function authEstaAutenticado() {\n return isset($_SESSION['usuario_admin']);\n}", "function checkLoginForm($input)\n\t{\n\t\t//проверяем наличие данных для логина\n\t\tif (array_key_exists('login_form_sent', $input)\n\t\t\tand\n\t\t\tarray_key_exists('navbar_username', $input)\n\t\t\tand\n\t\t\tarray_key_exists('navbar_pwd', $input)\n\t\t) {\n\t\t\t//фильтруем их\n\t\t\t$password = (string)$input['navbar_pwd'];\n\t\t\t$name = (string)$input['navbar_username'];\n\t\t\t$hash = $this->mapper->getHashByName($name);\n\t\t\t//проверяем полученный хеш (если ошибка, вместо него false)\n\t\t\tif ($hash !== false) {\n\t\t\t\t//проверка совпадения\n\t\t\t\tif (password_verify($password, $hash)) {\n\t\t\t\t\t//если пользователь дал корректные данные, получаем его ID и возвращаем\n\t\t\t\t\t$result = $this->mapper->getUserByName($name)->getId();\n\t\t\t\t} else {\n\t\t\t\t\t$result = false;\n\t\t\t\t}\n\t\t\t\t//проверка, не обновился ли стандартный способ хэширования в php\n\t\t\t\tif (password_needs_rehash($hash, PASSWORD_DEFAULT)) {\n\t\t\t\t\t$hash = password_hash($password, PASSWORD_DEFAULT);\n\t\t\t\t\t$this->mapper->changeHashForUser($name, $hash);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$result = false;\n\t\t\t}\n\t\t} else {\n\t\t\t$result = false;\n\t\t}\n\n\t\treturn $result;\n\n\t}", "private function check_login() {\n\t\t\t// If we have a cookie, but the session variables are not set,\n\t\t\t// then we need to get the data and set the proper variables.\n\t\t\tif (!empty($_COOKIE['fauth'])) {\n\t\t\t\t$this->uid = $_COOKIE['fauth'];\n\t\t\t\n\t\t\t\tif (!isset($_SESSION['uid']) || \n\t\t\t\t\t\t!isset($_SESSION['username']) || \n\t\t\t\t\t\t$_SESSION['uid'] != $_COOKIE['fauth']) {\n\t\t\t\t\t// Find the user's object.\n\t\t\t\t\t$user = User::find_by_id($_COOKIE['fauth']);\n\t\t\t\t\t\n\t\t\t\t\t// Set the session variables.\n\t\t\t\t\t$_SESSION['uid'] = $user->id;\n\t\t\t\t\t$_SESSION['username'] = $user->username;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Log the user in.\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->uid);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public function testLoginPassword(){\r\n\t\t\t$testLogin = [\r\n\t\t\t\t'username' => 'Right',\r\n\t\t\t\t'password' => ''\r\n\t\t\t];\r\n\t\t\t$validLogin = loginTest($testLogin);\r\n\t\t\t$this->assertFalse($validLogin);\r\n\t\t}", "public function isLogin() : bool\n {\n\n\n return (bool) Session::key()->currentUser;\n\n //return $this->validate();\n\n }", "function verify_login() {\n //Validation Rules\n $this->form_validation->set_rules('username','Username','trim|required|min_length[3]|xss_clean');\n $this->form_validation->set_rules('password','Password','trim|required|min_length[3]|xss_clean');\n\n if (!$this->form_validation->run()) {\n return false ;\n } else {\n return true;\n }\n }", "static public function is_login( Request $request ){\n return 0;\n }", "public function loginValidated()\n\t\t{\n\t\t\t$campos = array('*');\n\t\t\t\n\t\t\t$pw = $this->_objCrypt->encrypt($this->_password);\n\n\t\t\t# Campos que se incluyen en la validacion WHERE DE LA SQL\n\t\t\t$field['userName'] = $this->_userName;\n\t\t\t$register = Usuario::findCustom($campos, $field);\n\n\t\t\t# Validación nombre usuario en BD\n\t\t\tif (empty($register)) {\n\t\t\t\t$json_error = array('success' => 'error', 'error' => 'error1');\n\t\t\t\t$success = json_encode($json_error);\n\t\t\t\tsetcookie(\"success\", $success, time() + 60, \"/\"); \n\t\t\t\theader('location:../views/users/login.php');\n\t\t\t}else{\n\t\t\t\t# pw que se obtiene de BD\n\t\t\t\t$pw_DB = $register[0]->getPassword();\n\n\t\t\t\t# Validacion coincidencia de contraseñas\n\t\t\t\tif ($pw !== $pw_DB) {\n\t\t\t\t\t$json_error = array('success' => 'error', 'error' => 'error2');\n\t\t\t\t\t$success = json_encode($json_error);\n\t\t\t\t\tsetcookie(\"success\", $success, time() + 60, \"/\"); \n\t\t\t\t\theader('location:../views/users/login.php');\n\t\t\t\t}else{\n\t\t\t\t\t$data_session['id_user'] \t= $register[0]->getId();\t\t\t\t\t\n\t\t\t\t\t$data_session['nombre'] \t= $register[0]->getNombre();\t\t\t\n\t\t\t\t\t$data_session['apellido'] \t\t= $register[0]->getApellido();\t\t\t\n\t\t\t\t\t$data_session['tipoUsuario']\t= $register[0]->getTipoUsuario();\t\t\t\n\t\t\t\t\t$data_session['userName'] \t\t= $register[0]->getUserName();\t\t\t\n\t\t\t\t\t$data_session['email'] \t\t = $register[0]->getEmail();\t\t\t\n\t\t\t\t\t$data_session['telFijo'] \t\t= $register[0]->getTelFijo();\t\t\t\n\t\t\t\t\t$data_session['telMovil'] \t\t= $register[0]->getTelMovil();\t\t\t\n\t\t\t\t\t$data_session['estado'] \t\t= $register[0]->getEstado();\n\t\t\t\t\t$data_session['lan']\t\t\t= $_COOKIE['lan'];\n\t\t\t\t\t\n\t\t\t\t\t$obj_Session = new Simple_sessions();\n\t\t\t\t\t$obj_Session->add_sess($data_session);\n\n\t\t\t\t\theader('location:../views/users/crearUsuario.php');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function PMA_auth_check()\n {\n global $PHP_AUTH_USER, $PHP_AUTH_PW;\n global $HTTP_COOKIE_VARS;\n global $pma_username, $pma_password, $old_usr;\n global $from_cookie;\n\n // Initialization\n $PHP_AUTH_USER = $PHP_AUTH_PW = '';\n $from_cookie = FALSE;\n\n // The user wants to be logged out -> delete password cookie\n if (!empty($old_usr)) {\n setcookie('pma_cookie_password', '', 0, $GLOBALS['cookie_path'], '' , $GLOBALS['is_https']);\n }\n\n // The user just logged in\n else if (!empty($pma_username)) {\n $PHP_AUTH_USER = $pma_username;\n $PHP_AUTH_PW = (empty($pma_password)) ? '' : $pma_password;\n }\n\n // At the end, try to set the $PHP_AUTH_USER & $PHP_AUTH_PW variables\n // from cookies whatever are the values of the 'register_globals' and\n // the 'variables_order' directives\n else {\n if (!empty($pma_cookie_username)) {\n $PHP_AUTH_USER = $pma_cookie_username;\n }\n else if (!empty($_COOKIE) && isset($_COOKIE['pma_cookie_username'])) {\n $PHP_AUTH_USER = $_COOKIE['pma_cookie_username'];\n }\n else if (!empty($HTTP_COOKIE_VARS) && isset($HTTP_COOKIE_VARS['pma_cookie_username'])) {\n $PHP_AUTH_USER = $HTTP_COOKIE_VARS['pma_cookie_username'];\n }\n if (!empty($pma_cookie_password)) {\n $PHP_AUTH_PW = $pma_cookie_password;\n $from_cookie = TRUE;\n }\n else if (!empty($_COOKIE) && isset($_COOKIE['pma_cookie_password'])) {\n $PHP_AUTH_PW = $_COOKIE['pma_cookie_password'];\n $from_cookie = TRUE;\n }\n else if (!empty($HTTP_COOKIE_VARS) && isset($HTTP_COOKIE_VARS['pma_cookie_password'])) {\n $PHP_AUTH_PW = $HTTP_COOKIE_VARS['pma_cookie_password'];\n $from_cookie = TRUE;\n }\n }\n\n // Returns whether we get authentication settings or not\n if (empty($PHP_AUTH_USER)) {\n return FALSE;\n } else {\n if (get_magic_quotes_gpc()) {\n $PHP_AUTH_USER = stripslashes($PHP_AUTH_USER);\n $PHP_AUTH_PW = stripslashes($PHP_AUTH_PW);\n }\n return TRUE;\n }\n }", "public function init_credentials()\n\t{\n\t\tif($this->get_session('admin') != null)\n\t\t{\n\t\t\t$this->credentials['admin'] \t\t\t= $this->get_session('admin');\n\t\t\t$this->credentials['grupo_admin'] \t\t= $this->get_session('admin_grupo');\n\t\t\t$this->credentials['permissoes_admin'] \t= $this->get_session('admin_permissoes');\n\t\t\t\n\t\t\t$this->credentials['workspace_id'] \t\t= $this->get_session('workspace_id');\n\t\t\t$this->credentials['workspace_nome']\t= $this->get_session('workspace_nome');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->credentials = null;\n\t\t}\n\t}", "function es_usuario_valido() {\n if (!isset($_POST['username'])) {\n return false;\n } elseif (!isset($_POST['password'])) {\n return false;\n }\n\n $nombre_usuario = $_POST['username'];\n $password = $_POST['password'];\n\n return es_usuario_password_valido($nombre_usuario, $password);\n }", "private function isLogin()\n {\n return Auth::user() !== null;\n }" ]
[ "0.710454", "0.7102176", "0.69470865", "0.6922485", "0.6915077", "0.6901938", "0.6896418", "0.68641335", "0.68511534", "0.6723897", "0.67125744", "0.6653238", "0.65974015", "0.65683866", "0.65583843", "0.6530389", "0.6523095", "0.6516168", "0.65094244", "0.6491059", "0.64638776", "0.6451231", "0.64445996", "0.6414856", "0.6402565", "0.6393793", "0.6386126", "0.6370936", "0.6365142", "0.6364146", "0.63617617", "0.63539654", "0.63155794", "0.6315177", "0.63049996", "0.6303476", "0.6292878", "0.6291912", "0.6287636", "0.62849015", "0.6274671", "0.62621033", "0.625558", "0.62472695", "0.62444156", "0.6242282", "0.6236847", "0.62356544", "0.62291133", "0.62230617", "0.6218977", "0.6217514", "0.6203875", "0.6203417", "0.62005174", "0.6194574", "0.6191921", "0.618583", "0.6184924", "0.61768454", "0.6174221", "0.6171205", "0.6167566", "0.61622506", "0.61613274", "0.6156787", "0.6135791", "0.61077225", "0.6105375", "0.6104699", "0.6102667", "0.61025035", "0.61015636", "0.610007", "0.60992235", "0.607344", "0.60670877", "0.60638577", "0.60638535", "0.6060965", "0.60532975", "0.6051484", "0.60455215", "0.6040585", "0.60352767", "0.6033006", "0.60257703", "0.60214883", "0.60210747", "0.6012278", "0.60025877", "0.599712", "0.5997", "0.5986835", "0.59866524", "0.59833914", "0.5983358", "0.59768903", "0.5973021", "0.59718233", "0.5969972" ]
0.0
-1