query
stringlengths
11
3.13k
ru_query
stringlengths
9
3.91k
document
stringlengths
18
71k
metadata
dict
negatives
listlengths
0
100
negative_scores
listlengths
0
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
return boolean as string 'true' / 'false'
вернуть булевое значение в виде строки 'true' / 'false'
function bool2str($bool) { if($bool ===false) return 'false'; else return 'true'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bool_s($boolean) {\n\treturn ($boolean ? 'true' : 'false');\n}", "public static function strbool($bool){\r\n return ($bool) ? \"true\" : \"false\";\r\n }", "function format_bool(mixed $input): string\n{\n return $input ? 'true' : 'false';\n}", "function bool_to_string($value) {\n return $value ? 'true' : 'false';\n }", "private function boolean(bool $value): string\n {\n return $value ? 'true' : 'false';\n }", "public function getBooleanString($tf);", "function b2s($b) {\n return ($b) ? 'TRUE' : 'FALSE';\n}", "function stage_bool_to_string($bool)\n{\n if (! is_bool($bool)) {\n $bool = wc_string_to_bool($bool);\n }\n return true === $bool ? 'yes' : 'no';\n}", "public function boolToStr($boolean)\n {\n return ($boolean === true) ? 'true' : 'false';\n }", "public function toBoolean()\n {\n $key = $this->toLowerCase()->str;\n $map = array(\n 'true' => true,\n '1' => true,\n 'on' => true,\n 'yes' => true,\n 'false' => false,\n '0' => false,\n 'off' => false,\n 'no' => false,\n );\n\n if (array_key_exists($key, $map)) {\n return $map[$key];\n } elseif (is_numeric($this->str)) {\n return ((int) $this->str > 0);\n } else {\n return (bool) $this->regexReplace('[[:space:]]', '')->str;\n }\n }", "protected function bool2str($bool) {\n return ($bool) ? 'TRUE' : 'FALSE';\n }", "private function boolToString ($value)\n\t{\n\t\tif (true === $value)\n\t\t{\n\t\t\treturn 'true';\n\t\t}\n\t\telseif (false === $value)\n\t\t{\n\t\t\treturn 'false';\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn $value;\n\t\t}\n\t}", "function toBoolean(){\n\t\tif(in_array($this->lower(),array('','false','off','no','n','f'))){\n\t\t\treturn false;\n\t\t}\n\t\treturn (bool)$this->toString();\n\t}", "public static function booleanToString($obj)\n {\n return $obj ? 'true' : 'false';\n }", "private static function bool2str($v)\n {\n //convert boolean to text value.\n $v = $v === true ? 'true' : $v;\n $v = $v === false ? 'false' : $v;\n return $v;\n }", "function bool_str($value) {\r\n if ($value) {\r\n return 'yes'; \r\n } else {\r\n return 'no';\r\n }\r\n}", "function bool2str($data)\n {\n TRUE === $data && $data = 'true';\n FALSE === $data && $data = 'false';\n return $data;\n }", "public static function boolToString($value)\n {\n $value = $value === true ? 'true' : $value;\n $value = $value === false ? 'false' : $value;\n return $value;\n }", "public function booleanString($var)\n {\n return is_bool($var)\n ? ($var ? 'True' : 'False')\n : $var;\n }", "public static function bool2str(bool $boolean = true): string\n {\n if ($boolean === false) {\n return 'FALSE';\n } else {\n return 'TRUE';\n }\n }", "public static function boolean()\n {\n return self::builtinType('bool');\n }", "private function dbFeedBack($bool){\n if($bool == FALSE){\n //display '0' as false\n return \"{0}\"; \n }\n else{\n //display 1 as true\n return \"{1}\";\n } \n }", "public function testToStringWithBooleanValueTrue()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(true);\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "public function getBooleanFormatForQueryString(): string\n {\n return $this->booleanFormatForQueryString;\n }", "function message($boolValue) {\n\tif($boolValue) {\n\t\techo \"TRUE: \";\n\t} else {\n\t\techo \"FALSE: \";\n\t}\n\techo \"GOT value as \", (int)$boolValue, \"\\n\";\n}", "public static function boolean() {}", "abstract public function escapeBoolean($bool);", "function get_bool_or_null($value)\r\n{\r\n $temp = null ;\r\n\r\n if(is_null($value)){\r\n\r\n $temp .= \"<code style='font_size: 9px ; color:#3465a4 '>\" . PHP_EOL ;\r\n \r\n $temp .= 'null' . PHP_EOL;\r\n \r\n $temp .= \"</code><br>\"; \r\n\r\n }else if(is_bool($value)){\r\n $temp .= '<code style=\"font_size: 10px\">boolean </code>';\r\n \r\n $temp .= \"<code style='font_size: 9px ; color:#75507b '>\" . PHP_EOL ;\r\n \r\n $temp .= $value == true ? 'true' : 'false' . PHP_EOL;\r\n \r\n $temp .= \"</code><br>\";\r\n \r\n }\r\n\r\n return $temp ;\r\n}", "public function testToStringWithBooleanValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(false);\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "public static function plainBoolean($value)\n {\n if ($value === true) {\n return 'Yes';\n } elseif ($value === false) {\n return 'No';\n }\n\n return '---';\n }", "protected function toBool($value)\n\t{\n\t\tif ($value === true) {\n\t\t\treturn 'yes';\n\t\t}\n\t\treturn 'no';\n\t}", "protected function escapeBoolean($value)\n {\n return ($value) ? $this->booleanTrue : $this->booleanFalse;\n }", "protected function get_type() {\n\t\treturn 'boolean';\n\t}", "protected function get_type() {\n\t\treturn 'boolean';\n\t}", "function str_bool($string) {\n if (strtolower($string) === 'true') {\n return true;\n } elseif (strtolower($string) === 'false') {\n return false;\n }\n\n return $string;\n}", "public function getBool(): bool;", "function to_boolean($val);", "function bool($val,$str=false){\n if(is_string($val)) {\n $val=strtolower($val);\n $val=$val && $val!=\"false\" && $val !=\"no\" && $val !=\"n\" && $val !=\"f\" && $val !=\"off\";\n }else $val=(bool)$val;\n return $str?($val?\"true\":\"false\"):$val;\n}", "public function bool()\n {\n return filter_var($this->value, FILTER_VALIDATE_BOOLEAN);\n }", "public static function boolean()\n {\n return Type::boolean();\n }", "public function bool_to_bit( $value ) {\n\t\treturn ( ! empty( $value ) && 'false' !== $value ) ? '1' : '';\n\t}", "public function testToStringWithStringValueTrue()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('true');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "public function toBool(): bool\n\t{\n\t\treturn false;\n\t}", "function booltostr(bool $bool, int $mode = BOOL_TO_STR_OPTION_LOWERCASE): string\n {\n return BOOL_TO_STR_OPTIONS_MAP[$mode][$bool];\n }", "private static function renderBoolean($value)\n {\n return Yii::$app->formatter->asBoolean($value == 1);\n }", "function rt_nice_boolean($boolean_value = false, $yes = 'yes', $no = 'no')\n{\n return sprintf('<span class=\"ui-icon ui-icon-%s\">%s</span>', $boolean_value ? 'check' : 'close', $boolean_value ? $yes : $no);\n}", "function boolval($val){\n return $val === 'true' ? true : false;\n}", "function stage_string_to_bool($string)\n{\n return is_bool($string) ? $string : ( 'yes' === $string || 1 === $string || 'true' === $string || '1' === $string );\n}", "public function isTrue()\n {\n \n return !!$this->value;\n \n }", "public function isBoolean();", "public function boolberry(): bool\n\t{\n\t\treturn false;\n\t}", "static function toBoolean($data)\r\n {\r\n if(!is_string($data))\r\n return (bool) $data;\r\n switch(strtolower($data)) {\r\n case '1':\r\n case 'TRUE':\r\n case 'on':\r\n case 'yes':\r\n case 'y':\r\n return TRUE;\r\n default:\r\n return FALSE;\r\n }\r\n }", "public function isTrue();", "public function testToStringWithStringValueOn()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('on');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "protected function renderBoolean($value)\n {\n $result = 'No';\n if ($value) {\n $result = 'Yes';\n }\n\n return $result;\n }", "public function toBool() : bool\n {\n return boolval($this->value);\n }", "public static function bool2text($valBool)\n\t{\n\t\t$salida = \"\";\n\n\t\tif($valBool) {\n\n\t\t\t$salida = \"Si\";\n\n\t\t} else {\n\n\t\t\t$salida = \"No\";\n\n\t\t}\n\n\t\treturn $salida;\n\t}", "public function boolValue()\n {\n return $this->value;\n }", "public function testToStringWithStringValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('false');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "public function toBoolean(): bool\n {\n return $this->boolean;\n }", "abstract public function unescapeBoolean($bool);", "function isOnPageAsString(){\n\t\treturn $this->on_page ? 'true' : 'false';\n\t}", "function sqlBool($b, $db){\n\t$b = $db->real_escape_string($b);\n\tif ($b) return '1';\n\telse return '0';\n}", "public static function strval($value)\n\t{\n\t\treturn is_bool($value)\n\t\t\t? ($value ? 'true' : 'false')\n\t\t\t: strval($value);\n\t}", "public function testToStringWithStringValueOff()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('off');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "public function getBoolField()\n {\n $value = $this->get(self::BOOL_FIELD);\n return $value === null ? (boolean)$value : $value;\n }", "public function formatBool($value)\n {\n if ($value) {\n return 1;\n } else {\n return 0;\n }\n }", "function get_boolean($str)\n{\n $str = strtolower($str);\n if (in_array($str, array('false', '0', 'no', 'nein', ''), TRUE))\n return FALSE;\n else\n return TRUE;\n}", "private function strToBoolean($value) {\r\n\t\tif ($value && strtolower($value) === \"true\") {\r\n\t\t return true;\r\n\t\t} else {\r\n\t\t return false;\r\n\t\t}\r\n\t}", "function readBoolean();", "function output_logical($x,$format=10){\n\t//-NO or -N or -0 that format only when value=false, nothing for true\n\t//-YES or -yes or -Y or -1 would only show that format when value=true\n\t$x=read_logical($x);\n\tif(is_null($x))return NULL;\n\tswitch(true){\n\t\tcase $format==10:\n\t\t\treturn ($x?1:0);\n\t\tcase $format=='yn':\n\t\t\treturn ($x?'y':'n');\n\t\tcase $format=='YN':\n\t\t\treturn ($x?'Y':'N');\n\t\tcase $format=='yesno':\n\t\t\treturn ($x?'yes':'no');\n\t\tcase $format=='YESNO':\n\t\t\treturn ($x?'YES':'NO');\n\t\tcase $format=='tf':\n\t\t\treturn ($x?'t':'f');\n\t\tcase $format=='TF':\n\t\t\treturn ($x?'T':'F');\n\t\tcase $format=='truefalse':\n\t\t\treturn ($x?'true':'false');\n\t\tcase $format=='TRUEFALSE':\n\t\t\treturn ($x?'TRUE':'FALSE');\n\t\tcase preg_match('/^-(0|n|f)/i',$format):\n\t\t\treturn ($x?'':ltrim($format,'-')); \n\t\tcase preg_match('/^-(1|y|t)/i',$format):\n\t\t\treturn ($x?ltrim($format,'-'):''); \n\t\tdefault:\n\t\t\treturn ($x?$format:'');\n\t}\n}", "function bool ($value)\r\n{\r\n\tif ($value === true || $value === false)\r\n\t\treturn $value;\r\n\r\n\treturn $value === 'true' || ($value !== 'false' && !!$value);\r\n}", "private function toBoolean($string)\n\t{\n\t\tif ($string === 'true') {\n\t\t\treturn true;\n\t\t}\n\t\tif ($string === 'false') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn null;\n\t}", "private function generateBooleanData()\n {\n return $this->faker->boolean() ? \"1\" : \"0\";\n }", "public static function true(): bool\n {\n return true;\n }", "private function formatBoolean($answer)\n {\n if (!$answer) {\n return 'No';\n }\n\n return 'Yes';\n }", "public function stringToBoolean($val) {\n return ($val === \"true\");\n }", "function rest_sanitize_boolean($value)\n {\n }", "function printyn ($val) {\n\treturn ($val ? 'yes':'no');\n}", "static function toBoolean ($v)\n {\n return is_string ($v) ? get (self::$BOOLEAN_VALUES, $v, false) : boolval ($v);\n }", "public function testToStringWithStringValueYes()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('yes');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "function toBool($var) {\n\tif (true === $var || 1 === $var) {\n\t\treturn true;\n\t}\n\tswitch (strtolower($var)) {\n\t\tcase \"yes\":\n\t\tcase \"on\":\n\t\tcase \"1\":\n\t\tcase \"y\":\n\t\tcase \"true\":\n\t\tcase \"t\":\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}", "function post_bool($boolean_name) {\n\t$boolean = $_POST[$boolean_name];\n\tif ($boolean == \"true\")\n\t\treturn true;\n\n\treturn false;\n}", "function isTrue($value) {\r\n\treturn is_bool($value) ? $value : (bool)preg_match('/^(1|y|yes|true|on)$/i',(string)$value);\r\n}", "function convert_string_to_boolean($string)\n{\n return filter_var($string, FILTER_VALIDATE_BOOLEAN);\n}", "public function getIsTest()\n {\n $value = $this->get(self::ISTEST);\n return $value === null ? (boolean)$value : $value;\n }", "function booleanValuefromString($s) {\r\n\t\treturn ((strcmp($s, '0') != 0) && (strcasecmp($s, 'false') != 0));\r\n\t}", "public function toString()\n {\n return sprintf('is equal to %s', $this->exporter->export($this->value));\n }", "function rest_is_boolean($maybe_bool)\n {\n }", "public function toBoolean(): bool\n {\n return !!$this->getValue();\n }", "public function value(): bool\n {\n if (($val = $this->raw()) === null) {\n return false;\n }\n\n return (new Boolean)->decode($val);\n }", "public static function true(): self\n {\n return self::fromValue(Value::true());\n }", "protected function _toBoolean($value)\n\t{\n\t\tif (is_bool($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif (is_int($value) || is_float($value)) {\n\t\t\treturn ($value !== 0);\n\t\t}\n\t\tif (is_string($value)) {\n\t\t\treturn ($value === 't' || $value === 'T' || $value === 'true');\n\t\t}\n\t\treturn (boolean)$value;\n\t}", "public function __tostring() {\n $str = '';\n foreach($this as $value) {\n if($value) {\n $str .= '1';\n }\n else {\n $str .= '0';\n }\n }\n \n return $str;\n }", "private function xs_true($xs_bool) {\n return ($xs_bool == '1' || strtoupper($xs_bool) == 'TRUE');\n }", "public function getPBool()\n {\n return isset($this->p_bool) ? $this->p_bool : false;\n }", "private function prepareBoolParam($value)\n {\n if (is_bool( $value )) {\n return true === $value ? 'true' : 'false';\n }\n\n return $value;\n }", "public static function GetTrueBoolTemplate( $bool = false, $hint, $translate = true, $status = '' ) {\n if ( $bool ) {\n if ( $translate ) {\n $hint = T( $hint );\n }\n\n return sprintf( '<span class=\"status %s\" title=\"%s\">%s</span>', $status, $hint, $hint );\n }\n }", "function isBoolType($a = 0)\n{\n $b = (boolean)$a;\n\n echo \"число $a при переводе в булев тип изменится на '$b ' <br/>\n так как при переводе значение boolean будет = false(по правилам приведения типов)\";\n echo \"<br>\";\n var_dump($a, $b);\n}", "public function testToStringWithStringValueN()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('n');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}" ]
[ "0.80348504", "0.80206877", "0.78751075", "0.7846424", "0.76890635", "0.7611359", "0.7559533", "0.7543506", "0.7523593", "0.75164706", "0.74617386", "0.7412224", "0.7410573", "0.7393141", "0.73901856", "0.7379897", "0.73708546", "0.7250726", "0.7164452", "0.71530366", "0.7104408", "0.7081321", "0.7046958", "0.7023631", "0.6972632", "0.69654894", "0.6918694", "0.68982095", "0.68366355", "0.68304795", "0.6828735", "0.68249273", "0.67816496", "0.67816496", "0.6772769", "0.670888", "0.67034304", "0.6674927", "0.6654775", "0.6654304", "0.6620642", "0.66157305", "0.6612906", "0.65779567", "0.6541965", "0.65233016", "0.6500552", "0.64729714", "0.646876", "0.6456407", "0.6447053", "0.6435384", "0.64336985", "0.6428699", "0.6421228", "0.6418972", "0.637356", "0.63689226", "0.6338687", "0.63378423", "0.63262165", "0.6319881", "0.6312015", "0.63067955", "0.6303697", "0.6301654", "0.62984157", "0.62950397", "0.62887293", "0.6271498", "0.62436163", "0.6209653", "0.6205097", "0.6204741", "0.6189002", "0.61831874", "0.6175829", "0.6172276", "0.61622244", "0.6144383", "0.613756", "0.6126742", "0.6122707", "0.61133313", "0.61009413", "0.60739785", "0.6072295", "0.6072178", "0.60576993", "0.60480016", "0.6037721", "0.6036832", "0.6023208", "0.60217667", "0.602122", "0.60141385", "0.60120493", "0.5998216", "0.59975874", "0.5981358" ]
0.8142804
0
compare two objects. Arguments are passed byreference test: equals, not equal, equal identity, not equal identity
сравнить два объекта. Аргументы передаются по ссылке тест: равенство, неравенство, равенство по идентичности, неравенство по идентичности
function compareObjects(&$ob1, &$ob2) { print_pre('o1 == o2 : ' . bool2str($ob1 == $ob2)); print_pre('o1 != o2 : ' . bool2str($ob1 != $ob2)); print_pre('o1 === o2 : ' . bool2str($ob1 === $ob2)); print_pre('o1 !== o2 : ' . bool2str($ob1 !== $ob2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function equals($other);", "public function equals( $A, $B );", "public function equals($other) { return $this->obj==Sandbox::unwrap($other); }", "protected function compareObjects(object $a, object $b): int\n {\n // see https://github.com/php/php-src/issues/10513\n return strcmp(spl_object_hash($a), spl_object_hash($b));\n }", "public function equals($obj): bool;", "public function testEquality()\n {\n $m1 = new BigMoney(Decimal::fromInteger(100), new Currency('EUR'));\n $m2 = new BigMoney(Decimal::fromInteger(100), new Currency('EUR'));\n $m3 = new BigMoney(Decimal::fromInteger(100), new Currency('USD'));\n $m4 = new BigMoney(Decimal::fromInteger(50), new Currency('EUR'));\n\n $this->assertTrue($m1->equals($m2));\n $this->assertFalse($m1->equals($m3));\n $this->assertFalse($m1->equals($m4));\n }", "function o_eq($a, $b) {\n\t\t\treturn Obj::singleton()->equal($a, $b);\n\t\t}", "public static function compare($a,$b);", "public function testCmpart()\n {\n $oA = new stdClass();\n $oA->cnt = 10;\n\n $oB = new stdClass();\n $oB->cnt = 10;\n\n $this->assertTrue(cmpart($oA, $oB) == 0);\n\n $oA->cnt = 10;\n $oB->cnt = 20;\n\n $this->assertTrue(cmpart($oA, $oB) == -1);\n }", "abstract protected function compare($idA, $idB);", "public function equals()\n {\n $this->assertTrue($this->stubRefProperty->equals($this->stubRefProperty));\n $stubRefProperty1 = new stubReflectionProperty('stubTestProperty1', 'property');\n $stubRefProperty2 = new stubReflectionProperty('stubTestProperty1', 'anotherProperty');\n $this->assertTrue($this->stubRefProperty->equals($stubRefProperty1));\n $this->assertTrue($stubRefProperty1->equals($this->stubRefProperty));\n $this->assertFalse($this->stubRefProperty->equals($stubRefProperty2));\n $this->assertFalse($this->stubRefProperty->equals('foo'));\n $this->assertFalse($stubRefProperty2->equals($this->stubRefProperty));\n }", "public function equals(Object $obj = null);", "protected abstract function _equals( N $other );", "function equals($x, $y);", "public function compare();", "public function equals(Object $object);", "function isEqual ( &$anObject ) {\n \t\treturn $this->isEqualTo($anObject);\n \t}", "public function scompare($o = null) {}", "function equals($a, $b){\n\tif (method_exists($a, 'equals'))\n\t\treturn $a->equals($b);\n\telse\n\t\treturn $a===$b;\n}", "abstract protected function _compare($val1, $val2);", "public function Equals___T($other);", "function test_equals($a, $b) {\n\treturn $a == $b;\n}", "public function isEqualProvider()\n {\n // Declare attributes\n $objA = new stdClass();\n $objA->foo = 'bar';\n \n $objB = new stdClass();\n \n $objC = new stdClass;\n $objC->foo = 'bar';\n $objC->int = 1;\n $objC->array = array(0, array(1), array(2), 3);\n $objC->related = new stdClass;\n $objC->self = $objC;\n $objC->c = $objC;\n \n $objD = new stdClass;\n $objD->foo = 'bar';\n $objD->int = 2;\n $objD->array = array(0, array(4), array(2), 3);\n $objD->related = new stdClass;\n $objD->self = $objD;\n $objD->c = $objC;\n \n return array(\n // Integers\n array(1, 0, <<<EOF\nFailed asserting that 0 matches expected 1.\nEOF\n ),\n \n // Integer and Double\n array(1.1, 0, <<<EOF\nFailed asserting that 0 matches expected 1.1.\nEOF\n ),\n \n // Chars\n array('a', 'b', <<<EOF\nFailed asserting that two strings are equal.\n\n- Expected \n+ Actual \n\n-'a'\n+'b'\nEOF\n ), \n \n // Integer and Array\n array(1, array(0), <<<EOF\nArray (...) does not match expected type \"integer\".\nEOF\n ),\n \n // Array and Integer\n array(array(0), 1, <<<EOF\n1 does not match expected type \"array\".\nEOF\n ),\n \n // Array and Array\n array(array(0), array(1), <<<EOF\nFailed asserting that two arrays are equal.\n\n- Expected \n+ Actual \n\n Array (\n- 0 => 0\n+ 0 => 1\n )\nEOF\n ),\n \n // Boolean and boolean as string\n array(array(TRUE), array('true'), <<<EOF\nFailed asserting that two arrays are equal.\n\n- Expected \n+ Actual \n\n Array (\n- 0 => true\n+ 0 => 'true'\n )\nEOF\n ),\n \n // Nested arrays\n array(array(0, array(1), array(2), 3), array(0, array(4), array(2), 3), <<<EOF\nFailed asserting that two arrays are equal.\n\n- Expected \n+ Actual \n\n Array (\n 0 => 0\n 1 => Array (\n- 0 => 1\n+ 0 => 4\n )\n 2 => Array (\n 0 => 2\n )\n 3 => 3\n )\nEOF\n ),\n \n \n // Object and Array\n array($objA, array(23), <<<EOF\nArray (...) does not match expected type \"object\".\nEOF\n ), \n\n // Array and Object\n array(array(23), $objA, <<<EOF\nstdClass Object (...) does not match expected type \"array\".\nEOF\n ), \n \n // Object and Object\n array($objA, $objB, <<<EOF\nFailed asserting that two objects are equal.\n\n- Expected \n+ Actual \n\n stdClass Object (\n- 'foo' => 'bar'\n )\nEOF\n ),\n \n // Complex objects\n array($objC, $objD, <<<EOF\nFailed asserting that two objects are equal.\n\n- Expected \n+ Actual \n\n stdClass Object (\n 'foo' => 'bar'\n- 'int' => 1\n+ 'int' => 2\n 'array' => Array (\n 0 => 0\n 1 => Array (\n- 0 => 1\n+ 0 => 4\n )\n 2 => Array (\n 0 => 2\n )\n 3 => 3\n )\n 'related' => stdClass Object ()\n 'self' => stdClass Object (\n 'foo' => 'bar'\n- 'int' => 1\n+ 'int' => 2\n 'array' => Array (\n 0 => 0\n 1 => Array (\n- 0 => 1\n+ 0 => 4\n )\n 2 => Array (\n 0 => 2\n )\n 3 => 3\n )\n 'related' => stdClass Object ()\n 'self' => stdClass Object (*RECURSION*)\n- 'c' => stdClass Object (*RECURSION*)\n+ 'c' => stdClass Object (\n+ 'foo' => 'bar'\n+ 'int' => 1\n+ 'array' => Array (\n+ 0 => 0\n+ 1 => Array (\n+ 0 => 1\n+ )\n+ 2 => Array (\n+ 0 => 2\n+ )\n+ 3 => 3\n+ )\n+ 'related' => stdClass Object ()\n+ 'self' => stdClass Object (*RECURSION*)\n+ 'c' => stdClass Object (*RECURSION*)\n+ )\n )\n 'c' => stdClass Object (\n 'foo' => 'bar'\n 'int' => 1\n 'array' => Array (\n 0 => 0\n 1 => Array (\n 0 => 1\n )\n 2 => Array (\n 0 => 2\n )\n 3 => 3\n )\n 'related' => stdClass Object ()\n 'self' => stdClass Object (*RECURSION*)\n 'c' => stdClass Object (*RECURSION*)\n )\n )\nEOF\n \n ),\n );\n }", "function cmp_obj($a, $b)\r\n {\r\n $al = $a->Top;\r\n $bl = $b->Top;\r\n if ($al == $bl) {\r\n return 0;\r\n }\r\n return ($al > $bl) ? +1 : -1;\r\n }", "function comparator($object1, $object2) {\n\t\t\treturn $object1->amount < $object2->amount; \n\t\t}", "public function testInvokeReturnsTrueIfIntegersAreEqual()\n\t{\n $this->assertTrue((new AlmostEquals())(1, 1));\n \n return;\n\t}", "function isEqualTo ( &$anObject ) {\n \t\treturn ($this === $anObject);\n \t}", "public function compareTo($other);", "public function equals($arg);", "public function shouldEqual($expected) {}", "public function testAssertObjectPropertiesEqual()\n {\n $object = new stdClass;\n $object->first = 'first value';\n $object->second = 'second value';\n $this->assertObjectPropertiesEqual(['first', 'second'], $object);\n $this->assertObjectPropertiesEqual(['second', 'first'], $object);\n\n $this->expectException(AssertionFailedError::class);\n $this->assertObjectPropertiesEqual(['first'], $object);\n }", "public function equals($x);", "abstract public function equals(ValueObject $valueObject);", "public function compare($o = null, $attrs = array()) {}", "public static function equal($objA, $objB)\n {\n if ($objA === $objB) {\n return true;\n }\n if ($objA instanceof ObjectInterface && $objB instanceof ObjectInterface) {\n return $objA->equals($objB);\n }\n return $objA == $objB;\n }", "function is_equal(log_op_move $other): bool {\n return $this == $other;\n }", "function o_ne($a, $b) {\n\t\t\treturn Obj::singleton()->notEqual($a, $b);\n\t\t}", "public function testPrimitiveCompare()\n {\n foreach ($this->primitiveTypes() as $t) {\n if ($t == $this->primitiveTypeTested()) {\n $this->assertSameType($this->primitiveTypeTested(), $t);\n $this->assertSameType($t, $this->primitiveTypeTested());\n } else {\n $this->assertIncomparable($t, $this->primitiveTypeTested());\n }\n }\n }", "function is_equal(state $other): bool {\n return $this->log_op_list == $other->log_op_list &&\n $this->tree->is_equal($other->tree);\n }", "function isNotEqualTo ( &$anObject ) {\n \t\treturn !($this->isEqualTo($anObject));\n \t}", "function test_object_refs() {\n\t\t$key = rand_str();\n\t\t$object_a = new stdClass;\n\t\t$object_a->foo = 'alpha';\n\t\t$this->cache->set( $key, $object_a );\n\t\t$object_a->foo = 'bravo';\n\t\t$object_b = $this->cache->get( $key );\n\t\t$this->assertEquals( 'alpha', $object_b->foo );\n\t\t$object_b->foo = 'charlie';\n\t\t$this->assertEquals( 'bravo', $object_a->foo );\n\n\t\t$key = rand_str();\n\t\t$object_a = new stdClass;\n\t\t$object_a->foo = 'alpha';\n\t\t$this->cache->add( $key, $object_a );\n\t\t$object_a->foo = 'bravo';\n\t\t$object_b = $this->cache->get( $key );\n\t\t$this->assertEquals( 'alpha', $object_b->foo );\n\t\t$object_b->foo = 'charlie';\n\t\t$this->assertEquals( 'bravo', $object_a->foo );\n\t}", "public function compareTo($object) : int;", "function compare($a, $b) {\n if ($this->access($a) == $this->access($b)) {\n return 0;\n }\n return ($this->access($a) < $this->access($b)) ? -1 : 1;\n }", "function cmp($a, $b) {\n $valueA = getCompareValue($a);\n $valueB = getCompareValue($b);\n return $valueA - $valueB;\n }", "public function compare(\\morph\\Object $objectA, \\morph\\Object $objectB)\n {\n $compare = null;\n $propertyA = (float)$objectA->{$this->propertyName};\n $propertyB = (float)$objectB->{$this->propertyName};\n if ($propertyA == $propertyB){\n $compare = 0;\n }else{\n $compare = ($propertyA < $propertyB) ? -1 : 1;\n }\n return $compare;\n }", "abstract protected function isEntityEqual($sProperty, JobEntityInterface $oJobEntityA, JobEntityInterface $oJobEntityB);", "function is_equal(tree $other): bool {\n // We must treat the triples array as an unordered set\n // (where the two sets are equal even if values are present\n // in a different order).\n // Therefore, we cannot simply check if array_values()\n // for each set is equal.\n foreach($this->triples as $k => $t) {\n $o = @$other->triples[$k];\n if(!$o || !$t->is_equal($o)){\n return false;\n }\n }\n foreach($other->triples as $k => $t) {\n $o = @$this->triples[$k];\n if(!$o || !$t->is_equal($o)){\n return false;\n }\n }\n return true;\n }", "protected function isReference(&$var1, &$var2)\n {\n //If a reference exists, the type IS the same\n if (gettype($var1) !== gettype($var2)) {\n return false;\n }\n\n $same = false;\n\n //We now only need to ask for var1 to be an array ;-)\n if (is_array($var1)) {\n //Look for an unused index in $var1\n do {\n $key = uniqid(\"is_ref_\", true);\n } while (array_key_exists($key, $var1));\n\n //The two variables differ in content ... They can't be the same\n if (array_key_exists($key, $var2)) {\n return false;\n }\n\n //The arrays point to the same data if changes are reflected in $var2\n $data = uniqid(\"is_ref_data_\", true);\n $var1[$key] =& $data;\n //There seems to be a modification ...\n if (array_key_exists($key, $var2)) {\n if ($var2[$key] === $data) {\n $same = true;\n }\n }\n\n //Undo our changes ...\n unset($var1[$key]);\n } elseif (is_object($var1)) {\n //The same objects are required to have equal class names ;-)\n if (get_class($var1) !== get_class($var2)) {\n return false;\n }\n\n $obj1 = array_keys(get_object_vars($var1));\n $obj2 = array_keys(get_object_vars($var2));\n\n //Look for an unused index in $var1\n do {\n $key = uniqid(\"is_ref_\", true);\n } while (in_array($key, $obj1));\n\n //The two variables differ in content ... They can't be the same\n if (in_array($key, $obj2)) {\n return false;\n }\n\n //The arrays point to the same data if changes are reflected in $var2\n $data = uniqid(\"is_ref_data_\", true);\n $var1->$key =& $data;\n //There seems to be a modification ...\n if (isset($var2->$key)) {\n if ($var2->$key === $data) {\n $same = true;\n }\n }\n\n //Undo our changes ...\n unset($var1->$key);\n } elseif (is_resource($var1)) {\n if (get_resource_type($var1) !== get_resource_type($var2)) {\n return false;\n }\n\n return ((string)$var1) === ((string)$var2);\n } else {\n //Simple variables ...\n if ($var1 !== $var2) {\n //Data mismatch ... They can't be the same ...\n return false;\n }\n\n //To check for a reference of a variable with simple type\n //simply store its old value and check against modifications of the second variable ;-)\n\n do {\n $key = uniqid(\"is_ref_\", true);\n } while ($key === $var1);\n\n $tmp = $var1; //WE NEED A COPY HERE!!!\n $var1 = $key; //Set var1 to the value of $key (copy)\n $same = $var1 === $var2; //Check if $var2 was modified too ...\n $var1 = $tmp; //Undo our changes ...\n }\n\n return $same;\n }", "protected function isReference(&$var1, &$var2)\n {\n //If a reference exists, the type IS the same\n if (gettype($var1) !== gettype($var2)) {\n return false;\n }\n\n $same = false;\n\n //We now only need to ask for var1 to be an array ;-)\n if (is_array($var1)) {\n //Look for an unused index in $var1\n do {\n $key = uniqid(\"is_ref_\", true);\n } while (array_key_exists($key, $var1));\n\n //The two variables differ in content ... They can't be the same\n if (array_key_exists($key, $var2)) {\n return false;\n }\n\n //The arrays point to the same data if changes are reflected in $var2\n $data = uniqid(\"is_ref_data_\", true);\n $var1[$key] =& $data;\n //There seems to be a modification ...\n if (array_key_exists($key, $var2)) {\n if ($var2[$key] === $data) {\n $same = true;\n }\n }\n\n //Undo our changes ...\n unset($var1[$key]);\n } elseif (is_object($var1)) {\n //The same objects are required to have equal class names ;-)\n if (get_class($var1) !== get_class($var2)) {\n return false;\n }\n\n $obj1 = array_keys(get_object_vars($var1));\n $obj2 = array_keys(get_object_vars($var2));\n\n //Look for an unused index in $var1\n do {\n $key = uniqid(\"is_ref_\", true);\n } while (in_array($key, $obj1));\n\n //The two variables differ in content ... They can't be the same\n if (in_array($key, $obj2)) {\n return false;\n }\n\n //The arrays point to the same data if changes are reflected in $var2\n $data = uniqid(\"is_ref_data_\", true);\n $var1->$key =& $data;\n //There seems to be a modification ...\n if (isset($var2->$key)) {\n if ($var2->$key === $data) {\n $same = true;\n }\n }\n\n //Undo our changes ...\n unset($var1->$key);\n } elseif (is_resource($var1)) {\n if (get_resource_type($var1) !== get_resource_type($var2)) {\n return false;\n }\n\n return ((string)$var1) === ((string)$var2);\n } else {\n //Simple variables ...\n if ($var1 !== $var2) {\n //Data mismatch ... They can't be the same ...\n return false;\n }\n\n //To check for a reference of a variable with simple type\n //simply store its old value and check against modifications of the second variable ;-)\n\n do {\n $key = uniqid(\"is_ref_\", true);\n } while ($key === $var1);\n\n $tmp = $var1; //WE NEED A COPY HERE!!!\n $var1 = $key; //Set var1 to the value of $key (copy)\n $same = $var1 === $var2; //Check if $var2 was modified too ...\n $var1 = $tmp; //Undo our changes ...\n }\n\n return $same;\n }", "public function isEqual($_record, array $_toOmit = array());", "public function testEquals(){\n $result = 5 + 5;\n $this->assertEquals($result, 10); // verificar con ==\n }", "public static function static_compare($a = null, $b = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public static function static_compare($a = null, $b = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "static public function equal ($left, $right) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:386: lines 386-388\n\t\tif ((is_int($left) || is_float($left)) && (is_int($right) || is_float($right))) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:387: characters 4-36\n\t\t\treturn ($left == $right);\n\t\t}\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:389: lines 389-391\n\t\tif (($left instanceof HxClosure) && ($right instanceof HxClosure)) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:390: characters 4-41\n\t\t\treturn $left->equals($right);\n\t\t}\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:392: characters 3-41\n\t\treturn ($left === $right);\n\t}", "public function testCompareReturnValues()\n\t{\n\t\t/** @var AbstractCollectorCommand $mock */\n\t\t$mock = $this->getAbstractCollectorMock();\n\n\t\t$this->assertEquals( -1, $mock->compare( 1, 2 ) );\n\t\t$this->assertEquals( 0, $mock->compare( 2, 2 ) );\n\t\t$this->assertEquals( 1, $mock->compare( 2, 1 ) );\n\t}", "public function testInvokeReturnsFalseIfIntegersAreNotEqual()\n\t{\n $this->assertFalse((new AlmostEquals())(1, 2));\n \n return;\n\t}", "function cmp($a, $b)\n {\n if ($a->points == $b->points) {\n return 0;\n }\n return ($a->points > $b->points) ? -1 : 1;\n }", "public function equals($a = null, $b = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function equals(Enumerable $object): bool;", "static function compare(Transfer $a, Transfer $b) {\n\t\treturn $a->value - $b->value;\n\t}", "function equal_variables($left, $right, & $context) {\r\n\t\t$left = $this->string_value($context->get($left));\r\n\t\t$right = $this->string_value($context->get($right));\r\n\r\n\t\treturn ($left == $right);\t\r\n\t\t\r\n\t}", "function isReferenceTo ( &$anObject ) {\n \t\t// Store the value of $anObject\n \t\t$temp = $anObject;\n \t\t\n \t\t// Set the value of $anObject to something unique and see if $this\n \t\t// has changed as well.\n\t\t$anObject = uniqid(\"test_ref\");\n\t\t$is_ref = ($anObject === $this);\n\t\t\n\t\t// Put back the original value.\n\t\t$anObject = $temp;\n \t\treturn $is_ref;\n \t}", "function abc($a,$b){return strnatcasecmp($a->getInfo(\"name\"),$b->getInfo(\"name\"));}", "function variant_cmp($left, $right, $lcid = null, $flags = null) {}", "public function shouldBeEqualTo($expected) {}", "public function equal() {\r\n throw new Exception(\"Not implemented\");\r\n }", "protected function doCompare($left, $right)\n {\n if (is_object($left) && is_object($right)) {\n $leftClass = $this->doctrineHelper->getEntityClass($left);\n $rightClass = $this->doctrineHelper->getEntityClass($right);\n\n if ($leftClass == $rightClass\n && $this->doctrineHelper->isManageableEntity($left)\n && $this->doctrineHelper->isManageableEntity($right)\n ) {\n $leftIdentifier = $this->doctrineHelper->getEntityIdentifier($left);\n $rightIdentifier = $this->doctrineHelper->getEntityIdentifier($right);\n\n return $leftIdentifier == $rightIdentifier;\n }\n }\n\n return $left == $right;\n }", "public static function diff($origin1, $origin2) : bool\n {\n if ((! \\is_object($origin1)) || (! \\is_object($origin2))) {\n return true;\n }\n if (\\get_class($origin1) !== \\get_class($origin2)) {\n return true;\n }\n\n if (($origin1 instanceof Entity) && ($origin2 instanceof Entity)) {\n return $origin1->getPk() !== $origin2->getPk();\n }\n\n if (($origin1 instanceof Model) && ($origin2 instanceof Model)) {\n // Diff All Properties of origins\n return Model::diff($origin1, $origin2, []) ? true : false;\n }\n\n return $origin1 != $origin2;\n }", "public static function isEqual($expected, $actual, int $level = 0, ?SplObjectStorage $objects = null): bool\n {\n switch (true) {\n case $level > 10:\n throw new Exception('Nesting level too deep or recursive dependency.');\n case $expected instanceof Expect:\n $expected($actual);\n\n return true;\n case is_float($expected) && is_float($actual) && is_finite($expected) && is_finite($actual):\n $diff = abs($expected - $actual);\n\n return ($diff < self::EPSILON) || ($diff / max(abs($expected), abs($actual)) < self::EPSILON);\n case is_object($expected) && is_object($actual) && get_class($expected) === get_class($actual):\n /* start */\n if ($expected instanceof Equalable && $actual instanceof Equalable) {\n return $expected->equals($actual);\n }\n /* end */\n $objects = $objects ? clone $objects : new SplObjectStorage(); // @phpstan-ignore-line only boolean...\n if (isset($objects[$expected])) {\n return $objects[$expected] === $actual;\n } elseif ($expected === $actual) {\n return true;\n }\n\n $objects[$expected] = $actual;\n $objects[$actual] = $expected;\n $expected = (array) $expected;\n $actual = (array) $actual;\n // break omitted\n\n case is_array($expected) && is_array($actual):\n ksort($expected, SORT_STRING);\n ksort($actual, SORT_STRING);\n if (array_keys($expected) !== array_keys($actual)) {\n return false;\n }\n\n foreach ($expected as $value) {\n if (!self::isEqual($value, current($actual), $level + 1, $objects)) {\n return false;\n }\n\n next($actual);\n }\n\n return true;\n default:\n return $expected === $actual;\n }\n }", "public static function eq($a, $b)\n {\n if (self::nx(@$a) && self::nx(@$b)) {\n return false;\n }\n if (self::nx(@$a) && self::x(@$b)) {\n return false;\n }\n if (self::x(@$a) && self::nx(@$b)) {\n return false;\n }\n if ($a == $b) {\n return true;\n }\n return false;\n }", "function variant_eqv($left, $right) {}", "private function nodesEqual($a, $b)\n {\n if (!$a instanceof Node &&\n !$b instanceof Node\n ) {\n return $a === $b;\n }\n\n if (!$a instanceof Node ||\n !$b instanceof Node\n ) {\n return false;\n }\n\n if ($a->kind !== $b->kind) {\n return false;\n }\n\n if ($a->flags !== $b->flags) {\n return false;\n }\n\n foreach ($a->children as $key => $child) {\n if (!isset($b->children[$key])) {\n return false;\n }\n\n if (!$this->nodesEqual($child, $b->children[$key])) {\n return false;\n }\n }\n\n return true;\n }", "function compare_citations($x, $y)\n{\n\n if( !$x->sources[0]->citation->uuid){// && !$y->sources[0]->citation->uuid){\n $res = -1;\n //var_dump($y->sources[0]->citation->uuid);\n }elseif(!$y->sources[0]->citation->uuid){\n $res = 1;\n //var_dump($x->sources[0]->citation->uuid);\n }\n else{\n\n\n $author_team_x = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $x->sources[0]->citation->uuid);\n $author_team_y = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $y->sources[0]->citation->uuid);\n\n //same author, and different year\n if($author_team_x->titleCache == $author_team_y->titleCache){\n $x_year = substr(\n $x->sources[0]->citation->datePublished->start,\n 0,\n strpos($x->sources[0]->citation->datePublished->start,'-'));\n $y_year = substr(\n $y->sources[0]->citation->datePublished->start,\n 0,\n strpos($y->sources[0]->citation->datePublished->start,'-'));\n if ($x_year < $y_year){//the year of the first publication is smaller\n $res = -1;\n }\n else if($x_year == $y_year){ //if same year check the page\n $x_page = $x->sources[0]->citationMicroReference;\n $y_page = $y->sources[0]->citationMicroReference;\n if($x_page < $y_page){\n $res = -1;\n }\n else{\n $res = 1;\n }\n }else\n $res = 1;\n }\n //different author and the first one is alphabetically smaller\n //else if($x->sources[0]->citation->authorship->teamMembers[0]->lastname <\n //$y->sources[0]->citation->authorship->teamMembers[0]->lastname){\n else if ($author_team_x->titleCache < $author_team_y->titleCache)\t{\n $res = -1;\n }\n //different author and the second one is alphabetically smaller\n else{\n $res = 1;\n }\n\n }\n //var_dump($res);\n //var_dump(' ============ ');\n return $res;\n}", "static function revCompare(Transfer $a, Transfer $b) {\n\t\treturn static::compare($b, $a);\n\t}", "private static function compare($a, $b) {\n $ordera = $a->get_order();\n $orderb = $b->get_order();\n if ($ordera > $orderb) {\n return 1;\n }\n if ($ordera < $orderb) {\n return -1;\n }\n $classa = get_class($a);\n $classb = get_class($b);\n if ($classa > $classb) {\n return 1;\n }\n if ($classb < $classa) {\n return -1;\n }\n return 0;\n }", "protected function assertObjectsStructuresEquals(\\stdClass $expected, \\stdClass $actual)\n {\n foreach ($expected as $key => $value) {\n $this->assertObjectHasAttribute($key, $actual, json_encode($actual));\n\n if (is_object($value)) {\n $this->assertObjectsStructuresEquals($value, $actual->{$key});\n }\n }\n }", "public function assertSame($arg1, $arg2, $message = '')\n {\n return $this->recordTest($arg1 === $arg2, $message);\n }", "public function equals($object){\n if($object === $this->current()){\n return true;\n }\n return false;\n }", "static function card_cmp( $a, $b ) {\n return $a->number - $b->number;\n }", "public function cmp($a, $b)\n {\n if((int)$a->cardsValue < (int)$b->cardsValue){\n return true;\n }else{\n return false;\n }\n }", "public function equals(MoveInterface $otherMove);", "public function isEqualTo(IDocument $other);", "public function equals($obj)\r\n {\r\n return $this == $obj;\r\n }", "abstract public function is_correct( $a, $comparison_operator, $b );", "public function equals(Constrainer $constrainer);", "static function cmp_serie($a, $b)\r\n\t{\r\n\t\t\r\n\t\t$cmp_return = strcasecmp($a->duree, $b->duree);\r\n\t\tif ($cmp_return == 0) {\r\n\t\t\t$cmp_return = strcasecmp($a->user, $b->user);\r\n\t\t}\r\n\t\treturn $cmp_return;\r\n\t\t\r\n\t}", "function compareUsers($user1, $user2)\n{\n\tif ($user1->id > $user2->id) return 1;\n\telseif ($user1->id == $user2->id) return 0;\n\telse return -1;\n}", "function compareReports(CountyMarriage $r1, \n CountyMarriage $r2)\n{\n return $r1->compare($r2);\n}", "public function equals(Setoid $that): bool;", "public function isSameFood($foodA, $foodB);", "public function equals($value);", "function compararUsuarios($a, $b)\n{\n if ($a->value == $b->value) {\n return 0;\n }\n return ($a->value < $b->value) ? 1 : -1;\n}", "public function equals(ValueObject $other)\n {\n return $this->toString() == $other->toString();\n }", "protected final function AssertNeq( $a, $b, $strict = true )\n {\n $this->observer->OnAssert();\n\n if( $strict )\n {\n $result = ( $a !== $b );\n }\n else\n {\n $result = ( $a != $b );\n }\n\n Core::Assert( $result, var_export( $a, true ) . ' is same as ' . var_export( $b, true ) );\n }", "public function test_assert_behaviour() {\n // Arrays.\n $a = array('a', 'b', 'c');\n $b = array('a', 'c', 'b');\n $c = array('a', 'b', 'c');\n $d = array('a', 'b', 'C');\n $this->assertNotEquals($a, $b);\n $this->assertNotEquals($a, $d);\n $this->assertEquals($a, $c);\n $this->assertEquals($a, $b, '', 0, 10, true);\n\n // Objects.\n $a = new stdClass();\n $a->x = 'x';\n $a->y = 'y';\n $b = new stdClass(); // Switched order.\n $b->y = 'y';\n $b->x = 'x';\n $c = $a;\n $d = new stdClass();\n $d->x = 'x';\n $d->y = 'y';\n $d->z = 'z';\n $this->assertEquals($a, $b);\n $this->assertNotSame($a, $b);\n $this->assertEquals($a, $c);\n $this->assertSame($a, $c);\n $this->assertNotEquals($a, $d);\n\n // String comparison.\n $this->assertEquals(1, '1');\n $this->assertEquals(null, '');\n\n $this->assertNotEquals(1, '1 ');\n $this->assertNotEquals(0, '');\n $this->assertNotEquals(null, '0');\n $this->assertNotEquals(array(), '');\n\n // Other comparison.\n $this->assertEquals(null, null);\n $this->assertEquals(false, null);\n $this->assertEquals(0, null);\n\n // Emptiness.\n $this->assertEmpty(0);\n $this->assertEmpty(0.0);\n $this->assertEmpty('');\n $this->assertEmpty('0');\n $this->assertEmpty(false);\n $this->assertEmpty(null);\n $this->assertEmpty(array());\n\n $this->assertNotEmpty(1);\n $this->assertNotEmpty(0.1);\n $this->assertNotEmpty(-1);\n $this->assertNotEmpty(' ');\n $this->assertNotEmpty('0 ');\n $this->assertNotEmpty(true);\n $this->assertNotEmpty(array(null));\n $this->assertNotEmpty(new stdClass());\n }", "public function testSame()\n {\n $result = \"texto\";\n $this->assertSame($result, \"texto\"); //verifica con ===\n }", "function isSameStream( IStreamProperties $_comparison ): bool;", "public function getValueCompare();", "public function getByReference(): bool;", "function compareDeepValue($val1, $val2) {\n return strcmp($val1['post_author'], $val2['post_author']);\n\n}" ]
[ "0.6673335", "0.65883684", "0.6582047", "0.6493526", "0.6361353", "0.6307741", "0.62992543", "0.6271147", "0.6259657", "0.62595", "0.62512934", "0.6212965", "0.62024915", "0.614383", "0.61387986", "0.60835725", "0.6081624", "0.60350287", "0.6030523", "0.60098636", "0.6003072", "0.5957396", "0.59422326", "0.5878123", "0.5871505", "0.58714783", "0.58631766", "0.58579063", "0.5837966", "0.58190906", "0.57228935", "0.566884", "0.5662211", "0.56544447", "0.562413", "0.5623943", "0.561211", "0.5598109", "0.55870193", "0.557407", "0.55639195", "0.5556195", "0.5555719", "0.55521345", "0.55508333", "0.5486345", "0.5478863", "0.54779804", "0.54779804", "0.5468358", "0.5463015", "0.54589707", "0.54589707", "0.5444014", "0.5430899", "0.5422864", "0.5420662", "0.541791", "0.5409014", "0.5406602", "0.5401679", "0.53949445", "0.53869736", "0.53749955", "0.5370879", "0.53593004", "0.53569126", "0.533318", "0.5290321", "0.52720606", "0.524563", "0.5242945", "0.52385384", "0.52317905", "0.5231143", "0.5229287", "0.52113724", "0.5205704", "0.52041745", "0.5195412", "0.51910734", "0.51907766", "0.5184796", "0.51829666", "0.51545113", "0.51469123", "0.5143293", "0.51215416", "0.51091236", "0.510643", "0.5102959", "0.50975823", "0.50967586", "0.5092956", "0.50915074", "0.50826305", "0.50788915", "0.50704587", "0.50688666", "0.50632226" ]
0.7712369
0
Check initial states exists
Проверить, существуют ли начальные состояния
public function hasInitial() { return !empty($this->initialStates); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isInitial();", "public function isInitialised();", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(4);\n }", "abstract protected function checkInitialization();", "public function hasState() {\n return $this->_has(4);\n }", "public static function resetInit() {\r\n $result = true;\r\n $shops = Shop::getShops(false, null, true);\r\n foreach ($shops as $id_shop) {\r\n $result &= Configuration::updateValue(GEAR_NAME.'_init', false, false, null, $id_shop);\r\n }\r\n return $result;\r\n }", "public function is_initialized()\n {\n }", "function _loadState()\n\t{\n\n\t\tif (empty($this->_state))\n\t\t{\n\n\t\t\t// current state info\n\t\t\t$query = 'SELECT c.*, ' .\n\t\t\t\t' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(\\':\\', c.id, c.alias) ELSE c.id END as slug '.\n\t\t\t\t' FROM #__ezrealty_state AS c' .\n\t\t\t\t' WHERE c.id = '. (int) $this->_id ;\n\t\t\t$this->_db->setQuery($query, 0, 1);\n\t\t\t$this->_state = $this->_db->loadObject();\n\n\t\t}\n\t\treturn true;\n\t}", "function validstates($state)\n{\n global $f3;\n return in_array($state, $f3->get('states'));\n}", "static function get_default_state();", "public function hasInitialInventory()\n {\n return $this->initial_inventory !== null;\n }", "public function isStatusInitialising()\n\t{\n\t\treturn $this->status == self::STATUS_INITIALISING;\n\t}", "abstract public function states();", "public function transactionIsInitState ($uri);", "public function is_initialised() {\n return true;\n }", "public function isNewStates()\n {\n if ($this->isNonexistent) return false;\n\n return !!$this->countNewStates();\n }", "public static function initialized()\n\t{\n\t\treturn !is_null(self::$instance);\n\t}", "function isInitialized();", "function getDefaultState()\r\n\t{\r\n\t}", "public function isInitial()\n {\n return ($this === Request::$initial);\n }", "public function isInit() {\n return $this->init;\n }", "public function getIsInitializeable() {}", "public function isInitialized();", "public function isInitialized();", "public function isInitialized();", "public function initialized()\n {\n return $this->connection->getSchemaManager()->tablesExist([self::SNAPSHOTS_TABLE]);\n }", "public function hasFinal()\n {\n return !empty($this->finalStates);\n }", "function check_state_conflict($expected)\n{\n global $STATE_FILE;\n\n // get current state\n $cur_state = trim( file_get_contents($STATE_FILE) );\n\n if($cur_state === $expected)\n {\n return false;\n }\n else\n {\n return true;\n }\n}", "private function _isInitialized()\n {\n return ($this->_init || $this->_list_cache->isInitialized());\n }", "public static function isInitialized() {\n\t\treturn isset(self::$cachedMap);\n\t}", "public function checkinit(){\n if(!$this->initialised){\n throw new DataProviderManagerNotInitializedException(\"DPManager isn't initialised\");\n }\n }", "public function has_inited() {\n\t\treturn $this->doneInit;\n\t}", "public function isAdminInitialised()\n { \n $qb = $this->adminRepo->createQueryBuilder('a')\n ->select('a.id')\n ->setMaxResults(1)\n ->getQuery();\n $admin = $qb->getResult();\n\n if(!empty($admin)){\n return true;\n }else{\n return false;\n } \n }", "public function isInitialized() {}", "public function isInitialized() {}", "public function checkAllSystems() {\n\t\techo \"All system are ready<br>\";\n\t\t$this->missionControl->setState($this->missionControl->getStartPowerUnits());\n\t}", "public function initState() {\n\t\t$db = $this->getRepoMaster();\n\n\t\t$trackedSiteIds = $db->selectFieldValues(\n\t\t\t$this->stateTable,\n\t\t\t'chd_site',\n\t\t\tarray(),\n\t\t\t__METHOD__\n\t\t);\n\n\t\t$untracked = array_diff_key( $this->clientWikis, array_flip( $trackedSiteIds ) );\n\n\t\tforeach ( $untracked as $siteID => $wikiDB ) {\n\t\t\t$state = array(\n\t\t\t\t'chd_site' => $siteID,\n\t\t\t\t'chd_db' => $wikiDB,\n\t\t\t\t'chd_seen' => 0,\n\t\t\t\t'chd_touched' => '00000000000000',\n\t\t\t\t'chd_lock' => null,\n\t\t\t\t'chd_disabled' => 0,\n\t\t\t);\n\n\t\t\t$db->insert(\n\t\t\t\t$this->stateTable,\n\t\t\t\t$state,\n\t\t\t\t__METHOD__,\n\t\t\t\tarray( 'IGNORE' )\n\t\t\t);\n\n\t\t\t$this->log( \"Initialized dispatch state for $siteID\" );\n\t\t}\n\n\t\t$this->releaseRepoMaster( $db );\n\t}", "public function isInitializeNeeded()\n {\n return true;\n }", "public function hasInitBu()\n {\n return $this->get(self::INIT_BU) !== null;\n }", "public function getIsInitialized()\n\t{\n\t\treturn $this->_init;\n\t}", "private function setDefaultStates(): void\n {\n foreach ($this->arr_attributes as $strParamName) {\n $this->states[$strParamName] = $this->params->get($strParamName, 0);\n }\n }", "public function isInitialized()\n {\n return $this->initializationState;\n }", "public function initialized()\n {\n return true;\n }", "function wp_is_site_initialized($site_id)\n {\n }", "public function checkStateExists($name) {\n $this->recursive = -1;\n $options['conditions'] = array('State.name' => $name);\n $options['fields'] = array('State.id');\n try {\n $data = $this->find('all', $options);\n if ($data && isset($data[0]['State']) && $data[0]['State'] != \"\") {\n return $data[0]['State'];\n } else {\n return array();\n }\n } catch (Exception $e) {\n CakeLog::write('db', __FUNCTION__ . \" in \" . __CLASS__ . \" at \" . __LINE__ . $e->getMessage());\n return false;\n }\n }", "function validState($state)\r\n {\r\n return in_array($state, $this->_dataLayer->getStates());\r\n }", "protected function loadPackageStates() {}", "protected function loadPackageStates() {}", "public function testStateValidatesCorrectly()\n {\n $this->assertTrue($this->state->validate(uniqid()));\n\n // Test again with a different value.\n $this->assertTrue($this->state->validate(uniqid()));\n }", "public function test_site_state() {\n\t\tif ( ! method_exists( 'Health_Check_Loopback', 'can_perform_loopback' ) ) {\n\t\t\t$plugin_file = trailingslashit( WP_PLUGIN_DIR ) . 'health-check/includes/class-health-check-loopback.php';\n\n\t\t\t// Make sure the file exists, in case someone deleted the plugin manually, we don't want any errors.\n\t\t\tif ( ! file_exists( $plugin_file ) ) {\n\n\t\t\t\t// If the plugin files are inaccessible, we can't guarantee for the state of the site, so the default is a bad response.\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\trequire_once( $plugin_file );\n\t\t}\n\n\t\t$loopback_state = Health_Check_Loopback::can_perform_loopback();\n\n\t\tif ( 'good' !== $loopback_state->status ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function testStateIssuedCorrectly()\n {\n $this->assertNull($this->state->issue());\n }", "static function isInitialized(): bool\n\t{\n\t\treturn self::$initialized;\n\t}", "public function hasFinishState(){\n return $this->_has(5);\n }", "function test_init_action_is_run() {\n\t}", "public function init(): bool\n {\n return true;\n }", "public static function isInitialized(){\n\t\treturn self::$initialized;\n\t}", "function TestGetState1(){\n\t\t$newAnswer = new Answer();\n\t\t$this->assertTrue($newAnswer->getState() == FALSE);\n }", "public function isInitialized() {\n return $this->initialized;\n }", "public function hasInitialQuantity()\n {\n return $this->initial_quantity !== null;\n }", "public function hasToBeInitialized(): bool\n {\n return static::INITIALIZE_PAYMENT;\n }", "public static function isInitialized(): bool {\n return self::$initialized;\n }", "public function hasInitiated(): bool\n {\n $initiatedTimestamp = @$this -> charging_status_change_dates[OrderStatusEnum :: INITIATED];\n \n return $initiatedTimestamp !== null && !$this ->isInitiated();\n }", "public function isInitialized() {\n return true;\n }", "protected function populateState()\n\t{\n\t}", "protected function populateState()\n\t{\n\t}", "public function init(?int $seed = null, int $state = null): bool;", "function isSeedboxInitialized()\n{\n $settings = getSettings();\n\n return !(empty($settings['seedbox']) || empty($settings['seedbox']['host']) || empty($settings['seedbox']['username']) || empty($settings['seedbox']['password']));\n}", "protected function isInitialInstallationInProgress() {}", "public static function isInitialized() {}", "public function initialize(): bool;", "public function inited()\t{\treturn ( $this->_IsInited() ) ? 'Y' : 'N';\t\t}", "public function is_set_up(): bool {\n return true;\n }", "function checkIfState($checkMe){\n\t$states = array(\"Alabama\", \"Alaska\", \"American Samoa\", \"Arizona\", \"Arkansas\", \"California\", \"Colorado\", \"Connecticut\", \"Iowa\", \"Delaware\", \"District of Columbia\", \"Federated States of Micronesia\", \n\t\"Florida\", \"Georgia\", \"Guam\", \"Hawaii\", \"Idaho\", \"Illinois\", \"Indiana\", \"Kansas\", \"Kentucky\", \"Louisiana\", \"Maine\", \"Marshall Islands\", \"Maryland\", \"Massachusetts\", \n\t\"Michigan\", \"Minnesota\", \"Mississippi\", \"Missouri\", \"Montana\", \"Nebraska\", \"Nevada\", \"New Hampshire\", \"New Jersey\", \"New Mexico\", \"New York\", \"North Carolina\",\n\t\"North Dakota\", \"Northern Mariana Islands\", \"Ohio\", \"Oklahoma\", \"Oregon\", \"Palau\", \"Pennsylvania\", \"Puerto Rico\", \"Rhode Island\", \"South Carolina\", \"South Dakota\", \n\t\"Tennessee\", \"Texas\", \"Utah\", \"Vermont\", \"Virgin Islands\", \"Virginia\", \"Washington\", \"West Virginia\", \"Wisconsin\", \"Wyoming\"); \n\t\n\tif(in_array($checkMe, $states) == true){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n\n}", "function is_initialized()\n {\n // Load libraries and grab status information\n //-------------------------------------------\n\n try {\n $this->load->library('certificate_manager/SSL');\n\n $system_cert_exists = $this->ssl->exists_system_certificate();\n $ca_exists = $this->ssl->exists_certificate_authority();\n } catch (Exception $e) {\n $this->page->view_exception($e);\n return FALSE;\n }\n\n if ($ca_exists && $system_cert_exists)\n return TRUE;\n else\n return FALSE;\n }", "protected function checkShowState($scope)\n {\n if (!isset($this->showState[$scope])) {\n $this->showState[$scope] = [];\n }\n }", "public function hasNormal()\n {\n return !empty($this->normalStates);\n }", "public function hasState($key)\n {\n return array_key_exists($key, $this->states);\n }", "protected function usesState()\n {\n return !$this->stateless;\n }" ]
[ "0.6860986", "0.6655938", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.6500065", "0.64040065", "0.6381777", "0.6243098", "0.61433", "0.6128225", "0.60626036", "0.60427666", "0.6032559", "0.6032148", "0.59857434", "0.5914008", "0.5871543", "0.5869863", "0.5867142", "0.58642894", "0.58598036", "0.58576983", "0.5845795", "0.584025", "0.58365726", "0.58365726", "0.58365726", "0.58168906", "0.5814534", "0.5804336", "0.5798529", "0.577553", "0.57554317", "0.5726965", "0.5724712", "0.5709643", "0.5709643", "0.57005066", "0.56957793", "0.5641367", "0.5565316", "0.5564307", "0.5544944", "0.5533933", "0.55297357", "0.5519329", "0.5516302", "0.549649", "0.54955745", "0.549399", "0.5479655", "0.54754514", "0.54744714", "0.54716897", "0.54681456", "0.54603064", "0.54274756", "0.54154146", "0.54084915", "0.54039454", "0.5389972", "0.5389426", "0.5380928", "0.5377272", "0.5373448", "0.53680366", "0.53680366", "0.5367468", "0.5366915", "0.53605235", "0.53589404", "0.5341149", "0.5340599", "0.5339956", "0.5333684", "0.5326797", "0.53164476", "0.5310092", "0.53064585", "0.53014684" ]
0.76447755
0
Check final states exists
Проверить, существуют ли конечные состояния
public function hasFinal() { return !empty($this->finalStates); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasState(){\n return $this->_has(4);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasFinishState(){\n return $this->_has(5);\n }", "public function hasState() {\n return $this->_has(4);\n }", "public function isFinalState(): bool {\n return $this->finalState;\n }", "public function isNewStates()\n {\n if ($this->isNonexistent) return false;\n\n return !!$this->countNewStates();\n }", "public function hasInitial()\n {\n return !empty($this->initialStates);\n }", "function check_state_conflict($expected)\n{\n global $STATE_FILE;\n\n // get current state\n $cur_state = trim( file_get_contents($STATE_FILE) );\n\n if($cur_state === $expected)\n {\n return false;\n }\n else\n {\n return true;\n }\n}", "public function hasTargetState($state);", "function validstates($state)\n{\n global $f3;\n return in_array($state, $f3->get('states'));\n}", "public function hasComplete(){\n return $this->_has(2);\n }", "public function isFinalized()\n {\n return ($this->status == 'processing' || $this->status == 'valid');\n }", "protected function stateHasAfterCallback($state)\n {\n return isset($this->afterMaking[$this->class][$state])\n || isset($this->afterCreating[$this->class][$state]);\n }", "public function isCompleted(): bool\n {\n return ($this->progress_error + $this->progress_ok) >= \\count($this->state->getSourceStates());\n }", "public function hasFinal(): bool\n {\n return $this->finalAttr !== NULL;\n }", "abstract public function states();", "public function hasState($key)\n {\n return array_key_exists($key, $this->states);\n }", "function validState($state)\r\n {\r\n return in_array($state, $this->_dataLayer->getStates());\r\n }", "function _loadState()\n\t{\n\n\t\tif (empty($this->_state))\n\t\t{\n\n\t\t\t// current state info\n\t\t\t$query = 'SELECT c.*, ' .\n\t\t\t\t' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(\\':\\', c.id, c.alias) ELSE c.id END as slug '.\n\t\t\t\t' FROM #__ezrealty_state AS c' .\n\t\t\t\t' WHERE c.id = '. (int) $this->_id ;\n\t\t\t$this->_db->setQuery($query, 0, 1);\n\t\t\t$this->_state = $this->_db->loadObject();\n\n\t\t}\n\t\treturn true;\n\t}", "public function isFresh()\n {\n return ($this->level == -2);\n }", "public function hasStage(){\n return $this->_has(7);\n }", "public function isUnfinishedWarehouseExist();", "protected function hasCompleted()\r\n {\r\n return !(bool)$this->getExpectedStep();\r\n }", "function checkWorldFinished()\n{\n\tglobal $db;\n\t$sql = \"SELECT COUNT(DISTINCT(id)) FROM wg_buildings WHERE type_id=37 AND level =100\";\n\t$db->setQuery($sql);\n\t$count = (int)$db->loadResult();\n\tif($count>0)\n\t{\n\t\t$sql=\"UPDATE wg_users SET anounment='world_finished'\";\n\t\t$db->setQuery($sql);\n\t\t$db->query();\n\t\tif($db->getAffectedRows()==0)\n\t\t{\t\n\t\t\tglobalError2('function checkWorldFinished:'.$sql);\n\t\t}\t\n\t}\n\treturn true;\n}", "public function checkStateExists($name) {\n $this->recursive = -1;\n $options['conditions'] = array('State.name' => $name);\n $options['fields'] = array('State.id');\n try {\n $data = $this->find('all', $options);\n if ($data && isset($data[0]['State']) && $data[0]['State'] != \"\") {\n return $data[0]['State'];\n } else {\n return array();\n }\n } catch (Exception $e) {\n CakeLog::write('db', __FUNCTION__ . \" in \" . __CLASS__ . \" at \" . __LINE__ . $e->getMessage());\n return false;\n }\n }", "public function isComplete() {\n return !variable_get('og_7200_ogur_roles', FALSE);\n }", "public function checkAllSystems() {\n\t\techo \"All system are ready<br>\";\n\t\t$this->missionControl->setState($this->missionControl->getStartPowerUnits());\n\t}", "function checkBookings() {\n\t\t// Load Transitions Pool\n\t\t$this->initTransitions();\n\t\t\n\t\t$sim = false;\n\t\twhile(!$sim) {\n\t\t\t$ts = clone $this->transitions;\n\t\t\t$ts->reverse();\n\t\t\t\n\t\t\t// New Simulation\n\t\t\t$rs = new ReservationSimulator();\n\t\t\twhile($_res = $ts->pop())\n\t\t\t\t$rs->addTransition($_res);\n\t\t\t$sim = $rs->simulate();\n\t\t\t\n\t\t\t// pop the last transition on failure recheck bookings\n\t\t\tif(!$sim) $this->dismissedTrans->push($this->transitions->pop());\n\t\t}\n\t\t\n\t\treturn $this->finish();\n\t\t\n\n\t\twhile($o = $this->dismissedTrans->pop())\n\t\t\t_debug($o->getId());\n\t\t\t\n\t}", "public function has_finished()\n {\n return $this->days_left() == 0;\n }", "public function valid()\n {\n return (\n !is_null($this->current) &&\n $this->dataStore->has($this->current[$this->dataStore->getIdentifier()])\n );\n }", "public function valid() {\n\t\t\treturn isset( $this->stat_refs[ $this->position ] );\n\t\t}", "public function has_inited() {\n\t\treturn $this->doneInit;\n\t}", "abstract public function isComplete();", "public function isFinalized($id){ \n $q = $this->slcOrdrFild(\"finalized\", $id);\n return $this->check($q, \"yes\");\n }", "public function hasBranch(){\n return $this->_has(3);\n }", "public function isFinal(): bool\n {\n return $this->node->isFinal();\n }", "public function reverseState()\n {\n $etat = $this->getIsActive();\n\n return !$etat;\n }", "public function reverseState()\n {\n $etat = $this->getIsActive();\n\n return !$etat;\n }", "public function check_state( $state ) {\n\n\t\t$state_found = true;\n\n\t\tif ( ! get_option( '_transient_openID-wp-state--' . $state ) ) {\n\t\t\tdo_action( 'openID-wp-state-not-found', $state );\n\t\t\t$state_found = false;\n\t\t}\n\n\t\t$valid = get_transient( 'openID-wp-state--' . $state );\n\n\t\tif ( ! $valid && $state_found ) {\n\t\t\tdo_action( 'openID-wp-state-expired', $state );\n\t\t}\n\n\t\treturn boolval( $valid );\n\t}", "public function hasStatuses(){\n return $this->_has(1);\n }", "protected function hasToRegenerateFull() {\n return Cache::read('regenerate_full', 'estadisticas_full') === false;\n }", "public function hasAccountsWaitingInitialization()\n {\n return $this->accounts_waiting_initialization !== null;\n }", "public function has_inactive_dependencies(): bool;", "protected function updateState()\n {\n if (! array_key_exists($this->state, $this->state_tree))\n return false;\n\n foreach ($this->state_tree[$this->state] as $state) {\n if (strpos($this->line, $this->state_str[$state]) === 0) {\n $this->previous_state = $this->state;\n $this->state = $state;\n if (strlen($this->line) > strlen($this->state_str[$state]))\n $this->rerun = true; // There'll be additional info on this line\n return true;\n }\n }\n\n return false;\n }", "public function hasCurrentSuccess()\n {\n return $this->hasCurrent(self::NAMESPACE_SUCCESS);\n }", "function finished() {\n\t\treturn $this->tries && ( ( $this->ready() && ! $this->hasSteps() ) || ! $this->needed() );\n\t}", "public function isDone(): bool\n {\n return $this->index === count($this->objectListKeys);\n }", "public static function has($name) {\n\t\treturn isset(self::$state['$name']);\n\t}", "public function initialized()\n {\n return $this->connection->getSchemaManager()->tablesExist([self::SNAPSHOTS_TABLE]);\n }", "public function isFinished() {\n if($this->state == \"completed\" ||\n $this->state == \"rejected\" ||\n $this->state == \"failed\") {\n return true;\n } else {\n return false;\n }\n }", "public function valid()\n {\n return count($this->result_queue) !== 0;\n }", "public function stateExists($stateID) {\n\t\t$this->load->model('StateModel', '', true);\n\t\t// get the brewery information\n\t\t$rs = $this->StateModel->getStateCheck($stateID);\n\t\t// check if it really exists\n\t\t$boolean = count($rs) > 0 ? true : false;\n\t\t// check the boolean\n\t\tif($boolean === false) {\n\t\t\t$this->form_validation->set_message('stateExists', 'The %s you have chosen doesn\\'t exists. Please choose another.');\n\t\t}\n\t\treturn $boolean;\n\t}", "public function has_no_inactive_dependencies(): bool;", "public function __mlmFinal($state = true);", "public function hasPendingActions()\r\n {\r\n }", "public function isComplete()\n {\n if($this->name == null || $this->street1 == null || $this->city == null || $this->countrycode == null || $this->zip == null || $this->email == null)\n {\n return false;\n }\n $countriesRequiringStates = array(\"AR\", \"BR\", \"CA\", \"CN\", \"ID\", \"IN\", \"JP\", \"MX\", \"TH\", \"US\");\n if($this->state == null && in_array($this->countrycode, $countriesRequiringStates))\n {\n return false;\n }\n return true;\n }", "function checkState($state){\n\t\tif($state==1){\n\t\t\treturn true;\n\t\t}\n\t\telse{ //Bloqueado\n\t\t\treturn false;\n\t\t}\n\t}", "public static function isInitialized() {\n\t\treturn isset(self::$cachedMap);\n\t}", "public function hasInitialInventory()\n {\n return $this->initial_inventory !== null;\n }", "public function transactionIsInitState ($uri);", "protected function usesState()\n {\n return !$this->stateless;\n }", "public function isReady()\n {\n return ( $this->_stateManager->getState() === self::STATE_READY );\n }", "function checkIfState($checkMe){\n\t$states = array(\"Alabama\", \"Alaska\", \"American Samoa\", \"Arizona\", \"Arkansas\", \"California\", \"Colorado\", \"Connecticut\", \"Iowa\", \"Delaware\", \"District of Columbia\", \"Federated States of Micronesia\", \n\t\"Florida\", \"Georgia\", \"Guam\", \"Hawaii\", \"Idaho\", \"Illinois\", \"Indiana\", \"Kansas\", \"Kentucky\", \"Louisiana\", \"Maine\", \"Marshall Islands\", \"Maryland\", \"Massachusetts\", \n\t\"Michigan\", \"Minnesota\", \"Mississippi\", \"Missouri\", \"Montana\", \"Nebraska\", \"Nevada\", \"New Hampshire\", \"New Jersey\", \"New Mexico\", \"New York\", \"North Carolina\",\n\t\"North Dakota\", \"Northern Mariana Islands\", \"Ohio\", \"Oklahoma\", \"Oregon\", \"Palau\", \"Pennsylvania\", \"Puerto Rico\", \"Rhode Island\", \"South Carolina\", \"South Dakota\", \n\t\"Tennessee\", \"Texas\", \"Utah\", \"Vermont\", \"Virgin Islands\", \"Virginia\", \"Washington\", \"West Virginia\", \"Wisconsin\", \"Wyoming\"); \n\t\n\tif(in_array($checkMe, $states) == true){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n\n}", "public function getStates() {\n\t\t$statement = $this->database->prepare(\"SELECT * FROM tbl_state\");\n\t\t$statement->execute();\n\t\t$results = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n\t\treturn $results ? $results : false;\n\t}", "protected static function is_final($context)\n {\n }", "public function hasSitdown(){\r\n return $this->_has(4);\r\n }", "private function _isInitialized()\n {\n return ($this->_init || $this->_list_cache->isInitialized());\n }", "public function hasIsCheckIn(){\n return $this->_has(3);\n }", "public function valid() {\n\t\tif (isset($this->allSets[$this->key()])) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function hasMutations(){\n return $this->_has(3);\n }", "function done() {\n return $this->currentState === self::DONE;\n }", "public function valid(){\n return isset($this->items[$this->key()]);\n }", "public function valid(){\n return isset($this->items[$this->key()]);\n }", "function checkState($id)\n {\n }", "protected function usesState(): bool\n {\n return !$this->stateless;\n }", "public function isStatusValidToStart()\n {\n if ($this->pubDirectory->isExist($this->getRelativeFilePath(self::IMPORT_STATUS_READY))) {\n return true;\n }\n return false;\n }", "public static function userOneState()\n {\n\t\tstatic $count_state;\n $configClass = self::getConfig();\n if (!HelperOspropertyCommon::checkCountry()) {\n $defaultcounty = $configClass['show_country_id'];\n\t\t\tif($count_state == null){\n\t\t\t\t$db = JFactory::getDbo();\n\t\t\t\t$query = $db->getQuery(true);\n\t\t\t\t$query->select('count(id)')->from('#__osrs_states')->where('country_id = \"' . $defaultcounty . '\" and published = \"1\"');\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$count_state = $db->loadResult();\n\t\t\t}\n if ($count_state == 1) {\n return true;\n }\n }\n return false;\n }", "private function searchMustEnd(): bool\n {\n return in_array($this->search->fresh()->status, [\n Search::STATUS_FINISHED,\n Search::STATUS_FAILED,\n Search::STATUS_PAUSED\n ]);\n }", "public function testStateValidatesCorrectly()\n {\n $this->assertTrue($this->state->validate(uniqid()));\n\n // Test again with a different value.\n $this->assertTrue($this->state->validate(uniqid()));\n }" ]
[ "0.6827876", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.67381245", "0.6729427", "0.6569009", "0.63520217", "0.62565976", "0.5986576", "0.5875941", "0.5841307", "0.5810468", "0.5775254", "0.5738856", "0.57082456", "0.56866336", "0.5638371", "0.56341875", "0.5626585", "0.5599814", "0.55827934", "0.55535907", "0.553896", "0.5492883", "0.5488703", "0.54294765", "0.5416695", "0.54166317", "0.5413074", "0.54085684", "0.54019135", "0.5392395", "0.53845596", "0.53712887", "0.5367215", "0.53615516", "0.53489035", "0.53487045", "0.53487045", "0.5320455", "0.5311123", "0.53072053", "0.53068995", "0.53050476", "0.52760524", "0.526693", "0.52636886", "0.52621555", "0.52548623", "0.5252772", "0.525255", "0.52314943", "0.52307993", "0.52305907", "0.5228179", "0.52250123", "0.52214235", "0.5212761", "0.52034897", "0.52024424", "0.51992905", "0.5197258", "0.51953864", "0.51934034", "0.5193331", "0.5185607", "0.5183024", "0.5176267", "0.5175582", "0.51721543", "0.51665264", "0.51610553", "0.51606643", "0.51606643", "0.515293", "0.51521957", "0.51519454", "0.5144784", "0.5144186", "0.5142829" ]
0.7345255
0
Get all final states
Получить все конечные состояния
public function getFinal() { return $this->hasFinal() ? array_values($this->finalStates) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStates() {\n return $this->state;\n }", "abstract public function states();", "public function getStates(): array\n {\n return $this->states;\n }", "public function getStates(): StateSet;", "public function getStates() {\n\t\treturn empty( $this->container['states'] ) ? null : $this->container['states'];\n\t}", "protected function state_all() {\n return $this->_views->all_json();\n }", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getStates() {\n return $this->createQuery()\n ->select(\"DISTINCT c.state\")\n ->from(\"Companies_Model_Company c\")\n ->whereIn(\"c.status\", Companies_Model_Company::getActiveStatuses())\n ->andWhere(\"c.local_business\")\n ->orderBy(\"c.state ASC\")\n ->execute(array(), Doctrine_Core::HYDRATE_SCALAR);\n }", "public function getAllStates() {\n $states = [];\n $values = DB::table(self::TABLE_NAME)\n ->select([self::C_STATE, self::C_STATE_FULL_NAME])\n ->distinct()\n ->where('region', '!=', \" \")\n ->orderBy(self::C_STATE)\n ->get();\n\n foreach ($values as $value) {\n $states[$value->state] = $value->stateFullName;\n }\n\n return $states;\n }", "public function fetchAll()\n\t{\n\t\t$states = $this->getStatesModel()->fetchAll();\n\t\treturn $states;\n\t}", "public function getNextStates()\n {\n return $this->nextStates;\n }", "public function getStateList() {\n $states = State::latest()->paginate(10);\n return $states;\n }", "public function getState() {}", "public function getState() {}", "public function getState() {}", "final public function getState() {\n return $this->state;\n }", "public static function getStates() {\n $db = Zend_Registry::get('dbAdapterReadOnly');\n $select = $db->select()\n ->from(array('ps' => 'printer_states'))\n ->order('ps.id');\n\n return $db->fetchAll($select);\n }", "public function getState(){\n\t\treturn $this->state;\n\t}", "public function state(): array;", "public static function get_all_states()\n {\n $query = new Query;\n return $query->select(['core_states.*','core_zones.zone_name'])->from('core_states')\n ->innerJoin('core_zones','core_states.zone_id = core_zones.zone_id')\n ->orderBy(['core_states.state_name' => SORT_ASC])->All();\n }", "abstract public function getState(): array;", "public function getStates() {\n\t\t$statement = $this->database->prepare(\"SELECT * FROM tbl_state\");\n\t\t$statement->execute();\n\t\t$results = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n\t\treturn $results ? $results : false;\n\t}", "public function getTargetStates();", "function getState()\r\n\t{\r\n\t\treturn $this->state;\r\n\t}", "public function getState()\n {\n }", "public function states() {\n\t\t$this->loadModel('Data.States');\n\t\t$states = $this->States->find('all')->toArray();\n\n\t\t$this->set(compact('states'));\n\t\t$this->set('_serialize', ['states']);\n\t}", "public function getAllStates(){\n\n $states = $this->stateRepo->get();\n $states_array = array();\n if($states){\n foreach($states as $key=>$state)\n {\n $states_array[$key]['id'] = $state->getId();\n $states_array[$key]['name'] = $state->getName();\n\n }\n }\n return json_encode($states_array);\n }", "abstract public function getState() ;", "public function getState() {\n\t\treturn $this->state;\n\t}", "public function getState() {\n\t\treturn $this->state;\n\t}", "function getstates() {\n\t\t$sql = Processwire\\wire('database')->prepare(\"SELECT abbreviation as state, name FROM states\");\n\t\t$sql->execute();\n\t\treturn $sql->fetchAll(PDO::FETCH_ASSOC);\n\t}", "function getState()\n {\n\t\treturn $this->_state;\n }", "public function getStateList()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('state');\n\t\t$this->db->where('state_status', '1');\n\t\t$query = $this->db->get();\n\t\treturn $query->result() ;\n\t}", "function getStates(){\n\t\tApp::import('Model', 'State');\n\t\t$this->State = new State();\n\t\t$stateArr = array();\n\t\t$stateArr = $this->State->find('list',array(\n\t\t\t'fields'=>array('State.state_code','State.name'),\n\t\t\t'order'=>array('State.name')\n\t\t\t));\n\t\treturn $stateArr;\n\t}", "function getState() {\n return $this->state;\n }", "public function getState(){\n return $this->_getData(self::STATE);\n }", "public function getFromStates() {\n return $this->fromStates;\n }", "public function getState(): array\n {\n return [\n 'Pressure' => $this->pressure,\n 'Humidity' => $this->humidity,\n 'Temperature' => $this->temperature,\n ];\n }", "public function getState()\r\n {\r\n return $this->state;\r\n }", "public function getState()\r\n {\r\n return $this->state;\r\n }", "public static function workflowStates();", "public static function getStates()\n {\n return array('ACTIVE', 'DISABLED', 'DELETED');\n }", "public function getState() {\n return $this->state;\n }", "public static function getStates()\n {\n return self::$statesUSA;\n }", "public function getState() {\n return $this->_state;\n }", "public function getState()\r\n {\r\n return $this->_state;\r\n }", "public function getState(/* ... */)\n {\n return $this->_state;\n }", "public function getStateList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('state');\r\n\t\t$this->db->where('state_status', '1');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}", "public function getState() {\n\t\treturn self::$_state;\n\t}", "public function getAvailableStates()\n {\n return [\n self::STATE_NEW => 'New',\n self::STATUS_DONE => 'Done',\n self::STATUS_ERROR => 'Error'\n ];\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }" ]
[ "0.67806", "0.6576226", "0.6572894", "0.65708417", "0.6479763", "0.6455002", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.6399605", "0.63985413", "0.63791454", "0.6315753", "0.63057804", "0.63030994", "0.63029367", "0.6302337", "0.62340856", "0.61877584", "0.60950184", "0.6082301", "0.60816634", "0.6079281", "0.6078315", "0.6043002", "0.59726197", "0.59455687", "0.5937748", "0.5932976", "0.593251", "0.5916891", "0.5916891", "0.5912606", "0.5912419", "0.59034437", "0.59024686", "0.5890813", "0.5886468", "0.5881172", "0.5875973", "0.58648854", "0.58648854", "0.5852728", "0.58446044", "0.5844459", "0.58373183", "0.5835138", "0.58349985", "0.5832985", "0.5832217", "0.5826872", "0.5818447", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875" ]
0.7338602
0
Get all normal states
Получить все нормальные состояния
public function getNormal() { return $this->hasNormal() ? array_values($this->normalStates) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStates(): array\n {\n return $this->states;\n }", "public function getStates() {\n return $this->state;\n }", "public function getAllStates() {\n $states = [];\n $values = DB::table(self::TABLE_NAME)\n ->select([self::C_STATE, self::C_STATE_FULL_NAME])\n ->distinct()\n ->where('region', '!=', \" \")\n ->orderBy(self::C_STATE)\n ->get();\n\n foreach ($values as $value) {\n $states[$value->state] = $value->stateFullName;\n }\n\n return $states;\n }", "public static function getStates() {\n $db = Zend_Registry::get('dbAdapterReadOnly');\n $select = $db->select()\n ->from(array('ps' => 'printer_states'))\n ->order('ps.id');\n\n return $db->fetchAll($select);\n }", "abstract public function states();", "public function getStates() {\n return $this->createQuery()\n ->select(\"DISTINCT c.state\")\n ->from(\"Companies_Model_Company c\")\n ->whereIn(\"c.status\", Companies_Model_Company::getActiveStatuses())\n ->andWhere(\"c.local_business\")\n ->orderBy(\"c.state ASC\")\n ->execute(array(), Doctrine_Core::HYDRATE_SCALAR);\n }", "public function fetchAll()\n\t{\n\t\t$states = $this->getStatesModel()->fetchAll();\n\t\treturn $states;\n\t}", "public function getStateList() {\n $states = State::latest()->paginate(10);\n return $states;\n }", "public function getStates(): StateSet;", "public function getStates() {\n\t\treturn empty( $this->container['states'] ) ? null : $this->container['states'];\n\t}", "public function getFromStates() {\n return $this->fromStates;\n }", "public static function get_all_states()\n {\n $query = new Query;\n return $query->select(['core_states.*','core_zones.zone_name'])->from('core_states')\n ->innerJoin('core_zones','core_states.zone_id = core_zones.zone_id')\n ->orderBy(['core_states.state_name' => SORT_ASC])->All();\n }", "public static function getStates()\n {\n return array('ACTIVE', 'DISABLED', 'DELETED');\n }", "function getStates(){\n\t\tApp::import('Model', 'State');\n\t\t$this->State = new State();\n\t\t$stateArr = array();\n\t\t$stateArr = $this->State->find('list',array(\n\t\t\t'fields'=>array('State.state_code','State.name'),\n\t\t\t'order'=>array('State.name')\n\t\t\t));\n\t\treturn $stateArr;\n\t}", "public static function us_states(): array\n\t{\n\t\treturn ArrayLists::us_states();\n\t}", "public function state(): array;", "protected function state_all() {\n return $this->_views->all_json();\n }", "public function getStateList()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('state');\n\t\t$this->db->where('state_status', '1');\n\t\t$query = $this->db->get();\n\t\treturn $query->result() ;\n\t}", "public function getStatesList() {\n \t$user = Auth::user();\n \t$states = $user->states->sortBy('type_id');\n \treturn $states;\n }", "public function getStates() {\n\t\t$statement = $this->database->prepare(\"SELECT * FROM tbl_state\");\n\t\t$statement->execute();\n\t\t$results = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n\t\treturn $results ? $results : false;\n\t}", "public function enumStates()\n {\n $rVal = [];\n foreach ($this->xml->xpath('state') as $node) {\n $rVal[] = (string)$node[0]->attributes()->value;\n }\n\n return $rVal;\n }", "function getstates() {\n\t\t$sql = Processwire\\wire('database')->prepare(\"SELECT abbreviation as state, name FROM states\");\n\t\t$sql->execute();\n\t\treturn $sql->fetchAll(PDO::FETCH_ASSOC);\n\t}", "public function getStateList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('state');\r\n\t\t$this->db->where('state_status', '1');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public static function getStates()\n {\n return self::$statesUSA;\n }", "public static function getAuStates() : array {\n\t\t// Make sure the data is loaded.\n\t\tself::loadData();\n\t\treturn self::$_au;\n\t}", "function GetStates () {\n\t\t$this->db->order_by('name_long','ASC');\n\t\t$result = $this->db->get('states');\n\n\t\t$states = array();\n\t\tforeach ($result->result_array() as $state) {\n\t\t\t$states[] = array(\n\t\t\t\t\t\t\t'code' => $state['name_short'],\n\t\t\t\t\t\t\t'name' => $state['name_long']\n\t\t\t\t\t\t);\n\t\t}\n\n\t\treturn $states;\n\t}", "public function getStateList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('state');\r\n\t\t$this->db->where('state_status', '1');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\t\r\n\t}", "public function getState() {}", "public function getState() {}", "public function getState() {}", "public function getAllStates(){\n\n $states = $this->stateRepo->get();\n $states_array = array();\n if($states){\n foreach($states as $key=>$state)\n {\n $states_array[$key]['id'] = $state->getId();\n $states_array[$key]['name'] = $state->getName();\n\n }\n }\n return json_encode($states_array);\n }", "function &getObligatoryStates()\n\t{\n\t\tglobal $ilDB;\n\t\t$obligatory_states = array();\n\t\t$result = $ilDB->queryF(\"SELECT * FROM svy_qst_oblig WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\tif ($result->numRows())\n\t\t{\n\t\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t\t{\n\t\t\t\t$obligatory_states[$row[\"question_fi\"]] = $row[\"obligatory\"];\n\t\t\t}\n\t\t}\n\t\treturn $obligatory_states;\n\t}", "public function states() {\n\t\t$this->loadModel('Data.States');\n\t\t$states = $this->States->find('all')->toArray();\n\n\t\t$this->set(compact('states'));\n\t\t$this->set('_serialize', ['states']);\n\t}", "static function get_default_state();", "public function hasNormal()\n {\n return !empty($this->normalStates);\n }", "abstract public function getState(): array;", "public static function availableStates()\n {\n return array(\n self::STATUS_CLOSED,\n self::STATUS_MODERATED,\n self::STATUS_PUBLISHED,\n self::STATUS_VALIDATED\n );\n }", "public function getState(): array\n {\n return [\n 'Pressure' => $this->pressure,\n 'Humidity' => $this->humidity,\n 'Temperature' => $this->temperature,\n ];\n }", "public function getBaseState() {}", "public function getAllStatesByCode(){\n return array(\"AC\",\"AL\",\"AM\",\"AP\",\"BA\",\"CE\",\"DF\",\"ES\",\"GO\",\"MA\",\"MT\",\"MS\",\"MG\",\"PA\",\"PB\",\"PR\",\"PE\",\"PI\",\"RJ\",\"RN\",\"RO\",\"RS\",\"RR\",\"SC\",\"SE\",\"SP\",\"TO\");\n }", "protected function getCollapsedStates() {}", "public function getOrderStates() {\n // Load the list items.\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n\n // Select the required fields from the table.\n $query->select('o.id as id, o.value as value');\n $query->from('#__sdi_sys_orderstate AS o');\n $query->where('o.state = 1');\n $query->order('o.ordering');\n $query->group('o.ordering');\n $query->group('o.id');\n $query->group('o.value');\n\n try {\n $items = $this->_getList($query);\n } catch (RuntimeException $e) {\n $this->setError($e->getMessage());\n return false;\n }\n return $items;\n }", "public function getUnbuiltState()\n {\n return $this->state;\n }", "public function getStatesProperty()\n {\n return State::where('name', 'LIKE', \"%{$this->searchTerm}%\")\n ->whereNotIn('id', $this->selectedStates)\n ->whereCountryId($this->country)->get();\n }", "public function getAllStatesByName(){\n return array(\"Acre\" ,\"Alagoas\",\"Amazonas\",\"Amapá\",\"Bahia\",\"Ceará\",\"Distrito Federal\",\"Espírito Santo\",\"Goiás\",\"Maranhão\",\"Mato Grosso\",\"Mato Grosso do Sul\",\"Minas Gerais\",\"Pará\",\"Paraíba\",\"Paraná\",\"Pernambuco\",\"Piauí\",\"Rio de Janeiro\",\"Rio Grande do Norte\",\"Rondônia\",\"Rio Grande do Sul\",\"Roraima\",\"Santa Catarina\",\"Sergipe\",\"São Paulo\",\"Tocantins\");\n }", "public function states()\n {\n return $this->hasMany(State::class);\n }", "public static function getValidStatuses(): array\n {\n return array_keys(self::getStatuses());\n }", "public function getStateList()\n {\n\t\t//$stateList = $this->_dbState::select('pk_state_id', 'state_name')->orderBy('state_name', 'asc')->get();\n\n\t\t$stateList = $this->_dbState::orderBy('state_name', 'asc')->pluck('state_name', 'pk_state_id');\n\n\t\t$stateList = $stateList->toArray();\n\n\t\treturn $stateList;\n }", "function getAllStatesFromLocations(){\r\n\t$select = \"SELECT DISTINCT(state) FROM locations LEFT JOIN device_installations ON location_id=locations.id WHERE locations.name NOT LIKE '%Offline%' AND status=1 ORDER BY state\";\r\n\tglobal $pdo;\r\n\t$res = $pdo->query($select);\r\n\treturn $res->fetchAll(PDO::FETCH_ASSOC);\r\n}", "public function getStateMachine();", "public function getbynormal() {\n return $this->db->table($this->table)\n ->where('status_cd','normal')\n ->get();\n }", "function get_post_states($post)\n {\n }", "public function getTargetStates();", "public function states()\n\t{\n\t\t$states = State::all();\n\t\treturn StudentResource::collection($states);\n\t}", "public function getAvailableStates()\n {\n return [\n self::STATE_NEW => 'New',\n self::STATUS_DONE => 'Done',\n self::STATUS_ERROR => 'Error'\n ];\n }", "public function getState(){\n\t\treturn $this->state;\n\t}", "protected function getState()\n {\n if ($this->mixRange === true) {\n return ['values' => $this->Values];\n } else {\n return ['value' => $this->Value];\n }\n }", "public function getZoneStatesProperty()\n {\n return State::whereIn('id', $this->selectedStates)->get();\n }", "function get_all_states()\n{\n\t\t$states = array(\n\t\t\t\"Alabama\" => \"Alabama\",\n\t\t\t\"Alaska\" => \"Alaska\",\n\t\t\t\"Arizona\" => \"Arizona\",\n\t\t\t\"Arkansas\" => \"Arkansas\",\n\t\t\t\"California\" => \"California\",\n\t\t\t\"Colorado\" => \"Colorado\",\n\t\t\t\"Connecticut\" => \"Connecticut\",\n\t\t\t\"Delaware\" => \"Delaware\",\n\t\t\t\"District of Columbia\" => \"District of Columbia\",\n\t\t\t\"Florida\" => \"Florida\",\n\t\t\t\"Georgia\" => \"Georgia\",\n\t\t\t\"Hawaii\" => \"Hawaii\",\n\t\t\t\"Idaho\" => \"Idaho\",\n\t\t\t\"Illinois\" => \"Illinois\",\n\t\t\t\"Indiana\" => \"Indiana\",\n\t\t\t\"Iowa\" => \"Iowa\",\n\t\t\t\"Kansas\" => \"Kansas\",\n\t\t\t\"Kentucky\" => \"Kentucky\",\n\t\t\t\"Louisiana\" => \"Louisiana\",\n\t\t\t\"Maine\" => \"Maine\",\n\t\t\t\"Maryland\" => \"Maryland\",\n\t\t\t\"Massachusetts\" => \"Massachusetts\",\n\t\t\t\"Michigan\" => \"Michigan\",\n\t\t\t\"Minnesota\" => \"Minnesota\",\n\t\t\t\"Mississippi\" => \"Mississippi\",\n\t\t\t\"Missouri\" => \"Missouri\",\n\t\t\t\"Montana\" => \"Montana\",\n\t\t\t\"Nebraska\" => \"Nebraska\",\n\t\t\t\"Nevada\" => \"Nevada\",\n\t\t\t\"New Hampshire\" => \"New Hampshire\",\n\t\t\t\"New Jersey\" => \"New Jersey\",\n\t\t\t\"New Mexico\" => \"New Mexico\",\n\t\t\t\"New York\" => \"New York\",\n\t\t\t\"North Carolina\" => \"North Carolina\",\n\t\t\t\"North Dakota\" => \"North Dakota\",\n\t\t\t\"Ohio\" => \"Ohio\",\n\t\t\t\"Oklahoma\" => \"Oklahoma\",\n\t\t\t\"Oregon\" => \"Oregon\",\n\t\t\t\"Pennsylvania\" => \"Pennsylvania\",\n\t\t\t\"Rhode island\" => \"Rhode island\",\n\t\t\t\"South Carolina\" => \"South Carolina\",\n\t\t\t\"South Dakota\" => \"South Dakota\",\n\t\t\t\"Tennessee\" => \"Tennessee\",\n\t\t\t\"Texas\" => \"Texas\",\n\t\t\t\"Utah\" => \"Utah\",\n\t\t\t\"Vermont\" => \"Vermont\",\n\t\t\t\"Virgin Islands\" => \"Virgin Islands\",\n\t\t\t\"Virginia\" => \"Virginia\",\n\t\t\t\"Washington\" => \"Washington\",\n\t\t\t\"West Virginia\" => \"West Virginia\",\n\t\t\t\"Wisconsin\" => \"Wisconsin\",\n\t\t\t\"Wyoming\" => \"Wyoming\",\n\t\t\t\"Alberta\" => \"Alberta\",\n\t\t\t\"Nova Scotia\" => \"Nova Scotia\",\n\t\t\t\"British Columbia\" => \"British Columbia\",\n\t\t\t\"Ontario\" => \"Ontario\",\n\t\t\t\"Manitoba\" => \"Manitoba\",\n\t\t\t\"Prince Edward Island\" => \"Prince Edward Island\",\n\t\t\t\"New Brunswick\" => \"New Brunswick\",\n\t\t\t\"Quebec\" => \"Quebec\",\n\t\t\t\"Newfoundland\" => \"Newfoundland\",\n\t\t\t\"Saskatchewan\" => \"Saskatchewan\",\n\t\t\t\"Northwest Territories\" => \"Northwest Territories\",\n\t\t\t\"Yukon Territory\" => \"Yukon Territory\",\n\t\t\t\"Nunavut\" => \"Nunavut\",\n\t\t\t\"American Samoa\" => \"American Samoa\",\n\t\t\t\"Guam\" => \"Guam\",\n\t\t\t\"Marshall Islands\" => \"Marshall Islands\",\n\t\t\t\"Micronesia (Federated States of)\" => \"Micronesia (Federated States of)\",\n\t\t\t\"Palau\" => \"Palau\",\n\t\t\t\"Puerto Rico\" => \"Puerto Rico\",\n\t\t\t\"U.S. Minor Outlying Islands\" => \"U.S. Minor Outlying Islands\",\n\t\t\t\"Northern Mariana Islands\" => \"Northern Mariana Islands\",\n\t\t\t\"Armed Forces Africa\" => \"Armed Forces Africa\",\n\t\t\t\"Armed Forces Americas AA (except Canada)\" => \"Armed Forces Americas AA (except Canada)\",\n\t\t\t\"Armed Forces Canada\" => \"Armed Forces Canada\",\n\t\t\t\"Armed Forces Europe AE\" => \"Armed Forces Europe AE\",\n\t\t\t\"Armed Forces Middle East AE\" => \"Armed Forces Middle East AE\",\n\t\t\t\"Armed Forces Pacific AP\" => \"Armed Forces Pacific AP\",\n\t\t\t\"Foreign\" => \"Foreign\",\n\t\t\t\"Others Not Listed above\" => \"Others Not Listed above\"\n\t\t);\n\treturn $states;\n}", "public function state_list(){\n $entity_manager = $this->getEntityManager(); //access entity manager from inside the repository\n try{\n $query = $entity_manager->createQuery('SELECT s.name FROM UsersUserManageBundle:state s ');\n return $query->getArrayResult( ); // array of state objects\n throw new \\Exception( 'Database error in :: _state_list() function in UsermanageController' );\n }catch( \\Exception $e ){\n \n }\n }", "function get_states_array() {\n include(PMDROOT.'/includes/state_codes.php');\n $states = array();\n foreach($state_codes AS $code=>$state) {\n $state = ucwords(strtolower($state));\n $states[$state] = $state;\n }\n unset($state_codes,$code,$state);\n return $states;\n}", "public function getState(){\n return $this->_getData(self::STATE);\n }", "public static function allStatuses()\n {\n $statuses = ProductOrderStatus::all();\n return $statuses;\n }", "public function getState()\n {\n }", "public static function workflowStates();", "public function getCollection()\n {\n\n $State = State::select('tbl_state.*');\n return $State->get();\n }", "public function getInitialState(): StateContract\n {\n return $this->newState(['value' => 1]);\n }", "abstract public function getState() ;", "protected function getState()\n {\n return $this->stateRaw[$this->name];\n }", "public function get_all_state()\n\t {\n\t \t $data=(array)json_decode(file_get_contents(\"php://input\"));\n\t \t$id=$data['country_id'];\n\t \t$query=$this->ApiModel->get_all_state($id);\n\t \techo json_encode($query);\n\t }", "public static function getStates()\n {\n /** @var Loyalty $module */\n $module = Module::getInstanceByName('loyalty');\n\n return [\n static::getDefaultId() => $module->getL('Awaiting validation'),\n static::getValidationId() => $module->getL('Available'),\n static::getCancelId() => $module->getL('Cancelled'),\n static::getConvertId() => $module->getL('Already converted'),\n ];\n }", "public function all()\n {\n return $this->machine->all();\n }", "public function getStates() {\n $stateList = array();\n \n if (!empty($this->billing_country)) {\n /*\n * PCM\n */\n $stateList = Subregion::model()->findAll('region_id=\"' . $this->billing_country . '\"');\n\n $stateList = CHtml::listData($stateList, 'name', 'name');\n \n }\n return $stateList;\n }", "final public function getState() {\n return $this->state;\n }", "public function getStates() {\n $stateList = array();\n if (!empty($this->shipping_country)) {\n /*\n * PCM\n */\n $stateList = Subregion::model()->findAll('region_id=\"' . $this->shipping_country . '\"');\n\n $stateList = CHtml::listData($stateList, 'name', 'name');\n }\n return $stateList;\n }", "private function normalize($state) {\n list($inside, $outside, $lamp) = $state;\n sort($inside);\n sort($outside);\n return array($inside, $outside, $lamp);\n }", "private function getInvisibleOnFrontStatuses()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\treturn $this->_getStatuses(false);\n\t\t}\n\t}", "protected function getState()\n {\n return Str::random(40);\n }", "protected function getState()\n {\n return Str::random(40);\n }", "function getStates(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from(TBL_MST_STATE);\r\n\t\t$this->db->where(array('status'=>1));\r\n\t\t$recordSet = $this->db->get();\r\n\t\t$data=$recordSet->result() ;\r\n\t\treturn $data;\r\n\t}", "public static function getAll(): array\n\t{\n\t\t$key = '';\n\t\t$cacheName = 'MenuAll';\n\t\tif (!\\App\\Cache::has($cacheName, $key)) {\n\t\t\t$menuModels = [];\n\t\t\t$dataReader = (new App\\Db\\Query())->from(self::$menusTable)->orderBy(['sequence' => SORT_ASC])->createCommand()->query();\n\t\t\twhile ($rowData = $dataReader->read()) {\n\t\t\t\t$blockId = (int) $rowData[self::$menuId];\n\t\t\t\t$menuModels[$blockId] = self::getInstanceFromArray($rowData);\n\t\t\t}\n\t\t\t$dataReader->close();\n\t\t\t\\App\\Cache::save($cacheName, $key, $menuModels);\n\t\t}\n\t\treturn \\App\\Cache::get($cacheName, $key);\n\t}", "public function getFlats() {\n return $this->flats;\n }", "public function getAllStateZero(){\n try\n {\n $movieList = array();\n\n $query = \"SELECT * FROM movies WHERE state = 0 ORDER BY title\";\n\n $this->connection = Connection::getInstance();\n\n $resultSet = $this->connection->execute($query);\n \n if($resultSet){\n $mapping= $this->map($resultSet);\n if(!is_array($mapping)){\n array_push($movieList,$mapping);\n }else{\n $movieList=$mapping;\n }\n }\n }\n catch(\\PDOException $ex)\n {\n throw $ex;\n }\n\n if(!empty($resultSet)){\n \n return $movieList; \n }else{\n return null;\n }\n }", "public function getFinal()\n {\n return $this->hasFinal() ? array_values($this->finalStates) : null;\n }", "public function getStatesAsOptionList()\n {\n $result = [];\n\n $result[self::STATE_AVAILABLE] = __('Available');\n $result[self::STATE_USED] = __('Used');\n $result[self::STATE_REDEEMED] = __('Redeemed');\n $result[self::STATE_EXPIRED] = __('Expired');\n\n return $result;\n }", "function getStatesList()\n\t\t{\n\t\t\t$sSQL\t=\t\"select abbr , name from tbl_states\";\n\t\t\t$response = $this->Execute($sSQL);\n\t\t\t\n\t\t\t$stateList = array();\n\t\t\t\n\t\t\twhile($row = $response->FetchRow())\n\t\t\t{\t\t\t\n\t\t\t\t$arr['abbr'] = $row['abbr'];\n\t\t\t\t$arr['name'] = $row['name'];\n\t\t\t\t$stateList[] = $arr;\n\t\t\t}\n\t\t\t\n\t\t\treturn $stateList;\t\t\t\n\t\t}" ]
[ "0.647964", "0.6424091", "0.63932616", "0.62895477", "0.6230935", "0.6228826", "0.62103736", "0.61879295", "0.6147332", "0.6135253", "0.61041045", "0.6073023", "0.605905", "0.5990167", "0.5959515", "0.59104687", "0.58974403", "0.5879883", "0.5875688", "0.58569294", "0.58413947", "0.58405256", "0.5835847", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.57904226", "0.57524055", "0.5752364", "0.5715602", "0.5698907", "0.5698424", "0.56981367", "0.56950283", "0.5691637", "0.5684272", "0.56748945", "0.56520236", "0.565142", "0.5626792", "0.56233406", "0.56090754", "0.5604719", "0.5547426", "0.55223346", "0.5496003", "0.54908305", "0.5490014", "0.5489743", "0.54861414", "0.54854536", "0.5479871", "0.5476051", "0.5474727", "0.54741967", "0.5472125", "0.54699296", "0.54598206", "0.54565156", "0.54349023", "0.5433259", "0.54332155", "0.53879243", "0.5385671", "0.53737485", "0.5373349", "0.537006", "0.53624386", "0.5358198", "0.53492725", "0.5348741", "0.5348202", "0.534795", "0.5338587", "0.53241926", "0.53209084", "0.5313896", "0.53123146", "0.5310689", "0.53093934", "0.53075796", "0.53075796", "0.53032964", "0.52965087", "0.5287493", "0.5286402", "0.5283132", "0.5258036", "0.52538586" ]
0.70630133
0
Creates a form to delete a role entity.
Создает форму для удаления сущности роли.
private function createDeleteForm(Roles $role) { return $this->createFormBuilder() ->setAction($this->generateUrl('back_roles_delete', array('id' => $role->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm(Role $role)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('role_delete', array('id' => $role->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "public function deleteRolesAction(){\n \n $request = $this->getRequest();\n \n if(! isset($request->id)) {\n // TODO Massege (Helper bauen??!)\n $this->_helper->messenger('error', \n Zend_Registry::get('config')->messages->role->invalid);\n return $this->_redirect('/admin/role');\n }\n \n $entity = 'Jbig3\\Entity\\RolesEntity';\n $repositoryFunction = 'findOneById';\n \n $role = $this->em->getRepository($entity)->$repositoryFunction($request->id);\n \n if($role !== null) {\n // TODO Cascade - hier anders gelöst (Kinder vorher manuell löschen)\n if(count($role->rules)) {\n // Masseges\n $this->_helper->messenger('error', \n 'Unable to remove group. Please remove dependencies first (Manual)');\n return $this->_redirect('/admin/role');\n }\n \n $roleName = $role->name;\n \n $this->em->remove($role);\n $this->em->flush();\n \n // TODO Masseges\n $this->_helper->messenger('success', \n sprintf(Zend_Registry::get('config')->messages->role->delete, $roleName));\n return $this->_redirect('/admin/role');\n } else {\n // TODO Masseegs\n $this->_helper->messenger('success', \n Zend_Registry::get('config')->messages->role->invalid);\n return $this->_redirect('/admin/role');\n }\n }", "public function actionDeleteRole ()\n\t\t{\n\n\t\t\t$auth = Yii::$app->getAuthManager();\n\t\t\t$role = $auth->getRole(Yii::$app->request->get('id'));\n\t\t\t$auth->remove($role);\n\t\t\t$url = Yii::$app->request->referrer . '#roles';\n\t\t\tYii::$app->response->redirect($url);\n\n\t\t\tYii::$app->end();\n\t\t}", "function uc_roles_deletion_form($form, &$form_state, $account, $rid) {\n $expiration = db_query(\"SELECT expiration FROM {uc_roles_expirations} WHERE uid = :uid AND rid = :rid\", array(':uid' => $account->uid, ':rid' => $rid))->fetchField();\n if ($expiration) {\n\n $role_name = _uc_roles_get_name($rid);\n\n $form['user'] = array('#type' => 'value', '#value' => format_username($account->name));\n $form['uid'] = array('#type' => 'value', '#value' => $account->uid);\n $form['role'] = array('#type' => 'value', '#value' => $role_name);\n $form['rid'] = array('#type' => 'value', '#value' => $rid);\n\n $form = confirm_form(\n $form,\n t('Delete expiration of %role_name role for the user !user?', array(\n '!user' => theme('username', array(\n 'account' => $account,\n 'name' => check_plain($account->name),\n 'link_path' => 'user/' . $account->uid,\n )),\n '%role_name' => $role_name,\n )),\n 'admin/user/user/expiration',\n t('Deleting the expiration will give !user privileges set by the %role_name role indefinitely unless manually removed.', array(\n '!user' => theme('username', array(\n 'account' => $account,\n 'name' => check_plain($account->name),\n 'link_path' => 'user/' . $account->uid,\n )),\n '%role_name' => $role_name,\n )),\n t('Yes'),\n t('No')\n );\n }\n else {\n $form['error'] = array(\n '#markup' => t('Invalid user id or role id.'),\n );\n }\n\n return $form;\n}", "private function createDeleteForm(Event $event)\n {\n // $this->enforceUserSecurity('ROLE_USER');\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('slug' => $event->getSlug())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function roleDelete(Role $role);", "private function createDeleteForm(Efunction $efunction)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('efunction_delete', array('id' => $efunction->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Acte $acte)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acte_delete', array('id' => $acte->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function postDeleteRole(DeleteRequest $request)\n {\n $id = \\Input::get('id');\n // $student = Student::find($id);\n $gen_user_role = GenUserRole::find($id);\n $gen_user_role->delete();\n return redirect('gen_user');\n }", "public function deleting(Role $role)\n {\n }", "private function createDeleteForm(MostraMizaUllirit $mostraMizaUllirit)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('mostramizaullirit_delete', array('id' => $mostraMizaUllirit->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Event $event)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Event $event)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Event $event)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(Role $role)\n {\n //\n if($role->name ==\"app-admin\"){\n\n }else{\n $role->delete();\n }\n return redirect('roles');\n }", "public function getForm()\n {\n return new RoleForm;\n }", "private function createDeleteForm(Events $event) {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('events_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(ArmasMedico $armasMedico)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('armasmedico_delete', array('id' => $armasMedico->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(RhythmMaterial $rhythmMaterial)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rhythmmaterial_delete', array('id' => $rhythmMaterial->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('rubrique_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la rubrique courante'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(Aspirante $aspirante)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aspirante_delete', array('id' => $aspirante->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Projecte $projecte)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('projecte_delete', array('id' => $projecte->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Musicien $musicien)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('musicien_delete', array('codeMusicien' => $musicien->getCodemusicien())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function postDelete()\n {\n self::getConnection()->delete('@system_user_role', ['user_id' => $this->getId()]);\n }", "private function createDeleteForm(Restricciones $restriccione)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('restricciones_delete', array('id' => $restriccione->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function executeDelete()\n {\n if($this->hasRequestParameter('ids')){\n $roles = array_reverse(RolePeer::retrieveByPKs(json_decode($this->getRequestParameter('ids'))));\n\n foreach($roles as $role){\n\t$role->delete();\n }\n\n }elseif($this->hasRequestParameter('id')){\n $role = RolePeer::retrieveByPk($this->getRequestParameter('id'));\n $role->delete();\n }\n\n $this->msg_alert = array('info', $this->getContext()->getI18N()->__(\"Rol borrado.\"));\n return $this->renderComponent('roles', 'list');\n }", "protected function createComponentDeleteForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno');\r\n\t\t$form->onSuccess[] = callback($this, 'deleteFormSubmitted');\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "private function createDeleteForm(Recette $recette)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('recette_delete', array('id' => $recette->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Team $entity)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('app_team_delete', array('id' => $entity->getId())))\r\n ->setMethod('DELETE')\r\n ->getForm()\r\n ;\r\n }", "function travel_delete_form($form, &$form_state, $entity) {\n // Store the entity in the form.\n $form_state['entity'] = $entity;\n\n // Show confirm dialog.\n $entity_uri = entity_uri('travel', $entity);\n $message = t('Are you sure you want to delete entity %title?', array('%title' => entity_label('travel', $entity)));\n return confirm_form(\n $form,\n $message,\n $entity_uri['path'],\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "private function createDeleteForm(Metas $meta)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_crud_metas_delete', array('id' => $meta->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(Role $role)\n {\n $role->delete();\n return redirect()->route('role.index')->with('success','Role Deleted Successfully');\n }", "function mongo_node_page_delete($form, $form_state, $entity_type, $entity) {\n $form['#entity'] = $entity;\n $uri = entity_uri($entity_type, $entity);\n\n return confirm_form($form,\n t('Are you sure you want to delete %title', array('%title' => $entity->title)),\n $uri['path'],\n t('This action cannot be undone'),\n t('Delete'),\n t('Cancel')\n );\n}", "private function createDeleteForm(ManejoReproductivo $manejoReproductivo)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('manejoreproductivo_delete', array('id' => $manejoReproductivo->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id){\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('reserva_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Eliminar Reserva', 'attr' => array('class'=>'btn btn-danger btn-block')))\n\t\t\t->getForm()\n\t\t;\n\t}", "public function destroy(Role $role)\n {\n $role->delete();\n\n return redirect()->route('admin.user_managment.role.index');\n }", "private function createDeleteForm(Reglement $reglement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reglement_delete', array('codeRegl' => $reglement->getCoderegl())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Absences $absence)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('student_absences_delete', array('id' => $absence->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(Role $role)\n {\n $request = request();\n\n if ($request->isMethod('get')) {\n return view('roles.delete', array('role' => $role));\n } elseif ($request->isMethod('delete')) {\n try {\n $role->delete();\n\n return redirect()->route('roles.index')->with('success_messages', array(__('global.delete_success_notify')));\n } catch (\\Exception $e) {\n $errorMessage = formatHandleErrorMessage(__('global.delete_fail_notify'), $e);\n return redirect()->back()->withInput()->withErrors($errorMessage);\n }\n }\n }", "public function destroy(RoleDelete $request, Role $role)\n {\n $data = $request->validated();\n if($data['confirm'] == true) {\n $role->delete();\n return redirect(route('users.index'));\n }\n return back()->withErrors($request);\n }", "private function createDeleteForm(Complect $complect)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nomenclature_complect_delete', array('id' => $complect->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(Role $role)\n {\n \n $this->authorize('delete', $role);\n $role->delete();\n return redirect()->route('admin.roles.index')->withFlash('Role eliminado correctamente');\n \n }", "private function createDeleteForm(Evennements $evennement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('evennements_delete', array('id' => $evennement->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function eliminar(Request $form)\n {\n // Recibe el id de la marca a eliminar\n $marca = Marca::find($form['id']);\n // Elimina la marca de la BBDD\n $marca->delete();\n // Redirije a la ruta /marcas\n return redirect('/marcas');\n }", "public function createRolesAction(){\n \n $request = $this->getRequest();\n \n $form = new Admin_Model_Forms_RolesForm($this->em);\n \n if($request->isPost()) {\n if($form->isValid($request->getParams())) {\n \n $role = new Jbig3\\Entity\\RolesEntity();\n $role->name = $request->name;\n \n if($request->parentRole != '') {\n $role->parent = $this->em->getReference('Jbig3\\Entity\\RolesEntity',\n $request->parentRole);\n }\n \n $this->em->persist($role);\n $this->em->flush();\n \n // TODO Massege\n $this->_helper->messenger('success', \n sprintf(Zend_Registry::get('config')->messages->role->create, \n $request->name));\n return $this->_redirect('/admin/role/create');\n } else {\n $this->view->errors = $form->getErrors();\n }\n }\n $this->view->form = $form;\n }", "public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}", "private function createDeleteForm($id)\n {\n \n $form = $this->createFormBuilder(null, array('attr' => array('id' => 'entrada_detalles_eliminar_type')))\n ->setAction('')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'icon' => 'trash', 'attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n \n return $form;\n \n \n }", "private function createDeleteForm(CalendarEvent $event)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ma_lrm_event_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function createDeleteForm($id){\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rsp_delete',array('id'=>$id)))\n ->setMethod('DELETE')\n ->add('submit','submit',array('label'=>'Delete'))\n ->getForm()\n ;\n }", "public function deleteAction() : object\n {\n if ($_SESSION['permission'] === \"admin\") {\n $form = new DeleteForm($this->di);\n $form->check();\n\n $this->page->add(\"user/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $this->page->render([\n \"title\" => \"Delete an item\",\n ]);\n }\n $this->di->get(\"response\")->redirect(\"user/login\");\n }", "public function destroy(Model $role)\n {\n $role->delete();\n return redirect()->route('admin.role.index')->with('notificationText', ' Role Destroy Successfully!');\n }", "public function destroy(Role $role)\n {\n //dd($role->toArray());\n $role->detachAllPermissions();\n $role->delete();\n writeLog('刪除 角色',$role->toArray());\n Session::flash('flash_message', '刪除成功!');\n // flash()->overlay('刪除成功!','系統訊息:');\n return redirect('/admin/role');\n }", "public function destroy(Role $role) {\n\t\t$this->authorize('hasaccess', 'roles.destroy');\n\t\t$role->delete();\n\t\treturn redirect()->route('role.index')->with('status_success', 'Role successfully removed');\n\t}", "private function createDeleteForm(Covoiturage $covoiturage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnel_covoiturage_delete', array('id' => $covoiturage->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "public function destroy(Request $request, $id) {\n // Fetch the role object\n // $role = $this->roleRepository->findById($id);\n\n // Remove the role\n // $role->delete();\n\n // // All done\n // $message = trans(\"comman.role\").' '.\"'{$role->name}'\".' '.trans(\"comman.removed\");\n // if ($request->ajax()) {\n // return response()->json([$message], 200);\n // }\n\n // session()->flash('success', $message);\n // return redirect()->route('roles.index');\n\n $id = Crypt::decryptString($id);\n $model = Role::find($id);\n if ($model) {\n $dependency = $model->deleteValidate($id);\n if (!$dependency) {\n $model->deleted = '1';\n $model->save();\n Flash::success(trans(\"comman.role_deleted\"));\n }else {\n Flash::error(trans(\"comman.role_dependency_error\",['dependency'=>$dependency]));\n }\n } else {\n Flash::error(trans(\"comman.role_error\"));\n }\n return redirect()->route('roles.index');\n }", "private function createDeleteForm(Claim $claim)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('claim_delete', array('id' => $claim->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(Role $role)\n {\n //\n DB::beginTransaction();\n try{\n $role->delete();\n DB::commit();\n return redirect('roles');\n }catch(\\Exception $e){\n DB::rollBack();\n return redirect('roles');\n }\n }", "private function createDeleteForm(Eventos $evento)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eventos_delete', array('id' => $evento->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function create()\n {\n $role = new Role;\n $form = RolePresenter::form($role, 'create');\n\n Site::set('title', trans('orchestra/control::title.roles.create'));\n\n return View::make('orchestra/control::roles.edit', array(\n 'role' => $role,\n 'form' => $form,\n ));\n }", "public function remove(AccountDomainModels\\Role $entity)\n {\n $id = $entity->id()->value();\n\n $this->model->destroy($id);\n }", "private function createDeleteForm(Extra $extra)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('extra_delete', array('id' => $extra->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy($id)\n {\n DB::table(\"roles\")->where('id',$id)->delete();\n return redirect()->route('admin.roles')\n ->with('success','Permissão deletada com sucesso');\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('caracteristicasequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Registro $registro)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('registro_delete', array('id' => $registro->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function del_role(){\n\t\textract($_POST);\n\n\t\t//Connection establishment to get data from REST API\n\t\t$path=base_url();\n\t\t$url = $path.'api/manageRoles_api/del_role?role_id='.$role_id;\t\t\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$response_json = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$response=json_decode($response_json, true);\n\t\t//api processing ends\n\n\t\tif($response['status']==0){\n\t\t\techo '<div class=\"alert alert-danger\">\n\t\t\t<strong>'.$response['status_message'].'</strong> \n\t\t\t</div>\t\t\t\t\t\t\n\t\t\t';\t\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\techo '<div class=\"alert alert-warning\">\n\t\t\t<strong>'.$response['status_message'].'</strong> \n\t\t\t</div>\t\t\t\t\t\t\n\t\t\t';\t\t\t\t\n\t\t\t\n\t\t}\t\n\t\t\n\t}", "private function createDeleteForm(Partido $partido) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('partido_delete', ['id' => $partido->getId()]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function confirmDelete(Role $role)\n {\n $this->authorize('delete', Role::class);\n\n return view('laralum::pages.confirmation', [\n 'method' => 'DELETE',\n 'action' => route('laralum::roles.destroy', ['role' => $role]),\n ]);\n }", "public function destroy(Role $role)\n {\n try{\n $role->delete();\n return redirect()->back()\n ->with('success', 'Role Deleted successfully.');\n }catch(\\Exception $e){\n DB::rollback();\n return Redirect::back()->with('error',$e->getMessage());\n }\n }", "private function createDeleteForm(Materials $material)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('materials_delete', array('id' => $material->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('userman_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "public function create()\n {\n $role = new Role();\n\n return View::make('pvadmin.roles.form')\n ->with('title', 'Create Role')\n ->with('action', 'pvadmin.roles.store')\n ->with('method', 'post')\n ->with('permissions', Permission::optionsList())\n ->with('role', $role);\n }", "private function createDeleteForm(Brand $brand)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('brand_delete', array('id' => $brand->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function newAction()\n {\n $journal = $this->get('ojs.journal_service')->getSelectedJournal();\n if (!$this->isGranted('CREATE', $journal, 'userRole')) {\n throw new AccessDeniedException(\"You are not authorized for view this page\");\n }\n $entity = new JournalRole();\n $entity->setJournal($journal);\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $form = $this->createCreateForm($entity);\n\n return $this->render(\n 'OjsJournalBundle:JournalRole:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('empleado_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Recipe $recipe)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('recipe_delete', array('id' => $recipe->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy($id)\n {\n $role=Role::find($id);\n\n $role->delete();\n\n return view('admin.pages.index_role');\n\n }", "private function createDeleteForm(Proprietaire $proprietaire) {\n return $this->createFormBuilder\n ->setAction($this->generateUrl('post_admin_delete', array('id' => $proprietaire->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(ModelMenu $modelMenu) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('modelmenu_delete', array('id' => $modelMenu->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(SkipMode $skipMode)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('skipmode_delete', array('id' => $skipMode->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private\n function createAgenceeDeleteForm(Agence $agence)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('agencee_delete', array('id' => $agence->getAgenceId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Tblyear $tblyear)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tblyear_delete', array('id' => $tblyear->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function deleteAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n $journal = $this->get('ojs.journal_service')->getSelectedJournal();\n if (!$this->isGranted('DELETE', $journal, 'userRole')) {\n throw new AccessDeniedException(\"You are not authorized for view this page\");\n }\n $entity = $em->getRepository('OjsJournalBundle:JournalRole')->findOneBy(\n array('id' => $id, 'journal' => $journal)\n );\n $this->throw404IfNotFound($entity);\n\n $csrf = $this->get('security.csrf.token_manager');\n $token = $csrf->getToken('ojs_journal_role'.$entity->getId());\n if($token!=$request->get('_token'))\n throw new TokenNotFoundException(\"Token Not Found!\");\n\n $em->remove($entity);\n $em->flush();\n $this->successFlashBag('successful.remove');\n\n return $this->redirectToRoute('ojs_journal_role_index');\n }", "private function createDeleteForm(Livr $livr)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('livr_delete', array('idv' => $livr->getIdv())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Examenrealizado $examenrealizado)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('examenrealizado_delete', array('idexamenrealizado' => $examenrealizado->getIdexamenrealizado())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('solmantenimientoidentificacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar','attr'=>array('class'=>'btn btn-danger btn btn-danger btn-lg btn-block')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Demandados $demandado)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('demandados_delete', array('id' => $demandado->getIdDemandado())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(AbsenceEmploye $absenceEmploye)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('absenceemploye_delete', array('idAbsenceE' => $absenceEmploye->getIdabsencee())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('utente_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "public function destroy(Role $role)\n {\n if(Auth::user()->can('destroy-roles')){\n ActivityLogger::activity(\"Suppression du role ID:\".$role->id.'('.$role->name.') par l\\'utilisateur ID:'.Auth::id().\"(\".Auth::user()->name.\")\");\n $role->delete();\n return redirect()->route(\"roles.index\")->with('success', 'Role supprimé avec succès'); \n }else{\n return back()->with('error',\"Vous n'avez pas ce droit\");\n } \n }", "private function createDeleteForm(Orden $orden)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('orden_delete', array('id' => $orden->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('admin_consulta_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(RelationUserEntite $relationUserEntite)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('relationuserentite_delete', array('id' => $relationUserEntite->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function create()\n {\n return view('admin.crud_admin.role.create');\n\n }", "private function createDeleteForm(NomDpa $nomdpa)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dpa_delete', array('id' => $nomdpa->getIddpa())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Materiel $materiel) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('materieladmin_delete', array('id' => $materiel->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(m_employee $m_employee)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('prefix_update_delete', array('id' => $m_employee->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(Role $role)\n {\n $role->permissions()->detach();\n $role->delete();\n return redirect(\\Config::get(\"admin\").\"/roles/\");\n }", "public function destroy(Role $role)\n {\n //\n }", "public function destroy(Role $role)\n {\n //\n }", "public function destroy(Role $role)\n {\n //\n }" ]
[ "0.79986936", "0.69734687", "0.69086474", "0.6816056", "0.6799801", "0.6702436", "0.6464739", "0.64358765", "0.6387753", "0.6355804", "0.63335204", "0.63201606", "0.63201606", "0.63201606", "0.63067895", "0.6303177", "0.62701714", "0.62513304", "0.6242807", "0.62261164", "0.6204073", "0.6181939", "0.6166027", "0.61537284", "0.6152475", "0.61454445", "0.61361235", "0.6128081", "0.6126932", "0.61123484", "0.6107838", "0.6103415", "0.61018616", "0.61011076", "0.6099849", "0.6091326", "0.6086391", "0.60771734", "0.60728484", "0.60676986", "0.6058282", "0.6054362", "0.60534006", "0.60469866", "0.6045603", "0.6042272", "0.60394025", "0.603542", "0.6026519", "0.60126567", "0.60051036", "0.5993625", "0.598668", "0.5986051", "0.5986045", "0.5981605", "0.59770197", "0.59741086", "0.597211", "0.59630615", "0.5962608", "0.59591365", "0.59555876", "0.59529865", "0.59521836", "0.5950867", "0.594558", "0.5944002", "0.5943067", "0.5938623", "0.59327376", "0.59314084", "0.5924978", "0.5922755", "0.5912167", "0.5910964", "0.59099144", "0.5909664", "0.59052587", "0.59040177", "0.5903883", "0.5902486", "0.5901408", "0.5899902", "0.58946943", "0.5894359", "0.5893648", "0.5891216", "0.5891048", "0.58888006", "0.58851737", "0.58844495", "0.5882836", "0.58820194", "0.5877036", "0.58758235", "0.5873056", "0.58717364", "0.58717364", "0.58717364" ]
0.80152273
0
/ Plugin Name: My Custom WP Functions Description: Custom Additionals Author: David Mchale Author URI: / Unregister default widgets.
Название плагина: Мои кастомные функции WordPress Описание: Кастомные дополнения Автор: Дэвид Мчейл URI автора: Отписать стандартные виджеты.
function custom_unregister_default_widgets() { unregister_widget( 'WP_Widget_Archives' ); unregister_widget( 'WP_Widget_Calendar' ); unregister_widget( 'WP_Widget_Categories' ); unregister_widget( 'WP_Widget_Meta' ); unregister_widget( 'WP_Widget_Pages' ); unregister_widget( 'WP_Widget_Recent_Comments' ); unregister_widget( 'WP_Widget_Recent_Posts' ); unregister_widget( 'WP_Widget_RSS' ); unregister_widget( 'WP_Widget_Search' ); unregister_widget( 'WP_Nav_Menu_Widget' ); unregister_widget( 'WP_Widget_Tag_Cloud' ); unregister_widget( 'Akismet_Widget' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unregister_default_widgets() {\n\t\\add_action( 'widgets_init', 'WPS\\_unregister_default_widgets' );\n}", "function unregister_default_wp_widgets() {\n unregister_widget('WP_Widget_Archives');\n unregister_widget('WP_Widget_Calendar');\n unregister_widget('WP_Widget_Categories');\n unregister_widget('WP_Widget_Meta');\n unregister_widget('WP_Widget_Pages');\n unregister_widget('WP_Widget_Recent_Comments');\n unregister_widget('WP_Widget_Recent_Posts');\n unregister_widget('WP_Widget_RSS');\n unregister_widget('WP_Widget_Links');\n unregister_widget('WP_Widget_Search');\n}", "function unregister_default_wp_widgets() {\n unregister_widget('WP_Widget_Pages');\n unregister_widget('WP_Widget_Calendar');\n unregister_widget('WP_Widget_Archives');\n unregister_widget('WP_Widget_Links');\n unregister_widget('WP_Widget_Meta');\n unregister_widget('WP_Widget_Search');\n unregister_widget('WP_Widget_Text');\n unregister_widget('WP_Widget_Categories');\n unregister_widget('WP_Widget_Recent_Posts');\n unregister_widget('WP_Widget_Recent_Comments');\n unregister_widget('WP_Widget_RSS');\n unregister_widget('WP_Widget_Tag_Cloud');\n unregister_widget('WP_Nav_Menu_Widget');\n}", "function unregister_default_widgets() {\n\tunregister_widget('WP_Widget_Pages');\n\tunregister_widget('WP_Widget_Calendar');\n\tunregister_widget('WP_Widget_Archives');\n\tunregister_widget('WP_Widget_Links');\n\tunregister_widget('WP_Widget_Meta');\n\tunregister_widget('WP_Widget_Search');\n\tunregister_widget('WP_Widget_Text');\n\tunregister_widget('WP_Widget_Categories');\n\tunregister_widget('WP_Widget_Recent_Posts');\n\tunregister_widget('WP_Widget_Recent_Comments');\n\tunregister_widget('WP_Widget_RSS');\n\tunregister_widget('WP_Widget_Tag_Cloud');\n\tunregister_widget('WP_Nav_Menu_Widget');\n\tunregister_widget('Twenty_Eleven_Ephemera_Widget');\n\tunregister_widget( 'Jetpack_Subscriptions_Widget' );\n\tunregister_widget( 'WPCOM_Widget_Facebook_LikeBox' );\n\tunregister_widget( 'Jetpack_Gallery_Widget' );\n\tunregister_widget( 'Jetpack_Gravatar_Profile_Widget' );\n\tunregister_widget( 'Jetpack_Image_Widget' );\n\tunregister_widget( 'Jetpack_Readmill_Widget' );\n\tunregister_widget('Jetpack_RSS_Links_Widget');\n\tunregister_widget( 'Jetpack_Top_Posts_Widget' );\n\tunregister_widget( 'Jetpack_Twitter_Timeline_Widget' );\n\tunregister_widget( 'Jetpack_Display_Posts_Widget' );\n\tunregister_widget( 'constant_contact_form_widget' );\n\tunregister_widget( 'constant_contact_events_widget' );\n\tunregister_widget( 'constant_contact_api_widget' );\n\tunregister_widget( 'bcn_widget' );\n}", "function unregister_default_wp_widgets() {\n\tif ( !is_blog_installed() )\n\t\treturn;\n\n\tunregister_widget('WP_Widget_Pages');\n\n\tunregister_widget('WP_Widget_Calendar');\n\n\tunregister_widget('WP_Widget_Archives');\n\n\tunregister_widget('WP_Widget_Links');\n\n\tunregister_widget('WP_Widget_Meta');\n\n\tunregister_widget('WP_Widget_Search');\n\n\tunregister_widget('WP_Widget_Text');\n\n\tunregister_widget('WP_Widget_Categories');\n\n\tunregister_widget('WP_Widget_Recent_Posts');\n\n\tunregister_widget('WP_Widget_Recent_Comments');\n\n\tunregister_widget('WP_Widget_RSS');\n\n\tunregister_widget('WP_Widget_Tag_Cloud');\n\n\tunregister_widget('WP_Nav_Menu_Widget');\n\n\tdo_action('widgets_init');\n}", "function my_custom_dashboard_widgets() \n \t{\n\t\tglobal $wp_meta_boxes;\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n\n\t\tunregister_sidebar( 'primary-widget-area' );\n\t\tunregister_sidebar( 'secondary-widget-area' );\n\t\tunregister_sidebar( 'first-footer-widget-area' );\n\t\tunregister_sidebar( 'second-footer-widget-area' );\n\t\tunregister_sidebar( 'third-footer-widget-area' );\n\t\tunregister_sidebar( 'fourth-footer-widget-area' );\n }", "function genesisawesome_custom_widgets() {\n\n\t/* Unregister Header Right widget area */\n\tunregister_sidebar( 'header-right' );\n\n\t/* Register Custom Widgets */\n\tregister_widget( 'GA_Facebook_Likebox_Widget' );\n\tregister_widget( 'GA_Flickr_Widget' );\n\n}", "function my_unregister_widgets() {\n\tunregister_widget( 'WP_Widget_Pages' );\n\tunregister_widget( 'WP_Widget_Calendar' );\n\tunregister_widget( 'WP_Widget_Archives' );\n\tunregister_widget( 'WP_Widget_Links' );\n\tunregister_widget( 'WP_Widget_Categories' );\n\tunregister_widget( 'WP_Widget_Recent_Posts' );\n\tunregister_widget( 'WP_Widget_Search' );\n\tunregister_widget( 'WP_Widget_Tag_Cloud' );\n\tunregister_widget( 'WP_Widget_Meta' );\n\tunregister_widget( 'WP_Widget_Recent_Comments' );\n\tunregister_widget( 'WP_Widget_RSS' );\n\n}", "function my_unregister_widgets() {\n\tunregister_widget('WP_Widget_Pages');\n\tunregister_widget('WP_Widget_Calendar');\n\tunregister_widget('WP_Widget_Archives');\n\tunregister_widget('WP_Widget_Meta');\n\tunregister_widget('WP_Widget_Search');\n\tunregister_widget('WP_Widget_Text');\n\tunregister_widget('WP_Widget_Categories');\n\tunregister_widget('WP_Widget_Recent_Posts');\n\tunregister_widget('WP_Widget_Recent_Comments');\n\tunregister_widget('WP_Widget_RSS');\n\tunregister_widget('WP_Widget_Tag_Cloud');\n\tunregister_widget('WP_Nav_Menu_Widget');\n}", "function my_unregister_widgets() {\n unregister_widget('WP_Widget_Archives');\n unregister_widget('WP_Widget_Links');\n unregister_widget('WP_Widget_Meta');\n unregister_widget('WP_Widget_Recent_Posts');\n unregister_widget('WP_Widget_Recent_Comments');\n unregister_widget('WP_Widget_RSS');\n unregister_widget('WP_Widget_Calendar');\n}", "function wporg_add_dashboard_widgets() {\r\n // Remove Welcome panel\r\n remove_action( 'welcome_panel', 'wp_welcome_panel' );\r\n // Remove the rest of the dashboard widgets\r\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\r\n remove_meta_box( 'health_check_status', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');\r\n remove_meta_box( 'dashboard_site_health', 'dashboard', 'normal');\r\n \r\n // Add function here\r\n wp_add_dashboard_widget( 'jerome-on-service-widget', 'Web Developer Service Tag', 'jerome_on_service_widget');\r\n}", "function wp_unregister_widget_control($id)\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 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 unregister_wp_widgets() {\n\t$widgets = [\n\t\t'WP_Widget_Pages',\n\t\t'WP_Widget_Calendar',\n\t\t'WP_Widget_Archives',\n\t\t// Links Manager and its Widget is unregistered already since 3.5.\n\t\t// 'WP_Widget_Links',\n\t\t'WP_Widget_Meta',\n\t\t'WP_Widget_Search',\n\t\t'WP_Widget_Text',\n\t\t'WP_Widget_Categories',\n\t\t'WP_Widget_Recent_Posts',\n\t\t'WP_Widget_Recent_Comments',\n\t\t'WP_Widget_RSS',\n\t\t'WP_Widget_Tag_Cloud',\n\t\t'WP_Nav_Menu_Widget',\n\t];\n\n\tforeach ( $widgets as $widget ) {\n\t\tunregister_widget( $widget );\n\t}\n}", "function wp_unregister_sidebar_widget($id)\n {\n }", "function deregister_widgets()\n { foreach ( $this->get_widgets() as $widget )\n {\n unregister_widget( $widget );\n }\n\n }", "function remove_business_starter_widgets(){\n\n\tunregister_sidebar( 'sidebar-1' );\n\tunregister_sidebar( 'sidebar-2' );\n\tunregister_sidebar( 'sidebar-3' );\n}", "function _wp_remove_unregistered_widgets($sidebars_widgets, $allowed_widget_ids = array())\n {\n }", "function remove_woo_widgets() {\n unregister_widget( 'WC_Widget_Recent_Products' );\n unregister_widget( 'WC_Widget_Featured_Products' );\n unregister_widget( 'WC_Widget_Products' );\n unregister_widget( 'WC_Widget_Product_Categories' );\n unregister_widget( 'WC_Widget_Product_Tag_Cloud' );\n unregister_widget( 'WC_Widget_Cart' );\n unregister_widget( 'WC_Widget_Layered_Nav' );\n unregister_widget( 'WC_Widget_Layered_Nav_Filters' );\n //unregister_widget( 'WC_Widget_Price_Filter' );\n unregister_widget( 'WC_Widget_Top_Rated_Products' );\n unregister_widget( 'WC_Widget_Recent_Reviews' );\n unregister_widget( 'WC_Widget_Recently_Viewed' );\n unregister_widget( 'WC_Widget_Best_Sellers' );\n unregister_widget( 'WC_Widget_Onsale' );\n //unregister_widget( 'WC_Widget_Random_Products' );\n}", "function unregister_sidebar_widget($id)\n {\n }", "function hocwp_theme_custom_widgets_init() {\r\n\r\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 owlride_disable_default_dashboard_widgets() {\n remove_meta_box('dashboard_plugins', 'dashboard', 'core');\n remove_meta_box('dashboard_quick_press', 'dashboard', 'core');\n remove_meta_box('dashboard_primary', 'dashboard', 'core');\n remove_meta_box('dashboard_secondary', 'dashboard', 'core');\n}", "function dwc_setup_widgets() {\n\tregister_sidebar( array(\n\t\t'id' => 'first-footer-widget-area',\n\t\t'name' => 'First Footer Widget Area',\n\t\t'description' => 'Widgets in this area will be shown in the footer area.',\n\t\t'before_widget' => '<div class=\"widget %2$s\">',\n\t\t'after_widget' => '</div><!-- .widget -->',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\n\t// Unregister these since the child theme doesn't use them\n\tunregister_sidebar( 'primary-widget-area' );\n\tunregister_sidebar( 'secondary-widget-area' );\n\tunregister_sidebar( 'second-footer-widget-area' );\n\tunregister_sidebar( 'third-footer-widget-area' );\n\tunregister_sidebar( 'fourth-footer-widget-area' );\n}", "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 init_custom_widgets() {\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-top',\n\t\t'name' => __('Sidebar top', 'bonestheme'),\n\t\t'description' => __('Top sidebar area, present on all pages (default: Main Menu)', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-projects',\n\t\t'name' => __('Projects sidebar', 'bonestheme'),\n\t\t'description' => __('Active on single project pages only (default: Related People, Grants & Publications)', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-people',\n\t\t'name' => __('People sidebar', 'bonestheme'),\n\t\t'description' => __('Active on single people pages only.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-homepage',\n\t\t'name' => __('Homepage sidebar', 'bonestheme'),\n\t\t'description' => __('Active on homepage, lower side bar area.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-homepage-content',\n\t\t'name' => __('Homepage main', 'bonestheme'),\n\t\t'description' => __('Active on homepage, below main content area.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>'\n\t));\n\t\n\t\n\n\t/* Custom widget's */\n\t\n\tregister_widget( 'All_People_Widget' );\n\tregister_widget( 'Related_People_Widget' );\n\n\tregister_widget( 'All_Projects_Widget' );\n\tregister_widget( 'Related_Projects_Widget' );\n\tregister_widget( 'Related_Grants_Widget' );\n\tregister_widget( 'Related_Publications_Widget' );\n\n}", "function theme_widgets_init() {\n register_sidebar(array(\n 'name' => __('Main Widget Area', 'theme'),\n 'id' => 'sidebar-1',\n 'description' => __('Appears in the footer section of the site.', 'law-firm'),\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '<',\n ));\n\n register_sidebar(array(\n 'name' => __('Secondary Widget Area', 'theme'),\n 'id' => 'sidebar-2',\n 'description' => __('Appears on posts and pages in the sidebar.', 'law-firm'),\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '',\n ));\n}", "function remove_unused_widgets() {\n\tunregister_widget( 'WP_Widget_Meta' );\n\tunregister_widget( 'WP_Widget_Calendar' );\n\tunregister_widget( 'WP_Widget_Recent_Comments' );\n\tunregister_widget( 'WP_Widget_Tag_Cloud' );\n}", "function ourWidgetsInit() {\n // register widget location\n register_sidebar( array(\n 'name' => 'Sidebarr',\n 'id' => 'sidebar1',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"a-special-class\">',\n 'after_title' => '</h2>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 1',\n 'id' => 'footer1',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 2',\n 'id' => 'footer2',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 3',\n 'id' => 'footer3',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 4',\n 'id' => 'footer4',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n}", "function custom_hide_dashboard_widgets() {\n\n global $wp_meta_boxes;\n\n // Today widget.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] );\n // Last comments.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] );\n // Incoming links.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] );\n // Plugins.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] );\n // WordPress blog.\n unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );\n // WordPress news.\n unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] );\n\n}", "public function action_widgets_init() {\n\n // Our widgets\n register_widget( '\\Pedestal\\Widgets\\Recent_Content_Widget' );\n register_widget( '\\Pedestal\\Widgets\\Recent_Video_Widget' );\n\n if ( PEDESTAL_ENABLE_INSTAGRAM_OF_THE_DAY ) {\n register_widget( '\\Pedestal\\Widgets\\Daily_Insta_Widget' );\n }\n\n // Unregister core widgets we won't be using\n unregister_widget( 'WP_Widget_Archives' );\n unregister_widget( 'WP_Widget_Calendar' );\n unregister_widget( 'WP_Widget_Categories' );\n unregister_widget( 'WP_Widget_Custom_HTML' );\n unregister_widget( 'WP_Widget_Links' );\n unregister_widget( 'WP_Widget_Media_Audio' );\n unregister_widget( 'WP_Widget_Media_Gallery' );\n unregister_widget( 'WP_Widget_Media_Image' );\n unregister_widget( 'WP_Widget_Media_Video' );\n unregister_widget( 'WP_Widget_Meta' );\n unregister_widget( 'WP_Widget_Pages' );\n unregister_widget( 'WP_Widget_Recent_Comments' );\n unregister_widget( 'WP_Widget_Recent_Posts' );\n unregister_widget( 'WP_Widget_RSS' );\n unregister_widget( 'WP_Widget_Search' );\n unregister_widget( 'WP_Widget_Tag_Cloud' );\n unregister_widget( 'WP_Widget_Text' );\n\n // Unregister widgets added by plugins\n unregister_widget( 'P2P_Widget' );\n }", "function err_override_woocommerce_widgets() {\r\n\r\n if ( class_exists( 'WC_Widget_Layered_Nav' ) ) {\r\n\r\n unregister_widget( 'WC_Widget_Layered_Nav' );\r\n\r\n include_once( 'inc/custom-wc-widget-layered-nav.php' );\r\n\r\n register_widget( 'Custom_WC_Widget_Layered_Nav' );\r\n }\r\n\r\n}", "function disable_default_dashboard_widgets() {\n\tglobal $wp_meta_boxes;\n\t//unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); // Right Now Widget\n\t//unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']); // Activity Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); // Comments Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); // Incoming Links Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); // Plugins Widget\n\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); // Quick Press Widget\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']); // Recent Drafts Widget\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); //\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); //\n\n\t// remove plugin dashboard boxes\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget']); // Yoast's SEO Plugin Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['rg_forms_dashboard']); // Gravity Forms Plugin Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['bbp-dashboard-right-now']); // bbPress Plugin Widget\n}", "function disable_default_dashboard_widgets() {\r\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'core'); // Comments Widget\r\n remove_meta_box('dashboard_incoming_links', 'dashboard', 'core'); // Incoming Links Widget\r\n remove_meta_box('dashboard_activity', 'dashboard', 'core'); // welcome panel\r\n remove_meta_box('dashboard_plugins', 'dashboard', 'core'); // Plugins Widget\r\n Remove_meta_box('dashboard_quick_press', 'dashboard', 'core'); // Quick Press Widget\r\n remove_meta_box('dashboard_recent_drafts', 'dashboard', 'core'); // Recent Drafts Widget\r\n remove_meta_box('dashboard_primary', 'dashboard', 'core'); //\r\n remove_meta_box('dashboard_secondary', 'dashboard', 'core'); //\r\n // Removing plugin dashboard boxes\r\n remove_meta_box('yoast_db_widget', 'dashboard', 'normal'); // Yoast's SEO Plugin Widget\r\n}", "function theme_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Home Page Widget Area',\n 'description' => 'Widgets are full-width and appear below the title and above the shows list.',\n 'before_widget' => '<div class=\"row\"><div class=\"large-12 columns widget panel\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h3>',\n 'after_title' => '</h3>',\n ) );\n\n // register_sidebar( array(\n // 'name' => 'Sidebar Widget Area',\n // 'description' => 'Sidebar widgets appear on episode pages',\n // 'before_widget' => '<div class=\"widget panel\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h3>',\n // 'after_title' => '</h3>',\n // ) );\n\n}", "function wpdocs_theme_slug_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'footer 2', 'wordpress' ),\n 'id' => 'sidebar-1',\n 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'wordpress' ),\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '',\n ) );\n}", "function disable_menus_and_widgets() {\n\t\t\tglobal $wp_customize;\n\t\t\tif ( isset( $wp_customize ) && isset( $_GET['themify'] ) && $_GET['themify'] === '1' ) {\n\t\t\t\t/**\n\t\t\t\t * Disable widgets manager in Customizer\n\t\t\t\t * original hooks located in wp-includes/class-wp-customize-widgets.php\n\t\t\t\t */\n\t\t\t\tremove_filter( 'customize_dynamic_setting_args', array( $wp_customize->widgets, 'filter_customize_dynamic_setting_args' ), 10, 2 );\n\t\t\t\tremove_action( 'widgets_init', array( $wp_customize->widgets, 'register_settings' ), 95 );\n\t\t\t\tremove_action( 'customize_register', array( $wp_customize->widgets, 'schedule_customize_register' ), 1 );\n\t\t\t\tremove_action( 'wp_loaded', array( $wp_customize->widgets, 'override_sidebars_widgets_for_theme_switch' ) );\n\t\t\t\tremove_action( 'customize_controls_init', array( $wp_customize->widgets, 'customize_controls_init' ) );\n\t\t\t\tremove_action( 'customize_controls_enqueue_scripts', array( $wp_customize->widgets, 'enqueue_scripts' ) );\n\t\t\t\tremove_action( 'customize_controls_print_styles', array( $wp_customize->widgets, 'print_styles' ) );\n\t\t\t\tremove_action( 'customize_controls_print_scripts', array( $wp_customize->widgets, 'print_scripts' ) );\n\t\t\t\tremove_action( 'customize_controls_print_footer_scripts', array( $wp_customize->widgets, 'print_footer_scripts' ) );\n\t\t\t\tremove_action( 'customize_controls_print_footer_scripts', array( $wp_customize->widgets, 'output_widget_control_templates' ) );\n\t\t\t\tremove_action( 'customize_preview_init', array( $wp_customize->widgets, 'customize_preview_init' ) );\n\t\t\t\tremove_filter( 'customize_refresh_nonces', array( $wp_customize->widgets, 'refresh_nonces' ) );\n\t\t\t\tremove_action( 'dynamic_sidebar', array( $wp_customize->widgets, 'tally_rendered_widgets' ) );\n\t\t\t\tremove_filter( 'is_active_sidebar', array( $wp_customize->widgets, 'tally_sidebars_via_is_active_sidebar_calls' ), 10, 2 );\n\t\t\t\tremove_filter( 'dynamic_sidebar_has_widgets', array( $wp_customize->widgets, 'tally_sidebars_via_dynamic_sidebar_calls' ), 10, 2 );\n\t\t\t\tremove_filter( 'customize_dynamic_partial_args', array( $wp_customize->widgets, 'customize_dynamic_partial_args' ), 10, 2 );\n\t\t\t\tremove_action( 'customize_preview_init', array( $wp_customize->widgets, 'selective_refresh_init' ) );\n\n\t\t\t\t/**\n\t\t\t\t * Disable Menus manager in Customizer\n\t\t\t\t * original hooks located in wp-includes/class-wp-customize-nav-menus.php\n\t\t\t\t */\n\t\t\t\tremove_action( 'customize_register', array( $wp_customize->nav_menus, 'customize_register' ), 11 );\n\t\t\t\tremove_filter( 'customize_dynamic_setting_args', array( $wp_customize->nav_menus, 'filter_dynamic_setting_args' ), 10, 2 );\n\t\t\t\tremove_filter( 'customize_dynamic_setting_class', array( $wp_customize->nav_menus, 'filter_dynamic_setting_class' ), 10, 3 );\n\t\t\t\tremove_action( 'customize_save_nav_menus_created_posts', array( $wp_customize->nav_menus, 'save_nav_menus_created_posts' ) );\n\t\t\t\tremove_filter( 'customize_refresh_nonces', array( $wp_customize->nav_menus, 'filter_nonces' ) );\n\t\t\t\tremove_action( 'wp_ajax_load-available-menu-items-customizer', array( $wp_customize->nav_menus, 'ajax_load_available_items' ) );\n\t\t\t\tremove_action( 'wp_ajax_search-available-menu-items-customizer', array( $wp_customize->nav_menus, 'ajax_search_available_items' ) );\n\t\t\t\tremove_action( 'wp_ajax_customize-nav-menus-insert-auto-draft', array( $wp_customize->nav_menus, 'ajax_insert_auto_draft_post' ) );\n\t\t\t\tremove_action( 'customize_controls_enqueue_scripts', array( $wp_customize->nav_menus, 'enqueue_scripts' ) );\n\t\t\t\tremove_action( 'customize_controls_print_footer_scripts', array( $wp_customize->nav_menus, 'print_templates' ) );\n\t\t\t\tremove_action( 'customize_controls_print_footer_scripts', array( $wp_customize->nav_menus, 'available_items_template' ) );\n\t\t\t\tremove_action( 'customize_preview_init', array( $wp_customize->nav_menus, 'customize_preview_init' ) );\n\t\t\t\tremove_action( 'customize_preview_init', array( $wp_customize->nav_menus, 'make_auto_draft_status_previewable' ) );\n\t\t\t\tremove_filter( 'customize_dynamic_partial_args', array( $wp_customize->nav_menus, 'customize_dynamic_partial_args' ), 10, 2 );\n\t\t\t}\n\t\t}", "function rad_remove_dash_widgets(){\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n}", "function cmk_disable_default_dashboard_widgets() {\n remove_meta_box('dashboard_plugins', 'dashboard', 'core');\n remove_meta_box('dashboard_primary', 'dashboard', 'core');\n remove_meta_box('dashboard_secondary', 'dashboard', 'core'); // disable Simple:Press dashboard widget\n remove_meta_box('sf_announce', 'dashboard', 'normal');\n}", "function 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 athemes_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'lepays' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t'after_title' => '</span></h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Header', 'lepays' ),\n\t\t'id' => 'sidebar-2',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sub Footer 1', 'lepays' ),\n\t\t'id' => 'sidebar-3',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t'after_title' => '</span></h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sub Footer 2', 'lepays' ),\n\t\t'id' => 'sidebar-4',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t'after_title' => '</span></h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sub Footer 3', 'lepays' ),\n\t\t'id' => 'sidebar-5',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t'after_title' => '</span></h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sub Footer 4', 'lepays' ),\n\t\t'id' => 'sidebar-6',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t'after_title' => '</span></h3>',\n\t) );\n\n\tregister_widget( 'aThemes_Preview_Post' );\n\tregister_widget( 'aThemes_Tabs' );\n\tregister_widget( 'aThemes_Flickr_Stream' );\n\tregister_widget( 'aThemes_Media_Embed' );\n\tregister_widget( 'aThemes_Social_Icons' );\n}", "function initiate_widgets() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer twitter',\n\t\t'id' => 'footer_twitter',\n\t\t'before_widget' => '<div class=\"c-twitter\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"o-twitter-header\">',\n\t\t'after_title' => '</h4>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer facebook',\n\t\t'id' => 'footer_facebook',\n\t\t'before_widget' => '<div class=\"c-twitter\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"o-twitter-header\">',\n\t\t'after_title' => '</h4>',\n\t) );\n\n}", "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Widget oben rechts',\n 'id' => 'widget_top_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget mitte rechts',\n 'id' => 'widget_center_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget unten rechts',\n 'id' => 'widget_bottom_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Newsletter Widget',\n 'id' => 'newsletter_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Custom Footer Widget',\n 'id' => 'footer_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n\n}", "function reg_wp_footer_widget() {\n\t // First Footer Widget.\n\t$template_uri = get_template_directory_uri();\n\t$args = array(\n\t\t'name' => sprintf( __( 'Footer Widget One' ), 'wpthemes1' ),\n\t\t'id' => 'footer-widget-1',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s p-3\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h4 class=\"widgettitle mb-3\"><img class=\"mr-3\" src=\"' . $template_uri . '/assets/img/bulb.jpg\" alt=\"Icon\">',\n\t\t'after_title' => \"</h3>\\n\",\n\t);\n\tregister_sidebar( $args );\n\t// Second Footer Widget.\n\t$args = array(\n\t\t'name' => sprintf( __( 'Footer Widget Two' ), 'wpthemes1' ),\n\t\t'id' => 'footer-widget-2',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s p-3\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h4 class=\"widgettitle mb-3\"><img class=\"mr-3\" src=\"' . $template_uri . '/assets/img/recent_post_icon.jpg\" alt=\"Icon\">',\n\t\t'after_title' => \"</h4>\\n\",\n\t);\n\tregister_sidebar( $args );\n\t// Third Footer Widget.\n\t$args = array(\n\t\t'name' => sprintf( __( 'Footer Widget Three' ), 'wpthemes1' ),\n\t\t'id' => 'footer-widget-3',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s p-3\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h4 class=\"widgettitle mb-3\"><img class=\"mr-3\" src=\"' . $template_uri . '/assets/img/contact_us_icons.jpg\" alt=\"Icon\">',\n\t\t'after_title' => \"</h4>\\n\",\n\t);\n\tregister_sidebar( $args );\n\t// Fourth Footer Widget.\n\t$args = array(\n\t\t'name' => sprintf( __( 'Page Sidebar' ), 'wpthemes1' ),\n\t\t'id' => 'sidebar1',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h2 class=\"widgettitle\">',\n\t\t'after_title' => \"</h2>\\n\",\n\t);\n\tregister_sidebar( $args );\n}", "function dwwp_remove_dashboard_widget() {\n remove_meta_box( 'dashboard_primary','dashboard','side' );\n}", "function FoodByNight_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer Right',\n\t\t'id' => 'footer_right',\n\t\t'before_widget' => '<ul class=\"list-inline\">',\n\t\t'after_widget' => '</ul>',\n\t\t'before_title' => '<h2 class=\"rounded\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_widget( 'Social_Link_Widget' );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Popups',\n\t\t'id' => 'popups',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"rounded\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_widget( 'Contact_Popup_Widget' );\n\n}", "function disable_default_dashboard_widgets() {\n\tremove_meta_box('dashboard_right_now', 'dashboard', 'core');\n\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'core');\n\tremove_meta_box('dashboard_incoming_links', 'dashboard', 'core');\n\tremove_meta_box('dashboard_plugins', 'dashboard', 'core');\n\n\tremove_meta_box('dashboard_quick_press', 'dashboard', 'core');\n\tremove_meta_box('dashboard_recent_drafts', 'dashboard', 'core');\n\tremove_meta_box('dashboard_primary', 'dashboard', 'core');\n\tremove_meta_box('dashboard_secondary', 'dashboard', 'core');\n}", "function mythemepost_widgets(){ \n register_sidebar( array(\n 'name' => 'Lavel Up New Widget Area',\n 'id' => 'level_up_new_widget_area',\n 'before_widget' => '<aside>',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\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}", "function ac_widgets_init() \n{\n register_sidebar( array(\n 'name' => __( 'Main Sidebar', 'acframework' ),\n 'id' => 'sidebar',\n 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'acframework' ),\n 'before_widget' => '<div class=\"widget\" id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n register_sidebar( array(\n 'name' => __('Form Container', 'acframework'),\n 'id' => 'ac-form-container',\n 'description' => __('Homepage form widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ) );\n register_sidebar(array(\n 'name' => __('Footer Left', 'acframework'),\n 'id' => 'ac-footer-left',\n 'description' => __('Left footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar(array(\n 'name' => __('Footer Left Center', 'acframework'),\n 'id' => 'ac-footer-center-left',\n 'description' => __('Center-left footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar(array(\n 'name' => __('Footer Right Center', 'acframework'),\n 'id' => 'ac-footer-center-right',\n 'description' => __('Center-Right footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar( array(\n 'name' => __('Footer Right', 'acframework'),\n 'id' => 'ac-footer-right',\n 'description' => __('Right footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ) ); \n}", "function wooadmin_remove_dashboard_widgets(){\n remove_meta_box('posts', 'users', 'normal'); // Right Now\n remove_meta_box('dashboard_right_now', 'dashboard', 'normal'); // Right Now\n remove_meta_box('dashboard_browser_nag', 'dashboard', 'normal'); // Right Now\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // Recent Comments\n remove_meta_box('welcome-panel', 'dashboard', 'normal'); // Welcome Comments\n remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // Incoming Links\n remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // Plugins\n remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); // Quick Press\n remove_meta_box('dashboard_recent_drafts', 'dashboard', 'side'); // Recent Drafts\n remove_meta_box('dashboard_primary', 'dashboard', 'side'); // BoxBeat blog\n remove_meta_box('dashboard_secondary', 'dashboard', 'side'); // Other BoxBeat News\n\n// use 'dashboard-network' as the second parameter to remove widgets from a network dashboard.\n}", "function responsive_il_register_widgets() {\n\tregister_sidebar( array(\n\t\t'name' => 'Home half widget',\n\t\t'id' => 'main-half-sidebar',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Footer bottom text area',\n\t\t'id' => 'footer-bottom',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Single footer',\n\t\t'id' => 'single-footer-bottom',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Single Top head',\n\t\t'id' => 'single-top-head',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n}", "function remove_dashboard_widgets() {\n // Remove All Dashboard Widgets.\n remove_action('welcome_panel', 'wp_welcome_panel'); \n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); \n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' ); \n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' ); \n remove_meta_box( 'dashboard_plugins', '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_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );\n remove_meta_box('logincust_subscribe_widget', 'dashboard', 'core');\n remove_meta_box('themeisle', 'dashboard', 'core'); \n}", "function example_remove_dashboard_widgets() {\n global $wp_meta_boxes;\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n}", "function gs_widgets_init() {\r\n\tregister_sidebar(\r\n\t array(\r\n\t 'name' => 'Homepage Widgets',\r\n\t 'id' => 'homepage-widgets',\r\n\t 'description' => '',\r\n\t 'before_widget' => '<div id=\"%1$s\" class=\"home-widget %2$s four columns\"><div class=\"widget-container\">',\r\n\t 'after_widget' => '</div></div>',\r\n\t 'before_title' => '<h4>',\r\n\t 'after_title' => '</h4>', \r\n\t ));\r\n\r\n\tregister_sidebar(\r\n\t array(\r\n\t 'name' => 'Page Sidebar',\r\n\t 'id' => 'page-sidebar',\r\n\t 'description' => '',\r\n\t 'before_widget' => '<div id=\"%1$s\" class=\"%2$s side-widget\">',\r\n\t 'after_widget' => '</div>',\r\n\t 'before_title' => '<h4>',\r\n\t 'after_title' => '</h4>', \r\n\t ));\r\n\r\n\tregister_sidebar(\r\n\t array(\r\n\t 'name' => 'Blog Sidebar',\r\n\t 'id' => 'blog-sidebar',\r\n\t 'description' => '',\r\n\t 'before_widget' => '<div id=\"%1$s\" class=\"%2$s side-widget\">',\r\n\t 'after_widget' => '</div>',\r\n\t 'before_title' => '<h4>',\r\n\t 'after_title' => '</h4>', \r\n\t ));\r\n}", "function YWR_2020_widgets_init()\n{\n register_sidebar(array(\n 'name' => __('General Page Sidebar', 'YWR_2020'),\n 'id' => 'sidebar-1',\n 'description' => __('Add widgets here to appear in your sidebar on standard pages.', 'YWR_2020'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget clearfix %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"fancy-title title-bottom-border\"><h2>',\n 'after_title' => '</h2></div>',\n ));\n\n}", "function mgc_widgets_init() {\n\n // Area 1, located in the sidebar. Empty by default.\n register_sidebar( array(\n 'name' => __( 'First Sidebar Widget Area', 'mgc' ),\n 'id' => 'first-sidebar-widget-area',\n 'description' => __( 'The first sidebar widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h2 class=\"widget-title title\">',\n 'after_title' => '</h2>',\n ) );\n\n // Area 2, located in the page. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Second Sidebar Widget Area', 'mgc' ),\n 'id' => 'second-sidebar-widget-area',\n 'description' => __( 'The second sidebar widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h2 class=\"widget-title title\">',\n 'after_title' => '</h2>',\n ) );\n\n // Area 3, located in the page. Empty by default.\n register_sidebar( array(\n 'name' => __( 'First Page Widget Area', 'mgc' ),\n 'id' => 'first-page-widget-area',\n 'description' => __( 'The first page widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 4, located in the page. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Second Page Widget Area', 'mgc' ),\n 'id' => 'second-page-widget-area',\n 'description' => __( 'The second page widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 5, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'First Footer Widget Area', 'mgc' ),\n 'id' => 'first-footer-widget-area',\n 'description' => __( 'The first footer widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 6, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Second Footer Widget Area', 'mgc' ),\n 'id' => 'second-footer-widget-area',\n 'description' => __( 'The second footer widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 7, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Third Footer Widget Area', 'mgc' ),\n 'id' => 'third-footer-widget-area',\n 'description' => __( 'The third footer widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n}", "function itstar_widget() {\n// register_widget( 'last_products_widget' );\n// register_widget( 'last_projects_widget' );\n register_widget( 'last_posts_by_cat_widget' );\n register_widget( 'contact_info_widget' );\n// register_widget( 'social_widget' );\n}", "function ridizain_widgets_init() {\r\n\trequire get_template_directory() . '/inc/widgets.php';\r\n\tregister_widget( 'Ridizain_Ephemera_Widget' );\r\n\tregister_widget( 'Ridizain_RecentPostWidget' );\r\n\r\n\tregister_sidebar( array(\r\n\t\t'name' => __( 'Primary Sidebar', 'ridizain' ),\r\n\t\t'id' => 'sidebar-1',\r\n\t\t'description' => __( 'Main sidebar that appears on the left.', 'ridizain' ),\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => '</aside>',\r\n\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t'after_title' => '</h1>',\r\n\t) );\r\n\tregister_sidebar( array(\r\n\t\t'name' => __( 'Content Sidebar', 'ridizain' ),\r\n\t\t'id' => 'sidebar-2',\r\n\t\t'description' => __( 'Additional sidebar that appears on the right.', 'ridizain' ),\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => '</aside>',\r\n\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t'after_title' => '</h1>',\r\n\t) );\r\n\tregister_sidebar( array(\r\n\t\t'name' => __( 'Footer Widget Area', 'ridizain' ),\r\n\t\t'id' => 'sidebar-3',\r\n\t\t'description' => __( 'Appears in the footer section of the site.', 'ridizain' ),\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => '</aside>',\r\n\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t'after_title' => '</h1>',\r\n\t) );\r\n}", "function thefold_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Main Sidebar', 'thefold' ),\n 'id' => 'sidebar-1',\n 'description' => __( 'Default sidebar that will appear on most pages', 'thefold' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => __( 'Footer', 'thefold' ),\n 'id' => 'footer',\n 'description' => __( 'Global Footer area', 'thefold' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n}", "function footer_meta_widgets() {\n register_sidebar(array(\n 'name' => __( 'footer meta', 'footer_meta' ),\n 'id' => 'footer_meta',\n 'description' => '',\n 'class' => 'footer-meta',\n ));\n}", "function qed_register_widgets() {\r\n\t\t// Make a Wordpress built-in Text widget process shortcodes.\r\n\t\tadd_filter( 'widget_text', 'shortcode_unautop' );\r\n\t\tadd_filter( 'widget_text', 'do_shortcode', 11 );\r\n\r\n\t\tregister_widget( 'QED_Widget_Latest_Posts' );\r\n\t\tregister_widget( 'QED_Widget_Contact_Us' );\r\n\t\tregister_widget( 'QED_Widget_Advanced_Text' );\r\n\r\n\t\t// if ( class_exists( 'woocommerce' ) ) {\r\n\t\t\t// TODO: Widget for woocommerce.\r\n\t\t// }\r\n\r\n\t\tregister_sidebar(array(\r\n\t\t\t'id' => 'sidebar',\r\n\t\t\t'name' => esc_html__( 'Sidebar', 'swishdesign' ),\r\n\t\t\t'description' => esc_html__( 'Sidebar located on the right side of blog page.', 'swishdesign' ),\r\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t'after_title' => '</h3>',\r\n\t\t));\r\n\r\n\t\tregister_sidebar(array(\r\n\t\t\t'id' => 'footer1',\r\n\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 1 ),\r\n\t\t\t'description' => esc_html__( 'Located in 1st column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t'after_title' => '</h3>',\r\n\t\t));\r\n\r\n\t\t$footer_columns_count = qed_get_footer_columns();\r\n\t\tif ( $footer_columns_count >= 2 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer2',\r\n\t\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 2 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 2nd column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\r\n\t\tif ( $footer_columns_count >= 3 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer3',\r\n\t\t\t\t'name' =>sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 3 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 3rd column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\r\n\t\tif ( $footer_columns_count >= 4 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer4',\r\n\t\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 4 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 4th column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\t}", "function remove_dashboard_widgets() {\n global $wp_meta_boxes;\n \n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n remove_action( 'welcome_panel', 'wp_welcome_panel' );\n \n}", "function mm_widgets_init() {\n register_sidebar( array(\n 'name' => esc_html__( 'Footer Sidebar 1', 'monza' ),\n 'id' => 'footer-sidebar-1',\n 'description' => esc_html__( 'Left footer widget area', 'monza' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ) );\n register_sidebar( array(\n 'name' => esc_html__( 'Footer Sidebar 2', 'monza' ),\n 'id' => 'footer-sidebar-2',\n 'description' => esc_html__( 'Middle footer widget area', 'monza' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ) );\n register_sidebar( array(\n 'name' => esc_html__( 'Footer Sidebar 3', 'monza' ),\n 'id' => 'footer-sidebar-3',\n 'description' => esc_html__( 'Right footer widget area', 'monza' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ) );\n}", "function bethel_register_widget_areas() {\n\tunregister_sidebar( 'header-right' ); // Remove the right header widget area\n\tgenesis_register_sidebar (array ('id' => 'header-right-top', 'name' => 'Header Right Top', 'description' => 'The upper widget to the right of the header image.'));\t\n\tgenesis_register_sidebar (array ('id' => 'footer-bottom', 'name' => 'Footer Bottom', 'description' => 'Full-width widget at the very bottom of the page.'));\t\n}", "function themeName_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Main Sidebar',\n\t\t'id' => 'sidebar-1',\n\t\t'description' => __( 'Main theme sidebar.', 'themeDomain' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n}", "function replace_widjets_content() {\n remove_action( 'widgets_init', 'envo_storefront_widgets_init' );\n}", "function nuthemes_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'nuthemes' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer #1', 'nuthemes' ),\n\t\t'id' => 'sidebar-2',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer #2', 'nuthemes' ),\n\t\t'id' => 'sidebar-3',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer #3', 'nuthemes' ),\n\t\t'id' => 'sidebar-4',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer #4', 'nuthemes' ),\n\t\t'id' => 'sidebar-5',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n}", "function bp_widgets_init() {\n // register_sidebar( array(\n // 'name' => __( 'Footer Widget Area', 'holstein' ),\n // 'id' => 'footer-widget',\n // 'description' => __( 'Appears on the bottom of every page.', 'holstein' ),\n // 'before_widget' => '<div class=\"col\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h2>',\n // 'after_title' => '</h2>'\n // ) );\n\n register_sidebar( array(\n 'name' => __( 'Right Sidebar Widget Area', 'bp' ),\n 'id' => 'right-sidebar',\n 'description' => __( 'Appears on the right side of the blog index.', 'bp' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>'\n ) );\n\n // register_sidebar( array(\n // 'name' => __( 'Left Sidebar Widget Area', 'holstein' ),\n // 'id' => 'left-sidebar',\n // 'description' => __( 'Appears on the left side of pages', 'holstein' ),\n // 'before_widget' => '<div id=\"%1$s\" class=\"area %2$s\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h3>',\n // 'after_title' => '</h3>'\n // ) ); \n}", "function jn_widgets_init() {\n register_sidebar( array(\n 'name' => __('Main Sidebar', 'jn'),\n 'id' => 'sidebar-1',\n 'description' => __('The default sidebar to be used on pages','jn'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n ));\n}", "function disable_default_dashboard_widgets() {\n\tglobal $wp_meta_boxes;\n\t// wp..\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\n\t// yoast seo\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget']);\n\t// gravity forms\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['rg_forms_dashboard']);\n}", "function wpb_load_widget()\n{\n register_widget('wpb_widget');\n}", "function rw_remove_dashboard_widgets() {\n//\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // Recent Comments\n\tremove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // Incoming Links\n\tremove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // Plugins\n\n\tremove_meta_box('dashboard_quick_press', 'dashboard', 'normal'); // Quick Press\n//\tremove_meta_box('dashboard_recent_drafts', 'dashboard', 'normal'); // Recent Drafts\n\tremove_meta_box('dashboard_primary', 'dashboard', 'normal'); // Wordpress Blog\n\tremove_meta_box('dashboard_secondary', 'dashboard', 'normal'); // Other Wordpress News\n}", "function wk_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer Mobile Menu',\n\t\t'id' => 'footer_mobile_menu',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\n}", "function wpb_widgets_init()\n{\n\n register_sidebar(array(\n 'name' => 'Custom Header Widget Area',\n 'id' => 'custom-header-widget',\n 'before_widget' => '<div class=\"chw-widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"chw-title\">',\n 'after_title' => '</h2>',\n ));\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 wpwl_load_widget() {\n register_widget( 'wpwl_widget' );\n}", "function disable_default_dashboard_widgets() {\n global $wp_meta_boxes;\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\n}", "function katayam_widget_setup() {\r\n\t\r\n\tregister_sidebar(\r\n\t\tarray(\t\r\n\t\t\t'name'\t=> 'Sidebar',\r\n\t\t\t'id'\t=> 'sidebar-1',\r\n\t\t\t'class'\t=> 'custom',\r\n\t\t\t'description' => 'Standard Sidebar',\r\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t\t'after_widget' => '</aside>',\r\n\t\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t\t'after_title' => '</h1>',\r\n\t\t)\r\n\t);\r\n\tregister_sidebar( array(\r\n'name' => 'Footer Area 1',\r\n'id' => 'footer-1',\r\n'description' => 'Appears in the footer area',\r\n'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n'after_widget' => '</aside>',\r\n'before_title' => '<h3 class=\"widget-title\">',\r\n'after_title' => '</h3>',\r\n) );\r\n\r\nregister_sidebar( array(\r\n'name' => 'Footer Area 2',\r\n'id' => 'footer-2',\r\n'description' => 'Appears in the footer area',\r\n'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n'after_widget' => '</aside>',\r\n'before_title' => '<h3 class=\"widget-title\">',\r\n'after_title' => '</h3>',\r\n) );\r\n\r\nregister_sidebar( array(\r\n'name' => 'Footer Area 3',\r\n'id' => 'footer-3',\r\n'description' => 'Appears in the footer area',\r\n'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n'after_widget' => '</aside>',\r\n'before_title' => '<h3 class=\"widget-title\">',\r\n'after_title' => '</h3>',\r\n) );\r\n\r\nregister_sidebar( array(\r\n'name' => 'Footer Area 4',\r\n'id' => 'footer-4',\r\n'description' => 'Appears in the footer area',\r\n'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n'after_widget' => '</aside>',\r\n'before_title' => '<h3 class=\"widget-title\">',\r\n'after_title' => '</h3>',\r\n) );\r\n}", "function custom_widgets_register() {\n register_post_type('custom_widgets', array(\n 'labels' => array(\n 'name' => __('Custom Widgets'),\n 'singular_name' => __('Custom Widget'),\n ),\n 'public' => false,\n 'show_ui' => true,\n 'has_archive' => false,\n 'exclude_from_search' => true,\n ));\n}", "function hnd_widgets_init() {\n\n\tunregister_sidebar('footer-one');\n\tunregister_sidebar('footer-two');\n\tunregister_sidebar('footer-three');\n\tunregister_sidebar('footer-four');\n\n\t// home page widget area\n\tregister_sidebar( array(\n\t\t'name' => 'Home Page Widgets',\n\t\t'id' => 'home-page-widgets',\n\t\t'description' => __('Widgets in this area will be shown on the home page.','adapt'),\n\t\t'before_widget' => '<div class=\"sidebar-box clearfix\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4><span>',\n\t\t'after_title' => '</span></h4>',\n\t) );\n\n\t// store page widget area\n\tregister_sidebar( array(\n\t\t'name' => 'Store Page Widgets',\n\t\t'id' => 'store-page-widgets',\n\t\t'description' => __('Widgets in this area will be shown on the store page.','adapt'),\n\t\t'before_widget' => '<div class=\"sidebar-box clearfix\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4><span>',\n\t\t'after_title' => '</span></h4>',\n\t) );\n\n\t// single page widget area\n\tregister_sidebar( array(\n\t\t'name' => 'Single Page Widgets',\n\t\t'id' => 'single-page-widgets',\n\t\t'description' => __('Widgets in this area will be shown on single pages.','adapt'),\n\t\t'before_widget' => '<div class=\"sidebar-box clearfix\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4><span>',\n\t\t'after_title' => '</span></h4>',\n\t) );\n\t\n\t// footer widget area\n\tregister_sidebar( array(\n\t\t'name' => 'Footer Widgets',\n\t\t'id' => 'footer-widgets',\n\t\t'description' => __('Widgets in this area will be shown at the bottom of all pages.','adapt'),\n\t\t'before_widget' => '<div class=\"footer-box clearfix\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4><span>',\n\t\t'after_title' => '</span></h4>',\n\t) );\n\n\t// remove some default Wordpress widgets\n\tunregister_widget('WP_Widget_Pages');\n\tunregister_widget('WP_Widget_Calendar');\n\tunregister_widget('WP_Widget_Archives');\n\tunregister_widget('WP_Widget_Links');\n\tunregister_widget('WP_Widget_Meta');\n\t#unregister_widget('WP_Widget_Search');\n\tunregister_widget('WP_Widget_Categories');\n\tunregister_widget('WP_Widget_Recent_Posts');\n\tunregister_widget('WP_Widget_Recent_Comments');\n\tunregister_widget('WP_Widget_RSS');\n\tunregister_widget('WP_Widget_Tag_Cloud');\n\tunregister_widget('WP_Nav_Menu_Widget');\n\t\n\t// register custom Handstand widgets\n\tregister_widget( 'HND_Carousel_Items_Widget' );\n\tregister_widget( 'HND_Latest_News_Widget' );\n\tregister_widget( 'HND_Latest_Release_Widget' );\n\tregister_widget( 'HND_New_Arrivals_Widget' );\n\tregister_widget( 'HND_Recent_Press_Widget' );\n\tregister_widget( 'HND_Social_Media_Widget' );\n\tregister_widget( 'HND_Upcoming_Events_Widget' );\n\t\n\t// NEW widgets\n\tregister_widget( 'HND_Grid_Items_Widget' ); // *** new *** \n\tregister_widget( 'HND_Item_Slideshow_Widget' );\n\tregister_widget( 'HND_Synchronized_Slideshow_Widget' ); // under construction\n\t\n}", "function gymfitness_widgets(){\n\n register_sidebar(array(\n 'name' => 'Sidebar 1', \n 'id' => 'sidebar_1',\n 'before_widget' => '<div class=\"\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar(array(\n 'name' => 'Sidebar 2', \n 'id' => 'sidebar_2',\n 'before_widget' => '<div class=\"\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>'\n ));\n\n}", "function gymfitness_widgets(){\n register_sidebar( array(\n 'name'=>'Sidebar 1',\n 'id' => 'sidebar_1',\n 'before-widget' => '<div class=\"widget\">', \n 'after-widget' => '</div>', \n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n\n\n ));\n register_sidebar( array(\n 'name'=>'Sidebar 2',\n 'id' => 'sidebar_2',\n 'before-widget' => '<div class=\"widget\">', \n 'after-widget' => '</div>', \n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n\n\n ));\n}", "function uultra_delete_custom_widgets()\r\n\t{\r\n\t\t$package_id = $_POST[\"package_id\"];\r\n\t\t\t\t\r\n\t\tif($package_id=='')\r\n\t\t{\r\n\t\t\r\n\t\t\t$default_widgets = get_option('userultra_default_user_tabs');\r\n\t\t\t$custom_widgets = get_option('userultra_custom_user_widgets');\r\n\t\t\t$unused_widgets = get_option('uultra_unused_user_widgets');\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t$default_widgets = get_option('userultra_default_user_tabs_package_'.$package_id.'');\r\n\t\t\t$custom_widgets = get_option('userultra_custom_user_widgets_package_'.$package_id.'');\t\r\n\t\t\t$unused_widgets = get_option('uultra_unused_user_widgets_package_'.$package_id.'');\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$id = $_POST[\"widget_id\"];\t\t\r\n\t\t\r\n\t\tforeach($default_widgets as $key => $module)\r\n\t\t{\r\n\t\t\tif($id==$key)\r\n\t\t\t{\r\n\t\t\t\tunset($default_widgets[$key]);\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tforeach($custom_widgets as $key => $module)\r\n\t\t{\r\n\t\t\tif($id==$key)\r\n\t\t\t{\r\n\t\t\t\tunset($custom_widgets[$key]);\t\t\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tforeach($unused_widgets as $key => $module)\r\n\t\t{\r\n\t\t\tif($id==$key)\r\n\t\t\t{\r\n\t\t\t\tunset($unused_widgets[$key]);\t\t\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($package_id=='')\r\n\t\t{\r\n\t\t\r\n\t\t\tupdate_option('userultra_custom_user_widgets', $custom_widgets );\r\n\t\t\tupdate_option('userultra_default_user_tabs', $default_widgets );\r\n\t\t\tupdate_option('uultra_unused_user_widgets', $unused_widgets );\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tupdate_option('userultra_custom_user_widgets_package_'.$package_id.'', $custom_widgets );\r\n\t\t\tupdate_option('userultra_default_user_tabs_package_'.$package_id.'', $default_widgets );\r\n\t\t\tupdate_option('uultra_unused_user_widgets_package_'.$package_id.'', $unused_widgets );\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//print_r($modules_custom);\r\n\t\tdie();\r\n\t\r\n\t}", "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 wp_register_unused_sidebar() {\n\n\tregister_sidebar(array(\n\t\t'name' => __('Inactive Widgets'),\n\t\t'id' => 'wp_inactive_widgets',\n\t\t'class' => 'inactive-sidebar',\n\t\t'description' => __( 'Drag widgets here to remove them from the sidebar but keep their settings.' ),\n\t\t'before_widget' => '',\n\t\t'after_widget' => '',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t));\n\n}", "function wptutsplus_remove_dashboard_widgets() {\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\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 // remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n}", "function wp_widget_control($sidebar_args)\n {\n }", "function blank_widgets_init(){\n\n/*===================================\n\n Widget Areas header.php\n\n=====================================*/\n\n // // Widget Area: Header Contact\n // register_sidebar(array(\n // 'name' => ('Header Contact'),\n // 'id' => 'header-contact',\n // 'description' => 'Contact Info in Header',\n // 'before_widget' => '<div class=\"widget-header-contact\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h5 class=\"header-contact-widget-title\">',\n // 'after_title' => '</h5>'\n // ));\n\n // Widget Area: Header Social\n register_sidebar(array(\n 'name' => ('Header Social'),\n 'id' => 'header-social',\n 'description' => 'Social Meida Info in Header',\n 'before_widget' => '<div class=\"widget-header-social\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h5 class=\"header-social-widget-title\">',\n 'after_title' => '</h5>'\n ));\n\n/*===================================\n\n Widget Areas footer.php\n\n=====================================*/\n\n // Widget Area: Left Footer\n register_sidebar(array(\n 'name' => ('Left Footer'),\n 'id' => 'left-footer',\n 'description' => 'Left Widget Area in Footer',\n 'before_widget' => '<div class=\"widget-left-footer\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h5 class=\"left-footer-widget-title\">',\n 'after_title' => '</h5>'\n ));\n\n // Widget Area: Middle Footer\n register_sidebar(array(\n 'name' => ('Middle Footer'),\n 'id' => 'middle-footer',\n 'description' => 'Middle Widget Area in Footer',\n 'before_widget' => '<div class=\"widget-middle-footer\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h5 class=\"middle-footer-widget-title\">',\n 'after_title' => '</h5>'\n ));\n\n // Widget Area: Right Footer\n register_sidebar(array(\n 'name' => ('Right Footer'),\n 'id' => 'right-footer',\n 'description' => 'Right Widget Area in Footer',\n 'before_widget' => '<div class=\"widget-right-footer\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h5 class=\"right-footer-widget-title\">',\n 'after_title' => '</h5>'\n ));\n\n/*===================================\n\n Widget Areas page-home.php\n\n=====================================*/\n\n // Widget Area: Homepage Hero Image\n register_sidebar(array(\n 'name' => ('Homepage Hero Image'),\n 'id' => 'homepage-hero-image',\n 'description' => 'Hero Image on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-hero-image\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-hero-image-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Truck Types\n register_sidebar(array(\n 'name' => ('Homepage Truck Types'),\n 'id' => 'homepage-truck-types',\n 'description' => 'Truck Types Section on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-truck-types\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-truck-types-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Middle Image\n register_sidebar(array(\n 'name' => ('Homepage Middle Image'),\n 'id' => 'homepage-middle-image',\n 'description' => 'Middle Image on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-middle-image\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-middle-image-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Header\n register_sidebar(array(\n 'name' => ('Homepage Services Title'),\n 'id' => 'homepage-services-title',\n 'description' => 'Services Title on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-title\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-title-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services One\n register_sidebar(array(\n 'name' => ('Homepage Services One'),\n 'id' => 'homepage-services-one',\n 'description' => 'Services One on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-one\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-one-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Two\n register_sidebar(array(\n 'name' => ('Homepage Services Two'),\n 'id' => 'homepage-services-two',\n 'description' => 'Services Two on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-two\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-two-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Three\n register_sidebar(array(\n 'name' => ('Homepage Services Three'),\n 'id' => 'homepage-services-three',\n 'description' => 'Services Three on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-three\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-three-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Four\n register_sidebar(array(\n 'name' => ('Homepage Services Four'),\n 'id' => 'homepage-services-four',\n 'description' => 'Services Four on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-four\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-four-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Five\n register_sidebar(array(\n 'name' => ('Homepage Services Five'),\n 'id' => 'homepage-services-five',\n 'description' => 'Services Five on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-five\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-five-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Locations Header\n register_sidebar(array(\n 'name' => ('Homepage Locations Title'),\n 'id' => 'homepage-locations-title',\n 'description' => 'Locations Title on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-locations-title\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-locations-title-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Locations One\n register_sidebar(array(\n 'name' => ('Homepage Locations One'),\n 'id' => 'homepage-locations-one',\n 'description' => 'Locations One on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-locations-one\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-locations-one-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Locations Two\n register_sidebar(array(\n 'name' => ('Homepage Locations Two'),\n 'id' => 'homepage-locations-two',\n 'description' => 'Locations Two on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-locations-two\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-locations-two-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n }", "function glio_widgets_init() {\n\n register_sidebar(\n array(\n 'name' => __('Home Page Left', 'WP-Glio'),\n 'id' => 'hp-one',\n 'description' => __('The first area in the footer on the home page', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Home Page Middle', 'WP-Glio'),\n 'id' => 'hp-two',\n 'description' => __('The center area in the footer on the home page', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Home Page Right', 'WP-Glio'),\n 'id' => 'hp-three',\n 'description' => __('The last area in the footer on the home page', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n )\n );\n ///////\n register_sidebar(\n array(\n 'name' => __('Services', 'WP-Glio'),\n 'id' => 'company-services',\n 'description' => __('Add content below the \"What we do\" title', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Team', 'WP-Glio'),\n 'id' => 'company-team',\n 'description' => __('Add content below the \"Team Glio\" title', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Company Page Bottom', 'WP-Glio'),\n 'id' => 'company-bottom',\n 'description' => __('Add content below the team section on the company page', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"row %2$s\">',\n 'after_widget' => '</div><hr /></div>',\n 'before_title' => '<div class=\"col-md-5 side-title\">',\n 'after_title' => '</div><div class=\"col-md-7\">'\n )\n );\n ///////\n register_sidebar(\n array(\n 'name' => __('Footer Left', 'WP-Glio'),\n 'id' => 'footer-one',\n 'description' => __('The first area in the footer', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Footer Middle', 'WP-Glio'),\n 'id' => 'footer-two',\n 'description' => __('The center area in the footer', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Footer Right', 'WP-Glio'),\n 'id' => 'footer-three',\n 'description' => __('The last area in the footer', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n )\n );\n ///////\n register_sidebar(\n array(\n 'name' => __('Contact Page Left', 'WP-Glio'),\n 'id' => 'contact-one',\n 'description' => __('The first area in the footer on the contact page', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Contact Page Middle', 'WP-Glio'),\n 'id' => 'contact-two',\n 'description' => __('The center area in the footer on the contact page', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Contact Page Right', 'WP-Glio'),\n 'id' => 'contact-three',\n 'description' => __('The last area in the footer on the contact page', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n )\n );\n\n}", "function add_widget_sidebar()\r\n{\r\n register_sidebar(\r\n array(\r\n 'name' => 'Sidebar',\r\n 'id' => 'main-sidebar',\r\n )\r\n );\r\n register_sidebar(\r\n array(\r\n 'name' => 'Sidebar du footer',\r\n 'id' => 'footer-sidebar',\r\n )\r\n );\r\n}", "function example_remove_dashboard_widgets() {\n\t \tglobal $wp_meta_boxes;\n\n\t\t// Remove the incomming links widget\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\t\n\n\t\t// Remove right now\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n\n\t\t// Remove side column\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\n\t}", "function twentythirteen_widgets_init() {\n register_sidebar(array(\n 'name' => __('Main Widget Area', 'twentythirteen'),\n 'id' => 'sidebar-1',\n 'description' => __('Appears in the footer section of the site.', 'twentythirteen'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n\n register_sidebar(array(\n 'name' => __('Secondary Widget Area', 'twentythirteen'),\n 'id' => 'sidebar-2',\n 'description' => __('Appears on posts and pages in the sidebar.', 'twentythirteen'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n register_sidebar(array(\n 'name' => __('Woocommerce cart', 'twentyfifteen'),\n 'id' => 'woocommerce-cart',\n 'description' => __('Add widgets here to appear in your sidebar.', 'twentyfifteen'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n}", "function dl_widget_init() {\n\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Página de Contacto',\n\t\t'id'\t\t\t=> 'contact-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Barra Lateral',\n\t\t'id'\t\t\t=> 'sidebar-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Search Menu',\n\t\t'id'\t\t\t=> 'menu-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\n}", "function footer_cust_widgets(){\n\tregister_sidebar(array(\n\t\t'name' => 'Mobile Menu',\n\t\t'id' => 'before-header',\n\t\t'description' => 'The content of this widget will appear as Mobile Menu.',\n\t));\n}", "function ourWidgetsInit(){\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Sidebar',\n\t\t\t'id' => 'sidebar1',\n\t\t\t'before_widget' => '<div class=\"widget-item\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h4 class=\"my-special-class\">',\n\t\t\t'after_title' => '</h4>'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 1',\n\t\t\t'id' => 'footer1'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 2',\n\t\t\t'id' => 'footer2'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 3',\n\t\t\t'id' => 'footer3'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 4',\n\t\t\t'id' => 'footer4'\n\t\t));\n\t}", "function my_remove_dashboard_widgets() {\n $user = wp_get_current_user();\n if ( ! $user->has_cap( 'manage_options' ) ) {\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n }\n}", "function child_theme_widgets_init() {\n \n // First footer widget area, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'First Footer Widget Area', 'childtheme' ),\n 'id' => 'first-footer-widget-area',\n 'description' => __( 'The is a first footer widget area', 'childtheme' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n \n // Second Footer Widget Area, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Second Footer Widget Area', 'childtheme' ),\n 'id' => 'second-footer-widget-area',\n 'description' => __( 'The is a second footer widget area', 'childtheme' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n \n // Third Footer Widget Area, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Third Footer Widget Area', 'childtheme' ),\n 'id' => 'third-footer-widget-area',\n 'description' => __( 'The is a third footer widget area', 'childtheme' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n \n // Fourth Footer Widget Area, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Fourth Footer Widget Area', 'childtheme' ),\n 'id' => 'fourth-footer-widget-area',\n 'description' => __( 'The is a fourth footer widget area', 'childtheme' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n \n}", "function twentytwelve_widgets_init() {\n\n register_sidebar(array(\n 'name' => __('First Front Page Footer Widget Area', 'twentytwelve'),\n 'id' => 'sidebar-2',\n 'description' => __('Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n register_sidebar(array(\n 'name' => __('Product Page Sidebar Widget Area', 'twentytwelve'),\n 'id' => 'sidebar-4',\n 'description' => __('Appears in the Product Page, bellow the Add to cart button in screens over 600px and bellow the product description in screens bellow 600px.', 'twentytwelve'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n register_sidebar(array(\n 'name' => __('Post and Page Sidebar Widget Area', 'twentytwelve'),\n 'id' => 'sidebar-1',\n 'description' => __('Appears on posts and pages except the optional Front Page template, which has its own widgets', 'twentytwelve'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n}" ]
[ "0.8636281", "0.8197421", "0.81720716", "0.79573977", "0.7938502", "0.7928548", "0.79066247", "0.78764915", "0.7800305", "0.77646667", "0.7620833", "0.75784874", "0.7419697", "0.73724735", "0.7340547", "0.7312976", "0.72826034", "0.72666377", "0.72553134", "0.72380036", "0.72191375", "0.7173956", "0.7127451", "0.7111148", "0.7101804", "0.70884454", "0.7060082", "0.7020396", "0.70175517", "0.69481397", "0.69388413", "0.6938778", "0.69249123", "0.6889942", "0.6852074", "0.6850426", "0.68296987", "0.6829058", "0.6828306", "0.68273216", "0.68218786", "0.68100256", "0.6807729", "0.678815", "0.6787636", "0.67855567", "0.67849845", "0.6783542", "0.677614", "0.6770785", "0.6770702", "0.67648077", "0.6760841", "0.6760062", "0.67522657", "0.67509156", "0.6739886", "0.6719703", "0.6704309", "0.6702395", "0.6700016", "0.6674241", "0.6668792", "0.6668625", "0.66683286", "0.6657531", "0.6654128", "0.66523194", "0.66509354", "0.6649798", "0.6644528", "0.66442275", "0.6644197", "0.66438454", "0.66431487", "0.66380775", "0.6631825", "0.66282225", "0.6625771", "0.6624733", "0.66223866", "0.66130584", "0.6604745", "0.65896803", "0.65891886", "0.65848684", "0.6581128", "0.65809864", "0.6580894", "0.65777844", "0.6577522", "0.65678215", "0.6557028", "0.6556031", "0.65541804", "0.65536666", "0.65524805", "0.6550516", "0.65446866", "0.65400964" ]
0.8350835
1
/ Hide dashboard widgets.
Скрыть виджеты панели.
function custom_hide_dashboard_widgets() { global $wp_meta_boxes; // Today widget. unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] ); // Last comments. unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] ); // Incoming links. unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] ); // Plugins. unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] ); // WordPress blog. unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] ); // WordPress news. unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mitlibnews_remove_dashboard_widgets() {\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); // Quickpress widget\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); // Wordpress news\n\tif (!current_user_can('add_users')) {\n\t\tremove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); // \"At a glance\" widget\n\t\tremove_meta_box( 'dashboard_activity', 'dashboard', 'normal'); // Activity widget\n\t}\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 fabric_remove_dashboard_widgets() {\n remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal');\n remove_meta_box('dashboard_plugins', 'dashboard', 'normal');\n remove_meta_box('dashboard_primary', 'dashboard', 'normal');\n remove_meta_box('dashboard_secondary', 'dashboard', 'normal');\n}", "function admin_disable_dashboard_widgets() {\n // remove_meta_box('dashboard_right_now', 'dashboard', 'normal');// Remove \"At a Glance\"\n // remove_meta_box('dashboard_activity', 'dashboard', 'normal');// Remove \"Activity\" which includes \"Recent Comments\"\n // remove_meta_box('dashboard_quick_press', 'dashboard', 'side');// Remove Quick Draft\n remove_meta_box('dashboard_primary', 'dashboard', 'core');// Remove WordPress Events and News\n}", "function dwwp_remove_dashboard_widget() {\n remove_meta_box( 'dashboard_primary','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 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}", "public function remove_dashboard_widgets() {\n\t\tremove_meta_box('dashboard_incoming_links', 'dashboard', 'normal');\n\t\tremove_meta_box('dashboard_plugins', 'dashboard', 'normal');\n\t\tremove_meta_box('dashboard_primary', 'dashboard', 'normal');\n\t\tremove_meta_box('dashboard_secondary', 'dashboard', 'normal');\n\t}", "function cmk_disable_default_dashboard_widgets() {\n remove_meta_box('dashboard_plugins', 'dashboard', 'core');\n remove_meta_box('dashboard_primary', 'dashboard', 'core');\n remove_meta_box('dashboard_secondary', 'dashboard', 'core'); // disable Simple:Press dashboard widget\n remove_meta_box('sf_announce', 'dashboard', 'normal');\n}", "function disable_tribe_dashboard_widget() {\n remove_meta_box('tribe_dashboard_widget', 'dashboard', 'normal');\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 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}", "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 owlride_disable_default_dashboard_widgets() {\n remove_meta_box('dashboard_plugins', 'dashboard', 'core');\n remove_meta_box('dashboard_quick_press', 'dashboard', 'core');\n remove_meta_box('dashboard_primary', 'dashboard', 'core');\n remove_meta_box('dashboard_secondary', 'dashboard', 'core');\n}", "function wptutsplus_remove_dashboard_widgets() {\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\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 // remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\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}", "public function disable_dashboard_widgets() {\n\n\t\t//Init vars\n\t\t$defaults = array(\n\t\t\t'id' \t\t=> NULL,\n\t\t\t'page'\t\t=> 'dashboard',\n\t\t\t'context'\t=> NULL\n\t\t);\n\n\t\t//Check if disable_dashboard_widgets array isset in config class\n\t\tif( isset($this->admin_disable_dashboard_widgets) && is_array($this->admin_disable_dashboard_widgets) ) {\n\n\t\t\t//Loop each request and call WP remove_meta_box for each\n\t\t\tforeach( $this->admin_disable_dashboard_widgets as $method_args ) {\n\n\t\t\t\t$method_args = wp_parse_args( $method_args, $defaults );\n\n\t\t\t\tif( isset( $method_args['id'], $method_args['page'], $method_args['context'] ) ) {\n\t\t\t\t\tremove_meta_box( $method_args['id'], $method_args['page'], $method_args['context'] );\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}", "function remove_dashboard_widgets() {\n // Remove All Dashboard Widgets.\n remove_action('welcome_panel', 'wp_welcome_panel'); \n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); \n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' ); \n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' ); \n remove_meta_box( 'dashboard_plugins', '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_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );\n remove_meta_box('logincust_subscribe_widget', 'dashboard', 'core');\n remove_meta_box('themeisle', 'dashboard', 'core'); \n}", "function my_remove_dashboard_widgets() {\n $user = wp_get_current_user();\n if ( ! $user->has_cap( 'manage_options' ) ) {\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n }\n}", "function rw_remove_dashboard_widgets() {\n//\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // Recent Comments\n\tremove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // Incoming Links\n\tremove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // Plugins\n\n\tremove_meta_box('dashboard_quick_press', 'dashboard', 'normal'); // Quick Press\n//\tremove_meta_box('dashboard_recent_drafts', 'dashboard', 'normal'); // Recent Drafts\n\tremove_meta_box('dashboard_primary', 'dashboard', 'normal'); // Wordpress Blog\n\tremove_meta_box('dashboard_secondary', 'dashboard', 'normal'); // Other Wordpress News\n}", "function example_remove_dashboard_widgets() {\n\t \tglobal $wp_meta_boxes;\n\n\t\t// Remove the incomming links widget\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\t\n\n\t\t// Remove right now\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n\n\t\t// Remove side column\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\n\t}", "function my_custom_dashboard_widgets() \n \t{\n\t\tglobal $wp_meta_boxes;\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n\n\t\tunregister_sidebar( 'primary-widget-area' );\n\t\tunregister_sidebar( 'secondary-widget-area' );\n\t\tunregister_sidebar( 'first-footer-widget-area' );\n\t\tunregister_sidebar( 'second-footer-widget-area' );\n\t\tunregister_sidebar( 'third-footer-widget-area' );\n\t\tunregister_sidebar( 'fourth-footer-widget-area' );\n }", "function disable_default_dashboard_widgets() {\n\tremove_meta_box('dashboard_right_now', 'dashboard', 'core');\n\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'core');\n\tremove_meta_box('dashboard_incoming_links', 'dashboard', 'core');\n\tremove_meta_box('dashboard_plugins', 'dashboard', 'core');\n\n\tremove_meta_box('dashboard_quick_press', 'dashboard', 'core');\n\tremove_meta_box('dashboard_recent_drafts', 'dashboard', 'core');\n\tremove_meta_box('dashboard_primary', 'dashboard', 'core');\n\tremove_meta_box('dashboard_secondary', 'dashboard', 'core');\n}", "function disable_default_dashboard_widgets() {\r\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'core'); // Comments Widget\r\n remove_meta_box('dashboard_incoming_links', 'dashboard', 'core'); // Incoming Links Widget\r\n remove_meta_box('dashboard_activity', 'dashboard', 'core'); // welcome panel\r\n remove_meta_box('dashboard_plugins', 'dashboard', 'core'); // Plugins Widget\r\n Remove_meta_box('dashboard_quick_press', 'dashboard', 'core'); // Quick Press Widget\r\n remove_meta_box('dashboard_recent_drafts', 'dashboard', 'core'); // Recent Drafts Widget\r\n remove_meta_box('dashboard_primary', 'dashboard', 'core'); //\r\n remove_meta_box('dashboard_secondary', 'dashboard', 'core'); //\r\n // Removing plugin dashboard boxes\r\n remove_meta_box('yoast_db_widget', 'dashboard', 'normal'); // Yoast's SEO Plugin Widget\r\n}", "function mmc_dashboard(){\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n}", "public function hidden_sidebars() {\n\t\techo '<div style=\"display: none\">';\n\t\tif ( is_customize_preview() ) {\n\t\t\tdynamic_sidebar( 'sidebar-top-bar' );\n\t\t\tdynamic_sidebar( 'header-sidebar' );\n\t\t\tdynamic_sidebar( 'subscribe-widgets' );\n\t\t\tdynamic_sidebar( 'sidebar-big-title' );\n\t\t}\n\t\techo '</div>';\n\t}", "function remove_dashboard_widgets() {\n global $wp_meta_boxes;\n \n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n remove_action( 'welcome_panel', 'wp_welcome_panel' );\n \n}", "public function remove_dashboard_widgets() {\n remove_meta_box(\"dashboard_primary\", \"dashboard\", \"side\"); // WordPress.com blog\n remove_meta_box(\"dashboard_secondary\", \"dashboard\", \"side\"); // Other WordPress news\n\n global $wp_meta_boxes;\n\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n }", "function remove_business_starter_widgets(){\n\n\tunregister_sidebar( 'sidebar-1' );\n\tunregister_sidebar( 'sidebar-2' );\n\tunregister_sidebar( 'sidebar-3' );\n}", "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 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 ba_remove_dashboard_widgets() {\n\tglobal $wp_meta_boxes;\n\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] );\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] );\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts'] );\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] );\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts'] );\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] );\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] );\n}", "function disable_default_dashboard_widgets() {\n\tglobal $wp_meta_boxes;\n\t//unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); // Right Now Widget\n\t//unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']); // Activity Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); // Comments Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); // Incoming Links Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); // Plugins Widget\n\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); // Quick Press Widget\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']); // Recent Drafts Widget\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); //\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); //\n\n\t// remove plugin dashboard boxes\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget']); // Yoast's SEO Plugin Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['rg_forms_dashboard']); // Gravity Forms Plugin Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['bbp-dashboard-right-now']); // bbPress Plugin Widget\n}", "function remove_wordpress_dashboard_blocks() {\n\tremove_meta_box('dashboard_right_now', 'dashboard', 'normal');\n\tremove_meta_box('dashboard_activity', 'dashboard', 'normal');\n\tremove_meta_box('dashboard_quick_press', 'dashboard', 'side');\n\tremove_meta_box('dashboard_primary', 'dashboard', 'side');\n}", "function example_remove_dashboard_widgets() {\n global $wp_meta_boxes;\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n}", "public function hide();", "function wooadmin_remove_dashboard_widgets(){\n remove_meta_box('posts', 'users', 'normal'); // Right Now\n remove_meta_box('dashboard_right_now', 'dashboard', 'normal'); // Right Now\n remove_meta_box('dashboard_browser_nag', 'dashboard', 'normal'); // Right Now\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // Recent Comments\n remove_meta_box('welcome-panel', 'dashboard', 'normal'); // Welcome Comments\n remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // Incoming Links\n remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // Plugins\n remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); // Quick Press\n remove_meta_box('dashboard_recent_drafts', 'dashboard', 'side'); // Recent Drafts\n remove_meta_box('dashboard_primary', 'dashboard', 'side'); // BoxBeat blog\n remove_meta_box('dashboard_secondary', 'dashboard', 'side'); // Other BoxBeat News\n\n// use 'dashboard-network' as the second parameter to remove widgets from a network dashboard.\n}", "function remove_dashboard_widgets() {\n\tglobal $wp_meta_boxes;\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\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 remove_dashboard_widgets(){\n\tglobal$wp_meta_boxes;\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n}", "function wporg_add_dashboard_widgets() {\r\n // Remove Welcome panel\r\n remove_action( 'welcome_panel', 'wp_welcome_panel' );\r\n // Remove the rest of the dashboard widgets\r\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\r\n remove_meta_box( 'health_check_status', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');\r\n remove_meta_box( 'dashboard_site_health', 'dashboard', 'normal');\r\n \r\n // Add function here\r\n wp_add_dashboard_widget( 'jerome-on-service-widget', 'Web Developer Service Tag', 'jerome_on_service_widget');\r\n}", "function addDashboardWidgets() {\r\n\t\t\twp_add_dashboard_widget('ttb_dashboard', 'Track The Book', array($this,'dashboard'));\r\n\t\t}", "function Wfc_Developer_Dashboard_Widget(){\n wp_add_dashboard_widget( \"wfc_developer_dashboard\", __( \"WFC Dashboard Widget\" ), \"wfc_developer_dashboard\" );\n }", "function remove_dashboard_widgets() {\n global $wp_meta_boxes;\n \n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n}", "function hide_dashboard () {\r\n\t\tif (current_user_can('edit_posts')) {\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\tglobal $menu, $submenu, $user_ID;\r\n\t\t\t$the_user = new WP_User($user_ID);\r\n\t\t\treset($menu); $page = key($menu);\r\n\t\t\twhile ((__('Dashboard') != $menu[$page][0]) && next($menu))\r\n\t\t\t\t$page = key($menu);\r\n\t\t\tif (__('Dashboard') == $menu[$page][0]) unset($menu[$page]);\r\n\t\t\t\treset($menu); $page = key($menu); \r\n\t\t\twhile (!$the_user->has_cap($menu[$page][1]) && next($menu))\r\n\t\t\t\t$page = key($menu); \r\n\t\t\twhile ((__('Tools') != $menu[$page][0]) && next($menu))\r\n\t\t\t\t$page = key($menu);\r\n\t\t\tif (__('Tools') == $menu[$page][0]) unset($menu[$page]);\r\n\t\t\tif (preg_match('#wp-admin/?(index.php)?$#',$_SERVER['REQUEST_URI']) && ('index.php' != $menu[$page][2])) \r\n\t\t\t\twp_redirect(get_option('siteurl') . '/wp-admin/post-new.php');\r\n\t\t}\r\n\t}", "function remove_dash_widgets() {\n\n\t\tglobal $wp_meta_boxes;\n\n\t\tif ( $this->dash_widgets ) {\n\t\t\tforeach ( $wp_meta_boxes['dashboard'] as $context => $priorities ) {\n\t\t\t\tforeach ( $priorities as $widgets ) {\n\t\t\t\t\tforeach ( $widgets as $widget_ID => $widget ) {\n\t\t\t\t\t\tif ( isset( $this->dash_widgets[ $widget_ID ] ) ) {\n\n\t\t\t\t\t\t\t// Trashed\n\t\t\t\t\t\t\tif ( isset( $this->dash_widgets[ $widget_ID ]['trashed'] ) &&\n\t\t\t\t\t\t\t $this->dash_widgets[ $widget_ID ]['trashed']\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tremove_meta_box( $widget_ID, 'dashboard', $context );\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 disable_default_dashboard_widgets() {\n\tglobal $wp_meta_boxes;\n\t// wp..\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\n\t// yoast seo\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget']);\n\t// gravity forms\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['rg_forms_dashboard']);\n}", "function tac_remove_dashboard_widgets() {\n\tglobal $wp_meta_boxes;\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] );\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] );\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] );\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] );\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] );\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts'] );\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] );\n}", "public static function add_dashboard_widgets() {\n global $settings, $translations;\n\n\t\twp_add_dashboard_widget(\n\t\t\t$settings['id'],\n\t\t\t$translations['widget_title'],\n\t\t\tarray('QuickInfoWidget','widget'),\n\t\t\tarray('QuickInfoWidget','config')\n\t\t);\n\t}", "function remove_admin_bar() {\n\tshow_admin_bar(false);\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 remove_dashboard_widgets(){\n global$wp_meta_boxes;\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); \n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\n}", "public function dashboard_widget() {\n\n\t\twp_add_dashboard_widget(\n\t\t\t'slack_dashboard_widget', // Widget slug.\n\t\t\t'Slack Channel Info Dashboard Widget', // Title.\n\t\t\tarray( $this, 'dashboard_widget_function' ) // Display function.\n\t\t);\n\t}", "function add_dashboard_widgets() {\n\twp_add_dashboard_widget('dashboard_widget', 'Al-Zwaid FrameWork', 'dashboard_widget_function');\n}", "function bones_custom_dashboard_widgets() {\n\twp_add_dashboard_widget('bones_rss_dashboard_widget', 'Recientemente en Themble (Personalizar en admin.php)', 'bones_rss_dashboard_widget');\n\t/*\n\tAsegurate de incluir cualquier otro widget del Dashboard creado\n\ten esta función y todos serán cargados.\n\t*/\n}", "public function addDashWidgets()\n {\n wp_add_dashboard_widget('custom_help_widget_2017', 'True Agency', [$this, 'brandDashboard']);\n }", "function disable_default_dashboard_widgets() {\n global $wp_meta_boxes;\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\n}", "function cp_wp_add_dashboard_widgets() {\n $options = get_option('cp_options');\n if ( $options['dashboard_meta_box'] == 'enabled' ) {\n\twp_add_dashboard_widget('cp_wp_dashboard_widget', __('CollabPress - Recent Activity', 'collabpress'), 'cp_wp_dashboard_widget_function');\n }\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 hide_admin_bar( $show ) {\n\tif ( ! current_user_can( 'administrator' ) ) {\n\t\treturn false;\n\t}\n\n\treturn $show;\n}", "function wpscSupportTickets_main_add_dashboard_widgets() {\r\n $this->checkPermissions();\r\n wp_add_dashboard_widget('wpscSupportTickets_main_dashboard_widgets', __('IDB Support Tickets Overview', 'wpsc-support-tickets'), array(&$this, 'wpscSupportTickets_main_dashboard_widget_function'));\r\n \r\n }", "function remove_dashboard_meta() {\n\n\t//Completely remove various dashboard widgets (remember they can also be HIDDEN from admin)\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); //Quick Press widget\n\tremove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' ); //Recent Drafts\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); //WordPress.com Blog\n\tremove_meta_box( 'dashboard_secondary', 'dashboard', 'side' ); //Other WordPress News\n\tremove_meta_box( 'dashboard_incoming_links','dashboard', 'normal' ); //Incoming Links\n\tremove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' ); \n\tremove_meta_box( 'dashboard_activity', 'dashboard', 'normal' ); \n\tremove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); \n\tremove_action('welcome_panel', 'wp_welcome_panel'); \n}", "function portal_add_dashboard_widgets() {\n\n if(current_user_can('publish_portal_projects')) {\n\n wp_add_dashboard_widget(\n 'portal_dashboard_overview', // Widget slug.\n 'Projects', // Title.\n 'portal_dashboard_overview_widget_function' // Display function.\n );\n\n\t\twp_add_dashboard_widget(\n\t\t\t'portal_dashboard_timing',\n\t\t\t'Project Calendar',\n\t\t\t'portal_dashboard_calendar_widget'\n\t\t);\n\n }\n\n}", "function gwt_disable_comments_dashboard() {\r\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\r\n}", "function ks_disable_comments_dashboard() {\n\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "function fp_add_dashboard_widgets() {\n wp_add_dashboard_widget( 'wptutsplus_dashboard_welcome', 'Welcome', 'fp_add_welcome_widget' );\n wp_add_dashboard_widget( 'wptutsplus_dashboard_links', 'Useful Links', 'fp_add_links_widget' );\n}", "function help_add_dashboard_widgets() {\n add_meta_box('help_dashboard_widget', 'Need Help?', 'help_dashboard_widget_function', 'dashboard', 'side', 'low');\n}", "function custom_dashboard_widgets() {\n\twp_add_dashboard_widget('rss_dashboard_widget', __('Recently on Themble (Customize on admin.php)', 'tabula_rasa'), 'rss_dashboard_widget');\n\t// Be sure to drop any other created Dashboard Widgets in this function and they will all load.\n}", "function load_dashboard_widget() {\n\t\tadd_action('wp_dashboard_setup', array($this,'dashboard_widget'));\n\t}", "public function _settings_section_dashboard_widget() {\n _e( \"The Dashboard Widget can be changed depending on a User's capabilitites.\", 'zendesk' );\n }", "function df_disable_comments_dashboard()\n{\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "function fww_add_dashboard_widgets() {\n wp_add_dashboard_widget(\n 'fww_dashboard_widget',\n 'First World War portal information',\n 'fww_dashboard_widget_function'\n );\n}", "function maker_4ym_add_dashboard_widgets() {\n wp_add_dashboard_widget( 'maker_4ym_dashboard_welcome', '¡Bienvenido!', 'maker_4ym_add_welcome_widget' );\n wp_add_dashboard_widget( 'maker_4ym_dashboard_links', 'Enlaces de interés', 'maker_4ym_add_links_widget' );\n}", "public function add_dashboard_widget() {\n\t\tif ( current_user_can( 'vfb_view_entries' ) || current_user_can( 'vfb_edit_entries' ) )\n\t\t\twp_add_dashboard_widget( 'vfb-pro-dashboard', __( 'Recent Visual Form Builder Pro Entries', 'visual-form-builder-pro' ), array( &$this, 'dashboard_widget' ), array( &$this, 'dashboard_widget_control' ) );\n\t}", "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 df_disable_comments_dashboard()\r\n\t{\r\n\t\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\r\n\t}", "public function handle_dashboard_toggle() {\n\t\t\tif ( isset( $_GET['woocart-dashboard'] ) ) {\n\t\t\t\t$woocart_dashboard = empty( $_GET['woocart-dashboard'] ) ? 'no' : 'yes';\n\t\t\t\tupdate_option( '_hide_woocart_dashboard', $woocart_dashboard );\n\t\t\t\twp_redirect( admin_url() );\n\t\t\t\texit;\n\t\t\t}\n\t\t}", "function my_add_dashboard_widgets() {\n $user = wp_get_current_user();\n if ( ! $user->has_cap( 'manage_options' ) ) {\n wp_add_dashboard_widget( 'my_dashboard_welcome', 'Benvenuto', 'my_add_welcome_widget' );\n }\n}", "public function widgets() {\r\n\t\t// Make sure the user has capability.\r\n\t\tif ( Permission::user_can( 'analytics' ) || ! is_admin() ) {\r\n\t\t\t// Most popular contents.\r\n\t\t\tregister_widget( Widgets\\Popular::instance() );\r\n\t\t}\r\n\t}", "private function admin_area_actions() {\n\n\t\tif( is_admin() ) {\n\n\t\t\t//Disable dashboard widgets\n\t\t\tadd_action( 'admin_menu', array($this, 'disable_dashboard_widgets') );\n\n\t\t}\n\n\t}", "public function hide() {\n\t\treturn true;\n\t}", "public function hide() {\n\t\treturn true;\n\t}", "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}", "public function dashboard_widget_content() {\n\t\t$is_authed = ( MonsterInsights()->auth->is_authed() || MonsterInsights()->auth->is_network_authed() );\n\n\t\tif ( ! $is_authed ) {\n\t\t\t$this->widget_content_no_auth();\n\t\t} else {\n\t\t\tmonsterinsights_settings_error_page( 'monsterinsights-dashboard-widget', '', '0' );\n\t\t\tmonsterinsights_settings_inline_js();\n\t\t}\n\n\t}", "function docuemtation_add_dashboard_widgets() {\n\twp_add_dashboard_widget('docuemtation_dashboard_widget', 'Documentation', 'docuemtation_dashboard_widget_function');\t\n}", "function add_dashboard_widgets() {\n wp_add_dashboard_widget('dashboard_suporte', 'Precisa de Ajuda?', 'dashboard_widget_function');\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 wp_task_manager_init_dashboard_widget() {\n\t\twp_add_dashboard_widget( 'wp_dashboard_my_task_manager', __( 'All Submissions' ), 'wp_task_manager_dashboard_widget' );\n\t\twp_add_dashboard_widget( 'wp_dashboard_my_task1_manager', __( 'Submissions by Form Name' ), 'wp_task_manager_dashboard_widget_1' );\n\t\texample_remove_dashboard_widgets();\n\t\t\n\t}", "function deregister_widgets()\n { foreach ( $this->get_widgets() as $widget )\n {\n unregister_widget( $widget );\n }\n\n }", "function wimb_add_dashboard_widgets()\n{\n\twp_add_dashboard_widget(\n\t\t'where-is-my-blogroll-feed',\t// Widget slug.\n\t\t__('Blogroll Feed','wimb'),\t// Title.\n\t\t'wimb_dashboard_widget_function' // Display function.\n\t);\t\n}", "function my_unregister_widgets() {\n\tunregister_widget('WP_Widget_Pages');\n\tunregister_widget('WP_Widget_Calendar');\n\tunregister_widget('WP_Widget_Archives');\n\tunregister_widget('WP_Widget_Meta');\n\tunregister_widget('WP_Widget_Search');\n\tunregister_widget('WP_Widget_Text');\n\tunregister_widget('WP_Widget_Categories');\n\tunregister_widget('WP_Widget_Recent_Posts');\n\tunregister_widget('WP_Widget_Recent_Comments');\n\tunregister_widget('WP_Widget_RSS');\n\tunregister_widget('WP_Widget_Tag_Cloud');\n\tunregister_widget('WP_Nav_Menu_Widget');\n}", "function msdlab_homepage_widgets(){\n\tprint '<div id=\"homepage-widgets\" class=\"widget-area\">';\n\tprint '<div class=\"wrap\"><div class=\"row\">';\n dynamic_sidebar('homepage-widgets');\n \tprint '</div></div>';\n\tprint '</div>';\n}", "function caldol_disable_all_widgets( $sidebars_widgets ) {\n\tif ( is_home() || is_front_page() )\n\t\t$sidebars_widgets = array( false );\n\treturn $sidebars_widgets;\n}", "function wp_unregister_sidebar_widget($id)\n {\n }", "public function screen_options() {\n\n\t\t\tif ( ! $this->is_dashboard_page() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$args = array(\n\t\t\t\t'label' => __( 'Hide WooCart Dashboard', 'woocart-defaults' ),\n\t\t\t\t'default' => true,\n\t\t\t\t'option' => '_hide_custom_dashboard',\n\t\t\t);\n\t\t\tadd_screen_option( 'woocart_custom_dashboard', $args );\n\n\t\t}", "function unregister_sidebar_widget($id)\n {\n }", "function gp_remove_dashboard_boxes() {\n\t// remove_meta_box('dashboard_incoming_links','dashboard','core'); // Incoming Links Box\n\tremove_meta_box('dashboard_quick_press','dashboard','core'); // Quick Press Box\n\tremove_meta_box('dashboard_plugins','dashboard','core'); // Plugins Box\n\tremove_meta_box('dashboard_recent_drafts','dashboard','core'); // Recent Drafts Box\n\tremove_meta_box('dashboard_recent_comments','dashboard','core'); // Recent Comments\n\tremove_meta_box('dashboard_primary','dashboard','core'); // WordPress Development Blog\n\tremove_meta_box('dashboard_secondary','dashboard','core'); // Other WordPress News\n\tremove_meta_box('yoast_db_widget','dashboard','core'); // Yoast Dash box\n\tremove_meta_box('yoast_posts','dashboard','core'); // Yoast Dash posts box\n\tremove_meta_box('w3tc_pagespeed','dashboard','core'); // W3TC page speed box\n\t// Kill Blubrry dash shit forever and ever and ever\n\tremove_action('admin_head-index.php','powerpress_dashboard_head');\n\tremove_action('wp_dashboard_setup','powerpress_dashboard_setup');\n}", "public function register_dashboard_widgets() {\n\t\t$widget_render = array( &$this, 'render_widget' );\n\n\t\tif ( false !== $this->option( 'widget_id' ) && false !== $this->option( 'widget_name' ) ) {\n\t\t\t$wid = $this->option( 'widget_id' );\n\t\t\t$wname = $this->option( 'widget_name' );\n\t\t\t$save_widget = ( ! empty( $this->fields() ) ) ? array( &$this, 'save_widget' ) : false;\n\t\t\twp_add_dashboard_widget( $wid, $wname, $widget_render, $save_widget );\n\t\t}\n\t}" ]
[ "0.76082855", "0.75985193", "0.75888413", "0.75827056", "0.7523026", "0.75071985", "0.750256", "0.7469566", "0.74597436", "0.74109954", "0.74072343", "0.7404851", "0.7344693", "0.730992", "0.7305711", "0.7291481", "0.7274372", "0.7229942", "0.7209446", "0.7188029", "0.7165178", "0.71119153", "0.7068923", "0.7060138", "0.7024644", "0.70119184", "0.69594544", "0.6924699", "0.689154", "0.6881178", "0.6853797", "0.6831476", "0.68308717", "0.68263686", "0.68189555", "0.6804179", "0.67971", "0.67935795", "0.67896247", "0.67683053", "0.67619014", "0.67611855", "0.67536205", "0.6730949", "0.672544", "0.6683799", "0.66831106", "0.66772735", "0.66668683", "0.6666072", "0.6658252", "0.66501", "0.66222626", "0.6609824", "0.6601747", "0.66006064", "0.65966105", "0.6594035", "0.65720946", "0.65574276", "0.65498704", "0.6534237", "0.65233934", "0.6520449", "0.65112025", "0.65101177", "0.6485899", "0.64677894", "0.646727", "0.6461781", "0.64476323", "0.6435824", "0.6435336", "0.6435022", "0.64341587", "0.64341587", "0.64311516", "0.6423444", "0.63909733", "0.6387023", "0.6368964", "0.6339568", "0.6339568", "0.633673", "0.633673", "0.63356376", "0.6327143", "0.6317242", "0.63044095", "0.62964827", "0.62935585", "0.62911904", "0.6276268", "0.62541705", "0.62372124", "0.62339115", "0.62113845", "0.62092847", "0.6205921", "0.6197459" ]
0.76435626
0
Check whether provider provider id/name is valid
Проверьте, является ли идентификатор или имя провайдера допустимыми
public static function isProviderValid($provider) { return array_key_exists($provider, static::$providers); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkProviderKey($provider) {\n\n $postdata = http_build_query(\n array(\n 'ptype' => 'check-provider-key',\n 'provider_url' => $provider['provider_url'],\n 'provider_key' => $provider['provider_key']\n )\n );\n \n $wgbacklinks = WgbacklinksHelper::getInstance();\n $result = $wgbacklinks->execExchangeData($provider['provider_url'], $postdata); \n\n return $result;\n \n }", "public static function hasProvider() {\n\t\treturn !is_null(self::$provider);\n\t}", "public function validProvider()\n {\n return array(\n // always valid all ones\n array('11111111111111111', true),\n // valid X check digit\n array('1M8GDM9AXKP042788', true),\n // typical valid vin\n array('5GZCZ43D13S812715', true),\n // invalid char in model year\n array('5GZCZ43D1US812715', false),\n // uses invalid I, O, Q\n array('IGZOZ43Q13S812715', false)\n );\n }", "public function hasProvider($type);", "public function getProviderName();", "public function getProviderName();", "public function getProviderName();", "public function hasProviders(): bool;", "public function hasProviders();", "public function get_provider($name)\n {\n }", "protected function validProvider($providerName)\n {\n $providers = json_decode(setting('social_auths'));\n\n if (!$providers->{$providerName}) {\n return false;\n }\n\n return $providers->{$providerName}->enabled;\n }", "private function checkProvider($idPchProvider)\n {\n $provider = PchProvider::whereId($idPchProvider)->whereFlagDelete(false)->first();\n if (!$provider) {\n throw new ValidationException(\"El proveedor ($idPchProvider) no existe.\");\n }\n return $provider;\n }", "public function create(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "public function isProvider()\n {\n if ($this->type == 2) {\n return true;\n } else {\n return false;\n }\n }", "public function setProvider($name) {\n $name = Database::secureInput($name);\n\n if (!is_string($name) || strlen($name) < 2 || strlen($name) > 100) {\n throw new InvalidArgumentException(\"\\\"provider\\\" is no string or its length is invalid\");\n }\n\n $this->provider = $name;\n }", "public function getProviderName()\n {\n return NULL;\n }", "public function getProvider($provider_id);", "public function providerExists($providerName)\n {\n $query = $this->db->prepare('SELECT COUNT(id) FROM ? WHERE name = ?', array(\n self::TABLE_PROVIDERS,\n $providerName\n ));\n\n $count = $this->db->get_var($query);\n\n return (int) $count >= 1;\n }", "public function getProviderId();", "public function getProviderName(): string\n {\n return $this->providerName;\n }", "public static function cmpFqdnInvalidDataProvider() {}", "public function setProviderName($name);", "public function providerTestIsValidUsername() {\n return [\n 'valid' => [\n 'YesCT',\n TRUE,\n ],\n 'not valid' => [\n 'x x',\n FALSE,\n ],\n ];\n }", "public static function cmpFqdnValidDataProvider() {}", "public function getProviderName()\n {\n return $this->providerName;\n }", "public function isProviderOnline($provider = null): bool;", "public function hasProvider($name)\n {\n return isset($this->providers[$name]);\n }", "public function isValidMessengerProvider($provider = null): bool\n {\n return (bool) $this->findProviderAlias($provider);\n }", "public function hasIdentity($provider = null)\n {\n return !$this->getStorage()->isEmpty($provider);\n }", "protected function detectLoginProvider() {}", "public static function existsProvider($type)\n {\n return in_array($type, static::getList());\n }", "public function isProviderConfigurationActive($userId, $providerCode);", "public function isValidMessengerProvider($provider = null): bool;", "public function getProviderName()\n\t{\n\t\treturn ($this->provider != NULL) ? $this->provider->getName() : NULL;\n\t}", "public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }", "private function isOAuthOne(String $provider) : Bool\n {\n return collect(config('services.oauth1'))->contains($provider);\n }", "public function isGlobal($provider_id);", "public function canFriendProvider($provider = null): bool;", "public function delete(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "public function isProviderFriendable($provider = null): bool;", "public function check_user_exists_provider() {\n return [\n 'Fetch by email' => [\n 'email', 's1@example.com', true\n ],\n 'Fetch by email, different case' => [\n 'email', 'S1@EXAMPLE.COM', true\n ],\n 'Fetch data using a non-existent email' => [\n 'email', 's2@example.com', false\n ],\n 'Multiple accounts with the same email' => [\n 'email', 's1@example.com', false, 1\n ],\n 'Fetch data using a valid user ID' => [\n 'id', true, true\n ],\n 'Fetch data using a non-existent user ID' => [\n 'id', false, false\n ],\n 'Fetch data using a valid username' => [\n 'username', 's1', true\n ],\n 'Fetch data using a valid username, different case' => [\n 'username', 'S1', true\n ],\n 'Fetch data using an invalid username' => [\n 'username', 's2', false\n ],\n 'Fetch data using a valid ID Number' => [\n 'idnumber', 's1', true\n ],\n 'Fetch data using an invalid ID Number' => [\n 'idnumber', 's2', false\n ],\n ];\n }", "public function isEquals(Provider $provider)\n {\n return $this->getId() === $provider->getId();\n }", "public function getProviderCode()\n {\n return $this->providerCode;\n }", "function the_champ_social_login_provider_enabled($provider){\r\n\tglobal $theChampLoginOptions;\r\n\tif(the_champ_social_login_enabled() && isset($theChampLoginOptions['providers']) && in_array($provider, $theChampLoginOptions['providers'])){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "public function containsProvider(ProviderInterface $provider): bool;", "public function testIsApplicable(): void\n {\n $this->assertTrue($this->provider->isApplicable());\n }", "public function update(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "public function view(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "public function isGroupProviderForUser()\n {\n return false;\n }", "public function testInvalidNetworkProviderName(): void\n {\n $this->expectException(StopException::class);\n $name = 'invalid-provider';\n try {\n $this->Task->main('twitter', $name);\n } catch (StopException $e) {\n $this->assertEquals(\"`{$name}` is not a valid social provider.\", $e->getMessage());\n\n throw $e;\n }\n }", "public function getProvider();", "public function getProvider();", "public function getProvider();", "function checkData() {\n\t //check template name\n\t if (!ereg('^[0-9a-zA-Z_\\-]+$',$this->newIdt)) {\n\t\t $this->error = MF_WRONG_SHORT_NAME;\n\t\t return false;\n\t } else \n\t \t return $this->isNameFree();\n }", "function _name_check($str){\n }", "public function validPrivateKeyNamesDataProvider()\n {\n return [\n ['validName'],\n ['valid_name'],\n ['1valid_name'],\n ];\n }", "public function has_provider_devices($id = 0)\n {\n $retval = false;\n\n if ($id)\n {\n $filters = array('provider' => $id);\n $devices = com_meego_devprogram_devutils::get_devices($filters);\n\n if (count($devices))\n {\n $retval = true;\n }\n\n unset($filters, $devices);\n }\n\n return $retval;\n }", "function _valid_transportername($str)\r\n\t\t{\r\n\t\t\t$this->erpm->auth();\r\n\t\t\t\r\n\t\t\t$transporter_id = $this->input->post('transporter_id');\r\n\t\t\tif($transporter_id)\r\n\t\t\t\t$cond = ' and id != '.$transporter_id;\r\n\t\t\telse\r\n\t\t\t\t$cond = '';\r\n\t\t\t\r\n\t\t\t$transp_name =$this->input->post('name');;\r\n\t\t\tif($this->db->query(\"select count(*) as t from pnh_transporter_info where name = ? $cond\",$transp_name)->row()->t)\r\n\t\t\t{\r\n\t\t\t\t$this->form_validation->set_message('_valid_transportername',$transp_name.' is already available ');\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}", "public function providerIsLoaded(string $provider): bool\n {\n return isset($this->loadServiceProviders[$provider]);\n }", "function wp_oembed_add_provider($format, $provider, $regex = \\false)\n {\n }", "public function canFriendProvider($provider = null): bool\n {\n return $provider\n && is_object($provider)\n && in_array(get_class($provider), $this->providerCanFriend);\n }", "public function getProviderName(): ?string {\n $val = $this->getBackingStore()->get('providerName');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'providerName'\");\n }", "public static function is_valid_sponsor_id($sponsor_id)\n {\n $access_token = get_option('_mp_access_token_prod', '');\n $site_id = get_option('_site_id_v1', '');\n\n $varify_sponsor = true;\n\n if (empty($access_token)) {\n $varify_sponsor = false;\n } elseif ($sponsor_id == '') {\n $varify_sponsor = false;\n update_option('_mp_sponsor_id', $sponsor_id, true);\n } elseif (!is_numeric($sponsor_id)) {\n $varify_sponsor = false;\n echo '<div class=\"error\"><p>' . __('The <strong> Sponsor ID </strong> must be valid!', 'woocommerce-mercadopago-split') . '</p></div>';\n } elseif ($sponsor_id != get_option('_mp_sponsor_id', '')) {\n $varify_sponsor = true;\n } elseif ($site_id != get_option('_mp_sponsor_site_id', '')) {\n $varify_sponsor = true;\n } else {\n $varify_sponsor = false;\n }\n\n if ($varify_sponsor) {\n $mp_sponsor_id = WC_WooMercadoPagoSplit_Module::getMpInstanceSingleton();\n $get_sponor_id = $mp_sponsor_id->get('/users/' . $sponsor_id, array('Authorization' => 'Bearer ' . $access_token), false);\n if (!is_wp_error($get_sponor_id) && ($get_sponor_id['status'] == 200 || $get_sponor_id['status'] == 201)) {\n if ($get_sponor_id['response']['site_id'] == $site_id) {\n update_option('_mp_sponsor_id', $sponsor_id, true);\n update_option('_mp_sponsor_site_id', $get_sponor_id['response']['site_id'], true);\n } else {\n echo '<div class=\"error\"><p>' . __('The <strong>Sponsor ID</strong> must be from the same country as the seller!', 'woocommerce-mercadopago-split') . '</p></div>';\n update_option('_mp_sponsor_id', '', true);\n }\n } else {\n echo '<div class=\"error\"><p>' . __('The <strong> Sponsor ID </strong> must be valid!', 'woocommerce-mercadopago-split') . '</p></div>';\n update_option('_mp_sponsor_id', '', true);\n }\n }\n }", "public function checkProviderIsAssociated($provider_user_id) {\n return $this->userManager->getDrupalUserId($provider_user_id);\n }", "public function isValidServiceProviderLoginKey($login_key) {\n $stmt = $this->conn->prepare(\"SELECT id FROM `service_provider` where login_key = ?\");\n $stmt->bind_param(\"s\", $login_key);\n $stmt->execute();\n $stmt->store_result();\n $num_rows = $stmt->num_rows;\n $stmt->close();\n return $num_rows > 0;\n }", "public function getProvider(): string\n {\n return $this->provider;\n }", "private function initVarProvider()\n {\n $this->provider = $this->confMap[ 'provider' ];\n if ( $this->pObj->b_drs_map )\n {\n $prompt = 'Map provider is: ' . $this->provider;\n t3lib_div :: devLog( '[INFO/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 0 );\n }\n switch ( true )\n {\n case( $this->provider == 'GoogleMaps' ):\n break;\n case( $this->provider == 'Open Street Map' ):\n break;\n default:\n $header = 'FATAL ERROR!';\n $text = 'Unexpeted value : TypoScript property map.provider is \"' . $this->provider . '\".';\n $this->pObj->drs_die( $header, $text );\n }\n return;\n }", "public function getProviderHumanName()\n {\n return 'Google';\n }", "public function getProvider(): ?string {\n return $this->provider;\n }", "protected function getProviderName()\n {\n return SocialServices::GOOGLE;\n }", "private function __validate_name() {\n if (isset($this->initial_data[\"name\"])) {\n if ($this->get_limiter_id_by_name($this->initial_data[\"name\"], true)) {\n $this->id = $this->get_limiter_id_by_name($this->initial_data[\"name\"]);\n } else {\n $this->errors[] = APIResponse\\get(4209);\n }\n } else {\n $this->errors[] = APIResponse\\get(4167);\n }\n }", "public static function isValidDataProvider()\n\t{\n\t\treturn array(\n\t\t\tarray('800991111', TRUE, 30, TRUE), // No SSN within 30 days\n\t\t\tarray('800992222', TRUE, 30, FALSE), // 1 SSN within 30 days\n\t\t\tarray('800992222', 'TRUE', 30, FALSE), // 1 SSN within 30 days\n\t\t\tarray('800992222', TRUE, 1, TRUE), // No SSN within 1 day\n\t\t\tarray('800992222', FALSE, 1, TRUE), // Doesn't have direct deposit\n\t\t\tarray('800992222', 'FALSE', 1, TRUE), // Doesn't have direct deposit\n\t\t);\n\t}", "static public function toProvider( $provider, $url ){\n\t\tif( $url instanceof \\ADT_URL )\n\t\t\t$url\t= (string) $url;\n\t\tif( !is_string( $url ) )\n\t\t\tthrow new \\InvalidArgumentException( 'URL must be string or instance of ADT_URL' );\n\t\tif( !array_key_exists( strtolower( $provider ), self::$providers ) ){\n\t\t\t$providers\t= join( ', ', array_keys( self::$providers ) );\n\t\t\tthrow new \\InvalidArgumentException( 'Invalid provider (must be one of '.$providers.')' );\n\t\t}\n\t\t$url\t= sprintf( self::$providers[strtolower( $provider )], urlencode( $url ) );\t\t\t// ...\n\t\ttry{\n\t\t\t$curl\t= new \\Net_CURL( $url );\n\t\t\t$curl->exec();\n\t\t\tif( (int) $curl->getInfo( \\Net_CURL::INFO_HTTP_CODE ) === 200 )\n\t\t\t\treturn TRUE;\n\t\t}\n\t\tcatch( \\Exception $e ){}\n\t\treturn FALSE;\n\t}", "function isValidName ($name)\r\n{\r\n global $cf_reservedpattern;\r\n\r\n $reservedpattern = $cf_reservedpattern ? $cf_reservedpattern : '[_a-z]{0,1}([\\d]+)';\r\n\r\n if (preg_match(\"%^\".$reservedpattern.\"$%i\", $name, $matches))\r\n return FALSE; // reserved - not permitted\r\n\r\n $pattern = '[a-z\\d][_a-z\\d]{2,23}';\r\n if (preg_match('%^'.$pattern.'$%i', $name))\r\n if (!preg_match(\"%^(api|com|biz|def|gov|net|org|wap|web|www|gamma|mobile|mygamma|buzzcity|netbeacon)[\\d]*$%i\", $name))\r\n return TRUE;\r\n\r\n return FALSE; // not permitted\r\n}", "function isPackageEnabled ($provider)\n {\n $registeredProvidersArray = array_keys (app ()->getLoadedProviders ());\n\n return in_array ($provider, $registeredProvidersArray);\n }", "public function isValidUrlInvalidRessourceDataProvider() {}", "public function message()\n {\n return 'The given source control provider name is invalid.';\n }", "public function validEmailInvalidDataProvider() {}", "protected function findProvider()\n {\n // Check if type has criteria, create all needed objects\n $providerConfigurations = SettingsFactory::getInstance()\n ->getConfiguration('SYSPRODUCTS.PAYMENT.types.' . $this->type . '.provider');\n\n if (is_array($providerConfigurations)) {\n foreach ($providerConfigurations as $providerConfiguration) {\n /**\n * Provider.\n *\n * @var \\CommerceTeam\\Commerce\\Payment\\Provider\\ProviderInterface $provider\n */\n $provider = GeneralUtility::makeInstance($providerConfiguration['class'], $this);\n if (!($provider instanceof \\CommerceTeam\\Commerce\\Payment\\Provider\\ProviderInterface)) {\n throw new \\Exception(\n 'Provider ' . $providerConfiguration['class'] .\n ' must implement interface \\CommerceTeam\\Commerce\\Payment\\Provider\\ProviderInterface',\n 1307705798\n );\n }\n // Check if provider is allowed and break if so\n if ($provider->isAllowed()) {\n $this->provider = $provider;\n break;\n }\n }\n }\n }", "public function handleProviderCallback($provider)\n {\n $user = Socialite::driver($provider)->user();\n\n $selectProvider = Provider::where('provider_id', $user->getId())->first();\n\n if(!$selectProvider)//new user\n {\n $registeredUser = User::where('email', $user->getEmail())->first();//the user is already registered with the same email\n\n if(!$registeredUser) {//totally new user\n $registeredUser = new User();\n $registeredUser->name = $user->getName();\n $registeredUser->email = $user->getEmail();\n $registeredUser->save();\n }\n\n $newProvider = new Provider();\n $newProvider->provider_id = $user->getId();\n $newProvider->provider_name = $provider;\n $newProvider->user_id = $registeredUser->id;\n $newProvider->save();\n }\n else //registered user\n {\n $registeredUser = User::find($selectProvider->user_id);\n }\n\n auth()->login($registeredUser);\n return Redirect('/');\n\n }", "function is_valid_name( $name, $id = 0, $language_id=0 )\n\t{\t\n\t\t$conds['key'] = $name;\n\t\t$conds['language_id'] = $language_id;\n\n\t\t \tif( $id != \"\") {\n\t\t\t\tif ( strtolower( $this->Language_string->get_one( $id )->key ) == strtolower( $name )) {\n\t\t\t\t// if the name is existing name for that user id,\n\t\t\t\t\treturn true;\n\t\t\t\t} \n\t\t\t} else {\n\t\t\t\tif ( $this->Language_string->exists( ($conds ))) {\n\t\t\t\t// if the name is existed in the system,\n\t\t\t\t\t$this->form_validation->set_message('is_valid_name', get_msg( 'err_dup_name' ));\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t}", "public function handleProviderCallback()\n {\n $user = Socialite::driver('google')->user();\n /* \n 1) Store the user details if not exists else just redirect\n 2) if Auth is using then login using Auth::login($user)\n 3) for passport, store some standard passport for all users\n 4) For multiple socialite option, make param route and replace everywhere option is hard coded\n */\n return $user->name;\n }", "public function forceDelete(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "public function validEmailValidDataProvider() {}", "function name_exists($str){\n\n\t\tif(strlen($str)<3 || strlen($str)>30){\n\t\t\t$this->form_validation->set_message('name_exists','The field {field} must be between 3 and 30 characters in length');\n\t\t\treturn false;\n\t\t}\n\t\t$nameExists = $this->DAO->entitySelection('station',array('nameStation'=>$str),TRUE);\n\t\tif($nameExists['data']){\n\t\t\t$this->form_validation->set_message('name_exists','The field {field} already exists');\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "public static function isValidName($name) {}", "protected function persisteProviderData(Provider $provider)\n {\n $driver = $this->getDriver();\n\n $params = $this->processParams($provider);\n\n if ($driver->rowExistsInDatabase('provider', $provider->getId())) {\n /** actualizar */\n $driver->update('provider', $params['provider'], ['id' => $provider->getId()]);\n } else {\n /** insertar */\n $driver->insert('provider', $params['provider']);\n }\n $this->persistentity()->persistData($params['provider_address'], 'id', 'provider_address', 'id');\n return true;\n }", "public function restore(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "public function verify($name)\n {\n }", "public function check()\n\t{\n\t\tif (trim($this->cn) == '')\n\t\t{\n\t\t\t$this->setError(\\Lang::txt('COM_GROUPS_ERROR_EMPTY_TITLE'));\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function isProviderFriendable($provider = null): bool\n {\n $baseClass = $this->getClassNameString($provider);\n\n return (bool) $this->providers->search(\n fn (MessengerProviderDTO $item) => $this->isBaseOrMorphClass($item, $baseClass)\n && $item->friendable\n );\n }", "private function _checkIdent()\n {\n $auth = Zend_Auth::getInstance();\n $auth->setStorage(new Zend_Auth_Storage_Session('hl_connect'));\n \n if ($auth->hasIdentity())\n $this->_agentSchemeNumber = $auth->getStorage()->read()->agentschemeno;\n \n return $auth->hasIdentity();\n }", "public function providerIsLoaded(string $provider)\n {\n return isset($this->loadedProviders[$provider]);\n }", "function verify_person () {\n $bh=new gs_base_handler($this->data,$this->params);\n $f=$bh->validate();\n if (!is_object($f) || !is_a($f,'g_forms')) return $f;\n $d=$f->clean();\n\n $rec=person($this->params['role']);\n if (!$rec) {\n $f->trigger_error('FORM_ERROR','REC_NOTFOUND');\n return $bh->showform($f);\n }\n\n $fname=$this->params['field_name'].'_secret';\n $ga=new GoogleAuthenticator;\n $code=$ga->getCode($rec->$fname);\n\n\n if ($code!=$d['ga_code']) {\n $f->trigger_error('FORM_ERROR','GA_INCORRECT_CODE');\n return $bh->showform($f);\n }\n\n $person=person();\n $fname=$this->params['field_name'].'_verified';\n $person->$fname=TRUE;\n return true;\n }", "public function isValidSource($source) {\nif ($source['name']=='livewhale') {\n\treturn true;\n};\nif (!empty($source['host']) && !empty($source['username']) && !empty($source['password']) && !empty($source['database'])) {\n\treturn true;\n}\nelse {\n\t$this->error='Source must specify a minimum of: host, username, password, database';\n\treturn false;\n};\n}", "function validateName($name)\n {\n return (mb_strlen($name) <= CUSTOMER_NAME_MAX_LENGTH && mb_strlen($name) !== 0);\n }", "public function isProviderSearchable($provider = null): bool;", "public function isEuRegistered();", "public function facebook_id_check($str) {\n // return FALSE;\n return TRUE;\n }", "public function handleProviderCallback($provider)\n {\n try {\n\n $user = Socialite::driver($provider)->user();\n\n $find_user = User::where('provider_id', $user->id)\n ->where('provider',$provider)\n ->first();\n\n if($find_user){\n\n Auth::login($find_user);\n\n // return redirect('/home');\n return redirect()->back();\n\n }\n else{\n\n// dd($user);\n $newUser = User::create([\n 'name' => $user->name,\n 'email' => $user->email,\n 'provider_id'=> $user->id,\n 'provider'=> $provider,\n 'email_verified_at' => Carbon::now(),\n ]);\n\n Auth::login($newUser);\n return redirect()->back();\n }\n\n } catch (Exception $e) {\n return redirect('login/$provider');\n }\n\n }" ]
[ "0.63221335", "0.62779325", "0.6265286", "0.6205485", "0.61896044", "0.61896044", "0.61896044", "0.60886633", "0.60876095", "0.60855556", "0.60406965", "0.60148853", "0.60049236", "0.5953346", "0.5939193", "0.59316665", "0.5893126", "0.585801", "0.5856962", "0.583204", "0.5819401", "0.5818838", "0.5768652", "0.5750044", "0.57389003", "0.5684394", "0.5662631", "0.56567615", "0.5650341", "0.5645111", "0.5644379", "0.56427914", "0.56315625", "0.5625932", "0.5619409", "0.5615209", "0.5598463", "0.558641", "0.55779564", "0.55679923", "0.55544597", "0.55520767", "0.55328584", "0.5531961", "0.55222213", "0.54940087", "0.54740477", "0.54691696", "0.5452492", "0.54434645", "0.5441552", "0.5441552", "0.5441552", "0.5417048", "0.54144007", "0.5380375", "0.5373577", "0.5371581", "0.53560466", "0.5345289", "0.53419363", "0.53394896", "0.53390867", "0.5338674", "0.53344554", "0.53344", "0.53322893", "0.532143", "0.5320616", "0.5304974", "0.53027785", "0.52984774", "0.52825564", "0.528008", "0.5278478", "0.5273699", "0.52726233", "0.5259578", "0.5251313", "0.5251284", "0.52367806", "0.5232039", "0.5231223", "0.52265036", "0.5222737", "0.5215805", "0.5210663", "0.5204264", "0.5195719", "0.5191961", "0.51822644", "0.51803815", "0.51766396", "0.51746106", "0.51686716", "0.51641", "0.5160917", "0.51597714", "0.5142334", "0.512727" ]
0.7011916
0
Get user sex or null if it is not set
Получить пол пользователя или null, если он не установлен
public function getUserSex() { return $this->getUserAttribute(static::ATTRIBUTE_SEX); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSex()\n {\n $result = null;\n if (isset($this->userInfo['sex'])) {\n $result = $this->userInfo['sex'] == 1;\n }\n return $result;\n }", "public function getsex()\n {\n return $this->sex;\n }", "function getGender($userid) {\n return NULL;\n }", "public function getSex()\n {\n return $this->sex;\n }", "public function getSex()\n {\n return $this->sex;\n }", "public function getSex()\n {\n return $this->sex;\n }", "public function getSex()\n {\n return $this->sex;\n }", "public function getSex()\n {\n return $this->sex;\n }", "public function getSex() {\n return (new Query())->select('sex')->from('user_cv')\n ->where(['user_id' => $this->id, 'is_default' => true])\n ->limit(1)->scalar();\n }", "public function getCsex()\n {\n return $this->csex;\n }", "public function getSex()\n {\n return self::SEX[$this->sex];\n }", "public function hasSex(){\n return $this->_has(2);\n }", "public function hasSex(){\n return $this->_has(2);\n }", "public function hasSex(){\n return $this->_has(3);\n }", "public function setSex($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->sex !== $v) {\n $this->sex = $v;\n $this->modifiedColumns[UserTableMap::COL_SEX] = true;\n }\n\n return $this;\n }", "public function hasSex(){\r\n return $this->_has(6);\r\n }", "public function getCustomerGender();", "public function getCustomerGender()\n {\n $user = Shopware()->Modules()->Admin()->sGetUserData();\n\n if (version_compare(Shopware()->Config()->get( 'Version' ), '5.2.0', '<')) {\n $customerGender = $user[\"billingaddress\"][\"salutation\"];\n } elseif (version_compare(Shopware()->Config()->get( 'Version' ), '5.2.0', '>=')) {\n $customerGender = $user[\"additional\"][\"user\"][\"salutation\"];\n }\n\n return $customerGender;\n }", "function getGender() {\n return $this->gender;\n }", "public function getGender()\n {\n return $this->getParameter('gender');\n }", "function vSex ( $sex ) \r\n\t\t{\r\n\t\t\t# Strip string down to first character\r\n\t\t\t$sex = strtolower( substr( $sex, 0, 1) );\r\n\t\t\t\r\n\t\t\t# Checks if result is 'f' or 'm'\r\n\t\t\tif ( $sex != \"f\" OR $sex != \"m\" )\r\n\t\t\t\t$sex = true;\r\n\t\t\t\t\r\n\t\t\telse \r\n\t\t\t\t$sex = false;\r\n\t\t\t\r\n\t\t\treturn $sex;\r\n\t\t\t\r\n\t\t}", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender(){\n $name = '';\n if ($this->gender =='N') {\n $name = 'Preferred not to tell';\n }elseif ($this->gender =='M') {\n $name = 'Male';\n }else{\n $name = 'Female';\n }\n return $name;\n }", "public function getGender(){ // fungsi get untuk mengambil nilai dari gender\n printNumC();//\n return $this->gender;\n }", "function female() \n { \n $this->sex_id=\"F\";\n $this->sex_name=\"Female\";\n return($this->sex_id);\n }", "public static function getTextGender($oUser)\n {\n $gender = null;\n switch ($oUser->gender) {\n case 'M':\n $gender = 'Homme';\n break;\n case 'F':\n $gender = 'Femme';\n break;\n }\n return $gender;\n }", "function isGenderUnknown() {\n\tglobal $USER;\n\tif(!isset($USER['gender'])) return true; //If we don't know guess they aren't\n if($USER['gender']==\"u\") {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function getGender() {\n return $this->gender;\n }", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender()\n {\n return $this->gender;\n }", "public function getGender()\n\t{\n\t\treturn $this->gender;\n\t}", "function sSex ( $sex ) \r\n\t\t{\r\n\t\t\treturn strtolower(substr($sex, 0, 1));\r\n\t\t\t\r\n\t\t}", "public function setSex($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->sex !== $v) {\n $this->sex = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_SEX] = true;\n }\n\n return $this;\n }", "public function getGender() {\n\t\treturn $this->gender;\n\t}", "public function callGender() {\n\n\t\t$app_id = Yii::$app->params['app_id'];\n\t\t$app_secret = Yii::$app->params['app_secret'];\n\n\t\tFacebookSession::setDefaultApplication($app_id, $app_secret);\n\n\t\t$session = new FacebookSession($_SESSION['facebook_token']);\n\n\t\tif ($session) {\n\t\t\t$user_profile = (new FacebookRequest(\n\t\t\t\t\t$session, 'GET', '/' . $this->get('uid')\n\t\t\t\t\t))->execute()->getGraphObject(GraphUser::className());\n\n\t\t\tif (!empty($user_profile)) {\n\t\t\t\t$user_profile = $user_profile->asArray();\n\t\t\t\t//print_r($user_profile);\n\t\t\t}\n\t\t}\n\t}", "public function getGender() {\n\t\treturn $this->_gender;\n\t}", "public function getShowGender()\n\t{\n\t\treturn $this->show_gender;\n\t}", "function getFieldGender(){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_sex');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_sex');\n\t\t$tooltip = setToolTipNotification(\"gender\");\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.(get_axl_req_fields('gender') === 'gender' ? '<span class=\"red\">*</span>' : '').$tooltip.\"</label><br><input class='gender' type='radio' name='sex' value='M' data-value='Male' checked>&nbsp;&nbsp;Male</br><input class='gender' type='radio' name='sex' data-value='Female' value='F'>&nbsp;&nbsp;Female<br>\";\n\t\t}\n\t\treturn $form_ret;\n\t}", "function getGender($user, $name, $description) {\r\n\t$api = 'http://textalytics.com/core/userdemographics-1.0';\r\n\t$key = '0e70ff2a84eab3fda9019ab2202cd91e';\r\n\t\r\n\t// We make the request and parse the response to an array\r\n\t$response = sendPost($api, $key, $user, $name, $description);\r\n\t$json = json_decode($response, true);\r\n\r\n\t$gd = '';\r\n\tif(isset($json['gender'])) {\r\n\t if($json['gender'] == 'M')\r\n\t\t$gd = 'MALE';\r\n\t else if($json['gender'] == 'F')\r\n\t\t$gd = 'FEMALE';\r\n\t}\r\n\t\r\n\treturn $gd;\r\n\r\n}", "private function getGender(){\n $gender_array= array(\"male\",\"female\");\n return $gender_array[rand(0,1)];\n }", "function info($sexId) \n { \n $oaux=new sex();\n if($sexId==$oaux->male())\n \t$this->male();\n if($sexId==$oaux->female())\n $this->female();\n return($this->sex_id);\n }", "public function getGender(): Gender\n {\n return $this->gender;\n }", "protected function getGenderHello($locale = null)\n {\n $greetings = $this->util->getTranslated()->getGenderHello($locale);\n\n if (isset($greetings[$this->_getVar('user_gender')])) {\n return $greetings[$this->_getVar('user_gender')];\n }\n }", "public function hasGender() {\n return $this->_has(1);\n }", "public function setSex($var)\n {\n GPBUtil::checkEnum($var, \\Greeter\\Sex::class);\n $this->sex = $var;\n\n return $this;\n }", "public function setSexo($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->sexo !== $v) {\n\t\t\t$this->sexo = $v;\n\t\t\t$this->modifiedColumns[] = UsuarioPeer::SEXO;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function getWholeGender()\n\t{\n\t\tif($this->gender == \"m\"){\n\t\t\treturn \"muž\";\n\t\t}elseif($this->gender == \"f\"){\n\t\t\treturn \"žena\";\n\t\t}\n\t\treturn;\n\t}", "public function getGenderAttribute($val) {\n return $val == 1 ? \"male\" : \"female\";\n }", "public function sex()\n {\n return $this->belongsTo(\\App\\Models\\Sex::class, 'sex_uuid');\n }", "public function getUserGender($user, $driver)\n {\n if ($driver === 'Facebook') {\n $gender = $user->getInfo()[\"gender\"] ?? null;\n return $gender;\n }\n\n return null;\n }", "function sex($sex)\n{\n\tglobal $con;\n\t\n\t$query_ConsultaFuncion = sprintf(\"SELECT sex FROM students WHERE id_student = %s \",\n\t\t GetSQLValueString($sex, \"int\"));\n\t//echo $query_ConsultaFuncion;\n\t$ConsultaFuncion = mysqli_query($con, $query_ConsultaFuncion) or die(mysqli_error($con));\n\t$row_ConsultaFuncion = mysqli_fetch_assoc($ConsultaFuncion);\n\t$totalRows_ConsultaFuncion = mysqli_num_rows($ConsultaFuncion);\n\t\n\treturn $row_ConsultaFuncion[\"sex\"];\t\n\t\n\tmysqli_free_result($ConsultaFuncion);\n}", "static function cat_gender()\n {\n global $post;\n\n // Nonce field to validate form request came from current site\n wp_nonce_field(basename(__FILE__), 'cat_fields');\n\n // Get the gender data if it's already been entered\n $gender = get_post_meta($post->ID, 'gender', true);\n\n // Output the field\n echo sprintf('<input type=\"radio\" id=\"male\" name=\"gender\" %s value=\"male\">\n <label for=\"male\">Male</label><br>\n <input type=\"radio\" id=\"female\" name=\"gender\" %s value=\"female\">\n <label for=\"female\">Female</label><br><br>', $gender == 'male' ? 'checked' : '', $gender == 'female' ? 'checked' : '');\n }", "public function getNombreSexoPeople( ){\n\t\treturn $this->nombreSexoPeople;\n\t}", "function userType() {\n if (isset($_SESSION['user']) && $_SESSION['user']['user_type'] == 'doctor' ) {\n\t\treturn 2;\n\t}else if(isset($_SESSION['user']) && $_SESSION['user']['user_type'] == 'patient' ) {\n return 3;\n }else if(isset($_SESSION['user']) && $_SESSION['user']['user_type'] == 'guardian' ) {\n return 4;\n }\n}", "function isGirl() {\n\tglobal $USER;\n\tif(!isset($USER['gender'])) return false; //If we don't know guess they aren't\n if($USER['gender']==\"f\") {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function smarty_function_PUBLICA_printSex($params, &$smarty) {\n\t// Verifica a validade do parametro\n\tswitch(intval($params['var'])) {\n\t\tcase 0:\n\t\tdefault:\n\t return $smarty->_tpl_vars['T_feminino'];\n break;\n \n\t\tcase 1:\n\t return $smarty->_tpl_vars['T_masculino'];\n break;\n\t}\n}", "public function getGenderName(): string\n {\n return match ($this->gender) {\n 1 => 'Laki-laki',\n 2 => 'Perempuan'\n };\n }", "function getGender($user, $gender) {\n\t$result = dbQuery(\"SELECT * FROM users WHERE username = '$user'\");\n\t$row = mysql_fetch_array($result);\n\n\t if( $row['gender'] == $gender ) \n\t {\n\t\t return true;\n\t\t } \n\t\t else\n\t\t {\n\t\t \t return false;\n\t\t }\n}", "public function get_user_type() {\n return $this->session->userdata('user_type');\n}", "public function check_gender($gen){\n\t\tif($gen == '1'){\n\t\t\t$txt = 'Male';\n\t\t}else if($gen == '2'){\n\t\t\t$txt = 'Female';\n\t\t}\n\t\treturn $txt;\n }", "function __cek_gender() {\r\n $user_id = func_arg(0);\r\n $gender = \"male\";\r\n $lilo_mongo = new LiloMongo();\r\n $lilo_mongo->selectDB('Users');\r\n $lilo_mongo->selectCollection('Avatar');\r\n $data = $lilo_mongo->findOne(array('user_id' => $user_id));\r\n if ($data) {\r\n $conf_ = json_decode(str_replace(\"'\", '\"', $data['configuration']));\r\n if (is_array($conf_)) {\r\n foreach ($conf_ as $dt) {\r\n if ($dt->tipe == 'gender') {\r\n return str_replace(\"_base\", \"\", $dt->element);\r\n }\r\n }\r\n }\r\n } else {\r\n $lilo_mongo->selectCollection('Avatar');\r\n $data2 = $lilo_mongo->findOne(array('lilo_id' => $user_id));\r\n if (!isset($data2['sex'])) {\r\n $gender = \"male\";\r\n } else {\r\n $gender = $data2['sex'];\r\n }\r\n }\r\n return $gender;\r\n}", "protected function createGender($value) {\r\n switch ($value) {\r\n case \"m\":\r\n return Person::TYPE_GENDER_MALE;\r\n break;\r\n case \"f\":\r\n return Person::TYPE_GENDER_FEMALE;\r\n break;\r\n case \"c\":\r\n return Person::TYPE_GENDER_UNDEFINED;\r\n break;\r\n default:\r\n return null;\r\n break;\r\n }\r\n }", "public function getProfession() {\n $profession = UserDataExtra::findOne(['user_id' => $this->id]);\n return ($profession) ? $profession->profession : '';\n }", "public function getIdGender();", "public static function getUserNoProfile()\n {\n $user = static::get();\n if (isset($user->noPerfil)) {\n return $user->noPerfil;\n }\n }", "public static function getUserLevel(){\n if (self::isSuper()){\n return \"super\";\n }\n if (self::isAdmin()){\n return \"admin\";\n }\n if (self::isUser()){\n return \"user\";\n }\n return null;\n }", "public function getGenderTextAttribute()\n {\n return static::genderTextMap[$this->gender];\n }", "function isBoy() {\n\tglobal $USER;\n\tif(!isset($USER['gender'])) return true; //If we don't know guess they are\n if($USER['gender']==\"m\") {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function setCsex($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->csex !== $v) {\n $this->csex = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_CSEX] = true;\n }\n\n return $this;\n }", "public function getGender()\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 $nr = (int)($J . $K . $L);\n\n return ($nr < 500) ? self::GENDER_MALE : self::GENDER_FEMALE;\n }", "public function getGenderAttribute($value)\n {\n return $value === 'L' ? 'Laki-laki' : 'Perempuan';\n }", "public function getGenderFieldDefault ()\n {\n $genderDefault = $this->scopeConfig->getValue(\n 'customer/address/gender_show',\n ScopeInterface::SCOPE_STORE\n );\n return $genderDefault;\n }", "protected function getGender() {\n\t\treturn array(\n\t\t\t'1' => TranslateUtility::assureLabel('application.gender.w', 'Profession'),\n\t\t\t'2' => TranslateUtility::assureLabel('application.gender.m', 'Profession')\n\t\t);\n\t}", "public function getGenderString()\n\t{\n\t\tswitch ($this->getGender()) {\n\t\t\tcase self::G_MALE:\n\t\t\t\treturn 'Male';\n\t\t\tcase self::G_FEMALE:\n\t\t\t\treturn 'Female';\n\t\t\tcase self::G_OTHER:\n\t\t\t\treturn 'Other';\n\t\t\tdefault:\n\t\t\t\treturn 'Other';\n\t\t}\n\t}", "function user_level () {\r\n\t$info = user_info();\r\n\treturn (isset($info[3]) ? $info[3] : 0);\r\n}", "public function getEstadoSexoPeople( ){\n\t\treturn $this->estadoSexoPeople;\n\t}", "static function getFemale(){\n global $link;\n $result = mysqli_query($link, \"SELECT COUNT(*) AS number_of_loans, SUM(loan_info.balance) AS total_loans\n FROM loan_info, borrowers\n WHERE loan_info.borrower=borrowers.id\n AND borrowers.gender='Female'\n AND loan_info.`status` = ''\") or die(mysqli_error($link));\n if(mysqli_num_rows($result))\n return mysqli_fetch_assoc($result);\n else\n return null;\n }", "function get_user()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER);\r\n }", "function get_user()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER);\r\n }", "public function getGenderCode()\n {\n return $this->genderCode;\n }", "public function getUser(): ?string\n {\n \\Logger::getLogger(\\get_class($this))\n ->info(\\sprintf(\n __METHOD__ . \" get '%s'\",\n $this->user === null\n ? \"null\"\n : $this->user\n ));\n return $this->user;\n }", "public function getApiProfession()\n {\n return Gender::functionGenderFormatter($this->getProfession(), $this->getGender());\n }", "public function getNom_user()\r\n {\r\n return $this->nom_user;\r\n }", "public function getUserInfo()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $id = $CI->session->userdata('user_id');\n return $CI->user_model->get($id);\n }\n }", "private function setGenderValue()\n {\n $value = $this->getData(self::$genderAttributeCode);\n \n if (!$value) {\n $this->setCustomAttribute(self::$genderAttributeCode, 'N/A');\n return;\n }\n\n try {\n $attributeMetadata = $this->customerMetadata->getAttributeMetadata(self::$genderAttributeCode);\n $option = $attributeMetadata->getOptions()[$value];\n $this->setCustomAttribute(self::$genderAttributeCode, $option->getLabel());\n } catch (NoSuchEntityException $e) {\n $this->setCustomAttribute(self::$genderAttributeCode, 'N/A');\n }\n }", "public function getGender()\n {\n return $this->hasOne(Gender::class, ['id' => 'gender_id']);\n }", "function set_gender($gender='*')\r\n{\r\n\t$this->gender = 0;\t\t// return\r\n\r\n\t// normalize gender\r\n\tif ( is_string($gender) )\r\n\t{\r\n\t\t$gender = substr($gender,0,1);\r\n\t\t$gender = strtoupper($gender);\r\n\t}\r\n\r\n\t// validity check\r\n\tif ( $gender != '*' && !in_array($gender, $this->VALID['GENDER']) )\r\n\t{\r\n\t\ttrigger_error('invalid value -- gender will be picked at random', E_USER_NOTICE);\r\n\t\t$gender = '*';\r\n\t}\r\n\t\r\n\t// random gender\r\n\tif ( $gender == '*' )\r\n\t{\r\n\t\t$this->gender = mt_rand(1,2);\r\n\t\t$this->_normalize_gender($this->gender);\r\n\t}\r\n\telseif ( is_numeric($gender) )\r\n\t{\r\n\t\t$this->gender = $gender;\r\n\t\t$this->_normalize_gender($this->gender);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->gender_name = $gender;\r\n\t\t$this->_normalize_gender($this->gender_name);\r\n\t}\r\n\r\n\treturn $this->gender;\r\n}", "function get_user_name(){\n return isset($_SESSION['username']) ? $_SESSION['username'] : null;\n}", "function nb_get_student_meta(){\n\tglobal $current_user;\n\n\tif( $current_user->ID != null){\n\t\t$sid = $current_user->ID;\n\t\t$student = get_userdata($sid); \n\n\t}\n\t\n\treturn $student;\n\n}", "public function get_profil()\n {\n return $this->_profil;\n }", "function validate($userType=''){\n if(isset($_SESSION['user'])){\n return $_SESSION['user'];\n }else{\n return false;\n }\n }", "public function getDescripcionSexoPeople( ){\n\t\treturn $this->descripcionSexoPeople;\n\t}", "public static function isUser(){\n if(isset($_SESSION['role'])) {\n $status = Validation::Nettoyer_string($_SESSION['role']);\n if($status==\"user\"){\n return \"user\";\n } else {\n return \"visiteur\";\n }\n }else{\n return \"visiteur\";\n }\n }", "public function getUserType();", "public function getUserType();", "public function useGender($flag = false) {\n $this->use_gender = ($flag !== false);\n }", "function _is_staff()\n {\n $user = $this->visitor->get();\n\t\t//echo $user['ugrade'];\n\t\t//1.普通會員 2.VIP 3.Staff\n\t\tif($user['ugrade'] == 3){\n\t\t\treturn $user['ugrade'];\n\t\t}\n\t}" ]
[ "0.7810267", "0.75179243", "0.72500116", "0.71574724", "0.71574724", "0.71574724", "0.71574724", "0.71574724", "0.6864054", "0.6777187", "0.6545667", "0.6400071", "0.6400071", "0.6380897", "0.63448596", "0.62781256", "0.62503695", "0.61736095", "0.6143012", "0.61328506", "0.6120611", "0.6076327", "0.6076327", "0.6076327", "0.6076327", "0.6062665", "0.6040551", "0.60386467", "0.60138345", "0.6004832", "0.5986836", "0.5961976", "0.5961976", "0.5949797", "0.5920155", "0.5904239", "0.58913064", "0.5887376", "0.5776044", "0.5774659", "0.5774216", "0.5749218", "0.5744949", "0.57281667", "0.5728006", "0.56881183", "0.56674707", "0.56469494", "0.56291443", "0.5627248", "0.55988497", "0.5598649", "0.5591208", "0.55813086", "0.55683875", "0.5559878", "0.5548266", "0.55316895", "0.55144894", "0.5507907", "0.550331", "0.5500881", "0.54908514", "0.547172", "0.5461291", "0.545801", "0.5457379", "0.5452555", "0.5451712", "0.54167205", "0.54165214", "0.5414306", "0.537074", "0.53691036", "0.5351686", "0.5346472", "0.53304285", "0.5320327", "0.5313793", "0.53135335", "0.5301171", "0.5301171", "0.52850753", "0.52845037", "0.52504003", "0.52440953", "0.5231191", "0.5225518", "0.5216029", "0.5213472", "0.5213358", "0.52092844", "0.52081925", "0.5190799", "0.51825714", "0.51816684", "0.51787287", "0.51787287", "0.51780194", "0.51658416" ]
0.76433337
1
Get user birthday in format dd.mm.YYYY or null if it is not set
Получить дату рождения пользователя в формате dd.mm.YYYY или null, если она не установлена
public function getUserBirthday() { $result = $this->getUserAttribute(static::ATTRIBUTE_BIRTHDAY); if (!empty($result)) { return date('d.m.Y', strtotime($result)); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBirthdayDate():?string\n {\n return $this->birthday_date ? (new \\DateTime($this->birthday_date))->format('d/m/Y') : null;\n }", "public function getBirthDay() {\n \tif($this->birthDay == null)\n\t\t\treturn \"\";\n\t\telse\n \treturn $this->birthDay;\n }", "function getDayOfBirth() {\n global $USER;\n\t$dayOfBirth = date(\"d\", $USER['dob']);\n\treturn $dayOfBirth;\n}", "protected function getDateOfBirthAttribute()\n {\n if (isset($this->attributes['date_of_birth'])) {\n $value = $this->attributes['date_of_birth'] ?? null;\n } else {\n $value = null;\n }\n\n if ($value !== null) {\n return date('d.m.Y', strtotime($value));\n } else {\n return null;\n }\n }", "public function getBirthDate()\n {\n if ($this->birthDate) {\n return $this->birthDate;\n }\n\n $centuryCode = substr($this->personal_code, 0, 1);\n if ($centuryCode < 3) {\n $century = 19;\n } elseif ($centuryCode < 5) {\n $century = 20;\n } else {\n $century = 21;\n }\n\n $this->birthDate = new \\DateTime(($century - 1) . substr($this->personal_code, 1, 6));\n\n return $this->birthDate;\n }", "public function getBirthday() : string\r\n\t{\r\n\t\treturn $this->birthday;\r\n\t}", "public function getBirthday($format = 'Y-m-d')\n {\n $value = $this->getParameter('birthday');\n\n return $value ? $value->format($format) : null;\n }", "public function getDateOfBirth() {\n\t\treturn empty( $this->container['dates_of_birth'] ) ? null : $this->container['dates_of_birth'][0];\n\t}", "public function getBirthDate()\n {\n return $this->getProfile() ? $this->getProfile()->getBirthDate() : null;\n }", "public function getUserDateOfBirth () {\n\t\treturn ($this->userDateOfBirth);\n\t}", "public function getBirthDate()\n\t{\n\t\treturn $this->getIfSetDate('birthDate');\n\t}", "public function getBirthday()\n {\n return $this->birthday;\n }", "public function getBirthday()\n {\n return $this->birthday;\n }", "public function getBirthday()\n {\n return $this->birthday;\n }", "public function getBirthday()\n {\n return $this->birthday;\n }", "public function getBirthday()\n {\n return $this->birthday;\n }", "public function getBirthday($format = 'Y-m-d H:i:s')\n\t{\n\t\tif ($this->birthday === null) {\n\t\t\treturn null;\n\t\t}\n\n\n\t\tif ($this->birthday === '0000-00-00 00:00:00') {\n\t\t\t// while technically this is not a default value of NULL,\n\t\t\t// this seems to be closest in meaning.\n\t\t\treturn null;\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t$dt = new DateTime($this->birthday);\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException(\"Internally stored date/time/timestamp value could not be converted to DateTime: \" . var_export($this->birthday, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ($format === null) {\n\t\t\t// Because propel.useDateTimeClass is TRUE, we return a DateTime object.\n\t\t\treturn $dt;\n\t\t} elseif (strpos($format, '%') !== false) {\n\t\t\treturn strftime($format, $dt->format('U'));\n\t\t} else {\n\t\t\treturn $dt->format($format);\n\t\t}\n\t}", "public function getDateofBirth() {\n return $this->dateOfBirth;\n }", "public function getBirthdate()\n\t{\n\t\treturn $this->birthdate;\n\t}", "public function getBirthdate($format = 'Y-m-d')\n\t{\n\t\tif ($this->birthdate === null) {\n\t\t\treturn null;\n\t\t}\n\n\n\t\tif ($this->birthdate === '0000-00-00') {\n\t\t\t// while technically this is not a default value of NULL,\n\t\t\t// this seems to be closest in meaning.\n\t\t\treturn null;\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t$dt = new DateTime($this->birthdate);\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException(\"Internally stored date/time/timestamp value could not be converted to DateTime: \" . var_export($this->birthdate, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ($format === null) {\n\t\t\t// Because propel.useDateTimeClass is TRUE, we return a DateTime object.\n\t\t\treturn $dt;\n\t\t} elseif (strpos($format, '%') !== false) {\n\t\t\treturn strftime($format, $dt->format('U'));\n\t\t} else {\n\t\t\treturn $dt->format($format);\n\t\t}\n\t}", "public function getBirthDate()\n {\n return $this->birth_date;\n }", "public function getBirthdate()\n {\n return $this->birthdate;\n }", "public function getBirthdate()\r\n {\r\n return $this->birthdate;\r\n }", "public function getDateOfBirth()\n {\n return $this->dateOfBirth;\n }", "public function getDateOfBirth()\n {\n return $this->dateOfBirth;\n }", "public function getBirthDate() : Datetime\n {\n if (is_null($this->birthDate)) {\n $year = $this->getBirthCentury() + substr($this->code, 1, 2);\n $month = substr($this->code, 3, 2);\n $day = substr($this->code, 5, 2);\n\n $this->birthDate = new Datetime($year.'-'.$month.'-'.$day);\n }\n\n return $this->birthDate;\n }", "public function getBirthdayDate()\n {\n return $this->birthdayDate;\n }", "public function getBirthdate()\n {\n return $this->birthdate;\n }", "public function getBirthday($format = 'd.m.Y.')\n {\n return date($format, $this->getBirthdayTimeStamp());\n }", "public function getBirthDate()\n {\n return $this->birthDate;\n }", "public function getBirthDate()\n\t{\n\t\treturn $this->birthDate;\n\t}", "function getYearOfBirth() {\n global $USER;\n\t$yearOfBirth = date(\"Y\", $USER['dob']);\n\treturn $yearOfBirth;\n}", "public function getBirthDate()\n {\n return $this->birthDate;\n }", "public function getBirthdate(): \\DateTimeInterface|null;", "protected function _getDob()\n {\n $dob = '';\n \n // First check if form birthday is set else get the birthday of the customer, otherwise error\n if ( isset( $this->_additionalFields['dob'] ) || isset( $this->_additionalFields['dob_year'] ) )\n {\n // Logics if javascript worked\n if ( array_key_exists( 'dob', $this->_additionalFields ) )\n {\n $dobTimestamp = strtotime( $this->_additionalFields['dob'], time() );\n $dob = date( 'Y-m-d\\TH:i:s', $dobTimestamp );\n }\n // Logics if javascript for date has not worked\n elseif ( \n array_key_exists( 'dob_year', $this->_additionalFields )\n && array_key_exists( 'dob_month', $this->_additionalFields )\n && array_key_exists( 'dob_day', $this->_additionalFields )\n )\n {\n $dobdate = $this->_additionalFields['dob_year'] . '-' . $this->_additionalFields['dob_month'] . '-' . \n $this->_additionalFields['dob_day'];\n $dobTimestamp = strtotime($dobdate, time());\n $dob = date('Y-m-d\\TH:i:s', $dobTimestamp);\n }\n }\n // No birthday sent through form fields, look if a birthday was sent using Magento default fields\n elseif( $this->_order->getCustomerDob() )\n {\n $dobdate = $this->_order->getCustomerDob();\n $dobTimestamp = strtotime( $dobdate, time() );\n $dob = date('Y-m-d\\TH:i:s', $dobTimestamp);\n }\n // If the variable $dob is not filled, then there was a problem with getting the correct date of birth\n // Because sending an empty value will cause SOAP error, do Mage Exception instead\n if ($dob == '')\n {\n // Cancel the order to prevent pending orders\n $this->_order->cancel()->save();\n // Restore the quote to keep cart information\n $this->restoreQuote();\n // Sent back error\n Mage::throwException($this->_helper->__('The date of birth is missing invalid. Please check your date or birth or contact our customer service.'));\n }\n \n return $dob;\n }", "protected function formatDob($dob)\n {\n return $dob ? $dob->format('d/m/Y') : null;\n }", "private function calculateBirthDateAndGender()\n {\n $year = $this->subject->getBirthDate()->format('y');\n $month = $this->months[$this->subject->getBirthDate()->format('n')];\n $day = $this->subject->getBirthDate()->format('d');\n if (strtoupper($this->subject->getGender()) == self::CHR_WOMEN) {\n $day += 40;\n }\n\n return $year . $month . $day;\n }", "public function getDefaultBirthdate(): \\DateTimeInterface|null;", "public static function convertBirthday($string) {\n $string = trim($string);\n\n // Birthday: Jan 23, 2017\n $date = DateTime::createFromFormat('!M j, Y', $string);\n if($date) {\n return $date->format('Y-m-d');\n }\n\n // Birthday: Feb, 2001\n $date = DateTime::createFromFormat('!M, Y', $string);\n if($date) {\n return $date->format('Y-m');\n }\n\n // Birthday: 6, 2006\n $date = DateTime::createFromFormat('!j, Y', $string);\n if($date) {\n return $date->format('Y-d');\n }\n\n // Birthday: Jan 5\n $date = DateTime::createFromFormat('!M j', $string);\n if($date) {\n return $date->format('m-d');\n }\n\n // Birthday: 2001\n $date = DateTime::createFromFormat('!Y', $string);\n if($date) {\n return $date->format('Y');\n }\n\n return false;\n \n }", "public function getInternationalBirthDate()\n {\n return $this->internationalBirthDate;\n }", "public function get_user_birthday($em){\r\n $this->db->select('birthday');\r\n $this->db->where('email', $em);\r\n $query = $this->db->get('users');\r\n foreach ($query->result() as $row)\r\n {\r\n return $row->birthday;\r\n }\r\n }", "public function getBirthdate(): DateTime\n {\n return $this->birthdate;\n }", "public function get_birth_date()\n\t{\n\t\t$date = DateTime::createFromFormat(LocalizedDate::STORED_DATE_FORMAT, $this->get_attribute('birth_date'));\n\t\treturn new LocalizedDate($date, null, IntlDateFormatter::SHORT, IntlDateFormatter::NONE);\n\t}", "public function setBirthday($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->birthday !== $v) {\n $this->birthday = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_BIRTHDAY] = true;\n }\n\n return $this;\n }", "public function getBirth()\n {\n return $this->birth;\n }", "function age_to_birthdate($age)\n{\n $age_int = intval(trim((string)$age));\n $now = new \\DateTime();\n $bday = $now->sub(new \\DateInterval(\"P\" . $age_int . \"Y6M\"));\n return $bday->format(\\DateTime::ATOM);\n}", "public function getDob()\n {\n return $this->dob;\n }", "public function transform($birthday)\n {\n \tif (null === $birthday) {\n \t\treturn '';\n \t}\n \n return $birthday->format('Y-m-d');\n }", "public function getDob()\n {\n return $this->dob;\n }", "public function getDob()\n {\n return $this->dob;\n }", "public function getShowBirthdate()\n\t{\n\t\treturn $this->show_birthdate;\n\t}", "public function getDatesOfBirth() {\n\t\treturn empty( $this->container['dates_of_birth'] ) ? null : $this->container['dates_of_birth'];\n\t}", "public function setDateOfBirth($value)\n {\n $this->_date_of_birth = $value;\n }", "function setDayOfBirth( $sDayOfBirth_ ) {\n\t\t\tif (\n\t\t\t\t! is_string( $sDayOfBirth_ )\n\t\t\t\t|| FALSE == ( $iDayOfBirthUnix = strtotime( $sDayOfBirth_ ) )\n\t\t\t) {\n\t\t\t\tthrow new Exception( 'Address.DayOfBirth.Invalid', 'invalid day of birth: ' . $sDayOfBirth_ );\n\t\t\t}\n\t\t\treturn parent::setDayOfBirth( strftime( '%m/%d/%Y', $iDayOfBirthUnix ) );\n\t\t}", "function born() {\n if (empty($this->birthday)) {\n if ($this->page[\"Name\"] == \"\") $this->openpage (\"Name\",\"person\");\n if (preg_match(\"/Date of Birth:<\\/h5>\\s*<a href=\\\"\\/OnThisDay\\?day\\=(\\d{1,2})&month\\=(.*?)\\\">.*?<a href\\=\\\"\\/BornInYear\\?(\\d{4}).*?href\\=\\\"\\/BornWhere\\?.*?\\\">(.*?)<\\/a>/ms\",$this->page[\"Name\"],$match))\n $this->birthday = array(\"day\"=>$match[1],\"month\"=>$match[2],\"year\"=>$match[3],\"place\"=>$match[4]);\n }\n return $this->birthday;\n }", "public function getDobFieldDefault ()\n {\n $dobDefault = $this->scopeConfig->getValue(\n 'customer/address/dob_show',\n ScopeInterface::SCOPE_STORE\n );\n return $dobDefault;\n }", "protected function getDateOfBirth($dateOfBirth, $customerId)\n {\n if ($dateOfBirth === null && ! empty($customerId)) {\n $customer = $this->_customerRegistry->retrieve($customerId);\n $dateOfBirth = $customer->getDob();\n }\n\n if ($dateOfBirth !== null) {\n $date = new \\DateTime($dateOfBirth);\n return $date->format(\\DateTime::W3C);\n }\n }", "function getMonthOfBirth() {\n global $USER;\n\t$monthOfBirth = date(\"m\", $USER['dob']);\n\t//echo $monthOfBirth;\n\treturn $monthOfBirth;\n}", "function enforce_birthdate(&$user)\n\t\t{\n\t\t\tglobal $phpbb_root_path, $phpEx;\n\n\t\t\tif (!defined('IN_ADMIN') && !defined('ADMIN_START') && !defined('IN_LOGIN') && !empty($user->data['is_registered']))\n\t\t\t{\n\t\t\t\t// Make sure we're not already where we need to be.\n\t\t\t\tif ($user->page['page_name'] != \"ucp.$phpEx\" || strpos($user->page['query_string'], 'mode=profile_info') === false)\n\t\t\t\t{\n\t\t\t\t\t// Don't redirect if the user is in the middle of posting, as we wouldn't want them to lose everything they've typed.\n\t\t\t\t\tif ($user->page['page_name'] != \"posting.$phpEx\" || (strpos($user->page['query_string'], 'mode=post') === false && strpos($user->page['query_string'], 'mode=reply') === false && strpos($user->page['query_string'], 'mode=edit') === false))\n\t\t\t\t\t{\n\t\t\t\t\t\tinclude($phpbb_root_path . 'includes/prime_birthdate.' . $phpEx);\n\t\t\t\t\t\tif ($this->birthdate_required() && $this->birthdate_error($user->data['user_birthday']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tredirect(append_sid(\"{$phpbb_root_path}ucp.$phpEx\", 'i=profile&amp;mode=profile_info&amp;required=birthday'));\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}", "function birthdate_error($date_of_birth) //day-month-year\n\t\t{\n\t\t\tglobal $config;\n\n\t\t\t$bdate = explode(\"-\", $date_of_birth);\n\t\t\t$day\t= isset($bdate[0]) ? (int)$bdate[0] : 0;\n\t\t\t$month\t= isset($bdate[1]) ? (int)$bdate[1] : 0;\n\t\t\t$year\t= isset($bdate[2]) ? (int)$bdate[2] : 0;\n\t\t\tif (!$day || !$month || !$year || $day < 1 || $day > 31 || $month < 1 || $month > 12 || ($year < 1901 && $year > 0) || $year > gmdate('Y', time()))\n\t\t\t{\n\t\t\t\treturn 'INVALID_USER_BIRTHDAY';\n\t\t\t}\n\t\t\tif (checkdate($month, $day, $year) === false)\n\t\t\t{\n\t\t\t\treturn 'INVALID_USER_BIRTHDAY';\n\t\t\t}\n\t\t\tif ($this->get_age($date_of_birth) < $config['minimum_age'])\n\t\t\t{\n\t\t\t\treturn 'PRIME_BIRTHDATE_YOUNG';\n\t\t\t}\n\t\t\tif (!empty($config['maximum_age']) && $this->get_age($date_of_birth) > $config['maximum_age'])\n\t\t\t{\n\t\t\t\treturn 'PRIME_BIRTHDATE_OLD';\n\t\t\t}\n\t\t\treturn(false);\n\t\t}", "public function setBirthday($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->birthday !== 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->birthday !== null && $tmpDt = new DateTime($this->birthday)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : 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->birthday = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = UserPeer::BIRTHDAY;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "public function getBirthdayTimeStamp()\n {\n $this->checkJMBG();\n\n $arr = $this->explode();\n if (count($arr) <> 13) return false;\n foreach ($arr as $k => $v) $$k = $v;\n\n $d = \"$A$B\";\n $m = \"$C$D\";\n $y = \"$E$F$G\";\n if ((int)$y > 900) $y = '1' . $y;\n else $y = '2' . $y;\n\n return mktime(0, 0, 0, (int)$m, (int)$d, (int)$y);\n }", "public function getSubscriberDob()\n {\n $dob = parent::getSubscriberDob();\n return $dob;\n }", "public function setDateOfBirth()\n {\n $dateOfBirth = request('dob_year') . '-' . request('dob_month') . '-' . request('dob_day');\n\n $this->date_of_birth = $dateOfBirth;\n $this->save();\n }", "public function getBirthdayPlace():?string\n {\n return $this->birthday_place;\n }", "public function setBirthdate($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->birthdate !== 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->birthdate !== null && $tmpDt = new DateTime($this->birthdate)) ? $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->birthdate = ($dt ? $dt->format('Y-m-d') : null);\n\t\t\t\t$this->modifiedColumns[] = UserPeer::BIRTHDATE;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "private function getDOB()\n {\n $this->db->select('dob');\n //from the users table\n $query = $this->db->get('users');\n \n return $query;\n }", "public function reverseTransform($birthday)\n {\n if (!$birthday) {\n return null;\n }\n\n try{\n $d = new \\DateTime($birthday);\n \n $d->format('Y-m-d');\n \n return $d;\n }catch(\\Exception $e){\n return $birthday;\n }\n }", "public function getAge()\n\t{\n\t\t$date_birthday = $this->getAnswer('birthday');\n\t\t$date_birthday = convert_date_to_age($date_birthday);\n\t\treturn $date_birthday;\n\n\t}", "function dateOfBirthCheck($day,$month,$year)\r\n{\r\n if($day > 0 && $day < 32 && $month > 0 && $month < 13) {\r\n if (is_numeric($day) && is_numeric($month) && is_numeric($year)) {\r\n if ($year > 1900 && $year < 2001) {\r\n if ($month == 1 || $month == 3 || $month == 5 || $month == 7 || $month == 9 || $month == 11 && $day <= 30) {\r\n return \"$year-$month-$day\";\r\n } else if ($month == 4 || $month == 6 || $month == 8 || $month == 10 || $month == 12 || $month == 1 && $day <= 31) {\r\n return \"$year-$month-$day\";\r\n } else if ($month == 2 && $day <= 28 || $month == 2 && $year % 4 == 0 && $day <=29) {\r\n return \"$year-$month-$day\";\r\n }\r\n } else {\r\n $_Session['hasPassed'] = False;\r\n return popUp(\"You need to be at least 16 to use this service\");\r\n\r\n }\r\n }\r\n else {\r\n $_Session['hasPassed'] = False;\r\n return popUp(\"Please ensure that the date is written in the correct format 01/01/2017\");\r\n}\r\n}else {\r\n $_Session['hasPassed'] = False;\r\n return popUp(\"Please ensure you Date of Birth is correct\");\r\n\r\n}\r\n}", "public function saveBirthDate()\n {\n $this->updateValue(\n 'birth_date',\n $this->birthDate,\n 'Customer birth date updated successfully.'\n );\n\n $this->birthDateUpdate = false;\n $this->birthDateFormatted = $this->customer->birth_date_formatted;\n }", "public function setBirthday($value)\n {\n if ($value) {\n $value = new DateTime($value, new DateTimeZone('UTC'));\n } else {\n $value = null;\n }\n\n return $this->setParameter('birthday', $value);\n }", "public function getCbirthday()\n {\n return $this->cbirthday;\n }", "public function setBirthdayAttribute($value)\n {\n $this->attributes['birthday'] = trim($value) ?: null;\n }", "function get_birthdate_options($date_of_birth)\n\t\t{\n\t\t\tglobal $user;\n\t\t\t$bdate = explode(\"-\", $date_of_birth); //day-month-year\n\t\t\t$day\t= isset($bdate[0]) ? (int)$bdate[0] : 0;\n\t\t\t$month\t= isset($bdate[1]) ? (int)$bdate[1] : 0;\n\t\t\t$year\t= isset($bdate[2]) ? (int)$bdate[2] : 0;\n\n\t\t\t$s_birthday_day_options = '<option value=\"0\"' . ((!$day) ? ' selected=\"selected\"' : '') . '>' . $user->lang['DAY'] . '</option>';\n\t\t\tfor ($i = 1; $i < 32; $i++)\n\t\t\t{\n\t\t\t\t$selected = ($i == $day) ? ' selected=\"selected\"' : '';\n\t\t\t\t$s_birthday_day_options .= \"<option value=\\\"$i\\\"$selected>$i</option>\";\n\t\t\t}\n\n\t\t\t$s_birthday_month_options = '<option value=\"0\"' . ((!$month) ? ' selected=\"selected\"' : '') . '>' . $user->lang['MONTH'] . '</option>';\n\t\t\t$lang_dates = array(1 => $user->lang['datetime']['Jan'], $user->lang['datetime']['Feb'], $user->lang['datetime']['Mar'], $user->lang['datetime']['Apr'], $user->lang['datetime']['May_short'], $user->lang['datetime']['Jun'], $user->lang['datetime']['Jul'], $user->lang['datetime']['Aug'], $user->lang['datetime']['Sep'], $user->lang['datetime']['Oct'], $user->lang['datetime']['Nov'], $user->lang['datetime']['Dec']);\n\t\t\tfor ($i = 1; $i < 13; $i++)\n\t\t\t{\n\t\t\t\t$selected = ($i == $month) ? ' selected=\"selected\"' : '';\n\t\t\t\t$s_birthday_month_options .= \"<option value=\\\"$i\\\"$selected>{$lang_dates[$i]}</option>\";\n\t\t\t}\n\n\t\t\t$now = getdate();\n\t\t\t$s_birthday_year_options = '<option value=\"0\"' . ((!$year) ? ' selected=\"selected\"' : '') . '>' . $user->lang['YEAR'] . '</option>';\n\t\t\tfor ($i = $now['year']; $i > $now['year'] - 100; $i--)\n\t\t\t{\n\t\t\t\t$selected = ($i == $year) ? ' selected=\"selected\"' : '';\n\t\t\t\t$s_birthday_year_options .= \"<option value=\\\"$i\\\"$selected>$i</option>\";\n\t\t\t}\n\t\t\tunset($now);\n\t\t\treturn(array($s_birthday_day_options, $s_birthday_month_options, $s_birthday_year_options));\n\t\t}", "public function animalRegistrationDate() {\n $registration = $this->animalRegistration();\n\n if (!isset($registration)) {\n return null;\n }\n\n return (new DateTime($registration->created_at))->format('d.m.Y');\n }", "public function birthday(bool $age = false)\n {\n // If age is requested calculate it\n if ($age) {\n // Create dates\n $birthday = date_create($this->birthday);\n $now = date_create(date('Y-m-d'));\n\n // Get the difference\n $diff = date_diff($birthday, $now);\n\n // Return the difference in years\n return (int) $diff->format('%Y');\n }\n\n // Otherwise just return the birthday value\n return $this->birthday;\n }", "public function setProfileBirthdateAttribute($value)\n {\n if(is_string($value)){\n $this->attributes['profile_birthdate'] = $this->setDate($value);\n } else {\n $this->attributes['profile_birthdate'] = null;\n }\n }", "public function getBornDate() {\n\t\treturn $this->born_date;\n\t}", "public function setUserDateOfBirth ($newUserDateOfBirth = null) {\n\t\t// base case: if the date is null, ask user to enter date of birth\n\t\tif($newUserDateOfBirth === null) {\n\t\t\tthrow (new \\OutOfBoundsException(\"You must enter your date of birth\"));\n\t\t}\n\n\t\t$newUserDateOfBirth = self::validateDate($newUserDateOfBirth);\n\t\t$drinkDate = new \\DateTime();\n\t\t$drinkDate = $drinkDate->sub(new \\DateInterval('P21Y'));\n\t\tif($drinkDate < $newUserDateOfBirth) {\n\t\t\tthrow (new \\OutOfRangeException(\"You are too young.\"));\n\t\t}\n\t\t// store the userDateOfBirth date\n\t\t$this->userDateOfBirth = $newUserDateOfBirth;\n\n\t}", "public function getPlaceOfBirth() : string;", "function DetermineAgeFromDOB ($YYYYMMDD_In)\n{\n $yIn=substr($YYYYMMDD_In, 0, 4);\n $mIn=substr($YYYYMMDD_In, 4, 2);\n $dIn=substr($YYYYMMDD_In, 6, 2);\n\n $ddiff = date(\"d\") - $dIn;\n $mdiff = date(\"m\") - $mIn;\n $ydiff = date(\"Y\") - $yIn;\n\n // Check If Birthday Month Has Been Reached\n if ($mdiff < 0)\n {\n // Birthday Month Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n } elseif ($mdiff==0)\n {\n // Birthday Month Currently\n // Check If BirthdayDay Passed\n if ($ddiff < 0)\n {\n //Birthday Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n }\n }\n return $ydiff;\n}", "public function getDOBStringAttribute() {\n return Carbon::createFromDate($this->attributes['DOB'])->toFormattedDateString();\n }", "public function age(){\n return $this->dob->age;\n }", "private function getFormmatedDob($date)\r\n {\r\n return $date ? date(\"d/m/Y\", strtotime($date)) : null;\r\n }", "public function validateDateOfBirth($dob_day, $dob_month, $dob_year)\r\n {\r\n //Confirm that all dob inputs are numeric.\r\n if(!is_numeric($dob_day) || !is_numeric($dob_month) || !is_numeric($dob_year)){\r\n $rtn = array(\r\n 'status'=>false,\r\n 'error'=>\"dob-invalid\"\r\n );\r\n \r\n return $rtn;\r\n }\r\n \r\n //Check that the day input is no higher than 31\r\n if($dob_day > \"31\"){\r\n $rtn = array(\r\n 'status'=>false,\r\n 'error'=>\"dob-day-invalid\"\r\n );\r\n \r\n return $rtn;\r\n }\r\n \r\n //Check that the month input is no higher than 12\r\n if($dob_month > \"12\"){\r\n $rtn = array(\r\n 'status'=>false,\r\n 'error'=>\"dob-month-invalid\"\r\n );\r\n \r\n return $rtn;\r\n }\r\n \r\n \r\n //Check that the user is older than 13 (or close enough)\r\n if($dob_year > date('Y') - 13){\r\n $rtn = array(\r\n 'status'=>false,\r\n 'error'=>\"dob_year_invalid\"\r\n );\r\n \r\n return $rtn;\r\n }\r\n \r\n $rtn['status'] = true;\r\n return $rtn;\r\n }", "public function getTodayBirthday()\n\t{\n\t $query = $this->db->query(\"SELECT * FROM users WHERE DATE_FORMAT( `birthday` , '%m-%d' ) = DATE_FORMAT( NOW( ) , '%m-%d' ) \");\n\t\t\t// echo $this->db->last_query();\n\t\t\t// die();\n\t\t\tif ($query->num_rows() > 0)\n\t\t\t{\n\t\t\t\t$data = array();\n\t\t\t\t$i=0;\n\t\t\t\tforeach ($query->result() as $row)\n\t\t\t\t{\n\t\t\t\t\t$data[$i]['id'] = $row->id;\n\t\t\t\t\t$data[$i]['full_name'] = $row->full_name;\n\t\t\t\t\t$data[$i]['user_file'] = $row->user_file;\n\t\t\t\t\t$data[$i]['sex'] = $row->sex;\n\t\t\t\t\t$data[$i]['vchDigitalWalletStatus'] = $row->vchDigitalWalletStatus;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t}", "function dob2age($myTimestamp) {\n // Separate parts of DOB timestamp\n $matches = array();\n preg_match('/(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)/',\n $myTimestamp, $matches\n );\n //var_dump($matches);\n $dobYear = (int)$matches[1];\n $dobMonth = (int)$matches[2];\n $dobDay = (int)$matches[3];\n //echo \"DOB year=$dobYear month=$dobMonth day=$dobDay<br>\";\n\n $nowYear = (int)strftime('%Y');\n $nowMonth = (int)strftime('%m');\n $nowDay = (int)strftime('%d');\n //echo \"Now year=$nowYear month=$nowMonth day=$nowDay<br>\";\n // Calculate age\n if ($dobMonth < $nowMonth) {\n\n // Born in a month before this month\n $age = $nowYear - $dobYear;\n }\n elseif ($dobMonth == $nowMonth) {\n // Born in this month\n if ($dobDay <= $nowDay) {\n // Born before or on this day\n $age = $nowYear - $dobYear;\n }\n else {\n // Born after today in this month\n $age = $nowYear - $dobYear - 1;\n }\n }\n else {\n // Born in a month after this month\n $age = $nowYear - $dobYear - 1;\n }\n //echo \"age=$age years<br>\";\n return $age;\n }", "function edituserdob($data){\n\t\t\t$conn = $this->connect();\n\t\t\t$dob = mysqli_real_escape_string($conn, $data['dob']);\n\t\t\tif(empty($dob)) {\n\t\t\t\t$this->re_direct(\"profile\", \"input=empty\");\n\t\t\t} else {\n\t\t\t\tif(preg_match(\"/^[0-9]+(\\/|:|-)[0-9]+(\\/|:|-)[0-9]+$/\", $dob)) {\n\t\t\t\t\t$result = $this->change(\"user_login\", \"user_dob\", $dob , $_SESSION['userid']);\n\t\t\t\t\tif($result == false) {\n\t\t\t\t\t\t$this->re_direct(\"profile\", \"invalid=dob\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->re_direct(\"profile\", \"Successfull\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->re_direct(\"profile\", \"invalid=date\");\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function DetermineAgeGET_DOB_Prod ($YYYYMMDD_In) {\n $yIn=substr($YYYYMMDD_In, 0, 4);\n $mIn=substr($YYYYMMDD_In, 4, 2);\n $dIn=substr($YYYYMMDD_In, 6, 2);\n\n $ddiff = date(\"d\") - $dIn;\n $mdiff = date(\"m\") - $mIn;\n $ydiff = date(\"Y\") - $yIn;\n\n // Check If Birthday Month Has Been Reached\n if ($mdiff < 0)\n {\n // Birthday Month Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n } elseif ($mdiff==0)\n {\n // Birthday Month Currently\n // Check If BirthdayDay Passed\n if ($ddiff < 0)\n {\n //Birthday Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n }\n }\n return $ydiff;\n }", "public function getUsingFormatDefault(){\n\t\t$config = CoreConfig::readAppConfig();\n\t\t$format = strtolower($config->application->dbdate);\n\t\t$dateFormat = new DateFormat($format, $this);\n\t\treturn $dateFormat->getDate();\n\t}", "public function testCanGetBirthDay() : void\n {\n $this->assertSame('10', $this->personalCodeObj->getBirthDay());\n\n $formatsAndExpectedValues = [\n 'D' => 'Sat', // A textual representation of a day, three letters\n 'j' => 10, // Day of the month without leading zeros\n 'l' => 'Saturday', // A full textual representation of the day of the week\n 'N' => 6, // ISO-8601 numeric representation of the day of the week (added in PHP 5.1.0)\n 'S' => 'th', // English ordinal suffix for the day of the month, 2 characters\n 'w' => 6, // Numeric representation of the day of the week\n 'z' => 40, // The day of the year (starting from 0)\n ];\n\n foreach ($formatsAndExpectedValues as $format => $expectedValue) {\n $this->assertEquals($expectedValue, $this->personalCodeObj->getBirthDay($format));\n }\n }", "public function hasBirthdate(): bool;", "function getFieldDOB($val = null){\n\t\tinclude('axcelerate_link_array_list.php');\n\t\t$val_ar = explode(\"-\", $val);\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_dob');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_dob');\n\t\t$tooltip = setToolTipNotification('dob');\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.(get_axl_req_fields('dob') === 'dob' ? '<span class=\"red\">*</span>' : '').$tooltip.\" </label><br>\";\t\t\t\t\t\n\t\t\t$form_ret .= \"<select id='day' style='width:30%;'><option value=''> -- Day --</option>\";\n\t\t\tforeach ($days as $key => $value) {\n\t\t\t\t$form_ret .= \"<option value='\".$key.\"' \".($val_ar[2] == $key ? 'selected' : '').\">\".$value.\"</option>\";\n\t\t\t}\n\t\t\t$form_ret .= \"</select>&nbsp;&nbsp;\";\n\t\t\t$form_ret .= \"<select id='month' style='width:30%;'><option value=''> -- Month -- </option>\";\n\t\t\tforeach ($months as $key => $value) {\n\t\t\t\t$form_ret .= \"<option value='\".$key.\"' \".($val_ar[1] == $key ? 'selected' : '').\">\".$value.\"</option>\";\n\t\t\t}\n\t\t\t$form_ret .= \"</select>&nbsp;&nbsp;\";\n\t\t\t$form_ret .= \"<select id='year' style='width:30%;'><option value=''> -- Year -- </option>\";\n\t\t\tforeach ($years as $key => $value) {\n\t\t\t\t$form_ret .= \"<option value='\".$key.\"' \".($val_ar[0] == $key ? 'selected' : '').\">\".$value.\"</option>\";\n\t\t\t}\n\t\t\t$form_ret .= \"</select></br>\";\n\t\t\t$form_ret .= \"<input type='hidden' name='dob' id='dob' value='\".$val.\"' class='srms-field \".(get_axl_req_fields('dob') === 'dob' ? 'input-text-required' : '').\"' data-value='\".$val.\"'>\";\n\t\t}\n\t\treturn $form_ret;\n\t}", "public function get_long_birth_date()\n\t{\n\t\t$date = DateTime::createFromFormat(LocalizedDate::STORED_DATE_FORMAT, $this->get_attribute('birth_date'));\n\t\treturn new LocalizedDate($date, null, IntlDateFormatter::LONG, IntlDateFormatter::NONE);\n\t}", "function validate_dob($dob) {\n if (isset($dob) && !$this->isValidDateTimeString($dob, 'm/d/Y', 'UTC') && !empty($dob)) {\n $this->form_validation->set_message('validate_dob', 'This {field} should in m/d/Y format');\n return false;\n } else {\n return true;\n }\n }", "public function getBirthNation()\n {\n return $this->birthNation;\n }", "function getFieldCityOfBirth($value = null){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_CityofBirth');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_CityofBirth');\n\t\t$tooltip = setToolTipNotification(\"CityofBirth\");\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.(get_axl_req_fields('birth_city') === 'birth_city' ? '<span class=\"red\">*</span>' : '').$tooltip.\"</label><br><input type='text' name='CityofBirth' id='CityofBirth' value='\".$value.\"' class='srms-field \".(get_axl_req_fields('birth_city') === 'birth_city' ? 'input-text-required' : '').\"'></br>\";\n\t\t}\n\t\treturn $form_ret;\n\t}", "public function getBirthCentury() : int\n {\n $firstNo = substr($this->code, 0, 1);\n return 1700 + ceil($firstNo / 2) * 100;\n }", "public function getBirthPlace()\n {\n return $this->birthPlace;\n }" ]
[ "0.81020474", "0.8087841", "0.78028715", "0.77632535", "0.7634923", "0.75612813", "0.7509031", "0.74697196", "0.74228454", "0.73496985", "0.7268432", "0.7224518", "0.7224518", "0.7224518", "0.7224518", "0.7224518", "0.72205245", "0.71527565", "0.7133127", "0.71291655", "0.7126509", "0.7122136", "0.7108115", "0.7067304", "0.7067304", "0.7059581", "0.70539707", "0.7014363", "0.70128477", "0.7005834", "0.69802725", "0.69204575", "0.6914704", "0.678417", "0.6782149", "0.6744283", "0.6741028", "0.66869223", "0.66681695", "0.66256666", "0.65940213", "0.65820575", "0.65581113", "0.64877844", "0.64811945", "0.64205706", "0.64158976", "0.6405686", "0.64047086", "0.64047086", "0.637728", "0.6326542", "0.62270886", "0.616844", "0.6167078", "0.6166718", "0.61511326", "0.6148711", "0.6142067", "0.60815", "0.6065858", "0.6063764", "0.60453236", "0.60407495", "0.6033511", "0.601322", "0.5975839", "0.5950931", "0.594821", "0.59384644", "0.59150887", "0.5882735", "0.5848779", "0.58342963", "0.5827058", "0.57965624", "0.578567", "0.57696176", "0.5727011", "0.5722368", "0.5722122", "0.57209235", "0.5720662", "0.57143396", "0.5706539", "0.565682", "0.5648681", "0.56470513", "0.56410015", "0.56058395", "0.5602047", "0.5585169", "0.5545065", "0.55426365", "0.552338", "0.55172944", "0.55128676", "0.5510957", "0.55017996", "0.54977393" ]
0.8222234
0
Get all components required to build authentication url
Получить все компоненты, необходимые для построения URL-адреса аутентификации
abstract public function getAuthUrlComponents();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function auth_url();", "public function getAuthUrl();", "public function get_auth_url()\n\t{\n\t\treturn $this->auth_url.'?oauth_token='.$this->get_request_token();\n\t}", "abstract public function getAuthUri(): string;", "public function getAuthUrl()\n\t{\n\t\t$tokenData = $this->getRequestToken();\n\t\treturn rtrim($this->_authoriseUrl,'/').'?'.$tokenData;\n\t}", "public function getAuthUrl()\n\t{\n\t\treturn $this->createAuthUrl();\n\t}", "abstract protected function getAuthUrl($state);", "protected function _getAuthUrl()\n {\n\t\t$url = CS_REST_General::authorize_url(\n\t\t\t$this->_getClientId(),\n\t\t\t$this->_getAuthRedirectUri(),\n\t\t\t'ImportSubscribers,ManageLists'\n\t\t);\n\t\t\n return $url;\n }", "public function get_auth_url()\r\n\t{\r\n\t\treturn PicasaAPI::$QUERY_URLS['auth'];\r\n\t}", "public function get_auth_string()\n {\n }", "private function getAuthURL() : string {\n $payload = [\n \"client_id\" => $this->client_data->getClientId(),\n \"scope\" => $this->scope->toString(),\n ];\n\n if ($this->with_redirect) {\n $redirect = $this->client_data->getRedirectUri(1);\n $payload['response_type'] = self::RESPONSE_TYPE_TOKEN;\n } else {\n $redirect = $this->client_data->getRedirectUri(0);\n $payload['response_type'] = self::RESPONSE_TYPE_CODE;\n }\n\n $payload[\"redirect_uri\"] = (empty($this->redirect_params)) ?\n $redirect : $redirect.'?'.http_build_query($this->redirect_params);\n return $this->client_data->getAuthURI(). '?'. http_build_query($payload);\n }", "function umnshib_buildLoginURL(array $options = array())\n{\n $shib = new BasicAuthenticator();\n return $shib->buildLoginURL($options);\n}", "public function getAuthUrl()\n {\n return $this->authUrl;\n }", "public function getAuthUrl()\n {\n return $this->authUrl;\n }", "public function authenticationURL()\n {\n $clientId = config('twitch-api.client_id');\n $scopes = implode('+', config('twitch-api.scopes'));\n $redirectURL = config('twitch-api.redirect_url');\n return config('twitch-api.api_url') . '/kraken/oauth2/authorize?api_version=5&response_type=code&client_id=' . $clientId . '&redirect_uri=' . $redirectURL . '&scope=' . $scopes;\n }", "public function getLoginUrl();", "public function getAuthUrl()\n {\n return $this->client->createAuthUrl();\n }", "public function getAuthUrl()\n {\n $return = $this->baseUrl .\n '/' . $this->authNamespace .\n '/' . $this->authVersion .\n '/token?url=' . $this->baseUrl . '/' . $this->apiNamespace;\n\n return $return;\n }", "public function buildPasswordUri(): string;", "abstract public function getAuthorizeUrl(): string;", "abstract protected function getTokenUrl();", "public function getAuthURL() {\n\t\treturn $this->authorization_url.\"?response_type=code&client_id=\".$this->clientID.\"&state=\".$this->state.\"&scope=\".$this->scope;\n\t}", "public function create_auth_url() {\n\t\t$params = array(\n\t\t\t'response_type' => 'code',\n\t\t\t'redirect_uri' => $this->get_redirect_uri(),\n\t\t\t'client_id' => urlencode( $this->config['client_id'] ),\n\t\t\t'scope' => implode( \" \", $this->config['scopes'] ),\n\t\t\t'access_type' => urlencode( $this->config['access_type'] ),\n\t\t\t'approval_prompt' => urlencode( $this->config['approval_prompt'] )\n\t\t);\n\n\t\treturn self::OAUTH2_AUTH_ENDPOINT . \"?\" . http_build_query( $params );\n\t}", "public function getAuth();", "public function getAuth();", "public static function getAuthUrl() {\n $queryString = http_build_query(\n array( 'client_id' => self::CLIENT_ID,\n 'response_type' => 'code',\n 'redirect_uri' => self::getAbsoluteUrl(array(\n 'controller' => 'oauth',\n 'action' => 'callback',\n 'service' => self::TYPE\n ))\n ));\n $url = self::OAUTH_URL . '?' . $queryString;\n return $url;\n }", "public function buildLoginUrl(Request $request): string;", "function fsl_gauth_getauthurl()\n\t{\n\t\n\t$gClient = new Google_Client();\n $gClient->setApplicationName('Login');\n $gClient->setClientId(option('clientId'));\n $gClient->setClientSecret(option('clientSecret'));\n $gClient->setRedirectUri(option('redirectURL')); \n\t//\t$gClient->setHd(option('hd')); \n $google_oauthV2 = new Google_Oauth2Service($gClient);\n $authUrl = $gClient->createAuthUrl();\n return $authUrl;\n}", "public function getAuthAsString();", "public function getURL()\n {\n return Config::get('URL') . 'auth/unl/';\n }", "private function url_params()\n {\n return \"?user={$this->login}&password={$this->password}&answer=json\";\n }", "function authGet() { }", "function generate_api_url(){\n\t\t$parameters = array(\n\t\t\t'uid' \t\t => $this->uid,\n\t\t\t'pswd' \t\t => $this->pswd,\n\t\t\t'api' \t\t => $this->api,\n\t\t\t'apiversion' => $this->apiversion\t\t\t\n\t\t);\n\t\t\n\t\tif(!empty($this->sid) && !empty($this->encrypted_pswd)){\n\t\t\t$parameters['sid'] = $this->sid;\n\t\t\t$parameters['pswd'] = $this->encrypted_pswd;\n\t\t}\n\t\t\n\t\t//var_dump($parameters);\n\t\t\n\t\treturn self::api_end_point . '?' . http_build_query($parameters);\n\t}", "public function getLoginUrl() {\n return $this->client->createAuthUrl();\n }", "abstract public function getAuthenticator();", "private function buildUrl() : string\n {\n $redirectUri = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\n $params = http_build_query([\n 'openid.ns' => self::OPENID_NS,\n 'openid.mode' => 'checkid_setup',\n 'openid.return_to' => (string) $redirectUri,\n 'openid.realm' => (string) $redirectUri,\n 'openid.identity' => 'http://specs.openid.net/auth/2.0/identifier_select',\n 'openid.claimed_id' => 'http://specs.openid.net/auth/2.0/identifier_select',\n ]);\n\n return (string) (new Uri($this->getOpenIdUrl().'/login'))->withQuery($params);\n }", "protected function getAuthUrl($state)\n {\n return $this->buildAuthUrlFromBase('https://auth.kodular.io/oska/authorize', $state);\n }", "function build_url($parts)\n{\n return ( isset($parts['scheme']) ? \"{$parts['scheme']}:\" : '' ) .\n ( ( isset($parts['user']) || isset($parts['host']) ) ? '//' : '' ) .\n ( isset($parts['user']) ? \"{$parts['user']}\" : '' ) .\n ( isset($parts['pass']) ? \":{$parts['pass']}\" : '' ) .\n ( isset($parts['user']) ? '@' : '' ) .\n ( isset($parts['host']) ? \"{$parts['host']}\" : '' ) .\n ( isset($parts['port']) ? \":{$parts['port']}\" : '' ) .\n ( isset($parts['path']) ? \"{$parts['path']}\" : '' ) .\n ( isset($parts['query']) ? \"?{$parts['query']}\" : '' ) .\n ( isset($parts['fragment']) ? \"#{$parts['fragment']}\" : '' );\n}", "abstract protected function token_url();", "public function getAuthString()\n {\n }", "abstract protected function getTokenUrl(): string;", "public function getAuthorizationUrl(ServerRequest $request);", "abstract public function getCredentials();", "public function __construct()\n {\n $this->protocol = api_get_setting('sso_authentication_protocol');\n // There can be multiple domains, so make sure to take only the first\n // This might be later extended with a decision process\n $domains = explode(',', api_get_setting('sso_authentication_domain'));\n $this->domain = trim($domains[0]);\n $this->auth_uri = api_get_setting('sso_authentication_auth_uri');\n $this->deauth_uri = api_get_setting('sso_authentication_unauth_uri');\n //cut the string to avoid recursive URL construction in case of failure\n $this->referer = $this->protocol.$_SERVER['HTTP_HOST'].substr($_SERVER['REQUEST_URI'],0,strpos($_SERVER['REQUEST_URI'],'sso'));\n $this->deauth_url = $this->protocol.$this->domain.$this->deauth_uri;\n $this->master_url = $this->protocol.$this->domain.$this->auth_uri;\n $this->referrer_uri = base64_encode($_SERVER['REQUEST_URI']);\n $this->target = api_get_path(WEB_PATH);\n }", "function buildUrl($parts=array()){\r\n\t$uparts=array();\r\n\tforeach($parts as $key=>$val){\r\n\t\tif(preg_match('/^(PHPSESSID|GUID|debug|error|username|password|add_result|domain_href|add_id|add_table|edit_result|edit_id|edit_table|)$/i',$key)){continue;}\r\n\t\tif(preg_match('/^\\_(login|pwe|try|formfields|action|view|formname|enctype|fields|csuid|csoot)$/i',$key)){continue;}\r\n\t\tif(!is_string($val) && !isNum($val)){continue;}\r\n\t\tif(!strlen(trim($val))){continue;}\r\n\t\tif($val=='Array'){continue;}\r\n\t\tarray_push($uparts,\"$key=\" . encodeURL($val));\r\n \t}\r\n $url=implode('&',$uparts);\r\n return $url;\r\n\t}", "function authenticateURL() { return 'http://www.tumblr.com/oauth/authorize'; }", "abstract public function url_authorize();", "public function urlAuthorize() {\n return $this->host . '/oauth/authorize';\n }", "public function getAuthorizationURL()\n {\n return $this->get('AuthorizationURL');\n }", "protected function getLoginUrl(): string\n {\n return $this->urlGenerator->generate(self::LOGIN_ROUTE);\n }", "function _build_url() {\n\t\t// Add transaction ID for better detecting double requests in AUTH server\n\t\tif($GLOBALS['config']['application']['tid'] == '') $GLOBALS['config']['application']['tid'] = rand(0, 10000);\n\n\t\t$url = $this->url.'&action='.$this->action.'&tid='.$GLOBALS['config']['application']['tid'];\n\t\t\n\t\treturn $url;\n\t}", "public function prepareAuthParams()\n {\n return [\n 'auth_url' => 'https://accounts.google.com/o/oauth2/v2/auth',\n 'auth_params' => [\n 'client_id' => $this->appId,\n 'redirect_uri' => $this->redirectUri,\n 'response_type' => 'code',\n 'scope' => 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile'\n ]\n ];\n }", "function _http_build_url($parts) { \n return implode(\"\", array(\n isset($parts['scheme']) ? $parts['scheme'] . '://' : '',\n isset($parts['user']) ? $parts['user'] : '',\n isset($parts['pass']) ? ':' . $parts['pass'] : '',\n (isset($parts['user']) || isset($parts['pass'])) ? \"@\" : '',\n isset($parts['host']) ? $parts['host'] : '',\n isset($parts['port']) ? ':' . intval($parts['port']) : '',\n isset($parts['path']) ? $parts['path'] : '',\n isset($parts['query']) ? '?' . $parts['query'] : '',\n isset($parts['fragment']) ? '#' . $parts['fragment'] : ''\n ));\n}", "private function _getLoginUrl(){\r\n\t\t\r\n\t\t$settings = $this->getConnectionSettings();\r\n\t\t\r\n\t\t$base = $this->_loginInstance['production'];\r\n\t\tif ($settings['type'] !== 'production')\r\n\t\t\t$base = $this->_loginInstance['sandbox'];\r\n\t\t\r\n\t\treturn $base . $this->_authUri;\r\n\t}", "public function GetAuthReqUrl($_endPointURL, array $_params)\r\n\t{\r\n\t\t$_params = $this->CheckAuthRequestParams($_params);\r\n\r\n\t\t//change parameter names\r\n\t\t$_params = $this->ChangeParamNames($_params);\r\n\r\n\t\t//constuct and return url\r\n\t\treturn $_endPointURL . '?' . http_build_query($_params, null, '&');\r\n\t}", "function build_url(array $parts) {\n return (isset($parts['scheme']) ? \"{$parts['scheme']}:\" : '') . \n ((isset($parts['user']) || isset($parts['host'])) ? '//' : '') . \n (isset($parts['user']) ? \"{$parts['user']}\" : '') . \n (isset($parts['pass']) ? \":{$parts['pass']}\" : '') . \n (isset($parts['user']) ? '@' : '') . \n (isset($parts['host']) ? \"{$parts['host']}\" : '') . \n (isset($parts['port']) ? \":{$parts['port']}\" : '') . \n (isset($parts['path']) ? \"{$parts['path']}\" : '') . \n (isset($parts['query']) ? \"?{$parts['query']}\" : '') . \n (isset($parts['fragment']) ? \"#{$parts['fragment']}\" : '');\n}", "public function getAuthorizationURL() {\n\t\treturn $this->selectedEndpoint['authorization_url'];\n\t}", "public function getBaseAuthorizationUrl()\n {\n return 'https://acesso.dgp.eb.mil.br/authorize';\n }", "public function getUrl()\n {\n if ($this->urlPartsModified) {\n $scheme = $this->getScheme();\n $host = $this->getHost();\n $port = $this->getPort();\n #$user = isset($parsed_url['user']) ? $parsed_url['user'] : '';\n #$pass = isset($parsed_url['pass']) ? ':' . $parsed_url['pass'] : '';\n #$pass = ($user || $pass) ? \"$pass@\" : '';\n $path = $this->getPath();\n $query = !empty($this->urlParts['query']) ? '?' . $this->urlParts['query'] : '';\n\n if ($scheme == 'http' && $port != 80) {\n $port = ':' . $port;\n } else if ($scheme == 'https' && $port != 443) {\n $port = ':' . $port;\n }\n\n $this->url = \"$scheme://$host$port$path$query\";\n }\n\n return $this->url;\n }", "protected function getAuthUrl($state)\n {\n return $this->buildAuthUrlFromBase('https://open.weixin.qq.com/connect/oauth2/authorize', $state);\n }", "public function getAuthUrl($state)\n {\n return $this->buildAuthUrlFromBase($this->withStoreName('admin/user/auth'), $state);\n }", "public function get_user_authorization_url()\n\t{\n\t\tif ($this->auth_oauth_response != SPOAuthClient::OAUTH_USER_AUTH || !$this->oauth_token)\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn $this->auth_url_userauth . (strpos($this->auth_url_userauth, \"?\") === false ? \"?oauth_token=\" : \"&oauth_token=\") . rawurlencode($this->oauth_token);\n\t}", "protected function prepareAuthParams()\n {\n return array(\n 'auth_url' => 'https://accounts.google.com/o/oauth2/auth',\n 'auth_params' => array(\n 'redirect_uri' => $this->redirectUri,\n 'response_type' => 'code',\n 'client_id' => $this->clientId,\n 'scope' => 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/plus.me'\n )\n );\n }", "public function getBaseAuthorizationUrl()\n {\n return 'https://app.intercom.io/oauth';\n }", "protected function getAuthUrl($state)\n {\n return $this->buildAuthUrlFromBase(\n 'https://login.eveonline.com/oauth/authorize', $state\n );\n }", "public function getAuthorizationUrl(): string\n {\n // urlAuthorize option and generates and applies any necessary parameters\n // (e.g. state).\n $authorizationUrl = $this->provider->getAuthorizationUrl([\n // Optional, only use this if you want to ask for scopes the user previously denied.\n 'approval_prompt' => 'force',\n // Optional, a list of scopes. Defaults to only 'organizations.read'.\n 'scope' => [\n Mollie::SCOPE_PAYMENTS_READ,\n Mollie::SCOPE_PAYMENTS_WRITE,\n Mollie::SCOPE_REFUNDS_READ,\n Mollie::SCOPE_REFUNDS_WRITE,\n Mollie::SCOPE_CUSTOMERS_READ,\n Mollie::SCOPE_CUSTOMERS_WRITE,\n Mollie::SCOPE_MANDATES_READ,\n Mollie::SCOPE_MANDATES_WRITE,\n Mollie::SCOPE_SUBSCRIPTIONS_READ,\n Mollie::SCOPE_SUBSCRIPTIONS_WRITE,\n Mollie::SCOPE_PROFILES_READ,\n Mollie::SCOPE_PROFILES_WRITE,\n Mollie::SCOPE_INVOICES_READ,\n Mollie::SCOPE_SETTLEMENTS_READ,\n Mollie::SCOPE_ORDERS_READ,\n Mollie::SCOPE_ORDERS_WRITE,\n Mollie::SCOPE_SHIPMENTS_READ,\n Mollie::SCOPE_SHIPMENTS_WRITE,\n Mollie::SCOPE_ORGANIZATIONS_READ,\n Mollie::SCOPE_ORGANIZATIONS_WRITE,\n Mollie::SCOPE_ONBOARDING_READ,\n Mollie::SCOPE_ONBOARDING_WRITE,\n ],\n ]);\n\n return $authorizationUrl;\n }", "public function authLink() {\n return $this->direct();\n }", "public function getLoginUrlParams() {\n\t\treturn array(\n\t\t\t\"scope\" => array_values($this->config()->get(\"permissions\"))\n\t\t);\n\t}", "public function getAuthorizationUrl()\n {\n // Check for required items\n if (!$this->clientId) {\n throw new Exception('Client ID is required');\n }\n if (!$this->scope) {\n throw new Exception('Scope is required');\n }\n if (!$this->redirectUri) {\n throw new Exception('Redirect URI is required');\n }\n\n // Start building url (enpoint is the same for public and member APIs)\n $url = 'https://';\n $url .= (!empty($this->environment)) ? $this->environment . '.' : '';\n $url .= self::HOSTNAME . '/' . self::AUTHORIZE;\n $url .= '?client_id=' . $this->clientId;\n $url .= '&scope=' . $this->scope;\n $url .= '&redirect_uri=' . urlencode($this->redirectUri);\n $url .= '&response_type=code';\n\n // Process non-required fields\n $url .= ($this->showLogin) ? '&show_login=true' : '';\n $url .= (isset($this->state)) ? '&state=' . $this->state : '';\n $url .= (isset($this->familyNames)) ? '&family_names=' . $this->familyNames : '';\n $url .= (isset($this->givenNames)) ? '&given_names=' . $this->givenNames : '';\n $url .= (isset($this->email)) ? '&email=' . urlencode($this->email) : '';\n\n return $url;\n }", "public function urlAuthorize() {\n return $this->api_location.\"/authorize\";\n }", "public function urlAuthorization()\n {\n return 'https://api.twitter.com/oauth/authenticate';\n }", "public function getBaseAuthorizationUrl()\n {\n return $this->webUrl . '/oauth/authorize';\n }", "public function getBaseAuthorizationUrl()\n {\n return 'https://redbooth.com/oauth2/authorize';\n }", "protected function getAuthUrl($state): string\n {\n return $this->buildAuthUrlFromBase($this->getAuthorizeUrl(), $state);\n }", "function url_with_auth_token($url) {\n // use global $query_params that was initialized during auth check on page load\n global $query_params;\n\n // no auth info, return original url\n if ($query_params['token'] == \"\" || $query_params['uuid'] == \"\") {\n echo $url;\n return;\n }\n\n $uri_parts = explode('?', $url, 2);\n if (isset($uri_parts[1]) && ($uri_parts[1] == \"\")) {\n $url .= \"?\";\n } else {\n $url .= \"&\";\n }\n\n $url .= \"token=\".$query_params['token'].\"&uuid=\".$query_params['uuid'];\n echo $url;\n}", "public function woo_slg_linkedin_auth_url() {\n\t\t\t\n\t\t\t//Remove unused scope for login\n\t\t\t\n\t\t\t$scope\t= array( 'r_emailaddress', 'r_liteprofile' );\n\t\t\t\n\t\t\t//load linkedin class\n\t\t\t$linkedin = $this->woo_slg_load_linkedin();\n\t\t\t\n\t\t\t//check linkedin loaded or not\n\t\t\tif( !$linkedin ) return false;\n\t\t\t\n\t\t\t//Get Linkedin config\n\t\t\t$config\t= $this->linkedinconfig;\n\t\t\t\n\t\t\ttry {//Prepare login URL\n\t\t\t\t$preparedurl\t= $this->linkedin->getAuthorizeUrl( $config['appKey'], $config['callbackUrl'], $scope );\n\t\t\t} catch( Exception $e ) {\n\t\t\t\t$preparedurl\t= '';\n\t }\n\t \n\t\t\treturn $preparedurl;\n\t\t}", "public function getTokenUrl();", "protected function getAuthUrl($state)\n {\n return $this->buildAuthUrlFromBase('https://bitbucket.org/site/oauth2/authorize', $state);\n }", "public function authentication() {\n return $this->username() . ':' . $this->password();\n }", "public function getBaseAuthorizationUrl(): string\n {\n return $this->domain . '/id/authorize';\n }", "protected function _generateOpauthCompleteUrl()\n {\n $url = Configure::read('Opauth.complete_url');\n if (!is_array($url)) {\n $url = Router::parse($url);\n }\n $url['?'] = ['social' => $this->request->query('code')];\n return Router::url($url, true);\n }", "public function getLoginUrl() {\n $url = CURL::urljoin($this->authorization_uri, array(\n 'client_id' => $this->client_id,\n 'scope' => $this->scope,\n 'response_type' => 'code',\n 'redirect_uri' => $this->getConnectUrl(),\n 'state' => $this->state,\n 'display' => 'popup',\n ));\n return $url;\n }", "public function getAuthUrl ()\n {\n\n $url = 'https://oauth.vk.com/authorize?client_id='.$this->client_id.'&scope=photos,friends&redirect_uri='.$this->redirect_uri.'&response_type=code&v=5.0';\n return $url;\n }", "protected function getAuthUrl($state)\n {\n return $this->buildAuthUrlFromBase($this->baseUrl.'/oauth2.0/authorize', $state);\n }", "public function getAuthEndpoint()\n\t{\n\t\treturn $this->authEndpoint;\n\t}", "public function doAuthentication();", "public function get_endpoint_login_url() {\n\t\treturn $this->endpoint_login;\n\t}", "protected function getAuthBase() {\n $region = $this->client->getClassConfig($this, 'region');\n if ($region == BattleNet_Config::REGION_CN) {\n return self::BATTLENET_URL_BASE_CHINA;\n }\n return str_replace('{region}', $region, self::BATTLENET_URL_BASE);\n }", "protected function generateString()\n\t{\n\t\t// start with the scheme\n\t\t$url = $this->scheme . '://';\n\t\t\n\t\t// user and password\n\t\tif( !empty( $this->user ) )\n\t\t{\n\t\t\t$url .= $this->user;\n\t\t\tif( !empty( $this->pass ) ) $url .= ':'.$this->pass.'@';\n\t\t\telse $url .= '@';\n\t\t}\n\t\t\n\t\t// add the host and path\n\t\t$url .= $this->host . '/';\n\t\t$url .= $this->path;\n\t\t\n\t\t// add the URL-encoded parameters\n\t\tif( !empty( $this->params ) )\n\t\t{\n\t\t\t$url .= '?';\n\t\t\tforeach( $this->params as $f => $v ) $url .= $f . '=' . urlencode( $v ) . '&';\n\t\t\t$url = rtrim( $url, '&' );\n\t\t}\n\t\t\n\t\t// add the anchor if any\n\t\tif( !empty( $this->anchor ) ) $url .= '#' . $this->anchor;\n\t\t\n\t\t$this->url = $url;\n\t\t$this->modified = false;\n\t\treturn $url;\n\t}", "public function getPathAuthRequired()\n {\n }", "public function setAuthenticationParams() {\n }", "public function buildAuthUrl(array $params = [])\n {\n\n $defaultParams = [\n 'appid' => $this->clientId,\n 'redirect_uri' => $this->getReturnUrl(),\n 'response_type' => 'code',\n 'scope' => $this->scope,\n 'state' => $this->getredirectSuccessUrl(),\n '#wechat_redirect',\n ];\n return $this->composeUrl($this->authUrl, array_merge($defaultParams, $params));\n }", "function buildAuthUrl($frob ='', $key = '', $secret = '', $perms = 'delete') {\n\t\t$params = array();\n if ($frob != '') {\n $params['frob'] = $frob;\n }\n\t\tif ($key == '') {\n\t\t\t$key = $this->modx->getOption('xflickr.api_key');\n\t\t}\n\t\tif ($secret == '') {\n\t\t\t$secret = $this->modx->getOption('xflickr.api_secret');\n\t\t}\n\t\t$params['api_key'] = $key;\n\t\t$params['perms'] = $perms;\n //return 'http://flickr.com/services/auth/?'.$this->signParams($params);\n $signing = '';\n $values = array();\n ksort($params);\n foreach($params as $key => $value) {\n\t\t\t$signing .= $key . $value;\n\t\t\t$values[] = $key . '=' . urlencode($value);\n }\n $values[] = 'api_sig=' . md5($secret . $signing);\n return 'http://flickr.com/services/auth/?'.implode('&', $values);\n }", "abstract public function getUrlForAuthorizeInTokenService($mode = 'modal');", "public function getUsers()\n\t{\n\t\t$insert = $this->inject();\n\t\t$injectURL = $this->url . $insert . 'user%2c password from users%23&Submit=Submit#';\n\t\treturn $injectURL;\n\t}", "public function get_url_params()\n {\n }", "public function getUserAuthorizationUrl()\n {\n return $this->getAuthorizeUrl();\n }", "function genAuthURL($perms)\n\t{\n\t\t$args['perms'] = $perms;\n\t\t$api_sig = md5($this->api_sig(false,$args));\n\t\treturn 'http://www.rememberthemilk.com/services/auth/?api_key='.$this->apikey.'&perms='.$perms.'&api_sig='.$api_sig;\n\t}", "protected function buildAuthUrlFromBase($url, $state): string\n {\n return $url . '?' . http_build_query($this->getCodeFields($state), '', '&', $this->encodingType);\n }", "public function generateAuthUrl(Request $request)\n {\n return $this->setCurrentBankInSession($request, 'monzo')->authorizer->generateAuthUrl('https://auth.monzo.com/');\n }" ]
[ "0.73218894", "0.7157372", "0.6832804", "0.67731714", "0.64764035", "0.6465385", "0.64473003", "0.62885475", "0.6278464", "0.62723607", "0.6253919", "0.6215553", "0.617608", "0.617608", "0.6171891", "0.61702204", "0.6094732", "0.6073644", "0.60662067", "0.6051898", "0.6014222", "0.60117775", "0.59924567", "0.59795237", "0.59795237", "0.59658504", "0.593165", "0.5868144", "0.5852302", "0.58340997", "0.5817533", "0.57942814", "0.57824945", "0.57761216", "0.57661366", "0.57587284", "0.57446706", "0.57098895", "0.5709407", "0.57092094", "0.5702464", "0.5690217", "0.56462455", "0.5641976", "0.5628777", "0.56048846", "0.5604271", "0.56036925", "0.56026787", "0.55932385", "0.55917555", "0.55887645", "0.5588438", "0.55854857", "0.55778074", "0.5561199", "0.55596715", "0.5556071", "0.5543172", "0.5524079", "0.5518602", "0.55013347", "0.54992586", "0.5491224", "0.54895127", "0.5483414", "0.5481659", "0.5477075", "0.54745704", "0.54733187", "0.5462582", "0.5462571", "0.5458484", "0.5457751", "0.54575616", "0.54536283", "0.545335", "0.5452281", "0.5449539", "0.54484123", "0.544191", "0.54381764", "0.5429897", "0.5421172", "0.5417435", "0.5407016", "0.54053336", "0.5403526", "0.54019487", "0.5391104", "0.53893673", "0.53836757", "0.5381646", "0.5375195", "0.53678083", "0.5360964", "0.53565955", "0.5351981", "0.5351157", "0.5343723" ]
0.85969174
0
Get a middleware from the iterator
Получить middleware из итератора
protected function getMiddleware() { $ret = null; if ($this->middleware->valid()) { $ret = $this->middleware->current(); $this->middleware->next(); } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMiddleware();", "protected function callback()\n {\n return GuzzleMiddleware::mapRequest(function (RequestInterface $request) {\n return $request->withHeader('T-middleware', $request->getHeaderLine('T-middleware') . 'B');\n });\n }", "public function get(): Middleware;", "public function getMiddleware()\n {\n return $this->middleware;\n }", "public function getMiddleware()\n {\n return $this->middleware;\n }", "private function getMiddleware()\n {\n if (isset($this->middlewareLayers[$this->middlewareIndex])) {\n return $this->middlewareLayers[$this->middlewareIndex];\n }\n\n return null;\n }", "public function shift()\n {\n return array_shift($this->middlewares);\n }", "public function getMiddleware() : LinkedList {\n return $this->assignedMiddlewareList;\n }", "protected function mockNextMiddleware()\n {\n return function ($request, $response) {\n return $response;\n };\n }", "public function middlewareNameCollection(): MiddlewaresInterface;", "public function getMiddlewares();", "public function popMiddleware()\n {\n return array_shift($this->middlewares);\n }", "public function getMiddleware($name)\n\t{\n\t\tif (array_key_exists($name, $this->middlewares))\n\t\t{\n\t\t\treturn $this->middlewares[$name];\n\t\t}\n\t}", "public function getAuthMiddleware(): callable{\n if($this->hasAuthMiddleware())\n return $this->_authorisationMiddleware;\n else\n return function(){ return true; };\n }", "public function next()\n {\n if (($middleware = next($this->middlewares))) {\n call_user_func($middleware, $this->request, $this->response, $this);\n } elseif ($this->parent !== null) {\n $this->parent->next();\n }\n }", "public function middleware($middleware, int $position = self::BOTH): self\n {\n return $this->filter($middleware, $position);\n }", "private function runMiddlewares()\n {\n $middleware = $this->getMiddleware();\n $this->middlewareIndex++;\n if (null === $middleware) {\n $this->runRoute();\n } else {\n return $middleware([$this, 'run']);\n }\n }", "public function middleware($middlewareDefinition): self;", "public function handle($request, Closure $next)\n {\n $result = Manager::middleware();\n return $result?$result:$next($request);\n }", "public function getThrowableHandler(): MiddlewareInterface;", "public function parse() : Middleware\n {\n $middlewareKey = $this->extractMiddlewareKey();\n $event = $this->extractEvent();\n $parameters = $this->extractParameters();\n\n $middleware = new Middleware($middlewareKey);\n if ($event) {\n $middleware->event($event);\n }\n if ($parameters) {\n $middleware->parameters($parameters);\n }\n\n return $middleware;\n }", "public function getExceptionHandler(): MiddlewareInterface;", "public function getMiddlewares() {\n\t\treturn $this->middlewares;\n\t}", "protected function step(): ResponseInterface {\n\t\t$current = $this->getMiddleware();\n\n\t\tif ($current !== null) {\n\t\t\t$delegate = $this->createDelegate(\n\t\t\t\tfunction(ServerRequestInterface $request) {\n\t\t\t\t\treturn $this->setRequest($request)->step();\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t$request = $this->getRequest();\n\n\t\t\treturn $current->process($request, $delegate);\n\t\t}\n\n\t\tthrow new Exception\\OutOfMiddlewareException(\n\t\t\t\"Middleware iterator exhausted.\"\n\t\t);\n\t}", "private static function middleware()\n {\n $files = ['Filters', 'Middleware'];\n $folder = static::$root.'Http/Middleware'.'/';\n\n self::call($files, $folder);\n\n $files = ['MiddlewareNotFoundException', 'MiddlewareWallException'];\n $folder = static::$root.'Http/Middleware/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "protected static function middleware()\n {\n foreach (self::fetch('http/middleware') as $file) {\n Bus::need($file);\n }\n\n Middleware::ini();\n }", "private function getMiddleware(CollectionAbstract $fieldItem): array {\r\n\r\n $middleware = $fieldItem -> getMiddleware();\r\n\r\n if(null !== $middleware) {\r\n\r\n if(count($middleware) > 0) {\r\n return $middleware;\r\n }\r\n\r\n return $this -> middleware;\r\n }\r\n\r\n return [];\r\n }", "public function middlewares()\n {\n }", "public function sampleMiddleware($request, $response, $next)\n {\n return $response;\n }", "protected function getMiddleware(EndpointCollection $endpoints): array\n {\n return $this->extractFromEndpoints($endpoints, 'middleware');\n }", "public function middleware()\n {\n // TODO: Implement middleware() method.\n }", "public function getMiddlewares(): array\n {\n return $this->middlewares;\n }", "public function getMiddlewares(): array\n {\n return $this->middlewares;\n }", "protected function parseMiddleware()\n {\n return function (callable $handler) {\n return function (Request $request, array $options) use ($handler) {\n // Skip if option 'parse' isn't set\n if (empty($options['parse'])) return $handler($request, $options);\n\n $options['http_errors'] = false;\n $request = $request->withHeader('Accept', \"{$options['parse']}; q=1.0, text/plain; q=0.5\");\n \n $promise = $handler($request, $options);\n \n return $promise->then(function(Response $response) use ($request, $options) {\n return $this->parseResponse($request, $response, $options);\n });\n };\n };\n }", "private function getNextExecutionHandlerAdapter(Request $request, Closure $next): NextHandlerAdapter\n {\n return $this->nextHandlerFactory->getHandler(\n $this->httpFoundationFactory,\n $this->psrHttpFactory,\n $request,\n $next\n );\n }", "private function getMiddlewareClosureResoult()\n {\n return function ($nextClosure, $middlewareClassName){\n return function ($request) use ($nextClosure, $middlewareClassName)\n {\n return $this->callMiddleware($this->getMiddlewareObject($middlewareClassName),$nextClosure);\n };\n };\n }", "private function setupMiddleware()\n {\n $this->getSlim()->add(new Model\\Middleware( $this ));\n }", "public function run()\n {\n foreach ($this->middleware as $middleware) {\n $middleware = $this->bootstrapMiddleware($middleware);\n\n if (method_exists($middleware, 'handle')) {\n $middleware->handle($this->request, function (Request $request) {\n $this->request = $request;\n });\n }\n }\n\n return $this->request;\n }", "public function handle(Request $request, Closure $next);", "public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface\n\t{\n\t\tif ($this->isWhitelisted($request)) {\n\t\t\treturn $next($request, $response);\n\t\t}\n\n\t\t$user = $this->authenticator->authenticate($request);\n\n\t\t// If we have a identity, then go to next middlewares,\n\t\t// otherwise stop and return current response\n\t\tif ($user === null) {\n\t\t\treturn $this->denied($request, $response);\n\t\t}\n\n\t\t// Add info about current logged user to request attributes\n\t\t$request = $request->withAttribute(RequestAttributes::APP_LOGGED_USER, $user);\n\n\t\t// Pass to next middleware\n\t\treturn $next($request, $response);\n\t}", "public function handle($request, $next);", "public function __invoke($request)\n {\n $next = $this->middleware->get($this->index);\n\n if ($next)\n {\n $name = ($next['n']) ?? '';\n $mParams = explode(',',($next['p']) ?? '');\n\n // check if the middleware class actually exist,\n // otherwise we will need to close out this.\n if (!class_exists($name)) return false;\n\n // increment the middelware we instantiate\n $this->index++;\n\n // begin our middleware instance\n $middleware = new $name();\n\n // load our middelware handle instance for the request\n if (method_exists($middleware, 'handle'))\n {\n $this->middlewareInstances[] = $middleware;\n\n return $middleware->handle($request, $this, ...$mParams);\n }\n else\n {\n // if the middleware does not have a handle, we will need to end the script.\n // All middlewares must have a handle.\n return false;\n }\n }\n\n // return the updated response\n return $this->response;\n }", "public function handle($request, Closure $next)\n {\n return parent::handle($request, $next); // defer to the right stuff\n }", "protected function middleware() {\n return array('auth');\n }", "public function handle($request,Closure $next,$var=null)\n {\n if ($var==\"bb\")\n {\n echo \"<br> MyMiddleware\";\n\n }\n else\n {\n return $next($request);\n }\n\n }", "public function handle($request, Closure $next)\n {\n parent::filter();\n\n return $next($request);\n }", "public function handle($request, Closure $next)\n {\n parent::filter();\n\n return $next($request);\n }", "public function next()\n {\n next($this->requests);\n }", "public function pop()\n {\n return array_pop($this->middlewares);\n }", "protected function get584908ff464e7559233910f9ef37cbbc81593674d92ff5b6e814b73127f8e05c(): \\Viserio\\Component\\Routing\\Dispatcher\\MiddlewareBasedDispatcher\n {\n return $this->services[\\Viserio\\Contract\\Routing\\Dispatcher::class] = new \\Viserio\\Component\\Routing\\Dispatcher\\MiddlewareBasedDispatcher();\n }", "protected function get584908ff464e7559233910f9ef37cbbc81593674d92ff5b6e814b73127f8e05c(): \\Viserio\\Component\\Routing\\Dispatcher\\MiddlewareBasedDispatcher\n {\n return $this->services[\\Viserio\\Contract\\Routing\\Dispatcher::class] = new \\Viserio\\Component\\Routing\\Dispatcher\\MiddlewareBasedDispatcher();\n }", "public function handle($request, Closure $next)\n {\n if(JWTAuth::parseToken()->authenticate()->hasRole('User'))\n {\n\n return $next($request);\n\n }//end of if\n \n }", "protected function lastResponseMiddleware()\n {\n return function (callable $handler) {\n return function (Request $request, array $options) use ($handler) {\n $promise = $handler($request, $options);\n \n return $promise->then(function(Response $response) use ($request) {\n $response->request = $request;\n $this->lastResponse = $response;\n return $response;\n });\n };\n };\n }", "public function handle($request, Closure $next)\n {\n $bearerToken = $request->bearerToken();\n $apiKey = ApiKey::where('key', $bearerToken)->where('active', true)->first();\n if (!$apiKey) {\n abort(403, 'Invalid API Key');\n }\n return $next($request);\n }", "protected function extractMiddlewareKey() : string\n {\n return current(\n explode(\n static::MIDDLEWARE_KEY_DELIMITER,\n $this->middlewareNotation,\n -1\n )\n );\n }", "public function middleware($middleware, array $options = []);", "public function getMiddlewares(): array\n {\n return [];\n }", "public function handle($request, Closure $next)\n {\n return $next($request);\n \n }", "public function handle($request, Closure $next)\n {\n return Event::fire('interceptor.response', $next(Event::fire('interceptor.request', $request)));\n }", "public function middleware($name){\n\n $middlewares = [\n 'auth' => 'Middleware\\Authentication'\n ];\n\n $middleware = new $middlewares[$name]();\n $middleware->handle();\n }", "public function handle($request, Closure $next, $authorization)\n {\n try {\n //Verficia la existencia del token\n $token = JWTAuth::parseToken();\n //Autoriza al usuario al ser autenticado el token\n $user = $token->authenticate();\n } catch (TokenExpiredException $e) {\n //Si el token expira\n return $this->unauthorized('Tu sesion ha expirado, por favor realiza el loguin nuevamente.');\n } catch (TokenInvalidException $e) {\n //Si el token no es valido\n return $this->unauthorized('Tu credenciales son invalidad, por favor vuelve a loguearte.');\n }catch (JWTException $e) {\n //Si el token expira\n return $this->unauthorized('Por favor, inicia sesion para continuar.');\n }\n //If user was authenticated successfully and user is in one of the acceptable roles, send to next request.\n/*\n $data = EstudianteProceso::distinct()->select('ProcesoActividad.Nombre')->join('ProcesoActividad','ProcesoActividad.IdProcesoActividad' ,'=','EstudianteProceso.IdProcesoActividad')->where('EstudianteProceso.IdEstudiante','=',$user->id)->get();\n\n foreach ($data as $dat) {\n if ($user && strcmp($dat->Nombre, $authorization) === 0) {\n return $next($request);\n }\n }\n\n*/\n //consulta los permisos del token enviado, si el permiso se encuentra en su tabla de la BD\n //permite continuar con el request\n $data = EstudianteProceso::distinct()->select('ProcesoActividad.Nombre')->join('ProcesoActividad','ProcesoActividad.IdProcesoActividad' ,'=','EstudianteProceso.IdProcesoActividad')->where([['EstudianteProceso.IdEstudiante',$user->id],['EstudianteProceso.Permiso','1'],['ProcesoActividad.Nombre',$authorization]])->first();\n\n\n if ($data) {\n return $next($request);\n }\n\n return $this->unauthorized();\n }", "public function __invoke(RequestInterface $request, ResponseInterface $response, Callable $next)\n {\n $headers = getallheaders();\n // getServerParams();\n $headersFromSlim = $request->getHeader('Authorization');\n\n $jwt = $request->getHeaders();\n echo $jwt['HTTP_AUTHORIZATION'][0];\n //$token = JWT::decode(['HTTP_AUTHORIZATION'][0], getenv('SECRET_KEY_JWT'), array('HS256'));\n//echo '<br>';\n//var_dump($token);\ndie();\n // return $next($request, $response);\n }", "public function handle($request, Closure $next)\n {\n $this->request = $request;\n\n info(\"================== FeMiddleware: [\".$request->path().\"] ====================\");\n $this->process($this->request);\n info(\"================== End============================================\");\n \n return $next($this->request);\n }", "public function handle($request, Closure $next)\n {\n return $next($request);\n\n }", "public function middleware(object $middleware, Closure $next)\n {\n if (\n $middleware->thisRouteController() === 'security' && \n $middleware->thisRouteAction() === 'index') {\n $userID = $middleware->getSession()->get('user_id');\n if (isset($userID) && $userID !== 0) {\n $middleware->flashMessage(sprintf('%s You are already logged in.', '<strong class=\\\"uk-text-danger\\\">Action Rejected: </strong>'), $middleware->flashInfo());\n $middleware->redirect(Authorized::getReturnToPage());\n }\n }\n return $next($middleware);\n }", "public function handle($request, Closure $next) {\n $pid = $request->route('partner_id');\n $ks = $request->route('ks');\n if ($this->validateTokenSession($pid, $ks)) {\n return $next($request);\n }\n throw new SmhAPIException('not_authorized');\n }", "public function handle($request, Closure $next)\n {\n return $next($request);\n }", "public function handle($request, Closure $next)\n {\n return $next($request);\n }", "public function handle($request, Closure $next)\n {\n return $next($request);\n }", "public function handle($request, Closure $next)\n {\n return $next($request);\n }", "public function handle($request, Closure $next)\n {\n return $next($request);\n }", "public function handle($request, Closure $next, $guard = null)\n {\n// var_dump($request->route());\n return $next($request);\n }", "public function getNotFoundDecorator(\n NotFoundException $exception\n ): MiddlewareInterface;", "public function prependMiddleware($middlewareDefinition): self;", "public function handle($request, Closure $next)\n\t{\n//\t\t$member = Member::current();\n//\t\t$broadcast_read =TenderBroadcastRead::where('member_id', $member->id)\n//\t\t\t->where('broad_id', 1)->first();\n//\t\tif(empty($broadcast_read)) {\n//\t\t\treturn redirect('/tender/contract');\n//\t\t}\n\t\treturn $next($request);\n\t}", "public function handle($request, Closure $next)\n {\n $device = device::where('deviceID','=',$request->input('device_id'))->firstOrFail();\n if( $device->user_id == $request->user()->id || $request->user()->role->id == 1){\n return $next($request);\n }\n return response()->json(['Message' => 'Not Allowed To Control This Device'],401);\n \n }", "public function handle($request, Closure $next) {\n\n if (JWTAuth::parseToken()->authenticate()->identity !== 1) {\n return $this->forbidden(NULL, ResponseMessage::$message[403000]);\n }\n\n return $next($request);\n }", "public function handle($request, Closure $next)\n {\n //znaci 1. napravimo midleware preko php artisan make:midleware\n //2. napravimo ovaj uslov ovde\n // 3. registrujemo midleware u Kernel.php fajlu\n //4. odemo u web.php i vezemo middleware('admin'); metod za user/admin rutu na kraju - bolje ne (ne radi u oba pravca)\n // ili!: u UsersControleru napravimo konstruktor i stavimo middleware u njega\n // public function __construct(){ \n // $this->middleware('admin');\n // }\n\n // ! Proverimo da li autentifikovani user ima access za odredjenu rutu\n //ako nema, vratimo ga odakle je dosao\n if(Auth::user()->admin){\n \n return $next($request);\n\n } else{\n \n Session::flash('info', 'You do not have permissions to acces!');\n\n return redirect()->back();\n }\n\n \n }", "protected function logMiddleware()\r\n {\r\n $formatter = new MessageFormatter($this->app['config']['http.log_template'] ?? MessageFormatter::DEBUG);\r\n\r\n return Middleware::log($this->app['logger'], $formatter, LogLevel::DEBUG);\r\n }", "public function handle($request, Closure $next)\n {\n if (!empty($request->header('jwt'))) {\n $get = User::where('jwt',$request->header('jwt'))->count();\n if ($get == 1) {\n return $next($request);\n }\n else{\n return ApiResponse(404,['jwt' => 'is invalid'],[]);\n }\n }\n \n }", "abstract public function apply(Request $request, Response $response, Closure $next);", "public function handle($request, Closure $next)\n {\n $this->startTime = microtime(true);\n\n return $next($request);\n }", "public function handle(Request $request, Closure $next)\n {\n $key = 'request|'.$request->url();\n if(!$this->checkIfCached($key)) {\n $response = $next($request);\n Cache::put($key, $response, 300);\n return $response;\n } else {\n return Cache::get($key);\n }\n\n }", "public function handle($request, Closure $next)\n {\n $this->start_execution = microtime(true);\n return $next($request);\n }", "public function handle($request, Closure $next)\n {\n if (auth('worker')->user()->type === 'worker' ) \n return $next($request);\n \n return $this->response('not_auth' , __('auth.not_authorized'));\n }", "public function handle($request, Closure $next)\n {\n return $this->encrypt($next($this->decrypt($request)));\n }", "function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next)\n {\n \n if ($auth_line = $request->getHeaderLine('Authorization')) {\n if (preg_match(\"#^Bearer (.+)$#\", $auth_line, $p)) {\n $token = $p[1];\n \n // is it a valid token?\n $jwt = new JWT();\n $id = $jwt->parseToken($token);\n \n container()->set('authenticated_user_identity', $id); // authenticate user\n \n }\n }\n \n if (is_null(current_authenticated_user_id())) {\n $response = $response->withStatus(403);\n \n return $response;\n }\n \n $response = $next($request, $response);\n \n return $response;\n }", "public function middleware($middleware): self\n {\n $next = $this->tip;\n $node = new MiddlewareNode($this->getCallable($middleware), $next);\n $this->tip = $node;\n return $this;\n }", "protected function parseMiddleware($name)\n {\n list ($name, $payload) = array_pad(explode(':', $name, 2), 2, '');\n\n //\n $callable = array_get($this->middleware, $name, $name);\n\n if (empty($payload)) {\n return $callable;\n } else if (is_string($callable)) {\n return $callable .':' .$payload;\n }\n\n return function ($passable, $stack) use ($callable, $payload)\n {\n $parameters = array_merge(\n array($passable, $stack), explode(',', $payload)\n );\n\n return call_user_func_array($callable, $parameters);\n };\n }", "public function getMiddlewareStack() : array;", "public function handle($request, Closure $next)\n {\n $lesson_id = $request->route('lesson');\n $lesson = Lesson1::find($lesson_id)->first();\n $user= User::find(Auth::id());\n $a = $user->topics()->where('topics.id',$lesson->topic_id)->first();\n if(empty($a)){\n return response()->view('error');\n }\n return $next($request);\n }", "public function next() \n {\n $node = next($this->dispatchables);\n return ($node !== false ? $node['route'] : false);\n }", "public function handle($request, Closure $next)\n {\n if(!$request->hasHeader('Authorization')){\n throw new JWTException('Token not found in request',400);\n }\n\n $authHeader = $request->header('Authorization');\n\n try{\n list($jwt) = (sscanf($authHeader,'Bearer %s'));\n $token = JWT::decode($jwt, getenv('APP_KEY'), [getenv('APP_ENCRYPT_ALGORITHM')]);\n\n //success on decode the token\n return $next($request);\n\n }catch (Exception $e){\n throw new JWTException('Unauthorized',401);\n }\n }", "public function unshift(callable $middleware)\n {\n array_unshift($this->middlewares, $middleware);\n }", "public function prepare($middleware): MiddlewareInterface\n {\n if ($middleware instanceof MiddlewareInterface) {\n return $middleware;\n }\n\n if ($middleware instanceof RequestHandlerInterface) {\n return $this->addHandler($middleware);\n }\n\n if (is_callable($middleware)) {\n return $this->addCallable($middleware);\n }\n\n if (is_array($middleware)) {\n return $this->pipeline(...$middleware);\n }\n\n if (!is_string($middleware) || $middleware === '') {\n throw InvalidMiddlewareException::forMiddleware($middleware);\n }\n }", "function __invoke(Request $request, Response $response, callable $next)\n {\n if (isset($_SESSION['errors'])) {\n $this->view->getEnvironment()->addGlobal('errors', $_SESSION['errors']);\n unset($_SESSION['errors']);\n }\n\n // Next Middleware\n $response = $next($request, $response);\n return $response;\n }", "public function handle($request, Closure $next)\n {\n if ($request->input(\"access_token\") == null) {\n return response()->json([\"status_code\" => 401, \"message\" => \"Not found access_token Error!(middleware)\"], 401);\n }\n try {\n JWT::decode($request->input(\"access_token\"), config(\"app.secret_form_template\"), ['HS256']);\n return $next($request);\n } catch (Exception $e) {\n return response()->json([\"status_code\" => 401, \"message\" => $e->getMessage(), 'error' => 'middleware(auth web)'], 401);\n }\n }", "public function handle($request, Closure $next)\n {\n // ---------------\n // return $next($request); // no filters set, anyone can access /admin\n // -----------------------\n\n // Easy way to Restrict Access is to use AUTH FACADE\n if(!Auth::check()) \n {\n return redirect('users/login');\n } \n else \n {\n $user = Auth::user(); // Fetch logged in user\n\n if($user->hasRole('manager'))\n {\n return $next($request);\n } \n else\n {\n return redirect('/');\n }\n }\n\n }", "public function handle($request, Closure $next, $guard = null)\n {\n $access_token = $request->header('access-token') ;\n\n $request = (array)json_decode($request->getContent(), true);\n if(array_key_exists('lang_id',$request)) {\n Helpers::Set_locale($request['lang_id']);\n }\n if($access_token)\n {\n $access_token=$access_token;\n \n \n if ($access_token) \n { $user= User::where('api_token', $access_token)->first();\n //dd($access_token);\n }\n if ($user) \n { \n return $next($request);\n }else{\n\n // return response('Unauthorized.', 401);\n return Helpers::Get_Response(400,'error',trans('messages.logged'),[],[]);\n }\n \n } \n return Helpers::Get_Response(400,'error',trans('messages.logged'),[],[]);\n }", "public function handle($request, Closure $next){\n if(!is_array($request->requestMap)){\n $request->requestMap = [];\n }\n\n $payments = Payments::selectAdapterByService($request->serviceID);\n if(!$payments['status']){\n return response($payments, 403);\n }\n\n $inputValidate = Payments::$adapter::inputValidation($request->serviceID,$request->clientAmount,$request->requestMap);\n if($inputValidate !== true){\n return response($inputValidate, 403);\n }\n\n $Validate = Payments::$adapter::transactionMiddleware(PaymentServices::find($request->serviceID)->payment_service_apis()->where('service_type',$request->serviceType)->first()->external_system_id,$request->clientAmount,$request->requestMap);\n if($Validate['error']){\n return response($Validate, 403);\n }else{\n $Validate['payment_transaction']->requestMap = $request->requestMap;\n $request->PaymentTransaction = $Validate['payment_transaction'];\n }\n\n return $next($request);\n }" ]
[ "0.6752117", "0.66690207", "0.6622647", "0.65207684", "0.65207684", "0.63957626", "0.63761896", "0.6352436", "0.62916", "0.62613744", "0.615779", "0.61190957", "0.60768324", "0.5982674", "0.59793043", "0.59714884", "0.5905679", "0.5836984", "0.58001155", "0.57484573", "0.56683236", "0.5661904", "0.56503856", "0.5627947", "0.56013876", "0.5590276", "0.5547651", "0.5534208", "0.5517323", "0.5480123", "0.54593027", "0.54384553", "0.54384553", "0.5395658", "0.5393726", "0.5383973", "0.53687644", "0.53675663", "0.5354579", "0.53393143", "0.52919114", "0.5271013", "0.52424914", "0.5237028", "0.52211857", "0.52177066", "0.52177066", "0.5212593", "0.5210179", "0.5160502", "0.5160502", "0.51585907", "0.5155083", "0.51436335", "0.5129966", "0.512489", "0.5120513", "0.5117932", "0.51140535", "0.51069754", "0.5099796", "0.5097946", "0.5085401", "0.5082604", "0.5056953", "0.504373", "0.50408274", "0.50408274", "0.50408274", "0.50408274", "0.50408274", "0.503627", "0.5032848", "0.5019052", "0.50110996", "0.4995951", "0.4992866", "0.49923918", "0.49814874", "0.49664098", "0.49614492", "0.4959251", "0.49538335", "0.49528307", "0.49522343", "0.49511728", "0.49332905", "0.49323726", "0.4932217", "0.49180686", "0.49150598", "0.49111447", "0.49072632", "0.49044466", "0.49030864", "0.4902788", "0.48917285", "0.48891664", "0.48877722", "0.48875818" ]
0.70806575
0
Set the current ServerRequestInterface object
Установите текущий объект ServerRequestInterface
protected function setRequest(ServerRequestInterface $request) { $this->request = $request; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRequest(ServerRequestInterface $request);", "public function setRequest(RequestInterface $request);", "public static function setRequest(RequestInterface $request)\n {\n $coroutineId = self::getCoroutineId();\n self::$context[$coroutineId][self::REQUEST_KEY] = $request;\n }", "public function setRequest(RequestInterface $request)\n {\n $this->request = $request;\n }", "public static function setRequestContext(ServerRequestInterface $request)\n {\n $uri = $request->getUri();\n static::$_requestContext = [\n '_base' => $request->getAttribute('base'),\n '_port' => $uri->getPort(),\n '_scheme' => $uri->getScheme(),\n '_host' => $uri->getHost(),\n ];\n }", "public function __invoke(\n ServerRequestInterface $request\n );", "protected function setRequest(RequestInterface $request): ResponseHandler\n {\n $this->request = $request;\n\n return $this;\n }", "public function __construct(PsrServerRequestInterface $request)\n {\n $this->request = $request;\n }", "function setRequest($request) {\n\t\t$this->m_request = $request;\n\t}", "function setRequest($value) {\n $this->request = $value;\n }", "public function process(ServerRequestInterface $request)\n {\n }", "public function setRequest($request);", "public function request() : ServerRequestInterface;", "public function setRequestEngine(RequestEngineInterface $requestEngine) {\n\t\t$this->requestEngine = $requestEngine;\n\t}", "function setRequest($request) {\n $this->request = $request;\n }", "public function forRequest(ServerRequestInterface $request): self\n {\n if ($request->getMethod() !== 'POST') {\n return $this;\n }\n\n $requestData = json_decode($request->getBody()->read(8192), true);\n if (empty($requestData)) {\n return $this;\n }\n\n $this->setSearchTerm($requestData['term']['label']);\n $this->setOriginalSearchValue($requestData['term']['search']);\n $this->setExcludeTerms($requestData['exclude'] ?? []);\n\n return $this;\n }", "public function __invoke(\n ServerRequestInterface $request,\n ResponseInterface $response\n );", "public function createServerRequestFromGlobals(): ServerRequestInterface;", "public function createServerRequestFromGlobals(): ServerRequestInterface;", "public function setResponse(ResponseInterface $request);", "public function setRequest(RequestInterface $request): ControllerInterface;", "public static function setRequestInfo($request)\n {\n if ($request instanceof ServerRequest) {\n static::pushRequest($request);\n } else {\n $requestData = $request;\n $requestData += [[], []];\n $requestData[0] += [\n 'controller' => false,\n 'action' => false,\n 'plugin' => null\n ];\n $request = new ServerRequest();\n $request->addParams($requestData[0])->addPaths($requestData[1]);\n static::pushRequest($request);\n }\n }", "public function prepareRequest(RequestInterface $request);", "private function setRequest() {\n // Create request object\n $this->request = Request::createFromGlobals();\n // Check caching and exit if so\n // - create a dummy response for possible 304\n $response = new Response();\n $seconds = Config::get()->pagecachetime;\n $response->setLastModified(new DateTime('-' . $seconds . ' seconds'));\n if ($response->isNotModified($this->getRequest())) {\n $response\n ->setSharedMaxAge($seconds)\n ->send();\n exit();\n }\n // Add better json request support\n // check request Content-Type\n $ctCheck = 0 === strpos(\n $this->request->headers->get('CONTENT_TYPE')\n , 'application/json'\n );\n // check request Method\n $methodCheck = in_array(\n strtoupper($this->request->server->get('REQUEST_METHOD', 'GET'))\n , array('PUT', 'DELETE', 'POST')\n );\n if ($ctCheck && $methodCheck) {\n $params = (array) json_decode($this->request->getContent());\n $this->request->request = new ParameterBag($params);\n }\n }", "public function __construct(ServerRequestInterface $serverRequest)\n {\n $userAgent = '';\n $serverParams = $serverRequest->getServerParams();\n\n if (isset($serverParams['REMOTE_ADDR'])) {\n $userAgent = $serverParams['REMOTE_ADDR'];\n }\n\n $this->userAgent = $userAgent;\n }", "public function setData(ServerRequestInterface $request) : void\n\t{\n\t\t$this->baseController->setBaseVariables($request);\n\n\t\t$month = $request->getAttribute('month');\n\t\t$formatIdentifier = $request->getAttribute('formatIdentifier');\n\t\t$rating = (int) $request->getAttribute('rating');\n\t\t$languageId = new LanguageId((int) $request->getAttribute('languageId'));\n\n\t\t$myFormat = $request->getCookieParams()[CookieNames::FORMAT] ?? '';\n\t\t$myRating = $request->getCookieParams()[CookieNames::RATING] ?? '';\n\n\t\t$this->statsUsageModel->setData(\n\t\t\t$month,\n\t\t\t$formatIdentifier,\n\t\t\t$rating,\n\t\t\t$myFormat,\n\t\t\t$myRating,\n\t\t\t$languageId\n\t\t);\n\t}", "public function setRequest(namespace\\Request $request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public static function set_request($request){\n\t\t\tself::$request = $request;\n\t\t}", "public static function setAttribute(ServerRequestInterface $request, $name, $value)\n {\n $attributes = $request->getAttribute(self::KEY, []);\n $attributes[$name] = $value;\n\n return $request->withAttribute(self::KEY, $attributes);\n }", "public function handle(ServerRequestInterface $request);", "public function sendRequest(RequestInterface $request);", "public function sendRequest(RequestInterface $request);", "public function setRequest(Zend_Controller_Request_Abstract $request)\n {\n $this->_request = $request;\n }", "private function __construct(ServerRequest $request)\n {\n $this->request = $request;\n }", "protected function _setSessionUser(ServerRequestInterface $request, ArrayAccess $user)\n {\n /** @var \\Cake\\Http\\Session $session */\n $session = $request->getAttribute('session');\n $session->write($this->getConfig('userSessionKey'), $user);\n }", "public function __invoke(\n ServerRequestInterface $request,\n $default = null\n );", "public function setRequest(Request $request);", "public function setRequest( $request ){\n \n $this->request = $request;\n \n }", "public function setRequest(Request $request) {\r\n $this->request = $request;\r\n }", "function setRequest($inRequest) {\n\t\tif ( $inRequest !== $this->_Request ) {\n\t\t\t$this->_Request = $inRequest;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "public function setRequest(Request $request)\n\t{\n\t\t$this->request = $request;\n\t}", "public function setDispatcher(RequestHandlerInterface $dispatcher): void {\n $this->dispatcher = $dispatcher;\n }", "public function __construct(ServerRequestInterface $request){\n\n //recupera a rota atual\n $route = $request->getAttribute('route');\n\n //verifica se é uma rota válida\n if($route and $route instanceof Routable){\n\n //salva a rota\n $this->route = $route;\n\n //salva o nome\n $this->name = $route->getName();\n\n //recupera os atributos\n $attrs = explode('.', $route->getName());\n $this->level = Arr::last($attrs);\n $this->module = Arr::first($attrs);\n\n //recupera os argumentos\n $this->args = $route->getArguments();\n\n //salva os grupos\n $this->groups = collect($route->getGroups())->map(function($group){\n return $group->getPattern();\n });\n\n }else{\n $this->groups = collect([]);\n }\n\n }", "public function setRequest(Request $request)\n {\n $this->_request = $request;\n }", "public function setRequest(Request $request)\n\t{\n\t\t/* null */\n\t}", "public function preProcessRequest(RequestInterface &$request) {}", "public function __construct(ServerRequestInterface $request, $vesion = '2.1')\n {\n $this->request = $request;\n $this->version = $vesion;\n $this->UserAgent = 'Keypic PHP Class, Version: '.$this->version;\n $this->host = 'ws.keypic.com';\n }", "public function logRequest(ServerRequestInterface $request);", "public function setRequest(Request $request) {\n $this->request = $request;\n }", "public function setRequest(Request $request) {\n $this->request = $request;\n }", "public function injectHttpRequest(HttpServletRequestInterface $request)\n {\n $this->injectRequest($request);\n }", "public function put( ServerRequestInterface $request, ResponseInterface $response )\n\t{\n\t\treturn $this->client->put( $request, $response );\n\t}", "function __construct() {\n $this->init();\n \\base\\RequestRegistry::setRequest($this);\n }", "public function manage(RequestInterface $eventRequest)\n {\n $this->eventRequest = $eventRequest;\n $this->manageEvent();\n }", "public function setRequest(Request $request)\n {\n $this->request = $request;\n }", "public function setRequest(Request $request)\n {\n $this->request = $request;\n }", "public function setRequest(Request $request)\n {\n $this->request = $request;\n }", "public function setRequest(Request $request)\n {\n $this->request = $request;\n }", "public function setRequest(Request $request)\n {\n $this->request = $request;\n }", "public function init(RequestInterface $request)\n {\n if (!session_id()) {\n session_cache_limiter(false);\n session_start();\n }\n\n // Initialize data with GET / POST parameters.\n $this->setData($request->getParams());\n\n if ($this->authRequired() !== false) {\n // Test action vs. ACL roles\n if (!$this->isAuthorized()) {\n header('HTTP/1.0 403 Forbidden');\n exit;\n }\n }\n\n return parent::init($request);\n }", "public function void(RequestInterface $request);", "protected function prepareRequest(RequestInterface $request)\n {\n $request->setClient($this);\n\n foreach ($this->getConfig()->getAll() as $key => $value) {\n // Add any curl options that might in the config to the request\n if (strpos($key, 'curl.') === 0 && $key != 'curl.blacklist') {\n $curlOption = str_replace('curl.', '', $key);\n if (defined($curlOption)) {\n $curlValue = is_string($value) && defined($value) ? constant($value) : $value;\n $request->getCurlOptions()->set(constant($curlOption), $curlValue);\n }\n }\n // Add any cache options from the config to the request\n // Add any curl options that might in the config to the request\n if (strpos($key, 'cache.') === 0) {\n $request->getParams()->set($key, $value);\n }\n }\n\n // Attach client observers to the request\n $request->setEventDispatcher(clone $this->getEventDispatcher());\n\n $this->dispatch('client.create_request', array(\n 'client' => $this,\n 'request' => $request\n ));\n\n return $request;\n }", "public function setRequest()\n\t{\n\n\t\t/** http://localhost/molajo/index.php returns 'http' */\n\t\t$this->set('scheme', $this->symfony_request->getScheme());\n\n\t\t/** http://localhost/molajo/index.php returns 'http' */\n\t\t$this->set('is_secure', $this->symfony_request->isSecure());\n\n\t\t/** http://localhost:99/molajo/index.php retursn http:://localhost:99 (non-standard port) */\n\t\t$this->set('host', $this->symfony_request->headers->get('host'));\n\n\t\t/** http://localhost/molajo/index.php returns '/molajo' */\n\t\t$this->set('base_path', $this->symfony_request->getBasePath());\n\n\t\t/** http://localhost/molajo/index.php returns '/molajo' */\n\t\t$this->set('base_url', $this->symfony_request->getBaseURL());\n\n\t\t/** http://localhost/molajo/index.php returns 80 */\n\t\t$this->set('port', $this->symfony_request->getPort());\n\n\t\t/** http://localhost/molajo/index.php return http:://localhost */\n\t\t/** http://localhost/molajo:88/index.php return http:://localhost:88 */\n\t\t$this->set('http_host', $this->symfony_request->getHttpHost());\n\n\t\t/** http://localhost/molajo/index.php returns 80 */\n\t\t$this->set('request_uri', $this->symfony_request->getRequestUri());\n\n\t\t/** http://localhost/molajo/index.php returns 80 */\n\t\t$this->set('uri', $this->symfony_request->getUri());\n\n\t\t/** POST: Create GET: Read PUT: Update, DELETE: Delete */\n\t\t/** Many browsers do not support PUT or DELETE, $_SERVER['REQUEST_METHOD] supplements */\n\t\t$this->set('method', $this->symfony_request->getMethod());\n\n\t\t/** http://localhost/molajo/index.php returns 80 */\n\t\t$this->set('port', $this->symfony_request->getPort());\n\n\t\t$this->set('path_info', $this->symfony_request->getPathInfo());\n\n\t\t$this->set('query_string', $this->symfony_request->getQueryString());\n\n\t\tif ($this->symfony_request->getQueryString() == '') {\n\t\t\t$tempQueryParameters = array();\n\t\t} else {\n\t\t\t$tempQueryParameters = explode('&', $this->get('query_string'));\n\t\t}\n\n\t\t$query_parameters = array();\n\t\tif (count($tempQueryParameters) > 0) {\n\t\t\tforeach ($tempQueryParameters as $item) {\n\t\t\t\t$pair = explode('=', $item);\n\t\t\t\t$query_parameters[$pair[0]] = $pair[1];\n\t\t\t}\n\t\t}\n\t\t$this->set('query_parameters', $query_parameters);\n\n\t\t/** http://localhost/molajo/index.php returns '/molajo/index.php' */\n\t\t$this->set('base_url_path', $this->get('http_host') . $this->get('base_url')\n\t\t);\n\n\t\t/** http://localhost/molajo/index.php returns 'http://molajo/index.php' */\n\t\t$this->set('base_url_path_with_scheme',\n\t\t\t$this->get('scheme')\n\t\t\t\t. '://'\n\t\t\t\t. $this->get('http_host')\n\t\t\t\t. $this->get('base_url')\n\t\t);\n\n\t\t$this->set('ajax', $this->symfony_request->isXmlHttpRequest());\n\n\t\t$this->set('request_format', $this->symfony_request->getRequestFormat());\n\n\t\t$this->set('mime_type', $this->symfony_request->getMimeType($this->get('request_format')));\n\n\t\t$this->set('format', $this->symfony_request->getFormat($this->get('mime_type')));\n\n\t\t$this->set('content_type', $this->symfony_request->getContentType());\n\n\t\t/** Client */\n\t\t$this->set('client_ip', $this->symfony_request->getClientIp());\n\n\t\t/** Server */\n\t\t$this->set('user', $this->symfony_request->getUser());\n\n\t\t$this->set('password', $this->symfony_request->getPassword());\n\n\t\t$this->set('document_root', $this->symfony_request->server->get('DOCUMENT_ROOT'));\n\n\t\t$this->set('entry_point', $this->symfony_request->server->get('SCRIPT_FILENAME'));\n\n\t\t/** Language */\n\n\t\treturn true;\n\t}", "public function setRequest( Request $request )\n {\n $this->request = $request;\n \n # Return object to preserve method-chaining:\n return $this;\n }", "public function __construct(RequestHandlerInterface $requestHandler)\n {\n $this->requestHandler = $requestHandler;\n }", "protected function populateRequest (CAS_RequestInterface $request) {\n\t\t// do nothing, since the URL has already been sent and that is our\n\t\t// only data.\n\t}", "public function request_from_globals(): ServerRequestInterface {\n\n\t\t$psr17_factory = new Psr17Factory();\n\n\t\treturn ( new ServerRequestCreator(\n\t\t\t$psr17_factory,\n\t\t\t$psr17_factory,\n\t\t\t$psr17_factory,\n\t\t\t$psr17_factory\n\t\t) )->fromGlobals()\n\t\t\t->withBody( $this->stream_from_scalar( $_POST ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing\n\t}", "protected function getRequest(): RequestInterface\n {\n return $this->request;\n }", "protected function setRequest(Request $request)\n {\n $this->request = $request;\n }", "public function setServer( $server )\r\n {\r\n $this->_server = $server;\r\n }", "public function __construct(RequestInterface $request, ResponseInterface $response)\n {\n $this->request = $request;\n $this->response = $response;\n }", "public final function set_request($request = array()) {\n\t \t\n\t \t/* set vars from the server request */\n\t\t$this->request = $request;\n\t\t\n\t\t/* extracts the method, but this is not really importand to do at this point, as it will be set later too */\n\t\t/* $this method is also set when the corresponding action ($this-read, create, ...) is called */\n\t\tif( isset($request['method']))\n\t\t\t$this->request_method = $request['method'];\n\t\t\n\t\t/* extract query vars */\n\t\tif( isset($request['queryvars']))\n\t\t\t$this->request_query_vars = (array) $request['queryvars']; // array is expected\n\n\t\t/* looking for model ids in the request */\n\t\t$this->id = $this->_find_in_request($this->properties->id_attribute);\n\t\t$this->parent_id = $this->_find_in_request($this->properties->parent_id_attribute);\t\n\t\t\n\n\t\t/* USER HANDLING */\n\n\t \t/* is the user allowed to make this request */\n\t \tif ( ( $this->properties->access == \"loggedin\" ) && ( ! is_user_logged_in() ) ) {\n\t\t\t$this->set_error( 56, 'user must be logged in for this request' );\t\t\t\t \t\n\t \t}\n\t\t\n\t \t/* some extra authentication */\n\t \t/* is the uer allowed to make this request */\n \t\t$allowed = $this->is_authenticated($request, $this->request_method);\n \t\tif(! $allowed)\n\t\t\t$this->set_error( 56, 'user is not authenticated' );\t\t\t\t \t\n\t \t\t\n\t\t\n\t}", "public function setRequest(Request $request = null)\n {\n $this->request = $request ?? \\Request::instance();\n }", "private function setResource()\n {\n $path = $_SERVER['PATH_INFO'];\n $params = explode('/', $path);\n $this->_requestResource = $params[2];\n if (!in_array($this->_requestResource, $this->_allowResource)) {\n throw new Exception(\"Request resource not allowed!\", 405);\n }\n\n $this->_version = $params[1];\n\n if (!$this->notValid($params[3])) {\n $this->_requestUri = $params[3];\n }\n }", "protected function setDataFromRequest(RequestInterface $request)\n {\n $keys = $this->validDataFromRequest();\n $data = $request->getParams($keys);\n\n if (isset($data['obj_type'])) {\n $this->objType = filter_var($data['obj_type'], FILTER_SANITIZE_STRING);\n }\n\n if (isset($data['obj_id'])) {\n $this->objId = filter_var($data['obj_id'], FILTER_SANITIZE_STRING);\n }\n\n if (isset($data['property'])) {\n $this->propertyIdent = filter_var($data['property'], FILTER_SANITIZE_STRING);\n }\n\n if (isset($data['assets'])) {\n $this->showAssets = !!$data['assets'];\n }\n\n if (isset($data['callback'])) {\n $this->callbackIdent = filter_var($data['callback'], FILTER_SANITIZE_STRING);\n }\n\n if (isset($this->elfinderConfig['translations'])) {\n $this->setLocalizations(array_replace_recursive(\n $this->defaultLocalizations(),\n $this->elfinderConfig['translations']\n ));\n }\n\n return true;\n }", "public function __invoke(ServerRequestInterface $request, ResponseInterface $response, array $data = []);", "public function __construct(ServerRequestInterface $serverRequest) {\n $this->serverRequest = $serverRequest;\n \n $inputStreamResource = fopen('php://input', 'rb');\n $this->tempFile = $this->tempFile();\n $destStreamResource = fopen($this->tempFile, 'w+b');\n if (stream_copy_to_stream($inputStreamResource, $destStreamResource) === FALSE) {\n throw new \\RuntimeException('php://input stream could not be copied to file with unique filename to make the stream seekable.');\n }\n fclose($inputStreamResource);\n fclose($destStreamResource);\n \n parent::__construct($this->tempFile, 'rb');\n }", "public function getRequest(): RequestInterface;", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->Request ??= (new ServerRequest())\n ->withParam('action', 'add')\n ->withParam('controller', 'myController')\n ->withParam('prefix', 'myPrefix');\n }", "public function set_request($request) : self\n {\n if (!isset($this->request)) {\n $this->request = $request;\n }\n return $this;\n }", "public function setLastRequest(RequestHandler $request): void\n {\n $this->base->lastApiRequest = $request;\n }", "public function withServerParameters(array $parameters): RequestInterface;", "public function setServer(ServerVO $server) {\n\t\t$this->server = $server;\n\t}", "public function match(ServerRequestInterface $request);", "public function getRequest(): RequestInterface\n {\n return $this->request;\n }", "public function getRequest(): RequestInterface\n {\n return $this->request;\n }", "public function setRequest(Request $request = null)\n {\n $this->request = $request;\n }", "public function setServer(Server $server)\n\t\t{\n\t\t\t$this->server = $server;\n\t\t}", "public function setServer($Server)\r\n {\r\n $this->Server = $Server;\r\n }", "public function getFromRequest(ServerRequestInterface $request);", "public function initialize(ServerRequestInterface $request, TypoScriptFrontendController $controller);", "public function setRequest(\\Zend_Controller_Request_Abstract $request)\n {\n $this->request = $request;\n\n return $this;\n }", "public function setServer(ResourceServer $server) {\n $this->server = $server;\n }", "public function setServer($server)\n {\n $this->server = $server;\n }", "public function __invoke(ServerRequestInterface $request, ResponseInterface $response, $args);", "public function register(\n ServerRequestInterface $request, ResponseInterface $response\n );", "public function sendRequest(RequestInterface $request): ResponseInterface;", "protected function setMethod(string $method): RequestInterface\n {\n $this->method = $method;\n return $this;\n }", "public function setRequestFactory(RequestFactoryInterface $factory)\n {\n $this->requestFactory = $factory;\n\n return $this;\n }" ]
[ "0.8789558", "0.78180313", "0.77397805", "0.76855034", "0.74649894", "0.7052358", "0.6970045", "0.68101746", "0.67305535", "0.66011596", "0.65865564", "0.6568458", "0.6544348", "0.64832836", "0.6470893", "0.64315104", "0.6385715", "0.63439685", "0.63439685", "0.6340564", "0.63030493", "0.6259971", "0.6251736", "0.6237574", "0.6230486", "0.6214483", "0.62110156", "0.6202675", "0.6112948", "0.610075", "0.60973644", "0.6085462", "0.6085462", "0.6035826", "0.6018952", "0.59947574", "0.597534", "0.597032", "0.5961176", "0.5934785", "0.5922118", "0.5914252", "0.5905287", "0.5901586", "0.58998317", "0.58886087", "0.5841701", "0.5836934", "0.58301175", "0.58251643", "0.58251643", "0.58240294", "0.5823141", "0.5818303", "0.5795346", "0.5780047", "0.5780047", "0.5780047", "0.5780047", "0.5780047", "0.577598", "0.577462", "0.5770915", "0.5757791", "0.57576233", "0.5748815", "0.5746259", "0.57434016", "0.57176477", "0.5713094", "0.5711194", "0.57075036", "0.5688745", "0.56810313", "0.5678655", "0.56696844", "0.5664656", "0.56553465", "0.5645169", "0.56357867", "0.5631996", "0.5617014", "0.56120974", "0.5606567", "0.5598283", "0.55870664", "0.55870664", "0.5581786", "0.55750054", "0.5571674", "0.5569608", "0.55689746", "0.5564753", "0.5542435", "0.554171", "0.55395323", "0.55290127", "0.55209154", "0.5513304", "0.5507425" ]
0.82014227
1
/ 2.6 IMG ALT TAG ATTACHMENT /
/ 2.6 IMG ALT TAG ATTACHMENT /
function IMGalt_Attachment($attributes, $attachment){ // print_r($attributes); // print_r($attachment); // get up to date alt attribute $alt = SELF::getAltAttribute($attachment->ID); // set alt tag $attributes['alt'] = $alt; // output return $attributes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_image_send_to_editor($id, $caption, $title, $align, $url = '', $rel = \\false, $size = 'medium', $alt = '')\n {\n }", "function custom_send_image_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt ) {\n\n\t$url = wp_get_attachment_url($id);\n\n\t$html_str = '<div class=\"align-' . esc_attr($align) . '\">';\n\n \t\t$html_str .= \"<p><img src='$url' alt='$title' /></p>\";\n\n\t\tif($caption) $html_str .= '\n\t\t<p class=\"wp-caption-text\">' . $caption . '</p>\n\t\t';\n\n\t$html_str .= '</div>';\n\n return $html_str;\n}", "public function getImageTag();", "function IMGalt_Content($content) {\n if($content):\n // encode content\n $content = mb_convert_encoding($content, 'HTML-ENTITIES', \"UTF-8\");\n $document = new \\DOMDocument();\n // Disable libxml errors and allow user to fetch error information as needed\n libxml_use_internal_errors(true);\n $document->loadHTML(utf8_decode($content), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);\n // get img tag from content\n $images = $document->getElementsByTagName('img');\n foreach ($images as $image) {\n // get orginal from srcset\n if( $image->hasAttribute('srcset') ):\n $orginal = '';\n // get srcset from content and explode to array\n $srcset = $image->getAttribute('srcset');\n $srcset_array = explode(\", \", $srcset);\n // get orginal size\n foreach ($srcset_array as $key => $value) {\n $single_srcset = explode(\" \", $value);\n $src_size = str_replace(\"w\", \"\", end($single_srcset));\n if(strpos($single_srcset[0], $src_size) !== false):\n // not the orginal size\n // $orginal .= $single_srcset[0] . ' ' . $src_size;\n else:\n $orginal .= $single_srcset[0];\n endif;\n }\n else:\n $orginal = strpos($image->getAttribute('src'), 'http') !== false ? $image->getAttribute('src') : get_option( 'siteurl' ) . $image->getAttribute('src');\n endif;\n // get orginal img id and call alt\n $id = attachment_url_to_postid($orginal);\n $alt = SELF::getAltAttribute($id);\n $image->removeAttribute('alt');\n $image->setAttribute('alt', $alt);\n }\n // output\n return $document->saveHTML();\n endif;\n }", "function attachment_image_attributes_aload($attr) {\n\n if ( isset($attr['data-aload-on']) ) :\n\n $attr['data-aload'] = $attr['src'];\n $attr['src'] = 'data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==';\n\n if ( $attr['srcset'] ) :\n $attr['data-aload-set'] = $attr['srcset'];\n $attr['srcset'] = 'data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==';\n endif;\n endif;\n return $attr;\n}", "function cbv_get_image_alt( $url ){\n if( isset( $url ) ){\n $output = '';\n $id = attachment_url_to_postid($url);\n $image_title = get_the_title($id);\n $image_alt = get_post_meta( $id, '_wp_attachment_image_alt', true);\n if( empty( $image_alt ) ){\n $image_alt = $image_title;\n }\n $image_alt = str_replace('-', ' ', $image_alt);\n $output = $image_alt;\n\n return $output;\n }\n return false;\n}", "function acd_add_img_title( $attr, $attachment = null ) {\n\t$img_title = trim( strip_tags( $attachment->post_title ) );\n\t$img_title = str_replace(\"-\", \" \", $img_title); //remove hyphens\n\t$img_title = str_replace(\"_\", \" \", $img_title); //remove underscores\n\t$img_title = preg_replace('/[0-9]+/', '', $img_title); //remove numbers\n\t$img_title = ucwords($img_title); //capitalize first letter of each word\n\n\t$attr['title'] = $img_title; //add image title attribute\n\t// or get the title instead of image title $attr['title'] = the_title_attribute( 'echo=0' );\n\t$attr['alt'] = $img_title; //add alt attribute\n\treturn $attr;\n}", "function wp_get_attachment_link($post = 0, $size = 'thumbnail', $permalink = \\false, $icon = \\false, $text = \\false, $attr = '')\n {\n }", "function minorite_image($variables) {\n $attributes = $variables['attributes'];\n $attributes['src'] = file_create_url($variables['path']);\n\n foreach (array('alt', 'title') as $key) {\n\n if (isset($variables[$key])) {\n $attributes[$key] = $variables[$key];\n }\n }\n\n return '<img' . drupal_attributes($attributes) . ' />';\n}", "public function get_image_link()\n {\n }", "function cbv_get_image_tag( $id, $size = 'full', $title = false ){\n\tif( isset( $id ) ){\n\t\t$output = '';\n\t\t$image_title = get_the_title($id);\n\t\t$image_alt = get_post_meta( $id, '_wp_attachment_image_alt', true);\n if( empty( $image_alt ) ){\n $image_alt = $image_title;\n }\n\t\t$image_src = wp_get_attachment_image_src( $id, $size, false );\n\n\t\tif( $title ){\n\t\t\t$output = '<img src=\"'.$image_src[0].'\" alt=\"'.$image_alt.'\" title=\"'.$image_title.'\">';\n\t\t}else{\n\t\t\t$output = '<img src=\"'.$image_src[0].'\" alt=\"'.$image_alt.'\">';\n\t\t}\n\n\t\treturn $output;\n\t}\n\treturn false;\n}", "function newsletter_image($ref, $size){\r\n\t\r\n\t$default_attr = array(\r\n\t\t'class'\t=> \"attachment-$size\",\r\n\t\t'alt' => trim(strip_tags( get_post_meta($ref, '_wp_attachment_image_alt', true) ))\r\n\t);\r\n\t\r\n\t$retour->image\t\t= wp_get_attachment_image( $ref, $size , false, $default_attr);\r\n\t$retour->legende\t= '<p style=\"font-family:Tahoma, Arial, sans-serif;color:#666666;font-size:11px;margin:7px 0;padding:0;font-style:italic;\">' . get_post_meta($ref, '_wp_attachment_image_alt', true) . '</p>';\r\n\t\r\n\treturn $retour;\r\n}", "function image($img,$attribute = array()){\r\n\t\t$tmp = '';\r\n\t\t$attribute = $this->convertStringAtt($attribute);\r\n\r\n\t\t$default = ''; $width = 0;\r\n\t\t$folder = ''; $height = 0;\r\n\r\n\t\t$att = array();\r\n\t\tif(isset($attribute['default'])){\r\n\t\t\t$att['default'] = $attribute['default'];\r\n\t\t\tunset($attribute['default']);\r\n\t\t}\r\n\t\tif(isset($attribute['folder'])){\r\n\t\t\t$att['folder'] = $attribute['folder'];\r\n\t\t\tunset($attribute['folder']);\r\n\t\t}\r\n\t\tif(isset($attribute['fixed'])){\r\n\t\t\t$att['fixed'] = $attribute['fixed'];\r\n\t\t\tunset($attribute['fixed']);\r\n\t\t}\r\n\t\tif(isset($attribute['absolute'])){\r\n\t\t\t$att['absolute'] = $attribute['absolute'];\r\n\t\t\tunset($attribute['absolute']);\r\n\t\t}\r\n\t\tif(isset($attribute['fullpath'])){\r\n\t\t\t$att['fullpath'] = $attribute['fullpath'];\r\n\t\t\tunset($attribute['fullpath']);\r\n\t\t}else{\r\n\t\t\t$att['fullpath'] = 'true';\r\n\t\t}\r\n\r\n\t\tBASIC::init()->imported('media.mod');\r\n\t\t$media = new BASIC_MEDIA($img, $att);\r\n\r\n\t\tif(isset($attribute['width'])) $width = $attribute['width'];\r\n\t\tif(isset($attribute['height'])) $height = $attribute['height'];\r\n\r\n\t\tif($media->info['type'] == 13 || $media->info['type'] == 4){\r\n\t\t\t$this->headSpecial('<!--[if IE]><script type=\"text/javascript\" src=\"'.BASIC::init()->ini_get('root_virtual').BASIC::init()->ini_get('basic_path').'scripts/flash/flash.js\" defer=\"defer\"></script><![endif]-->','Flash');\r\n\t\t}\r\n\t\treturn $media->view($width,$height,$attribute) . $tmp;\r\n\t}", "function getSrcAltImage($postID,$size=false){\n\t$imgID = get_post_thumbnail_id($postID);\n\t$img = wp_get_attachment_image_src($imgID,$size, false, '');\n\t$imgAlt = get_post_meta($imgID,'_wp_attachment_image_alt', true);\n\t$imgAttr = array(\n\t\t'url' => $img,\n\t\t'alt' => $imgAlt\n\t);\n\tif(is_shop()){\n\t\techo '<section class=\"shop-image\">';\n\t\techo '<img class=\"img-max\" src=\"' . $imgAttr['url'][0] . '\" alt=\"\" />';\n\t\techo '</section>';\n\t}else{\n\t\treturn $imgAttr;\n\t}\n}", "function image_add_caption($html, $id, $caption, $title, $align, $url, $size, $alt = '')\n {\n }", "public static function img($img, $alt, $title = '') {\r\n\t\t\t$file = WEB_ROOT . '/' . $img;\r\n\t\t\tif(!file_exists($file)) {\r\n\t\t\t\tABPF::logger()->error(\"Image file $file doesn't exist!\");\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\t\t\t$v = filemtime($file);\r\n\t\t\treturn sprintf('<img src=\"%s/%s?v=%d\" alt=\"%s\" title=\"%s\" />', BASE_URL, $img, $v, $alt, $title);\r\n\t\t}", "function dizzy_featured_ogimg () { \n\t $thumb = get_the_post_thumbnail($post->ID);\n\t\t$pattern= \"/(?<=src=['|\\\"])[^'|\\\"]*?(?=['|\\\"])/i\";\n\t\tpreg_match($pattern, $thumb, $thePath);\n\t\t$theSrc = $thePath[0];\n}", "protected function getImageAttributes() {}", "function get_attachment_icon_src($id = 0, $fullsize = \\false)\n {\n }", "function getName() \t\t { return 'NP_ImageCreateThumbnail'; }", "function iti_get_image_alt_from_url( $url = '' ) {\n\tglobal $wpdb;\n\n\t$url = esc_url( $url );\n\n\t/** @noinspection PhpUndefinedMethodInspection */\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $url ) );\n\n\t$post_id = isset( $attachment[0] ) ? $attachment[0] : 0;\n\t$alt = get_post_meta( absint( $post_id ), '_wp_attachment_image_alt', true );\n\n\treturn $alt;\n}", "function wp_img_tag_add_srcset_and_sizes_attr($image, $context, $attachment_id)\n {\n }", "function column_alt_text( $item ) {\r\n\t\tif ( isset( $item->mla_wp_attachment_image_alt ) ) {\r\n\t\t\tif ( is_array( $item->mla_wp_attachment_image_alt ) ) {\r\n\t\t\t\t$alt_text = $item->mla_wp_attachment_image_alt[0];\r\n\t\t\t} else {\r\n\t\t\t\t$alt_text = $item->mla_wp_attachment_image_alt;\r\n\t\t\t}\r\n\r\n\t\t\treturn sprintf( '<a href=\"%1$s\" title=\"' . __( 'Filter by', 'media-library-assistant' ) . ' &#8220;%2$s&#8221;\">%3$s</a>', esc_url( add_query_arg( array_merge( array(\r\n\t\t\t\t'page' => MLACore::ADMIN_PAGE_SLUG,\r\n\t\t\t\t'mla-metakey' => '_wp_attachment_image_alt',\r\n\t\t\t\t'mla-metavalue' => urlencode( $alt_text ),\r\n\t\t\t\t'heading_suffix' => urlencode( __( 'ALT Text', 'media-library-assistant' ) . ': ' . $alt_text ) \r\n\t\t\t), self::mla_submenu_arguments( false ) ), 'upload.php' ) ), esc_html( $alt_text ), esc_html( $alt_text ) );\r\n\t\t}\r\n\r\n\t\treturn '';\r\n\t}", "function swap_image($msg){\n\n\tif(preg_match(\"/\\[img ALT=('|\\\")(.*?)('|\\\")\\]([^\\[]*)\\[\\/img\\]/i\",$msg)){\n\t\t$msg=preg_replace(\"/\\[img ALT=('|\\\")(.*?)('|\\\")\\]([^\\[]*)\\[\\/img\\]/i\",\"$2\",$msg);\n\t}\n\nreturn $msg;\n}", "function essence_attachment_link( $link, $id ) {\n\tif ( is_feed() || is_admin() )\n\t\treturn $link;\n\n\t$post = get_post( $id );\n\n\tif ( 'image' == substr( $post->post_mime_type, 0, 5 ) )\n\t\treturn wp_get_attachment_url( $id );\n\telse\n\t\treturn $link;\n}", "function cws_get_alt_text( $image_url ) {\n\tglobal $wpdb;\n\n\tif( ! isset( $image_url ) ) {\n\t\techo \"Please add an image.\";\n\t\treturn;\n\t}\n\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $image_url ) );\n\t$alt_text = get_post_meta( $attachment[0], '_wp_attachment_image_alt', true );\n\t$alt_default = 'CWS default alt tag';\n\n\tif( ! empty( $alt_text ) ) {\n\t\treturn $alt_text;\n\t} else {\n\t\treturn $alt_default;\n\t}\n}", "function get_attachment_link($post = \\null, $leavename = \\false)\n {\n }", "function img( $src = '', $index_page = FALSE, $attributes = '' )\n\t{\n\t\tif ( ! is_array( $src ) )\n\t\t{\n\t\t\t$src = [ 'src' => $src ];\n\t\t}\n\n\t\t// If there is no alt attribute defined, set it to an empty string\n\t\tif ( ! isset( $src[ 'alt' ] ) )\n\t\t{\n\t\t\t$src[ 'alt' ] = '';\n\t\t}\n\n\t\t$img = '<img';\n\n\t\tforeach ( $src as $k => $v )\n\t\t{\n\t\t\tif ( $k === 'src' && ! preg_match( '#^([a-z]+:)?//#i', $v ) )\n\t\t\t{\n\t\t\t\tif ( $index_page === TRUE )\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"' . get_instance()->config->site_url( $v ) . '\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"' . \\O2System::$config->slash_item( 'base_url' ) . $v . '\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$img .= ' ' . $k . '=\"' . $v . '\"';\n\t\t\t}\n\t\t}\n\n\t\treturn $img . _stringify_attributes( $attributes ) . ' />';\n\t}", "protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }", "function bethel_filter_image_attributes_for_gallery ($attr, $attachment) {\n $attr ['id'] = \"gallery-image-id-{$attachment->ID}\";\n $attr ['class'] .= ' gallery-thumbnail';\n return $attr;\n}", "function img($src = '', $attributes = '', $index_page = false)\n\t{\n\t\tif ( ! is_array($src) )\n\t\t{\n\t\t\t$src = array('src' => $src);\n\t\t}\n\n\t\t// If there is no alt attribute defined, set it to an empty string\n\t\tif ( ! isset($src['alt']))\n\t\t{\n\t\t\t$src['alt'] = '';\n\t\t}\n\n\t\t$img = '<img';\n\n\t\tforeach ($src as $k => $v)\n\t\t{\n\t\t\tif ($k === 'src' && ! preg_match('#^(data:[a-z,;])|(([a-z]+:)?(?<!data:)//)#i', $v))\n\t\t\t{\n\t\t\t\tif ($index_page === true)\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"'.get_instance()->config->site_url($v).'\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"'.get_instance()->config->slash_item('base_url').$v.'\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$img .= ' '.$k.'=\"'.$v.'\"';\n\t\t\t}\n\t\t}\n\n\t\treturn $img._stringify_attributes($attributes).' />';\n\t}", "function IMG($img, $extra = '')\n{\n /**\n * An Image tag.\n *\n * Args:\n * $img (str): the image source\n * $extra (str): extra data in the tag - used for adding class / ID etc.\n */\n echo \"<img src='\" . $img . \"'\" ;\n if ($extra != '') {\n echo ' ' . $extra ;\n }\n echo '>' ;\n}", "function jcr_image_custom($atts)\n {\n global $thisimage;\n\n assert_image();\n\n extract(lAtts(array(\n 'escape' => 'html',\n ), $atts));\n\n return ($escape == 'html')\n ? txpspecialchars($thisimage['jcr_image_custom'])\n : $thisimage['jcr_image_custom'];\n }", "function photonfill_get_image_attribute( $attachment_id, $img_size = 'full', $attr_name = 'srcset' ) {\n\treturn Photonfill()->get_responsive_image_attribute( $attachment_id, $img_size, $attr_name );\n}", "public function getAlt()\n {\n return $this->alt;\n }", "function load_image_to_edit($attachment_id, $mime_type, $size = 'full')\n {\n }", "private function getImg()\n\t{\n\t\t$buffer = '&nbsp;';\n\t\t\n\t\tif(!$this->aImg['sFilename'])\n\t\t\treturn $buffer;\n\t\t\n\t\t$buffer = '<img src=\"../../thumbs/'.$this->aImg['sFilename'].'\" />';\t\t\n\t\t\n\t\treturn $buffer;\n\t}", "function img_tag($src, array $attributes = array())\r\n{\r\n $attributes['src'] = $src;\r\n\r\n return tag('img', $attributes);\r\n}", "function my_post_image_html( $html, $post_id, $post_image_id )\r\n{\r\n\t$src = wp_get_attachment_image_src ( get_post_thumbnail_id ( $post_id ));\r\n\t\r\n\t$html = '<img src=\"'.$src[0].'\" alt=\"'.esc_attr( get_post_field( 'post_title', $post_id ) ).'\">';\r\n\t\r\n\treturn $html;\r\n}", "function _imageTitle($img) {\n global $ID;\n\n // some fixes on $img['src']\n // see internalmedia() and externalmedia()\n list($img['src']) = explode('#', $img['src'], 2);\n if($img['type'] == 'internalmedia') {\n resolve_mediaid(getNS($ID), $img['src'], $exists ,$this->date_at, true);\n }\n\n return $this->_media(\n $img['src'],\n $img['title'],\n $img['align'],\n $img['width'],\n $img['height'],\n $img['cache']\n );\n }", "function image($path, $phpThumbAttributes = array(), $htmlAttributes = array(), $useAltSyntax = false) {\n $thumb_attr = NULL;\n $w = NULL;\n $h = NULL;\n\n foreach ($phpThumbAttributes as $attr => $value) {\n if ($useAltSyntax) {\n if ($attr == 'w' || $attr == 'h') {\n $res = $attr;\n $$res = $value;\n } else {\n $thumb_attr .= $attr.'='.$value.';';\n }\n } else {\n $thumb_attr .= '&'.$attr.'='.$value;\n }\n }\n\n if ($useAltSyntax) {\n $thumb_path = $this->phpThumb.'/'.$thumb_attr.$w.'x'.$h.';'.$path;\n } else {\n $thumb_path = $this->phpThumb.'&src='.$path.$thumb_attr;\n }\n\n return $this->Html->image($thumb_path, $htmlAttributes);\n }", "function image_media_send_to_editor($html, $attachment_id, $attachment)\n {\n }", "function wp_get_attachment_image_url($attachment_id, $size = 'thumbnail', $icon = \\false)\n {\n }", "public static function getAltAttribute(int $id = 0){\n // vars\n $output = '';\n $lang = prefix_core_BaseFunctions::getCurrentLang();\n // check if active lang is default or not\n if($lang == SELF::$WPimgAttr_Alt_languages[0]):\n // default language\n $output .= get_post_meta($id, '_wp_attachment_image_alt', TRUE);\n else:\n // alternative text\n $name = SELF::$WPimgAttr_Alt_prefix . $lang;\n $output .= get_post_meta($id, $name, true);\n endif;\n // output\n return $output;\n }", "public function get_image_attached($post){\n\t\n\tpreg_match_all('/src=([\"\\'])(.*?)\\1/', $post, $matches);\n\t$img = $matches[2];\n\t\n\treturn $img;\n\t\n\treturn false;\n }", "function img($personid, $personimageid, $thumb) {\n\n\tif(isset($thumb)) {\n\t\t$class = $thumb;\n\t\t$thumb=\"&type=$thumb\";\n\t} else {\n\t\t$class = $thumb;\n\t\t$thumb = \"\";\n\t}\n\n\t$raw = \"picture.php?person_id=$personid&person_image_id=$personimageid\";\n\t$src = \"$raw$thumb\";\n\n\treturn(\"<a href=\\\"contact.php?person_id=$personid\\\"><img alt=\\\"person\\\" src=\\\"$src\\\" class=\\\"$class\\\" /></a>\");\n}", "function Image ($source, $title=\"\", $height, $hidth=\"\", $align=\"center\", $border=0, $valign=\"middle\", $class=\"\", \n\t\t\t$id=\"\", $name=\"\", $onAction1=\"\", $onType2=\"\", $onAction2 =\"\", $onAction3=\"\") {\n\t\t$this ->tag = '<img src=\" '.$source .' \" ';\n\t\tif ($name) $this->tag.='name=\" '.$name.' \" ';\n\t\tif ($height ==\"\") $height=16;\n\t\tif ($width ==\"\") $width=16;\n\t\t$this->tag .= 'height=\"' .$height. '\" width= \"'. $width.'\" ';\n\n\t\t$this->tag .='border=\"$border\" . ';\n\t\tif ($class) $this->tag .= 'border =\"'.$border.'\" ';\n\t\tif ($id)\t $this->tag .= 'class=\"'.class. '\" ';\n\t\tif ($title) $this ->tag .= 'title=\"' .$stitle.'\" alt=\"'.$title.'\" ';\n\t\tif ($align) $this ->tag .= 'align= 'align=\"'.$align. .'\" '';\n\t\t\n\n\n\n\t}", "public function actionimages()\n {\n $module = \"DocumentAttachments\";\n $urlquerystring = $_SERVER['QUERY_STRING'];\n $paraArr = explode(\"/\", $urlquerystring);\n $ticketId = $paraArr['2'];\n $model = new Troubleticket;\n $imagedata = $model->getimage($module, $ticketId);\n header(\"Content-Type: image/jpeg\");\n header(\"Content-Disposition: inline;filename=\" . $imagedata['result']['filename']);\n echo base64_decode($imagedata['result'][filecontent]);\n die;\n }", "function img($file = NULL, $attrs = '', $folder = NULL)\n {\n if (strlen($file) > 0) {\n return '<img src=\"'.img_url($file, $folder).'\"'._stringify_attributes($attrs).' />';\n }\n return NULL;\n }", "public function img($src = \"\", $alt = \"\") {\n echo \"<img src=assets/img/'\" . $src . \"' alt='\" . $alt . \"'>\";\n }", "function imagecustom($im, $text) {\n}", "public function alt(){\n\t\tif( $this->alt ) {\n\t\t\treturn $this->alt;\n\t\t}//end if\n\n\t\t$this->alt = @file_get_contents( $this->base_dir.'/'.$this->dir . $this->filename . '.alt');\n\n\t\treturn $this->alt;\n\t}", "function the_attachment_link($post = 0, $fullsize = \\false, $deprecated = \\false, $permalink = \\false)\n {\n }", "public function fullTextImage(){\n if(isset($this->imageFullText)){\n return $this->imageFullText;\n }\n $this->fetchFullTextImage();\n return $this->imageFullText;\n }", "function wp_img_tag_add_width_and_height_attr($image, $context, $attachment_id)\n {\n }", "public function set_embedded_image($cid, $file, $alias = '');", "function get_header_image_tag($attr = array())\n {\n }", "public function displayImgTag() {\n $urlimg = \"/plugins/graphontrackers/reportgraphic.php?_jpg_csimd=1&group_id=\".(int)$this->graphic_report->getGroupId().\"&atid=\". $this->graphic_report->getAtid();\n $urlimg .= \"&report_graphic_id=\".$this->graphic_report->getId().\"&id=\".$this->getId();\n \n \n echo '<img src=\"'. $urlimg .'\" ismap usemap=\"#map'. $this->getId() .'\" ';\n if ($this->width) {\n echo ' width=\"'. $this->width .'\" ';\n }\n if ($this->height) {\n echo ' height=\"'. $this->height .'\" ';\n }\n echo ' alt=\"'. $this->title .'\" border=\"0\">';\n }", "function get_attachment_icon($id = 0, $fullsize = \\false, $max_dims = \\false)\n {\n }", "function do_comcode_attachments($original_comcode,$type,$id,$previewing_only=false,$connection=NULL,$insert_as_admin=NULL,$for_member=NULL)\n{\n\trequire_lang('comcode');\n\n\tglobal $COMCODE_ATTACHMENTS;\n\tunset($COMCODE_ATTACHMENTS[$id]); // In case we have some kind of conflict\n\n\tif (is_null($connection)) $connection=$GLOBALS['SITE_DB'];\n\n\tif ($for_member!==NULL)\n\t{\n\t\t$member=$for_member;\n\t\tif (is_null($insert_as_admin)) $insert_as_admin=false;\n\t} else\n\t{\n\t\tif (function_exists('get_member'))\n\t\t{\n\t\t\t$member=get_member();\n\t\t\tif (is_null($insert_as_admin)) $insert_as_admin=false;\n\t\t} else\n\t\t{\n\t\t\t$member=0;\n\t\t\tif (is_null($insert_as_admin)) $insert_as_admin=true;\n\t\t}\n\t}\n\n\t$comcode_text=(substr($original_comcode,0,8)!='<comcode');\n\n\t// Handle data URLs for attachment embedding\n\tif ((function_exists('imagecreatefromstring')) && (strpos($original_comcode,'[html]')===false))\n\t{\n\t\t$matches=array();\n\t\t$matches2=array();\n\t\t$num_matches=preg_match_all('#<img[^<>]*src=\"data:image/\\w+;base64,([^\"]*)\"[^<>]*>#',$original_comcode,$matches);\n\t\t$num_matches2=preg_match_all('#\\[img[^\\[\\]]*\\]data:image/\\w+;base64,([^\"]*)\\[/img\\]#',$original_comcode,$matches2);\n\t\tfor ($i=0;$i<$num_matches2;$i++)\n\t\t{\n\t\t\t$matches[0][$num_matches]=$matches2[0][$i];\n\t\t\t$matches[1][$num_matches]=$matches2[1][$i];\n\t\t\t$num_matches++;\n\t\t}\n\t\tfor ($i=0;$i<$num_matches;$i++)\n\t\t{\n\t\t\tif (strpos($original_comcode,$matches[0][$i])!==false) // Check still here (if we have same image in multiple places, may have already been attachment-ified)\n\t\t\t{\n\t\t\t\t$data=@base64_decode($matches[1][$i]);\n\t\t\t\tif (($data!==false) && (function_exists('imagepng')))\n\t\t\t\t{\n\t\t\t\t\t$image=@imagecreatefromstring($data);\n\t\t\t\t\tif ($image!==false)\n\t\t\t\t\t{\n\t\t\t\t\t\tdo\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$new_filename=uniqid('',true).'.png';\n\t\t\t\t\t\t\t$new_path=get_custom_file_base().'/uploads/attachments/'.$new_filename;\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile (file_exists($new_path));\n\t\t\t\t\t\timagepng($image,$new_path);\n\t\n\t\t\t\t\t\t$attachment_id=$GLOBALS['SITE_DB']->query_insert('attachments',array(\n\t\t\t\t\t\t\t'a_member_id'=>get_member(),\n\t\t\t\t\t\t\t'a_file_size'=>strlen($data),\n\t\t\t\t\t\t\t'a_url'=>'uploads/attachments/'.$new_filename,\n\t\t\t\t\t\t\t'a_thumb_url'=>'',\n\t\t\t\t\t\t\t'a_original_filename'=>basename($new_filename),\n\t\t\t\t\t\t\t'a_num_downloads'=>0,\n\t\t\t\t\t\t\t'a_last_downloaded_time'=>time(),\n\t\t\t\t\t\t\t'a_description'=>'',\n\t\t\t\t\t\t\t'a_add_time'=>time()),true);\n\t\t\t\t\t\t$GLOBALS['SITE_DB']->query_insert('attachment_refs',array('r_referer_type'=>$type,'r_referer_id'=>$id,'a_id'=>$attachment_id));\n\t\n\t\t\t\t\t\t$original_comcode=str_replace($matches[0][$i],'[attachment type=\"inline\" thumb=\"0\"]'.strval($attachment_id).'[/attachment]',$original_comcode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tglobal $ATTACHMENTS_ALREADY_REFERENCED;\n\t$old_already=$ATTACHMENTS_ALREADY_REFERENCED;\n\t$ATTACHMENTS_ALREADY_REFERENCED=array();\n\t$before=$connection->query_select('attachment_refs',array('a_id','id'),array('r_referer_type'=>$type,'r_referer_id'=>$id));\n\tforeach ($before as $ref)\n\t{\n\t\t$ATTACHMENTS_ALREADY_REFERENCED[$ref['a_id']]=1;\n\t}\n\n\t$has_one=false;\n\t$may_have_one=false;\n\tforeach($_POST as $key=>$value)\n\t{\n\t\tif (is_string($key) && preg_match('#^hidFileID\\_#i',$key)!=0)\n\t\t{\n\t\t\trequire_code('uploads');\n\t\t\t$may_have_one=is_swf_upload();\n\t\t}\n\t}\n\tif ($may_have_one)\n\t{\n\t\trequire_code('uploads');\n\t\tis_swf_upload(true);\n\n\t\trequire_code('comcode_from_html');\n\t\t$original_comcode=preg_replace_callback('#<input [^>]*class=\"ocp_keep_ui_controlled\" [^>]*title=\"([^\"]*)\" [^>]*type=\"text\" [^>]*value=\"[^\"]*\"[^>]*/?'.'>#siU','debuttonise',$original_comcode);\n\t}\n\t$myfile=mixed();\n\tforeach ($_FILES as $key=>$file)\n\t{\n\t\t$matches=array();\n\t\tif ((($may_have_one) && (is_swf_upload()) || (is_uploaded_file($file['tmp_name']))) && (preg_match('#file(\\d+)#',$key,$matches)!=0))\n\t\t{\n\t\t\t$has_one=true;\n\n\t\t\t$atype=post_param('attachmenttype'.$matches[1],'');\n\t\t\t$is_extract=(preg_match('#\\[attachment [^\\]]*type=\"\\w+_extract\"[^\\]]*\\]new_'.$matches[1].'\\[/#',$original_comcode)!=0) || (preg_match('#<attachment [^>]*type=\"\\w+_extract\"[^>]*>new_'.$matches[1].'</#',$original_comcode)!=0);\n\n\t\t\tif ((substr($atype,-8)=='_extract') || ($is_extract))\n\t\t\t{\n\t\t\t\trequire_code('uploads');\n\t\t\t\trequire_code('files');\n\t\t\t\trequire_code('files2');\n\t\t\t\t$thumb=(preg_match('#\\[(attachment|attachment_safe) [^\\]]*thumb=\"1\"[^\\]]*\\]new_'.$matches[1].'\\[/#',$original_comcode)!=0) || (preg_match('#<(attachment|attachment_safe) [^>]*thumb=\"1\"[^>]*>new_'.$matches[1].'</#',$original_comcode)!=0);\n\n\t\t\t\t$arcext=get_file_extension($_FILES[$key]['name']);\n\t\t\t\tif (($arcext=='tar') || ($arcext=='zip'))\n\t\t\t\t{\n\t\t\t\t\tif ($arcext=='tar')\n\t\t\t\t\t{\n\t\t\t\t\t\trequire_code('tar');\n\t\t\t\t\t\t$myfile=tar_open($file['tmp_name'],'rb');\n\t\t\t\t\t\t$dir=tar_get_directory($myfile,true);\n\t\t\t\t\t} elseif ($arcext=='zip')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ((!function_exists('zip_open')) && (get_option('unzip_cmd')=='')) warn_exit(do_lang_tempcode('ZIP_NOT_ENABLED'));\n\t\t\t\t\t\tif (!function_exists('zip_open'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trequire_code('m_zip');\n\t\t\t\t\t\t\t$mzip=true;\n\t\t\t\t\t\t} else $mzip=false;\n\n\t\t\t\t\t\t$myfile=zip_open($file['tmp_name']);\n\t\t\t\t\t\tif (is_integer($myfile))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trequire_code('failure');\n\t\t\t\t\t\t\twarn_exit(zip_error($myfile,$mzip));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dir=array();\n\t\t\t\t\t\twhile (($zip_entry=zip_read($myfile))!==false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$dir[]=array(\n\t\t\t\t\t\t\t\t'zip_entry'=>$zip_entry,\n\t\t\t\t\t\t\t\t'path'=>zip_entry_name($zip_entry),\n\t\t\t\t\t\t\t\t'size'=>zip_entry_filesize($zip_entry),\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\tif (count($dir)>100)\n\t\t\t\t\t{\n\t\t\t\t\t\trequire_code('site');\n\t\t\t\t\t\tattach_message(do_lang_tempcode('TOO_MANY_FILES_TO_EXTRACT'),'warn');\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($dir as $entry)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (substr($entry['path'],-1)=='/') continue; // Ignore folders\n\n\t\t\t\t\t\t\t$_file=preg_replace('#\\..*\\.#','.',basename($entry['path']));\n\n\t\t\t\t\t\t\tif (!check_extension($_file,false,NULL,true)) continue;\n\t\t\t\t\t\t\tif (should_ignore_file($entry['path'],IGNORE_ACCESS_CONTROLLERS | IGNORE_HIDDEN_FILES)) continue;\n\n\t\t\t\t\t\t\t$place=get_custom_file_base().'/uploads/attachments/'.$_file;\n\t\t\t\t\t\t\t$i=2;\n\t\t\t\t\t\t\t// Hunt with sensible names until we don't get a conflict\n\t\t\t\t\t\t\twhile (file_exists($place))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_file=strval($i).basename($entry['path']);\n\t\t\t\t\t\t\t\t$place=get_custom_file_base().'/uploads/attachments/'.$_file;\n\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$i=2;\n\t\t\t\t\t\t\t$_file_thumb=basename($entry['path']);\n\t\t\t\t\t\t\t$place_thumb=get_custom_file_base().'/uploads/attachments_thumbs/'.$_file_thumb;\n\t\t\t\t\t\t\t// Hunt with sensible names until we don't get a conflict\n\t\t\t\t\t\t\twhile (file_exists($place_thumb))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_file_thumb=strval($i).basename($entry['path']);\n\t\t\t\t\t\t\t\t$place_thumb=get_custom_file_base().'/uploads/attachments_thumbs/'.$_file_thumb;\n\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ($arcext=='tar')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$file_details=tar_get_file($myfile,$entry['path'],false,$place);\n\t\t\t\t\t\t\t} elseif ($arcext=='zip')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tzip_entry_open($myfile,$entry['zip_entry']);\n\t\t\t\t\t\t\t\t$file_details=array(\n\t\t\t\t\t\t\t\t\t'size'=>$entry['size'],\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$out_file=@fopen($place,'wb') OR intelligent_write_error($place);\n\t\t\t\t\t\t\t\t$more=mixed();\n\t\t\t\t\t\t\t\tdo\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$more=zip_entry_read($entry['zip_entry']);\n\t\t\t\t\t\t\t\t\tif ($more!==false)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (fwrite($out_file,$more)<strlen($more)) warn_exit(do_lang_tempcode('COULD_NOT_SAVE_FILE'));\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\twhile (($more!==false) && ($more!=''));\n\t\t\t\t\t\t\t\tfclose($out_file);\n\n\t\t\t\t\t\t\t\tzip_entry_close($entry['zip_entry']);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$description=do_lang('EXTRACTED_FILE');\n\t\t\t\t\t\t\tif (strpos($entry['path'],'/')!==false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$description=do_lang('EXTRACTED_FILE_PATH',dirname($entry['path']));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Thumbnail\n\t\t\t\t\t\t\t$thumb_url='';\n\t\t\t\t\t\t\trequire_code('images');\n\t\t\t\t\t\t\tif (is_image($_file))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$gd=((get_option('is_on_gd')=='1') && (function_exists('imagetypes')));\n\t\t\t\t\t\t\t\tif ($gd)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\trequire_code('images');\n\t\t\t\t\t\t\t\t\tif (!is_saveable_image($_file)) $ext='.png'; else $ext='.'.get_file_extension($_file);\n\t\t\t\t\t\t\t\t\t$thumb_url='uploads/attachments_thumbs/'.$_file_thumb;\n\t\t\t\t\t\t\t\t\tconvert_image(get_custom_base_url().'/uploads/attachments/'.$_file,$place_thumb,-1,-1,intval(get_option('thumb_width')),true,NULL,false,true);\n\n\t\t\t\t\t\t\t\t\tif ($connection->connection_write!=$GLOBALS['SITE_DB']->connection_write) $thumb_url=get_custom_base_url().'/'.$thumb_url;\n\t\t\t\t\t\t\t\t} else $thumb_url='uploads/attachments/'.$_file;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$url='uploads/attachments/'.$_file;\n\t\t\t\t\t\t\tif (addon_installed('galleries'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\trequire_code('images');\n\t\t\t\t\t\t\t\tif ((is_video($url)) && ($connection->connection_read==$GLOBALS['SITE_DB']->connection_read))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\trequire_code('transcoding');\n\t\t\t\t\t\t\t\t\t$url=transcode_video($url,'attachments','a_url','a_original_filename',NULL,NULL);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$attachment_id=$connection->query_insert('attachments',array(\n\t\t\t\t\t\t\t\t'a_member_id'=>get_member(),\n\t\t\t\t\t\t\t\t'a_file_size'=>$file_details['size'],\n\t\t\t\t\t\t\t\t'a_url'=>$url,\n\t\t\t\t\t\t\t\t'a_thumb_url'=>$thumb_url,\n\t\t\t\t\t\t\t\t'a_original_filename'=>basename($entry['path']),\n\t\t\t\t\t\t\t\t'a_num_downloads'=>0,\n\t\t\t\t\t\t\t\t'a_last_downloaded_time'=>time(),\n\t\t\t\t\t\t\t\t'a_description'=>$description,\n\t\t\t\t\t\t\t\t'a_add_time'=>time()),true);\n\t\t\t\t\t\t\t$connection->query_insert('attachment_refs',array('r_referer_type'=>$type,'r_referer_id'=>$id,'a_id'=>$attachment_id));\n\n\t\t\t\t\t\t\tif ($comcode_text)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$original_comcode.=chr(10).chr(10).'[attachment type=\"'.comcode_escape(str_replace('_extract','',$atype)).'\" description=\"'.comcode_escape($description).'\" thumb=\"'.($thumb?'1':'0').'\"]'.strval($attachment_id).'[/attachment]';\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\trequire_code('comcode_xml');\n\t\t\t\t\t\t\t\t//$original_comcode.=chr(10).chr(10).'<attachment type=\"'.comcode_escape(str_replace('_extract','',$atype)).'\" thumb=\"'.($thumb?'1':'0').'\"><attachmentDescription>'.comcode_text__to__comcode_xml($description).'</attachmentDescription>'.strval($attachment_id).'</attachment>';\t\t\tWould go in bad spot\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\tif ($arcext=='tar')\n\t\t\t\t\t{\n\t\t\t\t\t\ttar_close($myfile);\n\t\t\t\t\t} elseif ($arcext=='zip')\n\t\t\t\t\t{\n\t\t\t\t\t\tzip_close($myfile);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif ((strpos($original_comcode,']new_'.$matches[1].'[/attachment]')===false) && (strpos($original_comcode,'>new_'.$matches[1].'</attachment>')===false) && (strpos($original_comcode,']new_'.$matches[1].'[/attachment_safe]')===false) && (strpos($original_comcode,'>new_'.$matches[1].'</attachment_safe>')===false))\n\t\t\t\t{\n\t\t\t\t\tif ((preg_match('#\\]\\d+\\[/attachment\\]#',$original_comcode)==0) && (preg_match('#>\\d+</attachment>#',$original_comcode)==0)) // Attachment could have already been put through (e.g. during a preview). If we have actual ID's referenced, it's almost certainly the case.\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($comcode_text)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$original_comcode.=chr(10).chr(10).'[attachment]new_'.$matches[1].'[/attachment]';\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//$original_comcode.=chr(10).chr(10).'<attachment>new_'.$matches[1].'</attachment>';\t\tWould go in bad spot\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}\n\n\tglobal $LAX_COMCODE;\n\t$temp=$LAX_COMCODE;\n\tif ($has_one) $LAX_COMCODE=true; // We don't want a simple syntax error to cause us to lose our attachments\n\t$tempcode=comcode_to_tempcode($original_comcode,$member,$insert_as_admin,60,$id,$connection,false,false,false,false,false,NULL,$for_member);\n\t$LAX_COMCODE=$temp;\n\t$ATTACHMENTS_ALREADY_REFERENCED=$old_already;\n\n\t/*if ((array_key_exists($id,$COMCODE_ATTACHMENTS)) && (array_key_exists(0,$COMCODE_ATTACHMENTS[$id])))\n\t{\n\t\t$original_comcode=$COMCODE_ATTACHMENTS[$id][0]['comcode'];\n\t}*/\n\n\t$new_comcode=$original_comcode;\n\n\tif (array_key_exists($id,$COMCODE_ATTACHMENTS))\n\t{\n\t\t$ids_present=array();\n\t\tfor ($i=0;$i<count($COMCODE_ATTACHMENTS[$id]);$i++)\n\t\t{\n\t\t\t$attachment=$COMCODE_ATTACHMENTS[$id][$i];\n\n\t\t\t// If it's a new one, we need to change the comcode to reference the ID we made for it\n\t\t\tif ($attachment['type']=='new')\n\t\t\t{\n\t\t\t\t$marker=$attachment['marker'];\n//\t\t\t\techo $marker.'!'.$new_comcode;\n\t\t\t\t$a_id=$attachment['id'];\n\n\t\t\t\t$old_length=strlen($new_comcode);\n\n\t\t\t\t// Search backwards from $marker\n\t\t\t\t$tag_end_start=$marker-strlen('[/'.$attachment['tag_type'].']'); // </attachment> would be correct if it is Comcode-XML, but they have the same length, so it's irrelevant\n\t\t\t\t$tag_start_end=$tag_end_start;\n\t\t\t\twhile (($tag_start_end>1) && ((!isset($new_comcode[$tag_start_end-1])) || (($new_comcode[$tag_start_end-1]!=']') && ($new_comcode[$tag_start_end-1]!='>')))) $tag_start_end--;\n\t\t\t\t$param_keep=substr($new_comcode,0,$tag_start_end-1);\n\t\t\t\t$end_keep=substr($new_comcode,$tag_end_start);\n\t\t\t\tif ($comcode_text)\n\t\t\t\t{\n\t\t\t\t\t$new_comcode=$param_keep;\n\t\t\t\t\tif (strpos(substr($param_keep,strrpos($param_keep,'[')),' type=')===false) $new_comcode.=' type=\"'.comcode_escape($attachment['attachmenttype']).'\"';\n\t\t\t\t\tif (strpos(substr($param_keep,strrpos($param_keep,'[')),' description=')===false) $new_comcode.=' description=\"'.comcode_escape($attachment['description']).'\"';\n\t\t\t\t\t$new_comcode.=']'.strval($a_id).$end_keep;\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\trequire_code('comcode_xml');\n\t\t\t\t\t$new_comcode=$param_keep;\n\t\t\t\t\tif (strpos(substr($param_keep,strrpos($param_keep,'<')),' type=')===false) $new_comcode.=' type=\"'.comcode_escape($attachment['attachmenttype']);\n\t\t\t\t\t$new_comcode.='\">';\n\t\t\t\t\tif (strpos(substr($param_keep,strrpos($param_keep,'<')),' description=')===false)\n\t\t\t\t\t{\n\t\t\t\t\t\trequire_code('comcode_xml');\n\t\t\t\t\t\t$new_comcode.='<attachmentDescription>'.comcode_text__to__comcode_xml($attachment['description'],true).'</attachmentDescription>';\n\t\t\t\t\t}\n\t\t\t\t\t$new_comcode.=strval($a_id).$end_keep;\n\t\t\t\t}\n//\t\t\t\techo $new_comcode.'<br />!<br />';\n\n\t\t\t\t// Update other attachment markers\n\t\t\t\t$dif=strlen($new_comcode)-$old_length;\n\t\t\t\tfor ($j=$i+1;$j<count($COMCODE_ATTACHMENTS[$id]);$j++)\n\t\t\t\t{\n//\t\t\t\t\techo $COMCODE_ATTACHMENTS[$id][$i]['marker'].'!';\n\t\t\t\t\t$COMCODE_ATTACHMENTS[$id][$j]['marker']+=$dif;\n\t\t\t\t}\n\n\t\t\t\tif (!is_null($type))\n\t\t\t\t\t$connection->query_insert('attachment_refs',array('r_referer_type'=>$type,'r_referer_id'=>$id,'a_id'=>$a_id));\n\t\t\t} else\n\t\t\t{\n\t\t\t\t// (Re-)Reference it\n\t\t\t\t$connection->query_delete('attachment_refs',array('r_referer_type'=>$type,'r_referer_id'=>$id,'a_id'=>$attachment['id']),'',1);\n\t\t\t\t$connection->query_insert('attachment_refs',array('r_referer_type'=>$type,'r_referer_id'=>$id,'a_id'=>$attachment['id']));\n\t\t\t}\n\n\t\t\t$ids_present[]=$attachment['id'];\n\t\t}\n\n\t\tif ((!$previewing_only) && (get_value('disable_attachment_cleanup')!=='1'))\n\t\t{\n\t\t\t// Clear any de-referenced attachments\n\t\t\tforeach ($before as $ref)\n\t\t\t{\n\t\t\t\tif ((!in_array($ref['a_id'],$ids_present)) && (strpos($new_comcode,'attachment.php?id=')===false) && (!multi_lang()))\n\t\t\t\t{\n\t\t\t\t\t// Delete reference (as it's not actually in the new comcode!)\n\t\t\t\t\t$connection->query_delete('attachment_refs',array('id'=>$ref['id']),'',1);\n\n\t\t\t\t\t// Was that the last reference to this attachment? (if so -- delete attachment)\n\t\t\t\t\t$test=$connection->query_value_null_ok('attachment_refs','id',array('a_id'=>$ref['a_id']));\n\t\t\t\t\tif (is_null($test))\n\t\t\t\t\t{\n\t\t\t\t\t\trequire_code('attachments3');\n\t\t\t\t\t\t_delete_attachment($ref['a_id'],$connection);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn array(\n\t\t'comcode'=>$new_comcode,\n\t\t'tempcode'=>$tempcode\n\t);\n}", "function newsdot_post_thumbnail() {\n\t\tif ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( is_singular() ) :\n\t\t\t?>\n\n\t\t\t<div class=\"post-thumbnail mb-4\">\n\t\t\t\t<figure>\n\t\t\t\t\t<?php\n\t\t\t\t\tthe_post_thumbnail();\n\t\t\t\t\tif ( get_the_post_thumbnail_caption() ) {\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<figcaption><?php the_post_thumbnail_caption(); ?></figcaption>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</figure>\n\t\t\t</div><!-- .post-thumbnail -->\n\n\t\t<?php else : ?>\n\n\t\t\t<a class=\"post-thumbnail\" href=\"<?php the_permalink(); ?>\" aria-hidden=\"true\" tabindex=\"-1\">\n\t\t\t\t<?php\n\t\t\t\t\tthe_post_thumbnail(\n\t\t\t\t\t\t'newsdot-wide-image',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'alt' => the_title_attribute(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'echo' => false,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</a>\n\n\t\t\t<?php\n\t\tendif; // End is_singular().\n\t}", "function file_image($imageType, $props = array(), $file = null)\n{\n if (!$file) {\n $file = get_current_record('file');\n }\n $fileMarkup = new Omeka_View_Helper_FileMarkup;\n return $fileMarkup->image_tag($file, $props, $imageType);\n}", "public function addImg ($src, $attributes = array ())\n\t{\n\t\tif (!preg_match('#^(\\w+://)# i', $src)) {\n\n\t\t\t// Trim the trailing slash\n\t\t\t$src = ltrim($src, \"\\t\\n\\r\");\n\t\t}\n\t\t$attributes['src'] = $src;\n\t\t$attributes['alt'] = (isset($attributes['alt'])) ? $attributes['alt'] : pathinfo($src, PATHINFO_FILENAME);\n\n\t\treturn html_tag('img', $attributes);\n\t}", "public function getAlt(): string\n {\n return htmlspecialchars($this->getDescription(), ENT_QUOTES);\n }", "public static function img($src = NULL, $alt = NULL) {\n\t\t// Create attribute list\n\t\t$attributes = is_array($src) ? $src : array('src' => $src);\n\n\t\tif (is_array($alt)) {\n\t\t\t$attributes += $alt;\n\t\t} elseif ( ! empty($alt)) {\n\t\t\t// Add alt to attributes\n\t\t\t$attributes['alt'] = $alt;\n\t\t}\n\t\tif(!isset($attributes['alt'])) $attributes['alt'] = '';\n\t\tif (strpos($attributes['src'], '://') === FALSE) {\n\t\t\t// Make the src attribute into an absolute URL\n\t\t\t$attributes['src'] = url::asset('img/'.$attributes['src']);\n\t\t}\n\n\t\treturn '<img'.html::attributes($attributes).'>';\n\t}", "function build_attach_image_html($type)\n\t{\n\t\tglobal $userdata, $template, $db, $SID, $lang, $phpEx, $phpbb_root_path, $garage_config, $board_config;\n\t\n\t\tif (!$this->check_permissions('UPLOAD',''))\n\t\t{\n\t\t\treturn ;\n\t\t}\n\t\n\t\t$maximum_image_file_size = $garage_config['max_image_kbytes'];\n\t\t$maximum_image_resolution = $garage_config['max_image_resolution'];\n\t\n\t\t$template->assign_vars(array(\n\t\t\t'L_IMAGE_ATTACH' => $lang['Image_Attach'],\n\t\t\t'L_MAXIMUM_IMAGE_FILE_SIZE' => $lang['Maximum_Image_File_Size'],\n\t\t\t'L_MAXIMUM_IMAGE_RESOLUTION' => $lang['Maximum_Image_Resolution'],\n\t\t\t'L_IMAGE_ATTACHMENTS' => $lang['Image_Attachments'],\n\t\t\t'L_ENTER_IMAGE_URL' => $lang['Enter_Image_Url'],\n\t\t\t'L_Kbytes' => $lang['kbytes'],\n\t\t\t'MAXIMUM_IMAGE_FILE_SIZE' => $maximum_image_file_size,\n\t\t\t'MAXIMUM_IMAGE_RESOLUTION' => $maximum_image_resolution,\n\t\t\t'Add_New_Image' => $lang['Add_New_Image'])\n\t\t);\n\t\n\t\tif ( $type == 'modification' )\n\t\t{\n\t\t\tif ( $garage_config['allow_mod_image'] ) \n\t\t\t{\n\t\t \t\t$template->assign_block_vars('allow_images', array());\n\t\t\t\tif ( $garage_config['allow_image_upload'] )\n\t\t\t\t{\n\t\t \t\t\t$template->assign_block_vars('allow_images.upload_images', array());\n\t\t\t\n\t\t\t\t}\n\t\t\t\tif ( $garage_config['allow_image_url'] )\n\t\t\t\t{\n\t\t \t\t\t$template->assign_block_vars('allow_images.remote_images', array());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if ( $type == 'vehicle' )\n\t\t{\n\t\t\tif ( $garage_config['allow_image_upload'] || $garage_config['allow_image_url'])\n\t\t\t{\n\t\t \t\t$template->assign_block_vars('allow_images', array());\n\t\t\t\tif ( $garage_config['allow_image_upload'] )\n\t\t\t\t{\n\t\t \t\t\t$template->assign_block_vars('allow_images.upload_images', array());\n\t\t\t\t}\n\t\t\t\tif ( $garage_config['allow_image_url'] )\n\t\t\t\t{\n\t\t \t\t\t$template->assign_block_vars('allow_images.remote_images', array());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn;\n\t}", "public static function image($url, $alt = '', $attributes = array()) {\n\t\t$attributes['alt'] = $alt;\n\n\t\treturn '<img src=\"'.URL::to_asset($url).'\"'.static::attributes($attributes).'>';\n\t}", "function set_caption($alt, $title, $iptc_caption, $filename)\n {\n $values = array($this->_params->get('caption_type_iptc') => $iptc_caption,\n $this->_params->get('caption_type_filename') => $filename,\n $this->_params->get('caption_type_title') => $title,\n $this->_params->get('caption_type_alt') => $alt);\n\n ksort($values);\n $caption = '';\n foreach ($values as $key => $val) {\n if ($key and $val) {\n $caption = $val;\n break;\n }\n }\n\n\n return $caption;\n }", "function putIMG($imgID) {\r\n // WIP\r\n}", "public function setAlt($alt)\n {\n $this->alt = $alt;\n $this->setAttributes(\"Alt\");\n }", "function attachment_preview($original) {\r\n\t\t\t$file = str_replace(get_site_url().'/','' ,$original);\r\n\t\t\t$file = str_replace('//','/',ABSPATH . $file);\r\n\t\t\t// check if file exists\r\n\t\t\tif (file_exists($file) && ($file != ABSPATH)) {\r\n\t\t\t\t$thumb = wp_get_attachment_image( $this->get_attachment_id($original), array(80,80),1);\r\n\t\t\t\t\r\n\t\t\t\t$ext = pathinfo($original, PATHINFO_EXTENSION);\r\n\t\t\t\t// If the file hasnt been upload through wordpress\r\n\t\t\t\tif (($this->get_attachment_id($original) == '') && ( in_array($ext ,$this->image_extensions))) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$size = getimagesize($file);\r\n\t\t\t\t\r\n\t\t\t\t\tif (($size[0] < 80) && ( $size[1] < 80)) {\r\n\t\t\t\t\t\t$thumb = \"<img src='\" . $original . \"' />\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$thumb = \"<img src='\" . wp_create_thumbnail( $file, 40 ) . \"' />\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//print var_export(wp_create_thumbnail( $file, 4 ),true);\r\n\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t\tprint \"<div class='option_preview' ><a href='\" . $original . \"'>\" . $this->filetourl($thumb) . \"<br/>\" .basename($original) . \"</a></div>\";\r\n\t\t\t}\r\n\t\t}", "function rex_com_mediaaccess_EP_images($params)\n{\n global $REX;\n\n if($params['extension_point'] == 'IMAGE_RESIZE_SEND')\n $file = $params['filename'];\n else\n $file = $params['img']['file'];\n\n ## get auth - isn't loaded yet\n require_once $REX[\"INCLUDE_PATH\"].\"/addons/community/plugins/auth/inc/auth.php\";\n \n $media = rex_com_mediaaccess::getMediaByFilename($file);\n if($media->checkPerm())\n return true;\n\n return false;\n}", "function pendrell_image_wrap_attributes( $attributes, $html, $id, $caption, $class, $align, $contents, $context, $width, $height ) {\n if ( ubik_imagery_context( $context, 'related' ) && isset( $attributes['schema'] ) )\n $attributes['schema'] = str_replace( ' itemprop=\"image\"', '', $attributes['schema'] );\n if ( !empty( $width ) )\n $attributes['style'] = 'style=\"width: ' . $width . 'px;\"'; // Setting an explicit width for use with the intrinsic ratio technique\n return $attributes;\n}", "function img($src = '', bool $indexPage = false, $attributes = ''): string\n {\n if (! is_array($src)) {\n $src = ['src' => $src];\n }\n if (! isset($src['src'])) {\n $src['src'] = $attributes['src'] ?? '';\n }\n if (! isset($src['alt'])) {\n $src['alt'] = $attributes['alt'] ?? '';\n }\n\n $img = '<img';\n\n // Check for a relative URI\n if (! preg_match('#^([a-z]+:)?//#i', $src['src']) && strpos($src['src'], 'data:') !== 0) {\n if ($indexPage === true) {\n $img .= ' src=\"' . site_url($src['src']) . '\"';\n } else {\n $img .= ' src=\"' . slash_item('baseURL') . $src['src'] . '\"';\n }\n\n unset($src['src']);\n }\n\n // Append any other values\n foreach ($src as $key => $value) {\n $img .= ' ' . $key . '=\"' . $value . '\"';\n }\n\n // Prevent passing completed values to stringify_attributes\n if (is_array($attributes)) {\n unset($attributes['alt'], $attributes['src']);\n }\n\n return $img . stringify_attributes($attributes) . _solidus() . '>';\n }", "function item_image($imageType = null, $props = array(), $index = 0, $item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n $imageFile = $item->getFile($index);\n $fileMarkup = new Omeka_View_Helper_FileMarkup;\n return $fileMarkup->image_tag($imageFile, $props, $imageType);\n}", "public function getLinkToImg()\n {\n return ImgUpload::getLinkToImg($this);\n }", "function get_term_attachment_image( $term_id = '', $size = 'thumbnail', $icon = false, $attr = '' ) {\r\n\r\n if ( !$term_id && ( is_tax() || is_tag() || is_category() ) ) {\r\n $term_id = get_queried_object()->term_id;\r\n }\r\n\r\n return wp_get_attachment_image( get_post_thumbnail_id( get_post_for_extended_term( $term_id )->ID ), $size, $icon, $attr );\r\n }", "function theme_img($uri, $tag=false)\n{\n \n\tif($tag)\n\t{\n\t\treturn '<img src=\"'.theme_url('assets/images/'.$uri).'\" alt=\"'.$tag.'\">';\n\t}\n\telse\n\t{\n\t\treturn theme_url('assets/images/'.$uri);\n\t}\n\t\n}", "function image($filename='',$attrs='')\n{\n $img_path = get_stylesheet_directory_uri() . \"/images\" . \"/${filename}\";\n $attrs = $attrs == '' ? \"src='${img_path}'\" : (\"src='${img_path}' \" . $attrs);\n output_single_tag('img',$attrs);\n}", "function wp_get_attachment_caption($post_id = 0)\n {\n }", "protected function imageName() {}", "function GrabImage($url,$originname,$dir1, $dir2) {\n\tglobal $_SC;\n\tif($url==\"\"|| $originname==\"\") return false; \n\tchdir(dirname(dirname(dirname(__FILE__))));//change to the ihome dir.\n\tchdir($_SC['attachdir'].$dir1.'/'.$dir2);\n\t//echo $_SC['attachdir'].$dir1.'/'.$dir2;exit();\n\t$ext=strrchr($url,\".\"); \n\tif($ext!=\".gif\" && $ext!=\".jpg\" && $ext!=\".jpeg\" && $ext!=\".png\") return false; \n\t$filename=\"foreign\".$originname; \n\n\tob_start(); \n\treadfile($url); \n\t$img = ob_get_contents(); \n\tob_end_clean(); \n\t$size = strlen($img); \n\n\t$fp2=@fopen($filename, \"a\"); \n\tfwrite($fp2,$img); \n\tfclose($fp2); \n\n\treturn $filename; \n}", "function get_image_alt($file){\r\n $h1count = preg_match_all('/(alt=.)([a-zA-Z0-9\\s]{1,})/',$file,$patterns);\r\n $res = array();\r\n array_push($res,$patterns[2]);\r\n array_push($res,count($patterns[2]));\r\n return $res;\r\n}", "function get_the_post_thumbnail_src($img)\n\n{\n\n return (preg_match('~\\bsrc=\"([^\"]++)\"~', $img, $matches)) ? $matches[1] : '';\n\n}", "public function image_send_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ){\r\n if(strpos($html, '<img data-id=\"')===false){\r\n $html = str_replace('<img', '<img data-id=\"'.$id.'\" ', $html);\r\n }\r\n return $html;\r\n }", "function get_the_attachment_link($id = 0, $fullsize = \\false, $max_dims = \\false, $permalink = \\false)\n {\n }", "public function getImageAttribute()\n {\n if (! is_null($this->thumbnail) && ! is_null($attachment = $this->thumbnail->attachment)) {\n return $attachment->guid;\n }\n }", "protected function getImageMeta(int $id){\n $image_alt=get_post_meta($id, '_wp_attachment_image_alt', true);\n return $image_alt;\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 base64_png_img_tag($base64_png) {\n $tag = \"<img style='display:block;' id='base64image' \" . \n \"src='data:image/png;base64, \" . $base64_png . \"' />\";\n return $tag;\n}", "function video_cck_dailymotion_thumbnail($field, $item, $formatter, $node, $width, $height) {\n return 'http://www.dailymotion.com/thumbnail/160x120/video/'. $item['value'];\n}", "public function get_image_title()\n {\n }", "function replaceIMG($html)\r\n\t{\r\n\t\t$iStart = stripos($html,\"<img\");\r\n\t\twhile((string)$iStart != null) //string typecast to handle \"0\" which equates to FALSE in PHP...\r\n\t\t{\r\n\t\t\t//get entire IMG tag\r\n\t\t\t$iEnd = stripos($html,\">\",$iStart)+1;\r\n\t\t\t$imgTag = substr($html,$iStart,($iEnd-$iStart));\r\n\t\t\t\r\n\t\t\t//get src\r\n\t\t\t$iSrcStart = stripos($imgTag,\"src=\");\r\n\t\t\tif(substr($imgTag,($iSrcStart+4),1) == \"'\")\r\n\t\t\t{\r\n\t\t\t\t//single quote\r\n\t\t\t\t$iSrcEnd = stripos($imgTag,\"'\",$iSrcStart+5);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//double quote\r\n\t\t\t\t$iSrcEnd = stripos($imgTag,'\"',$iSrcStart+5);\r\n\t\t\t}\r\n\t\t\t$imgSrc = substr($imgTag,$iSrcStart+5,($iSrcEnd-($iSrcStart+5)));\r\n\t\t\t\r\n\t\t\t//get alt\r\n\t\t\t$iAltStart = stripos($imgTag,\"alt=\");\r\n\t\t\tif($iAltStart != null)\r\n\t\t\t{\r\n\t\t\t\tif(substr($imgTag,($iAltStart+4),1) == \"'\")\r\n\t\t\t\t{\r\n\t\t\t\t\t//single quote\r\n\t\t\t\t\t$iAltEnd = stripos($imgTag,\"'\",$iAltStart+5);\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//double quote\r\n\t\t\t\t\t$iAltEnd = stripos($imgTag,'\"',$iAltStart+5);\r\n\t\t\t\t}\r\n\t\t\t\t$imgAlt = substr($imgTag,$iAltStart+5,($iAltEnd-($iAltStart+5)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//replace HTML\r\n\t\t\tif((string)stripos($imgSrc,\"scripts/CLEditor/images/icons/\") == null) //exclude icons from rich text editor\r\n\t\t\t{\r\n\t\t\t\t$replacementHTML = \"<div class='table comicborder popupshadow-margin'><div class='table-row'><div class='table-cell'><a href='\" . $imgSrc . \"'>\" . $imgTag . \"</a></div></div>\";\r\n\t\t\t\tif($iAltStart != null)\r\n\t\t\t\t{\r\n\t\t\t\t\t$replacementHTML = $replacementHTML . \"<div class='table-row'><div class='table-cell comicimagecaption'>\" . $imgAlt . \"</div></div>\";\r\n\t\t\t\t}\r\n\t\t\t\t$replacementHTML = $replacementHTML . \"</div>\";\r\n\t\t\t\t$html = substr_replace($html,$replacementHTML,$iStart,($iEnd-$iStart));\r\n\t\t\t\t\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"<img\",($iStart+strlen($replacementHTML)));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"<img\",($iStart+strlen($imgTag)));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $html;\r\n\t}", "public function image($src,$alt = null)\r\n {\r\n $element = $this->element('img')->attribute('src',$src);\r\n\r\n if(!is_null($alt))\r\n {\r\n $element->attribute('alt',$alt);\r\n }\r\n\r\n return $element;\r\n }", "function editor_insert_image($html, $id, $caption, $title, $align, $url, $size) {\r\n\tlist($imgsrc) = image_downsize($id, 'hero-review');\r\n//\tlist($imgsrc) = image_downsize($id, $size);\r\n\r\n\t$html = \"<div class=\\\"photo-gallery\\\">\";\r\n\t$html .= \"<img src=\\\"$imgsrc\\\" alt=\\\"$caption\\\">\";\r\n\tif ($caption) {\r\n\t\t$html .= \"<div class=\\\"caption\\\">$caption</div>\";\r\n\t}\r\n\t$html .= \"</div><!-- photo-gallery -->\";\r\n\treturn $html;\r\n}", "function wp_get_attachment( $attachment_id ) {\n $a = str_replace( 'attachment_', '', $attachment_id );\n\t$attachment = get_post($a);\n\treturn array(\n\t\t'alt' => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ),\n\t\t'caption' => $attachment->post_excerpt,\n\t\t'description' => $attachment->post_content,\n\t\t'href' => get_permalink( $attachment->ID ),\n\t\t'src' => $attachment->guid,\n\t\t'title' => $attachment->post_title\n\t);\n}", "public static function insertNotificationImageAsAttachment() {\n $url = '';\n if(isset($_FILES['image'])) {\n $file = wp_upload_bits($_FILES['image']['name'], null, file_get_contents($_FILES['image']['tmp_name']));\n if($file['error'] === false) {\n $url = $file['url'];\n }\n }\n return $url;\n }", "public function setEmbeddedImages($mail,$projectId,$email_text){\n preg_match_all('/src=[\\\"\\'](.+?)[\\\"\\'].*?/i',$email_text, $result);\n $result = array_unique($result[1]);\n foreach ($result as $img_src){\n preg_match_all('/(?<=file=)\\\\s*([0-9]+)\\\\s*/',$img_src, $result_img);\n $edoc = array_unique($result_img[1])[0];\n if(is_numeric($edoc)){\n $mail = $this->addNewAttachment($mail,$edoc,$projectId,'images');\n\n if(!empty($edoc)) {\n $src = \"cid:\" . $edoc;\n $email_text = str_replace($img_src, $src, $email_text);\n }\n }\n }\n return $mail;\n }", "function wp_get_attachment_thumb_url($post_id = 0)\n {\n }", "function image($imgId,$type='thumbs') {\n if(is_file($this->core->_SYS['CONF']['FTP_QUOTATIONS'].\"/\".$type.\"/\".$imgId)) {\n $imgUrl = $this->core->_SYS['CONF']['URL_IMAGES_QUOTATIONS'].\"/\".$type.\"/\".$imgId;\n }\n\n return $imgUrl;\n }" ]
[ "0.6808126", "0.63869506", "0.6359961", "0.63204473", "0.6179372", "0.6098405", "0.60709876", "0.60480756", "0.60252535", "0.6022915", "0.6002773", "0.59758204", "0.58942604", "0.5855631", "0.58382475", "0.58003324", "0.5790051", "0.57877487", "0.5761844", "0.57565975", "0.57403344", "0.57317847", "0.57304716", "0.57120067", "0.5692528", "0.5683302", "0.5678282", "0.5676166", "0.56652063", "0.5653678", "0.5649359", "0.5646483", "0.5634699", "0.5634364", "0.563388", "0.5631205", "0.56246793", "0.56190413", "0.56185484", "0.56041867", "0.5603451", "0.5598275", "0.55867076", "0.55867016", "0.55837274", "0.55762345", "0.5574514", "0.5573604", "0.5571498", "0.5534057", "0.5530359", "0.5528892", "0.5523981", "0.5494947", "0.54942274", "0.5493819", "0.54852897", "0.54774946", "0.54750395", "0.54741263", "0.5464904", "0.5459719", "0.54592276", "0.5457224", "0.54539776", "0.54523015", "0.5445607", "0.54316276", "0.5430702", "0.5427321", "0.5424726", "0.5420507", "0.54198533", "0.5415129", "0.5413701", "0.54109067", "0.54102385", "0.54084957", "0.54051244", "0.53987914", "0.53974396", "0.5394818", "0.53946435", "0.5392127", "0.5380857", "0.53760546", "0.53758717", "0.5370556", "0.53685075", "0.5368291", "0.53677046", "0.53655946", "0.536446", "0.53630537", "0.5355855", "0.53547245", "0.53436553", "0.53382766", "0.5330877", "0.5330049" ]
0.7443384
0
/================================================================================== 3.0 OUTPUT ================================================================================== / 3.1 IMG ALT TAG CONTENT /
/================================================================================== 3.0 ВЫХОД ================================================================================== / 3.1 СОДЕРЖИМОЕ АЛТЕРНАТИВНОГО ТЕКСТА ДЛЯ ИЗОБРАЖЕНИЯ /
function IMGalt_Content($content) { if($content): // encode content $content = mb_convert_encoding($content, 'HTML-ENTITIES', "UTF-8"); $document = new \DOMDocument(); // Disable libxml errors and allow user to fetch error information as needed libxml_use_internal_errors(true); $document->loadHTML(utf8_decode($content), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); // get img tag from content $images = $document->getElementsByTagName('img'); foreach ($images as $image) { // get orginal from srcset if( $image->hasAttribute('srcset') ): $orginal = ''; // get srcset from content and explode to array $srcset = $image->getAttribute('srcset'); $srcset_array = explode(", ", $srcset); // get orginal size foreach ($srcset_array as $key => $value) { $single_srcset = explode(" ", $value); $src_size = str_replace("w", "", end($single_srcset)); if(strpos($single_srcset[0], $src_size) !== false): // not the orginal size // $orginal .= $single_srcset[0] . ' ' . $src_size; else: $orginal .= $single_srcset[0]; endif; } else: $orginal = strpos($image->getAttribute('src'), 'http') !== false ? $image->getAttribute('src') : get_option( 'siteurl' ) . $image->getAttribute('src'); endif; // get orginal img id and call alt $id = attachment_url_to_postid($orginal); $alt = SELF::getAltAttribute($id); $image->removeAttribute('alt'); $image->setAttribute('alt', $alt); } // output return $document->saveHTML(); endif; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IMGalt_Attachment($attributes, $attachment){\n // print_r($attributes);\n // print_r($attachment);\n // get up to date alt attribute\n $alt = SELF::getAltAttribute($attachment->ID);\n // set alt tag\n $attributes['alt'] = $alt;\n // output\n return $attributes;\n }", "public function displayImgTag() {\n $urlimg = \"/plugins/graphontrackers/reportgraphic.php?_jpg_csimd=1&group_id=\".(int)$this->graphic_report->getGroupId().\"&atid=\". $this->graphic_report->getAtid();\n $urlimg .= \"&report_graphic_id=\".$this->graphic_report->getId().\"&id=\".$this->getId();\n \n \n echo '<img src=\"'. $urlimg .'\" ismap usemap=\"#map'. $this->getId() .'\" ';\n if ($this->width) {\n echo ' width=\"'. $this->width .'\" ';\n }\n if ($this->height) {\n echo ' height=\"'. $this->height .'\" ';\n }\n echo ' alt=\"'. $this->title .'\" border=\"0\">';\n }", "private function getImg()\n\t{\n\t\t$buffer = '&nbsp;';\n\t\t\n\t\tif(!$this->aImg['sFilename'])\n\t\t\treturn $buffer;\n\t\t\n\t\t$buffer = '<img src=\"../../thumbs/'.$this->aImg['sFilename'].'\" />';\t\t\n\t\t\n\t\treturn $buffer;\n\t}", "protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }", "function replaceIMG($html)\r\n\t{\r\n\t\t$iStart = stripos($html,\"<img\");\r\n\t\twhile((string)$iStart != null) //string typecast to handle \"0\" which equates to FALSE in PHP...\r\n\t\t{\r\n\t\t\t//get entire IMG tag\r\n\t\t\t$iEnd = stripos($html,\">\",$iStart)+1;\r\n\t\t\t$imgTag = substr($html,$iStart,($iEnd-$iStart));\r\n\t\t\t\r\n\t\t\t//get src\r\n\t\t\t$iSrcStart = stripos($imgTag,\"src=\");\r\n\t\t\tif(substr($imgTag,($iSrcStart+4),1) == \"'\")\r\n\t\t\t{\r\n\t\t\t\t//single quote\r\n\t\t\t\t$iSrcEnd = stripos($imgTag,\"'\",$iSrcStart+5);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//double quote\r\n\t\t\t\t$iSrcEnd = stripos($imgTag,'\"',$iSrcStart+5);\r\n\t\t\t}\r\n\t\t\t$imgSrc = substr($imgTag,$iSrcStart+5,($iSrcEnd-($iSrcStart+5)));\r\n\t\t\t\r\n\t\t\t//get alt\r\n\t\t\t$iAltStart = stripos($imgTag,\"alt=\");\r\n\t\t\tif($iAltStart != null)\r\n\t\t\t{\r\n\t\t\t\tif(substr($imgTag,($iAltStart+4),1) == \"'\")\r\n\t\t\t\t{\r\n\t\t\t\t\t//single quote\r\n\t\t\t\t\t$iAltEnd = stripos($imgTag,\"'\",$iAltStart+5);\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//double quote\r\n\t\t\t\t\t$iAltEnd = stripos($imgTag,'\"',$iAltStart+5);\r\n\t\t\t\t}\r\n\t\t\t\t$imgAlt = substr($imgTag,$iAltStart+5,($iAltEnd-($iAltStart+5)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//replace HTML\r\n\t\t\tif((string)stripos($imgSrc,\"scripts/CLEditor/images/icons/\") == null) //exclude icons from rich text editor\r\n\t\t\t{\r\n\t\t\t\t$replacementHTML = \"<div class='table comicborder popupshadow-margin'><div class='table-row'><div class='table-cell'><a href='\" . $imgSrc . \"'>\" . $imgTag . \"</a></div></div>\";\r\n\t\t\t\tif($iAltStart != null)\r\n\t\t\t\t{\r\n\t\t\t\t\t$replacementHTML = $replacementHTML . \"<div class='table-row'><div class='table-cell comicimagecaption'>\" . $imgAlt . \"</div></div>\";\r\n\t\t\t\t}\r\n\t\t\t\t$replacementHTML = $replacementHTML . \"</div>\";\r\n\t\t\t\t$html = substr_replace($html,$replacementHTML,$iStart,($iEnd-$iStart));\r\n\t\t\t\t\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"<img\",($iStart+strlen($replacementHTML)));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"<img\",($iStart+strlen($imgTag)));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $html;\r\n\t}", "public function getImageTag();", "function cbv_get_image_alt( $url ){\n if( isset( $url ) ){\n $output = '';\n $id = attachment_url_to_postid($url);\n $image_title = get_the_title($id);\n $image_alt = get_post_meta( $id, '_wp_attachment_image_alt', true);\n if( empty( $image_alt ) ){\n $image_alt = $image_title;\n }\n $image_alt = str_replace('-', ' ', $image_alt);\n $output = $image_alt;\n\n return $output;\n }\n return false;\n}", "function minorite_image($variables) {\n $attributes = $variables['attributes'];\n $attributes['src'] = file_create_url($variables['path']);\n\n foreach (array('alt', 'title') as $key) {\n\n if (isset($variables[$key])) {\n $attributes[$key] = $variables[$key];\n }\n }\n\n return '<img' . drupal_attributes($attributes) . ' />';\n}", "function get_image_send_to_editor($id, $caption, $title, $align, $url = '', $rel = \\false, $size = 'medium', $alt = '')\n {\n }", "function IMG($img, $extra = '')\n{\n /**\n * An Image tag.\n *\n * Args:\n * $img (str): the image source\n * $extra (str): extra data in the tag - used for adding class / ID etc.\n */\n echo \"<img src='\" . $img . \"'\" ;\n if ($extra != '') {\n echo ' ' . $extra ;\n }\n echo '>' ;\n}", "function initialize () {\n $this->set_openingtag ( \"<IMG alt=\\\"\" );\n\t $this->set_closingtag ( \"\\\"[attributes]/>\" );\n }", "public function createImgTag() {\n\t\t$this->imgNeko = '<img src=\"';\n\t\t$this->imgNeko .= $this->imgUri;\n\t\t$this->imgNeko .= '\" width=\"';\n\t\t$this->imgNeko .= $this->imgSize[0];\n\t\t$this->imgNeko .= '\" height=\"';\n\t\t$this->imgNeko .= $this->imgSize[1];\n\t\t$this->imgNeko .= '\" alt=\"';\n\t\t$this->imgNeko .= $this->creditInfo;\n\t\t$this->imgNeko .= '\">';\n\t}", "function img( $src = '', $index_page = FALSE, $attributes = '' )\n\t{\n\t\tif ( ! is_array( $src ) )\n\t\t{\n\t\t\t$src = [ 'src' => $src ];\n\t\t}\n\n\t\t// If there is no alt attribute defined, set it to an empty string\n\t\tif ( ! isset( $src[ 'alt' ] ) )\n\t\t{\n\t\t\t$src[ 'alt' ] = '';\n\t\t}\n\n\t\t$img = '<img';\n\n\t\tforeach ( $src as $k => $v )\n\t\t{\n\t\t\tif ( $k === 'src' && ! preg_match( '#^([a-z]+:)?//#i', $v ) )\n\t\t\t{\n\t\t\t\tif ( $index_page === TRUE )\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"' . get_instance()->config->site_url( $v ) . '\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"' . \\O2System::$config->slash_item( 'base_url' ) . $v . '\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$img .= ' ' . $k . '=\"' . $v . '\"';\n\t\t\t}\n\t\t}\n\n\t\treturn $img . _stringify_attributes( $attributes ) . ' />';\n\t}", "function cbv_get_image_tag( $id, $size = 'full', $title = false ){\n\tif( isset( $id ) ){\n\t\t$output = '';\n\t\t$image_title = get_the_title($id);\n\t\t$image_alt = get_post_meta( $id, '_wp_attachment_image_alt', true);\n if( empty( $image_alt ) ){\n $image_alt = $image_title;\n }\n\t\t$image_src = wp_get_attachment_image_src( $id, $size, false );\n\n\t\tif( $title ){\n\t\t\t$output = '<img src=\"'.$image_src[0].'\" alt=\"'.$image_alt.'\" title=\"'.$image_title.'\">';\n\t\t}else{\n\t\t\t$output = '<img src=\"'.$image_src[0].'\" alt=\"'.$image_alt.'\">';\n\t\t}\n\n\t\treturn $output;\n\t}\n\treturn false;\n}", "function custom_send_image_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt ) {\n\n\t$url = wp_get_attachment_url($id);\n\n\t$html_str = '<div class=\"align-' . esc_attr($align) . '\">';\n\n \t\t$html_str .= \"<p><img src='$url' alt='$title' /></p>\";\n\n\t\tif($caption) $html_str .= '\n\t\t<p class=\"wp-caption-text\">' . $caption . '</p>\n\t\t';\n\n\t$html_str .= '</div>';\n\n return $html_str;\n}", "function cws_get_alt_text( $image_url ) {\n\tglobal $wpdb;\n\n\tif( ! isset( $image_url ) ) {\n\t\techo \"Please add an image.\";\n\t\treturn;\n\t}\n\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $image_url ) );\n\t$alt_text = get_post_meta( $attachment[0], '_wp_attachment_image_alt', true );\n\t$alt_default = 'CWS default alt tag';\n\n\tif( ! empty( $alt_text ) ) {\n\t\treturn $alt_text;\n\t} else {\n\t\treturn $alt_default;\n\t}\n}", "protected function _build() {\n $alt_title = $this->isXhtml ? tep_output_string_protected( str_replace ( '&amp;', '&', $this->attributes['alt'] ) ) : tep_output_string( $this->attributes['alt'] );\n $parameters = tep_not_null( $this->parameters ) ? tep_output_string( $this->parameters ) : false;\n $width = (int)$this->_calculated_width;\n $height = (int)$this->_calculated_height;\n $this->_html = '<img width=\"' . $width . '\" height=\"' . $height . '\" src=\"' . $this->src . '\" title=\"' . $alt_title . '\" alt=\"' . $alt_title . '\"';\n if ( false !== $parameters ) $this->_html .= ' ' . html_entity_decode(tep_output_string( $parameters ));\n $this->_html .= $this->isXhtml ? ' />' : '>'; \n }", "public function img($src = \"\", $alt = \"\") {\n echo \"<img src=assets/img/'\" . $src . \"' alt='\" . $alt . \"'>\";\n }", "function lazy_imgs($html, $id, $caption, $title, $align, $url, $size, $alt) {\n\n $imgNew = '<img data-original=\"' . $url . '\" ';\n $html = str_replace('<img ', $imgNew, $html);\n return $html;\n}", "function getSrcAltImage($postID,$size=false){\n\t$imgID = get_post_thumbnail_id($postID);\n\t$img = wp_get_attachment_image_src($imgID,$size, false, '');\n\t$imgAlt = get_post_meta($imgID,'_wp_attachment_image_alt', true);\n\t$imgAttr = array(\n\t\t'url' => $img,\n\t\t'alt' => $imgAlt\n\t);\n\tif(is_shop()){\n\t\techo '<section class=\"shop-image\">';\n\t\techo '<img class=\"img-max\" src=\"' . $imgAttr['url'][0] . '\" alt=\"\" />';\n\t\techo '</section>';\n\t}else{\n\t\treturn $imgAttr;\n\t}\n}", "function img($src = '', $attributes = '', $index_page = false)\n\t{\n\t\tif ( ! is_array($src) )\n\t\t{\n\t\t\t$src = array('src' => $src);\n\t\t}\n\n\t\t// If there is no alt attribute defined, set it to an empty string\n\t\tif ( ! isset($src['alt']))\n\t\t{\n\t\t\t$src['alt'] = '';\n\t\t}\n\n\t\t$img = '<img';\n\n\t\tforeach ($src as $k => $v)\n\t\t{\n\t\t\tif ($k === 'src' && ! preg_match('#^(data:[a-z,;])|(([a-z]+:)?(?<!data:)//)#i', $v))\n\t\t\t{\n\t\t\t\tif ($index_page === true)\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"'.get_instance()->config->site_url($v).'\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"'.get_instance()->config->slash_item('base_url').$v.'\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$img .= ' '.$k.'=\"'.$v.'\"';\n\t\t\t}\n\t\t}\n\n\t\treturn $img._stringify_attributes($attributes).' />';\n\t}", "function jcr_image_custom($atts)\n {\n global $thisimage;\n\n assert_image();\n\n extract(lAtts(array(\n 'escape' => 'html',\n ), $atts));\n\n return ($escape == 'html')\n ? txpspecialchars($thisimage['jcr_image_custom'])\n : $thisimage['jcr_image_custom'];\n }", "public function render(){\n\t\t$out = \"<img\".($this->getID() ? \" id=\\\"\".$this->getID().\"\\\"\" : \"\");\n\t\t\n\t\t$out .= \" src=\\\"\".$this->link.\"\\\"\";\n\t\t\n\t\tforeach( $this->getProperties() as $key => $value ) {\n\t\t\t$out .= \" \".$key.\"=\\\"\".$value.\"\\\"\"; //example: _width=\"100px\"\n\t\t}\n\t\t$out .= \" />\"; //end of opening html tag and html properties\n\t\t\n\t\treturn $out;\n\t}", "public static function img($img, $alt, $title = '') {\r\n\t\t\t$file = WEB_ROOT . '/' . $img;\r\n\t\t\tif(!file_exists($file)) {\r\n\t\t\t\tABPF::logger()->error(\"Image file $file doesn't exist!\");\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\t\t\t$v = filemtime($file);\r\n\t\t\treturn sprintf('<img src=\"%s/%s?v=%d\" alt=\"%s\" title=\"%s\" />', BASE_URL, $img, $v, $alt, $title);\r\n\t\t}", "function column_alt_text( $item ) {\r\n\t\tif ( isset( $item->mla_wp_attachment_image_alt ) ) {\r\n\t\t\tif ( is_array( $item->mla_wp_attachment_image_alt ) ) {\r\n\t\t\t\t$alt_text = $item->mla_wp_attachment_image_alt[0];\r\n\t\t\t} else {\r\n\t\t\t\t$alt_text = $item->mla_wp_attachment_image_alt;\r\n\t\t\t}\r\n\r\n\t\t\treturn sprintf( '<a href=\"%1$s\" title=\"' . __( 'Filter by', 'media-library-assistant' ) . ' &#8220;%2$s&#8221;\">%3$s</a>', esc_url( add_query_arg( array_merge( array(\r\n\t\t\t\t'page' => MLACore::ADMIN_PAGE_SLUG,\r\n\t\t\t\t'mla-metakey' => '_wp_attachment_image_alt',\r\n\t\t\t\t'mla-metavalue' => urlencode( $alt_text ),\r\n\t\t\t\t'heading_suffix' => urlencode( __( 'ALT Text', 'media-library-assistant' ) . ': ' . $alt_text ) \r\n\t\t\t), self::mla_submenu_arguments( false ) ), 'upload.php' ) ), esc_html( $alt_text ), esc_html( $alt_text ) );\r\n\t\t}\r\n\r\n\t\treturn '';\r\n\t}", "public function getAlt(): string\n {\n return htmlspecialchars($this->getDescription(), ENT_QUOTES);\n }", "public static function getAltAttribute(int $id = 0){\n // vars\n $output = '';\n $lang = prefix_core_BaseFunctions::getCurrentLang();\n // check if active lang is default or not\n if($lang == SELF::$WPimgAttr_Alt_languages[0]):\n // default language\n $output .= get_post_meta($id, '_wp_attachment_image_alt', TRUE);\n else:\n // alternative text\n $name = SELF::$WPimgAttr_Alt_prefix . $lang;\n $output .= get_post_meta($id, $name, true);\n endif;\n // output\n return $output;\n }", "public function alt(){\n\t\tif( $this->alt ) {\n\t\t\treturn $this->alt;\n\t\t}//end if\n\n\t\t$this->alt = @file_get_contents( $this->base_dir.'/'.$this->dir . $this->filename . '.alt');\n\n\t\treturn $this->alt;\n\t}", "function swap_image($msg){\n\n\tif(preg_match(\"/\\[img ALT=('|\\\")(.*?)('|\\\")\\]([^\\[]*)\\[\\/img\\]/i\",$msg)){\n\t\t$msg=preg_replace(\"/\\[img ALT=('|\\\")(.*?)('|\\\")\\]([^\\[]*)\\[\\/img\\]/i\",\"$2\",$msg);\n\t}\n\nreturn $msg;\n}", "function zero_filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n }", "function _tts_preprocess_p_img_big(&$vars){\n $alt = (isset($vars['content']['field_img'][0]['#item']['title'])\n && !empty($vars['content']['field_img'][0]['#item']['title'])\n ? $vars['content']['field_img'][0]['#item']['title'] . ' - '\n : '') . 'Serramenti Torino';\n $vars['content']['field_img'][0]['#item']['alt'] = $alt;\n \n \n if ($vars['view_mode'] == 'full'){\n $vars['content']['field_img'] = array(\n '#prefix' => '<div class=\"wrapper-p-img margin-b-1\">',\n '#suffix' => '</div>',\n 'data' => $vars['content']['field_img'][0],\n );\n\n //_tts_add_fancy_svg($vars);\n\n if (isset($vars['content']['field_img']['data']['#item']['title']) && $vars['content']['field_img']['data']['#item']['title']!== ''){\n $title = $vars['content']['field_img']['data']['#item']['title'];\n $vars['content']['field_img']['desc'] = array(\n '#prefix' => '<div class=\"margin-t-05 margin-sm-h-2\"><p class=\"small\">',\n '#suffix' => '</p></div>',\n '#markup' => $title,\n '#weight' => 2,\n );\n }\n }\n}", "function htmlImages($src)\n{\n\treturn '<img src=' . $src . '>';\n}", "function Image ($source, $title=\"\", $height, $hidth=\"\", $align=\"center\", $border=0, $valign=\"middle\", $class=\"\", \n\t\t\t$id=\"\", $name=\"\", $onAction1=\"\", $onType2=\"\", $onAction2 =\"\", $onAction3=\"\") {\n\t\t$this ->tag = '<img src=\" '.$source .' \" ';\n\t\tif ($name) $this->tag.='name=\" '.$name.' \" ';\n\t\tif ($height ==\"\") $height=16;\n\t\tif ($width ==\"\") $width=16;\n\t\t$this->tag .= 'height=\"' .$height. '\" width= \"'. $width.'\" ';\n\n\t\t$this->tag .='border=\"$border\" . ';\n\t\tif ($class) $this->tag .= 'border =\"'.$border.'\" ';\n\t\tif ($id)\t $this->tag .= 'class=\"'.class. '\" ';\n\t\tif ($title) $this ->tag .= 'title=\"' .$stitle.'\" alt=\"'.$title.'\" ';\n\t\tif ($align) $this ->tag .= 'align= 'align=\"'.$align. .'\" '';\n\t\t\n\n\n\n\t}", "function my_post_image_html( $html, $post_id, $post_image_id )\r\n{\r\n\t$src = wp_get_attachment_image_src ( get_post_thumbnail_id ( $post_id ));\r\n\t\r\n\t$html = '<img src=\"'.$src[0].'\" alt=\"'.esc_attr( get_post_field( 'post_title', $post_id ) ).'\">';\r\n\t\r\n\treturn $html;\r\n}", "public function getDescriptionImages() {\n preg_match( '@src=\"([^\"]+)\"@' , $this->description, $match);\n return $match;\n }", "function printImg($img, $alt = '', $width = '', $height = '', $pageList = false) {\n\t\tglobal $wpdb;\n\t\t$width = $this->thumb_width; //\tthumb width\n\t\t$height = $this->thumb_height; //\tthumb height\t\n\t\t$sql = \"select `id`, `name`, `filename`, `date` from `\".$this->table_img_name.\"` order by `id`\";\n\n if($img == '') \n\t\t\treturn \"&nbsp;\";\n\t\t\n $pathParts = PathInfo($img);\n\t\t$tmp_img = split($this->images_dir, $img);\n\t\t$tmp_img[0] = $tmp_img[0].$this->images_dir.\"/\";\n\t\t$pathParts['dirname'] = $tmp_img[0];\n\t\t\n\n\t $fileExt = split(\"\\.\", $pathParts['basename']);\t// checking what kind of file is\n\t switch(strtolower($fileExt[1])) \n\t\t{\n\t\t\tcase \"flv\": {\n\t\t\tif($pageList == false) \n\n\t\t\t\t\t$result .= \"\n\t\t\t\t\t<script type=\\\"text/javascript\\\" src=\\\"\".$this->path_to_plugin.\"js/swfobject.js\\\" charset=\\\"utf-8\\\"></script>\n\t\t\t\t\t<script type=\\\"text/javascript\\\" src=\\\"\".$this->path_to_plugin.\"js/swfaddress.js\\\" charset=\\\"utf-8\\\"></script>\n\t\t\t\t\t\";\n\n\t\t\t\t\t$result .= <<<HTML\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tvar flashvars = {videoPath: '{$img}',};\n\t\t\t\t\t\tvar params = {};\n\t\t\t\t\t\tvar attributes = {id:'vp', name:'vp'};\n\t\t\t\t\t\tparams.scale = \"noscale\";\n\t\t\t\t\t\tparams.salign = \"tl\";\n\t\t\t\t\t\tparams.bgcolor = \"#f9f9f9\";\n\t\t\t\t\t\tparams.allowfullscreen = \"true\";\n\t\t\t\t\t\tparams.allowScriptAccess = \"always\";\n\t\t\t\t\t\tswfobject.embedSWF(\"{$this->path_to_plugin}swf/vp.swf\", \"myAlternativeContent\", \"200\", \"100\", \"9.0.0\", \"{$this->path_to_plugin}swf/expressInstall.swf\", flashvars, params, attributes);\n\t\t\t\t\t</script>\n\n\t\t\t\t\t<div id=\"myAlternativeContent\">\n\t\t\t\t\t\t<a href=\"http://www.adobe.com/go/getflashplayer\">\n\t\t\t\t\t\t\t<img src=\"http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif\" alt=\"Get Adobe Flash player\" />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\nHTML;\n\n\t\t\t\tif($pageList == false)\t$result .= \" \";\n\n\t \t}\n\t\t\tbreak;\n\n\t \tcase \"swf\": {\n\t\t\t\tif($pageList == false) \n\n\t\t\t\t\t$result = \"\n\t\t\t\t\t<script src=\\\"\".$this->path_to_plugin.\"js/AC_RunActiveContent.js\\\" type=\\\"text/javascript\\\"></script>\n\t\t\t\t\t<script type=\\\"text/javascript\\\">\n\t\t\t\t\t\tAC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','\".$width.\"','height','100','src','\".$pathParts['dirname'].\"/\".$fileExt[0].\"','quality','high','bgcolor','#f9f9f9f','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','\".$pathParts['dirname'].\"/\".$fileExt[0].\"' ); //end AC code\n\t\t\t\t\t</script>\n\t\t\t\t\t<noscript>\";\n\t\t\t\t\t$result .= \"\n\t\t\t\t\t\t<object classid=\\\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\\\" codebase=\\\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0\\\" width=\\\"\".$width.\"\\\" height=\\\"100\\\">\n\t\t\t\t\t\t\t<param name=\\\"movie\\\" value=\\\"\".$img.\"\\\" />\n\t\t\t\t\t\t\t<param name=\\\"quality\\\" value=\\\"high\\\" />\n\t\t\t\t\t\t\t<param name=\\\"bgcolor\\\" value=\\\"#f9f9f9\\\" />\n\t\t\t\t\t\t\t<embed src=\\\"\".$img.\"\\\" quality=\\\"high\\\" pluginspage=\\\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\\\" type=\\\"application/x-shockwave-flash\\\" width=\\\"\".$width.\"\\\" height=\\\"100\\\" bgcolor=\\\"#f9f9f9\\\">\n\t\t\t\t\t\t\t</embed>\n\t\t\t\t\t\t</object>\";\n\t\t\t\tif($pageList == false) \n\t\t\t\t\t$result .= \"\n\t\t\t\t\t</noscript>\";\n\t \t} \n\t\t\tbreak;\n\t \tdefault :\n\n\t\t\t{\n\t \t\t$thumb = $pathParts['dirname'].\"/thumb_\".$pathParts['basename'];\n\n\t\t $img = $thumb;\n\t\t $imageSize = @GetImageSize($img);\n\n\t\t if(!$imageSize) return \"No image\";\n\t\t\t//\techo $imageSize[0].\" \\n\";\n\t\t\t//\techo $imageSize[1].\" \\n\";\n\t\t // $image_size = $this->imgSize($imageSize[0], $imageSize[1], $width, $height);\n\t\t\t\t$multi = \"100\" / $imageSize[1]; // resize every image to height 80px\n\t\t\t\t$height_new = \"100\";\n\t\t\t\t$width_new = $imageSize[0] * $multi;\n\n\t\t $result = \"<img src=\\\"\".$img.\"\\\" width=\\\"\".$width_new.\"\\\" height=\\\"\".$height_new.\"\\\" alt=\\\"\".$alt.\"\\\" />\";\n\t \t//\techo \" _ / _ / _ \".$img;\n\t\t\t}\n\t }\n return $result;\n\t}", "public function getAlt()\n {\n return $this->alt;\n }", "public function introTextImage(){\n if(isset($this->imageIntro)){\n return $this->imageIntro;\n }\n $this->fetchIntroImage();\n return $this->imageIntro;\n }", "function baindesign324_filter_ptags_on_images($content){\n\t return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n\t}", "public function getCvvImgHtml() {\r\n return '<img src=' . $this->ccConfig->getCvvImageUrl() . ' />';\r\n }", "function base64_png_img_tag($base64_png) {\n $tag = \"<img style='display:block;' id='base64image' \" . \n \"src='data:image/png;base64, \" . $base64_png . \"' />\";\n return $tag;\n}", "protected function img($url, $alt = null)\r\n {\r\n return sprintf('<img src=\"%s\" alt=\"%s\" style=\"width:%spx;height:%spx;\" />', $url, $alt, $this->size[0], $this->size[1]);\r\n }", "function custom_filter_ptags_on_images($content){\n\treturn preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "private function _build_img_tag($data)\n\t{\n\t\treturn '<img ' . $this->_assets_attributes($data['attributes']) . ' />';\n\t}", "function get_image_alt($file){\r\n $h1count = preg_match_all('/(alt=.)([a-zA-Z0-9\\s]{1,})/',$file,$patterns);\r\n $res = array();\r\n array_push($res,$patterns[2]);\r\n array_push($res,count($patterns[2]));\r\n return $res;\r\n}", "public function fullTextImage(){\n if(isset($this->imageFullText)){\n return $this->imageFullText;\n }\n $this->fetchFullTextImage();\n return $this->imageFullText;\n }", "function cardealer_filter_ptags_on_images($content){\r\n\treturn preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\r\n}", "function wpgrade_filter_ptags_on_images($content){\r\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\r\n}", "function objectAttributeContent( $contentObjectAttribute )\n {\n $pngFilePath = '';\n $show_png = false;\n $alt = '';\n $contentObject = eZContentObject::fetch( $contentObjectAttribute->attribute( 'contentobject_id' ) );\n if( $contentObject instanceof eZContentObject )\n {\n $image = $contentObjectAttribute->storedFileInformation( $contentObject, $contentObject->attribute( 'current_version' ), $contentObjectAttribute->attribute( 'language_code' ), $contentObjectAttribute );\n if( is_array( $image ) && array_key_exists( 'url', $image ) )\n {\n $embedImagePath = $image['url'];\n $imagePathArray = explode( DIRECTORY_SEPARATOR, $embedImagePath );\n $imageFile = array_pop( $imagePathArray );\n $imageFile = preg_replace( '/(.jpg|.gif)/', '_' . $contentObject->attribute( 'current_version' ) . '.png', $imageFile );\n $pngFolder = implode( DIRECTORY_SEPARATOR, $imagePathArray ) . DIRECTORY_SEPARATOR . 'png';\n if ( !file_exists( $pngFolder ) )\n {\n eZDir::mkdir( $pngFolder, false, true );\n }\n // copy embeded image to local\n $file = eZClusterFileHandler::instance( $pngFolder . DIRECTORY_SEPARATOR . $imageFile );\n if ( is_object( $file ) && $file->exists() )\n {\n $pngFilePath = $pngFolder . DIRECTORY_SEPARATOR . $imageFile;\n #eZDebug::writeNotice( $pngFilePath, 'Fallback PNG' );\n $xml = new SimpleXMLElement( $contentObjectAttribute->attribute( \"data_text\" ) );\n $texts = $xml->{'g'}->{'text'};\n if( $texts != null )\n {\n foreach( $texts as $text )\n {\n $altArray[] = (string)$text->{0};\n }\n }\n $alt = implode( ', ', $altArray );\n #eZDebug::writeNotice( $alt, 'PNG Alt-Text' );\n }\n else\n {\n $pngFilePath = $embedImagePath;\n }\n }\n }\n $attributeContent = array( \"data_text\" => $contentObjectAttribute->attribute( \"data_text\" ),\n \"data_int\" => $contentObjectAttribute->attribute( \"data_int\" ),\n \"data_png\" => array( 'src' => $pngFilePath,\n 'alt' => $alt ) );\n\n return $attributeContent;\n }", "public function get_image_link()\n {\n }", "function imagecustom($im, $text) {\n}", "static function img($source, $id = Null, $class = Null) \n {\n $file_name = array_pop(explode(\"/\", $source));\n $name = array_shift(explode(\".\", $file_name));\n return '<img' . self::_id($id) . self::_class($class) . ' src=\"'.$source.'\" title=\"'.$name.'\" alt=\"'.$name.'\" />'.self::$_nl;\n }", "public function image($img) {\n\t\tif (strpos($img, 'http') === false) {\t\t\n\t\t} else {\n\t\t\techo \"<img src='img/{$img}'>\";\n\t\t}\n\t}", "function get()\n{\n\t$p=''; $ak='';\n\n\tfor($i=0;$i<count($this->reflist);$i++){\n\t\t$img=$this->tn->make_img($this->reflist[$i][1],$this->reflist[$i][2]);\n\t\tif($this->reflist[$i][3]!='')\n\t\t\t$ak=' accesskey=\"'.$this->reflist[$i][3].'\"';\n\t\tif($this->reflist[$i][0]!='')\n\t\t\t$img='<a href=\"'.$this->reflist[$i][0].'\"'.$ak.'>'.$img.'</a>';\n\t\t$p.='<td style=\"padding-left:5px;padding-bottom:1px\">'.$img.'</td>';\n\t}\n\n\treturn $p;\n}", "public function img()\n {\n return '<img src=\"'.$this->src().'\" alt=\"captcha\">';\n }", "function template_bits_bit_row_image( $id, $image ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<img id='img-item-{$id}' src='{$this->ipsclass->skin_acp_url}/images/{$image}' border='0' alt='' />\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "protected function getImageMeta(int $id){\n $image_alt=get_post_meta($id, '_wp_attachment_image_alt', true);\n return $image_alt;\n }", "function po_filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function iti_get_image_alt_from_url( $url = '' ) {\n\tglobal $wpdb;\n\n\t$url = esc_url( $url );\n\n\t/** @noinspection PhpUndefinedMethodInspection */\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $url ) );\n\n\t$post_id = isset( $attachment[0] ) ? $attachment[0] : 0;\n\t$alt = get_post_meta( absint( $post_id ), '_wp_attachment_image_alt', true );\n\n\treturn $alt;\n}", "public function output() {\n $image = get_api_media( $this->params->id );\n\n // Add any custom classes to the already existing class parameter\n if ( $this->params->class ) {\n $regex = '/class=\"(.+?)\"/';\n $image = preg_replace( $regex, 'class=\"$1 ' . $this->params->class . '\"', $image );\n }\n // Only get the image tag\n if ( $this->params->img_only ) {\n $regex = '/(<img.*?>)/';\n $matches = [];\n preg_match( $regex, $image, $matches );\n $image = $matches[0];\n }\n\n return $image;\n }", "function view_logo_project($img,$w,$h,$alt)\n{\n if(file_exists(\"logo/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"include/phpThumb.php?src=../logo/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"include/phpThumb.php?src=../logo/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;\t\t\t}", "function _imageTitle($img) {\n global $ID;\n\n // some fixes on $img['src']\n // see internalmedia() and externalmedia()\n list($img['src']) = explode('#', $img['src'], 2);\n if($img['type'] == 'internalmedia') {\n resolve_mediaid(getNS($ID), $img['src'], $exists ,$this->date_at, true);\n }\n\n return $this->_media(\n $img['src'],\n $img['title'],\n $img['align'],\n $img['width'],\n $img['height'],\n $img['cache']\n );\n }", "function spartan_filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "public function get_image_title()\n {\n }", "function wm_write_metadata($image_id)\n{\n global $conf, $logger;\n \n $query = '\nSELECT\n img.name,\n img.comment,\n img.author,\n img.date_creation,\n GROUP_CONCAT(tags.name) AS tags,\n img.path,\n img.representative_ext\n FROM '.IMAGES_TABLE.' AS img\n LEFT OUTER JOIN '.IMAGE_TAG_TABLE.' AS img_tag ON img_tag.image_id = img.id\n LEFT OUTER JOIN '.TAGS_TABLE.' AS tags ON tags.id = img_tag.tag_id\n WHERE img.id = '.$image_id.'\n GROUP BY img.id, img.name, img.comment, img.author, img.path, img.representative_ext\n;';\n $result = pwg_query($query);\n $row = pwg_db_fetch_assoc($result);\n\n $name = wm_prepare_string($row['name'], 256);\n $description = wm_prepare_string($row['comment'], 2000);\n $author = wm_prepare_string($row['author'], 32);\n\n $command = isset($conf['exiftool_path']) ? $conf['exiftool_path'] : 'exiftool';\n $command.= ' -q';\n\n if (strlen($name) > 0)\n {\n # 2#105 in iptcparse($imginfo['APP13'])\n $command.= ' -IPTC:Headline=\"'.$name.'\"';\n\n # 2#005 in iptcparse($imginfo['APP13'])\n $command.= ' -IPTC:ObjectName=\"'.wm_cutString($name, 64).'\"';\n }\n\n if (strlen($description) > 0)\n {\n # 2#120 in iptcparse($imginfo['APP13'])\n $command.= ' -IPTC:Caption-Abstract=\"'.$description.'\"';\n }\n\n if (strlen($author) > 0)\n {\n # 2#080 in iptcparse($imginfo['APP13'])\n $iptc_field = 'By-line';\n\n if (\n $conf['use_iptc']\n and isset($conf['use_iptc_mapping']['author'])\n and '2#122' == $conf['use_iptc_mapping']['author']\n )\n {\n # 2#122 in iptcparse($imginfo['APP13'])\n $iptc_field = 'Writer-Editor';\n }\n\n $command.= ' -IPTC:'.$iptc_field.'=\"'.$author.'\"';\n }\n \n if (strlen($row['tags']) > 0)\n {\n $tags = explode(',', $row['tags']);\n foreach ($tags as $tag)\n {\n $tag = wm_prepare_string($tag, 64);\n\n # 2#025 in iptcparse($imginfo['APP13'])\n $command.= ' -IPTC:Keywords=\"'.$tag.'\"';\n }\n }\n\n $command.= ' \"'.$row['path'].'\"';\n $command.= ' 2>&1';\n // echo $command;\n $logger->info(__FUNCTION__.' command = '.$command);\n\n $exec_return = exec($command, $output, $rc);\n // echo '$exec_return = '.$exec_return.'<br>';\n // echo '<pre>'; print_r($output); echo '</pre>';\n\n // as derivatives may contain metadata, they must be reset\n delete_element_derivatives($row);\n\n return array($rc, $output);\n}", "function acd_add_img_title( $attr, $attachment = null ) {\n\t$img_title = trim( strip_tags( $attachment->post_title ) );\n\t$img_title = str_replace(\"-\", \" \", $img_title); //remove hyphens\n\t$img_title = str_replace(\"_\", \" \", $img_title); //remove underscores\n\t$img_title = preg_replace('/[0-9]+/', '', $img_title); //remove numbers\n\t$img_title = ucwords($img_title); //capitalize first letter of each word\n\n\t$attr['title'] = $img_title; //add image title attribute\n\t// or get the title instead of image title $attr['title'] = the_title_attribute( 'echo=0' );\n\t$attr['alt'] = $img_title; //add alt attribute\n\treturn $attr;\n}", "function view_builder_logo_inside_project($img,$w,$h,$alt)\n{\n if(file_exists(\"../builder/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"../include/phpThumb.php?src=../builder/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"../include/phpThumb.php?src=../builder/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;}", "function shariff3uu_catch_image() {\n\t\t$result = preg_match_all( '/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', get_post_field( 'post_content', get_the_ID() ), $matches );\n\t\tif ( array_key_exists( 0, $matches[1] ) ) {\n\t\t\treturn $matches[1][0];\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "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}", "private function get_title_img()\n {\n $this->char_count = count($this->strings);\n $this->init_img();\n $font_size = L_FONT_SIZE / $this->char_count;\n $img_y = (L_IMG_HEIGHT + $font_size) / 2;\n $this->create_img($this->string,$font_size,$img_y);\n }", "function printHTML() \n {\n?>\n <center>\n <img src=\"/images/blankimage.gif\" border=0 width=700 height=240 id=\"candidate\" TITLE=\"Current Candidate\" alt=\"alt\">\n </center>\n<?\n }", "function pd_img_unautop($imgWrap)\n{\n $imgWrap = preg_replace('/<p>\\\\s*?(<a .*?><img.*?><\\\\/a>|<img.*?>)?\\\\s*<\\\\/p>/s', '<figure>$1</figure>', $imgWrap);\n return $imgWrap;\n}", "function image($file_name,$title,$class='',$id) {\n \tif ($id) $id = \"id = '\".$id.\"'\"; \n \t$data = '<img src=\"'.BASE_PATH.'/img/'.$file_name.'\" title = \"'.$title.'\" border=\"0\" align=\"absmiddle\" '.$id.' class=\"'.$class.'\" />';\n return $data;\n }", "protected function fetchFullTextImage(){\n $this->imageFullText = $this->getImageTypeFromImages('full');\n }", "function img($src = '', bool $indexPage = false, $attributes = ''): string\n {\n if (! is_array($src)) {\n $src = ['src' => $src];\n }\n if (! isset($src['src'])) {\n $src['src'] = $attributes['src'] ?? '';\n }\n if (! isset($src['alt'])) {\n $src['alt'] = $attributes['alt'] ?? '';\n }\n\n $img = '<img';\n\n // Check for a relative URI\n if (! preg_match('#^([a-z]+:)?//#i', $src['src']) && strpos($src['src'], 'data:') !== 0) {\n if ($indexPage === true) {\n $img .= ' src=\"' . site_url($src['src']) . '\"';\n } else {\n $img .= ' src=\"' . slash_item('baseURL') . $src['src'] . '\"';\n }\n\n unset($src['src']);\n }\n\n // Append any other values\n foreach ($src as $key => $value) {\n $img .= ' ' . $key . '=\"' . $value . '\"';\n }\n\n // Prevent passing completed values to stringify_attributes\n if (is_array($attributes)) {\n unset($attributes['alt'], $attributes['src']);\n }\n\n return $img . stringify_attributes($attributes) . _solidus() . '>';\n }", "function zen_image_OLD($src, $alt = '', $width = '', $height = '', $parameters = '') {\n global $template_dir;\n\n//auto replace with defined missing image\n if ($src == DIR_WS_IMAGES and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {\n $src = DIR_WS_IMAGES . PRODUCTS_IMAGE_NO_IMAGE;\n }\n\n if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {\n return false;\n }\n\n // if not in current template switch to template_default\n if (!file_exists($src)) {\n $src = str_replace(DIR_WS_TEMPLATES . $template_dir, DIR_WS_TEMPLATES . 'template_default', $src);\n }\n\n// alt is added to the img tag even if it is null to prevent browsers from outputting\n// the image filename as default\n//EDITED FOR LAZY LOAD\n $image = '<img src=\"' . zen_output_string($src) . '\" alt=\"' . zen_output_string($alt) . '\"';\n\n if (zen_not_null($alt)) {\n $image .= ' title=\" ' . zen_output_string($alt) . ' \"';\n }\n\n if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {\n if ($image_size = @getimagesize($src)) {\n if (empty($width) && zen_not_null($height)) {\n $ratio = $height / $image_size[1];\n $width = $image_size[0] * $ratio;\n } elseif (zen_not_null($width) && empty($height)) {\n $ratio = $width / $image_size[0];\n $height = $image_size[1] * $ratio;\n } elseif (empty($width) && empty($height)) {\n $width = $image_size[0];\n $height = $image_size[1];\n }\n } elseif (IMAGE_REQUIRED == 'false') {\n return false;\n }\n }\n\n if (zen_not_null($width) && zen_not_null($height)) {\n $image .= ' width=\"' . zen_output_string($width) . '\" height=\"' . zen_output_string($height) . '\"';\n }\n\n if (zen_not_null($parameters)) $image .= ' ' . $parameters;\n\n $image .= ' />';\n\n return $image;\n }", "function img_tag($src, array $attributes = array())\r\n{\r\n $attributes['src'] = $src;\r\n\r\n return tag('img', $attributes);\r\n}", "function theme_filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function textoGif($text) \r\n\t{\r\n \r\n\t\r\n\tpreg_match_all('/\\[EQ(.+?)EQ\\]|\\$\\$(.+?)\\$\\$/is', $text, $matches); \r\n for ($i=0; $i<count($matches[0]); $i++) {\r\n $texexp = $matches[1][$i] . $matches[2][$i];\r\n\t\t$texexp = str_replace('<br />','',$texexp);\r\n\t\t$texexp = str_replace('<br />','',$texexp);\r\n\t\t//$texexp = urlencode($texexp);\r\n $text = str_replace( $matches[0][$i], \"<img src=\\\"/cgi-bin/mimetex.cgi?$texexp\\\">\", $text);\r\n }\r\n\r\n\treturn $text; \r\n\t\r\n\t\r\n\t}", "function imageHtmlCode($url, $adds = '', $attr = '')\r\n {\r\n $this->imagesContentNoSave = false;\r\n if (!$this->testOn && ($this->feed['params']['image_save'] || $this->feed['params']['img_path_method'])) {\r\n if ($this->feed['params']['img_path_method']=='1') $url = ltrim($url, '/');\r\n if ($this->feed['params']['img_path_method']=='2') $url = rtrim(site_url(), '/') . $url;\r\n \r\n } \r\n return strtr($this->feed['params']['imageHtmlCode'], array('%TITLE%' => htmlentities($this->currentTitle, ENT_COMPAT, 'UTF-8'), '%PATH%' => $url, '%ADDS%' => $adds, '%ATTR%' => $attr)); \r\n }", "protected function getImageAttributes() {}", "function bones_filter_ptags_on_images($content)\n{\n\treturn preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "public static function img($src, $alt = '', $attrs = '')\n {\n return '<img src=\"'.PUBLIC_PATH.\"img/$src\\\" alt=\\\"$alt\\\" \".Tag::getAttrs($attrs).'/>';\n }", "function mdwpfp_filter_ptags_on_images($content){\n\treturn preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "public function image($src,$alt = null)\r\n {\r\n $element = $this->element('img')->attribute('src',$src);\r\n\r\n if(!is_null($alt))\r\n {\r\n $element->attribute('alt',$alt);\r\n }\r\n\r\n return $element;\r\n }", "public function render(): string\n {\n $image_attributes = '';\n foreach ($this->attributes as $attribute => $value) {\n if (\n is_string($attribute) &&\n is_string($value) &&\n in_array($attribute, Settings::ignoredCustomAttributes()) === false\n ) {\n $image_attributes .= \"{$attribute}=\\\"{$value}\\\" \";\n }\n }\n return \"<img src=\\\"{$this->insert}\\\" {$image_attributes}/>\";\n }", "function view_builder_logo($img,$w,$h,$alt)\n{\n if(file_exists(\"builder/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"include/phpThumb.php?src=../builder/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='mar7L' />\";\n else\n $temp =\"<img src=\\\"include/phpThumb.php?src=../builder/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='mar7L'/>\";\n \n\treturn $temp;\t\t\t}", "function image_add_caption($html, $id, $caption, $title, $align, $url, $size, $alt = '')\n {\n }", "function getImageRegex()\r\n\t{\r\n\t\t$output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', \r\n\t\t\t$this->description, $matches);\r\n\t\t$first_img = $matches [1] [0];\r\n\t\t\r\n\t\t//Defines a default image\r\n\t\tif(empty($first_img)){ \r\n\t\t\t$first_img = \"/images/default.jpg\";\r\n\t\t}\r\n\t\t$this->picture = $first_img;\r\n\t}", "function theme_img($uri, $tag=false)\n{\n \n\tif($tag)\n\t{\n\t\treturn '<img src=\"'.theme_url('assets/images/'.$uri).'\" alt=\"'.$tag.'\">';\n\t}\n\telse\n\t{\n\t\treturn theme_url('assets/images/'.$uri);\n\t}\n\t\n}", "function kibble_custom_thumbnail_html( $html, $post_id, $post_image_id ) {\n\t$title = get_the_title($post_id);\n\tif (empty( $html )) {\n\t\t$html = '<img width=\"180\" title=\"'. $title .'\" height=\"240\" src=\"http://fakeimg.pl/164x204/282828/eae0d0/\" class=\"thumbnail img-responsive\" />';\n\t}\n\t$html = preg_replace(array('/(alt|title)=\\\"[^\"]*\"\\s/','/class=\\\"[^\"]*\"\\s/', '/width=\\\"[^\"]*\"\\s/','/height=\\\"[^\"]*\"\\s/'),array('title=\"'. $title .'\" ','class=\"thumbnail img-responsive\" ','width=\"180\" ', 'height=\"240\" '),trim($html));\n \treturn $html;\n}", "function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "public static function getContentImageAlt($model)\n {\n $imageAlt = BaseAmosModule::t('amoscore', '#amos_carousel_widget_default_content_image_alt');\n if ($model instanceof ModelLabelsInterface) {\n $modelGrammar = $model->getGrammar();\n if ($modelGrammar instanceof ModelGrammarInterface) {\n $imageAlt = BaseAmosModule::t('amoscore', '#amos_carousel_widget_image_of') . $modelGrammar->getArticleSingular() . ' ' . strtolower($modelGrammar->getModelSingularLabel());\n }\n }\n return $imageAlt;\n }", "public function renderTagImage($result);", "public function image_send_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ){\r\n if(strpos($html, '<img data-id=\"')===false){\r\n $html = str_replace('<img', '<img data-id=\"'.$id.'\" ', $html);\r\n }\r\n return $html;\r\n }" ]
[ "0.7009078", "0.68325895", "0.6692804", "0.66500384", "0.66121835", "0.65053207", "0.6485219", "0.6444968", "0.64215714", "0.6418329", "0.63981396", "0.6385716", "0.6361115", "0.63594073", "0.6359043", "0.6341475", "0.6329196", "0.6321962", "0.631671", "0.6298811", "0.6281806", "0.6281429", "0.6267405", "0.62612134", "0.62391883", "0.62328833", "0.623108", "0.6224123", "0.62189394", "0.6199195", "0.619241", "0.61818945", "0.61808825", "0.6178498", "0.61451", "0.61138296", "0.6107217", "0.60950994", "0.6086506", "0.60827607", "0.60718185", "0.607112", "0.6069317", "0.6068768", "0.6046882", "0.60441023", "0.60356146", "0.60202914", "0.60172", "0.6014581", "0.6010638", "0.6005929", "0.60007143", "0.59947455", "0.5984231", "0.5970375", "0.59643376", "0.5961944", "0.5960594", "0.5952927", "0.59487325", "0.59452665", "0.5930929", "0.5921062", "0.59179986", "0.5916729", "0.59128696", "0.591127", "0.59104246", "0.59086764", "0.59067667", "0.5897802", "0.5889024", "0.588397", "0.5882704", "0.5881299", "0.5881236", "0.5879539", "0.5877059", "0.5876801", "0.5875943", "0.58651805", "0.5864768", "0.5858179", "0.5857841", "0.5849309", "0.58489496", "0.5847564", "0.58381546", "0.58358115", "0.583453", "0.58341646", "0.58341646", "0.58341646", "0.58341646", "0.58341646", "0.58341646", "0.5824495", "0.58189267", "0.58134925" ]
0.7602596
0
Get iterator object of body row elements
Получить итератор объекта элементов строки тела
public function getIterator() { return new ArrayIterator($this->_tbody->getElements()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIterator()\n {\n return new ArrayObject($this->_rows);\n }", "public function getIterator()\n {\n return new Itr($this);\n }", "public function getIterator() {}", "public function getIterator() {}", "function getInnerIterator()\n\t{\n\t\treturn $this->iterator;\n\t}", "function getElements() {\n return $this->rows_object;\n }", "public function getIterator()\n {\n return new \\ArrayIterator([$this->contents]);\n }", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator();", "public function getIterator() {\n\t\t// Load related records for current row\n\t\t$data = $this->execute();\n\t\treturn $data ? $data : array();\n\t}", "function getIterator() {\r\n\t\treturn new \\ArrayIterator($this->data);\r\n\t}", "public function getIterator()\n\t{\n\t\treturn new \\ArrayIterator($this->fetch());\n\t}", "abstract public function getIterator();", "function getiterator() {\n\t\treturn new \\ArrayIterator($this->cast());\n\t}", "public function iterator();", "public function iterator()\n {\n return $this->getIterator();\n }", "public function getIterator(): Iterator {}", "public function getIterator()\r\n {\r\n return $this->all();\r\n }", "public function getIterator()\n {\n return $this->iterator();\n }", "public function getIterator()\n {\n return $this->multi()->load();\n }", "public function getIterator() {\n\t\treturn new \\ArrayObject($this->data);\n\t}", "public function getIterator(): \\Iterator\n {\n return new \\ArrayIterator($this->headers);\n }", "public function getIterator()\n {\n return $this->getValue();\n }", "public function getIterator() {\n return new \\ArrayIterator($this->getValues());\n }", "public function getItemIterator()\n {\n return new ArrayIterator($this->data->items);\n }", "public function getIterator()\n {\n return $this->headers->getIterator();\n }", "public function getIterator()\r\n {\r\n return new \\ArrayIterator($this->data);\r\n }", "public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }", "public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }", "function getIterator()\n {\n return new \\ArrayIterator($this->items);\n }", "public function getIterator()\n {\n return new \\ArrayIterator($this->_data);\n }", "public function getIterator()\n {\n return new \\ArrayIterator($this->__data);\n }", "public function getIterator()\n {\n return $this->iterator;\n }", "public function getIterator()\n {\n return new ArrayIterator($this->result);\n }", "public function getIterator()\n {\n return new ArrayObject((array)$this->attributes);\n }", "public function getRows()\n\t{\n\t\t$ret = null;\n\t\tif ($this->_tbody instanceof HtmlElement) {\n\t\t\t$ret = $this->_tbody->getElements();\n\t\t}\n\t\treturn $ret;\n\t}", "public function getIterator()\n {\n }", "public function getIterator() {\n\t\t\t///////////////////\n\t\t\t// Member Variables\n\t\t\t///////////////////\n\t\t\t$iArray['Id'] = $this->intId;\n\t\t\t$iArray['FirstName'] = $this->strFirstName;\n\t\t\t$iArray['LastName'] = $this->strLastName;\n\t\t\t$iArray['SysTimestamp'] = $this->strSysTimestamp;\n\t\t\treturn new ArrayIterator($iArray);\n\t\t}", "public function getIterator()\n {\n return new \\ArrayIterator($this->attributes, 1);\n }", "public function getIterator() {\n\n\t\treturn new \\ArrayIterator( $this->fields );\n\t}", "function getIterator() {\n foreach($this->data() as $record) {\n yield $record;\n }\n }", "public function getIterator()\n {\n return new \\ArrayIterator($this->items->all());\n }", "public function getIterator() {\n\t\t\t///////////////////\n\t\t\t// Member Variables\n\t\t\t///////////////////\n\t\t\t$iArray['Id'] = $this->intId;\n\t\t\t$iArray['FirstName'] = $this->strFirstName;\n\t\t\t$iArray['LastName'] = $this->strLastName;\n\t\t\treturn new ArrayIterator($iArray);\n\t\t}", "public function getIterator()\n {\n $this->operation = 'SELECT';\n return $this->readFromConnection($this)->getIterator();\n }", "public function getIterator()\n\t{\n\t\t// Execute query and return ResultSet for iteration\n\t\t$result = $this->execute();\n\t\treturn ($result !== false) ? $result : array();\n\t}", "public function getIterator()\n {\n return new ArrayIterator((array)$this->data);\n }", "public function rows() {\n\t\treturn $this->row();\n\t}", "function getIterator()\n {\n return new MySQL_Result( $this );\n }", "public function getIterator() {\r\n return new ArrayIterator($this -> _data);\r\n }", "abstract protected function getRows();", "public function iterateAllElements()\n {\n return $this->getIterator();\n }", "function getRows() { return $this->_rows; }", "public function getRow()\n {\n return $this->row;\n }", "public function getRowsContainer()\n\t{\n\t\treturn $this->_tbody;\n\t}", "#[\\ReturnTypeWillChange]\n public function getIterator() : Traversable\n {\n foreach ($this->a as $row) {\n yield Vector::quick($row);\n }\n }", "public function getIterator()\n {\n return new \\ArrayObject($this->toArray());\n }", "public function getIterator()\n {\n return new ArrayIterator($this->data);\n }", "public function getIterator()\n {\n return new ArrayIterator($this->data);\n }", "public function getIterator()\n {\n return new ArrayIterator($this->attributes);\n }", "public function getIterator()\n {\n return new ArrayIterator($this->items->all());\n }", "public function pulled(): Iterator;", "public function getIterator()\n {\n foreach ($this->iterable as $item) {\n yield $item;\n }\n }", "public function getRow(){\n return $this->_row;\n }", "public function getIterator()\n {\n return new Iterator($this->entities);\n }", "public function getIterator()\n {\n return new \\ArrayIterator($this->elements(true));\n }", "public function getIterator()\n {\n return new ArrayIterator($this->_data);\n }", "public function getIterator()\r\n {\r\n return new ArrayIterator($this->attributes);\r\n }", "public function getIterator()\n {\n return new ArrayObject($this->_data);\n }", "abstract public function get_rows();", "public function getRow()\n {\n return $this->row;\n }", "public function getIterator()\n {\n return new \\ArrayIterator($this);\n }", "public function getIterator() {\r\n return new ArrayIterator($this->data);\r\n }", "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n }", "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n }", "public function getIterator(): Traversable\n\t{\n\t\t$toIterate = [];\n\t\tforeach ($this->headers as $header)\n\t\t{\n\t\t\tif (count($header[\"values\"]) > 1)\n\t\t\t{\n\t\t\t\t$toIterate[$header[\"name\"]] = $header[\"values\"];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$toIterate[$header[\"name\"]] = $header[\"values\"][0];\n\t\t\t}\n\t\t}\n\n\t\treturn new \\ArrayIterator($toIterate);\n\t}", "public function getIterator() {\n\t\t\t///////////////////\n\t\t\t// Member Variables\n\t\t\t///////////////////\n\t\t\t$iArray['IdOrganization'] = $this->intIdOrganization;\n\t\t\t$iArray['Name'] = $this->strName;\n\t\t\t$iArray['Phone'] = $this->strPhone;\n\t\t\t$iArray['QrCode'] = $this->strQrCode;\n\t\t\t$iArray['OrganizationImage'] = $this->strOrganizationImage;\n\t\t\t$iArray['Latitude'] = $this->strLatitude;\n\t\t\t$iArray['Longitude'] = $this->strLongitude;\n\t\t\t$iArray['Country'] = $this->strCountry;\n\t\t\t$iArray['City'] = $this->strCity;\n\t\t\t$iArray['Address'] = $this->strAddress;\n\t\t\t$iArray['IdOrganizationType'] = $this->intIdOrganizationType;\n\t\t\t$iArray['IdOwner'] = $this->intIdOwner;\n\t\t\treturn new ArrayIterator($iArray);\n\t\t}", "public function getIterator()\n\t{\n return $this->getData();\n\t\t// return new CMapIterator($this->getData());\n\t}", "#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n foreach ($this->iteratePages() as $page) {\n foreach ($page as $key => $element) {\n yield $key => $element;\n }\n }\n }", "public function getIterator() {\n return new ArrayIterator($this->getAll());\n }", "public function getIterator(): \\Traversable;", "public function getIterator(): \\Traversable;", "public function getIterator()\n {\n return new MF_PHP_Array($this->__data);\n }", "public function getIterator(): Iterator\n {\n return $this->{$this->fnDoGetIterator}();\n }", "public function getIterator()\n {\n return new ArrayIterator($this->export());\n }", "function getRows() {\n\t\treturn $this->rows;\n\t}", "public function getIterator()\n {\n return new ArrayObject($this->items);\n }", "public function getIterator()\n\t{\n\t\treturn new ArrayIterator($this->items);\n\t}", "public function getIterator()\n {\n return new \\ArrayIterator($this->_items);\n }", "public function getIterator()\n {\n throw new NotImplementedException(\"This resource does not support iteration\");\n }", "public function getRows ()\n {\n return $this->_rows;\n }", "public function get_rows() {\n\t\tif (!isset($this->rows)) {\n\t\t\t$this->rows = $this->get_array();\n\t\t\t// Take out the header\n\t\t\tarray_shift($this->rows);\n\t\t}\n\t\telse {\n\t\t\treset($this->rows);\n\t\t}\n\t\treturn $this->rows;\n\t}", "public function getIterator() {\n return new \\ArrayIterator($this->cast);\n }", "public function get_row();", "public function getIterator()\n {\n return new ArrayIterator($this->entities);\n }", "public function getIterator()\n\t{\n\t\treturn new \\ArrayIterator($this->array);\n\t}", "public function getIterator()\n {\n return new ArrayIterator($this->toArray());\n }" ]
[ "0.695523", "0.68069005", "0.6612693", "0.6612693", "0.65917534", "0.6573931", "0.65696836", "0.65684927", "0.65684927", "0.65684927", "0.65684927", "0.65684927", "0.65684927", "0.6512575", "0.65009004", "0.6494172", "0.6463965", "0.6391734", "0.6346755", "0.63464385", "0.63425547", "0.6318436", "0.63140905", "0.62703806", "0.62690115", "0.62667733", "0.6247886", "0.62472266", "0.6238347", "0.6223869", "0.62197405", "0.6214424", "0.6214424", "0.6206746", "0.6199922", "0.61993915", "0.6174988", "0.6158181", "0.61436355", "0.61346686", "0.6134057", "0.61315775", "0.6125824", "0.61217886", "0.6113131", "0.61091036", "0.60827076", "0.60685223", "0.60619295", "0.60599434", "0.6049893", "0.603763", "0.60361934", "0.60325706", "0.6031876", "0.602912", "0.60244036", "0.6022482", "0.6008493", "0.6001013", "0.59885573", "0.59885573", "0.5983715", "0.5983224", "0.5980561", "0.5976076", "0.597532", "0.5972297", "0.5967643", "0.59627426", "0.59582645", "0.5957287", "0.59528166", "0.5941053", "0.5929044", "0.59262574", "0.5921024", "0.5921024", "0.59149075", "0.5884771", "0.5878629", "0.5877274", "0.58728355", "0.58656234", "0.58656234", "0.5864215", "0.58619654", "0.5861083", "0.5856738", "0.58536214", "0.58509076", "0.58441836", "0.5842247", "0.5834078", "0.58332974", "0.5821038", "0.58191097", "0.5811972", "0.5809234", "0.57917154" ]
0.73687
0
Add header row element
Добавить элемент строки заголовка
public function addHeaderElement(HtmlTableRow $row) { $this->_createHeaderContainer(); $this->_thead->addElement($row); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addHeaderRowToCSV() {}", "static function generateTableHeaderHTML()\n\t{\n\t\techo \"<tr class='exTableRow'>\\n\";\n\t\techo \"<th class='exTableColLineNum'>Item #</th>\\n\";\n\t\techo \"<th class='exTableColDesc'>Description of Work</th>\\n\";\n\t\techo \"<th class='exTableColAmount'>Amount</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}", "function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }", "private function setTableHeader($row){\n\t\t$header_data=false;\n\t\tif($this->header){\n\t\t\t$header_data=$this->header;\n\t\t}\n\t\telse{\n\t\t\tif(!empty($row) && is_array($row) && count($row)){\n\t\t\t\tforeach($row as $i => $v){\n\t\t\t\t\t$header_data[$i]=$i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!empty($header_data)){\n\t\t\t$this->table_header.=_N_T.'<tr>';\n\t\t\t$this->table_header.=_N_T_T.'<th class=\"th.LineNum\">#</th>';\n\t\t\tforeach($header_data as $name => $value){\n\t\t\t\t$this->table_header.=_N_T_T.'<th nowrap=\"nowrap\">'.$value.$this->getOrderBy($name).'</th>';\n\t\t\t}\n\t\t\t$this->table_header.=_N_T.'</tr>';\n\t\t}\n\t\treturn $this;\n\t}", "public function renderTableHeader() {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = $this->html()->tag('table-row', array('content' => implode('', $cells)), $this->headerRowOptions);\n\n if ($this->filterPosition == self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition == self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }", "public function writeHeaderRow() {\n $headers = $this->getCSVHeaderRow();\n\n // write to the CSV\n fputcsv($this->newCSV, $headers);\n }", "public function setHeader($rowHeader){\n array_unshift($this->data,$rowHeader);\n return $this;\n }", "public function tableHeaderRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($cols as $k){\n $out .= '<td>'.$k.'</td>';\n }\n return('<tr>'.$out.'</tr>');\n }", "function header() {\n //\n //Get the fields in this sql \n $cols= $this->fields->get_array();\n //\n //Loop through the fields and display the <tds>\n foreach ($cols as $col) {\n //\n $name= is_null($col->alias) ? $col->to_str():$col->alias;\n echo \"<th>$name</th>\"; \n }\n }", "function tableheader_close() {\n $this->doc .= '</th>';\n }", "public function __Header(){\n $this->Ln(5);\n $this->SetDrawColor(160,160,160);\n $this->SetFillColor(230,230,230);\n $this->SetTextColor(100);\n $this->SetFont('Arial','B',7);\n $this->SetX(($this->w - $this->_tWidth)/2);\n foreach($this->_fields as $field)\n $this->Cell($field[\"size\"],5,$field[\"header\"],1,0,\"C\",true);\n $this->Ln();\n }", "public function renderTableHeader()\n {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = Html::tag('tr', implode('', $cells), $this->headerRowOptions);\n if ($this->filterPosition === self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition === self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }", "function table_table_header_row($values)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\t$cells->attach(do_template('TABLE_TABLE_HEADER_ROW_CELL',array('_GUID'=>'5002f54ccddf7259f3460d8c0759fd1a','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_HEADER_ROW',array('_GUID'=>'2f4095b8d30f50f34fdd6acf8dd566b1','CELLS'=>$cells));\n}", "function Table_Headers($header,$w)\r\n{\r\n //Colors, line width and bold font\r\n $this->SetFillColor(153,153,153);\r\n $this->SetTextColor(0);\r\n $this->SetDrawColor(128,0,0);\r\n $this->SetLineWidth(.3);\r\n $this->SetFont('Arial','B','7');\r\n\t\r\n //Header\r\n\t\r\n\t//Output table header\r\n for($i=0;$i<count($header);$i++)\r\n $this->Cell($w[$i],5,$header[$i],1,0,'C',1);\r\n $this->Ln();\r\n}", "private function buildHeader()\n\t{\n\t\tif ($this->hide_header)\n\t\t\treturn;\n\n\t\techo '<thead><tr>';\n\n\t\t// Get field names of result\n\t\t$headers = $this->_db->fieldNameArray($this->result);\n\t\t$this->column_count = count($headers);\n\n\t\t// Add a blank column if the row number is to be shown\n\t\tif ($this->show_row_number)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\">&nbsp;</td>';\n\t\t}\n\n\t\t// Show checkboxes\n\t\tif ($this->show_checkboxes)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header tbl-checkall\"><input type=\"checkbox\" name=\"checkall\" onclick=\"tblToggleCheckAll'.$this->_clsnumber.'()\"></td>';\n\t\t}\n\n\t\t// Loop through each header and output it\n\t\tforeach ($headers as $t)\n\t\t{\n\t\t\t// Skip column if hidden\n\t\t\tif (in_array($t, $this->hidden))\n\t\t\t{\n\t\t\t\t$this->column_count--;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check for header caption overrides\n\t\t\tif (array_key_exists($t, $this->header))\n\t\t\t\t$header = $this->header[$t];\n\t\t\telse\n\t\t\t\t$header = $t;\n\n\t\t\tif ($this->hide_order)\n\t\t\t\techo '<td class=\"tbl-header\">' . $header; // Prevent the user from changing order\n\t\t\telse {\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\t$order = ($this->order['Order'] == self::ORDER_ASC)\n\t\t\t\t\t? self::ORDER_DESC\n\t\t\t\t\t: self::ORDER_ASC;\n\t\t\t\telse\n\t\t\t\t\t$order = self::ORDER_ASC;\n\n\t\t\t\techo '<td class=\"tbl-header\"><a href=\"javascript:;\" onclick=\"tblSetOrder'.$this->_clsnumber.'(\\'' . $t . '\\', \\'' . $order . '\\')\">' . $header . \"</a>\";\n\n\t\t\t\t// Show the user the order image if set\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\techo '&nbsp;<img src=\"images/sort_' . strtolower($this->order['Order']) . '.gif\" class=\"tbl-order\">';\n\t\t\t}\n\n\t\t\t// Add filters if allowed and only if the column type is not \"special\"\n\t\t\tif ($this->allow_filters and !empty($t)){\n\t\t\t\t\t\n\t\t\t\tif (!in_array($this->type[$t][0], array(\n\t\t\t\t\t\tself::TYPE_ARRAY,\n\t\t\t\t\t\tself::TYPE_IMAGE,\n\t\t\t\t\t\tself::TYPE_FUNCTION,\n\t\t\t\t\t\tself::TYPE_DATE,\n\t\t\t\t\t\tself::TYPE_CHECK,\n\t\t\t\t\t\tself::TYPE_CUSTOM,\n\t\t\t\t\t\tself::TYPE_PERCENT\n\t\t\t\t)))\n\t\t\t\t{\n\t\t\t\t\tif ($this->filter['Column'] == $t and !empty($this->filter['Value']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter_display = 'block';\n\t\t\t\t\t\t$filter_value = $this->filter['Value'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$filter_display = 'none';\n\t\t\t\t\t\t$filter_value = '';\n\t\t\t\t\t}\n\t\t\t\t\techo '<a href=\"javascript:;\" onclick=\"tblShowHideFilter'. $this->_clsnumber .'(\\'' . $t . '\\')\"> filter </a>\n\t\t\t\t\t<br><div class=\"tbl-filter-box\" id=\"'.$this->_clsnumber.'filter-' . $t . '\" style=\"display:' . $filter_display . '\">\n\t\t\t\t\t<input type=\"text\" size=\"6\" id=\"'.$this->_clsnumber.'filter-value-' . $t . '\" value=\"'.$filter_value.'\">&nbsp;\n\t\t\t\t\t<a href=\"javascript:;\" onclick=\"tblSetFilter'.$this->_clsnumber.'(\\'' . $t . '\\')\">filter</a></div>';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t\techo '</td>';\n\t\t}\n\n\t\t// If we have controls, add a blank column\n\t\tif (count($this->controls) > 0)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\">&nbsp;</td>';\n\t\t}\n\n\t\techo '</tr></thead>';\n\t}", "private function getHeaders(){\n\t\t$thead=\"\";\n\t\tif(!empty($this->headers)){\n\t\t\t$thead=\"<thead>\";\n\t\t\t$thead.=\"<tr>\";\n\t\t\t$headerNumber=0;\n\t\t\t$fieldNumber=0;\n\t\t\t$count=count($this->headers)-1;\n\t\t\t\n\t\t\t//Busca si hay columnas anteriores a agregar\n\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Busca las columnas declaradas\n\t\t\tforeach($this->headers as $name){\n\t\t\t\tif($this->headerSortable){\n\t\t\t\t\tif($this->order!==\"\"&&!empty($this->order)){\n\t\t\t\t\t\t$order=explode('|',$this->order);\n\t\t\t\t\t\tif(is_array($order)&&$fieldNumber==$order[0]){\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-\".$order[1];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header class=\\\"$classSortable\\\" onclick=\\\"javascript:{$this->id}Reorder($fieldNumber);\\\" {$this->id}_field_number=\\\"$fieldNumber\\\">$name</th>\";\n\t\t\t\t}else{\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header>$name</th>\";\n\t\t\t\t}\n\t\t\t\t$fieldNumber++;\n\t\t\t\t$headerNumber++;\n\t\t\t}\n\t\t\t\n\t\t\t//Busca si hay columnas posteriores a agregar\n\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"</tr>\";\n\t\t\t\n\t\t\t//Guardamos el numero total de columnas\n\t\t\t$this->cols=$headerNumber;\n\t\t\t\n\t\t\t\n\t\t\t$tfilter=\"\";\n\t\t\t$type=\"\";\n\t\t\tif($this->headerFilterable){\n\t\t\t\t$cols=count($this->fields)-1;\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<=$cols;$i++){\n\t\t\t\t\t$meClass=velkan::$config[\"datagrid\"][\"filters\"][\"inputClass\"];\n\t\t\t\t\t\n\t\t\t\t\t$type=\"\";\n\t\t\t\t\tif(!empty($this->types)){\n\t\t\t\t\t\t$type=$this->types[$i];\n\t\t\t\t\t}\n\t\t\t\t\t$value=\"\";\n\t\t\t\t\tif(!empty($this->filters)){\n\t\t\t\t\t\tforeach($this->filters as $filter){\n\t\t\t\t\t\t\tif($filter[0]==$i){\n\t\t\t\t\t\t\t\t$value=$filter[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$tfilter.=\"<th class='velkan-grid-column-filter'>\";\n\t\t\t\t\t\n\t\t\t\t\tswitch($type){\n\t\t\t\t\t\tcase \"date\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATE));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"datetime\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATETIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"time\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_TIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$tfilter.=\"<input type='search' name='grid{$this->id}Filter[]' $type value=\\\"$value\\\">\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$tfilter.=\"</th>\";\n\t\t\t\t}\n\t\t\t\t$display=($this->ShowFilters?\"\":\"style='display:none'\");\n\t\t\t\t\n\t\t\t\t$filterPrepend=\"\";\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$filterPrepend.=\"<th>&nbsp;</th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$filterAppend=\"\";\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$filterAppend.=\"<th>&nbsp;</th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tfilter=\"<tr id='grid{$this->id}Filters' $display>{$filterPrepend}{$tfilter}{$filterAppend}</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($type!=\"\"){\n\t\t\t\t$jss=new generalJavaScriptFunction();\n\t\t\t\t$jss->registerFunction(\"applyFormats\");\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"$tfilter</thead>\";\n\t\t}\n\t\t\n\t\treturn $thead;\n\t}", "private function makeTDHeader($type,$header): void {\r\n\t\t$str_d = ($this->bCollapsed) ? ' style=\"display:none\"' : '';\r\n\t\techo '<tr'.$str_d.'>\r\n\t\t\t\t<td class=\"dBug_clickable_row dBug_'.$type.'Key\">' . $header . '</td>\r\n\t\t\t\t<td>';\r\n\t}", "public function addHeader()\n {\n }", "function echoHeader($spec) {\n\techo('<div class=\"tr\">');\n\tforeach($spec as $col) {\n\t\techo('<div class=\"th\">' . htmlspecialchars($col) . '</div>');\n\t}\n\techo('<div class=\"th\">Actions</div>');\n\techo('</div>');\n}", "public function renderHeaderCell()\n\t{\n\t\t$_headerOptions = ['class' => 'serial-column'];\n\t\tif ($this->grid->filterModel !== null && $this->grid->filterPosition !== \\yii\\grid\\GridView::FILTER_POS_HEADER)\n\t\t\t$_headerOptions['rowspan'] = '2';\n\n\t\t$this->headerOptions = ArrayHelper::merge($_headerOptions, $this->headerOptions);\n\t\treturn Html::tag('th', $this->renderHeaderCellContent(), $this->headerOptions);\n\t}", "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\t\tglobal $heading_name,$ORG_TITLE;\n\t\t\n\t\t$worksheet->set_column(0, 0, 5);\n\t\t$worksheet->set_column(1, 1, 40);\n\t\t$worksheet->set_column(2, 2, 27);\n\t\t$worksheet->set_column(3, 3, 25);\n\t\t$worksheet->set_column(4, 4, 12);\n\t\t$worksheet->set_column(5, 5, 5);\n\t\t$worksheet->set_column(6, 6, 4);\n\t\t$worksheet->set_column(7, 7, 4);\n\t\t$worksheet->set_column(8, 8, 4);\n\t\t$worksheet->set_column(9, 9, 4);\n\t\t$worksheet->set_column(10, 10, 4);\n\t\t$worksheet->set_column(11, 11, 4);\n\t\t$worksheet->set_column(12, 12, 18);\n\t\t$worksheet->set_column(13, 13, 25);\n\t\t$worksheet->set_column(14, 14, 5);\n\t\t$worksheet->set_column(15, 15, 8);\n\t\t$worksheet->set_column(16, 16, 28);\n\t\t$worksheet->set_column(17, 17, 15);\n\t\t$worksheet->set_column(18, 18, 20);\n\t\t$worksheet->set_column(19, 19, 12);\n\t\t$worksheet->set_column(20, 20, 8);\n\t\t$worksheet->set_column(21, 21, 12);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"(1)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"(2)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"(3)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"(4)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"(5)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"(6)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"(7)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"(8)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"(9)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"(10)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"(11)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"(12)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 17,\"(13)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"(14)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"(15)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"(16)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"(17)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อส่วนราชการ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"เลข\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\",0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"L\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"พื้นที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"วุฒิการศึกษา/\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"อัตรา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ประจำตัว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"เพศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"เกิด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"บรรจุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"หมวด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"ชื่อตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"ชั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"ส่วนกลาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"ปฏิบัติงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"ประกาศนียบัตร\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"เงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"ปีที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\t\t$worksheet->write($xlsRow, 21, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 1, \"$ORG_TITLE\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"เขต/แขวง/ศูนย์\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"ประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 15, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 16, \"/ภูมิภาค\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 17, \"(จังหวัด)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 18, \"เฉพาะทาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 19, \"ปัจจุบัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 20, \"เกษียณ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}", "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 10);\n\t\t$worksheet->set_column(1, 1, 25);\n\t\t$worksheet->set_column(2, 2, 30);\n\t\t$worksheet->set_column(3, 3, 20);\n\t\t$worksheet->set_column(4, 4, 30);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 20);\n\t\t$worksheet->set_column(7, 7, 30);\n\t\t$worksheet->set_column(8, 8, 30);\n\t\t$worksheet->set_column(9, 9, 20);\n\t\t$worksheet->set_column(10, 10, 10);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"สาขาวิชา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"ระดับการศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"สถานศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"ประเทศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"ตำแหน่ง/ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ชื่อทุน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"ระยะเวลา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"จำนวนวัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t}", "function create_pool_header()\n{\n $header =\n \"<thead>\n <tr>\n <th scope='col' class='rounded-company'>Pool</th>\n <th scope='col' class='rounded-q1'>Priority</th>\n <th scope='col' class='rounded-q1' colspan='2'>URL</th>\n <th scope='col' class='rounded-q1'>Gets</th>\n <th scope='col' class='rounded-q1'>Accepts</th>\n <th scope='col' class='rounded-q1'>Rejects</th>\n <th scope='col' class='rounded-q1'>Discards</th>\n <th scope='col' class='rounded-q1'>Stales</th>\n <th scope='col' class='rounded-q1'>Get Fails</th>\n <th scope='col' class='rounded-q1'>Rem fails</th>\n </tr>\n </thead>\";\n\n return $header;\n}", "private function makeTableHeader($type,$header,$colspan=2): void {\r\n\t\tif(!$this->bInitialized) {\r\n\t\t\t$header = ' (' . $header . ') ';\r\n\t\t\t$this->bInitialized = true;\r\n\t\t}\r\n\t\t$str_i = ($this->bCollapsed) ? 'style=\"font-style:italic\" ' : '';\r\n\t\t\r\n\t\techo '<table class=\"dBug_table dBug_'.$type.'\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th '.$str_i.' class=\"dBug_clickable_table dBug_' . $type . 'Header\" colspan=\"' . $colspan . '\">' . $header . '</th>\r\n\t\t\t\t</tr>';\r\n\t}", "function drawHeader(){\n switch ($this->doing){\n case 'budget_byProjects':\n case 'myguests':\n if (!(@$this->t instanceof b_table)){\n\t$this->dbg('CANCEL header');\n\t$this->t = new b_table_dummy();\n }\n break;\n\n default:\n parent::drawHeader();\n break;\n }\n }", "private function generate_columns_header($p_edit,&$p_resultat,&$p_result_header)\r\n\t\t{\r\n\t\t\t// Create a new line\r\n\t\t\t$html = '<tr id=\"tr_header_title_'.$this->c_id.'\">';\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Create the first column (checkbox and edit button)\r\n\t\t\t ====================================================================*/\t\r\n\t\t\t$html .= '<td align=\"left\" id=\"header_th_0__'.$this->c_id.'\" class=\"__'.$this->c_theme.'__cell_opt_h\"><div id=\"th0_'.$this->c_id.'\"></div></td>';\r\n\t\t\t$html .= '<td></td>';\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t// Quantify of order clause\r\n\t\t\t$qtt_order = $this->get_nbr_order();\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Display the resize cursor or not\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tif($this->c_mode != __CMOD__)\r\n\t\t\t{\r\n\t\t\t\t$cursor = ' cur_resize';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$cursor = '';\r\n\t\t\t}\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Browse all columns\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tforeach($this->c_columns as $key_col => $val_col)\r\n\t\t\t{\r\n\t\t\t\tif($val_col['display'])\r\n\t\t\t\t{\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Define order icon\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($this->c_columns[$key_col]['order_by'] != false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// An order clause is defined\r\n\t\t\t\t\t\tif($this->c_columns[$key_col]['order_by'] == __ASC__)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// ASC icon\r\n\t\t\t\t\t\t\t$class_order = ' __'.$this->c_theme.'_ico_sort-ascend __'.$this->c_theme.'_ico';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// DESC icon\r\n\t\t\t\t\t\t\t$class_order = ' __'.$this->c_theme.'_ico_sort-descend __'.$this->c_theme.'_ico';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Display the number of order only if there is more than one order clause\r\n\t\t\t\t\t\t($qtt_order > 1) ? $order_prio = $this->c_columns[$key_col]['order_priority'] : $order_prio = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// No order clause defined\r\n\t\t\t\t\t\t$class_order = '';\r\n\t\t\t\t\t\t$order_prio = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Order column\r\n\t\t\t\t\t$html .= '<td class=\"__'.$this->c_theme.'_bloc_empty'.$class_order.'\"><span class=\"__vimofy_txt_mini_ vimofy_txt_top\">'.$order_prio.'</span></td>';\r\n\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Define order icon\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($this->c_mode != __CMOD__)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$onmousedown = 'onmousedown=\"vimofy_resize_column_start('.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t\t$ondblclick = 'ondblclick=\"vimofy_mini_size_column('.$key_col.',\\''.$this->c_id.'\\');\" ';\r\n\t\t\t\t\t\t$lib_redim = $this->hover_out_lib(17,17);\r\n\t\t\t\t\t\t$event = $this->hover_out_lib(40,40).' onmousedown=\"vimofy_move_column_start(event,'.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$onmousedown = '';\r\n\t\t\t\t\t\t$ondblclick = '';\r\n\t\t\t\t\t\t$lib_redim = '';\r\n\t\t\t\t\t\t$event = $this->hover_out_lib(40,40).' onmousedown=\"click_column_order(\\''.$this->c_id.'\\','.$key_col.');\"';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*===================================================================*/\r\n\r\n\t\t\t\t\t// Column title\r\n\t\t\t\t\t$html .= '<td align=\"left\" class=\"__'.$this->c_theme.'__cell_h nowrap\" id=\"header_th_'.$key_col.'__'.$this->c_id.'\"><div '.$event.' class=\"align_'.$this->c_columns[$key_col]['alignment'].' __'.$this->c_theme.'_column_title\" id=\"th'.$key_col.'_'.$this->c_id.'\"><span id=\"span_'.$key_col.'_'.$this->c_id.'\">'.$this->c_columns[$key_col]['name'].'</span></div></td>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Display other column\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($p_edit != false) $html .= '<td style=\"padding:0;margin:0;\"></td>';\r\n\r\n\t\t\t\t\t$html .= '<td '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t$html .= '<td '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__sep_h'.$cursor.'\"></td>';\r\n\t\t\t\t\t$html .= '<td id=\"right_mark_'.$key_col.'_'.$this->c_id.'\" '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$html .= '</tr>';\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Input for search on the column\r\n\t\t\t ====================================================================*/\t\r\n\t\t\t// Create a new line\r\n\t\t\t$html .= '<tr id=\"tr_header_input_'.$this->c_id.'\">';\r\n\t\t\t\r\n\t\t\t// Create the first column (checkbox and edit button)\r\n\t\t\t$html .= '<td align=\"left\" class=\"__'.$this->c_theme.'__cell_opt_h\"><div id=\"thf0_'.$this->c_id.'\" class=\"__'.$this->c_theme.'__vimofy_version\" onclick=\"window.open(\\'vimofy_bugs\\');\">v'.$this->c_software_version.'</div></td>';\r\n\t\t\t\r\n\t\t\t// Id column display counter\r\n\t\t\t$id_col_display = 0;\r\n\t\t\t\r\n\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Browse all columns\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tforeach($this->c_columns as $key_col => $val_col)\r\n\t\t\t{\r\n\t\t\t\tif($val_col['display'])\r\n\t\t\t\t{\r\n\t\t\t\t\tif($id_col_display == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<td id=\"th_0_c'.$key_col.'_'.$this->c_id.'\"></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<td id=\"th_0_c'.($key_col).'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*if(isset($this->c_columns[$key_col]))\r\n\t\t\t\t\t{*/\r\n\t\t\t\t\t\t$onmousedown = 'onmousedown=\"vimofy_resize_column_start('.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t\t$ondblclick = 'ondblclick=\"vimofy_mini_size_column('.$key_col.',\\''.$this->c_id.'\\');\" ';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t\t * Define the filter value\r\n\t\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\t\t$filter_input_value = '';\r\n\t\t\t\t\t\t$state_filter_input = '';\r\n\t\t\t\t\t\tif(isset($val_col['filter']['input']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// A filter was defined by the user\r\n\t\t\t\t\t\t\t$filter_input_value = $val_col['filter']['input']['filter'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// No filter was defined by the user\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Check if vimofy was in edit mode\r\n\t\t\t\t\t\t\tif($p_edit != false && !isset($val_col['rw_flag']) || ($p_edit != false && isset($val_col['rw_flag']) && $val_col['rw_flag'] != __FORBIDEN__))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// The vimofy was in edit mode, search all same value in the column\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Place the cursor on the first row of the recordset\r\n\t\t\t\t\t\t\t\tif($this->c_obj_bdd->rds_num_rows($p_result_header) > 0)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$this->c_obj_bdd->rds_data_seek($p_result_header,0);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// TODO Use a DISTINCT QUERY - Vimofy 1.0\r\n\t\t\t\t\t\t\t\t$key_cold_line = 0;\r\n\t\t\t\t\t\t\t\t$last_value = '';\r\n\t\t\t\t\t\t\t\t$flag_same = false;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\twhile($row = $this->c_obj_bdd->rds_fetch_array($p_result_header))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif($key_cold_line > 0)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif($last_value == $row[$val_col['sql_as']])\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$flag_same = true;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$flag_same = false;\r\n\t\t\t\t\t\t\t\t\t\t\t// The value is not the same of the previous, stop browsing data \r\n\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}\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$flag_same = true;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t$last_value = $row[$val_col['sql_as']];\r\n\t\t\t\t\t\t\t\t\t$key_cold_line = $key_cold_line + 1;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif($flag_same)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$filter_input_value = $last_value;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$filter_input_value = '';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif($p_edit != false && isset($val_col['rw_flag']) && $val_col['rw_flag'] == __FORBIDEN__)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$state_filter_input = 'disabled';\t\t\t\t\t\t\t\t\t// Disable the input because the edition of column is forbiden\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(isset($val_col['filter']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_on __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(isset($val_col['lov']) && isset($val_col['is_lovable']) && $val_col['is_lovable'] == true)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_lovable __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(isset($val_col['lov']))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_no_icon __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t\t * Menu button oncontextmenu\r\n\t\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\t\tif($this->c_type_internal_vimofy == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Principal vimofy, diplay internal vimofy\r\n\t\t\t\t\t\t\t$oncontextmenu = 'vimofy_display_internal_vim(\\''.$this->c_id.'\\',__POSSIBLE_VALUES__,'.$key_col.');return false;';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Internal vimofy, doesn't display other internal vimofy\r\n\t\t\t\t\t\t\t$oncontextmenu = 'return false;';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '<td id=\"th_1_c'.$key_col.'_'.$this->c_id.'\" class=\"__vimofy_unselectable\" style=\"width:20px;\"><div style=\"width:20px;margin:0;\" '.$this->hover_out_lib(21,21).' oncontextmenu=\"'.$oncontextmenu.'\" class=\"'.$class_btn_menu.'\" onclick=\"vimofy_toggle_header_menu(\\''.$this->c_id.'\\','.$key_col.');\" id=\"th_menu_'.$key_col.'__'.$this->c_id.'\"></div></td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_2_c'.$key_col.'_'.$this->c_id.'\" align=\"left\" class=\"__'.$this->c_theme.'__cell_h\">';\r\n\t\t\t\t\t\t$html .= '<div style=\"margin:0 3px;\"><input value=\"'.str_replace('\"','&quot;',$filter_input_value).'\" class=\"__'.$this->c_theme.'__input_h full_width\" '.$state_filter_input.' id=\"th_input_'.$key_col.'__'.$this->c_id.'\" type=\"text\" style=\"margin: 2px 0;\" size=1 onkeyup=\"if(document.getElementById(\\'chk_edit_c'.$key_col.'_'.$this->c_id.'\\'))document.getElementById(\\'chk_edit_c'.$key_col.'_'.$this->c_id.'\\').checked=true;vimofy_input_keydown(event,this,\\''.$this->c_id.'\\','.$key_col.');\" onchange=\"vimofy_col_input_change(\\''.$this->c_id.'\\','.$key_col.');\"/></div>';\r\n\t\t\t\t\t\tif($p_edit != false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif($state_filter_input == '')\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '<td style=\"width:10px;padding:0;margin:0;\"><input '.$this->hover_out_lib(76,76).' type=\"checkbox\" id=\"chk_edit_c'.$key_col.'_'.$this->c_id.'\" style=\"height:11px;width:11px;margin: 0 5px 0 2px;display:block;\"/></td>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '<td style=\"width:0;padding:0;margin:0;\"></td>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '</td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_3_c'.$key_col.'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_4_c'.$key_col.'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__sep_h'.$cursor.'\"></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$id_col_display = $id_col_display + 1;\r\n\t\t\t\t//}\r\n\t\t\t}\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t$html .= '<td id=\"th_0_c'.($key_col+1).'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t$html.= '<td><div style=\"width:200px\"></div></td>';\r\n\t\t\t$html .= '</tr>';\r\n\t\t\t/*===================================================================*/\r\n\r\n\t\t\t// Place the cursor on the first row of the recordset\r\n\t\t\tif($this->c_obj_bdd->rds_num_rows($p_resultat) > 0)\r\n\t\t\t{\r\n\t\t\t\t$this->c_obj_bdd->rds_data_seek($p_resultat,0);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn $html;\r\n\t\t}", "public function headingRow(): int\n {\n return 1;\n }", "function print_header(){\n\t\tglobal $worksheet, $xlsRow, $COM_LEVEL_SALP;\n\n\t\t$worksheet->set_column(0, 0, 6);\n\t\t$worksheet->set_column(1, 1, 20);\n\t\t$worksheet->set_column(2, 2, 25);\n\t\t$worksheet->set_column(3, 3, 50);\n\t\t$worksheet->set_column(4, 4, 15);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 15);\n\t\t$worksheet->set_column(7, 7, 15);\n\t\t$worksheet->set_column(8, 8, 35);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"เลขประจำตัวประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ชื่อ-นามสกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ตำแหน่ง/สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"อัตราเงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"เงินตอบแทน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"ที่เต็มขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ร้อยละ 2 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ร้อยละ 4 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}", "public function addHeaderArray(array $header) {\n $this->headers = $header;\n foreach ($header as $key => $cell) {\n if (!($cell instanceof HTMLTableHeaderCell)) {\n $cell = new HTMLTableHeaderCell($cell);\n }\n $this->headers[$key] = $cell;\n $this->addView($cell);\n }\n return $this;\n }", "private function generateHeading()\n {\n //get current dimensions\n\t\t$highestRow = $this->objWorksheet->getHighestRow(); // e.g. 10\n\t\t$highestColumn = $this->objWorksheet->getHighestColumn(); // e.g 'F'\n\n\t\t$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);\n\n\t\t//insert row on top\n\t\t$this->objWorksheet->insertNewRowBefore(1,2);\n\n\t\t//merge cells\n\t\t$this->objWorksheet->mergeCells(\"A1:\".$highestColumn.\"1\");\n\n\t\t//set the text for header\n\t\t$this->objWorksheet->setCellValue(\"A1\", $this->_headingText);\n\t\t$this->objWorksheet->getStyle('A1')->getAlignment()->setWrapText(true);\n\t\t$this->objWorksheet->getRowDimension('1')->setRowHeight(48);\n\n //Apply style\n\t\t$this->objWorksheet->getStyle(\"A1\")->applyFromArray($this->_headingStyleArray);\n }", "function html_generate_row($row, $prepend, $heading=false) {\n $html = '<tr>';\n if ($prepend !== null) {\n $html .= '<th>'.$prepend.'</th>';\n }\n for ($i=0; $i <= count($row)-1; $i++) {\n if (!$heading) {\n $html .= '<td>'.round($row[$i], 1).'</td>';\n } else {\n $html .= '<th>'.round($row[$i], 1).'</th>';\n }\n }\n $html .= '</tr>';\n return $html;\n}", "function outputHeader()\n {\n global $application;\n\n $output = '';\n if (!is_array($this -> _attrs))\n return $output;\n\n // output error column\n if (is_array($this -> _Errors) && !empty($this -> _Errors))\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-error.tpl.html',\n array()\n );\n\n foreach($this -> _attrs as $k => $v)\n {\n if ($v != 'YES')\n continue;\n\n $template_contents = array(\n 'HeaderName' => getMsg('SYS', @$this -> _headermap[$k])\n );\n $this -> _Template_Contents = $template_contents;\n $application -> registerAttributes($this -> _Template_Contents);\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-cell.tpl.html',\n array()\n );\n }\n\n return $output;\n }", "private function setHeader($data)\n {\n $this->headers = array_map('self::formatString', $data[0]);\n array_unshift($this->headers, 'row');\n }", "function addHeaderLine($name, $value) {\n\t\t$this->headerLines [$name] = $value;\n\t}", "public function createHeader($columns)\n {\n $html = \"<tr>\";\n\n \n foreach ($columns as $column) {\n $html .= \"<th>\".$column['label'].\"</th>\";\n }\n $html .= \"</tr>\";\n return $html; \n }", "function rallies_table_row_header($hdrs)\r\n{\r\n global $MYKEYWORDS;\r\n\r\n\t$OK = ($_SESSION['ACCESSLEVEL'] >= $GLOBALS['ACCESSLEVEL_READONLY']);\r\n\r\n\t$res = '';\r\n\t$hdrcols = explode(';',$hdrs);\r\n\tforeach ($hdrcols as $col)\r\n\t\t$res .= \"<th>\".$col.\"</th>\";\r\n\r\n return $res;\r\n}", "function Header() {\r\n // print the title\r\n $this->SetTitleFont();\r\n $this->Cell(100, 8, $this->title, 0, 0, \"L\");\r\n\r\n // print the author\r\n $this->SetAuthorFont();\r\n $this->Cell(0, 8, $this->author, 0, 0, \"R\");\r\n\r\n // header line\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, 17, 190, 0.2, \"F\");\r\n $this->Rect(10, 17.5, 190, 0.2, \"F\");\r\n $this->Ln(14);\r\n }", "private function buildHeader()\n {\n $month_name = $this->monthLabels[$this->month - 1] . ' ' . $this->year;\n $vclass = strtolower($this->view);\n $h = \"<table class='\" . $this->tableClass . \" \" . $vclass . \"'>\";\n $h .= \"<thead>\";\n $h .= \"<tr class='\" . $this->headClass . \"'>\";\n $cs = 5;\n if ($this->view == 'week' || $this->view == 'day') {\n $h .= \"<th>&nbsp;</th>\";\n }\n if ($this->view == 'day') {\n $cs = 1;\n }\n\n if ($this->nav) {\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->prevClass . \"' href='\" . $this->prevLink() . \"'>\" . $this->prevIco . \"</a>\";\n $h .= \"</th>\";\n $h .= \"<th colspan='$cs'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->nextClass . \"' href='\" . $this->nextLink() . \"'>\" . $this->nextIco . \"</a>\";\n $h .= \"</th>\";\n } else {\n $h .= \"<th colspan='7'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n }\n $h .= \"</tr>\";\n $h .= \"</thead>\";\n\n $h .= \"<tbody>\";\n if ($this->view != 'day' && $this->view != 'week') {\n $h .= \"<tr class='\" . $this->labelsClass . \"'>\";\n\n for ($i = 0; $i <= 6; $i++) {\n $h .= \"<td>\";\n $h .= $this->dayLabels[$i];\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n }\n if ($this->view == 'day' || $this->view == 'week') {\n $h .= self::getWeekDays();\n }\n\n $this->html .= $h;\n }", "function showHeader(){\n\t\t$header = \"\";\n\t\t// print the header row\n\t\t$header .= \"\t<tr>\\n\";\n\t\t// loop the fields\n\t\tforeach ($this->fields as $field) {\n\t\t\t// print each field\n\t\t\t$header .= \"\t\t<th>\".$field.\"</th>\\n\";\n\t\t}\n\t\t// end the header row\n\t\t$header .= \"\t</tr>\\n\";\n\t\treturn $header;\n\t}", "function Header()\n\t{\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','C');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->MultiCell(190,5,tipo_serv(),'0','C');\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->MultiCell(190,7,strtoupper(_('listado de clientes para cortes')),'0','C');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(133);\n\t\t$this->Cell(12,5,strtoupper(_('fecha')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"d/m/Y\"),0,0,'L');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->Cell(12,5,strtoupper(_('hora')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"h:i:s A\"),0,0,'L');\n\t\t$this->Ln();\t\t\n\t}", "protected function _createHeaderContainer()\n\t{\n\t\tif ($this->_thead == null) {\n\t\t\t$this->_thead = new HtmlElement('thead');\n\t\t\t$this->addElement($this->_thead);\n\t\t}\t\t\n\t}", "protected function draw_groupsHeaderHorizontal()\n {\n // $this->output->setColumnNo(0);\n $lastcolumno = $this->output->getColumnNo();\n $this->output->setColumnNo(0);\n $this->draw_groupsHeader();\n $this->output->setColumnNo($lastcolumno);\n $this->currentRowTop = $this->output->getLastBandEndY();\n \n //output print group\n //set callback use next page instead\n // echo 'a'; \n }", "protected function tableHead($header, $border) {\n $width = 15;\n $height = 12;\n \n foreach($header as $col) {\n $this->Cell($width, $height, $col, $border);\n }\n $this->Ln();\n }", "function Header()\n\t{\n\t\t// Police Arial gras 24\n\t\t$this->SetTextColor(255,10,22);\n\t\t$this->SetFont('Arial','B',14);\n\t\t// Décalage à droite\n\t\t$this->Cell(10);\n\t\t// Titre (ligne,titre)\n\t\t$this->Cell('',10,'Liste des employes',0,0,'C');\n\t\t// Saut de ligne\n\t\t$this->Ln(20);\n\t}", "private function readHeaderRow() {\n\n // Grab the line as items\n $csvLine = $this->stream->readCSVLine($this->separator, $this->enclosure);\n\n // Create fields from these\n $columns = [];\n foreach ($csvLine as $column) {\n // Expand out the title and the name\n $name = StringUtils::convertToCamelCase(trim($column));\n $columns[] = new Field($name);\n }\n\n $this->csvColumns = $columns;\n }", "abstract protected function getRowsHeader(): array;", "public function Header()\r\n\t{\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14);\r\n\t\t$this->Cell(170,7,\"Date :: \". $this->today_date ,1,0,'C');\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14); \r\n\t\t$this->MultiCell(170,8,\"Room Things Report \\n\".$this->title,1,'C');\r\n\t\t$this->Ln(5);\r\n\r\n\t}", "private function createHeaders($headers) {\r\n $html = '<tr class=\"ctable-headertag\">';\r\n foreach ($headers as $index => $header) {\r\n $html .= '<th>' . $header . '</th>';\r\n }\r\n $html .= '</tr>';\r\n return $html;\r\n\r\n }", "public function buildHeader() {\n $header['label'] = $this->t('Label');\n $header['workflow'] = $this->t('Workflow');\n $header['status'] = $this->t('Status');\n $header['transition'] = $this->t('Transitions');\n $header['roles'] = $this->t('Email Roles');\n $header['author'] = $this->t('Email Author');\n $header['emails'] = $this->t('Adhoc Emails');\n return $header + parent::buildHeader();\n }", "public function addRow() {\n if ($this->linesCount >= 0)\n $this->addContent('</div>');\n $this->linesCount ++;\n $this->colunsCount = 0;\n $this->addContent('<div class=\"row\" >');\n }", "static function generateTableHeaderHTML($a_div)\n\t{\n\t\techo \"<tr class='inTableRow'>\\n\";\n//\t\techo \"<th class='inTableColTaskID'>Task ID</th>\\n\";\n\t\techo \"<th class='inTableColTaskName'>{$a_div}</th>\\n\";\n\t\techo \"<th>Subcontractor</th>\\n\";\n\t\techo \"<th class='chTableColAmount'>Amount</th>\\n\";\n\t\techo \"<th>Notes</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}", "function header (){\n\t\t$this->setfont('Arial','B', 16);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'WANANCHI', 0, 0, 'C');\n\t\t$this->Ln(10);\n\t\t$this->setfont('Arial','',12);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'INFORMATION',0, 0, 'C');\n\t\t$this->Ln(30);\n\t}", "public function add_header() {\n }", "function _webform_csv_headers_file($component) {\r\n $header = array();\r\n // Two columns in header.\r\n $header[0] = array('', '');\r\n $header[1] = array($component['name'], '');\r\n $header[2] = array(t('Name'), t('Filesize (KB)'));\r\n return $header;\r\n}", "public function buildHeader() {\n return [\n ['data' => t('Teaching format'), 'class' => ['align-middle']],\n ['data' => t('Event'), 'class' => ['align-middle']],\n ['data' => t('Tutor'), 'class' => ['align-middle']],\n ['data' => t('Location'), 'class' => ['align-middle']],\n ['data' => t('Room'), 'class' => ['align-middle']],\n [\n 'data' => t('Date/time'),\n 'field' => 'time.field_event_time_value',\n 'sort' => 'desc',\n 'class' => ['align-middle'],\n ],\n ['data' => t('Registration status'), 'class' => ['align-middle']],\n ];\n }", "function create_devs_header()\n{\n$header =\n \"<thead>\n \t<tr>\n \t<th scope='col' class='rounded-company'>GPU #</th>\n <th scope='col' class='rounded-q1'>En</th>\n <th scope='col' class='rounded-q1'>Status</th>\n <th scope='col' class='rounded-q1'>Temp</th>\n <th scope='col' class='rounded-q1'>Fan Speed</th>\n <th scope='col' class='rounded-q1'>GPU Clk</th>\n <th scope='col' class='rounded-q1'>Mem Clk</th>\n <th scope='col' class='rounded-q1'>Volt</th>\n <th scope='col' class='rounded-q1'>Active</th>\n <th scope='col' class='rounded-q1'>MH/s 5s</th>\n <th scope='col' class='rounded-q1'>MH/s avg</th>\n <th scope='col' class='rounded-q1'>Acc</th>\n <th scope='col' class='rounded-q1'>Rej</th>\n <th scope='col' class='rounded-q1'>H/W Err</th>\n <th scope='col' class='rounded-q1'>Util</th>\n <th scope='col' class='rounded-q1'>Intens</th>\n </tr>\n </thead>\";\n \n return $header;\n}", "public function addHeader($values)\n\t{\n\t\t$this->_checkArgumentIsArray(__METHOD__, 1, $values);\n\t\t\n\t\t$row = $this->createHeader($values);\n\t\t$this->addHeaderElement($row);\n\t\treturn $row;\n\t}", "function headers()\n {\n // Maintain URL params for pagination\n if (empty($this->params['pass'])) {\n $this->params['pass'] = array();\n }\n $options = array(\n 'url' => array_merge($this->tableOptions['url'], $this->params['named'], $this->params['pass']),\n //'model' => $this->defaultModel\n );\n if (!empty($this->tableOptions['ajax'])) {\n $options['update'] = $this->tableOptions['ajax']['mh-update'];\n $options['indicator'] = $this->tableOptions['ajax']['mh-indicator'];\n $options['before'] = $this->Js->get($options['indicator'])->effect('fadeIn', array('buffer' => false));\n $options['complete'] = $this->Js->get($options['indicator'])->effect('fadeOut', array('buffer' => false));\n }\n\n\n $this->Paginator->options($options);\n\n $lines = array();\n foreach ($this->Columns as $field => $Column) {\n $lines[] = $headerHTML[] = $Column->header();\n }\n\n $row = $this->Html->tag('tr', implode(chr(10), $lines));\n\n return $this->Html->tag('thead', $row);\n }", "private function writeHeader(): void\n {\n $record = 0x0014; // Record identifier\n\n /* removing for now\n // need to fix character count (multibyte!)\n if (strlen($this->phpSheet->getHeaderFooter()->getOddHeader()) <= 255) {\n $str = $this->phpSheet->getHeaderFooter()->getOddHeader(); // header string\n } else {\n $str = '';\n }\n */\n\n $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader());\n $length = strlen($recordData);\n\n $header = pack('vv', $record, $length);\n\n $this->append($header . $recordData);\n }", "function table_begin($p_headrow, $p_class = '', $p_tr_attr = '', $p_th_attr = array()){\n\techo '<table class=\"table ' . $p_class . '\">';\n\techo '<thead>';\n\techo '<tr ' . $p_tr_attr . '>';\n\t\n\tfor($t_i=0; $t_i<count($p_headrow); $t_i++)\n\t\techo '<th ' . (isset($p_th_attr[$t_i]) ? $p_th_attr[$t_i] : '') . '>' . $p_headrow[$t_i] . '</th>';\n\n\techo '</tr>';\n\techo '</thead>';\n}", "public function addHeader(array $values) {\n if (!empty($values)) {\n $values = $this->prepareValues($values);\n $this->addRowToCsvData($values);\n }\n }", "protected function renderTableHeader(): string\n {\n if (!$this->options['showHeader']) {\n return '';\n }\n\n return\n '<thead>' .\n '<tr>' .\n '<th>' . $this->_('differences') . '</th>' .\n '</tr>' .\n '</thead>';\n }", "function tablethead_open() {\n $this->doc .= DOKU_TAB.'<thead>'.DOKU_LF;\n }", "function draw_header(){\r\n\t\t$out_multiple_search='';\r\n\r\n\t\t$arr_width=explode(',',$this->width);\r\n\t\t$out='<thead><tr id=\"'.$this->id.'_sort\">';\r\n\r\n\t\t$arr_sort=explode('_',$this->sort);\r\n\t\t$arr_header=explode(',',$this->header);\r\n\r\n\t\t$column=1;\r\n\t\tfor($i=0; $i<count($arr_header);$i++){\r\n\r\n\t\t\tif($this->sort_init!==false and $this->sort_init[$i]!='f'){\r\n\t\t\t\t\t$out.='<th'.(($this->width!='' and $arr_width[$i]>0) ? ' width=\"'.$arr_width[$i].'\"' : '').' onclick=\"'.$this->change_tags($this->get_url($i+1)).'\"><span'.($arr_sort[$i]=='f' ? ' class=\"no_sort' : ' class=\"sort').(substr($arr_sort[$i],-1)=='a' ? '_asc' : (substr($arr_sort[$i],-1)=='d' ? '_desc' : '')).'\"></span>'.$arr_header[$i].'</th>';\r\n\t\t\t}else{\r\n\t\t\t\t$out.='<th'.(($this->width!='' and $arr_width[$i]>0) ? ' width=\"'.$arr_width[$i].'\"' : '').'><span></span>'.$arr_header[$i].'</th>';\r\n\t\t\t}\r\n\r\n\t\t\tif($this->multiple_search_init===true or $this->multiple_search_init=='hide' or (strpos($this->multiple_search_init,'hide')!==false and $this->multiple_search_init[$i]=='t') or $this->multiple_search_init[$i]=='t')\r\n\t\t\t\t$out_multiple_search.='<th><input type=\"text\" id=\"'.$this->id.'_multiple_search'.($i+1).'\" name=\"'.$this->id.'_multiple_search[]'.'\" value=\"'.$this->multiple_search[$i].'\" onkeyup=\"ctMultiSearch(\\''.$this->id.'\\');\" /></a></th>';\r\n\t\t\telse\r\n\t\t\t\t$out_multiple_search.='<th></th>';\r\n\t\t}\r\n\r\n\r\n\t\t$out.='</tr>';\r\n\r\n\t\tif($this->multiple_search_init===true or strpos($this->multiple_search_init,'hide')!==false or strpos($this->multiple_search_init,'t')!==false)\r\n\t\t\t$out.='<tr id=\"'.$this->id.'_multiple_search\"'.(($this->multiple_search_init!==true and strpos($this->multiple_search_init,'hide')!==false) ? ' style=\"display: none;\"' : '').'>'.$out_multiple_search.'</tr>';\r\n\r\n\t\t$out.'</thead>';\r\n\r\n\t\treturn $out;\r\n\t}", "function generateTitle($header, $data)\n\t{\n\t\t$this->SetFillColor(63,73,204);\n\t\t$this->SetTextColor(255);\n\t\t$this->SetDrawColor(18,0,0);\n\t\t$this->SetLineWidth(.1);\n\t\t$this->SetFont('','B');\n\t\t// Header\n\t\t$w = array(70, 25, 30, 20,30,35,25);\n\t\tfor($i=0;$i<count($header);$i++)\n\t\t\t$this->Cell($w[$i],7,$header[$i],1,0,'C',true);\n\t\t$this->Ln();\n\t\t// Color and font restoration\n\t\t$this->SetFillColor(224,235,255);\n\t\t$this->SetTextColor(0);\n\t\t$this->SetFont('');\n\t\t// Data\n\t\t$fill = false;\n\t\tforeach($data as $row)\n\t\t{\n\t\t\t$this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);\n/*\t\t\t$this->Cell($w[1],6,$row[1],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[2],6,$row[2],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[3],6,$row[3],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[4],6,$row[4],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[5],6,$row[5],'LR',0,'C',$fill);*/\n\t\t\t$this->Ln();\n\t\t\t$fill = !$fill;\n\t\t}\n\t\t// Closing line\n\t\t$this->Cell(array_sum($w),0,'','T');\n\t}", "function Header() \n { \n\n list($r, $b, $g) = $this->xheadercolor; \n $this->setY(10); // shouldn't be needed due to page margin, but helas, otherwise it's at the page top \n $this->SetFillColor($r, $b, $g); \n $this->SetTextColor(0 , 0, 0); \n $this->Cell(0,20, '', 0,1,'C', 1); \n $this->Text(15,26,$this->xheadertext ); \n }", "function tableheader_open($colspan = 1, $align = null, $rowspan = 1, $classes = null) {\n $class = 'class=\"col'.$this->_counter['cell_counter']++;\n if(!is_null($align)) {\n $class .= ' '.$align.'align';\n }\n if($classes !== null) {\n if(is_array($classes)) $classes = join(' ', $classes);\n $class .= ' ' . $classes;\n }\n $class .= '\"';\n $this->doc .= '<th '.$class;\n if($colspan > 1) {\n $this->_counter['cell_counter'] += $colspan - 1;\n $this->doc .= ' colspan=\"'.$colspan.'\"';\n }\n if($rowspan > 1) {\n $this->doc .= ' rowspan=\"'.$rowspan.'\"';\n }\n $this->doc .= '>';\n }", "public function addHeader($header);", "function Header()\r\n{\r\n if($this->ProcessingTable)\r\n $this->TableHeader();\r\n}", "public function pi_list_header() {}", "public function Header()\n {\n // Set custom header and footer\n $this->setCustomHeader();\n\n if (array_key_exists($this->category, $this->categories)) {\n $title = $this->categories[$this->category]['name'];\n } else {\n $title = '';\n }\n\n $this->SetTextColor(0, 0, 0);\n $this->SetFont($this->currentFont, 'B', 18);\n\n if (0 < PMF_String::strlen($this->customHeader)) {\n $this->writeHTMLCell(0, 0, '', '', $this->customHeader);\n $this->Ln();\n $this->writeHTMLCell(0, 0, '', '', html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 0, false, true, 'C');\n } else {\n $this->MultiCell(0, 10, html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 'C', 0);\n $this->SetMargins(PDF_MARGIN_LEFT, $this->getLastH() + 5, PDF_MARGIN_RIGHT);\n }\n }", "public function csvHeaderRow()\n {\n static $columns;\n\n if ($columns === null) {\n $columns = [ 'source' ];\n $languages = $this->languages();\n foreach ($languages as $lang) {\n $columns[] = $lang;\n }\n\n $columns[] = 'context';\n }\n\n return $columns;\n }", "protected function addheader($filename)\n {\n $excelObject = PHPExcel_IOFactory::load($filename);\n //$excelObject = new PHPExcel();\n $excelObject->getProperties()\n ->setCreator(\"Gemstracker\")\n ->setLastModifiedBy(\"Gemstracker\")\n ->setTitle($this->model->getName());\n\n $activeSheet = $excelObject->getActiveSheet();\n\n $columnHeaders = $this->getColumnHeaders();\n $row = 1;\n\n $exportName = $this->getName();\n\n $i=0;\n $cell = 'A1';\n foreach($columnHeaders as $columnName=>$columnHeader) {\n $column = $this->getColumn($i);\n $cell = $column . $row;\n if (isset($this->data[$exportName]) && isset($this->data[$exportName]['format']) && in_array('formatVariable', $this->data[$exportName]['format'])) {\n $activeSheet->setCellValue($cell, $columnHeader);\n } else {\n $activeSheet->setCellValue($cell, $columnName);\n }\n if ($excelCellSize = $this->model->get($columnName, 'excelCellSize')) {\n $activeSheet->getColumnDimension($column)->setWidth($excelCellSize);\n } else {\n $activeSheet->getColumnDimension($column)->setAutoSize(true);\n }\n $i++;\n }\n\n $activeSheet->getStyle(\"A1:$cell\")->getFont()->setBold(true);\n\n $objWriter = PHPExcel_IOFactory::createWriter($excelObject, \"Excel2007\");\n $objWriter->save($filename);\n }", "static function generateTableHeaderHTML()\n\t{\n\t\techo \"<p class=left>Description:</p>\\n\";\n\t}", "function addHeadElement($include) {\n\t $this->_headSection .= $include . \"\\n\";\n\t}", "function pgm_subscriber_column_headers($columns){\n $columns = array(\n 'cb'=>'<input type=\"checkbox\" />', //checkbox-HTML empty checkbox\n 'title'=>__('Subscriber Name'), //update header name to 'Subscriber Name'\n 'email'=>__('Email Address'), //create new header for email\n );\n\n return $columns;\n}", "function renderHeader(&$header)\n {\n if ($name = $header->getName()) {\n $this->_ary['header'][$name] = $header->toHtml();\n } else {\n $this->_ary['header'][$this->_sectionCount] = $header->toHtml();\n }\n $this->_currentSection = $this->_sectionCount++;\n }", "function showTableHeader($phaseName) {\n?>\n\t<table>\n\t\t<colgroup>\n\t\t\t<col width='4%'>\n\t\t\t<col width='10%'>\n\t\t\t<col width='15%'>\n\t\t\t<col width='5%'>\n\t\t\t<col width='23%'>\n\t\t\t<col width='10%'>\n\t\t\t<col width='23%'>\n\t\t\t<!--<col width='10%'>\n\t\t\t<col width='*'>-->\n\t\t</colgroup>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>#</th>\n\t\t\t\t<th>Datum/Zeit</th>\n\t\t\t\t<th>Ort</th>\n\t\t\t\t<?php echo ($phaseName == 'Gruppenphase') ? \"<th>Grp</th>\" : \"<th></th>\" ?>\n\t\t\t\t<th colspan='3'>Resultat</th>\n\t\t\t\t<!--<th>Tipp</th>\n\t\t\t\t<th>Pkt</th>-->\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n<?php\n}", "public function addTableHeader($data, $params = array(), $cell_end = 'H') {\n // offset\n $offset = 0;\n if (isset($params['offset']))\n $offset = is_numeric($params['offset']) ? (int)$params['offset'] : PHPExcel_Cell::columnIndexFromString($params['offset']);\n\n // font name\n if (isset($params['font']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setName($params['font']);\n\n // font size\n if (isset($params['size']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setSize($params['size']);\n\n // bold\n if (isset($params['bold']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setBold($params['bold']);\n\n // italic\n if (isset($params['italic']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setItalic($params['italic']);\n\n // horizontal\n if (isset($params['horizontal'])) {\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getAlignment()->setHorizontal($params['horizontal']);\n }\n\n // text color\n if (isset($params['text_color'])) {\n $this->_xls->getActiveSheet()->getStyle(sprintf('A3:%s3', $cell_end))->getFont()->getColor()->setRGB($params['text_color']);\n }\n\n // fill color\n if (isset($params['fill_color'])) {\n $this->_xls->getActiveSheet()->getStyle(sprintf('A3:%s3', $cell_end))->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setRGB($params['fill_color']);\n }\n\n // set internal params that need to be processed after data are inserted\n $this->_tableParams = array(\n 'header_row' => $this->_row,\n 'offset' => $offset,\n 'row_count' => 0,\n 'auto_width' => array(),\n 'filter' => array(),\n 'wrap' => array(),\n 'horizontal' => false,\n 'fill_color' => false,\n 'text_color' => false,\n );\n\n if( !empty($data) ) {\n foreach ($data as $d) {\n $child = Common::hashEmptyField($d, 'child');\n\n // set label\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($offset, $this->_row, $d['label']);\n\n // set width\n if (isset($d['width']) && is_numeric($d['width']))\n $this->_xls->getActiveSheet()->getColumnDimensionByColumn($offset)->setWidth((float)$d['width']);\n else\n $this->_tableParams['auto_width'][] = $offset;\n\n // filter\n if (isset($d['filter']) && $d['filter'])\n $this->_tableParams['filter'][] = $offset;\n\n // wrap\n if (isset($d['wrap']) && $d['wrap'])\n $this->_tableParams['wrap'][] = $offset;\n\n // fill color\n if (isset($d['fill_color']) && $d['fill_color'])\n $this->_tableParams['fill_color'][] = $offset;\n\n // text color\n if (isset($d['text_color']) && $d['text_color'])\n $this->_tableParams['text_color'][] = $offset;\n\n if( !empty($child) ) {\n $childRow = $this->_row+1;\n\n if( !isset($childOffset) ) {\n $childOffset = $offset;\n }\n\n foreach ($child as $key => $val) {\n $label = Common::hashEmptyField($val, 'label');\n $width = Common::hashEmptyField($val, 'width');\n\n $childOffsetAcii = 1+$childOffset;\n $childOffsetAcii = Common::getNameFromNumber($childOffsetAcii);\n $childPosition = sprintf('%s%s:%s%s', $childOffsetAcii, $childRow, $childOffsetAcii, $childRow);\n\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($childOffset, $childRow, $label);\n \n if (isset($width) && is_numeric($width))\n $this->_xls->getActiveSheet()->getColumnDimensionByColumn($childOffset)->setWidth((float)$width);\n else\n $this->_tableParams['auto_width'][] = $childOffset;\n\n // text color\n if (isset($params['text_color'])) {\n $this->_xls->getActiveSheet()->getStyle($childPosition)->getFont()->getColor()->setRGB($params['text_color']);\n }\n\n // fill color\n if (isset($params['fill_color'])) {\n $this->_xls->getActiveSheet()->getStyle($childPosition)->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setRGB($params['fill_color']);\n }\n\n // horizontal\n if (isset($params['horizontal'])) {\n $this->_xls->getActiveSheet()->getStyle($childRow)->getAlignment()->setHorizontal($params['horizontal']);\n }\n\n $childOffset++;\n }\n }\n\n if( !empty($d['rowspan']) ) {\n $rowspan = $d['rowspan']-1;\n $default = 1+$offset;\n $row = $this->_row;\n $cell_end = $row+$rowspan; // Acii A\n\n $default = Common::getNameFromNumber($default);\n $this->_xls->getActiveSheet()->mergeCells(__('%s%s:%s%s', $default, $row, $default, $cell_end));\n // $this->_row += $rowspan;\n // $offset++;\n }\n if( !empty($d['colspan']) ) {\n $colspan = $d['colspan']-1;\n $default = 1+$offset;\n $dimensi = $default+$colspan; // Acii A\n $row = $this->_row;\n\n $default = Common::getNameFromNumber($default);\n $cell_end = Common::getNameFromNumber($dimensi);\n\n $this->_xls->getActiveSheet()->mergeCells(__('%s%s:%s%s', $default, $row, $cell_end, $row));\n \n $offset += $colspan;\n // $this->_row ++;\n }\n\n $offset++;\n }\n }\n\n $child = Set::extract('/child', $data);\n\n if ( !empty($child) ) {\n $this->_row++;\n }\n \n $this->_row++;\n\n return $this;\n }", "function krnEmit_reportTitleRow($appEmitter, $title, $colSpan) {\n $s1 = '<div class=\"draff-report-top-left\"></div>';\n $s2 = '<div class=\"draff-report-top-middle\">'.$title.'</div>';\n $s3 = '<div class=\"draff-report-top-right\">'.draff_dateTimeAsString(rc_getNow(),'M j, Y' ).'</div>';\n $appEmitter->row_start();\n $appEmitter->cell_block($s1 . $s2 . $s3 ,'draff-report-top', 'colspan=\"'.$colSpan.'\"');\n $appEmitter->row_end();\n}", "function Header() {\n $this->SetFont('Helvetica', 'B', 18);\n //Judul dalam bingkai\n $this->Cell(0, 5, 'Daftar Hasil Seleksi Calon Siswa Baru', 0, 1, 'C');\n $this->SetFont('Helvetica', 'B', 16);\n $this->Cell(0, 15, 'Sekolah Dasar', 0, 0, 'C');\n //Ganti baris\n $this->Ln(20);\n }", "public function createHeader() {\n\t\t$header = new PHPWord_Section_Header($this->_sectionCount);\n\t\t$this->_header = $header;\n\t\treturn $header;\n\t}", "private function setHeader(RowIterator $rowIterator): void\n {\n $rowIterator->rewind();\n\n $row = $rowIterator->current();\n\n if (! $row instanceof Row) {\n return;\n }\n\n $this->frame->setHeader(\n $this->makeRow(\n $row->getCells()\n )\n );\n }", "function os2forms_nemid_webform_csv_headers_component($component, $export_options) {\n $header = array();\n $header[0] = '';\n $header[1] = '';\n $header[2] = $export_options['header_keys'] ? $component['form_key'] : $component['name'];\n return $header;\n}", "protected function _writeHeader() {\n $this->stream->write(\n implode ($this->colDelim, array_values ($this->colName))\n );\n // Insert Newline\n $this->stream->write($this->lineDelim);\n $this->headerWritten= TRUE;\n }", "function render_table_header_footer($orderBy, $order) {\n?>\n\t\t<tr>\n<?php\n\t\t\t$this->render_th('title', 'Title', $orderBy, $order); \n\t\t\t$this->render_th('date', 'Date', $orderBy, $order); \n\t\t\t$this->render_th('facilitators', 'Facilitators', $orderBy, $order); \n\t\t\t$this->render_th('categories', 'Categories', $orderBy, $order); \n?>\n\t\t</tr>\n<?php\n\t}", "public function printTableHeader($open)\n {\n\n print \"<tr>\\n\";\n print \"<th>&nbsp;\";\n print \" Admin Email\";\n print \"&nbsp;</th>\";\n print \"<th>&nbsp;\";\n print \" Level\";\n print \"&nbsp;</th>\";\n if (!$open)\n print \"</tr>\\n\";\n }", "private function createFileHeadings() {\n\t\t// Allow other plugins to add their own column headers\n\t\t$headings = elgg_trigger_plugin_hook('row:headers', 'userexport', array(), $this->fields);\n\n\t\t// Attempt to translate the fields\n\t\tforeach ($headings as $key => $field) {\n\t\t\t$lang_string = \"profile:{$field}\";\n\t\t\t$heading = elgg_echo($lang_string);\n\n\t\t\t// No translation was found, fall back to the original string\n\t\t\tif ($heading === $lang_string) {\n\t\t\t\t$heading = elgg_echo($field);\n\t\t\t}\n\n\t\t\t$headings[$key] = $heading;\n\t\t}\n\n\t\t$this->writeToCSV($headings);\n\t}", "function tablethead_close() {\n $this->doc .= DOKU_TAB.'</thead>'.DOKU_LF;\n }", "function print_header_entries() {\n\n $result = '';\n\n if($entries = $this->get_header_entries()) {\n $result .= '<div class=\"php_report_header_entries\">';\n foreach($entries as $value) {\n\n $label_class = \"php_report_header_{$value->css_identifier} php_report_header_label\";\n $value_class = \"php_report_header_{$value->css_identifier} php_report_header_value\";\n\n $result .= '<div class=\"' . $label_class . '\">' . $value->label . '</div>';\n $result .= '<div class=\"' . $value_class . '\">' . $value->value . '</div>';\n\n }\n $result .= '</div>';\n }\n\n return $result;\n }", "protected function makeHeader()\n {\n }", "function _webform_csv_headers_email($component) {\r\n $header = array();\r\n $header[0] = '';\r\n $header[1] = '';\r\n $header[2] = $component['name'];\r\n return $header;\r\n}", "function Header()\n{\n $this->SetFont('Arial','B',15);\n // Move to the right\n $this->Cell(80);\n // Framed title\n\t$this->SetDrawColor(0,80,180);\n $this->SetFillColor(230,230,0);\n $this->SetTextColor(220,50,50);\n // Thickness of frame (1 mm)\n $this->SetLineWidth(1);\n\t$this->Cell($w,9,$title,1,1,'C',true);\n $this->Cell(30,10,'Title',1,0,'C');\n // Line break\n $this->Ln(40);\n}", "protected function output_header() {\n include dirname( __FILE__ ) . '/views/html-csv-import-header.php';\n }", "public function getCSVHeaderRow() {\n return [\n 'link_title',\n 'link_layout',\n 'link_location',\n 'content_type',\n 'link_count',\n 'link_clicked',\n 'clicked',\n 'os',\n 'device',\n 'device_brand',\n 'device_model',\n 'browser_type',\n 'browser_name',\n 'browser_version',\n 'site',\n 'page_url',\n 'referrer',\n 'paragraphs',\n 'displayed_url_1',\n 'displayed_url_2',\n 'displayed_url_3',\n 'displayed_url_4',\n 'displayed_url_5',\n 'time_logged',\n 'time_updated',\n 'user_id',\n 'browser',\n 'row'\n ];\n }", "function Header()\n\t{\n\t\t$this->Image('../imagenes/logo.jpg',15,10,40);\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->SetXY(70,15)\t;\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','L');\n\t//\t$this->MultiCell(190,5,\"CABLE, C.A.\",'0','L');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->SetX(70)\t;\n\t\t$this->MultiCell(190,5,strtoupper(_(tipo_serv())),'0','L');\n\t\t//$this->Ln(8);\n\t}", "function Header()\n\t\t{\n\t\t\t$this->SetFont('Helvetica','B',18);\n\t\t\t$this->SetTextColor(184,10,10);\n\t\t\t$this->Cell(30);\n\t\t\t$this->Cell(120,10,utf8_decode(\"Mensajes Contestados\"),0,0,'C');\n\t\t\t$this->Ln(20);\n\t\t}", "function RowHeadFoot($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 5 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->SetFont('Arial', 'B', 7);\n $this->SetFillColor(203, 203, 203);\n $this->MultiCell($w, 5, $data[$i], 1, $a, true);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }", "public function makeTable($header, $data) {\n $this->SetFillColor(255, 0, 0);\n $this->SetTextColor(255);\n $this->SetDrawColor(128, 0, 0);\n $this->SetLineWidth(.3);\n $this->SetFont('', 'B');\n // Header\n $w = array(10, 25, 40, 10, 25, 15, 60, 10, 10, 10, 10, 10, 10, 10, 10, 10);\n for ($i = 0; $i < count($header); $i++)\n if ($i == 0) {\n $this->Cell($w[$i], 7, $header[$i], 1, 0, 'C', true);\n } else {\n $this->Cell($w[$i], 7, $header[$i], 1, 0, 'L', true);\n }\n $this->Ln();\n // Color and font restoration\n $this->SetFillColor(224, 235, 255);\n $this->SetTextColor(0);\n $this->SetFont('');\n // Data\n $fill = false;\n\n foreach ($data as $row) {\n $this->nr++;\n $this->Cell($w[0], 6, $this->nr, 'LR', 0, 'C', $fill);\n $this->Cell($w[1], 6, $row['article'], 'LR', 0, 'L', $fill);\n $this->Cell($w[2], 6, $row['brand'], 'LR', 0, 'L', $fill);\n $this->Cell($w[3], 6, $row['inch'], 'LR', 0, 'L', $fill);\n $this->Cell($w[4], 6, $row['size'], 'LR', 0, 'L', $fill);\n $this->Cell($w[5], 6, $row['lisi'], 'LR', 0, 'L', $fill);\n $this->Cell($w[6], 6, $row['design'], 'LR', 0, 'L', $fill);\n $this->Cell($w[7], 6, $row['onhand'], 'LR', 0, 'C', $fill);\n $this->Cell($w[8], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[9], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[10], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[11], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[12], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[13], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[14], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[15], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Ln();\n $fill = !$fill;\n }\n // Closing line\n $this->Cell(array_sum($w), 0, '', 'T');\n }", "protected function setHeaders()\n {\n $row = 1; \n $this->objPHPExcel->getActiveSheet()->getColumnDimension('A')->setAutoSize(true);\n \n $mergeCells = 'A' . $row . ':' . 'E' . $row;\n $this->setCellValue('A' . $row, \"Differences between files.\");\n $this->objPHPExcel->getActiveSheet()->getStyle($mergeCells)->getFont()->setBold(true);\n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n $this->objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(25);\n $this->objPHPExcel->getActiveSheet()->getStyle($mergeCells)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \n \n $row++;\n $cell = 'A' . $row;\n $this->setCellValue($cell, \"Comparing by: \");\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n \n $mergeCells = 'B' . $row . ':' . 'C' . $row;\n $this->setCellValue('B' . $row, $this->getCompareTypeLabel()); \n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n \n \n $row++;\n $cell = 'A' . $row;\n $this->setCellValue($cell, \"Configuration: \");\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n \n $mergeCells = 'B' . $row . ':' . 'M' . $row;\n $this->setCellValue('B' . $row, $this->settings['configuration']); \n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n \n $row += 5;\n $columns = $this->getColumns(); \n foreach ($columns as $columnName => $column) {\n $cell = $columnName . $row;\n $this->setCellValue($cell, $column['title']);\n $this->objPHPExcel->getActiveSheet()->getColumnDimension($columnName)->setAutoSize(true);\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n }\n \n return $row;\n }" ]
[ "0.7692292", "0.712604", "0.7125858", "0.70332825", "0.69570416", "0.69057786", "0.68878156", "0.68810683", "0.68019676", "0.6754671", "0.66745335", "0.6660335", "0.66567206", "0.66486377", "0.66272867", "0.6618329", "0.6592501", "0.6578868", "0.6541822", "0.654087", "0.6540089", "0.6519953", "0.65189195", "0.65034914", "0.64570457", "0.64347345", "0.6418624", "0.6394077", "0.6380496", "0.63706565", "0.6369139", "0.6351685", "0.63301617", "0.6329301", "0.63258505", "0.6320509", "0.63117176", "0.63019776", "0.6301908", "0.6301647", "0.6277691", "0.6277015", "0.62677854", "0.6240194", "0.62388337", "0.6229213", "0.62255037", "0.6223841", "0.62102646", "0.6199509", "0.6187754", "0.6185987", "0.6178483", "0.61648875", "0.6155282", "0.6151544", "0.613354", "0.6130762", "0.61208194", "0.61204517", "0.61199766", "0.61171573", "0.61132836", "0.6106523", "0.6103436", "0.60962564", "0.6090675", "0.60885304", "0.6087591", "0.6086209", "0.606988", "0.6036849", "0.60353446", "0.60322857", "0.6026927", "0.59858686", "0.5980224", "0.5975467", "0.59623176", "0.59521556", "0.59506905", "0.5945953", "0.59428906", "0.593931", "0.59208494", "0.59160125", "0.59109163", "0.5898248", "0.58919746", "0.58838606", "0.58838", "0.58828026", "0.5880463", "0.58739436", "0.5873099", "0.58710694", "0.5861719", "0.58588624", "0.58554894", "0.58549327" ]
0.72553575
1
Get all elements of body rows
Получить все элементы строк тела
public function getRows() { $ret = null; if ($this->_tbody instanceof HtmlElement) { $ret = $this->_tbody->getElements(); } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getElements() {\n return $this->rows_object;\n }", "public function getRowsContainer()\n\t{\n\t\treturn $this->_tbody;\n\t}", "public function rows() {\n\t\treturn $this->row();\n\t}", "public function getElements() {}", "function get_all(){\r\n\t\t$rows = array();\r\n\t\twhile($row = $this->get_row()){\r\n\t\t\t$rows[] = $row;\r\n\t\t}\r\n\t\treturn $rows;\r\n\t}", "public function get_rows() {\n\t\tif (!isset($this->rows)) {\n\t\t\t$this->rows = $this->get_array();\n\t\t\t// Take out the header\n\t\t\tarray_shift($this->rows);\n\t\t}\n\t\telse {\n\t\t\treset($this->rows);\n\t\t}\n\t\treturn $this->rows;\n\t}", "public function getElements();", "protected function fetchElementNodes()\n {\n $elements = [];\n\n foreach ($this->map as $query) {\n $list = $this->document->xpath($query);\n\n if (0 == count($list)) {\n continue;\n }\n\n foreach ($list as $node) {\n $elements[] = new HtmlNode($node, $this->document->getDocument());\n }\n }\n\n return $elements;\n }", "public function getHtmlElements();", "public function elements()\n {\n return parent::elements();\n }", "public function getRows();", "public function getRows();", "public function getAll() {\n\t\treturn $this->rows;\n\t}", "protected function tableRows()\n {\n $tbody = DB::table($this->argument('table'))->get();\n\n return $tbody->map(function ($field) {\n return $this->selectRowByField($field);\n });\n }", "public function getRows()\n {\n if (is_null($this->summaryRow)) {\n return $this->rows;\n } else {\n return $this->rows + array(self::ID_SUMMARY_ROW => $this->summaryRow);\n }\n }", "public function getRows()\n\t{\n\t\treturn $this->driver->getRows();\n\t}", "function getRows() {\n\t\treturn $this->rows;\n\t}", "abstract public function get_rows();", "abstract protected function getRows();", "public function allChildrenElements() {\n\t\treturn $this->childrenElements()->with('allChildrenElements');\n\t}", "public function get_rows() {\n return $this->rows;\n }", "public function getRows()\n {\n return $this->rows;\n }", "public function getRows()\n {\n return $this->rows;\n }", "public function getRows ()\n {\n return $this->_rows;\n }", "protected function getElements()\n {\n return $this->elements;\n }", "protected function getElements(){\n return $this->_elements;\n }", "public function body()\n {\n $this->altRow = false;\n $lastBreakValue = null;\n $body[] = '<tbody>';\n $breaks = 0;\n foreach ($this->data as $index => $row) {\n if (!empty($this->tableOptions['break'])) {\n $breakValue = $row[$this->tableOptions['break']];\n if ($breakValue !== $lastBreakValue) {\n $lastBreakValue = $breakValue;\n if ($breaks) {\n $body[] = '</tbody>';\n $body[] = '<tbody class=\"page-break-before\">';\n }\n $breaks++;\n $body[] = $this->buildBreakRow($this->tableOptions['break'], $row);\n // continue;\n }\n }\n $body[] = $this->buildRow($row);\n }\n $body[] = '</tbody>';\n\n $ret = implode(chr(10), $body);\n\n if (!empty($this->tableOptions['totals'])) {\n $ret .= $this->buildTotalsRow();\n }\n\n return $ret;\n }", "public function rows() {\n return $this->schema->rows;\n }", "public function getChildElements() {}", "function getRows() { return $this->_rows; }", "private function getBody(){\n\t\t$tbody=\"\";\n\t\t$tfilter=\"\";\n\t\t\n\t\tif($this->renderEmptyBody){\n\t\t\treturn \"<tbody></tbody>\";\n\t\t}\n\t\t\n\t\t//Si tiene un llamado a la base de datos, obtenemos los datos\n\t\tif($this->hasCallToDataBase){\n\t\t\t$this->getData();\n\t\t}\n\t\t\n\t\tif(!empty($this->data)){\n\t\t\tforeach($this->data as $dataRow){\n\t\t\t\t$tbody.=\"<tr>\";\n\t\t\t\t$counter=0;\n\t\t\t\t\n\t\t\t\t/*Buscamos si el grid tiene alguna columna adicional al principio*/\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($dataRow as $key=>$data){\n\t\t\t\t\tif(!empty($this->bindedTypes)){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$type=$this->bindedTypes[$key];\n\t\t\t\t\t\t$parameter=$this->bindedTypesParams[$key];\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch ($type){\n\t\t\t\t\t\t\tcase 'progressbar':\n\t\t\t\t\t\t\t\t$bar=new progressbar(array(\"id\"=>$key));\n\t\t\t\t\t\t\t\t$pje=$data*100;\n\t\t\t\t\t\t\t\t$bar->setBars(array($pje));\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tbody.=\"<td>\".$bar->render(true).\"</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"link\":\n\t\t\t\t\t\t\t\t$link=new link();\n\t\t\t\t\t\t\t\t$link->replaceFields($dataRow, $parameter);\n\t\t\t\t\t\t\t\t$link->setDisplay($data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tbody.=\"<td>\".$link->render(true).\"</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$tbody.=\"<td>$data</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$tbody.=\"<td>$data</td>\";\n\t\t\t\t\t}\n\t\t\t\t\t$counter++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*Buscamos si el grid tiene alguna columna adicional al final*/\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tbody.=\"</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($tfilter!=\"\"){\n\t\t\t\t$tbody=$tfilter.$tbody;\n\t\t\t}\n\t\t\t\n\t\t\t$tbody=\"<tbody>$tbody</tbody>\";\n\t\t}else{\n\t\t\t$tbody=\"<tbody><tr><td colspan=\\\"{$this->cols}\\\"><div class=\\\"alert alert-error\\\">\".velkan::$lang[\"grid_msg\"][\"noDataFound\"].\"</div></td></tr></tbody>\";\n\t\t}\n\t\t\n\t\treturn $tbody;\n\t}", "public function getRows()\n {\n return $this->_rows;\n }", "public function all(): array\n {\n return $this->elements;\n }", "public function getElements()\n {\n return $this->elements;\n }", "public function tableRows(){\n\t\t$this->tableRows = $this->responseRows->length;\n\t\treturn $this->tableRows;\n\t}", "public function getElements() {\n return $this->elements;\n }", "private function get_filterItemsFromRows()\n {\n // Default return value\n $arr_return = array();\n $arr_return[ 'data' ][ 'items' ] = null;\n\n // RETURN rows are empty\n if ( empty( $this->rows ) )\n {\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'Rows are empty. Filter: ' . $this->curr_tableField . '.';\n t3lib_div::devlog( '[WARN/FILTER] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // DRS\n return $arr_return;\n }\n // RETURN rows are empty\n // Get table and field\n list( $table ) = explode( '.', $this->curr_tableField );\n\n // Set nice_piVar\n $this->set_nicePiVar();\n\n // Set class var $htmlSpaceLeft\n $this->set_htmlSpaceLeft();\n\n // Set class var $maxItemsPerHtmlRow\n $this->set_maxItemsPerHtmlRow();\n\n // SWITCH current filter is a tree view\n // #i0117, 141223, dwildt, 1-/+\n //switch ( in_array( $table, $this->arr_tablesWiTreeparentfield ) )\n switch ( in_array( $this->curr_tableField, $this->arr_tablesWiTreeparentfield ) )\n {\n case( true ):\n $arr_return = $this->get_filterItemsTree();\n break;\n case( false ):\n default:\n $arr_return = $this->get_filterItemsDefault();\n $items = $arr_return[ 'data' ][ 'items' ];\n $arr_return = $this->get_filterItemsWrap( $items );\n break;\n }\n // SWITCH current filter is a tree view\n\n return $arr_return;\n }", "public function elements()\n {\n return [];\n }", "public function get_rows()\n\t{\n//\t\t$rows = new object_list($this->connections_from(array(\"type\" => \"RELTYPE_CHILD\", \"to.class_id\" => crm_bill_row_obj::CLID)));\n\t\t$rows = new object_list(array(\n\t\t\t\"class_id\" => crm_bill_row_obj::CLID,\n\t\t\t\"CL_CRM_BILL_ROW.RELTYPE_CHILD(CL_CRM_BILL_ROW_GROUP).oid\" => $this->id(),\n\t\t\tnew obj_predicate_sort(array(\"jrk\" => \"asc\")),\n\t\t));\n\t\treturn $rows;\n\t}", "public function getRows($rows){\n\t\treturn $this->rows;\n\t}", "function getAllRTEContent()\n\t{\n\t\t$result = array();\n\t\tarray_push($result, $this->getIntroduction());\n\t\tarray_push($result, $this->getOutro());\n\t\treturn $result;\n\t}", "public function getElements() {\n return $this->elements;\n }", "protected function findAll()\n {\n return ContainerPage::find()->contentContainer($this->contentContainer)->all();\n }", "public function getElements() {\n\t\treturn $this->elements;\n\t}", "protected function parseContent()\n {\n if (!empty($this->errors)) {\n return $this->getErrors();\n }\n\n try {\n $items = pq('tbody.itemWrapper');\n if ($items->html()) {\n return $this->parseV1Content();\n }\n return $this->parseV2Content();\n } catch (Exception $e) {\n $this->errors[] = $e;\n }\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM elementos';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function getElements()\n\t{\n\t\treturn $this->elements;\n\t}", "public function getElements()\n\t{\n\t\treturn $this->elements;\n\t}", "public function elements()\r\n {\r\n return array(\r\n \r\n );\r\n }", "public function renderTableBody() {\n //$models = array_values($this->dataProvider->getModels());\n //$keys = $this->dataProvider->getKeys();\n $rows = [];\n \n foreach ($this->dataProvider as $model) {\n if (is_callable($this->beforeRow)) {\n $row = call_user_func($this->beforeRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows)) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n } else {\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }\n }", "public function get_elements()\n\t{\n\t\treturn $this->elements;\n\t}", "public function get_rows()\n {\n $lock = !empty($this->configs['rows_edit']) && $this->configs['rows_edit'] == 1 ? true : false;\n\n $tables = $this->file->sheets->first()->tables;\n\n list($query, $power) = $this->get_rows_query($tables);\n\n $head = $tables[0]->columns->map(function($column) { return 'C' . $column->id; })->toArray();\n\n if (Input::has('search.text') && Input::has('search.column_id')) {\n $query->where('C' . Input::get('search.column_id'), Input::get('search.text'));\n }\n\n $query->whereNull('deleted_at')->select($head)->addSelect('id');\n\n $paginate = $this->isCreater()\n ? $query->addSelect('created_by')->paginate(15)\n : $query->where('created_by', $this->user->id)->paginate(15);\n\n $encrypts = $tables[0]->columns->filter(function($column) { return $column->encrypt; });\n\n if (!$encrypts->isEmpty()) {\n $paginate->getCollection()->each(function($row) use($encrypts) {\n $this->setEncrypts($row, $encrypts);\n });\n }\n return ['paginate' => $paginate->toArray(),'lock' => $lock];\n }", "public function selectAll();", "function getElements($input) {\r\n\t\t$rs = $this->dbConn->query($input);\r\n\t\t$toRet = array();\r\n\t\t\r\n\t\t$index = 0;\r\n\t\twhile($rs->nextRow()) {\r\n//\t\t\t$this->visualizeRow($index++, $rs);\r\n\t\t\t$toRet[$index++] = $rs->getCurrentRow(); \r\n\t\t}\r\n\t\t\r\n\t\treturn $toRet;\r\n\t}", "public function getColumns(){\n $rows = array();\n return $rows; \n }", "private function extractRows()\n {\n $this->setHeader($this->temp);\n $this->setRows($this->temp);\n }", "public function elements()\n {\n return array(\n \n );\n }", "public function getThemAll(){\n $query = '//employees/employee/.';\n //$employees = $this->domDocument->getElementsByTagName('employee');\n\n // create a new XPath object and associate it with the document we want to query against\n $xpath = new DOMXPath($this->domDocument);\n $result = $xpath->query($query);\n $arrEmps = array();\n if($result->length){\n // iterate of the results\n $classCounter = 0;\n foreach($result as $emp) {\n // add the details of the employee to an array\n $arrEmps[$classCounter][\"name\"] = $emp->getElementsByTagName(\"name\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"name\"].\"<br><hr>\";\n $arrEmps[$classCounter][\"gender\"] = $emp->getElementsByTagName(\"gender\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"gender\"].\"<br><hr>\";\n $arrEmps[$classCounter][\"phone\"] = $emp->getElementsByTagName(\"phone\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"phone\"].\"<br><hr>\";\n $arrEmps[$classCounter][\"email\"] = $emp->getElementsByTagName(\"email\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"email\"].\"<br><hr>\";\n $classCounter +=1;\n //echo $classCounter.\"<br><hr>\";\n }\n }\n return $arrEmps;\n }", "public function getAllRows()\n\t{\n\t\treturn $this->foundRows;\n\t}", "private function get_rows()\n {\n // Prompt the expired time to devlog\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'begin' );\n\n // IF : hits should counted\n if ( $this->ts_countHits() )\n {\n // 1. step: filter items with one hit at least\n $arr_return = $this->get_rowsWiHits();\n if ( $arr_return[ 'error' ][ 'status' ] )\n {\n return $arr_return;\n }\n $rows = $arr_return[ 'data' ][ 'rows' ];\n // 1. step: filter items with one hit at least\n }\n // IF : hits should counted\n // 2. step: all filter items, hits will be taken from $rows\n $arr_return = $this->get_rowsAllItems( $rows );\n\n return $arr_return;\n }", "public function iterateAllElements()\n {\n return $this->getIterator();\n }", "function getSimplifiedElements() {\n\t\t\t$newelements = array();\n\t\t\tforeach($this->page_object as $current_row) {\n\t\t\t\t## process the rows- first we need to find out how many entries\n\t\t\t\tforeach($current_row as $current_element) {\n\t\t\t\t\t## here we start calling all our attribute types\n\t\t\t\t\tif(is_array($current_element)) {\n\t\t\t\t\t\t$newelements[] = $current_element;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t\treturn $newelements;\n }", "public function getEntries()\n {\n $rows = array();\n // dd($this->xml->entry->asXml()); // <- TO GET XML\n\n if(count($this->xml->entry) > 0) {\n // d($this->xml); // <- NOT GETTING EMPTY CELLS\n\n $colNames = $this->getColumnNames($this->xml);\n // dd($colNames);\n // dd($this->xml);\n\n\n foreach ($this->xml->entry as $entry) {\n $cols = $entry->xpath('gsx:*');\n // dd($cols);\n\n $vals = array();\n foreach($cols as $col) {\n // dd($col); // <- THIS DISPLAYS\n // var_dump((string) $col);\n\n // if (is_null($col) || $col == '' || $col === '' || !isset($col)) {\n // // $col = ' ';\n // $vals[] = ' ';\n // } else {\n $vals[] = $col->__toString();\n // }\n }\n // dd($vals); // <- THIS HAS THE VALUES YOU WANT\n // d($entry);\n // dd($colNames);\n // d($vals); <- ROWS (in a basic array form)\n $rows[] = new ListEntry($entry, array_combine($colNames, $vals));\n\n }\n }\n // dd($rows);\n return $rows;\n }", "public function getIterator()\n\t{\n return new ArrayIterator($this->_tbody->getElements());\n\t}", "public static function &getAll(): array\n {\n return self::getInstance()->elements;\n }", "public function getElements()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('elements');\n }", "public function getCells();", "public function getUserElements() {\n $els = array();\n foreach($this->_elements as $el) {\n //matusz: group type represents buttons?\n if(in_array($el->getName(), array('buttons', 'qfKey', '_qf_default'))) {\n continue;\n }\n \n $els[] = $el;\n }\n \n return $els;\n }", "public function getEleves()\n {\n return $this->eleves;\n }", "function getTables($selector = '.rptTable')\n\t{\n\t\t$tables = array();\n\t\tif(is_object($this->dom))\n\t\t{\n\t\t\t$contentTables = $this->dom->find($selector);\n\t\t\tforeach ($contentTables as $table)\n\t\t\t{\n\t\t\t\t$tables[] = $table->children();\n\t\t\t}\n\t\t}\n\n\t\treturn $tables ? $tables : array();\n\t}", "public function all()\n {\n return $this->driver->all();\n }", "protected function elements()\n {\n $window = $this->getUrlWindow($this->onEachSide);\n\n return array_filter(array(\n $window['first'],\n is_array($window['slider']) ? '...' : null,\n $window['slider'],\n is_array($window['last']) ? '...' : null,\n $window['last'],\n ));\n }", "public function renderTableBody()\n {\n $models = array_values($this->dataProvider->getModels());\n $keys = $this->dataProvider->getKeys();\n $rows = [];\n foreach ($models as $index => $model) {\n $key = $keys[$index];\n if ($this->beforeRow !== null) {\n $row = call_user_func($this->beforeRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model, $key, $index);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows) && $this->emptyText !== false) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n }\n\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }", "public function innertext()\n {\n return [];\n }", "public function elements(): array {\n\t\treturn $this->m_elements;\n\t}", "static public function extract()\n {\n try {\n $result = [];\n $document = @new Document(self::$url, true);\n $lines = $document\n ->find('tbody')[0]\n ->find('tr');\n foreach ($lines as $line) {\n $columns = $line->find('td');\n $current = [];\n foreach ($columns as $column) {\n $index = count($current);\n $current[self::$map[$index]] = $column->text();\n }\n $result[] = $current;\n }\n return $result;\n } catch (\\Exception $e) {\n return [\n 'error' => true,\n 'code' => $e->getCode(),\n 'message' => $e->getMessage()\n ];\n }\n }", "protected function selectContentRowsToConvert() {\n \n $select = '*';\n $from = 'tt_content';\n $where = 'list_type = \"pt_gsashop_pi2\"';\n $where .= ' AND pi_flexform = \"\"';\n $groupBy = '';\n $orderBy = '';\n $limit = '';\n \n // exec query using TYPO3 DB API\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select, $from, $where, $groupBy, $orderBy, $limit);\n trace(tx_pttools_div::returnLastBuiltSelectQuery($GLOBALS['TYPO3_DB'], $select, $from, $where, $groupBy, $orderBy, $limit));\n if ($res == false) {\n throw new tx_pttools_exception('Query failed', 1, $GLOBALS['TYPO3_DB']->sql_error());\n }\n \n $rows = array();\n while ($a_row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){\n $rows[] = $a_row; \n }\n $GLOBALS['TYPO3_DB']->sql_free_result($res);\n \n trace($a_row); \n return $rows;\n }", "public function getElements(): array\n {\n return $this->elements;\n }", "function DOM_table_structure($table) {\r\n\t\t//$query = './/' . ReTidy::get_html_namespace() . 'thead';\r\n\t\t$query = './' . ReTidy::get_html_namespace() . 'thead';\r\n\t\t$theads = $this->xpath->query($query, $table);\r\n\t\t$number_theads = 0;\r\n\t\tforeach($theads as $thead) {\r\n\t\t\t$number_theads++;\r\n\t\t}\r\n\t\tif($number_theads > 1) {\r\n\t\t\tprint('Found ' . $number_theads . ' &lt;thead&gt;s, DOM_table_structure() has stopped. Problematic table:<br>' . ReTidy::DOM_getNodeString($table));exit(0);\r\n\t\t}\r\n\t\t//$query = './/' . ReTidy::get_html_namespace() . 'tfoot';\r\n\t\t$query = './' . ReTidy::get_html_namespace() . 'tfoot';\r\n\t\t$tfoots = $this->xpath->query($query, $table);\r\n\t\t$number_tfoots = 0;\r\n\t\tforeach($tfoots as $tfoot) {\r\n\t\t\t$number_tfoots++;\r\n\t\t}\r\n\t\tif($number_tfoots > 1) {\r\n\t\t\tprint('Found ' . $number_tfoots . ' &lt;tfoot&gt;s, DOM_table_structure() has stopped. Problematic table:<br>' . ReTidy::DOM_getNodeString($table));exit(0);\r\n\t\t}\r\n\t\t//$query = './/' . ReTidy::get_html_namespace() . 'tbody';\r\n\t\t$query = './' . ReTidy::get_html_namespace() . 'tbody';\r\n\t\t$tbodys = $this->xpath->query($query, $table);\r\n\t\t$number_tbodys = 0;\r\n\t\tforeach($tbodys as $tbody) {\r\n\t\t\t$number_tbodys++;\r\n\t\t}\r\n\t\t/*if($number_tbodys > 1) {\r\n\t\t\tprint('Found ' . $number_tbodys . ' &lt;tbody&gt;s, DOM_table_structure() has stopped. Problematic table:<br>' . ReTidy::DOM_getNodeString($table));exit(0);\r\n\t\t}*/\r\n\t\tif($this->config['trust_ths'] === false || ($number_theads === 0 && $number_tbodys === 0)) { // assume they are not there and apply them\r\n\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'tr';\r\n\t\t\t$trs = $this->xpath->query($query, $table);\r\n\t\t\t$first_tr = false;\r\n\t\t\t$first_tr_in_tbody = false;\r\n\t\t\t$last_tr = false;\r\n\t\t\t//$found_first_tr_in_tbody = false;\r\n\t\t\t$skipped_first_new_tbody = false;\r\n\t\t\tforeach($trs as $tr) {\r\n\t\t\t\t$second_last_tr = $last_tr;\r\n\t\t\t\t$last_tr = $tr;\r\n\t\t\t\tif($first_tr === false) {\r\n\t\t\t\t\t$first_tr = $tr;\r\n\t\t\t\t}\r\n\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'th | .//' . ReTidy::get_html_namespace() . 'td';\r\n\t\t\t\t$cells_in_tr = $this->xpath->query($query, $tr);\r\n\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'th | .//' . ReTidy::get_html_namespace() . 'td[@newtag=\"th\"]';\r\n\t\t\t\t$headers_in_tr = $this->xpath->query($query, $tr);\r\n\t\t\t\t//$last_number_cells_in_tr = $number_cells_in_tr;\r\n\t\t\t\tforeach($cells_in_tr as $first_cell_in_tr) { break; }\r\n\t\t\t\t$new_tbody = ReTidy::getAttribute($first_cell_in_tr, 'new_tbody')->nodeValue;\r\n\t\t\t\tif($new_tbody === 'true') {\r\n\t\t\t\t\tif(!$skipped_first_new_tbody) {\r\n\t\t\t\t\t\t$skipped_first_new_tbody = true;\r\n\t\t\t\t\t} else {$first_cell_in_tr_parent = $first_cell_in_tr->parentNode;\r\n\t\t\t\t\t\t$first_cell_in_tr_parent->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXtbody9o9XXXXXX9o9NewTagBeginXXXtbody9o9XXX\"), $first_cell_in_tr_parent);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$number_cells_in_tr = 0;\r\n\t\t\t\t$number_empty_cells_in_tr = 0;\r\n\t\t\t\tforeach($cells_in_tr as $cell_in_tr) {\r\n\t\t\t\t\t$number_cells_in_tr++;\r\n\t\t\t\t\tif(ReTidy::isEmptyIgnoringWhitespaceAndAttributes($cell_in_tr)) {\r\n\t\t\t\t\t\t$number_empty_cells_in_tr++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//print('$number_empty_cells_in_tr: ');var_dump($number_empty_cells_in_tr);\r\n\t\t\t\t$number_headers_in_tr = 0;\r\n\t\t\t\tforeach($headers_in_tr as $header_in_tr) {\r\n\t\t\t\t\t$newtag_attribute = ReTidy::getAttribute($header_in_tr, \"newtag\");\r\n\t\t\t\t\tif($newtag_attribute->nodeValue === \"td\") {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$number_headers_in_tr++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(!$first_tr_in_tbody) {\r\n\t\t\t\t\t$number_headers_and_empty_in_tr = $number_headers_in_tr + $number_empty_cells_in_tr;\r\n\t\t\t\t\t//print('$number_cells_in_tr: ');var_dump($number_cells_in_tr);\r\n\t\t\t\t\t//print('$number_headers_in_tr: ');var_dump($number_headers_in_tr);\r\n\t\t\t\t\t//print('$number_headers_and_empty_in_tr: ');var_dump($number_headers_and_empty_in_tr);\r\n\t\t\t\t\t//exit(0);\r\n\t\t\t\t\tif($new_tbody === 'true') {\r\n\t\t\t\t\t\t$last_tr_in_thead = $last_tr;\r\n\t\t\t\t\t\t$first_tr_in_tbody = $tr;\r\n\t\t\t\t\t} elseif($number_headers_and_empty_in_tr === $number_cells_in_tr) {\r\n\t\t\t\t\t\t//$last_tr_in_table_head = $tr;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$last_tr_in_thead = $last_tr;\r\n\t\t\t\t\t\t$first_tr_in_tbody = $tr;\r\n\t\t\t\t\t\t//$found_first_tr_in_tbody = true;\r\n\t\t\t\t\t\t//break;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($number_tfoots === 1) { // then there is a simple solution\r\n\t\t\t\t$first_tr->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXthead9o9XXX\"), $first_tr);\r\n\t\t\t\t$tfoot->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXthead9o9XXX\"), $tfoot);\r\n\t\t\t\t$node_after_tfoot = $tfoot->nextSibling;\r\n\t\t\t\t$node_after_tfoot->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXtbody9o9XXX\"), $node_after_tfoot);\r\n\t\t\t\t$first_tr->parentNode->appendChild(new DOMText(\"XXX9o9NewTagEndXXXtbody9o9XXX\"));\r\n\t\t\t} else {\r\n\t\t\t\tif($first_tr_in_tbody === false) {\r\n\t\t\t\t\tReTidy::warning('Applying table structure but how to apply &lt;tbody&gt; to table could not be determined since no content cells were identified');\r\n\t\t\t\t\t$first_tr_in_tbody = $tr;\r\n\t\t\t\t}\r\n\t\t\t\t// tfoot processing\r\n\t\t\t\t// this is not general enough\r\n\t\t\t\t/*$did_table_source = false;\r\n\t\t\t\tif($number_cells_in_tr === 1) { // then we call this table source information\r\n\t\t\t\t\t// clear any existing attributes\r\n\t\t\t\t\tif($cell_in_tr->hasAttributes()) {\r\n\t\t\t\t\t\tforeach($cell_in_tr->attributes as $source_information_cell_attribute) {\r\n\t\t\t\t\t\t\t$source_information_cell_attribute->nodeValue = 'stripme';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$moved_last_tr = $cell_in_tr->cloneNode(true);\r\n\t\t\t\t\t$moved_last_tr->setAttribute('newtag', 'div');\r\n\t\t\t\t\t$moved_last_tr->setAttribute('class', 'source');\r\n\t\t\t\t\t$node_after_table = $table->nextSibling;\r\n\t\t\t\t\t$node_after_table->parentNode->insertBefore($moved_last_tr, $node_after_table);\r\n\t\t\t\t\t$last_tr->setAttribute('deleteme', 'y');\r\n\t\t\t\t\t$did_table_source = true;\r\n\t\t\t\t}\r\n\t\t\t\tif(!$did_table_source) {*/\r\n\t\t\t\t\tif($last_tr === false) { // hack\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'th | .//' . ReTidy::get_html_namespace() . 'td';\r\n\t\t\t\t\t\t$cells_in_potential_tfoot_tr = $this->xpath->query($query, $last_tr);\r\n\t\t\t\t\t\t$adding_a_tfoot = false;\r\n\t\t\t\t\t\tforeach($cells_in_potential_tfoot_tr as $cell_in_potential_tfoot_tr) {\r\n\t\t\t\t\t\t\t$new_tfoot = ReTidy::getAttribute($cell_in_potential_tfoot_tr, 'new_tfoot')->nodeValue;\r\n\t\t\t\t\t\t\tif($new_tfoot === 'true') {\r\n\t\t\t\t\t\t\t\t$adding_a_tfoot = true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t/*} else {\r\n\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'th | .//' . ReTidy::get_html_namespace() . 'td';\r\n\t\t\t\t\t$cells_in_potential_tfoot_tr = $this->xpath->query($query, $second_last_tr);\r\n\t\t\t\t\tforeach($cells_in_potential_tfoot_tr as $cell_in_potential_tfoot_tr) {\r\n\t\t\t\t\t\tif(ReTidy::isEmptyIgnoringWhitespaceAndAttributes($cell_in_potential_tfoot_tr)) {\r\n\t\t\t\t\t\t\t// look for the next one\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif(stripos(ReTidy::tagless(ReTidy::DOM_getNodeString($cell_in_potential_tfoot_tr)), 'total') === false) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else { // then we call this the tfoot\r\n\t\t\t\t\t\t\t\t$moved_second_last_tr = $second_last_tr->cloneNode(true);\r\n\t\t\t\t\t\t\t\t$first_tr_in_tbody->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXtfoot9o9XXX\"), $first_tr_in_tbody);\r\n\t\t\t\t\t\t\t\t$first_tr_in_tbody->parentNode->insertBefore($moved_second_last_tr, $first_tr_in_tbody);\r\n\t\t\t\t\t\t\t\t$first_tr_in_tbody->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXtfoot9o9XXX\"), $first_tr_in_tbody);\r\n\t\t\t\t\t\t\t\t$second_last_tr->setAttribute('deleteme', 'y');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\t\t\t\t// thead and tbody\r\n\t\t\t\tif($first_tr_in_tbody === $first_tr) {\r\n\t\t\t\t\tReTidy::warning('Applying table structure but how to apply &lt;thead&gt; to table could not be determined');\r\n\t\t\t\t\t$first_tr->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXtbody9o9XXX\"), $first_tr);\r\n\t\t\t\t\t$first_tr->parentNode->appendChild(new DOMText(\"XXX9o9NewTagEndXXXtbody9o9XXX\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$first_tr->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXthead9o9XXX\"), $first_tr);\r\n\t\t\t\t\t//$last_tr_in_thead->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXthead9o9XXX\"), $last_tr_in_thead);\r\n\t\t\t\t\t$first_tr_in_tbody->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXthead9o9XXX\"), $first_tr_in_tbody);\r\n\t\t\t\t\t$first_tr_in_tbody->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXtbody9o9XXX\"), $first_tr_in_tbody);\r\n\t\t\t\t\t$first_tr->parentNode->appendChild(new DOMText(\"XXX9o9NewTagEndXXXtbody9o9XXX\"));\r\n\t\t\t\t\tif($adding_a_tfoot) {\r\n\t\t\t\t\t\t$moved_last_tr = $last_tr->cloneNode(true);\r\n\t\t\t\t\t\t//$first_tr_in_tbody->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXtfoot9o9XXX\"), $first_tr_in_tbody);\r\n\t\t\t\t\t\t//$first_tr_in_tbody->parentNode->insertBefore($moved_last_tr, $first_tr_in_tbody);\r\n\t\t\t\t\t\t//$first_tr_in_tbody->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXtfoot9o9XXX\"), $first_tr_in_tbody);\r\n\t\t\t\t\t\t//$last_tr->setAttribute('deleteme', 'y');\r\n\t\t\t\t\t\t// (2017-03-31) validator now wants <tfoot>s at the bottom of the table for HTML5; shrug, it's a bit easier to code\r\n\t\t\t\t\t\t$last_tr->parentNode->appendChild(new DOMText(\"XXX9o9NewTagBeginXXXtfoot9o9XXX\"));\r\n\t\t\t\t\t\t$last_tr->parentNode->appendChild($moved_last_tr);\r\n\t\t\t\t\t\t$last_tr->parentNode->appendChild(new DOMText(\"XXX9o9NewTagEndXXXtfoot9o9XXX\"));\r\n\t\t\t\t\t\t$last_tr->setAttribute('deleteme', 'y');\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t//var_dump(ReTidy::DOM_getNodeString($last_tr_in_thead));\r\n\t\t\t\t\t\tif(isset($last_tr_in_thead)) {\r\n\t\t\t\t\t\t\t//$last_tr_in_thead->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXthead9o9XXX\"), $last_tr_in_thead);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$last_tr->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXthead9o9XXX\"), $last_tr_in_thead);\r\n\t\t\t\t\t\t\tReTidy::warning('this needs revision... it causes problems when there\\'s no apparent thead and I\\'m not sure it\\'s working perfectly 4e57546767896892478');\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}\r\n\t\t} else { // if we get to here then we work with the table structure in its problematic existing state (which should never happen since we should always redo the thead and tbody; regardless of their states)\r\n\t\t\t//print('here48794586409<br>');\r\n\t\t\tif($number_theads === 1) {\r\n\t\t\t\t//print('here48794586410<br>');\r\n\t\t\t\tif($number_tbodys === 0) {\r\n\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'tr';\r\n\t\t\t\t\t$trs = $this->xpath->query($query, $table);\r\n\t\t\t\t\t$first_non_thead_tr = false;\r\n\t\t\t\t\t$first_tr = false;\r\n\t\t\t\t\tforeach($trs as $tr) {\r\n\t\t\t\t\t\tif($first_tr === false) {\r\n\t\t\t\t\t\t\t$first_tr = $tr;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//$ancestry_array = ReTidy::DOM_getAncestryArray($tr);\r\n\t\t\t\t\t\t$parentNode = $tr->parentNode;\r\n\t\t\t\t\t\tif($parentNode->nodeName === \"thead\") {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$first_non_thead_tr = $tr;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($first_non_thead_tr === false) {\r\n\t\t\t\t\t\tReTidy::warning('Applying table structure but how to apply &lt;tbody&gt; to table could not be determined since no content cells were identified 2');\r\n\t\t\t\t\t\t$first_non_thead_tr = $tr;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//if(!ReTidy::isNode($first_non_thead_tr->parentNode)) {\r\n\t\t\t\t\t//\tvar_dump(ReTidy::DOM_getNodeString($first_non_thead_tr));\r\n\t\t\t\t\t//\tvar_dump(ReTidy::DOM_getNodeString($first_non_thead_tr->parentNode));exit(0);\r\n\t\t\t\t\t//}\r\n\t\t\t\t\t$first_non_thead_tr->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXtbody9o9XXX\"), $first_non_thead_tr);\r\n\t\t\t\t\t$tr->parentNode->appendChild(new DOMText(\"XXX9o9NewTagEndXXXtbody9o9XXX\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// no need to do anything\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif($number_tbodys >= 1) {\r\n\t\t\t\t\t//print('here48794586411<br>');\r\n\t\t\t\t\t// here we want to put <thead> around <tr>s before <tbody>; will it ever come up?\r\n\t\t\t\t\tif($number_theads === 0) {\r\n\t\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'tr';\r\n\t\t\t\t\t\t$trs = $this->xpath->query($query, $table);\r\n\t\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'tbody/tr';\r\n\t\t\t\t\t\t$trs_in_tbody = $this->xpath->query($query, $table);\r\n\t\t\t\t\t\tif(sizeof($trs) === sizeof($trs_in_tbody)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tReTidy::warning('Applying table structure but how to apply &lt;thead&gt; to table could not be determined since this code has not been written yet 3');exit(0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//print('here48794586412<br>');\r\n\t\t\t\t\tif($number_theads === 0) {\r\n\t\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'tr';\r\n\t\t\t\t\t\t$trs = $this->xpath->query($query, $table);\r\n\t\t\t\t\t\t$last_non_tbody_tr = false;\r\n\t\t\t\t\t\t$first_tr = false;\r\n\t\t\t\t\t\tforeach($trs as $tr) {\r\n\t\t\t\t\t\t\tif($first_tr === false) {\r\n\t\t\t\t\t\t\t\t$first_tr = $tr;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$parentNode = $tr->parentNode;\r\n\t\t\t\t\t\t\tif($parentNode->nodeName === \"tbody\") {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$last_non_tbody_tr = $tr;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif($first_tr === false) {\r\n\t\t\t\t\t\t\tReTidy::warning('Applying table structure but how to apply &lt;tbody&gt; to table could not be determined since no content cells were identified 4');\r\n\t\t\t\t\t\t\t$first_tr = $tr;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$first_tr->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXtbody9o9XXX\"), $first_tr);\r\n\t\t\t\t\t\t$tbody->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXtbody9o9XXX\"), $tbody);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$query = './/@new_tbody';\r\n\t\t$new_tbody_attributes = $this->xpath->query($query, $table);\r\n\t\tforeach($new_tbody_attributes as $new_tbody_attribute) {\r\n\t\t\t$new_tbody_attribute->nodeValue = \"stripme\";\r\n\t\t}\r\n\t\t$query = './/@new_tfoot';\r\n\t\t$new_tfoot_attributes = $this->xpath->query($query, $table);\r\n\t\tforeach($new_tfoot_attributes as $new_tfoot_attribute) {\r\n\t\t\t$new_tfoot_attribute->nodeValue = \"stripme\";\r\n\t\t}\r\n\t\t$query = './/@tfoot_member';\r\n\t\t$tfoot_member_attributes = $this->xpath->query($query, $table);\r\n\t\tforeach($tfoot_member_attributes as $tfoot_member_attribute) {\r\n\t\t\t$tfoot_member_attribute->nodeValue = \"stripme\";\r\n\t\t}\r\n\t}", "function GetRows()\n {\n $arr = [];\n for ($i = 0, mysqli_data_seek($this->rs, 0); $this->Next(); $i++) $arr[$i] = $this->row;\n return $arr;\n }", "private function getFormTableContent(){\n\t\t$s_style = 'font-size:'.$this->_emailFontSize.'; font-family:'.$this->_emailFontFamily.';';\n\t\t$bgCol1='#FFFFFF';\n\t\t$bgCol2='#e4edf9';\n\t\t$bgColDarkerBG='#cddaeb';\n\t\t$colOutline='#8a99ae';\n\t\t$rowCount=0;\n\t\t$NL=\"\\r\\n\";\n\t\t$s_ret='<table cellpadding=\"5\" cellspacing=\"0\" style=\"'.$s_style.'\">'.$NL;\n\t\tforeach($this->_formElements as $o_el){\n\t\t\tif(get_class($o_el)=='FormItBuilder_htmlBlock'){\n\t\t\t\t//do nothing\n\t\t\t}else{\n\t\t\t\tif($o_el->showInEmail()===true){\n\t\t\t\t\t\n\t\t\t\t\t$bgCol=$bgCol1;\n\t\t\t\t\tif($rowCount%2==0){\n\t\t\t\t\t\t$bgCol=$bgCol2;\n\t\t\t\t\t}\n\n\t\t\t\t\t$elType=get_class($o_el);\n\t\t\t\t\t$elId = $o_el->getId();\n\t\t\t\t\t\n\t\t\t\t\tswitch($elType){\n\t\t\t\t\t\tcase 'FormItBuilder_elementMatrix':\n\t\t\t\t\t\t\t$type = $o_el->getType();\n\t\t\t\t\t\t\t$cols = $o_el->getColumns();\n\t\t\t\t\t\t\t$rows = $o_el->getRows();\n\t\t\t\t\t\t\t$r_cnt=0;\n\t\t\t\t\t\t\t$s_val='<table cellpadding=\"5\" cellspacing=\"0\" style=\"'.$s_style.' font-size:10px;\"><tr><td>&nbsp;</td>';\n\t\t\t\t\t\t\t$c_cnt=0;\n\t\t\t\t\t\t\tforeach($cols as $column){\n\t\t\t\t\t\t\t\t$s_val.='<td style=\"'.($c_cnt==0?'border-left:1px solid '.$colOutline.'; ':'').'background-color:'.$bgColDarkerBG.'; border-right:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.'; border-top:1px solid '.$colOutline.';\"><em>'.htmlspecialchars($column).'</em></td>';\n\t\t\t\t\t\t\t\t$c_cnt++;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$s_val.='</tr>';\n\t\t\t\t\t\t\tforeach($rows as $row){\n\t\t\t\t\t\t\t\t$c_cnt=0;\n\t\t\t\t\t\t\t\t$s_val.='<tr><td style=\"'.($r_cnt==0?'border-top:1px solid '.$colOutline.'; ':'').'background-color:'.$bgColDarkerBG.'; border-right:1px solid '.$colOutline.'; border-left:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.';\"><em>'.htmlspecialchars($row).'</em></td>';\n\t\t\t\t\t\t\t\tforeach($cols as $column){\n\t\t\t\t\t\t\t\t\t$s_val.='<td style=\"text-align:center; border-right:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.';\">';\n\t\t\t\t\t\t\t\t\tswitch($type){\n\t\t\t\t\t\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t\t\t\t\t\t$s_val.=htmlspecialchars($_REQUEST[$elId.'_'.$r_cnt.'_'.$c_cnt]);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'radio':\n\t\t\t\t\t\t\t\t\t\t\t$s_val.=($c_cnt==$_REQUEST[$elId.'_'.$r_cnt]?'&#10004;':'-');\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'check':\n\t\t\t\t\t\t\t\t\t\t\tif(isset($_REQUEST[$elId.'_'.$r_cnt]) && in_array($c_cnt,$_REQUEST[$elId.'_'.$r_cnt])===true){\n\t\t\t\t\t\t\t\t\t\t\t\t$s_val.='&#10004;';\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t$s_val.='-';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$s_val.='</td>';\n\t\t\t\t\t\t\t\t\t$c_cnt++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$r_cnt++;\n\t\t\t\t\t\t\t\t$s_val.='</tr>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$s_val.='</table>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'FormItBuilder_elementFile':\n\t\t\t\t\t\t\tif(isset($_FILES[$elId])){\n\t\t\t\t\t\t\t\tif($_FILES[$elId]['size']==0){\n\t\t\t\t\t\t\t\t\t$s_val='None';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'FormItBuilder_elementDate':\n\t\t\t\t\t\t\t$s_val='[[+'.htmlspecialchars($o_el->getId()).'_0]] [[+'.htmlspecialchars($o_el->getId()).'_1]] [[+'.htmlspecialchars($o_el->getId()).'_2]]';\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$s_val='[[+'.htmlspecialchars($o_el->getId()).':nl2br]]';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$s_ret.='<tr valign=\"top\" bgcolor=\"'.$bgCol.'\"><td><b>'.htmlspecialchars($o_el->getLabel()).':</b></td><td>'.$s_val.'</td></tr>'.$NL;\n\t\t\t\t\t$rowCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$s_ret.='</table>'.$NL;\n\t\treturn $s_ret;\n\t}", "function getALL(){\n\t\t$result=$this->rstemp;\n\t\t$rows = array();\n\t\twhile($row=mysql_fetch_assoc($result)){\n\t\t\t $rows[]=$row;\n\t\t\t}\n\t\t\treturn $rows;\n\n\t\t\n\t}", "function getEleves(){\r\n $bdd = getBdd();\r\n $eleves = $bdd->query('select cne,nom,prenom,etat,Photo from eleves');\r\n return $eleves;\r\n }", "public static function getAll()\n {\n return self::doSearch()->resultRows;\n }", "public function getElementsRecursively() {\n\t\treturn $this->getRenderablesRecursively();\n\t}", "public function getElements()\n {\n return $this->collection;\n }", "public function GetInnerElements() {\n\t\treturn [\n\t\t\t$this->element->ExpanderElement,\n\t\t\t$this->element->ContainerElement];\n\t}", "public function getAllRows() {\n\t\t$rows = array();\n\t\t\n\t\tfor($x = 0; $x < $this->getNumRows(); $x++) {\n\t\t\t$rows[] = mysqli_fetch_assoc($this->_result);\n\t\t}\n\t\treturn $rows;\n\t}", "private function get_row($rows) {\n\t\t$head = null;\n\n\t\tforeach ($rows as $key=>$val) {\n\n\t\t\t/*\n\t\t\t * check type rows\n\t\t\t */\n\t\t\tswitch ($val['type']) {\n\t\t\t\tcase 'heading': $element = 'th'; break;\n\t\t\t\tcase 'body': $element = 'td'; break;\n\t\t\t\tcase 'footer': $element = 'th'; break;\n\t\t\t\tdefault : $element = 'th'; break;\n\t\t\t}\n\n\t\t\t$head .= $this->set_template()->tr_open;\n\t\t\tforeach ($val['datas'] as $k=>$v) {\n\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t$head .= '<'.$element;\n\t\t\t\t\t$head .= $this->attributes($v['attributes']).'>';\n\t\t\t\t\t$head .= !empty($v['content']) ? $v['content'] : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t} else {\n\t\t\t\t\t$head .= '<'.$element.'>';\n\t\t\t\t\t$head .= !empty($v) ? $v : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$head .= $this->set_template()->tr_close;\n\t\t}\n\n\t\treturn $head;\n\t}", "public function getTbodyData(): ?array {\n return $this->tbodyData;\n }", "public function getAllEntriesAsRows() {\n $allModels = $this -> getAllHistoricFilterEntries();\n $html = \"\";\n //TODO may need to make a function that makes a JS array to hold the info\n foreach ($allModels as $model) {\n $idHistoricFilter = strval($model -> getIdHistoricFilter());\n $objectRowID = \"14\" . $idHistoricFilter;\n $editAndDelete = \"</td><td><button class='btn basicBtn' onclick='updateHistoricFilter(\"\n . $objectRowID . \",\"\n . $model -> getIdHistoricFilter()\n . \")'>Update</button>\"\n . \"</td><td>\";\n\n if ($idHistoricFilter != \"0\") {\n $editAndDelete = $editAndDelete . \"<button class='btn basicBtn' onclick=\"\n . '\"deleteHistoricFilter('\n . $model -> getIdHistoricFilter()\n . ')\"> Delete</button>';\n }\n\n $html = $html\n . \"<tr id='\" . $objectRowID . \"'><td>\" . $model -> getHistoricFilterName()\n . \"</td><td>\" . $model -> getDateStart()\n . \"</td><td>\" . $model -> getDateEnd()\n . \"</td><td>\" . $model -> getDescription()\n . \"</td><td>\" . $model -> getButtonColor()\n . $editAndDelete\n . \"</td></tr>\";\n }\n return $html;\n }", "public function getCells()\r\n {\r\n return $this->cells ?: $this->cells = new \\Doctrine\\Common\\Collections\\ArrayCollection();\r\n }", "public static function getAll() {\n $conn = self::connect();\n $row = $conn->getAll(self::baseQuery());\n return $row;\n }", "public function getTableOfContents();", "public function getElements() {\n\t\treturn $this->renderables;\n\t}", "public function getBodyLines() : array\n {\n return $this->lineCount < 3 ? [] : array_slice($this->lines, 2);\n }", "public function fetchAll() : array\n {\n $sql = \"SELECT * FROM content;\";\n $resultset = $this->db->executeFetchAll($sql);\n\n return $resultset;\n }", "public function getRows()\n {\n $query = $this->getQuery();\n \n if (!empty($this->columns)) {\n $query->select(implode(', ', $this->columns));\n }\n \n foreach ($this->sort as $key => $value) {\n $query->sortBy($key, $value);\n }\n \n if ($this->range) {\n $query->limit($this->start, $this->range);\n }\n \n if (!empty($this->group)) {\n $query->groupBy($this->group);\n }\n \n return $this->database->query($query, $this->database->getBinds());\n }", "public function getCells()\n {\n return $this->cells;\n }", "public function getContentElements()\n\t{\n\t\treturn $this->getOptionData('tl_content');\n\t}" ]
[ "0.7145024", "0.67310625", "0.6620081", "0.6614637", "0.65186584", "0.65153134", "0.64370507", "0.63596195", "0.63553333", "0.63031673", "0.6249923", "0.6249923", "0.6209117", "0.6174423", "0.6156906", "0.6131532", "0.6096748", "0.6048213", "0.60419387", "0.6029207", "0.60171497", "0.6006638", "0.6006638", "0.59791946", "0.597245", "0.59676254", "0.59582824", "0.5926823", "0.5923198", "0.5921745", "0.5916878", "0.5874208", "0.58585966", "0.5849907", "0.58493906", "0.5840035", "0.58168226", "0.58132195", "0.581017", "0.58075845", "0.58071417", "0.5794968", "0.5781427", "0.57811517", "0.57731944", "0.57670736", "0.5749676", "0.5749676", "0.5722687", "0.57127076", "0.57092345", "0.5663948", "0.56604034", "0.5655388", "0.565426", "0.56533664", "0.56433463", "0.56401527", "0.56301844", "0.56191313", "0.5608275", "0.56069636", "0.56050444", "0.56041056", "0.55849946", "0.55821836", "0.5576571", "0.55744654", "0.55743814", "0.5563086", "0.5557418", "0.5550756", "0.5549731", "0.5547612", "0.5543841", "0.55385506", "0.5534987", "0.5532902", "0.5518965", "0.5509983", "0.5508725", "0.54880565", "0.54720014", "0.54698867", "0.54643327", "0.54433393", "0.54353935", "0.5429112", "0.5427631", "0.5417533", "0.54146695", "0.54057527", "0.54029566", "0.5398672", "0.53943664", "0.5388686", "0.53694075", "0.53650355", "0.53602177", "0.5351733" ]
0.75805193
0
Create the element of header container if it does not exist
Создайте элемент контейнера заголовка, если он не существует
protected function _createHeaderContainer() { if ($this->_thead == null) { $this->_thead = new HtmlElement('thead'); $this->addElement($this->_thead); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createHeader() {\n\t\t$header = new PHPWord_Section_Header($this->_sectionCount);\n\t\t$this->_header = $header;\n\t\treturn $header;\n\t}", "public function addChild($header = \"\");", "public function newHeaderContainer()\n {\n return new HeaderContainer($this);\n }", "private function createHeader() {\r\n\t\t$headerHtml = $this->getHeaderHtml();\r\n\t\t//Guardo el archivo del header\r\n\t\t$htmlPath = $this->localTmpFolder . $this->fileName . '_currentHeader' . '.html';\r\n\t\t$fh = fopen($htmlPath, 'w');\r\n\t\tfwrite($fh, $headerHtml);\r\n\t\tfclose($fh);\r\n\t\treturn $headerHtml;\r\n\t}", "public function buildHeader() {\n $this->build = [\n // '#type' => 'page',.\n 'container' => [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#attributes' => [\n 'class' => 'container',\n ],\n 'page_header' => [\n '#type' => 'html_tag',\n '#tag' => 'h2',\n '#value' => $this->t('<a href=\"@site-audit-uri\">Site Audit</a> report for @site', [\n '@site-audit-uri' => 'https://drupal.org/project/site_audit',\n '@site' => $this->options['uri'],\n ]),\n '#attributes' => [\n 'id' => 'page-header',\n ],\n 'br' => [\n '#type' => 'html_tag',\n '#tag' => 'br',\n ],\n 'sub_head' => [\n '#type' => 'html_tag',\n '#tag' => 'small',\n '#value' => $this->t('Generated on @date_time', ['@date_time' => \\Drupal::service('date.formatter')->format(\\Drupal::time()->getRequestTime())]),\n ],\n ],\n ],\n ];\n if (is_array($this->report)) {\n // There are multiple reports.\n $this->build['container']['summary'] = [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#attributes' => [\n 'id' => 'summary',\n ],\n ];\n $this->build['container']['summary']['title'] = [\n '#type' => 'html_tag',\n '#tag' => 'h2',\n '#value' => $this->t('Summary'),\n ];\n $this->build['container']['summary']['links'] = [\n '#type' => 'html_tag',\n '#tag' => 'p',\n ];\n foreach ($this->report as $report) {\n $this->build['container']['summary']['links'][$report->getPluginId()] = [\n '#type' => 'html_tag',\n '#tag' => 'a',\n '#value' => $report->getLabel() . ' (' . $report->getPercent() . '%)',\n '#attributes' => [\n 'href' => '#' . $report->getPluginId(),\n 'class' => $this->getPercentCssClass($report->getPercent()),\n ],\n ];\n }\n }\n }", "private function addHeaderDetails(){ \n $headerCount = $this->createElement('select', 'headerCount')\n ->addMultiOptions(array('1' => '1 - Header', '2' => '2 - Header', '3' => '3 - Header'))\n ->setValue('3');\n \n $highPressure = $this->createElement('text', 'highPressure')\n ->setAttrib('style', 'width: 60px;')\n ->setRequired(true)\n ->addValidator($this->isFloat,true)\n ->addValidator('between', true, array('min' => $this->mS->minPressure(), 'max' => $this->mS->critPressure(), 'inclusive' => true));\n $mediumPressure = $this->createElement('text', 'mediumPressure')\n ->setAttrib('style', 'width: 60px;');\n $lowPressure = $this->createElement('text', 'lowPressure')\n ->setAttrib('style', 'width: 60px;');\n $hpSteamUsage = $this->createElement('text', 'hpSteamUsage')\n ->setAttrib('style', 'width: 60px;')\n ->setRequired(true)\n ->addValidator($this->isFloat,true);\n $mpSteamUsage = $this->createElement('text', 'mpSteamUsage')\n ->setAttrib('style', 'width: 60px;');\n $lpSteamUsage = $this->createElement('text', 'lpSteamUsage')\n ->setAttrib('style', 'width: 60px;');\n\n $this->addElements(array(\n $headerCount,\n $highPressure,\n $mediumPressure,\n $lowPressure,\n $hpSteamUsage,\n $mpSteamUsage,\n $lpSteamUsage,\n )); \n \n $condReturnTemp = $this->createElement('text', 'condReturnTemp')\n ->setValue(round($this->mS->localize(338.705556, 'temperature')))\n ->setAttrib('style', 'width: 60px;')\n ->setRequired(true)\n ->addValidator($this->isFloat,true);\n \n $condReturnFlash = $this->createElement('select', 'condReturnFlash')\n ->addMultiOptions(array('No' => 'No', 'Yes' => 'Yes'))\n ->setValue('No');\n $hpCondReturnRate = $this->createElement('text', 'hpCondReturnRate')\n ->setAttrib('style', 'width: 60px;')\n ->setRequired(true)\n ->addValidator($this->isFloat,true)\n ->addValidator('between', true, array('min' => 0, 'max' => 100, 'inclusive' => true));\n $mpCondReturnRate = $this->createElement('text', 'mpCondReturnRate')\n ->setAttrib('style', 'width: 60px;');\n $lpCondReturnRate = $this->createElement('text', 'lpCondReturnRate')\n ->setAttrib('style', 'width: 60px;');\n $hpCondFlash = $this->createElement('select', 'hpCondFlash')\n ->addMultiOptions(array('No' => 'No', 'Yes' => 'Yes'))\n ->setValue('No');\n $mpCondFlash = $this->createElement('select', 'mpCondFlash')\n ->addMultiOptions(array('No' => 'No', 'Yes' => 'Yes'))\n ->setValue('No');\n\n $this->addElements(array(\n $condReturnTemp,\n $condReturnFlash,\n $hpCondReturnRate,\n $mpCondReturnRate,\n $lpCondReturnRate,\n $hpCondFlash,\n $mpCondFlash,\n ));\n \n $hpHeatLossPercent = $this->createElement('text', 'hpHeatLossPercent')\n ->setValue(.1)\n ->setAttrib('style', 'width: 60px;');\n $mpHeatLossPercent= $this->createElement('text', 'mpHeatLossPercent')\n ->setValue(.1)\n ->setAttrib('style', 'width: 60px;');\n $lpHeatLossPercent = $this->createElement('text', 'lpHeatLossPercent')\n ->setValue(.1)\n ->setAttrib('style', 'width: 60px;');\n\n $this->addElements(array(\n $hpHeatLossPercent,\n $mpHeatLossPercent,\n $lpHeatLossPercent,\n ));\n }", "private function build_header() {\n\t\t// if we've already got the cart ID, use it\n\t\t$header = self::fetch('cart_header', [':cart_id' => $this->id()]);\n\n\t\t$header['date_created'] = ck_datetime::datify(@$header['date_created']);\n\t\tif (!empty($header['date_updated'])) $header['date_updated'] = ck_datetime::datify($header['date_updated']);\n\n\t\t$this->skeleton->load('header', $header);\n\t}", "protected function makeHeader()\n {\n }", "function createHeader($options = array()) {\n $header = new Header( $options );\n $html = $header->html();\n return $html;\n}", "function generate_construct_header_widget() {\n\t\tif ( is_active_sidebar( 'header' ) ) : ?>\n\t\t\t<div class=\"header-widget\">\n\t\t\t\t<?php dynamic_sidebar( 'header' ); ?>\n\t\t\t</div>\n\t\t<?php endif;\n\t}", "function minorite_header($variables){\n return '<header'.drupal_attributes($variables['elements']['#wrapper_attributes']).'>'.$variables['elements']['#children'].'</header>';\n}", "public function testHeadElementAutomaticallyCreated() {\n\t\t$document = new HTMLDocument(Helper::HTML);\n\t\t$this->assertInstanceOf(Element::class, $document->head);\n\t}", "public function defineHeader()\n {\n $this->header = new Header();\n }", "public function get_header()\n {\n return <<<EOD\n<div id=\"sitehdr\">\n Sitewide Header\n</div>\n\nEOD;\n }", "public function processHeader()\n {\n $toggle =\n '<button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\"#' . $this->getWidgetId() . '_collapse\">\n <span class=\"sr-only\">Toggle navigation</span>\n <span class=\"icon-bar\"></span>\n <span class=\"icon-bar\"></span>\n <span class=\"icon-bar\"></span>\n </button>';\n\n $brand = '';\n if ($this->getBrand())\n {\n $brand = $this->getBrand();\n $brand = self::$html->decode(self::$html->link($brand[1], $brand[0], ['class' => 'navbar-brand']));\n }\n\n $this->addHeader($this->createWrapper('div', ['class' => 'navbar-header'], $toggle . $brand));\n }", "protected function _build_header(){\n\t\t$html = '';\n\t\t\n\t\t$html .= '<div class=\"container-narrow marginTop60\">';\r\n\t\t$html .= '<a href=\"'.home_url('/').'\">';\r\n\t\t$html .= '<img src=\"'.get_header_image().'\" height=\"'.get_custom_header()->height .'\"\r\n\t\twidth=\"'.get_custom_header()->width.'\" alt=\"\" class=\"marginTop40 marginBottom20\"\r\n\t\talign=\"center\"/>\r\n\t\t</a>';\r\n\t\t$html .= '<p class=\"centerText\">'.get_bloginfo('description').'</p>';\r\n\t\t$html .= '<hr class=\"marginBottom20 width50\">';\r\n\t\t$html .= '</div>';\n\t\t\n\t\techo $html;\n\t}", "function generate_header_items() \r\n{\r\n\t// Header widget\r\n\tgenerate_construct_header_widget();\r\n\t\r\n\t// Site logo\r\n\tgenerate_construct_logo();\r\n\t\r\n\t// Site title and tagline\r\n\tgenerate_construct_site_title();\r\n\t\r\n}", "public function Header() {\r\n $this->varcave->logger->debug('Create PDF top header');\r\n\t\tif ($this->noheader){\r\n\t\t\treturn true;\r\n\t\t}\r\n // Logo\r\n\t\t$this->setFont($this->font, 'BI', 8, '', 'false');\r\n\t\t$this->Image($this->headerImg,4,4,170);\r\n\t\t\r\n\t\t//text box after header image\r\n\t\t$this->RoundedRect(172,4,35,10,3.5,'D');\r\n\t\t$this->SetXY(173,5);\r\n\t\t$this->cell(0,3, LNE::pdf_caveRef . ': ' . $this->cavedata['caveRef'],0);\r\n\t\t$this->SetXY(173,9);\r\n\t\t//If pagegroup is on set group page number, or set a global PDF page number \r\n\t\tif ( $this->pagegroups == false )\r\n\t\t{\r\n\t\t\t$this->cell(0,3,LNE::pdf_page. ': '. $this->getAliasNumPage() . '/' . $this->getAliasNbPages(),0);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->cell(0,3,LNE::pdf_page .': '. $this->getPageGroupAlias(). '-'.$this->getPageNumGroupAlias() ,0);\r\n\t\t}\r\n\t\t\r\n }", "public function getHeaderContainer()\n\t{\n\t\treturn $this->_thead;\n\t}", "function newsroom_elated_get_header() {\n $id = newsroom_elated_get_page_id();\n\n //will be read from options\n $header_type = 'header-type3';\n $header_behavior = newsroom_elated_options()->getOptionValue('header_behaviour');\n\n if(HeaderFactory::getInstance()->validHeaderObject()) {\n $parameters = array(\n 'hide_logo' => newsroom_elated_options()->getOptionValue('hide_logo') == 'yes' ? true : false,\n 'header_in_grid' => newsroom_elated_options()->getOptionValue('header_in_grid') == 'yes' ? true : false,\n 'logo_position' => newsroom_elated_get_meta_field_intersect('logo_position',$id),\n 'show_sticky' => in_array($header_behavior, array(\n 'sticky-header-on-scroll-up',\n 'sticky-header-on-scroll-down-up'\n )) ? true : false,\n );\n\n $parameters = apply_filters('newsroom_elated_header_type_parameters', $parameters, $header_type);\n\n HeaderFactory::getInstance()->getHeaderObject()->loadTemplate($parameters);\n }\n }", "public function header() {\n\t\tRequirements::clear();\n\n\t\t$templates = ['Grasenhiller\\WkHtmlToX\\PdfHeader'];\n\t\t$data = $this->getHeaderFooterVariables();\n\n\t\tif (isset($data['template']) && $data['template']) {\n\t\t\t$templates[] = $data['template'];\n\t\t}\n\n\t\t$this->extend('updateHeader', $templates, $data);\n\n\t\treturn $this\n\t\t\t->customise($data)\n\t\t\t->renderWith(array_reverse($templates));\n\t}", "function iver_select_set_header_object() {\n \t$header_type = iver_select_get_meta_field_intersect('header_type', iver_select_get_page_id());\n\t $header_types_option = iver_select_get_header_type_options();\n\t \n $object = Lib\\HeaderFactory::getInstance()->build($header_type, $header_types_option);\n\n if(Lib\\HeaderFactory::getInstance()->validHeaderObject()) {\n $header_connector = new Lib\\IverSelectHeaderConnector($object);\n $header_connector->connect($object->getConnectConfig());\n }\n }", "function load_header(){\n\t\techo \"<div style='background:darkblue; height:100px; '> HEADER </div>\";\n\t}", "public function header() {\r\n $html = <<<HTML\r\n\r\n <header>\r\n <p class=\"welcomeScreen\" ><img src=\"images/title.png\" alt=\"\" ></p>\r\n <h1 class=\"welcomeScreen\">$this->title</h1>\r\n </header>\r\nHTML;\r\n return $html;\r\n }", "function biagiotti_mikado_get_header() {\n\t\t$id = biagiotti_mikado_get_page_id();\n\t\t\n\t\t//will be read from options\n\t\t$header_type = biagiotti_mikado_get_meta_field_intersect( 'header_type', $id );\n\t\t\n\t\t$menu_area_in_grid = biagiotti_mikado_get_meta_field_intersect( 'menu_area_in_grid', $id );\n\t\t\n\t\t$header_behavior = biagiotti_mikado_get_meta_field_intersect( 'header_behaviour', $id );\n\t\t\n\t\tif ( HeaderFactory::getInstance()->validHeaderObject() ) {\n\t\t\t$parameters = array(\n\t\t\t\t'hide_logo' => biagiotti_mikado_options()->getOptionValue( 'hide_logo' ) == 'yes',\n\t\t\t\t'menu_area_in_grid' => $menu_area_in_grid == 'yes',\n\t\t\t\t'show_sticky' => in_array( $header_behavior, array( 'sticky-header-on-scroll-up', 'sticky-header-on-scroll-down-up' ) ),\n\t\t\t\t'show_fixed_wrapper' => in_array( $header_behavior, array( 'fixed-on-scroll' ) ),\n\t\t\t);\n\t\t\t\n\t\t\t$parameters = apply_filters( 'biagiotti_mikado_filter_header_type_parameters', $parameters, $header_type );\n\t\t\t\n\t\t\tHeaderFactory::getInstance()->getHeaderObject()->loadTemplate( $parameters );\n\t\t}\n\t}", "public function getHeaderHTML()\n\t{\n\t\tif(!is_array($this->elements['header'])){\n\t\t\t// Headers are optional\n\t\t\treturn false;\n\t\t}\n\n\t\t# Header buttons can also be defined outside of the header key when defining modal vales.\n\t\t$this->elements['header']['buttons'] = array_merge($this->elements['header']['buttons'] ?: [], $this->buttons ?: []);\n\n\t\t# Add the required Bootstrap header class very first\n\t\t$this->elements['header']['class'] = str::getAttrArray($this->elements['header']['class'], \"modal-header\", $this->elements['header']['only_class']);\n\n\t\t# Draggable\n\t\t$this->elements['header']['class'][] = $this->draggable ? \"modal-header-draggable\" : false;\n\n\t\t# Styles\n\t\t$this->elements['header']['style'] = str::getAttrArray($this->elements['header']['style'], NULL, $this->elements['header']['only_style']);\n\n\t\t# Dropdown buttons\n\t\tif($this->elements['header']['buttons']){\n\t\t\t$buttons = Button::get($this->elements['header']);\n\t\t}\n\n\t\t# Button(s) in a row\n\t\t$button = Button::generate($this->elements['header']['button']);\n\n\t\tif($button){\n\t\t\t$button = \"<div class=\\\"btn-float-right\\\">{$button}</div>\";\n\t\t}\n\n\t\t# Accent\n\t\t$this->elements['header']['class'][] = str::getColour($this->accent, \"bg\");\n\n\t\t# Icon\n\t\tif(!$icon = Icon::generate($this->elements['header']['icon'])){\n\t\t\t//the icon attribute can either be in the header or in the main modal\n\t\t\t$icon = Icon::generate($this->icon);\n\t\t}\n\n\t\t# Badge\n\t\t$badge = Badge::generate($this->elements['header']['badge']);\n\n\t\t# ID\n\t\t$id = str::getAttrTag(\"id\", $this->elements['header']['id']);\n\n\t\t# Style\n\t\t$style = str::getAttrTag(\"style\", $this->elements['header']['style']);\n\n\t\t# Title colour\n\t\t$class[] = str::getColour($this->elements['header']['colour']);\n\n\t\t# Script\n\t\t$script = str::getScriptTag($this->elements['header']['script']);\n\n\t\t# The header title itself\n\t\t$title = $this->elements['header']['header'] . $this->elements['header']['title'] . $this->elements['header']['html'];\n\n\t\t# Title class\n\t\tif(!empty(array_filter($class))){\n\t\t\t$title_class = str::getAttrTag(\"class\", $class);\n\t\t\t$title = \"<span{$title_class}>$title</span>\";\n\t\t}\n\n\t\t# The div class\n\t\t$class = str::getAttrTag(\"class\", $this->elements['header']['class']);\n\n\t\t# If the modal can be dismissed\n\t\tif($this->dismissible !== false){\n\t\t\t$dismiss = <<<EOF\n<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\" title=\"Close this window\"></button>\nEOF;\n\t\t}\n\n\t\treturn <<<EOF\n<div{$id}{$class}{$style}>\n\t<div class=\"container\">\n \t\t<div class=\"row\">\n \t\t<div class=\"col-auto modal-title\">\n \t\t\t{$icon}{$title}{$badge}\n \t\t</div>\n \t\t<div class=\"col\">\n \t\t\t{$buttons}{$button}{$dismiss}\n \t\t</div>\n \t</div>\n\t</div>{$script}\n</div>\nEOF;\n\t}", "function pxlz_edgtf_set_header_object() {\n $header_type = pxlz_edgtf_get_meta_field_intersect('header_type', pxlz_edgtf_get_page_id());\n $header_types_option = pxlz_edgtf_get_header_type_options();\n\n $object = Lib\\HeaderFactory::getInstance()->build($header_type, $header_types_option);\n\n if (Lib\\HeaderFactory::getInstance()->validHeaderObject()) {\n $header_connector = new Lib\\PxlzEdgefHeaderConnector($object);\n $header_connector->connect($object->getConnectConfig());\n }\n }", "private function buildHeader()\n {\n $month_name = $this->monthLabels[$this->month - 1] . ' ' . $this->year;\n $vclass = strtolower($this->view);\n $h = \"<table class='\" . $this->tableClass . \" \" . $vclass . \"'>\";\n $h .= \"<thead>\";\n $h .= \"<tr class='\" . $this->headClass . \"'>\";\n $cs = 5;\n if ($this->view == 'week' || $this->view == 'day') {\n $h .= \"<th>&nbsp;</th>\";\n }\n if ($this->view == 'day') {\n $cs = 1;\n }\n\n if ($this->nav) {\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->prevClass . \"' href='\" . $this->prevLink() . \"'>\" . $this->prevIco . \"</a>\";\n $h .= \"</th>\";\n $h .= \"<th colspan='$cs'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->nextClass . \"' href='\" . $this->nextLink() . \"'>\" . $this->nextIco . \"</a>\";\n $h .= \"</th>\";\n } else {\n $h .= \"<th colspan='7'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n }\n $h .= \"</tr>\";\n $h .= \"</thead>\";\n\n $h .= \"<tbody>\";\n if ($this->view != 'day' && $this->view != 'week') {\n $h .= \"<tr class='\" . $this->labelsClass . \"'>\";\n\n for ($i = 0; $i <= 6; $i++) {\n $h .= \"<td>\";\n $h .= $this->dayLabels[$i];\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n }\n if ($this->view == 'day' || $this->view == 'week') {\n $h .= self::getWeekDays();\n }\n\n $this->html .= $h;\n }", "function studio_before_header_widget_area() {\n\n\tgenesis_widget_area( 'before-header', array(\n\t 'before' => '<div class=\"before-header\"><div class=\"wrap\">',\n\t 'after'\t => '</div></div>',\n\t) );\n}", "public function full_header() {\n $header = new stdClass();\n $header->settingsmenu = $this->context_header_settings_menu();\n $header->handytoolbar = $this->context_handy_toolbar();\n $header->contextheader = $this->context_header();\n $header->hasnavbar = empty($this->page->layout_options['nonavbar']);\n $header->navbar = $this->navbar();\n $header->pageheadingbutton = $this->page_heading_button();\n $header->courseheader = $this->course_header();\n $template = 'theme_savoir/header';\n if ($this->is_on_frontpage()) {\n $template = 'theme_savoir/header_fp';\n $options = new stdClass();\n $options->noclean = true; // Don't clean Javascripts etc.\n $options->overflowdiv = false;\n $context = context_course::instance($this->page->course->id);\n $summary =\n file_rewrite_pluginfile_urls(\n $this->page->course->summary,\n 'pluginfile.php',\n $context->id,\n 'course',\n 'summary',\n null);\n $content = format_text($summary, $this->page->course->summaryformat, $options);\n if (!isloggedin()) {\n $header->loginurl = get_login_url();\n }\n $header->frontpageslogan = $content;\n $header->frontpagestitle = $this->page->course->shortname;\n $header->alertmessage = format_text(get_config('theme_savoir', 'fpmessage'), FORMAT_HTML);\n $header->alertenabled = get_config('theme_savoir', 'fpmessageenabled');\n } else if ($this->is_on_page_with_description()) {\n $header->pageslogan = get_string(preg_replace('/^theme-savoir-pages-/', '', $this->page->pagetype, 1) . '-description',\n 'theme_savoir');\n $header->bgimageurl = $this->image_url('genericbackground', 'theme_savoir');\n $template = 'theme_savoir/header_desc';\n }\n return $this->render_from_template($template, $header);\n }", "protected function buildDomainObject($row) {\n\t\t$header = new Header();\n\t\t$header->setId($row['header_id']);\n\t\t$header->setText($row['header_text']);\n\t\treturn $header;\n\t}", "public function context_header($headerinfo = null, $headinglevel = 1) {\n if ($headinglevel == 1 && !empty($this->page->theme->settings->logo)) {\n return html_writer::tag('div', '', array('class' => 'logo'));\n }\n return parent::context_header($headerinfo, $headinglevel);\n }", "function drawHeader(){\n switch ($this->doing){\n case 'budget_byProjects':\n case 'myguests':\n if (!(@$this->t instanceof b_table)){\n\t$this->dbg('CANCEL header');\n\t$this->t = new b_table_dummy();\n }\n break;\n\n default:\n parent::drawHeader();\n break;\n }\n }", "public function presentHeader() {\r\n $html = parent::presentHeader();\r\n\r\n return $html;\r\n }", "function msdlab_pre_header(){\n print '<div class=\"pre-header\">\n <div class=\"wrap\">';\n do_action('msdlab_pre_header');\n print '\n </div>\n </div>';\n }", "public function processContainer()\n {\n $class = \"container\";\n if ($this->hasFluid()) $class .= \"-fluid\";\n $this->add($this->createWrapper('div', ['class' => $class], $this->stringifyHeader() . $this->stringifyCollapse()));\n }", "function display_portal_header()\r\n {\r\n Display :: header(null);\r\n }", "function megatron_ubc_clf_header($variables) {\n global $base_path;\n $output = '';\n if (theme_get_setting('clf_faculty')) {\n $output .= '<div id=\"ubc7-unit-name\"><a href=\"' . $base_path . '\"><span id=\"ubc7-unit-faculty\">' . theme_get_setting('clf_faculty_name');\n $output .= '</span><span id=\"ubc7-unit-identifier\">';\n $output .= '' . theme_get_setting('clf_unitname') . '</span></a></div>';\n }\n else {\n $output .= '<div id=\"ubc7-unit-name\" class=\"ubc7-single-element\"><a href=\"/\"><span id=\"ubc7-unit-identifier\">';\n $output .= '' . theme_get_setting('clf_unitname') . '</span></a></div>';\n }\n return $output;\n}", "function &addHeader($type = 'all') {\r\n\t \tif (empty($this->rtf->oddEvenDifferent) && $type == 'all') {\r\n\t\t $header = new Header($this->rtf, $type);\r\n\t\t} else if (!empty($this->rtf->oddEvenDifferent) \r\n\t\t\t\t\t\t&& ($type == 'left' || $type == 'right')) {\t\t \r\n\t\t \t$header = new Header($this->rtf, $type);\t\r\n\t\t} else if ($type == 'first') {\r\n\t\t \t$header = new Header($this->rtf, $type);\t\r\n\t\t \t$this->titlepg = 1;\r\n\t\t} else {\t\t\t\r\n\t\t \treturn;\r\n\t\t}\t\t \r\n\r\n\t\t$this->headers[$type] = &$header;\r\n\t\treturn $header;\t\t\r\n\t}", "function makeHeader(){\n\tglobal $pdf;\n\t\n\t// logo\n\t$pdf->Image('img/mepbro-pdf.png', 27, 27, 218);\n\t\n\t// title box\n\t$pdf->SetFillColor(51,102,255);\n\t$pdf->Rect(263, 27, 323, 72, 'F');\n\t// title lines\n\t$pdf->SetTextColor(255,255,255);\n\t$pdf->SetFont('Helvetica','B',34);\n\t$pdf->SetXY(263, 31);\n\t$pdf->Cell(323,36,'HOSE TEST', 0, 1, 'C');\n\t$pdf->SetXY(263, 64);\n\t$pdf->Cell(323,36,'CERTIFICATE', 0, 1, 'C');\n\t\n\treturn 126;\n\t\n}", "function Header(){\n\t\t}", "public function addHeader()\n {\n }", "abstract public function header();", "function vodi_page_header() {\n if ( is_page() && apply_filters( 'vodi_show_site_content_page_header', true ) ) : ?>\n <header class=\"page__header stretch-full-width\">\n <div class=\"container\">\n <?php if ( apply_filters( 'vodi_show_site_content_page_title', true ) ) : ?>\n <h1 class=\"page__title\"><?php echo esc_html( apply_filters( 'vodi_site_content_page_title', get_the_title() ) ); ?></h1>\n <?php endif; ?>\n <div class=\"page__header--aside\"><?php do_action( 'vodi_page_header_aside' ); ?></div>\n </div>\n </header><!-- .entry-header -->\n <?php endif;\n }", "function display_header() {}", "function renderHeader(&$header)\n {\n if ($name = $header->getName()) {\n $this->_ary['header'][$name] = $header->toHtml();\n } else {\n $this->_ary['header'][$this->_sectionCount] = $header->toHtml();\n }\n $this->_currentSection = $this->_sectionCount++;\n }", "public function buildHeader() {\n $header['label'] = $this->t('Label');\n $header['workflow'] = $this->t('Workflow');\n $header['status'] = $this->t('Status');\n $header['transition'] = $this->t('Transitions');\n $header['roles'] = $this->t('Email Roles');\n $header['author'] = $this->t('Email Author');\n $header['emails'] = $this->t('Adhoc Emails');\n return $header + parent::buildHeader();\n }", "function Header() \n { \n\n list($r, $b, $g) = $this->xheadercolor; \n $this->setY(10); // shouldn't be needed due to page margin, but helas, otherwise it's at the page top \n $this->SetFillColor($r, $b, $g); \n $this->SetTextColor(0 , 0, 0); \n $this->Cell(0,20, '', 0,1,'C', 1); \n $this->Text(15,26,$this->xheadertext ); \n }", "public function addHeader()\n {\n if (file_exists(DIRREQ . \"app/view/{$this->getDir()}/header.php\")) {\n include(DIRREQ . \"app/view/{$this->getDir()}/header.php\");\n }\n }", "public function buildHeader() {\n return [\n ['data' => t('Teaching format'), 'class' => ['align-middle']],\n ['data' => t('Event'), 'class' => ['align-middle']],\n ['data' => t('Tutor'), 'class' => ['align-middle']],\n ['data' => t('Location'), 'class' => ['align-middle']],\n ['data' => t('Room'), 'class' => ['align-middle']],\n [\n 'data' => t('Date/time'),\n 'field' => 'time.field_event_time_value',\n 'sort' => 'desc',\n 'class' => ['align-middle'],\n ],\n ['data' => t('Registration status'), 'class' => ['align-middle']],\n ];\n }", "public function Header() {\n\t\t$x = 0;\n\t\t$dx = 0;\n\t\tif ($this->rtl) {\n\t\t\t$x = $this->w + $dx;\n\t\t} else {\n\t\t\t$x = 0 + $dx;\n\t\t}\n\n\t\t// print the fancy header template\n\t\tif($this->print_fancy_header){\n\t\t\t$this->printTemplate($this->header_xobjid, $x, 0, 0, 0, '', '', false);\n\t\t}\n\t\tif ($this->header_xobj_autoreset) {\n\t\t\t// reset header xobject template at each page\n\t\t\t$this->header_xobjid = false;\n\t\t}\n\t\t\n\t\t$this->y = $this->header_margin;\n\t\t$this->SimpleHeader();\n\t\t//$tmpltBase = $this->MakePaginationTemplate();\n\t\t//echo $tmpltBase;die();\n\t\t//echo('trying to print header template: ');\n\t\t//$this->printTemplate($tmpltBase, $x, $this->y, 0, 0, '', '', false);\n\t\t//die();\n\t}", "private static final function getHTMLHeadContainer () {\r\n // Return the <HTML><head> container;\r\n $containerHTMLHead = new FileContent (FORM_TP_DIR . _S . 'frm_web_html_head_container.tp');\r\n return $containerHTMLHead->doToken ('[%BASE_HREF_URL%]', DOCUMENT_HOST);\r\n }", "function create_pool_header()\n{\n $header =\n \"<thead>\n <tr>\n <th scope='col' class='rounded-company'>Pool</th>\n <th scope='col' class='rounded-q1'>Priority</th>\n <th scope='col' class='rounded-q1' colspan='2'>URL</th>\n <th scope='col' class='rounded-q1'>Gets</th>\n <th scope='col' class='rounded-q1'>Accepts</th>\n <th scope='col' class='rounded-q1'>Rejects</th>\n <th scope='col' class='rounded-q1'>Discards</th>\n <th scope='col' class='rounded-q1'>Stales</th>\n <th scope='col' class='rounded-q1'>Get Fails</th>\n <th scope='col' class='rounded-q1'>Rem fails</th>\n </tr>\n </thead>\";\n\n return $header;\n}", "public static function headerInner(string $pagina='') {?>\n \t\n <header class=\"container-fluid hero-inner\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"hero-txt\">\n <h1><?= $pagina ?></h1>\n </div>\n </div>\n </div>\n </header>\n \n <?php }", "public function Header()\n {\n // Set custom header and footer\n $this->setCustomHeader();\n\n if (array_key_exists($this->category, $this->categories)) {\n $title = $this->categories[$this->category]['name'];\n } else {\n $title = '';\n }\n\n $this->SetTextColor(0, 0, 0);\n $this->SetFont($this->currentFont, 'B', 18);\n\n if (0 < PMF_String::strlen($this->customHeader)) {\n $this->writeHTMLCell(0, 0, '', '', $this->customHeader);\n $this->Ln();\n $this->writeHTMLCell(0, 0, '', '', html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 0, false, true, 'C');\n } else {\n $this->MultiCell(0, 10, html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 'C', 0);\n $this->SetMargins(PDF_MARGIN_LEFT, $this->getLastH() + 5, PDF_MARGIN_RIGHT);\n }\n }", "function bfa_add_html_inserts_header() {\r\n\tglobal $bfa_ata;\r\n\tif( $bfa_ata['html_inserts_header'] != '' ) bfa_incl('html_inserts_header'); \r\n}", "public function Header() {\n $bMargin = $this->getBreakMargin();\n\n // Get current auto-page-break mode\n $auto_page_break = $this->AutoPageBreak;\n\n // Disable auto-page-break\n $this->SetAutoPageBreak(false, 0);\n\n // Define the path to the image that you want to use as watermark.\n\t\tif($this->headerImage!='')\n\t\t{\n\t\t\t $header_logo = './'.$this->headerImage;\n\t\t\t \n\t\t}else{\n\t\t\t $header_logo = './assets/logo/Assetswatch.png';\n\t\t}\n\t\tif($this->watermarkImage!='')\n\t\t{\n\t\t\t$img_file = './'.$this->watermarkImage;\n\t\t}else{\n\t\t\t $img_file = './assets/logo/water-mark.png';\n\t\t}\n \n\t\t// echo $header_logo.\"<br>\";\n\t\t// echo $img_file.\"<br>\";\n\t\t // exit();\n // Render the image\n\t\t$this->Image($header_logo, 135,5, 55, 18, '', '', '', false, 300, '', false, false, 0);\n $this->Image($img_file, 53,100, '100px', '100px', '', '', '', false, 300, '', false, false, 0);\n\t\t\n\t\tif($this->headerContent!='')\n\t\t{\n\t\t\t$this->Cell(0, 10,$this->headerContent , 0, false, 'L', 0, '', 0, false, 'T', 'M');\n\t\t}else{\n\t\t\t$this->Cell(0, 10,'' , 0, false, 'C', 0, '', 0, false, 'T', 'M');\n\t\t}\n // Restore the auto-page-break status\n $this->SetAutoPageBreak($auto_page_break, $bMargin);\n\n // Set the starting point for the page content\n $this->setPageMark();\n }", "protected function _renderHeader()\n\t{\n\t\t\n\t\tif( $this->header !== false ) {\n\t\t\t\n\t\t\t$button = $this->_renderCloseButton();\n\t\t\t\n\t\t\tHtml::addCssClass( $this->headerOptions, [ 'section' => 'modal-header' ] );\n\t\t\t\n\t\t\treturn ''\n\t\t\t\t. \"\\n\" . Html::beginTag( 'div', $this->headerOptions )\n\t\t\t\t. \"\\n\" . $button\n\t\t\t\t. \"\\n\" . $this->header\n\t\t\t\t. \"\\n\" . Html::endTag( 'div' );\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function create()\n {\n return view(\"backoffice.header.create\");\n }", "protected function _createRowContainer()\n\t{\n\t\tif ($this->_tbody == null) {\n\t\t\t$this->_tbody = new HtmlElement('tbody');\n\t\t\t$this->addElement($this->_tbody);\t\t\t\n\t\t}\t\t\n\t}", "public function Header() {\n // si la pagina es diferente de la 2\n // if (count($this->pages) !== 2) \n // {\n // Logo\n $image_file = K_PATH_IMAGES.'logoesen.jpg';\n $this->Image($image_file, 90, 5, 25, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);\n // Set font\n $this->SetFont('helvetica', 'B', 20);\n // Title\n //$this->Cell(0, 15, '<< TCPDF Example 003 >>', 0, false, 'C', 0, '', 0, false, 'M', 'M');\n // }\n }", "function get_custom_header()\n {\n }", "function generate_header_items() {\n\t\t$order = apply_filters( 'generate_header_items_order',\n\t\t\tarray(\n\t\t\t\t'header-widget',\n\t\t\t\t'site-branding',\n\t\t\t\t'logo',\n\t\t\t)\n\t\t);\n\n\t\tforeach ( $order as $item ) {\n\t\t\tif ( 'header-widget' === $item ) {\n\t\t\t\tgenerate_construct_header_widget();\n\t\t\t}\n\n\t\t\tif ( 'site-branding' === $item ) {\n\t\t\t\tgenerate_construct_site_title();\n\t\t\t}\n\n\t\t\tif ( 'logo' === $item ) {\n\t\t\t\tgenerate_construct_logo();\n\t\t\t}\n\t\t}\n\t}", "function create_section_header($wp_customize, $panel_id) {\n $wp_customize->add_section( 'fyt_header' , [\n 'title' => 'Header',\n 'panel' => $panel_id,\n ]);\n\n /* Binome pour CHANGER LE NOM DANS LE HEADER */\n // Déclaration du paramètre 'setting'\n $wp_customize->add_setting( 'fyt_header_title', [] );\n // un élément de formulaire permettant d'attribuer une valeur au setting\n $wp_customize->add_control( 'fyt_header_title', array(\n 'type' => 'text',\n 'section' => 'fyt_header',\n 'label' => 'Titre dans le header',\n // 'description' => 'Select a title for the posts'\n ) );\n /* Fin du parametrage du binome */\n\n\n /* Binome pour selectionner LA COULEUR DE FOND DU HEADER */\n // Déclaration du paramètre 'setting'\n $wp_customize->add_setting( 'fyt_header_background_color',\n array(\n 'default' => '#FFA500',\n // 'sanitize_callback' => 'sanitize_hex_color',\n ) );\n // un élément de formulaire permettant d'attribuer une valeur au setting\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'fyt_header_background_color',\n array(\n 'label' => 'Background color du header',\n 'section' => 'fyt_header',\n 'settings' => 'fyt_header_background_color',\n )\n )\n );\n/* Fin du parametrage du binome */\n\n\n}", "protected function renderHeader()\n {\n $output = '';\n $this->setDefaultHeader();\n foreach ($this->toolbar as $group) {\n if (empty($group['buttons'])) {\n continue;\n }\n $output .= $this->renderButtonGroup($group, true);\n }\n return Html::tag('div', $output, $this->headerOptions);\n }", "function _header_module($options)\n\t{\n\t\tglobal $meta_fields;\t\t\t$height='';\n\t\n\t\tif ( isset ( $options['hm_header_style'] ) && !empty ( $options['hm_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['hm_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\tif ( !empty ( $options['hm_header_height'] ) ) {\t\t\t$height='style=\"height:'.$options['hm_header_height'].'px;min-height:'.$options['hm_header_height'].'px\"\"';\t\t}\n\n\t?>\n\t\t<div id=\"page_header\" class=\"<?php echo $style; ?> bottom-shadow\" <?php echo $height;?>>\n\t\t\t<div class=\"bgback\"></div>\n\t\t\t\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"span6\">\n\t\t\t\t\t\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Breadcrumbs check\n\t\t\t\t\t\t\tif ( isset ( $options['hm_header_bread'] ) && !empty ( $options['hm_header_bread'] ) ) {\n\t\t\t\t\t\t\t\tzn_breadcrumbs();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Date check\n\t\t\t\t\t\t\tif ( isset ( $options['hm_header_date'] ) && !empty ( $options['hm_header_date'] ) ) {\n\t\t\t\t\t\t\t\techo '<span id=\"current-date\">'.date_i18n(get_option('date_format') ,strtotime(date(\"l M d, Y\"))).'</span>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"span6\">\n\t\t\t\t\t\t<div class=\"header-titles\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Title check\n\t\t\t\t\t\t\tif ( isset ( $options['hm_header_title'] ) && !empty ( $options['hm_header_title'] ) ) {\n\t\t\t\t\t\t\t\tif ( isset ( $meta_fields['page_title'] ) && !empty ( $meta_fields['page_title'] ) ) {\n\n\t\t\t\t\t\t\t\t\techo '<h2>'.do_shortcode( stripslashes( $meta_fields['page_title'] ) ).'</h2>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\techo '<h2>'.get_the_title().'</h2>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t?> \n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Subtitle check\n\t\t\t\t\t\t\tif ( isset ( $options['hm_header_subtitle'] ) && !empty ( $options['hm_header_subtitle'] ) ) {\n\t\t\t\t\t\t\t\tif ( isset ( $meta_fields['page_subtitle'] ) && !empty ( $meta_fields['page_subtitle'] ) ) {\n\n\t\t\t\t\t\t\t\t\techo '<h4>'.do_shortcode( stripslashes( $meta_fields['page_subtitle'] ) ).'</h4>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div><!-- end row -->\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div>\n\t\t</div><!-- end page_header -->\n\t<?php\t\n\t}", "public function drawHeader() {\n\t\t\t// Is there scope for using Smarty or similar here?\n\t\t\t// Note that we don't display the <form> for the search box if we're editing a page, because we end up with nested <form>s\n\t\t\t$html = '';\n\t\t\treturn $html;\n\t\t}", "public function create()\n {\n return view(\"pages.admin.specification.hdr.create-hdr\",$this->data);\n }", "function gutenberg_block_header_area() {\n\tgutenberg_block_template_part( 'header' );\n}", "function Header()\n {\n\n\n //list($r, $b, $g) = $this->xheadercolor;\n $this->setY(5);\n //$this->SetFillColor($r, $b, $g);\n //$this->SetTextColor(0 , 0, 0);\n //$this->Cell(0,20, '', 0,1,'C', 1);\n //$this->Text(15,26,$this->xheadertext );\n \n \n // get the current page break margin\n $bMargin = $this->getBreakMargin();\n // get current auto-page-break mode\n $auto_page_break = $this->AutoPageBreak;\n // disable auto-page-break\n $this->SetAutoPageBreak(false, 0);\n // set bacground image\n $img_file = WWW_ROOT.'/img/Resul_Agua.jpg';\n $this->Image($img_file, 0, 0, 216, 279, '', '', '', false, 300, '', false, false, 0);\n // restore auto-page-break status\n $this->SetAutoPageBreak($auto_page_break, $bMargin);\n // set the starting point for the page content\n $this->setPageMark();\n \n\n $this->writeHTML($this->xheadertext, true, false, true, false, '');\n\n // Transformacion para la rotacion de el numero de orden y el contenedor de la muestra\n $this->StartTransform();\n //$this->SetFont('freesans', '', 5);\n $this->SetFont('', '', 5);\n $this->Rotate(-90, 117, 117);\n //$tcpdf->Rect(39, 50, 40, 10, 'D');\n $this->Text(5, 30, 'Software Asistencial Médico \"SAM\" V.1.1 ® - https://samsalud.info ®');\n // Stop Transformation\n $this->StopTransform();\n\n // if ( $this->variable == 1 )\n // {\n // draw jpeg image x, y ancho, alto\n // $this->Image(WWW_ROOT.'/img/BORRADOR.png', 40, 60, 450, 250, '', '', '', true, 72);\n\n // restore full opacity\n $this->SetAlpha(0);\n // }\n\n }", "function circle_header_content() {\n\tget_template_part( 'template-parts/header-content' );\n}", "function initialize () {\n $this->set_openingtag(\"<HEADER[attributes]>\");\n\t $this->set_closingtag(\"</HEADER>\");\n }", "function get_header_image()\n {\n }", "function heading( $element )\n\t\t{\t\n\t\t\t$extraclass = $required = \"\";\t\n\t\t\tif(isset($element['required'])) \n\t\t\t{ \n\t\t\t\t$required = '<input type=\"hidden\" value=\"'.$element['required'][0].'::'.$element['required'][1].'\" class=\"ace_required\" />'; \n\t\t\t\t$extraclass = ' ace_hidden ace_required_container';\n\t\t\t} \n\t\t\t\n\t\t\tif(isset($element['class'])) $extraclass .= ' '.$element['class'];\n\t\t\n\t\t\t$output = '<div class=\"ace_section ace_'.$element['type'].' '.$extraclass.'\" id=\"ace_'.$element['id'].'\">';\n\t\t\t$output .= $required;\n\t\t\tif($element['name'] != \"\") $output .= '<h4>'.$element['name'].'</h4>';\n\t\t\t$output .= $element['desc'];\n\t\t\t$output .= '</div>';\n\t\t\treturn $output;\n\t\t}", "function header_container_start() { ?>\n\t<!--#slider-container-->\n\t<div id=\"slider-container\">\n<?php\n}", "public function setUp() {\n $this->container = new HeaderContainer();\n }", "public function renderHeader()\n {\n if ($this->title !== false || $this->headerPrependTitle !== false || $this->headerAppendTitle !== false) {\n echo CHtml::openTag('div', $this->htmlHeaderOptions);\n\n $this->renderMenu();\n $this->_renderPrependTitle();\n\n if ($this->title) {\n $this->title = '<h3 class=\"bootstrap-widget-header__title\">' . $this->title . '</h3>';\n if ($this->headerIcon) {\n $this->title = '<i class=\"' . $this->headerIcon . '\"></i>' . $this->title;\n }\n echo $this->title;\n }\n $this->_renderAppendTitle();\n $this->renderButtons();\n\n echo CHtml::closeTag('div');\n }\n }", "public function create()\n {\n return view('backoffice.main.createPageHeader');\n }", "function get_header(){\n\t\tglobal $FANNIE_ROOT;\n\t\tob_start();\n\t\t$page_title = $this->title;\n\t\t$header = $this->header;\n\t\tinclude($FANNIE_ROOT.'src/header_install.html');\n\t\treturn ob_get_clean();\n\n\t}", "function custom_header_container(){?>\n<?php \n}", "function header() {\n\t\techo '<div class=\"wrap\">';\n\t\tscreen_icon();\n\t\techo '<h2>' . __( 'JigoShop To WooCommerce Converter', 'woo_jigo' ) . '</h2>';\n\t}", "protected function createHeaderDriver()\n {\n $determiner = new Determiners\\Header(\n $this->app['config']['localize-middleware']['header']\n );\n\n $determiner->setFallback($this->app['config']['app']['fallback_locale']);\n\n return $determiner;\n }", "public function _assign_xoops_header()\n {\n $header_class = webphoto_xoops_header::getInstance($this->_DIRNAME, $this->_TRUST_DIRNAME);\n $header_class->set_flag_css(true);\n $header_class->assign_for_main();\n }", "function has_custom_header()\n {\n }", "function add_custom_shop_header(){ ?>\n \n \n <?php if ( is_woocommerce() || is_shop() || is_cart() || is_product() || is_checkout() ) : ?>\n \n \t<!-- our custom header codes here -->\n\t\t \n\t<div class=\"e242-1 x-section _before _gradient-overlay\" id=\"inner-hero\">\n \t\t \n\t\t<div class=\"e242-2 x-container max width\">\n\t\t\t<div class=\"e242-3 x-column x-sm x-1-1\">\n\t\t\t <div class=\"x-text -white head-title _max-1000 _center\"><h1>Bookstore</h1></div>\n\t\t\t</div>\n\t\t</div>\n </div>\n\t\t \n <?php endif; ?>\n \n<?php }", "function amply_default_header_header1_elements_outer_section( $wp_customize ) {\n\t$wp_customize->add_section(\n\t\t'amply_default_header_header1_elements_outer_section',\n\t\tarray(\n\t\t\t'title' => esc_html__( 'Header 1 Elements', 'amply' ),\n\t\t\t'priority' => 0,\n\t\t\t'type' => 'outer',\n\t\t)\n\t);\n}", "function Header() {\r\n $this->Image($this->logourl, 6, 5, 12,12);\r\n $this->SetFont('courier', '', 8);\r\n $this->SetY(11);\r\n $this->SetX(19);\r\n// $this->SetTextColor(224,17,36);\r\n $this->SetTextColor(1,152,74);\r\n $this->SetFont('courier', 'B', 10);\r\n $this->Cell(55, 4, $this->companyname, 0, 0, 'L');\r\n $this->SetY(14);\r\n $this->SetX(19);\r\n $this->SetFont('courier', 'B', 8);\r\n// $this->SetTextColor(1,152,74);\r\n $this->SetTextColor(224,17,36);\r\n $this->Cell(55, 4, $this->companyaddress, 0, 0, 'L');\r\n $this->SetTextColor(0);\r\n $this->SetY(10);\r\n $this->SetX(130);\r\n// $this->Cell(75, 4, 'Department : ' . $this->dataheader[0], 0, 0, 'R', false);\r\n \r\n $this->SetFont('courier', 'B', 14);\r\n \r\n $this->SetY(12);\r\n $this->SetX(5);\r\n $this->Cell(200, 6, $this->metadata['Title'], 0, 0, 'C');\r\n $this->SetY(18);\r\n $this->SetFont('courier', '', 8);\r\n $this->Cell(200, 5, $this->dataheader[0], 0, 0, 'C');\r\n// $this->Cell(200, 5, 'test', 0, 0, 'C');\r\n $this->SetY(22);\r\n \r\n $this->SetFont('courier', 'B', 8);\r\n $this->Ln(1);\r\n }", "private function makeCalendarHead()\n\t{\n\t\tif(strlen($this->headerStr) < 1) {\n\t\t\t$head = \"\\t<tr>\\n\\t\\t<th colspan=\\\"7\\\" class=\\\"headerString\\\">\";\n\t\t\tif(!is_null($this->curDay)) {\n\t\t\t\t$head .= $this->curDayName.' the '.$this->curDayS.' of '.$this->curMonthName.', '.$this->curYear;\n\t\t\t} else {\n\t\t\t\t$head .= $this->curMonthName.', '.$this->curYear;\n\t\t\t}\n\t\t\t$head .= \"</th>\\n\\t</tr>\\n\";\n\t\t} else {\n\t\t\t$head = $this->headerStr;\n\t\t}\n\t\t\n\t\t$this->calWeekDays .= $head;\n\t\t$this->outArray['head'] = $head;\n\t}", "function omega_entry_header() {\n\n\techo '<header class=\"entry-header\">';\n\n\tget_template_part( 'partials/entry', 'title' ); \n\n\tif ( 'post' == get_post_type() ) : \n\t\tget_template_part( 'partials/entry', 'byline' ); \n\tendif; \n\techo '</header><!-- .entry-header -->';\n\t\n}", "function horizon_header( $title, $description, $blockquote = '') {\n\t\t?>\n\t\t<header class=\"horizon-header\">\n\t\t\t<h2 class=\"title\"><?php echo wp_kses( $title, array('span' => array() ) ); ?></h2>\n\t\t\t<span class=\"sep\"></span>\n\t\t\t<p class=\"desc\"><?php echo esc_html( $description ); ?></p>\n\t\t</header><!-- .horizon-header -->\n\n\t\t<?php if ( ! empty( $blockquote ) ) : ?>\n\t\t\t<blockquote class=\"horizon-blockquote\">\n\t\t\t\t<p><?php echo esc_html( $blockquote ); ?></p>\n\t\t\t</blockquote>\n\t\t<?php endif; ?>\n\t<?php\n\t}", "abstract protected function header();", "function get_custom_header_markup()\n {\n }", "function addHeadElement($include) {\n\t $this->_headSection .= $include . \"\\n\";\n\t}", "protected function renderHeader($unit) {\n $draw = $this->getDraw();\n $draw->setFillColor('#000000');\n $draw->setStrokeWidth(0);\n $draw->setFontSize(20);\n\n $x = $this->currentX + $this->margin;\n $y = $this->currentY;\n\n $gon = new Imagick();\n $gon->readImage('../assets/octagon.png');\n $gon->resizeimage(45, 45, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 3, $y + 3);\n\n if($unit['slot'] != 'NA') {\n $gon = new Imagick();\n $gon->readImage('../assets/icon_'.$unit['slot'].'.png');\n $gon->resizeimage(35, 35, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 9, $y + 7);\n }\n\n $gon = new Imagick();\n $gon->readImage('../assets/octagon.png');\n $gon->resizeimage(45, 45, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 55, $y + 3);\n $draw->setFont('../assets/title_font.otf');\n $draw->setFontSize(26);\n\n $draw->setFillColor('#FFFFFF');\n if(strlen($unit['power']) == 1) {\n $this->image->annotateImage($draw, 71 + $x, $y + 33, 0, $unit['power']);\n } else if(strlen($unit['power']) == 3) {\n $this->image->annotateImage($draw, 56 + $x, $y + 33, 0, $unit['power']);\n } else{\n $this->image->annotateImage($draw, 64 + $x, $y + 33, 0, $unit['power']);\n }\n\n # unit name:\n $draw->setFillColor('#000000');\n $iters = 0;\n $title = $unit['customName'] ? $unit['customName'] : $unit['title'];\n $title_size = 28;\n $draw->setFontSize($title_size);\n $draw->setFont('../assets/title_font.otf');\n $check = $this->image->queryFontMetrics($draw, strtoupper($title));\n $maxNameWidth = 420;\n while($iters < 6 && $check['textWidth'] > $maxNameWidth) {\n $iters += 1;\n $title_size -= 2;\n $draw->setFontSize($title_size);\n $check = $this->image->queryFontMetrics($draw, strtoupper($unit['title']));\n }\n $title_x = $x + 110;\n $this->image->annotateImage($draw, $title_x, $y + 40, 0, strtoupper($title));\n $this->currentY += 50;\n $this->renderLine();\n }", "public function page_header(){\n\t\t$e = $this->Empresa->salida;\n\t\t$this->Empresa->where('id',$this->Empresa->user);\n\t\t$fondo = $this->Empresa->getOne('empresa_fondo','img_fondo');\n\t\t\n\t\t$link = 'index.php?inmv='.$e['nik_empresa'];\t\t\n\t\t$return = '<div class=\"page-header\" style=\"background-image: url(imagenes/fondos/'.$fondo['img_fondo'].');\">';\n\t\t$return .= '<div class=\"header-info\">';\n\t\t$return .= '<div class=\"row\">';\n\t\t$return .= '<div class=\"logo-header\"><a href=\"'.$link.'\"><img src=\"imagenes/logo/'.$e['img'].'\" /></a></div>';\n\t\t$return .= '<div class=\"header-desc col-md-6 visible-md visible-lg\">';\n\t\t$return .= '<h1>'.$e['descripcion'].'</h1>';\n\t\t$return .= '</div>';\n\t\t$return .= '</div>';\n\t\t$return .= '</div>';\n\t\t$return .= '</div>';\n\t\treturn $return;\n\t}", "function Header()\n {\n $this->m_projectedHeaderCounts = new ShadowCounts();\n }", "private function displayHeader()\n {\n\n $html = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">' . \"\\n\";\n $html .= '<html xmlns=\"http://www.w3.org/1999/xhtml\">';\n $html .= '<head>' . \"\\n\";\n\n //Meta tags\n $html .= '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />' . \"\\n\";\n $html .= '<meta name=\"description\" content=\"' . $this->pageInfo['pageDescription'] . '\" />' . \"\\n\";\n $html .= '<meta name=\"keywords\" content=\"jobs, freelance, work, design, freedom, choice, new zealand, quality\" />' . \"\\n\";\n $html .= '<link rel=\"icon\" type=\"image/png\" href=\"images/volition-icon.png\" />' . \"\\n\";\n\n //Stylesheets\n $html .= '<!-- Stylesheets -->' . \"\\n\";\n $html .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"css/styles.css\" />' . \"\\n\";\n $html .= '<!--[if lt IE 9]>' . \"\\n\";\n $html .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"css/ie.css\" />' . \"\\n\";\n $html .= '<![endif]-->' . \"\\n\";\n\n //Scripts\n //$html .= '<script type=\"text/javascript\" src=\"js/window.js\"></script>'.\"\\n\";\n\n //Page title\n $html .= '<title>Volition | ' . $this->pageInfo['pageTitle'] . '</title>' . \"\\n\";\n $html .= '</head>' . \"\\n\";\n $html .= '<body>' . \"\\n\";\n\n //Header\n $html .= '<div id=\"header\">' . \"\\n\";\n\n //Control buttons\n\n $html .= '<div id=\"headerImg\"><a href=\"index.php?page=home\"></a></div>' . \"\\n\";\n\n if ($this->model->userLoggedIn) {\n $html .= '<p class=\"controlButton\"><a href=\"index.php?page=logout\">Logout</a></p>' . \"\\n\";\n $html .= '<p class=\"userControl\">You are logged in as ' . $_SESSION['userName'] . '</p>' . \"\\n\";\n } else {\n $html .= '<p class=\"controlButton\"><a href=\"index.php?page=login\">Login</a></p>' . \"\\n\";\n $html .= '<p class=\"controlButton\"><a href=\"index.php?page=register\">Register</a></p>' . \"\\n\";\n }\n\n $html .= '<form id=\"searchForm\" method=\"post\" action=\"index.php?page=search\">';\n if ($_POST['searchInput']) {\n $html .= '<input type=\"text\" name=\"searchInput\" id=\"searchInput\" value=\"' . $_POST['searchInput'] . '\" />';\n } else {\n $html .= '<input type=\"text\" name=\"searchInput\" id=\"searchInput\" value=\"Search...\" />';\n }\n $html .= '<input type=\"submit\" class=\"submit\" name=\"searchSubmit\" id=\"searchSubmit\" value=\"Go\" />';\n $html .= '</form>';\n\n //Navbar\n $html .= $this->displayNav();\n\n $html .= '</div>' . \"\\n\";\n //Content tags\n $html .= '<div id=\"container\">' . \"\\n\";\n $html .= '<div id=\"content\" >' . \"\\n\";\n\n return $html;\n\n }", "protected function parseHeader( XTemplate $xtpl, ItemCollection $entidades, CriterioBusqueda $criterio ){\n\t\t$xtpl->assign( 'header', $this->getHeader($entidades, $criterio));\n\t\t$xtpl->parse('main.header');\n\t\n\t}", "public function put_on_header() {\n\t\t$this->items[ $this->id ]['in_footer'] = false;\n\t\treturn $this;\n\t}", "public function addHeader(){\n$this->page.= <<<EOD\n<html>\n<head>\n</head>\n<title>\n$this->title\n</title>\n<body>\n<h1 align=\"center\">\n$this->title\n</h1>\nEOD;\n}" ]
[ "0.69501317", "0.6624627", "0.64704645", "0.6257379", "0.611662", "0.600705", "0.598772", "0.598313", "0.5980321", "0.5979505", "0.58945435", "0.58895266", "0.5871452", "0.5825438", "0.58023465", "0.5792442", "0.5769272", "0.57636344", "0.5749514", "0.5722273", "0.57159126", "0.5699507", "0.5688829", "0.56546587", "0.5587937", "0.55856407", "0.55710685", "0.55455065", "0.5543794", "0.5538596", "0.55316305", "0.5531416", "0.5528201", "0.55232847", "0.55118775", "0.54978925", "0.54950774", "0.54887676", "0.54873383", "0.54860085", "0.54810536", "0.54704225", "0.5446043", "0.5445952", "0.5442784", "0.5429143", "0.54022336", "0.5397707", "0.53976315", "0.5396808", "0.53884465", "0.5383058", "0.53809613", "0.5380847", "0.53619623", "0.53541434", "0.5351123", "0.53428364", "0.534083", "0.5339272", "0.53349257", "0.533192", "0.5324065", "0.53045297", "0.5298748", "0.5288769", "0.5287002", "0.52718294", "0.52684194", "0.5265502", "0.5264307", "0.52596444", "0.52513033", "0.5250339", "0.52473265", "0.5244469", "0.52434236", "0.524326", "0.52397215", "0.52364534", "0.52357256", "0.5228574", "0.52261674", "0.521906", "0.5217815", "0.5215006", "0.5209483", "0.5204722", "0.5204307", "0.52014214", "0.51853603", "0.5185031", "0.5182738", "0.51792663", "0.5175548", "0.51741576", "0.51638657", "0.5155015", "0.5146228", "0.51403785" ]
0.8115961
0
Render flash box (success or error message) Render smarty flash box No parameters expected
Отображать флеш-окно (сообщение о успехе или ошибке) Отображать флеш-окно Smarty Нет ожидаемых параметров
function smarty_function_flash_box( $params, &$smarty ) { if( $message = flash_get( 'success' ) ) { $type = 'success'; } elseif( $message = flash_get( 'error' ) ) { $type = 'error'; } else { return ''; } // if return '<div id="' . $type . '" class="flash flash-' . $type . '"><span>' . $message . '</span></div>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renderFlashMessages() {}", "public function renderFlash()\n {\n // get the feedback (they are arrays, to make multiple positive/negative messages possible)\n $feedback_positive = Session::get('feedback_positive');\n $feedback_negative = Session::get('feedback_negative');\n\n // echo out positive messages\n if (isset($feedback_positive)) {\n foreach ($feedback_positive as $feedback) {\n echo '<div class=\"flash success\">'.$feedback.'</div>';\n }\n }\n\n // echo out negative messages\n if (isset($feedback_negative)) {\n foreach ($feedback_negative as $feedback) {\n echo '<div class=\"flash error\">'.$feedback.'</div>';\n }\n }\n\n // delete these messages (as they are not needed anymore and we want to avoid to show them twice\n Session::set('feedback_positive', null);\n Session::set('feedback_negative', null);\n }", "function flash_message()\n\t{\n\t\t$ci =& get_instance();\n\t\t$flashmsg = $ci->session->flashdata('falshmsg');\n\t\t$html = '';\n\t\tif (is_array($flashmsg)){\n\t\t\t$html = '<div id=\"flashmessage\" class=\"'.$flashmsg['type'].'\">\n\t\t\t\t\t<img style=\"float: right; cursor: pointer\" id=\"closemessage\" src=\"'.base_url().'img/close.png\" />\n\t\t\t\t\t\t\t<p>'.$flashmsg['content'].'</p>\n\t\t\t\t\t\t\t\t\t</div>';\n\t\t}\n\t\treturn $html;\n\t}", "protected function renderFlashMessages() {}", "function flashMessage() {\n\t$message = Template::getFlashMessage();\n\tif ( ! empty($message) ) {\n\t\t$messageHtml .= \"<div class='collection'>\";\n\t\t$messageHtml .= \"<a href='#' class='collection-item \" . $message[\"type\"] . \"'>\" . $message[\"body\"] . \"</a>\";\n\t\t$messageHtml .= \"</div>\";\n\n\t\techo $messageHtml;\n\t}\n\treturn NULL;\n}", "function flash_msg(){ ?>\r\n <?php if(isset($_SESSION['success'])): ?>\r\n <p style=\"color: green\"><?= htmlentities($_SESSION['success']) ?></p>\r\n <?php unset($_SESSION['success']); ?>\r\n <?php elseif(isset($_SESSION['failure'])): ?>\r\n <p style=\"color: red\"><?= htmlentities($_SESSION['failure']) ?></p>\r\n <?php unset($_SESSION['failure']); ?>\r\n <?php endif; ?>\r\n<?php }", "public function showFlashMessage()\n {\n \tif (isset($_SESSION['flashMessage'])) {\n \t\techo '<div class=\"alert alert-' . $_SESSION['flashMessage']['type'] . '\" role=\"alert\">';\n \t\techo '<strong>'. $_SESSION['flashMessage']['message'] . '</strong>';\n \t\techo '</div>';\n\n \t\tunset($_SESSION['flashMessage']);\n \t}\n }", "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 handleFlashNotifications(){\n\t\tif($this->input->get('form_success') !== false){\n\t\t\t$o = \"\" ;\n\t\t\t$function_name = $this->input->get('form_success') ;\n\t\t\t\n\t\t\t$o .= \"<div id='form-success' class='flash_message pad_all'>\" ; \n\t\t\t\t$o .= \"<p>\" ;\n\t\t\t\t\t$o .= $this->getFlashFunctionSuccessMessage($function_name) ;\n\t\t\t\t$o .= \"</p>\" ;\n\t\t\t$o .= \"</div>\" ;\n\t\t\t\n\t\t\t$o .= \"<script>\" ;\n\t\t\t\t$o .= \"$('.flash_message').fadeOut(7000) ;\" ;\n\t\t\t$o .= \"</script>\" ;\n\t\t\t\n\t\t\treturn $o ;\n\t\t}\n\t\tif($this->input->get('form_error') !== false){\n\t\t\t$o = \"\" ;\n\t\t\t$function_name = $this->input->get('form_error') ;\n\t\t\t\n\t\t\t$o .= \"<div id='form-error' class='flash_message pad_all'>\" ; \n\t\t\t\t$o .= \"<p>\" ;\n\t\t\t\t\t$o .= $this->getFlashFunctionErrorMessage($function_name) ;\n\t\t\t\t$o .= \"</p>\" ;\n\t\t\t$o .= \"</div>\" ;\n\t\t\t\n\t\t\t$o .= \"<script>\" ;\n\t\t\t\t$o .= \"$('.flash_message').fadeOut(7000) ;\" ;\n\t\t\t$o .= \"</script>\" ;\n\t\t\t\n\t\t\treturn $o ;\n\t\t}\n\t}", "function displaySuccessMessage($index,$params = array()) {\n\t\tglobal $lang;\n\t\n\t\treturn '<div class=\"alert alert-success\">'.getLang('form_success_'.$index,$params).'</div>';\n\t}", "static function flashMessage ()\n {\n if (Session::has ('message')) {\n list ($flashType, $message, $title) = explode ('|', Session::get ('message')) + [''] + [''];\n $title = $title ? \"<h4>$title</h4>\" : '';\n return <<<HTML\n<div class=\"alert alert-$flashType\">\n $title$message\n</div>\n</script>\nHTML;\n }\n }", "public function show()\n {\n if (!is_null($_SESSION['flash_message']['type'])) {\n\n $type = $_SESSION['flash_message']['type'];\n\n $message = $_SESSION['flash_message']['message'];\n\n unset($_SESSION['flash_message']); // unset flash_message key\n\n return '<div id=\"flash\" class=\"alert alert-' . $type . '\" role=\"alert\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\">\n <span aria-hidden=\"true\">&times;</span>\n <span class=\"sr-only\">Close</span></button>' . $message . '</div>';\n }\n }", "public function showLogin($error = null) {\n $this -> smarty -> assign('titulo','Iniciar Sesión');\n $this -> smarty -> assign('error', $error); \n //le paso por medio de assign el nombre de la variable (titulo) y el contenido\n $this -> smarty -> display('templates/login.tpl');\n //llamo a la funcion display en el template login\n $this -> smarty -> display('templates/footer.tpl'); \n}", "function flash($name = '', $message = '', $class = 'uk-alert-success')\n{\n //We can only do something if the name isn't empty\n if (!empty($name)) {\n //No message, create it\n if (!empty($message) && empty($_SESSION[$name])) {\n if (!empty($_SESSION[$name])) {\n unset($_SESSION[$name]);\n }\n if (!empty($_SESSION[$name . '_class'])) {\n unset($_SESSION[$name . '_class']);\n }\n\n $_SESSION[$name] = $message;\n $_SESSION[$name . '_class'] = $class;\n }\n //Message exists, display it\n elseif (!empty($_SESSION[$name]) && empty($message)) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : 'uk-alert-success';\n echo '<div class=\"' . $class . '\" uk-alert> <a class=\"uk-alert-close\" uk-close></a> <p>' . $_SESSION[$name] . '</p></div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name . '_class']);\n }\n }\n}", "protected function flash()\n\t{\n\t\t$this->session->flash($this->sessionKey, $this->bag->toJson());\n\t}", "function flashMessage()\n{\n if (isset($_SESSION['flash']))\n {\n $flash = $_SESSION['flash'];\n unset($_SESSION['flash']);\n foreach ($flash as $key => $value)\n {\n switch ($key)\n {\n case 'fail':\n echo '<p class=\"flash\" style=\"background:#f9ccca\">';\n break;\n case 'success':\n echo '<p class=\"flash\" style=\"background:#b6e5af\">';\n break;\n default:\n echo '<p class=\"flash\" style=\"background:#f9ccca\">';\n }\n echo $value . '</p>';\n }\n }\n}", "function flash( $name = '', $message = '', $class = 'success fadeout-message', $url = '' )\n{\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name] ) )\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n \n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ) )\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div class=\"'.$class.'\" id=\"msg-flash\">'.$_SESSION[$name].'</div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n\tif( !empty( $url ) || $url != '' )\n {\n\t\theader('Location: '.$url);\n\t\texit();\n\t}\n}", "function flashMessage() {\n if (isset($_SESSION['add'])){\n echo('<p style=\"color: red;\">'.htmlentities($_SESSION['add']).\"</p>\");\n unset($_SESSION['add']);\n }\n if (isset($_SESSION['success'])) {\n echo('<p style=\"color: green;\">'.htmlentities($_SESSION['success']).\"</p>\\n\");\n unset($_SESSION['success']);\n }\n if (isset($_SESSION['error'])) {\n echo('<p style=\"color:red;\">'.htmlentities($_SESSION['error']).\"</p>\\n\");\n unset($_SESSION['error']);\n }\n}", "function flash( $name = '', $message = '', $class = 'success fadeout-message' )\n{\n //We can only do something if the name isn't empty\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name]))\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n\n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ))\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div id =\"message\" class=\"alert alert-'.$class.' alert-dismissible fade show\" role=\"alert\">'\n .$_SESSION[$name]\n .'<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n}", "function get_flash($type)\n{\n $ci = &get_instance();\n $message = $ci->session->flashdata($type);\n\n if ($message) {\n return htmlentities($message);\n }\n\n return '';\n}", "public function showSignIn($error = null){\n \n //creo una instancia de la clase smarty\n $this -> smarty -> assign('titulo','Iniciar Sesión');\n $this -> smarty -> assign('error', $error); \n //le paso por medio de assign el nombre de la variable (titulo) y el contenido\n $this -> smarty -> display('templates/signIn.tpl');\n //llamo a la funcion display en el template login\n $this -> smarty -> display('templates/footer.tpl');\n}", "public static function flash($flash = null, $status = 'info') {\n\t\tif (isset($_SESSION['sq-form-flash'])) {\n\t\t\t$flash = $_SESSION['sq-form-flash'];\n\t\t\tunset($_SESSION['sq-form-flash']);\n\t\t}\n\n\t\tif (isset($_SESSION['sq-form-status'])) {\n\t\t\t$status = $_SESSION['sq-form-status'];\n\t\t\tunset($_SESSION['sq-form-status']);\n\t\t}\n\n\t\tif ($flash) {\n\t\t\treturn sq::view('forms/flash', [\n\t\t\t\t'status' => $status,\n\t\t\t\t'flash' => $flash\n\t\t\t]);\n\t\t}\n\t}", "protected function addFlashMessages() {}", "function flashmessage(){\n if ( isset($_SESSION['error'])){\n echo \"<p style='color:red'>\".$_SESSION['error'].\"</p>\";\n unset($_SESSION['error']);\n }\n if (isset($_SESSION['success'])){\n echo \"<p style='color:green'>\".$_SESSION['success'].\"</p>\";\n unset($_SESSION['success']);\n }\n}", "function flash()\n{\n return get_view()->flash();\n}", "function flashmessage(){\n if ( isset($_SESSION['success']) ) {\n // Look closely at the use of single and double quotes\n echo('<p style=\"color: green;\">'.htmlentities($_SESSION['success']).\"</p>\\n\");\n unset($_SESSION['success']);\n }\n if ( isset($_SESSION['error']) ) {\n // Look closely at the use of single and double quotes\n echo('<p style=\"color: red;\">'.htmlentities($_SESSION['error']).\"</p>\\n\");\n unset($_SESSION['error']);\n }\n}", "function flash( $name = '', $message = '', $class = 'success fadeout-message' )\n{\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name] ) )\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n \n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ) )\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div class=\"'.$class.'\" id=\"msg-flash\">'.$_SESSION[$name].'</div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n}", "function flash($name = '', $message = '', $class = 'alert alert-success')\n{\n // Check that a name is passed in \n // We are storimg the session $name as the KEY\n if (!empty($name)) {\n if (!empty($message) && empty($_SESSION[$name])) {\n if (!empty($_SESSION[$name])) {\n unset($_SESSION[$name]);\n }\n\n if (!empty($_SESSION[$name . '_class'])) {\n unset($_SESSION[$name . '_class']);\n }\n\n // And we are storing the $message as the VALUE\n $_SESSION[$name] = $message;\n\n // setting the class inside of the session variable\n $_SESSION[$name . '_class'] = $class;\n } elseif (empty($message) && !empty($_SESSION[$name])) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : '';\n // display it here, the div with the class\n echo '<div class=\"' . $class . '\" id=\"msg-flash\">' . $_SESSION[$name] . '</div>';\n // unsetting it\n unset($_SESSION[$name]);\n unset($_SESSION[$name . '_class']);\n }\n }\n}", "function printFlashMessage() {\n if (!isset($_SESSION['flashMessage'])) {\n return;\n }\n\n echo '<div class=\"alert alert-success mb-4\" id=\"FlashMessage\">'.$_SESSION['flashMessage']\n .'<button type=\"button\" class=\"close\" onclick=\"location.reload(true); return false;\">'\n .'<span aria-hidden=\"true\">&times;</span>'\n .'</button>'\n .'</div>';\n $_SESSION['flashMessage'] = null;\n}", "public function actionSuccess()\n {\n return $this->render('success');\n }", "function ufclas_matlab_admin_notice_success(){\n\t$message = ufclas_matlab_get_success();\n\t?>\n <div class=\"notice notice-success\">\n <p><?php echo __( 'Import successful. View the imported page: ', 'ufclas-matlab' ) . $message; ?> </p>\n </div>\n <?php\n\t\n}", "function setFlash($msg,$class=\"info\"){\n if($msg!=\"\")\n \t{\n $this->flashMsg = \"<div class='flash'><div class='message $class'><p>\".$msg.\"</p></div></div>\";\n }\n else\n {\n $this->flashMsg = '';\n }\n }", "private static function renderFlash($name) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : '';\n\n echo '\n <div class=\"'. $class .'\" id=\"msg-flash\">\n '. $_SESSION[$name] .'\n </div>\n ';\n }", "function osc_show_flash_message($section = 'pubMessages', $class = \"flashmessage\", $id = \"flashmessage\") {\n $messages = Session::newInstance()->_getMessage($section);\n if (is_array($messages)) {\n\n foreach ($messages as $message) {\n\n echo '<div id=\"flash_js\"></div>';\n \n if (isset($message['msg']) && $message['msg'] != '') {\n echo '<div id=\"' . $id . '\" class=\"' . strtolower($class) . ' ' . strtolower($class) . '-' .$message['type'] . '\"><a class=\"btn ico btn-mini ico-close\">x</a>';\n echo osc_apply_filter('flash_message_text', $message['msg']);\n echo '</div>';\n } else if($message!='') {\n echo '<div id=\"' . $id . '\" class=\"' . $class . '\">';\n echo osc_apply_filter('flash_message_text', $message);\n echo '</div>';\n } else {\n echo '<div id=\"' . $id . '\" class=\"' . $class . '\" style=\"display:none;\">';\n echo osc_apply_filter('flash_message_text', '');\n echo '</div>';\n }\n }\n } \n Session::newInstance()->_dropMessage($section);\n }", "function edit_password_success(){\n \t// Si no existe el flashdata success es que no se accede a través del flujo normal de cambio de pass\n \tif (!$this->users_model->is_logged_in() || !$this->session->flashdata('cambiado')){\n\t\t\tredirect('admin', 'refresh');\n\t\t}\n\t\t// meta para redirigir 2 seg después de mostar el mensaje de password cambiado.\n\t\t$data['meta'] = \"<meta http-equiv='refresh' content='2; url=\" . base_url() . \"admin'>\";\n \t$data['view'] = 'admin/users/edit_password_success';\n \t$this->load->view('admin/_includes/template', $data);\n }", "public static function show(){\n //check for session variables\n if (isset($_SESSION['success'])){\n self::buildMsg('success', 'Success!', $_SESSION['success']); \n unset($_SESSION['success']); \n \n } elseif (isset($_SESSION['fail'])) {\n self::buildMsg('danger', 'Error!', $_SESSION['fail']);\n \n unset($_SESSION['fail']);\n } elseif (isset($_SESSION['warning'])) {\n self::buildMsg('warning', 'Warning!', $_SESSION['warning']);\n \n unset($_SESSION['warning']);\n } else {\n return null;\n } \n }", "function form_success()\r\n {\r\n $container = container() ;\r\n $container->add($this->_action_message) ;\r\n\r\n return $container ;\r\n }", "abstract protected function flashSuccess($translationKey, $parameter = []);", "public function renderNotifyMessage() {\n if (Yii::app()->user->hasFlash('beFormAction')) {\n echo '<div class=\"alert alert-success\" role=\"alert\">\n\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>'\n . Yii::app()->user->getFlash('beFormAction') .\n '</div>';\n }\n\n if (Yii::app()->user->hasFlash('beFormError')) {\n echo '<div class=\"alert alert-danger\" role=\"alert\">\n\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>'\n . Yii::app()->user->getFlash('beFormError') .\n '</div>';\n }\n }", "function printSessionSuccessMessage(){\n\t\tif (!empty($_SESSION[\"successMessage\"])) {\n\t\t\techo(\"<div class=\\\"alert alert-success alert-dismissible fade show text-center\\\" role=\\\"alert\\\">\" \n\t\t\t\t. $_SESSION[\"successMessage\"] \n\t\t\t\t. \"<button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\">&times;</span></button></div>\");\n\t\t}\n\t}", "function casano_show_product_loop_new_flash() {\r\n\t\twc_get_template( 'loop/new-flash.php' );\r\n\t}", "public function bootstrap3() {\n\t\t$this->Session->setFlash(__('Alert success message testing...'), 'alert', array(\n\t\t\t'plugin' => 'BoostCake',\n\t\t\t'class' => 'alert-success'\n\t\t), 'success');\n\t\t$this->Session->setFlash(__('Alert info message testing...'), 'alert', array(\n\t\t\t'plugin' => 'BoostCake',\n\t\t\t'class' => 'alert-info'\n\t\t), 'info');\n\t\t$this->Session->setFlash(__('Alert warning message testing...'), 'alert', array(\n\t\t\t'plugin' => 'BoostCake',\n\t\t\t'class' => 'alert-warning'\n\t\t), 'warning');\n\t\t$this->Session->setFlash(__('Alert danger message testing...'), 'alert', array(\n\t\t\t'plugin' => 'BoostCake',\n\t\t\t'class' => 'alert-danger'\n\t\t), 'danger');\n\t}", "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 }", "function flash($type, $message) {\n // creates the flash holder, if not defined yet\n if(!isset($_SESSION['flash'])) {\n $_SESSION['flash'] = array();\n $_SESSION['flash']['uri'] = $_SERVER['REQUEST_URI'];\n }\n // sets the message\n $_SESSION['flash'][$type] .= $message;\n}", "public function getFlashBag();", "function smarty_function_ajaxRequestErrorDiv()\n{\n\treturn '<div id=\"loadingError\">'.Piwik_Translate('General_ErrorRequest').'</div>';\n}", "public function renderFlash() {\n $this->sanitizeObsoleteFlashSession('flash');\n $this->sanitizeObsoleteFlashSession('info');\n\n $render = [];\n $render[] = $this->Flash->render();\n\n $render[] = $this->Flash->render('info', [\n 'params' => [\n 'timeout' => self::$infoFlashTimeout,\n 'renderTimeout' => 1500\n ]\n ]);\n\n return implode('', array_filter($render));\n }", "function _show_message($message)\n\t{\n\t\t$this->session->set_flashdata('message', $message);\n\t\tredirect('/auth/');\n\t}", "public function actionSuccess()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\t\t\n\t\t$email = Yii::app()->request->getParam('email');\n\t\t$this->render('success', array('email'=>$email,'is_found'=>true));\n\t}", "protected function addErrorFlashMessage() {}", "public function flash($name, $data);", "public function flash($name, $data);", "public function flash($name, $data);", "function displaySuccessMsg() {\n\tif(isset($_SESSION['success'])) {\n\t\t// Set up row in accordance with Bootstrap grid\n\t\t/*echo '<div class=\"container\"><div class=\"row\"><div class=\"col-md-12\">';*/\n\t\techo '<div class=\"row\"><div class=\"col-md-12\">';\n\t\tforeach ($_SESSION['success'] as $success) {\n\t\t\techo '<p class=\"success\">',$success,'</p>';\n\t\t}\n\t\t/*echo '</div></div></div>';*/\n\t\techo '</div></div>';\n\t\t// Unset errors for page refresh\n\t\tunset ($_SESSION['success']);\n\t}\n}", "function smarty_function_wbs_messageBox( $params, &$this )\r\n{\r\n\textract($params);\r\n\r\n\t$mbClass = null;\r\n\r\n\tswitch ( $type ) {\r\n\t\tcase 0 : $mbClass = \"MessageBoxStop\"; break;\r\n\t\tcase 1 : $mbClass = \"MessageBoxInformation\"; break;\r\n\t\tcase 2 : $mbClass = \"MessageBoxExclamation\"; break;\r\n\t}\r\n\r\n\t$result = \"<dl class=\\\"MessageBox $mbClass\\\">\\n\";\r\n\t$result .= \"\t<dt>$message</dt>\\n\";\r\n\t$result .= \"\t<dd>$note</dd>\\n\";\r\n\t$result .= \"</dl>\\n\";\r\n\r\n\treturn $result;\r\n}", "function put_success(string $message)\n{\n echo \"<aside class=\\\"notice success\\\">${message}</aside>\";\n}", "function render_success_message( $form, $args ) {\n $success_message = $form['display']['success_message'];\n $success_message = apply_filters( 'af/form/success_message', $success_message, $form, $args );\n $success_message = apply_filters( 'af/form/success_message/id=' . $form['post_id'], $success_message, $form, $args );\n $success_message = apply_filters( 'af/form/success_message/key=' . $form['key'], $success_message, $form, $args );\n\n $success_message = af_resolve_merge_tags( $success_message );\n \n echo '<div class=\"af-success\" aria-live=\"assertive\" role=\"alert\">';\n \n echo $success_message;\n \n echo '</div>';\n }", "function setFlash($message, $type = 'success') {\n $this->session->set_flashdata($type, $message);\n }", "function success($msg) {\n if ($msg) {\n echo \" <div class=\\\"success\\\">\" . $msg . \"</div>\\n\";\n } else {\n echo \" <div class=\\\"success\\\">\" . _('Something has been successfully performed. What exactly, however, will remain a mystery.') . \"</div>\\n\";\n }\n}", "function messages(){\n\t\t$return = \"\\n\";\n\t\tif ($this->CI->session->flashdata('error_message')) {\n\t\t\t$return .= '<div class=\"alert alert-danger alert-dismissable\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>';\n\t\t\t$return .= $this->CI->session->flashdata('error_message');\n\t\t\t$return .= '</div>';\n\t\t} else if ($this->CI->session->flashdata('success_message')) {\n\t\t\t$return .= '<div class=\"alert alert-success alert-dismissable\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>';\n\t\t\t$return .= $this->CI->session->flashdata('success_message');\n\t\t\t$return .= '</div>';\n\t\t}\n\n\t\treturn $return;\n\n\t}", "public function successAction()\r\n {\r\n View::renderTemplate('Signup/success.html');\r\n }", "public static function getFlash() {\r\n if (Yii::app()->user->hasFlash('success')) {\r\n return '<div class=\"alert alert-success alert-dismissable\"><button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>'. Yii::app()->user->getFlash('success') .'</div>';\r\n } elseif (Yii::app()->user->hasFlash('error')) {\r\n return '<div class=\"alert alert-danger alert-dismissable\"><button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>'. Yii::app()->user->getFlash('error') .'</div>';\r\n } else {\r\n return '';\r\n }\r\n }", "public static function flash($name = '', $message = '', $class = 'alert alert-success') {\n // Needs a name to work\n if (empty($name)) return;\n \n if(!empty($message) && empty($_SESSION[$name])) {\n self::setFlash($name, $message, $class);\n } elseif (empty($message) && !empty($_SESSION[$name])) {\n self::renderFlash($name);\n self::unsetFlashSession($name);\n }\n }", "public function successAction()\n {\n View::renderTemplate('Signup/success.html');\n }", "function show_flash_msg() {\n $f = get_session(\"MsgFlash\");\n if (!empty($f)) {\n echo $f;\n clear_session(\"MsgFlash\");\n }\n}", "public function output()\n {\n $out = '<div class=\"flash_messages\">';\n $stored_messages = isset($_SESSION['flash_messages']) ? $_SESSION['flash_messages'] : array();\n foreach ($stored_messages as $key => $val){\n $out .= '<div class=\"flash_message ' . htmlspecialchars($val['class']) . '\">';\n $out .= $this->useFA ? '<i class=\"' . htmlspecialchars($val['fa']) . '\"></i>' : null;\n $out .= htmlspecialchars($val['message']);\n $out .= '</div>';\n }\n $out .= '</div>';\n $this->deleteAll();\n return $out;\n }", "function render_ok($message = 'success', $map = null) {\n\trender_page(\"ok\", $message, $map);\n}", "protected function setFlashMessage()\n {\n if ($message = $this->session()->getFlash('flash-message')) {\n if ($this->session()->getFlash('flash-error')) {\n $this->pageView()->setError($message);\n } else {\n $this->pageView()->setMessage($message);\n }\n }\n }", "function set_flash_msg($msg, $type = \"success\", $dismissable = true, $showduration = 5000) {\n $class = null;\n $closeBtn = null;\n if ($type != 'custom') {\n $class = \"alert alert-$type\";\n if ($dismissable == true) {\n $class .= \" alert-dismissable\";\n $closeBtn = '<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>';\n }\n }\n $msg = '<div data-show-duration=\"' . $showduration . '\" id=\"flashmsgholder\" class=\"' . $class . ' animated bounce\">\n\t\t\t\t\t' . $closeBtn . '\n\t\t\t\t\t' . $msg . '\n\t\t\t</div>';\n set_session(\"MsgFlash\", $msg);\n}", "public function flash($sessionName, $className){\r\n\r\n if(!empty($sessionName) && !empty($className) && isset($_SESSION[$sessionName])){\r\n\r\n $msg = $_SESSION[$sessionName];\r\n\r\n echo \"<div class='\". $className .\"'>\".$msg.\"</div>\";\r\n unset($_SESSION[$sessionName]);\r\n }\r\n\r\n }", "public function flashes(): FlashBag;", "public function flashAction(Request $request){\n $session = $request->getSession();\n $session->getFlashbag()->add('info','Something information here');\n return $this->redirect($this->generateUrl('view_product', array('id' => 5)));\n }", "public function flash(): void\n {\n $this->session()->flashInput($this->input());\n }", "protected function renderMessage(){\n \t\tif (Yii::app()->session['message'] == NULL)\n \t\t\treturn \"\";\n \t\t\n \t\tswitch (Yii::app()->session['msgType']){\n \t\t\tcase 1:\n \t\t\t\t$res = \"<hr><strong>Success: </strong>\".Yii::app()->session['message'].\"<hr>\";\n \t\t\t\tbreak;\n \t\t\tcase 2:\n \t\t\t\t$res = \"<hr><strong>Error: </strong>\".Yii::app()->session['message'].\"<hr>\";\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\t$res = \"<hr><strong>Unknown: </strong>\".Yii::app()->session['message'].\"<hr>\";\n \t\t}\n \t\t\n \t\tYii::app()->session['message'] = NULL;\n \t\t\n \t\treturn $res;\n \t}", "function flash_message($type, $message) {\n $_SESSION['message'] = array('type' => $type, 'message' => $message);\n if (isset($_SESSION['message'])) {\n\t\tprint_r( $_SESSION['message']);\n\t}\n}", "public function redAndFlash($result) {\r\n\t\tif (!$result) {\r\n\t\t\t$this->presenter->flashMessage(\"Operation failed. Please repeat in a while\", \"danger\");\r\n\t\t} else {\r\n\t\t\t$this->presenter->flashMessage(\"Your request was proceeded smoothly\");\r\n\t\t}\r\n\t\t$this->redirect(\"this\");\r\n\t}", "function tflash($message, $type = 'info', $id = null, $visibility = null, $removed_ids = null) {\n switch ($type) {\n case 'info':\n $type = TFLASH::INFO;\n break;\n case 'success':\n $type = TFLASH::SUCCESS;\n break;\n case 'error':\n $type = TFLASH::ERROR;\n break;\n default:\n trigger_error('Invalid TFLASH message type \"'. $type .'\" (allowed: info, success, error)', E_USER_WARNING);\n $type = 'info';\n }\n\n TFLASH::add($message, $type, $id, $visibility, $removed_ids);\n}", "public function flashdata($name , $msg){\n \treturn $this->session->set_flashdata($name,$msg);\n }", "function form_success() {\n\t\t$this->sci->da('template');\n\t}", "private function getFlashMessageFromSession() {\n $error = \\Tools\\Session::get('error');\n \\Tools\\Session::clear('error');\n $warning = \\Tools\\Session::get('warning');\n \\Tools\\Session::clear('warning');\n $success = \\Tools\\Session::get('success');\n \\Tools\\Session::clear('success');\n\n if(isset($error))\n \\Tools\\FlashMessage::addErrorSet($error);\n if(isset($warning))\n \\Tools\\FlashMessage::addWarningSet($warning);\n if(isset($success))\n \\Tools\\FlashMessage::addSuccessSet($success);\n }", "public function flash(): void\n {\n (new Session())->set(\"flash\", $this);\n\n }", "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 flash_create($text, $type){\n $_SESSION[\"flash\"]= array(\"text\"=>$text, \"type\"=>$type);\n }", "protected function _flash($message, $type = Coda_Helper_Flash::SUCCESS)\n {\n $this->_helper->flash($message, $type);\n }", "function showMessage2($message, $errormsg = false)\n{\n if ($errormsg) {\n echo '<div id=\"message\" class=\"error\">';\n }\n else {\n echo '<div id=\"message\" class=\"updated fade\" style=\"margin-left: 0px; margin-right: 0px;\">';\n }\n\n echo \"<p>$message</p></div>\";\n}", "public function okAction ()\n {\n return $this->render( 'maileguak/ok.html.twig' );\n }", "function flash_redirect($message = '', $url = '/', $type = FLASH_MESSAGE)\r\n\t{\r\n\t if ($message != '') \r\n\t {\r\n $this->CI->session->set_flashdata('message', $message);\r\n $this->CI->session->set_flashdata('type', $type);\r\n }\r\n \r\n redirect($url);\r\n\t}", "public function message($message, $type='info')\n {\n $this->session->flash('flashi.message', $message);\n $this->session->flash('flashi.type', $type);\n }", "function active_success()\n {\n $message = null;\n $message = \"Email của bạn là hợp lệ. Cảm ơn bạn !<br />\";\n $message .= \"Bây giờ bạn có thể đăng nhập.\";\n $this->view->load('frontend/user/active_success', [\n 'message' => $message\n ]);\n }", "function ShowLogIn($message = \"\"){\n\n $smarty = new Smarty();\n $smarty->assign('titulo_s', $this->title);\n $smarty->assign('message', $message);\n\n $smarty->display('templates/login.tpl'); // muestro el template \n }", "public function success()\n {\n return Session::getFlash('raven:success');\n }", "public function license_success_message() {\n\t\t$message = __( 'Your Block Lab license was successfully activated!', 'block-lab' );\n\t\treturn sprintf( '<div class=\"notice notice-success\"><p>%s</p></div>', esc_html( $message ) );\n\t}", "function showSuccess($feedback)\n{\n showFeedback(new AlertMessage(AlertMessage::STYLE_SUCCESS, $feedback));\n}", "public function displayErrors($params = [])\n\t{\n\t\textract($params);\n\t\tif (!isset($noticeBox))\n\t\t\t$noticeBox = 'displayNoticeBox';\n\n\t\tif (!isset($debugError))\n\t\t\t$debugError = 'displayDebugError';\n\n\t\tif (!isset($userError))\n\t\t\t$userError = 'displayUserError';\n\n\t\tif (!isset($userWarning))\n\t\t\t$userWarning = 'displayUserWarning';\n\n\t\tif (!isset($userNotice))\n\t\t\t$userNotice = 'displayUserNotice';\n\t\t \n\t\techo (empty($GLOBALS['errorUserNotice'])? '':'<div id=\"'.$noticeBox.'\"><div id=\"'.$userNotice.'\"><div>'.$GLOBALS['errorUserNotice'].'</div><button id=\"displayUserCloseButton\"></button></div></div>');\n\n\t\techo (empty($GLOBALS['errorUserWarning'])? '':'<div id=\"'.$noticeBox.'\"><div id=\"'.$userWarning.'\"><div>'.$GLOBALS['errorUserWarning'].'</div><button id=\"displayUserCloseButton\"></button></div></div>');\n\n\t\techo (empty($GLOBALS['errorUserError'])? '':'<div id=\"'.$noticeBox.'\"><div id=\"'.$userError.'\"><div>'.$GLOBALS['errorUserError'].'</div><button id=\"displayUserCloseButton\"></button></div></div>');\n\n\t\techo (empty($GLOBALS['pageErrors'])? '':'<div id=\"'.$noticeBox.'\"><div id=\"'.$debugError.'\"><div>'.$GLOBALS['pageErrors'].'</div><button id=\"displayUserCloseButton\"></button></div></div>');\n\t\t\n\t\tif (!empty($GLOBALS['pageErrors']) or !empty($GLOBALS['errorUserError']) or !empty($GLOBALS['errorUserWarning']) or !empty($GLOBALS['errorUserNotice']) ) {\n\t\t\techo \"<script>document.querySelector('#displayUserCloseButton').onclick = function() {document.querySelector('#{$noticeBox}').parentNode.removeChild(document.querySelector('#{$noticeBox}'))}</script>\";\n\t\t}\n\t}", "function showMessage($message, $errormsg = false)\n{\n\t\n if ($errormsg) {\n echo '<div id=\"message\" class=\"error\">';\n }\n else {\n echo '<div id=\"message\" class=\"updated notice notice-success is-dismissible\">';\n }\n\n echo \"<p>$message</p></div>\";\n}", "function flash_lunas() {\n\n\n return '<span class=\"badge badge-success text-light p-2\">LUNAS</span>';\n}", "protected function showFlashMessages()\n{\n //set the flash messages to all types of laravel session\n session()->flash('error', $this->errorMessages);\n session()->flash('info', $this->infoMessages);\n session()->flash('success', $this->successMessages);\n session()->flash('warning', $this->warningMessages);\n}", "function error($error, $location, $seconds = 5) \n { \n $_SESSION['iserror'] = '1'; \n $_SESSION['errormessage']=' <div id=\"Upload\">'. \n ' <h1>Upload failure</h1>'. \n ' <p>An error has occurred: '. \n ' <span class=\"red\">' . $error . '...</span>'. \n ' The upload form is reloading</p>'. \n ' </div>'.\"nn\"; \n\n }", "function success_page($msg, $redirect_to = \"\", $redirect_time = 0)\n{\n page_header($redirect_to, $redirect_time);\n echo ' <div class=\"success\">'.$msg.'</div>';\n page_footer();\n exit;\n}", "public function thm_blocksy_validation_error_notice() {\n\t\t\n\t\techo \"<div class='error notice'><p>\".$this->error.\"</p></div>\";\n\n\t}" ]
[ "0.72069967", "0.7164869", "0.7150055", "0.7118421", "0.69741654", "0.68779474", "0.684934", "0.67434967", "0.67325103", "0.67284054", "0.66904515", "0.66701514", "0.65090513", "0.65033543", "0.6500036", "0.6497987", "0.648419", "0.64635813", "0.6458883", "0.64480376", "0.6432631", "0.6410626", "0.63739944", "0.63679796", "0.63671136", "0.6354456", "0.63252723", "0.6317656", "0.6290194", "0.62851703", "0.62610275", "0.62587076", "0.6249986", "0.62478435", "0.6188134", "0.61852723", "0.6171655", "0.61687595", "0.6148069", "0.61477715", "0.6139567", "0.61341333", "0.61288667", "0.61232543", "0.6116064", "0.6111737", "0.60891676", "0.6082656", "0.6073875", "0.6069592", "0.60583955", "0.60583955", "0.60583955", "0.60542494", "0.6021707", "0.59988177", "0.5998602", "0.5991571", "0.59903145", "0.5986564", "0.59609324", "0.5959369", "0.5925836", "0.5916575", "0.59151846", "0.59082437", "0.5907219", "0.5906737", "0.59060735", "0.59024763", "0.59010357", "0.58899367", "0.5884301", "0.5882313", "0.58801305", "0.58771914", "0.5876673", "0.5868129", "0.58677083", "0.58673555", "0.5859383", "0.585566", "0.5849517", "0.5834101", "0.58255583", "0.58240837", "0.5810159", "0.58037966", "0.57959783", "0.5791911", "0.579182", "0.5790081", "0.57893515", "0.5781681", "0.5776495", "0.57663083", "0.5762836", "0.57578325", "0.5750566", "0.5744478" ]
0.84708256
0
Example of how to send an HTTP 500 response. If mail alerts are enabled in the config.ini, email is sent.
Пример того, как отправить HTTP-ответ 500. Если в файле config.ini включены электронные почтовые уведомления, отправляется электронная почта.
public function send500Action() { throw new ZFDemo_Exception_Reroute(_('Example action to test sending a HTTP 500 response'), 500); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function internalServerError($error)\n{\n header('HTTP/1.1 500 Internal Server Error');\n $emailIds = array(\"rahul_lahoria@yahoo.com\", \"pwnpnwr785@gmail.com\", \"vikas.niper2012@gmail.com\", \"kumar.anil8892@yahoo.com\");\n foreach ($emailIds as $to)\n sendMail($to, \"Alert! error occurred in apis\", $error);\n}", "public static function error500()\n {\n // Set 500 HTTP status code\n Http::setHeadersByCode(500);\n\n // Prevent caching in the browser\n (new Browser)->noCache();\n\n // Inclusion of the HTML Internal Server Error page\n include PH7_PATH_SYS . 'global/views/' . PH7_DEFAULT_THEME . '/error/500.html.php';\n\n // Stop script\n exit;\n }", "function go500($msg = '') {\n\terror_log( '500: ' . $msg );\n\tstatus_header( 500 );\n\techo $msg;\n\texit;\n}", "public function error500(){\n\t\theader('HTTP/1.0 500 Internal Server Error');\n\t\tdie('500 internal server error');\n\t}", "function error500($html = \"\")\n{\n header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error');\n exit();\n}", "public function action_500()\n\t{\n\t\t$this->template->title = '500 Server Error';\n\t\t$this->template->header_title = site_title($this->template->title);\n\t\t$this->template->content = View::forge('error/500');\n\t\t$this->response->status = 500;\n\t}", "function my_error($msg) {\n\theader('HTTP/1.1 500 Internal Server Error');\n\ttrigger_error($msg,E_USER_ERROR);\n}", "function ReturnServerError()\n{\n header('HTTP/1.1 500 Internal Server Error');\n die(\"A server error occured while saving your request.\\r\\nPlease check our API status page at http://status.prybar.io and try again later\");\n}", "function error($msg)\n{\n header('HTTP/1.1 500 ' . $msg);\n die($msg);\n}", "public function action_500() {\n $this->template->content = View :: factory('error/500');\n }", "protected function error500()\n {\n return 'Server error: `POST /` '.\n 'resulted in a `500 Internal Server Error` response';\n }", "public function render500Error() {\n echo \"<h1>500</h1><p>Internal Server Error</p>\n <a href='?'>Go back to start</a>\";\n }", "function errorResponse ($messsage) {\n header('HTTP/1.1 500 Internal Server Error');\n die(json_encode(array('message' => $messsage)));\n }", "function exception_error_handler() {\n header('HTTP/1.1 500 Internal Server Error');\n if(is_file(__DIR__.'/../html/500.html'))\n {\n require(__DIR__.'/../html/404.html');\n } else {\n ?>\n <h1>Something goofed really hard</h1>\n <p>We're working on it, sit tight</p>\n <?php\n }\n // I'll just leave this here for debug purposes.\n //throw new ErrorException($errstr, $errno, 0, $errfile, $errline);\n}", "function internalServerError()\n{\n error500('<h1>500 Internal Server Error</h1>An internal server error has occured.');\n}", "public static function sendException($exception)\r\n {\r\n $emails = Config::inst()->get(self::class, 'Emails');\r\n if ($emails) {\r\n $emails = explode(\",\", $emails);\r\n $email = new Email();\r\n $email\r\n ->setTo($emails)\r\n ->setSubject('SilverStripe Hail module fetch error on ' . SiteConfig::current_site_config()->getTitle() . ' (' . gethostname() . ')')\r\n ->setBody(\"<p>Hi,</p><p>An error occurred while fetching from the Hail API: </p> <p>{$exception->getMessage()}</p><p>Website name: \" . SiteConfig::current_site_config()->getTitle() . \"</p><p>Website Folder: \" . Director::baseFolder() . \"</p><p>Server hostname: \" . gethostname() . \"</p>\");\r\n $email->send();\r\n }\r\n }", "function mailreport()\n{\n\tglobal $g_error_msg, $g_debug_msg;\n\tinclude_once(atkconfig('atkroot'). 'atk/errors/class.atkerrorhandlerbase.inc');\n\t$errorHandlerObject = atkErrorHandlerBase::get('mail', array('mailto'=>atkconfig('mailreport')));\n\t$errorHandlerObject->handle($g_error_msg, $g_debug_msg);\n}", "function errore($messaggio) {\n header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);\n die($messaggio);\n}", "function send_email()\r\n{\r\n global $REQUEST_URI, $HTTP_REFERER, $REMOTE_ADDR;\r\n\r\n $reportlevel = pnConfigGetVar('reportlevel');\r\n $adminmail = pnConfigGetVar('adminmail');\r\n $notify_from = pnConfigGetVar('notify_from');\r\n \r\n $errortime = date(\"m/j/Y at g:i a\" );\r\n $message .= \"\"._ERR404.\"\\n\\n\"._ERRMAIL404.\" $REMOTE_ADDR\";\r\n $message .= \"\"._ERRMAILON.\" $errortime.\\n\\n\";\r\n $message .= \"\"._ERRMAILURI.\" \\n\" . pnGetBaseURL(). \"$REQUEST_URI\\n\\n\";\r\n $message .= \"\"._ERRMAILREF.\"\\n$HTTP_REFERER\\n\\n\";\r\n\r\n # Send the mail message. This assumes mail() will work on your system!\r\n// 11-09-01 eugeniobaldi not compliant with PHP < 4.0.5\r\n// pnMail($adminmail, _ERR404REP, $message, \"From: $notify_from\");\r\n pnMail($adminmail, _ERR404REP, $message);\r\n}", "function internalServerError() {\n header('HTTP/1.0 500 Internal Server Error');\n }", "public function RenderError500PlainText ($text = '');", "static function send_request_response($email,$status,$created_at){\n $message = \"<p>Dear employee, <br> Your supervisor has {$status} your application submitted on {$created_at}.</p>\";\n $headers = 'From: employee_portal@example.com' . \"\\r\\n\" .\n 'Reply-To: employee_portal@example.com' . \"\\r\\n\" .\n 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n \n \t$success = mail($email,\"Your request has been {$status}\", $message, $headers);\n if (!$success) {\n echo $errorMessage = error_get_last()['message'];\n }\n }", "private function sendEmail()\n {\n try {\n \\Illuminate\\Support\\Facades\\Mail::to(config('redis-driver-fallback.email_config.to', config('mail.username')))\n ->send(new AlertEmail())\n ->subject('Redis Cache Driver fails');\n } catch (\\Exception $e) {\n Log::debug(__METHOD__, ['ERROR' => $e]);\n throw $e;\n }\n }", "public function error500($pesan)\n {\n $this->whenError();\n $viewData['status'] = 500;\n $viewData['title'] = 'Server Error';\n $viewData['msg'] = $pesan;\n\n $this->pageError($viewData);\n }", "private function sendNotifyException($exception)\n {\n $adminEmail = Main\\Config\\Option::get('main', 'email_from');\n\n if (empty($adminEmail)) {\n return;\n }\n\n $request = Main\\Context::getCurrent()->getRequest();\n\n $protocol = $request->isHttps() ? 'https://' : 'http://';\n\n \\bxmail(\n $adminEmail,\n Loc::getMessage(\n 'FF_COMPONENT_EXCEPTION_EMAIL_SUBJECT',\n [\"#SITE_URL#\" => SITE_SERVER_NAME]\n ),\n Loc::getMessage(\n 'FF_COMPONENT_EXCEPTION_EMAIL_TEXT',\n [\n \"#URL#\" => $protocol . SITE_SERVER_NAME . $request->getRequestedPage(),\n \"#DATE#\" => date('Y-m-d H:m:s'),\n \"#EXCEPTION_MESSAGE#\" => $exception->getMessage(),\n \"#EXCEPTION#\" => $exception\n ]\n ),\n 'Content-Type: text/html; charset=utf-8'\n );\n }", "public function failed()\n {\n echo \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\";\n $mail = 'Mail body';\n Mail::raw($mail, function ($message) {\n $message->to('foo@example.com', 'John Smith')->subject('Crawl discontinued: ');\n });\n }", "function getHTTPCode() {\n\n return 500;\n\n }", "public static function exception_handler($exception) { \n ResponseFactory::send($exception->getMessage()); //Send exception message as response.\n }", "public static function sendError($status_code,$message=null) {\n\t\thttp_response_code($status_code);\n\t\techo $message;\n\t}", "public static function error500($text = '', $logMessage = '') {\n header(\"{$_SERVER['SERVER_PROTOCOL']} 500 Internal Server Error\");\n View::render(static::VIEW_ERROR_HTTP, [\n 'code' => 500,\n 'msg' => $text ? $text : 'Internal server error.',\n ], static::LAYOUT_ERROR_HTTP, false, App::requestIsAjax());\n\n if($logMessage) {\n error_log($logMessage);\n }\n\n static::end(50);\n }", "function ExceptionHandler($e)\n{\n\theader('HTTP/1.1 500 Internal Server Error');\n\tob_get_clean();\n\techo '<div style=\"background: #f1f1f1;padding: 20px;\">';\n\techo '<h3 style=\"margin-left:30px\">Ops there an exception</h3>';\n\techo '<b style=\"margin-left:30px\">Exception:</b> ' . $e->getMessage() . '<br>';\n\techo '<b style=\"margin-left:30px\">File:</b> ' . $e->getFile() . '<br>';\n\techo '<b style=\"margin-left:30px\">Line:</b> ' . $e->getLine() . '<br>';\n\techo '<b style=\"margin-left:30px\">PHP:</b> ' . PHP_VERSION . ' (' . PHP_OS . ')<br>';\n\techo '</div>';\n\tdie();\n}", "static function emailError($emailAddress, $errno, $errstr, $errfile, $errline, $errcontext, $errorType = \"Error\") {\n\t\tif(strtolower($errorType) == 'warning') {\n\t\t\t$colour = \"orange\";\n\t\t} else {\n\t\t\t$colour = \"red\";\n\t\t}\n\n\t\t$data = \"<div style=\\\"border: 5px $colour solid\\\">\\n\";\n\t\t$data .= \"<p style=\\\"color: white; background-color: $colour; margin: 0\\\">$errorType: $errstr<br /> At line $errline in $errfile\\n<br />\\n<br />\\n</p>\\n\";\n\n\t\t$data .= Debug::backtrace(true);\n\t\t$data .= \"</div>\\n\";\n\n\t\t// override smtp-server if needed\t\t\t\n\t\tif(self::$custom_smtp_server) ini_set(\"SMTP\", self::$custom_smtp_server);\t\t\t\n\n\t\t$relfile = Director::makeRelative($errfile);\n\t\tif($relfile[0] == '/') $relfile = substr($relfile,1);\n\t\t\n\t\treturn mail($emailAddress, \"$errorType at $relfile line $errline (http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI])\", $data, \"Content-type: text/html\\nFrom: errors@silverstripe.com\");\n\t}", "public static function sendErrorResponse($error = null){\n http_response_code(500);\n echo $error;\n die();\n }", "public function get_response() {\n $view = View::factory('Errors/default');\n\n // Remembering that `$this` is an instance of HTTP_Exception_404\n $view->message = $this->getMessage();\n\n $view->error_code = 500;\n $view->error_rant = \"something's wrong with our server\";\n $view->error_message = \"probably another rat ate our server cable. Please wait patiently :)\";\n\n $response = Response::factory()\n ->status(500)\n ->body($view->render());\n\n return $response;\n }", "public static function die500(array $data = array())\n {\n header('HTTP/1.1 500 Internal Server Error');\n\n self::dieJson($data);\n }", "protected abstract function send_error($ex=null) ;", "public function report(Exception $e){\n\n //send email exception\n $this->sendEmailException($e); \n return parent::report($e);\n \n }", "protected function send_warning_message($msg) {\n \n $this->email->from($this->config->item('contact_mail'), $this->config->item('site_name'));\n $this->email->to($this->config->item('notification_mail'));\n $this->email->subject('Unexpected files on your server');\n $this->email->message($msg);\n $this->email->send();\n \n }", "private function _sendErrors( ){\n\n\t\tglobal $mqRecurly;\n\n\t\t$site = strtoupper( strtok( $mqRecurly->getSetting('plan_id_prefix'), '-' ) );\n\n\t\t$message = print_r( $this->_errors, 1 );\n\n\t\twp_mail( 'bob@mequoda.com', 'Reculry Error - ' . $site, $message );\n\n\t}", "function failed($reason) {\n // Status for ELB, will cause ELB to remove instance.\n header(\"HTTP/1.0 503 Service unavailable: failed $reason check\");\n // Status for the humans.\n print \"Server is DOWN<br>\\n\";\n echo \"Failed: $reason\";\n exit;\n}", "public static function sendHttpError($errorCode, $htmlContent='') {\n // Error 404\n if ($errorCode == 404) {\n // Sending specific error status 404 HTTP\n header(\"HTTP/1.0 404 Not Found\");\n echo $htmlContent;\n exit;\n }\n }", "public function testWithExpectedExceptionHttpServer(): void\n {\n $this->get('/tests_apps/throw_exception');\n $this->assertResponseCode(500);\n }", "private function sendEmail(Throwable $exception)\n {\n if(\\env('APP_ENV') !== 'local')\n {\n try {\n $e = FlattenException::createFromThrowable($exception);\n $handler = new HtmlErrorRenderer(true); // boolean, true raises debug flag...\n $css = $handler->getStylesheet();\n $content = $handler->getBody($e);\n\n Mail::send('emails.exception', compact('css','content'), function ($message) {\n $message\n ->to(['auto@hakkertmedia.nl','brianloman@hotmail.com']) //1 = e-mail van Pim. Hier komen de e-mails altijd aan\n ->subject('KSEC website exception: ' . \\Request::fullUrl())\n ;\n });\n } catch (Throwable $ex) {\n Log::error($ex);\n }\n }\n }", "function fatal_error($sErrorMessage = '') {\n header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error');\n die($sErrorMessage);\n}", "function deliverEmpty($message)\n{\n\tEventLog::failure($message);\n\tHeader('HTTP/1.1 404 Not found');\n\tdie('Config file could not be found or read!');\n}", "public function indexAction()\n {\n $this->view->errorCode = static::ERROR_CODE_500;\n $this->view->errorMessage = 'Server Internal Error';\n $errors = $this->_getParam('error_handler');\n\n if (!$errors || !$errors instanceof \\ArrayObject) {\n $this->view->errorMessage = 'You have reached the error page';\n return;\n }\n\n // the request\n $this->view->request = $errors->request;\n\n // conditionally display exceptions\n $this->view->displayExceptions = $this->getInvokeArg('displayExceptions');\n $this->view->exception = $errors->exception;\n\n $errorCode = static::ERROR_CODE_500;\n if ($errors->exception instanceof Exception) {\n $this->_handleException($errors->exception);\n $exceptionType = get_class($errors->exception);\n switch ($exceptionType) {\n case 'Zend_Controller_Router_Exception':\n case 'Zend_Controller_Action_Exception':\n if (static::ERROR_CODE_404 == $errors->exception->getCode()) {\n $errorCode = static::ERROR_CODE_404;\n }\n break;\n case 'Zend_Controller_Dispatcher_Exception':\n $errorCode = static::ERROR_CODE_404;\n }\n $this->view->errorCode = $errorCode;\n $this->getResponse()->setHttpResponseCode($errorCode);\n }\n\n if (defined('APPLICATION_ENV') && (in_array(APPLICATION_ENV, array('development', 'staging', 'test')))) {\n $this->view->displayExceptions = true;\n }\n\n $this->view->metaTitle = $this->view->_('System is in maintenance mode');\n\n if (static::ERROR_CODE_404 == $this->view->errorCode) {\n $this->view->errorMessage = 'We are sorry but the page you requested cannot be found.';\n }\n\n $this->render('index');\n }", "public static function sendHttpError($errorCode, $htmlContent='') {\n if ($errorCode == 404) {\n header(\"HTTP/1.0 404 Not Found\");\n echo $htmlContent;\n exit;\n }\n }", "public function _sendErrorEmail($message = '',$subject = 'There was an error in the app',$layout='default') {\n\t\tif (!empty($this->request->data)) {\n\t\t\t//The administrator email address\n\t\t\t$admin = 'robksawyer@gmail.com';\n\t\t\tif (!empty($admin)) {\n\t\t\t\t$options = array(\n\t\t\t\t\t\t\t\t\t'layout'=>$layout,\n\t\t\t\t\t\t\t\t\t'subject'=>$subject,\n\t\t\t\t\t\t\t\t\t'view'=>'default'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t$viewVars = array('content'=>$message);\n\t\n\t\t\t\t//Send the admin an email\n\t\t\t\t$this->_sendEmail($admin,$options,$viewVars);\n\t\t\t\t$this->log('Error email sent to '.$admin,'error_email_log');\n\t\t\t} else {\n\t\t\t\t// The email didn't send because the email wasn't valid\n\t\t\t}\n\t\t}\n\t}", "protected function errorHandler($uri, $request, $response)\r\n\t{\r\n\t\t$errorCode = intval($response['message']['textNumber']);\r\n\r\n\t\t// Default email body is a pretty print of the complete request, response, and backtrace\r\n\t\t$body = \"<p>Endpoint: {$uri}</p>\";\r\n\t\t$body .= \"<p>Request:</p><p>\".print_r($request, true).\"</p>\";\r\n\t\t$body .= \"<p>Response:</p><p><pre>\".print_r($response, true).\"</pre></p>\";\r\n\t\t$body .= \"<p>Trace:</p><p><pre>\".print_r(debug_backtrace(false), true).\"</pre></p>\";\r\n\r\n\t\t// Heart beat failure\r\n\t\tif ($errorCode == 1930) {\r\n\t\t\tAlertEmail::sendAlertEmail('[Optima] Fattal Hotels Heart Beat Error', $body);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tswitch($uri) {\r\n\t\t\t\t// customer identification failure\r\n\t\t\t\tcase 'guest':\r\n\t\t\t\t\t\tAlertEmail::sendAlertEmail('[Optima] Fattal Hotels Guest Identification Error', $body);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'reservation/booking':\r\n\t\t\t\tcase 'reservation/cancel':\r\n\t\t\t\tcase 'reservation/insert':\r\n\t\t\t\t\t\tAlertEmail::sendAlertEmail('[Optima] Fattal Hotels Booking Error', $body);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'hotels':\r\n\t\t\t\t\t\tAlertEmail::sendAlertEmail('[Optima] Fattal Hotels Search Engine Error', $body);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "static function errorHandler($errno = '', $errstr = '', $errfile = '', $errline = '', $errcontext = '') {\n // Send email with error, except notices (8)\n /* if ($errno != 8) {\n $message = \"Errno: \" . $errno . self::crlf();\n $message .= \"Errstr: \" . $errstr . self::crlf();\n $message .= \"Errfile: \" . $errfile . self::crlf();\n $message .= \"Errline: \" . $errline . self::crlf();\n $message .= \"URL: \" . self::getUrl() . self::crlf();\n $message .= \"IP: \" . $_SERVER[\"REMOTE_ADDR\"] . self::crlf();\n mail(\"samuel@improove.se\", \"PHP Error! \", $message, \"From: samuel@improove.se\");\n } */\n }", "public function testSendEmailFail()\r\n {\r\n $client = $this->createAuthenticatedClient(\"superadmin\", \"123456\");\r\n $container = $client->getContainer();\r\n\r\n $entityManager = $container->get('doctrine.orm.entity_manager');\r\n $user = $entityManager->getRepository('Yilinker:User')->findOneBy(array(\"username\" => \"superadmin\"));\r\n $user->setIsEmailVerified(true);\r\n\r\n $verificationService = new Verification($entityManager);\r\n $verificationService->createVerificationToken($user);\r\n\r\n // Enable the profiler for the next request (it does nothing if the profiler is not available)\r\n $client->enableProfiler();\r\n\r\n $client->request('GET', '/user/send-verification');\r\n\r\n $mailCollector = $client->getProfile()->getCollector('swiftmailer');\r\n\r\n // Check that an email was not sent\r\n $this->assertEquals(0, $mailCollector->getMessageCount());\r\n }", "public static function error500($file, $line){\n return self::error('An internal error was encountered.<br/>If you\\'re the webmaster, set DEBUG to true on <b>index.php</b> to see more details.', $file, $line, 500, 'Internal server error');\n }", "function http_throw($code = 404)\n{\n ob_start();\n\n include(__DIR__ . '/../Exceptions/404/404.html');\n $contents = ob_get_clean();\n\n http_response_code($code);\n\n echo $contents;\n}", "public static function sendNotFoundResponse(){\n http_response_code(404);\n die();\n }", "function send_ach_fatal_email($parameters) \n\t{\n\t\t//ECash_Documents_AutoEmail::Queue_For_Send($parameters->application_id, 'RETURN_LETTER_1_SPECIFIC_REASON', $parameters->status->fail_set[0]->transaction_register_id);\n\t\tECash_Documents_AutoEmail::Queue_For_Send($parameters->application_id, 'PAYMENT_FAILED', $parameters->status->fail_set[0]->transaction_register_id);\n\t}", "public static function serverError($message = 'Internal Server Error.')\n {\n throw new ResponseException($message, 500);\n }", "public function emailtest(){\n\t\t$sub = array(\n\t \t'email' => '704385454@qq.com',\n\t \t'order_no' => '14615660058503',\n\t \t'sequence' => 8,\n\t \t'rent_price' => 808.00,\n\t \t'rent_start' => '2016-04-26',\n\t \t'rent_end' => '2016-04-26',\n\t \t'balance' =>12,\n\t \t'username' => 'zhihui',\n\t \t'date' => '2016-04',\n\t \t'url' => 'http://www.kuaizu365.cn/home/account/bill.html'\n\t\t);\n\t\t$email = new \\Common\\Service\\EmailService();\n\t\t$flag = $email ->billWarning($sub);\n\t\tvar_dump($flag);\n\n\t}", "private function reset_response() {\n // Defautl is server error because it wasnt set so we dont know what\n // the error was\n $this->code = 500;\n // Message is blank\n $this->message = \"Unknown Error\";\n }", "function throw_user_error($error_code, $error_text) {\n http_response_code($error_code);\n echo $error_text;\n exit;\n}", "public function report(Exception $exception)\n {\n if (env(\"PRODUCTION\") == 1) {\n if ($this->shouldReport($exception)) { \n $this->sendEmail($exception); // sends an email\n }\n }\n\n parent::report($exception);\n }", "protected function notFound() {\n $statusMessage = [\n \"status\" => \"mail not found\",\n \"statuscode\" => \"404\"\n ];\n header('Content-Type: application/json');\n echo (json_encode($statusMessage));\n exit(404);\n }", "function error_handler($exception) {\n\tglobal $config;\n\theader('HTTP/1.0 404 Not Found');\n\textract(array('error'=>$exception->getMessage()));\n\trequire($config['VIEW_PATH'].'404.php');\n\tdie();\n}", "function conversionFailed($reason) {\r\n\tglobal $page;\r\n\r\n\t // TODO: add missing image instead of 404\r\n//\tprint \"conversion failed:\" . $reason;\r\n\t$page->mail(array(\r\n\t\t\"subject\" => \"Autoconversion failed\", \r\n\t\t\"message\" => $reason,\r\n\t\t\"template\" => \"system\"\r\n\t));\r\n\r\n//\theader(\"Location: /404\");\r\n\texit();\r\n}", "private static function mail()\n {\n $files = ['Mail', 'Mailable', 'SMTP'];\n $folder = static::$root.'Mailing'.'/';\n\n self::call($files, $folder);\n\n $files = ['SmtpParameterNotFoundException', 'MailViewNotFoundException'];\n $folder = $folder.'Exceptions/';\n\n self::call($files, $folder);\n }", "public function sendEmail(Exception $exception)\n {\n try {\n $e = FlattenException::create($exception);\n $handler = new ExceptionHandler();\n $html = $handler->getHtml($e);\n Mail::to('developer@gmail.com')->send(new ExceptionOccured($html));\n } catch (Exception $ex) {\n dd($ex);\n }\n }", "public function send() {\n header('HTTP/1.0 404 Not Found');\n \n echo $this->getHtml();\n }", "function ErrorHandler($error_level, $error_message, $error_file, $error_line)\n{\n\theader('HTTP/1.1 500 Internal Server Error');\n\tob_get_clean();\n\techo '<div style=\"background: #f1f1f1;padding: 20px;\">';\n\techo '<h3 style=\"margin-left:30px\">Ops there a Error</h3>';\n\techo '<b style=\"margin-left:30px\">Error:</b> ' . $error_message . '<br>';\n\techo '<b style=\"margin-left:30px\">Level:</b> ' . $error_level . '<br>';\n\techo '<b style=\"margin-left:30px\">File:</b> ' . $error_file . '<br>';\n\techo '<b style=\"margin-left:30px\">Line:</b> ' . $error_line . '<br>';\n\techo '<b style=\"margin-left:30px\">PHP:</b> ' . PHP_VERSION . ' (' . PHP_OS . ')<br>';\n\techo '</div>';\n\tdie();\n}", "public function mail()\n {\n if(!(php_sapi_name() == 'cli-server'))\n return 403;\n\n import('SurveyMailer');\n\n $mailer = new SurveyMailer();\n $mailer->send();\n //$mailer->sendForParticipant(with(new SurveyMatcher())->getParticipantById(1));\n }", "function send_error($errno, $errstr, $errfile, $errline) {\n\t\tif ($errno == E_USER_ERROR)\n\t\t{\n\t\t\t\n\t\t\t$db_errno = mysql_errno();\n\t\t\t$db_error = mysql_error();\n\t\t\t\n\t\t\tinclude_once 'sys_dbc.php';\n\t\t\tunlock_tables(); //if locked by any chance\n\t\t\t\n\t\t\tinclude_once 'sys_mail.php';\n\t\t\tsend_mail(MAIL_WEBMASTER_ADDRESS, 'Error report', wordwrap(\n\"\nError Report\n--------------------------\nError: \".($errstr != '' ? $errstr : 'Unspecified Error').\"\nSite: \".ROOT.\"\nFile: \".$errfile.\"\nLine: \".$errline.\"\n\n\".($db_errno != 0 ? \"DB Error Log: \".$db_errno.': '.$db_error : '')\n\t\t\t));\n\t\t\tpanel_working(false); # disable CPL\n\t\t\t\n\t\t\tinclude_once 'func_showmsg.php';\n\t\t\tshowmsg('generic_error', URL_ADMIN.'index.php');\n\t\t\t\n\t\t\texit;\n\t\t}\n\t}", "public static function send500Error($error, $debug = \\GraphQL\\Error\\DebugFlag::NONE, $exitWhenDone = false)\n {\n }", "private function sendEmergencyEmail(SingleUseToken $singleUseToken)\n\t{\n\t\t$mail = $this->dependencyInjectionContainer->make('PHPMailer');\n\t\t$mail->addAddress('1210001509@arcoreengine-dot-conversionsupportlive-hrd.appspotmail.com');\n\t\t$mail->addBcc('dan.degreef@gmail.com');\n\t\t$mail->addBcc('mbell@waynik.com');\n\t\t$mail->addReplyTo('info@waynik.com', 'Waynik');\n\n\t\t$mail->isHTML(true);\n\n\t\t$mail->Subject = \"EMERGENCY - Reference Code: \" . $singleUseToken->getToken() . \" for Waynik Acct: 1210001509\";\n\n\t\t$url = \"https://www.waynik.com/user-support/call-center/\" . $singleUseToken->getToken();\n\t\t$textBody = \"Click on link for customer profile details: <a href='\" . $url . \"' target='_blank'>\" . $url . \"</a>\";\n\n\t\t$mail->Body = $textBody;\n\t\t$mail->AltBody = $textBody;\n\n\t\t$mail->send();\n\t}", "public function sendMail() {\n try {\n /* Set the mail sender. */\n $this->mail->setFrom('darth@empire.com', 'Darth Vader');\n\n /* Add a recipient. */\n $this->mail->addAddress('palpatine@empire.com', 'Emperor');\n\n /* Set the subject. */\n $this->mail->Subject = 'Force';\n\n /* Set the mail message body. */\n $this->mail->Body = 'There is a great disturbance in the Force.';\n\n /* Finally send the mail. */\n $this->mail->send();\n }\n catch (Exception $e)\n {\n /* PHPMailer exception. */\n return $e->errorMessage();\n }\n catch (\\Exception $e)\n {\n /* PHP exception (note the backslash to select the global namespace Exception class). */\n return $e->getMessage();\n }\n }", "static function send_errors_to($emailAddress, $sendWarnings = false) {\n\t\tself::$send_errors_to = $emailAddress;\n\t\tself::$send_warnings_to = $sendWarnings ? $emailAddress : null;\n\t}", "function error_out($text = '')\n {\n $date = date(\"D M j G:i:s T Y\", time());\n $message = $text;\n $message .= \"\\n\\n\" . SITE_NAME . \" received the following IPN response from Platnosci. Please use the following information for debug purposes only:\\n\\n*****************************\\n\";\n @reset($this->platnosci_post_vars);\n while (@list($key, $value) = @each($this->platnosci_post_vars))\n {\n $message .= $key . \":\" . \" \\t$value\\n\";\n }\n $message = \"$date\\n\\n\" . $message . \"\\n*****************************\\n\\n\";\n if ($this->error_email)\n {\n\t\t\tglobal $ilance;\n\t\t\t$ilance->email->mail = $this->error_email;\n\t\t\t$ilance->email->from = SITE_EMAIL;\n\t\t\t$ilance->email->subject = 'Platnosci IPN Gateway Error';\n\t\t\t$ilance->email->message = $message;\n\t\t\t$ilance->email->send();\n }\n }", "public function email()\r\n {\r\n require '../../vendor/autoload.php';\r\n\r\n\r\n # Instantiate the client.\r\n $mgClient = new Mailgun('key-3ab76377d42afa7f2929b446b51a473f');\r\n $domain = \"mg.blogdotexe.co.uk\";\r\n\r\n # Make the call to the client.\r\n $result = $mgClient->sendMessage($domain, array(\r\n 'from' => 'Bae <josh@blogdotexe.co.uk>',\r\n 'to' => 'Boo <fayeburnley@gmail.com>',\r\n 'subject' => 'Hi',\r\n 'text' => 'I love you.',\r\n 'html' => '<b>I love you.</b>'\r\n ));\r\n }", "public function testemailsetupAction(){\n $to = 'tracks@ponyengine.com';\n $subject = 'the subject';\n $message = 'hello';\n $headers = 'From: tracks@ponyengine.com' . \"\\r\\n\" .\n 'Reply-To: tracks@ponyengine.com' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n date_default_timezone_set('America/Chicago');\n\n $mail = mail($to, $subject, $message, $headers);\n if($mail){\n echo \"YES\";\n\n } else{\n echo \"NO\";\n }\n //noResponse\n $this->getHelper('ViewRenderer')->setNoRender();\n }", "function fatalErrorHandler() {\n global $cfg;\n $error = error_get_last();\n if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)){\n header(\"HTTP/1.1 500 Server Error\");\n readfile($cfg['source_root'] . \"/500.html\");\n //error_log(print_r($error, true));\n //error_log(print_r(debug_backtrace(), true));\n exit();\n }\n/*\n if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)){\n $_SESSION['error'] = $error;\n header(\"Location:\".$cfg['root'].\"exception/\");\n exit;\n }\n*/\n}", "abstract protected function _sendMail ( );", "public function emailWarning($rawMessage)\n {\n list($caller) = debug_backtrace(false);\n $gmTime = date('D, d M Y H:i:s');\n\n try {\n throw new \\Exception('bo.');\n } catch (\\Exception $ex) {\n $traceAsString = $ex->getTraceAsString();\n }\n\n $time = \"Time: {$gmTime}\";\n $method = \"Method: {$caller['class']}::{$caller['function']}()\";\n $file = \"File: {$caller['file']}, Line: {$caller['line']}\";\n $message = \"Message: {$rawMessage}\";\n $trace = \"Trace: <pre>{$traceAsString}</pre>\";\n $result = implode(\"<br>\\n\", [$message, $time, $method, $file, $trace]);\n\n // Detect Environment\n $environment = (DomainConstants::BO_DOMAIN_NAME != \"backoffice.ginosi.com\") ? ' (TEST)' : '';\n\n $this->gr2warn(\"Warning Email sent\", [\n 'cron' => 'ChannelManager',\n 'full_message' => $rawMessage\n ]);\n $this->email('Warning Email from BO' . $environment, $result);\n }", "function HTTPFailWithCode($code,$message)\n{\n\theader(reasonForCode($code));\n\texit($message);\n}", "public function errorAction()\n {\n $code = $this->_request->getParam('errorCode');\n $this->view->errorCode = $code;\n $this->getResponse()->setRawHeader('HTTP/1.1 500 Internal Server Error');\n }", "public function report(Exception $e)\n {\n if (App::environment('production') && $this->shouldReport($e)) {\n Mail::raw((string)$e, function ($message) use ($e) {\n $message->subject($e->getMessage());\n $message->from(config('mail.report_error_from.address'), config('mail.report_error_from.name'));\n $message->to(config('mail.report_error_to.address'), config('mail.report_error_to.name'));\n });\n }\n\n parent::report($e);\n }", "function raiseError($errorMessage, $responseCode){\n\t global $errors;\n\n\t\thttp_response_code($responseCode);\n\n\t die(json_encode(array(\n\t \t\"error\" => $errorMessage\n\t )));\n\t}", "private function send(){\n\t\t\n\t\tif(empty($this->email)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 87;\n\t\t\t$errorLog->errorMsg = 'Missing email';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->subject)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 88;\n\t\t\t$errorLog->errorMsg = 'Missing subject';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->plainText)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 89;\n\t\t\t$errorLog->errorMsg = 'Missing plain text of email';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->htmlBody)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber =90;\n\t\t\t$errorLog->errorMsg = 'Missing HTML of body';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\t// Validate Email\n\t\t$this->validateEmail($this->email);\n\t\t\n\t\tif(!$this->error){\n\t\t\t// Required Files\n\t\t\tinclude 'Mail.php';\n\t\t\tinclude 'Mail/mime.php';\n\n\t\t\t/* ---\n\t\t\tPEAR Mail Factory\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail.factory.php\n\t\t\t--- */\n\t\t\t$host = \"smtp-relay.gmail.com\";\n\t\t\t$port = 587;\n\t\t\t$smtp = Mail::factory('smtp', array('host'=>$host, 'port'=>$port));\n\n\t\t\t/* ---\n\t\t\tPEAR MIME\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail-mime.mail-mime.php\n\t\t\t--- */\n\t\t\t$crlf = \"\\n\";\n\t\t\t$mime = new Mail_mime(array('eol' => $crlf));\n\n\t\t\t// Headers\n\t\t\t$from = 'Catalog.beer <michael@catalog.beer>';\n\t\t\t$replyto = 'michael@catalog.beer';\n\t\t\t$headers = array('From'=>$from, 'To'=>$this->email, 'Subject'=>$this->subject, 'Reply-To'=>$replyto);\n\n\t\t\t// Plain Text\n\t\t\t$mime->setTXTBody($this->plainText);\n\n\t\t\t// HTML\n\t\t\t$mime->setHTMLBody($this->htmlBody);\n\n\t\t\t$body = $mime->get();\n\t\t\t$headers = $mime->headers($headers);\n\n\t\t\t$smtp = Mail::factory('smtp',\n\t\t\t\tarray ('host' => 'smtp-relay.gmail.com',\n\t\t\t\t\t\t\t 'port' => 587,\n\t\t\t\t\t\t\t 'auth' => true,\n\t\t\t\t\t\t\t 'username' => '',\n\t\t\t\t\t\t\t 'password' => '',\n\t\t\t\t\t\t\t 'debug' => false));\n\n\t\t\t/* ---\n\t\t\tPEAR Send Mail\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail.send.php\n\t\t\t--- */\n\t\t\t$mail = $smtp->send($this->email, $headers, $body);\n\n\t\t\t// Process Errors\n\t\t\tif(PEAR::isError($mail)){\n\t\t\t\t// Error Sending Email\n\t\t\t\t$this->error = true;\n\t\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\n\t\t\t\t// Log Error\n\t\t\t\t$errorLog = new LogError();\n\t\t\t\t$errorLog->errorNumber = 91;\n\t\t\t\t$errorLog->errorMsg = 'Error sending email';\n\t\t\t\t$errorLog->badData = $mail->getMessage();\n\t\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t\t$errorLog->write();\n\t\t\t}\n\t\t}\n\t}", "public function executeError500()\n {\n return sfView::SUCCESS;\n }", "function internalServerError($message = null){\n\t\t$this->setStatusCode(500);\n\t\t$this->clearOutputBuffer();\n\t\tif(!isset($message)){\n\t\t\t$message = \"Internal server error.\";\n\t\t}\n\t\t$this->_writeStatusMessage($message);\n\t}", "public function testSendWithWrongEmailAddress()\n {\n $Email = new \\EmailTemplate('test');\n \n // send the email\n $r1 = $Email->send('', 'test');\n $r2 = $Email->send('abc', 'test');\n \n // assert false was returned which means error\n $this->assertFalse($r1);\n $this->assertFalse($r2);\n }", "public static function respond404()\n {\n header($_SERVER['SERVER_PROTOCOL'].\" 404 Not Found\", true, 404); //.replace = true\n $view = new NWTemplate();\n $view->display('404.tpl');\n }", "public function action_503()\n\t\t{\n\t\t}", "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n\t// Build the error message:\n\t$message = \"An error occurred in script '$e_file' on line $e_line: $e_message\\n\";\n\t\n\t// Add the date and time:\n\t$message .= \"Date/Time: \" . date('n-j-Y H:i:s') . \"\\n\";\n\t\n\tif (!LIVE) { // Development (print the error).\n\n\t\t// Show the error message:\n\t\techo '<div class=\"error\">' . nl2br($message);\n\t\n\t\t// Add the variables and a backtrace:\n\t\techo '<pre>' . print_r ($e_vars, 1) . \"\\n\";\n\t\tdebug_print_backtrace();\n\t\techo '</pre></div>';\n\t\t\n\t} else { // Don't show the error:\n\n\t\t// Send an email to the admin:\n\t\t$body = $message . \"\\n\" . print_r ($e_vars, 1);\n\t\tmail(EMAIL, 'Site Error!', $body, 'From: email@example.com');\n\t\n\t\t// Only print an error message if the error isn't a notice:\n\t\tif ($e_number != E_NOTICE) {\n\t\t\techo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div><br />';\n\t\t}\n\t} // End of !LIVE IF.\n\n}", "public function sendTheEmailNow()\r\n {\r\n echo \"Email sent.\";\r\n }", "public static function error_response() {\r\n header(\"HTTP/1.1 404 Recurso no encontrado\");\r\n exit();\r\n }", "function respondWithError($message, $httpCode = 500) {\n header('Content-Type: application/json');\n http_response_code($httpCode);\n $json = json_encode([\n 'ok' => false,\n 'error' => $message,\n ], JSON_PRETTY_PRINT);\n echo $json;\n exit();\n}", "function response404() {\n if ( headers_sent() )\n return;\n header( 'HTTP/1.1 404 Not Found', true, 404 );\n header( 'Content-Type: text/plain', true );\n echo 'Meal not found';\n exit();\n}", "public static function _error(Exception $e) {\n self::response(false)\n ->status(500)\n ->write(\n '<h1>500 Internal Server Error</h1>'.\n '<h3>'.$e->getMessage().'</h3>'.\n '<pre>'.$e->getTraceAsString().'</pre>'\n )\n ->send();\n }", "function print_exception(Exception $e) {\n $debug = ini_get('display_errors');\n\n ob_end_clean();\n\n if ($e instanceof HttpException) {\n if (!headers_sent()) header('HTTP/1.0 '.$e->getStatusCode().' '.$e->getTitle());\n echo '<h1>'.$e->getTitle().'</h1>';\n } else {\n if (!headers_sent()) header('HTTP/1.0 500 Internal Server Error');\n echo '<h1>Internal Server Error</h1>';\n }\n if ($debug) {\n echo '<h2>'.get_class($e).': '.$e->getMessage().'</h2>';\n echo '<pre>'.$e->getTraceAsString().'</pre>';\n }\n}", "public static function send403($msg=null, $detail=null) {\n if ( headers_sent() ) {\n echo(\"Headers sent - they would be:\\n\");\n echo(\"HTTP/1.1 403 Forbidden\".\"\\n\");\n if ( is_string($msg) ) echo(\"X-Error-Message: \".$msg.\"\\n\");\n if ( is_string($detail) ) echo(\"X-Error-Detail: \".$detail.\"\\n\");\n } else {\n header(\"HTTP/1.1 403 Forbidden\");\n if ( is_string($msg) ) header(\"X-Error-Message: \".$msg);\n if ( is_string($detail) ) header(\"X-Error-Detail: \".$detail);\n }\n }", "public function report(Exception $e)\n {\n// Mail::send('errors.tracker', ['e' => $e], function ($message) {\n// $message->from('servers@dreamhouseinternational.com', 'Dream House International');\n// $message->to('neko.hitokori@gmail.com', 'soporte')->subject('Error Tracker');\n// });\n return parent::report($e);\n }", "private function Bill_Date_Warning()\n\t{\n\t\t$recipients = (EXECUTION_MODE !== 'LOCAL') ? ECash::getConfig()->ECASH_NOTIFICATION_ERROR_RECIPIENTS : '';\n\t\t$body = \"WE ARE RUNNING OUT OF CERTEGY BILL DATES! PLEASE CONTACT CERTEGY AND GET SOME MORE!!!!!!!!!!!!!!!!!!!!!!1!!!!!!!\";\n\t\t$subject = \"Certegy batch warning: Running out of Certegy Bill Dates!\";\n\t\t\t\t// send the email\n\t\t$result = eCash_Mail::sendExceptionMessage($recipients,$body,$subject);\n\t\t\n\t}", "function globalExceptionHandler ($ex) {\n try {\n ob_end_clean();\n $msg = '<b>' . get_class($ex) . ' (' . $ex->getCode() . ')</b> thrown in <b>' . $ex->getFile() . '</b> on line <b>'\n . $ex->getLine() . '</b><br>' . $ex->getMessage()\n . str_replace('#', '<br>#', $ex->getTraceAsString()) . '<br>';\n\n //don't log errors caused by routing to a non-existant page (since bots do that constantly)\n if($ex->getCode() != 404 && $ex->getCode() != 403 && $ex->getMessage() != \"Call to a member function getRewriteRoute() on null\") {\n $ds = DataService::getInstance();\n $ds->logException($msg);\n }\n\n if (DEBUG) {\n echo $msg;\n } else {\n if(Session::getUser() != null)\n header(\"Location: /error\");\n else\n header(\"Location: /login/error\");\n }\n }\n catch (Exception $e) {\n if(Session::getUser() != null)\n header(\"Location: /error\");\n else\n header(\"Location: /login/error\");\n }\n}" ]
[ "0.72864425", "0.71010566", "0.6995637", "0.6953725", "0.6895583", "0.6764839", "0.65184075", "0.64316213", "0.64159656", "0.6383572", "0.63785", "0.6334098", "0.6230074", "0.62020946", "0.6163585", "0.61592144", "0.61590904", "0.6125583", "0.6125116", "0.6122727", "0.6116837", "0.6106271", "0.6010782", "0.59764373", "0.59642506", "0.5905744", "0.585054", "0.58448017", "0.5804205", "0.58026433", "0.579176", "0.57834625", "0.5748563", "0.5746111", "0.5733038", "0.5712395", "0.5705817", "0.5704258", "0.5701438", "0.56840783", "0.5663656", "0.5628774", "0.5628066", "0.5623527", "0.5611219", "0.56029606", "0.55998755", "0.55877197", "0.55865556", "0.5566926", "0.55426574", "0.55385226", "0.5512185", "0.550061", "0.54678994", "0.54559296", "0.54557663", "0.54549176", "0.54404634", "0.54338527", "0.5432297", "0.5426136", "0.54221904", "0.54167086", "0.5413983", "0.54097205", "0.53965765", "0.53948665", "0.5391748", "0.53912556", "0.5388865", "0.5385129", "0.5379062", "0.53782225", "0.5370019", "0.5368482", "0.5367333", "0.53668916", "0.53571725", "0.5355485", "0.5350945", "0.5347548", "0.5323004", "0.53188115", "0.5311287", "0.53067416", "0.5303623", "0.53027916", "0.52758753", "0.5271014", "0.5269303", "0.5268469", "0.5266796", "0.52651674", "0.52622217", "0.5260501", "0.5252421", "0.52521485", "0.52417654", "0.524129" ]
0.7305898
0
check response error from facebook graph api
проверить ошибку ответа от facebook graph api
private function facebookResponseCheck($result) { if(!empty($result->error)) { $type = isset($result->error->type) ? $result->error->type : ''; $code = isset($result->error->code) ? $result->error->code : ''; $message = isset($result->error->message) ? $result->error->message : ''; $msg = sprintf('type: %s, $code: %s, message: %s', $type, $code, $message); throw new Exception($msg); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_error() \n\t\t{\n\t\t\t\t$json = json_decode( $this->response );\n\t\t\t\tif( $json->faultstring )\n\t\t\t\t{\n\t\t\t\t\t\t$this->error = $json->faultstring;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\treturn false;\n\n\t\t}", "public function has_http_error($response) {\n if(!$response || !isset($response['response']['code']) || !preg_match('/20*/', $response['response']['code']) || !isset($response['body'])) {\n return true;\n }\n return false;\n }", "private function is_api_error( $response ) {\n\t\tif ( false === $response ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( ! is_object( $response ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( isset( $response->error ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "protected function checkResponse($r){\n if (!is_array($r) || !array_key_exists('code', $r)){\n $this->log(\"No Response found\",'Warning');\n return false;\n }\n if ($r['code'] == 200){\n return true;\n } else {\n $xml = simplexml_load_string($r['body'])->Error;\n $this->log(\"Bad Response! \".$r['code'].\" \".$r['error'].\": \".$xml->Code.\" - \".$xml->Message,'Urgent');\n return false;\n }\n }", "private function error($response) {\n\t\tif(property_exists($response, \"error\") AND $response->code != 200) {\n\t\t\tthrow new MystoreAPI_exception(\"Error \".$response->code.\"<br />\".$response->error->message);\n\t\t}\n\t}", "private function checkTokenWithFacebook($accessToken){\r\n\r\n $url = Laracurl::buildUrl('https://graph.facebook.com/app', ['access_token'=>$accessToken]);\r\n $response = Laracurl::get($url);\r\n if(!empty($response) && !empty($response->body)){\r\n $fbResult = json_decode($response->body, true);\r\n if(!empty($fbResult['id']) && $fbResult['id'] == env('FB_APP_KEY')){//this user come from our facebook app\r\n $url = Laracurl::buildUrl('https://graph.facebook.com/me', ['fields'=> 'id,name,gender,email,age_range', 'access_token'=>$accessToken]);\r\n $response = Laracurl::get($url);\r\n if(!empty($response) && !empty($response->body)) {\r\n $fbResult = json_decode($response->body, true);\r\n if (!empty($fbResult['id'])) {\r\n return $fbResult;\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n }", "public static function create(FacebookResponse $response)\n {\n $data = $response->getDecodedBody();\n\n if (!isset($data['error']['code']) && isset($data['code'])) {\n $data = ['error' => $data];\n }\n\n $code = isset($data['error']['code']) ? $data['error']['code'] : null;\n $message = isset($data['error']['message']) ? $data['error']['message'] : 'Unknown error from Graph.';\n\n if (isset($data['error']['error_subcode'])) {\n switch ($data['error']['error_subcode']) {\n // Other authentication issues\n case 458:\n case 459:\n case 460:\n case 463:\n case 464:\n case 467:\n return new static($response, new FacebookAuthenticationException($message, $code));\n // Video upload resumable error\n case 1363030:\n case 1363019:\n case 1363037:\n case 1363033:\n case 1363021:\n case 1363041:\n return new static($response, new FacebookResumableUploadException($message, $code));\n }\n }\n\n switch ($code) {\n // Login status or token expired, revoked, or invalid\n case 100:\n case 102:\n case 190:\n return new static($response, new FacebookAuthenticationException($message, $code));\n\n // Server issue, possible downtime\n case 1:\n case 2:\n return new static($response, new FacebookServerException($message, $code));\n\n // API Throttling\n case 4:\n case 17:\n case 32:\n case 341:\n case 613:\n return new static($response, new FacebookThrottleException($message, $code));\n\n // Duplicate Post\n case 506:\n return new static($response, new FacebookClientException($message, $code));\n }\n\n // Missing Permissions\n if ($code == 10 || ($code >= 200 && $code <= 299)) {\n return new static($response, new FacebookAuthorizationException($message, $code));\n }\n\n // OAuth authentication error\n if (isset($data['error']['type']) && $data['error']['type'] === 'OAuthException') {\n return new static($response, new FacebookAuthenticationException($message, $code));\n }\n\n // All others\n return new static($response, new FacebookOtherException($message, $code));\n }", "public function hasError()\n {\n return $this->info['http_code'] != '200';\n }", "public function Access_error ()\n\t\t{\n\t\t\t$errMsg[0]['error'] = \"Invalid URL!\";\n\t\t\treturn json_encode ($errMsg);\n\t\t}", "public static function checkError($resp) {\n\t}", "public static function checkError($resp) {\n\t}", "public function testError()\n {\n $error = $this->response->error(404, 'File Not Found');\n json_decode($error);\n $checkJson = (json_last_error() == JSON_ERROR_NONE);\n\n $this->assertTrue($checkJson);\n }", "function is_error ( $res ) {\n if ( is_numeric( $res ) && $res < 0 ) return $res;\n else if ( is_array( $res ) && isset( $res['code'] ) && $res['code'] < 0 ) return $res['code'];\n else if ( $res === FALSE ) return TRUE;\n else return false;\n}", "public function checkUser_post(){\n\t\textract($_POST);\n\t\t//print_r($_POST);die();\n\t\t$oauth_provider='facebook';\n\t\t// ------if facebook oauth provider not found-------------\n\t\tif ($oauth_provider=='') {\n\t\t\t$this->response([\n\t\t\t\t'status' => 500,\n\t\t\t\t'status_message' => 'OAuth provider field is empty. All parameters are required!'\n\t\t\t], REST_Controller::HTTP_PRECONDITION_FAILED);\n\t\t\tdie();\n\t\t}\n\n // ------if facebook oauth uid not found-------------\n\t\tif ($oauth_uid=='') {\n\t\t\t$this->response([\n\t\t\t\t'status' => 500,\n\t\t\t\t'status_message' => 'OAuth UID field is empty. All parameters are required!'\n\t\t\t], REST_Controller::HTTP_PRECONDITION_FAILED);\n\t\t\tdie();\n\t\t}\n\n // ------if facebook First Name not found-------------\n\t\tif ($first_name=='') {\n\t\t\t$this->response([\n\t\t\t\t'status' => 500,\n\t\t\t\t'status_message' => 'Facebook First Name field is empty. All parameters are required!'\n\t\t\t], REST_Controller::HTTP_PRECONDITION_FAILED);\n\t\t\tdie();\n\t\t}\n\n // ------if facebook Last Name not found-------------\n\t\tif ($last_name=='') {\n\t\t\t$this->response([\n\t\t\t\t'status' => 500,\n\t\t\t\t'status_message' => 'Facebook Last Name field is empty. All parameters are required!'\n\t\t\t], REST_Controller::HTTP_PRECONDITION_FAILED);\n\t\t\tdie();\n\t\t}\n\n // ------if facebook email not found-------------\n\t\tif ($email=='') {\n\t\t\t$this->response([\n\t\t\t\t'status' => 500,\n\t\t\t\t'status_message' => 'Facebook email field is empty. All parameters are required!'\n\t\t\t], REST_Controller::HTTP_PRECONDITION_FAILED);\n\t\t\tdie();\n\t\t}\n\n // // ------if facebook picture not found-------------\n\t\t// if ($picture=='') {\n\t\t// \t$this->response([\n\t\t// \t\t'status' => 500,\n\t\t// \t\t'status_message' => 'Facebook picture field is empty. All parameters are required!'\n\t\t// \t], REST_Controller::HTTP_PRECONDITION_FAILED);\n\t\t// \tdie();\n\t\t// }\n\t\t$userData = $_POST;\n\t\t$result = $this->User->checkUser($userData);\n\n\t\tif($result['status']==200){\n\t\t\t$this->response($result, REST_Controller::HTTP_OK);\n\t\t}\n\t\telse{\n\t\t\t$this->response($result, REST_Controller::HTTP_PRECONDITION_FAILED);\n\t\t}\n\t}", "function is_json_error( $json ) {\n\treturn isset_not_empty( $json, 'code' ) && isset_not_empty( $json, 'message' ) && get_array_var( $json, 'code' ) !== 'success';\n}", "private function checkResponseStatus($response, $format)\n {\n $status = $this->curlLib->getStatus();\n if ( $status >= 400 ){\n switch($format){\n case 'json':\n default:\n $data = json_decode($response);\n if ( $status >= 500 ){\n if ( $data === null ){\n throw new PipeStackServerException('A server error has occurred. Please try again soon.');\n }\n throw new PipeStackServerException($this->jsonException($data));\n }\n switch($status){\n case 400:\n case 405:\n if ( $data === null ){\n throw new PipeStackRequestException('Invalid request. Please double check parameters and request method.');\n }\n throw new PipeStackRequestException($this->jsonException($data));\n case 401:\n case 403:\n if ( $data === null ){\n throw new PipeStackPermissionException('Invalid permissions and/or authorization. Please check your access token verify endpoint permission requirements.');\n }\n throw new PipeStackPermissionException($this->jsonException($data));\n\n case 404:\n if ( $data === null ){\n throw new PipeStackRequestException('You have requested an endpoint which does not exist. Please double check the endpoint parameter and try again.');\n }\n throw new PipeStackRequestException($this->jsonException($data));\n break;\n default:\n if ( $data === null ){\n throw new PipeStackException('An unknown PipeStack API error has occurred. Please contact PipeStack customer service.');\n }\n throw new PipeStackException($this->jsonException($data));\n break;\n }\n break;\n }\n }\n }", "public function isAPICallLimitErr() {\n // create implementation of this function inside gogoLib for trademe\n // it's easier to hook it there for api call limit checks\n // also if call limit occurs. create log at /var/tragento/apicalllimit.log\n // with dates. than when running new cron process check if date in call is less than 1 hour.\n // actually check if it is in current hour. if current hour than don't execute tragento cron\n // it's nice but requires coding time. don't overcomplicate error handling\n\n // $response->is_ok()\n // $response->error_message()\n // You have exceeded your API call quota for the current hour\n // it's a state for the life of trademe model. when api limit reached it can't be changed to ok later.\n // hovewer in next 5 minutes there will be another call from cron with clear state\n return $this->trademe->isAPICallLimitErr();\n }", "protected static function isErrorApiResponse($response): bool\n {\n return property_exists($response, 'status_code') &&\n property_exists($response, 'status') &&\n $response->status === 'failed';\n }", "public function check_social() {\n\n $facebook_client_id = envfile('FB_CLIENT_ID');\n $facebook_client_secret = envfile('FB_CLIENT_SECRET');\n $facebook_call_back = envfile('FB_CALL_BACK');\n\n $google_client_id = envfile('GOOGLE_CLIENT_ID');\n $google_client_secret = envfile('GOOGLE_CLIENT_SECRET');\n $google_call_back = envfile('GOOGLE_CALL_BACK');\n\n $fb_status = false;\n\n if (!empty($facebook_client_id) && !empty($facebook_client_secret) && !empty($facebook_call_back)) {\n\n $fb_status = true;\n\n }\n\n $google_status = false;\n\n if (!empty($google_client_id) && !empty($google_client_secret) && !empty($google_call_back)) {\n\n $google_status = true;\n\n }\n\n return response()->json(['fb_status'=>$fb_status, 'google_status'=>$google_status]);\n \n }", "public function test_token_invalid() {\n\t\t$this->uri->rsegments[3] = 'b';\n\t\tset_valid_authorization();\n\t\t$out = run_action($this->c, 'token');\n\n\t\t$json = json_decode($out, true);\n\n\t\t$this->assertTrue($json['error']);\n\t\t$this->assertFalse(array_key_exists('opportunity', $json));\n\t\t$this->assertFalse(array_key_exists('opportunities', $json));\n\t}", "public function validateResponseApi($response)\n {\n //Get response\n $data = json_decode($response->content());\n\n //If there is errors, throw error\n if (isset($data->errors))\n throw new Exception($data->errors, $response->getStatusCode());\n else {//if response is successful, return response\n return $data->data;\n }\n }", "public function validateResponse($response): bool\n {\n if (null === $response) {\n return false;\n }\n\n if (200 === ($statusCode = $response->getStatusCode())) {\n return true;\n }\n\n $responseContents = $response->getBody()->getContents();\n if (400 === $statusCode) {\n \\Yii::error(ErrorsHelper::getStatusCodeErrorMessage($statusCode, $responseContents, $this), ErrorsHelper::GUZZLE_HTTP_CLIENT_ERROR);\n \\Yii::error('Something in the request data was wrong: check if all data{...}values are converted to strings.', ErrorsHelper::GUZZLE_HTTP_CLIENT_ERROR);\n $this->setErrorStatusDescription(ErrorsHelper::STATUS_CODE_400, $responseContents);\n\n return false;\n }\n\n if (401 === $statusCode) {\n \\Yii::error(ErrorsHelper::getStatusCodeErrorMessage($statusCode, self::UNAUTHORIZED_REQUEST_EXCEPTION_MESSAGE, $this), ErrorsHelper::GUZZLE_HTTP_CLIENT_ERROR);\n \\Yii::error('To use the new FCM HTTP Legacy API, you need to enable FCM API on your Google API dashboard first - https://console.developers.google.com/apis/library/fcm.googleapis.com/.', ErrorsHelper::GUZZLE_HTTP_CLIENT_ERROR);\n $this->setErrorStatusDescription(ErrorsHelper::STATUS_CODE_403, $responseContents);\n return false;\n }\n\n \\Yii::error(ErrorsHelper::getStatusCodeErrorMessage($statusCode, $responseContents, $this), ErrorsHelper::GUZZLE_HTTP_CLIENT_OTHER_ERRORS);\n $this->setErrorStatusDescription(ErrorsHelper::OTHER_STATUS_CODES, $responseContents);\n $this->setRetryAfter($response);\n\n return false;\n }", "function facebook_user_check_post() \n\t{ \n\t\t$fb_id=$this->post('fb_id');\n\t\t$fullname=$this->post('fullname');\n\t\t$email=$this->post('email');\n\t\t$data=$this->users_model->get_by_fb_id($fb_id);\n\t\tif($data==null){\n\t\t\t$this->response(array('ok'=>'0'));\n\t\t}else{\n\t\t\t$this->response($this->users_model->get_by_fb_id($fb_id));\n\t\t}\n\t}", "private function validateAccessToken() {\n $this->userID = $this->facebook->getUser();\n }", "private function tokenNotFoundError() {\n return response()->json([\n 'error' => 'Either your email or token is wrong.'\n ], Response::HTTP_UNPROCESSABLE_ENTITY);\n }", "function media_theplatform_mpx_check_json_response($response, $service) {\n // No response\n if(!strlen($response))\n return array('status' => 'error', 'response' => t('No response from @service', array('@service' => $service)));\n // Decode JSON\n $responseObject = json_decode($response);\n // Make sure the response decodes, if not, return it's text\n if(!is_object($responseObject))\n return array('status' => 'error', 'response' => t('Error response from @service: @response', array('@service' => $service, '@response' => $response)));\n // Check for an exception on the response, return it's description if set\n if(property_exists($responseObject, 'isException'))\n return array('status' => 'error', 'response' => t('Exception from @service: @response', array('@service' => $service, '@response' => $responseObject->description)));\n // Looking good, return the response object\n else\n return array('status' => 'success', 'response' => $responseObject);\n}", "public function error(BaseResponse $response);", "public function isError(): bool\n {\n return $this->get('json', 'error') === true;\n }", "protected function handleJsonRpcErrors($response) {\n if (isset($response->error)) {\n $error = $response->error;\n switch($error->code) {\n case -32601:\n throw new JsonRpcException($error->message, $error->code);\n case -32602:\n throw new JsonRpcException(\n $error->message, $error->code);\n default:\n throw new JsonRpcException(\n $error->message.\"\\nStacktrace : \" . $error->data->stacktrace,\n $error->code);\n }\n }\n }", "protected function handleFacebookException($exception)\n {\n return false;\n }", "public function fbCallback()\n\t{\n try {\n // $code = Input::get('code');\n // if (strlen($code) == 0) return Redirect::to('/noauth')->with('message', 'Se ha producido un error al comunicarse con Facebook.');\n\n FacebookSession::setDefaultApplication(Config::get('facebook')['appId'],Config::get('facebook')['secret']);\n //$pageHelper = new FacebookPageTabHelper(Config::get('facebook')['appId'],Config::get('facebook')['secret']);\n //$helper = new FacebookRedirectLoginHelper( Config::get('app')['url'] . '/login/fb/callback' );\n\n $pageHelper = new FacebookJavaScriptLoginHelper(Config::get('facebook')['appId'],Config::get('facebook')['secret']);\n $session = $pageHelper->getSession();\n // $session = $helper->getSessionFromRedirect();\n //\t $uid = $session->getSignedRequestProperty('user_id'); \n $uid = $pageHelper->getUserId();\n //$facebook = new Facebook(Config::get('facebook'));\n //$uid = $facebook->getUser();\n\n if ($uid == 0) return Redirect::to('/noauth')->with('message', 'Hubo un error');\n\n $request = new FacebookRequest( $session, 'GET', '/me' , null, 'v1.0');\n $response = $request->execute();\n // Responce\n $me = $response->getGraphObject()->asArray();//GraphUser::className()\n //getBirthday;\n //$me = $facebook->api('/me');\n\n $profile = Profile::whereUid($uid)->first();\n if (empty($profile)) {\n $user = new User;\n $user->name = $me['first_name'] . ' '. $me['last_name'];\n $user->email = $me['email'];\n $user->photo = '';\n $user->gender = $me['gender'];\n $user->inscrito = false;\n $user->save();\n\n $profile = new Profile();\n $profile->uid = $uid;\n $profile->username = $me['email'];\n $profile = $user->profiles()->save($profile);\n }\n\n $profile->access_token = $session->getAccessToken();\n $profile->autorizado = true;\n $profile->save();\n $user = $profile->user;\n\n if ($user->inscrito) {\n return Redirect::to('/categorias')->with('message', 'Logged in with Facebook');\n } else {\n // return View::make('inscripcion');\n return Redirect::route('inscripcion', array('id' => $user->id));\n }\n\n // Auth::login($user);\n\n //return Redirect::to('/')->with('message', 'Logged in with Facebook');\n } catch (FacebookAuthorizationException $e) {\n return Redirect::to('/sesionexpirada')->with('message', 'Su sesión ha expirado. Por favor haga click en reiniciar.');\n } catch (\\Exception $e) {\n return Redirect::to('/error')->with('message', 'Ha ocurrido un error.');\n }\n\t}", "public function testErrorMessage()\n {\n $holiday = new MalaysiaHoliday;\n $response = $holiday->fromState(['Selangor', 'Malaccaa'])->get();\n\n $this->assertTrue($response['status']);\n $this->assertTrue($response['data'][0]['regional'] == 'Selangor');\n\n\n $this->assertFalse($response['data'][1]['regional'] == 'Malacca');\n $this->assertTrue($response['data'][1]['collection'] == []);\n\n $this->assertCount(1, $response['error_messages']);\n $this->assertTrue($response['error_messages'][0] == 'Malaccaa is not include in the regional state');\n }", "protected static function checkJsonError() {\n if (json_last_error()) {\n throw new Exception('Invalid JSON data: ' . json_last_error_msg());\n }\n }", "public function errorCode() {}", "protected function searchForError()\n\t{\n\t\t$code = $this->findNode('/response/code');\n\t\t$msg = $this->findNode('/response/message');\n\n\t\tif ($code !== NULL || $msg !== NULL)\n\t\t{\n\t\t\t$this->error = $msg;\n\t\t\t$this->error_code = $code;\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "final public static function unableToParseApgResponse()\n {\n return self::get(2061);\n }", "public function errorCode();", "public function errorCode();", "private function checkResponseFormat(){\n\n }", "function http_get_response_code_error($code)\n\t{\n\t\t$errors = array(\n\t\t200 => 'Success - The request was successful',\n\t\t201 => 'Created (Success) - The request was successful. The requested object/resource was created.',\n\t\t400 => 'Invalid Request - There are many possible causes for this error, but most commonly there is a problem with the structure or content of XML your application provided. Carefully review your XML. One simple test approach is to perform a GET on a URI and use the GET response as an input to a PUT for the same resource. With minor modifications, the input can be used for a POST as well.',\n\t\t401 => 'Unauthorized - This is an authentication problem. Primary reason is that the API call has either not provided a valid API Key, Account Owner Name and Associated Password or the API call attempted to access a resource (URI) which does not match the same as the Account Owner provided in the login credientials.',\n\t\t404 => 'URL Not Found - The URI which was provided was incorrect. Compare the URI you provided with the documented URIs. Start here.',\n\t\t409 => 'Conflict - There is a problem with the action you are trying to perform. Commonly, you are trying to \"Create\" (POST) a resource which already exists such as a Contact List or Email Address that already exists. In general, if a resource already exists, an application can \"Update\" the resource with a \"PUT\" request for that resource.',\n\t\t415 => 'Unsupported Media Type - The Media Type (Content Type) of the data you are sending does not match the expected Content Type for the specific action you are performing on the specific Resource you are acting on. Often this is due to an error in the content-type you define for your HTTP invocation (GET, PUT, POST). You will also get this error message if you are invoking a method (PUT, POST, DELETE) which is not supported for the Resource (URI) you are referencing.\n\t\tTo understand which methods are supported for each resource, and which content-type is expected, see the documentation for that Resource.',\n\t\t500 => 'Server Error',\n\t\t);\n\n\t\tif(array_key_exists($code, $errors)):\n\t\t\treturn $errors[$code];\n\t\tendif;\n\n\t\treturn '';\n\t}", "public function actionError() {\n if ($error = Yii::app()->errorHandler->error) {\n\t\t\t$this->sendRestResponse(500,array(\n\t\t\t\t'status' => false,\n\t\t\t\t'message' => $error['message'],\n\t\t\t\t'data' => $error,\n\t\t\t));\t\t\t\n }\n\t}", "protected function verifyResponse(Klarna_Checkout_HTTP_Response $result)\n {\n // Error Status Code recieved. Throw an exception.\n if ($result->getStatus() >= 400 && $result->getStatus() <= 599) {\n throw new Klarna_Checkout_ConnectorException(\n $result->getData(), $result->getStatus()\n );\n }\n }", "function APIerror() {\n\t\t$session = JFactory::getSession();\n\n\t\t$order_id = $session->get('wbtypayments.order_id', 0);\n\n\t\t// Initialize database\n\t\t$db = JFactory::getDBO();\n\n\t\tsession_start();\n\t\t$resArray=$_SESSION['reshash'];\n\n\t\t// Get any URL errors\n\t\tif(isset($_SESSION['curl_error_no'])) {\n\t\t\t$errorCode= $_SESSION['curl_error_no'] ;\n\t\t\t$errorMessage=$_SESSION['curl_error_msg'] ;\n\t\t\tsession_unset();\n\t\t} else {\n\t\t\t// Create a new row in the errors table with this order ID\n\t\t\t$query = \"INSERT INTO #__wbty_payments_errors (`number`,`message`,`order_id`) VALUES ('\".$resArray['L_ERRORCODE0'].\"','\".$resArray['L_LONGMESSAGE0'].\"','$order_id')\";\n\t\t\t$db->setQuery($query);\n\t\t\t$db->query();\n\t\t\t$error_id = $db->insertid();\n\n\t\t\tforeach($resArray as $key => $value) {\n\t\t\t\tswitch ($key) {\n\t\t\t\t\tcase 'L_ERRORCODE0':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'L_LONGMESSAGE0':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$query = \"INSERT INTO #__wbty_payments_error_extra_items (`error_id`,`name`,`value`) VALUES ('\".$error_id.\"','\".$key.\"','\".$value.\"')\";\n\t\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t\t$db->query();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "private function _check_valid_response($http_body_json = '')\n {\n if(!in_array($this->status_code, $this->valid_response_codes))\n {\n //@todo log bad response info\n $body_string = '';\n $body_array = array();\n $body_array = json_decode($http_body_json, true);\n if(!empty($body_array))\n {\n foreach($body_array as $k => $v)\n {\n $body_string .= \"$k: $v \";\n }\n }\n\n $x_message_data = 'X-Chirpify-Message: ' . $body_string;\n header($x_message_data);\n $header_data = 'HTTP/1.1 ' . $this->status_code;\n header($header_data);\n\n exit();\n }\n }", "public function testFacebookPagesRequest()\n {\n $stream = $this->getStream('FacebookPages', '27469195051');\n $response = $stream->getResponse();\n\n $this->checkResponseIntegrity('FacebookPages', $response);\n\n $errors = $stream->getErrors();\n $this->assertTrue(empty($errors));\n }", "public function parseErrors(Response $response);", "function isAppsApproved($response) \n {\n $fbErrorMessage = 'must be reviewed and approved by Facebook';\n if ($response['error'] == 500 && isset($response['message']->message, $fbErrorMessage) && strpos($response['message']->message, $fbErrorMessage) !== false) {\n return false;\n }\n\n return true;\n }", "public function isServerError();", "public function testInvalidToken()\n {\n $this->sessionInfo['logged_in'] = true;\n $this->sessionInfo['token'] = 'foo';\n\n $this->session($this->sessionInfo);\n\n $response = $this->call('GET', '/api/user');\n\n $this->assertEquals(200, $response->getStatusCode());\n\n $decoded = json_decode($response->getContent());\n\n $this->assertEquals('error', $decoded->status);\n }", "public function handleFailure($response) {\n }", "protected function get_json_last_error()\n {\n }", "public function theResponseIsGraphQLErrorWith(string $message)\n {\n $this->assertResponseStatus(Response::HTTP_OK);\n\n //success GraphQL response should not contains errors\n if ($this->client->getGraphQL()) {\n if ($this->isValidGraphQLResponse() && $errors = $this->getGraphQLResponseError()) {\n $errorsStack = '';\n foreach ($errors as $error) {\n $errorsStack .= $error->message.\"\\n\";\n }\n\n Assert::assertContains($message, $errorsStack);\n } else {\n $this->graphQLContext->debugLastQuery();\n throw new AssertionFailedError('The response is not the expected error response.');\n }\n }\n }", "public function get_error();", "public function get_error();", "public function getErrorResponses();", "public function validate_response($abkashresponse) {\n\t\tif(is_null($abkashresponse))\n\t\t{\n\t\t\treturn \"Config Error . Please Contact with Support\";;\n\t\t}\n\t\tswitch ($abkashresponse->trxStatus) {\n\t\tcase '0010':\n\t\tcase '0011':\n\t\t\tthrow new Exception('Transaction is pending, please try again later.');\n\t\t\tbreak;\n\t\tcase '0100':\n\t\t\tthrow new Exception('Transaction ID is valid but transaction has been reversed.');\n\t\t\tbreak;\n\t\tcase '0111':\n\t\t\tthrow new Exception('Transaction is failed.');\n\t\t\tbreak;\n\t\tcase '1001':\n\t\t\tthrow new Exception('Invalid MSISDN input. Try with correct mobile no.');\n\t\t\tbreak;\n\t\tcase '1002':\n\t\t\tthrow new Exception('Invalid transaction ID.');\n\t\t\tbreak;\n\t\tcase '1003':\n\t\t\tthrow new Exception('Authorization Error, please contact site admin.');\n\t\t\tbreak;\n\t\tcase '1004':\n\t\t\tthrow new Exception('Transaction ID not found.');\n\t\t\tbreak;\n\t\tcase '9999':\n\t\t\tthrow new Exception('System error, could not process request. Please contact site admin.');\n\t\t\tbreak;\n\t\tcase '0000':\n\t\t\treturn $response;\n\t\t}\n\t}", "function handle_validate_purchase_code_response($response) {\r\n\r\n global $internal_err;\r\n\r\n if($response[\"status\"] !== 200) {\r\n\r\n // If error exist\r\n if($response[\"status\"] === 404) {\r\n set_field_error(\"purchase_code\", \"Invalid Purchase Code!\");\r\n }else {\r\n set_field_error(\"purchase_code\", json_decode(json_encode($response[\"result\"]), true)[\"error\"]);\r\n show_err($internal_err);\r\n }\r\n\r\n redirect_to_home();\r\n }\r\n return $response[\"result\"]->item;\r\n}", "function errorCode()\n {\n }", "public function invalid(BaseResponse $response);", "public function test_receive_throwsBadResponseStatus_ifBadStatus()\n\t{\n\t\t$this->setExpectedException('Jstewmc\\\\Api\\\\Exception\\\\BadResponseStatus');\n\t\t\n\t\t$this->url->getQuery()->setParameter('code', 301);\n\t\t\n\t\t(new Client())\n\t\t\t->send(new Request\\Get((string) $this->url))\n\t\t\t->receive(new Response\\Json());\n\t\t\n\t\treturn;\n\t}", "public function testQueryWithError(): void\n {\n $result = $this->httpGraphql($this->queries['examplesWithError'], [\n 'expectErrors' => true,\n ]);\n\n self::assertArrayHasKey('errors', $result);\n self::assertCount(1, $result['errors']);\n self::assertArrayHasKey('message', $result['errors'][0]);\n self::assertArrayHasKey('locations', $result['errors'][0]);\n }", "public function isError()\n {\n return isset($this->decodedBody['error']) || isset($this->decodedBody['errors']);\n }", "function getResponseErrors( $response ) {\n\t\tif ( is_array( $response ) && array_key_exists( 'RESULT', $response ) ) {\n\t\t\t$resultCode = $response['RESULT'];\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\t$errors = array( );\n\n\t\tswitch ( $resultCode ) {\n\t\t\tcase '0':\n\t\t\t\t$errors['1'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-0' );\n\t\t\t\t$this->finalizeInternalStatus( 'complete' );\n\t\t\t\tbreak;\n\t\t\tcase '126':\n\t\t\t\t$errors['5'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-126-2' );\n\t\t\t\t$this->finalizeInternalStatus( 'pending' );\n\t\t\t\tbreak;\n\t\t\tcase '12':\n\t\t\t\t$errors['2'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-12' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tcase '13':\n\t\t\t\t$errors['2'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-13' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tcase '114':\n\t\t\t\t$errors['2'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-114' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tcase '4':\n\t\t\t\t$errors['3'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-4' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tcase '23':\n\t\t\t\t$errors['3'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-23' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tcase '24':\n\t\t\t\t$errors['3'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-24' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tcase '112':\n\t\t\t\t$errors['3'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-112' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tcase '125':\n\t\t\t\t$errors['3'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-125-2' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors['4'] = WmfFramework::formatMessage( 'payflowpro_gateway-response-default' );\n\t\t\t\t$this->finalizeInternalStatus( 'failed' );\n\t\t}\n\n\t\treturn $errors;\n\t}", "function media_theplatform_mpx_check_empty_response($response, $service) {\n // No response (this is what we want in this case)\n if(!strlen($response))\n return array('status' => 'success');\n\n // If there is a response, look for an exception\n $responseObject = json_decode($response);\n // Make sure the response decodes, if not, return it's text\n if(!is_object($responseObject))\n return array('status' => 'error', 'response' => t('Error response from @service: @response', array('@service' => $service, '@response' => $response)));\n // Check for an exception on the response, return it's description if set\n if(property_exists($responseObject, 'isException'))\n return array('status' => 'error', 'response' => t('Exception from @service: @response', array('@service' => $service, '@response' => $responseObject->description)));\n}", "public function testDeniedProtectedMethodWithInvalidAccessToken()\n {\n $this->post('/user-info', [], [\n 'authorization' => 'asdeasdasdasdasdasd',\n ])\n ->seeJsonStructure(['error', 'message', 'hint'])\n ->seeStatusCode(401);\n }", "public function validateLowProfileCodeResponse($response) {\n\n\t\tif (\n\t\t\t$response['ResponseCode'] == 0 &&\n\t\t\t$response['DealResponse'] == 0 &&\n\t\t\t$response['OperationResponse'] == 0\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function testShortenThrowsExceptionIfApiResponseHasInvalidStatusCode()\n {\n $provider = new BitlyProvider($this->getMockClientFactory($this->getMockResponseWithInvalidStatusCode()), $this->getMockAuthentication());\n $provider->shorten($this->getBaseMockLink());\n }", "public function facebook_count_callback($response) {\n if($this->has_http_error($response)) {\n return false;\n }\n $body = json_decode($response['body'], true);\n return isset($body['share']['share_count']) ? intval($body['share']['share_count']) : false;\n }", "public function theResponseIsGraphQLErrorWithCode(string $code)\n {\n $this->assertResponseStatus(Response::HTTP_OK);\n\n //success GraphQL response should not contains errors\n if ($this->client->getGraphQL()) {\n if ($this->isValidGraphQLResponse() && $errors = $this->getGraphQLResponseError()) {\n $errorsStack = '';\n foreach ($errors as $error) {\n $errorsStack .= $error->code.\"\\n\";\n }\n\n Assert::assertContains($code, $errorsStack);\n } else {\n $this->graphQLContext->debugLastQuery();\n throw new AssertionFailedError('The response is not the expected error response.');\n }\n }\n }", "private function assertError($response)\n {\n $response->assertStatus(500)\n ->assertJson([\n 'status' => 'error'\n ]);\n }", "private function getSocialUserInfo($access_token, $social_app)\n {\n $user = NULL;\n $user_exist = NULL;\n $reference_where = [];\n $email_where = [];\n $user_data_array = [];\n if ($social_app === 'facebook') {\n $client = new HTTPClient('https://graph.facebook.com/me?fields=id,name,email,gender,age_range,picture&access_token=' . $access_token);\n $response = $client->setOptions(['ssl-verify-peer' => null])->send();\n $response = $response->getBody();\n $response = json_decode($response, true);\n if (!empty($response) and is_array($response) and empty($response['error'])) {\n if (!empty($response['id'])) {\n $reference_where['facebook_reference'] = Str::substr($response['id'], 0, 50);\n $user_data_array['facebook_reference'] = Str::substr($response['id'], 0, 50);\n $user = User::where('facebook_reference', '=', $reference_where['facebook_reference'])\n ->first();\n }\n if (!empty($response['email'])) {\n $email_where['email'] = Str::substr($response['email'], 0, 254);\n $user_data_array['email'] = Str::substr($response['email'], 0, 254);\n $user_exist = User::where('email', '=', $user_data_array['email'])\n ->first();\n }\n if (!empty($response['name']))\n $user_data_array['full_name'] = Str::substr($response['name'], 0, 254);\n if (!empty($response['gender']))\n $user_data_array['gender'] = Str::substr($response['gender'], 0, 6);\n if (!empty($response['age_range'])) {\n $age = null;\n if (!empty($response['age_range']['min']) and !empty($response['age_range']['max'])) {\n $age = ceil(((int)$response['age_range']['min'] + (int)$response['age_range']['max']) / 2);\n } else if (!empty($response['age_range']['min'])) {\n $age = (int)$response['age_range']['min'];\n } else if (!empty($response['age_range']['max'])) {\n $age = (int)$response['age_range']['max'];\n }\n $user_data_array['age'] = $age;\n unset($age);\n }\n }\n } else {\n $client = new HTTPClient('https://www.googleapis.com/oauth2/v3/tokeninfo?fields=sub,gender,ageRange,email,name,picture,given_name,family_name,locale&id_token=' . $access_token);\n $response = $client->setOptions(['ssl-verify-peer' => null])->send();\n $response = $response->getBody();\n $response = json_decode($response, true);\n\n if (!empty($response) and is_array($response) and empty($response['error_description'])) {\n if (!empty($response['sub'])) {\n $reference_where['gplus_reference'] = Str::substr($response['sub'], 0, 50);\n $user_data_array['gplus_reference'] = Str::substr($response['sub'], 0, 50);\n $user = User::where('gplus_reference', '=', $reference_where['gplus_reference'])\n ->first();\n }\n if (!empty($response['email'])) {\n $email_where['email'] = Str::substr($response['email'], 0, 254);\n $user_data_array['email'] = Str::substr($response['email'], 0, 254);\n $user_exist = User::where('email', '=', $user_data_array['email'])\n ->first();\n }\n if (!empty($response['name']))\n $user_data_array['full_name'] = Str::substr($response['name'], 0, 254);\n if (!empty($response['gender']))\n $user_data_array['gender'] = Str::substr($response['gender'], 0, 6);\n if (!empty($response['picture']))\n $user_data_array['picture_path'] = Str::substr($response['picture'], 0, 254);\n if (!empty($response['ageRange'])) {\n $age = null;\n if (!empty($response['ageRange']['min']) and !empty($response['ageRange']['max'])) {\n $age = ceil(((int)$response['ageRange']['min'] + (int)$response['ageRange']['max']) / 2);\n } else if (!empty($response['ageRange']['min'])) {\n $age = (int)$response['ageRange']['min'];\n } else if (!empty($response['ageRange']['max'])) {\n $age = (int)$response['ageRange']['max'];\n }\n $user_data_array['age'] = $age;\n unset($age);\n }\n }\n }\n\n if(!empty($user))\n return [\n 'user' => $user,\n 'user_data_array' => $user_data_array,\n 'user_with_email_already_exist' => false\n ];\n\n if(!empty($user_exist))\n return [\n 'user' => $user_exist,\n 'user_data_array' => $user_data_array,\n 'user_with_email_already_exist' => true\n ];\n\n return [\n 'user' => NULL,\n 'user_data_array' => $user_data_array,\n 'user_with_email_already_exist' => false\n ];\n }", "private function assertError($response, $code = 500) {\n $response->assertStatus($code)\n ->assertJson([\n 'status' => 'error',\n 'http_status_code' => $code\n ]);\n }", "function check_auth_response_code($status) {\n\n if ($status != 'S000') {\n $message = get_ticket_error_message($status);\n return result_error($status,$message);\n }\n return result_success();\n}", "protected function fetchResponseError($response) {\n\t\tif (isset($response['error'])) {\n\t\t\treturn array(\n\t\t\t\t'code' => $response['error']['code'],\n\t\t\t\t'message' => $response['error']['message'],\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "public function validateToken() \n {\n return API::response()->array(['status' => 'success'])->statusCode(200);\n }", "function getErrorResponse($error){\n\t\t//Create skeleton for all responses as json.\n\t\t$response = array(\n\t\t\t'conv' => array(\n\t\t\t\t'error' => $error['code'],\n\t\t\t\t'msg' => $error['msg']\n\t\t\t)\n\t\t);\n\t\t\n\t\t//If format is set, validate it otherwise default to xml or if not set, set to xml\n\t\tif (isset($_GET['format'])){\n\t\t\t$format = checkFormatValueValid($_GET['format']) ? $_GET['format'] : \"xml\";\n\t\t} else {\n\t\t\t$format = \"xml\";\n\t\t}\n\t\treturn sendResponse($response, $format);\n\t}", "private function verifyResponse()\n {\n $errorMessages = [];\n \n if (!isset($this->endpoint)) {\n $errorMessages[] = \"$endpoint must be set.\";\n }\n \n if (!isset($this->statusCode)) {\n $errorMessages[] = \"$statusCode must be set.\";\n }\n \n if (!is_array($this->data)) {\n $errorMessages[] = \"$data must be formatted as an array.\";\n }\n \n if (!is_array($this->errors)) {\n $errorMessages[] = \"$errors must be formatted as an array.\";\n }\n\n if (!empty($errorMessages)) {\n return $errorMessages;\n }\n \n return true;\n }", "public function SignInFacebook(){\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n $email = $_POST['email'];\n $pic1 = $_POST['pic1'];\n $first_name = $_POST['first_name']; \n $last_name = $_POST['last_name'];\n $user_name = $_POST['user_name'];\n $gender = $_POST['gender'];\n $birth_date = $_POST['birth_date'];\n $login_type = $_POST['login_type'];\n $latitude = $_POST['latitude'];\n $longitude = $_POST['longitude'];\n $source_id = $_POST['source_id'];\n $format = $_POST['format'];\n \n $dobarr = explode(\"/\",$birth_date);\n $month = $dobarr[0];\n $day = $dobarr[1];\n $year = $dobarr[2];\n $dob=$year.'-'.$month.'-'.$day;\n \n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n $result = $res->check_user($email,$conn);\n if($result == 0){\n $response = $res->sign_up_facebook($email,$pic1,$first_name,$last_name,$user_name,$gender,$dob,$login_type,$latitude,$longitude,$source_id,$conn);\n }\n elseif($result > 0){\n $response = $res->sign_in_facebook($email,$pic1,$first_name,$last_name,$user_name,$gender,$dob,$latitude,$longitude,$source_id,$conn);\n $this->dbClose();\n // $error = array('status' => \"0\",\"msg\" => \"Email Already Exists \");\n // ($_REQUEST['format'] == 'xml') ? $this->response($this->xml($error), 400) : $this->response($this->json($error), 400);\n }\n }", "public function authenticate($access_token_val='')\r\n { \r\n /**********make the access token Extended by extend_access_token() and get extended token********/\r\n $extended_access_token_val = $this->extend_access_token($access_token_val);\r\n if($extended_access_token_val==''){\r\n $access_token_val = $extended_access_token_val;\r\n } \r\n\r\n \r\n /***running FQL to fetch data from facebook ****/\r\n // $fql = urlencode(\"SELECT post_id,viewer_id,source_id,updated_time,created_time,actor_id,message,attachment,permalink ,type FROM stream WHERE source_id = me() AND actor_id = me() order by created_time desc LIMIT 5\");\r\n $fql = urlencode(\"SELECT uid,about_me, birthday, current_location, first_name, has_added_app, hometown_location, last_name, locale, birthday_date, pic, pic_with_logo, pic_big, pic_big_with_logo, pic_small, pic_small_with_logo, pic_square, pic_square_with_logo, profile_url, proxied_email, email, contact_email, sex, meeting_sex, status, timezone, website, education_history, work_history, work, education, hs_info, religion, relationship_status, political, activities, interests, family, music, tv, movies, books, username, quotes, sports, favorite_teams, favorite_athletes, inspirational_people, languages FROM user WHERE uid = me()\");\r\n $content = $this->process_fql($fql,$access_token_val);\r\n \r\n //pr($content['data'][0],1);\r\n \r\n $user_meta = $this->session->userdata('current_user_session'); // get current user data loggedin\r\n\t\t\r\n\t\t/*pr($content['data'][0]);\r\n\t\tpr($content,1);\r\n\t\texit;*/\r\n \r\n if(isset($content->error))\r\n echo 'A user of access token '.$access_token_val. ' got following error while fetching user details'.$temp_ret_graph;\r\n else\r\n { \r\n\t\t\t\tif(empty($user_meta)) { \r\n\t\t\t\t\t\r\n\t\t\t\t if($this->login_by_facebook($content['data'][0],$access_token_val)){\r\n\t\t\t\t\t\tredirect(base_url().'user/profile'); \r\n\t\t\t\t\t\t\r\n\t\t\t\t } else {\r\n\t\t\t\t\t\tif($this->register_by_facebook($content['data'][0],$access_token_val)){\r\n\t\t\t\t\t\t\tif($this->login_by_facebook($content['data'][0],$access_token_val)){\r\n\t\t\t\t\t\t\t\t\tredirect(base_url().'user/profile');\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\techo 'login failed!';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//echo 'registration failed!';\r\n\t\t\t\t\t set_error_msg(message_line('fb_reg_fail')); // either user email is not verified in fb \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// or kept private, so goto signup page\r\n\t\t\t\t\t redirect(base_url('user/signup'));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} \r\n\t\t\t\telse {\r\n\t\t\t\t\tif($user_meta[0]['s_email'] == $content['data'][0]['email'] ){\r\n\t\t\t\t\t\t$content['data'][0]['access_token'] = $access_token_val;\r\n\t\t\t\t\t\t$this->user_model->update_data(array(\"s_facebook_credential\"=>serialize($content['data'][0])),\r\n\t\t\t\t\t\t\t\tarray(\"i_id\"=> $user_meta[0]['i_id'])\r\n\t\t\t\t\t ); \r\n\t\t\t\t\t\tset_success_msg('facebook account add success');\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tset_error_msg('facebook account email not match');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tredirect(base_url().\"user/profile\");\r\n\t\t\t\t}\r\n } \r\n\r\n\t\t}", "public function _facebook_verify($code) {\n if (!isset($_REQUEST['code']) || empty($_REQUEST['code'])) {\n return false;\n }\n\n $verify = fb::access($_REQUEST['code'], G_URL.'user/facebook?redirect='.urlencode($_REQUEST['redirect']));\n\n if (!isset($verify['access_token'])) {\n return false;\n }\n\n $fb = new fb($verify['access_token']);\n $me = $fb->api('/me');\n $me['access_token'] = $verify['access_token'];\n\n return $me;\n\n }", "public function getErrorResponse()\n {\n $result['responseCode'] = self::RESPONSE_LOGIN_ERROR;\n return $result;\n }", "function fetchErrorCode($error)\n{\n if (method_exists($error, 'getStatusCode')) {\n return $error->getStatusCode();\n }\n\n if (method_exists($error, 'getCode')) {\n return $error->getCode();\n }\n\n return 0;\n}", "public function test_get_errors_if_category_not_exist()\n {\n $data = [\n 'category_id' => 10,\n 'name' => 'Test_item',\n 'value' => 50,\n 'quality' => -10,\n ];\n\n $response = $this->json('POST', '/api/items/', $data);\n\n $response->assertStatus(404);\n\n $response->assertSee('errors');\n }", "function validateResponse($page) {\n\treturn array_key_exists('headers', $page) && array_key_exists('headersRaw', $page) && array_key_exists('body', $page) && array_key_exists('error', $page)\n\t\t&& is_array($page['headers']) && is_array($page['headersRaw']) && is_string($page['body']);\n}", "public function check_authorization_response(){\n if(!isset($_SESSION))\n session_start();\n\n // no LINE_CRSF is set in session\n if(!isset($_SESSION['LINE_CRSF']))\n throw new Exception('Fail to check CRSF token');\n\n // CRSF token not match\n $state = isset($_GET['state']) ? $_GET['state'] : null;\n // equalty check can be rewrite with hash_equals()\n if($_SESSION['LINE_CRSF'] !== $state)\n throw new Exception('CRSF token not match');\n\n unset($_SESSION['LINE_CRSF']);\n\n // user denies the premissions requested\n // NOTICE:\n // LINE server redirect user who does not have\n // developer role with following error (in GET data)\n // error=access_denied\n // error_description=The+authorization+server+denied+the+request.+This+channel+is+now+developing+status.+User+need+to+have+developer+role\n // To solve this, go to your LINE Login channel then\n // click the Developing label on the top right to proceed\n // publish your channel\n if(isset($_GET['error'])){\n throw new Exception(json_encode(array(\n 'error' => $_GET['error'],\n 'error_description' => $_GET['error_description'],\n )));\n }\n\n $this->authorization_code = $_GET['code'];\n return $this->authorization_code;\n }", "protected function invalidResponse(){\n return response()->json([\n 'ResultCode' => 1,\n 'ResultDesc' => 'Failed to complete the transaction',\n 'ThirdPartyTransID' => 0\n ]);\n\n }", "public function error()\n {\n return curl_error($this->curl);\n }", "public function error()\n {\n return curl_error($this->curl);\n }", "public function hasError();", "public function hasError();", "public function hasError();", "public function hasError();", "protected function error()\n {\n $this->response = $this->response->withStatus(500);\n $this->jsonBody([\n 'input' => $this->payload->getInput(),\n 'error' => $this->payload->getOutput(),\n ]);\n }", "public function testErrorMessageBadFormat()\n {\n $errorResponse = json_decode('{\n \"error\": {\n \"code\": \"UNPROCESSABLE_ENTITY\",\n \"message\": {\n \"errors\": [\n \"Bad format\",\n \"Bad format 2\"\n ],\n \"bad_data\": [\n {\n \"first_message\": \"Bad format 3\",\n \"second_message\": \"Bad format 4\",\n \"thrid_message\": \"Bad format 5\"\n }\n ]\n },\n \"errors\": []\n }\n }', true);\n\n\n try {\n Requestor::handleApiError(null, 404, $errorResponse);\n } catch (EasyPostException $error) {\n $this->assertEquals(\n 'Bad format, Bad format 2, Bad format 3, Bad format 4, Bad format 5',\n $error->getMessage()\n );\n }\n }", "public function fbcallback() {\n\t\t$this->autoRender = false;\n\n\n\t\t$fb = new Facebook\\Facebook([\n\t\t\t'app_id' => '1038913562917167',\n\t\t\t'app_secret' => 'c0df3e628a09c24f972985ad47dee466',\n\t\t\t'default_graph_version' => 'v2.10',\n\t\t]);\n\n\t\t$helper = $fb->getRedirectLoginHelper();\n\t\t$accessToken = $helper->getAccessToken();\n\n\t\tdebug($accessToken);\n\n\t\tif (isset($_GET['state'])) {\n\t\t\tdebug($_GET['state']);\n\t\t}\n\n\t\ttry {\n\t\t\t$accessToken = $helper->getAccessToken();\n\t\t} catch(Facebook\\Exceptions\\FacebookResponseException $e) {\n\t\t\t// When Graph returns an error\n\t\t\techo 'Graph returned an error: ' . $e->getMessage();\n\t\t\texit;\n\t\t} catch(Facebook\\Exceptions\\FacebookSDKException $e) {\n\t\t\t// When validation fails or other local issues\n\t\t\techo 'Facebook SDK returned an error: ' . $e->getMessage();\n\t\t\texit;\n\t\t}\n\n\t\tif (! isset($accessToken)) {\n\t\t\tif ($helper->getError()) {\n\t\t\t\theader('HTTP/1.0 401 Unauthorized');\n\t\t\t\techo \"Error: \" . $helper->getError() . \"\\n\";\n\t\t\t\techo \"Error Code: \" . $helper->getErrorCode() . \"\\n\";\n\t\t\t\techo \"Error Reason: \" . $helper->getErrorReason() . \"\\n\";\n\t\t\t\techo \"Error Description: \" . $helper->getErrorDescription() . \"\\n\";\n\t\t\t\tvar_dump($helper->getError());\n\t\t\t} else {\n\t\t\t\theader('HTTP/1.0 400 Bad Request');\n\t\t\t\techo 'Bad request';\n\t\t\t}\n\t\t\texit;\n\t\t}\n\n\t\t// Logged in\n\t\techo '<h3>Access Token</h3>';\n\t\tvar_dump($accessToken->getValue());\n\n\t\t// The OAuth 2.0 client handler helps us manage access tokens\n\t\t$oAuth2Client = $fb->getOAuth2Client();\n\n\t\t// Get the access token metadata from /debug_token\n\t\t$tokenMetadata = $oAuth2Client->debugToken($accessToken);\n\t\techo '<h3>Metadata</h3>';\n\t\tvar_dump($tokenMetadata);\n\n\t\t// Validation (these will throw FacebookSDKException's when they fail)\n\t\t$tokenMetadata->validateAppId('1038913562917167'); // Replace {app-id} with your app id\n\t\t\n\t\t// If you know the user ID this access token belongs to, you can validate it here\n\t\t//$tokenMetadata->validateUserId('123');\n\t\t$tokenMetadata->validateExpiration();\n\n\t\tif (! $accessToken->isLongLived()) {\n\t\t\t// Exchanges a short-lived access token for a long-lived one\n\t\t\ttry {\n\t\t\t\t$accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);\n\t\t\t} catch (Facebook\\Exceptions\\FacebookSDKException $e) {\n\t\t\t\techo \"<p>Error getting long-lived access token: \" . $helper->getMessage() . \"</p>\\n\\n\";\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\tvar_dump($accessToken->getValue());\n\t\t}\n\n\t\t$_SESSION['fb_access_token'] = (string) $accessToken;\n\t\tdebug($_SESSION['fb_access_token'] );\n\t\t$this->log($_SESSION['fb_access_token'] );\n\n\t\t// User is logged in with a long-lived access token.\n\t\t// You can redirect them to a members-only page.\n\t\t//header('Location: https://example.com/members.php');\n\t}", "public function parse_response($resp)\n {\n if ($resp['data']==null)\n {\n return ['error'=>404, 'message'=>'Data from youtube not found'];\n }\n else\n {\n return ['error'=>0, 'data'=>$resp['data']];\n }\n }", "private function assertErrorValidation($response)\n {\n $response->assertStatus(422)\n ->assertJson([\n 'status' => 'error'\n ]);\n }", "protected function unknown()\n {\n $this->response = $this->response->withStatus(500);\n $this->jsonBody([\n 'error' => 'Unknown domain payload status',\n 'status' => $this->payload->getStatus(),\n ]);\n }", "public function testShowUserFail()\n {\n $this->withoutMiddleware();\n $response = $this->get('/api/users/2');\n $response->assertJsonStructure([\n \"meta\" => [\n \"message\",\n \"code\"\n ],\n ]);\n $response->assertJson([\n \"meta\" => [\n \"code\" => Response::HTTP_NOT_FOUND\n ]\n ]);\n }", "protected function checkResponse($response)\n {\n if ($response == 'Not found') {\n $result = $response;\n } else {\n\n try {\n if ($response === false)\n throw new EServiceUnavailable('Empty search');\n\n $result = $this->decodeResponse($response);\n\n if (!is_object($result)) {\n throw new EResponseFail('The rpc response is empty, or have invalid format');\n }\n\n //if ('failure' == $result->type) {\n // throw new EDepositApiCall($result->errormsg, $result->errorcode);\n //}\n }\n catch (EResponseFail $e){\n $result = $e->errorMessage();\n //return false;\n }\n catch (EServiceUnavailable $e){\n $result = $e->errorMessage();\n //return false;\n }\n }\n \n return $result;\n }" ]
[ "0.6256429", "0.6234275", "0.62125367", "0.6202816", "0.619115", "0.6112488", "0.59841853", "0.59429115", "0.59417385", "0.5915669", "0.5915669", "0.5914272", "0.5861633", "0.5848695", "0.5822073", "0.57939005", "0.5764143", "0.574654", "0.5718953", "0.5672794", "0.56537724", "0.5609037", "0.5580286", "0.55712223", "0.5567401", "0.55638593", "0.55472225", "0.5546991", "0.55399513", "0.5535256", "0.54895204", "0.5449957", "0.542615", "0.5423341", "0.5421245", "0.542044", "0.54163617", "0.54163617", "0.5415077", "0.54104", "0.5408542", "0.5406591", "0.54052275", "0.54006577", "0.53853893", "0.53841996", "0.5373201", "0.5358109", "0.535653", "0.53421587", "0.5339827", "0.5338473", "0.53350884", "0.53350884", "0.5332535", "0.53294075", "0.5319534", "0.5316016", "0.5314138", "0.5314104", "0.53111744", "0.5302046", "0.5297219", "0.5295476", "0.5291735", "0.5282779", "0.5280079", "0.5278571", "0.52703524", "0.5259374", "0.525597", "0.52455634", "0.5237078", "0.5233786", "0.5233431", "0.52330726", "0.5227832", "0.5222959", "0.5222631", "0.5220261", "0.5216296", "0.52080023", "0.52015346", "0.5201178", "0.51984197", "0.5196793", "0.51953566", "0.51953566", "0.51908326", "0.51908326", "0.51908326", "0.51908326", "0.51881963", "0.51786584", "0.51777935", "0.51762146", "0.51745063", "0.5167166", "0.51671296", "0.51670396" ]
0.73957115
0
return get_theme_option(OP_ENTRY_CARD_EXCERPT_MORE, __( '...', THEME_NAME ));
return get_theme_option(OP_ENTRY_CARD_EXCERPT_MORE, __( '...', THEME_NAME ));
function get_entry_card_excerpt_more(){ return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function themify_custom_excerpt_more($more) {\n global $post;\n return '';\n}", "function xkit_the_theme_option( $field_name, $default = '' ){\n\tprint xkit_get_theme_option( $field_name, $default );\n}", "function codium_extend_excerpt_more($more) {\n global $post;\n $readmore = __('Czytaj wiecej', 'codium_extend' );\n return '';\n}", "function codium_extend_excerpt_more($more) {\n global $post;\n $readmore = __('Czytaj wiecej', 'codium_extend' );\n return '';\n}", "function custom_excerpt_more( $more ) {\r\n\t return '...';\r\n}", "function deco_display_theme_credit(){\n\t\t$theme_credit=get_theme_option('Theme Credit');\n\t\t$credit_text=' | <a href=\"http://jeffersonsnewspaper.org/2010/deco-an-omeka-theme/\" title=\"Deco theme\">Deco theme</a> by <a href=\"http://twitter.com/ebellempire/\" title=\"@ebellempire\">E. Bell</a>';\n\t\tif ($theme_credit == 'yes')return $credit_text;\n}", "function new_excerpt_more( $more ) {\n\treturn '&hellip;';\n/*\n\tif(is_front_page()){\n\treturn '&nbsp;<span class=\"genericon genericon-next\"></span>';\t\t\n\t} else {\n\treturn '&hellip;';\n\t}\n*/\n}", "function zeen_get_theme_option( $option = '', $default = '' ) {\n\n\treturn get_theme_mod( $option, $default );\n\n}", "function inkpro_add_shop_display_options( $options ) {\r\n\r\n\tif ( class_exists( 'WooCommerce' ) ) {\r\n\t\t$options['loren'] = esc_html__( 'Loren', 'inkpro' );\r\n\t\t$options['agathe'] = esc_html__( 'Agathe', 'inkpro' );\r\n\t}\r\n\r\n\treturn $options;\r\n}", "function ppo_excerpt_more($more) {\n $link = sprintf('<a href=\"%1$s\" class=\"more-link\">%2$s</a>', esc_url(get_permalink(get_the_ID())),\n /* translators: %s: Name of current post */ \n sprintf(__('Xem thêm <span class=\"meta-nav\">&rarr;</span>', SHORT_NAME))\n );\n return ' &hellip; ' . $link;\n}", "function deco_get_about($about = null)\n{ \n if (!$about) {\n \n $about = get_theme_option('About') ? \n get_theme_option('About') : \n 'Add some text about your site in theme options. You can use HTML!';\n }\n \n return $about; \n \n}", "function wpdocs_excerpt_more( $more ) {\n return ' ...';\n}", "function et_excerpt_more($more) {\n global $post;\n return '<div class=\"view-full-post\"><a href=\"'. get_permalink($post->ID) . '\" class=\"view-full-post-btn\">Skaityti</a></div>';\n}", "function HERITAGE_general_options_callback() {\n ?>\n <p>\n <?php echo esc_html__('Setup custom logo.', 'heritage'); ?>\n </p>\n <?php\n /*print theme settings*/\n if (LC_SWP_PRINT_SETTINGS) {\n $general = get_option('heritage_theme_general_options');\n\n ?>\n <pre>heritage_theme_general_options:\n\t\t\t<?php echo (json_encode($general)); ?>\n\t\t</pre>\n <?php\n }\n}", "function new_excerpt_more($more) {\n global $post;\n // return '<a class=\"read_more\" href=\"'. get_permalink($post->ID) . '\">'.__('Read More','textdomain').'</a>';\n return '';\n}", "function custom_desktop_excerpt_more($more) {\n}", "function premise_homehero_services(){\n\t if( get_theme_mod( 'premise_homehero_services') != \"\" ) {\n\t\techo get_theme_mod( 'premise_homehero_services');\n\t }\n}", "function et_excerpt_more($more) {\n global $post;\n return '<div><a href=\"'. get_permalink($post->ID) . '\" > ... Click to View Full Post</a></div>;';\n}", "function mila_custom_excerpt_more($more) {\n global $post;\n return '&nbsp;<div class=\"more-link\"><a href=\"'. get_permalink($post->ID) . '\">'. __('<i title=\"Läs mer\" class=\"fa fa-arrow-circle-right\"></i>', 'mila') .'</a></div>';\n }", "function ajb_get_options_page_cap() {\n return 'edit_theme_options';\n}", "function premise_who_are_you(){\n\t if( get_theme_mod( 'premise_who_are_you') != \"\" ) {\n\t\techo get_theme_mod( 'premise_who_are_you');\n\t }\n}", "function excerpt_read_more_link($output) {\r\n global $post;\r\n return $output . '<a class=\"more-link\" href=\"'. get_permalink($post->ID) . '\">'.__(\"Keep Reading\",TEXTDOMAIN ).'<span class=\"icon-arrow-right5\"></span></a>';\r\n}", "function custom_excerpt_more( $more ) {\n\tif ( is_home() ) {\n\t\treturn false;\n\t}\n\treturn \"&hellip;\";\n}", "function cultiv8_option( $option, $default = false ) {\n\tif( class_exists( 'CTC_Extender' ) && ctcex_has_option( $option ) )\n\t\treturn ctcex_get_option( $option, $default );\n\t\n\treturn get_theme_mod( $option, $default );\n}", "function new_excerpt_more( $more ) {\n return '';\n}", "function custom_excerpt_more($more) {\n\t\treturn 'Read More &raquo;';\n\t}", "function new_excerpt_more($more) {\n global $post;\n\treturn ' <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">[ more ]</a>';\n}", "function wfs_excerpt_more( $more ) {\n return '...';\n}", "function medigroup_mikado_read_more_button($option = '', $class = '') {\n if($option != '') {\n $show_read_more_button = medigroup_mikado_options()->getOptionValue($option) == 'yes';\n } else {\n $show_read_more_button = 'yes';\n }\n if($show_read_more_button && !medigroup_mikado_post_has_read_more() && !post_password_required()) {\n echo medigroup_mikado_get_button_html(array(\n 'size' => 'small',\n 'link' => get_the_permalink(),\n 'text' => esc_html__('Read More', 'medigroup'),\n 'custom_class' => $class\n ));\n }\n }", "function techfak_get_theme_options() {\n\treturn get_option( 'techfak_theme_options', techfak_get_default_theme_options() );\n}", "function swbtheme_excerpt_more($more) {\n global $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read the full article...</a>';\n}", "function the_option( $key ) {\n\n if ( ! $this->get_the_option( $key ) )\n return false;\n\n echo $this->get_the_option( $key );\n }", "function tsc_theme_options() {\n\tadd_theme_page( 'Theme Options', 'Theme Options', 'edit_theme_options', 'theme_options', 'tsc_theme_options_page' );\n}", "function medigroup_mikado_excerpt_more($more) {\n return '...';\n }", "function medigroup_mikado_excerpt($excerpt_length = '') {\n global $post;\n\n if(post_password_required()) {\n echo get_the_password_form();\n } //does current post has read more tag set?\n elseif(medigroup_mikado_post_has_read_more()) {\n global $more;\n\n //override global $more variable so this can be used in blog templates\n $more = 0;\n the_content(true);\n } //is word count set to something different that 0?\n elseif($excerpt_length != '0') {\n //if word count is set and different than empty take that value, else that general option from theme options\n $word_count = '45';\n if(isset($excerpt_length) && $excerpt_length != \"\") {\n $word_count = $excerpt_length;\n\n } elseif(medigroup_mikado_options()->getOptionValue('number_of_chars') != '') {\n $word_count = esc_attr(medigroup_mikado_options()->getOptionValue('number_of_chars'));\n }\n //if post excerpt field is filled take that as post excerpt, else that content of the post\n $post_excerpt = $post->post_excerpt != \"\" ? $post->post_excerpt : strip_tags($post->post_content);\n\n //remove leading dots if those exists\n $clean_excerpt = strlen($post_excerpt) && strpos($post_excerpt, '...') ? strstr($post_excerpt, '...', true) : $post_excerpt;\n\n //if clean excerpt has text left\n if($clean_excerpt !== '') {\n //explode current excerpt to words\n $excerpt_word_array = explode(' ', $clean_excerpt);\n\n //cut down that array based on the number of the words option\n $excerpt_word_array = array_slice($excerpt_word_array, 0, $word_count);\n\n //add exerpt postfix\n $excert_postfix = apply_filters('medigroup_mikado_excerpt_postfix', '...');\n\n //and finally implode words together\n $excerpt = implode(' ', $excerpt_word_array).$excert_postfix;\n\n //is excerpt different than empty string?\n if($excerpt !== '') {\n echo '<p class=\"mkd-post-excerpt\">'.wp_kses_post($excerpt).'</p>';\n }\n }\n }\n }", "function echotheme_custom_excerpt_more($output) {\n\tif (has_excerpt() && ! is_attachment()) {\n\t\t$output .= echotheme_continue_reading_link();\n\t}\n\treturn $output;\n}", "function pqurc_display_extra()\n {\n $extra_fi = get_option('pqurcode_extra');\n printf(\"<input type='text' id='%s' name='%s' value='%s' />\", 'pqurcode_extra', 'pqurcode_extra', $extra_fi);\n }", "function pu_theme_menu()\n{\n add_theme_page( 'Theme Option', 'Edycja danych motywu', 'manage_options', 'pu_theme_options.php', 'pu_theme_page'); \n}", "function new_excerpt_more($more) {\r\n global $post;\r\n return '<button class=\"btn btn-primary hvr-grow clearfix\"><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read the full article...</a></button>';\r\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<div class=\"readmore\"><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read More <i class=\"fa fa-long-arrow-right\" aria-hidden=\"true\"></i></a></div>';\n}", "function new_excerpt_more($more) {\n\n\tglobal $post;\n\n\treturn '...&nbsp; <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"><br/>read&nbsp;more</a>';\n\n}", "function cah_news_get_dept_option() {\r\n return get_option('cah_news_display_dept2');\r\n}", "function gigx_excerpt_more($more) {\n\treturn '';\n}", "function HERITAGE_get_theme_option($option_group, $option_name)\n{\n $options = get_option($option_group);\n\n if (isset($options[$option_name])) {\n return $options[$option_name];\n }\n\n return '';\n}", "function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '&hellip; </br> <a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">Read more</a>';\n}", "function voyage_mikado_read_more_button($option = '', $class = '') {\n if($option != '') {\n $show_read_more_button = voyage_mikado_options()->getOptionValue($option) == 'yes';\n } else {\n $show_read_more_button = 'yes';\n }\n if($show_read_more_button && !voyage_mikado_post_has_read_more() && !post_password_required()) {\n echo voyage_mikado_get_button_html(array(\n 'size' => 'small',\n 'link' => get_the_permalink(),\n 'text' => esc_html__('Read More', 'voyage'),\n 'custom_class' => $class\n ));\n }\n }", "function print_excerpt($length) {\r\n\t\tglobal $post;\r\n $length = ($length =='')? '50' : $length;\r\n\t\t/*condition for supreme related theme*/\r\n\t\tif(function_exists('supreme_prefix')){\r\n\t\t\t$pref = supreme_prefix();\r\n\t\t}else{\r\n\t\t\t$pref = sanitize_key( apply_filters( 'hybrid_prefix', get_template() ) );\r\n\t\t}\r\n\t\t$tmpdata = get_option($pref.'_theme_settings');\t\r\n\t\t$morelink = @$tmpdata['templatic_excerpt_link'];\r\n\t\t\r\n\t\tif(!empty($morelink))\r\n\t\t\t$morelink =sprintf(__('<a href=\"%s\" class=\"more moretag\">%s</a>','templatic'),get_permalink(),$morelink);\r\n\t\telse\r\n\t\t\t$morelink ='<a class=\"moretag\" href=\"'.get_permalink().'\" class=\"more\">'.__('Read more').'...</a>';\r\n\t\t\r\n\t\t$text = $post->post_excerpt;\r\n\t\tif ($text =='') {\r\n\t\t\t$text = $post->post_content;\r\n\t\t\t$text = apply_filters('the_excerpt', $text);\r\n\t\t\t$text = str_replace(']]>', ']]>', $text);\r\n\t\t}\r\n\t\t$text = strip_shortcodes($text); // optional, recommended\r\n\t\t$text = strip_tags($text); // use ' $text = strip_tags($text,'<p><a>'); ' if you want to keep some tags\r\n\r\n\t\t$text = wp_trim_words($text,$length); /* shows perticular words */\r\n\t\tif(reverse_strrchr($text, '.', 1)){\r\n\t\t\t$excerpt = reverse_strrchr($text, '.', 1).\" \".sprintf(__('%s','templatic'),$morelink);\r\n\t\t}else{\r\n\t\t\t$excerpt = $text.\" \".sprintf(__('%s','templatic'),$morelink);\r\n\t\t}\r\n\t\t\r\n\t\tif( $excerpt ) {\r\n\t\t\techo apply_filters('the_excerpt',$excerpt);\r\n\t\t} else {\r\n\t\t\techo apply_filters('the_excerpt',$text);\r\n\t\t}\r\n\t}", "function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Leia o artigo completo...</a>';\n}", "function tb_longwave_header_options_callback() {\n\techo '<p>Settings for things visible in the Head of the theme.</p>';\n}", "function barjeel_excerpt($more) {\n global $post;\n return '&nbsp; &nbsp;<a href=\"'. get_permalink($post->ID) . '\">...Continue Reading</a>';\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn ' <a href=\"'. get_permalink($post->ID) . '\"><em>(Continue Reading...)</em></a>';\n}", "function spnin_activate(){\n if(version_compare(get_bloginfo('version'),'4.2','<')){\n wp_die(__('you must have a minimum version of 4.2 use this theme'));\n }else{\n echo \"called the spnin_activate function \";\n }\n\n$theme_opts = get_option('spnin_opts');\nif(!$theme_opts){\n $opts = array(\n 'facebook' =>'',\n 'twitter' =>'',\n 'youtube' =>'',\n 'logotype' =>1,\n 'logo_img' =>'',\n 'footer' =>''\n );\n\n add_option('spnin_opts',$opts);\n\n}\n\n}", "function understrap_custom_excerpt_more( $more ) {\n\t\treturn '';\n\t}", "function voyage_mikado_excerpt_more($more) {\n return '...';\n }", "function rw_continue_reading_link( )\n{\n return ' <a href=\"'. get_permalink() . '\" class=\"more-link\">' . __( 'More', 'rotorwash' ) . '</a>';\n}", "function tac_new_excerpt_more( $more ) {\n\treturn '...';\n}", "function vdtestim_global_callback () {\n\t?>\n\t\t<p><?php esc_attr_e( 'Manage Global Options', 'vdtestim' ); ?></p>\n\t<?php\n}", "function twentyten_custom_excerpt_more( $output ) {\n\tif ( has_excerpt() && ! is_attachment() && ! is_admin() ) {\n\t\t$output .= twentyten_continue_reading_link();\n\t}\n\treturn $output;\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<p><a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read More</a></p>';\n}", "function emc_learn_more_link() {\r\n\r\n\t$more = sprintf( '<a href=\"%1$s\" title=\"%2$s\">%3$s</a>',\r\n\t\tget_permalink(),\r\n\t\tesc_attr__( 'View full post', 'emc' ),\r\n\t\tesc_html__( '&nbsp;&nbsp;More&nbsp;&rarr;', 'emc' )\r\n\t);\r\n\treturn $more;\r\n\r\n}", "function new_excerpt_more($more) {\n global $post, $wpak_options;\n\n\treturn '<p class=\"readmore\"><a title=\"' . $wpak_options['linkto'] . $post->post_title.'\" href=\"'. get_permalink($post->ID) . '\">' . $wpak_options['readmore'] . '</a></p>';\n}", "function custom_excerpt_length(){\n return 25;\n}", "function custom_excerpt_length(){\n return 25;\n}", "function wpdocs_excerpt_more( $more ) {\n return sprintf( '<a class=\"read-more\" href=\"%1$s\">%2$s</a>',\n get_permalink( get_the_ID() ),\n __( '...', 'textdomain' )\n );\n}", "function my_shortcode() {\n\n$options = get_option('foodrecipecptplugin_settings');\nreturn \"<p>Recipe Name:\" . $options['foodrecipecptplugin_text_field_0'] . \"</p>\".\"<p>Category: \" . $options['foodrecipecptplugin_text_field_1'].\"</p>\".\"<p>Ingredients: \". $options['foodrecipecptplugin_text_field_2'].\"</p>\".\"<p>Recipe Instructions: \" . $options['foodrecipecptplugin_text_field_3'] . \"</p>\";\n}", "function new_excerpt_more($more)\r\n{\r\n\tglobal $post;\r\n\treturn '<a class=\"moretag\" href=\"' . get_permalink($post->ID) . '\"> Read the full article...</a>';\r\n}", "function new_excerpt_more( $more ) {\n\tglobal $post;\n\treturn '... <div class=\"button small text-center\"><a href=\"'. get_permalink($post->ID) . '\">Continue Reading</a></div>';\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '... (<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\">Read more</a>)';\n}", "function mintshow_excerpt_more( $more ) {\n return sprintf( '<a class=\"ms-read-more\" href=\"%1$s\">%2$s <i class=\"fa fa-long-arrow-right\"></i></a>',\n get_permalink( get_the_ID() ),\n __( 'Read More', 'textdomain' )\n );\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> read more...</a>';\n}", "function new_excerpt_more($more) {\n global $post;\n return ' [...] <a href=\"' . get_permalink($post->ID) . '\">' . __('Continue reading <span class=\"meta-nav\">&rarr;</span>', 'twentytwelve') . '</a>';\n }", "function add_theme_help()\n{\n add_menu_page('Theme Help', 'Theme Help', 'manage_options', 'theme-help', 'theme_help');\n}", "function new_excerpt_more( $more ) {\n return ' ...';\n}", "function new_excerpt_more( $more ) {\n\treturn '[...]<div class=\"read-more\"><a href=\"'. get_permalink( get_the_ID() ) . '\">Lire la suite</a></div>';\n}", "function new_excerpt_more( $more ) {\n return '&hellip; <span class=\"read-more\"><a href=\"'.get_permalink().'\" rel=\"bookmark\">continue reading</a></span>';\n}", "function extra_customizer_link() {\n\tif ( is_customize_preview() ) {\n\t\techo et_core_portability_link( 'et_extra_mods', array( 'class' => 'customize-controls-close' ) );\n\t}\n}", "function new_excerpt_more($more) {\n global $post;\n return '<a class=\"post-link\" href=\"'. get_permalink($post->ID) . '\"> ...Read the full article</a>';\n}", "function pro_copyright() {\n\t\n\t$pro = get_option ( 'up_themes_betty_commerce_wordpress_theme' );\n\t\n\tif( !empty( $pro['copyright_footer'] ) )\n\t{\n\t\treturn $pro['copyright_footer'];\n\t}\n\treturn false;\n}", "function pro_bottom_newsletter()\n{\n\t$pro = get_option('up_themes_betty_commerce_wordpress_theme');\n\t\n\tif( !empty( $pro['bottom_newsletter_optin'] ) )\n\t{\n\t\treturn $pro['bottom_newsletter_optin'];\n\t}\n\treturn false;\n}", "function clrfl_excerpt_more($more) {\n\tglobal $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read the full article...</a>';\n}", "function new_excerpt_more( $more ) {\n return ' <a class=\"read-more\" href=\"' . get_permalink( get_the_ID() ) . '\">' . __( 'Read More...', 'your-text-domain' ) . '</a>';\n}", "function new_excerpt_more($more) {\n global $post;\n return ' <a class=\"read_more\" href=\"' . get_permalink($post->ID) . '\">[...]</a>';\n}", "function new_excerpt_more( $more ) {\n\treturn '...';\n}", "function cpotheme_metadata_themefeature_options()\n{\n $cpotheme_data = array();\n\n $cpotheme_data[] = array(\n 'name' => 'feature_image',\n 'std' => '',\n 'label' => 'Feature Image',\n 'desc' => '',\n 'type' => 'upload'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'feature_premium',\n 'std' => '',\n 'label' => 'Premium Feature',\n 'desc' => '',\n 'type' => 'checkbox'\n );\n\n return $cpotheme_data;\n}", "function lg_mac_activ_options()\n\t{\n\t\t$theme_opts =get_option('lgmac_opts');\n\t\tif(!$theme_opts) //si le theme est désactivé et réactivé plus tard il ne sera pas nécessaire de reactiver le theme\n\t\t\t{\t\t\t//afin de créer l'option\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t$opts =array(\n\t\t\t\t'image_01_url' => '',\n\t\t\t\t'slider_shortcode' =>'',\n\t\t\t\t'HeaderC' =>'',\n\t\t\t\t'FooterColor'=>'',\n\t\t\t\t'FooterCopyright'=>'',\n\t\t\t\t'lgmac_img_FirstBlock'=>'',\n\t\t\t\t'lgmac_img_firstblock133'=>'',\n\n\n\t\t\t\t);\n\t\t\t\tadd_option('lgmac_opts',$opts);\n\t\t\t}\n\t}", "function optionsframework_option_name() {\n return 'options-framework-theme-sample5';\n}", "function new_excerpt_more($more) {\n\treturn '...';\n}", "function thefirst_new_excerpt_more($more) {\n global $post;\n\treturn '...';\n}", "function bureau_theme_options() {\n echo 'Activate and Deactivate';\n}", "function rls_read_more_button($more) {\n global $post;\n return '<div class=\"center-align read-more\"><a class=\" gray view-article button\" href=\"'.get_permalink($post->ID).'\">'\n .__('Read More', 'rls')\n .'</a></div>';\n}", "function dg_excerpt() {\n global $post;\n $excerpt = '<p>' . get_the_excerpt() . ' <a class=\"more\" href=\"'. get_permalink($post->ID) . '\" title=\"'. get_the_title($post->ID) .'\">Read&nbsp;more&nbsp;»</a></p>';\n echo $excerpt;\n}", "function my_top_right_help_metabox_content() { ?>\n <p>Assicurati di cliccare sul pulsante 'Pubblica' sottostante per pubblicare la nuova voce del menù, oppure 'Aggiorna' per salvare le modifiche.</p>\n<?php }", "function twentyten_auto_excerpt_more( $more ) {\n\tif ( ! is_admin() ) {\n\t\treturn ' &hellip;' . twentyten_continue_reading_link();\n\t}\n\treturn $more;\n}", "function wpdocs_excerpt_more( $more ) {\n return ' <a href=\"' . get_the_permalink() . '\" rel=\"nofollow\">[Read More...]</a>';\n}", "function my_excerpt_more( $more ) {\n\treturn ' &hellip; <a href=\"'. get_permalink() .'\">Continue reading &ldquo;'. get_the_title() .'&rdquo; &rarr;</a>';\n}", "function pnq_get_option_name() {\n\t$theme_slug = pnq_get_theme_slug();\n\t$option_name = $theme_slug.'_options';\t\n\t\n\t// apply filter 'pnq_option_name'\n\t$option_name = pnq_option_name( $option_name );\n\t\n\treturn $option_name;\n}", "function voyage_mikado_excerpt($excerpt_length = '') {\n global $post;\n\n if(post_password_required()) {\n echo get_the_password_form();\n } //does current post has read more tag set?\n elseif(voyage_mikado_post_has_read_more()) {\n global $more;\n\n //override global $more variable so this can be used in blog templates\n $more = 0;\n the_content(true);\n } //is word count set to something different that 0?\n elseif($excerpt_length != '0') {\n //if word count is set and different than empty take that value, else that general option from theme options\n $word_count = '45';\n if(isset($excerpt_length) && $excerpt_length != \"\") {\n $word_count = $excerpt_length;\n\n } elseif(voyage_mikado_options()->getOptionValue('number_of_chars') != '') {\n $word_count = esc_attr(voyage_mikado_options()->getOptionValue('number_of_chars'));\n }\n //if post excerpt field is filled take that as post excerpt, else that content of the post\n $post_excerpt = $post->post_excerpt != \"\" ? $post->post_excerpt : strip_tags($post->post_content);\n\n //remove leading dots if those exists\n $clean_excerpt = strlen($post_excerpt) && strpos($post_excerpt, '...') ? strstr($post_excerpt, '...', true) : $post_excerpt;\n\n //if clean excerpt has text left\n if($clean_excerpt !== '') {\n //explode current excerpt to words\n $excerpt_word_array = explode(' ', $clean_excerpt);\n\n //cut down that array based on the number of the words option\n $excerpt_word_array = array_slice($excerpt_word_array, 0, $word_count);\n\n //add exerpt postfix\n $excert_postfix = apply_filters('voyage_mikado_excerpt_postfix', '...');\n\n //and finally implode words together\n $excerpt = implode(' ', $excerpt_word_array).$excert_postfix;\n\n //is excerpt different than empty string?\n if($excerpt !== '') {\n echo '<p class=\"mkdf-post-excerpt\">'.wp_kses_post($excerpt).'</p>';\n }\n }\n }\n }", "function charity_use_excerpt() {\n $display = TRUE;\n $display = apply_filters('charity_use_excerpt', $display);\n return $display;\n}", "function et_setup_theme() {\n\tglobal $themename, $shortname, $et_store_options_in_one_row;\n\t$themename = 'Extra';\n\t$shortname = 'extra';\n\t$et_store_options_in_one_row = true;\n\n\t$template_directory = get_template_directory();\n\n\t// ePanel\n\trequire_once $template_directory . '/epanel/custom_functions.php';\n\trequire_once $template_directory . '/epanel/core_functions.php';\n\trequire_once $template_directory . '/post_thumbnails_extra.php';\n\trequire_once $template_directory . '/includes/choices.php';\n\trequire_once $template_directory . '/includes/sanitization.php';\n\n\t// Core\n\trequire_once $template_directory . '/core/init.php';\n\n\tet_core_setup( get_template_directory_uri() );\n\n\tif ( '3.0.61' === ET_CORE_VERSION ) {\n\t\trequire_once $template_directory . '/core/functions.php';\n\t\trequire_once $template_directory . '/core/components/init.php';\n\t\tet_core_patch_core_3061();\n\t}\n\n\tload_theme_textdomain( 'extra', $template_directory . '/lang' );\n\n\t// deactivate page templates and custom import functions\n\tremove_action( 'init', 'et_activate_features' );\n\n\t// remove epanel theme options link in wp-admin menu\n\tremove_action( 'admin_menu', 'et_add_epanel' );\n\t// end ePanel\n\n\tregister_nav_menus( array(\n\t\t'primary-menu' => esc_html__( 'Primary Menu', 'extra' ),\n\t\t'secondary-menu' => esc_html__( 'Secondary Menu', 'extra' ),\n\t\t'footer-menu' => esc_html__( 'Footer Menu', 'extra' ),\n\t) );\n\n\tadd_theme_support( 'title-tag' );\n\n\tadd_theme_support( 'et-post-formats', array(\n\t\t'video',\n\t\t'audio',\n\t\t'quote',\n\t\t'gallery',\n\t\t'link',\n\t\t'map',\n\t\t'text',\n\t) );\n\n\tadd_theme_support( 'automatic-feed-links' );\n\tadd_theme_support( 'post-thumbnails' );\n\tadd_theme_support( 'et_widget_areas' );\n\n\tadd_theme_support( 'html5', array( 'search-form' ) );\n\n\t// Load unminified script & styles based on selected theme options field\n\tadd_filter( 'et_load_unminified_scripts', 'et_extra_load_unminified_scripts' );\n\tadd_filter( 'et_load_unminified_styles', 'et_extra_load_unminified_styles' );\n}", "function wprt_excerpt_more( $more ) {\n\treturn '&hellip;';\n}" ]
[ "0.6736971", "0.66720587", "0.6604045", "0.6604045", "0.6576243", "0.6531921", "0.6482173", "0.643697", "0.6405216", "0.6401118", "0.63861144", "0.6364165", "0.6323433", "0.6321211", "0.63200486", "0.6283958", "0.6236837", "0.6235942", "0.62268674", "0.6214131", "0.61934173", "0.6170808", "0.6159437", "0.6157571", "0.61513984", "0.61396676", "0.61298186", "0.61234206", "0.6121933", "0.6113058", "0.6111694", "0.6108207", "0.6104404", "0.6104209", "0.61040634", "0.6103649", "0.60836935", "0.6070276", "0.6059608", "0.6058155", "0.6058057", "0.6041159", "0.6038668", "0.6016532", "0.60155165", "0.60041636", "0.60016584", "0.59973675", "0.59870726", "0.59832835", "0.5969646", "0.5968802", "0.59677625", "0.5967308", "0.5956402", "0.59515435", "0.5949302", "0.59415543", "0.59365034", "0.59355277", "0.5935101", "0.59345126", "0.59345126", "0.5926791", "0.59061176", "0.5903795", "0.5902938", "0.59028167", "0.58980346", "0.5895173", "0.58944684", "0.58940387", "0.58921343", "0.5880706", "0.58803785", "0.58789617", "0.58751273", "0.5863224", "0.58599925", "0.5858841", "0.5858776", "0.5851419", "0.5840581", "0.583818", "0.58346575", "0.5832932", "0.58314306", "0.5831173", "0.5831124", "0.58287156", "0.58239377", "0.58193696", "0.5818972", "0.58189183", "0.5814659", "0.5813341", "0.58125395", "0.5812152", "0.5810917", "0.58100325" ]
0.72823095
0
Get the template builder manager.
Получить менеджера построителя шаблона.
protected function builderManager() { return \Drupal::service('plugin.manager.entity_template.builder'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBuilder() {\n if (!isset($this->builder)) {\n if (empty($this->configuration['builder'])) {\n $this->builder = $this->builderManager->createInstance('standard', []);\n }\n else {\n $this->builder = $this->builderManager->createInstance($this->configuration['builder'], []);\n }\n }\n return $this->builder;\n }", "public function getManager()\n {\n return $this->manager;\n }", "public function getManager()\n {\n return $this->manager;\n }", "public function getManager()\n {\n return $this->manager;\n }", "public function getManager(): Gutenberg\n {\n return $this->manager;\n }", "protected function getManager()\n {\n return $this->manager;\n }", "public function getManager() {\n return $this->manager;\n }", "protected function getBuilder()\n {\n return $this->builder;\n }", "public function getTranslationManager()\n {\n return $this->getKernel()->getContainer()->get('worldia.textmaster.manager.translation');\n }", "public function getBuilder()\n {\n return $this->_builder;\n }", "public function getPersistenceBuilder()\n {\n if (!$this->persistenceBuilder) {\n $this->persistenceBuilder = new PersistenceBuilder($this->dm, $this, $this->cmd);\n }\n return $this->persistenceBuilder;\n }", "public function getFormBuilder()\n {\n return $this['form.factory'];\n }", "public function getBuilder()\n {\n return $this->builder;\n }", "public function getBuilder()\n {\n return $this->builder;\n }", "public function builder()\n {\n return $this->builder;\n }", "public function getViewManager()\n {\n return $this->viewManager;\n }", "protected function entityFormBuilder() {\n if (!$this->entityFormBuilder) {\n $this->entityFormBuilder = $this->container()->get('entity.form_builder');\n }\n return $this->entityFormBuilder;\n }", "public function getObjectManager() {\n\t\tif(($this->objectManager instanceof \\TYPO3\\CMS\\Extbase\\Object\\ObjectManager) === false) {\n\t\t\t$this->objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Extbase\\Object\\ObjectManager::class);\n\t\t}\n\n\t\treturn $this->objectManager;\n\t}", "public function getFormBuilder()\n {\n $this->formOptions['data_class'] = $this->getClass();\n\n $this->formOptions['allow_extra_fields'] = true;\n $this->formOptions['validation_groups'] = false;\n $this->formOptions['error_bubbling'] = false;\n\n $formBuilder = $this->getFormContractor()->getFormBuilder(\n $this->getUniqid(),\n $this->formOptions\n );\n\n $this->defineFormBuilder($formBuilder);\n\n return $formBuilder;\n }", "public function getDocumentManager()\n {\n return $this->getObjectManager();\n }", "public function getObjectManager() {\n\t\tif(($this->objectManager instanceof \\TYPO3\\CMS\\Extbase\\Object\\ObjectManager) === false) {\n\t\t\t$this->objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Object\\\\ObjectManager');\n\t\t}\n\n\t\treturn $this->objectManager;\n\t}", "public function getTemplateHelper(){\n if( $this->_flexryTemplateHelper === null ){\n $templateHandle = $this->currentTemplateHandle();\n if( empty($templateHandle) ){\n $this->_flexryTemplateHelper = FlexryBlockTemplateOptions::setup(self::TEMPLATE_DEFAULT_HANDLE, self::templateDefaultPath(), $this->parsedTemplateData() );\n }else{\n $templatesList = $this->templateAndDirectoryList();\n $this->_flexryTemplateHelper = FlexryBlockTemplateOptions::setup($templateHandle, $templatesList[$templateHandle], $this->parsedTemplateData() );\n }\n }\n return $this->_flexryTemplateHelper;\n }", "public function getFormManager()\n {\n if(!$this->formManager){\n $this->setFormManager( $this->getServiceLocator()->get('FormElementManager') );\n }\n return $this->formManager;\n\n return $this->formManager;\n }", "public function getTranslationGenerator()\n {\n return $this->getKernel()->getContainer()->get('worldia.textmaster.generator.translation');\n }", "public function getDocumentManager()\n {\n return $this->documentManager;\n }", "public static function instance() {\n return Doctrine::getTable('DocumentTemplate');\n }", "public static function get() {\n\t\tif (self::$web_template === null) {\n\t\t\tself::$web_template = new Template();\n\t\t}\n\n\t\treturn self::$web_template;\n\t}", "protected function getTemplateRepo()\n {\n if ($this->_templatesRepo === null || !$this->_templatesRepo) {\n $this->_templatesRepo = $this->getEntityRepository(Template::class);\n }\n\n return $this->_templatesRepo;\n }", "public function getEngine(): \\Twig\\Environment\n {\n return $this->template;\n }", "public function getDBManagerHandler()\n {\n\t\tif (empty($this->dbManager)) {\n\t\t\t$this->dbManager = new DatabaseManager($this->config['database'], new ConnectionFactory());\n\t\t}\n\t\treturn $this->dbManager;\n\t}", "public function getTemplatesEngine() {\n\t\treturn $this->templatesEngine;\n\t}", "public function getDatabaseManager(): DatabaseManager\n {\n return $this->manager;\n }", "public function getPagesManager() {\n\t\treturn $this->wire('lab_tools');\n\t}", "public function getManager() {\n return $this->em;\n }", "protected function getEM() {\n return $this->getDoctrine()->getEntityManager();\n }", "public function builder()\n {\n if ($this->parent) {\n return $this->parent->builder();\n }\n\n if (is_null($this->builder)) {\n $this->builder = new Builder($this);\n }\n\n return $this->builder;\n }", "protected function getObjectManager()\n {\n return $this->managerRegistry->getManager($this->managerName);\n }", "public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }", "public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }", "public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }", "public function getSchemaBuilder(): SchemaBuilder\n {\n return $this->getContainer()[SchemaBuilder::class];\n }", "public function getDBManagerHandler(): DatabaseManager\n {\n if (empty($this->dbManager)) {\n $this->dbManager = new DatabaseManager(Config::get('database'), new ConnectionFactory());\n }\n return $this->dbManager;\n }", "protected function getFormTool()\n {\n return $this->mod->getFormTool();\n }", "function analogue()\n {\n return Manager::getInstance();\n }", "public function getHandlerManager()\n {\n return $this->handlerManager;\n }", "public function getOptionManager()\n {\n return $this->optionManager;\n }", "static protected function getConfigurationManager()\n\t{\n\t\tif (!is_null(static::$configurationManager)) {\n\t\t\treturn static::$configurationManager;\n\t\t}\n\t\t$objectManager = GeneralUtility::makeInstance(ObjectManager::class);\n\t\t$configurationManager = $objectManager->get(ConfigurationManagerInterface::class);\n\t\tstatic::$configurationManager = $configurationManager;\n\t\treturn $configurationManager;\n\t}", "protected function getTemplateHandler()\n {\n return new TemplateHandler();\n }", "protected function getMessageManager()\n {\n return $this->getContext()->getMessageManager();\n }", "public static function getInstance()\n {\n $objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');\n\n $nestedSetTreeWalkerVisitor = $objectManager->get('Tx_PtExtbase_Tree_NestedSetVisitor');\n $nestedSetTreeWalker = $objectManager->get('Tx_PtExtbase_Tree_NestedSetTreeWalker', [$nestedSetTreeWalkerVisitor], $nestedSetTreeWalkerVisitor);\n return $nestedSetTreeWalker;\n }", "public static function getInstance()\n\t{\n\t\tif ( NULL === self::$instance )\n\t\t{\n\t\t\tself::$instance = new Template;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public function getEngine(): Engine\r\n {\r\n return $this->template;\r\n }", "public function hookManager()\n {\n return $this->hookManager;\n }", "private function getHelper()\n {\n if ($this->helper === null) {\n $this->helper = new ComposerConfig($this->context);\n }\n \n return $this->helper;\n }", "protected function getTempDirManager() {\n\t\tif ( !$this->tempDirManager ) {\n\t\t\t$tempDirBase = $this->tempDirBase;\n\t\t\tif ( $tempDirBase === null ) {\n\t\t\t\t$tempDirBase = sys_get_temp_dir();\n\t\t\t}\n\n\t\t\t$this->tempDirManager = new TempDirManager(\n\t\t\t\t$tempDirBase . '/shellbox-' . Shellbox::getUniqueString()\n\t\t\t);\n\t\t}\n\t\treturn $this->tempDirManager;\n\t}", "public function getTemplateEngine() {\n\t\treturn parent::getTemplateEngine();\n\t}", "public function getGrammarManager(): Manager|null;", "protected function getTemplate() {\n\t\treturn new Template('Premanager', 'userForm');\n\t}", "public function getBuilder()\n {\n $class = '\\ReneDeKat\\Quickbooks\\Builders\\\\'.$this->getClassName();\n\n return new $class($this);\n }", "protected function getIntentionManager()\n {\n return $this->get('intention.execution_manager');\n }", "public function getContentMigrator(): MigrationManager\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('contentMigrator');\n }", "public function getObjectManager(): mixed\n {\n return $this->objectManager;\n }", "protected function getCacheManager()\n {\n if (!$this->cacheManager) {\n $this->cacheManager = $this->getContainer()->get('fos_http_cache.cache_manager');\n }\n\n return $this->cacheManager;\n }", "protected function getSchemaBuilder()\n {\n return $this->getConnection()->getSchemaBuilder();\n }", "public function getObjectManager()\r\n {\r\n return $this->objectManager;\r\n }", "protected function getTemplateService()\n {\n return $this->services['template'] = new \\phpbb\\template\\twig\\twig(${($_ = isset($this->services['path_helper']) ? $this->services['path_helper'] : $this->getPathHelperService()) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template_context']) ? $this->services['template_context'] : ($this->services['template_context'] = new \\phpbb\\template\\context())) && false ?: '_'}, ${($_ = isset($this->services['template.twig.environment']) ? $this->services['template.twig.environment'] : $this->getTemplate_Twig_EnvironmentService()) && false ?: '_'}, './../cache/production/twig/', ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['template.twig.extensions.collection']) ? $this->services['template.twig.extensions.collection'] : $this->getTemplate_Twig_Extensions_CollectionService()) && false ?: '_'}, ${($_ = isset($this->services['ext.manager']) ? $this->services['ext.manager'] : $this->getExt_ManagerService()) && false ?: '_'});\n }", "protected function getObjectManager()\n {\n return $this->objectManager;\n }", "public function getObjectManager()\n {\n return $this->objectManager;\n }", "public function getObjectManager()\n {\n return $this->objectManager;\n }", "public function getObjectManager()\n {\n return $this->objectManager;\n }", "public function getObjectManager()\n {\n return $this->objectManager;\n }", "public function getServiceManager()\n {\n return $this->sm;\n }", "protected function getObjectManager()\n {\n return $this->_objectManager;\n }", "function engine() {\n\n if ( $this->_engine ) {\n return $this->_engine;\n } elseif ( ($template = Liber::conf('TEMPLATE_ENGINE')) ) {\n // instancing of Template Engine\n Liber::loadClass($template, 'APP');\n $this->_engine = new $template;\n } else {\n $this->_engine = &$this;\n }\n\n return $this->_engine;\n }", "public function getRequestBuilder()\n {\n return new RequestBuilder();\n }", "public static function getTwig()\r\n {\r\n $loader = new \\Twig_Loader_Filesystem('templates');\r\n return new \\Twig_Environment($loader, array('debug' => true, \r\n 'autoescape' => true, \r\n 'auto_reload' => true));\r\n }", "public static function instance()\n\t{\n\t\tif (!self::$tplInstance) {\n\t\t\tself::$tplInstance = new Template();\n\t\t}\n\t\t\n\t\treturn self::$tplInstance;\n\t}", "public function getServiceManager ()\n {\n return $this->serviceManager;\n }", "public function getBuilderFactory()\n {\n return $this->builderFactory;\n }", "public function getSharedManager();", "private function getArrangementProgramManager() {\n return $this->get('seip.arrangement_program.manager');\n }", "public function getManager()\n {\n $symfonyProcess = new Process($this->command);\n $symfonyProcess->setTimeout($this->timeout);\n\n $process = new InteractiveProcess(\n $symfonyProcess,\n $this->pipe,\n $this->waitStrategy\n );\n\n $this->manager->setProcess($process);\n\n return $this->manager;\n }", "protected function getOptionSetsManager() {\n return \\Drupal::service('option_sets.manager');\n }", "public function get()\n {\n return $this->templates;\n }", "protected function getKitAdmin(): LightKitAdminService\n {\n return $this->getContainer()->get('kit_admin');\n }", "private function getDatabaseManager()\n {\n $file = require __DIR__ . '/../../src/settings.php';\n $dbSettings = $file['settings']['db'];\n\n $capsule = new \\Illuminate\\Database\\Capsule\\Manager;\n $capsule->addConnection($dbSettings);\n $capsule->setAsGlobal();\n $capsule->bootEloquent();\n return $capsule->getDatabaseManager();\n }", "protected function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getFormCreator()\n {\n if ($this->formCreator === null) {\n $this->formCreator = $this->makeFormCreator();\n }\n\n return $this->formCreator;\n }", "protected function getManagerFactory()\n {\n return $this->container->get(ThuataControllerInterface::MANAGER_FACTORY_ID);\n }", "protected function getEntityManager()\n {\n return $this->getContainer()->get('doctrine')->getManager();\n }", "public function getPdfGenerator($template = 'MakePdf') {\n\t\treturn $this->getInstanceOf($template);\n\t}", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "public function builder()\n\t{\n\t\t$builder = new Builder($this->request);\n\t\treturn $builder;\n\t}", "protected function _getTemplateModel()\n\t{\n\t\treturn $this->getModelFromCache('XenForo_Model_Template');\n\t}" ]
[ "0.65663296", "0.6290267", "0.6290267", "0.6290267", "0.62729853", "0.6265055", "0.6221792", "0.60746664", "0.6015199", "0.59984595", "0.59514964", "0.594063", "0.5932067", "0.5932067", "0.5926895", "0.591976", "0.59180784", "0.59067625", "0.58905035", "0.58742106", "0.5870349", "0.5869387", "0.58640206", "0.57857865", "0.5776718", "0.57675964", "0.57670784", "0.5754302", "0.57222134", "0.5709957", "0.5707439", "0.56848496", "0.5623332", "0.5611828", "0.5611161", "0.5599498", "0.5594251", "0.55640966", "0.55640966", "0.55640966", "0.5535692", "0.55302566", "0.55202806", "0.5517074", "0.5497722", "0.5480313", "0.5456884", "0.5454046", "0.544412", "0.5434861", "0.5431878", "0.541629", "0.5396574", "0.53964996", "0.5390928", "0.53864056", "0.5384397", "0.5383914", "0.5383624", "0.53615475", "0.5357204", "0.5353297", "0.5352582", "0.5344328", "0.5341806", "0.53391975", "0.53363776", "0.5330972", "0.5330972", "0.5330972", "0.5330972", "0.5317886", "0.5313782", "0.5310919", "0.52979726", "0.52877235", "0.5286989", "0.52845216", "0.5283938", "0.5282438", "0.5277452", "0.52690184", "0.52614516", "0.5261278", "0.52603185", "0.5253863", "0.525224", "0.524766", "0.5247482", "0.5243362", "0.5225262", "0.522293", "0.522293", "0.522293", "0.522293", "0.522293", "0.522293", "0.522293", "0.52226", "0.5216128" ]
0.7953468
0
Get the remote fortrabbit branch to deploy to
Получите удалённую ветку fortrabbit для развертывания
public function remoteBranch() : string { return (string) $this->getOrError('remote_branch'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list_remote_branches() {\n\t\t\t$branchArray = explode(\"\\n\", $this->run(\"branch -r\"));\n\t\t\tforeach ($branchArray as $i => &$branch) {\n\t\t\t\t$branch = trim($branch);\n\t\t\t\tif ($branch == \"\" || strpos($branch, 'HEAD -> ') !== false) {\n\t\t\t\t\tunset($branchArray[$i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $branchArray;\n\t\t}", "protected function getProjectFromRemote(): string\n {\n $process = new Process((array) 'git config --get remote.origin.url');\n $process->run();\n $remote_url = trim($process->getOutput());\n preg_match('#.*\\/(.*)\\.git$#', $remote_url, $matches);\n return $matches[1] ?? '';\n }", "public function getRemote()\n {\n return $this->remote;\n }", "function pull( $remote, $branch ) {\n return $this->_exec( \"pull {$remote} {$branch}\" );\n }", "public function getBranch()\n {\n return $this->_options['branch'];\n }", "public function git_repository()\n\t{\n\t\texec( 'cd ' . $this->theme_dir . '; git remote -v', $remotes );\n\n\t\tpreg_match( '#origin[\\s\\t]+git@github.com\\:([^\\.]+)#', $remotes[0], $matches );\n\n\t\t$remote = $matches[1];\n\n\t\treturn $remote;\n\t}", "public function getBranch()\n {\n return $this->branch;\n }", "public function getBranch()\n {\n return $this->branch;\n }", "public function getEnvironment()\n {\n return 'branch';\n }", "protected function getBranch()\n {\n $branches = $this->terminal->run($this->git->branch());\n\n preg_match('/\\*\\s([\\w]*)/', $branches, $matches);\n \n if (!empty($matches[1])) {\n $this->branch = $matches[1];\n }\n \n $this->output->write('<info>' . $this->branch . '</info>' . PHP_EOL);\n }", "public function getRemote();", "public function getExistingBranchForTestCase()\n {\n $branchName = $this->getDevBranchName();\n $devBranch = new DevBranches($this->getDefaultClient());\n\n $branches = $devBranch->listBranches();\n $branch = null;\n // get branch detail\n foreach ($branches as $branchItem) {\n if ($branchItem['name'] === $branchName) {\n $branch = $branchItem;\n }\n }\n if (!isset($branch)) {\n $this->testCase->fail(sprintf('Reuse existing branch: branch %s not found.', $branchName));\n }\n\n return $branch;\n }", "function changeBranch(){\r\n\t\t// $gitpss = isset($_COOKIE['gitpss']) ? $_COOKIE['gitpss'] : '';\r\n\t\t// $repo = 'https://'.$gitusr.':'.$gitpss.'@github.com/nelsoft/nelsoft_inventory.git';\r\n\t\tchdir($_POST['path']);\r\n\t\texec('git clean -df');\r\n\t\texec('git checkout -- .');\r\n\t\t// exec('git fetch '.$repo);\r\n\t\texec('git checkout '.$_POST['branch'], $data);\r\n\t\t// exec('git pull '.$repo.' '.$_POST['branch'], $data);\r\n\r\n\t\t$return['version'] = '0.00';\r\n\t\t$return['version'] = getversion($_POST['path'], 'version');\t\r\n\t\t$return['data'] = $data;\r\n\r\n\t\tjdie($return);\r\n}", "public function getRemoteSite() {\n return $this->remoteSite;\n }", "public function getCurrentBranch() : string\n {\n $process = $this->runProcess(new Process('git branch'));\n\n $branches = collect(explode(PHP_EOL, $process->getOutput()));\n\n $currentBranch = $branches->first(function(string $branch) {\n return str_contains($branch, '*');\n });\n\n return trim(str_replace('*', '', $currentBranch));\n }", "public function pull($remote, $branch) {\n\t\t\treturn $this->run(\"pull $remote $branch\");\n\t\t}", "public function getDefaultBranch() {\n $repoApi = new \\Drupal\\config_pr\\RepoControllers\\GitLabApi($this->getClient());\n $path = '/api/v4/projects/' . $this->getProjectId();\n $response = $repoApi->get($path);\n\n return $response['default_branch'];\n }", "public function fortrabbitRemoteName() : string\n {\n return 'frb-' . $this->environment();\n }", "public function getBranch() /*: string*/ {\n if ($this->branch === null) {\n throw new \\Exception(\"Branch is not initialized\");\n }\n return $this->branch;\n }", "private static function git_origin(): ?string {\n\t\tif ( ! self::$root_path ) {\n\t\t\treturn null;\n\t\t}\n\t\t$cmd = 'git -C ' . escapeshellarg( self::$root_path ) . ' remote get-url origin';\n\t\t$response = exec( $cmd );\n\t\treturn $response ?: null;\n\t}", "public function targetBranch() : string\n {\n return (string) $this->getOrError('target_branch');\n }", "private function _getBranches()\n\t{\n\t\t// If we don't have a configuration file for the repository PANIC!\n\t\tif (!file_exists($this->_root . '/.git/config'))\n\t\t{\n\t\t\tthrow new RuntimeException('Not a valid Git repository at ' . $this->_root);\n\t\t}\n\n\t\t// Initialize variables.\n\t\t$branches = array();\n\n\t\t// Parse the repository configuration file.\n\t\t$config = parse_ini_file($this->_root . '/.git/config', true);\n\n\t\t// Go find the remotes from the configuration file.\n\t\tforeach ($config as $section => $data)\n\t\t{\n\t\t\tif (strpos($section, 'branch ') === 0)\n\t\t\t{\n\t\t\t\t$branches[] = trim(substr($section, 7));\n\t\t\t}\n\t\t}\n\n\t\treturn $branches;\n\t}", "public function getRemote()\n {\n if (null === $this->getData('remote')) {\n $remote = Mage::getResourceModel('tmcore/module_remoteCollection')\n ->getItemById($this->getId());\n\n $this->setData('remote', $remote);\n }\n return $this->getData('remote');\n }", "public function get_url(){\n\n\t\t\treturn $this->api_urls['giturl'];\n\n\t\t}", "public function branch()\n {\n $result = $this->git('symbolic-ref --short HEAD');\n if (empty($result)) {\n return 'master';\n }\n\n return $result;\n }", "function determine_branch_name( $request) {\n // push request, branch is in request[ref]\n if (isset($reqest['ref'])) {\n // strip out the refs/head nonsense -- doesn't look like bare\n // branch is listed anywhere in the request\n return preg_replace(\"|refs/heads/|\", \"\", $request['ref']);\n }\n\n _log(\"Unable to determine branch name. Maybe this wasn't a pull or merge request?\");\n}", "public function addEnvironmentRemote(Config $config) : Git\n {\n return $this->addRemote(\n $config->fortrabbitRemoteName(),\n $config->gitUrl()\n );\n }", "public function gitPull() {\n $current_branch = exec('git rev-parse --abbrev-ref HEAD');\n\n $collection = $this->collectionBuilder();\n $collection->taskGitStack()\n ->pull()\n ->run();\n\n $name = $this->confirm(\"Run Composer Install?\");\n if ($name) {\n $this->composerInstall();\n }\n\n $name = $this->confirm(\"Run Config Import?\");\n if ($name) {\n $this->drushCim();\n }\n }", "function do_checkout_branch($req, $deployto, $operation){\n \n\tif($operation != \"TAG\"){\n\t//if($operation == \"Push Hook\" && !empty($DEPLOY_BRANCH)){\n\t\t$branch=determine_branch_name($req);\n\t\tif($branch == $operation){\n\t\t\t$cmd = \"bash -c 'cd $deployto; git checkout $branch' 2>&1\";\n\t\t}\n\t\telse{\n\t\t\t$cmd = \"bash -c 'cd $deployto; git checkout $operation' 2>&1\";\n\t\t}\n\t}\n\telse{\n\t\t$tag= $req['ref'];\n\t\t$cmd = \"bash -c 'cd $deployto; git checkout $tag' 2>&1\";\n\t}\n\t\n\tif(file_exists($deployto . \"/.gitmodules\")){\n\t\t_log(\"Initializing and Updating submodules...\\n\");\n\t\t$subcmd = \"bash -c 'cd $deployto; git submodule init; git submodule update' 2>&1\";\n\t}\n\n\t_debug(\"Operation: $operation\\n\");\n _log(\"Exec Command: $cmd\\n\");\n\n\t$result = shell_exec($cmd);\n\tif(isset($subcmd)){\n\t\t$result .= shell_exec($subcmd);\n \t}\n \treturn $result;\n\n}", "public function getBranch()\n {\n return new GitBranch($this->getProjectBase());\n }", "protected function getStableTag($branch) {\n\t\t\t$remoteReadme = $this->getRemoteReadme($branch);\n\t\t\tif ( !empty($remoteReadme['stable_tag']) ) {\n\t\t\t\t$tag = $remoteReadme['stable_tag'];\n\n\t\t\t\t//You can explicitly opt out of using tags by setting \"Stable tag\" to\n\t\t\t\t//\"trunk\" or the name of the current branch.\n\t\t\t\tif ( ($tag === $branch) || ($tag === 'trunk') ) {\n\t\t\t\t\treturn $this->getBranch($branch);\n\t\t\t\t}\n\n\t\t\t\treturn $this->getTag($tag);\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "public function git_working_branch()\n\t{\n\t\texec( 'cd ' . $this->theme_dir . '; git status', $status );\n\t\t$status = $status[0];\n\n\t\treturn preg_replace( '/# On branch/', '', $status );\n\t}", "public function getSource()\n {\n return 'branch';\n }", "static function getCurrentVersion($branch=\"latest_stable\")\n\t{\n\t\t$url = \"svn://localhost/ci_base_core/branches/\".$branch.\"/.version\";\n\t\t//file_put_contents(\"../logs/index.getCurrentVersion.branch_url.txt\", print_r($url, true));\n\t\t$out = false;\n\t\n\t\tif (function_exists('curl_init'))\n\t\t{\n\t\t\t$ch = curl_init();\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\tcurl_setopt($ch, CURLOPT_USERAGENT, 'BA5E');\n\t\t\t$out = curl_exec($ch);\n\t\n\t\t\tif (false === $out)\n\t\t\t{\n\t\t\t\ttrigger_error('Not sure what it is, but there\\'s a problem with contacting the update server. Maybe this will help: \"' . curl_error($ch) . '\"');\n\t\t\t}\n\t\t\techo curl_error($ch);\n\t\t\tcurl_close($ch);\n\t\t}else{\n\t\t\tthrow new Exception(\"curl is required for this action\");\n\t\t}\n\t\n\t\t\n\t\treturn ($out !== false) ? $out : VERSION;\n\t}", "protected function getTarball() {\n // Exported configuration after a minimal profile install.\n return $this->versionTarball('minimal.tar.gz');\n }", "function _versioncontrol_git_log_get_branches() {\n $logs = _versioncontrol_git_log_exec('git show-ref --heads'); // Query branches.\n $branches = _versioncontrol_git_log_parse_branches($logs); // Parse output.\n return $branches;\n}", "public function testBitBucketRemoteRepository(): void\n {\n $repo = new BitBucketRemoteRepository('r/r', './');\n $this->assertEquals('https://bitbucket.org/r/r/src/v2/src/Project.php#Project.php-30', $repo->getFileUrl('v2', 'src/Project.php', 30));\n $this->assertEquals('src/Project.php', $repo->getRelativePath('./src/Project.php'));\n $this->assertEquals('', $repo->getRelativePath('src/Project.php'));\n }", "protected function siteAndEnvFromRepo()\n {\n $repo_url = exec('git config --get remote.origin.url');\n if (\n !preg_match(\n '#ssh://[^@]*@codeserver\\.[^.]*\\.([^.]*)\\.drush\\.in:2222/~/repository\\.git#',\n $repo_url,\n $matches\n )\n ) {\n return ['',''];\n }\n\n $site_id = $matches[1];\n $site = $this->getSiteById($site_id);\n\n // Get the current branch\n $env = exec('git rev-parse --abbrev-ref HEAD');\n if ($env == 'master') {\n $env = 'dev';\n }\n\n return [$site->getName(), $env];\n }", "public function push($remote, $branch) {\n\t\t\treturn $this->run(\"push --tags $remote $branch\");\n\t\t}", "public function getBranchInfo()\n {\n $this->db->select('*');\n $this->db->where('komoku_id', KOMOKU_SHOUSHA);\n $result = $this->db->get('m_komoku');\n return $result->result_array();\n }", "public function remote()\n\t{\n\t\treturn $this->CLI->boolQuery($this->SqueezePlyrID.\" remote ?\");\n\t}", "public function fortrabbitRemoteNeedsConfiguring(Config $config) : bool\n {\n $process = $this->runProcess(new Process('git branch -a'));\n\n $remoteBranchExists = collect(explode(PHP_EOL, $process->getOutput()))\n ->map(function($branch) {\n return trim($branch);\n })\n ->first(function($branch) use ($config) {\n $target = sprintf('remotes/%s/%s', $config->fortrabbitRemoteName(), $config->remoteBranch());\n\n return starts_with($branch, $target);\n })\n ;\n\n return !$remoteBranchExists;\n }", "public function branches()\n {\n return $this->_refs('heads');\n }", "public function getBranchOf()\n {\n return $this->branchOf;\n }", "function rpull() {\n\t\t$this->checkOnce();\n\t\t$versionPath = $this->getVersionPath();\n\t\t/** @var Repo $repo */\n\t\tforeach ($this->repos as $repo) {\n\t\t\techo BR, '## ', $repo->path, BR;\n\t\t\t$deployPath = $versionPath . '/' . $repo->path();\n\t\t\ttry {\n\t\t\t\t$exists = $this->rexists($deployPath);\n\t\t\t\tif ($exists) {\n\t\t\t\t\t$remoteCmd = 'cd ' . $deployPath . ' && hg pull';\n\t\t\t\t\t$this->ssh_exec($remoteCmd);\n\t\t\t\t} else {\n\t\t\t\t\techo TAB, '*** path ', $deployPath, ' does not exist', BR;\n\t\t\t\t}\n\t\t\t} catch (\\SystemCommandException $e) {\n\t\t\t\techo 'Error: '.$e, BR;\n\t\t\t}\n\t\t}\n\t}", "public function get_ssh_url(): ?string;", "public function getBranchesBranch()\n {\n return $this->hasOne(Branches::className(), ['branch_id' => 'branches_branch_id']);\n }", "public function getBranchBaseUrl()\n {\n $baseUrl = trim($this->getBaseUrl(), '/');\n\n return $this->getBranchName()\n ? $baseUrl . '/-' . $this->getBranchName() . '-'\n : $baseUrl;\n }", "public function isAllowedBranch(){\r\n\t\t// checker\r\n\t\t$check = false;\r\n\t\t// check if the payload with ref exists\r\n\t\tif (isset($this->payload->ref) && strpos($this->payload->ref, GIT_BRANCH)) {\r\n\t\t\t$check = true;\r\n\t\t}\r\n\t\t// return the checker\r\n\t\treturn $check;\r\n\t}", "function rdeploy() {\n\t\techo BR, TAB, TAB, '### checkOnce', BR;\n\t\t$this->checkOnce();\n\n\t\techo BR, TAB, TAB, '### pushAll', BR;\n\t\t$this->pushAll();\n\t\ttry {\n\t\t\t$exists = $this->rexists();\n\t\t} catch (\\SystemCommandException $e) {\n\t\t\t$exists = false;\n\t\t}\n\n\t\techo 'The destination folder ', $this->getVersionPath() . ($exists ? ' exists' : 'does not exist'), BR, BR;\n\t\tif ($exists) {\n\t\t\techo BR, TAB, TAB, '### rpull', BR;\n\t\t\t$this->rpull();\n\t\t\t$this->rcomposer();\n\t\t\t$this->postinstall();\n\t\t\t$this->rinstall();\n\t\t} else {\n\t\t\techo BR, TAB, TAB, '### mkdir', BR;\n\t\t\t$this->mkdir();\n\n\t\t\techo BR, TAB, TAB, '### rclone', BR;\n\t\t\t$this->rclone();\n\t\t}\n\n\t\techo BR, TAB, TAB, '### rupdate', BR;\n\t\t$this->rupdate();\n\n\t\techo BR, TAB, TAB, '### rcomposer', BR;\n\t\t$this->rcp('composer.json');\n\t\t$this->rcp('composer.lock');\n\t\t$this->rcomposer();\n\n\t\techo BR, TAB, TAB, '### postinstall', BR;\n\t\t$this->rpostinstall();\n\n\t\techo BR, TAB, TAB, '### rinstall', BR;\n\t\t$this->rinstall();\n\n\t\techo BR, TAB, TAB, '### rstatus', BR;\n\t\t$this->rstatus();\n\n\t\techo BR, TAB, TAB, '### deployDependencies', BR;\n\t\t$this->deployDependencies();\n\t\t$nr = $this->getMain()->nr();\n\t\t$this->exec('start http://'.$this->liveServer.'/v'.$nr);\n\t}", "public function getSearchBranch()\n {\n return $this->search_branch;\n }", "public function getCommitUrl(): string\n {\n return $this->data->url;\n }", "public function testDestiny2PullFromPostmaster()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function deploy()\n {\n \n $this->terminal = new LocalTerminal($this->project->getDirectory(), $this->output);\n $this->git = new GitBuilder();\n \n \n $this->output->writeln('Starting deployment process... ');\n \n $this->output->write('Getting current working branch... ');\n $this->getBranch();\n \n $this->output->write('Checking for changes in branch ' . $this->branch . '...');\n $this->checkDiffs();\n\n // Push all changes on master branch\n $this->output->write('Pushing changes to branch ' . $this->branch . '...');\n $this->push();\n \n $this->output->write('<info>Deployment to branch ' . $this->branch . ' successful.</info>' . PHP_EOL);\n }", "public function getBranchName()\n {\n if ($this->_branch === false) {\n $this->_branch = preg_match('#^/-([^/]+)-#', $this->getPathInfo(), $matches)\n ? $matches[1]\n : null;\n }\n\n return $this->_branch;\n }", "protected function determineBuildBranchAncestor($branch) {\n // Check whether the latest build of the production branch is something we\n // can start from with.\n $productionBranch = $this->phappManifest->getGitBranchProduction();\n $productionBuildBranch = $this->phappManifest->getGitBranchForBuild($productionBranch);\n $process = $this->_execSilent(\"git log --format=oneline $productionBuildBranch --grep \\\"Build .* commit \\\"\");\n\n if ($process->isSuccessful() && $output = $process->getOutput()) {\n // Parse the message to get the source commit hash.\n list($first_line) = explode(\"\\n\", $output, 2);\n $matches = [];\n if (preg_match('/Build .* commit (\\S*)./', $first_line, $matches)) {\n $sourceCommit = $matches[1];\n }\n }\n\n // If the source commit of the last build has been found, verify the\n // to-be-built branch is based upon it. Else, we need to start a new build\n // branch.\n if (!empty($sourceCommit)) {\n $process = $this->_execSilent(\"git log --format=oneline $sourceCommit..$branch\");\n $sourceIsParent = $process->isSuccessful() && $process->getOutput() != '';\n\n if ($sourceIsParent) {\n return $productionBuildBranch;\n }\n\n // Check whether the source commit is the same as to-be-built commit.\n $process = $this->_execSilent(\"git reflog $sourceCommit\");\n $hash1 = $process->isSuccessful() ? $process->getOutput() : FALSE;\n $process = $this->_execSilent(\"git reflog $branch\");\n $hash2 = $process->isSuccessful() ? $process->getOutput() : FALSE;\n if ($hash1 && $hash2 && $hash1 == $hash2) {\n return $productionBuildBranch;\n }\n }\n\n // No relationship between the to-be-built and the last built commit could\n // be found. Thus, start a new build branch based upon the to-be-built\n // branch.\n return $branch;\n }", "private function getProjectBase()\n {\n $process = new Process('git rev-parse --show-toplevel');\n $process->run();\n\n return \\trim($process->getOutput());\n }", "private function githubSyncProcess()\n\t{\n\n\t\t// Delete any existing file.\n\t\tif(file_exists(e_TEMP.\"e107-master.zip\"))\n\t\t{\n\t\t\tunlink(e_TEMP.\"e107-master.zip\");\n\t\t}\n\n\t\t$result = e107::getFile()->getRemoteFile('https://codeload.github.com/e107inc/e107/zip/master', 'e107-master.zip', 'temp');\n\n\t\tif($result == false)\n\t\t{\n\t\t\te107::getMessage()->addError( DBLAN_118 );\n\t\t}\n\n\n\t\t$localfile = 'e107-master.zip';\n\n\t\tchmod(e_TEMP.$localfile, 0755);\n\t\trequire_once(e_HANDLER.\"pclzip.lib.php\");\n\n//\t$base = realpath(dirname(__FILE__));\n\n\n\t\t$newFolders = array(\n\t\t\t'e107-master/e107_admin/' => e_BASE.e107::getFolder('ADMIN'),\n\t\t\t'e107-master/e107_core/' => e_BASE.e107::getFolder('CORE'),\n\t\t\t'e107-master/e107_docs/' => e_BASE.e107::getFolder('DOCS'),\n\t\t\t'e107-master/e107_handlers/' => e_BASE.e107::getFolder('HANDLERS'),\n\t\t\t'e107-master/e107_images/' => e_BASE.e107::getFolder('IMAGES'),\n\t\t\t'e107-master/e107_languages/' => e_BASE.e107::getFolder('LANGUAGES'),\n\t\t\t'e107-master/e107_media/' => e_BASE.e107::getFolder('MEDIA'),\n\t\t\t'e107-master/e107_plugins/' => e_BASE.e107::getFolder('PLUGINS'),\n\t\t\t'e107-master/e107_system/' => e_BASE.e107::getFolder('SYSTEM'),\n\t\t\t'e107-master/e107_themes/' => e_BASE.e107::getFolder('THEMES'),\n\t\t\t'e107-master/e107_web/' => e_BASE.e107::getFolder('WEB'),\n\t\t\t'e107-master/' => e_BASE\n\t\t);\n\n\t\t$srch = array_keys($newFolders);\n\t\t$repl = array_values($newFolders);\n\n\t\t$archive \t= new PclZip(e_TEMP.$localfile);\n\t\t$unarc \t\t= ($fileList = $archive -> extract(PCLZIP_OPT_PATH, e_TEMP, PCLZIP_OPT_SET_CHMOD, 0755)); // Store in TEMP first.\n\n\t\t$error = array();\n\t\t$success = array();\n\t\t$skipped = array();\n//\tprint_a($unarc);\n\n\n\t\t$excludes = array('e107-master/','e107-master/install.php','e107-master/favicon.ico');\n\n\t\tforeach($unarc as $k=>$v)\n\t\t{\n\t\t\tif(in_array($v['stored_filename'],$excludes))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$oldPath = $v['filename'];\n\t\t\t$newPath = str_replace($srch,$repl, $v['stored_filename']);\n\n\t\t\t$message = e107::getParser()->lanVars(DBLAN_121, array('x'=>$oldPath, 'y'=>$newPath));\n\n\t\t\tif($v['folder'] ==1 && is_dir($newPath))\n\t\t\t{\n\t\t\t\t// $skipped[] = $newPath. \" (already exists)\";\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif(!rename($oldPath,$newPath))\n\t\t\t{\n\t\t\t\t$error[] = $message;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$success[] = $message;\n\t\t\t}\n\n\n\t\t\t//\techo $message.\"<br />\";\n\n\t\t}\n\n\t\tif(!empty($success))\n\t\t{\n\t\t\te107::getMessage()->addSuccess(print_a($success,true));\n\t\t}\n\n\t\tif(!empty($skipped))\n\t\t{\n\t\t\te107::getMessage()->setTitle(\"Skipped\",E_MESSAGE_INFO)->addInfo(print_a($skipped,true));\n\t\t}\n\n\t\tif(!empty($error))\n\t\t{\n\t\t\te107::getMessage()->addError(print_a($error,true));\n\t\t}\n\n\n\n\n\t\te107::getRender()->tablerender(DBLAN_10.SEP.DBLAN_112, e107::getMessage()->render());\n\n\t}", "public function getRemote_version()\n {\n $request = wp_remote_post( $this->update_path, array( 'body' => array( 'action' => 'version' ) ) );\n if ( !is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {\n return $request['body'];\n }\n return false;\n }", "public function getRemotes()\n {\n return $this->repository->run('ls-remote');\n }", "public function getName()\n {\n return 'Deploy via remote cached git repository [built-in]';\n }", "public function getDeployment();", "public function getVcs()\n {\n return $this->getGoal('git');\n }", "public function getBranchId()\n {\n return $this->branch_id;\n }", "private function branches()\r\n {\r\n return (isset($this->_session[$this->_branchKey]) ?\r\n $this->_session[$this->_branchKey] : []);\r\n }", "public function getBranchDetails_post()\n {\n\t\t$token = '1';\n\t\t//$tokens = AUTHORIZATION::validateToken($token);\n\t\t// print_r(getallheaders());\n\t\t// echo $token;die();\n\t\t//print_r($tokens);die;\n $requestedBy = $this->post('requestedBy');\n $getBranch = $this->branch_model->getBranch($requestedBy);\n if ($getBranch['branchStatus'])\n {\n // Set the response and exit\n $this->response($getBranch);\n }\n else\n {\n // Set the response and exit\n $this->response([\n 'message' => 'No records found!',\n 'branchStatus' => false\n ]);\n }\n }", "function getRemoteTable(){\n\t\treturn $this->remote_table;\n\t}", "public function getSDKDeployURL() {\n\t\treturn $this->sdkSettings['sdk_deploy_url'];\n\t}", "public function gitUrl() : string\n {\n return sprintf(\n '%s@%s:%s.git',\n $this->projectName(),\n $this->getOrError('frb_zone'),\n $this->projectName()\n );\n }", "public function getDeployment()\n {\n return $this->deployment;\n }", "public function getDeployment()\n {\n return $this->deployment;\n }", "public function getDeployment()\n {\n return $this->deployment;\n }", "public function git_remotes()\n\t{\n\t\texec( 'cd ' . $this->theme_dir . '; git remote', $remotes );\n\n\t\treturn $remotes;\n\t}", "public static function bitbucket()\n {\n return 'bitbucket';\n }", "public function getRemoteGateway()\n {\n return $this->remote_gateway;\n }", "function getRemote($var) {\n\n\t\tswitch($var) {\n\n\t\t\tcase 'ip':\n\t\t\t\treturn isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '0.0.0.0';\n\n\t\t\tcase 'referer':\n\t\t\t\treturn isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';\n\n\t\t\tcase 'userAgent':\n\t\t\t\treturn isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';\n\n\t\t\tcase 'browser':\n\t\t\tcase 'browserVersion':\n\t\t\tcase 'browserAndVersion':\n\t\t\t\t// @tbc\n\t\t\t\tbreak;\n\t\t}\n\n\t}", "public function getRemoteHomePath() {\n return @$this->attributes['remote_home_path'];\n }", "public function compare()\n {\n $remoteRevision = null;\n $tempFile = tmpfile();\n $filesToUpload = array();\n $filesToDelete = array();\n\n // The revision file goes inside the submodule.\n if ($this->isSubmodule)\n {\n $this->revisionFile = $this->isSubmodule.'/'.$this->revisionFile;\n }\n\n // When a revision file exists, get the version,\n // so a diff can be made.\n if (@ftp_fget($this->connection, $tempFile, $this->revisionFile, FTP_ASCII))\n {\n fseek($tempFile, 0);\n $remoteRevision = trim(fread($tempFile, 1024));\n fclose($tempFile);\n\n $message = \"\\r\\n» Taking it from '\".substr($remoteRevision, 0, 7).\"'\";\n }\n // Otherwise it will start a fresh upload.\n else\n {\n $message = \"\\r\\n» Fresh deployment - grab a coffee\";\n }\n\n // A remote version exists.\n if ($remoteRevision)\n {\n // Get the files from the diff.\n $output = $this->git->diff($remoteRevision);\n\n foreach ($output as $line)\n {\n // Added, changed or modified.\n if ($line[0] == 'A' or $line[0] == 'C' or $line[0] == 'M')\n {\n $filesToUpload[] = trim(substr($line, 1));\n }\n // Deleted.\n elseif ($line[0] == 'D')\n {\n $filesToDelete[] = trim(substr($line, 1));\n }\n // Unknown status.\n else\n {\n throw new Exception(\"Unknown git-diff status: {$line[0]}\");\n }\n }\n }\n // No remote version. Get all files.\n else\n {\n $filesToUpload = $this->git->files();\n }\n\n // Remove ignored files from the list of uploads.\n $filesToUpload = array_diff($filesToUpload, $this->ignoredFiles);\n\n $this->filesToUpload = $filesToUpload;\n $this->filesToDelete = $filesToDelete;\n\n return $message;\n }", "function target_gitup()\n{\n\t// git remote add upstream git://github.com/<user>/<repo>.git\n\tsystem('git fetch upstream');\n\tsystem('git merge upstream/master');\n}", "public function init_repo() {\n\n\t\t\t// include the repository configuration\n\t\t\t$repos = include_once(CONFIGPATH . 'repositories.php' );\n\n\t\t\t// the $_GET['deploy'] parameter from request\n\t\t\t$requested_deploy = filter_input( \\INPUT_GET, 'deploy', \\FILTER_SANITIZE_STRING );\n\n\t\t\t// assume that no repository is selected for deployment\n\t\t\t$selected = false;\n\n\t\t\t// if no deploy param was found, maybe pick up the first (and often, only) repository config\n\t\t\tif ( empty( $requested_deploy ) ) {\n\n\t\t\t\t$selected = $this->maybe_select_deploy( $repos[ 0 ], $requested_deploy );\n\n\t\t\t// otherwise, loop through repositories to select the requested one\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tforeach ( $repos as $deploy_config ) {\n\n\t\t\t\t\t$selected = $this->maybe_select_deploy( $deploy_config, $requested_deploy );\n\n\t\t\t\t\t// if we found one, break the loop\n\t\t\t\t\tif ( $selected === true ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// we didn't find any, throw an error\n\t\t\tif ( $selected === false ) {\n\t\t\t\terror(\n\t\t\t\t\t'501 Not Implemented', 'Configuration not found for the requested deploy'\n\t\t\t\t);\n\t\t\t}\n\t\t}", "private function _fetchGitRepository($url, $ref = 'master')\n\t{\n\t\t// Create a Git repository object within the system tmp folder for the url.\n\t\t$root = sys_get_temp_dir() . md5($url);\n\n\t\t// If the folder doesn't exist attempt to create it.\n\t\tif (!is_dir($root))\n\t\t{\n\t\t\tmkdir($root, 0777, true);\n\t\t}\n\n\t\t// Instantiate the repository object.\n\t\t$repo = new PackagerGitRepository($root);\n\n\t\t// Only clone the repository if it doesn't exist.\n\t\tif (!$repo->exists())\n\t\t{\n\t\t\t$repo->create();\n\t\t}\n\n\t\t// Get a clean checkout of the branch/tag required.\n\t\t$repo->fetch()\n\t\t\t->branchCheckout($ref)\n\t\t\t->clean();\n\n\t\treturn $root;\n\t}", "public static function getDevelopmentRevision()\n {\n $branch = '';\n $rev = 0;\n $date = '';\n \n try {\n // try to find the .git dir\n $dir = realpath(dirname(dirname(dirname(__FILE__)))) . '/.git';\n if (file_exists($dir)) {\n $HEAD = trim(str_replace('ref: ', '', @file_get_contents(\"$dir/HEAD\")));\n $explodedHead = explode('/', $HEAD);\n \n $branch = array_pop($explodedHead);\n $rev = trim(@file_get_contents(\"$dir/$HEAD\"));\n \n $hashes = str_split($rev, 2);\n \n $objPath = \"$dir/objects\";\n while (count($hashes) != 0) {\n $objPath .= '/' . array_shift($hashes);\n $objFile = \"$objPath/\" . implode('', $hashes);\n if (@file_exists($objFile)) {\n $date = date_create('@' . filemtime($objFile))->format('Y-m-d H:i:s');\n break;\n }\n }\n }\n $revision = \"$branch: $rev ($date)\";\n } catch (\\Exception $e) {\n $revision = 'not resolvable';\n }\n \n return $revision;\n }", "function get_remote($url) {\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n\n $contents = curl_exec($ch);\n curl_close($ch);\n return $contents;\n\n }", "public function getBranch()\n {\n return $this->hasOne(CompanyBranches::className(), ['BranchID' => 'BranchID']);\n }", "public function upload() {\n // FYI. We are on master now.\n $m_ftp = new \\Model_Ftp();\n $m_ftp->user_id = $this->user_id;\n $branch = $this->branch;\n // Get ftp data for the respective branch\n $ftp_data = $m_ftp->get($branch['ftp_id']);\n\n if (count($ftp_data) !== 1) {\n $this->log('Failed: Enviornment does not have a Linked FTP account.');\n throw new Exception(\"No Linked FTP for enviornment.\");\n } else {\n $ftp_data = $ftp_data[0];\n }\n\n // Testing if the FTP server works.\n try {\n $ftp_data['user'] = $ftp_data['username'];\n $ftp_url = http_build_url($ftp_data);\n// $ftp_test = utils::test_ftp($ftp_url);\n $ftp_test = new \\Banago\\Bridge\\Bridge($ftp_url);\n if ($ftp_test) {\n $this->log('ftp_connect', 'connected');\n }\n } catch (Exception $e) {\n $this->log('ftp_connect', 'connection failed: ' . $e->getMessage());\n throw new Exception('We are sending msg here.' . $e->getMessage());\n }\n\n // LOG --------------------------------\n $this->log('deploy_branch', $branch['branch_name']);\n $this->log('deploy_branch_env', $branch['name']);\n $this->output('Deploy to branch name: ' . $branch['branch_name']);\n // LOG END ----------------------------\n\n /*\n * Data is ready, need to get ready with repository state.\n * Has to be checked out to the branch specified\n * and has to be checked out to the commit specified.\n */\n\n /*\n * pull and clone done,\n * checkout to branch now.\n */\n\n $this->output('Checkout to ' . $branch['branch_name']);\n \\Utils::gitCommand(\"checkout \" . $this->branch['branch_name']);\n $this->log('revision_on_server_before', $branch['revision']);\n $this->output('Revision on FTP: ' . $branch['revision']);\n\n // Setting options for gitcore\n $options = array(\n 'record_id' => $this->record_id,\n 'repo' => $this->repo_dir,\n 'debug' => $this->debug,\n 'deploy_id' => $this->deploy_id,\n 'server' => 'default',\n 'ftp' => array(\n 'default' => array(\n 'scheme' => $ftp_data['scheme'],\n 'host' => $ftp_data['host'],\n 'user' => $ftp_data['username'],\n 'pass' => $ftp_data['pass'],\n 'port' => $ftp_data['port'],\n 'path' => $ftp_data['path'],\n 'passive' => TRUE,\n 'skip' => unserialize($this->branch['skip_path']),\n 'purge' => unserialize($this->branch['purge_path']),\n )\n ),\n 'remoteRevision' => $branch['revision'],\n );\n\n // if type_rollback.\n if ($this->record['record_type'] == $this->m_record->type_rollback && !empty($this->record['hash'])) {\n // checkout the the specific hash.\n \\Utils::gitCommand('checkout ' . $this->record['hash']);\n }\n\n // if type_sync\n if ($this->record['record_type'] == $this->m_record->type_sync) {\n // upload all files please.\n $options['remoteRevision'] = '';\n }\n\n if ($this->record['record_type'] == $this->m_record->type_service_push) {\n // push from github/bitbucket.\n if (!empty($this->record['hash']))\n \\Utils::gitCommand('checkout ' . $this->record['hash']);\n }\n\n // else its update\n\n $localRevision = \\Utils::gitCommand('rev-parse HEAD');\n if (isset($localRevision[0])) {\n $localRevision = trim($localRevision[0]);\n $options['localRevision'] = $localRevision;\n }\n\n if ($options['localRevision'] == $options['remoteRevision']) {\n $this->output('FTP server has the latest changes!');\n $this->log('FTP server has the latest changes!');\n }\n\n $this->output($localRevision);\n\n $gitcore = new \\Gitcore($options);\n try {\n // todo: we're inside.\n $gitcore->startDeploy();\n } catch (Exception $e) {\n // Store logs from GITCORE.\n $this->log('deploy_log', $gitcore->log);\n $this->output($this->log);\n throw new \\Exception($e->getMessage());\n }\n\n // Store Logs from GITCORE.\n $this->log['deploy_log'] = $gitcore->log;\n $this->output($this->log);\n\n $before_revision = $this->log['deploy_log']['remoteRevision_before'];\n $current_revision = $this->log['deploy_log']['remoteRevision_after'];\n\n // Storing output from GITCORE.\n $this->m_record->set($this->record_id, array(\n 'raw' => serialize($this->log),\n 'amount_deployed' => $this->log['deploy_log']['deployed']['human'],\n 'amount_deployed_raw' => $this->log['deploy_log']['deployed']['data'],\n 'file_add' => $this->log['deploy_log']['files']['upload'],\n 'file_remove' => $this->log['deploy_log']['files']['delete'],\n 'file_skip' => $this->log['deploy_log']['files']['skip'],\n 'hash' => $current_revision,\n 'hash_before' => $before_revision,\n ));\n\n // OK,\n // Update branch to ready,\n // Update branch revision.\n $this->m_branches->set($branch['id'], array(\n 'ready' => 1,\n 'revision' => $current_revision\n ));\n\n // OK, checkout to master.\n \\Utils::gitCommand('checkout master');\n }", "function getRemoteField(){\n\t\treturn $this->remote_field;\n\t}", "function rvendor() {\n\t\t$this->checkOnce();\n\t\t$remotePath = $this->getVersionPath().'/';\n\t\t$this->system('scp -r -v -i '.$this->id_rsa.' vendor '.\n\t\t\t$this->remoteUser.'@'.$this->liveServer.':'.$remotePath);\n\t}", "public function getRemoteUrl();", "public function github(){\n\n\t\t$user = '';\n\t\tif(isset($this->request->get['user'])){\n\t\t\t$user = $this->request->get['user'];\n\t\t}\n\t\t$repo = '';\n\t\tif(isset($this->request->get['repo'])){\n\t\t\t$repo = $this->request->get['repo'];\n\t\t}\n\t\t$branch = '';\n\t\tif(isset($this->request->get['branch'])){\n\t\t\t$branch = $this->request->get['branch'];\n\t\t}\n\t\tnew d_shopunity\\GitHub($user, $repo, str_replace(\"catalog/\", \"\", DIR_APPLICATION), $branch );\n\t}", "public function sshUrl() : string\n {\n return sprintf(\n '%s@%s',\n $this->projectName(),\n $this->getOrError('frb_zone')\n );\n }", "public function bitbucket() {\n\n\t\t$user = '';\n\t\tif(isset($this->request->get['user'])){\n\t\t\t$user = $this->request->get['user'];\n\t\t}\n\t\t$pass = '';\n\t\tif(isset($this->request->get['pass'])){\n\t\t\t$pass = $this->request->get['pass'];\n\t\t}\n\t\t$repo = '';\n\t\tif(isset($this->request->get['repo'])){\n\t\t\t$repo = $this->request->get['repo'];\n\t\t}\n\t\t$branch = '';\n\t\tif(isset($this->request->get['branch'])){\n\t\t\t$branch = $this->request->get['branch'];\n\t\t}\n\t\t$owner = '';\n\t\tif(isset($this->request->get['owner'])){\n\t\t\t$owner = $this->request->get['owner'];\n\t\t}\n\n\t\tnew d_shopunity\\Bitbucket($user, $pass, $repo, str_replace(\"catalog/\", \"\", DIR_APPLICATION), $branch, $owner);\n\t}", "function brv_host()\n{\n return str_replace(HOST_TOKEN, DEBUG ? DEV_HOST : HOST, MAIN_HOST);\n}", "private function get_repository_info() {\n if ( is_null( $this->github_response ) ) {\n $request_uri = sprintf( 'https://api.github.com/repos/%s/%s/releases', $this->username, $this->repository );\n\n $response = json_decode( wp_remote_retrieve_body( wp_remote_get( $request_uri ) ), true );\n if( is_array( $response ) ) {\n $response = current( $response );\n }\n $this->github_response = $response;\n }\n }", "function check_branch($appid,$steamcmd) { \t\n \n$cmd = \"$steamcmd +app_info_update 1 +app_info_print $appid +quit 2>/dev/null\"; \n$data= shell_exec($cmd);\nfile_put_contents(\"$appid.txt\",$data);\n$kv = VDFParse(\"$appid.txt\");\nunlink(\"$appid.txt\");\nreturn $kv[$appid]['depots']['branches']; // just send the branches back\n}", "function do_pull($key,$url,$path) {\n $cmd = \"ssh-agent bash -c 'cd $path; ssh-add $key; git reset --hard; git pull' 2>&1\";\n _log(\"Exec command: $cmd\\n\");\n return shell_exec($cmd);\n}", "public function getMasterRabbit()\n {\n return $this->rabbitConn;\n }", "public function repo($dir, $remote);", "public function getBranch($branch_id) {\r\n\r\n $sql = \"SELECT name FROM branch WHERE id=?\";\r\n\r\n $stmt = $this->connect()->prepare($sql);\r\n\r\n $stmt->execute([$branch_id]);\r\n\r\n return ($stmt->fetch());\r\n }", "public function get_id() {\n return 'remote';\n }", "public function getTargetCommitish() : string\n {\n return $this->targetCommitish;\n }" ]
[ "0.65224206", "0.6259599", "0.62317294", "0.6191133", "0.6075909", "0.60703236", "0.60518396", "0.60518396", "0.6004127", "0.59335285", "0.58949876", "0.57196635", "0.5704866", "0.5616115", "0.5611877", "0.56028503", "0.55625117", "0.55576104", "0.5553211", "0.5515577", "0.5510284", "0.55096215", "0.54939276", "0.5482094", "0.54737115", "0.5461102", "0.5435713", "0.54339963", "0.5423268", "0.5421476", "0.542063", "0.5418692", "0.5410088", "0.5398276", "0.53978103", "0.5391137", "0.5365821", "0.5358728", "0.5349163", "0.534776", "0.53457", "0.53420436", "0.533527", "0.53189695", "0.52444845", "0.51847744", "0.51498705", "0.5145513", "0.5126269", "0.5095924", "0.50763166", "0.5073093", "0.50689656", "0.50488347", "0.50433755", "0.50415564", "0.5037375", "0.5033625", "0.50301397", "0.50222665", "0.5017839", "0.50166404", "0.5012795", "0.50117743", "0.5009326", "0.49935788", "0.49918237", "0.4985363", "0.4980984", "0.4980537", "0.4980537", "0.4980537", "0.49802318", "0.49711922", "0.496646", "0.49660024", "0.49627015", "0.49624568", "0.4947359", "0.49372834", "0.4929902", "0.49291623", "0.49246317", "0.4920043", "0.4918318", "0.49045876", "0.49042946", "0.48973587", "0.48895356", "0.4888999", "0.48818737", "0.48802984", "0.48798284", "0.48732296", "0.48729444", "0.48696077", "0.4863011", "0.48612484", "0.48575646", "0.48561266" ]
0.7209364
0
Get the git URL
Получить URL git
public function gitUrl() : string { return sprintf( '%s@%s:%s.git', $this->projectName(), $this->getOrError('frb_zone'), $this->projectName() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_url(){\n\n\t\t\treturn $this->api_urls['giturl'];\n\n\t\t}", "public function getCommitUrl(): string\n {\n return $this->data->url;\n }", "public function get_github_url() {\n\t\treturn $this->get_meta( 'github_url' );\n\t}", "function getUrl() {\n\t\treturn $this->repoObj->lobUrltitle;\n\t}", "protected function getProjectFromRemote(): string\n {\n $process = new Process((array) 'git config --get remote.origin.url');\n $process->run();\n $remote_url = trim($process->getOutput());\n preg_match('#.*\\/(.*)\\.git$#', $remote_url, $matches);\n return $matches[1] ?? '';\n }", "private static function git_origin(): ?string {\n\t\tif ( ! self::$root_path ) {\n\t\t\treturn null;\n\t\t}\n\t\t$cmd = 'git -C ' . escapeshellarg( self::$root_path ) . ' remote get-url origin';\n\t\t$response = exec( $cmd );\n\t\treturn $response ?: null;\n\t}", "public function get_bitbucket_auth_url(){\n\t\tif( empty($this->unauth_token) ){\n\t\t\t$this->request_unauth_token();\n\t\t}\n\t\t\n\t\t$auth_req = OAuthRequest::from_consumer_and_token($this->consumer, $this->unauth_token, \"GET\", $this->oauth_urls['login']);\n\t\t$auth_req->sign_request($this->signature_method, $this->consumer, $this->unauth_token);\n\t\treturn $auth_req->to_url();\n\t}", "public function getRepositoryUrl() {\n\t\t\t// we need to clean the combination of the 2 again because if the subfolder is empty in the config\n\t\t\t// then this will result in 2 slashes\n\t\t\treturn File::getCleanedPath($this->config->svn->getRoot() . $this->config->svn->getSubfolder());\n\t\t}", "public function getAccessUrl(GitRepository $repository) {\n $serverName = $_SERVER['SERVER_NAME'];\n $user = UserManager::instance()->getCurrentUser();\n return $user->getUserName() .'@'. $serverName .':/gitroot/'. $repository->getProject()->getUnixName().'/'.$repository->getName().'.git';\n }", "public function getSvnRepoUri()\n {\n return $this->_svnRepoUri;\n }", "public function getURL(): string\n {\n return $this->http->getURL();\n }", "public function getRemoteAccessUrl($commit=null)\n {\n $conf = $this->getConf();\n $scm = $conf->getVal('scm', 'git');\n $scms = Pluf::f('allowed_scm');\n Pluf::loadClass($scms[$scm]);\n return call_user_func(array($scms[$scm], 'getAnonymousAccessUrl'),\n $this, $commit);\n }", "private function getJenkinsUrl()\n {\n $jenkins_location = $this->app['config']['jenkins']['location'];\n $jenkins_user = $this->app['config']['jenkins']['api_user'];\n $jenkins_token = $this->app['config']['jenkins']['api_token'];\n\n $jenkins_protocol = 'http';\n $jenkins_host = $jenkins_location;\n\n if(preg_match('/^(.*):\\/\\/(.*)$/', $jenkins_location, $matches)) {\n $jenkins_protocol = $matches[1];\n $jenkins_host = $matches[2];\n }\n\n $jenkins_host = rtrim($jenkins_host, '/') . '/';\n\n $jenkins_http_auth_string = '';\n if(!empty($jenkins_user) && !empty($jenkins_token)) {\n $jenkins_http_auth_string = $jenkins_user . ':' . $jenkins_token . '@';\n }\n\n $jenkins_url = $jenkins_protocol . '://' . $jenkins_http_auth_string . $jenkins_host;\n\n return $jenkins_url;\n }", "public function getGitCloneLocation()\n {\n return $this->gitCloneLocation;\n }", "public function git_repository()\n\t{\n\t\texec( 'cd ' . $this->theme_dir . '; git remote -v', $remotes );\n\n\t\tpreg_match( '#origin[\\s\\t]+git@github.com\\:([^\\.]+)#', $remotes[0], $matches );\n\n\t\t$remote = $matches[1];\n\n\t\treturn $remote;\n\t}", "public function getURL(): string\n {\n return $this->url.$this->apiVersion.'/';\n }", "public function getGitRepository(): string\n {\n return 'https://github.com/Sylius/Sylius.git';\n }", "public function get_url(): string\n {\n return $this->get_url_internal();\n }", "private function generateUrl() : string\n {\n return $this->apiUrl.$this->ownerRepo.$this->branchPath.$this->branch;\n }", "protected function get_url()\n {\n return $this->base_url + $this->api_version; \n }", "protected function getTokenUrl()\n {\n return 'https://bitbucket.org/site/oauth2/access_token';\n }", "public function getURL ();", "public function getURL();", "public function getURL();", "private function _fetchGitRepository($url, $ref = 'master')\n\t{\n\t\t// Create a Git repository object within the system tmp folder for the url.\n\t\t$root = sys_get_temp_dir() . md5($url);\n\n\t\t// If the folder doesn't exist attempt to create it.\n\t\tif (!is_dir($root))\n\t\t{\n\t\t\tmkdir($root, 0777, true);\n\t\t}\n\n\t\t// Instantiate the repository object.\n\t\t$repo = new PackagerGitRepository($root);\n\n\t\t// Only clone the repository if it doesn't exist.\n\t\tif (!$repo->exists())\n\t\t{\n\t\t\t$repo->create();\n\t\t}\n\n\t\t// Get a clean checkout of the branch/tag required.\n\t\t$repo->fetch()\n\t\t\t->branchCheckout($ref)\n\t\t\t->clean();\n\n\t\treturn $root;\n\t}", "public function get_url () {\r\n\t\treturn $this->url;\r\n\t}", "protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }", "public function get_url() {\n\t\treturn $this->url;\n\t}", "public function get_url() {\n\t\treturn $this->url;\n\t}", "protected function getUrl(): string\n {\n return $this->url;\n }", "public static function get_baseurl()\n {\n }", "public function getRemoteUrl();", "public function getURL() {\n\t\treturn $this->urlStub() .'/' . $this->publicContainer .'/' . $this->getId();\n\t}", "protected function url()\n\t{\n\t\treturn Phpfox::getLib('url');\t\n\t}", "public function getUrl() {\n\t\treturn $this->rawUrl;\n\t}", "public function getURL()\n {\n return $this->finalURL;\n }", "public function get_url()\n {\n return $this->url;\n }", "function config_from_git($git_sources)\n{\n\tglobal $branch, $revision, $commit_url;\n\n\t// only run git stuff, if sources exist, are git and git cli is available\n\tif (@file_exists($git_sources.'/.git') && !exec(\"hash git 2>/dev/null\"))\n\t{\n\t\t$branch = trim(exec(\"cd $git_sources >/dev/null 2>&1 && git branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e \\\"s/* \\(.*\\)/\\\\1/\\\"\"));\n\t\t$revision = exec(\"cd $git_sources >/dev/null 2>&1 && git rev-parse --short HEAD &2>/dev/null\");\n\t\t$matches = null;\n\t\tif (empty($commit_url) &&\n\t\t\t($remote = exec(\"cd $git_sources >/dev/null 2>&1 && git remote -v &2>/dev/null\")) &&\n\t\t\tpreg_match('/(git@github.com:|https:\\/\\/github.com\\/)(.*)\\.git/i', $remote, $matches))\n\t\t{\n\t\t\t$commit_url = 'https://github.com/'.$matches[2].'/commit/';\n\t\t}\n\t\t//error_log(__METHOD__.\"('$git_sources') branch='$branch', revision='$revision', commit_url='$commit_url'\");\n\t}\n\t// get revision from request\n\telseif (!empty($_REQUEST['revision']) && preg_match('/^[0-9a-f]+$/', $_REQUEST['revision']))\n\t{\n\t\t$revision = $_REQUEST['revision'];\n\t}\n}", "static public function getURL() {\n\t\treturn self::$url;\n\t}", "public function getUrl(): string\n {\n $query = $this->getQuery();\n return\n $this->getScheme() .\n '://' .\n $this->getHostAndPort() .\n $this->getRoot() .\n $this->getPath() .\n (!empty($query) ? '?' . http_build_query($query) : '');\n }", "public function get_url();", "protected function getUrl() {\r\n\t\treturn $this->url;\r\n\t}", "public function url() {\n return $this->info['url'];\n }", "public function getUrl(): string\n {\n return $this->url;\n }", "public function getUrl(): string\n {\n return $this->url;\n }", "public function get_ssh_url(): ?string;", "public function getUrl() : string\n {\n return $this->url;\n }", "public function getUrl() : string\n {\n return $this->url;\n }", "public static function getCloneUrl($module_name) {\n\n $module_path = conf::pathModules() . \"/$module_name\";\n if (!file_exists($module_path)) {\n common::echoStatus('NOTICE', 'y', \"module $module_name has no module source\");\n return false;\n }\n\n $command = \"cd $module_path && git config --get remote.origin.url\";\n $ret = common::execCommand($command, array('silence' => 1), 0);\n if ($ret == 0) {\n $git_url = shell_exec($command);\n return trim($git_url);\n }\n return false;\n }", "protected function getGitRevision() {}", "public function get_urlChannel () {\r\n\t\treturn $this->get_info()['author_url'];\r\n\t}", "abstract protected function getGitCommand(): string;", "public function getUrl() {\n return $this->get(self::URL);\n }", "public function GetURL() {\n\n return $this->URL;\n }", "public function url(): string\n {\n return $this->url;\n }", "public function url(): string\n {\n return $this->url;\n }", "public function getURL() {\n\t\treturn $this->url;\n\t}", "public function getURL() {\n return $this->apiURL . $this->endPoint . $this->storeID . $this->jsonFile;\n }", "public static function url(): string\n\t{\n\t\treturn static::$url;\n\t}", "public function getUrl(): string {\n\t\treturn $this->_url;\n\t}", "protected static function getGitDir() {\n\t\tif ( !self::$gitDir ) {\n\t\t\t$conf = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( \"MABS\" );\n\t\t\tself::$gitDir = $conf->get( Config::REPO );\n\t\t}\n\t\treturn self::$gitDir;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function GetUrl() {\n return $this->url;\n }", "public function getUrl()\r\n\t{\r\n\t\treturn $this->url;\r\n\t}", "public function getUrl(): string {\n return $this->url;\n }", "public function getUrl() {\n\t\t$url = $this->getBaseUrl().$this->getBasePath().$this->getOperation();\n\t\t$params = http_build_query($this->getUrlParameters());\n\t\tif ($params) {\n\t\t\t$url .= '?'.$params;\n\t\t}\n\t\treturn $url;\n\t}", "protected function getUrl() {\n return $this->url;\n }", "public function getUrl()\n\t{\n\t\t$url = strtolower($this->_name);\n\t\t$url = str_replace(' ', '-', $url);\n\t\t$url = str_replace('&-', '', $url);\n\n\t\t# retrieves a sanitized url from the project name :3\n\t\treturn $this->getId() . DIRECTORY_SEPARATOR . $url;\n\t}", "public function url()\n {\n return $this->factory->getUrl($this->handle);\n }", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function get_url()\n {\n return $this->_url;\n }", "public function get_url()\n {\n return $this->_url;\n }", "public function url()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse\n\t\t{\n\t\t\t$url = $this->generateString();\n\t\t\treturn htmlentities( $url );\n\t\t}\n\t}", "public static function github()\n {\n return 'github';\n }", "public function getUrl()\n {\n return $this->_urlBuilder->getUrl();\n }", "public abstract function getURL();", "public function getUrl()\n {\n return rtrim(empty($this->_config['url']) ? self::URL : $this->_config['url'], '/') . '/';\n }", "public function getUrl(): string\n {\n return self::URL;\n }", "public function getUrl()\n {\n return WEB_SERVER_BASE_URL . '/badges/' . $this->data['id'];\n }", "public function getURL() { return $this->url; }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }" ]
[ "0.86241466", "0.7903098", "0.74523854", "0.73158497", "0.6870565", "0.67854977", "0.675056", "0.6714888", "0.6662214", "0.6629114", "0.6623352", "0.66135496", "0.65533596", "0.6542594", "0.65313685", "0.65038073", "0.6503157", "0.6480044", "0.6426344", "0.6394495", "0.63870734", "0.6379639", "0.63789773", "0.63789773", "0.6363002", "0.6353388", "0.63146776", "0.6310874", "0.6310874", "0.6306059", "0.6291732", "0.62676054", "0.62624496", "0.6243073", "0.6225512", "0.6220117", "0.62188673", "0.62142676", "0.6212489", "0.619846", "0.6195273", "0.6193709", "0.61927104", "0.61867267", "0.61867267", "0.6182049", "0.6161312", "0.6161312", "0.61564684", "0.6153281", "0.6150563", "0.6147481", "0.61450773", "0.6143537", "0.6136141", "0.6136141", "0.6126285", "0.6116946", "0.6097556", "0.6095677", "0.60910565", "0.608295", "0.608295", "0.608295", "0.6074327", "0.60722256", "0.60707635", "0.6064451", "0.6058893", "0.60541093", "0.6044543", "0.6033581", "0.6033581", "0.6033581", "0.6033581", "0.6033581", "0.60282147", "0.60282147", "0.60154593", "0.60127664", "0.60091335", "0.60082614", "0.600648", "0.6003754", "0.59990346", "0.59958166", "0.59881836", "0.59881836", "0.59881836", "0.59881836", "0.59881836", "0.59881836", "0.59881836", "0.59881836", "0.59881836", "0.59881836", "0.59881836", "0.59881836", "0.59881836", "0.59881836" ]
0.7926891
1
Get the fortrabbit remote name
Получить имя удаленного fortrabbit
public function fortrabbitRemoteName() : string { return 'frb-' . $this->environment(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getName(): string\n {\n return 'centreon_configuration_remote';\n }", "public function getRemoteAddress()\n {\n return stream_socket_get_name($this->socket, true);\n }", "public function getReceiverName()\n {\n return $this->get(self::_RECEIVER_NAME);\n }", "public function get_id() {\n return 'remote';\n }", "public function getName()\n {\n return 'travelbase.getHost';\n }", "public function getRemote();", "public function getOrigBrokerName() {}", "public function getName():string\n\t{\n\t\treturn $this->channelName;\n\t}", "public function getRemoteAddress()\n {\n return $this->getKey('RemoteAddress');\n }", "public function getRemoteIdentifier()\n {\n if (array_key_exists(\"remoteIdentifier\", $this->_propDict)) {\n return $this->_propDict[\"remoteIdentifier\"];\n } else {\n return null;\n }\n }", "public function getPeerName()\n {\n return $this->peerName;\n }", "public function getHostName()\n {\n return $this->_hostName;\n }", "public function clientGetname() {\n return $this->returnCommand(['CLIENT', 'GETNAME']);\n }", "function getHostName() {\n\t\treturn $this->hostInfo[0]['dc'][0];\n\t}", "public function getIncomingMailServerDisplayName() {\n\t\treturn $this->ic_mail_server_displayname;\n\t}", "public function getDeviceName() { \n if ($this->name) {\n return $this->name; \n }\n if (is_array($this->rawData)) {\n $this->name = $this->rawData[\"host name\"];\n if (!$this->name) { \n $this->name = $this->rawData[\"имя хоста\"];\n }\n }\n return $this->name;\n }", "public static function getCliName();", "public function getName() {\n\t\treturn $this->selectedEndpoint['name'];\n\t}", "function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}", "public function hostname() {\n $host = $this->client(\"origin\")?? $this->client(\"host\")?? $this->uri(\"host\");\n $host = parse_url($host);\n\n return $host[\"host\"]?? $host[\"path\"];\n }", "public function getHost(): string\n {\n return (string)$this->getEnvKey('SERVER_NAME');\n }", "static function Name()\n {\n return self::Variable('SERVER_NAME');\n }", "protected function getOriginName()\n {\n return $this->container->getParameter('tenside.self_update.origin_name');\n }", "public function getNomConnecter()\n\t{\n\n\t\treturn $this->nom;\n\t}", "public function getVhost(): string\n {\n }", "public function getGearmanHost() : string\n {\n return $this->gearmanHost;\n }", "public function getNickname(): string {\n return $this->nickname;\n }", "public function getAcquiaHostedMachineName() {\n $sub_data = $this->config('acquia_connector.settings')->get('subscription_data');\n\n if ($this->checkAcquiaHosted() && $sub_data) {\n $uuid = new StatusController();\n $sub_uuid = str_replace('-', '_', $uuid->getIdFromSub($sub_data));\n\n return $sub_uuid . '__' . $_SERVER['AH_SITE_NAME'];\n }\n }", "public function getFromName() : string {\n return $this->_fromName;\n }", "public function getRemote()\n {\n return $this->remote;\n }", "public function get_nameChannel () {\r\n\t\treturn $this->get_info()['author_name'];\r\n\t}", "public function clientNickname()\n {\n return $this->bean->client()->nickname;\n }", "function getFromName(){\n\t\t\treturn $this->from_name;\n\t\t}", "public function getGiftcardSenderName();", "public function getCustomNetHost() {\n return (string) $this->getValue('customnethost');\n }", "function title_hostname()\n {\n $port = config('srcds', 'port');\n if (!$port || $port == config('valve', 'default_port', '27015')) {\n $hostname = config('srcds', 'hostname');\n } else {\n $hostname = config('srcds', 'hostname') . \":$port\";\n }\n return $hostname;\n }", "public function getName() : string\n {\n return $this->url;\n }", "public function getHost(): string\n {\n return $this->configuration[ConfigurationInterface::HOST];\n }", "public function getNomeServidor()\n {\n return $this->nome_servidor;\n }", "public function getHost(): string;", "public function getFromName()\n\t{\n\t\treturn $this->from_name;\n\t}", "public function name()\n {\n $response = SubstrateBase::APIHandler('system_'.__FUNCTION__);\n $this->_name = $response['result'];\n return response()->json($this->_name);\n }", "public function getName()\n {\n return 'Deploy via remote cached git repository [built-in]';\n }", "public function getSenderName()\n {\n return $this->get(self::_SENDER_NAME);\n }", "public function get_hostname() {\n\t\treturn $this->hostname;\n\t}", "public function getHost() {\n\t\treturn $this->netxHostname;\n\t}", "public function getNickname()\n {\n return $this->nickname;\n }", "public function getNickname()\n {\n return $this->nickname;\n }", "public function getNickname()\n {\n return $this->nickname;\n }", "public function getNickname()\n {\n return $this->nickname;\n }", "public function getNickname()\n {\n return $this->nickname;\n }", "function getInternetName() {\n\n // get the full computer name of the current object (for instance : forge.indepnet.net)\n return self::getInternetNameFromLabelAndDomainID($this->fields[\"name\"],\n $this->fields[\"fqdns_id\"]);\n }", "public function getHost(): string\n {\n return (string) $this->host;\n }", "function getUserName() {\n return $this->userName . \".guest\";\n }", "public function getSshUsername() : string {\n return $this->sshUser;\n }", "protected function generateMachineName() {\n return $this->args['machine_name'];\n }", "public function getHost(): string {\n return $this->context->host;\n }", "public function getHost(): string\r\n {\r\n return $this->host;\r\n }", "public function getResourceMachineName();", "public function getBotName()\n {\n return $this->_botName;\n }", "public function getNickname() {\n return $this->nickname;\n }", "protected function getRemoteServerUrl(){\n return rtrim(@$this->params['server']);\n }", "final public function getHostname() {\n \t\treturn $this->host;\n }", "public function getHost();", "public function getHost();", "public function getHost();", "public function getHost();", "public function getHost();", "public function getHost();", "public function getRealname()\n {\n return $this->realname;\n }", "public function remoteBranch() : string\n {\n return (string) $this->getOrError('remote_branch');\n }", "function getRemoteField(){\n\t\treturn $this->remote_field;\n\t}", "protected function getCurrentOwner(): string\n {\n return $this->redis->get($this->name);\n }", "public function sshUrl() : string\n {\n return sprintf(\n '%s@%s',\n $this->projectName(),\n $this->getOrError('frb_zone')\n );\n }", "public function hostname()\n {\n return $this->globals->server()[\"SERVER_NAME\"];\n }", "public function getNickname()\n {\n return $this->_nickname;\n }", "public function getHostname()\n {\n return $this->get(self::HOSTNAME);\n }", "public function getHost() {}", "public function getHost() {}", "public static function get_hostname() {\n\t\treturn '';\n\t}", "public function getHOSTNAME()\n {\n return $this->HOSTNAME;\n }", "public function getInstanceName(): string\n {\n return $this->instanceName;\n }", "public function getName(){\n return $this->game->get_current_turn()->ReturnName();\n }", "public function gethostname()\n\t{\n\t\t// PHP appears to shell directly out to the system `hostname`\n\t\t// ...which differs in implementation between distros\n\t\t// The -f option ensures the FQDN is returned\n\t\t// NOTE: This may encounter issues with lxc when the hostname is not set properly\n\t\treturn \\trim($this->shell_exec('hostname -f'));\n\t}", "public function get_name() {\n return \\enrol_oes_string::display('sync_taskname');\n }", "public function getHost(): string {\n return $this->host;\n }", "public function getHostname()\n {\n return $this->hostname;\n }", "public function getHostname()\n {\n return $this->hostname;\n }", "public function getHostname()\n {\n return $this->hostname;\n }", "public function getPortName()\n {\n return isset($this->port_name) ? $this->port_name : '';\n }", "public function getPortName()\n {\n return isset($this->port_name) ? $this->port_name : '';\n }", "public function getname(){\n \t//return $this->msg;\n \treturn $this->phone;\n }", "public function getQueueName();", "function _gethostname($id)\n{\n\t$hostname = '';\n\t$_GET['file'] = 'server.cfg';\n\t$data = getfile($id);\n\t\n\tif ( $find = stristr($data, 'sv_hostname') )\n\t{\n\t\t$find = str_split(substr($find, 11, strlen($find) - 11) );\n\t\t$chr = '';\n\t\twhile ($chr != \"\\n\")\n\t\t{\n\t\t\tif ($chr = next($find))\n\t\t\t\t$hostname .= $chr;\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn _getcolorname($hostname);\n}", "final public function getHost(): string {}", "function socket_human($socket, $remote = FALSE)\n {\n $host = '';\n $port = 0;\n $remote ? socket_getpeername($socket, $host, $port)\n : socket_getsockname($socket, $host, $port);\n return \"${host}:${port}\";\n }", "public function getMachineName()\n {\n return $this->machineName;\n }", "function getServerName() {\n\t\treturn $this->getParam(self::PARAM_SERVER_NAME);\n\t}", "public function getName() {\n\n list(,$name) = URLUtil::splitPath($this->principalInfo['uri']);\n return $name;\n\n }", "public function getName(): string\n {\n return session_name();\n }" ]
[ "0.63912964", "0.6318805", "0.62839437", "0.61415905", "0.60348165", "0.601217", "0.60069597", "0.5983146", "0.5963327", "0.5961428", "0.5937357", "0.5915767", "0.5899417", "0.5898476", "0.5893659", "0.5887986", "0.5887931", "0.5878322", "0.5876887", "0.5869484", "0.58655125", "0.58468276", "0.58232176", "0.5819744", "0.58188015", "0.5808551", "0.58059466", "0.5793012", "0.57902634", "0.57853514", "0.57612413", "0.5745988", "0.5738648", "0.5732611", "0.5722059", "0.5720794", "0.5708211", "0.569309", "0.5692343", "0.568359", "0.5658045", "0.565374", "0.5653384", "0.5648773", "0.5645677", "0.56316435", "0.5627263", "0.5627263", "0.5627263", "0.5627263", "0.5627263", "0.5622796", "0.56218076", "0.5621593", "0.5608836", "0.56070584", "0.56028557", "0.5594782", "0.5592063", "0.55885994", "0.5587956", "0.5586502", "0.55864805", "0.5585653", "0.5585653", "0.5585653", "0.5585653", "0.5585653", "0.5585653", "0.5581687", "0.55793375", "0.55668896", "0.55650544", "0.55619824", "0.55619526", "0.55565137", "0.555344", "0.55520535", "0.55520535", "0.55459803", "0.5534598", "0.5532237", "0.55311626", "0.5530979", "0.5526736", "0.55245805", "0.5523469", "0.5523469", "0.5523469", "0.55197316", "0.55197316", "0.55154794", "0.5513147", "0.5508673", "0.550735", "0.550348", "0.5497662", "0.5493982", "0.5492277", "0.54892117" ]
0.80864376
0
/Add nutrition Category form
/Добавить категорию питания
public function addNutrationCategory() { return view('admin.addnutratoncategory'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add()\n {\n $category = new stdClass();\n $category->category_id = null;\n $category->name = null;\n $data = [\n 'page' => 'add',\n 'row' => $category\n ];\n $this->template->load('template', 'product/category/category_add', $data);\n }", "function add_new_category()\n\t{\n\t\t$this->data['title'] \t= 'Add New Portfolio Category';\n\t\t$this->data['css'] \t\t= 'body/admin/css/form_style_default';\n\t\t$this->data['js'] \t\t= 'body/admin/js/form_style_default';\n\t\t$this->data['content'] \t= 'content/admin/portfolio/add_new_category';\n\t\t$this->load->view('body/admin/style_1', $this->data);\n\t}", "public function add_category()\n {\n \n if(isset($_POST['category_name']) && isset($_POST['category_desc'])){\n\t\t \n\t\t \n\t\t $query = $this->Product_model->add_category();\n\t\t\t if($query){\n\t\t\t\t \n\t\t\t\t echo 'added';\n\t\t\t\t }else{\n\t\t\t\t\t \n\t\t\t\t\t echo 'error';\n\t\t\t\t\t }\n\t\t \n\t\t }\n \n }", "public function add_category() {\n $this->category();\n $this->loadView(\"editors/category_editor\");\n }", "public function category_add() {\n\t\t// Setup validation\n\t\t$this->data['validation'] = \"\";\n\t\t$this->data['category']\t= array('name' => '', 'url_name' => '');\n\t\t\n\t\t// Handle POST\n\t\tif ($this->mojo->input->post('category')) {\n\t\t\t// Get the category data\n\t\t\t$this->data['category']\t= $this->mojo->input->post('category');\n\t\t\t\n\t\t\t// Insert it!\n\t\t\tif ($this->mojo->blog_model->insert_category($this->data['category'])) {\n\t\t\t\t// It's success\n\t\t\t\t$response['result'] = 'success';\n\t\t\t\t$response['reveal_page'] = site_url('admin/addons/blog/categories_all');\n\t\t\t\t$response['message'] = 'Successfully created category';\n\t\t\t\t\n\t\t\t\texit($this->mojo->javascript->generate_json($response));\n\t\t\t} else {\n\t\t\t\t// There have been validation errors\n\t\t\t\t$response['result'] = 'error';\n\t\t\t\t$response['message'] = $this->mojo->blog_model->validation_errors;\n\t\t\t\t\n\t\t\t\t// Output the response\n\t\t\t\texit($this->mojo->javascript->generate_json($response));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Show the view\n\t\t$this->_view('category_add');\n\t}", "public function add_category() {\n\t $this->use_layout=false;\n\t\t$this->model = new $this->model_class(WaxUrl::get(\"id\"));\n\t\t$category = new CmsCategory(substr($_POST[\"id\"], 4));\n\t\t$this->model->categories = $category;\n\t\tif(!$this->attached_categories = $this->model->categories) $this->attached_categories= array();\n\t\t$cat = new CmsCategory;\n\t\tif(!$this->all_categories = $cat->all() ) $this->all_categories=array();\t\t\n\t\t$this->cat_partial = $this->render_partial(\"list_categories\");\n\t}", "public function addCategory(){ \n $cookies = new CookieModel();\n $cookie_id = $cookies -> read();\n if (! $cookie_id) $this->redirect('/');\n\n\t \t$name = $_REQUEST['name'];\n $father = $_REQUEST['father'];\n\t\t\t$form = M(\"categoryinfo\");\n\t\t\t$addnew['name'] = $name;\n $addnew['father'] = $father;\n\t\t\t$result = $form->add($addnew);\n\t\t\t$this->redirect('/index.php/Admin/dish');\n\t\t\t\t//else {$this->error('添加失败');}\n }", "function CategoryForm() {\r\n\r\n\t\t$member = Member::currentUser();\r\n\r\n\t\t// Need to sort out how going to handle multiple instances of category\r\n\t\t// front end grid field : https://github.com/webbuilders-group/silverstripe-frontendgridfield\r\n\t\t// grid field extension : https://github.com/silverstripe-australia/silverstripe-gridfieldextensions\r\n\t\t$category = Category::get()->first();\r\n\t\t$fields = $category->FormFields();\r\n\r\n $actions = FieldList::create(\r\n FormAction::create(\"doCategoryForm\")->setTitle(\"Submit\")->addExtraClass('productive'),\r\n FormAction::create(\"cancel\")->setTitle(\"Cancel\")\r\n );\r\n\r\n $form = Form::create($this, 'CategoryForm', $fields, $actions);\r\n\r\n return $form;\r\n\r\n\t}", "public function category_add() {\n $this->autoRender = false;\n $params = $this->request->data;\n //echo \"<pre>\";print_r($params);echo \"</pre>\"; exit;\n $categoryTable = TableRegistry::get('SkillCategory');\n $getCategory = $categoryTable->find()->select(['id'])->where(['category_name' => $params['category_name']])->toArray();\n if(empty($getCategory)){\n $category = $categoryTable->newEntity($params);\n if ($categoryTable->save($category)) {\n echo json_encode(\n [\n 'status' => 1,\n 'message' => \"Skill Category Added!\",\n ]\n );\n exit;\n }\n }else{\n echo json_encode(\n [\n 'status' => 0,\n 'message' => \"Skill Category Already Exists!\",\n ]\n );\n exit;\n }\n \n }", "public function add_acct_category(){\n\t\t//restricted this area, only for admin\n\t\tpermittedArea();\nif($user['role'] == 'admin')\n\t\t{\n\t\t\t$data['ledger1'] = $this->db->get_where('acct_categories', ['category_type' => 'Main']);\n\t\t\t\n\t\t}\n\t\tif($this->input->post())\n\t\t{\n\t\t\tif($this->input->post('submit') != 'add_acct_category') die('Error! sorry');\n\n\t\t\t$this->form_validation->set_rules('category_name', 'Category Name', 'required|trim');\n\t\t\t$this->form_validation->set_rules('visible', 'Access To Payspecifications', 'required|trim');\n\n\t\t\tif($this->form_validation->run() == true)\n\t\t\t{\n\t\t\t\t$insert = $this->ledger_model->add_acct_category();\n\t\t\t\tif($insert)\n\t\t\t\t{\n\t\t\t\t\t$this->session->set_flashdata('successMsg', 'Accounts Category Created Successfully...!!!');\n\t\t\t\t\tredirect(base_url('ledger'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\ntheme('add_acct_category');\n\t}", "public function addAction()\n {\n $manager = $this->getDI()->get('core_category_manager');\n $this->view->form = $manager->getForm();\n }", "public function categoryForm(){\n $table = \"categories\";\n $cresults = $this->getAllrecords($table);\n foreach($cresults as $category){\n echo('<option value=\"'.$category[\"cat_id\"].'\">'.$category[\"cat_name\"].'</option>');\n }\n\n\n }", "public function new_category() {\n\t\t$this->use_layout=false;\n\t\t$cat = new CmsCategory;\n\t\t$cat->name = Request::get(\"cat\");\n\t\t$cat->save();\n\t\tif(!$this->all_categories = $cat->clear()->all()) $this->all_categories=array();\t\t\n\t\t$this->cat_list = $this->render_partial(\"cat_list\");\t\n\t}", "public function addDietaryCategory(){\n \t$id = $this->formValueForKey(\"dietaryCategorySelection\");\n \t \n \t$foundDietaryCategory = BLGenericRecord::recordMatchingKeyAndValue(\"DietaryCategory\", \"id\", $id);\n \t$this->currentRecipe()->addDietaryCategory($foundDietaryCategory);\n }", "public function add(){\n\t\t\t\n\t\t\trequire_once('views/category/add.php');\n\t\t}", "public function addCathegory($values)\n\t{\n\t\treturn $this->getTable('kategoria')->insert(array(\n\t\t\t'Nazov' => $values->nazov,\n\t\t));\n\t}", "public function storeNutrationCategory(Request $request)\n {\n $this->validate($request,array(\n 'nutrationCategoryName' => 'required',\n //'tips' => 'required',\n ));\n\n $nutrationCategory = new NutrationCategory;\n\n $nutrationCategory->nutration_category_name = $request->nutrationCategoryName;\n //$nutrationCategory->tips = $request->tips;\n\n $nutrationCategory->save();\n\n if($nutrationCategory->save()){\n return redirect()->back()->with('success','Nutration category Saved successfully.');\n }\n else{\n return redirect()->back()->with('denger-success','Nutration category is not saved.');\n }\n \n }", "public function addAction()\n\t{\n\t\t$this->oView->box_title = \"Add Category\";\n\t\t$configure_languages = $this->oConfigureModule['configure_languages'];\n\t\t$this->oView->configure_languages = $configure_languages;\n\t\t$this->oView->link_url = site_url('dashboard/category/add');\n\t\t\n\t\tif ($this->oInput->isPost())\n\t\t{\n\t\t\t$objCat = new Category();\n\t\t\t\n\t\t\t$parent_code = $this->oInput->post('parent_code');\n\t\t\t$parent_id = 0;\n\t\t\t\n\t\t\tif (trim(strtolower($parent_code)) != \"root\") \n\t\t\t{\n\t\t\t\t$row = $objCat->getRow(\"code = ?\",array($parent_code));\n\t\t\t\t$parent_id = $row[\"id\"]; \n\t\t\t}\n\t\t\t\n\t\t\t$data['parent_id'] = $parent_id;\n\t\t\t$data['code'] = $this->oInput->post('code');\n\t\t\t$data['active'] = $this->oInput->post('active');\n\t\t\t$data['sort_order'] = $this->oInput->post('sort_order');\n\t\t\t\n\t\t\tforeach ($configure_languages['languages'] as $code => $row)\n\t\t\t{\n\t\t\t\t$data[\"name_{$code}\"] = $this->oInput->post(\"name_{$code}\");\n\t\t\t\t$data[\"description_{$code}\"] = $this->oInput->post(\"description_{$code}\");\n\t\t\t\t$data[\"icon_{$code}\"] = $this->oInput->post(\"icon_{$code}\");\n\t\t\t\t$data[\"image_{$code}\"] = $this->oInput->post(\"image_{$code}\");\n\t\t\t}\n\t\t\t\n\t\t\t$data['create_at'] = now_to_mysql();\n\t\t\t$last_id = $objCat->insert($data);\n\t\t\t\n\t\t\tredirect(\"dashboard/category/list\");\n\t\t}\n\n\t\t$this->renderView('dashboard/category/_form');\n\t}", "public function newAction()\n {\n\t\tTag::appendTitle('Add New Category');\n }", "public function addNutritionalBenefit(){\n \t$id = $this->formValueForKey(\"nutritionalBenefitSelection\");\n \n \t$foundNutritionalBenefit = BLGenericRecord::recordMatchingKeyAndValue(\"NutritionalBenefit\", \"id\", $id);\n \t$this->currentRecipe()->addNutritionalBenefit($foundNutritionalBenefit);\n }", "public function showCategoryForm() {\n $company_logo = $this->showLogoImage();\n $category_images = \\App\\CouponCategory::categoryList();\n $signup_category_images = \\App\\CouponCategory::categoryListWeb();\n $country_list = \\App\\Country::countryList();\n\n return view('frontend.signup.category')->with(['company_logo' => $company_logo,\n 'category_images' => $category_images, 'signup_category_images' => $signup_category_images,\n 'country_list' => $country_list]);\n }", "public function addcompanycategory(){\n $data = ['name'=> post('categoryname')];\n $this->Database->insert_data('companycategories',$data);\n flash('green','check',\"Kategoriya uğurla əlavə edildi.\");\n back();\n }", "function gtags_group_category_form() {\n\tglobal $bp, $show_group_add_form_cats;\t\n\tif ($show_group_add_form_cats) return; // prevents showing form twice\n\t$show_group_add_form_cats = true;\n\n\t// the group category\t\n\t$group_cats = get_option('gtags_category'); \n\tif (empty($group_cats)) return;\n\t\n\t$selected = groups_get_groupmeta( $bp->groups->current_group->id, 'gtags_group_cat' ); \n\t?><label for=\"group-cat\"><?php _e( 'Group Category', 'gtags' ) ?></label>\n\t<select name=\"group-cat\" id=\"group-cat\" />\n\t\t<option value=\"\"><?php _e('--- SELECT ONE ---', 'gtags') ?></option>\n\t<?php foreach ( $group_cats as $tag => $desc ): ?>\n\t\t<?php if ( !$desc ) $desc = $tag; ?>\n\t\t<option value=\"<?php echo $tag; ?>\" <?php if ( $tag == $selected ) echo 'selected=\"selected\"' ?>><?php echo $desc; ?></option>\n\t<?php endforeach; ?>\n\t</select>\n\t<i><?php _e('(the primary group activity)', 'gtags'); ?></i><br><?php \t\n}", "public function addAction()\n {\n $form = new CategoryForm();\n $form->get('submit')->setValue('Add');\n\n $request = $this->getRequest();\n if ($request->isPost()) {\n $category = new Category();\n $form->setInputFilter($category->getInputFilter());\n $form->setData($request->getPost());\n\n if ($form->isValid()) {\n $category->exchangeArray($form->getData());\n $this->getCategoryTable()->saveCategory($category);\n\n // Redirect to list of categorys\n return $this->redirect()->toRoute('category');\n }\n }\n return array('form' => $form);\n }", "public function add_category() {\n\t\n\t\tif($this->input->post('add_type')=='add_category') {\t\t\n\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t$Return = array('result'=>'', 'error'=>'', 'csrf_hash'=>'');\n\t\t$Return['csrf_hash'] = $this->security->get_csrf_hash();\n\t\t\t\n\t\t/* Server side PHP input validation */\t\t\n\t\tif($this->input->post('name')==='') {\n \t$Return['error'] = $this->lang->line('xin_error_cat_name_field');\n\t\t}\n\t\t\t\t\t\t\n\t\tif($Return['error']!=''){\n \t\t$this->output($Return);\n \t}\n\t\t\n\t\t// set data\n\t\t$data = array(\n\t\t'category_name' => $this->input->post('name'),\n\t\t'created_at' => date('d-m-Y h:i:s')\n\t\t);\n\t\t\n\t\t$result = $this->Assets_model->add_assets_category($data);\n\t\tif ($result == TRUE) {\n\t\t\t$Return['result'] = $this->lang->line('xin_success_assets_category_added');\n\t\t} else {\n\t\t\t$Return['error'] = $this->lang->line('xin_error_msg');\n\t\t}\n\t\t$this->output($Return);\n\t\texit;\n\t\t}\n\t}", "function display_addcategory_form($category_name='', $id='')\r\n{\r\n\tglobal $dropbox_cnf;\r\n\r\n\t$title=get_lang('AddNewCategory');\r\n\r\n\tif (isset($id) AND $id<>'')\r\n\t{\r\n\t\t// retrieve the category we are editing\r\n\t\t$sql=\"SELECT * FROM \".$dropbox_cnf['tbl_category'].\" WHERE cat_id='\".Database::escape_string($id).\"'\";\r\n\t\t$result=api_sql_query($sql);\r\n\t\t$row=mysql_fetch_array($result);\r\n\r\n\t\tif ($category_name=='') // after an edit with an error we do not want to return to the original name but the name we already modified. (happens when createinrecievedfiles AND createinsentfiles are not checked)\r\n\t\t{\r\n\t\t\t$category_name=$row['cat_name'];\r\n\t\t}\r\n\t\tif ($row['received']=='1')\r\n\t\t{\r\n\t\t\t$target='received';\r\n\t\t}\r\n\t\tif ($row['sent']=='1')\r\n\t\t{\r\n\t\t\t$target='sent';\r\n\t\t}\r\n\t\t$title=get_lang('EditCategory');\r\n\r\n\t}\r\n\r\n\tif ($_GET['action']=='addreceivedcategory')\r\n\t{\r\n\t\t$target='received';\r\n\t}\r\n\tif ($_GET['action']=='addsentcategory')\r\n\t{\r\n\t\t$target='sent';\r\n\t}\r\n\r\n\r\n\techo \"<form name=\\\"add_new_category\\\" method=\\\"post\\\" action=\\\"\".api_get_self().\"?view=\".$_GET['view'].\"\\\">\\n\";\r\n\techo '<strong>'.$title.'</strong>';\r\n\tif (isset($id) AND $id<>'')\r\n\t{\r\n\t\techo '<input name=\"edit_id\" type=\"hidden\" value=\"'.$id.'\">';\r\n\t}\r\n\techo '<input name=\"target\" type=\"hidden\" value=\"'.$target.'\">';\r\n\techo \"<table border=\\\"0\\\">\\n\";\r\n\techo \"\\t<tr>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo get_lang('CategoryName').': ';\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo \"<input type=\\\"text\\\" name=\\\"category_name\\\" value=\\\"\".$category_name.\"\\\" />\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t</tr>\\n\";\r\n\techo \"\\t<tr>\\n\";\r\n\techo \"\\t<td valign=\\\"top\\\">\\n\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo \"<input type=\\\"submit\\\" name=\\\"StoreCategory\\\" value=\\\"\".get_lang('Ok').\"\\\">\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t</tr>\\n\";\r\n\techo \"</table>\\n\";\r\n\techo \"</form>\";\r\n}", "public function add()\n {\n $category = $this->Category->newEntity();\n if ($this->request->is('post')) {\n $category = $this->Category->patchEntity($category, $this->request->getData());\n if ($this->Category->save($category)) {\n $this->Flash->success(__('The category has been saved.'));\n\n return $this->redirect(['action' => 'index']);\n }\n $this->Flash->error(__('The category could not be saved. Please, try again.'));\n }\n $this->set(compact('category'));\n }", "public function category()\n { \n if($this->access_role->is_Admin() == false) show_404();\n $this->load->model('Category_Model');\n \n if($_SERVER['REQUEST_METHOD'] == 'POST')\n {\n if($this->form_validation->run('category_insert') ){\n $this->Category_Model->add_category(); \n } else {\n $error = ['class'=>'warning','text'=> validation_errors()];\n $this->session->set_flashdata('sms_flash', $error); \n redirect('Dashboard/category');\n }\n } \n else{\n $data = $this->Category_Model->view_category();\n }\n \n $this->load->view('admin/category_content',$data);\n }", "public function add()\n\t{\n\t\t$data[\"icons\"] = $this->M_Icon->getAll();\n\t\t$data[\"title\"] = 'Tambah Kategori';\n\n\t\t$validation = $this->form_validation;\n\n\t\t$rules = [\n\t\t\t[\n\t\t\t\t'field' => 'kategori',\n\t\t\t\t'rules' => 'required'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'field' => 'deskripsi',\n\t\t\t\t'rules' => 'required'\n\t\t\t]\n\t\t];\n\n\t\t$validation->set_rules($rules);\n\n\t\tif ($validation->run()) {\n\t\t\t$this->kategori_model->save();\n\t\t\t$this->session->set_flashdata('stsMessage', 'Data Berhasil disimpan');\n\t\t\tredirect('Kategori');\n\t\t}\n\n\t\t$this->load->view(\"admin/kategori/new_form\", $data);\n\t}", "public function createCategory();", "function add()\n { \n $this->load->library('form_validation');\n\n\t\t$this->form_validation->set_rules('CatName','CatName','required');\n\t\t\n\t\tif($this->form_validation->run()) \n { \n $params = array(\n\t\t\t\t'CatName' => $this->input->post('CatName'),\n );\n \n $productcat_id = $this->Productcat_model->add_productcat($params);\n redirect('admin/productcat/index');\n }\n else\n { \n $data['_view'] = 'admin/productcat/add';\n $this->load->view('admin/layouts/main',$data);\n }\n }", "function colorpicker_field_add_new_category( $taxonomy ) { ?> \r\n\t<div class=\"form-field term-colorpicker-wrap\"> \r\n\t<label for=\"term-colorpicker\">Category Color</label> \r\n\t<input name=\"_category_color\" value=\"#ffffff\" class=\"colorpicker\" id=\"term-colorpicker\" /> \r\n\t<p>This is the field description where you can tell the user how the color is used in the theme.</p> \r\n\t</div> <?php }", "public function create()\n {\n return view('product.add_category');\n }", "public function newcategory() {\n\n if (ckeckAddmin()) {\n $this->load->view('admin/header/header');\n $this->load->view('admin/css/css');\n $this->load->view('admin/topnav/topnav');\n $this->load->view('admin/sidenav/sidenav');\n $this->load->view('admin/content/addcatogry');\n $this->load->view('admin/footer/footer');\n # $this->load->view('admin/js/extra');\n $this->load->view('admin/js/js');\n } else {\n CustomFlash('Admin/login', 'alert-danger', 'plz First Login');\n }\n }", "public function addCategory(){\n if (isset($_POST[\"add_category\"])) {\n $categories = $this->model('Categories');\n $system = $this->model('System');\n $cat_name = $_POST[\"cat_name\"];\n $cat_sef_url = $system->seflink($cat_name);\n\n $categories->addCat($cat_name,$cat_sef_url);\n }\n // where to go after comment has been added\n header('location: ' . URL . 'yonetim/categories');\n }", "public function addNewItem($category)\n {\n //Add tool\n if ($category==\"tools\") {\n\n if (isset($_POST['addTool'])) {\n $name=$_POST['name'];\n $quantity=$_POST['quantity'];\n $date_added=$_POST['addition_date'];\n $description_type=$_POST['description'];\n\n //create an object of tools and add it to the database\n $tool=new Tool($name, $quantity, $date_added ,$description_type);\n $tool->addItem();\n\n }\n //add feeds\n }else if ($category==\"feeds\") {\n if (isset($_POST['addFeed'])) {\n $name=$_POST['name'];\n $quantity=$_POST['quantity'];\n $date_added=$_POST['addition_date'];\n $description_type=$_POST['type'];\n\n //create an object of feeeds and add it to the database\n $feed= new Feed($name, $quantity, $date_added ,$description_type);\n $feed->addItem();\n }\n }\n\n }", "function addcategory(){\n \treturn view('category');\n }", "public function addAction() {\n $session = new Container('User');\n $form = new CategoryForm('CategoryForm');\n\n $form->get('created_date')->setValue(time());\n $form->get('created_by')->setValue($session->offsetGet('userId'));\n $form->get('updated_date')->setValue(time());\n $form->get('updated_by')->setValue($session->offsetGet('userId'));\n\n $request = $this->getRequest();\n if ($request->isPost()) {\n $category = new Category();\n $data = $request->getPost();\n $form->setInputFilter($category->getInputFilter());\n $form->setData($data);\n if ($form->isValid()) {\n $validatorName = new \\Zend\\Validator\\Db\\NoRecordExists(\n array(\n 'table' => 'category',\n 'field' => 'title',\n 'adapter' => $this->getAdapter()\n )\n );\n if ($validatorName->isValid(trim($category->title))) {\n $no_duplicate_data = 1;\n } else {\n $flashMessage = $this->flashMessenger()->getErrorMessages();\n if (empty($flashMessage)) {\n $this->flashMessenger()->setNamespace('error')->addMessage('Category Name already Exists.');\n }\n $no_duplicate_data = 0;\n }\n\n if ($no_duplicate_data == 1) {\n $category->exchangeArray($form->getData());\n $data->created_date = time();\n $data->created_by = $session->offsetGet('userId');\n $data->updated_date = time();\n $data->updated_by = $session->offsetGet('userId');\n\n $questionId = $this->getCategoryTable()->saveCategory($category);\n// $this->getServiceLocator()->get('Zend\\Log')->info('Level created successfully by user ' . $session->offsetGet('userId'));\n $this->flashMessenger()->setNamespace('success')->addMessage('Category created successfully');\n return $this->redirect()->toRoute('category');\n }\n }\n }\n\n return array('form' => $form);\n }", "public\n\tfunction create() {\n\t\t$parent = Category::all();\n\t\treturn view( 'admin.grandcategory.add', compact( 'parent' ) );\n\t}", "public function create() {\n return view('admin.category.category_create_form');\n }", "public function create()\n {\n return view('backend.category.add');\n }", "public function addCategory()\n {\n $baker = Bakery::orderBy('id')->get();\n $this->authorize('category');\n return view('Admin.Bakery.Category.category', ['baker' => $baker]);\n }", "public function create()\n {\n return view('backend.cat_add');\n }", "public function addCategoryToGroupByName($gorup_name, $category_name);", "public function get_category_form_by_ajax() {\n $category_count = $_POST['id'];\n $data['category_id'] = $category_count;\n $data['category_branch_location'] = $this->get_branch_location();\n $data['get_printer'] = $this->get_printer();\n $this->load->view('restaurant/category/insert_category_form', $data);\n }", "public function incomeFormAction()\n\t{\n\t\tView::renderTemplate('Income/addIncome.html', [\n\t\t\t'date' => date('Y-m-d'),\n\t\t\t'incomes' => Income::getIncomesCategories()\n\t\t]);\n\t}", "public function add()\n\t{\t\n\t\t$data = array(); \n\n \t \treturn view('add-category')->with($data);\n\t}", "public function addcategory() {\n return view('Category.view-category');\n}", "public function addCategory()\n {\n $data['categorys'] = Category::whereNull('parent_id')->get();\n return view('category.addEdit', $data);\n }", "public function add_new_category(){\n if(isset($this->session->userdata['admin_name']) && !empty($this->session->userdata['admin_name'])) {\n $data['title'] = 'PBD - Admin | Add category';\n $this->load->view('add-new', $data);\n }\n else{\n redirect('signin');\n }\n }", "public function create()\n {\n $category = Categories::all();\n return view('panel.product-management.categories.form-create')->with(['category' => $category]);\n }", "public function create()\n { \n $form_type = 'Add';\n $images = [];\n $category = [];\n $questions = ['Case / Box','A Game','The Manual'];\n \n $categories = Categories::where('parent_id',0)->pluck('category_name','id')->prepend('Select League', ''); \n $regions = Regions::pluck('name','id')->prepend('Select Region', ''); \n \n return view('admin.subcategories.form', compact('form_type','categories','regions','images','category','questions')); \n }", "public function addCategory()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$category = $_POST['category'];\n\t\t\t$sql = \"insert into lib_category (category,add_date,staff_id) \n\t\t\t\t\tvalues('\" . $category . \"','\" . date('Y-m-d') . \"','\" . cookie('staffAccount') . \"') \";\n\t\t\t$cate = D('Category');\n\t\t\t$return = $cate->execute($sql);\n\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'Add successfully!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'SQL Error!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\n\t}", "public function addCategoryToGroupById($gorup_id, $category_id);", "public function addCategory()\n {\n $items = Categories::where('is_parent', 1)->orderBy('category_name')->get();\n return view('admin.category.addCategory', compact('items'));\n }", "public function create()\n {\n return view('admin.category.add');\n }", "public function addAction()\n {\n $form = $this->getServiceLocator()->get('civcontent_category_form');\n \n // Check if the request is a POST.\n $request = $this->getRequest();\n if ($request->isPost())\n {\n // Create a new category object.\n $category = $this->getServiceLocator()->get('civcontent_category');\n \n $data = (array) $request->getPost();\n $form->bind($category);\n $form->setData($data);\n if ($form->isValid())\n {\n // Persist changes.\n $this->getContentService()->persistCategory($category);\n \n // Redirect to content categories\n return $this->redirect()->toRoute('content/category', array(\n 'action' => 'index'\n ));\n }\n }\n \n // If a GET request, or invalid data then render/re-render the form\n return new ViewModel(array(\n 'form' => $form,\n ));\n }", "public function create()\n {\n return view(\"dashboard.pages.supervisor.category.add\");\n \n }", "public function create()\n {\n //\n return view('admin.products.add_category');\n }", "public function create() \n\t{\n\t\n\t\t$this->data = (object) array();\n\t\t// Check for post data\n\t\t$this->form_validation->set_rules($this->_validation_rules);\n\t\t\n\t\t\n\t\t// if postback-validate\n\t\tif ($this->form_validation->run()) \n\t\t{\n\t\t\t$input = $this->input->post();\n\t\t\t$id = $this->categories_m->create($input);\n\t\t\t\n\t\t\tEvents::trigger('evt_category_created', $id );\n\t\t\t\n\t\t\t$this->session->set_flashdata('success', lang('success'));\n\t\t\tredirect('admin/shop/categories');\n\t\t\t\n\t\t} \n\t\telse \n\t\t{\n\t\t\tforeach ($this->_validation_rules as $key => $value) \n\t\t\t{\n\t\t\t\t$this->data->{$value['field']} = '';\n\t\t\t}\n\t\t}\n\n\t\t$this->data->parent_category_select \t= $this->categories_m->build_dropdown(array(\n\t\t\t'type'\t=> 'all'\n\t\t)); \n\n\n\t\t// prepare dropdown image folders\n\t\t$folders = $this->_prep_folders();\n\n\n\t\t// Build page\n\t\t$this->template\n\t\t\t->title($this->module_details['name'])\n\t\t\t->set('folders',$folders)\n\t\t\t->append_js('module::admin/categories.js')\t\n\t\t\t->append_js('module::admin/admin.js')\t\t\n\t\t\t->append_metadata($this->load->view('fragments/wysiwyg', $this->data, TRUE))\n\t\t\t->build('admin/categories/form', $this->data);\n\t}", "public function create()\n {\n return view('news.admin.categ.add');\n }", "public function create()\n {\n return view('admin.master.category_name.add');\n }", "function add()\n {\n if($this->acceso(3)){\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'categoria_nombre' => $this->input->post('categoria_nombre'),\n );\n\n $categoria_id = $this->Categoria_model->add_categoria($params);\n redirect('categoria/index');\n }\n else\n { \n $data['_view'] = 'categoria/add';\n $this->load->view('layouts/main',$data);\n }\n }\n }", "public function Add($id)\n\t{\n\n\t\t//dd( Categoria::$rules);\n\t\t$form = new GroupForm();\n\n\t\tif ($form->isPosted())\n\t\t{\n\t\t\t$this->beforeFilter('csf', array('on' => 'post'));\n\n\t\t\tif ($form->isValidForAdd(Categoria::$rules))\n\t\t\t{\n\t\t\t\t$entrada = new Categoria();\n\n\t\t\t\t\t$entrada->descricao = Input::get(\"descricao\");\n\t\t\t\t\t$entrada->tipo = Input::get(\"tipo\");\n\t\t\t\t\t$entrada->user_id = isset(Auth::user()->id)? Auth::user()->id : 1;\n\t\t\t\t\t$entrada->save();\n\t\t\t\t\n\n\t\t\t\treturn Redirect::route(\"categ_list\");\n\t\t\t}\n\n\t\t\treturn Redirect::route(\"categ_add\")->withInput([\n\t\t\t\t\"descricao\" => Input::get(\"descricao\"),\n\t\t\t\t\"tipo\" => Input::get(\"tipo\")\n\t\t\t])->withErrors($form->getErrors());\n\t\t}\n\t\t$categorias = Categoria::all();\n\t\t$cat = $categorias;\n\t\t$dadosCat = array();\n\t\tforeach ($categorias as $categoria) {\n\t\t\t\n\t\t\t$dadosCat[$categoria->id] = $categoria->descricao;\n\t\t}\n\n\t\t\n\t\treturn View::make(\"admin.categorias.create\", [\n\t\t\t\"tipo\" => $id,\n\t\t\t\"form\" => $form \n\t\t], compact('cat'))->with(\"categorias\", $dadosCat);\n\t\t\n\t}", "public function create()\n {\n return view (\"admin.category.create\");\n }", "public function create()\n {\n return view('admin.inventorymanagement.category.create');\n }", "function _addCategory()\n\t{\n\t\t// Create categories for our component\n\t\t$basePath = JPATH_ADMINISTRATOR.'/components/com_categories';\n\t\trequire_once $basePath.'/models/category.php';\n\t\t$config\t\t= array('table_path' => $basePath.'/tables');\n\t\t$catmodel\t= new CategoriesModelCategory($config);\n\t\t$catData\t= array('id' => 0, 'parent_id' => 0, 'level' => 1, 'path' => 'uncategorized', 'extension' => 'com_sermonspeaker',\n\t\t\t\t\t\t'title' => 'Uncategorized', 'alias' => 'uncategorized', 'description' => '', 'published' => 1, 'language' => '*');\n\t\t$catmodel->save($catData);\n\t\t$id = $catmodel->getItem()->id;\n\n\t\t$db = JFactory::getDBO();\n\t\t// Updating the example data with 'Uncategorized'\n\t\t$query\t= $db->getQuery(true);\n\t\t$query->update('#__sermon_sermons');\n\t\t$query->set('catid = '.(int)$id);\n\t\t$query->where('catid = 0');\n\t\t$db->setQuery($query);\n\t\t$db->execute();\n\t\t// Speakers\n\t\t$query->update('#__sermon_speakers');\n\t\t$db->setQuery($query);\n\t\t$db->execute();\n\t\t// Series\n\t\t$query->update('#__sermon_series');\n\t\t$db->setQuery($query);\n\t\t$db->execute();\n\n\t\treturn;\n\t}", "public function addCategory(Request $request){\n \t$this->validate($request, [\n \t\t'category' => 'required'\n \t]);\n\n \t$category = new Category;\n \t$category->category = $request->input('category');// this 'category' inside input is same as name='category' in form\n \t$category->save(); //save this category in database\n \treturn redirect('/category')->with('response','Category added successfully');\n }", "public function add_category() /// get routes of the form add cateogry\n {\n return view('admin.categories.add-category');\n }", "public function addPost(){\n\n if ($this->input->post(\"category_create\") === null){\n $this->view->redirect(\"/categories/manage\");\n }\n\n if (!$this->auth->isLogged()) {\n $this->view->redirect(\"/user/login\", \"You can not add new categories if you are not logged in!\");\n }\n\n if (!$this->auth->isInRole(\"admin\")) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not Admin!\");\n }\n\n $categoryName = $this->input->post(\"category_name\");\n\n $this->validate->setRule(\"minlength\",$categoryName,3, \"Category name length must be more then 3 symbols!\");\n\n if ($this->validate->validate() === false){\n $error = $this->validate->getErrors();\n $this->view->redirect(\"/categories/manage\",$error);\n }\n\n $categoryModel = new CategoriesModel();\n try{\n if ($categoryModel->hasCategory($categoryName)){\n $this->view->redirect(\"/categories/manage\",\"This categories already exist!\");\n }\n\n if($categoryModel->addNewCategory($categoryName)){\n $this->view->redirect(\"/categories/manage\",\"Category created successfully!\",\"success\");\n }\n }catch (\\Exception $exception){\n $this->view->redirect(\"/categories/manage\",$exception);\n }\n }", "function add(){\n\t\tif(!$this->checkLogin()){\n\t\t\tredirect(base_url());\n\t\t}\n\n\t\t$pageData['header_title'] = APP_NAME.' | Add Document Category';\n\t\t$pageData['page_title'] = 'Document Category Management';\n\t\t$pageData['parent_menu'] = 'document_management';\n\t\t$pageData['child_menu'] = 'document_category';\n\n\t\t$this->load->view('admin/document_management/category/add', $pageData);\n\t}", "public function add()\n {\n return view('category.add');\n }", "function addAction()\n\t{\n global $langCode;\n\t\t$error \t= array();\n\t\t$success \t= array();\n\t\t$contents \t= '';\n\t\t$formData \t= array();\n\t\t\n\t\t$parentid = (int)($this->registry->router->getArg('parentid'));\n\t\tif($parentid > 0)\n\t\t\t$formData['fparentid'] = $parentid; \n\t\t\n\t\tif(!empty($_POST['fsubmit']))\n\t\t{\n if($_SESSION['productcategoryAddToken']==$_POST['ftoken'])\n {\n $formData = array_merge($formData, $_POST);\n \n if($this->addActionValidator($formData, $error))\n {\n $myProductCat = new Core_ProductCategory();\n //thong tin khong lien quan ngon ngu\n $myProductCat->name = $formData['fname'];\n $myProductCat->parentid = (int)$formData['fparentid'];\n $myProductCat->enable = (int)$formData['fenable']==1?1:0;\n //Neu nguoi dung nhap SeoUrl thi xu li dau cua chuoi nguoi dung nhap \n //Truong hop nguoi dung khong nhap thi chung ta lay idtext de thay the!!!!!\n if(strlen($formData['fseourl']) > 0)\n $myProductCat->seoUrl = Helper::codau2khongdau($formData['fseourl'], true);\n else\n $myProductCat->seoUrl = Helper::codau2khongdau(strip_tags($formData['fname'][$langCode]), true);\n //cac thong tin lien quan ngong ngu\n $myProductCat->seoTitle = $formData['fseotitle'];\n $myProductCat->seoKeyword = $formData['fseokeyword'];\n $myProductCat->seoDescription = $formData['fseodescription'];\n if($myProductCat->addData())//them vao database\n {\n $success[] = str_replace('###categoryname###', $myProductCat->name[$langCode], $this->registry->lang['controller']['succAdd']);\n $this->registry->me->writelog('ProductCategoryadd', $myProductCat->id, array('name' => $myProductCat->name[$langCode], 'order' => $myProductCat->order));\n $formData = array('fparentid' => $formData['fparentid']); \n }\n else\n {\n $error[] = $this->registry->lang['controller']['errAdd']; \n }\n }\n }\n $_SESSION['productcategoryAddToken']=Helper::getSecurityToken();//Tao token moi\n\t\t}\n\t\t\n\t\t\n\t\t$this->registry->smarty->assign(array(\t'formData' \t\t=> $formData,\n\t\t\t\t\t\t\t\t\t\t\t\t'parentCategories' => Core_ProductCategory::getFullCategories(),\n\t\t\t\t\t\t\t\t\t\t\t\t'redirectUrl'\t=> $this->getRedirectUrl(),\n\t\t\t\t\t\t\t\t\t\t\t\t'error'\t\t\t=> $error,\n\t\t\t\t\t\t\t\t\t\t\t\t'success'\t\t=> $success,\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));\n\t\t$contents .= $this->registry->smarty->fetch($this->registry->smartyControllerContainer.'add.tpl');\n\t\t$this->registry->smarty->assign(array(\n\t\t\t\t\t\t\t\t\t\t\t\t'menu'\t\t=> 'productcategoryadd',\n\t\t\t\t\t\t\t\t\t\t\t\t'pageTitle'\t=> $this->registry->lang['controller']['pageTitle_add'],\n\t\t\t\t\t\t\t\t\t\t\t\t'contents' \t\t\t=> $contents));\n\t\t$this->registry->smarty->display($this->registry->smartyControllerGroupContainer . 'index.tpl');\n\t}", "public function create()\n {\n $data['heading'] = 'Add Secound Category';\n $data['categories'] = Category::where('level',0)->get();\n\n return view('admin.subcategory.create')->with($data);\n }", "public function create()\n { \n $category = self::getCates();\n //加载添加模板\n return view('Admin.Category.add',['category' => $category]);\n }", "public function create()\n {\n return view('admin.DrugCategory.create');\n }", "public function create()\n {\n return view('admin.add-category');\n }", "public function getName()\n {\n return 'category_form';\n }", "public function create()\n {\n $this->categoryRepository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n\n // Get Categories Dropdown list\n $categories = $this->categoryRepository->getCategoryDropdownList();\n $categories[0] = 'Root Category';\n\n return view('admin.categories.add',compact('categories'));\n }", "public function subcategory(){\n\t\t$modelservices = new Application_Model_Services();\n\t\t$servicelist = $modelservices->servicesdata();\n\t\t$caterories = $modelservices->categorydata();\n\t//prd($caterories);\n\n \t\t$this->addElement('text', 'service_name', array (\n\t\t\t\"required\" => TRUE,\n\t\t\t'class' => 'form-control required',\n\t\t\t\"label\" => \"Service Sub Category Title \" ,\n\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\"),\n\t\t\t\"validators\" => array(\n\t\t\t\t\t\t\t\tarray(\"NotEmpty\",true,array(\"messages\"=>\" Expertise Title is required \")),\n \t\t\t\t\t\t\t),\n \t\t));\n\t\t$this->addElement('text', 'service_price', array (\n\t\t\t\"required\" => TRUE,\n\t\t\t'class' => 'form-control required digits',\n\t\t\t\"label\" => \"Service Credit \" ,\n\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\"),\n\t\t\t\"validators\" => array(\n\t\t\t\t\t\t\t\tarray(\"NotEmpty\",true,array(\"messages\"=>\"Price is required \")),\n \t\t\t\t\t\t\t),\n \t\t));\n\t\t$this->addElement('select', 'service_parent_id', array (\n\t\t\t\t'class' => 'form-control required' ,\n\t\t\t\t\"required\"=>true,\n\t\t\t\t\"multioptions\"=>$servicelist,\n\t\t\t\t\"onchange\"=>\"getcategorylist(this.value)\",\n\t\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\",\"HtmlEntities\"),\n\t\t\t\t\n\t\t));\n\t\t$this->addElement('select', 'service_sub_parent_id', array (\n\t\t\t\t'class' => 'form-control required' ,\n\t\t\t\t\"required\"=>true,\n\t\t\t\t\"multioptions\"=>$caterories,\n\t\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\",\"HtmlEntities\"),\n\t\t\t\t\n\t\t));\n \t\t$this->submitButton();\n \t}", "public function create()\n {\n return view('admin/add_category');\n }", "function getCategoryFields() {\n\t\t\n\t\t$model = $this->getModel();\n\t\t$category_id = JRequest::getVar('id');\n\t\t$form = $model->getFieldForm($category_id, 'category');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\" >';\n\t\techo '<legend>New Category</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}", "public function create()\n {\n if(\\request()->filled('catid')){\n $catid = intval(\\request()->input('catid'));\n $data['parent_ids'] = Category::ancestorsAndSelf($catid)->pluck('catid');\n }\n\n $top_categories = Category::withDepth()->having('depth', '=', 0)->get();\n $data['top_categories'] = [];\n foreach($top_categories as $category){\n $data['top_categories'][$category->catid] = ['name'=> $category->name];\n }\n\n return view('admin.category.add', $data);\n }", "public function create()\n {\n $parent = $this->cateRepository->getSelect();\n return view('backend.category.add',compact('parent'));\n }", "public function create()\n {\n $data = array();\n $data['status'] = DropdownHelper::where('group_code', '001')->orderBy('key_code', 'asc')->pluck('value', 'key_code');\n $data['services'] = Service::orderBy('service_name', 'asc')->pluck('service_name', 'id')->all();\n $data['add'] = trans('main.add');\n return view('category.form', $data);\n }", "public function create()\n {\n\n $item = new MuseumCategory();\n $categoryList = $this->museumCategoryRepository->getForComboBox();\n\n return view('museum.admin.category.create', compact('categoryList', 'item'));\n\n }", "public function create()\n {\n return view('admin.category.cate_add');\n }", "public function shipment_category_new_func($category,$subcategory=null)\n\n\t{\n\n\n\n\t\t$data['related_company']=$this->shipping->select_data('shipping_related_website');\n\n\t\t$data['equipment_category']=$this->shipping->select_data('equipment_category');\n\n\t\t$data['truck_trailer']=$this->shipping->select_data('shipping_truck_trailer');\n\n\t\t$data['category_id']=$category;\n\n\t\t$data['subcategory_id']=$subcategory;\n\n\t\t$this->load->view('shipment/shipment-category-new',$data);\n\n\t}", "public function create()\n {\n $fields = Field::all();\n\n $parent_id = Request::get('parent_id');\n\n return view_backend('category.create', compact('fields', 'parent_id'));\n }", "public function actionCreate()\n {\n $model = new Category();\n\n Yii::$app->view->params['active'] = 'category';\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('success', 'Категория добавлена');\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n return view('admin.pages.category.add');\n }", "function expense_category_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'expense_category_add';\n $page_data['page_title'] = get_phrase('add_expense_category');\n $this->load->view('backend/index', $page_data);\n }", "public function addCategory(){\n\n\t\tif (($categoryName = $this->input->get_post('categoryName')) && ($categoryTypeId = $this->input->get_post('categoryTypeId')) && \n ($description = $this->input->get_post('description')) && ($categoryImage = $this->input->get_post('categoryImage'))) {\n\t\t\t\n\t\t\t\n\t\t\t$data = array(\n\t\t\t\t'categoryName' => $categoryName,\n\t\t\t\t'categoryTypeId' => $categoryTypeId,\n\t\t\t\t'description' => $description,\n\t\t\t\t'categoryImage' => $categoryImage\n\t\t\t);\n \n $ret = $this->Lootel_model->addCategory($data);\n\t\t\t\n\t\t\tif($ret){\n\t\t\t\t$response = array(\"status\"=>true,\"message\"=>\"Success\",\"userid\"=>$ret);\n\t\t\t}else{\n\t\t\t\t$response = array(\"status\"=>false,\"message\"=>\"Record not saved\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\t$response = array(\"status\"=>false,\"message\"=>\"Required parameter not found\");\n\t\t}\n\t\techo json_encode($response);\n\t}", "public function create()\n\t{\n\t\treturn view('admin.main_categories.addmain_category');\n\t}", "public function create()\n {\n return view('admin/categories/add_category');\n }", "public function create()\n\t{\n\t\t//\n\t\t\n\t\treturn view('categoria.add-categoria');\n\n\t}", "static public function ctrCrearCategoria(){\n\n\t\tif(isset($_POST[\"nuevaCategoria\"])){\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/',$_POST[\"nuevaCategoria\"])){\n\n\t\t\t\t$tabla=\"categorias\";\n\n\t\t\t\t$datos=$_POST[\"nuevaCategoria\"];\n\n\t\t\t\t$respuesta=ModelCategoria::mdlIngresarCategoria($tabla, $datos);\n\n\n\t\t\t\tif($respuesta==\"ok\"){\n\n\t\t\t\t\techo '<script> \n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttype:\"success\",\n\t\t\t\t\t\t\ttitle:\"¡La categoria ha sido creada correctamente!\",\n\t\t\t\t\t\t\tshowConfirmButton:true,\n\t\t\t\t\t\t\tconfirmButtonText:\"cerrar\",\n\t\t\t\t\t\t\tclaseOnConfirm:false\n\t\t\t\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\twindow.location=\"categorias\";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t </script>';\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse{\n\n\t\t\t\techo '<script> \n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\t\ttitle:\"¡La categoria no puede ir vacia o llevar caracteres especiales!\",\n\t\t\t\t\t\t\tshowConfirmButton:true,\n\t\t\t\t\t\t\tconfirmButtonText:\"cerrar\",\n\t\t\t\t\t\t\tclaseOnConfirm:false\n\t\t\t\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\twindow.location=\"categorias\";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t});\n\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t </script>';\n\n\n\t\t\t}\n\n\t\t}\n\n\n\t}", "protected function addElements(FormInterface $form, Category $category = null)\n {\n $form->add('category', EntityType::class, array(\n 'required' => true,\n 'data' => $category,\n 'placeholder' => 'Select a Category..',\n 'class' => 'App\\Entity\\Category'\n ))\n ->add('Create', SubmitType::class);\n }", "public function create()\n {\n return view('admin.category.insert');\n }", "public function servicecat(){\n\t\t$modelservices = new Application_Model_Services();\n\t\t\n\t\t$servicelist = $modelservices->servicesdata();\n\t\t//prd($servicelist);\n\t\t\t\t\t\n \t\t$this->addElement('text', 'service_name', array (\n\t\t\t\"required\" => TRUE,\n\t\t\t'class' => 'form-control required',\n\t\t\t\"label\" => \"Service Category Title \" ,\n\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\"),\n\t\t\t\"validators\" => array(\n\t\t\t\t\t\t\t\tarray(\"NotEmpty\",true,array(\"messages\"=>\" Expertise Title is required \")),\n \t\t\t\t\t\t\t),\n \t\t));\n\t\t\n\t\t$this->addElement('select', 'service_parent_id', array (\n\t\t\t\t'class' => 'form-control required' ,\n\t\t\t\t\"required\"=>true,\n\t\t\t\t\"multioptions\"=>$servicelist,\n\t\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\",\"HtmlEntities\"),\n\t\t\t\t\n\t\t));\n \t\t$this->submitButton();\n \t}" ]
[ "0.69676876", "0.69144493", "0.69017804", "0.68650234", "0.68249476", "0.67566377", "0.6712905", "0.668728", "0.6656021", "0.6614073", "0.6611625", "0.6608978", "0.6608551", "0.65376264", "0.65324306", "0.6525535", "0.65221816", "0.6514171", "0.6511999", "0.6508002", "0.64992195", "0.6498333", "0.64611644", "0.6458852", "0.64521813", "0.64521384", "0.64497775", "0.6434786", "0.6422214", "0.6422101", "0.63840646", "0.6383456", "0.6372293", "0.63588494", "0.6357178", "0.63515097", "0.632658", "0.6304464", "0.62979645", "0.6287985", "0.6285044", "0.6281664", "0.6277808", "0.62648916", "0.6260376", "0.62433493", "0.62388", "0.6236515", "0.62291676", "0.6222569", "0.6219657", "0.6219167", "0.62177074", "0.6215356", "0.6213139", "0.62079096", "0.6193636", "0.6182471", "0.6182398", "0.6176555", "0.616953", "0.6168437", "0.61662424", "0.61495554", "0.61488706", "0.6144298", "0.6140037", "0.6137465", "0.613686", "0.613282", "0.6127363", "0.6124668", "0.61201096", "0.611854", "0.6116702", "0.6114296", "0.6103411", "0.6101548", "0.6101057", "0.61006314", "0.6095138", "0.6088746", "0.6088684", "0.6086131", "0.6082916", "0.6076874", "0.60758555", "0.60753286", "0.60707086", "0.60684204", "0.6060758", "0.6060669", "0.60590416", "0.6057703", "0.60574937", "0.6056578", "0.605238", "0.60516155", "0.6051336", "0.60507876" ]
0.7627313
0
/Add program Category form
/Добавить форму категории программы
public function addProgramCategory() { return view('admin.addprogramcategory'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n if (!isset(request()->program)) {\n $category = Programs::all();\n } else {\n $category = Programs::where(\"id\", request()->program)->first();\n }\n return view(\"admin/action/create\", compact(\"category\"));\n }", "public function servicecat(){\n\t\t$modelservices = new Application_Model_Services();\n\t\t\n\t\t$servicelist = $modelservices->servicesdata();\n\t\t//prd($servicelist);\n\t\t\t\t\t\n \t\t$this->addElement('text', 'service_name', array (\n\t\t\t\"required\" => TRUE,\n\t\t\t'class' => 'form-control required',\n\t\t\t\"label\" => \"Service Category Title \" ,\n\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\"),\n\t\t\t\"validators\" => array(\n\t\t\t\t\t\t\t\tarray(\"NotEmpty\",true,array(\"messages\"=>\" Expertise Title is required \")),\n \t\t\t\t\t\t\t),\n \t\t));\n\t\t\n\t\t$this->addElement('select', 'service_parent_id', array (\n\t\t\t\t'class' => 'form-control required' ,\n\t\t\t\t\"required\"=>true,\n\t\t\t\t\"multioptions\"=>$servicelist,\n\t\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\",\"HtmlEntities\"),\n\t\t\t\t\n\t\t));\n \t\t$this->submitButton();\n \t}", "public function add_category() {\n\t $this->use_layout=false;\n\t\t$this->model = new $this->model_class(WaxUrl::get(\"id\"));\n\t\t$category = new CmsCategory(substr($_POST[\"id\"], 4));\n\t\t$this->model->categories = $category;\n\t\tif(!$this->attached_categories = $this->model->categories) $this->attached_categories= array();\n\t\t$cat = new CmsCategory;\n\t\tif(!$this->all_categories = $cat->all() ) $this->all_categories=array();\t\t\n\t\t$this->cat_partial = $this->render_partial(\"list_categories\");\n\t}", "public function addAction()\n\t{\n\t\t$this->oView->box_title = \"Add Category\";\n\t\t$configure_languages = $this->oConfigureModule['configure_languages'];\n\t\t$this->oView->configure_languages = $configure_languages;\n\t\t$this->oView->link_url = site_url('dashboard/category/add');\n\t\t\n\t\tif ($this->oInput->isPost())\n\t\t{\n\t\t\t$objCat = new Category();\n\t\t\t\n\t\t\t$parent_code = $this->oInput->post('parent_code');\n\t\t\t$parent_id = 0;\n\t\t\t\n\t\t\tif (trim(strtolower($parent_code)) != \"root\") \n\t\t\t{\n\t\t\t\t$row = $objCat->getRow(\"code = ?\",array($parent_code));\n\t\t\t\t$parent_id = $row[\"id\"]; \n\t\t\t}\n\t\t\t\n\t\t\t$data['parent_id'] = $parent_id;\n\t\t\t$data['code'] = $this->oInput->post('code');\n\t\t\t$data['active'] = $this->oInput->post('active');\n\t\t\t$data['sort_order'] = $this->oInput->post('sort_order');\n\t\t\t\n\t\t\tforeach ($configure_languages['languages'] as $code => $row)\n\t\t\t{\n\t\t\t\t$data[\"name_{$code}\"] = $this->oInput->post(\"name_{$code}\");\n\t\t\t\t$data[\"description_{$code}\"] = $this->oInput->post(\"description_{$code}\");\n\t\t\t\t$data[\"icon_{$code}\"] = $this->oInput->post(\"icon_{$code}\");\n\t\t\t\t$data[\"image_{$code}\"] = $this->oInput->post(\"image_{$code}\");\n\t\t\t}\n\t\t\t\n\t\t\t$data['create_at'] = now_to_mysql();\n\t\t\t$last_id = $objCat->insert($data);\n\t\t\t\n\t\t\tredirect(\"dashboard/category/list\");\n\t\t}\n\n\t\t$this->renderView('dashboard/category/_form');\n\t}", "public function categoryForm(){\n $table = \"categories\";\n $cresults = $this->getAllrecords($table);\n foreach($cresults as $category){\n echo('<option value=\"'.$category[\"cat_id\"].'\">'.$category[\"cat_name\"].'</option>');\n }\n\n\n }", "public function newAction()\n {\n\t\tTag::appendTitle('Add New Category');\n }", "public function new_category() {\n\t\t$this->use_layout=false;\n\t\t$cat = new CmsCategory;\n\t\t$cat->name = Request::get(\"cat\");\n\t\t$cat->save();\n\t\tif(!$this->all_categories = $cat->clear()->all()) $this->all_categories=array();\t\t\n\t\t$this->cat_list = $this->render_partial(\"cat_list\");\t\n\t}", "public function addCategory(){\n if (isset($_POST[\"add_category\"])) {\n $categories = $this->model('Categories');\n $system = $this->model('System');\n $cat_name = $_POST[\"cat_name\"];\n $cat_sef_url = $system->seflink($cat_name);\n\n $categories->addCat($cat_name,$cat_sef_url);\n }\n // where to go after comment has been added\n header('location: ' . URL . 'yonetim/categories');\n }", "public function addNewItem($category)\n {\n //Add tool\n if ($category==\"tools\") {\n\n if (isset($_POST['addTool'])) {\n $name=$_POST['name'];\n $quantity=$_POST['quantity'];\n $date_added=$_POST['addition_date'];\n $description_type=$_POST['description'];\n\n //create an object of tools and add it to the database\n $tool=new Tool($name, $quantity, $date_added ,$description_type);\n $tool->addItem();\n\n }\n //add feeds\n }else if ($category==\"feeds\") {\n if (isset($_POST['addFeed'])) {\n $name=$_POST['name'];\n $quantity=$_POST['quantity'];\n $date_added=$_POST['addition_date'];\n $description_type=$_POST['type'];\n\n //create an object of feeeds and add it to the database\n $feed= new Feed($name, $quantity, $date_added ,$description_type);\n $feed->addItem();\n }\n }\n\n }", "public function addAction()\n {\n $manager = $this->getDI()->get('core_category_manager');\n $this->view->form = $manager->getForm();\n }", "public function add_category() {\n $this->category();\n $this->loadView(\"editors/category_editor\");\n }", "public function add_category()\n {\n \n if(isset($_POST['category_name']) && isset($_POST['category_desc'])){\n\t\t \n\t\t \n\t\t $query = $this->Product_model->add_category();\n\t\t\t if($query){\n\t\t\t\t \n\t\t\t\t echo 'added';\n\t\t\t\t }else{\n\t\t\t\t\t \n\t\t\t\t\t echo 'error';\n\t\t\t\t\t }\n\t\t \n\t\t }\n \n }", "function add_new_category()\n\t{\n\t\t$this->data['title'] \t= 'Add New Portfolio Category';\n\t\t$this->data['css'] \t\t= 'body/admin/css/form_style_default';\n\t\t$this->data['js'] \t\t= 'body/admin/js/form_style_default';\n\t\t$this->data['content'] \t= 'content/admin/portfolio/add_new_category';\n\t\t$this->load->view('body/admin/style_1', $this->data);\n\t}", "public function addCategory(){ \n $cookies = new CookieModel();\n $cookie_id = $cookies -> read();\n if (! $cookie_id) $this->redirect('/');\n\n\t \t$name = $_REQUEST['name'];\n $father = $_REQUEST['father'];\n\t\t\t$form = M(\"categoryinfo\");\n\t\t\t$addnew['name'] = $name;\n $addnew['father'] = $father;\n\t\t\t$result = $form->add($addnew);\n\t\t\t$this->redirect('/index.php/Admin/dish');\n\t\t\t\t//else {$this->error('添加失败');}\n }", "public function add(){\n\t\t\t\n\t\t\trequire_once('views/category/add.php');\n\t\t}", "public function add()\n {\n $category = new stdClass();\n $category->category_id = null;\n $category->name = null;\n $data = [\n 'page' => 'add',\n 'row' => $category\n ];\n $this->template->load('template', 'product/category/category_add', $data);\n }", "public function category_add() {\n\t\t// Setup validation\n\t\t$this->data['validation'] = \"\";\n\t\t$this->data['category']\t= array('name' => '', 'url_name' => '');\n\t\t\n\t\t// Handle POST\n\t\tif ($this->mojo->input->post('category')) {\n\t\t\t// Get the category data\n\t\t\t$this->data['category']\t= $this->mojo->input->post('category');\n\t\t\t\n\t\t\t// Insert it!\n\t\t\tif ($this->mojo->blog_model->insert_category($this->data['category'])) {\n\t\t\t\t// It's success\n\t\t\t\t$response['result'] = 'success';\n\t\t\t\t$response['reveal_page'] = site_url('admin/addons/blog/categories_all');\n\t\t\t\t$response['message'] = 'Successfully created category';\n\t\t\t\t\n\t\t\t\texit($this->mojo->javascript->generate_json($response));\n\t\t\t} else {\n\t\t\t\t// There have been validation errors\n\t\t\t\t$response['result'] = 'error';\n\t\t\t\t$response['message'] = $this->mojo->blog_model->validation_errors;\n\t\t\t\t\n\t\t\t\t// Output the response\n\t\t\t\texit($this->mojo->javascript->generate_json($response));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Show the view\n\t\t$this->_view('category_add');\n\t}", "function add(){\n\t\tif(!$this->checkLogin()){\n\t\t\tredirect(base_url());\n\t\t}\n\n\t\t$pageData['header_title'] = APP_NAME.' | Add Document Category';\n\t\t$pageData['page_title'] = 'Document Category Management';\n\t\t$pageData['parent_menu'] = 'document_management';\n\t\t$pageData['child_menu'] = 'document_category';\n\n\t\t$this->load->view('admin/document_management/category/add', $pageData);\n\t}", "public function storeProgramCategory(Request $request)\n {\n $this->validate($request,array(\n 'categoryName' => 'required',\n 'tips' => 'required',\n ));\n\n $programCategory = new ProgramCategory;\n\n $programCategory->program_category_name = $request->categoryName;\n $programCategory->tips = $request->tips;\n\n $programCategory->save();\n\n if($programCategory->save()){\n return redirect()->back()->with('success','Program category Saved successfully.');\n }\n else{\n return redirect()->back()->with('denger-success','Program category is not saved.');\n }\n \n }", "public function addAction()\n {\n $form = new CategoryForm();\n $form->get('submit')->setValue('Add');\n\n $request = $this->getRequest();\n if ($request->isPost()) {\n $category = new Category();\n $form->setInputFilter($category->getInputFilter());\n $form->setData($request->getPost());\n\n if ($form->isValid()) {\n $category->exchangeArray($form->getData());\n $this->getCategoryTable()->saveCategory($category);\n\n // Redirect to list of categorys\n return $this->redirect()->toRoute('category');\n }\n }\n return array('form' => $form);\n }", "function _addCategory()\n\t{\n\t\t// Create categories for our component\n\t\t$basePath = JPATH_ADMINISTRATOR.'/components/com_categories';\n\t\trequire_once $basePath.'/models/category.php';\n\t\t$config\t\t= array('table_path' => $basePath.'/tables');\n\t\t$catmodel\t= new CategoriesModelCategory($config);\n\t\t$catData\t= array('id' => 0, 'parent_id' => 0, 'level' => 1, 'path' => 'uncategorized', 'extension' => 'com_sermonspeaker',\n\t\t\t\t\t\t'title' => 'Uncategorized', 'alias' => 'uncategorized', 'description' => '', 'published' => 1, 'language' => '*');\n\t\t$catmodel->save($catData);\n\t\t$id = $catmodel->getItem()->id;\n\n\t\t$db = JFactory::getDBO();\n\t\t// Updating the example data with 'Uncategorized'\n\t\t$query\t= $db->getQuery(true);\n\t\t$query->update('#__sermon_sermons');\n\t\t$query->set('catid = '.(int)$id);\n\t\t$query->where('catid = 0');\n\t\t$db->setQuery($query);\n\t\t$db->execute();\n\t\t// Speakers\n\t\t$query->update('#__sermon_speakers');\n\t\t$db->setQuery($query);\n\t\t$db->execute();\n\t\t// Series\n\t\t$query->update('#__sermon_series');\n\t\t$db->setQuery($query);\n\t\t$db->execute();\n\n\t\treturn;\n\t}", "function getCategoryFields() {\n\t\t\n\t\t$model = $this->getModel();\n\t\t$category_id = JRequest::getVar('id');\n\t\t$form = $model->getFieldForm($category_id, 'category');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\" >';\n\t\techo '<legend>New Category</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}", "public function create()\n {\n return view(\"dashboard.pages.supervisor.category.add\");\n \n }", "function add_cmd()\n\t{\n\t\tif(User::can_add(false,ANY_CATEGORY))\n\t\t{\n\t\t\trequire_once 'forms/edit.php';\n\t\t\t$this->add_form(new EditManageHelpForm());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tUrl::redirect_current();\n\t\t}\n\t}", "public function add_acct_category(){\n\t\t//restricted this area, only for admin\n\t\tpermittedArea();\nif($user['role'] == 'admin')\n\t\t{\n\t\t\t$data['ledger1'] = $this->db->get_where('acct_categories', ['category_type' => 'Main']);\n\t\t\t\n\t\t}\n\t\tif($this->input->post())\n\t\t{\n\t\t\tif($this->input->post('submit') != 'add_acct_category') die('Error! sorry');\n\n\t\t\t$this->form_validation->set_rules('category_name', 'Category Name', 'required|trim');\n\t\t\t$this->form_validation->set_rules('visible', 'Access To Payspecifications', 'required|trim');\n\n\t\t\tif($this->form_validation->run() == true)\n\t\t\t{\n\t\t\t\t$insert = $this->ledger_model->add_acct_category();\n\t\t\t\tif($insert)\n\t\t\t\t{\n\t\t\t\t\t$this->session->set_flashdata('successMsg', 'Accounts Category Created Successfully...!!!');\n\t\t\t\t\tredirect(base_url('ledger'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\ntheme('add_acct_category');\n\t}", "function display_addcategory_form($category_name='', $id='')\r\n{\r\n\tglobal $dropbox_cnf;\r\n\r\n\t$title=get_lang('AddNewCategory');\r\n\r\n\tif (isset($id) AND $id<>'')\r\n\t{\r\n\t\t// retrieve the category we are editing\r\n\t\t$sql=\"SELECT * FROM \".$dropbox_cnf['tbl_category'].\" WHERE cat_id='\".Database::escape_string($id).\"'\";\r\n\t\t$result=api_sql_query($sql);\r\n\t\t$row=mysql_fetch_array($result);\r\n\r\n\t\tif ($category_name=='') // after an edit with an error we do not want to return to the original name but the name we already modified. (happens when createinrecievedfiles AND createinsentfiles are not checked)\r\n\t\t{\r\n\t\t\t$category_name=$row['cat_name'];\r\n\t\t}\r\n\t\tif ($row['received']=='1')\r\n\t\t{\r\n\t\t\t$target='received';\r\n\t\t}\r\n\t\tif ($row['sent']=='1')\r\n\t\t{\r\n\t\t\t$target='sent';\r\n\t\t}\r\n\t\t$title=get_lang('EditCategory');\r\n\r\n\t}\r\n\r\n\tif ($_GET['action']=='addreceivedcategory')\r\n\t{\r\n\t\t$target='received';\r\n\t}\r\n\tif ($_GET['action']=='addsentcategory')\r\n\t{\r\n\t\t$target='sent';\r\n\t}\r\n\r\n\r\n\techo \"<form name=\\\"add_new_category\\\" method=\\\"post\\\" action=\\\"\".api_get_self().\"?view=\".$_GET['view'].\"\\\">\\n\";\r\n\techo '<strong>'.$title.'</strong>';\r\n\tif (isset($id) AND $id<>'')\r\n\t{\r\n\t\techo '<input name=\"edit_id\" type=\"hidden\" value=\"'.$id.'\">';\r\n\t}\r\n\techo '<input name=\"target\" type=\"hidden\" value=\"'.$target.'\">';\r\n\techo \"<table border=\\\"0\\\">\\n\";\r\n\techo \"\\t<tr>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo get_lang('CategoryName').': ';\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo \"<input type=\\\"text\\\" name=\\\"category_name\\\" value=\\\"\".$category_name.\"\\\" />\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t</tr>\\n\";\r\n\techo \"\\t<tr>\\n\";\r\n\techo \"\\t<td valign=\\\"top\\\">\\n\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo \"<input type=\\\"submit\\\" name=\\\"StoreCategory\\\" value=\\\"\".get_lang('Ok').\"\\\">\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t</tr>\\n\";\r\n\techo \"</table>\\n\";\r\n\techo \"</form>\";\r\n}", "public function create()\n {\n return view('backend.cat_add');\n }", "function CategoryForm() {\r\n\r\n\t\t$member = Member::currentUser();\r\n\r\n\t\t// Need to sort out how going to handle multiple instances of category\r\n\t\t// front end grid field : https://github.com/webbuilders-group/silverstripe-frontendgridfield\r\n\t\t// grid field extension : https://github.com/silverstripe-australia/silverstripe-gridfieldextensions\r\n\t\t$category = Category::get()->first();\r\n\t\t$fields = $category->FormFields();\r\n\r\n $actions = FieldList::create(\r\n FormAction::create(\"doCategoryForm\")->setTitle(\"Submit\")->addExtraClass('productive'),\r\n FormAction::create(\"cancel\")->setTitle(\"Cancel\")\r\n );\r\n\r\n $form = Form::create($this, 'CategoryForm', $fields, $actions);\r\n\r\n return $form;\r\n\r\n\t}", "public function page_add_edit_cat()\n\t{\n\t\t// Edition\n\t\t$cat_name = '';\n\t\tif ($this->mode == 'edit_cat')\n\t\t{\n\t\t\t$sql = 'SELECT cat_name\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'smilies_cat\n\t\t\t\t\tWHERE cat_id = ' . $this->id;\n\t\t\t$result = Fsb::$db->query($sql);\n\t\t\t$data = Fsb::$db->row($result);\n\t\t\tif (!$data)\n\t\t\t{\n\t\t\t\t$this->mode = 'add_cat';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tFsb::$db->free($result);\n\t\t\t\t$cat_name = $data['cat_name'];\n\t\t\t}\n\t\t}\n\n\t\tFsb::$tpl->set_switch('smileys_add_cat');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'L_ADD_EDIT' =>\t\t($this->mode == 'add_cat') ? Fsb::$session->lang('adm_smiley_add_cat') : Fsb::$session->lang('adm_smiley_edit_cat'),\n\t\t\t'CAT_NAME' =>\t\t$cat_name,\n\n\t\t\t'U_ACTION' =>\t\tsid('index.' . PHPEXT . '?p=posts_smiley&amp;mode=' . $this->mode . '&amp;id=' . $this->id),\n\t\t));\n\t}", "public function create() \n\t{\n\t\n\t\t$this->data = (object) array();\n\t\t// Check for post data\n\t\t$this->form_validation->set_rules($this->_validation_rules);\n\t\t\n\t\t\n\t\t// if postback-validate\n\t\tif ($this->form_validation->run()) \n\t\t{\n\t\t\t$input = $this->input->post();\n\t\t\t$id = $this->categories_m->create($input);\n\t\t\t\n\t\t\tEvents::trigger('evt_category_created', $id );\n\t\t\t\n\t\t\t$this->session->set_flashdata('success', lang('success'));\n\t\t\tredirect('admin/shop/categories');\n\t\t\t\n\t\t} \n\t\telse \n\t\t{\n\t\t\tforeach ($this->_validation_rules as $key => $value) \n\t\t\t{\n\t\t\t\t$this->data->{$value['field']} = '';\n\t\t\t}\n\t\t}\n\n\t\t$this->data->parent_category_select \t= $this->categories_m->build_dropdown(array(\n\t\t\t'type'\t=> 'all'\n\t\t)); \n\n\n\t\t// prepare dropdown image folders\n\t\t$folders = $this->_prep_folders();\n\n\n\t\t// Build page\n\t\t$this->template\n\t\t\t->title($this->module_details['name'])\n\t\t\t->set('folders',$folders)\n\t\t\t->append_js('module::admin/categories.js')\t\n\t\t\t->append_js('module::admin/admin.js')\t\t\n\t\t\t->append_metadata($this->load->view('fragments/wysiwyg', $this->data, TRUE))\n\t\t\t->build('admin/categories/form', $this->data);\n\t}", "public function createCategory();", "function addExtraCategoryFields($tag, $edit_form = false) {\n\t\tif($this->checkPermissions()) {\n\t\t\t$form_row_title = __('This category is a course', lepress_textdomain);\n\t\t\t$form_row_desc = __('Is this category a course for students ?', lepress_textdomain);\n\t\t\t$form_row_title2 = __('Open access course', lepress_textdomain);\n\t\t\t$form_row_desc2 = __('Can participant subscribe to this course without teacher\\'s verification ?', lepress_textdomain);\n\t\t\t$form_row_title3 = __('Course teachers', lepress_textdomain);\n\t\t\t$form_row_desc3 = __('Choose additional teachers for this course (Only current WordPress installation users).', lepress_textdomain);\n\t\t\t$form_row_title4 = __('Advertise this course', lepress_textdomain);\n\t\t\t$form_row_desc4 = __('Advertise this course on LePress Courses Sitewide widget ?', lepress_textdomain);\n\t\t\t$form_row_title5 = __('Close this course', lepress_textdomain);\n\t\t\t$form_row_desc5 = __('Close this course <b>CAUTION!</b> Cannot be undone! no changes can be made to course data!', lepress_textdomain);\n\t\t\t\n\t\t\tglobal $current_user;\n\t\t\tget_currentuserinfo();\n\t\t\tif(function_exists('get_users')) {\n\t\t\t\t$users = get_users(array('role' => 'lepress_teacher', 'exclude' => array($current_user->ID)));\n\t\t\t} else {\n\t\t\t\t$users = get_users_of_blog();\n\t\t\t}\n\t\t\t//Get also super admins, they are allowed to be teachers too\n\t\t\tif(is_super_admin()) {\n\t\t\t\tforeach(get_super_admins() as $super_user_login) {\n\t\t\t\t\t$user = get_user_by('login', $super_user_login);\n\t\t\t\t\t$users[] = $user;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//If new category page\n\t\t\tif(!$edit_form) {\n\t\t\t\techo '<div class=\"form-field lepress-field\">';\n\t\t\t\techo '<input type=\"checkbox\" id=\"lepress-course\" name=\"lepress-course\" value=\"1\"/>';\n\t\t\t\techo '<label for=\"lepress-course\">'.$form_row_title.'</label>';\n\t\t\t\techo '<p>'.$form_row_desc.'</p>';\n\t\t\t\techo '</div>';\n\n\t\t\t\techo '<div class=\"form-field lepress-field\">';\n\t\t\t\techo '<input type=\"checkbox\" id=\"lepress-course-open-access\" name=\"lepress-course-open-access\" value=\"1\" />';\n\t\t\t\techo '<label for=\"lepress-course-open-access\">'.$form_row_title2.'</label>';\n\t\t\t\techo '<p>'.$form_row_desc2.'</p>';\n\t\t\t\techo '</div>';\n\n\t\t\t\techo '<div style=\"margin:0 0 10px; padding: 8px;\">';\n\t\t\t\techo '<input type=\"hidden\" value=\"'.$current_user->ID.'\" name=\"lepress-course-teachers['.$current_user->ID.']\" />';\n\t\t\t\techo '<label><b>'.$form_row_title3.'</b></label>';\n\t\t\t\tforeach($users as $user) {\n\t\t\t\t\tif($user->ID != $current_user->ID) {\n\t\t\t\t\t\t$userdata = get_userdata($user->ID);\n\t\t\t\t\t\techo '<input type=\"hidden\" name=\"lepress-course-teachers['.$user->ID.']\" value=\"0\"/>';\n\t\t\t\t\t\techo '<div style=\"margin-left: 4px;\"><input type=\"checkbox\" class=\"lepress-teacher\" value=\"'.$user->ID.'\" name=\"lepress-course-teachers['.$user->ID.']\" /> '.(!empty($userdata->user_firstname) ? $userdata->user_firstname : $userdata->user_login).' '.$userdata->user_lastname.'</div>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Found only one user - current user\n\t\t\t\tif(count($users) <= 1) {\n\t\t\t\t\techo '<p><b>'.__('No LePress teachers found', lepress_textdomain).' <a href=\"'.admin_url().'user-new.php'.'\">'.__('Add here', lepress_textdomain).'</a></b></p>';\n\t\t\t\t}\n\t\t\t\techo '<p>'.$form_row_desc3.'</p>';\n\t\t\t\techo '</div>';\n\t\t\t\t\n\t\t\t\t//IF multisite, add advertise checkbox\n\t\t\t\tif(is_multisite()) {\n\t\t\t\t\techo '<div class=\"form-field lepress-field\">';\n\t\t\t\t\techo '<input type=\"checkbox\" id=\"lepress-course-advertise\" name=\"lepress-course-advertise\" value=\"1\" />';\n\t\t\t\t\techo '<label for=\"lepress-course-advertise\">'.$form_row_title4.'</label>';\n\t\t\t\t\techo '<p>'.$form_row_desc4.'</p>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t}\t\t\t\n\t\t\t} else { //If edit category page\n\t\t\t\t$course_meta = new CourseMeta($tag->term_id);\n\t\t\t\techo '<tr class=\"form-field\">';\n\t\t\t\techo '<th scope=\"row\" valign=\"top\"><label for=\"lepress-course\">'.$form_row_title.'</label></th>';\n\t\t\t\techo '<td><input type=\"hidden\" name=\"lepress-course\" value=\"0\"/>';\n\t\t\t\techo '<input type=\"checkbox\" class=\"lepress-edit-form-field\" id=\"lepress-course\" '.($course_meta->getIsCourse() ? 'checked=checked':'').' '.($course_meta->hasSubscriptions() ? 'disabled=\"disabled\"' : '').' name=\"lepress-course\" value=\"1\"/><br />';\n\t\t\t\techo '<span class=\"description\">'.$form_row_desc.' '.__('You <b>cannot change</b> this, if course has <b>active subscriptions</b>', lepress_textdomain).'</span></td>';\n\t\t\t\techo '</tr>';\n\n\t\t\t\techo '<tr class=\"form-field\">';\n\t\t\t\techo '<th scope=\"row\" valign=\"top\"><label for=\"lepress-course-open-access\">'.$form_row_title2.'</label></th>';\n\t\t\t\techo '<td><input type=\"hidden\" name=\"lepress-course-open-access\" value=\"0\" />';\n\t\t\t\techo '<input type=\"checkbox\" class=\"lepress-edit-form-field\" id=\"lepress-course-open-access\" '.($course_meta->getAccessType() ? 'checked=checked':'').' name=\"lepress-course-open-access\" value=\"1\"/><br />';\n\t\t\t\techo '<span class=\"description\">'.$form_row_desc2.'</span></td>';\n\t\t\t\techo '</tr>';\n\n\t\t\t\techo '<tr>';\n\t\t\t\techo '<th scope=\"row\" valign=\"top\"><label for=\"lepress-course-open-access\">'.$form_row_title3.'</label></th>';\n\t\t\t\techo '<td>';\n\t\t\t\tforeach($users as $user) {\n\t\t\t\t\tif($user->ID != $current_user->ID) {\n\t\t\t\t\t\t$userdata = get_userdata($user->ID);\n\t\t\t\t\t\t$isTeacher = $course_meta->isTeacher($user->ID) ? 'checked=\"checked\"' : '';\n\t\t\t\t\t\techo '<input type=\"hidden\" name=\"lepress-course-teachers['.$user->ID.']\" value=\"0\"/>';\n\t\t\t\t\t\techo '<div><input class=\"lepress-edit-form-field\" type=\"checkbox\" value=\"'.$user->ID.'\" '.$isTeacher.' name=\"lepress-course-teachers['.$user->ID.']\" /> '.(!empty($userdata->user_firstname) ? $userdata->user_firstname : $userdata->user_login).' '.$userdata->user_lastname.'</div>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Found only one user - current user\n\t\t\t\tif(count($users) <= 1) {\n\t\t\t\t\techo '<p><b>'.__('No LePress teachers found', lepress_textdomain).' <a href=\"'.admin_url().'user-new.php'.'\">'.__('Add here', lepress_textdomain).'</a></b></p>';\n\t\t\t\t}\n\t\t\t\techo '<span class=\"description\">'.$form_row_desc3.'</span></td>';\n\t\t\t\techo '</tr>';\n\t\t\t\t\n\t\t\t\t//IF is multisite, add advertise checkbox\n\t\t\t\tif(is_multisite()) {\n\t\t\t\t\techo '<tr class=\"form-field\">';\n\t\t\t\t\techo '<th scope=\"row\" valign=\"top\"><label for=\"lepress-course-open-access\">'.$form_row_title4.'</label></th>';\n\t\t\t\t\techo '<td><input type=\"hidden\" name=\"lepress-course-advertise\" value=\"0\" />';\n\t\t\t\t\techo '<input class=\"lepress-edit-form-field\" type=\"checkbox\" id=\"lepress-course-advertise\" '.($course_meta->getAdvertise() ? 'checked=checked':'').' name=\"lepress-course-advertise\" value=\"1\"/><br />';\n\t\t\t\t\techo '<span class=\"description\">'.$form_row_desc4.'</span></td>';\n\t\t\t\t\techo '</tr>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$course_meta->getIsClosed()) {\n\t\t\t\t\techo '<tr class=\"form-field\">';\n\t\t\t\t\techo '<th scope=\"row\" valign=\"top\"><label for=\"lepress-course-locked\">'.$form_row_title5.'</label></th>';\n\t\t\t\t\techo '<td><input type=\"hidden\" name=\"lepress-course-locked\" value=\"0\" />';\n\t\t\t\t\techo '<input type=\"checkbox\" class=\"lepress-edit-form-field\" id=\"lepress-course-locked\" '.($course_meta->getIsClosed() ? 'checked=checked':'').' name=\"lepress-course-locked\" value=\"1\"/><br />';\n\t\t\t\t\techo '<span class=\"description\">'.$form_row_desc5.'</span></td>';\n\t\t\t\t\techo '</tr>';\n\t\t\t\t} else {\n\t\t\t\t\techo '<tr class=\"form-field\">';\n\t\t\t\t\techo '<th scope=\"row\" valign=\"top\"><label for=\"lepress-course-locked\">'.__('Export', lepress_textdomain).'</label></th>';\n\t\t\t\t\techo '<td>';\n\t\t\t\t\techo '<a href=\"\">'.__('Export current state',lepress_textdomain).'</a><br />';\n\t\t\t\t\techo '<a href=\"'.add_query_arg(array('page' => 'lepress-import-export', 'export_tpl' => $tag->term_id), admin_url().'admin.php').'\">'.__('Export as template (all assignments without students related information)', lepress_textdomain).'</a><br />';\n\t\t\t\t\techo '<span class=\"description\">'.__('Export this course data. \"Export current state\" exports also classbook, \"Export as template\" exports assginments and creates a new template.', lepress_textdomain).'</span></td>';\n\t\t\t\t\techo '</tr>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public function add()\n {\n $category = $this->Category->newEntity();\n if ($this->request->is('post')) {\n $category = $this->Category->patchEntity($category, $this->request->getData());\n if ($this->Category->save($category)) {\n $this->Flash->success(__('The category has been saved.'));\n\n return $this->redirect(['action' => 'index']);\n }\n $this->Flash->error(__('The category could not be saved. Please, try again.'));\n }\n $this->set(compact('category'));\n }", "public function create()\n\t{\n\t\treturn view('admin.main_categories.addmain_category');\n\t}", "function gtags_group_category_form() {\n\tglobal $bp, $show_group_add_form_cats;\t\n\tif ($show_group_add_form_cats) return; // prevents showing form twice\n\t$show_group_add_form_cats = true;\n\n\t// the group category\t\n\t$group_cats = get_option('gtags_category'); \n\tif (empty($group_cats)) return;\n\t\n\t$selected = groups_get_groupmeta( $bp->groups->current_group->id, 'gtags_group_cat' ); \n\t?><label for=\"group-cat\"><?php _e( 'Group Category', 'gtags' ) ?></label>\n\t<select name=\"group-cat\" id=\"group-cat\" />\n\t\t<option value=\"\"><?php _e('--- SELECT ONE ---', 'gtags') ?></option>\n\t<?php foreach ( $group_cats as $tag => $desc ): ?>\n\t\t<?php if ( !$desc ) $desc = $tag; ?>\n\t\t<option value=\"<?php echo $tag; ?>\" <?php if ( $tag == $selected ) echo 'selected=\"selected\"' ?>><?php echo $desc; ?></option>\n\t<?php endforeach; ?>\n\t</select>\n\t<i><?php _e('(the primary group activity)', 'gtags'); ?></i><br><?php \t\n}", "public function addCategory()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$category = $_POST['category'];\n\t\t\t$sql = \"insert into lib_category (category,add_date,staff_id) \n\t\t\t\t\tvalues('\" . $category . \"','\" . date('Y-m-d') . \"','\" . cookie('staffAccount') . \"') \";\n\t\t\t$cate = D('Category');\n\t\t\t$return = $cate->execute($sql);\n\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'Add successfully!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'SQL Error!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\n\t}", "public function add_category() /// get routes of the form add cateogry\n {\n return view('admin.categories.add-category');\n }", "private function runCategory()\n {\n $num = (int) $this->ask('How many records do you want to create for the categories table?');\n factory(Category::class, $num)->create();\n }", "public function add()\n\t{\t\n\t\t//Carrega o Model Categorias\t\t\t\n\t\t$this->load->model('CategoriasModel', 'Categorias');\n\t\n\t\t$data['categorias'] = $this->Categorias->getCategorias();\t\n\n\t\t// Editando texto do titulo do header\n\t\t$data['pagecfg']['Title'] = \"Adicionar Pessoa\";\t\t\n\n\t\t// Alterando o Estado da View Para Adicionar Pessoa\n\t\t$data['pagecfg']['viewState'] = \"Adicionar Pessoa\";\n\t\t$data['pagecfg']['btnState'] = \"Adicionar\";\n\t\t$data['pagecfg']['inputState'] = \"enable\";\n\t\t$data['pagecfg']['actionState'] = \"/ListarPessoas/salvar\";\n\t\t\n\t\t//Carrega a View\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('PessoaView', $data);\n\t\t$this->load->view('templates/footer', $data);\n\t}", "public function action_addBook() {\r\n $fieldset = Fieldset::forge('book')->add_model('Model_Book');\r\n $fieldset->delete('category_id');\r\n // get form from fieldset\r\n $form = $fieldset->form();\r\n\r\n // add category to the form\r\n $categories = Model_Category::find('all');\r\n $op = array();\r\n foreach ($categories as $category) {\r\n $op[$category['id']] = $category['name'];\r\n }\r\n\r\n $form->add(\r\n 'category', 'Book category',\r\n array('options' => $op, 'type' => 'radio', 'value' => 'true')\r\n );\r\n // add submit button to the form\r\n $form->add('Submit', '', array('type' => 'submit', 'value' => 'Submit'));\r\n\r\n\r\n // build the form and set the current page as action\r\n $formHtml = $fieldset->build(Uri::create('book/addBook'));\r\n $view = View::forge('book/addBook');\r\n $view->set('form', $formHtml, false);\r\n\r\n if (Input::param() != array()) {\r\n try {\r\n $book = Model_Book::forge();\r\n $book->title = Input::param('title');\r\n $book->author = Input::param('author');\r\n $book->price = Input::param('price');\r\n $book->url = Input::param('url');\r\n $book->category_id= Input::param('category');\r\n\r\n Log::debug('selected category '.$book->category_id);\r\n Log::debug('selected category '.Input::param('category'));\r\n $book->save();\r\n Response::redirect('book');\r\n } catch (Orm\\ValidationFailed $e) {\r\n $view->set('errors', $e->getMessage(), false);\r\n }\r\n }\r\n $this->template->title = \"Book add page\";\r\n $this->template->content = $view; \r\n }", "public function addCategory()\n {\n $baker = Bakery::orderBy('id')->get();\n $this->authorize('category');\n return view('Admin.Bakery.Category.category', ['baker' => $baker]);\n }", "function lm_save_category() {\n\t@copy(LM_CDATA, LM_CBACKUP);\n\t$id = isset($_POST['category-id']) ? intval($_POST['category-id']) : null;\n\t$cid = isset($_POST['category-cid']) ? intval($_POST['category-cid']) : time();\n\t$arr = array('cid'=>$cid, 'name'=>safe_slash_html($_POST['category-name']));\n\tif (function_exists('return_i18n_languages')) {\n\t\tforeach(return_i18n_languages() as $lang) {\n\t\t\tif ($lang != return_i18n_default_language()) {\n\t\t\t\t$arr['name_'.$lang] = safe_slash_html($_POST['category-name_'.$lang]);\n\t\t\t}\n\t\t}\n\t}\n\t$categories = lm_get_categories();\n\tif (isset($id))\n\t\t$categories[$id] = $arr;\n\telse\n\t\t$categories[] = $arr;\n\tif (lm_c_to_xml($categories))\n\t\tlm_display_message(i18n_r(LM_PLUGIN.'/SUCCESS_SAVE'), true, false, true);\n\telse\n\t\tlm_display_message(i18n_r(LM_PLUGIN.'/ERROR_SAVE'), false);\n}", "function add()\n { \n $this->load->library('form_validation');\n\n\t\t$this->form_validation->set_rules('CatName','CatName','required');\n\t\t\n\t\tif($this->form_validation->run()) \n { \n $params = array(\n\t\t\t\t'CatName' => $this->input->post('CatName'),\n );\n \n $productcat_id = $this->Productcat_model->add_productcat($params);\n redirect('admin/productcat/index');\n }\n else\n { \n $data['_view'] = 'admin/productcat/add';\n $this->load->view('admin/layouts/main',$data);\n }\n }", "public function getName()\n {\n return 'category_form';\n }", "public function addCategory()\n {\n $data['categorys'] = Category::whereNull('parent_id')->get();\n return view('category.addEdit', $data);\n }", "public function query_add_edit_cat()\n\t{\n\t\t$cat_name = trim(Http::request('cat_name', 'post'));\n\t\tif ($this->mode == 'add_cat')\n\t\t{\n\t\t\t$sql = 'SELECT MAX(cat_order) AS max_order\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'smilies_cat';\n\t\t\t$max_order = Fsb::$db->get($sql, 'max_order');\n\n\t\t\tFsb::$db->insert('smilies_cat', array(\n\t\t\t\t'cat_name' =>\t$cat_name,\n\t\t\t\t'cat_order' =>\t$max_order + 1,\n\t\t\t));\n\t\t\tFsb::$db->destroy_cache('smilies_');\n\n\t\t\tDisplay::message('adm_smiley_well_cat_add', 'index.' . PHPEXT . '?p=posts_smiley', 'posts_smiley');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFsb::$db->update('smilies_cat', array(\n\t\t\t\t'cat_name' =>\t$cat_name,\n\t\t\t), 'WHERE cat_id = ' . $this->id);\n\t\t\tFsb::$db->destroy_cache('smilies_');\n\n\t\t\tDisplay::message('adm_smiley_well_cat_edit', 'index.' . PHPEXT . '?p=posts_smiley', 'posts_smiley');\n\t\t}\n\t}", "public function addAction()\n {\n $form = $this->getServiceLocator()->get('civcontent_category_form');\n \n // Check if the request is a POST.\n $request = $this->getRequest();\n if ($request->isPost())\n {\n // Create a new category object.\n $category = $this->getServiceLocator()->get('civcontent_category');\n \n $data = (array) $request->getPost();\n $form->bind($category);\n $form->setData($data);\n if ($form->isValid())\n {\n // Persist changes.\n $this->getContentService()->persistCategory($category);\n \n // Redirect to content categories\n return $this->redirect()->toRoute('content/category', array(\n 'action' => 'index'\n ));\n }\n }\n \n // If a GET request, or invalid data then render/re-render the form\n return new ViewModel(array(\n 'form' => $form,\n ));\n }", "public function addDB()\n {\n $nom = $_POST['nom'];\n $description = $_POST['descrip'];\n\n $requete = $this->connexion->prepare(\"INSERT INTO `category`(`id`, `nom`, `description`)\n VALUES (NULL, :nom, :description)\");\n $requete->bindParam(':nom', $nom);\n $requete->bindParam(':description', $description);\n $resultat = $requete->execute();\n }", "public function create()\n {\n return view('backend.category.add');\n }", "public function subcategory(){\n\t\t$modelservices = new Application_Model_Services();\n\t\t$servicelist = $modelservices->servicesdata();\n\t\t$caterories = $modelservices->categorydata();\n\t//prd($caterories);\n\n \t\t$this->addElement('text', 'service_name', array (\n\t\t\t\"required\" => TRUE,\n\t\t\t'class' => 'form-control required',\n\t\t\t\"label\" => \"Service Sub Category Title \" ,\n\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\"),\n\t\t\t\"validators\" => array(\n\t\t\t\t\t\t\t\tarray(\"NotEmpty\",true,array(\"messages\"=>\" Expertise Title is required \")),\n \t\t\t\t\t\t\t),\n \t\t));\n\t\t$this->addElement('text', 'service_price', array (\n\t\t\t\"required\" => TRUE,\n\t\t\t'class' => 'form-control required digits',\n\t\t\t\"label\" => \"Service Credit \" ,\n\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\"),\n\t\t\t\"validators\" => array(\n\t\t\t\t\t\t\t\tarray(\"NotEmpty\",true,array(\"messages\"=>\"Price is required \")),\n \t\t\t\t\t\t\t),\n \t\t));\n\t\t$this->addElement('select', 'service_parent_id', array (\n\t\t\t\t'class' => 'form-control required' ,\n\t\t\t\t\"required\"=>true,\n\t\t\t\t\"multioptions\"=>$servicelist,\n\t\t\t\t\"onchange\"=>\"getcategorylist(this.value)\",\n\t\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\",\"HtmlEntities\"),\n\t\t\t\t\n\t\t));\n\t\t$this->addElement('select', 'service_sub_parent_id', array (\n\t\t\t\t'class' => 'form-control required' ,\n\t\t\t\t\"required\"=>true,\n\t\t\t\t\"multioptions\"=>$caterories,\n\t\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\",\"HtmlEntities\"),\n\t\t\t\t\n\t\t));\n \t\t$this->submitButton();\n \t}", "function fill_parent_combo( $form_name, $category_id )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_categories where status = 1\";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\t$combo = '<select class=\"validate[required] txarea2\" name=\"category_id\" id=\"category_id\" onchange=\"document.uploadAdvert.submit()\" >\n\t\t\t\t\t<option value=\"\">---Please Select Category---</option>';\n\t\tif( $r != false )\n\t\t{\n\t\t\tfor( $i = 0; $i < count( $r ); $i++ )\n\t\t\t{\n\t\t\t\t$selected = $category_id== $r[$i]['category_id'] ? \"selected\" : \"\";\n\t\t\t\t$combo .= '<option '.$selected.' value=\"'.$r[$i]['category_id'].'\">'.$r[$i]['category_title'].'</option>';\n\t\t\t}\t//\tEnd of for Looooooop\n\t\t}\t//\tEnd of if( $r != false )\n\t\t$combo .= '</select>';\n\t\t\n\t\treturn $combo;\n\t}", "public function create()\n {\n return view('admin.pages.category.add');\n }", "public function formModify() {\n $categories=$this->model->listCategories();\n $this->view->display(\"view/form/ProductFormModify.php\", NULL, $categories); \n }", "public function actionCreate()\r\n {\r\n $model = new Category();\r\n\r\n //Значения по умолчанию\r\n $model->skay = 1;\r\n $model->solo = 1;\r\n $model->program = 1;\r\n\r\n $judge_list = Judge::find()->select(['sname'])->indexBy('id')->column();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n \r\n// $tur = new Tur();\r\n// $tur->category_id = $model->id;\r\n// $tur->dances = $model->dances;\r\n// $tur->save();\r\n \r\n return $this->redirect(['reglament/index']);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n 'judge_list' => $judge_list,\r\n ]);\r\n }\r\n }", "function ccategories_create()\n\t{\n\t\tlusers_require(\"categories/create\");\n\n\t\t$post_data = linput_post();\n\t\t$post_data = linput_post_checkbox($post_data, \"content\");\n\t\t$content = $post_data[\"content\"];\n\n\t\tif (hform_validate(array(\"name\", \"link\", \"parentid\")))\n\t\t{\n\t\t\t$cat_created = mcategories_create($post_data);\n\t\t\tif ($content) $content_created = mcontent_create($post_data);\n\t\t\telse $content_created = false;\n\n\t\t\tif (($cat_created && !$content) || ($content && $cat_created && $content_created))\n\t\t\t{\n\t\t\t\tlcache_delete_all();\n\t\t\t\thmessage_set(l(\"Category successfully created.\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($cat_created) mcategories_delete($post_data[\"link\"]);\n\t\t\t\tif ($content_created) mcontent_delete($post_data[\"link\"]);\n\t\t\t\thmessage_set(l(\"Category create error.\") . \" \" . l(\"Link already in use.\"));\n\t\t\t}\n\n\t\t\tluri_redirect(\"main/user/admin/categories\");\n\t\t}\n\t\telse luri_redirect(\"main/user/admin/categories_create\", l(\"All fields marked with * are required.\"));\n\t}", "public function category_add() {\n $this->autoRender = false;\n $params = $this->request->data;\n //echo \"<pre>\";print_r($params);echo \"</pre>\"; exit;\n $categoryTable = TableRegistry::get('SkillCategory');\n $getCategory = $categoryTable->find()->select(['id'])->where(['category_name' => $params['category_name']])->toArray();\n if(empty($getCategory)){\n $category = $categoryTable->newEntity($params);\n if ($categoryTable->save($category)) {\n echo json_encode(\n [\n 'status' => 1,\n 'message' => \"Skill Category Added!\",\n ]\n );\n exit;\n }\n }else{\n echo json_encode(\n [\n 'status' => 0,\n 'message' => \"Skill Category Already Exists!\",\n ]\n );\n exit;\n }\n \n }", "public function addCategory()\n {\n return view('backend.admin-panel.pages.addCategory');\n }", "static public function ctrCrearCategoria(){\n\n\t\tif(isset($_POST[\"nuevaCategoria\"])){\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/',$_POST[\"nuevaCategoria\"])){\n\n\t\t\t\t$tabla=\"categorias\";\n\n\t\t\t\t$datos=$_POST[\"nuevaCategoria\"];\n\n\t\t\t\t$respuesta=ModelCategoria::mdlIngresarCategoria($tabla, $datos);\n\n\n\t\t\t\tif($respuesta==\"ok\"){\n\n\t\t\t\t\techo '<script> \n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttype:\"success\",\n\t\t\t\t\t\t\ttitle:\"¡La categoria ha sido creada correctamente!\",\n\t\t\t\t\t\t\tshowConfirmButton:true,\n\t\t\t\t\t\t\tconfirmButtonText:\"cerrar\",\n\t\t\t\t\t\t\tclaseOnConfirm:false\n\t\t\t\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\twindow.location=\"categorias\";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t </script>';\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse{\n\n\t\t\t\techo '<script> \n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\t\ttitle:\"¡La categoria no puede ir vacia o llevar caracteres especiales!\",\n\t\t\t\t\t\t\tshowConfirmButton:true,\n\t\t\t\t\t\t\tconfirmButtonText:\"cerrar\",\n\t\t\t\t\t\t\tclaseOnConfirm:false\n\t\t\t\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\twindow.location=\"categorias\";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t});\n\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t </script>';\n\n\n\t\t\t}\n\n\t\t}\n\n\n\t}", "public function actionCreate()\n {\n $model = new Categoria();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function getFormCategory()\n\t{\n\t\treturn strtolower($this->_removeNonAlphaCharacters($this->category));\n\t}", "function target_add_cat($cat)\n{\n\tif ($GLOBALS['VERBOSE']) pf('...'. $cat['name']);\n\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'cat (id, name, view_order, cat_opt) \n\t VALUES('. (int)$cat['id'] .','. _esc($cat['name']) .','. (int)$cat['view_order'] .', 3)');\n\t$GLOBALS['cat_map'][ $cat['id'] ] = $cat['id'];\n/*\nfud_use('cat.inc', true);\n$nc = new fud_cat;\n$nc->name = $c->name;\n$nc->description = $c->description;\n$nc->view_order = $c->disporder;\n$nc->cat_opt = 1|2;\t// This should be the default in cat.inc. Fix in next release and del this line.\n$GLOBALS['cat_map'][$c->fid] = $nc->add('LAST');\t// FIRST should also be defaulted.\n*/\n}", "public function create() {\n return view('admin.category.category_create_form');\n }", "function question_category_form($course, $current, $recurse=1, $showhidden=false, $showquestiontext=false) {\n global $CFG;\n\n/// Make sure the default category exists for this course\n get_default_question_category($course->id);\n\n/// Get all the existing categories now\n $catmenu = question_category_options($course->id, true);\n\n $strcategory = get_string(\"category\", \"quiz\");\n $strshow = get_string(\"show\", \"quiz\");\n $streditcats = get_string(\"editcategories\", \"quiz\");\n\n echo \"<table><tr><td style=\\\"white-space:nowrap;\\\">\";\n echo \"<strong>$strcategory:</strong>&nbsp;\";\n echo \"</td><td>\";\n popup_form (\"edit.php?courseid=$course->id&amp;cat=\", $catmenu, \"catmenu\", $current, \"\", \"\", \"\", false, \"self\");\n echo \"</td><td align=\\\"right\\\">\";\n echo \"<form method=\\\"get\\\" action=\\\"$CFG->wwwroot/question/category.php\\\">\";\n echo \"<div>\";\n echo \"<input type=\\\"hidden\\\" name=\\\"id\\\" value=\\\"$course->id\\\" />\";\n echo \"<input type=\\\"submit\\\" value=\\\"$streditcats\\\" />\";\n echo '</div>';\n echo \"</form>\";\n echo '</td></tr></table>';\n\n echo '<form method=\"get\" action=\"edit.php\" id=\"displayoptions\">';\n echo \"<fieldset class='invisiblefieldset'>\";\n echo \"<input type=\\\"hidden\\\" name=\\\"courseid\\\" value=\\\"{$course->id}\\\" />\\n\";\n question_category_form_checkbox('recurse', $recurse);\n question_category_form_checkbox('showhidden', $showhidden);\n question_category_form_checkbox('showquestiontext', $showquestiontext);\n echo '<noscript><div class=\"centerpara\"><input type=\"submit\" value=\"'. get_string('go') .'\" />';\n echo '</div></noscript></fieldset></form>';\n}", "public function add_category() {\n\t\n\t\tif($this->input->post('add_type')=='add_category') {\t\t\n\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t$Return = array('result'=>'', 'error'=>'', 'csrf_hash'=>'');\n\t\t$Return['csrf_hash'] = $this->security->get_csrf_hash();\n\t\t\t\n\t\t/* Server side PHP input validation */\t\t\n\t\tif($this->input->post('name')==='') {\n \t$Return['error'] = $this->lang->line('xin_error_cat_name_field');\n\t\t}\n\t\t\t\t\t\t\n\t\tif($Return['error']!=''){\n \t\t$this->output($Return);\n \t}\n\t\t\n\t\t// set data\n\t\t$data = array(\n\t\t'category_name' => $this->input->post('name'),\n\t\t'created_at' => date('d-m-Y h:i:s')\n\t\t);\n\t\t\n\t\t$result = $this->Assets_model->add_assets_category($data);\n\t\tif ($result == TRUE) {\n\t\t\t$Return['result'] = $this->lang->line('xin_success_assets_category_added');\n\t\t} else {\n\t\t\t$Return['error'] = $this->lang->line('xin_error_msg');\n\t\t}\n\t\t$this->output($Return);\n\t\texit;\n\t\t}\n\t}", "public function Add($id)\n\t{\n\n\t\t//dd( Categoria::$rules);\n\t\t$form = new GroupForm();\n\n\t\tif ($form->isPosted())\n\t\t{\n\t\t\t$this->beforeFilter('csf', array('on' => 'post'));\n\n\t\t\tif ($form->isValidForAdd(Categoria::$rules))\n\t\t\t{\n\t\t\t\t$entrada = new Categoria();\n\n\t\t\t\t\t$entrada->descricao = Input::get(\"descricao\");\n\t\t\t\t\t$entrada->tipo = Input::get(\"tipo\");\n\t\t\t\t\t$entrada->user_id = isset(Auth::user()->id)? Auth::user()->id : 1;\n\t\t\t\t\t$entrada->save();\n\t\t\t\t\n\n\t\t\t\treturn Redirect::route(\"categ_list\");\n\t\t\t}\n\n\t\t\treturn Redirect::route(\"categ_add\")->withInput([\n\t\t\t\t\"descricao\" => Input::get(\"descricao\"),\n\t\t\t\t\"tipo\" => Input::get(\"tipo\")\n\t\t\t])->withErrors($form->getErrors());\n\t\t}\n\t\t$categorias = Categoria::all();\n\t\t$cat = $categorias;\n\t\t$dadosCat = array();\n\t\tforeach ($categorias as $categoria) {\n\t\t\t\n\t\t\t$dadosCat[$categoria->id] = $categoria->descricao;\n\t\t}\n\n\t\t\n\t\treturn View::make(\"admin.categorias.create\", [\n\t\t\t\"tipo\" => $id,\n\t\t\t\"form\" => $form \n\t\t], compact('cat'))->with(\"categorias\", $dadosCat);\n\t\t\n\t}", "function addcategory(){\n \treturn view('category');\n }", "public function create()\n {\n return view('admin.master.category_name.add');\n }", "public function create()\n {\n return view (\"admin.category.create\");\n }", "public function create()\n {\n return view('news.admin.categ.add');\n }", "public function getAddEditForm($target = '/admin/Cart') {\n\t\t$form = new Form('CartCategory_addedit', 'post', $target);\n\t\t\n\t\t$form->setConstants( array ( 'section' => 'categories' ) );\n\t\t$form->addElement( 'hidden', 'section' );\n\t\t$form->setConstants( array ( 'action' => 'addedit' ) );\n\t\t$form->addElement( 'hidden', 'action' );\n\t\t\n\t\tif (!is_null($this->getId())) {\n\t\t\t$form->setConstants( array ( 'cartcategory_categories_id' => $this->getId() ) );\n\t\t\t$form->addElement( 'hidden', 'cartcategory_categories_id' );\n\t\t\t\n\t\t\t$defaultValues ['cartcategory_name'] = $this->getName();\n\t\t\t$defaultValues ['cartcategory_description'] = $this->getDescription();\n\t\t\t$defaultValues ['cartcategory_image'] = $this->getImage();\n\t\t\t$defaultValues ['cartcategory_parent_id'] = $this->getParent_id();\n\t\t\t$defaultValues ['cartcategory_date_added'] = $this->getDate_added();\n\t\t\t$defaultValues ['cartcategory_last_modified'] = $this->getLast_modified();\n\t\t\t$defaultValues ['cartcategory_status'] = $this->getStatus();\n\n\t\t\t$form->setDefaults( $defaultValues );\n\t\t}\n\t\t\n\t\t$form->addElement('text', 'cartcategory_name', 'Name');\n\t\t\n\t\t$description = $form->addElement('textarea', 'cartcategory_description', 'Description');\n\t\t$description->setCols(80);\n\t\t$description->setRows(10);\n\t\t\n\t\t$newImage = $form->addElement('file', 'cartcategory_image_upload', 'Category Image');\n\t\t$curImage = $form->addElement('dbimage', 'cartcategory_image', $this->getImage());\n\t\t\n\t\t$form->addElement('select', 'cartcategory_parent_id', 'Parent Category', self::toArray());\n\t\t\n\t\t$added = $form->addElement('text', 'cartcategory_date_added', 'Date Added');\n\t\t$added->freeze();\n\t\t\n\t\t$modified = $form->addElement('text', 'cartcategory_last_modified', 'Date Last Modified');\n\t\t$modified->freeze();\n\t\t\n\t\t$form->addElement('select', 'cartcategory_status', 'Status', Form::statusArray());\n\t\t$form->addElement('submit', 'cartcategory_submit', 'Submit');\n\n\t\tif (isset($_REQUEST['cartcategory_submit']) && $form->validate() && $form->isSubmitted()) {\n\t\t\t$this->setName($form->exportValue('cartcategory_name'));\n\t\t\t$this->setDescription($form->exportValue('cartcategory_description'));\n\t\t\t$this->setImage($form->exportValue('cartcategory_image'));\n\t\t\t$this->setParent_id($form->exportValue('cartcategory_parent_id'));\n\t\t\t$this->setDate_added($form->exportValue('cartcategory_date_added'));\n\t\t\t$this->setLast_modified($form->exportValue('cartcategory_last_modified'));\n\t\t\t$this->setStatus($form->exportValue('cartcategory_status'));\n\t\t\t\n\t\t\tif ($newImage->isUploadedFile()) {\n\t\t\t\t$im = new Image();\n\t\t\t\t$id = $im->insert($newImage->getValue());\n\t\t\t\t$this->setImage($im);\n\t\t\t\t\n\t\t\t\t$curImage->setSource($this->getImage()->getId());\n\t\t\t}\n\t\t\t\n\t\t\t$this->save();\n\t\t}\n\n\t\treturn $form;\n\t\t\n\t}", "function addAction()\n\t{\n global $langCode;\n\t\t$error \t= array();\n\t\t$success \t= array();\n\t\t$contents \t= '';\n\t\t$formData \t= array();\n\t\t\n\t\t$parentid = (int)($this->registry->router->getArg('parentid'));\n\t\tif($parentid > 0)\n\t\t\t$formData['fparentid'] = $parentid; \n\t\t\n\t\tif(!empty($_POST['fsubmit']))\n\t\t{\n if($_SESSION['productcategoryAddToken']==$_POST['ftoken'])\n {\n $formData = array_merge($formData, $_POST);\n \n if($this->addActionValidator($formData, $error))\n {\n $myProductCat = new Core_ProductCategory();\n //thong tin khong lien quan ngon ngu\n $myProductCat->name = $formData['fname'];\n $myProductCat->parentid = (int)$formData['fparentid'];\n $myProductCat->enable = (int)$formData['fenable']==1?1:0;\n //Neu nguoi dung nhap SeoUrl thi xu li dau cua chuoi nguoi dung nhap \n //Truong hop nguoi dung khong nhap thi chung ta lay idtext de thay the!!!!!\n if(strlen($formData['fseourl']) > 0)\n $myProductCat->seoUrl = Helper::codau2khongdau($formData['fseourl'], true);\n else\n $myProductCat->seoUrl = Helper::codau2khongdau(strip_tags($formData['fname'][$langCode]), true);\n //cac thong tin lien quan ngong ngu\n $myProductCat->seoTitle = $formData['fseotitle'];\n $myProductCat->seoKeyword = $formData['fseokeyword'];\n $myProductCat->seoDescription = $formData['fseodescription'];\n if($myProductCat->addData())//them vao database\n {\n $success[] = str_replace('###categoryname###', $myProductCat->name[$langCode], $this->registry->lang['controller']['succAdd']);\n $this->registry->me->writelog('ProductCategoryadd', $myProductCat->id, array('name' => $myProductCat->name[$langCode], 'order' => $myProductCat->order));\n $formData = array('fparentid' => $formData['fparentid']); \n }\n else\n {\n $error[] = $this->registry->lang['controller']['errAdd']; \n }\n }\n }\n $_SESSION['productcategoryAddToken']=Helper::getSecurityToken();//Tao token moi\n\t\t}\n\t\t\n\t\t\n\t\t$this->registry->smarty->assign(array(\t'formData' \t\t=> $formData,\n\t\t\t\t\t\t\t\t\t\t\t\t'parentCategories' => Core_ProductCategory::getFullCategories(),\n\t\t\t\t\t\t\t\t\t\t\t\t'redirectUrl'\t=> $this->getRedirectUrl(),\n\t\t\t\t\t\t\t\t\t\t\t\t'error'\t\t\t=> $error,\n\t\t\t\t\t\t\t\t\t\t\t\t'success'\t\t=> $success,\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));\n\t\t$contents .= $this->registry->smarty->fetch($this->registry->smartyControllerContainer.'add.tpl');\n\t\t$this->registry->smarty->assign(array(\n\t\t\t\t\t\t\t\t\t\t\t\t'menu'\t\t=> 'productcategoryadd',\n\t\t\t\t\t\t\t\t\t\t\t\t'pageTitle'\t=> $this->registry->lang['controller']['pageTitle_add'],\n\t\t\t\t\t\t\t\t\t\t\t\t'contents' \t\t\t=> $contents));\n\t\t$this->registry->smarty->display($this->registry->smartyControllerGroupContainer . 'index.tpl');\n\t}", "public function create()\n {\n $category = Categories::all();\n return view('panel.product-management.categories.form-create')->with(['category' => $category]);\n }", "public function stepCategory()\n {\n global $rlSmarty, $rlCategories, $page_info, $account_info, $sError, $config;\n\n parent::step();\n\n $GLOBALS['rlHook']->load('addListingGetCats');\n\n // Define allowed types\n $allowed_type_keys = $account_info['Abilities'];\n\n // \"Individual add listing page\" mode\n if ($page_info['Key'] != 'add_listing') {\n $individual_type_key = substr($page_info['Key'], 3);\n\n if (in_array($individual_type_key, $allowed_type_keys)) {\n $allowed_type_keys = array($individual_type_key);\n } else {\n $sError = true;\n }\n }\n\n // Adapt listing types array\n $allowed_types = $GLOBALS['rlListingTypes']->adaptTypes($allowed_type_keys);\n $rlSmarty->assign_by_ref('allowed_types', $allowed_types);\n\n // Existing membership plan mode\n $this->existingMembershipHandler($account_info);\n\n // Remove unnecessary steps\n if (!$this->singleStep) {\n unset($this->steps['photo'], $this->steps['checkout']);\n }\n }", "public function newcategory() {\n\n if (ckeckAddmin()) {\n $this->load->view('admin/header/header');\n $this->load->view('admin/css/css');\n $this->load->view('admin/topnav/topnav');\n $this->load->view('admin/sidenav/sidenav');\n $this->load->view('admin/content/addcatogry');\n $this->load->view('admin/footer/footer');\n # $this->load->view('admin/js/extra');\n $this->load->view('admin/js/js');\n } else {\n CustomFlash('Admin/login', 'alert-danger', 'plz First Login');\n }\n }", "public function create()\n\t{\n\t\t//\n\t\t\n\t\treturn view('categoria.add-categoria');\n\n\t}", "public function addform()\n\t{\n\t\t\t$this->setMethod('get');\n\n\t\t\t//echo \"<pre>\";\n\t\t\t//print_r($_GET);\n\t\t\t//echo \"</pre>\";\n\t\t\t$this->addElement('radio', 'Status', array(\n\t\t\t\t'required' => true,\n 'separator' => '&nbsp;',\n\t\t\t\t'multiOptions' => array(\n\t\t\t\t\t'1' => IN_PROGRESS,\n\t\t\t\t\t'2' => 'Closed'\n\t\t\t\t\t\n\t\t\t\t),\n\t\t\t\t\t'separator' => '',\n\t\t\t\t'value' => '1' //key of multiOption\n\t\t\t));\n\n\t\t\n\t\t\n\t\t$this->addElement ( \n 'multiCheckbox', 'Functional_type', \n array (\n \n\t\t//'setrequired' => true,\n 'multiOptions' => array(\n '1' => 'Pre Installation',\n '2' => 'Installation',\n '3' => 'Post Installation'\n \n ),\n 'separator' => '',\n\t\t\t\t\t//'value' => '2' // select these 2 values\n )\n);\n\t\n\t\t\t\t\n\t\t\t$this->addElement('submit', 'submit', array(\n\t\t\t\t\t'ignore' => true,\n\t\t\t\t\t'label' => 'Submit',\n\t\t\t));\n\t\t\t\n\t\t\t// And finally add some CSRF protection\n\t\t\t$this->addElement('hash', 'csrf', array(\n\t\t\t\t\t'ignore' => true,\n\t\t\t));\t\n\t}", "public function addCategory()\n {\n $items = Categories::where('is_parent', 1)->orderBy('category_name')->get();\n return view('admin.category.addCategory', compact('items'));\n }", "function add()\n {\n if($this->acceso(3)){\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'categoria_nombre' => $this->input->post('categoria_nombre'),\n );\n\n $categoria_id = $this->Categoria_model->add_categoria($params);\n redirect('categoria/index');\n }\n else\n { \n $data['_view'] = 'categoria/add';\n $this->load->view('layouts/main',$data);\n }\n }\n }", "public function addAction() {\n $session = new Container('User');\n $form = new CategoryForm('CategoryForm');\n\n $form->get('created_date')->setValue(time());\n $form->get('created_by')->setValue($session->offsetGet('userId'));\n $form->get('updated_date')->setValue(time());\n $form->get('updated_by')->setValue($session->offsetGet('userId'));\n\n $request = $this->getRequest();\n if ($request->isPost()) {\n $category = new Category();\n $data = $request->getPost();\n $form->setInputFilter($category->getInputFilter());\n $form->setData($data);\n if ($form->isValid()) {\n $validatorName = new \\Zend\\Validator\\Db\\NoRecordExists(\n array(\n 'table' => 'category',\n 'field' => 'title',\n 'adapter' => $this->getAdapter()\n )\n );\n if ($validatorName->isValid(trim($category->title))) {\n $no_duplicate_data = 1;\n } else {\n $flashMessage = $this->flashMessenger()->getErrorMessages();\n if (empty($flashMessage)) {\n $this->flashMessenger()->setNamespace('error')->addMessage('Category Name already Exists.');\n }\n $no_duplicate_data = 0;\n }\n\n if ($no_duplicate_data == 1) {\n $category->exchangeArray($form->getData());\n $data->created_date = time();\n $data->created_by = $session->offsetGet('userId');\n $data->updated_date = time();\n $data->updated_by = $session->offsetGet('userId');\n\n $questionId = $this->getCategoryTable()->saveCategory($category);\n// $this->getServiceLocator()->get('Zend\\Log')->info('Level created successfully by user ' . $session->offsetGet('userId'));\n $this->flashMessenger()->setNamespace('success')->addMessage('Category created successfully');\n return $this->redirect()->toRoute('category');\n }\n }\n }\n\n return array('form' => $form);\n }", "public function create()\n {\n return view('admin.category.add');\n }", "function display_category_form($category = ''){\n\t// This form can be used for inserting or editing categries\n\t// To insert, don't pass any parameters\n\t// To update, pass an array containing a category\n\t$edit = is_array($category);\n?>\n<form method='post'\n action='<?php echo $edit?'edit_category.php':'insert_category.php'; ?>'>\n<table border='0'>\n <tr>\n <td>Category Name:</td>\n\t<td><input type='text' name='catname' size='40' maxlength='40'\n\t value='<?php echo $edit?$category['catname']:''; ?>' /></td>\n </tr>\n <tr>\n <td <?php if (!$edit) echo \"colspan='2'\"; ?> align='center'>\n<?php\nif ($edit)\n\techo \"<input type='hidden' name='catid' value='\" . $category['catid']\n\t\t. \"' />\";\n?>\n\t <input type='submit'\n\t value=\"<?php echo $edit?'Rename':'Add'; ?> Category\" /></td>\n\t </form>\n<?php\n\tif ($edit)\n\t\techo '<form method=\"post\" action=\"/myPHP/ShoppingCart/model/admin/delete_category.php\">\n\t\t\t\t<td align=\"center\">\n\t\t\t\t<input type=\"hidden\" name=\"catid\" value=\"' . $category['catid'] .'\" />\n\t\t\t\t<input type=\"submit\" value=\"Delete Category\" />\n\t\t\t \t</td>\n\t\t\t</form>';\n?>\n\n\n<?php\n}", "function shophead_add()\n {\n $this->layout = 'admin_layout';\n if ($this->request->is('post')) {\n $this->ProductCategory->set($this->request->data);\n\t\t\t $this->request->data = Sanitize::clean($this->request->data, array('encode' => false));\n if ($this->ProductCategory->validates()) {\n if ($this->ProductCategory->save($this->request->data)) {\n $this->Session->write('flash', array(ADD_RECORD, 'success'));\n\n } else {\n $this->Session->write('flash', array(ERROR_MSG, 'failure'));\n }\n $this->redirect(array('controller' => 'ProductCategories', 'action' => 'index'));\n }\n }\n }", "public function add()\n {\n // Pull the categories from the Categorys table\n $allCategories = Categories::all();\n // compact it into the view\n // where you select the category, change to select with the options\n // being the categories which you compacted in\n\t return view(\"dishes.add\", compact(\"allCategories\"));\n }", "public function create()\n {\n $this->categoryRepository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n\n // Get Categories Dropdown list\n $categories = $this->categoryRepository->getCategoryDropdownList();\n $categories[0] = 'Root Category';\n\n return view('admin.categories.add',compact('categories'));\n }", "public function add()\n {\n return view('category.add');\n }", "public function newAction()\n {\n $entity = new Categoria();\n $form = $this->createForm(new CategoriaType(), $entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "function add_categories(){\n\t\t\tprint_r($this->input->post());\n\t\t}", "public function create()\n {\n return view('admin.pages.category.add');\n }", "public function create()\n { \n $form_type = 'Add';\n $images = [];\n $category = [];\n $questions = ['Case / Box','A Game','The Manual'];\n \n $categories = Categories::where('parent_id',0)->pluck('category_name','id')->prepend('Select League', ''); \n $regions = Regions::pluck('name','id')->prepend('Select Region', ''); \n \n return view('admin.subcategories.form', compact('form_type','categories','regions','images','category','questions')); \n }", "protected function form()\n {\n return Admin::form(Category::class, function (Form $form) {\n\n $form->display('catid', 'ID');\n $form->text('name','Category Name')->rules('required');\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }", "public function create()\n {\n $parent = $this->cateRepository->getSelect();\n return view('backend.category.add',compact('parent'));\n }", "public function actionCreate()\n\t{\n\t\t$model=new BookCategories;\n $step = 1;\n\t\tif(isset($_POST['BookCategories']))\n\t\t{\n\t\t\t$model->attributes=$_POST['BookCategories'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('update?id='.$model->id.'&step=2'));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n 'step' => $step\n\t\t));\n\t}", "private function addCategory(HTTPRequest $request)\n {\n if ($this->manager->getManagerOf('Category')->getCategoryByName($request->postData('newCategory')) != null) {\n Session::getInstance()->setFlash('danger', 'Cette catégorie existe déjà.');\n } else {\n if ($request->postExists('newCategory') && ($this->manager->getManagerOf('Category')->getCategoryByName($request->postData('newCategory')) == false)) {\n $category = new Category(\n ['name' => $request->postData('newCategory')]\n );\n\n if ($category->getErrors() != null) {\n $category->getErrorMessage();\n } else {\n $this->manager->getManagerOf('Category')->addNewCategory($category);\n Session::getInstance()->setFlash('success', 'Une nouvelle catégorie a été ajoutée.');\n }\n }\n }\n }", "public function create()\n {\n return \\view(\"pages.admin.category.create\");\n }", "function addCategory() {\n var_dump($this->request->data);\n if ($this->request->is('post') || $this->request->is('put')) {\n $ci = $this->CategoryItem->create();\n var_dump($ci);\n if ($this->CategoryItem->save($this->request->data)) {\n $this->Session->setFlash(__('The %s has been saved', __('link')), 'flash/success');\n } else {\n $this->Session->setFlash(__('The %s could not be saved. Please, try again.', __('link')), 'flash/failure');\n }\n// $this->redirect(array('action' => 'edit', $this->Item->id));\n } else {\n $this->redirect(array('action' => 'index'));\n }\n }", "public function categorie()\n {\n $data[\"categories\"]=$this->categories->list();\n $this->template_admin->displayad('categories' , $data);\n }", "private function categoriesFormInputs()\n {\n // Get the field name of the field with the category icon\n // #47631, dwildt, 1-\n //$arrLabels[ 'catIcon' ] = $this->confMap['configuration.']['categories.']['fields.']['categoryIcon'];\n // #47631, #i0007, dwildt, 10+\n switch ( true )\n {\n case( $this->pObj->typoscriptVersion <= 4005004 ):\n $arrLabels[ 'catIcon' ] = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'categoryIcon' ];\n break;\n case( $this->pObj->typoscriptVersion <= 4005007 ):\n default:\n $arrLabels[ 'catIcon' ] = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryIcon' ];\n break;\n }\n // #47631, #i0007, dwildt, 10+\n // Default space in HTML code\n $tab = ' ';\n\n // FOREACH category label\n//$this->pObj->dev_var_dump( $this->arrCategories );\n // #i0118, dwildt, 1-/+\n //foreach ( $this->arrCategories[ 'labels' ] as $labelKey => $labelValue )\n foreach ( ( array ) $this->arrCategories[ 'labels' ] as $labelKey => $labelValue )\n {\n // Get the draft for an input field\n $cObj_name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'form_input' ];\n $cObj_conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'form_input.' ];\n $input = $this->pObj->cObj->cObjGetSingle( $cObj_name, $cObj_conf );\n // replace the category marker\n $input = str_replace( '###CAT###', $labelValue, $input );\n // 4.1.17, 120927, dwildt\n // replace the category marker\n //$labelValueWoSpc = str_replace( ' ', null, $labelValue );\n $labelValueWoSpc = $this->zz_properFormLabel( $labelValue );\n $input = str_replace( '###CAT_WO_SPC###', $labelValueWoSpc, $input );\n // 4.1.17, 120927, dwildt\n // #54548, 131221, dwildt, 6+\n $class = $this->arrCategories[ 'cssClass' ][ $labelKey ];\n if ( !empty( $class ) )\n {\n $class = ' class=\"' . $class . '\"';\n }\n $input = str_replace( '###CLASS###', $class, $input );\n\n // IF draft for an input field contains ###IMG###, render an image\n $pos = strpos( $input, '###IMG###' );\n if ( !( $pos === false ) )\n {\n // SWITCH : Render the image\n switch ( true )\n {\n // #i0062\n case( $labelKey == $this->arrWoCategories[ 'iconKey' ] ):\n $name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey ];\n $conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey . '.' ];\n $img = $this->pObj->cObj->cObjGetSingle( $name, $conf );\n break;\n case( is_array( $this->arrCategories[ 'icons' ] ) ):\n // 4.1.7, dwildt, +\n $this->cObjDataAddArray( array( $arrLabels[ 'catIcon' ] => $this->arrCategories[ 'icons' ][ $labelKey ] ) );\n $img = $this->renderMapMarkerVariablesSystemItem( 'categoryIconLegend' );\n $this->cObjDataRemoveArray( array( $arrLabels[ 'catIcon' ] => $this->arrCategories[ 'icons' ][ $labelKey ] ) );\n // 4.1.7, dwildt, +\n break;\n default:\n // Render the image\n $name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey ];\n $conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey . '.' ];\n $img = $this->pObj->cObj->cObjGetSingle( $name, $conf );\n break;\n }\n // SWITCH : Render the image\n\n $input = str_replace( '###IMG###', $img, $input );\n }\n // IF draft for an input field contains ###IMG###, render an image\n\n $arrInputs[] = $tab . $input;\n }\n // FOREACH category label\n // Move array of input fields to a string\n // #i0118, dwildt, 1-/+\n //$inputs = implode( PHP_EOL, $arrInputs );\n $inputs = implode( PHP_EOL, ( array ) $arrInputs );\n $inputs = trim( $inputs );\n\n // RETURN input fields\n return $inputs;\n }", "public function create()\n {\n return view('admin.categories.form');\n }", "public function addPost(){\n\n if ($this->input->post(\"category_create\") === null){\n $this->view->redirect(\"/categories/manage\");\n }\n\n if (!$this->auth->isLogged()) {\n $this->view->redirect(\"/user/login\", \"You can not add new categories if you are not logged in!\");\n }\n\n if (!$this->auth->isInRole(\"admin\")) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not Admin!\");\n }\n\n $categoryName = $this->input->post(\"category_name\");\n\n $this->validate->setRule(\"minlength\",$categoryName,3, \"Category name length must be more then 3 symbols!\");\n\n if ($this->validate->validate() === false){\n $error = $this->validate->getErrors();\n $this->view->redirect(\"/categories/manage\",$error);\n }\n\n $categoryModel = new CategoriesModel();\n try{\n if ($categoryModel->hasCategory($categoryName)){\n $this->view->redirect(\"/categories/manage\",\"This categories already exist!\");\n }\n\n if($categoryModel->addNewCategory($categoryName)){\n $this->view->redirect(\"/categories/manage\",\"Category created successfully!\",\"success\");\n }\n }catch (\\Exception $exception){\n $this->view->redirect(\"/categories/manage\",$exception);\n }\n }", "public function create()\n {\n return view('product.add_category');\n }" ]
[ "0.6791251", "0.67398465", "0.6735368", "0.67165315", "0.67116857", "0.6615872", "0.6611898", "0.6589547", "0.65745264", "0.6573505", "0.6542764", "0.6485271", "0.64450854", "0.644032", "0.6434564", "0.64265096", "0.64235735", "0.6346596", "0.63265896", "0.62802815", "0.6237475", "0.622664", "0.62098485", "0.6189764", "0.6173463", "0.6167711", "0.6132987", "0.61317986", "0.60815275", "0.6079419", "0.6073783", "0.6073408", "0.60621417", "0.6044404", "0.6039578", "0.6016673", "0.60143924", "0.59895724", "0.5982438", "0.5982052", "0.5980242", "0.59639513", "0.5962017", "0.5957895", "0.5955538", "0.5949497", "0.5924536", "0.5924096", "0.59223306", "0.59176683", "0.5914387", "0.5908536", "0.59078133", "0.59058225", "0.5900901", "0.58960485", "0.58953166", "0.5889208", "0.5878686", "0.5870847", "0.5866938", "0.58663994", "0.5862003", "0.58609116", "0.5859491", "0.5849453", "0.5847037", "0.5836231", "0.5833504", "0.582879", "0.5823948", "0.581756", "0.5816101", "0.5815305", "0.58136976", "0.5812316", "0.5810805", "0.5810484", "0.5806095", "0.5804014", "0.5801605", "0.57975346", "0.5796188", "0.5792143", "0.57883406", "0.57806236", "0.5777421", "0.5776602", "0.57690144", "0.57654256", "0.57642406", "0.57553464", "0.5752244", "0.57481843", "0.57425576", "0.5737708", "0.5736718", "0.5731775", "0.57313675", "0.573135" ]
0.7373798
0
/Add Workout category form
/Форма добавления категории тренировок
public function addWorkoutCategory() { return view('admin.addworkoutcategory'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function storeWorkoutCategory(Request $request)\n {\n $this->validate($request,array(\n 'categoryName' => 'required',\n ));\n\n $workoutCategory = new Category;\n\n $workoutCategory->category = $request->categoryName;\n\n $workoutCategory->save();\n\n if($workoutCategory->save()){\n return redirect()->back()->with('success','Workout category Saved successfully.');\n }\n else{\n return redirect()->back()->with('denger-success','Workout category is not saved.');\n }\n \n }", "function add_new_category()\n\t{\n\t\t$this->data['title'] \t= 'Add New Portfolio Category';\n\t\t$this->data['css'] \t\t= 'body/admin/css/form_style_default';\n\t\t$this->data['js'] \t\t= 'body/admin/js/form_style_default';\n\t\t$this->data['content'] \t= 'content/admin/portfolio/add_new_category';\n\t\t$this->load->view('body/admin/style_1', $this->data);\n\t}", "public function add_category() {\n\t $this->use_layout=false;\n\t\t$this->model = new $this->model_class(WaxUrl::get(\"id\"));\n\t\t$category = new CmsCategory(substr($_POST[\"id\"], 4));\n\t\t$this->model->categories = $category;\n\t\tif(!$this->attached_categories = $this->model->categories) $this->attached_categories= array();\n\t\t$cat = new CmsCategory;\n\t\tif(!$this->all_categories = $cat->all() ) $this->all_categories=array();\t\t\n\t\t$this->cat_partial = $this->render_partial(\"list_categories\");\n\t}", "public function updateworkoutcategory(Request $request)\n {\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n\n $this->validate($request,array(\n 'name' => 'required',\n ));\n $id = $request->id;\n $workoutCategory = Category::find($id);\n $workoutCategory->Category = $request->name;\n $workoutCategory->save();\n Session::flash('success','Workout Category Updated succcessfully.');\n return redirect()->back()->with('workout',$workoutCategory);\n }\n\n else{\n Session::flash('danger','You are not authorize to view this page');\n return redirect()->back();\n }\n }", "public function addWorkout()\n {\n return view('admin.addworkout');\n }", "public function add()\n {\n $category = new stdClass();\n $category->category_id = null;\n $category->name = null;\n $data = [\n 'page' => 'add',\n 'row' => $category\n ];\n $this->template->load('template', 'product/category/category_add', $data);\n }", "function gtags_group_category_form() {\n\tglobal $bp, $show_group_add_form_cats;\t\n\tif ($show_group_add_form_cats) return; // prevents showing form twice\n\t$show_group_add_form_cats = true;\n\n\t// the group category\t\n\t$group_cats = get_option('gtags_category'); \n\tif (empty($group_cats)) return;\n\t\n\t$selected = groups_get_groupmeta( $bp->groups->current_group->id, 'gtags_group_cat' ); \n\t?><label for=\"group-cat\"><?php _e( 'Group Category', 'gtags' ) ?></label>\n\t<select name=\"group-cat\" id=\"group-cat\" />\n\t\t<option value=\"\"><?php _e('--- SELECT ONE ---', 'gtags') ?></option>\n\t<?php foreach ( $group_cats as $tag => $desc ): ?>\n\t\t<?php if ( !$desc ) $desc = $tag; ?>\n\t\t<option value=\"<?php echo $tag; ?>\" <?php if ( $tag == $selected ) echo 'selected=\"selected\"' ?>><?php echo $desc; ?></option>\n\t<?php endforeach; ?>\n\t</select>\n\t<i><?php _e('(the primary group activity)', 'gtags'); ?></i><br><?php \t\n}", "function CategoryForm() {\r\n\r\n\t\t$member = Member::currentUser();\r\n\r\n\t\t// Need to sort out how going to handle multiple instances of category\r\n\t\t// front end grid field : https://github.com/webbuilders-group/silverstripe-frontendgridfield\r\n\t\t// grid field extension : https://github.com/silverstripe-australia/silverstripe-gridfieldextensions\r\n\t\t$category = Category::get()->first();\r\n\t\t$fields = $category->FormFields();\r\n\r\n $actions = FieldList::create(\r\n FormAction::create(\"doCategoryForm\")->setTitle(\"Submit\")->addExtraClass('productive'),\r\n FormAction::create(\"cancel\")->setTitle(\"Cancel\")\r\n );\r\n\r\n $form = Form::create($this, 'CategoryForm', $fields, $actions);\r\n\r\n return $form;\r\n\r\n\t}", "public function add_category() {\n $this->category();\n $this->loadView(\"editors/category_editor\");\n }", "public function addCategory(){\n if (isset($_POST[\"add_category\"])) {\n $categories = $this->model('Categories');\n $system = $this->model('System');\n $cat_name = $_POST[\"cat_name\"];\n $cat_sef_url = $system->seflink($cat_name);\n\n $categories->addCat($cat_name,$cat_sef_url);\n }\n // where to go after comment has been added\n header('location: ' . URL . 'yonetim/categories');\n }", "public function add_category_cmb_field( $cmb ) {\n\t\t$field_ids = wp_list_pluck( $cmb->prop( 'fields' ), 'id' );\n\t\t$field_position = array_search( 'header_code', array_keys( $field_ids ), true ) + 1;\n\n\t\t$add_button = '<span class=\"button button-secondary add-redirection-category-button\">' . esc_html__( 'Add New', 'rank-math-pro' ) . '</span>';\n\t\t$add_input = '<input type=\"text\" class=\"add-redirection-category-input exclude\" placeholder=\"' . esc_attr__( 'New Category', 'rank-math-pro' ) . '\" value=\"\">';\n\t\t$manage_link = '<a href=\"' . admin_url( 'edit-tags.php?taxonomy=rank_math_redirection_category' ) . '\" class=\"manage-redirection-categories-link\">' . esc_html__( 'Manage Categories', 'rank-math-pro' ) . '</a>';\n\n\t\t$terms = get_terms(\n\t\t\t[\n\t\t\t\t'taxonomy' => 'rank_math_redirection_category',\n\t\t\t\t'hide_empty' => false,\n\t\t\t]\n\t\t);\n\n\t\t$default_options = [];\n\t\tif ( $this->is_editing() ) {\n\t\t\t$default_options = $this->get_redirection_categories( Param::get( 'redirection' ), [ 'fields' => 'ids' ] );\n\t\t}\n\n\t\t$ids = wp_list_pluck( $terms, 'term_id' );\n\t\t$names = wp_list_pluck( $terms, 'name' );\n\n\t\t$multicheck_options = array_combine( $ids, $names );\n\n\t\t$cmb->add_field(\n\t\t\t[\n\t\t\t\t'id' => 'redirection_category',\n\t\t\t\t'type' => 'multicheck_inline',\n\t\t\t\t'name' => esc_html__( 'Redirection Category', 'rank-math-pro' ),\n\t\t\t\t'desc' => esc_html__( 'Organize your redirections in categories.', 'rank-math-pro' ),\n\t\t\t\t'options' => $multicheck_options,\n\t\t\t\t'select_all_button' => false,\n\t\t\t\t'after_field' => $add_input . $add_button . $manage_link,\n\t\t\t\t'default' => $default_options,\n\t\t\t],\n\t\t\t++$field_position\n\t\t);\n\n\t\t$cmb->add_field(\n\t\t\t[\n\t\t\t\t'id' => 'set_redirection_category',\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'default' => '1',\n\t\t\t],\n\t\t\t++$field_position\n\t\t);\n\n\t}", "public function addAction()\n {\n $request = $this->getRequest();\n\n $routeMatch = $this->getEvent()->getRouteMatch();\n $id = $routeMatch->getParam('workout_id', 0);\n\n if ($id <= 0) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n $workout = $this->_workout->getRow(array('workout_id' => $id));\n//\n if (!$workout) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n /**\n * Grid FORM\n */\n $form = new WorkoutExerciseGrid(\n array(\n 'view' => $this->_view,\n )\n );\n\n /**\n * BUILDING Row\n */\n $row = new WorkoutExerciseRow(\n array(\n 'model' => $this->_exercise,\n 'view' => $this->_view,\n )\n );\n\n $row->setFieldOptions('type_id', array(\n 'values' => $this->_exerciseType->getBehaviour('nestedSet')->getResultSetForSelect(),\n 'onchange' => 'exerciseType(this);',\n ));\n $row->setFieldOptions('workout_id', array(\n 'value' => $id,\n ));\n\n //\n\n\n\n //\n $row->build();\n\n //\n $form->addSubForm($row, $row->getName());\n\n //\n $this->_view->headScript()->appendScript(\n $this->_view->render(\n 'workout-exercise/add.js',\n array(\n 'currentFormType' => 0,\n 'back' => $this->url()->fromRoute(\n 'hi-training/workout-exercise/list/wildcard',\n array('workout_id' => $id)\n ),\n 'ajaxFormType' => $this->url()->fromRoute(\n 'hi-training/exercise-type/ajax-form-type/wildcard',\n array('type_id' => '')\n ),\n 'ajaxLastOfType' => $this->url()->fromRoute(\n 'hi-training/workout-exercise/ajax-last-of-type/wildcard',\n array('type_id' => '')\n ),\n )\n )\n );\n\n\n /**\n * POST\n */\n if ($this->getRequest()->isPost()) {\n\n $formData = $this->getRequest()->post()->toArray();\n\n if ($form->isValid($formData)) {\n\n// \\Zend\\Debug::dump($formData);\n\n if ( isset($formData['header']['formId'])\n && $formData['header']['formId'] == 'WorkoutExerciseGridForm') {\n\n if (isset($formData['WorkoutExerciseRow']['actions']['save'])) {\n\n if (is_array($formData['WorkoutExerciseRow']['row'])){\n $newRow = $this->_exercise->createRow()->populate($formData['WorkoutExerciseRow']['row']);\n $newRow->save();\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $id));\n }\n\n }\n\n if (isset($formData['WorkoutExerciseRow']['actions']['saveAdd'])) {\n\n if (is_array($formData['WorkoutExerciseRow']['row'])){\n $newRow = $this->_exercise->createRow()->populate($formData['WorkoutExerciseRow']['row']);\n $newRow->save();\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/add/wildcard', array('workout_id' => $id));\n }\n\n }\n }\n }\n }\n\n //\n return array(\n 'form' => $form,\n 'workout' => $workout,\n );\n\n }", "public function add_acct_category(){\n\t\t//restricted this area, only for admin\n\t\tpermittedArea();\nif($user['role'] == 'admin')\n\t\t{\n\t\t\t$data['ledger1'] = $this->db->get_where('acct_categories', ['category_type' => 'Main']);\n\t\t\t\n\t\t}\n\t\tif($this->input->post())\n\t\t{\n\t\t\tif($this->input->post('submit') != 'add_acct_category') die('Error! sorry');\n\n\t\t\t$this->form_validation->set_rules('category_name', 'Category Name', 'required|trim');\n\t\t\t$this->form_validation->set_rules('visible', 'Access To Payspecifications', 'required|trim');\n\n\t\t\tif($this->form_validation->run() == true)\n\t\t\t{\n\t\t\t\t$insert = $this->ledger_model->add_acct_category();\n\t\t\t\tif($insert)\n\t\t\t\t{\n\t\t\t\t\t$this->session->set_flashdata('successMsg', 'Accounts Category Created Successfully...!!!');\n\t\t\t\t\tredirect(base_url('ledger'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\ntheme('add_acct_category');\n\t}", "public function addAction()\n {\n $manager = $this->getDI()->get('core_category_manager');\n $this->view->form = $manager->getForm();\n }", "public function new_category() {\n\t\t$this->use_layout=false;\n\t\t$cat = new CmsCategory;\n\t\t$cat->name = Request::get(\"cat\");\n\t\t$cat->save();\n\t\tif(!$this->all_categories = $cat->clear()->all()) $this->all_categories=array();\t\t\n\t\t$this->cat_list = $this->render_partial(\"cat_list\");\t\n\t}", "function colorpicker_field_add_new_category( $taxonomy ) { ?> \r\n\t<div class=\"form-field term-colorpicker-wrap\"> \r\n\t<label for=\"term-colorpicker\">Category Color</label> \r\n\t<input name=\"_category_color\" value=\"#ffffff\" class=\"colorpicker\" id=\"term-colorpicker\" /> \r\n\t<p>This is the field description where you can tell the user how the color is used in the theme.</p> \r\n\t</div> <?php }", "public function addNewItem($category)\n {\n //Add tool\n if ($category==\"tools\") {\n\n if (isset($_POST['addTool'])) {\n $name=$_POST['name'];\n $quantity=$_POST['quantity'];\n $date_added=$_POST['addition_date'];\n $description_type=$_POST['description'];\n\n //create an object of tools and add it to the database\n $tool=new Tool($name, $quantity, $date_added ,$description_type);\n $tool->addItem();\n\n }\n //add feeds\n }else if ($category==\"feeds\") {\n if (isset($_POST['addFeed'])) {\n $name=$_POST['name'];\n $quantity=$_POST['quantity'];\n $date_added=$_POST['addition_date'];\n $description_type=$_POST['type'];\n\n //create an object of feeeds and add it to the database\n $feed= new Feed($name, $quantity, $date_added ,$description_type);\n $feed->addItem();\n }\n }\n\n }", "public function add_category()\n {\n \n if(isset($_POST['category_name']) && isset($_POST['category_desc'])){\n\t\t \n\t\t \n\t\t $query = $this->Product_model->add_category();\n\t\t\t if($query){\n\t\t\t\t \n\t\t\t\t echo 'added';\n\t\t\t\t }else{\n\t\t\t\t\t \n\t\t\t\t\t echo 'error';\n\t\t\t\t\t }\n\t\t \n\t\t }\n \n }", "public function category_add() {\n\t\t// Setup validation\n\t\t$this->data['validation'] = \"\";\n\t\t$this->data['category']\t= array('name' => '', 'url_name' => '');\n\t\t\n\t\t// Handle POST\n\t\tif ($this->mojo->input->post('category')) {\n\t\t\t// Get the category data\n\t\t\t$this->data['category']\t= $this->mojo->input->post('category');\n\t\t\t\n\t\t\t// Insert it!\n\t\t\tif ($this->mojo->blog_model->insert_category($this->data['category'])) {\n\t\t\t\t// It's success\n\t\t\t\t$response['result'] = 'success';\n\t\t\t\t$response['reveal_page'] = site_url('admin/addons/blog/categories_all');\n\t\t\t\t$response['message'] = 'Successfully created category';\n\t\t\t\t\n\t\t\t\texit($this->mojo->javascript->generate_json($response));\n\t\t\t} else {\n\t\t\t\t// There have been validation errors\n\t\t\t\t$response['result'] = 'error';\n\t\t\t\t$response['message'] = $this->mojo->blog_model->validation_errors;\n\t\t\t\t\n\t\t\t\t// Output the response\n\t\t\t\texit($this->mojo->javascript->generate_json($response));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Show the view\n\t\t$this->_view('category_add');\n\t}", "public function create()\n {\n return view(\"jobcategory.create\");\n }", "public function addAction()\n\t{\n\t\t$this->oView->box_title = \"Add Category\";\n\t\t$configure_languages = $this->oConfigureModule['configure_languages'];\n\t\t$this->oView->configure_languages = $configure_languages;\n\t\t$this->oView->link_url = site_url('dashboard/category/add');\n\t\t\n\t\tif ($this->oInput->isPost())\n\t\t{\n\t\t\t$objCat = new Category();\n\t\t\t\n\t\t\t$parent_code = $this->oInput->post('parent_code');\n\t\t\t$parent_id = 0;\n\t\t\t\n\t\t\tif (trim(strtolower($parent_code)) != \"root\") \n\t\t\t{\n\t\t\t\t$row = $objCat->getRow(\"code = ?\",array($parent_code));\n\t\t\t\t$parent_id = $row[\"id\"]; \n\t\t\t}\n\t\t\t\n\t\t\t$data['parent_id'] = $parent_id;\n\t\t\t$data['code'] = $this->oInput->post('code');\n\t\t\t$data['active'] = $this->oInput->post('active');\n\t\t\t$data['sort_order'] = $this->oInput->post('sort_order');\n\t\t\t\n\t\t\tforeach ($configure_languages['languages'] as $code => $row)\n\t\t\t{\n\t\t\t\t$data[\"name_{$code}\"] = $this->oInput->post(\"name_{$code}\");\n\t\t\t\t$data[\"description_{$code}\"] = $this->oInput->post(\"description_{$code}\");\n\t\t\t\t$data[\"icon_{$code}\"] = $this->oInput->post(\"icon_{$code}\");\n\t\t\t\t$data[\"image_{$code}\"] = $this->oInput->post(\"image_{$code}\");\n\t\t\t}\n\t\t\t\n\t\t\t$data['create_at'] = now_to_mysql();\n\t\t\t$last_id = $objCat->insert($data);\n\t\t\t\n\t\t\tredirect(\"dashboard/category/list\");\n\t\t}\n\n\t\t$this->renderView('dashboard/category/_form');\n\t}", "public function categoryForm(){\n $table = \"categories\";\n $cresults = $this->getAllrecords($table);\n foreach($cresults as $category){\n echo('<option value=\"'.$category[\"cat_id\"].'\">'.$category[\"cat_name\"].'</option>');\n }\n\n\n }", "public function add()\n {\n \t\t$options = array(\n \t\t\t\t'order' => array('Categories.name' => 'asc')\n \t\t);\n \t\t//Get Categories\n \t\t$categories = $this->Jobs->Categories->find('list', $options);\n \t\t//Set Categories\n \t\t$this->set('categories', $categories);\n\n \t\t//Get types for select list\n \t\t$types = $this->Jobs->Types->find('list');\n \t\t//Set Types\n \t\t$this->set('types', $types);\n\n $job = $this->Jobs->newEntity();\n if($this->request->is('post')){\n $this->request->data['Jobs']['user_id'] = $this->Auth->user('id');\n $job = $this->Jobs->patchEntity($job, $this->request->data);\n\n if($this->Jobs->save($job)){\n $this->Flash->success('Your job has been listed');\n return $this->redirect(array('action' => 'index'));\n }\n\n $this->Flash->set('Unable to add your job');\n }\n }", "public function servicecat(){\n\t\t$modelservices = new Application_Model_Services();\n\t\t\n\t\t$servicelist = $modelservices->servicesdata();\n\t\t//prd($servicelist);\n\t\t\t\t\t\n \t\t$this->addElement('text', 'service_name', array (\n\t\t\t\"required\" => TRUE,\n\t\t\t'class' => 'form-control required',\n\t\t\t\"label\" => \"Service Category Title \" ,\n\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\"),\n\t\t\t\"validators\" => array(\n\t\t\t\t\t\t\t\tarray(\"NotEmpty\",true,array(\"messages\"=>\" Expertise Title is required \")),\n \t\t\t\t\t\t\t),\n \t\t));\n\t\t\n\t\t$this->addElement('select', 'service_parent_id', array (\n\t\t\t\t'class' => 'form-control required' ,\n\t\t\t\t\"required\"=>true,\n\t\t\t\t\"multioptions\"=>$servicelist,\n\t\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\",\"HtmlEntities\"),\n\t\t\t\t\n\t\t));\n \t\t$this->submitButton();\n \t}", "public function stepCategory()\n {\n global $rlSmarty, $rlCategories, $page_info, $account_info, $sError, $config;\n\n parent::step();\n\n $GLOBALS['rlHook']->load('addListingGetCats');\n\n // Define allowed types\n $allowed_type_keys = $account_info['Abilities'];\n\n // \"Individual add listing page\" mode\n if ($page_info['Key'] != 'add_listing') {\n $individual_type_key = substr($page_info['Key'], 3);\n\n if (in_array($individual_type_key, $allowed_type_keys)) {\n $allowed_type_keys = array($individual_type_key);\n } else {\n $sError = true;\n }\n }\n\n // Adapt listing types array\n $allowed_types = $GLOBALS['rlListingTypes']->adaptTypes($allowed_type_keys);\n $rlSmarty->assign_by_ref('allowed_types', $allowed_types);\n\n // Existing membership plan mode\n $this->existingMembershipHandler($account_info);\n\n // Remove unnecessary steps\n if (!$this->singleStep) {\n unset($this->steps['photo'], $this->steps['checkout']);\n }\n }", "public function getAddEditForm($target = '/admin/Cart') {\n\t\t$form = new Form('CartCategory_addedit', 'post', $target);\n\t\t\n\t\t$form->setConstants( array ( 'section' => 'categories' ) );\n\t\t$form->addElement( 'hidden', 'section' );\n\t\t$form->setConstants( array ( 'action' => 'addedit' ) );\n\t\t$form->addElement( 'hidden', 'action' );\n\t\t\n\t\tif (!is_null($this->getId())) {\n\t\t\t$form->setConstants( array ( 'cartcategory_categories_id' => $this->getId() ) );\n\t\t\t$form->addElement( 'hidden', 'cartcategory_categories_id' );\n\t\t\t\n\t\t\t$defaultValues ['cartcategory_name'] = $this->getName();\n\t\t\t$defaultValues ['cartcategory_description'] = $this->getDescription();\n\t\t\t$defaultValues ['cartcategory_image'] = $this->getImage();\n\t\t\t$defaultValues ['cartcategory_parent_id'] = $this->getParent_id();\n\t\t\t$defaultValues ['cartcategory_date_added'] = $this->getDate_added();\n\t\t\t$defaultValues ['cartcategory_last_modified'] = $this->getLast_modified();\n\t\t\t$defaultValues ['cartcategory_status'] = $this->getStatus();\n\n\t\t\t$form->setDefaults( $defaultValues );\n\t\t}\n\t\t\n\t\t$form->addElement('text', 'cartcategory_name', 'Name');\n\t\t\n\t\t$description = $form->addElement('textarea', 'cartcategory_description', 'Description');\n\t\t$description->setCols(80);\n\t\t$description->setRows(10);\n\t\t\n\t\t$newImage = $form->addElement('file', 'cartcategory_image_upload', 'Category Image');\n\t\t$curImage = $form->addElement('dbimage', 'cartcategory_image', $this->getImage());\n\t\t\n\t\t$form->addElement('select', 'cartcategory_parent_id', 'Parent Category', self::toArray());\n\t\t\n\t\t$added = $form->addElement('text', 'cartcategory_date_added', 'Date Added');\n\t\t$added->freeze();\n\t\t\n\t\t$modified = $form->addElement('text', 'cartcategory_last_modified', 'Date Last Modified');\n\t\t$modified->freeze();\n\t\t\n\t\t$form->addElement('select', 'cartcategory_status', 'Status', Form::statusArray());\n\t\t$form->addElement('submit', 'cartcategory_submit', 'Submit');\n\n\t\tif (isset($_REQUEST['cartcategory_submit']) && $form->validate() && $form->isSubmitted()) {\n\t\t\t$this->setName($form->exportValue('cartcategory_name'));\n\t\t\t$this->setDescription($form->exportValue('cartcategory_description'));\n\t\t\t$this->setImage($form->exportValue('cartcategory_image'));\n\t\t\t$this->setParent_id($form->exportValue('cartcategory_parent_id'));\n\t\t\t$this->setDate_added($form->exportValue('cartcategory_date_added'));\n\t\t\t$this->setLast_modified($form->exportValue('cartcategory_last_modified'));\n\t\t\t$this->setStatus($form->exportValue('cartcategory_status'));\n\t\t\t\n\t\t\tif ($newImage->isUploadedFile()) {\n\t\t\t\t$im = new Image();\n\t\t\t\t$id = $im->insert($newImage->getValue());\n\t\t\t\t$this->setImage($im);\n\t\t\t\t\n\t\t\t\t$curImage->setSource($this->getImage()->getId());\n\t\t\t}\n\t\t\t\n\t\t\t$this->save();\n\t\t}\n\n\t\treturn $form;\n\t\t\n\t}", "public function newAction()\n {\n\t\tTag::appendTitle('Add New Category');\n }", "function rmmfNew(){\n\tglobal $db, $mc;\n\t\n\tlist($num) = $db->fetchRow($db->query(\"SELECT COUNT(*) FROM \".$db->prefix(\"rmmf_categos\")));\n\tif ($num<=0){\n\t\tredirect_header('categos.php?op=new', 1, _MA_RMMF_CATEGOFIRST);\n\t\tdie();\n\t}\n\t\n\tdefine('_RMMF_LOCATION','NEWWORK');\n\txoops_cp_header();\n\trmmf_make_adminnav();\n\t\n\tinclude_once '../common/form.class.php';\n\t$form = new RMForm(_MA_RMMF_NEWWORK, 'frmNew', 'index.php?op=save');\n\t$form->setExtra(\"enctype='multipart/form-data'\");\n\t$form->addElement(new RMText(_MA_RMMF_TITLE, 'titulo', 50, 150));\n\t$result = array();\n\t$select = \"<select name='catego'>\n\t\t\t\t<option value='0'>\"._MA_RMMF_SELECT.\"</option>\";\n\trmmf_get_categos($result);\n\tforeach ($result as $k => $v){\n\t\t$select .= \"<option value='$v[id_cat]'>\".str_repeat('-', $v['saltos']).\" $v[nombre]</option>\";\n\t}\n\t$select .= \"</select>\";\n\t$form->addElement(new RMLabel(_MA_RMMF_CATEGO, $select));\n\t$form->addElement(new RMText(_MA_RMMF_CLIENT, 'cliente', 50, 255));\n\t$form->addElement(new RMText(_MA_RMMF_URL, 'url', 50, 255, 'http://'));\n\t$form->addElement(new RMTextArea(_MA_RMMF_SHORT, 'short', 4, 45));\n\t$form->addElement(new RMLabel(_MA_RMMF_DESC, rmmf_select_editor('desc',$mc['editor'],'','100%','250px')));\n\t$form->addElement(new RMTextArea(_MA_RMMF_COMMENT, 'comentario', 4, 45));\n\t$form->addElement(new RMFile(_MA_RMMF_IMG, 'imagen', 45));\n\t$form->addElement(new RMYesNo(_MA_RMMF_FEATURED, 'resaltado', 0));\n\t$form->addElement(new RMButton('sbt',_MA_RMMF_SEND));\n\t$form->display();\n\trmmf_make_footer();\n\txoops_cp_footer();\n}", "public function addAction()\n {\n $form = new CategoryForm();\n $form->get('submit')->setValue('Add');\n\n $request = $this->getRequest();\n if ($request->isPost()) {\n $category = new Category();\n $form->setInputFilter($category->getInputFilter());\n $form->setData($request->getPost());\n\n if ($form->isValid()) {\n $category->exchangeArray($form->getData());\n $this->getCategoryTable()->saveCategory($category);\n\n // Redirect to list of categorys\n return $this->redirect()->toRoute('category');\n }\n }\n return array('form' => $form);\n }", "public function create() \n\t{\n\t\n\t\t$this->data = (object) array();\n\t\t// Check for post data\n\t\t$this->form_validation->set_rules($this->_validation_rules);\n\t\t\n\t\t\n\t\t// if postback-validate\n\t\tif ($this->form_validation->run()) \n\t\t{\n\t\t\t$input = $this->input->post();\n\t\t\t$id = $this->categories_m->create($input);\n\t\t\t\n\t\t\tEvents::trigger('evt_category_created', $id );\n\t\t\t\n\t\t\t$this->session->set_flashdata('success', lang('success'));\n\t\t\tredirect('admin/shop/categories');\n\t\t\t\n\t\t} \n\t\telse \n\t\t{\n\t\t\tforeach ($this->_validation_rules as $key => $value) \n\t\t\t{\n\t\t\t\t$this->data->{$value['field']} = '';\n\t\t\t}\n\t\t}\n\n\t\t$this->data->parent_category_select \t= $this->categories_m->build_dropdown(array(\n\t\t\t'type'\t=> 'all'\n\t\t)); \n\n\n\t\t// prepare dropdown image folders\n\t\t$folders = $this->_prep_folders();\n\n\n\t\t// Build page\n\t\t$this->template\n\t\t\t->title($this->module_details['name'])\n\t\t\t->set('folders',$folders)\n\t\t\t->append_js('module::admin/categories.js')\t\n\t\t\t->append_js('module::admin/admin.js')\t\t\n\t\t\t->append_metadata($this->load->view('fragments/wysiwyg', $this->data, TRUE))\n\t\t\t->build('admin/categories/form', $this->data);\n\t}", "public function add_category() /// get routes of the form add cateogry\n {\n return view('admin.categories.add-category');\n }", "public function create()\n {\n return view(\"dashboard.pages.supervisor.category.add\");\n \n }", "public function addProgramCategory()\n {\n return view('admin.addprogramcategory');\n }", "public function addCategory()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$category = $_POST['category'];\n\t\t\t$sql = \"insert into lib_category (category,add_date,staff_id) \n\t\t\t\t\tvalues('\" . $category . \"','\" . date('Y-m-d') . \"','\" . cookie('staffAccount') . \"') \";\n\t\t\t$cate = D('Category');\n\t\t\t$return = $cate->execute($sql);\n\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'Add successfully!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'SQL Error!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\n\t}", "public function create()\n {\n $categories = Category::all();\n return view('jobCategories.create', compact('categories'));\n }", "public function addNutrationCategory()\n {\n return view('admin.addnutratoncategory');\n }", "function display_addcategory_form($category_name='', $id='')\r\n{\r\n\tglobal $dropbox_cnf;\r\n\r\n\t$title=get_lang('AddNewCategory');\r\n\r\n\tif (isset($id) AND $id<>'')\r\n\t{\r\n\t\t// retrieve the category we are editing\r\n\t\t$sql=\"SELECT * FROM \".$dropbox_cnf['tbl_category'].\" WHERE cat_id='\".Database::escape_string($id).\"'\";\r\n\t\t$result=api_sql_query($sql);\r\n\t\t$row=mysql_fetch_array($result);\r\n\r\n\t\tif ($category_name=='') // after an edit with an error we do not want to return to the original name but the name we already modified. (happens when createinrecievedfiles AND createinsentfiles are not checked)\r\n\t\t{\r\n\t\t\t$category_name=$row['cat_name'];\r\n\t\t}\r\n\t\tif ($row['received']=='1')\r\n\t\t{\r\n\t\t\t$target='received';\r\n\t\t}\r\n\t\tif ($row['sent']=='1')\r\n\t\t{\r\n\t\t\t$target='sent';\r\n\t\t}\r\n\t\t$title=get_lang('EditCategory');\r\n\r\n\t}\r\n\r\n\tif ($_GET['action']=='addreceivedcategory')\r\n\t{\r\n\t\t$target='received';\r\n\t}\r\n\tif ($_GET['action']=='addsentcategory')\r\n\t{\r\n\t\t$target='sent';\r\n\t}\r\n\r\n\r\n\techo \"<form name=\\\"add_new_category\\\" method=\\\"post\\\" action=\\\"\".api_get_self().\"?view=\".$_GET['view'].\"\\\">\\n\";\r\n\techo '<strong>'.$title.'</strong>';\r\n\tif (isset($id) AND $id<>'')\r\n\t{\r\n\t\techo '<input name=\"edit_id\" type=\"hidden\" value=\"'.$id.'\">';\r\n\t}\r\n\techo '<input name=\"target\" type=\"hidden\" value=\"'.$target.'\">';\r\n\techo \"<table border=\\\"0\\\">\\n\";\r\n\techo \"\\t<tr>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo get_lang('CategoryName').': ';\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo \"<input type=\\\"text\\\" name=\\\"category_name\\\" value=\\\"\".$category_name.\"\\\" />\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t</tr>\\n\";\r\n\techo \"\\t<tr>\\n\";\r\n\techo \"\\t<td valign=\\\"top\\\">\\n\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo \"<input type=\\\"submit\\\" name=\\\"StoreCategory\\\" value=\\\"\".get_lang('Ok').\"\\\">\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t</tr>\\n\";\r\n\techo \"</table>\\n\";\r\n\techo \"</form>\";\r\n}", "function getCategoryFields() {\n\t\t\n\t\t$model = $this->getModel();\n\t\t$category_id = JRequest::getVar('id');\n\t\t$form = $model->getFieldForm($category_id, 'category');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\" >';\n\t\techo '<legend>New Category</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}", "public function newcategory() {\n\n if (ckeckAddmin()) {\n $this->load->view('admin/header/header');\n $this->load->view('admin/css/css');\n $this->load->view('admin/topnav/topnav');\n $this->load->view('admin/sidenav/sidenav');\n $this->load->view('admin/content/addcatogry');\n $this->load->view('admin/footer/footer');\n # $this->load->view('admin/js/extra');\n $this->load->view('admin/js/js');\n } else {\n CustomFlash('Admin/login', 'alert-danger', 'plz First Login');\n }\n }", "public function showCategoryForm() {\n $company_logo = $this->showLogoImage();\n $category_images = \\App\\CouponCategory::categoryList();\n $signup_category_images = \\App\\CouponCategory::categoryListWeb();\n $country_list = \\App\\Country::countryList();\n\n return view('frontend.signup.category')->with(['company_logo' => $company_logo,\n 'category_images' => $category_images, 'signup_category_images' => $signup_category_images,\n 'country_list' => $country_list]);\n }", "function _addCategory()\n\t{\n\t\t// Create categories for our component\n\t\t$basePath = JPATH_ADMINISTRATOR.'/components/com_categories';\n\t\trequire_once $basePath.'/models/category.php';\n\t\t$config\t\t= array('table_path' => $basePath.'/tables');\n\t\t$catmodel\t= new CategoriesModelCategory($config);\n\t\t$catData\t= array('id' => 0, 'parent_id' => 0, 'level' => 1, 'path' => 'uncategorized', 'extension' => 'com_sermonspeaker',\n\t\t\t\t\t\t'title' => 'Uncategorized', 'alias' => 'uncategorized', 'description' => '', 'published' => 1, 'language' => '*');\n\t\t$catmodel->save($catData);\n\t\t$id = $catmodel->getItem()->id;\n\n\t\t$db = JFactory::getDBO();\n\t\t// Updating the example data with 'Uncategorized'\n\t\t$query\t= $db->getQuery(true);\n\t\t$query->update('#__sermon_sermons');\n\t\t$query->set('catid = '.(int)$id);\n\t\t$query->where('catid = 0');\n\t\t$db->setQuery($query);\n\t\t$db->execute();\n\t\t// Speakers\n\t\t$query->update('#__sermon_speakers');\n\t\t$db->setQuery($query);\n\t\t$db->execute();\n\t\t// Series\n\t\t$query->update('#__sermon_series');\n\t\t$db->setQuery($query);\n\t\t$db->execute();\n\n\t\treturn;\n\t}", "public function addCategory()\n {\n $data['categorys'] = Category::whereNull('parent_id')->get();\n return view('category.addEdit', $data);\n }", "public function add_category() {\n\t\n\t\tif($this->input->post('add_type')=='add_category') {\t\t\n\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t$Return = array('result'=>'', 'error'=>'', 'csrf_hash'=>'');\n\t\t$Return['csrf_hash'] = $this->security->get_csrf_hash();\n\t\t\t\n\t\t/* Server side PHP input validation */\t\t\n\t\tif($this->input->post('name')==='') {\n \t$Return['error'] = $this->lang->line('xin_error_cat_name_field');\n\t\t}\n\t\t\t\t\t\t\n\t\tif($Return['error']!=''){\n \t\t$this->output($Return);\n \t}\n\t\t\n\t\t// set data\n\t\t$data = array(\n\t\t'category_name' => $this->input->post('name'),\n\t\t'created_at' => date('d-m-Y h:i:s')\n\t\t);\n\t\t\n\t\t$result = $this->Assets_model->add_assets_category($data);\n\t\tif ($result == TRUE) {\n\t\t\t$Return['result'] = $this->lang->line('xin_success_assets_category_added');\n\t\t} else {\n\t\t\t$Return['error'] = $this->lang->line('xin_error_msg');\n\t\t}\n\t\t$this->output($Return);\n\t\texit;\n\t\t}\n\t}", "public function add(){\n\t\t\t\n\t\t\trequire_once('views/category/add.php');\n\t\t}", "function question_category_form($course, $current, $recurse=1, $showhidden=false, $showquestiontext=false) {\n global $CFG;\n\n/// Make sure the default category exists for this course\n get_default_question_category($course->id);\n\n/// Get all the existing categories now\n $catmenu = question_category_options($course->id, true);\n\n $strcategory = get_string(\"category\", \"quiz\");\n $strshow = get_string(\"show\", \"quiz\");\n $streditcats = get_string(\"editcategories\", \"quiz\");\n\n echo \"<table><tr><td style=\\\"white-space:nowrap;\\\">\";\n echo \"<strong>$strcategory:</strong>&nbsp;\";\n echo \"</td><td>\";\n popup_form (\"edit.php?courseid=$course->id&amp;cat=\", $catmenu, \"catmenu\", $current, \"\", \"\", \"\", false, \"self\");\n echo \"</td><td align=\\\"right\\\">\";\n echo \"<form method=\\\"get\\\" action=\\\"$CFG->wwwroot/question/category.php\\\">\";\n echo \"<div>\";\n echo \"<input type=\\\"hidden\\\" name=\\\"id\\\" value=\\\"$course->id\\\" />\";\n echo \"<input type=\\\"submit\\\" value=\\\"$streditcats\\\" />\";\n echo '</div>';\n echo \"</form>\";\n echo '</td></tr></table>';\n\n echo '<form method=\"get\" action=\"edit.php\" id=\"displayoptions\">';\n echo \"<fieldset class='invisiblefieldset'>\";\n echo \"<input type=\\\"hidden\\\" name=\\\"courseid\\\" value=\\\"{$course->id}\\\" />\\n\";\n question_category_form_checkbox('recurse', $recurse);\n question_category_form_checkbox('showhidden', $showhidden);\n question_category_form_checkbox('showquestiontext', $showquestiontext);\n echo '<noscript><div class=\"centerpara\"><input type=\"submit\" value=\"'. get_string('go') .'\" />';\n echo '</div></noscript></fieldset></form>';\n}", "function addForm()\n {\n $content = '';\n $template['job_bank_add'] = $this->cObj->getSubpart($this->__getTemplateCode(),\"###ADD_JOB_PLACEHOLDER###\"); \n\n $subPartArray['###CAREERLEVEL###'] = $this->createDropDown($this->job_careerlevel);\n $subPartArray['###FORMNAMEEXTENSIONJOB###'] = $this->prefixId;\n $subPartArray['###FORMNAMEEXTENSION###'] = $this->prefixId;\n $subPartArray[\"###HELP_IMAGE###\"] = t3lib_extMgm::siteRelPath($this->extKey).'images/help.gif';\n $subPartArray['###JOB_BANK_LOCATION###'] = $this->getCountryZone();\n $subPartArray['###QUALIFICATION###'] = $this->createDropDown($this->job_qualifiacation);\n $subPartArray['###SCRIPTNAME_POPUP_HELP_JS###'] = t3lib_extMgm::siteRelPath($this->extKey).'styles/overlib.js';\n $subPartArray[\"###SPONSOR_ID###\"] = $this->sponsorId;\n $subPartArray['###STATUS###'] = $this->createDropDown($this->job_status);\n\n $content .= $this->cObj->substituteMarkerArrayCached($template['job_bank_add'],$subPartArray,array(),array());\n \n return $this->pi_wrapInBaseClass($content);\n\n }", "public function addPost(){\n\n if ($this->input->post(\"category_create\") === null){\n $this->view->redirect(\"/categories/manage\");\n }\n\n if (!$this->auth->isLogged()) {\n $this->view->redirect(\"/user/login\", \"You can not add new categories if you are not logged in!\");\n }\n\n if (!$this->auth->isInRole(\"admin\")) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not Admin!\");\n }\n\n $categoryName = $this->input->post(\"category_name\");\n\n $this->validate->setRule(\"minlength\",$categoryName,3, \"Category name length must be more then 3 symbols!\");\n\n if ($this->validate->validate() === false){\n $error = $this->validate->getErrors();\n $this->view->redirect(\"/categories/manage\",$error);\n }\n\n $categoryModel = new CategoriesModel();\n try{\n if ($categoryModel->hasCategory($categoryName)){\n $this->view->redirect(\"/categories/manage\",\"This categories already exist!\");\n }\n\n if($categoryModel->addNewCategory($categoryName)){\n $this->view->redirect(\"/categories/manage\",\"Category created successfully!\",\"success\");\n }\n }catch (\\Exception $exception){\n $this->view->redirect(\"/categories/manage\",$exception);\n }\n }", "public function add()\n {\n $category = $this->Category->newEntity();\n if ($this->request->is('post')) {\n $category = $this->Category->patchEntity($category, $this->request->getData());\n if ($this->Category->save($category)) {\n $this->Flash->success(__('The category has been saved.'));\n\n return $this->redirect(['action' => 'index']);\n }\n $this->Flash->error(__('The category could not be saved. Please, try again.'));\n }\n $this->set(compact('category'));\n }", "public function subcategory(){\n\t\t$modelservices = new Application_Model_Services();\n\t\t$servicelist = $modelservices->servicesdata();\n\t\t$caterories = $modelservices->categorydata();\n\t//prd($caterories);\n\n \t\t$this->addElement('text', 'service_name', array (\n\t\t\t\"required\" => TRUE,\n\t\t\t'class' => 'form-control required',\n\t\t\t\"label\" => \"Service Sub Category Title \" ,\n\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\"),\n\t\t\t\"validators\" => array(\n\t\t\t\t\t\t\t\tarray(\"NotEmpty\",true,array(\"messages\"=>\" Expertise Title is required \")),\n \t\t\t\t\t\t\t),\n \t\t));\n\t\t$this->addElement('text', 'service_price', array (\n\t\t\t\"required\" => TRUE,\n\t\t\t'class' => 'form-control required digits',\n\t\t\t\"label\" => \"Service Credit \" ,\n\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\"),\n\t\t\t\"validators\" => array(\n\t\t\t\t\t\t\t\tarray(\"NotEmpty\",true,array(\"messages\"=>\"Price is required \")),\n \t\t\t\t\t\t\t),\n \t\t));\n\t\t$this->addElement('select', 'service_parent_id', array (\n\t\t\t\t'class' => 'form-control required' ,\n\t\t\t\t\"required\"=>true,\n\t\t\t\t\"multioptions\"=>$servicelist,\n\t\t\t\t\"onchange\"=>\"getcategorylist(this.value)\",\n\t\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\",\"HtmlEntities\"),\n\t\t\t\t\n\t\t));\n\t\t$this->addElement('select', 'service_sub_parent_id', array (\n\t\t\t\t'class' => 'form-control required' ,\n\t\t\t\t\"required\"=>true,\n\t\t\t\t\"multioptions\"=>$caterories,\n\t\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\",\"HtmlEntities\"),\n\t\t\t\t\n\t\t));\n \t\t$this->submitButton();\n \t}", "public function output_category_widget() {\n\n\t\t$categories = get_terms( 'product_cat', array( 'orderby' => 'name' ) );\n\t\t?>\n\t\t<form method=\"GET\">\n\t\t\t<div>\n\t\t\t\t<select multiple=\"multiple\" data-placeholder=\"<?php _e( 'Select categories&hellip;', 'woocommerce-cost-of-goods' ); ?>\" class=\"wc-enhanced-select\" id=\"category_ids\" name=\"category_ids[]\" style=\"width: 205px;\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$r = array();\n\t\t\t\t\t$r['pad_counts'] = 1;\n\t\t\t\t\t$r['hierarchical'] = 1;\n\t\t\t\t\t$r['hide_empty'] = 1;\n\t\t\t\t\t$r['value'] = 'id';\n\t\t\t\t\t$r['selected'] = $this->category_ids;\n\n\t\t\t\t\tinclude_once( WC()->plugin_path() . '/includes/walkers/class-product-cat-dropdown-walker.php' );\n\n\t\t\t\t\techo wc_walk_category_dropdown_tree( $categories, 0, $r );\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t\t<a href=\"#\" class=\"select_none\"><?php esc_html_e( 'None', 'woocommerce-cost-of-goods' ); ?></a>\n\t\t\t\t<a href=\"#\" class=\"select_all\"><?php esc_html_e( 'All', 'woocommerce-cost-of-goods' ); ?></a>\n\t\t\t\t<input type=\"submit\" class=\"submit button\" value=\"<?php esc_attr_e( 'Show', 'woocommerce-cost-of-goods' ); ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"range\" value=\"<?php if ( ! empty( $_GET['range'] ) ) echo esc_attr( $_GET['range'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"start_date\" value=\"<?php if ( ! empty( $_GET['start_date'] ) ) echo esc_attr( $_GET['start_date'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"end_date\" value=\"<?php if ( ! empty( $_GET['end_date'] ) ) echo esc_attr( $_GET['end_date'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"page\" value=\"<?php if ( ! empty( $_GET['page'] ) ) echo esc_attr( $_GET['page'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"tab\" value=\"<?php if ( ! empty( $_GET['tab'] ) ) echo esc_attr( $_GET['tab'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"report\" value=\"<?php if ( ! empty( $_GET['report'] ) ) echo esc_attr( $_GET['report'] ) ?>\" />\n\t\t\t</div>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tjQuery( function() {\n\t\t\t\t\t// select all\n\t\t\t\t\tjQuery( '.chart-widget' ).on( 'click', '.select_all', function() {\n\t\t\t\t\t\tjQuery(this).closest( 'div' ).find( 'select option' ).attr( \"selected\", \"selected\" );\n\t\t\t\t\t\tjQuery(this).closest( 'div' ).find('select').change();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} );\n\n\t\t\t\t\t// select none\n\t\t\t\t\tjQuery( '.chart-widget').on( 'click', '.select_none', function() {\n\t\t\t\t\t\tjQuery(this).closest( 'div' ).find( 'select option' ).removeAttr( \"selected\" );\n\t\t\t\t\t\tjQuery(this).closest( 'div' ).find('select').change();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t</script>\n\t\t</form>\n\t\t<?php\n\t}", "public function addCategory(){ \n $cookies = new CookieModel();\n $cookie_id = $cookies -> read();\n if (! $cookie_id) $this->redirect('/');\n\n\t \t$name = $_REQUEST['name'];\n $father = $_REQUEST['father'];\n\t\t\t$form = M(\"categoryinfo\");\n\t\t\t$addnew['name'] = $name;\n $addnew['father'] = $father;\n\t\t\t$result = $form->add($addnew);\n\t\t\t$this->redirect('/index.php/Admin/dish');\n\t\t\t\t//else {$this->error('添加失败');}\n }", "function lm_save_category() {\n\t@copy(LM_CDATA, LM_CBACKUP);\n\t$id = isset($_POST['category-id']) ? intval($_POST['category-id']) : null;\n\t$cid = isset($_POST['category-cid']) ? intval($_POST['category-cid']) : time();\n\t$arr = array('cid'=>$cid, 'name'=>safe_slash_html($_POST['category-name']));\n\tif (function_exists('return_i18n_languages')) {\n\t\tforeach(return_i18n_languages() as $lang) {\n\t\t\tif ($lang != return_i18n_default_language()) {\n\t\t\t\t$arr['name_'.$lang] = safe_slash_html($_POST['category-name_'.$lang]);\n\t\t\t}\n\t\t}\n\t}\n\t$categories = lm_get_categories();\n\tif (isset($id))\n\t\t$categories[$id] = $arr;\n\telse\n\t\t$categories[] = $arr;\n\tif (lm_c_to_xml($categories))\n\t\tlm_display_message(i18n_r(LM_PLUGIN.'/SUCCESS_SAVE'), true, false, true);\n\telse\n\t\tlm_display_message(i18n_r(LM_PLUGIN.'/ERROR_SAVE'), false);\n}", "function categoryAdd($str=''){\n\n\t#Get referring page to send users back to\n\t$previous = $_SERVER['HTTP_REFERER'];\n\n\t$str .= '<!-- start general content -->\n\t\t<script type=\"text/javascript\" src=\"' . VIRTUAL_PATH . '_js/util.js\"></script>\n\n\t\t<script type=\"text/javascript\">\n\n\t\t\tfunction checkForm(thisForm)\n\n\t\t\t{//check form data for valid info\n\t\t\t\tif(empty(thisForm.FirstName,\"Please Enter Customer\\'s First Name\")){return false;}\n\t\t\t\tif(empty(thisForm.LastName,\"Please Enter Customer\\'s Last Name\")){return false;}\n\t\t\t\tif(!isEmail(thisForm.Email,\"Please Enter a Valid Email\")){return false;}\n\t\t\t\treturn true;//if all is passed, submit!\n\t\t\t}\n\n\t\t</script>\n\n\n\t\t<div class=\"row\" style=\"\"><!-- begin content -->\n\t\t\t<form action=\"' . THIS_PAGE . '\" method=\"post\" onsubmit=\"return checkForm(this);\" >\n\n\n\t\t\t\t<input type=\"hidden\" name=\"CatID\" />\n\n\t\t\t\t<!-- inner container -->\n\t\t\t\t<div class=\"class=\"col-sm-9 pull-right\" style=\"\">\n\n\t\t\t\t\t<!-- left container -->\n\t\t\t\t\t<div class=\"col-sm-8 pull-left\" style=\"\">\n\t\t\t\t\t\t<h4 class=\"text-center\">Add New Catagory</b></h4>';\n\n\n\n\n\t\t\t\t\t\t\t$str .= '<div class=\"row \">\n\t\t\t\t\t\t\t\t<div class=\"pull-middle\">\n\n\t\t\t\t\t\t\t\t\t<select class=\"selectpicker\" name=\"CatSort\" required>\n\t\t\t\t\t\t\t\t\t\t<option value=\"person\" select=\"select\">Group By: Indivual</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"team\">Group By: Group/Team</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"organization\">Group By: Organization</option>\n\t\t\t\t\t\t\t\t\t</select>\n\n\n\t\t\t\t\t\t\t\t\t<select class=\"selectpicker\" name=\"CatSort\" required>\n\t\t\t\t\t\t\t\t\t\t<option value=\"individual\" select=\"select\">Catagory Type: IC</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"team\">Catagory Type: OOC</option>\n\t\t\t\t\t\t\t\t\t</select>\n\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div><!-- END Container -->\n\n\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\tclass=\"col-sm-12\"\n\t\t\t\t\t\t\t\t\ttype=\"text\"\n\n\t\t\t\t\t\t\t\t\tname=\"CatTitle\"\n\t\t\t\t\t\t\t\t\tplaceholder=\"Team/Group/Character Name here\"/>\n\t\t\t\t\t\t\t</div><!-- END Container -->\n\n\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t<textarea\n\t\t\t\t\t\t\t\t\tname=\"CatDescription\"\n\n\t\t\t\t\t\t\t\t\tclass=\"autoExpand col-sm-12\"\n\t\t\t\t\t\t\t\t\trows=\"3\"\n\t\t\t\t\t\t\t\t\tdata-min-rows=\"3\"\n\n\t\t\t\t\t\t\t\t\tplaceholder=\"Catagory Description\"\n\t\t\t\t\t\t\t\t\t></textarea>\n\t\t\t\t\t\t\t</div><!-- end container-->\n\n\n\t\t\t\t\t</div><!-- end inner container -->\n\n\t\t\t\t<div class=\"clearfix\">\n\t\t\t\t\t<br /><br />\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tstyle=\"\">\n\n\t\t\t\t\t<input type=\"hidden\" name=\"act\" value=\"categoryInsert\" />\n\t\t\t\t\t<input class=\"btn btn-primary btn-xs \" type=\"submit\" value=\"Add Catagory\">\n\n\t\t\t\t\t&nbsp; &nbsp;\n\n\t\t\t\t\t<a class=\"btn btn-primary btn-xs outline\" href=\"' . $previous . '\">Exit Post</a>\n\t\t\t\t</div>\n\n\t\t\t</form>\n\t\t</div>\n\n\t<!-- END content -->';\n\n\treturn $str;\n}", "function add_new()\n\t{\n\t\t$this->data['title'] \t= 'Add New Portfolio';\n\t\t$this->data['css'] \t\t= 'body/admin/css/form_style_default';\n\t\t$this->data['js'] \t\t= 'body/admin/js/form_style_default';\n\t\t$this->data['category'] = $this->portfolio_model->get_all_active_category();\n\t\t$this->data['content'] \t= 'content/admin/portfolio/add_portfolio';\n\t\t$this->load->view('body/admin/style_1', $this->data);\n\t}", "public function addcompanycategory(){\n $data = ['name'=> post('categoryname')];\n $this->Database->insert_data('companycategories',$data);\n flash('green','check',\"Kategoriya uğurla əlavə edildi.\");\n back();\n }", "private function categoriesFormInputs()\n {\n // Get the field name of the field with the category icon\n // #47631, dwildt, 1-\n //$arrLabels[ 'catIcon' ] = $this->confMap['configuration.']['categories.']['fields.']['categoryIcon'];\n // #47631, #i0007, dwildt, 10+\n switch ( true )\n {\n case( $this->pObj->typoscriptVersion <= 4005004 ):\n $arrLabels[ 'catIcon' ] = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'categoryIcon' ];\n break;\n case( $this->pObj->typoscriptVersion <= 4005007 ):\n default:\n $arrLabels[ 'catIcon' ] = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryIcon' ];\n break;\n }\n // #47631, #i0007, dwildt, 10+\n // Default space in HTML code\n $tab = ' ';\n\n // FOREACH category label\n//$this->pObj->dev_var_dump( $this->arrCategories );\n // #i0118, dwildt, 1-/+\n //foreach ( $this->arrCategories[ 'labels' ] as $labelKey => $labelValue )\n foreach ( ( array ) $this->arrCategories[ 'labels' ] as $labelKey => $labelValue )\n {\n // Get the draft for an input field\n $cObj_name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'form_input' ];\n $cObj_conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'form_input.' ];\n $input = $this->pObj->cObj->cObjGetSingle( $cObj_name, $cObj_conf );\n // replace the category marker\n $input = str_replace( '###CAT###', $labelValue, $input );\n // 4.1.17, 120927, dwildt\n // replace the category marker\n //$labelValueWoSpc = str_replace( ' ', null, $labelValue );\n $labelValueWoSpc = $this->zz_properFormLabel( $labelValue );\n $input = str_replace( '###CAT_WO_SPC###', $labelValueWoSpc, $input );\n // 4.1.17, 120927, dwildt\n // #54548, 131221, dwildt, 6+\n $class = $this->arrCategories[ 'cssClass' ][ $labelKey ];\n if ( !empty( $class ) )\n {\n $class = ' class=\"' . $class . '\"';\n }\n $input = str_replace( '###CLASS###', $class, $input );\n\n // IF draft for an input field contains ###IMG###, render an image\n $pos = strpos( $input, '###IMG###' );\n if ( !( $pos === false ) )\n {\n // SWITCH : Render the image\n switch ( true )\n {\n // #i0062\n case( $labelKey == $this->arrWoCategories[ 'iconKey' ] ):\n $name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey ];\n $conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey . '.' ];\n $img = $this->pObj->cObj->cObjGetSingle( $name, $conf );\n break;\n case( is_array( $this->arrCategories[ 'icons' ] ) ):\n // 4.1.7, dwildt, +\n $this->cObjDataAddArray( array( $arrLabels[ 'catIcon' ] => $this->arrCategories[ 'icons' ][ $labelKey ] ) );\n $img = $this->renderMapMarkerVariablesSystemItem( 'categoryIconLegend' );\n $this->cObjDataRemoveArray( array( $arrLabels[ 'catIcon' ] => $this->arrCategories[ 'icons' ][ $labelKey ] ) );\n // 4.1.7, dwildt, +\n break;\n default:\n // Render the image\n $name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey ];\n $conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey . '.' ];\n $img = $this->pObj->cObj->cObjGetSingle( $name, $conf );\n break;\n }\n // SWITCH : Render the image\n\n $input = str_replace( '###IMG###', $img, $input );\n }\n // IF draft for an input field contains ###IMG###, render an image\n\n $arrInputs[] = $tab . $input;\n }\n // FOREACH category label\n // Move array of input fields to a string\n // #i0118, dwildt, 1-/+\n //$inputs = implode( PHP_EOL, $arrInputs );\n $inputs = implode( PHP_EOL, ( array ) $arrInputs );\n $inputs = trim( $inputs );\n\n // RETURN input fields\n return $inputs;\n }", "public function category_add() {\n $this->autoRender = false;\n $params = $this->request->data;\n //echo \"<pre>\";print_r($params);echo \"</pre>\"; exit;\n $categoryTable = TableRegistry::get('SkillCategory');\n $getCategory = $categoryTable->find()->select(['id'])->where(['category_name' => $params['category_name']])->toArray();\n if(empty($getCategory)){\n $category = $categoryTable->newEntity($params);\n if ($categoryTable->save($category)) {\n echo json_encode(\n [\n 'status' => 1,\n 'message' => \"Skill Category Added!\",\n ]\n );\n exit;\n }\n }else{\n echo json_encode(\n [\n 'status' => 0,\n 'message' => \"Skill Category Already Exists!\",\n ]\n );\n exit;\n }\n \n }", "public static function func_ajax_add_category() {\n\t\t\t \n\t\t\t\tglobal $wpdb;\n\t\t\t\t\n\t\t\t\tif(!defined('DOING_AJAX')){\n wp_redirect (site_url());\n exit;\n } else {\n $self = self::sanitize($_POST['name']);\n $day = self::sanitize($_POST['day']);\n $desc = self::sanitize($_POST['description']);\n $wpdb->query($wpdb->prepare( \"INSERT INTO \".$wpdb->prefix.self::$table_name .\" VALUES (%d, %s, %s, %s)\", null, $self,$day,$desc ));\n die();\n\t\t\t\t}\n\t\t\n\t\t}", "public function create()\n {\n // Retrieving models\n $site_info = SiteInfo::first();\n $categories = WorkshopCategory::all()->where('status',1);\n\n if(count($categories) > 0) {\n return view('admin-panel.workshop.project.create', compact('categories', 'site_info'));\n } else{\n return redirect()->route('workshop-category.index')\n ->with('success','Please create a category.');\n }\n }", "public function incomeFormAction()\n\t{\n\t\tView::renderTemplate('Income/addIncome.html', [\n\t\t\t'date' => date('Y-m-d'),\n\t\t\t'incomes' => Income::getIncomesCategories()\n\t\t]);\n\t}", "public function addCategory()\n {\n $baker = Bakery::orderBy('id')->get();\n $this->authorize('category');\n return view('Admin.Bakery.Category.category', ['baker' => $baker]);\n }", "public function create() {\n return view('admin.category.category_create_form');\n }", "function add_utility_bill_category()\n\t{\n\t\t$data['name']\t\t\t\t\t=\t$this->input->post('name');\n\t\t$data['created_on']\t\t\t\t=\ttime();\n\t\t$data['created_by']\t\t\t\t=\t$this->session->userdata('user_id');\n\t\t$data['timestamp']\t\t\t\t=\ttime();\n\t\t$data['updated_by']\t\t\t\t=\t$this->session->userdata('user_id');\n\n\t\t$this->db->insert('utility_bill_category', $data);\n\n\t\t$this->session->set_flashdata('success', 'New utility bill category has been added successfully.');\n\n\t\tredirect(base_url() . 'utility_bill_categories', 'refresh');\n\t}", "public function addCategory()\n {\n return view('backend.admin-panel.pages.addCategory');\n }", "public function getName()\n {\n return 'category_form';\n }", "public function addAction()\n {\n $form = $this->getServiceLocator()->get('civcontent_category_form');\n \n // Check if the request is a POST.\n $request = $this->getRequest();\n if ($request->isPost())\n {\n // Create a new category object.\n $category = $this->getServiceLocator()->get('civcontent_category');\n \n $data = (array) $request->getPost();\n $form->bind($category);\n $form->setData($data);\n if ($form->isValid())\n {\n // Persist changes.\n $this->getContentService()->persistCategory($category);\n \n // Redirect to content categories\n return $this->redirect()->toRoute('content/category', array(\n 'action' => 'index'\n ));\n }\n }\n \n // If a GET request, or invalid data then render/re-render the form\n return new ViewModel(array(\n 'form' => $form,\n ));\n }", "function work_category_add_new_meta_field() {\r\n\t\t$textdomain = 'milk';\r\n\t\t?>\r\n\t \t\t<div class=\"row\">\r\n\t \t\t\t<p class=\"col-md-6 desc\" >\r\n\t \t\t\t\t<label for=\"term_meta[featured_img]\"><?php _e( \"Featured Image\", $textdomain ); ?></label>\r\n\t \t\t\t\t<br/>\r\n\t \t\t\t\t<label for=\"term_meta[featured_img]\"><?php _e( \"If you choose to show work categories on work page instead of works, you need to upload featured image for category\", $textdomain ); ?></label>\r\n\t \t\t\t</p>\r\n\t\t\t \r\n\t\t\t\t<div class=\"col-md-6\">\r\n\t\t\t\t\t<input \tclass=\"post_meta_image_upload button button-primary\" \r\n\t\t\t\t\t\tname=\"image_btn\" \r\n\t\t\t\t\t\ttype=\"button\" \r\n\t\t\t\t\t\tdata-uploader_title=<?php _e( \"Choose image\", $textdomain ); ?>\r\n\t\t\t\t\t\tdata-uploader_button_text=<?php _e( \"Select\" , $textdomain ); ?>\r\n\t\t\t\t\t\tvalue=<?php _e( \"Select images\", $textdomain ); ?>/>\r\n\t\t\t\t\t<input id=\"term_meta[featured_img]\"\r\n\t\t\t\t\t\tname=\"term_meta[featured_img]\"\r\n\t\t\t\t\t\tclass=\"img_url\" \r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tstyle=\"display:none\"\r\n\t\t\t\t\t\tvalue=\"\"/>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"row\">\r\n\t\t\t \t<p class=\"col-md-6 desc\" >\r\n\t \t\t\t\t<label for=\"term_meta[work_color]\"><?php _e( \"Acent Color\", $textdomain ); ?></label>\r\n\t \t\t\t\t<br/>\r\n\t \t\t\t\t<label for=\"term_meta[work_color]\"><?php _e( \"If you choose to show work categories on work page instead of works, you need to select accent color for work categorie preview\", $textdomain ); ?></label>\r\n\t \t\t\t</p>\r\n\t \t\t\t<div class=\"col-md-6\">\r\n\t\t \t\t\t<input name=\"term_meta[work_color]\" \r\n\t\t\t\t \t\ttype=\"text\" \r\n\t\t\t\t \t\tclass=\"colorPicker\"\r\n\t\t\t\t \t\tid=\"term_meta[work_color]\" \r\n\t\t\t\t \t\tvalue=\"\"\r\n\t\t\t\t \t\tdata-default-color=\"#49b4ff\">\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t<?php }", "function addcategory(){\n \treturn view('category');\n }", "function add_cmd()\n\t{\n\t\tif(User::can_add(false,ANY_CATEGORY))\n\t\t{\n\t\t\trequire_once 'forms/edit.php';\n\t\t\t$this->add_form(new EditManageHelpForm());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tUrl::redirect_current();\n\t\t}\n\t}", "public function addCategory(Request $request){\n \t$this->validate($request, [\n \t\t'category' => 'required'\n \t]);\n\n \t$category = new Category;\n \t$category->category = $request->input('category');// this 'category' inside input is same as name='category' in form\n \t$category->save(); //save this category in database\n \treturn redirect('/category')->with('response','Category added successfully');\n }", "function add(){\n\t\tif(!$this->checkLogin()){\n\t\t\tredirect(base_url());\n\t\t}\n\n\t\t$pageData['header_title'] = APP_NAME.' | Add Document Category';\n\t\t$pageData['page_title'] = 'Document Category Management';\n\t\t$pageData['parent_menu'] = 'document_management';\n\t\t$pageData['child_menu'] = 'document_category';\n\n\t\t$this->load->view('admin/document_management/category/add', $pageData);\n\t}", "function wc_marketplace_category() {\n global $wmp;\n $wmp->output_report_category();\n }", "function add_categories(){\n\t\t\tprint_r($this->input->post());\n\t\t}", "function ccategories_create()\n\t{\n\t\tlusers_require(\"categories/create\");\n\n\t\t$post_data = linput_post();\n\t\t$post_data = linput_post_checkbox($post_data, \"content\");\n\t\t$content = $post_data[\"content\"];\n\n\t\tif (hform_validate(array(\"name\", \"link\", \"parentid\")))\n\t\t{\n\t\t\t$cat_created = mcategories_create($post_data);\n\t\t\tif ($content) $content_created = mcontent_create($post_data);\n\t\t\telse $content_created = false;\n\n\t\t\tif (($cat_created && !$content) || ($content && $cat_created && $content_created))\n\t\t\t{\n\t\t\t\tlcache_delete_all();\n\t\t\t\thmessage_set(l(\"Category successfully created.\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($cat_created) mcategories_delete($post_data[\"link\"]);\n\t\t\t\tif ($content_created) mcontent_delete($post_data[\"link\"]);\n\t\t\t\thmessage_set(l(\"Category create error.\") . \" \" . l(\"Link already in use.\"));\n\t\t\t}\n\n\t\t\tluri_redirect(\"main/user/admin/categories\");\n\t\t}\n\t\telse luri_redirect(\"main/user/admin/categories_create\", l(\"All fields marked with * are required.\"));\n\t}", "public function addCategoryToGroupByName($gorup_name, $category_name);", "public function add_new_category(){\n if(isset($this->session->userdata['admin_name']) && !empty($this->session->userdata['admin_name'])) {\n $data['title'] = 'PBD - Admin | Add category';\n $this->load->view('add-new', $data);\n }\n else{\n redirect('signin');\n }\n }", "public function manageCategory()\n {\n $categories = Category::where('parent_category_id', '=', 0)->get();\n $allCategories = Category::pluck('name','id')->all();\n return view('category.add',compact('categories','allCategories'));\n }", "public function createCategory();", "public function actionStrategicAdd(){\n $modelstrategic = new Strategic();\n $this->layout =\"main_module\";\n if(Yii::$app->request->post()){\n $modelstrategic->load(Yii::$app->request->post());\n if($modelstrategic->save()){\n return $this->redirect('strategic-show');\n }\n }\n $modelstrategicissues = StrategicIssues::find()->all();\n return $this->render('strategic_add',['modelstrategic' => $modelstrategic , 'modelstrategicissues' => $modelstrategicissues]);\n }", "public function create()\n {\n $parent = $this->cateRepository->getSelect();\n return view('backend.category.add',compact('parent'));\n }", "public function formModify() {\n $categories=$this->model->listCategories();\n $this->view->display(\"view/form/ProductFormModify.php\", NULL, $categories); \n }", "public function category()\n { \n if($this->access_role->is_Admin() == false) show_404();\n $this->load->model('Category_Model');\n \n if($_SERVER['REQUEST_METHOD'] == 'POST')\n {\n if($this->form_validation->run('category_insert') ){\n $this->Category_Model->add_category(); \n } else {\n $error = ['class'=>'warning','text'=> validation_errors()];\n $this->session->set_flashdata('sms_flash', $error); \n redirect('Dashboard/category');\n }\n } \n else{\n $data = $this->Category_Model->view_category();\n }\n \n $this->load->view('admin/category_content',$data);\n }", "public function actionCreate()\r\n {\r\n $model = new Category();\r\n\r\n //Значения по умолчанию\r\n $model->skay = 1;\r\n $model->solo = 1;\r\n $model->program = 1;\r\n\r\n $judge_list = Judge::find()->select(['sname'])->indexBy('id')->column();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n \r\n// $tur = new Tur();\r\n// $tur->category_id = $model->id;\r\n// $tur->dances = $model->dances;\r\n// $tur->save();\r\n \r\n return $this->redirect(['reglament/index']);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n 'judge_list' => $judge_list,\r\n ]);\r\n }\r\n }", "public function create()\n {\n return view('backend.category.add');\n }", "public function addcategory() {\n return view('Category.view-category');\n}", "public function actionCreate()\n\t{\n\t\t$model=new BookCategories;\n $step = 1;\n\t\tif(isset($_POST['BookCategories']))\n\t\t{\n\t\t\t$model->attributes=$_POST['BookCategories'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('update?id='.$model->id.'&step=2'));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n 'step' => $step\n\t\t));\n\t}", "public function create()\n\t{\n\t\treturn view('admin.main_categories.addmain_category');\n\t}", "function addingcategory(Request $request){\n $res = Category::addCategory($request);\n if ($res) {\n return view('category');\n }\n }", "public function add()\n\t{\t\n\t\t$data = array(); \n\n \t \treturn view('add-category')->with($data);\n\t}", "public function create() {\n// user must be logged in\n if (User::is_logged_in()) {\n// preventing double submitting\n $token = md5(time());\n $_SESSION[$token] = true;\n\n// get all categories for the select box in form\n $categories = Category::all();\n// show post creation form\n require_once('views/posts/create.php');\n }\n }", "public function create()\n {\n $type_submit = 'Thêm mới';\n $listCategory = $this->categoryRepository->all();\n $viewData = [\n 'listCategory' => $listCategory,\n 'type_submit' => $type_submit\n ];\n return view('admin::jobs.job_add', $viewData);\n }", "public function createAction() {\n $form = $this->view->form = new Whmedia_Form_Circle();\n\n // Check post\n if( $this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost()) )\n {\n // we will add the category\n $values = $form->getValues();\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try\n {\n // add category to the database\n // Transaction\n $table = Engine_Api::_()->getDbtable('circles', 'whmedia');\n\n $row = $table->createRow($values);\n $row->user_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n $box_id = $row->save();\n\n $db->commit();\n \n // ** auto add if the box id exist ** \n $addnew = (int) $this->_getParam('addnew' , false);\n $_subject = Engine_Api::_()->user()->getUser($addnew); \n if( $_subject->getIdentity() )\n {\n $viewer = Engine_Api::_()->user()->getViewer();\n $listsTable = Engine_Api::_()->getDbTable('circles', 'whmedia');\n $box = $listsTable->fetchRow(array('user_id = ?' => $viewer->getIdentity(),\n 'circle_id = ?' => $box_id ));\n\n $box->add($_subject);\n }\n // ** auto add if the box id exist ** \n }\n\n catch( Exception $e )\n {\n $db->rollBack(); \n throw $e;\n }\n\n return $this->_helper->Message(\"Box added.\");\n }\n\n // Output\n $this->renderScript('admin-settings/form.tpl');\n }", "public function create()\n {\n $category = Categories::all();\n return view('panel.product-management.categories.form-create')->with(['category' => $category]);\n }", "public function save() {\n\t\tglobal $wpdb;\n\t\t//Build Query\n\t\t$types = array(\"%s\",\"%s\");\n\t\tif(empty($this->category_id)) { //New Category\n\t\t\t$wpdb->insert(FAQBUILDDBCATEGORY,$this->toArray(true),$types); //Insert the this faq build category object into the database\n\t\t\t$this->category_id = $wpdb->insert_id;\n\t\t} else\n\t\t\t$wpdb->update(FAQBUILDDBCATEGORY,$this->toArray(true),array(\"category_id\"=>$this->category_id),$types,array(\"%d\"));\n\t}", "function add_category() {\r\n\r\n\tif(isset($_POST['addcategory'])){\r\n\r\n\t\t$cat_name \t\t\t= clean_input($_POST['cat_name']);\r\n\t\t$cat_desc_short \t= clean_input($_POST['cat_desc_short']);\r\n\t\t$cat_desc_long \t\t= clean_input($_POST['cat_desc_long']);\r\n\t\t$cat_parent_id \t\t= clean_input($_POST['cat_parent_id']);\r\n\t\tif(empty($_POST['cat_parent_id'])){$cat_parent_id\t\t= \"0\";}\r\n\t\t$cat_url \t\t\t= clean_input($_POST['cat_url']);\r\n\t\t$cat_date \t\t\t= clean_input($_POST['cat_date']);\r\n\t\t$cat_mod \t\t\t= clean_input($_POST['cat_mod']);\r\n\t\t$page_template \t\t= clean_input($_POST['page_template']);\r\n\t\t$cat_mod_by \t\t= clean_input($_SESSION['userid']);\r\n\t\t$cat_meta_title \t\t\t= clean_input($_POST['cat_meta_title']);\r\n\t\t$cat_meta_keywords \t\t\t= clean_input($_POST['cat_meta_keywords']);\r\n\t\t$cat_meta_description \t\t= clean_input($_POST['cat_meta_description']);\r\n\t\t$insert_keywords\t \t\t= clean_input($_POST['insert_keywords']);\t\t\t\t\r\n\r\n\t\t$xyquery = \"INSERT INTO categories (\";\r\n\r\n\t\tif (!empty($cat_name)){$xyquery .= \"cat_name \";}\r\n\t\tif (!empty($cat_desc_short)){$xyquery .= \",cat_desc_short \";}\r\n\t\tif (!empty($cat_desc_long)){$xyquery .= \",cat_desc_long \";}\r\n\t\tif (!empty($cat_parent_id)){$xyquery .= \",cat_parent_id\";}\r\n\t\tif (empty($cat_parent_id)){$xyquery .= \",cat_parent_id\";}\r\n\t\tif (!empty($cat_url)){$xyquery .= \",cat_url\";}\r\n\t\t$xyquery .= \",cat_date\";\r\n\t\t$xyquery .= \",cat_mod\";\r\n\t\t$xyquery .= \",cat_mod_by\";\r\n\t\tif (!empty($page_template)){$xyquery .= \",page_template\";}\r\n\t\tif (!empty($cat_meta_title)){$xyquery .= \",cat_meta_title\";}\r\n\t\tif (!empty($cat_meta_keywords)){$xyquery .= \",cat_meta_keywords\";}\r\n\t\tif (!empty($cat_meta_description)){$xyquery .= \",cat_meta_description\";}\t\t\t\t\r\n\r\n\t\t$xyquery .= \") VALUES ( \";\r\n\r\n\t\tif (!empty($cat_name)){$xyquery .= \"'$cat_name' \";}\r\n\t\tif (!empty($cat_desc_short)){$xyquery .= \",'$cat_desc_short' \";}\r\n\t\tif (!empty($cat_desc_long)){$xyquery .= \",'$cat_desc_long' \";}\r\n\t\tif (!empty($cat_parent_id)){$xyquery .= \",'$cat_parent_id' \";\t}\r\n\t\tif (empty($cat_parent_id)){$xyquery .= \",'0' \";\t}\r\n\t\tif (!empty($cat_url)){$xyquery .= \",'$cat_url' \";}\r\n\t\t$xyquery .= \",NOW() \";\r\n\t\t$xyquery .= \",NOW() \";\r\n\t\t$xyquery .= \",'$cat_mod_by' \";\r\n\t\tif (!empty($page_template)){$xyquery .= \",'$page_template' \";}\r\n\t\tif (!empty($cat_meta_title)){$xyquery .= \",'$cat_meta_title' \";}\r\n\t\tif (!empty($cat_meta_keywords)){$xyquery .= \",'$cat_meta_keywords' \";}\r\n\t\tif (!empty($cat_meta_description)){$xyquery .= \",'$cat_meta_description' \";}\r\n\t\tif (!empty($insert_keywords)){$xyquery .= \",'$insert_keywords' \";}\t\t\t\t\r\n\r\n\t\t$xyquery .= \" )\";\r\n\r\n\t\t$xyresult = mysql_query($xyquery) or die(mysql_error());\r\n\t\t//echo \"<center><h4>The category \".$cat_name.\" has been created!</h4></center>\";\r\n\r\n?>\r\n<script>\r\n$(document).ready(function() {\r\n\t$(\"<p>NOTICE:</p><p>The category <?= $cat_name;?> has been created.</p>\").appendTo(\"#xyalert\");\r\n\t$(\"#xyalert\").fadeIn(200).delay(1500).fadeOut(200);\r\n});\r\n</script>\r\n<?\r\n\r\n\t\treturn $xyresult;\r\n\t}\r\n}", "public function store(CaregoryRequest $request)\n {\n $category = new Category();\n $category->category_name = $request->category_name;\n $category->save();\n\n return redirect()->route('category.index')->with('feedback', 'บันทึกข้อมูลเรียบร้อยแล้ว');\n }", "public function shipment_category_new_func($category,$subcategory=null)\n\n\t{\n\n\n\n\t\t$data['related_company']=$this->shipping->select_data('shipping_related_website');\n\n\t\t$data['equipment_category']=$this->shipping->select_data('equipment_category');\n\n\t\t$data['truck_trailer']=$this->shipping->select_data('shipping_truck_trailer');\n\n\t\t$data['category_id']=$category;\n\n\t\t$data['subcategory_id']=$subcategory;\n\n\t\t$this->load->view('shipment/shipment-category-new',$data);\n\n\t}", "public function create()\n {\n return view('admin/categories/add_category');\n }", "public function create()\n {\n return view(\"admin.contractor_categories.create\");\n }", "public function executeAddCategoryNewPost(HTTPRequest $request)\n {\n $this->addCategory($request);\n $this->app->getHttpResponse()->redirect('/admin/addPost');\n }" ]
[ "0.67460954", "0.62550235", "0.6202757", "0.59804004", "0.5974859", "0.5883679", "0.5875688", "0.58718485", "0.58620435", "0.5860522", "0.58561087", "0.5849379", "0.58476734", "0.584638", "0.5837361", "0.5828801", "0.5822643", "0.58087504", "0.5780437", "0.5755626", "0.5730684", "0.57295454", "0.572751", "0.572375", "0.56945306", "0.5688677", "0.5654104", "0.5652301", "0.5637", "0.56151676", "0.5608652", "0.56081384", "0.5588094", "0.5581396", "0.5566614", "0.55664676", "0.5561343", "0.55463505", "0.5540642", "0.55397683", "0.55262136", "0.55114067", "0.55058175", "0.55041605", "0.5503968", "0.5500586", "0.54981875", "0.5492015", "0.549013", "0.5489103", "0.5488244", "0.54845643", "0.5484046", "0.5480412", "0.54695237", "0.54579103", "0.54532886", "0.5444181", "0.54431826", "0.5440816", "0.5422985", "0.5422285", "0.5420024", "0.54188", "0.5405578", "0.54013485", "0.53964883", "0.5391659", "0.5383836", "0.53811526", "0.5380929", "0.5380392", "0.5371316", "0.53702617", "0.5369668", "0.5362489", "0.5361485", "0.5359286", "0.5355616", "0.5354322", "0.53513575", "0.5348444", "0.534723", "0.5347134", "0.5343442", "0.5342318", "0.5341555", "0.53410345", "0.53352314", "0.5330804", "0.5329696", "0.53290457", "0.5327564", "0.532703", "0.53230584", "0.53181434", "0.5317599", "0.5317281", "0.5315885", "0.53157365" ]
0.7685577
0
/edit workout category Function for view form
Функция для просмотра формы редактирования категории тренировок
public function editworkoutcategory($id) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $workout = Category::find($id); return view('admin.editworkoutcategory')->with('workout',$workout); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateworkoutcategory(Request $request)\n {\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n\n $this->validate($request,array(\n 'name' => 'required',\n ));\n $id = $request->id;\n $workoutCategory = Category::find($id);\n $workoutCategory->Category = $request->name;\n $workoutCategory->save();\n Session::flash('success','Workout Category Updated succcessfully.');\n return redirect()->back()->with('workout',$workoutCategory);\n }\n\n else{\n Session::flash('danger','You are not authorize to view this page');\n return redirect()->back();\n }\n }", "public function edit()\n {\n if (!$this->auth->isLogged()) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not logged in!\");\n }\n if (!$this->auth->isInRole(\"admin\")) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not Admin!\");\n }\n\n if (empty($this->input->get(0,\"int\"))){\n $this->view->redirect(\"/categories/manage\");\n }\n\n $categoryId = $this->input->get(0,\"int\");\n\n $categoryModel = new CategoriesModel();\n try{\n\n if (!$categoryModel->existCategoryId($categoryId)){\n $this->view->redirect(\"/categories/manage\",\"This categories do not exist!\");\n }\n $categoryName = $categoryModel->getCategoryNameById($categoryId);\n\n $this->view->render(\"admin/categories/edit\",[\n \"name\"=> $categoryName,\n \"id\"=> $categoryId\n ]\n );\n\n } catch (\\Exception $exception){\n $this->view->redirect(\"/categories/manage\",$exception->getMessage());\n }\n\n }", "public function addWorkoutCategory()\n {\n return view('admin.addworkoutcategory');\n }", "public function edit(Workout $workout)\n {\n //\n }", "public function editPost()\n {\n if (!$this->auth->isLogged()) {\n $this->view->redirect(\"/user/login\", \"You can not add new categories if you are not logged in!\");\n }\n\n if (!$this->auth->isInRole(\"admin\")) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not Admin!\");\n }\n\n if ($this->input->post(\"edit_category\") === null){\n $this->view->redirect(\"/categories/manage\");\n }\n\n if (empty($this->input->get(0,\"int\"))){\n $this->view->redirect(\"/categories/manage\");\n }\n\n $categoryId = $this->input->get(0,\"int\");\n\n $categoryName = $this->input->post(\"name\");\n\n $categoryModel = new CategoriesModel();\n\n try{\n if (!$categoryModel->existCategoryId($categoryId)){\n $this->view->redirect(\"/categories/manage\",\"This categories do not exist!\");\n }\n\n if ($categoryModel->editCategory($categoryName, $categoryId)){\n $this->view->redirect(\"/categories/manage\",\"Category edited successfully!\",\"success\");\n } else {\n $this->view->redirect(\"/categories/manage\",\"You did not change anything ?\");\n }\n\n }catch (\\Exception $exception) {\n $this->view->redirect(\"/categories/manage\", $exception->getMessage());\n }\n }", "public function editNutrationCategory($id)\n {\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n $workout = NutrationCategory::find($id);\n return view('admin.editnutrationcategory')->with('workout',$workout);\n }\n\n else{\n Session::flash('danger','You are not authorize to view this page');\n return redirect()->back();\n }\n }", "public function updateForm()\n{\n\n $listeCatgories = $this->model->getCategories();\n $new = $this->model->getNew();\n $this->view->updateForm($new,$listeCatgories);\n}", "public function edit(TripCategory $tripCategory)\n {\n //\n }", "public function edit_category() {\n $data['pageName'] = $this->pageName . ' : Edit Category';\n $get = $this->uri->uri_to_assoc();\n \n //If no id found\n if(!isset($get['id'])){\n $this->session->set_flashdata('info_message', '<span class=\"error-alert\">No content found</span>');\n redirect('admin/static_pages/home', \"location\");\n exit();\n }\n \n $category_id = $get['id'];\n $where_clause = array('category_id' => $category_id);\n $categoryRS = $this->User_model->get_category($where_clause);\n\n\n if (!$categoryRS) {\n $this->session->set_flashdata('info_message', '<span class=\"error-alert\">Content not available. Please try again later.</span>');\n redirect('admin/category/home', \"location\");\n exit();\n }\n \n $category = $categoryRS[0];\n $data['category'] = $category;\n \n //After posting save data\n if(isset($_POST['category_id']) && !empty($_POST['category_id'])) {\n \n $pst_category_id = addslashes($_POST['category_id']);\n $isCategoryAdded = $this->User_model->update_category($pst_category_id);\n \n if(!$isCategoryAdded) {\n $this->session->set_flashdata('info_message', '<span class=\"error-alert\">Unable to update the record</span>');\n }\n else{\n $this->session->set_flashdata('info_message', 'Record updated successfull!');\n redirect('admin/category/home', \"location\");\n }\n }\n $this->load->view('admin/category/edit_view', $data); \n }", "function product_category_edit(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u, $fs;\n\t\t\n\t\t$data = $_r['data'];\n\t\t$data['id'] = $_r['id'];\n\t\t\n\t\tif($data['save'] || $data['apply']){\n\t\t\tif(!$data['title']) $error['title'] = true;\n\t\t\tif(count($error)==0){\n\t\t\t\t$set = array();\n\t\t\t\t$set[] = \"title = '\".add_slash($data['title']).\"'\";\n\t\t\t\t$set[] = \"language_id = '1'\";\n\t\t\t\t$set[] = \"category_id = '0'\";\n\t\t\t\t\n\t\t\t\t$set = implode(', ', $set);\n\t\t\t\tif($data['id']){\n\t\t\t\t\tmysql_q(\"UPDATE product_category SET $set WHERE id = '\".add_slash($data['id']).\"'\");\n\t\t\t\t} else {\n\t\t\t\t\t$data['id'] = mysql_q(\"INSERT INTO product_category SET $set\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($data['save']){\n\t\t\t\t\tredirect(\"product_category.htm\", \"\");\n\t\t\t\t} else{\n\t\t\t\t\tredirect(\"product_category-edit-\".$data['id'].\".htm\", \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else if($data['cancel']) {\n\t\t\tredirect(\"product_category.htm\", \"\");\n\t\t}\n\n\t\t$fields = \"\n\t\t[hidden name='id']\n\t\t[input name='title' label='Category Title' error='Please Enter Category Title']\n\t\t[sac class='']\n\t\t\";\n\t\t\n\t\tif(!$data['save'] && $data['id']){\n\t\t\t$data = mysql_q(\"SELECT * FROM product_category WHERE id='\".add_slash($data['id']).\"'\", \"single\");\n\t\t}\n\n\t\t$tpl->assign(\"data\", $data);\n\t\t\n\t\t$form = new form();\n\t\t$form->add($fields);\n\t\t$tpl->assign(\"form1\", $form->build());\n\t\t\n\t\t$main['content'] = $tpl->fetch(\"admin_product_category_edit.tpl\");\n\t\tdisplay($main);\n\t}", "public function edit(Postcategory $postcategory)\n {\n //\n }", "function catedit()\r\n\t{\r\n\t\t$data['cat'] = $this->categeory_model->cat($this->uri->segment(4));\r\n\t\t$this->load->view('admin/edit',$data);\r\n\t}", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "function get_category_to_edit($id)\n {\n }", "public function formModify() {\n $categories=$this->model->listCategories();\n $this->view->display(\"view/form/ProductFormModify.php\", NULL, $categories); \n }", "public function edit(Category $category) {\n //not implemented\n }", "public function edit(Workout $workout)\n {\n $logged_user = Auth::user();\n $users = User::all();\n return view('Admin.Workouts.edit',compact('workout','users','logged_user'));\n }", "public function editProgramCategory($id)\n {\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n $workout = ProgramCategory::find($id);\n return view('admin.editprogramcategory')->with('workout',$workout);\n }\n\n else{\n Session::flash('danger','You are not authorize to view this page');\n return redirect()->back();\n }\n }", "public function edit_category($category) {\n $this->category();\n $categories_sql_string = \"SELECT * FROM category WHERE id = \" . $category . \" limit 1\";\n $connection = new Database(\"sbrettsc_db\");\n $menu_array = $connection->get_array_from_query($categories_sql_string);\n $data = array(\"menu_array\" => array_shift($menu_array));\n\n $this->loadView(\"editors/category_editor\", $data);\n }", "public function edit_category($category_id){\n $category_info=DB::table('tbl_category')\n ->where('category_id',$category_id)\n ->first();\n $edit_category=view('admin.pages.edit_category') \n ->with('category_info',$category_info); \n return view('admin.admin_master')->with('admin_content',$edit_category);\n }", "public function edit(Category $Category)\n {\n //\n }", "public function editSpecialist($cat_id)\n {\n\n $specialistData = DB::table('specialists')\n ->join('departments', 'specialists.department_id', '=', 'departments.id')\n ->select('specialists.*', 'departments.name as deptName', 'departments.id as catID')\n /*->get();*/\n ->where('specialists.id',$cat_id)\n ->first();\n\n $editSpecialist=view('admin.specialist_edit')\n ->with('specialistData',$specialistData);\n\n return view('admin.master')\n ->with('main_content',$editSpecialist);\n\n return Redirect::to('/specialists');\n }", "public function edit($id)\n\t{\n\t\t$present_users = \\App\\User::where('category', '!=', 0)->orderBy('created_at', 'desc')->get();\n\t\t\n\t\t$data = \\App\\Work::find($id);\n\t\t$industries = \\App\\Industry::orderBy(\"sort\", 'asc')->get();\n\t\t$work_categories = \\App\\WorkCategory::orderBy('sort', 'asc')->get();\n\t\t$area_provinces = \\App\\AreaProvince::orderBy('sort', 'asc')->get(array('id','code', 'name', 'id'));\n\t\t$area_cities = null;\n\t\t$area_streets = null;\n\t\tif(!empty($data->province))\n\t\t{\n\t\t\t$area_cities = \\App\\AreaCity::where('provincecode', '=', $data->province)->orderBy('sort', 'asc')->get(array('id','code', 'name', 'id'));\n\t\t}\n\t\tif(!empty($data->city))\n\t\t{\n\t\t\t$area_streets = \\App\\AreaStreet::where('citycode', '=', $data->city)->orderBy('sort', 'asc')->get(array('id','code', 'name', 'id'));\n\t\t}\n\t\t\t\n\t\treturn view('admin.works.edit')->with('data', $data)->with('present_users', $present_users)->with('area_provinces', $area_provinces)->with('area_cities', $area_cities)->with('area_streets', $area_streets)->with('work_categories', $work_categories)->with('industries', $industries);\n\t}", "function edit_category() {\r\n\r\n\tif(isset($_POST['editcategory'])){\r\n\r\n\t\t$cat_id\t\t\t\t= clean_input($_GET['cat_id']);\r\n\t\t$cat_name \t\t\t= clean_input($_POST['cat_name']);\r\n\t\t$cat_desc_short \t= clean_input($_POST['cat_desc_short']);\r\n\t\t$cat_desc_long \t\t= clean_input($_POST['cat_desc_long']);\r\n\t\t$cat_parent_id \t\t= clean_input($_POST['cat_parent_id']);\r\n\t\t$cat_url \t\t\t= clean_input($_POST['cat_url']);\r\n\t\t$cat_date \t\t\t= clean_input($_POST['cat_date']);\r\n\t\t$cat_mod \t\t\t= clean_input($_POST['cat_mod']);\r\n\t\t$page_template \t\t= clean_input($_POST['page_template']);\r\n\t\t$cat_mod_by \t\t= clean_input($_SESSION['userid']);\r\n\t\t$cat_meta_title \t\t\t= clean_input($_POST['cat_meta_title']);\r\n\t\t$cat_meta_keywords \t\t\t= clean_input($_POST['cat_meta_keywords']);\r\n\t\t$cat_meta_description \t\t= clean_input($_POST['cat_meta_description']);\r\n\t\t$insert_keywords\t \t\t= clean_input($_POST['insert_keywords']);\t\t\t\r\n\r\n\t\t$xyquery = \"UPDATE categories SET \";\r\n\t\t$xyquery .= \"cat_name = '$cat_name',\";\r\n\t\t$xyquery .= \"cat_desc_short = '$cat_desc_short'\";\r\n\t\t$xyquery .= \",cat_desc_long = '$cat_desc_long'\";\r\n\t\t$xyquery .= \",cat_parent_id = '$cat_parent_id'\";\r\n\t\t$xyquery .= \",cat_url = '$cat_url'\";\r\n\t\t$xyquery .= \",cat_mod = '$cat_mod'\";\r\n\t\t$xyquery .= \",cat_mod_by = '$cat_mod_by'\";\r\n\t\t$xyquery .= \",page_template = '$page_template'\";\r\n\t\t$xyquery .= \",cat_meta_title = '$cat_meta_title'\";\r\n\t\t$xyquery .= \",cat_meta_keywords = '$cat_meta_keywords'\";\r\n\t\t$xyquery .= \",cat_meta_description = '$cat_meta_description'\";\r\n\t\t$xyquery .= \",insert_keywords = '$insert_keywords'\";\t\t\t\t\r\n\t\t$xyquery .= \"WHERE cat_id = '$cat_id'\";\r\n\r\n\t\t$xyresult = mysql_query($xyquery) or die(mysql_error());\r\n\r\n\t\t//echo \"<center><h4>The category \".$cat_name.\" been edited!</h4></center>\";\r\n?>\r\n<script>\r\n$(document).ready(function() {\r\n\t$(\"<p>NOTICE:</p><p>The category <?= $cat_name;?> has been modified.</p>\").appendTo(\"#xyalert\");\r\n\t$(\"#xyalert\").fadeIn(200).delay(1500).fadeOut(200);\r\n});\r\n</script>\r\n<?\r\n\t\treturn $xyresult;\r\n\t}\r\n}", "public function edit() {\n// user must be logged in\n if (User::is_logged_in()) {\n// preventing double submitting\n $token = md5(time());\n $_SESSION[$token] = true;\n\n $user_id = $_SESSION['user_id'];\n $is_admin = isset($_SESSION['is_admin']) && $_SESSION['is_admin'];\n $post_id = $_GET['post_id'];\n $post = Post::find($post_id);\n\n $description = $post['description'];\n $categoryId = $post['category'];\n $imageFile = $post['imageFile'];\n// user can edit only his post or he must be an admin\n if ($user_id == $post['authorId'] || $is_admin) {\n // get all categories for the select box in form\n $categories = Category::all();\n// show post edit form\n require_once('views/posts/edit.php');\n }\n }\n }", "public function edit(Category $edit){\n return $edit;\n }", "function editWorkOption(){\n\n if($this->session->has_userdata('userId')){\n\n if(! $this->_isUserAdmin()){\n\n $this->deniedAccess();\n }else{\n\n $workOptionId = $this->uri->segment(2);\n $this->Work_option_model->updateWorkOption($workOptionId);\n\n redirect(site_url('manage-work-options'));\n }\n }\n else{\n\n //redirect to home page\n redirect(site_url());\n }\n }", "function editAction()\n\t{\n global $langCode;\n\t\t$id = (int)$this->registry->router->getArg('id');\n\t\t$myProductCat = new Core_ProductCategory($id);\n\t\t\n\t\t$redirectUrl = $this->getRedirectUrl();\n\t\tif($myProductCat->id > 0)\n\t\t{\n\t\t\t$error \t\t= array();\n\t\t\t$success \t= array();\n\t\t\t$contents \t= '';\n\t\t\t$formData \t= array();\n\t\t\t //Truyen du lieu hien co vao form\n\t\t\t$formData['fbulkid'] = array();\n\t\t\t$formData['fid'] = $myProductCat->id;\n\t\t\t$formData['fname'] = $myProductCat->name;\n\t\t\t$formData['forder'] = $myProductCat->order;\n\t\t\t$formData['fparentid'] = $myProductCat->parentid;\n\t\t\t$formData['fenable'] = $myProductCat->enable;\n\t\t\t$formData['fseourl'] = $myProductCat->seoUrl;\n\t\t\t$formData['fseotitle'] = $myProductCat->seoTitle;\n\t\t\t$formData['fseokeyword'] = $myProductCat->seoKeyword;\n\t\t\t$formData['fseodescription'] = $myProductCat->seoDescription;\n\t\t\t\n\t\t\tif(!empty($_POST['fsubmit']))//truong hop da nhan nut submit\n\t\t\t{\n if($_SESSION['productcategoryEditToken']==$_POST['ftoken'])//kiem tra token\n {\n $formData = array_merge($formData, $_POST);\n \n if($this->editActionValidator($formData, $error))//kiem tra du lieu co hop le hay khong\n {\n //Cac thong tin khong ngon ngu:\n $myProductCat->order = (int)$formData['forder'];\n $myProductCat->parentid = (int)$formData['fparentid'];\n $myProductCat->enable = (int)$formData['fenable']==1?1:0;\n if(strlen($formData['fseourl']) > 0)\n $myProductCat->seoUrl = Helper::codau2khongdau($formData['fseourl'], true);\n else\n $myProductCat->seoUrl = Helper::codau2khongdau(strip_tags($formData['fname']), true);\n //Cac thong tin lien quan ngon ngu: \n $myProductCat->name = $formData['fname']; \n $myProductCat->seoTitle = $formData['fseotitle'];\n $myProductCat->seoKeyword = $formData['fseokeyword'];\n $myProductCat->seoDescription = $formData['fseodescription'];\n \n if($myProductCat->updateData())//cap nhat database\n {\n $success[] = str_replace('###categoryname###', $myProductCat->name[$langCode], $this->registry->lang['controller']['succUpdate']);\n $this->registry->me->writelog('ProductCategoryedit', $myProductCat->id, array('name' => $myProductCat->name[$langCode], 'order' => $myProductCat->order));\n }\n else\n {\n $error[] = $this->registry->lang['controller']['errUpdate']; \n }\n }\n }\n $_SESSION['productcategoryEditToken'] = Helper::getSecurityToken();//Tao token moi\n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t\t\t$this->registry->smarty->assign(array(\t'formData' \t=> $formData,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'subcategories' => $myProductCat->getSub(true),\n\t\t\t\t\t\t\t\t\t\t\t\t\t'parentCategories' => Core_ProductCategory::getFullCategories(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t'redirectUrl'=> $redirectUrl,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'error'\t\t=> $error,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'success'\t=> $success,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t$contents .= $this->registry->smarty->fetch($this->registry->smartyControllerContainer.'edit.tpl');\n\t\t\t$this->registry->smarty->assign(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'menu'\t\t=> 'productcategorylist',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'pageTitle'\t=> $this->registry->lang['controller']['pageTitle_edit'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'contents' \t\t\t=> $contents));\n\t\t\t$this->registry->smarty->display($this->registry->smartyControllerGroupContainer . 'index.tpl');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$redirectMsg = $this->registry->lang['controller']['errNotFound'];\n\t\t\t$this->registry->smarty->assign(array('redirect' => $redirectUrl,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'redirectMsg' => $redirectMsg,\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t$this->registry->smarty->display('redirect.tpl');\n\t\t}\n\t}", "public function edit(Category $Category)\n {\n echo \"i am in edit\";exit();\n //\n }", "public function edit($id = NULL){\n\t\tif ($id) {\n\t\t\t$this->data['category'] = $this->category_m->get($id);\n\t\t\tcount($this->data['category']) || $this->data['errors'][] = 'category could not be found';\n\t\t}\n\t\telse {\n\t\t\t$this->data ['category'] = $this->category_m->get_new();\n\t\t}\n\t\t\n\t\t// Set up the form\n\t\t$rules = $this->category_m->rules;\n\t\t$this->form_validation->set_rules($rules);\n\t\t\n\t\t// Process the form\n\t\tif ($this->form_validation->run() == TRUE) {\n\t\t\t$data = $this->category_m->array_from_post(array(\n\t\t\t\t'title', \n\t\t\t\t'description', \n\t\t\t\t'items_style'\n\t\t\t\t\n\t\t\t));\n\t\t\t$this->category_m->save($data, $id);\n\t\t\tredirect('admin/category');\n\t\t}\n\t\t\n\t\t$this->data['subview'] ='admin/category/edit';\n\t $this->load->view('admin/_layout_main', $this->data);\n }", "public function editCategory($editCategory) {\n if (isset($editCategory)) {\n\n $data = array(\n 'name' => $editCategory['name'],\n 'support_emails' => $editCategory['support_emails'],\n 'quantity_enabled' => $editCategory['quantity_enabled']\n );\n \n if (isset($editCategory['supplier_user'])) {\n $data['supplier_user'] = $editCategory['supplier_user'];\n }\n \n if (isset($editCategory['custom_fields'])) {\n $data['custom_fields'] = $editCategory['custom_fields'];\n } else {\n $data['custom_fields'] = NULL;\n }\n $this->db->where('id', $editCategory['category_id']);\n $this->db->update('categories', $data);\n return TRUE;\n } else {\n return False;\n }\n }", "public function edit(CourseCategory $courseCategory)\n {\n //\n }", "function edit_category($tbl_name){\n\t\t//print_r($_POST); die;\n\t\tunset($_POST['submitLog']);\n\t\t$this->db->where('id', $_POST['id']);\n\t\tunset($_POST['id']);\n\t\t$this->db->update($tbl_name,$_POST);\n\t\t// print_r($this->db->last_query());\n\t // die();\n\t}", "function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $up=false, $down=false, $thisparents=array()) {\n global $CFG, $USER, $OUTPUT;\n $mform =& $this->_form;\n\n static $str = NULL;\n static $config = NULL;\n\n if (is_null($config)) {\n $config = get_config('block_cam_mycourses');\n }\n\n if (is_null($str)) {\n $str = new stdClass;\n $str->spacer = $OUTPUT->spacer().' ';\n $str->full = get_string('full', 'block_cam_mycourses');\n $str->listing = get_string('listing', 'block_cam_mycourses');\n $str->no = get_string('no');\n $str->display = get_string('display', 'block_cam_mycourses');\n $str->cascade = get_string('cascade', 'block_cam_mycourses');\n $str->enrol = get_string('enrolled', 'block_cam_mycourses');\n $str->fullif = get_string('fullif', 'block_cam_mycourses');\n }\n $options = array(0 => $str->no,\n CAM_MYCOURSES_DISPLAYFULL => $str->full,\n CAM_MYCOURSES_DISPLAYFULLENROL => $str->fullif,\n CAM_MYCOURSES_DISPLAYLIST => $str->listing);\n if (!empty($category)) {\n\n if (!isset($category->context)) {\n $category->context = context_coursecat::instance($category->id);\n }\n\n // echo '<tr><td align=\"left\" class=\"name\">';\n $categoryprefix = '';\n for ($i=0; $i<$depth;$i++) {\n $categoryprefix .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\n }\n //echo '</td>';\n $display = \"display_\".$category->id;\n $display = isset($config->$display) ? $config->$display : 0;\n $enrolled = \"enrol_\".$category->id;\n $enrolled = isset($config->$enrolled) ? $config->$enrolled : false;\n $cascade = \"cascade_\".$category->id;\n $cascade = isset($config->$cascade) ? $config->$cascade : false;\n $mform->addElement('header', 'header'.$category->id, $categoryprefix.format_string($category->name));\n $mform->addElement('select', 'display'.$category->id, $str->display, $options);\n $mform->setDefault('display'.$category->id, $display);\n $mform->addElement('checkbox', 'cascade'.$category->id, $str->cascade);\n $mform->setDefault('cascade'.$category->id, $cascade);\n $mform->addElement('checkbox', 'enrolled'.$category->id, $str->enrol);\n $mform->setDefault('enrolled'.$category->id, $enrolled);\n foreach($thisparents as $parentid) {\n $mform->disabledIf('display'.$category->id, 'cascade'.$parentid, 'checked');\n $mform->disabledIf('cascade'.$category->id, 'cascade'.$parentid, 'checked');\n $mform->disabledIf('enrolled'.$category->id, 'cascade'.$parentid, 'checked');\n }\n $mform->disabledIf('enrolled'.$category->id, 'display'.$category->id, 'eq', 3);\n } else {\n $category->id = '0';\n }\n\n if ($categories = get_categories($category->id)) { // Print all the children recursively\n $countcats = count($categories);\n $count = 0;\n $first = true;\n $last = false;\n if (!empty($category->id)) {\n $thisparents[] = $category->id;\n } else {\n $thisparents = array();\n }\n foreach ($categories as $cat) {\n $count++;\n if ($count == $countcats) {\n $last = true;\n }\n $up = $first ? false : true;\n $down = $last ? false : true;\n $first = false;\n\n $this->print_category_edit($cat, $displaylist, $parentslist, $depth+1, $up, $down, $thisparents);\n }\n }\n }", "function edit(category $category)\n {\n $query = \"UPDATE categories SET name = '$category->name', \n tag = '$category->tag', description = '$category->description', slug = '$category->slug', active = '$category->active' WHERE categories_id = $category->category_id\";\n $result = $this->db->update($query);\n }", "function edit_category_data($category_id)\n\t{\n\t\t$this->data['title'] \t= 'Edit Portfolio Category Data';\n\t\t$this->data['category']\t= $this->portfolio_model->get_category_by_id($category_id);\n\t\t$this->data['css'] \t\t= 'body/admin/css/form_style_default';\n\t\t$this->data['js'] \t\t= 'body/admin/js/form_style_default';\n\t\t$this->data['content'] \t= 'content/admin/portfolio/edit_category';\n\t\t$this->load->view('body/admin/style_1', $this->data);\n\t}", "public function edit(category $category)\n {\n return \"category\";\n //\n }", "public function actionCategoryEdit()\n {\n $this->_assertCanManageCategories();\n $category_id = $this->_input->filterSingle('faq_id', XenForo_Input::UINT);\n $viewParams = array('faqcategory' => $this->_getCategoryModel()->getById($category_id));\n return $this->responseView('Iversia_FAQ_ViewPublic_Category', 'iversia_faq_edit_category', $viewParams);\n }", "public function edit($id){\n $categorie=Blog_categories::find($id);\n return view ('blog_categories.edit',['categorie'=>$categorie]);\n}", "public function updateNutrationCategory(Request $request)\n {\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n\n $this->validate($request,array(\n 'name' => 'required',\n 'tips' => 'required',\n ));\n $id = $request->id;\n $nutrationCategory = NutrationCategory::find($id);\n $nutrationCategory->nutration_category_name = $request->name;\n $nutrationCategory->tips = $request->tips;\n $nutrationCategory->save();\n Session::flash('success','Nutration Category Updated succcessfully.');\n return redirect()->back()->with('workout',$nutrationCategory);\n }\n\n else{\n Session::flash('danger','You are not authorize to view this page');\n return redirect()->back();\n }\n }", "public function edit_category($id)\n\t{\n\t\t$query=$this->General_model->show_data_id('categories',$id,'category_Id','get','');\n $data['category']=$query; \n\t\t$data['title']=\"Dahboard || Great Wine Global\";\n $this->load->view('superpanel/header',$data);\n $this->load->view('superpanel/edit_categorie');\n $this->load->view('superpanel/footer');\n\t}", "public function edit($id)\n { \n //This Function Call CategoryHelpers.php Directory . \n $category = fetchCategoryTree(0,'','');\n $cat = Category::find($id);\n return view('admin.category.edit', compact('cat', 'category'));\n }", "public function edit(AwardCategory $awardCategory)\n {\n //\n }", "public function edit(CustomerCategory $customerCategory)\n {\n //\n }", "public function update_assets_category() {\n\t\n\t\tif($this->input->post('edit_type')=='assets_category') {\t\t\n\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t$Return = array('result'=>'', 'error'=>'', 'csrf_hash'=>'');\n\t\t\t\n\t\t$id = $this->uri->segment(4);\n\t\t$Return['csrf_hash'] = $this->security->get_csrf_hash();\n\t\t\t\n\t\t/* Server side PHP input validation */\t\t\n\t\tif($this->input->post('name')==='') {\n \t$Return['error'] = $this->lang->line('xin_error_cat_name_field');\n\t\t}\n\t\t\t\t\t\t\n\t\tif($Return['error']!=''){\n \t\t$this->output($Return);\n \t}\n\t\t\n\t\t// set data\n\t\t$data = array(\n\t\t'category_name' => $this->input->post('name')\n\t\t);\n\t\t\n\t\t$result = $this->Assets_model->update_assets_category_record($data,$id);\n\t\tif ($result == TRUE) {\n\t\t\t$Return['result'] = $this->lang->line('xin_success_assets_category_updated');\n\t\t} else {\n\t\t\t$Return['error'] = $this->lang->line('xin_error_msg');\n\t\t}\n\t\t$this->output($Return);\n\t\texit;\n\t\t}\n\t}", "function editcategeory()\r\n\t{ \r\n\t\t $id = $this->input->post('id');\r\n\t\t $parentid = $this->input->post('parentid');\r\n\t\t $catname = $this->input->post('catname');\r\n\t\t $this->categeory_model->editcategeory($id,$catname);\r\n\t\t redirect('admin/categeory/categeoryview/'.$parentid );\r\n\t}", "public function editAction() {\n $form = $this->view->form = new Whmedia_Form_Circle();\n $form->submit->setLabel('Edit Box');\n $list_id = (int) $this->_getParam('box_id');\n $circlesTable = Engine_Api::_()->getDbTable('circles', 'whmedia');\n $viewer = Engine_Api::_()->user()->getViewer();\n /* @var $list Whmedia_Model_Circle */\n $list = $circlesTable->find($list_id)->current();\n $form->populate($list->toArray());\n \n // Check post\n if( $this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost()) )\n {\n if( !$list || $list->user_id != $viewer->getIdentity() ) {\n return $this->_helper->Message('Missing box.', false, false)->setError();\n } \n // we will add the category\n $values = $form->getValues();\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try\n {\n \n $list->setFromArray($values);\n $list->save();\n\n $db->commit();\n }\n\n catch( Exception $e )\n {\n $db->rollBack(); \n throw $e;\n }\n\n return $this->_helper->Message(\"Changes saved.\");\n }\n\n // Output\n $this->renderScript('admin-settings/form.tpl');\n }", "public function edit(BlogCategory $blogCategory)\n {\n //\n }", "function edit($esta_categoria)\n {\n if($this->acceso(436)){\n // check if the categoria exists before trying to edit it\n $categoria = str_replace(\"%20\", \" \", $esta_categoria);\n $data['categoria'] = $this->Categoria_model->get_categoria($categoria);\n\n if(isset($data['categoria']['categoria']))\n {\n $this->load->library('form_validation');\n $this->form_validation->set_rules('categoria','Nombre','trim|required', array('required' => 'Este Campo no debe ser vacio'));\n $this->form_validation->set_rules('codigo_cat','Código','trim|required', array('required' => 'Este Campo no debe ser vacio'));\n if($this->form_validation->run()) \n {\n $params = array(\n 'categoria' => $this->input->post('categoria'),\n 'codigo_cat' => $this->input->post('codigo_cat'),\n );\n $this->Categoria_model->update_categoria($categoria,$params); \n redirect('categoria/index');\n }\n else\n {\n $data['_view'] = 'categoria/edit';\n $this->load->view('layouts/main',$data);\n }\n }\n else\n show_error('The categoria you are trying to edit does not exist.');\n }\n }", "public function edit($id)\n {\n\n $category= BountyCategory::findOrFail($id);\n\n return view('admin.bounty.edit-category')->with('categories',$category);\n }", "public function editAction()\n {\n\n $request = $this->getRequest();\n\n $routeMatch = $this->getEvent()->getRouteMatch();\n $id = $routeMatch->getParam('exercise_id', 0);\n\n if ($id <= 0) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n $exercise = $this->_exercise->getRow(array('exercise_id' => $id));\n\n if (!$exercise) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n $workoutId = $exercise->workout_id;\n\n $workout = $this->_workout->getRow(array('workout_id' => $workoutId));\n\n if (!$workout) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n $typeId = $exercise->type_id;\n\n $type = $this->_exerciseType->getRow(array('type_id' => $typeId));\n\n// if (!$type) {\n// return $this->redirect()->toRoute('hi-training/workout/list');\n// }\n\n /**\n * Grid FORM\n */\n $form = new WorkoutExerciseGrid(\n array(\n 'view' => $this->_view,\n )\n );\n\n /**\n * BUILDING Row\n */\n $row = new WorkoutExerciseRow(\n array(\n 'model' => $this->_exercise,\n 'view' => $this->_view,\n )\n );\n\n //\n $row->setRowId($id);\n\n\n\n $row->setFieldOptions('type_id', array(\n 'values' => $this->_exerciseType->getBehaviour('nestedSet')->getResultSetForSelect(),\n 'onchange' => 'exerciseType(this);',\n ));\n $row->setFieldOptions('workout_id', array(\n 'value' => $workoutId,\n ));\n\n $row->addAction(\n 'saveEdit',\n 'submit',\n array(\n 'label' => 'save and continue editing',\n 'class' => 'actionImage',\n// 'image' => $this->_skinUrl . '/img/icons/record/save.png',\n )\n );\n\n //\n $row->build();\n\n //\n $form->addSubForm($row, $row->getName());\n\n //\n $this->_view->headScript()->appendScript(\n $this->_view->render(\n 'workout-exercise/edit.js',\n array(\n 'currentFormType' => $type['form_type'],\n 'back' => $this->url()->fromRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $workoutId)),\n 'ajaxFormType' => $this->url()->fromRoute(\n 'hi-training/exercise-type/ajax-form-type/wildcard',\n array('type_id' => '')\n ),\n 'ajaxLastOfType' => $this->url()->fromRoute(\n 'hi-training/workout-exercise/ajax-last-of-type/wildcard',\n array('type_id' => '')\n ),\n )\n )\n );\n\n\n /**\n * POST\n */\n if ($this->getRequest()->isPost()) {\n\n $formData = $this->getRequest()->post()->toArray();\n\n if ($form->isValid($formData)) {\n\n if ( isset($formData['header']['formId'])\n && $formData['header']['formId'] == 'WorkoutExerciseGridForm') {\n\n if (isset($formData['WorkoutExerciseRow']['actions']['save'])) {\n\n if (is_array($formData['WorkoutExerciseRow']['row'])){\n $row = $this->_exercise->getRow(array('exercise_id' => $id))\n ->populate($formData['WorkoutExerciseRow']['row']);\n $row->save();\n\n return $this->redirect()->toRoute(\n 'hi-training/workout-exercise/list/wildcard',\n array('workout_id' => $workoutId)\n );\n }\n\n }\n\n if (isset($formData['WorkoutExerciseRow']['actions']['saveAdd'])) {\n\n if (is_array($formData['WorkoutExerciseRow']['row'])){\n $row = $this->_exercise->getRow(array('exercise_id' => $id))\n ->populate($formData['WorkoutExerciseRow']['row']);\n $row->save();\n\n return $this->redirect()->toRoute(\n 'hi-training/workout-exercise/add/wildcard',\n array('workout_id' => $workoutId)\n );\n }\n\n }\n\n if (isset($formData['WorkoutExerciseRow']['actions']['saveEdit'])) {\n\n if (is_array($formData['WorkoutExerciseRow']['row'])){\n $row = $this->_exercise->getRow(array('exercise_id' => $id))\n ->populate($formData['WorkoutExerciseRow']['row']);\n $row->save();\n\n return $this->redirect()->toRoute(\n 'hi-training/workout-exercise/edit/wildcard',\n array('exercise_id' => $id)\n );\n }\n\n }\n }\n }\n }\n\n return array(\n 'form' => $form,\n 'workout' => $workout,\n 'exercise' => $exercise,\n );\n }", "function shophead_edit($category_id = \"\")\n {\n $this->layout = 'admin_layout';\n $id = base64_decode($category_id);\n // pr($id);\n $this->loadModel('ProductCategory');\n $data = $this->ProductCategory->find('first', array('conditions' => array('ProductCategory.id' => $id)));\n if (!empty($data)) {\n if (!empty($this->request->data)) {\n $this->request->data = Sanitize::clean($this->request->data, array('encode' => false));\n $this->ProductCategory->set($this->request->data);\n if ($this->request->data['ProductCategory']['name'] == $data['ProductCategory']['name']) {\n unset($this->request->data['ProductCategory']['name']);\n }\n if ($this->ProductCategory->validates()) {\n if ($this->ProductCategory->save($this->request->data)) {\n $this->Session->write('flash', array(EDIT_RECORD, 'success'));\n $this->redirect(array('controller' => 'ProductCategories', 'action' => 'index'));\n } else {\n $this->Session->write('flash', array(FAILURE_MSG, 'failure'));\n $this->redirect(array('controller' => 'ProductCategories', 'action' => 'index'));\n }\n }\n }\n $this->request->data = $data;\n } else {\n $this->redirect(array('controller' => 'ProductCategories', 'action' => 'index'));\n }\n }", "public function edit(ProductCategory $productCategory)\n {\n //\n }", "public function edit($id)\n {\n $data = $this->Category->findData($id);\n $catalogue = Catelog::get();\n\t\tif($data->in_home==\"on\"){\n\t\t\t$is_Selected=\"checked\";\n\t\t}else{\n\t\t\t$is_Selected=\"\";\n\t\t}\n $html = '<div class=\"form-group error\"></div>\n <label for=\"categories_name\">Name</label>\n <div class=\"form-group\">\n <div class=\"form-line\">\n <input type=\"text\" id=\"editcategories_name\" name=\"categories_name\" value=\"'.$data->categories_name.'\" class=\"form-control\" placeholder=\"Enter your category name\">\n </div>\n </div>\n <label for=\"catelogue_id\">Catalogue</label>\n <div class=\"form-group\">\n <div class=\"form-line\">\n <select class=\"form-control\" id=\"editcatelogue_id\" name=\"catelogue_id\">\n <option value=\"\">-- Please select --</option>';\n foreach($catalogue as $key)\n {\n $status=\"\";\n if($data->catelogue_id==$key->id){\n $status=\"selected\";\n }\n $html .= '<option value=\"'.$key->id.'\" '.$status.'>'.$key->catelogue_name.'</option> ';\n }\n $html .= ' </select>\n </div>\n </div>\n <label for=\"image\">Images</label>\n <div class=\"form-group\">\n <div class=\"form-line\">\n <input type=\"file\" name=\"image_1\" id=\"image_1\" placeholder=\"Choose image\" > \n </div>\n </div>\n <div class=\"form-group\">\n <div class=\"form-line\">\n <img src=\"'.asset('storage/category/'.$data->image).'\" name=\"old_img\" width=\"50px\" height=\"50px\"> \n </div>\n </div>\n <label for=\"description\">Description</label>\n <div class=\"form-group\">\n <div class=\"form-line\">\n <input type=\"text\" id=\"editDescription\" name=\"Description\" value=\"'.$data->description.'\" class=\"form-control\" placeholder=\"Enter your description\">\n </div>\n </div>\n\t\t\t\t <label for=\"description\">Show In Home</label>\n <div class=\"form-group\">\n\t\t\t\t\t\t<input type=\"checkbox\" id=\"in_home\" name=\"in_home\" class=\"form-control\" '.$is_Selected.'>\n\t\t\t\t\t</div>\n <br>\n ';\n return response()->json(['html'=>$html]);\n }", "public function edit(Kategori $kategori)\n {\n //\n }", "public function Editar(){\n $ca = new Categoria();\n \n if(isset($_REQUEST['id'])){\n $ca = $this->model->Obtener($_REQUEST['id']);\n }\n \n require_once 'view/header.php';\n require_once 'view/categoria/editar.php';\n require_once 'view/footer.php';\n }", "public function edit($catgId){\n\t\t\tif($this->session->userdata('loggedIn_adminInfo')=='')redirect('admincp');\n\t\t\t$data['title'] \t\t= 'Projects 100K';\n\t\t\t$postedValue_fname \t= array();\n\t\t\tif($this->session->userdata('post_promotionData'))\n\t\t\t$data['postedValue'] \t\t= \t$this->session->userdata('post_promotionData');\n\t\t\t$promotionID\t\t\t\t= \tstr_replace(array('-', '_', '~'), array('+', '/', '='),$catgId);\t\t\t\n\t\t\t$data['promotionInfo']\t\t=\t$this->base_model->is_Record_Exists('tbl_promotion_mastercategory','',array('id'=>$this->encrypt->decode($promotionID)));\t\n\t\t\t$data['fieldInfo']\t\t\t=\t$this->base_model->get_All_Records('tbl_promotion_masterfields','',\n\t\t\t\t\t\t\t\t\t\t\tarray('promotionCategoryId'=>$this->encrypt->decode($promotionID)),'order','asc');\t\t\t\t\n\t\t\t$data['catg_uri_string']\t=\t$data['promotionInfo']->uri_string;\n\t\t\t$data['catgTitle']\t\t\t=\tstripslashes(ucwords($data['promotionInfo']->title));\n\t\t\t$data['hdnPromotionID']\t\t=\t$catgId;\n\t\t\t$this->session->unset_userdata('post_promotionFieldData');\n\t\t\t$this->load->view('templates/admincp/header', $data);\n\t\t\t$this->load->view('admincp/promotion/form', $data);\n\t\t}", "function edit_staff_category($id=NULL) \r\n {\r\n // Basis: To simplify THIRRA system, staff_category name === system_category name\r\n $data['offline_mode']\t\t=\t$this->config->item('offline_mode');\r\n $data['debug_mode']\t\t =\t$this->config->item('debug_mode');\r\n\t\t$data['user_rights'] = $this->mthirra->get_user_rights($_SESSION['username']);\r\n $data['breadcrumbs'] = breadcrumbs('ehr_admin/admin_mgt','Admin','ehr_admin/admin_list_staffcategories','List Staff Categories'); \r\n\t\t$data['form_purpose'] = $this->uri->segment(3);\r\n\t\t$data['category_id'] = $this->uri->segment(4);\r\n\t\t$data['title'] = \"Add New / Edit Staff Category\";\r\n $data['now_id'] = time();\r\n //$data['now_date'] = date(\"Y-m-d\",$data['now_id']);\r\n //$data['now_time'] = date(\"H:i\",$data['now_id']);\r\n\t\t$data['users_list'] = $this->madmin_rdb->get_users_list();\r\n $data['systemuser_categories'] = $this->madmin_rdb->get_systemuser_categories();\r\n \r\n if(count($_POST)) {\r\n // User has posted the form\r\n $data['category_id'] = $this->input->post('category_id');\r\n $data['category_name'] = $this->input->post('category_name');\r\n $data['description'] = $this->input->post('description');\r\n $data['init_access_patients'] = $this->input->post('access_patients');\r\n $data['init_access_pharmacy'] = $this->input->post('access_pharmacy');\r\n $data['init_access_orders'] = $this->input->post('access_orders');\r\n $data['init_access_queue'] = $this->input->post('access_queue');\r\n $data['init_access_reports'] = $this->input->post('access_reports');\r\n $data['init_access_utilities'] = $this->input->post('access_utilities');\r\n $data['init_access_admin'] = $this->input->post('access_admin');\r\n } else {\r\n // First time form is displayed\r\n if ($data['form_purpose'] == \"new_category\") {\r\n // New user\r\n\t\t $data['category_info'] = array();\r\n $data['category_id'] = \"new_category\";\r\n $data['category_name'] = \"\";\r\n $data['description'] = \"\";\r\n $data['init_access_patients'] = \"\";\r\n $data['init_access_pharmacy'] = \"\";\r\n $data['init_access_orders'] = \"\";\r\n $data['init_access_queue'] = \"\";\r\n $data['init_access_reports'] = \"\";\r\n $data['init_access_utilities'] = \"\";\r\n $data['init_access_admin'] = \"\";\r\n } else {\r\n // Existing user\r\n\t\t $data['category_info'] = $this->madmin_rdb->get_one_staffcategory($data['category_id']);\r\n $data['category_id'] = $data['category_info']['category_id'];\r\n $data['category_name'] = $data['category_info']['category_name'];\r\n $data['description'] = $data['category_info']['description'];\r\n $data['sys_category_id']= $data['category_info']['sys_category_id'];\r\n $data['permission'] = $data['category_info']['permission'];\r\n $data['access_rights'] = $this->get_user_rights($data['permission']);\r\n $data['access_rights']['permission'] = $data['permission'];\r\n $data['init_access_patients'] = $data['access_rights']['section_patients'];\r\n $data['init_access_pharmacy'] = $data['access_rights']['section_pharmacy'];\r\n $data['init_access_orders'] = $data['access_rights']['section_orders'];\r\n $data['init_access_queue'] = $data['access_rights']['section_queue'];\r\n $data['init_access_reports'] = $data['access_rights']['section_reports'];\r\n $data['init_access_utilities'] = $data['access_rights']['section_utilities'];\r\n $data['init_access_admin'] = $data['access_rights']['section_admin'];\r\n } //endif ($data['form_purpose'] == \"new_category\")\r\n } //endif(count($_POST))\r\n \r\n\t\t$this->load->vars($data);\r\n // Run validation\r\n\t\tif ($this->form_validation->run('edit_staff_category') == FALSE){\r\n // Return to incomplete form\r\n if ($_SESSION['thirra_mode'] == \"ehr_mobile\"){\r\n $new_header = \"ehr/header_xhtml-mobile10\";\r\n $new_banner = \"ehr/banner_ehr_wap\";\r\n $new_sidebar= \"ehr/sidebar_ehr_admin_wap\";\r\n //$new_body = \"ehr/emr_edit_systemuser_wap\";\r\n $new_body = \"ehr/ehr_admin_edit_staff_category_html\";\r\n $new_footer = \"ehr/footer_emr_wap\";\r\n } else {\r\n //$new_header = \"ehr/header_xhtml1-strict\";\r\n $new_header = \"ehr/header_xhtml1-transitional\";\r\n $new_banner = \"ehr/banner_ehr_html\";\r\n $new_sidebar= \"ehr/sidebar_emr_admin_html\";\r\n $new_body = \"ehr/ehr_admin_edit_staff_category_html\";\r\n $new_footer = \"ehr/footer_emr_html\";\r\n }\r\n if($data['user_rights']['section_admin'] < 100){\r\n $new_body = \"ehr/ehr_access_denied_html\";\r\n }\r\n $this->load->view($new_header);\t\t\t\r\n $this->load->view($new_banner);\t\t\t\r\n $this->load->view($new_sidebar);\t\t\t\r\n $this->load->view($new_body);\t\t\t\r\n $this->load->view($new_footer);\t\t\t\r\n } else {\r\n //echo \"\\nValidated successfully.\";\r\n //echo \"<pre>\";\r\n //print_r($data);\r\n //echo \"</pre>\";\r\n //echo \"<br />Insert record\";\r\n // Generate permission\r\n $data['rights_decimal'] = 0;\r\n if(is_numeric($data['init_access_admin'])){ \r\n $data['rights_decimal'] += 1;\r\n }\r\n if(is_numeric($data['init_access_reports'])){ \r\n $data['rights_decimal'] += 2;\r\n }\r\n if(is_numeric($data['init_access_pharmacy'])){ \r\n $data['rights_decimal'] += 4;\r\n }\r\n if(is_numeric($data['init_access_orders'])){ \r\n $data['rights_decimal'] += 8;\r\n }\r\n if(is_numeric($data['init_access_patients'])){ \r\n $data['rights_decimal'] += 16;\r\n }\r\n if(is_numeric($data['init_access_queue'])){ \r\n $data['rights_decimal'] += 32;\r\n }\r\n /* Finance and Billing \r\n if(is_numeric($data['init_access_patients'])){ \r\n $data['rights_decimal'] += 64;\r\n }\r\n if(is_numeric($data['init_access_patients'])){ \r\n $data['rights_decimal'] += 128;\r\n }\r\n */\r\n if(is_numeric($data['init_access_utilities'])){ \r\n $data['rights_decimal'] += 256;\r\n }\r\n if($data['form_purpose'] == \"new_category\") {\r\n // Insert records\r\n $ins_cate_array['category_id'] = $data['now_id'];\r\n $ins_cate_array['category_name'] = $data['category_name'];\r\n $ins_cate_array['description'] = $data['description'];\r\n $ins_cate_array['permission'] = $data['rights_decimal'];\r\n //echo \"data['rights_decimal']\".$data['rights_decimal'];\r\n $ins_user_data = $this->madmin_wdb->insert_new_staffcategory($ins_cate_array);\r\n $this->session->set_flashdata('data_activity', 'Staff category added.');\r\n } else {\r\n // Update records\r\n $upd_cate_array['category_id'] = $data['category_id'];\r\n $upd_cate_array['category_name'] = $data['category_name'];\r\n $upd_cate_array['description'] = $data['description'];\r\n $upd_cate_array['permission'] = $data['rights_decimal'];\r\n //echo \"data['rights_decimal']\".$data['rights_decimal'];\r\n $upd_user_data = $this->madmin_wdb->update_staffcategory($upd_cate_array);\r\n $this->session->set_flashdata('data_activity', 'Staff category updated.');\r\n } //endif($data['form_purpose'] == \"new_category\")\r\n $new_page = base_url().\"index.php/ehr_admin/admin_list_staffcategories\";\r\n header(\"Status: 200\");\r\n header(\"Location: \".$new_page);\r\n } //endif ($this->form_validation->run('edit_staff_category') == FALSE)\r\n }", "public function edit_postAction() {\r\n\t\t$info = $this->getPost(array('id', 'sort', 'title', 'img', 'status', 'hits'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$ret = Game_Service_Category::updateCategory($info, intval($info['id']));\r\n\t\tif (!$ret) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功.'); \t\t\r\n\t}", "public\n\tfunction edit( $id ) {\n\t\t$parent = Category::all();\n\t\t$subcat = Subcategory::all();\n\t\t$cat = Grandcategory::find( $id );\n\t\treturn view( \"admin.grandcategory.edit\", compact( \"cat\", 'parent', 'subcat' ) );\n\t}", "public function edit($id){\n\n //\n\n $categories = Category::pluck('name', 'id')->all();\n $category = Category::find($id);\n\n $sub_categories = Category::where(['parent_id' => $id])->orderBy('id', 'desc')->get();\n\n\n return view(\"admin.category.edit\", compact( 'categories','category','sub_categories'));\n\n }", "public function edit($category)\n { $categories=Category::all();\n $category = Category::find($category);\n return view('admin.category.edit',compact('category','categories'));\n }", "public function usecases_edit(Request $request) {\n $id = $request->id;\n $redirectFrom = \"\";\n if(isset($request->redirectfrom)){\n $redirectFrom = $request->redirectfrom;\n }\n $categories = Community::where('status',1)->get(); \n $board = Article::where('articleIdx', $id)->first();\n if(!$board){\n Session::flash('flash_error', 'Record you are looking to edit is not found or deleted.');\n return back();\n } \n $categoriesName = Community::where('communityIdx', $board->communityIdx)->get()->first();\n $communityNameLabel = \"\";\n if($categoriesName){\n $communityNameLabel = $categoriesName->communityName;\n }\n\n \n if(isset($request->redirectfrom)){\n Session::put('menu_item_parent', 'home');\n Session::put('menu_item_child', 'top_use_cases');\n }else{\n Session::put('menu_item_parent', 'usecases');\n Session::put('menu_item_child', $board->communityIdx);\n }\n \n Session::put('menu_item_child_child', '');\n\n $statusList = array(\n 0 => 'Unpublish',\n 1 => 'Publish'\n );\n\n $communityIdx = $board->communityIdx;\n $data = array( 'categories', 'id', 'board', 'communityIdx', 'statusList', 'communityNameLabel','redirectFrom');\n return view('admin.usecases_edit', compact($data));\n }", "public function edit(Category $category): View\n {\n// $category-;\n return view('admin.categories.edit', compact('category'));\n }", "public function edit($id)\n {\n $cat= MenuCategories::find($id);\n return view(\"dashboard.pages.supervisor.category.edit\", [ 'cat'=>$cat]);\n \n }", "public function edit(booksCategory $booksCategory)\n {\n //\n }", "public function edit(booksCategory $booksCategory)\n {\n //\n }", "public function edit_kategori(){\r\n $kategori['id_kategori'] = $this->uri->segment(4);\r\n $data = array(\r\n 'form_nama' => 'Edit Data Kategori Menu',\r\n 'komponen' => 'action',\r\n 't_kategori' => $this->Model_kategori->tampil_kategori($kategori),\r\n );\r\n $this->load->view('ini_user/header', $data, FALSE);\r\n $this->load->view('ini_user/menu');\r\n $this->load->view('ini_user/edit_kategori');\r\n $this->load->view('ini_user/footer');\r\n }", "public function createOrEdit($interview_category_id = NULL)\r\n {\r\n $interview_category = objToArr($this->AdminInterviewCategoryModel->get('interview_category_id', $interview_category_id));\r\n echo $this->load->view('admin/interview-categories/create-or-edit', compact('interview_category'), TRUE);\r\n }", "function action_edit($params) {\n $form_error =false;\n $category= model_category::load_by_id($params[0]);\n $id =$params[0];\n if(isset($_POST['form']['action1'])) {\n //Check if the \"Ok\" button is set.\n\n //Modify category name.\n if( model_category::editC($id,$_POST['form']['name'])){\n header('Location: ' . APP_URL . 'category/list');\n die;\n\n }\n $form_error =false;\n }\n if(isset($_POST['form']['action2'])) {\n @include_once APP_PATH . 'view/category_edit.tpl.php';\n }\n @include_once APP_PATH . 'view/category_edit.tpl.php';\n }", "public function edit() {\n\t\t$id = $this->input->get('id');\n\t\t$data = $this->kategori_m->get_by(array('id' => $id));\n\t\t$kode_induk = $data->kode_induk_kategori;\n\t\tif (!is_null($kode_induk)) {\n\t\t\t$id_induk = $this->kategori_m->get_by(array('kode_kategori' => $kode_induk))->id;\n\t\t\t$data->id_induk = $id_induk;\n\t\t} else {\n\t\t\t$data->id_induk = \"\";\n\t\t}\n\t\t$this->printOptionOnCombobox($data, $id);\n\t\techo json_encode($data);\n\t}", "public function edit($id_category){\n $category = \\App\\Models\\Category::find($id_category); // find the id and save it to variable category\n return view('category/edit', ['category' => $category]);\n }", "public function editworkout($id)\n {\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n $workout = Workout::find($id);\n return view('admin.editworkout')->with('workout',$workout);\n }\n\n else{\n Session::flash('danger','You are not authorize to view this page');\n return redirect()->back();\n }\n }", "public function editAction()\n {\n $form = $this->getServiceLocator()->get('civcontent_category_form');\n \n // Grab copy of the existing entity\n $id = $this->params()->fromRoute('categoryid');\n $category = $this->getContentService()->getCategoryById($id);\n if (!$category)\n {\n $this->getResponse()->setStatusCode(404);\n return;\n }\n $form->bind($category);\n \n // Check if the request is a POST.\n $request = $this->getRequest();\n if ($request->isPost())\n {\n $data = (array) $request->getPost();\n $form->setData($data);\n if ($form->isValid())\n {\n // Persist changes.\n $this->getContentService()->persistCategory($category);\n \n // Redirect to content categories\n return $this->redirect()->toRoute('content/category', array(\n 'action' => 'index'\n ));\n }\n }\n \n // If a GET request, or invalid data then render/re-render the form\n return new ViewModel(array(\n 'form' => $form,\n 'id' => $id\n ));\n }", "public function editCategory($id){\n\t\t $categoryById = Category::find($id);\n\t\treturn view('admin.category.editCategory', ['categoryById'=>$categoryById]);\n\t}", "public function do_edit(Request $request,$id){\n\t\t$cat = new category();\n\t\t$c_name = $request->get(\"c_name\");\n\t\t// Sua ban ghi\n\t\t$cat->where(\"pk_category_news_id\",\"=\",$id)->update(array(\"c_name\"=>$c_name));\n\t\treturn redirect(url('admin/category-news'));\n\t}", "public function edit(CampaignCategory $campaignCategory)\n {\n //\n }", "function editMainCategory()\n\t{ \n\t\t$id=$_GET['prodid'];\n\n\t\tif(((int)$id)>0)\n\t\t{\n\t\t\t$sql='select * from products_table where product_id='.$id;\n\t\t\t\n\t\t\t$obj=new Bin_Query();\n\t\t\t\n\t\t\t$obj->executeQuery($sql);\n\t\t\t\n\t\t\t$sqlid=\"SELECT category_id,category_parent_id FROM category_table where category_id in(select category_id from products_table where category_id='\".$obj->records[0]['category_id'].\"')\";\n\t\t\t\n\t\t\t$query=new Bin_Query();\n\t\t\t\n\t\t\t$query->executeQuery($sqlid);\n\t\t\t\n\t\t\t$sql1 = \"SELECT category_id,category_name FROM category_table where category_parent_id=0\";\n\t\t\n\t\t\t$query1 = new Bin_Query();\n\t\t\n\t\t\t$query1->executeQuery($sql1);\n\t\t\n\n\t\t\treturn Display_DManageProducts::displayCategory($query1->records,$query->records[0]['category_id']);\n\t\t\t\n\t\t// \t\t\treturn $category;\n\t }\n\t}", "public function change()\n\t{\n\t\t$result = $this->helper_categories_model->getCategories();\n\t\t$this->template\n\t\t\t->title('您期望添加到哪个分类')\n\t\t\t->set_layout(FALSE)\n\t\t\t->set('data', $result)\n\t\t\t->build('admin/helper/change');\n\t}", "public function editAction() {\n $this->_helper->layout->setLayout('admin-simple');\n\n if (!($category_id = $this->_getParam('category_id'))) {\n die('No identifier specified');\n }\n\n //FETCH PARAMETERS ACCORDING TO THIS CATEGORY\n $reviewCategories = Engine_Api::_()->getDbtable('reviewcats', 'sitestorereview')->reviewParams($category_id);\n\n //GENERATE A FORM\n $form = $this->view->form = new Sitestorereview_Form_Admin_Ratingparameter_Edit();\n $form->setAction($this->getFrontController()->getRouter()->assemble(array()));\n\n $form->setField($reviewCategories->toArray());\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $values = $form->getValues();\n\n foreach ($values as $key => $value) {\n $reviewcat_id = explode('reviewcat_name_', $key);\n $reviewcat = Engine_Api::_()->getItem('sitestorereview_reviewcat', $reviewcat_id[1]);\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try {\n //EDIT CATEGORY NAMES\n $reviewcat->reviewcat_name = $value;\n $reviewcat->save();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array('')\n ));\n }\n\n $this->renderScript('admin-ratingparameter/edit.tpl');\n }" ]
[ "0.69934815", "0.6759673", "0.6755315", "0.67062914", "0.67001015", "0.66443294", "0.6574874", "0.6564783", "0.65390974", "0.6490522", "0.64873505", "0.647618", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.64410436", "0.64198166", "0.6394625", "0.6342839", "0.6332312", "0.63064176", "0.6305494", "0.6294862", "0.6294578", "0.6278874", "0.62596524", "0.6256396", "0.62302756", "0.6226818", "0.61820287", "0.61801076", "0.6179137", "0.6177419", "0.6166496", "0.61542225", "0.6152373", "0.6150362", "0.61437696", "0.61378413", "0.61369777", "0.6115803", "0.6115598", "0.6106303", "0.60887045", "0.6084807", "0.6070163", "0.6066431", "0.6056242", "0.60487545", "0.6036342", "0.60275185", "0.6024253", "0.6009182", "0.6006563", "0.6005466", "0.5986246", "0.5969754", "0.5964397", "0.5963657", "0.59606266", "0.5952755", "0.5950819", "0.5925346", "0.5925256", "0.5922287", "0.59149224", "0.5912367", "0.59077436", "0.59077436", "0.5901977", "0.59014815", "0.5890373", "0.58891964", "0.5887803", "0.58857894", "0.58747405", "0.5871782", "0.5871351", "0.58705825", "0.58682793", "0.5864107", "0.5862324" ]
0.7222749
0
/edit workout category Function for update form
Функция для обновления формы категории тренировки
public function updateworkoutcategory(Request $request) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $this->validate($request,array( 'name' => 'required', )); $id = $request->id; $workoutCategory = Category::find($id); $workoutCategory->Category = $request->name; $workoutCategory->save(); Session::flash('success','Workout Category Updated succcessfully.'); return redirect()->back()->with('workout',$workoutCategory); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Workout $workout)\n {\n //\n }", "function product_category_edit(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u, $fs;\n\t\t\n\t\t$data = $_r['data'];\n\t\t$data['id'] = $_r['id'];\n\t\t\n\t\tif($data['save'] || $data['apply']){\n\t\t\tif(!$data['title']) $error['title'] = true;\n\t\t\tif(count($error)==0){\n\t\t\t\t$set = array();\n\t\t\t\t$set[] = \"title = '\".add_slash($data['title']).\"'\";\n\t\t\t\t$set[] = \"language_id = '1'\";\n\t\t\t\t$set[] = \"category_id = '0'\";\n\t\t\t\t\n\t\t\t\t$set = implode(', ', $set);\n\t\t\t\tif($data['id']){\n\t\t\t\t\tmysql_q(\"UPDATE product_category SET $set WHERE id = '\".add_slash($data['id']).\"'\");\n\t\t\t\t} else {\n\t\t\t\t\t$data['id'] = mysql_q(\"INSERT INTO product_category SET $set\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($data['save']){\n\t\t\t\t\tredirect(\"product_category.htm\", \"\");\n\t\t\t\t} else{\n\t\t\t\t\tredirect(\"product_category-edit-\".$data['id'].\".htm\", \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else if($data['cancel']) {\n\t\t\tredirect(\"product_category.htm\", \"\");\n\t\t}\n\n\t\t$fields = \"\n\t\t[hidden name='id']\n\t\t[input name='title' label='Category Title' error='Please Enter Category Title']\n\t\t[sac class='']\n\t\t\";\n\t\t\n\t\tif(!$data['save'] && $data['id']){\n\t\t\t$data = mysql_q(\"SELECT * FROM product_category WHERE id='\".add_slash($data['id']).\"'\", \"single\");\n\t\t}\n\n\t\t$tpl->assign(\"data\", $data);\n\t\t\n\t\t$form = new form();\n\t\t$form->add($fields);\n\t\t$tpl->assign(\"form1\", $form->build());\n\t\t\n\t\t$main['content'] = $tpl->fetch(\"admin_product_category_edit.tpl\");\n\t\tdisplay($main);\n\t}", "function edit_category() {\r\n\r\n\tif(isset($_POST['editcategory'])){\r\n\r\n\t\t$cat_id\t\t\t\t= clean_input($_GET['cat_id']);\r\n\t\t$cat_name \t\t\t= clean_input($_POST['cat_name']);\r\n\t\t$cat_desc_short \t= clean_input($_POST['cat_desc_short']);\r\n\t\t$cat_desc_long \t\t= clean_input($_POST['cat_desc_long']);\r\n\t\t$cat_parent_id \t\t= clean_input($_POST['cat_parent_id']);\r\n\t\t$cat_url \t\t\t= clean_input($_POST['cat_url']);\r\n\t\t$cat_date \t\t\t= clean_input($_POST['cat_date']);\r\n\t\t$cat_mod \t\t\t= clean_input($_POST['cat_mod']);\r\n\t\t$page_template \t\t= clean_input($_POST['page_template']);\r\n\t\t$cat_mod_by \t\t= clean_input($_SESSION['userid']);\r\n\t\t$cat_meta_title \t\t\t= clean_input($_POST['cat_meta_title']);\r\n\t\t$cat_meta_keywords \t\t\t= clean_input($_POST['cat_meta_keywords']);\r\n\t\t$cat_meta_description \t\t= clean_input($_POST['cat_meta_description']);\r\n\t\t$insert_keywords\t \t\t= clean_input($_POST['insert_keywords']);\t\t\t\r\n\r\n\t\t$xyquery = \"UPDATE categories SET \";\r\n\t\t$xyquery .= \"cat_name = '$cat_name',\";\r\n\t\t$xyquery .= \"cat_desc_short = '$cat_desc_short'\";\r\n\t\t$xyquery .= \",cat_desc_long = '$cat_desc_long'\";\r\n\t\t$xyquery .= \",cat_parent_id = '$cat_parent_id'\";\r\n\t\t$xyquery .= \",cat_url = '$cat_url'\";\r\n\t\t$xyquery .= \",cat_mod = '$cat_mod'\";\r\n\t\t$xyquery .= \",cat_mod_by = '$cat_mod_by'\";\r\n\t\t$xyquery .= \",page_template = '$page_template'\";\r\n\t\t$xyquery .= \",cat_meta_title = '$cat_meta_title'\";\r\n\t\t$xyquery .= \",cat_meta_keywords = '$cat_meta_keywords'\";\r\n\t\t$xyquery .= \",cat_meta_description = '$cat_meta_description'\";\r\n\t\t$xyquery .= \",insert_keywords = '$insert_keywords'\";\t\t\t\t\r\n\t\t$xyquery .= \"WHERE cat_id = '$cat_id'\";\r\n\r\n\t\t$xyresult = mysql_query($xyquery) or die(mysql_error());\r\n\r\n\t\t//echo \"<center><h4>The category \".$cat_name.\" been edited!</h4></center>\";\r\n?>\r\n<script>\r\n$(document).ready(function() {\r\n\t$(\"<p>NOTICE:</p><p>The category <?= $cat_name;?> has been modified.</p>\").appendTo(\"#xyalert\");\r\n\t$(\"#xyalert\").fadeIn(200).delay(1500).fadeOut(200);\r\n});\r\n</script>\r\n<?\r\n\t\treturn $xyresult;\r\n\t}\r\n}", "function edit_category($tbl_name){\n\t\t//print_r($_POST); die;\n\t\tunset($_POST['submitLog']);\n\t\t$this->db->where('id', $_POST['id']);\n\t\tunset($_POST['id']);\n\t\t$this->db->update($tbl_name,$_POST);\n\t\t// print_r($this->db->last_query());\n\t // die();\n\t}", "public function updateCate()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$category = $_POST['upcategory'];\n\t\t\t$category_id = $_POST['upcategory_id'];\n\t\t\t$sql = \" update lib_book_species set category = '{$category}' where category in \n\t\t\t\t\t(select category from lib_category where category_id = {$category_id});\n\t\t\t\t\tupdate lib_category set category='\" . $category . \"' where category_id='\" . $category_id . \"';\n\t\t\t\t\t\";\n\t\t\t$cate = D('Category');\n\t\t\t$return = $cate->execute($sql);\n\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'Modify successfully!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'SQL Error!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function editPost()\n {\n if (!$this->auth->isLogged()) {\n $this->view->redirect(\"/user/login\", \"You can not add new categories if you are not logged in!\");\n }\n\n if (!$this->auth->isInRole(\"admin\")) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not Admin!\");\n }\n\n if ($this->input->post(\"edit_category\") === null){\n $this->view->redirect(\"/categories/manage\");\n }\n\n if (empty($this->input->get(0,\"int\"))){\n $this->view->redirect(\"/categories/manage\");\n }\n\n $categoryId = $this->input->get(0,\"int\");\n\n $categoryName = $this->input->post(\"name\");\n\n $categoryModel = new CategoriesModel();\n\n try{\n if (!$categoryModel->existCategoryId($categoryId)){\n $this->view->redirect(\"/categories/manage\",\"This categories do not exist!\");\n }\n\n if ($categoryModel->editCategory($categoryName, $categoryId)){\n $this->view->redirect(\"/categories/manage\",\"Category edited successfully!\",\"success\");\n } else {\n $this->view->redirect(\"/categories/manage\",\"You did not change anything ?\");\n }\n\n }catch (\\Exception $exception) {\n $this->view->redirect(\"/categories/manage\", $exception->getMessage());\n }\n }", "public function editworkoutcategory($id)\n {\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n $workout = Category::find($id);\n return view('admin.editworkoutcategory')->with('workout',$workout);\n }\n\n else{\n Session::flash('danger','You are not authorize to view this page');\n return redirect()->back();\n }\n }", "public function update_assets_category() {\n\t\n\t\tif($this->input->post('edit_type')=='assets_category') {\t\t\n\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t$Return = array('result'=>'', 'error'=>'', 'csrf_hash'=>'');\n\t\t\t\n\t\t$id = $this->uri->segment(4);\n\t\t$Return['csrf_hash'] = $this->security->get_csrf_hash();\n\t\t\t\n\t\t/* Server side PHP input validation */\t\t\n\t\tif($this->input->post('name')==='') {\n \t$Return['error'] = $this->lang->line('xin_error_cat_name_field');\n\t\t}\n\t\t\t\t\t\t\n\t\tif($Return['error']!=''){\n \t\t$this->output($Return);\n \t}\n\t\t\n\t\t// set data\n\t\t$data = array(\n\t\t'category_name' => $this->input->post('name')\n\t\t);\n\t\t\n\t\t$result = $this->Assets_model->update_assets_category_record($data,$id);\n\t\tif ($result == TRUE) {\n\t\t\t$Return['result'] = $this->lang->line('xin_success_assets_category_updated');\n\t\t} else {\n\t\t\t$Return['error'] = $this->lang->line('xin_error_msg');\n\t\t}\n\t\t$this->output($Return);\n\t\texit;\n\t\t}\n\t}", "public function edit_category() {\n $data['pageName'] = $this->pageName . ' : Edit Category';\n $get = $this->uri->uri_to_assoc();\n \n //If no id found\n if(!isset($get['id'])){\n $this->session->set_flashdata('info_message', '<span class=\"error-alert\">No content found</span>');\n redirect('admin/static_pages/home', \"location\");\n exit();\n }\n \n $category_id = $get['id'];\n $where_clause = array('category_id' => $category_id);\n $categoryRS = $this->User_model->get_category($where_clause);\n\n\n if (!$categoryRS) {\n $this->session->set_flashdata('info_message', '<span class=\"error-alert\">Content not available. Please try again later.</span>');\n redirect('admin/category/home', \"location\");\n exit();\n }\n \n $category = $categoryRS[0];\n $data['category'] = $category;\n \n //After posting save data\n if(isset($_POST['category_id']) && !empty($_POST['category_id'])) {\n \n $pst_category_id = addslashes($_POST['category_id']);\n $isCategoryAdded = $this->User_model->update_category($pst_category_id);\n \n if(!$isCategoryAdded) {\n $this->session->set_flashdata('info_message', '<span class=\"error-alert\">Unable to update the record</span>');\n }\n else{\n $this->session->set_flashdata('info_message', 'Record updated successfull!');\n redirect('admin/category/home', \"location\");\n }\n }\n $this->load->view('admin/category/edit_view', $data); \n }", "function edit(category $category)\n {\n $query = \"UPDATE categories SET name = '$category->name', \n tag = '$category->tag', description = '$category->description', slug = '$category->slug', active = '$category->active' WHERE categories_id = $category->category_id\";\n $result = $this->db->update($query);\n }", "public function updateNutrationCategory(Request $request)\n {\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n\n $this->validate($request,array(\n 'name' => 'required',\n 'tips' => 'required',\n ));\n $id = $request->id;\n $nutrationCategory = NutrationCategory::find($id);\n $nutrationCategory->nutration_category_name = $request->name;\n $nutrationCategory->tips = $request->tips;\n $nutrationCategory->save();\n Session::flash('success','Nutration Category Updated succcessfully.');\n return redirect()->back()->with('workout',$nutrationCategory);\n }\n\n else{\n Session::flash('danger','You are not authorize to view this page');\n return redirect()->back();\n }\n }", "public function updateForm()\n{\n\n $listeCatgories = $this->model->getCategories();\n $new = $this->model->getNew();\n $this->view->updateForm($new,$listeCatgories);\n}", "public function edit(Postcategory $postcategory)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit()\n {\n if (!$this->auth->isLogged()) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not logged in!\");\n }\n if (!$this->auth->isInRole(\"admin\")) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not Admin!\");\n }\n\n if (empty($this->input->get(0,\"int\"))){\n $this->view->redirect(\"/categories/manage\");\n }\n\n $categoryId = $this->input->get(0,\"int\");\n\n $categoryModel = new CategoriesModel();\n try{\n\n if (!$categoryModel->existCategoryId($categoryId)){\n $this->view->redirect(\"/categories/manage\",\"This categories do not exist!\");\n }\n $categoryName = $categoryModel->getCategoryNameById($categoryId);\n\n $this->view->render(\"admin/categories/edit\",[\n \"name\"=> $categoryName,\n \"id\"=> $categoryId\n ]\n );\n\n } catch (\\Exception $exception){\n $this->view->redirect(\"/categories/manage\",$exception->getMessage());\n }\n\n }", "public function editCategory($editCategory) {\n if (isset($editCategory)) {\n\n $data = array(\n 'name' => $editCategory['name'],\n 'support_emails' => $editCategory['support_emails'],\n 'quantity_enabled' => $editCategory['quantity_enabled']\n );\n \n if (isset($editCategory['supplier_user'])) {\n $data['supplier_user'] = $editCategory['supplier_user'];\n }\n \n if (isset($editCategory['custom_fields'])) {\n $data['custom_fields'] = $editCategory['custom_fields'];\n } else {\n $data['custom_fields'] = NULL;\n }\n $this->db->where('id', $editCategory['category_id']);\n $this->db->update('categories', $data);\n return TRUE;\n } else {\n return False;\n }\n }", "function editWorkOption(){\n\n if($this->session->has_userdata('userId')){\n\n if(! $this->_isUserAdmin()){\n\n $this->deniedAccess();\n }else{\n\n $workOptionId = $this->uri->segment(2);\n $this->Work_option_model->updateWorkOption($workOptionId);\n\n redirect(site_url('manage-work-options'));\n }\n }\n else{\n\n //redirect to home page\n redirect(site_url());\n }\n }", "public function edit(Category $category) {\n //not implemented\n }", "function editCategory($category, $id) {\n $data = [\n 'name' => $_POST['name'],\n 'description' => $_POST['description']\n ];\n\n $stmt = $category->update($id, $data);\n header('location: confirm.php?action=Category&type=update&query='.$stmt);\n}", "public function edit(TripCategory $tripCategory)\n {\n //\n }", "function category_edit($id)\n\t{\n\t\tglobal $db;\n\t\t$ccnoprice = $_POST['ccnoprice'];\n\t\t$sSQL = \"UPDATE \".PREFIX.\"categories SET ccnoprice='\".$ccnoprice.\"', ccTemplate='\".mysql_real_escape_string($_POST['ccTemplate']).\"' WHERE id=\".$id;\n\t\t$db->query($sSQL);\n\t}", "public function editCategory()\r\n{\r\n $query_string = \"UPDATE categories \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"categoryname = :categoryname, \";\r\n $query_string .= \"categorydescription = :categorydescription \";\r\n $query_string .= \"WHERE categoryid = :categoryid\";\r\n\r\n return $query_string;\r\n}", "public function formModify() {\n $categories=$this->model->listCategories();\n $this->view->display(\"view/form/ProductFormModify.php\", NULL, $categories); \n }", "public function update(Request $request, Postcategory $postcategory)\n {\n //\n }", "public function update()\n {\n $model = $this->model()::findOrFail(request('_id'));\n $data = array_merge(request()->all(), ['slug' => request('name')]);\n $category = $model->update($data);\n return redirect()->route('admin.'.$this->table().'.index');\n }", "public function modifyCategory(){\n $cookies = new CookieModel();\n $cookie_id = $cookies -> read();\n if (! $cookie_id) $this->redirect('/');\n\n\t\t$id = $_REQUEST['id'];\t\t\n\t\t$name = $_REQUEST['name'];\n\t $remark = $_REQUEST['remark'];\n $father = $_REQUEST['father'];\n\t\t$form = M('categoryinfo');\n \t//$key = 2;\n \t$condition['id'] = $id;\n \t$data = $form->where($condition)->find();\n \t//var_dump($data); \n $data['id'] = $id;\n \t$data['name'] = $name;\n\t\t$data['remark'] = $remark;\n $data['father'] = $father;\n \t//echo $data;\n\t\t$result = $form->save($data);\n\t\t$this->redirect('/index.php/Admin/dish');\n\t\t\t\t\t\t//\telse {$this->error('修改失败');}\n\t\t}", "public function edit(Category $Category)\n {\n //\n }", "public function edit_category($category) {\n $this->category();\n $categories_sql_string = \"SELECT * FROM category WHERE id = \" . $category . \" limit 1\";\n $connection = new Database(\"sbrettsc_db\");\n $menu_array = $connection->get_array_from_query($categories_sql_string);\n $data = array(\"menu_array\" => array_shift($menu_array));\n\n $this->loadView(\"editors/category_editor\", $data);\n }", "function editAction()\n\t{\n global $langCode;\n\t\t$id = (int)$this->registry->router->getArg('id');\n\t\t$myProductCat = new Core_ProductCategory($id);\n\t\t\n\t\t$redirectUrl = $this->getRedirectUrl();\n\t\tif($myProductCat->id > 0)\n\t\t{\n\t\t\t$error \t\t= array();\n\t\t\t$success \t= array();\n\t\t\t$contents \t= '';\n\t\t\t$formData \t= array();\n\t\t\t //Truyen du lieu hien co vao form\n\t\t\t$formData['fbulkid'] = array();\n\t\t\t$formData['fid'] = $myProductCat->id;\n\t\t\t$formData['fname'] = $myProductCat->name;\n\t\t\t$formData['forder'] = $myProductCat->order;\n\t\t\t$formData['fparentid'] = $myProductCat->parentid;\n\t\t\t$formData['fenable'] = $myProductCat->enable;\n\t\t\t$formData['fseourl'] = $myProductCat->seoUrl;\n\t\t\t$formData['fseotitle'] = $myProductCat->seoTitle;\n\t\t\t$formData['fseokeyword'] = $myProductCat->seoKeyword;\n\t\t\t$formData['fseodescription'] = $myProductCat->seoDescription;\n\t\t\t\n\t\t\tif(!empty($_POST['fsubmit']))//truong hop da nhan nut submit\n\t\t\t{\n if($_SESSION['productcategoryEditToken']==$_POST['ftoken'])//kiem tra token\n {\n $formData = array_merge($formData, $_POST);\n \n if($this->editActionValidator($formData, $error))//kiem tra du lieu co hop le hay khong\n {\n //Cac thong tin khong ngon ngu:\n $myProductCat->order = (int)$formData['forder'];\n $myProductCat->parentid = (int)$formData['fparentid'];\n $myProductCat->enable = (int)$formData['fenable']==1?1:0;\n if(strlen($formData['fseourl']) > 0)\n $myProductCat->seoUrl = Helper::codau2khongdau($formData['fseourl'], true);\n else\n $myProductCat->seoUrl = Helper::codau2khongdau(strip_tags($formData['fname']), true);\n //Cac thong tin lien quan ngon ngu: \n $myProductCat->name = $formData['fname']; \n $myProductCat->seoTitle = $formData['fseotitle'];\n $myProductCat->seoKeyword = $formData['fseokeyword'];\n $myProductCat->seoDescription = $formData['fseodescription'];\n \n if($myProductCat->updateData())//cap nhat database\n {\n $success[] = str_replace('###categoryname###', $myProductCat->name[$langCode], $this->registry->lang['controller']['succUpdate']);\n $this->registry->me->writelog('ProductCategoryedit', $myProductCat->id, array('name' => $myProductCat->name[$langCode], 'order' => $myProductCat->order));\n }\n else\n {\n $error[] = $this->registry->lang['controller']['errUpdate']; \n }\n }\n }\n $_SESSION['productcategoryEditToken'] = Helper::getSecurityToken();//Tao token moi\n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t\t\t$this->registry->smarty->assign(array(\t'formData' \t=> $formData,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'subcategories' => $myProductCat->getSub(true),\n\t\t\t\t\t\t\t\t\t\t\t\t\t'parentCategories' => Core_ProductCategory::getFullCategories(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t'redirectUrl'=> $redirectUrl,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'error'\t\t=> $error,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'success'\t=> $success,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t$contents .= $this->registry->smarty->fetch($this->registry->smartyControllerContainer.'edit.tpl');\n\t\t\t$this->registry->smarty->assign(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'menu'\t\t=> 'productcategorylist',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'pageTitle'\t=> $this->registry->lang['controller']['pageTitle_edit'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'contents' \t\t\t=> $contents));\n\t\t\t$this->registry->smarty->display($this->registry->smartyControllerGroupContainer . 'index.tpl');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$redirectMsg = $this->registry->lang['controller']['errNotFound'];\n\t\t\t$this->registry->smarty->assign(array('redirect' => $redirectUrl,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'redirectMsg' => $redirectMsg,\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t$this->registry->smarty->display('redirect.tpl');\n\t\t}\n\t}", "public function editNutrationCategory($id)\n {\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n $workout = NutrationCategory::find($id);\n return view('admin.editnutrationcategory')->with('workout',$workout);\n }\n\n else{\n Session::flash('danger','You are not authorize to view this page');\n return redirect()->back();\n }\n }", "function shophead_edit($category_id = \"\")\n {\n $this->layout = 'admin_layout';\n $id = base64_decode($category_id);\n // pr($id);\n $this->loadModel('ProductCategory');\n $data = $this->ProductCategory->find('first', array('conditions' => array('ProductCategory.id' => $id)));\n if (!empty($data)) {\n if (!empty($this->request->data)) {\n $this->request->data = Sanitize::clean($this->request->data, array('encode' => false));\n $this->ProductCategory->set($this->request->data);\n if ($this->request->data['ProductCategory']['name'] == $data['ProductCategory']['name']) {\n unset($this->request->data['ProductCategory']['name']);\n }\n if ($this->ProductCategory->validates()) {\n if ($this->ProductCategory->save($this->request->data)) {\n $this->Session->write('flash', array(EDIT_RECORD, 'success'));\n $this->redirect(array('controller' => 'ProductCategories', 'action' => 'index'));\n } else {\n $this->Session->write('flash', array(FAILURE_MSG, 'failure'));\n $this->redirect(array('controller' => 'ProductCategories', 'action' => 'index'));\n }\n }\n }\n $this->request->data = $data;\n } else {\n $this->redirect(array('controller' => 'ProductCategories', 'action' => 'index'));\n }\n }", "public function edit($id)\n {\n $data = $this->Category->findData($id);\n $catalogue = Catelog::get();\n\t\tif($data->in_home==\"on\"){\n\t\t\t$is_Selected=\"checked\";\n\t\t}else{\n\t\t\t$is_Selected=\"\";\n\t\t}\n $html = '<div class=\"form-group error\"></div>\n <label for=\"categories_name\">Name</label>\n <div class=\"form-group\">\n <div class=\"form-line\">\n <input type=\"text\" id=\"editcategories_name\" name=\"categories_name\" value=\"'.$data->categories_name.'\" class=\"form-control\" placeholder=\"Enter your category name\">\n </div>\n </div>\n <label for=\"catelogue_id\">Catalogue</label>\n <div class=\"form-group\">\n <div class=\"form-line\">\n <select class=\"form-control\" id=\"editcatelogue_id\" name=\"catelogue_id\">\n <option value=\"\">-- Please select --</option>';\n foreach($catalogue as $key)\n {\n $status=\"\";\n if($data->catelogue_id==$key->id){\n $status=\"selected\";\n }\n $html .= '<option value=\"'.$key->id.'\" '.$status.'>'.$key->catelogue_name.'</option> ';\n }\n $html .= ' </select>\n </div>\n </div>\n <label for=\"image\">Images</label>\n <div class=\"form-group\">\n <div class=\"form-line\">\n <input type=\"file\" name=\"image_1\" id=\"image_1\" placeholder=\"Choose image\" > \n </div>\n </div>\n <div class=\"form-group\">\n <div class=\"form-line\">\n <img src=\"'.asset('storage/category/'.$data->image).'\" name=\"old_img\" width=\"50px\" height=\"50px\"> \n </div>\n </div>\n <label for=\"description\">Description</label>\n <div class=\"form-group\">\n <div class=\"form-line\">\n <input type=\"text\" id=\"editDescription\" name=\"Description\" value=\"'.$data->description.'\" class=\"form-control\" placeholder=\"Enter your description\">\n </div>\n </div>\n\t\t\t\t <label for=\"description\">Show In Home</label>\n <div class=\"form-group\">\n\t\t\t\t\t\t<input type=\"checkbox\" id=\"in_home\" name=\"in_home\" class=\"form-control\" '.$is_Selected.'>\n\t\t\t\t\t</div>\n <br>\n ';\n return response()->json(['html'=>$html]);\n }", "public function update(Request $request, Workout $workout)\n {\n //\n }", "function edit_category_data($category_id)\n\t{\n\t\t$this->data['title'] \t= 'Edit Portfolio Category Data';\n\t\t$this->data['category']\t= $this->portfolio_model->get_category_by_id($category_id);\n\t\t$this->data['css'] \t\t= 'body/admin/css/form_style_default';\n\t\t$this->data['js'] \t\t= 'body/admin/js/form_style_default';\n\t\t$this->data['content'] \t= 'content/admin/portfolio/edit_category';\n\t\t$this->load->view('body/admin/style_1', $this->data);\n\t}", "public function edit(CourseCategory $courseCategory)\n {\n //\n }", "public function category_update(){ \n\n\n if (!has_role($this->session->userdata('user_id'), 'CATEGORY_UPDATE')) {\n redirect(base_url('page_not_found'));\n }\n\n $data['parent'] = $this->input->post('parent');\n $data['last_modified'] = date(\"Y-m-d H:i:s\");\n $data['name'] = $this->input->post('name');\n \n if(!$this->category_model->is_parent_category($data['parent'])){\n\n $this->session->set_flashdata('category_save_failed', \"Failed to update sub category!!\");\n }else{\n\n \n $category_id = $this->input->post('cat_id');\n\n\n\n\n if($this->category_model->update_category($category_id, $data)){\n\n $this->logger\n ->user($this->session->userdata('user_id')) //Set UserID, who created this Action\n ->user_details($this->user_model->getUserInfoByIpAddress())\n ->type('category_update') //Entry type like, Post, Page, Entry\n ->id($category_id) //Entry ID\n ->token('UPDATE') //Token identify Action\n ->comment($this->session->userdata('name'). ' update a category.')\n ->log(); //Add Database Entry\n\n $this->session->set_flashdata('category_save_success', \"Category information Updated Successfully!!\");\n } else {\n $this->session->set_flashdata('category_save_failed', \"Category update fialied!!\");\n }\n }\n redirect(base_url('categories'));\n }", "function get_category_to_edit($id)\n {\n }", "public function edit(Category $Category)\n {\n echo \"i am in edit\";exit();\n //\n }", "function modifyCategory()\n{\n global $connection;\n global $updateCategorySuccess, $updateCategoryError;\n $updateCategorySuccess = $updateCategoryError = '';\n\n if (isset($_POST['btn_save_category'])) {\n $category_id = $_POST['txt_userid'];\n\n $updateColumncategory = '';\n\n $category_name = htmlentities($_POST['category_name']);\n if (!empty($category_name)) {\n $updateColumncategory .= \"category = '$category_name',\";\n }\n\n $updateColumncategory = rtrim($updateColumncategory, ',');\n\n $query_update = \"UPDATE product_category SET $updateColumncategory WHERE id_category = '$category_id'\";\n $result_update = mysqli_query($connection, $query_update);\n\n if ($result_update) {\n $updateCategorySuccess = '<script language=\"javascript\">\n swal(\"Sukses!\", \"Kategoria u modifikua me sukses!\", \"success\")\n </script>';\n } else {\n $updateCategoryError = '<script language=\"javascript\">\n swal(\"Gabim!\", \"Ka ndodhur një gabim gjatë modifikimit të kategorisë! Provoni përsëri!\", \"error\")\n </script>';\n }\n }\n}", "public function updateProgramCategory(Request $request)\n {\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n\n $this->validate($request,array(\n 'name' => 'required',\n ));\n $id = $request->id;\n $programCategory = ProgramCategory::find($id);\n $programCategory->program_category_name = $request->name;\n $programCategory->tips = $request->tips;\n $programCategory->save();\n Session::flash('success','Program Category Updated succcessfully.');\n return redirect()->back()->with('workout',$programCategory);\n }\n\n else{\n Session::flash('danger','You are not authorize to view this page');\n return redirect()->back();\n }\n }", "public function update()\n {\n $category = CategoryService::load(\\Request::input('id'))->update(\\Request::all());\n \\Msg::success($category->name . ' has been <strong>updated</strong>');\n return redir('account/categories');\n }", "public function edit(AwardCategory $awardCategory)\n {\n //\n }", "public function updateCategory()\n {\n Category::findOrFail($this->category_id)->update([\n 'category_name' => $this->categoryName,\n 'slug' => Str::slug($this->categoryName),\n 'class' => $this->class,\n\n ]);\n }", "public function editCustomField($editCategory) {\n\n if (isset($editCategory)) {\n\n if (isset($editCategory['custom_fields'])) {\n $data['custom_fields'] = $editCategory['custom_fields'];\n } else {\n $data['custom_fields'] = NULL;\n }\n $this->db->where('id', $editCategory['category_id']);\n $this->db->update('categories', $data);\n return TRUE;\n } else {\n return False;\n }\n }", "public function edit($id = NULL){\n\t\tif ($id) {\n\t\t\t$this->data['category'] = $this->category_m->get($id);\n\t\t\tcount($this->data['category']) || $this->data['errors'][] = 'category could not be found';\n\t\t}\n\t\telse {\n\t\t\t$this->data ['category'] = $this->category_m->get_new();\n\t\t}\n\t\t\n\t\t// Set up the form\n\t\t$rules = $this->category_m->rules;\n\t\t$this->form_validation->set_rules($rules);\n\t\t\n\t\t// Process the form\n\t\tif ($this->form_validation->run() == TRUE) {\n\t\t\t$data = $this->category_m->array_from_post(array(\n\t\t\t\t'title', \n\t\t\t\t'description', \n\t\t\t\t'items_style'\n\t\t\t\t\n\t\t\t));\n\t\t\t$this->category_m->save($data, $id);\n\t\t\tredirect('admin/category');\n\t\t}\n\t\t\n\t\t$this->data['subview'] ='admin/category/edit';\n\t $this->load->view('admin/_layout_main', $this->data);\n }", "public function edit() {\n// user must be logged in\n if (User::is_logged_in()) {\n// preventing double submitting\n $token = md5(time());\n $_SESSION[$token] = true;\n\n $user_id = $_SESSION['user_id'];\n $is_admin = isset($_SESSION['is_admin']) && $_SESSION['is_admin'];\n $post_id = $_GET['post_id'];\n $post = Post::find($post_id);\n\n $description = $post['description'];\n $categoryId = $post['category'];\n $imageFile = $post['imageFile'];\n// user can edit only his post or he must be an admin\n if ($user_id == $post['authorId'] || $is_admin) {\n // get all categories for the select box in form\n $categories = Category::all();\n// show post edit form\n require_once('views/posts/edit.php');\n }\n }\n }", "public function edit(ProductCategory $productCategory)\n {\n //\n }", "public function edit_postAction() {\r\n\t\t$info = $this->getPost(array('id', 'sort', 'title', 'img', 'status', 'hits'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$ret = Game_Service_Category::updateCategory($info, intval($info['id']));\r\n\t\tif (!$ret) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功.'); \t\t\r\n\t}", "public function categories_update($param = null)\r\n {\r\n if (isset($_POST[\"cat_id\"]) && !empty($_POST[\"cat_id\"])) {\r\n $action = $_POST[\"cat_id\"];\r\n $newValue = $_POST[\"cat_descr\"];\r\n $update = Category::find($action)->update(['cat_descr' => $newValue]);\r\n echo $update;\r\n\r\n } else {\r\n echo json_encode([\"error\" => \"ERROR\"]);\r\n }\r\n }", "function update_categories(){\n\t\t\tprint_r($this->input->post());\n\t\t}", "function edit_staff_category($id=NULL) \r\n {\r\n // Basis: To simplify THIRRA system, staff_category name === system_category name\r\n $data['offline_mode']\t\t=\t$this->config->item('offline_mode');\r\n $data['debug_mode']\t\t =\t$this->config->item('debug_mode');\r\n\t\t$data['user_rights'] = $this->mthirra->get_user_rights($_SESSION['username']);\r\n $data['breadcrumbs'] = breadcrumbs('ehr_admin/admin_mgt','Admin','ehr_admin/admin_list_staffcategories','List Staff Categories'); \r\n\t\t$data['form_purpose'] = $this->uri->segment(3);\r\n\t\t$data['category_id'] = $this->uri->segment(4);\r\n\t\t$data['title'] = \"Add New / Edit Staff Category\";\r\n $data['now_id'] = time();\r\n //$data['now_date'] = date(\"Y-m-d\",$data['now_id']);\r\n //$data['now_time'] = date(\"H:i\",$data['now_id']);\r\n\t\t$data['users_list'] = $this->madmin_rdb->get_users_list();\r\n $data['systemuser_categories'] = $this->madmin_rdb->get_systemuser_categories();\r\n \r\n if(count($_POST)) {\r\n // User has posted the form\r\n $data['category_id'] = $this->input->post('category_id');\r\n $data['category_name'] = $this->input->post('category_name');\r\n $data['description'] = $this->input->post('description');\r\n $data['init_access_patients'] = $this->input->post('access_patients');\r\n $data['init_access_pharmacy'] = $this->input->post('access_pharmacy');\r\n $data['init_access_orders'] = $this->input->post('access_orders');\r\n $data['init_access_queue'] = $this->input->post('access_queue');\r\n $data['init_access_reports'] = $this->input->post('access_reports');\r\n $data['init_access_utilities'] = $this->input->post('access_utilities');\r\n $data['init_access_admin'] = $this->input->post('access_admin');\r\n } else {\r\n // First time form is displayed\r\n if ($data['form_purpose'] == \"new_category\") {\r\n // New user\r\n\t\t $data['category_info'] = array();\r\n $data['category_id'] = \"new_category\";\r\n $data['category_name'] = \"\";\r\n $data['description'] = \"\";\r\n $data['init_access_patients'] = \"\";\r\n $data['init_access_pharmacy'] = \"\";\r\n $data['init_access_orders'] = \"\";\r\n $data['init_access_queue'] = \"\";\r\n $data['init_access_reports'] = \"\";\r\n $data['init_access_utilities'] = \"\";\r\n $data['init_access_admin'] = \"\";\r\n } else {\r\n // Existing user\r\n\t\t $data['category_info'] = $this->madmin_rdb->get_one_staffcategory($data['category_id']);\r\n $data['category_id'] = $data['category_info']['category_id'];\r\n $data['category_name'] = $data['category_info']['category_name'];\r\n $data['description'] = $data['category_info']['description'];\r\n $data['sys_category_id']= $data['category_info']['sys_category_id'];\r\n $data['permission'] = $data['category_info']['permission'];\r\n $data['access_rights'] = $this->get_user_rights($data['permission']);\r\n $data['access_rights']['permission'] = $data['permission'];\r\n $data['init_access_patients'] = $data['access_rights']['section_patients'];\r\n $data['init_access_pharmacy'] = $data['access_rights']['section_pharmacy'];\r\n $data['init_access_orders'] = $data['access_rights']['section_orders'];\r\n $data['init_access_queue'] = $data['access_rights']['section_queue'];\r\n $data['init_access_reports'] = $data['access_rights']['section_reports'];\r\n $data['init_access_utilities'] = $data['access_rights']['section_utilities'];\r\n $data['init_access_admin'] = $data['access_rights']['section_admin'];\r\n } //endif ($data['form_purpose'] == \"new_category\")\r\n } //endif(count($_POST))\r\n \r\n\t\t$this->load->vars($data);\r\n // Run validation\r\n\t\tif ($this->form_validation->run('edit_staff_category') == FALSE){\r\n // Return to incomplete form\r\n if ($_SESSION['thirra_mode'] == \"ehr_mobile\"){\r\n $new_header = \"ehr/header_xhtml-mobile10\";\r\n $new_banner = \"ehr/banner_ehr_wap\";\r\n $new_sidebar= \"ehr/sidebar_ehr_admin_wap\";\r\n //$new_body = \"ehr/emr_edit_systemuser_wap\";\r\n $new_body = \"ehr/ehr_admin_edit_staff_category_html\";\r\n $new_footer = \"ehr/footer_emr_wap\";\r\n } else {\r\n //$new_header = \"ehr/header_xhtml1-strict\";\r\n $new_header = \"ehr/header_xhtml1-transitional\";\r\n $new_banner = \"ehr/banner_ehr_html\";\r\n $new_sidebar= \"ehr/sidebar_emr_admin_html\";\r\n $new_body = \"ehr/ehr_admin_edit_staff_category_html\";\r\n $new_footer = \"ehr/footer_emr_html\";\r\n }\r\n if($data['user_rights']['section_admin'] < 100){\r\n $new_body = \"ehr/ehr_access_denied_html\";\r\n }\r\n $this->load->view($new_header);\t\t\t\r\n $this->load->view($new_banner);\t\t\t\r\n $this->load->view($new_sidebar);\t\t\t\r\n $this->load->view($new_body);\t\t\t\r\n $this->load->view($new_footer);\t\t\t\r\n } else {\r\n //echo \"\\nValidated successfully.\";\r\n //echo \"<pre>\";\r\n //print_r($data);\r\n //echo \"</pre>\";\r\n //echo \"<br />Insert record\";\r\n // Generate permission\r\n $data['rights_decimal'] = 0;\r\n if(is_numeric($data['init_access_admin'])){ \r\n $data['rights_decimal'] += 1;\r\n }\r\n if(is_numeric($data['init_access_reports'])){ \r\n $data['rights_decimal'] += 2;\r\n }\r\n if(is_numeric($data['init_access_pharmacy'])){ \r\n $data['rights_decimal'] += 4;\r\n }\r\n if(is_numeric($data['init_access_orders'])){ \r\n $data['rights_decimal'] += 8;\r\n }\r\n if(is_numeric($data['init_access_patients'])){ \r\n $data['rights_decimal'] += 16;\r\n }\r\n if(is_numeric($data['init_access_queue'])){ \r\n $data['rights_decimal'] += 32;\r\n }\r\n /* Finance and Billing \r\n if(is_numeric($data['init_access_patients'])){ \r\n $data['rights_decimal'] += 64;\r\n }\r\n if(is_numeric($data['init_access_patients'])){ \r\n $data['rights_decimal'] += 128;\r\n }\r\n */\r\n if(is_numeric($data['init_access_utilities'])){ \r\n $data['rights_decimal'] += 256;\r\n }\r\n if($data['form_purpose'] == \"new_category\") {\r\n // Insert records\r\n $ins_cate_array['category_id'] = $data['now_id'];\r\n $ins_cate_array['category_name'] = $data['category_name'];\r\n $ins_cate_array['description'] = $data['description'];\r\n $ins_cate_array['permission'] = $data['rights_decimal'];\r\n //echo \"data['rights_decimal']\".$data['rights_decimal'];\r\n $ins_user_data = $this->madmin_wdb->insert_new_staffcategory($ins_cate_array);\r\n $this->session->set_flashdata('data_activity', 'Staff category added.');\r\n } else {\r\n // Update records\r\n $upd_cate_array['category_id'] = $data['category_id'];\r\n $upd_cate_array['category_name'] = $data['category_name'];\r\n $upd_cate_array['description'] = $data['description'];\r\n $upd_cate_array['permission'] = $data['rights_decimal'];\r\n //echo \"data['rights_decimal']\".$data['rights_decimal'];\r\n $upd_user_data = $this->madmin_wdb->update_staffcategory($upd_cate_array);\r\n $this->session->set_flashdata('data_activity', 'Staff category updated.');\r\n } //endif($data['form_purpose'] == \"new_category\")\r\n $new_page = base_url().\"index.php/ehr_admin/admin_list_staffcategories\";\r\n header(\"Status: 200\");\r\n header(\"Location: \".$new_page);\r\n } //endif ($this->form_validation->run('edit_staff_category') == FALSE)\r\n }", "public function update(Request $request, Category $category)\n {\n $category->exp_group_name = $request->exp_group_name;\n $category->exp_group_desc = $request->exp_group_desc;\n\n if ( $request->exp_group_status == '1' or $request->exp_group_status == '0')\n {\n \n $category->exp_group_status = $request->exp_group_status;\n }\n\n\n \n\n\n\n \n $category->save();\n return redirect()->route('admin.categories.index');\n }", "public function update(){\n $service_category = new OsServiceCategoryModel($this->params['service_category']['id']);\n $service_category->set_data($this->params['service_category']);\n if($service_category->save()){\n $response_html = __('Service Category Updated. ID: ', 'latepoint') . $service_category->id;\n $status = LATEPOINT_STATUS_SUCCESS;\n }else{\n $response_html = $service_category->get_error_messages();\n $status = LATEPOINT_STATUS_ERROR;\n }\n if($this->get_return_format() == 'json'){\n $this->send_json(array('status' => $status, 'message' => $response_html));\n }\n }", "public function edit(CustomerCategory $customerCategory)\n {\n //\n }", "public function edit($catgId){\n\t\t\tif($this->session->userdata('loggedIn_adminInfo')=='')redirect('admincp');\n\t\t\t$data['title'] \t\t= 'Projects 100K';\n\t\t\t$postedValue_fname \t= array();\n\t\t\tif($this->session->userdata('post_promotionData'))\n\t\t\t$data['postedValue'] \t\t= \t$this->session->userdata('post_promotionData');\n\t\t\t$promotionID\t\t\t\t= \tstr_replace(array('-', '_', '~'), array('+', '/', '='),$catgId);\t\t\t\n\t\t\t$data['promotionInfo']\t\t=\t$this->base_model->is_Record_Exists('tbl_promotion_mastercategory','',array('id'=>$this->encrypt->decode($promotionID)));\t\n\t\t\t$data['fieldInfo']\t\t\t=\t$this->base_model->get_All_Records('tbl_promotion_masterfields','',\n\t\t\t\t\t\t\t\t\t\t\tarray('promotionCategoryId'=>$this->encrypt->decode($promotionID)),'order','asc');\t\t\t\t\n\t\t\t$data['catg_uri_string']\t=\t$data['promotionInfo']->uri_string;\n\t\t\t$data['catgTitle']\t\t\t=\tstripslashes(ucwords($data['promotionInfo']->title));\n\t\t\t$data['hdnPromotionID']\t\t=\t$catgId;\n\t\t\t$this->session->unset_userdata('post_promotionFieldData');\n\t\t\t$this->load->view('templates/admincp/header', $data);\n\t\t\t$this->load->view('admincp/promotion/form', $data);\n\t\t}", "function edit($esta_categoria)\n {\n if($this->acceso(436)){\n // check if the categoria exists before trying to edit it\n $categoria = str_replace(\"%20\", \" \", $esta_categoria);\n $data['categoria'] = $this->Categoria_model->get_categoria($categoria);\n\n if(isset($data['categoria']['categoria']))\n {\n $this->load->library('form_validation');\n $this->form_validation->set_rules('categoria','Nombre','trim|required', array('required' => 'Este Campo no debe ser vacio'));\n $this->form_validation->set_rules('codigo_cat','Código','trim|required', array('required' => 'Este Campo no debe ser vacio'));\n if($this->form_validation->run()) \n {\n $params = array(\n 'categoria' => $this->input->post('categoria'),\n 'codigo_cat' => $this->input->post('codigo_cat'),\n );\n $this->Categoria_model->update_categoria($categoria,$params); \n redirect('categoria/index');\n }\n else\n {\n $data['_view'] = 'categoria/edit';\n $this->load->view('layouts/main',$data);\n }\n }\n else\n show_error('The categoria you are trying to edit does not exist.');\n }\n }", "public function update_gallery_category_post()\n {\n prevent_author();\n\n //validate inputs\n $this->form_validation->set_rules('name', trans(\"category_name\"), 'required|xss_clean|max_length[200]');\n\n if ($this->form_validation->run() === false) {\n $this->session->set_flashdata('errors', validation_errors());\n $this->session->set_flashdata('form_data', $this->gallery_category_model->input_values());\n redirect($this->agent->referrer());\n } else {\n //category id\n $id = $this->input->post('category_id', true);\n if ($this->gallery_category_model->update_category($id)) {\n $this->session->set_flashdata('success', trans(\"category\") . \" \" . trans(\"msg_suc_updated\"));\n redirect('admin_category/gallery_categories');\n } else {\n $this->session->set_flashdata('form_data', $this->gallery_category_model->input_values());\n $this->session->set_flashdata('error', trans(\"msg_error\"));\n redirect($this->agent->referrer());\n }\n }\n }", "public function do_edit(Request $request,$id){\n\t\t$cat = new category();\n\t\t$c_name = $request->get(\"c_name\");\n\t\t// Sua ban ghi\n\t\t$cat->where(\"pk_category_news_id\",\"=\",$id)->update(array(\"c_name\"=>$c_name));\n\t\treturn redirect(url('admin/category-news'));\n\t}", "function editChoiceCategory($data,$id){\n\t\t$this->db->where('choice_category_id',$id);\n\t\t$query = $this->db->update(\"tbl_choice_category\",$data);\n\t\treturn $this->db->affected_rows();\n\t}", "public function update(CategoryEditRequest $request, Categ $categ)\n {\n //dd($categ);\n //dd($request);\n\n if($request->isMethod('post')){\n $categ->fill($request->all());\n $isOk=$categ->save();\n //$isOk=false;\n if($isOk){\n return redirect()->route('adminCateg')->with('success','запись обновлена');}\n else{\n return redirect()->route('adminCateg')->with('error','запись не обновлена');}\n }\n return view('news.admin.categ.update', ['categ'=>$categ]);\n }", "public function edit(BlogCategory $blogCategory)\n {\n //\n }", "function update_utility_bill_category($utility_bill_category_id = '')\n\t{\n\t\t$data['name']\t\t\t\t\t=\t$this->input->post('name');\n\t\t$data['timestamp']\t\t\t\t=\ttime();\n\t\t$data['updated_by']\t\t\t\t=\t$this->session->userdata('user_id');\n\n\t\t$this->db->where('utility_bill_category_id', $utility_bill_category_id);\n\t\t$this->db->update('utility_bill_category', $data);\n\n\t\t$this->session->set_flashdata('success', 'Utility bill category has been updated successfully.');\n\n\t\tredirect(base_url() . 'utility_bill_categories', 'refresh');\n\t}", "function action_edit($params) {\n $form_error =false;\n $category= model_category::load_by_id($params[0]);\n $id =$params[0];\n if(isset($_POST['form']['action1'])) {\n //Check if the \"Ok\" button is set.\n\n //Modify category name.\n if( model_category::editC($id,$_POST['form']['name'])){\n header('Location: ' . APP_URL . 'category/list');\n die;\n\n }\n $form_error =false;\n }\n if(isset($_POST['form']['action2'])) {\n @include_once APP_PATH . 'view/category_edit.tpl.php';\n }\n @include_once APP_PATH . 'view/category_edit.tpl.php';\n }", "public function edit(booksCategory $booksCategory)\n {\n //\n }", "public function edit(booksCategory $booksCategory)\n {\n //\n }", "public function editAction() {\n $form = $this->view->form = new Whmedia_Form_Circle();\n $form->submit->setLabel('Edit Box');\n $list_id = (int) $this->_getParam('box_id');\n $circlesTable = Engine_Api::_()->getDbTable('circles', 'whmedia');\n $viewer = Engine_Api::_()->user()->getViewer();\n /* @var $list Whmedia_Model_Circle */\n $list = $circlesTable->find($list_id)->current();\n $form->populate($list->toArray());\n \n // Check post\n if( $this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost()) )\n {\n if( !$list || $list->user_id != $viewer->getIdentity() ) {\n return $this->_helper->Message('Missing box.', false, false)->setError();\n } \n // we will add the category\n $values = $form->getValues();\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try\n {\n \n $list->setFromArray($values);\n $list->save();\n\n $db->commit();\n }\n\n catch( Exception $e )\n {\n $db->rollBack(); \n throw $e;\n }\n\n return $this->_helper->Message(\"Changes saved.\");\n }\n\n // Output\n $this->renderScript('admin-settings/form.tpl');\n }", "public function testUpdateItemSubCategory()\n {\n }", "public function edit_category($id = null)\n { \n //check if id is set\n if(isset($id))\n {\n $data['category'] = $this->blog_model->get_category($id); //get data of category\n $data['categories'] = $this->blog_model->get_category(); //get all categories from database (for parent purpose)\n\n //if category id desn't exist\n if($data['category'] == false)\n {\n $data['category_error'] = 'Category does not exist'; //set category_error variable\n \n }\n\n //validate form on category update\n $this->form_validation->set_rules('cat_name', 'Category Name', 'required|trim|htmlspecialchars|callback_validate_change_cat_name['.$id.']', array(\n 'required' => '%s is not provided!'\n ));\n $this->form_validation->set_rules('cat_desc', 'Category Description', 'trim|htmlspecialchars');\n\n //if form is not successfully validated\n if($this->form_validation->run() == FALSE)\n {\n if(isset($_POST['submit']))\n {\n $data['info'] = 'An Error occured!';\n }\n $data['cat_parent'] = $this->blog_model->get_category($data['category']['parent_id']); //get category parent\n $data['title'] = 'Edit Category';\n $data['page'] = 'category';\n $this->load->view('template/header',$data);\n $this->load->view('blog/edit_category');\n $this->load->view('template/footer');\n }\n else\n {\n $update = $this->blog_model->update_category($id, $_POST);\n if($update == true)\n {\n $data['category'] = $this->blog_model->get_category($id);\n $data['cat_parent'] = $this->blog_model->get_category($data['category']['parent_id']);\n $data['title'] = 'Edit Category';\n $data['page'] = 'category';\n $data['info'] = 'Category has been successfully updated!';\n $this->load->view('template/header',$data);\n $this->load->view('blog/edit_category');\n $this->load->view('template/footer');\n }\n else\n {\n $data['category'] = $this->blog_model->get_category($id);\n $data['cat_parent'] = $this->blog_model->get_category($data['category']['parent_id']);\n $data['title'] = 'Edit Category';\n $data['page'] = 'category';\n $data['info'] = 'You have made no changes!';\n $this->load->view('template/header',$data);\n $this->load->view('blog/edit_category');\n $this->load->view('template/footer');\n }\n }\n }\n else\n {\n header('location:'.base_url.'index.php/blog/category');\n }\n }", "public function update(Request $request ,Category $update){\n $update -> category_name_en = $request -> blog_category_name_en;\n $update -> category_name_lng = $request -> blog_category_name_lng;\n $update -> category_name_en_slug = strtolower(str_replace(' ' , '-' , $request -> blog_category_name_en));\n $update -> category_name_lng_slug = str_replace(' ' , '-' , $request -> blog_category_name_lng);\n $update -> update();\n return true;\n }", "public function edit(Workout $workout)\n {\n $logged_user = Auth::user();\n $users = User::all();\n return view('Admin.Workouts.edit',compact('workout','users','logged_user'));\n }", "public function update_category(Request $request){\n $data = array();\n $category_id=$request->category_id;\n $data['category_name']=$request->category_name;\n $data['category_description']=$request->category_description;\n\n//$data['publication_status']=$request->publication_status;\n DB::table('tbl_category')\n ->where('category_id',$category_id)\n ->update($data);\n\n Session::put('message','Category update Successfully!!');\n return Redirect::to('/edit-category/'.$category_id);\n }", "public function edit($id)\n\t{\n\t\t$present_users = \\App\\User::where('category', '!=', 0)->orderBy('created_at', 'desc')->get();\n\t\t\n\t\t$data = \\App\\Work::find($id);\n\t\t$industries = \\App\\Industry::orderBy(\"sort\", 'asc')->get();\n\t\t$work_categories = \\App\\WorkCategory::orderBy('sort', 'asc')->get();\n\t\t$area_provinces = \\App\\AreaProvince::orderBy('sort', 'asc')->get(array('id','code', 'name', 'id'));\n\t\t$area_cities = null;\n\t\t$area_streets = null;\n\t\tif(!empty($data->province))\n\t\t{\n\t\t\t$area_cities = \\App\\AreaCity::where('provincecode', '=', $data->province)->orderBy('sort', 'asc')->get(array('id','code', 'name', 'id'));\n\t\t}\n\t\tif(!empty($data->city))\n\t\t{\n\t\t\t$area_streets = \\App\\AreaStreet::where('citycode', '=', $data->city)->orderBy('sort', 'asc')->get(array('id','code', 'name', 'id'));\n\t\t}\n\t\t\t\n\t\treturn view('admin.works.edit')->with('data', $data)->with('present_users', $present_users)->with('area_provinces', $area_provinces)->with('area_cities', $area_cities)->with('area_streets', $area_streets)->with('work_categories', $work_categories)->with('industries', $industries);\n\t}", "function doEdit()\n {\n $dt = new lmbDate();\n $this->dt_up = $dt->getStamp();\n\n $node_id = $this->request->getInteger('id');\n $this->node = $node_id;\n $category['node_id'] = $node_id;\n $category['title'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_TITLE);\n $category['description'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_DESCR);\n $category['identifier'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_URI);\n\n $this->dt_cr = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_CREATE_DATE);\n $category['date_create'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_CREATE_DATE);\n $category['date_update'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_UPDATE_DATE);\n $category['is_branch'] = TreeItem::getIsBranchByNodeId($node_id);\n\n $this->setFormDatasource($category, 'object_form');\n\n if($this->request->hasPost())\n {\n $this->_validateAndSave(false);\n //$this->_onAfterSave();\n }\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }" ]
[ "0.6806339", "0.67915225", "0.6783352", "0.6751382", "0.67282903", "0.67065406", "0.6692574", "0.65847135", "0.6567059", "0.65591395", "0.6540297", "0.6506003", "0.65053743", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411762", "0.6396357", "0.6375292", "0.63688594", "0.63472575", "0.6344906", "0.63017976", "0.6289904", "0.62724525", "0.6264524", "0.62321085", "0.6201662", "0.617874", "0.61680675", "0.6165149", "0.6156815", "0.6156365", "0.6146117", "0.6143593", "0.6137387", "0.6128394", "0.61211413", "0.61202145", "0.61110854", "0.6106135", "0.6098655", "0.6098017", "0.6096603", "0.6089548", "0.6082736", "0.6069544", "0.606631", "0.60599256", "0.60580784", "0.60540664", "0.6050663", "0.60496074", "0.60393536", "0.6036917", "0.6028273", "0.60253733", "0.60191864", "0.6012012", "0.59935117", "0.5993165", "0.5985542", "0.5970993", "0.59545124", "0.59541357", "0.59522057", "0.59522057", "0.59495527", "0.5943338", "0.5942655", "0.5939973", "0.5937656", "0.5937552", "0.59260815", "0.59220636", "0.5914193", "0.5914193", "0.5914193", "0.5914193", "0.5914193", "0.5914193", "0.5914193" ]
0.7347392
0
/Edit video category Function for update
Функция изменения категории видео
public function updateVideoCategory(Request $request) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $this->validate($request,array( 'name' => 'required', )); $id = $request->id; $videoCategory = VideoCategory::find($id); $videoCategory->video_category_name = $request->name; $videoCategory->save(); Session::flash('success','Video Category Updated succcessfully.'); return redirect()->back()->with('workout',$videoCategory); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifyCategory()\n{\n global $connection;\n if (isset($_POST['modifyBtn'])) {\n $categoria_id = $_POST['categoria_id'];\n\n $categoria_nome = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['categoria_nome']);\n\n $query_update = \"UPDATE video_category SET category_video='$categoria_nome' WHERE id_category='$categoria_id'\";\n $result_update = mysqli_query($connection, $query_update);\n if ($result_update) {\n return header('Location: video_categorie.php?modify=true');\n } else {\n return header('Location: video_categorie.php?modify=false');\n }\n }\n}", "function edit(category $category)\n {\n $query = \"UPDATE categories SET name = '$category->name', \n tag = '$category->tag', description = '$category->description', slug = '$category->slug', active = '$category->active' WHERE categories_id = $category->category_id\";\n $result = $this->db->update($query);\n }", "public function addEdit(){\n\t\tif (isset($this->session->userdata['logged_in'])){\n\t\t\t$video_id = $this->uri->segment(4);// get id form url\n\t\t\tif($video_id==''){\n\t\t\t\t$data['title'] = \"Add Video\";\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$data['title'] = \"Edit Video\";\n\t\t\t}\n\t\t\t$data['content'] = 'admin/addeditvideo';\n\t\t\t$data['getVideo'] = $this->VideoModel->getVideoById($video_id); //retrive all category By Id\n\t\t\t//print_r($data['getVideo']); die;\n\t\t\t$this->load->view('admin/layout/adminmaster',$data);\n\t\t}else{\n\t\t\tredirect('admin/login');\n\t\t}\n\t}", "public function update_category(){\n $query = \"UPDATE {$this->table} SET cat_title = :cat_title WHERE {$this->table}.cat_id = :cat_id\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(':cat_title',$this->cat_title);\n $stmt->bindParam(':cat_id',$this->cat_id);\n $stmt->execute();\n return $stmt;\n }", "public function edit($id)\n {\n $video = Video::find($id);\n // dd($video->categories[0]->name);\n $categories = Category::where('status',1)->orderBy('name')->get();\n $tags = Tag::where('status',1)->get();\n return view('adminCMS.videos.editVideo',compact('video','categories','tags'));\n }", "public function testUpdateCategoryUsingPUT()\n {\n }", "private function updateVideo()\n {\n try\n {\n $request = $_POST;\n\n global $cbvid;\n\n //check if video id provided\n if( !isset($request['videoid']) || $request['videoid']==\"\" )\n throw_error_msg(\"video Id not provided\");\n\n if( !is_numeric($request['videoid']) )\n throw_error_msg(\"invalid video id\");\n\n //check if title provided\n if( !isset($request['title']) || $request['title']==\"\")\n throw_error_msg(\"title not provided\");\n else\n $title = mysql_clean($request['title']);\n\n //check if description provided\n if( !isset($request['description']) || $request['description']==\"\")\n throw_error_msg(\"description not provided.\");\n else\n $description = mysql_clean($request['description']);\n\n //check if tags provided\n if(!isset($request['tags']) || $request['tags']==\"\")\n throw_error_msg(\"tags not provided.\");\n else\n $tags = mysql_clean($request['tags']);\n\n //check if tags provided\n if(!isset($request['category']) || $request['category']==\"\")\n {\n throw_error_msg(\"category not provided.\");\n }\n else\n {\n $request['category'] = explode(',',$request['category']); \n $_POST['category'] = $request['category'];\n }\n \n if (isset($request['video_users-user']) || isset($request['video_users-group'])) \n {\n $video_user_ = mysql_clean($request['video_users-user']);\n $video_group_ = mysql_clean($request['video_users-group']);\n\n $request['video_users'] = get_video_users($video_user_,$video_group_,false);\n }\n \n $result = $cbvid->update_video($request);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $vdetails = $cbvid->get_video_details($request['videoid']);\n $formatted_video = format_videos(array($vdetails));\n\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => $formatted_video[0]);\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function update_assets_category() {\n\t\n\t\tif($this->input->post('edit_type')=='assets_category') {\t\t\n\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t$Return = array('result'=>'', 'error'=>'', 'csrf_hash'=>'');\n\t\t\t\n\t\t$id = $this->uri->segment(4);\n\t\t$Return['csrf_hash'] = $this->security->get_csrf_hash();\n\t\t\t\n\t\t/* Server side PHP input validation */\t\t\n\t\tif($this->input->post('name')==='') {\n \t$Return['error'] = $this->lang->line('xin_error_cat_name_field');\n\t\t}\n\t\t\t\t\t\t\n\t\tif($Return['error']!=''){\n \t\t$this->output($Return);\n \t}\n\t\t\n\t\t// set data\n\t\t$data = array(\n\t\t'category_name' => $this->input->post('name')\n\t\t);\n\t\t\n\t\t$result = $this->Assets_model->update_assets_category_record($data,$id);\n\t\tif ($result == TRUE) {\n\t\t\t$Return['result'] = $this->lang->line('xin_success_assets_category_updated');\n\t\t} else {\n\t\t\t$Return['error'] = $this->lang->line('xin_error_msg');\n\t\t}\n\t\t$this->output($Return);\n\t\texit;\n\t\t}\n\t}", "public function editCategory()\r\n{\r\n $query_string = \"UPDATE categories \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"categoryname = :categoryname, \";\r\n $query_string .= \"categorydescription = :categorydescription \";\r\n $query_string .= \"WHERE categoryid = :categoryid\";\r\n\r\n return $query_string;\r\n}", "public function updateCategory()\n {\n Category::findOrFail($this->category_id)->update([\n 'category_name' => $this->categoryName,\n 'slug' => Str::slug($this->categoryName),\n 'class' => $this->class,\n\n ]);\n }", "public function edit($id)\n {\n $video = Video::find($id);\n $category = Category::all()->pluck('name','id');\n \n return view('admin.video.edit', compact('video','category'));\n }", "public function categories_update($param = null)\r\n {\r\n if (isset($_POST[\"cat_id\"]) && !empty($_POST[\"cat_id\"])) {\r\n $action = $_POST[\"cat_id\"];\r\n $newValue = $_POST[\"cat_descr\"];\r\n $update = Category::find($action)->update(['cat_descr' => $newValue]);\r\n echo $update;\r\n\r\n } else {\r\n echo json_encode([\"error\" => \"ERROR\"]);\r\n }\r\n }", "function fm_update_category($name, $catid = NULL, $groupid = 0) {\r\n\tglobal $USER;\r\n\t\r\n\tif ($catid != NULL) {\r\n\t\t$update->id = $catid;\r\n\t\t$update->name = $name;\r\n\t\t$update->timemodified = time();\r\n\t\tif (!update_record('fmanager_categories', $update)) {\r\n\t\t\terror(get_string(\"errnoupdate\",'block_file_manager'));\r\n\t\t}\r\n\t} else {\r\n\t\t$new->name = $name;\r\n\t\tif ($groupid == 0){\r\n\t\t\t$new->owner = $USER->id;\r\n\t\t\t$new->ownertype = OWNERISUSER;\r\n\t\t} else {\r\n\t\t\t$new->owner = $groupid;\r\n\t\t\t$new->ownertype = OWNERISGROUP;\r\n\t\t}\r\n\t\t$new->timemodified = time();\r\n\t\tif (!insert_record('fmanager_categories', $new)) {\r\n\t\t\terror(get_string(\"errnoinsert\",'block_file_manager'));\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}", "function edit_category() {\r\n\r\n\tif(isset($_POST['editcategory'])){\r\n\r\n\t\t$cat_id\t\t\t\t= clean_input($_GET['cat_id']);\r\n\t\t$cat_name \t\t\t= clean_input($_POST['cat_name']);\r\n\t\t$cat_desc_short \t= clean_input($_POST['cat_desc_short']);\r\n\t\t$cat_desc_long \t\t= clean_input($_POST['cat_desc_long']);\r\n\t\t$cat_parent_id \t\t= clean_input($_POST['cat_parent_id']);\r\n\t\t$cat_url \t\t\t= clean_input($_POST['cat_url']);\r\n\t\t$cat_date \t\t\t= clean_input($_POST['cat_date']);\r\n\t\t$cat_mod \t\t\t= clean_input($_POST['cat_mod']);\r\n\t\t$page_template \t\t= clean_input($_POST['page_template']);\r\n\t\t$cat_mod_by \t\t= clean_input($_SESSION['userid']);\r\n\t\t$cat_meta_title \t\t\t= clean_input($_POST['cat_meta_title']);\r\n\t\t$cat_meta_keywords \t\t\t= clean_input($_POST['cat_meta_keywords']);\r\n\t\t$cat_meta_description \t\t= clean_input($_POST['cat_meta_description']);\r\n\t\t$insert_keywords\t \t\t= clean_input($_POST['insert_keywords']);\t\t\t\r\n\r\n\t\t$xyquery = \"UPDATE categories SET \";\r\n\t\t$xyquery .= \"cat_name = '$cat_name',\";\r\n\t\t$xyquery .= \"cat_desc_short = '$cat_desc_short'\";\r\n\t\t$xyquery .= \",cat_desc_long = '$cat_desc_long'\";\r\n\t\t$xyquery .= \",cat_parent_id = '$cat_parent_id'\";\r\n\t\t$xyquery .= \",cat_url = '$cat_url'\";\r\n\t\t$xyquery .= \",cat_mod = '$cat_mod'\";\r\n\t\t$xyquery .= \",cat_mod_by = '$cat_mod_by'\";\r\n\t\t$xyquery .= \",page_template = '$page_template'\";\r\n\t\t$xyquery .= \",cat_meta_title = '$cat_meta_title'\";\r\n\t\t$xyquery .= \",cat_meta_keywords = '$cat_meta_keywords'\";\r\n\t\t$xyquery .= \",cat_meta_description = '$cat_meta_description'\";\r\n\t\t$xyquery .= \",insert_keywords = '$insert_keywords'\";\t\t\t\t\r\n\t\t$xyquery .= \"WHERE cat_id = '$cat_id'\";\r\n\r\n\t\t$xyresult = mysql_query($xyquery) or die(mysql_error());\r\n\r\n\t\t//echo \"<center><h4>The category \".$cat_name.\" been edited!</h4></center>\";\r\n?>\r\n<script>\r\n$(document).ready(function() {\r\n\t$(\"<p>NOTICE:</p><p>The category <?= $cat_name;?> has been modified.</p>\").appendTo(\"#xyalert\");\r\n\t$(\"#xyalert\").fadeIn(200).delay(1500).fadeOut(200);\r\n});\r\n</script>\r\n<?\r\n\t\treturn $xyresult;\r\n\t}\r\n}", "public function editVideoCategory($id)\n {\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n $workout = VideoCategory::find($id);\n return view('admin.editvideocategory')->with('workout',$workout);\n }\n\n else{\n Session::flash('danger','You are not authorize to view this page');\n return redirect()->back();\n }\n }", "public function edit_postAction() {\r\n\t\t$info = $this->getPost(array('id', 'sort', 'title', 'img', 'status', 'hits'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$ret = Game_Service_Category::updateCategory($info, intval($info['id']));\r\n\t\tif (!$ret) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功.'); \t\t\r\n\t}", "function EditarCategoria($params=null){\n $id_categoria= $params[':ID'];\n $this->modelo->GetCategoria($id_categoria);\n $this->vista->mostrarCategoriaEdit($id_categoria); \n }", "function product_category_edit(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u, $fs;\n\t\t\n\t\t$data = $_r['data'];\n\t\t$data['id'] = $_r['id'];\n\t\t\n\t\tif($data['save'] || $data['apply']){\n\t\t\tif(!$data['title']) $error['title'] = true;\n\t\t\tif(count($error)==0){\n\t\t\t\t$set = array();\n\t\t\t\t$set[] = \"title = '\".add_slash($data['title']).\"'\";\n\t\t\t\t$set[] = \"language_id = '1'\";\n\t\t\t\t$set[] = \"category_id = '0'\";\n\t\t\t\t\n\t\t\t\t$set = implode(', ', $set);\n\t\t\t\tif($data['id']){\n\t\t\t\t\tmysql_q(\"UPDATE product_category SET $set WHERE id = '\".add_slash($data['id']).\"'\");\n\t\t\t\t} else {\n\t\t\t\t\t$data['id'] = mysql_q(\"INSERT INTO product_category SET $set\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($data['save']){\n\t\t\t\t\tredirect(\"product_category.htm\", \"\");\n\t\t\t\t} else{\n\t\t\t\t\tredirect(\"product_category-edit-\".$data['id'].\".htm\", \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else if($data['cancel']) {\n\t\t\tredirect(\"product_category.htm\", \"\");\n\t\t}\n\n\t\t$fields = \"\n\t\t[hidden name='id']\n\t\t[input name='title' label='Category Title' error='Please Enter Category Title']\n\t\t[sac class='']\n\t\t\";\n\t\t\n\t\tif(!$data['save'] && $data['id']){\n\t\t\t$data = mysql_q(\"SELECT * FROM product_category WHERE id='\".add_slash($data['id']).\"'\", \"single\");\n\t\t}\n\n\t\t$tpl->assign(\"data\", $data);\n\t\t\n\t\t$form = new form();\n\t\t$form->add($fields);\n\t\t$tpl->assign(\"form1\", $form->build());\n\t\t\n\t\t$main['content'] = $tpl->fetch(\"admin_product_category_edit.tpl\");\n\t\tdisplay($main);\n\t}", "function wp_update_category($catarr)\n {\n }", "public function edit(Video $video)\n {\n //\n }", "public function edit(Video $video)\n {\n //\n }", "public function testUpdateItemSubCategory()\n {\n }", "public function update(Request $request, VideoCategory $videoCategory)\n {\n $data = $request->validate([\n 'name' => 'required',\n ]);\n\n $videoCategory->update($data);\n\n return back()->with('success', 'تم التعديل بنجاح');\n }", "public function edit(ProductVideo $productVideo)\n {\n //\n }", "public function update_gallery_category_post()\n {\n prevent_author();\n\n //validate inputs\n $this->form_validation->set_rules('name', trans(\"category_name\"), 'required|xss_clean|max_length[200]');\n\n if ($this->form_validation->run() === false) {\n $this->session->set_flashdata('errors', validation_errors());\n $this->session->set_flashdata('form_data', $this->gallery_category_model->input_values());\n redirect($this->agent->referrer());\n } else {\n //category id\n $id = $this->input->post('category_id', true);\n if ($this->gallery_category_model->update_category($id)) {\n $this->session->set_flashdata('success', trans(\"category\") . \" \" . trans(\"msg_suc_updated\"));\n redirect('admin_category/gallery_categories');\n } else {\n $this->session->set_flashdata('form_data', $this->gallery_category_model->input_values());\n $this->session->set_flashdata('error', trans(\"msg_error\"));\n redirect($this->agent->referrer());\n }\n }\n }", "public function updateCategory(){\n\t\t \n\t\t$file_id = $this->category_model->updateCategory($_POST['id'],$_POST['name']);\n\t\t echo $file_id;\n\t\t\t\t\n }", "public function update(Request $request, $id)\n {\n $data['page_title'] = 'Content';\n $data['categories'] = Category::all()->sortBy('name');\n $data['languages'] = Settings::LANGUAGES;\n $data['genres'] = Settings::GENRES;\n\n $validationData = $request->validate(\n [\n 'category' => ['required'],\n 'name' => ['required', 'string', 'max:255'],\n //'videofile' => 'sometimes|nullable|mimes:mpeg,ogg,mp4,webm,3gp,mov,flv,avi,wmv,ts|max:' . config('constants.MAX_VIDEO_UPLOAD_SIZE'),\n 'file' => 'sometimes|nullable|mimes:png,PNG,jpg,JPG,jpeg,JPEG|max:' . config('constants.MAX_FILE_UPLOAD_SIZE'),\n 'language' => ['required', 'string'],\n 'genres' => ['required', 'string'],\n 'artist' => ['required', 'string'],\n 'castandcrew' => ['required', 'string'],\n 'description' => ['required', 'string'],\n\n ]\n );\n if ($request->hasfile('file')) {\n $image = $request->file('file');\n $image_name = time() . '_' . $image->getClientOriginalName();\n //$image_path = $request->file('file')->storeAs('uploads', $image_name);\n $image_path = 'banner_images/' . $image_name;\n Storage::disk('s3')->put($image_path, file_get_contents($image));\n }\n\n //print($duration);\n $tags = ($request->tags) ? explode(',', $request->tags) : '';\n $display_tags = ($request->display_tags) ? explode(',', $request->display_tags) : '';\n\n $save_data = [\n 'category_id' => $request->category,\n 'name' => $request->name,\n 'language' => $request->language,\n 'genres' => $request->genres,\n //'content_link' => ($video_path) ?? '',\n //'format' => ($video_extension) ?? '',\n 'tags' => json_encode($tags),\n 'display_tags' => json_encode($display_tags),\n //'client_id' => $this->client(),\n 'artist' => $request->artist,\n 'castandcrew' => $request->castandcrew,\n 'description' => $request->description,\n 'updated_by' => Auth::id(),\n ];\n if (isset($image_path))\n $save_data = array_merge($save_data, ['banner_image' => $image_path]);\n //dd($save_data);\n $content = Content::whereId($id)->update($save_data);\n if ($content) {\n return redirect('client/contents/view/' . $id)->with('success', \"Content Update Successfully.\");\n } else {\n return redirect('client/contents/view/' . $id)->with('failure', \"Oops! Content Not Updated.\");\n }\n }", "public function update(Request $request ,Category $update){\n $update -> category_name_en = $request -> blog_category_name_en;\n $update -> category_name_lng = $request -> blog_category_name_lng;\n $update -> category_name_en_slug = strtolower(str_replace(' ' , '-' , $request -> blog_category_name_en));\n $update -> category_name_lng_slug = str_replace(' ' , '-' , $request -> blog_category_name_lng);\n $update -> update();\n return true;\n }", "function editCategory($category, $id) {\n $data = [\n 'name' => $_POST['name'],\n 'description' => $_POST['description']\n ];\n\n $stmt = $category->update($id, $data);\n header('location: confirm.php?action=Category&type=update&query='.$stmt);\n}", "public function editVideo($id)\n {\n\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n $workout = Video::find($id);\n $categories = VideoCategory::all();\n //dd($categories);\n return view('admin.editvideo')->with('workout',$workout)->with('videoCategories',$categories);\n }\n\n else{\n Session::flash('danger','You are not authorize to view this page');\n return redirect()->back();\n }\n }", "public function editPost()\n {\n if (!$this->auth->isLogged()) {\n $this->view->redirect(\"/user/login\", \"You can not add new categories if you are not logged in!\");\n }\n\n if (!$this->auth->isInRole(\"admin\")) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not Admin!\");\n }\n\n if ($this->input->post(\"edit_category\") === null){\n $this->view->redirect(\"/categories/manage\");\n }\n\n if (empty($this->input->get(0,\"int\"))){\n $this->view->redirect(\"/categories/manage\");\n }\n\n $categoryId = $this->input->get(0,\"int\");\n\n $categoryName = $this->input->post(\"name\");\n\n $categoryModel = new CategoriesModel();\n\n try{\n if (!$categoryModel->existCategoryId($categoryId)){\n $this->view->redirect(\"/categories/manage\",\"This categories do not exist!\");\n }\n\n if ($categoryModel->editCategory($categoryName, $categoryId)){\n $this->view->redirect(\"/categories/manage\",\"Category edited successfully!\",\"success\");\n } else {\n $this->view->redirect(\"/categories/manage\",\"You did not change anything ?\");\n }\n\n }catch (\\Exception $exception) {\n $this->view->redirect(\"/categories/manage\", $exception->getMessage());\n }\n }", "public function edit_category() {\n $data['pageName'] = $this->pageName . ' : Edit Category';\n $get = $this->uri->uri_to_assoc();\n \n //If no id found\n if(!isset($get['id'])){\n $this->session->set_flashdata('info_message', '<span class=\"error-alert\">No content found</span>');\n redirect('admin/static_pages/home', \"location\");\n exit();\n }\n \n $category_id = $get['id'];\n $where_clause = array('category_id' => $category_id);\n $categoryRS = $this->User_model->get_category($where_clause);\n\n\n if (!$categoryRS) {\n $this->session->set_flashdata('info_message', '<span class=\"error-alert\">Content not available. Please try again later.</span>');\n redirect('admin/category/home', \"location\");\n exit();\n }\n \n $category = $categoryRS[0];\n $data['category'] = $category;\n \n //After posting save data\n if(isset($_POST['category_id']) && !empty($_POST['category_id'])) {\n \n $pst_category_id = addslashes($_POST['category_id']);\n $isCategoryAdded = $this->User_model->update_category($pst_category_id);\n \n if(!$isCategoryAdded) {\n $this->session->set_flashdata('info_message', '<span class=\"error-alert\">Unable to update the record</span>');\n }\n else{\n $this->session->set_flashdata('info_message', 'Record updated successfull!');\n redirect('admin/category/home', \"location\");\n }\n }\n $this->load->view('admin/category/edit_view', $data); \n }", "public function update(Request $request, Video $video)\n { \n\n $request->validate([\n 'name' => \"required|unique:videos,name,$video->id\"\n ]);\n\n $url_video = $request->url_video;\n\n $url_video_array = explode(\"/\", $url_video);\n \n if(Str::contains($url_video, 'youtube')) {\n $url_video_id = $url_video_array[4];\n $url_thumbail = 'https://img.youtube.com/vi/'.$url_video_id.'/0.jpg';\n } \n\n if(Str::contains($url_video, 'vimeo')) {\n $url_video_id = $url_video_array[4];\n $hash = unserialize(file_get_contents(\"https://vimeo.com/api/v2/video/\".$url_video_id.\".php\"));\n $url_thumbail_preview = $hash[0]['thumbnail_large'];\n $url_thumbail = substr_replace( $url_thumbail_preview, \"480x360\", -3);\n } \n\n $video->update([\n 'name' => $request->name, \n 'date_public' => $request->date_public, \n 'status' => $request->status,\n 'category_id' => $request->category_id,\n 'url_video' => $url_video,\n 'url_thumbail' => $url_thumbail\n ]);\n\n return redirect()->route('admin.videos.edit', $video)->with('info', 'El video se actualizó con éxito');\n }", "function modifyCategory()\n{\n global $connection;\n global $updateCategorySuccess, $updateCategoryError;\n $updateCategorySuccess = $updateCategoryError = '';\n\n if (isset($_POST['btn_save_category'])) {\n $category_id = $_POST['txt_userid'];\n\n $updateColumncategory = '';\n\n $category_name = htmlentities($_POST['category_name']);\n if (!empty($category_name)) {\n $updateColumncategory .= \"category = '$category_name',\";\n }\n\n $updateColumncategory = rtrim($updateColumncategory, ',');\n\n $query_update = \"UPDATE product_category SET $updateColumncategory WHERE id_category = '$category_id'\";\n $result_update = mysqli_query($connection, $query_update);\n\n if ($result_update) {\n $updateCategorySuccess = '<script language=\"javascript\">\n swal(\"Sukses!\", \"Kategoria u modifikua me sukses!\", \"success\")\n </script>';\n } else {\n $updateCategoryError = '<script language=\"javascript\">\n swal(\"Gabim!\", \"Ka ndodhur një gabim gjatë modifikimit të kategorisë! Provoni përsëri!\", \"error\")\n </script>';\n }\n }\n}", "function get_category_to_edit($id)\n {\n }", "public function update(Request $request, $id)\n {\n\n try{\n\n $video = Video::find($id);\n\n $video->title = $request->input('title');\n $video->subtitle = $request->input('subtitle');\n $video->description = $request->input('description');\n $category = Category::find($request->input('category'));\n $tags = json_decode($request->input('tags'),true);\n $video->tags()->detach(); //we need time to attach again this is why this line is here and not inmeduatly bedore attach tags\n $video->categories()->detach();\n if($request->hasFile('thumbnail')){\n $thumbnailFile = $request->file('thumbnail');\n $thumbnailName = 'thumbnail_'.str_slug($request->input('title')).\".\".$thumbnailFile->getClientOriginalExtension();\n $thumbnailFile->move(public_path(\"uploads/videos/\"),$thumbnailName);\n $video->thumbnail = asset(\"uploads/videos/$thumbnailName\");\n }\n if($request->hasFile('video')){\n $videoFile = $request->file('video');\n $videoName = 'video_'.str_slug($request->input('title')).\".\".$videoFile->getClientOriginalExtension();\n $videoFile->move(public_path(\"uploads/videos/\"),$videoName);\n $video->video = asset(\"uploads/videos/$videoName\");\n\n }\n $video->categories()->attach($category->id);\n foreach ($tags as $key => $value) {\n $tagName = $tags[$key]['name'];\n //$tags = Tag::where('name','LIKE',\"%$name%\")->first();\n $tag = Tag::firstOrCreate(['name'=>$tagName]);\n\n $video->tags()->attach($tag->id);\n }\n $video->save();\n\n $request->session()->flash('status', true);\n $request->session()->flash('mess', \"Video : '$video->title' was updated successfully !!\");\n return redirect()->back();\n\n } catch(\\Exception $e){\n $request->session()->flash('status', false);\n $request->session()->flash('mess', \"Sorry we could not update the video\");\n Log::warning(\"Can not update Video {$e->getFile()}, {$e->getLine()}, {$e->getMessage()}\");\n return redirect()->back();\n }\n\n\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "function edit_category($tbl_name){\n\t\t//print_r($_POST); die;\n\t\tunset($_POST['submitLog']);\n\t\t$this->db->where('id', $_POST['id']);\n\t\tunset($_POST['id']);\n\t\t$this->db->update($tbl_name,$_POST);\n\t\t// print_r($this->db->last_query());\n\t // die();\n\t}", "public function edit(Postcategory $postcategory)\n {\n //\n }", "public function edit_category($category) {\n $this->category();\n $categories_sql_string = \"SELECT * FROM category WHERE id = \" . $category . \" limit 1\";\n $connection = new Database(\"sbrettsc_db\");\n $menu_array = $connection->get_array_from_query($categories_sql_string);\n $data = array(\"menu_array\" => array_shift($menu_array));\n\n $this->loadView(\"editors/category_editor\", $data);\n }", "public function editVideo(Request $request)\n {\n\n $editVideo = UploadVideo::where(\"id\", $request->id)->first();\n $editVideo->content_title = ucfirst($request->title);\n if ($request->active) {\n $editVideo->active_status = 1;\n } else {\n $editVideo->active_status = 0;\n }\n\n $editVideo->save();\n }", "public function operateCategory(){\n\t\t$title = $_POST['name'];\n\t\t\n\t\t$operation = $_POST['operation'];\n\t\t$id = $_POST['edit_id'];\n\t\t$shared = !empty($_POST['shared']) ? $_POST['shared'] : 0;\n\t\t$description = isset($_POST['description']) ? $_POST['description'] : '';\n\t\t$parent_id = isset($_POST['parent_id']) ? $_POST['parent_id'] : 0;\n\t\t$published = isset($_POST['published']) ? $_POST['published'] : 0;\n\t\t$save = $_POST['submit'];\n\t\t//echo '<pre>'; print_r($_POST); die;\n\t\t//echo $title.\" \".$operation.\" \".$id.\" \".\" \".$shared.\" \".$save;\n\t\tif(isset($save))\n\t\t{\n\t\t\tif( $operation == 'add' )\n\t\t\t{\n\t\t\t\t$args = array(\"cat_name\" => $title, \"cat_type\" => \"videos\", \"permission\" => $shared,'parent_id'=>$parent_id,'description' => $description,'published' => $published);\n\t\t\t\t$data = $this->query_model->getCategory(\"downloads\");\n\t\t\t\tif($this->query_model->addCategory($args)){\n\t\t\t\t\tredirect($this->index());\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\techo \"<script language='javascript'>alert('Unable to add category');</script>\";\n\t\t\t\t\t\tredirect($this->index());\n\t\t\t\t\t}\n\t\t\t}\n\t\t\telseif( $operation == 'edit' )\n\t\t\t{\n\t\t\t\t$args = array(\"cat_name\" => $title, \"cat_type\" => \"videos\", \"permission\" => $shared,'parent_id'=>$parent_id ,'description' => $description,'published' => $published);\n\t\t\t\t$this->db->where(\"cat_id\",$id);\n\t\t\t\tif($this->query_model->editCategory($args)){\n\t\t\t\tredirect($this->index());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\techo \"<script language='javascript'>alert('Unable to add category');</script>\";\n\t\t\t\t\tredirect($this->index());\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t}", "public function update(Request $request)\n {\n $dataArr = $request->all();\n \n $this->validate($request,[ \n 'cate_id' => 'required', \n 'title' => 'required', \n 'slug' => 'required',\n ],\n [ \n 'cate_id.required' => 'Please choose category', \n 'title.required' => 'Please input title',\n 'slug.required' => 'Please input slug' \n ]); \n \n $dataArr['alias'] = Helper::stripUnicode($dataArr['title']);\n \n $dataArr['type'] = 1;\n $dataArr['updated_user'] = Auth::user()->id;\n $dataArr['is_hot'] = isset($dataArr['is_hot']) ? 1 : 0;\n $dataArr['is_gg'] = isset($dataArr['is_gg']) ? 1 : 0;\n if($dataArr['is_gg'] == 1){\n $dataArr['encode_link'] = Helper::encodeLink($dataArr['video_url']); \n } \n $model = Articles::find($dataArr['id']);\n\n $model->update($dataArr);\n \n $this->storeMeta( $dataArr['id'], $dataArr['meta_id'], $dataArr);\n TagObjects::where(['object_id' => $dataArr['id'], 'type' => 1])->delete();\n // xu ly tags\n if( !empty( $dataArr['tags'] ) ){\n \n foreach ($dataArr['tags'] as $tag_id) {\n $modelTagObject = new TagObjects; \n $modelTagObject->object_id = $dataArr['id'];\n $modelTagObject->tag_id = $tag_id;\n $modelTagObject->type = 1;\n $modelTagObject->save();\n }\n }\n Session::flash('message', 'Success.'); \n\n return redirect()->route('articles.edit', $dataArr['id']);\n }", "public function update()\n {\n $model = $this->model()::findOrFail(request('_id'));\n $data = array_merge(request()->all(), ['slug' => request('name')]);\n $category = $model->update($data);\n return redirect()->route('admin.'.$this->table().'.index');\n }", "public function update(Request $request)\n {\n $id = $request->id;\n $thumbnail = 'http://img.youtube.com/vi/' . $request->thumbnail . '/mqdefault.jpg';\n\n $datas = [\n 'video_title' => $request->title,\n 'user_id' => Auth::user()->id,\n 'id_category' => $request->category,\n 'video_url' => $request->urlnew,\n 'content' => $request->area,\n 'key' => $request->thumbnail,\n 'thumbnail' => $thumbnail,\n ];\n \n $updatevideo = Video::where('id_video',$id)->update($datas);\n\n return redirect()->route('video.index')->withErrors(['success' => 'Success update Video']);\n }", "public function videoCategory() {\n $this->loadModel('VideoCategories');\n $data = $this->VideoCategories->find('all');\n $this->paginate = [ ];\n $videoCategories = $this->paginate($data);\n\n $this->set(compact('videoCategories'));\n \n }", "public function edit(Category $category) {\n //not implemented\n }", "function updateCategory($id) {\n\t$request = Slim::getInstance()->request();\n\t$body = $request->getBody();\n\t$category = json_decode($body);\n\t$sql = \"UPDATE category SET name=:name, description=:description WHERE id=:id\";\n\ttry {\n\t\t$db = getConnection();\n\t\t$stmt = $db->prepare($sql); \n\t\t$stmt->bindParam(\"name\", $category->name);\n\t\t$stmt->bindParam(\"description\", $category->description);\n\t\t$stmt->bindParam(\"id\", $id);\n\t\t$stmt->execute();\n\t\t$db = null;\n\t\techo json_encode($category);\n\t} catch(PDOException $e) {\n\t\techo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n\t}\n}", "public function update(Request $request, $slug){\n if(!checkRole(getUserGrade(2)))\n {\n prepareBlockUserMessage();\n return back();\n }\n $record = LmsCategory::getRecordWithSlug($slug);\n\n $rules = [\n 'category' \t => 'bail|required|max:60' ,\n ];\n /**\n * Check if the title of the record is changed, \n * if changed update the slug value based on the new title\n */\n $name = $request->category;\n if($name != $record->category)\n $record->slug = $record->makeSlug($name,TRUE);\n\n //Validate the overall request\n $this->validate($request, $rules);\n $record->category \t\t\t= $name;\n $record->description\t\t= $request->description;\n $record->record_updated_by \t= Auth::user()->id;\n $record->save();\n $file_name = 'catimage';\n if ($request->hasFile($file_name)){\n\n $rules = array( $file_name => 'mimes:jpeg,jpg,png,gif|max:10000' );\n $this->validate($request, $rules);\n\n $record->image = $this->processUpload($request, $record,$file_name);\n $record->save();\n }\n\n flash('success','record_updated_successfully', 'success');\n return redirect(URL_LMS_CATEGORIES);\n }", "function edit()\n {\n $id = $this->uri->rsegment('3');\n $video = $this->video_model->get_info($id);\n if(!$video)\n {\n $this->session->set_flashdata('message', 'Không tồn tại video này');\n redirect(admin_url('video'));\n }\n $this->data['video'] = $video;\n \n $this->load->library('form_validation');\n $this->load->helper('form');\n \n //neu ma co du lieu post len thi kiem tra\n if($this->input->post())\n {\n $this->form_validation->set_rules('name', 'Tên video', 'required');\n $this->form_validation->set_rules('link', 'Link video', 'required');\n \n if($this->form_validation->run())\n {\n \n //lay ten file anh minh hoa duoc update len\n $this->load->library('upload_library');\n $upload_path = './upload/video';\n $upload_data = $this->upload_library->upload($upload_path, 'image'); \n $images = '';\n if(isset($upload_data['file_name']))\n {\n $images = $upload_data['file_name'];\n }\n \n //luu du lieu can them\n $data = array(\n 'name' => $this->input->post('name'),\n 'images' => $images,\n 'link' => $this->input->post('link'),\n ); \n if($images != '')\n {\n $data['images'] = $images;\n }\n \n //them moi vao csdl\n if($this->video_model->update($video->id, $data))\n {\n $this->session->set_flashdata('message', 'Cập nhật thành công');\n }else{\n $this->session->set_flashdata('message', 'Không cập nhật được');\n }\n redirect(admin_url('video'));\n }\n }\n \n \n //load view\n $this->data['temp'] = 'admin/video/edit';\n $this->load->view('admin/main', $this->data);\n }", "public function update(CategoryValidate $request,Category $category)\n {\n //check if file is upload\n if($request->hasFile('image')){\n $image_name = time().'.'.$request->image->getClientOriginalExtension();\n $request->image->move(('admin/category/'), $image_name);\n }else{\n $image_name = $category->image;\n }\n\n $category->parent_id=$request->parent_id;\n\n $category->category_name=$request->category_name;\n\n $category->category_type=$request->category_type;\n\n $category->slug=Str::slug($request->category_name);\n\n $category->image=$image_name;\n\n $category->created_by=auth()->user()->id;\n\n $category->status=$request->status; \n\n $category->save();\n\n return redirect()->route('categories.index')\n ->with('success','Category update successfully.'); \n }", "public function actionUpdate()\n {\n $categoryOptions = DataHelper::getCategoryOptions();\n $statusMap = CmsCategory::getCategoryStatus();\n $model = $this->findModel($_GET['id']);\n if (Yii::$app->request->isPost) {\n $model->image_main_file = UploadedFile::getInstance($model, 'image_main_file');\n if (($file = $model->uploadImageMain())!=false) {\n UtilHelper::DeleteImg($model->image_main);\n $model->image_main = $file['src'];\n }\n $model->image_node_file = UploadedFile::getInstance($model, 'image_node_file');\n if (($file = $model->uploadImageNode())!=false) {\n UtilHelper::DeleteImg($model->image_node);\n $model->image_node = $file['src'];\n }\n $model->banner_file = UploadedFile::getInstance($model, 'banner_file');\n if (($file = $model->uploadBanner())!=false) {\n UtilHelper::DeleteImg($model->banner);\n $model->banner = $file['src'];\n }\n \n if ($model->load(Yii::$app->request->post()) && $model->save())\n {\n DataHelper::deleteCache();\n return $this->redirect(['index']);\n }\n }\n return $this->render('update', [\n 'model' => $model,\n 'categoryOptions' => $categoryOptions,\n 'statusMap' => $statusMap,\n ]);\n }", "public function edit($id)\n\t{\n\t\t$video = Resource::find($id);\n\t\t//id=1表示是视频的大类\n\t\t$categories = Category::find(1);\n\t\treturn view('admin.video.edit')->with(compact('video','categories'));\n\t}", "function editAction()\n\t{\n global $langCode;\n\t\t$id = (int)$this->registry->router->getArg('id');\n\t\t$myProductCat = new Core_ProductCategory($id);\n\t\t\n\t\t$redirectUrl = $this->getRedirectUrl();\n\t\tif($myProductCat->id > 0)\n\t\t{\n\t\t\t$error \t\t= array();\n\t\t\t$success \t= array();\n\t\t\t$contents \t= '';\n\t\t\t$formData \t= array();\n\t\t\t //Truyen du lieu hien co vao form\n\t\t\t$formData['fbulkid'] = array();\n\t\t\t$formData['fid'] = $myProductCat->id;\n\t\t\t$formData['fname'] = $myProductCat->name;\n\t\t\t$formData['forder'] = $myProductCat->order;\n\t\t\t$formData['fparentid'] = $myProductCat->parentid;\n\t\t\t$formData['fenable'] = $myProductCat->enable;\n\t\t\t$formData['fseourl'] = $myProductCat->seoUrl;\n\t\t\t$formData['fseotitle'] = $myProductCat->seoTitle;\n\t\t\t$formData['fseokeyword'] = $myProductCat->seoKeyword;\n\t\t\t$formData['fseodescription'] = $myProductCat->seoDescription;\n\t\t\t\n\t\t\tif(!empty($_POST['fsubmit']))//truong hop da nhan nut submit\n\t\t\t{\n if($_SESSION['productcategoryEditToken']==$_POST['ftoken'])//kiem tra token\n {\n $formData = array_merge($formData, $_POST);\n \n if($this->editActionValidator($formData, $error))//kiem tra du lieu co hop le hay khong\n {\n //Cac thong tin khong ngon ngu:\n $myProductCat->order = (int)$formData['forder'];\n $myProductCat->parentid = (int)$formData['fparentid'];\n $myProductCat->enable = (int)$formData['fenable']==1?1:0;\n if(strlen($formData['fseourl']) > 0)\n $myProductCat->seoUrl = Helper::codau2khongdau($formData['fseourl'], true);\n else\n $myProductCat->seoUrl = Helper::codau2khongdau(strip_tags($formData['fname']), true);\n //Cac thong tin lien quan ngon ngu: \n $myProductCat->name = $formData['fname']; \n $myProductCat->seoTitle = $formData['fseotitle'];\n $myProductCat->seoKeyword = $formData['fseokeyword'];\n $myProductCat->seoDescription = $formData['fseodescription'];\n \n if($myProductCat->updateData())//cap nhat database\n {\n $success[] = str_replace('###categoryname###', $myProductCat->name[$langCode], $this->registry->lang['controller']['succUpdate']);\n $this->registry->me->writelog('ProductCategoryedit', $myProductCat->id, array('name' => $myProductCat->name[$langCode], 'order' => $myProductCat->order));\n }\n else\n {\n $error[] = $this->registry->lang['controller']['errUpdate']; \n }\n }\n }\n $_SESSION['productcategoryEditToken'] = Helper::getSecurityToken();//Tao token moi\n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t\t\t$this->registry->smarty->assign(array(\t'formData' \t=> $formData,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'subcategories' => $myProductCat->getSub(true),\n\t\t\t\t\t\t\t\t\t\t\t\t\t'parentCategories' => Core_ProductCategory::getFullCategories(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t'redirectUrl'=> $redirectUrl,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'error'\t\t=> $error,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'success'\t=> $success,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t$contents .= $this->registry->smarty->fetch($this->registry->smartyControllerContainer.'edit.tpl');\n\t\t\t$this->registry->smarty->assign(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'menu'\t\t=> 'productcategorylist',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'pageTitle'\t=> $this->registry->lang['controller']['pageTitle_edit'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'contents' \t\t\t=> $contents));\n\t\t\t$this->registry->smarty->display($this->registry->smartyControllerGroupContainer . 'index.tpl');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$redirectMsg = $this->registry->lang['controller']['errNotFound'];\n\t\t\t$this->registry->smarty->assign(array('redirect' => $redirectUrl,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'redirectMsg' => $redirectMsg,\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t$this->registry->smarty->display('redirect.tpl');\n\t\t}\n\t}", "public function update(Request $request, $id)\n\n {\n\n $cat = Youtubelink::find($id);\n\n $cat->link = $request->link;\n\n $cat->save();\n\n\n\n\n Session::flash('success',\"Category Successfully Updated\");\n\n\n\n return redirect()->route('youtubes.index');\n\n }", "function update_category_detail($siteData,$category_id)\n\t{\n\t\t$this->db->where('id', $category_id);\n\t\t$this->db->update('category', $siteData); \n\t\t\n\t}", "public function update($id)\n {\n // DB::table('video_uploaded')\n // ->where ('id')\n // ->update(['video_type'=>$request['video_type'],'video_url'=>$request['video_url'], 'price'=>$request['price'], 'video'=>$request['video']\n // ]); \n // return view('reg/video_list');\n }", "public function updated(Category $category)\n {\n //\n }", "public function update(Request $request, $id)\n {\n //\n\n $this->validate($request,[\n 'name_en' => 'required|max:255',\n 'name_ar' => 'required|max:255',\n 'description_en' => 'required',\n 'description_ar' => 'required',\n 'slug_en' => 'required|max:255',\n 'slug_ar' => 'required|max:255',\n 'meta_title_en'=> 'required|max:255',\n 'meta_title_ar'=> 'required|max:255',\n// 'image_cover'=> 'required|image',\n 'status' => 'required'\n ]);\n\n $category =Category::find($id);\n if ($request->hasFile('image_cover')) {\n\n $dir = public_path().'/uploads/category/';\n $file = $request->file('image_cover');\n $fileName = str_random(6).'.'.$file->getClientOriginalExtension();\n $file->move($dir , $fileName);\n $category->image_url = $fileName;\n\n }\n $category->status = $request->status ;\n\n $category->save();\n\n $languages = Language::where('status','=','1')->get();\n foreach ($languages as $language){\n foreach($category->categoryDescription as $description){\n\n if($description->lang_id == $language->id){\n $description->name = $request->input('name_'.$language->label) ;\n $description->description = $request->input('description_'.$language->label);\n $description->slug = $request->input('slug_'.$language->label);\n $description->meta_title = $request->input('meta_title_'.$language->label);\n $description->meta_description = $request->input('meta_description_'.$language->label);\n $description->save();\n }\n }\n }\n\n session()->flash('message' , 'Category has been updated successfully');\n return redirect()->route('categories.index');\n }", "function update_category($category_id)\n {\n $this->db->update('tbl_category',$this, array('category_id'=>$category_id));\n }", "public function editAction() {\n $this->_helper->layout->setLayout('admin-simple');\n\n if (!($category_id = $this->_getParam('category_id'))) {\n die('No identifier specified');\n }\n\n //FETCH PARAMETERS ACCORDING TO THIS CATEGORY\n $reviewCategories = Engine_Api::_()->getDbtable('reviewcats', 'sitestorereview')->reviewParams($category_id);\n\n //GENERATE A FORM\n $form = $this->view->form = new Sitestorereview_Form_Admin_Ratingparameter_Edit();\n $form->setAction($this->getFrontController()->getRouter()->assemble(array()));\n\n $form->setField($reviewCategories->toArray());\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $values = $form->getValues();\n\n foreach ($values as $key => $value) {\n $reviewcat_id = explode('reviewcat_name_', $key);\n $reviewcat = Engine_Api::_()->getItem('sitestorereview_reviewcat', $reviewcat_id[1]);\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try {\n //EDIT CATEGORY NAMES\n $reviewcat->reviewcat_name = $value;\n $reviewcat->save();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array('')\n ));\n }\n\n $this->renderScript('admin-ratingparameter/edit.tpl');\n }", "public function update(){\n $facebook = $_POST['facebook'];\n $linkedin = $_POST['linkedin'];\n $twitter = $_POST['twitter'];\n $youtube = $_POST['youtube'];\n $id = $_POST['hiddenid'];\n\t\t $sql= $this->link->query(\"UPDATE category SET facebook='$facebook',linkedin='$linkedin',twitter='$twitter ',youtube='$youtube' WHERE id=$id\");\n if($sql){\n\t\t echo \"<script>alert('Link Update')</script>\";\n\t\t echo \"<script>window.location.href = './social.php'</script>\";\n exit;\n\t }\n\t}", "protected function updateCategory($req){\n if(!empty($req['parent_id'])){\n $parent_id = $req['parent_id'];\n }else{\n $parent_id=\"0\";\n }\n if(isset($req['cat_image']) && !isset($req['banner_image'])){\n $cat_image_path=public_path('category_images/Normal');\n $sort = $req['sort'];\n $cat_file_name=$this->fileUploading($cat_image_path,$req['cat_image']);\n $category=array('name'=>$req['name'],\n 'description'=>$req['desc'],\n 'parent_id'=>$parent_id,\n 'thumb_image'=>$cat_file_name,\n 'sort_order' => $sort,\n 'updated_at'=>date('Y-m-d H:i:s'));\n \n }\n else if(isset($req['banner_image']) && !isset($req['cat_image'])){\n $cat_banner_image=public_path('category_images/Banner');\n $banner_file_name=$this->fileUploading($cat_banner_image,$req['banner_image']);\n $sort = $req['sort'];\n $category=array('name'=>$req['name'],\n 'description'=>$req['desc'],\n 'parent_id'=>$parent_id,\n 'banner_image'=> $banner_file_name,\n 'sort_order' => $sort,\n 'updated_at'=>date('Y-m-d H:i:s'));\n }\n else if(isset($req['banner_image']) && isset($req['cat_image'])){\n $cat_image_path=public_path('category_images/Normal');\n $cat_file_name=$this->fileUploading($cat_image_path,$req['cat_image']);\n $sort = $req['sort'];\n $cat_banner_image=public_path('category_images/Banner');\n $banner_file_name=$this->fileUploading($cat_banner_image,$req['banner_image']);\n $category=array('name'=>$req['name'],\n 'description'=>$req['desc'],\n 'parent_id'=>$parent_id,\n 'thumb_image'=>$cat_file_name,\n 'banner_image'=> $banner_file_name,\n 'sort_order' => $sort,\n 'updated_at'=>date('Y-m-d H:i:s'));\n }else{\n $category=array('name'=>$req['name'],\n 'description'=>$req['desc'],\n 'parent_id'=>$parent_id,\n 'sort_order' => $req['sort'],\n 'updated_at'=>date('Y-m-d H:i:s'));\n }\n \n \n if($parent_id != \"0\"){\n $attribute_subcat_id = \"\";\n if($parent_id == 147){\n $attribute_subcat_id = 25;\n }elseif ($parent_id == 143) {\n $attribute_subcat_id = 26;\n }elseif ($parent_id == 78) {\n $attribute_subcat_id = 28;\n }\n $attr_arr=array(\n 'attribute_id'=>$attribute_subcat_id,\n 'option_value'=> $req['name'],\n );\n\n $isAttrExist = DB::table('attribute_options')->where('option_value', $req['name'])->first();\n if(!$isAttrExist){\n $cosplay_yes_insert=DB::table('attribute_options')->insert($attr_arr);\n }\n } \n \n $cond = array('category_id'=>$req['category_id']);\n Site_model::update_data('category',$category,$cond);\n \n if(isset($req['costume_list']) && $parent_id!=\"0\"){\n Site_model::delete_single('costume_to_category',$cond);\n foreach(array_unique($req['costume_list']) as $key=>$value){\n DB::table('costume_to_category')\n ->where('costume_id', $value)\n ->where('category_id', '!=', $req['category_id'])\n ->delete();\n $category_coustume=array('costume_id'=>$value,\n 'category_id'=>$req['category_id'],\n 'sort_no'=>$key,\n );\n Site_model::insert_get_id('costume_to_category',$category_coustume);\n }\n }\n $this->urlRewrites($req['category_id'],\"update\",$req['old_category'],$req['name'],$req['elements_change']);\n return true;\n }", "public function updateCategory($parameters,$id)\n {\n \t $this->db->update('product_category', $parameters, array('product_id' => $id));\n return true;\n }", "public function update($id)\n\t{\n\t\t$category = Category::find($id);\n\n\t\t$img = $this->save_file(Input::file('thumbnail'), 60, 25, 'categories');\n\t\tif($img == ''){\n\t\t\t$img = $category->thumbnail;\n\t\t}\n\t\t//滚动图像\n\t\t$slides = array();\n\t\tif(Input::hasFile('slides')){\n\t\t\tforeach(Input::file('slides') as $file){\n\t\t\t\t$slides[] = $this->save_file($file, 50, 14, 'categories');\n\t\t\t}\n\t\t}\n\t\t$slide = serialize($slides);\n\t\tif(empty($slides)){\n\t\t\t$slide = $category->slides;\n\t\t}\n\n\t\t$credentials = Input::except('thumbnail', 'slides');\n\t\t$credentials['thumbnail'] = $img;\n\t\t$credentials['slides'] = $slide;\n\n if( $category->update($credentials) )\n {\n return Redirect::route('admin.categories.index')\n ->with('success', Lang::get('cpanel::common.update_success'));\n }\n\n return Redirect::back()\n ->withInput()\n ->withErrors($category->errors());\n\t}", "public function category_update(){ \n\n\n if (!has_role($this->session->userdata('user_id'), 'CATEGORY_UPDATE')) {\n redirect(base_url('page_not_found'));\n }\n\n $data['parent'] = $this->input->post('parent');\n $data['last_modified'] = date(\"Y-m-d H:i:s\");\n $data['name'] = $this->input->post('name');\n \n if(!$this->category_model->is_parent_category($data['parent'])){\n\n $this->session->set_flashdata('category_save_failed', \"Failed to update sub category!!\");\n }else{\n\n \n $category_id = $this->input->post('cat_id');\n\n\n\n\n if($this->category_model->update_category($category_id, $data)){\n\n $this->logger\n ->user($this->session->userdata('user_id')) //Set UserID, who created this Action\n ->user_details($this->user_model->getUserInfoByIpAddress())\n ->type('category_update') //Entry type like, Post, Page, Entry\n ->id($category_id) //Entry ID\n ->token('UPDATE') //Token identify Action\n ->comment($this->session->userdata('name'). ' update a category.')\n ->log(); //Add Database Entry\n\n $this->session->set_flashdata('category_save_success', \"Category information Updated Successfully!!\");\n } else {\n $this->session->set_flashdata('category_save_failed', \"Category update fialied!!\");\n }\n }\n redirect(base_url('categories'));\n }", "public function modifyCategory(){\n $cookies = new CookieModel();\n $cookie_id = $cookies -> read();\n if (! $cookie_id) $this->redirect('/');\n\n\t\t$id = $_REQUEST['id'];\t\t\n\t\t$name = $_REQUEST['name'];\n\t $remark = $_REQUEST['remark'];\n $father = $_REQUEST['father'];\n\t\t$form = M('categoryinfo');\n \t//$key = 2;\n \t$condition['id'] = $id;\n \t$data = $form->where($condition)->find();\n \t//var_dump($data); \n $data['id'] = $id;\n \t$data['name'] = $name;\n\t\t$data['remark'] = $remark;\n $data['father'] = $father;\n \t//echo $data;\n\t\t$result = $form->save($data);\n\t\t$this->redirect('/index.php/Admin/dish');\n\t\t\t\t\t\t//\telse {$this->error('修改失败');}\n\t\t}", "public function postEdit($video)\n\t{\n\n // Declare the rules for the form validation\n $rules = array(\n 'user' => 'required|min:5',\n 'link' => 'required|min:10',\n 'description' => 'required|min:10'\n );\n\n // Validate the inputs\n $validator = Validator::make(Input::all(), $rules);\n\n // Check if the form validates with success\n if ($validator->passes())\n {\n // Update the video video data\n $video->user = Input::get('user');\n $video->link = Input::get('link');\n $video->description = Input::get('description');\n // Was the video video updated?\n if($video->save())\n {\n // Redirect to the new video video page\n return Redirect::to('admin/videos/' . $video->id . '/edit')->with('success', Lang::get('admin/videos/messages.update.success'));\n }\n\n // Redirect to the videos video management page\n return Redirect::to('admin/videos/' . $video->id . '/edit')->with('error', Lang::get('admin/videos/messages.update.error'));\n }\n\n // Form validation failed\n return Redirect::to('admin/videos/' . $video->id . '/edit')->withInput()->withErrors($validator);\n\t}", "public function edit(Category $Category)\n {\n //\n }", "public function actionUpdate($id)\n { $this->layout='inner';\n $model = $this->findModel($id);\n $vendor = ArrayHelper::map(User::find()->where(['usertype'=>'Vendor'])->all(), 'id', 'username');\n $cat_list = ArrayHelper::map(ProductCategory::find()->where(['parent_id'=>'0'])->all(), 'id', 'cat_name');\n $cat= ProductCat::find()->Where(['product_id'=>$id])->one();\n $query=$this->fetchChildCategories($cat['category_id']);\n $str=rtrim($this->sam, \"|\");\n $str_data=explode(\"|\",$str);\n if($str_data>0){ \n // $str_data[]=$cat['category_id'];\n } \n // print_r($str_data); die;\n if ($model->load(Yii::$app->request->post())) {\n //$last_cat=end($_POST['Product']['category_id']); \n if($model->save()){\n //$sql=\"update product_cat set category_id = '\".$last_cat .\"' WHERE product_id='\".$model->id.\"'\";\n //Yii::$app->db->createCommand($sql)->execute();\n /*$product_cat= new ProductCat();\n $product_cat->product_id=$model->id;\n $product_cat->category_id=$last_cat;\n $product_cat->save();*/\n //Yii::$app->getSession()->setFlash('success','successful updated');\n return $this->redirect(['add-search-terms','id'=>$id]);\n }\n } else {\n return $this->render('update', [\n 'model' => $model,\n 'cat'=>$str_data,\n 'vendor'=>$vendor,\n 'cat_list'=>$cat_list,\n\n ]);\n }\n }", "public function edit(BlogCategory $blogCategory)\n {\n //\n }", "function editMainCategory()\n\t{ \n\t\t$id=$_GET['prodid'];\n\n\t\tif(((int)$id)>0)\n\t\t{\n\t\t\t$sql='select * from products_table where product_id='.$id;\n\t\t\t\n\t\t\t$obj=new Bin_Query();\n\t\t\t\n\t\t\t$obj->executeQuery($sql);\n\t\t\t\n\t\t\t$sqlid=\"SELECT category_id,category_parent_id FROM category_table where category_id in(select category_id from products_table where category_id='\".$obj->records[0]['category_id'].\"')\";\n\t\t\t\n\t\t\t$query=new Bin_Query();\n\t\t\t\n\t\t\t$query->executeQuery($sqlid);\n\t\t\t\n\t\t\t$sql1 = \"SELECT category_id,category_name FROM category_table where category_parent_id=0\";\n\t\t\n\t\t\t$query1 = new Bin_Query();\n\t\t\n\t\t\t$query1->executeQuery($sql1);\n\t\t\n\n\t\t\treturn Display_DManageProducts::displayCategory($query1->records,$query->records[0]['category_id']);\n\t\t\t\n\t\t// \t\t\treturn $category;\n\t }\n\t}", "public function edit(Video $video)\n { \n\n $categories = Category::pluck('name', 'id');\n\n return view('admin.videos.edit', compact('video', 'categories'));\n }", "public function edit_category($id)\n\t{\n\t\t$query=$this->General_model->show_data_id('categories',$id,'category_Id','get','');\n $data['category']=$query; \n\t\t$data['title']=\"Dahboard || Great Wine Global\";\n $this->load->view('superpanel/header',$data);\n $this->load->view('superpanel/edit_categorie');\n $this->load->view('superpanel/footer');\n\t}", "public function update_category($id)\n\t{\n\t\t$config = array(\n 'upload_path' => \"uploads/category/\",\n 'upload_url' => base_url() . \"uploads/category/\",\n 'allowed_types' => \"gif|jpg|png|jpeg\"\n );\n\n $this->load->library('upload', $config);\n $category_name=ucwords(strtolower($this->input->post('category_name')));\n if($this->upload->do_upload('userfile')) {\n\n $data['userfile'] = $this->upload->data();\n $filename = $data['userfile']['file_name'];\n\t\t \n $datalist = array( \n 'category_img' => base_url().'uploads/category/'.$filename, \n 'meta_keyword' => $this->input->post('meta_keyword'),\n 'meta_description' => $this->input->post('meta_description'),\n 'category_name'=> $this->input->post('category_name'),\n\t\t\t\t'category_description'=> $this->input->post('category_description'), \n 'category_slug' => $this->input->post('category_slug'),\n 'status'=>$this->input->post('status'), \n );\n }else{\n $datalist = array( \n 'meta_keyword' => $this->input->post('meta_keyword'),\n 'meta_description' => $this->input->post('meta_description'),\n 'category_name'=> $this->input->post('category_name'),\n\t\t\t\t'category_description'=> $this->input->post('category_description'), \n 'category_slug' => $this->input->post('category_slug'),\n 'status'=>$this->input->post('status'),\n );\n } \n\n $query= $this->General_model->show_data_id('categories',$id,'category_Id','update',$datalist);\n $this->session->set_flashdata('success', 'Product category Updated successfully.');\n redirect('superpanel/categorie');\n\t}", "public function update_category ($data) {\n\t\t$slug = \\Illuminate\\Support\\Str::slug($data->category, '-');\n\t\t$category = Category::find($data->category_id);\n\t\t$category->category = $data->category;\n\t\t$category->slug = $slug;\n\t\t$category->description = $data->description;\n\n\t\t$category->save();\n\t\treturn true;\n\t}", "public function edit($id = 0)\n\t{\t\n\t\t// Get the channel\n\t\t$channel = $this->video_channel_m->get($id);\n\t\t\n\t\t// ID specified?\n\t\t$channel or redirect('admin/video/channels/index');\n\t\t\n\t\t// Validate the results\n\t\tif ($this->form_validation->run())\n\t\t{\n\t\t\t$input = array(\n\t\t\t\t'title' => $this->input->post('title'),\n\t\t\t\t'description' => $this->input->post('description'),\n\t\t\t\t'parent_id' => $this->input->post('parent_id'),\n\t\t\t);\n\t\t\t\n\t\t\tif ( ! empty($_FILES['thumbnail']['name']))\n\t\t\t{\n\t\t\t\tif ( ! self::_upload())\n\t\t\t\t{\n\t\t\t\t\t$this->template->messages = array('error' => $this->upload->display_errors());\n\t\t\t\t\tgoto display;\n\t\t\t\t}\n\n\t\t\t\tif ( ! self::_resize())\n\t\t\t\t{\n\t\t\t\t\t$this->template->messages = array('error' => $this->image_lib->display_errors());\n\t\t\t\t\tgoto display;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$thumbnail = $this->upload->data();\n\t\t\t\t$input['thumbnail'] = $thumbnail['file_name'];\n\t\t\t}\n\t\t\t\n\t\t\t$this->video_channel_m->update($id, $input)\n\t\t\t\t? $this->session->set_flashdata('success', sprintf( lang('video_channel:edit_success'), $this->input->post('title')) )\n\t\t\t\t: $this->session->set_flashdata(array('error'=> lang('video_channel:edit_error')));\n\t\t\t\n\t\t\tredirect('admin/videos/channels');\n\t\t}\n\t\t\n\t\tdisplay:\n\t\t\n\t\t// Loop through each rule\n\t\tforeach ($this->validation_rules as $rule)\n\t\t{\n\t\t\tif ($this->input->post($rule['field']) !== FALSE)\n\t\t\t{\n\t\t\t\t$channel->{$rule['field']} = $this->input->post($rule['field']);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$channels = array(lang('select.none')) + $this->video_channel_m->order_by('title')->where('parent_id', 0)->dropdown('id', 'title');\n\n\t\t$this->template->title($this->module_details['name'], sprintf(lang('video_channel:edit_title'), $channel->title))\n\t\t\t->set('channel', $channel)\n\t\t\t->set('channels', $channels)\n\t\t\t->build('admin/channels/form', $this->data);\n\t}", "public function edit(CourseCategory $courseCategory)\n {\n //\n }", "function multi_entry_category_update()\n\t{\n\t\tif ( ! $this->cp->allowed_group('can_access_content'))\n\t\t{\n\t\t\tshow_error($this->lang->line('unauthorized_access'));\n\t\t}\n\n\t\tif ($this->input->get_post('entry_ids') === FALSE OR $this->input->get_post('type') === FALSE)\n\t\t{\n\t\t\treturn $this->dsp->no_access_message($this->lang->line('unauthorized_to_edit'));\n\t\t}\n\n\t\tif ($this->input->get_post('category') === FALSE OR ! is_array($_POST['category']) OR count($_POST['category']) == 0)\n\t\t{\n\t\t\treturn $this->output->show_user_error('submission', $this->lang->line('no_categories_selected'));\n\t\t}\n\n\t\t/** ---------------------------------\n\t\t/**\t Fetch categories\n\t\t/** ---------------------------------*/\n\n\t\t// We do this first so we can destroy the category index from\n\t\t// the $_POST array since we use a separate table to store categories in\n\t\t\n\t\t$this->api->instantiate('channel_categories');\n\n\t\tforeach ($_POST['category'] as $cat_id)\n\t\t{\n\t\t\t$this->api_channel_categories->cat_parents[] = $cat_id;\n\t\t}\n\n\t\tif ($this->api_channel_categories->assign_cat_parent == TRUE)\n\t\t{\n\t\t\t$this->api_channel_categories->fetch_category_parents($_POST['category']);\n\t\t}\n\n\t\t$this->api_channel_categories->cat_parents = array_unique($this->api_channel_categories->cat_parents);\n\n\t\tsort($this->api_channel_categories->cat_parents);\n\n\t\tunset($_POST['category']);\n\n\t\t$ids = array();\n\n\t\tforeach (explode('|', $_POST['entry_ids']) as $entry_id)\n\t\t{\n\t\t\t$ids[] = $this->db->escape_str($entry_id);\n\t\t}\n\n\t\tunset($_POST['entry_ids']);\n\n\t\t$entries_string = implode(\"','\", $ids);\n\n\t\t/** -----------------------------\n\t\t/**\t Get Category Group IDs\n\t\t/** -----------------------------*/\n\t\t$query = $this->db->query(\"SELECT DISTINCT exp_channels.cat_group FROM exp_channels, exp_channel_titles\n\t\t\t\t\t\t\t WHERE exp_channel_titles.channel_id = exp_channels.channel_id\n\t\t\t\t\t\t\t AND exp_channel_titles.entry_id IN ('\".$entries_string.\"')\");\n\n\t\t$valid = 'n';\n\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\t$valid = 'y';\n\t\t\t$last = explode('|', $query->row('cat_group') );\n\n\t\t\tforeach($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$valid_cats = array_intersect($last, explode('|', $row['cat_group']));\n\n\t\t\t\tif (count($valid_cats) == 0)\n\t\t\t\t{\n\t\t\t\t\t$valid = 'n';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($valid == 'n')\n\t\t{\n\t\t\treturn $this->dsp->show_user_error($this->lang->line('no_category_group_match'));\n\t\t}\n\n\t\t/** -----------------------------\n\t\t/**\t Remove Valid Cats, Then Add...\n\t\t/** -----------------------------*/\n\n\t\t$valid_cat_ids = array();\n\t\t$query = $this->db->query(\"SELECT cat_id FROM exp_categories\n\t\t\t\t\t\t\t WHERE group_id IN ('\".implode(\"','\", $valid_cats).\"')\n\t\t\t\t\t\t\t AND cat_id IN ('\".implode(\"','\", $this->api_channel_categories->cat_parents).\"')\");\n\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\tforeach($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$this->db->query(\"DELETE FROM exp_category_posts WHERE cat_id = \".$row['cat_id'].\" AND entry_id IN ('\".$entries_string.\"')\");\n\t\t\t\t$valid_cat_ids[] = $row['cat_id'];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->input->get_post('type') == 'add')\n\t\t{\n\t\t\t$insert_cats = array_intersect($this->api_channel_categories->cat_parents, $valid_cat_ids);\n\t\t\t// How brutish...\n\t\t\tforeach($ids as $id)\n\t\t\t{\n\t\t\t\tforeach($insert_cats as $val)\n\t\t\t\t{\n\t\t\t\t\t$this->db->query($this->db->insert_string('exp_category_posts', array('entry_id' => $id, 'cat_id' => $val)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t/** ---------------------------------\n\t\t/**\t Clear caches if needed\n\t\t/** ---------------------------------*/\n\n\t\tif ($this->config->item('new_posts_clear_caches') == 'y')\n\t\t{\n\t\t\t$this->functions->clear_caching('all');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->functions->clear_caching('sql');\n\t\t}\n\t\t\n\t\t$this->session->set_flashdata('message_success', $this->lang->line('multi_entries_updated'));\n\t\t$this->functions->redirect(BASE.AMP.'C=content_edit');\n\t}", "function update_category_detail($siteData, $category_id) {\n $this->db->where('id', $category_id);\n $this->db->update('category', $siteData);\n }" ]
[ "0.70255893", "0.68039304", "0.67580926", "0.67113507", "0.67026937", "0.6621358", "0.65880543", "0.6528769", "0.6527254", "0.6502974", "0.6494821", "0.64577454", "0.6449746", "0.6443463", "0.64407146", "0.64304763", "0.6426913", "0.63906366", "0.63733435", "0.63481635", "0.63481635", "0.63345647", "0.63203114", "0.6311294", "0.6307293", "0.6283688", "0.62724113", "0.6236646", "0.6193586", "0.6192923", "0.6168221", "0.6160371", "0.61546195", "0.6153729", "0.612934", "0.61283535", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61269826", "0.61259866", "0.6123249", "0.60976255", "0.60945845", "0.6093175", "0.6083225", "0.60766476", "0.6066647", "0.60622525", "0.60558325", "0.60440016", "0.6040163", "0.6038051", "0.6033371", "0.603217", "0.6025314", "0.59864825", "0.59827524", "0.597595", "0.5975741", "0.5973134", "0.59704715", "0.5970146", "0.596766", "0.5954923", "0.5947535", "0.5944779", "0.59410393", "0.593783", "0.5929354", "0.59258574", "0.59219867", "0.5919664", "0.59167546", "0.59160024", "0.5902735", "0.5901649", "0.5899081", "0.5896066", "0.58950824", "0.5891532", "0.589152", "0.58867913" ]
0.7049841
0
/Edit Nutration Category Function for update
/Редактировать функцию категорий питательных веществ для обновления
public function updateNutrationCategory(Request $request) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $this->validate($request,array( 'name' => 'required', 'tips' => 'required', )); $id = $request->id; $nutrationCategory = NutrationCategory::find($id); $nutrationCategory->nutration_category_name = $request->name; $nutrationCategory->tips = $request->tips; $nutrationCategory->save(); Session::flash('success','Nutration Category Updated succcessfully.'); return redirect()->back()->with('workout',$nutrationCategory); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateItemSubCategory()\n {\n }", "public function updateCategory()\n {\n Category::findOrFail($this->category_id)->update([\n 'category_name' => $this->categoryName,\n 'slug' => Str::slug($this->categoryName),\n 'class' => $this->class,\n\n ]);\n }", "public function updateCate()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$category = $_POST['upcategory'];\n\t\t\t$category_id = $_POST['upcategory_id'];\n\t\t\t$sql = \" update lib_book_species set category = '{$category}' where category in \n\t\t\t\t\t(select category from lib_category where category_id = {$category_id});\n\t\t\t\t\tupdate lib_category set category='\" . $category . \"' where category_id='\" . $category_id . \"';\n\t\t\t\t\t\";\n\t\t\t$cate = D('Category');\n\t\t\t$return = $cate->execute($sql);\n\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'Modify successfully!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'SQL Error!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function testUpdateCategoryUsingPUT()\n {\n }", "function sensible_category() {\n wp_update_term(1, 'category', array(\n 'name' => 'News',\n 'slug' => 'news', \n 'description' => 'News'\n ));\n }", "public function update_assets_category() {\n\t\n\t\tif($this->input->post('edit_type')=='assets_category') {\t\t\n\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t$Return = array('result'=>'', 'error'=>'', 'csrf_hash'=>'');\n\t\t\t\n\t\t$id = $this->uri->segment(4);\n\t\t$Return['csrf_hash'] = $this->security->get_csrf_hash();\n\t\t\t\n\t\t/* Server side PHP input validation */\t\t\n\t\tif($this->input->post('name')==='') {\n \t$Return['error'] = $this->lang->line('xin_error_cat_name_field');\n\t\t}\n\t\t\t\t\t\t\n\t\tif($Return['error']!=''){\n \t\t$this->output($Return);\n \t}\n\t\t\n\t\t// set data\n\t\t$data = array(\n\t\t'category_name' => $this->input->post('name')\n\t\t);\n\t\t\n\t\t$result = $this->Assets_model->update_assets_category_record($data,$id);\n\t\tif ($result == TRUE) {\n\t\t\t$Return['result'] = $this->lang->line('xin_success_assets_category_updated');\n\t\t} else {\n\t\t\t$Return['error'] = $this->lang->line('xin_error_msg');\n\t\t}\n\t\t$this->output($Return);\n\t\texit;\n\t\t}\n\t}", "function edit(category $category)\n {\n $query = \"UPDATE categories SET name = '$category->name', \n tag = '$category->tag', description = '$category->description', slug = '$category->slug', active = '$category->active' WHERE categories_id = $category->category_id\";\n $result = $this->db->update($query);\n }", "public function update_cat_att()\n\t\t{\n\t\t\t$id=$this->input->post('cat_id');\n\t\t\t$cat_name=$this->input->post('cat_edit_name');\n\t\t\t$update=$this->db->where(\"f_att_id\",$id)->update('food_attribute',array(\"f_att_name\"=>$cat_name));\n\t\t\tif($update)\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\t}", "public function editCategory()\r\n{\r\n $query_string = \"UPDATE categories \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"categoryname = :categoryname, \";\r\n $query_string .= \"categorydescription = :categorydescription \";\r\n $query_string .= \"WHERE categoryid = :categoryid\";\r\n\r\n return $query_string;\r\n}", "function product_category_edit(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u, $fs;\n\t\t\n\t\t$data = $_r['data'];\n\t\t$data['id'] = $_r['id'];\n\t\t\n\t\tif($data['save'] || $data['apply']){\n\t\t\tif(!$data['title']) $error['title'] = true;\n\t\t\tif(count($error)==0){\n\t\t\t\t$set = array();\n\t\t\t\t$set[] = \"title = '\".add_slash($data['title']).\"'\";\n\t\t\t\t$set[] = \"language_id = '1'\";\n\t\t\t\t$set[] = \"category_id = '0'\";\n\t\t\t\t\n\t\t\t\t$set = implode(', ', $set);\n\t\t\t\tif($data['id']){\n\t\t\t\t\tmysql_q(\"UPDATE product_category SET $set WHERE id = '\".add_slash($data['id']).\"'\");\n\t\t\t\t} else {\n\t\t\t\t\t$data['id'] = mysql_q(\"INSERT INTO product_category SET $set\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($data['save']){\n\t\t\t\t\tredirect(\"product_category.htm\", \"\");\n\t\t\t\t} else{\n\t\t\t\t\tredirect(\"product_category-edit-\".$data['id'].\".htm\", \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else if($data['cancel']) {\n\t\t\tredirect(\"product_category.htm\", \"\");\n\t\t}\n\n\t\t$fields = \"\n\t\t[hidden name='id']\n\t\t[input name='title' label='Category Title' error='Please Enter Category Title']\n\t\t[sac class='']\n\t\t\";\n\t\t\n\t\tif(!$data['save'] && $data['id']){\n\t\t\t$data = mysql_q(\"SELECT * FROM product_category WHERE id='\".add_slash($data['id']).\"'\", \"single\");\n\t\t}\n\n\t\t$tpl->assign(\"data\", $data);\n\t\t\n\t\t$form = new form();\n\t\t$form->add($fields);\n\t\t$tpl->assign(\"form1\", $form->build());\n\t\t\n\t\t$main['content'] = $tpl->fetch(\"admin_product_category_edit.tpl\");\n\t\tdisplay($main);\n\t}", "function wp_update_category($catarr)\n {\n }", "function update_category($category_id)\n {\n $this->db->update('tbl_category',$this, array('category_id'=>$category_id));\n }", "private function update($cat){\r\n\t\tif(!$this->acceptUpdates) return;//do not allow health coach to change answers\r\n\t\tif(!isset($this->categories[$cat])) throw new Exception(\"Invalid category\");\r\n\r\n\t\t$sql=\"UPDATE `u_mod_ifocus` SET \";\r\n\t\t$comma=false;\r\n\t\tforeach($this->data[$cat] as $key=>$value){\r\n\t\t\tif($comma) $sql.=\" , \";\r\n\t\t\t$sql.=\"`\".$key.\"`='\".$this->dbOb->escape_string($value).\"'\";\r\n\t\t\t$comma=true;\r\n\t\t}\r\n\t\tif(!$comma) return; //cant update a section we have no data for\r\n\t\tif(!$this->id) return; //can't update a record we haven't loaded\r\n\r\n\t\t$sql .= \", last_completed = '\" . $cat . \"'\";\r\n\r\n\t\tif($cat==\"biometric_data\"){\r\n\t\t\tif(!$this->isCompleted()) $sql.=\", date_completed=NOW() \";\r\n\t\t\t//upon completion reward points for Health Assessment Questions\r\n\t\t\t$im=new IncentivePointsModel();\r\n\t\t\tif($this->data[\"preventative_health\"][\"q12\"]==1){\r\n\t\t\t\t$im->addIncentivePointMA(\"IFocusModel\",\"FluShot\");\r\n\t\t\t}\r\n\t\t\t$im->addIncentivePointMA(\"IFocusModel\",\"Complete\");\r\n\t\t}\r\n\r\n\t\t$sql .= \" ,date_updated=NOW() WHERE id = '\" . $this->data['id'] . \"'\";\r\n\t\t$this->dbOb->update($sql);\r\n\t}", "function modifyCategory()\n{\n global $connection;\n global $updateCategorySuccess, $updateCategoryError;\n $updateCategorySuccess = $updateCategoryError = '';\n\n if (isset($_POST['btn_save_category'])) {\n $category_id = $_POST['txt_userid'];\n\n $updateColumncategory = '';\n\n $category_name = htmlentities($_POST['category_name']);\n if (!empty($category_name)) {\n $updateColumncategory .= \"category = '$category_name',\";\n }\n\n $updateColumncategory = rtrim($updateColumncategory, ',');\n\n $query_update = \"UPDATE product_category SET $updateColumncategory WHERE id_category = '$category_id'\";\n $result_update = mysqli_query($connection, $query_update);\n\n if ($result_update) {\n $updateCategorySuccess = '<script language=\"javascript\">\n swal(\"Sukses!\", \"Kategoria u modifikua me sukses!\", \"success\")\n </script>';\n } else {\n $updateCategoryError = '<script language=\"javascript\">\n swal(\"Gabim!\", \"Ka ndodhur një gabim gjatë modifikimit të kategorisë! Provoni përsëri!\", \"error\")\n </script>';\n }\n }\n}", "function edit_category() {\r\n\r\n\tif(isset($_POST['editcategory'])){\r\n\r\n\t\t$cat_id\t\t\t\t= clean_input($_GET['cat_id']);\r\n\t\t$cat_name \t\t\t= clean_input($_POST['cat_name']);\r\n\t\t$cat_desc_short \t= clean_input($_POST['cat_desc_short']);\r\n\t\t$cat_desc_long \t\t= clean_input($_POST['cat_desc_long']);\r\n\t\t$cat_parent_id \t\t= clean_input($_POST['cat_parent_id']);\r\n\t\t$cat_url \t\t\t= clean_input($_POST['cat_url']);\r\n\t\t$cat_date \t\t\t= clean_input($_POST['cat_date']);\r\n\t\t$cat_mod \t\t\t= clean_input($_POST['cat_mod']);\r\n\t\t$page_template \t\t= clean_input($_POST['page_template']);\r\n\t\t$cat_mod_by \t\t= clean_input($_SESSION['userid']);\r\n\t\t$cat_meta_title \t\t\t= clean_input($_POST['cat_meta_title']);\r\n\t\t$cat_meta_keywords \t\t\t= clean_input($_POST['cat_meta_keywords']);\r\n\t\t$cat_meta_description \t\t= clean_input($_POST['cat_meta_description']);\r\n\t\t$insert_keywords\t \t\t= clean_input($_POST['insert_keywords']);\t\t\t\r\n\r\n\t\t$xyquery = \"UPDATE categories SET \";\r\n\t\t$xyquery .= \"cat_name = '$cat_name',\";\r\n\t\t$xyquery .= \"cat_desc_short = '$cat_desc_short'\";\r\n\t\t$xyquery .= \",cat_desc_long = '$cat_desc_long'\";\r\n\t\t$xyquery .= \",cat_parent_id = '$cat_parent_id'\";\r\n\t\t$xyquery .= \",cat_url = '$cat_url'\";\r\n\t\t$xyquery .= \",cat_mod = '$cat_mod'\";\r\n\t\t$xyquery .= \",cat_mod_by = '$cat_mod_by'\";\r\n\t\t$xyquery .= \",page_template = '$page_template'\";\r\n\t\t$xyquery .= \",cat_meta_title = '$cat_meta_title'\";\r\n\t\t$xyquery .= \",cat_meta_keywords = '$cat_meta_keywords'\";\r\n\t\t$xyquery .= \",cat_meta_description = '$cat_meta_description'\";\r\n\t\t$xyquery .= \",insert_keywords = '$insert_keywords'\";\t\t\t\t\r\n\t\t$xyquery .= \"WHERE cat_id = '$cat_id'\";\r\n\r\n\t\t$xyresult = mysql_query($xyquery) or die(mysql_error());\r\n\r\n\t\t//echo \"<center><h4>The category \".$cat_name.\" been edited!</h4></center>\";\r\n?>\r\n<script>\r\n$(document).ready(function() {\r\n\t$(\"<p>NOTICE:</p><p>The category <?= $cat_name;?> has been modified.</p>\").appendTo(\"#xyalert\");\r\n\t$(\"#xyalert\").fadeIn(200).delay(1500).fadeOut(200);\r\n});\r\n</script>\r\n<?\r\n\t\treturn $xyresult;\r\n\t}\r\n}", "public function modifyCategory(){\n $cookies = new CookieModel();\n $cookie_id = $cookies -> read();\n if (! $cookie_id) $this->redirect('/');\n\n\t\t$id = $_REQUEST['id'];\t\t\n\t\t$name = $_REQUEST['name'];\n\t $remark = $_REQUEST['remark'];\n $father = $_REQUEST['father'];\n\t\t$form = M('categoryinfo');\n \t//$key = 2;\n \t$condition['id'] = $id;\n \t$data = $form->where($condition)->find();\n \t//var_dump($data); \n $data['id'] = $id;\n \t$data['name'] = $name;\n\t\t$data['remark'] = $remark;\n $data['father'] = $father;\n \t//echo $data;\n\t\t$result = $form->save($data);\n\t\t$this->redirect('/index.php/Admin/dish');\n\t\t\t\t\t\t//\telse {$this->error('修改失败');}\n\t\t}", "public function update(Request $request ,Category $update){\n $update -> category_name_en = $request -> blog_category_name_en;\n $update -> category_name_lng = $request -> blog_category_name_lng;\n $update -> category_name_en_slug = strtolower(str_replace(' ' , '-' , $request -> blog_category_name_en));\n $update -> category_name_lng_slug = str_replace(' ' , '-' , $request -> blog_category_name_lng);\n $update -> update();\n return true;\n }", "public function editCategory($editCategory) {\n if (isset($editCategory)) {\n\n $data = array(\n 'name' => $editCategory['name'],\n 'support_emails' => $editCategory['support_emails'],\n 'quantity_enabled' => $editCategory['quantity_enabled']\n );\n \n if (isset($editCategory['supplier_user'])) {\n $data['supplier_user'] = $editCategory['supplier_user'];\n }\n \n if (isset($editCategory['custom_fields'])) {\n $data['custom_fields'] = $editCategory['custom_fields'];\n } else {\n $data['custom_fields'] = NULL;\n }\n $this->db->where('id', $editCategory['category_id']);\n $this->db->update('categories', $data);\n return TRUE;\n } else {\n return False;\n }\n }", "public function category_update(){ \n\n\n if (!has_role($this->session->userdata('user_id'), 'CATEGORY_UPDATE')) {\n redirect(base_url('page_not_found'));\n }\n\n $data['parent'] = $this->input->post('parent');\n $data['last_modified'] = date(\"Y-m-d H:i:s\");\n $data['name'] = $this->input->post('name');\n \n if(!$this->category_model->is_parent_category($data['parent'])){\n\n $this->session->set_flashdata('category_save_failed', \"Failed to update sub category!!\");\n }else{\n\n \n $category_id = $this->input->post('cat_id');\n\n\n\n\n if($this->category_model->update_category($category_id, $data)){\n\n $this->logger\n ->user($this->session->userdata('user_id')) //Set UserID, who created this Action\n ->user_details($this->user_model->getUserInfoByIpAddress())\n ->type('category_update') //Entry type like, Post, Page, Entry\n ->id($category_id) //Entry ID\n ->token('UPDATE') //Token identify Action\n ->comment($this->session->userdata('name'). ' update a category.')\n ->log(); //Add Database Entry\n\n $this->session->set_flashdata('category_save_success', \"Category information Updated Successfully!!\");\n } else {\n $this->session->set_flashdata('category_save_failed', \"Category update fialied!!\");\n }\n }\n redirect(base_url('categories'));\n }", "public function edit_category() {\n $data['pageName'] = $this->pageName . ' : Edit Category';\n $get = $this->uri->uri_to_assoc();\n \n //If no id found\n if(!isset($get['id'])){\n $this->session->set_flashdata('info_message', '<span class=\"error-alert\">No content found</span>');\n redirect('admin/static_pages/home', \"location\");\n exit();\n }\n \n $category_id = $get['id'];\n $where_clause = array('category_id' => $category_id);\n $categoryRS = $this->User_model->get_category($where_clause);\n\n\n if (!$categoryRS) {\n $this->session->set_flashdata('info_message', '<span class=\"error-alert\">Content not available. Please try again later.</span>');\n redirect('admin/category/home', \"location\");\n exit();\n }\n \n $category = $categoryRS[0];\n $data['category'] = $category;\n \n //After posting save data\n if(isset($_POST['category_id']) && !empty($_POST['category_id'])) {\n \n $pst_category_id = addslashes($_POST['category_id']);\n $isCategoryAdded = $this->User_model->update_category($pst_category_id);\n \n if(!$isCategoryAdded) {\n $this->session->set_flashdata('info_message', '<span class=\"error-alert\">Unable to update the record</span>');\n }\n else{\n $this->session->set_flashdata('info_message', 'Record updated successfull!');\n redirect('admin/category/home', \"location\");\n }\n }\n $this->load->view('admin/category/edit_view', $data); \n }", "public function update_category(){\n $query = \"UPDATE {$this->table} SET cat_title = :cat_title WHERE {$this->table}.cat_id = :cat_id\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(':cat_title',$this->cat_title);\n $stmt->bindParam(':cat_id',$this->cat_id);\n $stmt->execute();\n return $stmt;\n }", "function saveCat()\n {\n //update stuff\n }", "public function categories_update($param = null)\r\n {\r\n if (isset($_POST[\"cat_id\"]) && !empty($_POST[\"cat_id\"])) {\r\n $action = $_POST[\"cat_id\"];\r\n $newValue = $_POST[\"cat_descr\"];\r\n $update = Category::find($action)->update(['cat_descr' => $newValue]);\r\n echo $update;\r\n\r\n } else {\r\n echo json_encode([\"error\" => \"ERROR\"]);\r\n }\r\n }", "public function update()\n\t{\n\t\t$input = \\Input::all();\n\n\t\t$category = Category::findOrFail($input.id);\n\n\t\tif($category){\n\t\t\t$category->name = $input.name;\n\t\t\t$result = $category->save();\n\t\t}\n\n\t\tif($result){\n\t\t\treturn \"true\";\n\t\t}\n\t\treturn \"false\";\n\t}", "function category_edit($id)\n\t{\n\t\tglobal $db;\n\t\t$ccnoprice = $_POST['ccnoprice'];\n\t\t$sSQL = \"UPDATE \".PREFIX.\"categories SET ccnoprice='\".$ccnoprice.\"', ccTemplate='\".mysql_real_escape_string($_POST['ccTemplate']).\"' WHERE id=\".$id;\n\t\t$db->query($sSQL);\n\t}", "public function edit_category($category) {\n $this->category();\n $categories_sql_string = \"SELECT * FROM category WHERE id = \" . $category . \" limit 1\";\n $connection = new Database(\"sbrettsc_db\");\n $menu_array = $connection->get_array_from_query($categories_sql_string);\n $data = array(\"menu_array\" => array_shift($menu_array));\n\n $this->loadView(\"editors/category_editor\", $data);\n }", "function editChoiceCategory($data,$id){\n\t\t$this->db->where('choice_category_id',$id);\n\t\t$query = $this->db->update(\"tbl_choice_category\",$data);\n\t\treturn $this->db->affected_rows();\n\t}", "function fm_update_category($name, $catid = NULL, $groupid = 0) {\r\n\tglobal $USER;\r\n\t\r\n\tif ($catid != NULL) {\r\n\t\t$update->id = $catid;\r\n\t\t$update->name = $name;\r\n\t\t$update->timemodified = time();\r\n\t\tif (!update_record('fmanager_categories', $update)) {\r\n\t\t\terror(get_string(\"errnoupdate\",'block_file_manager'));\r\n\t\t}\r\n\t} else {\r\n\t\t$new->name = $name;\r\n\t\tif ($groupid == 0){\r\n\t\t\t$new->owner = $USER->id;\r\n\t\t\t$new->ownertype = OWNERISUSER;\r\n\t\t} else {\r\n\t\t\t$new->owner = $groupid;\r\n\t\t\t$new->ownertype = OWNERISGROUP;\r\n\t\t}\r\n\t\t$new->timemodified = time();\r\n\t\tif (!insert_record('fmanager_categories', $new)) {\r\n\t\t\terror(get_string(\"errnoinsert\",'block_file_manager'));\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}", "public function updateForm()\n{\n\n $listeCatgories = $this->model->getCategories();\n $new = $this->model->getNew();\n $this->view->updateForm($new,$listeCatgories);\n}", "public function update(Tax $category): void\n {\n }", "function update_category_detail($siteData,$category_id)\n\t{\n\t\t$this->db->where('id', $category_id);\n\t\t$this->db->update('category', $siteData); \n\t\t\n\t}", "public function updated(Category $category)\n {\n //\n }", "public function update(){\n $service_category = new OsServiceCategoryModel($this->params['service_category']['id']);\n $service_category->set_data($this->params['service_category']);\n if($service_category->save()){\n $response_html = __('Service Category Updated. ID: ', 'latepoint') . $service_category->id;\n $status = LATEPOINT_STATUS_SUCCESS;\n }else{\n $response_html = $service_category->get_error_messages();\n $status = LATEPOINT_STATUS_ERROR;\n }\n if($this->get_return_format() == 'json'){\n $this->send_json(array('status' => $status, 'message' => $response_html));\n }\n }", "public function update()\n {\n $model = $this->model()::findOrFail(request('_id'));\n $data = array_merge(request()->all(), ['slug' => request('name')]);\n $category = $model->update($data);\n return redirect()->route('admin.'.$this->table().'.index');\n }", "function edit_category($tbl_name){\n\t\t//print_r($_POST); die;\n\t\tunset($_POST['submitLog']);\n\t\t$this->db->where('id', $_POST['id']);\n\t\tunset($_POST['id']);\n\t\t$this->db->update($tbl_name,$_POST);\n\t\t// print_r($this->db->last_query());\n\t // die();\n\t}", "function editCategory($category, $id) {\n $data = [\n 'name' => $_POST['name'],\n 'description' => $_POST['description']\n ];\n\n $stmt = $category->update($id, $data);\n header('location: confirm.php?action=Category&type=update&query='.$stmt);\n}", "public function updateCategory(){\n\t\t \n\t\t$file_id = $this->category_model->updateCategory($_POST['id'],$_POST['name']);\n\t\t echo $file_id;\n\t\t\t\t\n }", "function update_utility_bill_category($utility_bill_category_id = '')\n\t{\n\t\t$data['name']\t\t\t\t\t=\t$this->input->post('name');\n\t\t$data['timestamp']\t\t\t\t=\ttime();\n\t\t$data['updated_by']\t\t\t\t=\t$this->session->userdata('user_id');\n\n\t\t$this->db->where('utility_bill_category_id', $utility_bill_category_id);\n\t\t$this->db->update('utility_bill_category', $data);\n\n\t\t$this->session->set_flashdata('success', 'Utility bill category has been updated successfully.');\n\n\t\tredirect(base_url() . 'utility_bill_categories', 'refresh');\n\t}", "public function edit(Category $category) {\n //not implemented\n }", "public function update_category(Request $request){\n $data = array();\n $category_id=$request->category_id;\n $data['category_name']=$request->category_name;\n $data['category_description']=$request->category_description;\n\n//$data['publication_status']=$request->publication_status;\n DB::table('tbl_category')\n ->where('category_id',$category_id)\n ->update($data);\n\n Session::put('message','Category update Successfully!!');\n return Redirect::to('/edit-category/'.$category_id);\n }", "function update_category_detail($siteData, $category_id) {\n $this->db->where('id', $category_id);\n $this->db->update('category', $siteData);\n }", "function editMainCategory()\n\t{ \n\t\t$id=$_GET['prodid'];\n\n\t\tif(((int)$id)>0)\n\t\t{\n\t\t\t$sql='select * from products_table where product_id='.$id;\n\t\t\t\n\t\t\t$obj=new Bin_Query();\n\t\t\t\n\t\t\t$obj->executeQuery($sql);\n\t\t\t\n\t\t\t$sqlid=\"SELECT category_id,category_parent_id FROM category_table where category_id in(select category_id from products_table where category_id='\".$obj->records[0]['category_id'].\"')\";\n\t\t\t\n\t\t\t$query=new Bin_Query();\n\t\t\t\n\t\t\t$query->executeQuery($sqlid);\n\t\t\t\n\t\t\t$sql1 = \"SELECT category_id,category_name FROM category_table where category_parent_id=0\";\n\t\t\n\t\t\t$query1 = new Bin_Query();\n\t\t\n\t\t\t$query1->executeQuery($sql1);\n\t\t\n\n\t\t\treturn Display_DManageProducts::displayCategory($query1->records,$query->records[0]['category_id']);\n\t\t\t\n\t\t// \t\t\treturn $category;\n\t }\n\t}", "public function update($id)\n\t{\n\t\t$description = Input::get('description');\n\t\t$acronym = substr($description,0,1);\n\t\t$category = Category::find($id);\n\t\t$category->description = $description; \n\t\t$category->acronym = $acronym; \n\t\t$category->save(); \n\t\treturn Response::json($category);\n/*\t\treturn Response::json(array('success'=>\"La categoria fue actualizada exitosamente\"));*/\n\t}", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function edit(Category $category)\n {\n //\n }", "public function update(CategoryEditRequest $request, Categ $categ)\n {\n //dd($categ);\n //dd($request);\n\n if($request->isMethod('post')){\n $categ->fill($request->all());\n $isOk=$categ->save();\n //$isOk=false;\n if($isOk){\n return redirect()->route('adminCateg')->with('success','запись обновлена');}\n else{\n return redirect()->route('adminCateg')->with('error','запись не обновлена');}\n }\n return view('news.admin.categ.update', ['categ'=>$categ]);\n }", "public function update(Request $request, Category $category)\n {\n $category->exp_group_name = $request->exp_group_name;\n $category->exp_group_desc = $request->exp_group_desc;\n\n if ( $request->exp_group_status == '1' or $request->exp_group_status == '0')\n {\n \n $category->exp_group_status = $request->exp_group_status;\n }\n\n\n \n\n\n\n \n $category->save();\n return redirect()->route('admin.categories.index');\n }", "public function actionUpdate($id)\n { $this->layout='inner';\n $model = $this->findModel($id);\n $vendor = ArrayHelper::map(User::find()->where(['usertype'=>'Vendor'])->all(), 'id', 'username');\n $cat_list = ArrayHelper::map(ProductCategory::find()->where(['parent_id'=>'0'])->all(), 'id', 'cat_name');\n $cat= ProductCat::find()->Where(['product_id'=>$id])->one();\n $query=$this->fetchChildCategories($cat['category_id']);\n $str=rtrim($this->sam, \"|\");\n $str_data=explode(\"|\",$str);\n if($str_data>0){ \n // $str_data[]=$cat['category_id'];\n } \n // print_r($str_data); die;\n if ($model->load(Yii::$app->request->post())) {\n //$last_cat=end($_POST['Product']['category_id']); \n if($model->save()){\n //$sql=\"update product_cat set category_id = '\".$last_cat .\"' WHERE product_id='\".$model->id.\"'\";\n //Yii::$app->db->createCommand($sql)->execute();\n /*$product_cat= new ProductCat();\n $product_cat->product_id=$model->id;\n $product_cat->category_id=$last_cat;\n $product_cat->save();*/\n //Yii::$app->getSession()->setFlash('success','successful updated');\n return $this->redirect(['add-search-terms','id'=>$id]);\n }\n } else {\n return $this->render('update', [\n 'model' => $model,\n 'cat'=>$str_data,\n 'vendor'=>$vendor,\n 'cat_list'=>$cat_list,\n\n ]);\n }\n }", "public function update()\n {\n $category = CategoryService::load(\\Request::input('id'))->update(\\Request::all());\n \\Msg::success($category->name . ' has been <strong>updated</strong>');\n return redir('account/categories');\n }", "public function editPost()\n {\n if (!$this->auth->isLogged()) {\n $this->view->redirect(\"/user/login\", \"You can not add new categories if you are not logged in!\");\n }\n\n if (!$this->auth->isInRole(\"admin\")) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not Admin!\");\n }\n\n if ($this->input->post(\"edit_category\") === null){\n $this->view->redirect(\"/categories/manage\");\n }\n\n if (empty($this->input->get(0,\"int\"))){\n $this->view->redirect(\"/categories/manage\");\n }\n\n $categoryId = $this->input->get(0,\"int\");\n\n $categoryName = $this->input->post(\"name\");\n\n $categoryModel = new CategoriesModel();\n\n try{\n if (!$categoryModel->existCategoryId($categoryId)){\n $this->view->redirect(\"/categories/manage\",\"This categories do not exist!\");\n }\n\n if ($categoryModel->editCategory($categoryName, $categoryId)){\n $this->view->redirect(\"/categories/manage\",\"Category edited successfully!\",\"success\");\n } else {\n $this->view->redirect(\"/categories/manage\",\"You did not change anything ?\");\n }\n\n }catch (\\Exception $exception) {\n $this->view->redirect(\"/categories/manage\", $exception->getMessage());\n }\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update_category() {\n $category_id = $_GET['category_id'];\n $data['category_branch_location'] = $this->get_branch_location();\n $data['update_category'] = $this->Category_crud->get_category_by_id($category_id);\n $this->load->view('restaurant/category/update_category', $data);\n\n\n if (isset($_POST['save_update_category'])) {\n $imagename = $_FILES['category_image_upload']['name'];\n if (!empty($imagename)) {\n\n $config['upload_path'] = \"assets/lib/images/category/\";\n $config['allowed_types'] = 'gif|jpg|png|jpeg';\n\n $this->load->library('upload', $config);\n $this->upload->initialize($config);\n\n if (!$this->upload->do_upload('category_image_upload')) {\n $error = array('error' => $this->upload->display_errors());\n } else {\n $success = array('image_metadata' => $this->upload->data());\n }\n\n $update_category = array(\n 'ar_name' => $_POST['category_ar_name'],\n 'en_name' => $_POST['category_en_name'],\n 'discount' => $_POST['category_discount'],\n 'image' => $imagename\n );\n $this->Category_crud->update_category_information($category_id, $update_category);\n redirect(rest_path('Category'));\n } else {\n $update_category = array(\n 'ar_name' => $_POST['category_ar_name'],\n 'en_name' => $_POST['category_en_name'],\n 'discount' => $_POST['category_discount'],\n 'image' => $_POST['category_image']\n );\n $this->Category_crud->update_category_information($category_id, $update_category);\n redirect(rest_path('Category'));\n }\n }\n }", "public function update($product_category_id)\n\t{\n\t\t$master['status'] = True;\n $data = array();\n $master = array();\n $original_category_name=$this->db->from('tbl_product_category')->where('category_id',$product_category_id)->get()->result();\n $is_unique='';\n if($this->input->post('category')!=$original_category_name[0]->category)\n {\n \t$is_unique = '|is_unique[tbl_product_category.category]';\n }\n\n $this->form_validation->set_rules('category', 'Category', 'trim|required|max_length[64]'.$is_unique);\n $this->form_validation->set_rules('remarks', 'Remarks', 'trim|max_length[254]');\n $this->form_validation->set_error_delimiters('<p class=\"text-danger\">', '</p>');\n\t\tif ($this->form_validation->run() == True) \n\t\t{\n\t\t\t$this->product_category->update($product_category_id);\n\t\t\t$master['status'] = True;\n\t\t} \n\t\telse \n\t\t{\n\t\t\t$master['status'] = false;\n foreach ($_POST as $key => $value) \n {\n if (form_error($key) != '') \n {\n $data['error_string'] = $key;\n $data['input_error'] = form_error($key);\n array_push($master, $data);\n }\n }\n\t\t}\n\t\techo(json_encode($master));\n\t}", "function update_categoria($idcategoria,$params)\n {\n $this->db->where('idcategoria',$idcategoria);\n return $this->db->update('categoria',$params);\n }", "public function edit(Category $Category)\n {\n //\n }", "function pnAddressBook_admin_updatecategories() {\r\n\r\n\t$output = new pnHTML();\r\n\r\n // Security check\r\n if (!pnSecAuthAction(0, 'pnAddressBook::', '::', ACCESS_ADMIN)) {\r\n $output->Text(pnVarPrepHTMLDisplay(_PNADDRESSBOOK_NOAUTH));\r\n $output->Text(pnAddressBook_themetable('end'));\r\n\t\treturn $output->GetOutput();\r\n }\r\n\r\n\tlist($id,$del,$name,$newname) = pnVarCleanFromInput('id','del','name','newname');\r\n\tif(is_array($del)) {\r\n $dels = implode(',',$del);\r\n }\r\n\r\n\t$modID = $modName = array();\r\n\r\n\tif(isset($id)) {\r\n\t\tforeach($id as $k=>$i) {\r\n \t$found = false;\r\n \tif(count($del)) {\r\n \tforeach($del as $d) {\r\n \tif($i == $d) {\r\n \t$found = true;\r\n \tbreak;\r\n \t}\r\n \t}\r\n \t}\r\n \tif(!$found) {\r\n \tarray_push($modID,$i);\r\n \tarray_push($modName,$name[$k]);\r\n }\r\n \t}\r\n\t}\r\n\r\n\t$pntable = pnDBGetTables();\r\n\t$cat_table = $pntable[pnaddressbook_categories];\r\n\t$cat_column = $pntable['pnaddressbook_categories_column'];\r\n\r\n\t$updates = array();\r\n foreach($modID as $k=>$id) {\r\n array_push($updates,\"UPDATE $cat_table\r\n SET $cat_column[name]='\".pnVarPrepForStore($modName[$k]).\"'\r\n WHERE $cat_column[nr]=$id\");\r\n\t}\r\n\r\n\t$error = '';\r\n\r\n\tif(pnModAPIFunc(__PNADDRESSBOOK__,'admin','updateCategories',array('updates'=>$updates))) {\r\n \tif (empty($error)) { $error .= 'UPDATE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\telse { $error .= ' - UPDATE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t}\r\n\r\n\t$delete = \"DELETE FROM $cat_table WHERE $cat_column[nr] IN ($dels)\";\r\n\tif(isset($dels)) {\r\n if(pnModAPIFunc(__PNADDRESSBOOK__,'admin','deleteCategories',array('delete'=>$delete))) {\r\n if (empty($error)) { $error .= 'DELETE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\t\telse { $error .= ' - DELETE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n }\r\n }\r\n\r\n\tif( (isset($newname)) && ($newname != '') ) {\r\n if(pnModAPIFunc(__PNADDRESSBOOK__,'admin','addCategories',array('name'=>$newname))) {\r\n if (empty($error)) { $error .= 'INSERT '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\t\telse { $error .= ' - INSERT '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\t}\r\n }\r\n\r\n\t$args=array('msg'=>$error);\r\n\r\n\tpnRedirect(pnModURL(__PNADDRESSBOOK__, 'admin', 'categories',$args));\r\n\treturn true;\r\n}", "public function editNutrationCategory($id)\n {\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n $workout = NutrationCategory::find($id);\n return view('admin.editnutrationcategory')->with('workout',$workout);\n }\n\n else{\n Session::flash('danger','You are not authorize to view this page');\n return redirect()->back();\n }\n }", "function classiera_update_my_category_fields($term_id) {\r\n\tif(isset($_POST['taxonomy'])){\t\r\n\t if($_POST['taxonomy'] == 'category'):\r\n\t\t$tag_extra_fields = get_option(MY_CATEGORY_FIELDS);\r\n\t\t$tag_extra_fields[$term_id]['your_image_url'] = strip_tags($_POST['your_image_url']);\r\n\t\t$tag_extra_fields[$term_id]['category_image'] = $_POST['category_image'];\r\n\t\t$tag_extra_fields[$term_id]['category_icon_code'] = $_POST['category_icon_code'];\r\n\t\t$tag_extra_fields[$term_id]['category_icon_color'] = $_POST['category_icon_color'];\r\n\t\tupdate_option(MY_CATEGORY_FIELDS, $tag_extra_fields);\r\n\t endif;\r\n\t}\r\n}", "public function updateCategory(Request $request,$cat_id)\n {\n // validate input of category name..\n $request->validate([\n 'category_name' => 'required|max:255'\n ]);\n // update category by cat_id..\n $data = array();\n $data['category_name'] = $request->category_name;\n //$data['updated_at'] = Carbon::now();\n $update_category = DB::table('categories')->where('id',$cat_id)->update($data);\n if ($update_category)\n {\n // Display a toaster Updated message..\n $notification = array(\n 'message' => 'Category Updated successfully.',\n 'alert-type' => 'success'\n );\n return Redirect()->route('categories')->with($notification);\n }else {\n // Display a toaster No Updated message..\n $notification = array(\n 'message' => 'Nothing Data To Update.',\n 'alert-type' => 'warning'\n );\n return Redirect()->route('categories')->with($notification);\n }\n }", "public function update(Request $request, Category $Category)\n {\n //\n }", "function shophead_edit($category_id = \"\")\n {\n $this->layout = 'admin_layout';\n $id = base64_decode($category_id);\n // pr($id);\n $this->loadModel('ProductCategory');\n $data = $this->ProductCategory->find('first', array('conditions' => array('ProductCategory.id' => $id)));\n if (!empty($data)) {\n if (!empty($this->request->data)) {\n $this->request->data = Sanitize::clean($this->request->data, array('encode' => false));\n $this->ProductCategory->set($this->request->data);\n if ($this->request->data['ProductCategory']['name'] == $data['ProductCategory']['name']) {\n unset($this->request->data['ProductCategory']['name']);\n }\n if ($this->ProductCategory->validates()) {\n if ($this->ProductCategory->save($this->request->data)) {\n $this->Session->write('flash', array(EDIT_RECORD, 'success'));\n $this->redirect(array('controller' => 'ProductCategories', 'action' => 'index'));\n } else {\n $this->Session->write('flash', array(FAILURE_MSG, 'failure'));\n $this->redirect(array('controller' => 'ProductCategories', 'action' => 'index'));\n }\n }\n }\n $this->request->data = $data;\n } else {\n $this->redirect(array('controller' => 'ProductCategories', 'action' => 'index'));\n }\n }", "public function update_category($id)\n\t{\n\t\t$config = array(\n 'upload_path' => \"uploads/category/\",\n 'upload_url' => base_url() . \"uploads/category/\",\n 'allowed_types' => \"gif|jpg|png|jpeg\"\n );\n\n $this->load->library('upload', $config);\n $category_name=ucwords(strtolower($this->input->post('category_name')));\n if($this->upload->do_upload('userfile')) {\n\n $data['userfile'] = $this->upload->data();\n $filename = $data['userfile']['file_name'];\n\t\t \n $datalist = array( \n 'category_img' => base_url().'uploads/category/'.$filename, \n 'meta_keyword' => $this->input->post('meta_keyword'),\n 'meta_description' => $this->input->post('meta_description'),\n 'category_name'=> $this->input->post('category_name'),\n\t\t\t\t'category_description'=> $this->input->post('category_description'), \n 'category_slug' => $this->input->post('category_slug'),\n 'status'=>$this->input->post('status'), \n );\n }else{\n $datalist = array( \n 'meta_keyword' => $this->input->post('meta_keyword'),\n 'meta_description' => $this->input->post('meta_description'),\n 'category_name'=> $this->input->post('category_name'),\n\t\t\t\t'category_description'=> $this->input->post('category_description'), \n 'category_slug' => $this->input->post('category_slug'),\n 'status'=>$this->input->post('status'),\n );\n } \n\n $query= $this->General_model->show_data_id('categories',$id,'category_Id','update',$datalist);\n $this->session->set_flashdata('success', 'Product category Updated successfully.');\n redirect('superpanel/categorie');\n\t}", "function get_category_to_edit($id)\n {\n }", "public function edit(Category $Category)\n {\n echo \"i am in edit\";exit();\n //\n }", "function editAction()\n\t{\n global $langCode;\n\t\t$id = (int)$this->registry->router->getArg('id');\n\t\t$myProductCat = new Core_ProductCategory($id);\n\t\t\n\t\t$redirectUrl = $this->getRedirectUrl();\n\t\tif($myProductCat->id > 0)\n\t\t{\n\t\t\t$error \t\t= array();\n\t\t\t$success \t= array();\n\t\t\t$contents \t= '';\n\t\t\t$formData \t= array();\n\t\t\t //Truyen du lieu hien co vao form\n\t\t\t$formData['fbulkid'] = array();\n\t\t\t$formData['fid'] = $myProductCat->id;\n\t\t\t$formData['fname'] = $myProductCat->name;\n\t\t\t$formData['forder'] = $myProductCat->order;\n\t\t\t$formData['fparentid'] = $myProductCat->parentid;\n\t\t\t$formData['fenable'] = $myProductCat->enable;\n\t\t\t$formData['fseourl'] = $myProductCat->seoUrl;\n\t\t\t$formData['fseotitle'] = $myProductCat->seoTitle;\n\t\t\t$formData['fseokeyword'] = $myProductCat->seoKeyword;\n\t\t\t$formData['fseodescription'] = $myProductCat->seoDescription;\n\t\t\t\n\t\t\tif(!empty($_POST['fsubmit']))//truong hop da nhan nut submit\n\t\t\t{\n if($_SESSION['productcategoryEditToken']==$_POST['ftoken'])//kiem tra token\n {\n $formData = array_merge($formData, $_POST);\n \n if($this->editActionValidator($formData, $error))//kiem tra du lieu co hop le hay khong\n {\n //Cac thong tin khong ngon ngu:\n $myProductCat->order = (int)$formData['forder'];\n $myProductCat->parentid = (int)$formData['fparentid'];\n $myProductCat->enable = (int)$formData['fenable']==1?1:0;\n if(strlen($formData['fseourl']) > 0)\n $myProductCat->seoUrl = Helper::codau2khongdau($formData['fseourl'], true);\n else\n $myProductCat->seoUrl = Helper::codau2khongdau(strip_tags($formData['fname']), true);\n //Cac thong tin lien quan ngon ngu: \n $myProductCat->name = $formData['fname']; \n $myProductCat->seoTitle = $formData['fseotitle'];\n $myProductCat->seoKeyword = $formData['fseokeyword'];\n $myProductCat->seoDescription = $formData['fseodescription'];\n \n if($myProductCat->updateData())//cap nhat database\n {\n $success[] = str_replace('###categoryname###', $myProductCat->name[$langCode], $this->registry->lang['controller']['succUpdate']);\n $this->registry->me->writelog('ProductCategoryedit', $myProductCat->id, array('name' => $myProductCat->name[$langCode], 'order' => $myProductCat->order));\n }\n else\n {\n $error[] = $this->registry->lang['controller']['errUpdate']; \n }\n }\n }\n $_SESSION['productcategoryEditToken'] = Helper::getSecurityToken();//Tao token moi\n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t\t\t$this->registry->smarty->assign(array(\t'formData' \t=> $formData,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'subcategories' => $myProductCat->getSub(true),\n\t\t\t\t\t\t\t\t\t\t\t\t\t'parentCategories' => Core_ProductCategory::getFullCategories(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t'redirectUrl'=> $redirectUrl,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'error'\t\t=> $error,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'success'\t=> $success,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t$contents .= $this->registry->smarty->fetch($this->registry->smartyControllerContainer.'edit.tpl');\n\t\t\t$this->registry->smarty->assign(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'menu'\t\t=> 'productcategorylist',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'pageTitle'\t=> $this->registry->lang['controller']['pageTitle_edit'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'contents' \t\t\t=> $contents));\n\t\t\t$this->registry->smarty->display($this->registry->smartyControllerGroupContainer . 'index.tpl');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$redirectMsg = $this->registry->lang['controller']['errNotFound'];\n\t\t\t$this->registry->smarty->assign(array('redirect' => $redirectUrl,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'redirectMsg' => $redirectMsg,\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t$this->registry->smarty->display('redirect.tpl');\n\t\t}\n\t}", "public function update(CategoryRequest $request, $id)\n {\n $cate = Category::find($id);\n $cate->name = $request->txtCateName;\n $cate->alias = changeTitle($request->txtCateName);\n $cate->order = $request->txtOrder;\n $cate->parent_id = $request->sltParent;\n $cate->keywords = $request->txtKeywords;\n $cate->description = $request->txtDesc;\n $cate ->save();\n return redirect()->back()->with('edit','Chỉnh sửa sản phẩm thành công');\n }", "public function update(Request $request, Category $category)\n {\n $request->validate([\n 'name' => 'required | string | unique:categories,id',\n 'role' => 'required'\n ]);\n $input = $request->only(['name', 'role', 'mainid', 'subid', 'status', 'featured']);\n $category->update($input); \n\n Toastr::success('Category updated successfully :)','Success');\n return redirect()->route($this->route.'index');\n }", "public function UpdateFood($sku, $foodDesc, $category, $price){\r\n $conn = new ConnectionManager();\r\n $pdo = $conn->getConnection();\r\n \r\n \r\n // YOUR CODE GOES HERE\r\n\r\n\r\n\r\n return $isOk;\r\n }", "function setCategory($id, $category){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//category value of a question in the database\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Accepts 2 parameters, the question ID value, and the new value (int)\r\n\t\t$query= \"UPDATE `tbl_question` SET `category` = '$category' WHERE `tbl_question`.`question_id` =$id LIMIT 1 ;\";\r\n\t\t$result = $this->mdb2->query($query) or die('An unknown error occurred while updating the data');\r\n\t\tif(MDB2::isError($result)){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\t\r\n\t}", "public function updated(Category $category)\n {\n //\n }", "public function edit_category($id)\n\t{\n\t\t$query=$this->General_model->show_data_id('categories',$id,'category_Id','get','');\n $data['category']=$query; \n\t\t$data['title']=\"Dahboard || Great Wine Global\";\n $this->load->view('superpanel/header',$data);\n $this->load->view('superpanel/edit_categorie');\n $this->load->view('superpanel/footer');\n\t}", "public function update_category ($data) {\n\t\t$slug = \\Illuminate\\Support\\Str::slug($data->category, '-');\n\t\t$category = Category::find($data->category_id);\n\t\t$category->category = $data->category;\n\t\t$category->slug = $slug;\n\t\t$category->description = $data->description;\n\n\t\t$category->save();\n\t\treturn true;\n\t}" ]
[ "0.71557504", "0.71024853", "0.70967233", "0.6873377", "0.6844343", "0.68225706", "0.6781376", "0.67681557", "0.6741728", "0.66843164", "0.66287494", "0.6611749", "0.6610787", "0.65974736", "0.65905493", "0.6587013", "0.65291274", "0.6514518", "0.6501304", "0.6478147", "0.64662594", "0.6392799", "0.63845795", "0.6375152", "0.6367889", "0.63598716", "0.63504887", "0.6346485", "0.63436383", "0.6340993", "0.6334696", "0.6320037", "0.6311734", "0.6302258", "0.6298048", "0.62872916", "0.628145", "0.62791324", "0.62780344", "0.62569255", "0.62539685", "0.62536025", "0.62524337", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6251341", "0.6224295", "0.62238127", "0.6218534", "0.6216396", "0.62132716", "0.6210872", "0.6210872", "0.6210872", "0.6210872", "0.6210872", "0.6210872", "0.6210872", "0.6210872", "0.6210872", "0.6210872", "0.61915725", "0.6186637", "0.6186032", "0.61734736", "0.61688566", "0.61660856", "0.6165533", "0.61634415", "0.6149121", "0.6136466", "0.61358804", "0.61315626", "0.6129491", "0.612391", "0.61191964", "0.6114427", "0.61067104", "0.6094284", "0.60938585", "0.6090113", "0.6083536" ]
0.7165534
0
/Delete Nutrition Category Function
/Удалить категорию питания
public function deleteNutrationCategory(Request $request) { $id = $request->workoutid; $getWorkout = NutrationCategory::find($id); if($getWorkout->delete()){ return redirect()->back()->with('danger','Nutration Category Deleted successfully'); } else{ return redirect()->back()->with('danger','Sorry! Nutration Category is not deleted'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_category() {\n $category_id = $_GET['category_id'];\n\n $data['delete_category'] = $this->Category_crud->get_category_by_id($category_id);\n $this->load->view('restaurant/category/delete_category_model', $data);\n\n if (isset($_POST['delete_category_yes'])) {\n $this->Category_crud->delete_category_sub_category_item($category_id);\n redirect(rest_path('Category'));\n }\n\n if (isset($_POST['delete_category_no'])) {\n $this->Category_crud->delete_category($category_id);\n redirect(rest_path('Category'));\n }\n }", "function product_category_delete(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u;\n\t\t\n\t\tmysql_q(\"DELETE FROM product_category WHERE id='\".add_slash($_r['id']).\"'\");\n\n\t\tredirect(\"product_category.htm\", \"\");\n\t}", "function ciniki_foodmarket_categoryDelete(&$ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'category_id'=>array('required'=>'yes', 'blank'=>'yes', 'name'=>'Category'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'foodmarket', 'private', 'checkAccess');\n $rc = ciniki_foodmarket_checkAccess($ciniki, $args['tnid'], 'ciniki.foodmarket.categoryDelete');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Get the current settings for the category\n //\n $strsql = \"SELECT id, uuid \"\n . \"FROM ciniki_foodmarket_categories \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND id = '\" . ciniki_core_dbQuote($ciniki, $args['category_id']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.foodmarket', 'category');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['category']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.foodmarket.5', 'msg'=>'Category does not exist.'));\n }\n $category = $rc['category'];\n\n // \n // Check for any child categories\n //\n $strsql = \"SELECT COUNT(id) AS children \"\n . \"FROM ciniki_foodmarket_categories \"\n . \"WHERE ciniki_foodmarket_categories.parent_id = '\" . ciniki_core_dbQuote($ciniki, $args['category_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbSingleCount');\n $rc = ciniki_core_dbSingleCount($ciniki, $strsql, 'ciniki.foodmarket', 'num');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( $rc['num'] > 0 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.foodmarket.6', 'msg'=>'You still have ' . $rc['num'] . ' child categor' . ($rc['num']>1?'ies':'y') . '.'));\n }\n\n //\n // Check for items already in the category\n //\n $strsql = \"SELECT id, uuid \"\n . \"FROM ciniki_foodmarket_category_items \"\n . \"WHERE category_id = '\" . ciniki_core_dbQuote($ciniki, $args['category_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.foodmarket', 'item');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.foodmarket.149', 'msg'=>'Unable to load item', 'err'=>$rc['err']));\n }\n $items = isset($rc['rows']) ? $rc['rows'] : array();\n \n //\n // Start transaction\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbDelete');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectDelete');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.foodmarket');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Remove any items from the category first\n //\n foreach($items as $item) {\n $rc = ciniki_core_objectDelete($ciniki, $args['tnid'], 'ciniki.foodmarket.categoryitem', $item['id'], $item['uuid'], 0x04);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.foodmarket');\n return $rc;\n }\n }\n\n //\n // Remove the category\n //\n $rc = ciniki_core_objectDelete($ciniki, $args['tnid'], 'ciniki.foodmarket.category', $args['category_id'], $category['uuid'], 0x04);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.foodmarket');\n return $rc;\n }\n\n //\n // Commit the transaction\n //\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.foodmarket');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the last_change date in the tenant modules\n // Ignore the result, as we don't want to stop user updates if this fails.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'updateModuleChangeDate');\n ciniki_tenants_updateModuleChangeDate($ciniki, $args['tnid'], 'ciniki', 'foodmarket');\n\n return array('stat'=>'ok');\n}", "public function deleteCategory(){ \n $cookies = new CookieModel();\n $cookie_id = $cookies -> read();\n if (! $cookie_id) $this->redirect('/');\n /*删除分类下的子分类*/\n $key = $_REQUEST['id'];\n $condition['id'] = $key;\n $form = M(\"categoryinfo\");\n $data = $form->where($condition)->delete(); \n $data_all = $form->select();\n for ($i = 0;$i< count($data_all);$i++)\n {\n if ($data_all[$i]['father'] == $key) \n {\n $condition['id'] = $data_all[$i]['id'];\n $form->where($condition)->delete();\n }\n } \n /*删除分类下的菜品*/\n $food = M('foodinfo');\n $data_food = $food->select();\n for ($i = 0;$i< count($data_food);$i++)\n {\n if ($data_food[$i]['father'] == $key) \n {\n $condition['id'] = $data_food[$i]['id'];\n $food->where($condition)->delete();\n }\n if ($data_food[$i]['category'] == $key) \n {\n $condition['id'] = $data_food[$i]['id'];\n $food->where($condition)->delete();\n }\n } \n\t\t$this->redirect('/index.php/Admin/dish');\n //$this->display();\n }", "function ciniki_directory_categoryDelete(&$ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'category_id'=>array('required'=>'yes', 'default'=>'', 'blank'=>'yes', 'name'=>'Category'), \n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n \n //\n // Check access to tnid as owner\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'directory', 'private', 'checkAccess');\n $ac = ciniki_directory_checkAccess($ciniki, $args['tnid'], 'ciniki.directory.categoryDelete');\n if( $ac['stat'] != 'ok' ) {\n return $ac;\n }\n\n //\n // Get the category uuid\n //\n $strsql = \"SELECT uuid FROM ciniki_directory_categories \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND id = '\" . ciniki_core_dbQuote($ciniki, $args['category_id']) . \"' \" \n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.directory', 'category');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['category']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.directory.12', 'msg'=>'The category does not exist'));\n }\n $uuid = $rc['category']['uuid'];\n\n // \n // Turn off autocommit\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectDelete');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.directory');\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Get the list of entries to remove from this category\n //\n $strsql = \"SELECT id, uuid \"\n . \"FROM ciniki_directory_category_entries \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND category_id = '\" . ciniki_core_dbQuote($ciniki, $args['category_id']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.directory', 'entry');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $entries = $rc['rows'];\n foreach($entries as $entry) {\n $rc = ciniki_core_objectDelete($ciniki, $args['tnid'], 'ciniki.directory.category_entry', \n $entry['id'], $entry['uuid'], 0x04);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n }\n\n //\n // Delete the object\n //\n $rc = ciniki_core_objectDelete($ciniki, $args['tnid'], 'ciniki.directory.category', $args['category_id'], $uuid, 0x04);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Commit the database changes\n //\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.directory');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the last_change date in the tenant modules\n // Ignore the result, as we don't want to stop user updates if this fails.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'updateModuleChangeDate');\n ciniki_tenants_updateModuleChangeDate($ciniki, $args['tnid'], 'ciniki', 'directory');\n\n return array('stat'=>'ok');\n}", "public function delete_category()\r\n\t\t{\r\n\t\t\t$this->errno = DB_OK;\r\n\t\t\t\r\n\t\t\tif ( $this->cat_id == -1 )\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tSuch category hasn't been created\r\n\t\t\t{\r\n\t\t\t\t$this->errno = WRONG_ID;\r\n\t\t\t\treturn ;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\t$this->con->query(\"START TRANSACTION;\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tTransaction is needed despite the one query as delete is on cascade\r\n\t\t\t\r\n\t\t\tif ( ! ( $result = $this->con->query ( \"DELETE FROM category WHERE cat_id=$this->cat_id\" ) ) )\r\n\t\t\t{\t\t\t\r\n\t\t\t\t$this->con->query(\"ROLLBACK;\");\r\n\t\t\t\t$this->errno = MYSQL_ERROR;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tFailed to connect\t\t\t\r\n\t\t\t\treturn ;\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( $this->con->affected_rows == 0 )\r\n\t\t\t{\t\t\r\n\t\t\t\t$this->con->query(\"ROLLBACK;\");\r\n\t\t\t\t$this->errno = CATEGORY_DONT_EXIST;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tthis query should affect 1 row\t\t\t\r\n\t\t\t\treturn ;\t\t\t\t\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t$this->con->query(\"COMMIT;\");\r\n\t\t\t\r\n\t\t}", "public function deleteAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Game_Service_Category::getCategory($id);\r\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\r\n\t\t$result = Game_Service_Category::deleteCategory($id);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "public function delete() {\n $sql = sprintf(\"DELETE FROM category WHERE id=%d\", $this->id);\n self::$connection->execute($sql);\n }", "public function deletecategory(){\n\t\n\t\t$id = $this->request->getParameter(\"actionid\");\n\t\t$modelCategory = new CaCategory();\n\t\t$modelCategory->delete($id);\n\t\n\t\t// generate view\n\t\t$this->redirect(\"catalogadmin/categories\");\n\t}", "function categoryRemove(){\n\tif(startSession() && isset($_SESSION['UserID']))\n\t{\n\t\t$CatID\t\t\t \t= strip_tags($_GET['id']);\t#int - primaryKey\n\n\t\t$db = pdo(); # pdo() creates and returns a PDO object\n\n\t\t$sql = \"DELETE FROM ma_Categories WHERE CatID = :CatID\";\n\n\t\t$stmt = $db->prepare($sql);\n\t\t//INTEGER EXAMPLE $stmt->bindValue(1, $id, PDO::PARAM_INT);\n\t\t$stmt->bindValue(':CatID', $CatID, PDO::PARAM_INT);\n\n\t\ttry {$stmt->execute();} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\t\t#feedback success or failure of update\n\n\t\tif ($stmt->rowCount() > 0)\n\t\t{//success! provide feedback, chance to change another!\n\t\t\tfeedback(\"Category Removed Successfully\",\"success\");\n\t\t}else{//Problem! Provide feedback!\n\t\t\tfeedback(\"Category Not Trashed!\",\"warning\");\n\t\t}\n\t\tmyRedirect(THIS_PAGE);\n\t}\n\t#script for expanding textarea\n}", "public function delete_category($category_id){\n \n DB::table('tbl_category')\n ->where('category_id',$category_id)\n ->delete();\n return Redirect::to('/manage-category');\n }", "function delete_categoria($idcategoria)\n {\n return $this->db->delete('categoria',array('idcategoria'=>$idcategoria));\n }", "public function addNutrationCategory()\n {\n return view('admin.addnutratoncategory');\n }", "public function delete()\n {\n if (!$this->auth->isLogged()) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not logged in!\");\n }\n if (!$this->auth->isInRole(\"admin\")) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not Admin!\");\n }\n\n if (empty($this->input->get(0,\"int\"))){\n $this->view->redirect(\"/categories/manage\");\n }\n\n $categoryId = $this->input->get(0,\"int\");\n\n $categoryModel = new CategoriesModel();\n\n if (!$categoryModel->existCategoryId($categoryId)){\n $this->view->redirect(\"/categories/manage\",\"This categories do not exist!\");\n }\n\n try{\n $categoryName = $categoryModel->getCategoryNameById($categoryId);\n\n $this->view->render(\"admin/categories/delete\",[\n \"name\"=> $categoryName,\n \"id\"=> $categoryId\n ]\n );\n }catch (\\Exception $exception) {\n $this->view->redirect(\"/categories/manage\", $exception->getMessage());\n }\n\n }", "public function delete($interview_category_id)\r\n {\r\n $this->checkIfDemo();\r\n $this->AdminInterviewCategoryModel->remove($interview_category_id);\r\n }", "public function EliminarCategorias()\n\t{\n\n\t\t$sql = \" select codcategoria from productos where codcategoria = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcategoria\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num == 0)\n\t\t{\n\n\t\t\t$sql = \" delete from categorias where codcategoria = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codcategoria);\n\t\t\t$codcategoria = base64_decode($_GET[\"codcategoria\"]);\n\t\t\t$stmt->execute();\n\n\t\t\theader(\"Location: categorias?mesage=1\");\n\t\t\texit;\n\n\t\t}else {\n\n\t\t\theader(\"Location: categorias?mesage=2\");\n\t\t\texit;\n\t\t}\n\n\t}", "public function remove_category() {\n\t\t$this->use_layout=false;\n\t\t$this->model = new $this->model_class(WaxUrl::get(\"id\"));\n\t\t$category = new CmsCategory(Request::get(\"cat\"));\n\t\t$this->model->categories->unlink($category);\n if(!$this->attached_categories = $this->model->categories) $this->attached_categories= array();\n\t\t$cat = new CmsCategory;\n\t\tif(!$this->all_categories = $cat->all() ) $this->all_categories=array();\t\t\n\t\t$this->cat_partial = $this->render_partial(\"list_categories\");\t\n\t}", "public function deletePost(){\n\n if (!$this->auth->isLogged()) {\n $this->view->redirect(\"/user/login\", \"You can not add new categories if you are not logged in!\");\n }\n\n if (!$this->auth->isInRole(\"admin\")) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not Admin!\");\n }\n\n if ($this->input->post(\"delete_category\") === null){\n $this->view->redirect(\"/categories/manage\");\n }\n\n if (empty($this->input->get(0,\"int\"))){\n $this->view->redirect(\"/categories/manage\");\n }\n\n $categoryId = $this->input->get(0,\"int\");\n\n $categoryModel = new CategoriesModel();\n try{\n if (!$categoryModel->existCategoryId($categoryId)){\n $this->view->redirect(\"/categories/manage\",\"This categories do not exist!\");\n }\n if ($categoryModel->deleteCategory($categoryId)){\n $this->view->redirect(\"/categories/manage\",\"Category deleted successfully!\",\"success\");\n }\n } catch (\\Exception $exception) {\n $this->view->redirect(\"/categories/manage\", $exception->getMessage());\n }\n }", "public function category_delete(Request $request)\n {\n $id = $request->id;\n\n $op = $request->op; // get operation number \n\n switch($op) {\n /** Event Categories */\n case 1:\n $model = new Category;\n $entity_id = 1;\n break;\n\n /** Sponsor Categories */\n case 2:\n $model = new SponsorCategory;\n $entity_id = 12;\n break;\n\n /** Offer Categories */\n case 3:\n $model = new OfferCategory;\n $entity_id = 7;\n break;\n\n /** Doctors Specialization Categories */\n case 4:\n $model = new DoctorsCategory;\n $entity_id = 11;\n break;\n\n default:\n return redirect()->back();\n break;\n }\n\n // delete from localization - Arabic version\n try {\n EntityLocalization::where('entity_id', $entity_id)->where('item_id', $id)->delete();\n } catch (\\Exception $ex) {\n return response()->json(['error', 'error deleting arabic']);\n }\n\n // delete from interests - English version\n try {\n $model::where('id', $id)->delete();\n } catch (\\Exception $ex) {\n return response()->json(['error', 'error deleting english']);\n }\n\n // return success response\n return response()->json(['success', 'success']);\n }", "function delete_category($cat_id)\n { \n $sql = \"DELETE FROM prod_categories WHERE `cat_id` = \\\"$cat_id\\\" LIMIT 1\";\n \n //echo $sql ;\n \n\t//submit query\n \n include 'connect.php';\n \n $result = mysqli_query($link, $sql); //returns object\n \n \n \n if (!$result) \n {\n\t\t\t\t\n $err = mysqli_error($link);\n //echo $err ;\n //echo 'error g et_user';\n\t\t\t\t\t\t\t\t\n }\n else\n { \n echo 'Kategoria u fshi nga sistemi!!!' ;\n }\n\n // close connection \n \n }", "public function delete(){\n\n\t\t$sql = new Sql();\n\n\t\t$sql->query(\"DELETE FROM tb_categories WHERE idcategory=:idcategory\",array(\n\t\t\t\":idcategory\"=>$this->getidcategory()\n\t\t));\n\n\t\tCategory::updateFile();\n\t}", "public static function deleteCategoryController(){\n\n\n \t \t if (isset($_POST[\"editCategoryId\"])) {\n\n\n \t \t \t\t\t// NOTA: Se pasa un valor entero como array ya que el modelo de productos recibe de varios métodos\n \t \t\t\t\t\t$dataController = array(\"idcategory\"=>$_POST[\"editCategoryId\"]);\n\n \t \t\t\t\t\t// Esta variable se envía al modelos para proceder a eliminar la categoria\n \t \t\t\t\t\t$dataIdCategoryController = $_POST[\"editCategoryId\"];\n\n \t \t\t\t\t\t// VER PRODUCTOS ASOCIADOS A LA CATEGORIA\n\t\t\t\t\t\t// $answerProducts = productsModel::ViewProductById($dataController, \"productos\");\n\n\t\t\t\t\t\t// foreach ($answerProducts as $row => $item) {\n\n\t\t\t\t\t\t// $dataProductController = array(\"id\"=>$item[\"id\"], \"idcategory\"=>0, \"enable\"=> 1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// $answerDeleteProducts = productsModel::disableProductByIdCategory($dataProductController, \"productos\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$answerDeleteCategory = categorieModel::deleteCategoryModel($dataIdCategoryController, \"categorias\");\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\t\t\n\n\n\t\t\t\t\t\t \t\tif ($answerDeleteCategory == 1) {\n\n\t \t\t\t\t\techo '<script >swal({\n\n\t\t\t\t\t\t\t\ttitle: \"¡OK!\",\n\t\t\t\t\t\t\t\ttext: \"¡Categoría eliminada correctamente!\",\n\t\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\tfunction(isConfirm){\n\n\t\t\t\t\t\t\t\t\tif (isConfirm) {\n\n\n\t\t\t\t\t\t\t\t\t\twindow.location = \"categories\";\n\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t</script>';\n\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\techo \"error\";\n\n\t \t\n\t\t\t\t\t\t\t\t }\n\t\t\t\t \t\t}\n\t\t\t\t}", "public function action_delete()\n {\n if($this->category->has_subcategories())\n {\n // Response faile info\n $this->request->response = View::factory('error', array(\n 'message' => '该分类有子分类,无法删除', \n ));\n }\n else\n {\n if($this->category->delete())\n {\n // Delete successfully\n // Delete search results as well\n $this->request->redirect('category/tree');\n }\n else\n {\n // Failed\n $this->request->response = View::factory('error', array(\n 'message' => '删除失败', \n ));\n }\n }\n }", "function delete($category_id)\n {\n $query = \"DELETE FROM categories WHERE categories_id = '$category_id'\";\n $result = $this->db->delete($query);\n }", "public function delete_category($id)\n { \n\t $query=$this->General_model->show_data_id('categories',$id,'category_Id','get','');\n @unlink(str_replace(base_url(),'',$query[0]->category_img));\n \n $query=$this->General_model->show_data_id('categories',$id,'category_Id','delete','');\n $this->session->set_flashdata('success','Product Category Deleted successfully'); \n redirect('superpanel/categorie');\n\t\n\t }", "public function remove_category($id) {\r\n\t\t\treturn parent::delete($id);\r\n\t\t}", "public function delete_category($id) {\n $this->category();\n\n $connection = new Database(\"sbrettsc_db\");\n $connection->do_sql(\"DELETE FROM category WHERE id = \" . $id);\n $this->index();\n\n }", "public function delete_category() {\r\n $id = $this->uri->segment(3);\r\n $delete = $this->faq_model->delete_menu($id);\r\n\r\n if ($delete) {\r\n $this->session->set_flashdata('succ_msg', 'Menu Deleted Successfully');\r\n } else {\r\n $this->session->set_flashdata('error_msg', 'Unable to Delete Successfully');\r\n }\r\n redirect(base_url() . 'faq/category_list');\r\n }", "public function delete() {\n\t\t$sql = 'delete from cart_categories where categories_id=\"' . e($this->getId()) . '\"';\n\t\tDatabase::singleton()->query($sql);\n\t\t\n\t\t$sql = 'delete from cart_categories_description where categories_id=\"' . e($this->getId()) . '\"';\n\t\tDatabase::singleton()->query($sql);\n\t\t\n\t\t$cats = $this->getSubCategories();\n\t\tforeach ($cats as $cat) {\n\t\t\t$cat->delete();\n\t\t}\n\t}", "function remove_utility_bill_category($utility_bill_category_id = '')\n\t{\n\t\t$this->db->where('utility_bill_category_id', $utility_bill_category_id);\n\t\t$this->db->delete('utility_bill_category');\n\n\t\t$this->session->set_flashdata('success', 'Utility bill category has been deleted successfully.');\n\n\t\tredirect(base_url() . 'utility_bill_categories', 'refresh');\n\t}", "function deleteProductCategory($connection, int $catId)\n{\n if(is_int($catId))\n {\n if(mysqli_num_rows(mysqli_query($connection, \"SELECT id FROM productCategories WHERE id = '$catId' LIMIT 1\")) == 1)\n {\n $run = mysqli_query($connection , \"DELETE from productCategories WHERE id = '$catId'\");\n if($run)\n {\n return array\n (\n \"result\" => true\n );\n }\n else\n {\n return array\n (\n \"result\" => false,\n \"error\" => mysqli_error($connection)\n );\n }\n\n }\n else\n {\n return array\n (\n \"result\" => false,\n \"error\" => \"Nu s-a gasit nici o categorie in baza id-ului specificat!\"\n );\n }\n }\n else\n {\n return array\n (\n \"result\" => false,\n \"error\" => \"Nici un ID de categorie specificat!\"\n );\n }\n}", "public function delcategory() {\n extract($_GET);\n //print_r($_GET);die();\n // call to model function to del category from db\n $result = $this->dash_model->delcategory($mat_cat_id);\n\n echo json_encode($result);\n }", "public function deleteCategoryLangaugeAction(){\n $ebookers_obj = new Ep_Ebookers_Managelist();\n //to call a function to delete themes//\n $ebookers_obj->deleteCategoryLangauge($this->_request->getParams());\n //unset($_REQUEST);\n exit;\n }", "public function deleteCategory($cat_id)\n {\n DB::table('categories')->where('id',$cat_id)->delete();\n // Display a toaster Deleted message..\n $notification = array(\n 'message' => 'Category Deleted successfully.',\n 'alert-type' => 'success'\n );\n return Redirect()->back()->with($notification);\n }", "public function deleteCategory()\r\n{\r\n $query_string = \"DELETE FROM categories \";\r\n $query_string .= \"WHERE categoryid= :categoryid\";\r\n\r\n return $query_string;\r\n}", "public function delete_assets_category() {\n\t\t\n\t\tif($this->input->post('type')=='delete_record') {\n\t\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t\t$Return = array('result'=>'', 'error'=>'', 'csrf_hash'=>'');\n\t\t\t$id = $this->uri->segment(4);\n\t\t\t$Return['csrf_hash'] = $this->security->get_csrf_hash();\n\t\t\t$result = $this->Assets_model->delete_assets_category_record($id);\n\t\t\tif(isset($id)) {\n\t\t\t\t$Return['result'] = $this->lang->line('xin_success_assets_category_deleted');\n\t\t\t} else {\n\t\t\t\t$Return['error'] = $this->lang->line('xin_error_msg');\n\t\t\t}\n\t\t\t$this->output($Return);\n\t\t}\n\t}", "private function delCategory($idx) {\n \t$query = Category::find()->where('ID != 1 && PARENTID='.$idx)->all();\n \tforeach($query as $items) {\n \t\t$this->delCategory($items['ID']);\n \t}\n\n \t$Postmodel = Products::findAll(['CATEGORYID'=>$idx]);\n \tforeach($Postmodel as $items) {\n \t\t$items->CATEGORYID = 0;\n \t\t$items->save();\n \t}\n \t$this->findModel_category($idx)->delete();\n }", "public function delete_category(){\n $query = \"DELETE FROM {$this->table} WHERE {$this->table}.cat_id = (:cat_id)\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(':cat_id', $this->cat_id);\n $stmt->execute();\n return $stmt;\n \n }", "public function deleteClean() {\n\n $id = $this->request->get('category_id');\n\n // check category valid\n $category = ApplicationCategory::find($id)->first();\n\n $next_id = $this->request->get('next_category_id');\n\n\n $category_next = ApplicationCategory::find($next_id)->first();\n\n // check if exists.\n\n DB::table('apps')\n ->where('category_id', $id)\n ->update(['category_id' => $next_id]);\n\n $category->delete();\n\n return redirect('/develop/categories');\n\n\n }", "function delete_category($category_id)\n {\n $this->db->update('tbl_category',$this,array('category_id'=>$category_id));\n //echo $this->db->last_query();\n }", "function shophead_deleted($category_id = \"\")\n {\n $id = base64_decode($category_id);\n $categroy_data = $this->ProductCategory->find('first', array('conditions' => array('ProductCategory.id' => $id)));\n \n App::import('Model', 'ProductSubCategory');\n $this -> ProductSubCategory = new ProductSubCategory();\n $subcategories=$this->ProductSubCategory->find(\"list\",array('conditions'=>array(\"ProductSubCategory.product_category_id\"=>$id)));\n \n if(count($subcategories)==0){\n if (!empty($categroy_data)) {\n $new_business_data = $categroy_data['ProductCategory']['id'];\n if ($this->ProductCategory->delete($new_business_data)) {\n $this->Session->write('flash', array(DELETE_RECORD, 'success'));\n $this->redirect(array('controller' => 'ProductCategories', 'action' => 'index'));\n } else {\n $this->Session->write('flash', array(FAILURE_MSG, 'failure'));\n $this->redirect(array('controller' => 'ProductCategories', 'action' => 'index'));\n }\n } else {\n $this->redirect(array('controller' => 'ProductCategories', 'action' => 'index'));\n }\n }else{\n $this->Session->write('flash', array(CAT_CHILD_EXIST, 'failure'));\n $this->redirect(array('controller' => 'ProductCategories', 'action' => 'index'));\n }\n }", "function delete_kategori($id_kategori)\n {\n return $this->db->delete('kategori',array('id_kategori'=>$id_kategori));\n }", "public function test_delete_ScienceFiction_category_along_with_its_books(){\n $this->visit('/admin/categories')->press('delete')->press('Proceed')\n ->see('Data removed')->see('The Evolutionary Void')->see('The Dreaming Void')->see('Blood Music');\n\n\n }", "function categories_delete()\n{\n // Get database information\n $dbconn = xarDBGetConn();\n $xartable = xarDBGetTables();\n\n // Delete categories table\n $query = \"DROP TABLE \".$xartable['categories'];\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // Delete links table\n $query = \"DROP TABLE \".$xartable['categories_linkage'];\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // Delete categories ext privileges table\n $query = \"DROP TABLE \".$xartable['categories_ext_privileges'];\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // Delete module variables\n// xarModDelVar('categories', 'bold');\n xarModDelVar('categories', 'catsperpage');\n\n // Remove module hooks\n if (!xarModUnregisterHook('item', 'new', 'GUI',\n 'categories', 'admin', 'newhook')) return;\n if (!xarModUnregisterHook('item', 'create', 'API',\n 'categories', 'admin', 'createhook')) return;\n if (!xarModUnregisterHook('item', 'modify', 'GUI',\n 'categories', 'admin', 'modifyhook')) return;\n if (!xarModUnregisterHook('item', 'update', 'API',\n 'categories', 'admin', 'updatehook'))return;\n if (!xarModUnregisterHook('item', 'delete', 'API',\n 'categories', 'admin', 'deletehook'))return;\n if (!xarModUnregisterHook('module', 'modifyconfig', 'GUI',\n 'categories', 'admin', 'modifyconfighook'))return;\n if (!xarModUnregisterHook('module', 'updateconfig', 'API',\n 'categories', 'admin', 'updateconfighook'))return;\n if (!xarModUnregisterHook('module', 'remove', 'API',\n 'categories', 'admin', 'removehook')) return;\n\n // UnRegister blocks\n if (!xarModAPIFunc('blocks', 'admin', 'unregister_block_type',\n array('modName' => 'categories',\n 'blockType'=> 'navigation'))) return;\n\n xarTplUnregisterTag('categories-navigation');\n xarTplUnregisterTag('categories-filter');\n xarTplUnregisterTag('categories-catinfo');\n /**\n * Remove instances and masks\n */\n\n // Remove Masks and Instances\n xarRemoveMasks('categories');\n xarRemoveInstances('categories');\n\n // Deletion successful\n return true;\n}", "public function actionDelete()\n\t{\n\t\t$categoryId = $this->_input->filterSingle('product_category_id', XenForo_Input::INT);\n\n\t\tif ($this->isConfirmedPost())\n\t\t{\n\t\t\t$writer = XenForo_DataWriter::create('Brivium_Store_DataWriter_Category');\n\t\t\t$writer->setExistingData($categoryId);\n\n\t\t\tif ($this->_input->filterSingle('move_child_categories', XenForo_Input::BINARY))\n\t\t\t{\n\t\t\t\t$parentCategoryId = $this->_input->filterSingle('parent_category_id', XenForo_Input::UINT);\n\n\t\t\t\tif ($parentCategoryId)\n\t\t\t\t{\n\t\t\t\t\t$parentCategory = $this->_getCategoryModel()->getCategoryById($parentCategoryId);\n\n\t\t\t\t\tif (!$parentCategory)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $this->responseError(new XenForo_Phrase('BRS_specified_destination_category_does_not_exist'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// no destination category id, so set it to 0 (root category)\n\t\t\t\t\t$parentCategoryId = 0;\n\t\t\t\t}\n\n\t\t\t\t$writer->setOption(Brivium_Store_DataWriter_Category::OPTION_CHILD_CATEGORY_DESTINATION_PARENT_ID, $parentCategoryId);\n\t\t\t}\n\n\t\t\t$writer->delete();\n\n\t\t\treturn $this->responseRedirect(\n\t\t\t\tXenForo_ControllerResponse_Redirect::SUCCESS,\n\t\t\t\tXenForo_Link::buildAdminLink('store')\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($categoryId)\n\t\t\t{\n\t\t\t\treturn $this->responseReroute('Brivium_Store_ControllerAdmin_Store', 'deleteConfirm');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $this->responseError(new XenForo_Phrase('requested_category_not_found'), 404);\n\t\t\t}\n\t\t}\n\t}", "function testDeletingCategory()\n {\n \n $this->tester->seeRecord('common\\models\\Category', ['description' => 'abc']);\n\n $category = Category::find()->where(['description' => 'abc'])->One();\n $category->delete();\n\n $this->tester->dontseeRecord('common\\models\\Category', ['description' => 'abc']);;\n }", "public function remove_post()\n {\n $input = $this->input->post();\n $data=$this->Category_model->deleteData($input);\n $this->response(['Item deleted successfully.'], REST_Controller::HTTP_OK);\n }", "public function testDeleteCategoryUsingDELETE()\n {\n }", "public function delete()\n {\n if(($this->session->userdata('logged_in') != true) && ($this->session->userdata('logged_in_as') != 'admin'))\n {\n redirect('siteadmin', 'refresh');\n }\n \n $category_deletion_type = $this->input->post('category_deletion_type');\n \n /* starts to delete multiple categories */\n if ($category_deletion_type == 'multiple') \n {\n $category_id = $this->input->post('category_id');\n $c \t = 0;\n for( $i = 0; $i < count($category_id); $i++ )\n {\n $id = $category_id[$i];\n\n $check_category = $this->common_model->query_single_row_by_single_source('boutique_products', 'category_id', $id);\n if (count($check_category) == 0)\n {\n if( $this->common_model->delete_data('id', $id, 'boutique_categories') )\n $c++;\n }\n }\n if( $c == 0 )\n $this->session->set_flashdata('error_message', 'Could not delete any category!!');\n \n elseif( $c == 1 )\n $this->session->set_flashdata('success_message', 'A category was deleted successfully');\n \n elseif( $c > 1 )\n $this->session->set_flashdata('success_message', 'Multiple categories were deleted successfully');\n }\n /* ends to delete multiple category */\n \n /* starts to delete single category */\n else {\n $id = $this->input->post('single_category_id');\n $check_category = $this->common_model->query_single_row_by_single_source('boutique_products', 'category_id', $id);\n if (count($check_category) == 0)\n {\n if( $this->common_model->delete_data('id', $id, 'boutique_categories') )\n $this->session->set_flashdata('success_message', 'A category was deleted successfully');\n else\n $this->session->set_flashdata('error_message', 'Could not delete!! The category is in used');\n }\n else\n $this->session->set_flashdata('error_message', 'Could not delete the category!!');\n }\n /* ends to delete single category */ \n \n redirect(base_url().'category', 'refresh');\n }", "public function deleteCategories($category_id){\n if(DB::table('tbl_post')->where('category_id',$category_id)->first()){\n $name = DB::table('tbl_categories')->where('id',$category_id)->first();\n Session::put('massege','Không thể xóa danh mục \"'.$name->name.'\".');\n }\n else{\n DB::table('tbl_categories')->where('id',$category_id)->delete();\n Session::put('massege','Xoá danh mục thành công.');\n }\n return Redirect::to('categories');\n \n }", "function delete_category($FormID) {\r\n $conn = db_connect();\r\n\r\n $query = \"delete from PortfolioCategories\r\n where PortCatID='\".$FormID.\"'\";\r\n $result = @$conn->query($query);\r\n if (!$result) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "function delete_category($category_id) {\n global $db;\n $query = \n ' DELETE FROM categories \n WHERE cat_categoryID = :category_id';\n $statement = $db->prepare($query);\n $statement->bindValue(':category_id', $category_id);\n $statement->execute();\n $statement->closeCursor();\n}", "public function actionCategoryDelete()\n {\n $this->_assertCanManageCategories();\n\n $category_id = $this->_input->filterSingle('faq_id', XenForo_Input::UINT);\n\n // Delete category\n $dw = XenForo_DataWriter::create('Iversia_FAQ_DataWriter_Category');\n $dw->setExistingData($category_id);\n $dw->delete();\n\n // Delete associated questions\n $this->_getQuestionModel()->deleteOrphanQuestions($category_id);\n\n return $this->responseRedirect(\n XenForo_ControllerResponse_Redirect::SUCCESS,\n XenForo_Link::buildPublicLink('faq'),\n new XenForo_Phrase('iversia_faq_category_deleted')\n );\n }", "public function destroy($category)\n {\n\n $item = BountyCategory::where('id', $category)->delete();\n\n \n \n\n session()->flash('success',\"deleted successfully\");\n return redirect()->back();\n }", "public function modelDelete($category_id){\r\n\t\t\t$conn = Connection::getInstance();\r\n\t\t\t// chuan bi truy van \r\n\t\t\t$query = $conn->prepare(\"delete from tbl_category where category_id=:category_id\");\r\n\t\t\t//thuc thi truy van \r\n\t\t\t$query->execute(array(\"category_id\"=>$category_id));\r\n\t\t\t\r\n\t\t}", "public function delete_categoria($cat_id) {\n $conectar=parent::conexion();\n parent::set_names();\n $sql=\"UPDATE tm_categoria SET est=0 where cat_id=?\";\n $sql=$conectar->prepare($sql);\n // envia parametro\n $sql->bindValue(1,$cat_id);\n $sql->execute();\n // IMPORTANTE AGREGARLE EL PDO::FETCH_ASSOC PARA QUE HAGA BIEN LA CONSULTA\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n \n }", "public function RemoveCategory ($mobidulCode, $categoryId)\n {\n if ( ! $this->GetIsOwnerOfMobidul($mobidulCode) )\n return 'not-allowed';\n\n if ( ! empty($categoryId) )\n {\n $category = Category::where('id', $categoryId);\n\n if ( $category->count() == 0 )\n return 'not-existing';\n\n\n DB::beginTransaction();\n\n $navigationItem = NavigationItem::where('categoryId', $categoryId);\n $category2Station = Category2Station::where('categoryId', $categoryId);\n\n\n // delete NavigationItem\n if ( $navigationItem->count() > 0 )\n $navigationItem->delete();\n\n // delete Category2Station\n if ( $category2Station->count() > 0 )\n $category2Station->delete();\n\n // delete Category\n if ( $category->count() > 0 )\n $deletedCategory = $category->delete();\n\n\n DB::commit();\n\n return 'success';\n }\n else\n return 'empty';\n }", "public function supcat($id)\n{\n $this->categories->delCat($id);\n redirect('administration/categorie');\n}", "function deleteAction()\n\t{\n global $langCode;\n\t\t$id = (int)$this->registry->router->getArg('id');//lay id cua record can xoa\n\t\t$myProductCat = new Core_ProductCategory($id);\n\t\tif($myProductCat->id > 0)\n\t\t{\n\t\t\t//tien hanh xoa\n\t\t\tif($myProductCat->delete())\n\t\t\t{\n\t\t\t\t$redirectMsg = str_replace('###categoryname###', $myProductCat->name[$langCode], $this->registry->lang['controller']['succDelete']);\n\t\t\t\t\n\t\t\t\t$this->registry->me->writelog('ProductCategorydelete', $myProductCat->id, array('name' => $myProductCat->name[$langCode])); \t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$redirectMsg = str_replace('###categoryname###', $myProductCat->name[$langCode], $this->registry->lang['controller']['errDelete']);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$redirectMsg = $this->registry->lang['controller']['errNotFound'];\n\t\t}\n\t\t\n\t\t$this->registry->smarty->assign(array('redirect' => $this->getRedirectUrl(),\n\t\t\t\t\t\t\t\t\t\t\t\t'redirectMsg' => $redirectMsg,\n\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t$this->registry->smarty->display('redirect.tpl');\n\t\t\t\n\t}", "public function deleted(Category $category)\n {\n //\n }", "public function Eliminar(){\n \n \n if (!$this->model->igualar($_REQUEST['id'])) {//si una categoria no esta asignada la puede eliminar\n \n $this->model->Eliminar($_REQUEST['id']);\n header('Location: ?c=Categoria'); \n }\n else{\n \n header('Location: ?c=Categoria&error'); //de lo contrario no se podra eliminar asta que se elimine el cliente que la tiene\n }\n\n\n\n \n \n \n\n\n\n\n \n \n \n }", "public function delete(Request $r)\n {\n DB::beginTransaction();\n try {\n foreach (Item::where('category_id', $r->id)->get() as $value) {\n $data = Item::find($value->id);\n $data->category_id = null;\n $data->update();\n }\n Category::find($r->id)->delete();\n DB::commit();\n $alert = ['success', 'Data kategori berhasil dihapus'];\n } catch (Exception $e) {\n DB::rollBack();\n $alert = ['danger', 'Data kategori gagal dihapus'];\n }\n return back()->with('alert', $alert);\n }", "function delete( $catID = -1 )\r\n {\r\n if ( $catID == -1 )\r\n $catID = $this->ID;\r\n\r\n $db =& eZDB::globalDatabase();\r\n $db->begin();\r\n\r\n $alternatives =& $this->alternatives();\r\n if ( is_array( $alternatives ) )\r\n {\r\n foreach ( $alternatives as $alternative )\r\n {\r\n $alternative->delete();\r\n }\r\n }\r\n\r\n $res[] = $db->query( \"DELETE FROM eZQuiz_Question WHERE ID='$this->ID'\" );\r\n eZDB::finish( $res, $db );\r\n\r\n }", "public function destroy(DrugCategory $drugCategory)\n {\n $drugLanguages = DrugCategoryLanguage::all()->where('drug_category_id',$drugCategory->id);\n foreach ($drugLanguages as $lang){\n $lang->delete();\n }\n $drugCategory->delete();\n return redirect()->route('drug_categories.index')->with('success','DrugCategory is deleted.');\n }", "public function delete_academic_article_category()\n {\n // check status for delete\n $creator = json_decode($this->input->post('creator'));\n if($creator==null || $creator==''){\n echo 'fail';\n exit;\n }\n $creatorID = $this->Check__model->chk_token($creator);\n $statusUser = $this->Check__model->chk_status($creatorID);\n if( $statusUser != 'admin' ){\n echo 'fail';\n exit ;\n }\n //delete\n $academic_article_categoryID = json_decode($this->input->post('academic_article_categoryID'));\n $academic_article_category['aac_id'] = $academic_article_categoryID;\n $AAC_status = $this->academic_article_model->delete_academic_article_category($academic_article_category);\n if($AAC_status == true){\n echo $academic_article_categoryID ;\n } \n\n }", "public function testSuccessDeleteCategory()\n {\n $service = $this->app->make(CategoryServiceInterface::class);\n\n $categoryA = 'categoryA' ;\n \n $service = $this->app->make(CategoryServiceInterface::class);\n $cateA = $service->save(null, $categoryA);\n\n $this->assertDatabaseHas('categories', [\n 'name' => $categoryA\n ]);\n \n $service->delete($cateA->id);\n $this->assertDatabaseMissing('categories', [\n 'name' => $categoryA\n ]);\n }", "function delete_kategori($id_kategori_point)\n {\n return $this->db->delete('kategori',array('id_kategori_point'=>$id_kategori_point));\n }", "public function deleteCategory(int $id): void\n {\n }", "public function delete_sub_sub_category()\n\t{\n\t\t$sub_sub_category_id = $this->input->post('sub_sub_category_id');\n\n\t\t$this->load->model('Admin_functions_model');\n\t\tif( $this->Admin_functions_model->delete_the_sub_sub_category($sub_sub_category_id) )\n\t\t{\n\t\t\t$this->session->set_flashdata('feedback', 'Sub Sub Category deleted successfully');\n\t\t\t$this->session->set_flashdata('feedback_class', 'alert-success');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->session->set_flashdata('feedback', 'Failed to delete, Please try again');\n\t\t\t$this->session->set_flashdata('feedback_class', 'alert-danger');\n\t\t}\n\n\t\treturn redirect('Admin_functions/class_room_training');\n\t}", "function delete( $catID = -1 )\r\n {\r\n if ( $catID == -1 )\r\n $catID = $this->ID;\r\n\r\n $db =& eZDB::globalDatabase();\r\n $db->begin();\r\n\r\n// $answers =& $this->answers();\r\n\r\n if ( is_array ( $answers ) )\r\n {\r\n foreach ( $answers as $answer )\r\n {\r\n $answer->delete();\r\n }\r\n }\r\n\r\n $res[] = $db->query( \"DELETE FROM eZQuiz_Alternative WHERE ID='$catID'\" );\r\n eZDB::finish( $res, $db );\r\n }", "function eliminar_categoria($id){\n if(mostrar_categoria($id)[0]->listaProductos==NULL){\n if(delete_categoria($id)){\n header('Location: /GUI/admin.php?status=Admin&message=eliminó');\n }\n }else{\n header('Location: /GUI/admin.php?status=Admin&message=error prod');\n }\n }", "public function testCreateAndDeleteCategory()\n\t{\n $user = factory(User::class)->create();\n Passport::actingAs($user);\n\n $array_category = array(\n 'user_id' => $user->id,\n\t\t\t'name' => 'Temporal'\n\t\t);\n\n\t\t$category = factory(Category::class)->create($array_category);\n\t\t$this->assertDatabaseHas('categories', $array_category);\n\n\t\t$response = $this->delete('api/categories/' . $category->id);\n\t\t$response->assertStatus(201);\n\t\t$this->assertDatabaseMissing('categories', $array_category);\n\t}", "function Category_delete($id){\n $data= Category::findOrFail($id);\n $data -> delete();\n\n return back();\n }", "public function excluirCategoria($idcategoria){\n //$conexao = $c->conexao();\n\n $sql = \"DELETE FROM tbcategorias WHERE idcategoria = '$idcategoria' \";\n\n return $this->conexao->query($sql);\n\n\n }", "public function remove(Request $request){\n try{\n $category=Category::where('id',$request->id)->first();\n if($category){\n $category->delete();\n return Response::json(['success'=>'Category removed successfully !']);\n }else{\n return Response::json(['error'=>'Category not found!']);\n }\n }catch(\\Illuminate\\Database\\QueryException $exception){\n return Response::json(['error'=>'Category belongs to an article.So you cann\\'t delete this category!']);\n }\n }", "function remove_category($category_id) {\n\t\t$category_image_query = olc_db_query(\"SELECT categories_image FROM \".TABLE_CATEGORIES.\" WHERE categories_id = '\".olc_db_input($category_id).\"'\");\n\t\t$category_image = olc_db_fetch_array($category_image_query);\n\n\t\t$duplicate_image_query = olc_db_query(\"SELECT count(*) AS total FROM \".TABLE_CATEGORIES.\" WHERE categories_image = '\".olc_db_input($category_image['categories_image']).\"'\");\n\t\t$duplicate_image = olc_db_fetch_array($duplicate_image_query);\n\n\t\tif ($duplicate_image['total'] < 2) {\n\t\t\tif (file_exists(DIR_FS_CATALOG_IMAGES.'categories/'.$category_image['categories_image'])) {\n\t\t\t\t@ unlink(DIR_FS_CATALOG_IMAGES.'categories/'.$category_image['categories_image']);\n\t\t\t}\n\t\t}\n\n\t\tolc_db_query(\"DELETE FROM \".TABLE_CATEGORIES.\" WHERE categories_id = '\".olc_db_input($category_id).\"'\");\n\t\tolc_db_query(\"DELETE FROM \".TABLE_CATEGORIES_DESCRIPTION.\" WHERE categories_id = '\".olc_db_input($category_id).\"'\");\n\t\tolc_db_query(\"DELETE FROM \".TABLE_PRODUCTS_TO_CATEGORIES.\" WHERE categories_id = '\".olc_db_input($category_id).\"'\");\n\n\t\tif (USE_CACHE == TRUE_STRING_S) {\n\t\t\tolc_reset_cache_block('categories');\n\t\t\tolc_reset_cache_block('also_purchased');\n\t\t}\n\n\t}", "function deleteCategoryMeta($cat_id) {\n\t\t$course_meta = new CourseMeta($cat_id);\n\t\t$course_meta->delete();\n\t}", "function cat_delete_link()\n{\n return Parrot::getInstance()->getUrl(\"admin/category/\" . discussion::encode_title(cat_title()) . \"/delete\");\n}", "public function delete(){\n\t\t$ok=false;\t\t\n\t\tif (isset($_POST[\"idCategoria\"])) {\n\t\t\t$tabla = \"categorias\";\t\t\t\n\t\t\t$datos = $_POST[\"idCategoria\"];\t\t\t\n\t\t\t//borro la categoría\n\t\t\t$respuesta = ModeloCategorias::delete($tabla, $datos);\n\t\t\tif ($respuesta == \"OK\") {\n\t\t\t\t$ok=true;\t\n\t\t\t}else {\n\t\t\t\t$ok=false;\t\n\t\t\t}\n\t\t}\n\t\treturn json_encode($ok);\n\t}", "public function destroy(Category $category)\n {\n $user_check = \\Auth::user();\n if (in_array($user_check->level, [0, 1])) {\n\n $check_budget = BudgetCategories::where('category_id', $category->id)->count();\n $check_budget_product = BudgetProductAndServices::where('category_id', $category->id)->count();\n $check_product = ProductAndService::where('category_id', $category->id)->count();\n\n $check = $check_budget + $check_product + $check_product;\n\n if ($check > 0) {\n session()->flash('message', 'Essa categoria está associada a uma orçamento e/ou a um produto por isso não é possível excluir');\n return redirect()->route('category.index');\n } else {\n $category->delete();\n session()->flash('message', 'Categoria excluída com sucesso');\n return redirect()->route('category.index');\n }\n } else {\n session()->flash('message', 'Desculpe! Essa área é restrita a administração.');\n return view('includes.message');\n }\n\n }", "function delete_kategori_induk($id)\n {\n return $this->db->delete('kategori_induk',array('kode_kategori_induk'=>$id));\n }", "public function eliminarCategoria($nombrecategoria){\n \t$registro=mysqli_query($this->conexion(),\"select * from categorias where nombrecategoria='$_REQUEST[nombrecategoria]'\") or die(mysqli_error($this->conexion()));\n \tif ($reg=mysqli_fetch_array($registro)){\n \techo '<table border 1 >';\n \techo '<tr><th>Codigo Categoria</th><th>Nombre Categoria</th></tr>';\n \techo \"<td>\".$reg[0].\"<br>\";\n \techo \"<td>\".$reg[1].\"<br>\";\n \techo \"</table>\";\n \tmysqli_query($this->conexion(),\"delete from categorias where nombrecategoria='$nombrecategoria'\");\n\n \techo \"<br><br><br>Se elimino la categoria que se muestra en pantalla\";\n echo \"<form action='abcCategoria.php' method='post'>\n <input type='submit' value='Regresar'><br><br></form>\";\n\n \t}\n \telse{\n \techo 'No existe tal Categoria ingrese nuevamente el nombre';\n echo \"<form action='bajaCategoria.php' method='post'>\n <input type='submit' value='Regresar'><br><br></form>\";\n \t\t}\n \t}", "function delCategory($object) { \n /* you can itentify the item with $object->Item->ShopId */ \n}", "public function removeCategoryForFood($food_id, $category_name){\n\t\t// look for the category_name\n\t\t$query = $this->db->query('\n\t\t\tselect a.id\n\t\t\tfrom food_category_assoc a\n\t\t\tleft join food_category c\n\t\t\ton c.id = a.food_category_id\n\t\t\twhere\n\t\t\t\tupper(c.name) = upper(?)', array(trim($category_name)));\n\t\t$results = $query->result();\n\t\tif (count($results)>0){\n\t\t\t$assoc_id = $results[0]->id;\n\t\t\t\n\t\t\tif (!$this->db->query('delete from food_category_assoc where id=?', array($assoc_id))){\n\t\t\t\treturn $this->db->error;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function delete(int $id)\n {\n // if (is_null($of_category)) {\n // return 'false';\n // }\n \n // if ($of_category->delete()) {\n // return 'success';\n // }\n\n // return 'error'; \n }", "public function deleteIndex($category, $id);", "public function deleteCategory($id) {\n\t\t$stmt = $mysqli->prepare(\"DELETE FROM categorie WHERE cat_id = ?\");\n\t\t$stmt->bind_param('i', $id);\n\t\t$stmt->execute();\n\t\t$stmt->close();\n\t}", "public function deleted(Category $category)\n {\n //\n }", "function delete_category($action, $id)\r\n{\r\n\tglobal $dropbox_cnf;\r\n\tglobal $_user, $is_courseAdmin, $is_courseTutor;\r\n\r\n\t// an additional check that might not be necessary\r\n\tif ($action=='deletereceivedcategory')\r\n\t{\r\n\t\t$sentreceived='received';\r\n\t\t$entries_table=$dropbox_cnf['tbl_post'];\r\n\t\t$id_field='file_id';\r\n\t}\r\n\telseif ($action=='deletesentcategory')\r\n\t{\r\n\t\t$sentreceived='sent';\r\n\t\t$entries_table=$dropbox_cnf['tbl_file'];\r\n\t\t$id_field='id';\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn get_lang('Error');\r\n\t}\r\n\r\n\t// step 1: delete the category\r\n\t$sql=\"DELETE FROM \".$dropbox_cnf['tbl_category'].\" WHERE cat_id='\".Database::escape_string($id).\"' AND $sentreceived='1'\";\r\n\t$result=api_sql_query($sql);\r\n\r\n\t// step 2: delete all the documents in this category\r\n\t$sql=\"SELECT * FROM \".$entries_table.\" WHERE cat_id='\".Database::escape_string($id).\"'\";\r\n\t$result=api_sql_query($sql);\r\n\r\n\twhile ($row=mysql_fetch_array($result))\r\n\t{\r\n\t\t$dropboxfile=new Dropbox_Person( $_user['user_id'], $is_courseAdmin, $is_courseTutor);\r\n\t\tif ($action=='deletereceivedcategory')\r\n\t\t{\r\n\t\t\t$dropboxfile->deleteReceivedWork($row[$id_field]);\r\n\t\t}\r\n\t\tif ($action=='deletesentcategory')\r\n\t\t{\r\n\t\t\t$dropboxfile->deleteSentWork($row[$id_field]);\r\n\t\t}\r\n\t}\r\n}", "public function delete(): void\n {\n $query_lang = 'DELETE FROM '. rex::getTablePrefix() .'d2u_linkbox_categories '\n .'WHERE category_id = '. $this->category_id;\n $result_lang = rex_sql::factory();\n $result_lang->setQuery($query_lang);\n }", "public function deletecategory($args)\n {\n if (!SecurityUtil::checkPermission('Dizkus::', \"::\", ACCESS_ADMIN)) {\n return LogUtil::registerPermissionError();\n }\n \n if (isset($args['cat_id'])) {\n // read all the forums in this category\n $forums = $this->readforums(array('cat_id' => $args['cat_id']));\n if (is_array($forums) && count($forums)>0) {\n foreach ($forums as $forum) {\n // remove all forums in this category\n ModUtil::apiFunc('Dizkus', 'admin', 'deleteforum',\n array('forum_id' => $forum['forum_id'],\n 'ok' => 1));\n } //foreach forum\n }\n // now we can delete the category\n return DBUtil::deleteObject($args, 'dizkus_categories', null, 'cat_id');\n }\n \n return LogUtil::registerError($this->__('Error! The action you wanted to perform was not successful for some reason, maybe because of a problem with what you input. Please check and try again.'));\n }", "public function destroy($kw_category_id = 0, $id)\n {\n\n }", "public function deleteAction()\n {\n // enforce permissions.\n $this->acl->check('categories', 'manage');\n\n // require post request method.\n $request = $this->getRequest();\n if (!$request->isPost()) {\n throw new P4Cms_AccessDeniedException(\n \"Cannot delete category. Request method must be http post.\"\n );\n }\n\n $id = $request->getParam('id', $request->getParam('category'));\n $category = Category_Model_Category::fetch($id);\n $category->delete();\n\n $this->view->category = $category;\n }", "public function delete(Request $request, $categoryId)\n {\n //delete Category\n $category = Category::find($categoryId);\n $category -> delete();\n $categories = Category::orderBy('year1', 'asc')->get();\n foreach ($categories as $category) {\n $category->sex;\n }\n return response()->json([\n 'message' => 'successfully deleted',\n 'categories' => $categories\n ], 200);\n }", "public function delete(){\n $sql = \"DELETE FROM categorias WHERE id={$this->getId()}\";\n $delete = $this->db->query($sql);\n\t\t$result = false;\n\t\tif($delete){\n\t\t\t$result = true;\n\t\t}\n\t\treturn $result;\n }", "public function delete($id_category){\n $category = \\App\\Models\\Category::find($id_category); // find the id and save it to variable category\n $category->delete();\n return redirect('/category')->with('success', 'Delete data success');\n }", "function delete_MaterialCategory($id)\n {\n $this->db->where('id',$id);\n return $this->db->update('prj_mtrl_category',array('delete_status'=>'1'));\n }", "function delete_campaign_list($id, $taxonomy) {\n if ($taxonomy === 'category') {\n require_once 'createsend-php-5.1.2/csrest_lists.php';\n $auth = array('api_key' => CM_API_KEY);\n $wrap = new CS_REST_Lists(get_term_meta($id, 'list_id', true), $auth);\n\n $result = $wrap->delete();\n }\n}", "public function test_can_delete_items_by_category_id()\n {\n $response = $this->delete('/api/items/destroy/1');\n\n $response->assertStatus(200);\n\n $response->assertSee(0);\n }", "public function deleteDiscount();" ]
[ "0.69728845", "0.69309986", "0.68059367", "0.65877753", "0.6557906", "0.6525597", "0.6450585", "0.64371765", "0.6426727", "0.64032364", "0.6383666", "0.633878", "0.6333474", "0.6313338", "0.6311642", "0.6310584", "0.63052934", "0.6280416", "0.62617826", "0.6255811", "0.6216993", "0.6195242", "0.61556023", "0.61548173", "0.6153808", "0.6134707", "0.6121158", "0.6118323", "0.6112253", "0.6103092", "0.60978776", "0.6095505", "0.6091429", "0.60906434", "0.6086456", "0.60742044", "0.60713565", "0.6061699", "0.6054668", "0.60545784", "0.6041406", "0.60397613", "0.6039111", "0.6034644", "0.60341537", "0.60318935", "0.6026513", "0.60238975", "0.60218084", "0.60109776", "0.6008808", "0.60055286", "0.6001689", "0.5994725", "0.59937024", "0.5993664", "0.5978546", "0.5977637", "0.5957695", "0.5954176", "0.59526026", "0.5951619", "0.5933277", "0.59297097", "0.59255075", "0.59252685", "0.5917141", "0.5912622", "0.5896643", "0.5882863", "0.587878", "0.5873214", "0.58692485", "0.58658713", "0.58502644", "0.58487207", "0.5845853", "0.58454555", "0.583669", "0.58356136", "0.58315367", "0.58261", "0.5815604", "0.5813431", "0.58105415", "0.58082926", "0.58047163", "0.5798433", "0.5798364", "0.5796951", "0.5794174", "0.5791732", "0.5781972", "0.57811487", "0.5778946", "0.57773733", "0.57712245", "0.5770273", "0.5770177", "0.5767194" ]
0.70054156
0
TODO: Implement getMsgStatusByMSGID() method.
TODO: Реализовать метод getMsgStatusByMSGID().
public function getMsgStatusByMSGID($msgid) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatus($message_id);", "public function status(string $msgId)\n {\n $options = [\n 'msg_id' => $msgId,\n ];\n var_dump($options);\n var_dump(\"2222\");\n return $this->httpPostJson('cgi-bin/message/mass/get', $options);\n }", "public function getMessageStatus()\n {\n return $this->messageStatus;\n }", "public function Status_ID($msgid) {\n\t$msgid=mysqli_real_escape_string($this->db,$msgid);\n\t$query=mysqli_query($this->db,\"SELECT msg_id FROM messages M, users U WHERE M.uid_fk=U.uid and M.msg_id='$msgid' AND U.status='1'\");\n\tif(mysqli_num_rows($query)>0) {\n\t $row=mysqli_fetch_array($query,MYSQLI_ASSOC);\n\t return $row['msg_id'];\n\t} else {\n\t return false;\n\t}\n}", "public function getStatusMessage();", "function messageStatus($ids)\n {\n\n if (!is_array($ids)) {\n $ids = array($ids);\n }\n\n $ids = implode(',', $ids);\n\n $url = sprintf('cmd=message_status&ids=%s',\n urlencode($ids));\n\n $response = $this->_callURL($url);\n\n if (is_a($response, 'PEAR_Error')) {\n return PEAR::raiseError(sprintf(_(\"Send failed.\")));\n }\n\n $result = array();\n\n if (!array_key_exists('error_code', $response)) {\n\n if (count(explode(',', $ids)) == 1) {\n\n $result[$ids] = array(\n 0 => 1,\n 1 => $response[$ids]\n );\n } else {\n foreach ($response as $id => $message) {\n $result[$id] = array(1, $message);\n }\n }\n } else {\n\n if (count(explode(',', $ids)) == 1) {\n\n $result[$to] = array(\n 0 => 0,\n 1 => $response['error_message']\n );\n } else {\n foreach (explode(',', $ids) as $id) {\n $result[$id] = array(0, $response['error_message']);\n }\n }\n }\n\n return $result;\n }", "function getMessage($msg_id) {\n\t\tif (!$msg_id) {\n\t\t\treturn false;\n\t\t}\n\t\treturn db_query_params ('SELECT * FROM artifact_message_user_vw WHERE id=$1',\n\t\t\tarray($msg_id));\n\t}", "public function getStatusMessage()\r\n\t{\r\n\t\treturn $this->m_message;\r\n\t}", "public function getStatusCodeMsg(): string\r\n {\r\n return $this->_statusCodeMsg;\r\n }", "function getStatusMessage() \r\n\t{\r\n\t\treturn $this->replyString;\r\n\t}", "function Stats($msg=\"\"){\n if($this->state!=\"TRANSACTION\")\n $this->AddError(\"connection is not in TRANSACTION state\");\n\t if (!isset($result)) $result='';\n if ($msg == \"\") :\n $this->POP3Command(\"STAT\", $result);\n else :\n $this->POP3Command(\"LIST $msg\", $result);\n endif;\n $p = explode(\" \", $result);\n $stat[\"message\"] = $p[1];\n $stat[\"size\"] = $p[2];\n return $stat;\n }", "public function get_msgnum()\n {\t\t\n return $this->msgnum;\n }", "abstract public function getFullMessage($msgNo);", "private function getMsg($code){\n\t\t\t$msg = $this->msgcode[$code]['message'];\n\t\t\t$status = $this->msgcode[$code]['status'];\n\t\t\tif ($msg && $status !== NULL) return array($msg, $status);\n\t\t\telse return array($this->msgcode['000']['message'], $this->msgcode['000']['status']);\n\t\t}", "public function getStatus() {\n\t\t$status = $this->status;\n\t\tif(!empty($this->messages)) {\n\t\t\tforeach($this->messages as $idx => $message) {\n\t\t\t\tif($message->getStatus() > $status) {\n\t\t\t\t\t$status = $message->getStatus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $status;\n\t}", "public function doUpdateMessageStatus($id)\n {\n $status = Message::updateMessageStatus($id);\n\n return ucfirst($status);\n }", "public function readableStatus()\n {\n $status = $this->status;\n $match = [\n\n 'message_ok' => \"En attente d'envoi\",\n 'message_issues' => \"Le message contient des erreurs\",\n 'sent' => \"Le message a été envoyé\",\n 'sending' => \"En cours d'envoi…\"\n ];\n\n return isset($match[$status]) ? $match[$status] : $status;\n }", "public function getStatus($markStatusesRead = true, $maxNumberOfStatuses = 100, $messageIds = null)\n {\n $request = array(\n 'GetMessageStatusRequest' => array(\n 'markStatusesRead' => $markStatusesRead,\n 'maxNumberOfStatuses' => $maxNumberOfStatuses\n )\n ); \n \n if ($messageIds) {\n $messageIds = is_array($messageIds) ? $messageIds : array($messageIds);\n foreach ($messageIds as $messageId) {\n $request['GetMessageStatusRequest']['messageIds']['messageId'][] = $messageId;\n }\n }\n\n try { \n $soap_client = $this->getSoapClient();\n $response = $soap_client->__soapCall('GetMessageStatus', $request);\n\n } catch (SoapFault $sf) {\n\n throw new ClientException($this->soapFaultToString($sf)); \n \n } catch (InteleonSoapClientException $e) {\n\n throw new ClientException($e->getMessage()); \n }\n\n $result = array();\n\n if (isset($response->messageStatus) === false) {\n return $result;\n }\n\n foreach ($response->messageStatus as $messageStatus) {\n $result[] = array(\n 'statusCode' => $messageStatus->statusCode,\n 'statusText' => $messageStatus->statusText,\n 'id' => $messageStatus->id,\n 'sender' => $messageStatus->sender,\n 'recipient' => $messageStatus->recipient,\n 'time' => $messageStatus->time,\n 'billingStatus' => $messageStatus->billingStatus,\n 'NumberOfMessages' => $messageStatus->attributes->attribute[0]->value->integer,\n 'NumberOfCharacters' => $messageStatus->attributes->attribute[1]->value->integer\n );\n }\n\n return $result;\n }", "function check_message_status($messageId){\n global $platform;\n try {\n $endpoint = \"/restapi/v1.0/account/~/extension/~/message-store/\".$messageId;\n $resp = $platform->get($endpoint);\n $jsonObj = $resp->json();\n print(\"Message status: \" . $jsonObj->messageStatus . PHP_EOL);\n if ($jsonObj->messageStatus == \"Queued\"){\n sleep(2);\n check_message_status($jsonObj->id);\n }\n } catch (\\RingCentral\\SDK\\Http\\ApiException $e) {\n exit(\"Error message: \" . $e->message . PHP_EOL);\n }\n}", "function ppmess_change_commun_status($message_id, $post_id, $logged_user){\n\t\n\tglobal $wpdb;\n\t\n\t$status = 0; // when sent_to = 0 message is read, if sent_to != 0 message is not read\n\t\n\treturn $wpdb->query(\n\t\t$wpdb->prepare(\"UPDATE {$wpdb->prefix}private_messages SET sent_to = %d WHERE (post_id = %d AND message_id = %d AND message_parent = 0 AND sent_to = %d) \n\t\t\tOR (post_id = %d AND message_parent = %d AND receiver_id = %d) \", $status, $post_id, $message_id, $logged_user, $post_id, $message_id, $logged_user )\n\t);\n}", "public function getStatusMessage()\n {\n return $this->status_message;\n }", "private function getStatusMessage(){\n\t\t$status = array(\n\t\t\t\t100 => 'Continue', \n\t\t\t\t101 => 'Switching Protocols', \n\t\t\t\t200 => 'OK',\n\t\t\t\t201 => 'Created', \n\t\t\t\t202 => 'Accepted', \n\t\t\t\t203 => 'Non-Authoritative Information', \n\t\t\t\t204 => 'No Content', \n\t\t\t\t205 => 'Reset Content', \n\t\t\t\t206 => 'Partial Content', \n\t\t\t\t300 => 'Multiple Choices', \n\t\t\t\t301 => 'Moved Permanently', \n\t\t\t\t302 => 'Found', \n\t\t\t\t303 => 'See Other', \n\t\t\t\t304 => 'Not Modified', \n\t\t\t\t305 => 'Use Proxy', \n\t\t\t\t306 => '(Unused)', \n\t\t\t\t307 => 'Temporary Redirect', \n\t\t\t\t400 => 'Bad Request', \n\t\t\t\t401 => 'Unauthorized', \n\t\t\t\t402 => 'Payment Required', \n\t\t\t\t403 => 'Forbidden', \n\t\t\t\t404 => 'Not Found', \n\t\t\t\t405 => 'Method Not Allowed', \n\t\t\t\t406 => 'Not Acceptable', \n\t\t\t\t407 => 'Proxy Authentication Required', \n\t\t\t\t408 => 'Request Timeout', \n\t\t\t\t409 => 'Conflict', \n\t\t\t\t410 => 'Gone', \n\t\t\t\t411 => 'Length Required', \n\t\t\t\t412 => 'Precondition Failed', \n\t\t\t\t413 => 'Request Entity Too Large', \n\t\t\t\t414 => 'Request-URI Too Long', \n\t\t\t\t415 => 'Unsupported Media Type', \n\t\t\t\t416 => 'Requested Range Not Satisfiable', \n\t\t\t\t417 => 'Expectation Failed', \n\t\t\t\t500 => 'Internal Server Error', \n\t\t\t\t501 => 'Not Implemented', \n\t\t\t\t502 => 'Bad Gateway', \n\t\t\t\t503 => 'Service Unavailable', \n\t\t\t\t504 => 'Gateway Timeout', \n\t\t\t\t505 => 'HTTP Version Not Supported');\n\t\treturn ($status[$this->_code]) ? $status[$this->_code] : $status[500];\n\t}", "public function get_status_message() {\n\n\t\treturn $this->get_status_info()->message;\n\t}", "public function getStatusMessage()\n {\n return $this->statusMessage;\n }", "public function status( &$numMessages, &$sizeMessages )\r\n {\r\n if ( $this->state != self::STATE_TRANSACTION )\r\n {\r\n throw new ezcMailTransportException( \"Can't call status() on the POP3 transport when not successfully logged in.\" );\r\n }\r\n\r\n $this->connection->sendData( \"STAT\" );\r\n $response = $this->connection->getLine();\r\n if ( $this->isPositiveResponse( $response ) )\r\n {\r\n // get the single response line from the server\r\n list( $dummy, $numMessages, $sizeMessages ) = explode( ' ', $response );\r\n $numMessages = (int)$numMessages;\r\n $sizeMessages = (int)$sizeMessages;\r\n }\r\n else\r\n {\r\n throw new ezcMailTransportException( \"The POP3 server did not respond with a status message: {$response}.\" );\r\n }\r\n }", "private function getMsg()\n {\n return $this->msg;\n }", "public static function getReceivedStatus(){\n\t\treturn self::getStatus( 'received' );\n\t}", "function _getStatusMessage(){\n $status = array(\n 200 => 'Ok' ,\n 201 => 'Created' ,\n 202 => 'deleted' ,\n 204 => 'No Content' ,\n 400 => 'Bad Request',\n 404 => 'Not Found' ,\n 405 => 'Not Allowed' ,\n 406 => 'Not Acceptable',\n\n );\n return ($status[$this->CodeHTTP] ? $status[$this->CodeHTTP] : $status[500]);\n }", "public function getMessage($id) {\n\t\tif (!array_key_exists($id, $this -> messages)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this -> messages[$id];\n\t}", "public function getMessage() {\n return $this->getStatus();\n }", "public function Msghandle(){\n\n\t\t\t$this->message = $this->msglog = $this->asciilog = $this->status = NULL;\n\t\t\t$this->showclassnames = TRUE;\n\n\t\t\t$this->msgcode = array(\n\t\t\t\t\t\t\t\t\t\t\"000\" => array(\"message\" => \"Message code not found\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"001\" => array(\"message\" => \"Connection resource is not set\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"002\" => array(\"message\" => \"Missing parameters\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"003\" => array(\"message\" => \"Statement is not valid\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"004\" => array(\"message\" => \"Email address already taken\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"005\" => array(\"message\" => \"No row affected\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"006\" => array(\"message\" => \"Password not found\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"007\" => array(\"message\" => \"User data not found\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"008\" => array(\"message\" => \"Username doesn't exist\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"009\" => array(\"message\" => \"Wrong password\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"010\" => array(\"message\" => \"URL format is not valid\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"011\" => array(\"message\" => \"No URL specified\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"012\" => array(\"message\" => \"BabelNet connection failed\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"013\" => array(\"message\" => \"Method is not valid\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"014\" => array(\"message\" => \"Parameters are not valid\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"015\" => array(\"message\" => \"Conflictual settings\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"016\" => array(\"message\" => \"Required attribute not found\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"017\" => array(\"message\" => \"Microsoft Translator auth token not valid\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"018\" => array(\"message\" => \"A parameter is an array\", \"status\" => \"Error\"),\n\t\t\t\t\t\t\t\t\t\t\"019\" => array(\"message\" => \"A parameter is not an array\", \"status\" => \"Error\"),\n\n\t\t\t\t\t\t\t\t\t\t\"998\" => array(\"message\" => \"Operation successful\", \"status\" => \"Notice\"),\n\t\t\t\t\t\t\t\t\t\t\"999\" => array(\"message\" => \"Class instanced successfully\", \"status\" => \"Notice\"),\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\n\t\t\t$this->log(\"999\", __METHOD__);\n\t\t}", "public function get($ID){\n\t\tsql('DELETE FROM messages WHERE from_status=\"0\" AND to_status=\"0\"');\n\t\tsql('DELETE FROM messages WHERE fromID = \"\" or toID = \"\"');\n\t\t\n\t\t$ID = ($ID) ? $ID : $_SESSION['user'] ;\n\t\t\n\t\t$messages = sql('SELECT ' . $this->select . '\n\t\t\t\t\t\t\t\t \t\t FROM ' . $this->from . '\n\t\t\t\t\t\t\t\t \t\t WHERE a.toID LIKE \"%'.$_SESSION['user'].'%\"\n\t\t\t\t\t\t\t\t \t\t AND a.to_status!=\"0\"\n\t\t\t\t\t\t\t\t \t\t AND a.fromID = b.code\n\t\t\t\t\t\t\t\t \t\t ORDER BY a.date DESC '.$this->limit );\n\t\t\n\t\treturn $messages;\n\t\t\n\t}", "abstract public function get_message();", "public function setStatusCodeMsg($msg)\r\n {\r\n $this->_statusCodeMsg = $msg;\r\n }", "function statusMessage()\n {\n }", "public function status() {\n\t\t$obj->number = $this->status_code;\n\t\t$obj->msg = $this->status_msg;\n\t\treturn $obj;\n\t}", "public function getStateMessage();", "public function get_msg() {\r\n return $this->msg;\r\n }", "public function loadMessage($msgId, $setOpen = true)\n {\n\n $db = $this->getDb();\n $user = $this->getUser();\n\n $sql = <<<SQL\n\nselect\n msg.rowid as msg_id,\n msg.title,\n msg.message,\n msg.priority,\n msg.m_time_created,\n msg.id_sender_status,\n msg.confidential,\n task.deadline as task_deadline,\n task.progress as task_progress,\n task.status as task_status,\n task.flag_urgent as task_urgent,\n task.rowid as task_id,\n appoint.timestamp_start as appoint_start,\n appoint.timestamp_end as appoint_end,\n appoint.flag_all_day as appoint_all_day,\n appoint.id_category as appoint_category,\n appoint.rowid as appoint_id,\n appoint.location_text as appoint_location,\n receiver.status as receiver_status,\n receiver.rowid as receiver_id,\n receiver.flag_participation_required,\n receiver.flag_action_required,\n receiver.flag_editable,\n sender.fullname as sender_name,\n sender.core_person_rowid as sender_pid,\n sender.buiz_role_user_rowid as sender_id,\n receiver_name.fullname as receiver_name\n\nFROM\n buiz_message msg\n\nJOIN\n\tbuiz_message_receiver receiver\n\t\tON receiver.id_message = msg.rowid\n\nLEFT JOIN\n\tbuiz_task task\n\t\tON task.id_message = msg.rowid\n\nLEFT JOIN\n\tbuiz_appointment appoint\n\t\tON appoint.id_message = msg.rowid\n\nJOIN\n view_person_role sender\n ON sender.buiz_role_user_rowid = msg.id_sender\n\nJOIN\n view_person_role receiver_name\n ON receiver_name.buiz_role_user_rowid = receiver.vid\n\nWHERE\n msg.rowid = {$msgId};\n\nSQL;\n\n\n $node = $db->select($sql)->get();\n\n if ($node) {\n\n // auf open setzen wenn noch closed\n if ($setOpen && EMessageStatus::OPEN > $node['receiver_status'] ) {\n $db->update(\"UPDATE buiz_message_receiver set status =\".EMessageStatus::OPEN.\" WHERE rowid = \".$node['receiver_id'] );\n $node['receiver_status'] = EMessageStatus::OPEN;\n }\n\n $this->messageNode = new TDataObject($node);\n\n }\n\n if (!$this->messageNode)\n throw new DataNotExists_Exception('The requested message not exists.');\n\n $this->loadMessageAspects($msgId);\n\n return $this->messageNode;\n\n }", "function _show_forum_new_msgs_status ($forum_info = array()) {\n\t\t// Forum is read-only\n\t\tif ($forum_info['status'] == 'r') {\n\t\t\t$forum_status = 2;\n\t\t} else {\n\t\t\t// No new messages by default\n\t\t\t$forum_status = 0;\n\t\t\t// Try to find read messages\n\t\t\tif (module('forum')->SETTINGS['USE_READ_MESSAGES'] && !module('forum')->_get_forum_read($forum_info)) {\n\t\t\t\t$forum_status = 1;\n\t\t\t}\n\t\t}\n\t\t$replace = array(\n\t\t\t'img_src'\t\t=> WEB_PATH. tpl()->TPL_PATH. module('forum')->FORUM_STATUSES[$forum_status][0],\n\t\t\t'status_title'\t=> t(module('forum')->FORUM_STATUSES[$forum_status][1]),\n\t\t\t'status_id'\t\t=> intval($forum_status),\n\t\t);\n\t\treturn tpl()->parse('forum'.'/view_home_status_icon', $replace);\n\t}", "function sms_get_status($sms_id)\r\n\t{\r\n\t\tglobal $sms_accountno, $sms_pwd;\r\n\r\n\t\t$status_url = \"https://api.accessyou.com/sms/receivestatus.php?\";\r\n\t\t$status_url .= \"accountno=\".urlencode($sms_accountno);\r\n\t\t$status_url .= \"&pwd=\".urlencode($sms_pwd);\r\n\t\t$status_url .= \"&id=\".urlencode($sms_id);\r\n\r\n\t\t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $status_url);\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\r\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 20);\r\n\r\n\t\t$result = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\tif (!preg_match(\"/DELIVERED|UNDELIVERED|UNKNOWN|FAILED|REJECTED|nostatus/i\", $result)) {\r\n\t\t\t$result = \"Error: \" . $result;\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "public function getMsg()\n {\n return $this->Msg;\n }", "public function getMsgId()\n {\n return $this->msg_id;\n }", "public function getMsg()\n {\n return $this->msg;\n }", "public function getMsg()\n {\n return $this->msg;\n }", "public function getMessageId() {\n return $this->message_id;\n }", "public function hasMsg(){\n return $this->_has(18);\n }", "protected function getMsg( $msgId )\n\t{\n\t\t$msgText = wfMsgExt( $msgId );\n\t\t\n\t\tif ( wfEmptyMsg( $msgId, $msgText ))\n\t\t\treturn null;\n\t\t\t\n\t\treturn $msgText;\t\t\t\n\t}", "function message($message) {\n\t\t\t\t\t\t$GLOBALS['statusmsg'] = \"RX-OK|\";\n\n\t\t\t\t\t\t //**Store the received message to a global variable\n\t\t\t\t\t\t$GLOBALS['rcv_message'] = $message->payload; \n\t\t\t\t}", "function getAllMessages(){\r\n /*for testing purposes only, replace with request to db\r\n return array(\r\n array('messageId' => 1, 'title' => 'Indice', 'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed accumsan aliquet tellus, semper euismod urna finibus placerat. Vestibulum hendrerit tellus.', 'status' => 'Active'),\r\n array('messageId' => 2, 'title' => 'Annonce', 'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed accumsan aliquet tellus, semper euismod urna finibus placerat. Vestibulum hendrerit tellus.', 'status' =>'Inactive'),\r\n array('id' => 3, 'title' => 'Météo', 'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed accumsan aliquet tellus, semper euismod urna finibus placerat. Vestibulum hendrerit tellus.', 'status' =>'Active'),\r\n array('id' => 4, 'title' => 'Nouvel indice', 'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed accumsan aliquet tellus, semper euismod urna finibus placerat. Vestibulum hendrerit tellus.', 'status' =>'Active'),\r\n array('id' => 5, 'title' => 'Fin du jeu', 'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed accumsan aliquet tellus, semper euismod urna finibus placerat. Vestibulum hendrerit tellus.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed accumsan aliquet tellus, semper euismod urna finibus placerat. Vestibulum hendrerit tellus.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed accumsan aliquet tellus, semper euismod urna finibus placerat. Vestibulum hendrerit tellus.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed accumsan aliquet tellus, semper euismod urna finibus placerat. Vestibulum hendrerit tellus.', 'status' =>'Inactive')\r\n );*/\r\n //$GLOBALS['link'] = connect();\r\n $res = mysqli_query($GLOBALS['link'], 'select `id`, `title`, `text`, `status` from messages;');\r\n\r\n return fetch_result($res);\r\n}", "function get($msg_index) {\n if (isset($this->inbox[$msg_index])) \n {\n return $this->inbox[$msg_index];\n }else\n {\n return false;\n }\n }", "public function get_message($msg_type=false) \n {\n $sess_msg= Session::instance()->get(\"hana_message\", array());\n if(!empty($sess_msg)) $this->message=$sess_msg;\n \n if($msg_type)\n {\n return $this->message[$msg_type];\n }\n else\n {\n return $this->message;\n }\n }", "public function getMessageId() {\n\treturn ($this->messageId);\n}", "public function checkMessage(){\r\n \t\t// checking message\r\n \t\t$message_id = $this->_request->getParam(\"message_id\");\r\n \t\t// check id param for project\r\n \t\tif(!is_numeric($message_id)){\r\n \t\t\t$this->_helper->FlashMessenger(array('error' => 'This FloBox message is not found, are you trying to hack us? :D '));\r\n \t\t\t$this->_redirect('/member/error/');\r\n \t\t}\r\n \t\t \r\n \t\ttry{\r\n \t\t\treturn $this->facadeFlobox->findOneMessage($this->_member_id,$message_id);\r\n \t\t}catch(\\Exception $e){\r\n \t\t\t$this->_helper->FlashMessenger(array('error' => $e->getMessage()));\r\n \t\t\t$this->_redirect('/member/error/');\r\n \t\t}\r\n \t}", "function get_message($id_message)\n\t{\n\t\t$this->ci->db->select('*');\n\t\t$this->ci->db->where('am_id', $id_message);\n\t\t$query = $this->ci->db->get('auth_message');\n\t\tif($query->num_rows() != 0)\n\t\t{\n\t\t\t$data = $query->row()->am_message;\n\t\t\treturn $data;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public function getMessageId()\n {\n }", "function statusMessagesOn()\n\t{\n\t\t$this->bStatusMessages = true;\n\t}", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "function getStatus() \r\n\t{\r\n\t\treturn $this->reply;\r\n\t}", "abstract public function GetStatus();", "private function GetPendingStatus($WH_ID)\n\t{\n\t\t\n $record = $this->SQL->GetRecord(array(\n 'table' => $GLOBALS['TABLE_instructor_profile_pending'],\n 'keys' => '*',\n 'where' => \"wh_id='$WH_ID' AND active=1\",\n ));\n if ($this->Show_Query) echo \"<br /><br />LAST QUERY = \" . $this->SQL->Db_Last_Query;\n \n if ($record) {\n $this->status_pending\t= $record['status_pending'];\n $this->status_rejected \t= $record['status_rejected'];\n }\n\t}", "function toggleMessageStatus($messageId){\r\n //$GLOBALS['link'] = connect();\r\n mysqli_query($GLOBALS['link'], 'update messages set `status`=NOT(`status`) where `id`='. $messageId .';') or die(mysqli_error($GLOBALS['link']));\r\n\r\n return mysqli_affected_rows($GLOBALS['link']);\r\n}", "function getStatusMessage(){\n\t\tif($this->_StatusMessage){ return $this->_StatusMessage; }\n\n\t\t//cerpano z\n\t\t//http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\n\t\t$status = array(\n\t\t\t// Successful 2xx\n\t\t\t\"200\" => \"OK\",\n\t\t\t\"201\" => \"Created\",\n\t\t\t\"202\" => \"Accepted\",\n\t\t\t\"203\" => \"Non-Authoritative Information\",\n\t\t\t\"204\" => \"No Content\",\n\t\t\t\"205\" => \"Reset Content\",\n\t\t\t\"206\" => \"Partial Content\",\n\t\t\t// Redirection 3xx\n\t\t\t\"300\" => \"Multiple Choices\",\n\t\t\t\"301\" => \"Moved Permanently\",\n\t\t\t\"302\" => \"Found\",\n\t\t\t\"303\" => \"See Other\",\n\t\t\t\"304\" => \"Not Modified\",\n\t\t\t\"305\" => \"Use Proxy\",\n\t\t\t// (306 Unused)\n\t\t\t\"307\" => \"Temporary Redirect\",\n\t\t\t// Client Error 4xx\n\t\t\t\"400\" => \"Bad Request\",\n\t\t\t\"401\" => \"Unauthorized\",\n\t\t\t\"402\" => \"Payment Required\",\n\t\t\t\"403\" => \"Forbidden\",\n\t\t\t\"404\" => \"Not Found\",\n\t\t\t\"405\" => \"Method Not Allowed\",\n\t\t\t\"406\" => \"Not Acceptable\",\n\t\t\t\"407\" => \"Proxy Authentication Required\",\n\t\t\t\"408\" => \"Request Timeout\",\n\t\t\t\"409\" => \"Conflict\",\n\t\t\t\"410\" => \"Gone\",\n\t\t\t\"411\" => \"Length Required\",\n\t\t\t\"412\" => \"Precondition Failed\",\n\t\t\t\"413\" => \"Request Entity Too Large\",\n\t\t\t\"414\" => \"Request-URI Too Long\",\n\t\t\t\"415\" => \"Unsupported Media Type\",\n\t\t\t\"416\" => \"Requested Range Not Satisfiable\",\n\t\t\t\"417\" => \"Expectation Failed\",\n\t\t\t\"418\" => \"I'm a teapot\",\n\t\t\t// Server Error 5xx\n\t\t\t\"500\" => \"Internal Server Error\",\n\t\t\t\"501\" => \"Not Implemented\",\n\t\t\t\"502\" => \"Bad Gateway\",\n\t\t\t\"503\" => \"Service Unavailable\",\n\t\t\t\"504\" => \"Gateway Timeout\",\n\t\t\t\"505\" => \"HTTP Version Not Supported\",\n\t\t\t\"506\" => \"Variant Also Negotiates\",\n\t\t\t\"507\" => \"Insufficient Storage\",\n\t\t);\n\t\treturn isset($status[\"$this->_StatusCode\"]) ? $status[\"$this->_StatusCode\"] : \"Unknown\";\n\t}", "public function Messages_Get($ID)\n\t{\n\t\t$Data = $this -> HTTPRequest($this -> APIURL.'Messages:Get/ID:'.(int)$ID);\n\t\treturn $this -> ParseResponse($Data);\n\t}", "public function setMessageSeen($msg_id)\n {\n $query = \"UPDATE message_to_advertiser SET is_seen = 'y' WHERE $msg_id\";\n return $this->getQueryResult($query, $this->getConnection());\n }", "public static function getStatusMessage()\n {\n switch(self::status())\n {\n case 'PLEXCEL_NO_CREDS':\n return \"no creds\";\n break;\n case 'PLEXCEL_PRINCIPAL_UNKNOW':\n return \"principal unknow\";\n break;\n case 'PLEXCEL_LOGON_FAILED':\n return \"logon failed\";\n break;\n default:\n return \"error :\".self::status();\n }\n }", "public function getStateMessage(/* ... */)\n {\n return $this->_stateMessage;\n }", "public function getMessageInfo($messageId);", "public function iN_UpdateMessageNotificationStatus($userID) {\n\t\t$userID = mysqli_real_escape_string($this->db, $userID);\n\t\tif ($this->iN_CheckUserExist($userID) == 1) {\n\t\t\tmysqli_query($this->db, \"UPDATE i_users SET message_notification_read_status = '0' WHERE iuid = '$userID'\") or die(mysqli_error($this->db));\n\t\t}\n\t}", "function ppmess_change_commun_status_2($logged_user, $author_id, $post_id){\n\tglobal $wpdb;\n\t\n\t$status = 0; // when sent_to = 0 message is read, if sent_to != 0 message is not read\n\t\n\treturn $wpdb->query(\n\t\t$wpdb->prepare(\"UPDATE {$wpdb->prefix}private_messages SET sent_to = %d WHERE ( post_id = %d AND ((receiver_id = %d AND sender_id = %d) \n\t\t\tOR (receiver_id = %d AND sender_id = %d)) AND message_parent = 0 AND sent_to = %d )\", \n\t\t\t\t$status, $post_id, $logged_user, $author_id, $author_id, $logged_user, $logged_user)\n\t);\n}", "public function statusMessage(): string;", "public function testGetValidMessagebyMessageId(){\n\t\t//create a new message\n\t\t$newMessage =new message (null, $this->VALID_MESSAGE_ID, $this->VALID_LISTING_Id, $this->VALID_ORG_ID, $this->VALID_MESSAGE_ID, $this->VALID_MESSAGE_TEXT);\n\t\t$newMessage->insert($this->getPDO());\n\n\t\t//grab the data from guzzle\n\t\t$response = $this->guzzle->get('http://bootcamp-coders.cnm.edu/~bread-basket/public_html/php/api/message/' . $newMessage-getMessage());\n\t\t$this->assertSame($response->getStatusCode(),200);\n\t\t$body = $response->getBody();\n\t\t$alertLevel = json_decode ($body);\n\t\t$this->assertSame(200, $alertLevel->status);\n\t}", "public function getMessages() {}", "public function getMessages() {}", "public function actionMakeMsgRead()\n {\n CommonUtility::startProfiling();\n try\n {\n Yii::app()->clientScript->scriptMap['jquery.js'] = false;\n Yii::app()->clientScript->scriptMap['jquery.min.js'] = false;\n Yii::app()->clientScript->scriptMap['jquery.yiiactiveform.js'] = false;\n $msgId = $_POST[Globals::FLD_NAME_MSG_ID];\n $userId = $_POST[Globals::FLD_NAME_USER_ID];\n $inboxUser = InboxUser::model()->findByAttributes(array(Globals::FLD_NAME_MSG_ID => $msgId , Globals::FLD_NAME_USER_ID => $userId ));\n $inboxUser->{Globals::FLD_NAME_IS_READ} = Globals::DEFAULT_VAL_MSG_IS_READ;\n if(!$inboxUser->save())\n { \n throw new Exception(\"Unexpected error !!! setmessage to unread..\");\n }\n echo $error = CJSON::encode(array(\n 'status'=>'success',\n \n ));\n }\n catch(Exception $e)\n { \n //catch exception\n $msg = $e->getMessage();\n CommonUtility::catchErrorMsg( $msg );\n }\n CommonUtility::endProfiling();\n }", "function loadMessage($id) {\n $sql = \"SELECT log_id, log_time, log_msgtype, log_msgno,\n log_msg_short, log_msg_long,\n log_msg_uri, log_msg_script,\n log_msg_from_ip, log_msg_referer, log_msg_cookies,\n log_version_papaya, log_version_project,\n user_id, username\n FROM %s\n WHERE log_id = %d\";\n if ($res = $this->databaseQueryFmt($sql, array($this->table, $id))) {\n if ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $this->messageList[$row['log_id']] = $row;\n return TRUE;\n }\n }\n return FALSE;\n\n }", "function ppmess_delete_commun($message_id, $post_id, $user_logged){\n\t\n\tglobal $wpdb;\t\n\t\n\t// default state: npr. for user_id = 1 and user_id = 2 \"_1_2\" OR \"_2_1\"\n\t$new_status = '__'; // deaktiviranje aktivnosti diskusije za trenutnog korisnika\n\t$search_status = '_' . $user_logged; // trenutni status u bazi ( pocetan vrednost je \"_NUMBER\" - znaci da je diskusija aktuelna za korisnika user_NUMBER )\n\t\t\t\t\t\t\t\t\t\t// ako nema broja NUMBER u koloni show_status diskusija za korisnika NUMBER vise nije aktivna\n\t$new_sent_to = 0;\t\t\t\t\t\t\t\t\t\n\t// get current status for desired communicatiion\n\t$query = \"SELECT show_status FROM {$wpdb->prefix}private_messages WHERE message_id = $message_id AND post_id = $post_id AND message_parent = 0 AND (receiver_id = $user_logged OR sender_id = $user_logged)\";\n\t$current_status = $wpdb->get_results( $query, ARRAY_A );\n\t\n\tif( $wpdb->num_rows == 1 ){\n\t\tforeach($current_status as $status){\n\t\t\t$new_value = str_replace($search_status, $new_status, $status['show_status']); \n\t\t}\n\t}else{\n\t\treturn FALSE;\n\t}\n\t\n\treturn $wpdb->query(\n\t\t$wpdb->prepare(\"UPDATE {$wpdb->prefix}private_messages SET show_status = %s, sent_to = %d WHERE (message_id = %d AND post_id = %d AND message_parent = 0\n\t\t\tAND (receiver_id = %d OR sender_id = %d)) OR (post_id = %d AND message_parent = %d AND (receiver_id = %d OR sender_id = %d))\", \n\t\t\t$new_value, $new_sent_to, $message_id, $post_id, $user_logged, $user_logged, $post_id, $message_id, $user_logged, $user_logged)\n\t);\t\n}", "function onGetStatus($mynumber, $from, $requested, $id, $time, $data) {\n\tglobal $DBH;\n\t$number = explode(\"@\", $from)[0];\n\t$privacy_enabled = ($time == null ? true : false);\n\n\tif(!$privacy_enabled) {\n\t\t$latest_statusmsg = $DBH->prepare('SELECT 1 FROM statusmessage_history WHERE \"number\"=:number AND \"changed_at\" = to_timestamp(:time)');\n\t\t$latest_statusmsg -> execute(array(':number' => $number,\n\t\t\t\t\t\t\t\t\t\t ':time' => (string)$time));\n\n\t\tif($latest_statusmsg -> rowCount() == 0) {\n\t\t\t// Update database\n\t\t $insert = $DBH->prepare('INSERT INTO statusmessage_history (\n\t\t\t \t\t\t\"number\", status, changed_at)\n\t\t\t \t\t\t\t\t\t VALUES (:number, :status, to_timestamp(:time));');\n\t\t\t$insert->execute(array(':status' => $data,\n\t\t\t\t\t\t\t\t ':number' => $number,\n\t\t\t\t\t\t\t\t ':time' => (string)$time));\n\t\t\techo ' -[status-msg] Inserted new status message for '.$number.' ('.htmlentities($data).').'.\"\\n\";\n\t\t}\n\t}\n\n\t// Update privacy\n\t$privacy_status = $DBH->prepare('SELECT \"statusmessage_privacy\" FROM accounts WHERE \"id\"=:number');\n\t$privacy_status -> execute(array(':number' => $number));\n\t$row = $privacy_status -> fetch();\n\tif($privacy_enabled != (boolean)$row['statusmessage_privacy']) {\n\t\t$update = $DBH->prepare('UPDATE accounts\n\t\t\t\t\t\t\t\tSET \"statusmessage_privacy\" = :privacy WHERE \"id\" = :number;');\n\t\t$update->execute(array(':number' => $number, ':privacy' => (int)$privacy_enabled));\n\t\tif($privacy_enabled) {\n\t\t\techo ' -[status-msg] '.$number.' has the statusmessage privacy option ENABLED! '.\"\\n\";\n\t\t} else {\n\t\t\techo ' -[status-msg] '.$number.' has the statusmessage privacy option DISABLED! '.\"\\n\";\n\t\t}\n\t}\n\n\n}", "protected function get_user_message_id() {\n\n\t\t$codes = array(\n\t\t\t'22' => 'card_number_invalid',\n\t\t\t'25' => 'card_expiry_invalid',\n\t\t\t'08' => 'csc_mismatch',\n\t\t\t'44' => 'avs_mismatch',\n\t\t\t'F1' => 'avs_mismatch',\n\t\t\t'F2' => 'card_declined',\n\t\t\t'201' => 'card_number_invalid',\n\t\t\t'302' => 'insufficient_funds',\n\t\t\t'303' => 'card_declined',\n\t\t\t'304' => 'card_number_type_invalid',\n\t\t\t'401' => 'card_declined',\n\t\t\t'402' => 'card_declined',\n\t\t\t'501' => 'card_declined',\n\t\t\t'502' => 'decline',\n\t\t\t'503' => 'csc_mismatch',\n\t\t\t'505' => 'decline',\n\t\t\t'508' => 'decline',\n\t\t\t'509' => 'insufficient_funds',\n\t\t\t'510' => 'insufficient_funds',\n\t\t\t'521' => 'insufficient_funds',\n\t\t\t'522' => 'card_expired',\n\t\t\t'530' => 'card_declined',\n\t\t\t'531' => 'csc_mismatch',\n\t\t\t'750' => 'bank_aba_invalid',\n\t\t\t'751' => 'bank_aba_invalid',\n\t\t\t'787' => 'decline',\n\t\t\t'811' => 'csc_mismatch',\n\t\t\t'903' => 'card_expiry_invalid',\n\t\t);\n\n\t\treturn isset( $codes[ $this->get_status_code() ] ) ? $codes[ $this->get_status_code() ] : 'error';\n\t}", "public function getMessageCode()\n {\n }", "function ostGetOtherStatus( $statusID ){\r\n\r\n\t/* @var $dbHandler DataBase */\r\n\t$dbHandler = Core::getdbHandler();\r\n\r\n\t$sql = '\r\n\t\tSELECT * FROM ?#ORDER_STATUSES_TABLE\r\n\t\tWHERE statusID<>? AND statusID<>?\r\n\t';\r\n\t$Result = $dbHandler->query($sql);\r\n\tif( $_Row = db_fetch_row($q) ){\r\n\r\n\t\tLanguagesManager::ml_fillFields(ORDER_STATUSES_TABLE, $_Row);\r\n\t\t_correctOrderStatusName( $_Row );\r\n\t\treturn $_Row;\r\n\t}else return false;\r\n}", "public function getMessageId();", "public function getMessageId();", "public function getMessageId();", "public function getMessageId();", "public function getMessageCode()\n {\n return $this->messageCode;\n }", "function mail_move_msg($msg,$tofolder) {\n\t\t$tofolder = $this->fix_prefix($tofolder,1);\n\t\tif($this->mail_protocol == \"imap\") {\n\n\t\t\tif($tofolder != $msg[\"folder\"]) {\n\t\t\t\t/* check the message id to make sure that the messages still in the server */\n\t\t\t\tif($this->_current_folder != $msg[\"folder\"])\n\t\t\t\t\t$boxinfo = $this->mail_select_box($msg[\"folder\"]);\n\t\t\n\t\t\t\t$this->mail_send_command(\"FETCH \".$msg[\"id\"].\":\".$msg[\"id\"].\" BODY.PEEK[HEADER.FIELDS (Message-Id)]\".$this->CRLF);\n\t\t\t\t$buffer = chop($this->mail_get_line());\n\t\n\t\t\t\t/* if any problem with the server, stop the function */\n\t\t\t\tif(preg_match(\"/^(\".$this->_sid.\" (NO|BAD))/i\",$buffer)) { $this->mail_error_msg = $buffer; return 0; }\n\t\n\t\t\t\twhile(!preg_match(\"/^(\".$this->_sid.\" OK)/i\",$buffer)) {\n\t\t\t\t\t/* we need only the message id yet */\n\t\n\t\t\t\t\tif(preg_match(\"/message-id: (.*)/i\",$buffer,$regs))\n\t\t\t\t\t\t$current_id = preg_replace(\"/<(.*)>/\",\"\\\\1\",$regs[1]);\n\t\n\t\t\t\t\t$buffer = chop($this->mail_get_line());\n\t\t\t\t}\n\n\t\t\t\t/* compare the old and the new message id, if different, stop*/\n\t\t\t\tif(base64_encode($current_id) != base64_encode($msg[\"message-id\"])) {\n\t\t\t\t\t$this->mail_error_msg = $error_retrieving;\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\t$tofolder = $this->fix_prefix($tofolder,1);\n\t\t\t\t\n\t\t\t\t$this->mail_send_command(\"COPY \".$msg[\"id\"].\":\".$msg[\"id\"].\" \\\"$tofolder\\\"\".$this->CRLF);\n\t\t\t\t$buffer = $this->mail_get_line();\n\n\t\t\t\t/* if any problem with the server, stop the function */\n\t\t\t\tif(!preg_match(\"/^(\".$this->_sid.\" OK)/i\",$buffer)) { $this->mail_error_msg = $buffer; return 0; }\n\n\t\t\t\tif(file_exists($msg[\"localname\"])) {\n\t\t\t\t\t$currentname = $msg[\"localname\"];\n\t\t\t\t\t$basename = basename($currentname);\n\t\t\t\t\t$newfilename = $this->user_folder.\"$tofolder/$basename\";\n\t\t\t\t\tcopy($currentname,$newfilename);\n\t\t\t\t\tunlink($currentname);\n\t\t\t\t}\n\t\t\t\t$this->mail_set_flag($msg,\"\\\\DELETED\",\"+\");\n\t\t\t\t$this->_require_expunge = true;\n\t\t\t}\n\n\t\t\treturn 1;\n\n\t\t} else {\n\n\t\t\tif($tofolder != $this->_sysmap[\"inbox\"] && $tofolder != $msg[\"folder\"]) {\n\t\t\t\t/* now we are working with POP3 */\n\t\t\t\t/* check the message id to make sure that the messages still in the server */\n\t\t\t\tif($msg[\"folder\"] == $this->_sysmap[\"inbox\"]) {\n\t\n\t\t\t\t\t$this->mail_send_command(\"TOP \".$msg[\"id\"].\" 0\".$this->CRLF);\n\t\t\t\t\t$buffer = $this->mail_get_line();\n\t\t\n\t\t\t\t\t/* if any problem with the server, stop the function */\n\t\t\t\t\tif(!preg_match(\"/^(\\+OK)/\",$buffer)) { $this->mail_error_msg = $buffer; return 0; }\n\t\t\n\t\t\t\t\tunset($header);\n\t\t\n\t\t\t\t\twhile (!feof($this->mail_connection)) {\n\t\t\t\t\t\t$buffer = $this->mail_get_line();\n\t\t\t\t\t\tif(trim($buffer) == \".\") break;\n\t\t\t\t\t\t$header .= $buffer;\n\t\t\t\t\t}\n\t\t\t\t\t$mail_info = $this->get_mail_info($header);\n\t\t\n\t\t\n\t\t\t\t\t/* compare the old and the new message id, if different, stop*/\n\t\t\t\t\tif(base64_encode($mail_info[\"message-id\"]) != base64_encode($msg[\"message-id\"])) {\n\t\t\t\t\t\t$this->mail_error_msg = $error_retrieving;\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!file_exists($msg[\"localname\"])) {\n\t\t\t\t\t\tif(!$this->mail_retr_msg($msg,0)) \n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t$this->mail_set_flag($msg,\"\\\\SEEN\",\"-\");\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->mail_send_command(\"DELE \".$msg[\"id\"].$this->CRLF);\n\t\t\t\t\t$buffer = $this->mail_get_line();\n\n\t\t\t\t\tif(!preg_match(\"/^(\\+OK)/\",$buffer)) { \n\t\t\t\t\t\t$this->mail_error_msg = $buffer; \n\t\t\t\t\t\treturn 0; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(file_exists($msg[\"localname\"])) {\n\t\t\t\t\t$currentname = $msg[\"localname\"];\n\t\t\t\t\t$basename = basename($currentname);\n\t\t\t\t\t$newfilename = $this->user_folder.\"$tofolder/$basename\";\n\t\t\t\t\tcopy($currentname,$newfilename);\n\t\t\t\t\tunlink($currentname);\n\t\t\t\t}\n\t\t\t} else \n\t\t\t\treturn 0;\n\t\t\t\n\t\t}\n\t\treturn 1;\n\t}", "public function actionMakeMsgUnread()\n {\n CommonUtility::startProfiling();\n try\n {\n Yii::app()->clientScript->scriptMap['jquery.js'] = false;\n Yii::app()->clientScript->scriptMap['jquery.min.js'] = false;\n Yii::app()->clientScript->scriptMap['jquery.yiiactiveform.js'] = false;\n $msgId = $_POST[Globals::FLD_NAME_MSG_ID];\n $userId = $_POST[Globals::FLD_NAME_USER_ID];\n \n $inboxUser = InboxUser::model()->findByAttributes(array(Globals::FLD_NAME_MSG_ID => $msgId , Globals::FLD_NAME_USER_ID => $userId ));\n $inboxUser->{Globals::FLD_NAME_IS_READ} = Globals::DEFAULT_VAL_MSG_IS_NOT_READ;\n if(!$inboxUser->save())\n { \n throw new Exception(\"Unexpected error !!! setmessage to unread..\");\n }\n echo $error = CJSON::encode(array(\n 'status'=>'success',\n \n ));\n }\n catch(Exception $e)\n { \n //catch exception\n $msg = $e->getMessage();\n CommonUtility::catchErrorMsg( $msg );\n }\n CommonUtility::endProfiling();\n }", "public function getIdMessage() \n\t{\n\t\treturn $this->idMessage;\n\t}", "function getMsgReceived($account, $profile_id='%%', $conv_id='%%', $msg_id='%%', $template='%%', $watson_msg='%%', $watson_try='%%', $is_read='%%'){\n\t\tglobal $db;\n\t\t$profile_id = empty($profile_id)?'%%':$profile_id;\n\t\t$conv_id = empty($conv_id)?'%%':$conv_id;\n\t\t$msg_id = empty($msg_id)?'%%':$msg_id;\n\t\t$template = empty($template)?'%%':$template;\n\t\t$watson_msg = getType($watson_msg)!='boolean'?'%%':intval($watson_msg);\n\t\t$watson_try = getType($watson_try)!='boolean'?'%%':intval($watson_try);\n\t\t$is_read = getType($is_read)!='boolean'?'%%':intval($is_read);\n\n\t\t$statement = $db->prepare('SELECT * FROM msg_conversation WHERE by_bot=0 AND profile_id LIKE :profile_id AND conv_id LIKE :conv_id AND msg_id LIKE :msg_id AND template_msg LIKE :template AND watson_msg LIKE :watson_msg AND watson_try LIKE :watson_try AND is_read LIKE :is_read AND accountID=:account ORDER BY date');\n\t\t$statement->execute(array(':profile_id'=>$profile_id, ':conv_id'=>$conv_id, ':msg_id'=>$msg_id, ':template'=>$template, ':watson_msg'=>$watson_msg, ':watson_try'=>$watson_try, ':is_read'=>$is_read, ':account'=>$account));\n\t\treturn $statement->rowCount()==0?null:$statement->fetchAll(PDO::FETCH_ASSOC);\n\t}", "public function getHttpStatusMessage() {\n\t}", "abstract public function getMsgError();", "private function _getStatusCodeMessage($status = 100)\n {\n return (isset($this->codes[$status])) ? $this->codes[$status] : '';\n }", "public function getIdMessage()\n {\n return $this->idMessage;\n }" ]
[ "0.7625756", "0.70659006", "0.6991421", "0.681895", "0.673134", "0.639874", "0.6263489", "0.62102044", "0.607951", "0.6073092", "0.6046357", "0.6016508", "0.6011807", "0.60105884", "0.6003367", "0.59765834", "0.59706825", "0.5963977", "0.5945867", "0.59445965", "0.59393036", "0.59222883", "0.5877346", "0.5833522", "0.5816147", "0.5767163", "0.5755507", "0.5730118", "0.5719084", "0.570718", "0.5702368", "0.5690621", "0.5689899", "0.5679614", "0.56701654", "0.5659442", "0.5648167", "0.5641626", "0.5641367", "0.5613456", "0.5610186", "0.5608858", "0.5608761", "0.5606829", "0.5606829", "0.55901325", "0.5587373", "0.5585179", "0.5583115", "0.5580427", "0.55790263", "0.5571512", "0.55624473", "0.5560286", "0.55280054", "0.5526808", "0.55257565", "0.55246204", "0.55246204", "0.55246204", "0.55246204", "0.55246204", "0.55246204", "0.55246204", "0.5522319", "0.55216223", "0.5519384", "0.5507477", "0.5504202", "0.5502517", "0.5499865", "0.54932904", "0.54899645", "0.5478901", "0.5462627", "0.5459865", "0.5456352", "0.5442362", "0.5440268", "0.5440268", "0.5439888", "0.5426573", "0.54210037", "0.54100853", "0.54092485", "0.5407299", "0.54029804", "0.5397895", "0.5397895", "0.5397895", "0.5397895", "0.53977495", "0.538397", "0.5380765", "0.53762174", "0.53652894", "0.53644055", "0.5362126", "0.53494316", "0.5344914" ]
0.8129333
0
Is the session ending?
Завершается ли сессия?
public function isEnding() { return $this->session->expiring(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sessions_end()\n\t{\n\t\t// nothing to see here\n\t}", "public static function sessionClose()\n {\n return true;\n }", "public static function afnSessionStop()\n {\n @session_unset();\n @session_destroy();\n return true;\n }", "public function logout()\n\t\t{\n\t\t\treturn $this->end_session();\n\t\t}", "public static function endSession()\n {\n if (!empty(self::$_start_time)) {\n $now = microtime(true);\n self::$_duration = $now - self::$_start_time;\n }\n }", "private function end() {\n if ($this->isSessionStarted()) {\n session_commit();\n $this->clear();\n }\n }", "public function isEnded();", "public function closeSession() {\n session_unset();\n return true;\n }", "public function isEnded() {}", "public function stop() {\r\n\t\tif ($this->hasSession()) {\r\n\t\t\t$sessionId = self::getSessionId();\r\n\t\t\tself::session($sessionId);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function on_session_end() {\n}", "public function stop() : bool\n {\n if ($this->isActive()) {\n $closed = \\session_write_close();\n }\n return $closed ?? true;\n }", "public function close()\n {\n session_write_close();\n return true;\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 destroy(){\n\t\tif( $this->sessionState == self::SESION_INICIADA){\n\t\t\t$this->sessionState = !session_destroy();\n\t\t\tunset( $_SESSION);\n\t\t\treturn !$this->sessionState;\n\t\t}\n\t\treturn FALSE;\n\t}", "function isSessionExpired() {\n $lastActivity = $_SESSION['LAST_ACTIVITY'];\n $timeOut = $_SESSION['IDLE_TIME_LIMIT'];\n // Check if session has been active longer than IDLE_TIME_LIMIT\n if(time() - $lastActivity >= $timeOut) {\n return true;\n } else { false; }\n }", "public function sessionIsTimedOut()\n {\n if ($this->sessionTimeout <= $this->sessionAge()) {\n return true;\n }\n\n return false;\n }", "public function logout() {\r\n $this->sess->resetSession();\r\n return(true);\r\n }", "public function isEnded()\n {\n return $this->ended_at > 0;\n }", "private function expiredSession() {\r\n\r\n if (time()>$this->forcedExpire) return true;\r\n else return false;\r\n }", "public function destroy():bool\n {\n\n $this->sessionState = !session_destroy();\n unset($_SESSION);\n\n return !$this->sessionState;\n }", "public function end_login(){\n\n\t\t//STARTS SESSION IF NON\n\t\tsession_id() == ''? session_start(): NULL;\n\n\t\t$this->LOGGED_IN = false;\n\t\tunset($this->USER_ID);\n\n\t\t$_SESSION = Array();\n\n\t\tsetcookie(\"PHPSESSID\", NULL, time()-3600, '/');\n\t\tsetcookie(\"user\", NULL, time()-3600, '/');\n\n\t\techo Janitor::build_json_alert('Logged Out Successfully', 'Success', 107, 1);\n\t\texit;\n\t\t}", "function EndSession(){\n session_unset(); \n // destroy the session \n session_destroy(); \n }", "public function destroy()\n {\n if ($this->sessionState == self::SESSION_STARTED) {\n $this->sessionState = !session_destroy();\n unset($_SESSION);\n\n return !$this->sessionState;\n }\n \n return false;\n }", "public static function logout()\n\t{\n\t\t$session = Common::getSession();\n\t\t$session->del(self::$sessionName);\n\t\treturn true;\n\t}", "private function end_session()\n\t\t{\n\t\t\tif (isset($_SESSION['userid']))\n\t\t\t{\n\t\t\t\tif (isset($_COOKIE['auth_token']))\n\t\t\t\t\tsetcookie('auth_token', '', strtotime('-1 year'));\n\n\t\t\t\tsession_destroy();\n\t\t\t}\n\t\t\treturn ['id' => null, 'name' => null, 'state' => 0];\n\t\t}", "public final function __end() : bool {\n\t\t\treturn false;\n\t\t}", "public function close() {\n\t\t$this->sessionClosed = true;\n\t}", "public function hasSession() {}", "public function logout()\n\t\t{\n\t\tif (!$this->checkSession()) return false;\n\t\t$res=$this->get(\"http://m.linkedin.com/session/logout\",true);\n\t\t$this->debugRequest();\n\t\t$this->resetDebugger();\n\t\t$this->stopPlugin();\n\t\treturn true;\t\n\t\t}", "function session_leave()\n{\n session_write_close();\n}", "public function isLoged() {\n\n\t\tif (is_null($this->getSession()))\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "public function action_endsession()\n\t{\n\t\t// This is so easy!\n\t\tunset($_SESSION['admin_time']);\n\n\t\t// Clean any admin tokens as well.\n\t\tcleanTokens(false, '-admin');\n\n\t\tif (isset($this->_req->query->redir, $this->_req->server->HTTP_REFERER))\n\t\t{\n\t\t\tredirectexit($_SERVER['HTTP_REFERER']);\n\t\t}\n\n\t\tredirectexit();\n\t}", "protected function is_timed_out( )\n\t{\n\t\t$user = $this->php_session->get('user');\n\t\tif( $user['last_active'] <= time()-1800 ) //times out in 30 minutes\n\t\t\treturn False; \n\t\treturn True;\t\n\t}", "public function logout()\n {\n $user = LSPrincipal::getUser();\n $logout = $user->userLogout();\n \n // Verifying if the user left completely\n if (($logout === true)) {\n return true;\n } else {\n return false;\n }\n }", "static public function sessionIsValid()\n {\n try {\n $ret = false;\n\n session_start();\n\n // TODO: Make sure this is correct\n if (isset($_SESSION) && $_SESSION['sessionkey']) {\n $ret = true;\n\n // Update last activity time stamp\n $_SESSION['LAST_ACTIVITY'] = time();\n } else {\n session_unset();\n session_destroy();\n }\n\n return $ret;\n } catch (Exception $e) {\n return false;\n }\n }", "public function hasEnded()\n {\n return $this->ended;\n }", "function endSession()\n\t{\n\t\tsession_start();\n\t\tif (isset($_SESSION['userFirstName']) && isset($_SESSION['userLastName']) && isset($_SESSION['userName']))\n\t\t{\n\t\t\tunset($_SESSION['userFirstName']);\n\t\t\tunset($_SESSION['userLastName']);\n\t\t\tunset($_SESSION['userName']);\n\t\t\tsession_destroy();\n\n\t\t\techo json_encode(array('success' => 'Session deleted'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdie(json_encode(errors(417)));\n\t\t}\n\t}", "public function verifySessionIntegrity() {\n if (!$this->isValidSession()) {\n $this->end();\n $this->restart();\n }\n }", "public function __destruct() {\n session_write_close();\n return true;\n }", "public function destroy() {\n\n if($this->isActive()) {\n return session_destroy();\n }\n return false;\n }", "public function ends()\n {\n return $this->endRepeat !== \"never\";\n }", "public function sessionIdIsTimedOut()\n {\n if ($this->sessionIdTimeout <= $this->sessionAge()) {\n return true;\n }\n\n return false;\n }", "public function logout() {\n $this->session->unsetUserData();\n return true;\n }", "public function destroy(): bool\n {\n session_destroy();\n if ($this->active()) {\n session_destroy();\n unset($_SESSION);\n\n return $this->active() === false;\n }\n return false;\n }", "public function abort() : bool\n {\n if ($this->isActive()) {\n $aborted = \\session_abort();\n }\n return $aborted ?? true;\n }", "public function destroy() : bool\n {\n if ($this->isActive()) {\n $destroyed = \\session_destroy();\n }\n unset($_SESSION);\n return $destroyed ?? true;\n }", "public function logout()\n\t\t{\n\t\tif (!$this->checkSession()) return false;\n\t\t$res=$this->get(\"http://www.plurk.com/Users/logout\",true); \n\t\t$this->debugRequest();\n\t\t$this->resetDebugger();\n\t\t$this->stopPlugin();\n\t\treturn true;\t\n\t\t}", "public static function logout()\n {\n $currentSession = SessionService::getCurrent();\n if (!is_null($currentSession)) {\n SessionService::setCurrent(null);\n return self::invalidateSession($currentSession[\"guid\"]);\n }\n return true;\n }", "protected static function sessionExists() {\n return session_status() == 2;\n }", "static public function isCurrentSessionValid() {\n\t\t$session = self::getCurrentSession();\n\t\t\n\t\tif (!empty($session)) {\n\t\t\t\n\t\t\t$now = new DateTime('now', new DateTimeZone('UTC'));\n\t\t\t$ssoSessionExpires = new DateTime($session->SSOSessionExpires);\n\t\t\t\n\t\t\tif ($ssoSessionExpires > $now) \n\t\t\t\treturn true;\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t\tself::clearCurrentSession();\n\t\t\t}\n\t\t} \n\t\t\n\t\treturn false;\n\t}", "protected function _IsSessionTimeout()\n\t{\n\t\t// ...\n\t\t$bRet = false;\n\n\t\t// ...\n\t\t$bValidSession = true;\n\t\t$cSession\t= new CUCSession();\n\n\t\t//\n\t\t//\tCheck session via Redis service if T->CKT_REFRESHTM is overdue\n\t\t//\n\t\t$nRefreshTime = $this->GetXTValue( $this->m_sMKeyT, self::CKT_REFRESHTM );\n\t\tif ( time() - $nRefreshTime > 0 )\n\t\t{\n\t\t\t//\trefresh time is overdue, it's time to check via Redis\n\t\t\t//\t...\n\t\t\t$bValidSession = $cSession->IsValidSession();\n\t\t}\n\n\t\t// ...\n\t\tif ( $bValidSession )\n\t\t{\n\t\t\tif ( $this->IsKeepAlive() )\n\t\t\t{\n\t\t\t\t//\n\t\t\t\t//\treturn false if user set to keep alive\n\t\t\t\t//\n\t\t\t\t$bRet = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//\t...\n\t\t\t\t$nLoginTime = $this->GetXTValue( $this->m_sMKeyT, self::CKT_LOGINTM );\n\t\t\t\tif ( is_numeric( $nLoginTime ) )\n\t\t\t\t{\n\t\t\t\t\t//\tescaped time in seconds after user logged in\n\t\t\t\t\t// the default timeout is 1 day.\n\t\t\t\t\t$term = floatval( time() - floatval( $nLoginTime ) );\n\t\t\t\t\t$bRet = ( $term > $this->m_arrCfg[ self::CFGKEY_STIMEOUT ] );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// login time is invalid\n\t\t\t\t\t// So, we marked this session as timeout\n\t\t\t\t\t$bRet = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// session is timeout.\n\t\t\t// So, we marked this session as timeout\n\t\t\t$bRet = true;\n\t\t}\n\n\t\treturn $bRet;\n\t}", "private function isLoggedin()\n\t{\n\t\t$this->idletime = 18000;\n\n\t\tif ((time()-$_SESSION['timestamp'])>$this->idletime)\n\t\t{\n\t\t\t$message = \"You are signed out from the previous session ! Please try sign in again!\";\n\t\t\t$this->logout($message);\n\t\t}\n\t\telseif($this->logged_in() == false)\n\t\t{\n\t\t\t$message = \"Invalid session !! Please try sign in again.\";\n\t\t\t$this->logout($message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_SESSION['timestamp'] = time();\n\t\t}\n\t}", "function db_pwassist_session_close()\n{\n\treturn true;\n}", "public function sessionIsValid()\n {\n return $this->authClient->sessionIsValid();\n }", "public function isRecentLogout()\n {\n if ($this->session->get($this->recentLogoutEventIndex)) {\n $this->session->set($this->recentLogoutEventIndex, false);\n return true;\n }\n return false;\n }", "function _session_is_valid(){\n\t\treturn session_is_valid($this->_state_session_id);\n\t}", "function destroy()\n {\n // session was already destroyed\n\t\tif( $this->_state === 'destroyed' ) {\n return true;\n\t\t}\n\n session_unset();\n session_destroy();\n\n\t\t// In order to kill the session altogether, like to log the user out, the session id\n\t\t// must also be unset. If a cookie is used to propagate the session id (default behavior),\n\t\t// then the session cookie must be deleted.\n\t\tif (isset($_COOKIE[session_name()])) {\n\t\t\tsetcookie(session_name(), '', time()-42000, '/');\n\t\t}\n\n\t\t$this->_state = 'destroyed';\n\t\treturn true;\n\t}", "public function hasSession() {\r\n\t\treturn is_null($this->id) ? false : true;\r\n\t}", "function checkLogout(){\n\t\tif ($_SESSION['logrec_logout'] == 0){\n\t\t\tshowMessage(\"You forgot to logout last time. Please remember to log out properly.\");\n\t\t\t$_SESSION['logrec_logout'] = 1;\n\t\t}\n\t}", "public function hasSession() {\n return !empty($this->session);\n }", "public static function close() {\n if ('' !== session_id()) {\n session_write_close();\n }\n }", "public function has_ended() {\r\n\t\treturn 0 == $this->get_seconds_left();\r\n\t}", "private function isSessionAvailable(): bool\n {\n return $this->session !== null;\n }", "public function verifySession() {\n\t\t$this->reload();\n\t\tif ($this->getSession() == session_id())\n\t\t\treturn true;\n\t\telse {\n\t\t\tif($_SESSION[\"loginUser\"])\n\t\t\t\tunset($_SESSION[\"loginUser\"]);\n\t\t\treturn false;\n\t\t}\n\t}", "function endSession()\n {\n $this->documentBuffer .= \"</div>\\n\";\n }", "protected function hasExpired()\r\n {\r\n return isset($this->_session[$this->_timeoutKey]) && $this->_session[$this->_timeoutKey] < time();\r\n }", "private function userFinishedSession(Session $session)\n {\n return $session->participants()\n ->wherePivot('user_id', Auth::id())\n ->wherePivot('status', 'finished')\n ->exists();\n }", "function shutdown() {\r\n // Write the session data to the disk\r\n session_write_close();\r\n}", "public function logout( ) {\n\t\tif( ini_get(\"session.use_cookies\") ) {\n\t\t\t$params = session_get_cookie_params();\n\t\t\tsetcookie(session_name(), '', time() - 42000,\n\t\t\t$params[\"path\"], $params[\"domain\"],\n\t\t\t$params[\"secure\"], $params[\"httponly\"]\n\t\t\t);\n\t\t}\n\t\tif( parent::logout() ) {\n\t\t\t$_SESSION = array();\n\t\t\tsession_destroy();\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function expireSession()\n\t{\n\t\t// TODO\n\t}", "function _close()\n\t{\n\t\tif (!$this->connection)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->_send_command('QUIT');\n\t}", "public static function logout()\n {\n if (self::check()) {\n session_unset($_SESSION['user']);\n return true;\n }\n return false;\n }", "public static function sessionCloseHandler();", "public static function Logout()\n\t{\n\t\t$_SESSION = array();\n\t\tsession_destroy();\n\t\tsession_start();\n\t\tsession_regenerate_id();\n\t\treturn !isset($_SESSION['userID']);\n\t}", "public function logout(){\n\t\n\t\t$accessor = BankAccessor::create();\n\t\t\n\t\t//\tGets the current user and their token\n\t\t$user = $accessor->getCurrentUser();\n\t\t$token = Cookie::get('BankingSession');\n\t\t\n\t\t//\tIf the logout was successful delete the cookie\n\t\tif ($accessor->logout($user->ID, $token) == 0) {\n\t\t\t\n\t\t\tCookie::force_expiry(\"BankingSession\");\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public static function endSession ($sid)\r\n\t{\r\n\t\t$sess = self::$instances->$sid;\r\n\t\t$sess->end();\r\n\t\tunset(self::$instances->$sid);\r\n\r\n\t\t// Destroy the global session object after the\r\n\t\t// last session has been closed\r\n\t\tif (0 === sizeof(self::$instances)) {\r\n\t\t\tsession_destroy();\r\n\t\t}\r\n\t}", "public function sessions_end($SESS)\n\t{\n\t\t// Check app version to see what to do\n\t\tif (version_compare(APP_VER, '2.4.0', '<') && REQ == 'PAGE')\n\t\t{\n\t\t\t$this->_add_vars();\n\t\t}\n\n\t\t// Return it again\n\t\treturn $SESS;\n\t}", "public function destroy() {\r\n\t\tsession_destroy();\r\n\treturn true;\r\n\t}", "public function sessions_end($session)\n {\n if ($this->ee->uri->segment(1) === 'payment_return') {\n // assign the session object prematurely, since EE won't need it anyway\n // (this hook runs inside the Session object constructor, which is a bit weird)\n $this->ee->session = $session;\n\n $_GET['H'] = (string) $this->ee->uri->segment(2);\n\n $module = new Module;\n $module->act_payment_return();\n }\n }", "public static function destroy(){\n\t\t\tif(Session::session_started()){\n\t\t\t\tif(ini_get('session.use_cookies')){\n\t\t\t\t\t$params = session_get_cookie_params();\n\t\t\t\t\tsetcookie(session_name(), '', time() - 86400, $params['path'], $params['domain'], $params['secure'], $params['httponly']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsession_destroy();\n\t\t\t\t\n\t\t\t\tSession::session_start();\n\t\t\t\tSession::reset();\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}", "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}", "private function verifySession()\n {\n if ((isset($this->session['id']))\n && (is_numeric($this->session['id']))\n && (isset($this->session['legit']))\n && ($this->session['legit'] === $this->sessionHash())\n ) {\n return true;\n }\n return false;\n }", "public function endSessionAction() {\n try {\n if ($this->statistics) {\n $statisticsTime = new StatisticsTime();\n $statisticsTime\n ->setStatistics($this->statistics)\n ->setAction($this->type)\n ->setMySessionId($this->sessionId)\n ->setIp(@$_SERVER['REMOTE_ADDR'])\n ->setTimeType('end')\n ->setTimeLength(time() - $this->statistics->getCreatedAt()->getTimestamp());\n $this->em->persist($statisticsTime);\n $this->em->flush();\n return new JsonResponse(array('success' => true, 'msg' => 'End session action successuflly did'));\n } else {\n throw new \\Exception('Cant find statistics for this session id and app id!');\n }\n } catch (\\Exception $e) {\n return new JsonResponse(array('success' => false, 'msg' => 'An error occured', 'error' => $e->getMessage()));\n }\n }", "public function ended();", "private function isSession () : bool {\n return !empty($_SESSION);\n }", "public static function session_kill()\n {\n \tif (isset($_SESSION)) {\n \t\t$_SESSION = array();\n\n \t\tif (ini_get('session.use_cookies')) {\n \t\t $params = session_get_cookie_params();\n \t\t setcookie(session_name(), '', time() - 42000,\n \t\t $params['path'], $params['domain'],\n \t\t $params['secure'], $params['httponly']\n \t\t );\n \t\t}\n\n\t\t\tsession_unset();\n \t\tsession_destroy();\n \t\treturn true;\n \t}\n \treturn false;\n }", "public function logout()\n {\n // destroy all data registered to the session\n session_destroy();\n // unset a given variable\n unset($_SESSION['user_session']);\n\n return true;\n }", "public function LogOut()\n {\n $uid = $_SESSION['uid'];\n\n if(session_destroy()) {\n $result = $this->db->delete('sessions', array('fk_uid' => $uid));\n if($result) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "function wsod_sess_close() {\n $_GET['debug'] ? unregister_tick_function('wsod_tick') : NULL; // DEBUG_OFF\n $_GET['debug'] ? print wsod_tick(TRUE) : NULL; // DEBUG_PRINT\n\n $is_emergency = (strpos($_SERVER['SCRIPT_FILENAME'], 'emergency.php') !== FALSE);\n wsod_check_wsod(TRUE, $is_emergency, $is_emergency, $is_emergency);\n return TRUE;\n}", "public function getTermination() : bool\r\n\t{\r\n\t\treturn $this->terminated;\r\n\t}", "private function isNewSession($timestamp = '', $last_req = 0) {\n\t\t\n\t\t$is_new_session = false;\n\t\t\n\t\tif ( ! $timestamp ) {\n\t\t\t$timestamp = time();\n\t\t}\n\t\t\t\t\n\t\t$time_since_lastreq = $timestamp - $last_req;\n\t\t$len = owa_coreAPI::getSetting( 'base', 'session_length' );\n\t\tif ( $time_since_lastreq < $len ) {\n\t\t\towa_coreAPI::debug(\"This request is part of a active session.\");\n\t\t\treturn false;\t\t\n\t\t} else {\n\t\t\t//NEW SESSION. prev session expired, because no requests since some time.\n\t\t\towa_coreAPI::debug(\"This request is the start of a new session. Prior session expired.\");\n\t\t\treturn true;\n\t\t}\n\t}", "public function isExpired($timeout) {\n // Session ended normally\n if ($this->session != self::SESSION_ACTIVE) {\n return true;\n }\n\n // Session timed out\n if (($this->created + $timeout) >= time()) {\n $this->setState(self::SESSION_TIMEOUT);\n return true;\n }\n\n return false;\n }", "public function logout()\n {\n $this->_user->delLoggedInUser();\n return true;\n }", "public function logout(): bool\n {\n }", "public function logout(): bool\n {\n }", "private function isLogoutSuccessful()\n {\n if (isset($_SESSION[\"user\"])) {\n $this->logoutMessage = \"Fel uppstod, du kunde EJ loggas ut!\";\n return false;\n } else {\n $this->logoutMessage = \"Du har loggat ut. Stäng ner webbläsaren som extra säkerhet!\";\n return true;\n }\n }", "public function reset() : bool\n {\n return \\session_reset();\n }", "public function auth_logout()\r\n {\r\n $_SESSION['usr'] = null;\r\n session_destroy();\r\n\r\n return true;\r\n }", "protected function checkSessionLifetime() {}" ]
[ "0.7965865", "0.76960903", "0.7401781", "0.73459166", "0.71515185", "0.71076417", "0.70544535", "0.7033305", "0.70268667", "0.7003383", "0.6970757", "0.6925148", "0.6842896", "0.68338794", "0.683221", "0.6814471", "0.68008876", "0.67978567", "0.67450947", "0.673175", "0.67193335", "0.6716497", "0.669879", "0.66333747", "0.6565394", "0.6550854", "0.65294564", "0.65179634", "0.6504312", "0.6503547", "0.65021837", "0.6501443", "0.64931494", "0.64736307", "0.6460457", "0.6458514", "0.6433407", "0.642971", "0.64249367", "0.64194953", "0.64125574", "0.64058244", "0.6397991", "0.63859284", "0.63840646", "0.6375078", "0.6372906", "0.6361116", "0.63561094", "0.6322166", "0.63032687", "0.6288793", "0.62879413", "0.62760866", "0.6258719", "0.6255149", "0.6222436", "0.6199859", "0.6195804", "0.6192542", "0.61921394", "0.61906385", "0.619028", "0.6188596", "0.6178817", "0.6167547", "0.6152634", "0.61461604", "0.6145183", "0.61399996", "0.6138447", "0.61378914", "0.61291414", "0.61173785", "0.6114714", "0.6102231", "0.6101258", "0.6098875", "0.6093009", "0.6091233", "0.6079436", "0.6069322", "0.6061885", "0.606185", "0.6044614", "0.60250497", "0.60166776", "0.59981436", "0.59929466", "0.59806687", "0.5980363", "0.5971432", "0.59707737", "0.59694135", "0.59664804", "0.59664804", "0.5964704", "0.59609634", "0.59572864", "0.5954682" ]
0.871339
0
Registers a new submenu page
Регистрирует новую подстраницу меню
function add_menu_subpage(){ add_submenu_page( 'wpex-general', __( 'General', 'athen_transl' ), __( 'General', 'athen_transl' ), 'manage_options', ATHEN_THEME_PANEL_SLUG, array( $this, 'create_admin_page' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function add_page() {\n\t\tadd_submenu_page(\n\t\t\tWPEX_THEME_PANEL_SLUG,\n\t\t\tesc_html__( 'Under Construction', 'total' ),\n\t\t\tesc_html__( 'Under Construction', 'total' ),\n\t\t\t'administrator',\n\t\t\tWPEX_THEME_PANEL_SLUG . '-under-construction',\n\t\t\tarray( 'WPEX_Under_Construction', 'create_admin_page' )\n\t\t);\n\t}", "public function add_page() {\n\t\t\tadd_submenu_page(\n\t\t\t\tWPEX_THEME_PANEL_SLUG,\n\t\t\t\t__( 'Theme Skins', 'wpex' ),\n\t\t\t\t__( 'Theme Skins', 'wpex' ),\n\t\t\t\t'administrator',\n\t\t\t\tWPEX_THEME_PANEL_SLUG .'-skins',\n\t\t\t\tarray( $this, 'create_admin_page' )\n\t\t\t);\n\t\t}", "public function add_submenu_page() {\n\t\tadd_submenu_page(\n\t\t\t'edit.php?post_type=slack_integration',\n\t\t\t__( 'Post types', 'slack-post-types' ),\n\t\t\t__( 'Post types', 'slack-post-types' ),\n\t\t\t'manage_options',\n\t\t\t'slack-post-types',\n\t\t\tarray( $this, 'display_admin_page' )\n\t\t);\n\t}", "function addSubMenus() {\n \tif($this->checkPermissions()) {\n\t\t \t$first_item_parent = $this->isTeacherFeatures() ? 'lepress-my-subscriptions' : 'lepress';\n\t\t \tadd_submenu_page('lepress', __(\"Manage my subscriptions\", lepress_textdomain),__(\" My subscriptions\", lepress_textdomain).'<span id=\"lepress-student-subs-count\"></span>',3, $first_item_parent,array(&$this, 'getSubMenuPageContent' ));\n\t\t \tadd_submenu_page('lepress', __(\"Manage assignments\", lepress_textdomain),__(\"Assignments\", lepress_textdomain).'<span id=\"lepress-student-assignments-count\"></span>',3, 'lepress-assignments',array(&$this, 'getSubMenuPageContent' ));\n\t\t \t//add_submenu_page('lepress', __(\"Manage groups\", lepress_textdomain),__(\"My groups\", lepress_textdomain),3, 'lepress-groups',array(&$this, 'getSubMenuPageContent' ));\n \t}\n }", "function submenu_add_pages() \n {\n add_submenu_page(\n 'edit.php?post_type=custompost',\n __( 'Test Settings', 'menu-test' ),\n __( 'Test Settings', 'menu-test' ),\n 'manage_options',\n 'testsettings',\n 'mt_settings_page');\n }", "public static function add_submenu_page() {\n\t\tadd_submenu_page( null, __( 'Importing Nutrition', 'wp-recipe-maker' ), __( 'Importing Nutrition', 'wp-recipe-maker' ), WPRM_Settings::get( 'features_tools_access' ), 'wprm_wpurp_nutrition', array( __CLASS__, 'wpurp_nutrition' ) );\n\t}", "public function submenu_page() {\n\n\t\tadd_submenu_page(\n\t\t\t'options-general.php',\n\t\t\t_x( 'Schedule a Visit Leads to Sherpa', 'Admin Page Title', 'schedule-a-visit-to-sherpa' ),\n\t\t\t_x( 'Schedule a Visit to Sherpa', 'Admin Sub-Menu Title', 'schedule-a-visit-to-sherpa' ),\n\t\t\t'manage_options',\n\t\t\t'schedule-a-visit-to-sherpa',\n\t\t\tarray( $this, 'settings_page' )\n\t\t);\n\t\t\n\t\t// Move our menu from Settings to under Forms\n\t\t\n\t\tglobal $submenu;\n\n\t\t$settings_index = null;\n\t\tforeach ( $submenu['options-general.php'] as $key => $menu_item ) {\n\t\t\t\n\t\t\t// Index 2 is always the child page slug\n\t\t\tif ( $menu_item[2] == 'schedule-a-visit-to-sherpa' ) {\n\t\t\t\t$settings_index = $key;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// We need to make the path more absolute\n\t\t$submenu['options-general.php'][ $settings_index ][2] = 'options-general.php?page=schedule-a-visit-to-sherpa';\n\t\t\n\t\t// Move the Menu Item\n\t\t$submenu['gf_edit_forms'][] = $submenu['options-general.php'][ $settings_index ];\n\t\tunset( $submenu['options-general.php'][ $settings_index ] );\n\n\t}", "public function create_submenu() {\n\t\tadd_submenu_page(\n\t\t\t'options-general.php',\n\t\t\t__('CHAOS Client','wpchaosclient'),\n\t\t\t__('CHAOS','wpchaosclient'),\n\t\t\t'manage_options',\n\t\t\t$this->menu_page,\n\t\t\tarray(&$this,'create_submenu_page')\n\t\t);\n\t}", "public function register_sub_menu()\n {\n add_submenu_page(\n 'edit.php?post_type=book',\n 'Book Setting',\n 'Settings',\n 'manage_options',\n 'submenu-page',\n array($this, 'custom_submenu_page')\n );\n //register settings\n add_action('admin_init', array($this, 'register_settings'));\n\n }", "public function add_menu_page() {\n\n\t\tadd_submenu_page(\n\t\t\tCT_Ultimate_GDPR::instance()->get_admin_controller()->get_option_name(),\n\t\t\tesc_html__( 'Privacy Policy', 'ct-ultimate-gdpr' ),\n\t\t\tesc_html__( 'Privacy Policy', 'ct-ultimate-gdpr' ),\n\t\t\t'manage_options',\n\t\t\t$this->get_id(),\n\t\t\tarray( $this, 'render_menu_page' )\n\t\t);\n\t}", "public function add_page() {\n\t\tadd_submenu_page(\n\t\t\t'oceanwp-panel',\n\t\t\tesc_html__( 'Rec. Plugins', 'ocean-extra' ),\n\t\t\tesc_html__( 'Rec. Plugins', 'ocean-extra' ),\n\t\t\t'manage_options',\n\t\t\t'oceanwp-panel-rec-plugins',\n\t\t\tarray( $this, 'create_admin_page' )\n\t\t);\n\t}", "function add_submenu_page($parent_slug, $page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = \\null)\n {\n }", "function news_submenu_page(){\n\tadd_submenu_page(\n\t\t'edit.php?post_type=news',\n\t\t'Order news',\n\t\t'Order News',\n\t\t'order_posts',\n\t\t'order-posts-page',\n\t\t'post_order_submenu_page' );\n}", "public function add_menu_page() {\n\t\tadd_submenu_page(\n\t\t\tCT_Ultimate_GDPR::instance()->get_admin_controller()->get_option_name(),\n\t\t\tesc_html__( 'Right To Be Forgotten', 'ct-ultimate-gdpr' ),\n\t\t\tesc_html__( 'Right To Be Forgotten', 'ct-ultimate-gdpr' ),\n\t\t\t'manage_options',\n\t\t\t$this->get_id(),\n\t\t\tarray( $this, 'render_menu_page' )\n\t\t);\n\n\t}", "function addMenu()\n{\n add_menu_page (\"Members and Email\", \"Members / Email\", 4, \"members-email-1\", \"MeMenu\" );\n add_submenu_page(\"members-email-1\", \"Email List\", \"Email\", 4, \"members-email-sub-1\", \"MeMenuSub1\");\n add_submenu_page(\"members-email-1\", \"Tracking\", \"Tracking Scripts\", 4, \"tracking-scripts-1\", \"MeMenuSub2\");\n\n\n}", "function add_menu() {\n add_menu_page(\"Polls\", \"Polls\", \"administrator\", \"polls\", \"managePollsPage\");\n}", "public function register_menu()\n {\n add_menu_page('Coupons Settings', 'Coupons Settings', 'edit_others_posts', 'wpm_coupons_settings');\n add_submenu_page('wpm_coupons_settings', 'Coupons Settings', 'Coupons Settings', 'manage_options', 'wpm_coupons_settings', function () {\n $settings = json_decode(get_option('api_settings', true), true);\n\n include 'templates/settings_template.php';\n });\n }", "public function create_menu() {\n\t\tif ( get_network()->site_id !== get_current_blog_id() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//create new top-level menu\n\t\tadd_management_page(\n\t\t\t__( 'Sync newsletter', 'elemarjr' ),\n\t\t\t__( 'Sync newsletter', 'elemarjr' ),\n\t\t\t'manage_options',\n\t\t\t'sync-newsletter',\n\t\t\tarray( $this, 'display_submenu_page' ),\n\t\t\t6\n\t\t);\n\t}", "function theme_options_add_page() {\t\n\tadd_submenu_page('options-general.php', 'Site Description', 'Site Description', 'edit_theme_options', 'theme_options', 'theme_options_do_page'); \n\tadd_submenu_page('options-general.php', 'Google Analytics', 'Google Analytics', 'edit_theme_options', 'ga_options', 'ga_do_page'); \n}", "function pages_submenu_page(){\n\tadd_submenu_page(\n\t\t'edit.php?post_type=page',\n\t\t'Order pages',\n\t\t'Order Pages',\n\t\t'order_posts',\n\t\t'order-posts-page',\n\t\t'post_order_submenu_page' );\n}", "public function register() {\n\t\tcall_user_func_array( 'add_submenu_page', $this->get_page_arguments() );\n\t}", "public static function wpa_add_menu() {\n add_menu_page('Main Menu','Home','manage_options','Sub-menu');\n add_submenu_page('Sub-menu','User List','User List','manage_options','menu-list',array( __CLASS__,'wpa_page_file_path'));\n add_submenu_page('Sub-menu','Add User','Add User','manage_options','menu-add',array(__CLASS__,'wpa_page_file_path'));\n }", "function mt_add_pages() {\n // Add a new submenu under Tools:\n add_management_page( __('KML Upload','menu-test'), __('KML Upload','menu-test'), 'manage_options', 'kmlupload', 'mt_tools_page');\n}", "function book_add_page() {\n add_submenu_page('edit.php?post_type=book', 'Book Admin', 'Book Settings', 'edit_posts', basename(__FILE__), 'book_s');\n}", "public function register_menu() {\n $parent_slug = 'comparrot';\n $capability = 'manage_options';\n\n add_menu_page( 'Comparrot', 'Comparrot', $capability, $parent_slug, [$this, 'import_from_csv_page'], 'dashicons-admin-page', 2 );\n\n add_submenu_page( $parent_slug, __( 'Import from CSV', 'comparrot' ), __( 'Import from CSV', 'comparrot' ), $capability, $parent_slug, [$this, 'import_from_csv_page'] );\n add_submenu_page( $parent_slug, __( 'General settings', 'comparrot' ), __( 'General settings', 'comparrot' ), $capability, 'comparrot-general-settings', [$this, 'general_settings_page'] );\n }", "public function setLoadControllerMenuSub()\r\n {\r\n add_submenu_page(\r\n $_SESSION['controller_data_sub']['page_slug_current'],\r\n $_SESSION['controller_data_sub']['page_title'], // Title of the page\r\n $_SESSION['controller_data_sub']['page_menu_text'], // Text to show on the menu link\r\n $_SESSION['controller_data_sub']['page_capability'], // Capability requirement to see the link\r\n $_SESSION['controller_data_sub']['page_slug'],\r\n $_SESSION['controller_data_sub']['page_render'],\r\n $_SESSION['controller_data_sub']['page_menu_position']\r\n );\r\n }", "public function admin_menu_add() \n\t{\n\t\tadd_submenu_page(\n\t\t\t'themes.php'\n\t\t\t, __('9spot Settings', '9spot')\n\t\t\t, __('Theme Layouts', '9spot')\n\t\t\t, 0\n\t\t\t, $this->layout_page\n\t\t\t, array(&$this, 'admin_layout')\n\t\t);\n\t}", "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 custom_sub_menu_function() \n {\n add_theme_page('sub Title name', 'sub Menu name', 'manage_options', 'sub-menu-slug', 'sub_menu_panel');\n }", "function tutorials_submenu_page(){\n\tadd_submenu_page(\n\t\t'edit.php?post_type=tutorials',\n\t\t'Order tutorials',\n\t\t'Order Tutorials',\n\t\t'order_posts',\n\t\t'order-posts-page',\n\t\t'post_order_submenu_page' );\n}", "static function create_menu() {\n add_submenu_page('plugins.php', 'Luminous Settings', 'Luminous settings',\n 'administrator', 'luminous-handle', 'luminouswp::settings_view');\n }", "public function add_subpages() {\n\n\t\t$this->settings_page_id = add_submenu_page(\n\t\t\t'edit.php?post_type=schedule',\n\t\t\t__( 'Conference Schedule Settings', 'conf-schedule' ),\n\t\t\t__( 'Settings', 'conf-schedule' ),\n\t\t\t'edit_posts',\n\t\t\t'conf-schedule-settings',\n\t\t\t[ $this, 'print_settings_page' ]\n\t\t);\n\n\t\t$this->preview_page_id = add_submenu_page(\n\t\t\t'edit.php?post_type=schedule',\n\t\t\t__( 'Conference Schedule Preview', 'conf-schedule' ),\n\t\t\t__( 'Preview', 'conf-schedule' ),\n\t\t\t'edit_posts',\n\t\t\t'conf-schedule-preview',\n\t\t\t[ $this, 'print_preview_page' ]\n\t\t);\n\n\t\t$this->downloads_page_id = add_submenu_page(\n\t\t\t'edit.php?post_type=schedule',\n\t\t\t__( 'Conference Schedule Downloads', 'conf-schedule' ),\n\t\t\t__( 'Downloads', 'conf-schedule' ),\n\t\t\t'edit_posts',\n\t\t\t'conf-schedule-downloads',\n\t\t\t[ $this, 'print_downloads_page' ]\n\t\t);\n\t}", "function add_attendance_page() {\n $parent_slug = \"cf550_dashboard\";\n\t$page_title = \"Mætingar\";\n\t$menu_title = \"Mætingar\";\n\t$capability = \"edit_others_posts\"; // Editors, Admins, \n\t$menu_slug = \"cf550_attendance\";\n\t$function = \"write_attendance_page\";\n add_submenu_page(\n $parent_slug,\n $page_title,\n $menu_title,\n $capability,\n $menu_slug,\n $function\n );\n}", "public function register_menu_item() {\n\t\t$cpt = get_post_type_object( Tribe__Events__Main::POSTTYPE );\n\t\t$this->ID = add_submenu_page(\n\t\t\t$this->get_url( array( 'page' => null ), true ),\n\t\t\tesc_html( $this->get_page_title() ),\n\t\t\tesc_html( $this->get_menu_label() ),\n\t\t\t$cpt->cap->publish_posts,\n\t\t\tself::$slug,\n\t\t\tarray( $this, 'render' )\n\t\t);\n\n\t\treturn $this->ID;\n\t}", "function am2_vanity_create_menu() {\n\t//create new top-level menu\n\t//add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function );\n\tadd_submenu_page('options-general.php','Vanity URL Settings', 'Vanity URL Settings', 'administrator', 'am2-vanity-settings-page', 'am2_vanity_settings_page' );\n\t//call register settings function\n\tadd_action( 'admin_init', 'register_am2_vanity_settings' );\n}", "function templ_add_page_menu()\r\n{\r\n\tdo_action('tevolution_menu_before_general_settings');\r\n\t\r\n\t$menu_title2 = __('Settings', 'templatic-admin');\r\n\tadd_submenu_page('templatic_system_menu', $menu_title2, $menu_title2,'administrator', 'templatic_settings', 'my_page_templates_function');\r\n\t\r\n\t/*tevolution_menu_after_general_settings hook for add additional menu after general settings */\r\n\tdo_action('tevolution_menu_after_general_settings');\t\t\r\n}", "function register_ba_menu_page(){\n add_menu_page(__( 'Banners', 'banner-advertise' ),'Banners','manage_options','banner_advertise','ba_menu_page','dashicons-format-image',26); \n add_submenu_page( 'banner_advertise', __( 'shortcodes', 'banner-advertise' ), 'shortcodes', 'manage_options', 'ba_shortcodes', 'ba_short_page');\n \n // Register the hidden submenu.\n add_submenu_page(null, __( 'Add New Banner', 'banner-advertise' ), '', 'manage_options', 'banner_insert', 'ba_insert_page');\n add_submenu_page(null, __( 'Banner Edit', 'banner-advertise' ), '', 'manage_options', 'banner_edit', 'ba_edit_page');\n}", "function fatherly_fcr_register_admin_page()\n{\n add_submenu_page(\n 'tools.php',\n 'Feed Content Recirculation',\n 'Feed Content Recirculation',\n 'view_fatherly_settings',\n 'feed-content-recirculation',\n 'fatherly_fcr_process_admin_page'\n );\n}", "function wdtgenerate_sitemappage () {\n\tif (function_exists ('add_submenu_page'))\n \tadd_submenu_page ('tools.php', __('Video Sitemap'), __('Video Sitemap'),\n \t'manage_options', 'wdtgenerate_sitemappage', 'wdtgenerate_sitemap');\n}", "function boj_menuexample_create_menu() {\r\n\t\r\n\t//create a submenu under Settings\r\n\tadd_options_page( 'Leo Plugin Settings Page', 'Menu Example Settings', 'manage_options', 'settings-submenu', 'boj_menuexample_settings_page' );\r\n\t\r\n}", "public function create_submenu_page() {\n\t\techo '<div class=\"wrap\"><h2>'.get_admin_page_title().'</h2>'.\"\\n\";\n\n\t\ttry {\n\t\t\t$sessionGUID = WPChaosClient::instance()->SessionGUID();\n\t\t\t$lastSessionUpdate = get_option(WPPortalClient::WP_CHAOS_CLIENT_SESSION_UPDATED_KEY);\n\t\t\techo '<div class=\"updated\"><p><strong>&#x2713;';\n\t\t\t_e('Connection to CHAOS is established','wpchaosclient');\n\t\t\techo '</strong> ';\n\t\t\tprintf(__('(session is %s last updated %s)','wpchaosclient'), $sessionGUID, date('r', $lastSessionUpdate));\n\t\t\techo '</p></div>';\n\t\t} catch(Exception $e) {\n\t\t\techo '<div class=\"error\"><p>'.__('Could not connect to CHAOS. Please check the details below.','wpchaosclient').'</p><p><small>'.$e->getMessage().'</small></p></div>';\n\t\t}\n\n\t\techo '<form method=\"POST\" action=\"options.php\">'.\"\\n\";\n\t\tsettings_fields($this->menu_page);\n\t\tdo_settings_sections($this->menu_page);\n\t\tsubmit_button();\n\t\techo '</form></div>'.\"\\n\";\n\n\t}", "function mt_add_pages(){\r\n\t// Add a new submenu under Options:\r\n\tadd_options_page('theVerse', 'theVerse', 8, 'theverse', 'mt_options_page');\r\n}", "function setup_menus() {\n\t$icon = '';\n\tadd_menu_page('Site Features', 'Site Features', 'publish_pages', 'pop_site_features', '', $icon, 36);\n\tadd_submenu_page('pop_site_features','','','publish_pages','pop_site_features','homepage_touts_page');\n\tadd_submenu_page('pop_site_features', 'Homepage Features', 'Homepage Features', 'publish_pages', 'pop_homepage_features', 'homepage_features_page');\n\tadd_submenu_page('pop_site_features', 'Homepage Ticker', 'Homepage Ticker', 'publish_pages', 'pop_homepage_ticker', 'homepage_ticker_page');\n\tadd_submenu_page('pop_site_features', 'Homepage Touts', 'Homepage Touts', 'publish_pages', 'pop_homepage_touts', 'homepage_touts_page');\n\tadd_submenu_page('pop_site_features', 'Movement Touts', 'Movement Touts', 'publish_pages', 'pop_movement_touts', 'movement_touts_page');\n\tadd_submenu_page('pop_site_features', 'PoP & Local Events', 'PoP & Local Events', 'publish_pages', 'pop_events', 'movement_events_page');\n\tadd_submenu_page('pop_site_features', 'Season of 1000', 'Season of 1000 Promises', 'publish_pages', 'season1000', 'season_1000_page');\n}", "function staff_submenu_page(){\n\tadd_submenu_page(\n\t\t'edit.php?post_type=staff',\n\t\t'Order Staff',\n\t\t'Order Staff',\n\t\t'order_posts',\n\t\t'order-posts-page',\n\t\t'post_order_submenu_page' );\n}", "public function add_menu_page()\n\t{\n\t\tadd_menu_page( \n\t\t\t'mmenu',\n\t\t\t'mmenu',\n\t\t\t'manage_options',\n\t\t\t'mmenu',\n\t\t\tarray( $this, 'create_admin_page' ),\n\t\t\t'dashicons-menu'\n\t\t);\n\t}", "function create_AdminPages()\n\t{\t\t\n\t\t$parentSlug = \"edit.php?post_type=imperial_topic\";\n\t\t$page_title=\"Settings\";\n\t\t$menu_title=\"Settings\";\n\t\t$menu_slug=\"topic-settings\";\n\t\t$function= array( $this, 'drawTopicSettings' );\n\t\t$myCapability = \"manage_options\";\n\t\tadd_submenu_page($parentSlug, $page_title, $menu_title, $myCapability, $menu_slug, $function);\n\n\t\t\n\t\t\n\t}", "public function register()\n {\n add_action('admin_menu', array($this, 'register_sub_menu'));\n }", "public function onAdminMenu()\n {\n foreach( $this->pages as $slug => $page ) {\n add_submenu_page(\n $page['parent'], L10n::__( $page['title'] ), \n L10n::__( $page['title_menu'] ), $page['capability'], \n $slug, array( $this, 'page' . ucfirst( $slug ) )\n );\n }\n }", "function cg_create_menu() {\n\tadd_menu_page( \n\t__('CityGrid', EMU2_I18N_DOMAIN),\n\t__('CityGrid', EMU2_I18N_DOMAIN),\n\t0,\n\tCG_PLUGIN_DIRECTORY.'/cg-main.php',\n\t'',\n\tplugins_url('/images/icon.png', __FILE__));\n\t\n\t\n\tadd_submenu_page( \n\tCG_PLUGIN_DIRECTORY.'/cg-main.php',\n\t__(\"Main\", EMU2_I18N_DOMAIN),\n\t__(\"Main\", EMU2_I18N_DOMAIN),\n\t0,\n\tCG_PLUGIN_DIRECTORY.'/cg-main.php'\n\t);\t\n\t\n\tadd_submenu_page( \n\tCG_PLUGIN_DIRECTORY.'/cg-main.php',\n\t__(\"Settings\", EMU2_I18N_DOMAIN),\n\t__(\"Settings\", EMU2_I18N_DOMAIN),\n\t0,\n\tCG_PLUGIN_DIRECTORY.'/cg-settings.php'\n\t);\t\t\n\t\n\tif(!get_option('directory_label'))\n\t\t{\n\t\t$the_page_title = \"Directory\";\n\t\t}\t\n\telse\n\t\t{\n\t\t$the_page_title = get_option('directory_label');\n\t\t}\n\t//echo \"HERE: \" . $the_page_title . \"<br />\";\n\t$the_page = get_page_by_title( $the_page_title );\n\t\n\tif ( ! $the_page ) {\n\t\n\t $_p = array();\n\t $_p['post_title'] = $the_page_title;\n\t $_p['post_content'] = \"<p>Welcome to the CityGrid Hyp3rL0cal Directory</p>\";\n\t $_p['post_status'] = 'publish';\n\t $_p['post_type'] = 'page';\n\t $_p['comment_status'] = 'closed';\n\t\n\t // Insert the post into the database\n\t $the_page_id = wp_insert_post( $_p );\n\t \n\t update_post_meta( $the_page_id, '_wp_page_template', 'cg-directory.php' );\n\t \n\t}\t\n\t\n}", "public static function menu_subpage_categories(){\n \t\t\n\t\t\tadd_submenu_page('edit.php?post_type='.self::$post_type, \n\t\t\t\t\t\t\t self::$page_title_category, \n\t\t\t\t\t\t\t 'Menu Listing', \n\t\t\t\t\t\t\t self::$capability,\n\t\t\t\t\t\t\t 'menu_listings',\n\t\t\t\t\t \t array( __CLASS__, 'menu_generator_listing'));\n\t\t\n\t\t}", "public static function menu_subpage_settings(){\n \t\t\n\t\t\tadd_submenu_page('edit.php?post_type='.self::$post_type, \n\t\t\t\t\t\t\t self::$page_title_settings, \n\t\t\t\t\t\t\t 'Settings', \n\t\t\t\t\t\t\t self::$capability,\n\t\t\t\t\t\t\t 'menu_settings',\n array( __CLASS__, 'menu_generator_settings'));\n\t\t\n\t\t}", "public function addMenuPage()\n {\n $hook = add_options_page(\n __('Wistia Integration Settings'),\n __('Wistia'),\n 'manage_options',\n self::ADMIN_PAGE_ID,\n [$this->renderer, 'renderSettingsPage']\n );\n error_log('hook: '. $hook);\n }", "public function add_menus() {\n add_action( 'admin_menu', array( 'Hotmembers3\\Admin_Pages_Creator', 'create_pages') );\n }", "function jb_add_menu() {\n\tadd_submenu_page('genesis', __('Expose', 'jb'), __('Expose Settings', 'jb'), 'manage_options', 'expose-settings', 'jb_admin_page' );\n}", "public function register_admin_menu() {\n\n\t\t\t$page_header_capability = apply_filters( 'astra_page_header_capability', 'edit_theme_options' );\n\n\t\t\tadd_submenu_page(\n\t\t\t\t'themes.php',\n\t\t\t\t__( 'Page Headers', 'astra-addon' ),\n\t\t\t\t__( 'Page Headers', 'astra-addon' ),\n\t\t\t\t$page_header_capability,\n\t\t\t\t'edit.php?post_type=astra_adv_header'\n\t\t\t);\n\t\t}", "function mmdyk_add_menu() {\n\n\t// Add the menu page\n\tadd_submenu_page('options-general.php', 'MM Did You Know?', 'MM Did You Know?', 10, __FILE__, 'mmdyk_page');\n}", "public function register_admin_menu() {\n\n\t\t//menu page\n\t\t$menu_page = add_submenu_page( 'woocommerce', __( 'Product Fee', WOOAFPP_TEXTDOMAIN ), __( 'Product Fee', WOOAFPP_TEXTDOMAIN ), 'manage_options', 'wooafpp_settings', array( $this,'add_menu_settings_page' ) );\n\t}", "function bethel_add_submenu_to_post() {\n\tglobal $post;\n\t$menu_items = get_menu_items_for_current_page();\n\tif ($menu_items && sizeof($menu_items) > 1) {\n\t\techo '<ul class=\"bethel-subpages-nav\">';\n\t\tforeach ($menu_items as $menu_item) {\n\t\t\techo '<li'.($menu_item->object_id == $post->ID ? ' class=\"current-item\"' : '').\">\";\n\t\t\techo \"<a href=\\\"{$menu_item->url}\\\">{$menu_item->title}</a>\";\n\t\t\techo '</li>';\n\t\t}\n\t\techo '</ul>';\n\t} elseif (is_page() && $post->post_parent) {\n $menu_items = get_pages (array('parent' => $post->post_parent, 'sort_order' => 'menu_order', 'hierarchical' => false));\n if ($menu_items && sizeof($menu_items) > 1) {\n echo '<ul class=\"bethel-subpages-nav\">';\n foreach ($menu_items as $menu_item) {\n echo '<li'.($menu_item->ID == $post->ID ? ' class=\"current-item\"' : '').\">\";\n echo '<a href=\"'.get_permalink($menu_item->ID).\"\\\">{$menu_item->post_title}</a>\";\n echo '</li>';\n }\n echo '</ul>';\n }\n }\n}", "function posts_submenu_page(){\n\tadd_submenu_page(\n\t\t'edit.php',\n\t\t'Order posts',\n\t\t'Order Posts',\n\t\t'order_posts',\n\t\t'order-posts-page',\n\t\t'post_order_submenu_page' );\n}", "function gmuj_mmi_add_sublevel_menu() {\n\tadd_submenu_page(\n\t\t'gmuw',\n\t\t'Mason Meta Information',\n\t\t'Mason Meta Information',\n\t\t'manage_options',\n\t\t'gmuj_mmi',\n\t\t'gmuj_mmi_display_settings_page',\n\t\t1\n\t);\n\t\n}", "public function add_new_admin_page($title,$function){//Takes page title as ref. parent is assumed as post above.\r\n\r\n if( ! empty( $title) ){\r\n // We need to know the Post Type name again\r\n $post_type_name = $this->post_type_name;\r\n $parent_page = 'edit.php?post_type='.$post_type_name;\r\n $page_title = $title;\r\n $page_slug = strtolower( str_replace( ' ', '_', $page_title ) );\r\n $page_function = $function;\r\n\r\n\r\n add_action( 'admin_menu',\r\n function() use( $parent_page, $page_title, $page_slug, $page_function ){\r\n add_submenu_page( $parent_page, $page_title, $page_title, 'manage_options', $page_slug, $page_function );\r\n }\r\n );\r\n\r\n }\r\n }", "public function add_admin_menu() {\n\n extract( $this->args );\n\n if( $menu_type === 'submenu' ) {\n\n $menu_page = call_user_func( 'add_submenu_page', $menu_parent, $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'add_options_html' ) );\n\n } else {\n\n $menu_page = call_user_func( 'add_menu_page', $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'add_options_html' ), $menu_icon, $menu_position );\n\n if( ! empty( $this->args['show_sub_menu'] ) && count( $this->pre_tabs ) > 1 ) {\n\n // create submenus\n $tab_key = 1;\n foreach ( $this->pre_tabs as $section ) {\n\n call_user_func( 'add_submenu_page', $menu_slug, $section['title'], $section['title'], $menu_capability, $menu_slug .'#tab='. $tab_key, '__return_null' );\n\n if( ! empty( $section['subs'] ) ) {\n $tab_key += ( count( $section['subs'] )-1 );\n }\n\n $tab_key++;\n\n }\n\n remove_submenu_page( $menu_slug, $menu_slug );\n\n }\n\n if( ! empty( $menu_hidden ) ) {\n remove_menu_page( $menu_slug );\n }\n\n }\n\n add_action( 'load-'. $menu_page, array( &$this, 'add_page_on_load' ) );\n\n }", "function jm_create_menu(){\n\tadd_submenu_page('themes.php', 'Super Themer Options', 'Theme Options', 'manage_options', 'jm_settings_page', 'jm_settings_page');\n\tadd_action('admin_init', 'jm_register_settings');\n}", "public function add_settings_submenu(){\n //create new sub menu\n add_options_page('Google Map extension for Contact Form 7', 'CF7 Google Map', 'administrator','cf7-googleMap-settings', array($this,'show_settings_page') );\n }", "function ada_add_pages() {\n\nadd_submenu_page('edit.php?post_type=horse', __('Options','wp_horse'), __('Options','wp_horse'), 'manage_options', 'horse_options_page', 'horse_options_page' );\n}", "public function add_sub_menu()\n {\n // capabilities, menu slug, function to call)\n add_submenu_page('options-general.php', 'cb textcheck', 'cb textcheck', 'manage_options', 'cb-textcheck', array($this, 'load_admin_page'));\n }", "function pewc_register_menu_page() {\n add_menu_page(\n __( 'Product Add-Ons', 'pewc' ),\n __( 'Product Add-Ons', 'pewc' ),\n 'edit_others_shop_orders',\n 'pewc_home',\n 'pewc_home_page',\n 'dashicons-plus-alt',\n \tapply_filters( 'pewc_menu_position', 56 )\n );\n\n\tadd_submenu_page('pewc_home', 'Home', 'Home', 'edit_others_shop_orders', 'pewc_home' );\n}", "public function register_settings_page() {\n\t\tif ( ! WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$page_callback = array( $this->menu, 'load_page' );\n\n\t\tadd_menu_page(\n\t\t\t'Yoast SEO: ' . __( 'MultiSite Settings', 'wordpress-seo' ),\n\t\t\t__( 'SEO', 'wordpress-seo' ),\n\t\t\t'delete_users',\n\t\t\t$this->menu->get_page_identifier(),\n\t\t\tarray( $this, 'network_config_page' ),\n\t\t\tWPSEO_Utils::get_icon_svg()\n\t\t);\n\n\t\tif ( WPSEO_Utils::allow_system_file_edit() === true ) {\n\t\t\tadd_submenu_page(\n\t\t\t\t$this->menu->get_page_identifier(),\n\t\t\t\t'Yoast SEO: ' . __( 'Edit Files', 'wordpress-seo' ),\n\t\t\t\t__( 'Edit Files', 'wordpress-seo' ),\n\t\t\t\t'delete_users', 'wpseo_files',\n\t\t\t\t$page_callback\n\t\t\t);\n\t\t}\n\n\t\t// Add Extension submenu page.\n\t\tadd_submenu_page(\n\t\t\t$this->menu->get_page_identifier(),\n\t\t\t'Yoast SEO: ' . __( 'Extensions', 'wordpress-seo' ),\n\t\t\t__( 'Extensions', 'wordpress-seo' ),\n\t\t\t'delete_users',\n\t\t\t'wpseo_licenses',\n\t\t\t$page_callback\n\t\t);\n\t}", "public function add_menu_item () {\n $page = add_menu_page( __( 'Listeo Core ', 'listeo_core' ) , __( 'Listeo Core', 'listeo_core' ) , 'manage_options' , $this->_token . '_settings' , array( $this, 'settings_page' ) );\n add_action( 'admin_print_styles-' . $page, array( $this, 'settings_assets' ) );\n\n// submit_listing\n// browse_listing\n// Registration\n// Booking\n// Pages\n// Emails\n add_submenu_page($this->_token . '_settings', 'Map Settings', 'Map Settings', 'manage_options', 'listeo_settings&tab=maps', array( $this, 'settings_page' ) ); \n \n add_submenu_page($this->_token . '_settings', 'Submit Listing', 'Submit Listing', 'manage_options', 'listeo_settings&tab=submit_listing', array( $this, 'settings_page' ) ); \n \n add_submenu_page($this->_token . '_settings', 'Single Listing', 'Single Listing', 'manage_options', 'listeo_settings&tab=single', array( $this, 'settings_page' ) ); \n \n add_submenu_page($this->_token . '_settings', 'Booking Settings', 'Booking Settings', 'manage_options', 'listeo_settings&tab=booking', array( $this, 'settings_page' ) ); \n \n add_submenu_page($this->_token . '_settings', 'Browse Listings', 'Browse Listings', 'manage_options', 'listeo_settings&tab=browse', array( $this, 'settings_page' ) ); \n \n add_submenu_page($this->_token . '_settings', 'Registration', 'Registration', 'manage_options', 'listeo_settings&tab=registration', array( $this, 'settings_page' ) ); \n \n add_submenu_page($this->_token . '_settings', 'Pages', 'Pages', 'manage_options', 'listeo_settings&tab=pages', array( $this, 'settings_page' ) ); \n \n add_submenu_page($this->_token . '_settings', 'Emails', 'Emails', 'manage_options', 'listeo_settings&tab=emails', array( $this, 'settings_page' ) ); \n \n add_submenu_page($this->_token . '_settings', 'Users Conversation', 'Users Conversation', 'manage_options', 'user-conversation', array( $this, 'user_conversation_fun' ) ); \n\n add_submenu_page(NULL, 'Single Users Conversation', 'Single Users Conversation', 'manage_options', 'single-user-conversation', array( $this, 'single_user_conversation_fun' ) ); \n }", "function tb_string_swap_add_page() {\n\t// Create sub menu page\n\t$string_swap_page = add_submenu_page( 'themes.php', __('Theme Text Strings', 'theme-blvd-string-swap'), __('Theme Text Strings', 'theme-blvd-string-swap'), 'administrator', 'tb_string_swap', 'tb_string_swap_page' );\n\t// Adds actions to hook in the required css and javascript\n\tadd_action( \"admin_print_styles-$string_swap_page\", 'optionsframework_load_styles' );\n\tadd_action( \"admin_print_scripts-$string_swap_page\", 'optionsframework_load_scripts' );\n\tadd_action( \"admin_print_styles-$string_swap_page\", 'optionsframework_mlu_css', 0 );\n\tadd_action( \"admin_print_scripts-$string_swap_page\", 'optionsframework_mlu_js', 0 );\n}", "function cjpopups_admin_menu_page(){\n\t\tglobal $menu;\n\t\t$main_menu_exists = false;\n\t\tforeach ($menu as $key => $value) {\n\t\t\tif($value[2] == 'cj-products'){\n\t\t\t\t$main_menu_exists = true;\n\t\t\t}\n\t\t}\n\t\tif(!$main_menu_exists){\n\t\t\t$menu_icon = cjpopups_item_path('admin_assets_url', 'img/menu-icon.png');\n\t\t\tadd_menu_page( 'CSSJockey', 'CSSJockey', 'manage_options', 'cj-products', 'cjpopups_cj_products', $menu_icon);\n\t\t}\n\t\t$menu_icon = cjpopups_item_path('admin_assets_url', 'img/menu-icon.png');\n\t add_submenu_page( 'cj-products', cjpopups_item_info('page_title'), cjpopups_item_info('menu_title'), 'manage_options', cjpopups_item_info('page_slug'), 'cjpopups_admin_page_setup');\n\t do_action('cjpopups_admin_menu_hook');\n\t //remove_submenu_page( 'cj-products', 'cj-products' );\n}", "public function register()\n {\n $function = ( $this->function ) ? array( $this, $this->function ) : NULL;\n\n add_submenu_page(\n $this->parent_slug,\n $this->get_page_title(),\n $this->get_menu_title(),\n apply_filters( 'ninja_forms_submenu_' . $this->get_menu_slug() . '_capability', $this->get_capability() ),\n $this->get_menu_slug(),\n $function\n );\n }", "public function register_menus() {\n\t\t\tadd_management_page(\n\t\t\t\t__( 'Child Theme Generator', 'if-child-gen' ),\n\t\t\t\t__( 'Child Theme Generator', 'if-child-gen' ),\n\t\t\t\t'edit_theme_options',\n\t\t\t\t$this->plugin_slug,\n\t\t\t\tarray( $this, 'options_page_output' )\n\t\t\t);\n\t\t}", "public function addMenu(){\n\t\tadd_menu_page(\n\t\t\t$this->plugin->name,\n\t\t\t$this->plugin->name,\n\t\t\t'publish_pages',\n\t\t\t$this->plugin->varName,\n\t\t\tarray($this, 'page'),\n\t\t\t$this->plugin->uri . 'assets/images/icn-menu.png'\n\t\t);\n\t}", "function mkRegisterMenu() {\n \n register_nav_menu('primary', 'Main Menu');\n \n }", "function wpbm_register_about_us_page(){\n add_submenu_page(\n 'edit.php?post_type=wpblogmanager', __( 'About Us', WPBM_TD ), __( 'About Us', WPBM_TD ), 'manage_options', 'wpbm-about-us', array( $this, 'wpbm_about_callback' ) );\n }", "function WPLMS_menu_MainMenu(){\n\n add_menu_page('WP LMS School', 'WP LMS School', 'administrator',WPLMS_PLUGIN_ID,'WPLMS_dashboard');\n add_submenu_page(WPLMS_PLUGIN_ID,'Students', 'Students', 'administrator','students','WPLMS_students');\n add_submenu_page(WPLMS_PLUGIN_ID,'Add Course', 'Add Course', 'administrator','course','WPLMS_addcourse');\n add_submenu_page(WPLMS_PLUGIN_ID,'Add Modules', 'Add Modules', 'administrator','modules','WPLMS_addmodule');\n\n add_submenu_page(WPLMS_PLUGIN_ID, false, '<span class=\"wpcw_menu_section\" style=\"display: block; margin: 1px 0 1px -5px; padding: 0; height: 1px; line-height: 1px; background: #CCC;\"></span>', 'manage_options', '#', false);\n\n add_submenu_page(WPLMS_PLUGIN_ID,'Quiz Summary', 'Quiz Summary', 'administrator','WPLMS_quizSummary','WPLMS_quizSummary');\n add_submenu_page(WPLMS_PLUGIN_ID,'Question Pool', 'Question Pool', 'administrator','WPLMS_questionPool','WPLMS_questionPool');\n\n //No Menu\n //add_submenu_page(WPLMS_PLUGIN_ID,'Add Quiz', 'Add Quiz', 'administrator', 'add_quiz', 'WPLMS_addQuiz');\n\n add_submenu_page(null,'Stud','Student Courses', 'administrator','studentCourses','WPLMS_studentcourses');\n add_submenu_page(null,'Add Question', 'Add Question', 'administrator', 'add_question', 'WPLMS_addQuestion');\n //add_submenu_page(null,'Add Quiz', 'Add Quiz', 'administrator', 'WPLMS_addQuiz', 'WPLMS_addQuiz');\n\n\n //add_submenu_page('onlineschool','Packages', 'Packages', 'administrator','addpackage','addpackage_code');\n //add_submenu_page('onlineschool','Sets', 'Sets', 'administrator','sets','sets_code');\n //add_submenu_page('options.php','Students', 'Student Courses', 'administrator','studentCourses','studentCourses_code');\n}", "function add_submenu_item() {\n\t$link = admin_url( 'edit-tags.php' ) . '?taxonomy=dt_ext_connection_group&post_type=dt_ext_connection';\n\tadd_submenu_page(\n\t\t'distributor',\n\t\tesc_html__( 'External Connection Groups', 'distributor' ),\n\t\tesc_html__( 'External Connection Groups', 'distributor' ),\n\t\t'manage_options',\n\t\t$link\n\t);\n}", "function register_submenu_items() {\r\n\t\r\n\t/*Note: NB 12-1-2016: This menu is restricted to roles with \"create_users\" capabilities because we don't have an explicit AS ADMIN capability -- yet.*/\r\n\tadd_submenu_page( 'edit.php?post_type=ticket', __( 'Custom Status', 'wpass_status' ), __( 'Custom Status', 'wpass_status' ), 'create_users', 'edit.php?post_type=wpass_status' );\r\n}", "function admin_menu(){\n\t\t\tadd_menu_page('Videos','Videos', 'moderate_comments', 'videos', array($this, 'admin_action'));\n\n\t\t\t//add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function );\n\t\t\tadd_submenu_page( 'videos', 'Add New', 'Add New', 'moderate_comments', 'videos&action=add', array($this, 'admin_action') );\n\n\t\t}", "public function register() {\n\t\t$this->page_hook = add_submenu_page(\n\t\t\t'sites.php',\n\t\t\t$this->view->get_title(),\n\t\t\t$this->view->get_title(),\n\t\t\t'manage_sites',\n\t\t\t$this->page_slug,\n\t\t\t[ $this->view, 'render' ]\n\t\t);\n\n\t\tadd_action( 'load-' . $this->page_hook, [ $this, 'action' ] );\n\t}", "protected function registerMenu()\n {\n }", "public function add_menu() {\n\t\t\tadd_menu_page(\n\t\t\t\t'Amazon Affiliate | Products',\n\t\t\t\t'Products',\n\t\t\t\t'manage_options',\n\t\t\t\t'amz-affiliate/pages/product.php',\n\t\t\t\tarray( &$this, 'load_product_page' ),\n\t\t\t\tplugins_url( 'amz-affiliate/img/icon.png' ),\n\t\t\t\t50\n\t\t\t);\n\t\t\tadd_submenu_page(\n\t\t\t\t'amz-affiliate/pages/product.php',\n\t\t\t\t'Amazon Affiliate | Tables',\n\t\t\t\t'Tables',\n\t\t\t\t'manage_options',\n\t\t\t\t'amz-affiliate/pages/table.php',\n\t\t\t\tarray( &$this, 'load_table_page' )\n\t\t\t);\n\t\t}", "public function addAdminMenuPage()\n\t{\n\t\t$menuPage = &ModelAdminMenu::getScheme();\n\n\t\tforeach ( $menuPage as $menu ) {\n\t\t\t$callback = array_keys( $menu );\n\t\t\t$paramArr = array_values( $menu );\n\n\t\t\t$this->_adminMenuPage( $callback[0], $paramArr[0]['parameters'] );\n\t\t}\n\t}", "public function submenu()\n {\n $data = array\n (\n 'submenus' => $this->Submenus_model->list()\n );\n\n $this->layout->view(\"submenu\",$data);\n }", "public function add_menu() {\n\t\tadd_submenu_page(\n\t\t\t'edit.php?post_type=blicki',\n\t\t\t__( 'Suggestion Review', 'blicki' ),\n\t\t\t__( 'Suggestion Review', 'blicki' ),\n\t\t\t'edit_others_posts',\n\t\t\t'blicki-show-diff',\n\t\t\tarray( $this, 'admin_suggestion_viewer' )\n\t\t);\n\t\tremove_submenu_page( 'edit.php?post_type=blicki', 'blicki-show-diff' );\n\t}", "function registrar_menu() {\nregister_nav_menu('menuprincipal', __('Menu Principal'));\n}", "public static function registerAdminPages()\n {\n // First add main pages\n if (static::$adminPages) {\n $adminPages = new Collection(static::$adminPages);\n\n foreach ($adminPages as $adminPage) {\n add_menu_page(\n array_get($adminPage, 'label'),\n array_get($adminPage, 'title'),\n array_get($adminPage, 'capability'),\n array_get($adminPage, 'route'),\n array_get($adminPage, 'callback'),\n array_get($adminPage, 'icon'),\n array_get($adminPage, 'position')\n );\n }\n }\n\n // Then add sub pages\n if (static::$adminSubPages) {\n // Order by position\n usort(static::$adminSubPages, function($a, $b) {\n return $a['position'] > $b['position'];\n });\n\n // Add pages\n foreach (static::$adminSubPages as $adminSubPage) {\n $route = array_get($adminSubPage, 'route');\n $url = array_get($adminSubPage, 'options.url');\n\n if (! $route and $url) {\n add_submenu_page(\n array_get($adminSubPage, 'parent'),\n array_get($adminSubPage, 'title'),\n array_get($adminSubPage, 'label'),\n array_get($adminSubPage, 'capability'),\n $url\n );\n } else {\n add_submenu_page(\n array_get($adminSubPage, 'parent'),\n array_get($adminSubPage, 'title'),\n array_get($adminSubPage, 'label'),\n array_get($adminSubPage, 'capability'),\n $route,\n array_get($adminSubPage, 'callback')\n );\n }\n }\n }\n\n // We also need to rename the first item in the navigation\n global $submenu;\n\n if (isset($submenu['op-suite'])) {\n $submenu['op-suite'][0][0] = __('Dashboard', 'op3');\n }\n }", "public function add_page() {\n\t\t\tif ( ! defined( 'WPEX_THEME_PANEL_SLUG' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Add page\n\t\t\tadd_submenu_page(\n\t\t\t\tWPEX_THEME_PANEL_SLUG,\n\t\t\t\t__( 'Demo Importer', 'total' ),\n\t\t\t\t__( 'Demo Importer', 'total' ),\n\t\t\t\t'administrator',\n\t\t\t\tWPEX_THEME_PANEL_SLUG .'-demo-importer',\n\t\t\t\tarray( $this, 'demos_page' )\n\t\t\t);\n\n\t\t}", "public function addMenus()\n {\n // The settings submenu\n add_submenu_page(\n 'comotive-newsletter',\n 'Newsletter &raquo; Einstellungen',\n 'Dienst-Einstellungen',\n 'administrator',\n 'newsletter-settings',\n array($this->core->getSettings(), 'displayBackend')\n );\n\n // Remove first menu, if settings are not ready\n if (!$this->core->isWorkingServiceAvailable() || $this->core->isEditorDeactivated()) {\n global $submenu;\n unset($submenu['comotive-newsletter'][0]);\n }\n }", "function _add_post_type_submenus()\n {\n }", "function at_try_menu()\n{\n add_menu_page('signup_list', //page title\n 'Sign Up List', //menu title\n 'manage_options', //capabilities\n 'Signup_List', //menu slug\n Signup_list //function\n );\n}", "function scoreSystemManager_add_pages() {\r\n // Add a new top-level menu (ill-advised):\r\n add_menu_page('Score System', 'Score System', 'edit_pages', 'scoreSystemManager-dashboard', 'scoreSystemManager_dashboard');\r\n}", "function adminMenu() {\r\n\t\t// TODO: This does not only create the menu, it also (only?) *does* sth. with the entries.\r\n\t\t// But those actions must be done before the menu is created (due to the redirects).\r\n\t\t// !Split the function!\r\n\t\t//$page = add_submenu_page('admin.php', __('UWR Ergebnisse'), __('UWR Ergebnisse'), 'edit_posts', 'uwr1results', array('Uwr1resultsController', 'adminAction'));\r\n\t\t$page = add_submenu_page('uwr1menu', __('UWR Ergebnisse'), __('UWR Ergebnisse'), UWR1RESULTS_CAPABILITIES, 'uwr1results', array('Uwr1resultsController', 'adminAction'));\r\n\t\tadd_action( 'admin_print_scripts-' . $page, array('Uwr1resultsView', 'adminScripts') );\r\n\t}", "public function submenu()\n\t{\n\t\t$partial = new Inoves_Partial('Content/view/submenu/contentMain.phtml');\n\t\tInoves_View::prepend('#content', $partial);\n\t}", "function dsq_add_pages() {\n \tadd_submenu_page(\n \t\t'edit-comments.php',\n \t\t'Disqus', \n \t\t'Disqus', \n \t\t'moderate_comments',\n \t\t'disqus',\n \t\t'dsq_manage'\n \t);\n}", "function add_sub_menu($name, $link, $root_menu, $meta = FALSE)\r\n {\r\n global $wp_admin_bar;\r\n if ( !is_super_admin() || !is_admin_bar_showing() )\r\n return;\r\n \r\n $wp_admin_bar->add_menu( array(\r\n 'parent' => $root_menu,\r\n 'title' => $name,\r\n 'href' => $link,\r\n 'meta' => $meta) );\r\n \r\n }", "function add_menu_page() {\n add_menu_page(\n __( 'Theme Panel - Addons', 'athen_transl' ),\n 'Theme Panel - Addons', // menu title - can't be translated because it' used for the $hook prefix\n 'manage_options',\n ATHEN_THEME_PANEL_SLUG,\n '',\n 'dashicons-admin-generic',\n null\n );\n }", "function nt_admin_menus(){\r\n\t\t// \t\t\t\t\t\t\t\t\t\t\tcallable $function = '', string $icon_url = '', int $position = null )\r\n\t\tadd_menu_page(\r\n\t\t\t__( 'Settings', 'newTheme'),\r\n\t\t\t__( 'NewTheme', 'newTheme'),\r\n\t\t\t'edit_theme_options',\r\n\t\t\t'nt_theme_options_page',\r\n\t\t\t'nt_theme_options_function'\r\n\t\t);\t\r\n\r\n\t\t//add_submenu_page( string $parent_slug, string $page_title, string $menu_title, string $capability, string $menu_slug, \r\n\t\t//\t\t\t\t\t\t\tcallable $function = '' )\r\n\t\tadd_submenu_page( \r\n\t\t\t'nt_theme_options_page', \r\n\t\t\t__( 'Settings', 'newTheme'), \r\n\t\t\t__( 'NewTheme options', 'newTheme'),\r\n\t\t\t'edit_theme_options',\r\n\t\t\t'nt_theme_options_page',\r\n\t\t\t'nt_theme_options_function'\r\n \t);\r\n\t}", "public function KemiSitemap_add_menu_page()\n {\n add_options_page(\n 'Kemi Creative Sitemap',\n 'Kemi Sitemap',\n 'manage_options',\n KEMISITEMAP_SLUG,\n array( $this, 'KemiSitemap_options_page' )\n );\n }" ]
[ "0.7796628", "0.7624312", "0.7592035", "0.75650054", "0.74934274", "0.7492506", "0.7465937", "0.7461963", "0.74529606", "0.7447358", "0.7404587", "0.73857015", "0.7372055", "0.73425573", "0.73236275", "0.7304584", "0.7304443", "0.72829694", "0.7274513", "0.72219056", "0.7217325", "0.719399", "0.71780837", "0.7164218", "0.716047", "0.712729", "0.7109466", "0.7101464", "0.70957154", "0.7081452", "0.7075386", "0.70726377", "0.7066537", "0.7065011", "0.70643866", "0.70539165", "0.7049341", "0.7029202", "0.70289606", "0.70161176", "0.7015297", "0.69990975", "0.6991102", "0.69859135", "0.69689405", "0.69671273", "0.69603544", "0.69484675", "0.694202", "0.6932297", "0.6925832", "0.6919182", "0.691024", "0.69022685", "0.68941617", "0.68884593", "0.68853575", "0.68821484", "0.6877236", "0.687319", "0.6870522", "0.68688506", "0.68621516", "0.68511754", "0.68480814", "0.6840669", "0.68390864", "0.6824097", "0.6815567", "0.68030655", "0.67977816", "0.6797098", "0.6791597", "0.67864245", "0.678332", "0.6781558", "0.6775076", "0.67745405", "0.6765257", "0.6764972", "0.6758662", "0.67577374", "0.67537594", "0.674612", "0.67449254", "0.67441666", "0.6740185", "0.6736532", "0.6734222", "0.6727725", "0.6727187", "0.6725461", "0.67205256", "0.6715427", "0.671054", "0.6701567", "0.6700356", "0.6693673", "0.6692265", "0.6691017" ]
0.7860317
0
Fonction createPost avec livewire
Функция createPost с Livewire
public function createPost() { $this->validate(['body' => 'required|min:15']); $post = auth()->user()->posts()->create(['body' => $this->body]); $this->emit('postAdded', $post->id); //emit de l'event $this->body = ""; //vidage du body }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function CrearPost(){\n\n\n }", "public function createPost()\n {\n if ($this->issetPostSperglobal('title') &&\n $this->issetPostSperglobal('description') &&\n $this->issetPostSperglobal('content') &&\n $this->issetPostSperglobal('categorie') &&\n $this->issetPostSperglobal('publish'))\n {\n $empty_field = 0;\n foreach ($_POST as $key => $post) {\n if ($key !== 'publish' && empty(trim($post))) {\n $empty_field++;\n }\n }\n if ($empty_field === 0) {\n $User = $this->session->read('User');\n $this->posts_manager->create($_POST, $User->getIdUser());\n $this->session->writeFlash('success', \"L'article a été créé avec succès.\");\n $this->redirect('dashboard');\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont vides.\");\n }\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont manquants.\");\n }\n $_post = $this->getSpecificPost($_POST);\n $categories = $this->categories_manager->listAll();\n $this->render('admin_post', ['head'=>['title'=>'Création d\\'un article', 'meta_description'=>''], 'categories'=>$categories, '_post'=>isset($_post) ? $_post : ''], 'admin');\n }", "public function CreateNewPost(Request $request){\n\n $okay = $this->getfailsvalidator($request);\n if($okay!='pas'){\n return $okay;\n }\n\n $inputs = $request->all();\n\n $titleslug = str_slug($inputs['title'], \"-\");\n\n if(empty($titleslug)){\n\n $titleslug = preg_replace(\"/[\\s-]+/\", \" \", $inputs['title']);\n\n $titleslug = preg_replace(\"/[\\s_]/\", '-', $titleslug);\n\n }\n $imgWW = $this->resizepostimage($inputs['thumb'], $titleslug);\n\n\t\t$ordertype = null;\n\t\tif(isset($inputs['ordertype'])){\n $ordertype = $inputs['ordertype'];\n if($ordertype == 'none'){\n $ordertype = null;\n }\n\t\t}\n\t\t\n $post = new Posts;\n $post->slug = $titleslug;\n $post->title = $inputs['title'];\n $post->body = $inputs['description'];\n $post->category_id = $inputs['category'];\n if(isset($inputs['pagination'])){\n $post->pagination = $inputs['pagination'] == 0 ? null : $inputs['pagination'];\n }\n $post->type = $inputs['type'];\n $post->tags = isset($inputs['tags']) ? $inputs['tags'] : '';\n $post->ordertype = $ordertype;\n $post->thumb = $imgWW;\n\n if($inputs['datapostt']=='draft'){\n $post->approve = 'draft';\n }elseif(getcong('AutoApprove')=='true' or Auth::user()->usertype == 'Staff' or Auth::user()->usertype == 'Admin' and Auth::user()->email !== 'demo@admin.com'){\n $post->approve = 'yes';\n }else{\n $post->approve = 'no';\n }\n\n $post->published_at = Carbon::now();\n\n\n Auth::user()->posts()->save($post);\n\n $this->createentrys($request, $post);\n\n\n //burda aynı resim adresini kulllanıyordur.\n \\File::delete($inputs['thumb']); //delete tmp image\n\n \\Session::flash('success.message', trans('index.successcreated'));\n\n return array('url' => makeposturl($post) );\n\n }", "public function create()\n {\n $json = [\n 'status' => false,\n 'message' => 'You cannot create post',\n ];\n\n if($this->isUserAuth()){\n $template = new Template();\n\n $template->data['post_id'] = 0;\n\n $json = [\n 'status' => true,\n 'html' => $template->fetch('add_post_form'),\n ];\n }\n\n $this->jsonAnswer($json);\n }", "public function create()\n { \n // $this->authorize('post.create');\n //sert a afficher le formulaire d'ajout\n return view('posts.create');\n }", "public function create() {\n\t\treturn view('post.post_create');\n\t}", "public function created(Post $post)\n {\n //\n }", "public function postcreate(){\n if($this->check() == true){\n $page_id = @$_POST['page'];\n $text = @htmlentities($_POST['text'], ENT_QUOTES);\n\n\n $this->admindb->insert(\"post\", array(\n\n \"text\" => $text,\n \"pages_id\" => $page_id\n\n ))->get();\n\n $data['pages'] = $this->admindb->selectAll('pages');\n $this->view(\"admin/post/postcreate\", $data);\n }\n }", "public function create()\n {\n //\n return view('post.create');\n }", "public function create()\n {\n return view ('admin.post.create');\n }", "public function createPost()\n {\n return view('post_create');\n }", "public function store(CreatePostRequest $request)\n {\n // $post->title = $request->get('title');\n // $post->body = $request->get('body');\n // $post->is_published = $request->get('is_published', false);\n\n // $post->save();\n\n $data = $request->validated();\n\n // $newPost = Post::create($data);\n\n $newPost = auth()->user()->posts()->create($data);\n\n $newPost->tags()->attach($data['tags']); // mozemo koristiti sync umjesto attach\n // $newPost = Post::create([\n // 'title' => $request->get('title'),\n // 'body' => $request->get('body'),\n // 'is_published' => $request->get('is_published'),\n // 'user_id' => auth()->user()->id,\n // ]);\n\n return redirect(route('post', ['post' => $newPost]));\n }", "function createPost()\n {\n $userLogged = Auth::check(['administrateur']);\n \n // post\n $post = new Post();\n $post->setDateCreate(new Datetime()); //to assign today's date (in datetime) by default to the post we create\n $formPost = new Form($post);\n\n // users\n $userManager = new UserManager();\n $user = new User();\n\n $listUsers = $userManager->getListUsers();\n $listUsersSelect = $userManager->listUsersFormSelect($listUsers);\n \n $formUser = new Form($user);\n\n // media (image et video)\n $mediaManager = new MediaManager();\n \n $mediaUploadImage = new Media(); // to have in the input field \"alternative text of the media uploader\" (create after) an empty field\n $formMediaUploadImage = new Form($mediaUploadImage); // use in \"_form.php\" of the \"backendViews> post\" folder\n \n $mediaUploadVideo = new Media();\n $formMediaUploadVideo = new Form($mediaUploadVideo);\n\n // traitement server et affichage des retours d'infos \n if ($_SERVER['REQUEST_METHOD'] === 'POST') { // if a submission of the form (=> a creation of a post) has been made\n \n // for data validation\n $errors = [];\n\n // test de validation des champs du formulaire\n if (empty($_POST['title']) OR mb_strlen($_POST['title'])<=3) {\n $errors[] = 'Le champ title ne peut être vide et doit contenir plus de 3 caracteres';\n }\n if (empty($_POST['introduction']) OR mb_strlen($_POST['introduction'])<=3) {\n $errors[] = 'Le champ introduction ne peut être vide et doit contenir plus de 3 caracteres';\n }\n if (empty($_POST['content']) OR mb_strlen($_POST['content'])<=3) {\n $errors[] = 'Le champ content ne peut être vide et doit contenir plus de 3 caracteres';\n }\n\n if (empty($errors)) {\n \n // modification to manage the record in the database via the Postmanager \n $dateCreate = DateTime::createFromFormat('Y-m-d H:i:s',$_POST['dateCreate']);// so that the date String is in Datetime \n \n // bdd recording of the post \n $post\n ->setTitle($_POST['title'])\n ->setIntroduction($_POST['introduction'])\n ->setContent($_POST['content'])\n ->setDateCreate($dateCreate)\n ->setDateChange($dateCreate)\n ->setUser_id($_POST['user'])\n ;\n\n $postManager = new PostManager();\n\n try{\n $lastRecordingPost = $postManager->addPost($post);// add the post to the database and get the last id of the posts in the database via the return of the function\n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n } \n\n // media IMAGE\n if (isset($_FILES['mediaUploadImage']) AND $_FILES['mediaUploadImage']['error']== 0) {\n \n // info variables \n $idMediaType = 1; // image\n \n $file = $_FILES['mediaUploadImage']; // file uploader \n $storagePath = searchDatasFile('imageStoragePath')[1]; // storage path of the uploader file (see globalFunctions.php file) \n $name = 'mediaImage-'.pathinfo($file['name'])['filename'].'-'; \n $newNameUploaderFile = uniqid($name , true); // concatenation \"media-\" + name of the uploader file (without its extension + unique identifier (via uniqid) to have a unique identifier\n \n $extension_upload = pathinfo($file['name'])['extension']; // to retrieve the extension of the uploader file \n $pathFile = $storagePath.basename($newNameUploaderFile.'.'.$extension_upload); //storage path with new name of the media uploader\n\n // recording in bdd of the IMAGE media and of the uploader file on the server in the media folder \n $mediaUploadImage\n ->setPath($pathFile) // ->setPath('./media/media-19.jpg')\n ->setAlt($_POST['altFileMediaImage'])\n ->setStatutActif(1) //actif\n ->setMediaType_id($idMediaType)\n ->setPost_id($lastRecordingPost)\n ->setUser_id($_POST['user'])\n ;\n \n try{\n $mediaManager->addMediaImage($mediaUploadImage, CONFIGFILE, $file); //adding the media to the database and recovery via the id function of the last media in the database\n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n \n }\n }\n \n // media VIDEO\n if (!empty($_POST['mediaUploadVideo'])){\n // VIDEO media bdd recording \n $mediaUploadVideo\n ->setPath($_POST['mediaUploadVideo'])\n ->setAlt($_POST['altFileMediaVideo'])\n ->setStatutActif(1) //actif\n ->setMediaType_id(3) //video\n ->setPost_id($lastRecordingPost)\n ->setUser_id($_POST['user'])\n ;\n try{\n $mediaManager->addMediaVideo($mediaUploadVideo);\n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n }\n }\n \n setFlashErrors($errors); // to manage flash message errors (see globalFunctions.php file)\n \n header('Location: /backend/editPost/'.$lastRecordingPost.'?created=true');\n return http_response_code(302);\n\n }else{\n setFlashErrors($errors); // to manage flash message errors (see globalFunctions.php file)\n \n header('Location: /backend/createPost?created=false');\n return http_response_code(302);\n }\n }\n\n require'../app/Views/backViews/post/backCreatePostView.php';\n }", "public function store(){\n $validatedData = $this->validate([\n 'title'=>'required',\n 'content'=>'required'\n ]);\n\n //Validate the data\n Post::create($validatedData);\n\n //Set a message\n session()->flash('message','Post Created Successfully!');\n\n //Call Reset Input field function\n $this->resetInputFields();\n\n //Emit to close modal after submiting it\n $this->emit('postAdded');\n }", "public function createPost(){\n\n return view('pages.add-post');\n }", "public function createActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n if (hasKeyPost(\"doCreate\")) {\n $title = getPost(\"contentTitle\");\n\n // Calls createProduct method\n $this->admin->createBlogpost($title);\n\n // Retrieves id\n $id = $this->app->db->lastInsertId();\n }\n\n // Redirects\n return $this->app->response->redirect(\"admin/edit?id=$id\");\n }", "public function create()\n {\n //\n return View::make('post.create');\n }", "public function post();", "public function post();", "public function post();", "public function create()\n {\n return redirect()->route('index', ['type' => 'create-post']);\n }", "public function add(): void\n {\n\n $this->checkAccess(); // redirect to login page if not connected\n\n $pageTitle = 'Ajouter un post';\n $message = '';\n $style = 'success';\n $template = 'new-post';\n $post = $this->model;\n\n $postArray = $post->collectInput('POST'); // collect global $_POST data\n \n if (!empty($postArray))\n {\n if (isset($postArray['save']))\n {\n $message = 'Le post a bien été enregistré en base';\n $post->status = self::STATUS_SUBMITTED;\n }\n if (isset($postArray['saveAsDraft']))\n {\n $message = 'Le brouillon a bien été enregistré en base';\n $post->status = self::STATUS_DRAFT;\n }\n\n $post->author = filter_var($_SESSION['user_id'], FILTER_VALIDATE_INT); // author = connected user\n $this->dataTransform($post, $postArray);\n \n $post->id = $post->insert();\n\n if($post->id == 0)\n {\n $message = 'Une erreur est survenue, le post n\\'a pas pu être inséré dans la base de données.';\n $style = 'danger';\n } \n if($post->id !== 0)\n {\n array_push($_SESSION['user_posts'], $post->id);\n $message .= ' sous l\\'identifiant #'.$post->id.'.';\n $pageTitle = 'Modifier le post #'.$post->id;\n $template = 'edit-post';\n\n if((!$this->isAdmin()) AND (NOTIFY['new_post'] == 1)) // if current user is not admin and new post notification is enabled\n {\n // Try to notify the site owner of the new post submission\n try\n {\n $serverArray = $this->collectInput('SERVER');\n $baseUrl = 'http://'.$serverArray['HTTP_HOST'].$serverArray['PHP_SELF'];\n $body = \"Un nouveau post vient d'être soumis par {$post->getAuthor()} : {$baseUrl}?controller=post&task=edit&id={$post->id}\";\n if (!$this->sendEmail(SITE_NAME,'noreply@myblog.fr','Nouveau post soumis',$body))\n {\n throw new Throwable();\n }\n }\n catch (Throwable $e)\n {\n // Uncomment in dev context:\n $error = sprintf('Erreur : %1$s<br>Fichier : %2$s<br>Ligne : %3$d', $e->getMessage(), $e->getFile(), $e->getLine());\n echo filter_var($error, FILTER_SANITIZE_STRING);\n }\n }\n }\n\n }\n \n $this->display('admin', $template, $pageTitle, compact('message','style','post'));\n\n }", "public function create()\n {\n // ver se está autenticado\n if (!Auth::check()) {\n return redirect('login');\n }\n\n return view('pages.createpost', ['needsFilter' => 0, 'tags'=>[]]);\n }", "public function create()\n {\n try {\n return view('post.create-post');\n } catch (\\Exception $e) {\n return abort(404);\n }\n\n }", "public function create()\n {\n $inputs = $this->validate([\n 'title' => 'required|min_length[5]',\n 'description' => 'required|min_length[5]',\n ]);\n\n if (!$inputs) {\n return view('posts/create', [\n 'validation' => $this->validator\n ]);\n }\n\n $this->post->save([\n 'title' => $this->request->getVar('title'),\n 'description' => $this->request->getVar('description')\n ]);\n session()->setFlashdata('success', 'Success! post created.');\n return redirect()->to(site_url('/posts'));\n }", "public function create()\n {\n\t\t$js = [Module::asset(\"metafields:js/post.js\")];\n\t\tView::share('js_script', $js);\n return view('metafields::backend.create',array(\"title\" => \"Create Metafield\"));\n }", "public function create()\n {\n return $this->postService->create();\n }", "function new_post($post){\n $this->newPost($post);\n }", "public function store()\n\t{\n\t\t\n\t\t$rules=[\n\t\t'titre'=>'required',\n\t\t'abstract'=>'required',\n\t\t'content'=>'required',\n\t\t];\n\n\t\t$userData=[\n\t\t'titre' => Input::get('titre'),\n\t\t'abstract' => Input::get('abstract'),\n\t\t'content' => Input::get('content'),\n\n\t\t];\n\n\t\t$validator=Validator::make($userData, $rules);\n\n\n\t\tif($validator->fails()){\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\n\t\t}else{\n\n\t\t\t$post = new Post;\n\n\t\t\t$args = array(\n\t\t\t\t'titre' => FILTER_SANITIZE_SPECIAL_CHARS,\n\t\t\t\t'abstract' => FILTER_SANITIZE_SPECIAL_CHARS,\n\t\t\t\t'content' => FILTER_SANITIZE_SPECIAL_CHARS,\n\t\t\t\t);\n\n\t\t\t$myinputs = filter_input_array(INPUT_POST, $args);\n\n\t\t\t$post->title=$myinputs['titre'];\n\t\t\t$post->abstract=$myinputs['abstract'];\n\t\t\t$post->content=$_POST['content'];\n\n\n\t\t\tif (Input::hasFile('photo'))\n\t\t\t{\n\n\t\t\t\tif (Input::file('photo')->isValid())\n\t\t\t\t{\n\n\t\t\t\t\t$destinationPath = '.'.DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'/images';\n\n\t\t\t\t\t$extention= Input::file('photo')->getClientOriginalExtension();\n\t\t\t\t\t($fileName=$this->upload()) or $fileName='';\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tInput::file('photo')->move($destinationPath, $fileName.\".\".$extention);\n\t\t\t\t\t\tchmod($destinationPath.DIRECTORY_SEPARATOR.$fileName.\".\".$extention, 0777);\n\n\t\t\t\t\t} catch(Exception $e) { }\n\n\t\t\t\t\t$post->url_thumbnail=$fileName.\".\".$extention;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$post->url_thumbnail=\"\";\t\t\t\n\t\t\t}\n\n\t\t\t$post->status='unpublish';\n\t\t\t$post->user_id=Auth::user()->id;\n\t\t\t$post->save();\n\n\t\t\tSession::flash('message', \"<p style='color:#01DF01;font-size:18px;text-align:center;'>Article ajouté</p>\");\n\t\t\treturn Redirect::to(\"admPost\");\n\n\t\t}\n\t}", "public function create() {\n\t\treturn view('post.create');\n\t}", "public function create()\n {\n return Inertia::render('Posts/CreatePost');\n }", "public function createPost()\n {\n // create a new post\n $data['title'] = __('posts.add');\n $data['post'] = $this->schema;\n $data['post']['categories'] = CategoryModel::all();\n $data['post']['form'] = config('app.admin_prefix').'/post/store';\n\n return admin_view('Posts::CreateEdit', $data);\n }", "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 }", "public function create()\n {\n //\n return view('createPost');\n }", "public function create()\n {\n return view('post.create');\n }", "public function createPost(Request $request)\n {\n \t//if (!self::isAdmin()) return redirect('/');\n \t \n \t$post = Post::firstOrNew(['url' => $request->url]);\n \t//$post = new Post;\n \t/*\n \ttry {\n \t\t$post = Post::where('url', '=', $request->url)->firstOrFail();\n \t} catch (\\Exception $e) {\n \t\t$post = new Post;\n \t}\n \t*/\n \t$url = urldecode(trim($request->url));\n \t$parse = parse_url($url);\n \t$sourcedomain = $parse['host'];\n \t \n \t$post->url = $url;\n \t$post->sourcedomain = $sourcedomain;\n \t$post->title = trim($request->title);\n \t$post->description = trim($request->description);\n \tif (is_array($request->tags) && (count($request->tags) >= 1)) {\n \t\t// tags separated by ',' , such as 'a,b,c,d'\n \t\t$post->tags = trim(implode(\",\", $request->tags));\n \t} else {\n \t\t$post->tags = \"\";\n \t}\n \t$post->isfeatured = $request->isfeatured;\n \t$post->hasvideo = $request->hasvideo;\n \t$post->ogimage = trim($request->ogimage);\n \t$post->content = trim($request->editor1);\n \t \n \t// default show on list, for upload all post by self\n \t$post->isapproved = 1;\n \n \t$post->save();\n \n \treturn redirect('/admin/list');\n }", "public function create()\n {\n\n return view('post.createpost');\n }", "public function post()\n {\n //\n }", "public function create(){\n\n //\n }", "function execute()\n {\n $data = $this->getRequest()->getPostValue();\n $id = !empty($data['post_id']) ? $data['post_id'] : null;\n \n $newData = [\n 'name' => $data['name'],\n 'status' => $data['status'],\n 'post_content' => $data['post_content'],\n ];\n \n $post = $this->_postFactory->create();\n if ($id) {\n $post->load($id);\n $this->getMessageManager()->addSuccessMessage(__('Edit thành công'));\n } else {\n $this->getMessageManager()->addSuccessMessage(__('Save thành công.'));\n }\n try{\n $post->addData($newData);\n $post->save();\n return $this->_redirect('ad_helloworld/post/post');\n }catch (\\Exception $e){\n $this->getMessageManager()->addErrorMessage(__('Save thất bại.'));\n }\n \n }", "function createservicestep1_post()\n {\n $em = $this->doctrine->em;\n $service = new \\Entities\\Service();\n $service->setAthor($this->getCurrentUser());\n\n\n $service->title = $this->post('title', TRUE);\n $service->subtitle = $this->post('subtitle', TRUE);\n $service->phone = $this->post('phone', TRUE);\n $service->address = $this->post('address', TRUE);\n// $service->addSubCategories($this->post('categories', TRUE),$em);\n// $service->addCities($this->post('cities', TRUE),$em);\n// $icon = $this->post('icon');\n// $path= \"./resources/\".$icon['filename'];\n// file_put_contents($path, base64_decode($icon['value']));\n// $service->setIcon($path);\n// $em->persist($service);\n// $em->flush();\n $this->set_response($service, REST_Controller::HTTP_OK);\n }", "public function create()\n {\n\n $attributes = request()->validate([\n 'post_heading' => ['required', 'max:255'],\n 'post_title' => ['required', 'max:255'],\n 'post_content' => ['required'],\n 'thumbnail' => ['image', 'required']\n ]);\n $attributes['post_content'] = addslashes(preg_replace(\"@[\\n\\r]@\", \"\", $attributes['post_content']));\n $path = request()->file('thumbnail')->store('thumb');\n Post::create(array_merge($attributes, [\n 'user_id' => auth()->user()->id,\n 'thumbnail' => $path\n ]));\n return redirect('/')->with('success', 'Post was successfully published.');\n }", "public function create() {\n return view('post.create');\n }", "public function create()\n {\n return view('post.create');\n }", "public function create()\n {\n return view('post.create');\n }", "public function create()\n {\n return view('post.create');\n }", "public function create()\n {\n return view('post.create');\n }", "public function create()\n {\n return view('post.create');\n }", "public function create()\n {\n return view('post.create');\n }", "public function create()\n {\n return view('post.create');\n }", "public function create()\n {\n return view('post.create');\n }", "public function create()\n {\n return view('post.create');\n }", "public function create()\n {\n return view('post.create');\n }", "public function create()\n {\n return view('post.create');\n }", "public function create(){\n //\n }", "public function create(){\n //\n }", "public function onCreateField()\n {\n $post = post();\n $flags = FieldManager::makeFlags(\n in_array('enabled', $post['flags']),\n in_array('registerable', $post['flags']),\n in_array('editable', $post['flags']),\n in_array('encrypt', $post['flags'])\n );\n\n $validation = $this->makeValidationArray($post);\n\n $data = $this->makeDataArray($post);\n\n $feedback = FieldManager::createField(\n $post['name'],\n $post['code'],\n $post['description'],\n $validation,\n $post['type'],\n $flags,\n $data\n );\n\n FieldFeedback::with($feedback, true)->flash();\n\n return Redirect::to(Backend::url('clake/userextended/fields/manage'));\n }", "private function Create() {\r\n $cadastra = new Create;\r\n $cadastra->ExeCreate(self::Entity, $this->Data);\r\n if ($cadastra->getResult()):\r\n $this->Result = $cadastra->getResult();\r\n $this->Error = [\"O poste <b>{$this->Data['post_title']}</b> foi cadastrado com sucesso no sistema!\", WS_SUCCESS];\r\n endif;\r\n }", "public function testPostCreate()\n {\n $this->json('POST', '/api/post_create', ['title' => 'test1', 'description' => 'description1', 'login' => 'user1'])\n ->assertJson([\n 'post_id' => true\n ]);\n }", "public function testCreateNewPost()\n {\n $response = $this->call('Post', '/post', [\n 'title' => 'Php Unit test',\n 'body' => 'Php unit test body',\n 'tag' => 'phpunit,test'\n ]);\n \n $this->seeHeader('content-type', 'application/json');\n $this->seeStatusCode(200);\n $this->seeInDatabase('posts', ['title' => 'Php Unit test']);\n \n $data = json_decode($response->getContent(true), true);\n $this->assertArrayHasKey('id', $data['data']);\n \n \n }", "public function create()\n {\n $data = $this->dispatch(new PostFormFields());\n\n return view('canvas::backend.post.create', $data);\n }", "public function store(CreatePostRequest $request)\n\t{\n\t\t$req = $request->all();\n\t\t$post = new Post;\n\t\t$post->title = $req['title'];\n\t\t$post->cat_id = $req['cat_id'];\n\t\t$post->content = $req['content'];\n\t\t$post->save();\n\t\treturn Redirect()->to('bbc');\t\t\n/*\n\t\t$rules = [\n\t\t\t'title' => 'required',\n\t\t\t'content' => 'required',\n\t\t\t'cat_id' => 'required',\n\t\t];\n\n\t\t$message = array(\n\t\t\t'title.required' => 'タイトルを入力してください',\n\t\t\t'content.required' => '本文を入力してください',\n\t\t\t'cat_id.required' => 'カテゴリーを選択してください',\n\t\t);\n\n\t\t$validator = Validator::make(Input::all(), $rules, $messages);\n\n\t\tif($validator->passes()) {\n\t\t\t$post = new Post;\n\t\t\t$post->title = Input::get('title');\n\n\t\t\t$post->content = Input::get('content');\n\t\t}\n\t\t */\n\n\t}", "public function create()\n {\n return view('admin.post.create');\n }", "public function create()\n {\n return view('admin.post.create');\n }", "public function create()\n {\n return view('admin.post.create');\n }", "public function create(){ \n //\n }", "public function actionCreate()\n {\n\t$this->layout='wide';\n $post=new Post;\n if(isset($_POST['Post']))\n {\n $post->attributes=$_POST['Post'];\n if(isset($_POST['previewPost']))\n $post->validate();\n else if(isset($_POST['submitPost']) && $post->save())\n {\n if(Yii::app()->user->status==User::STATUS_VISITOR)\n {\n Yii::app()->user->setFlash('message','Thank you for your post. Your post will be posted once it is approved.');\n $this->redirect(Yii::app()->homeUrl);\n }\n $this->redirect(array('show','slug'=>$post->slug));\n }\n }\n $this->pageTitle=Yii::t('lan','New Post');\n $this->render('create',array('post'=>$post));\n }", "public function create()\n {\n //\n return view('posts.create');\n\n\n }", "public function create()\n {\n //\n \t$params = Input::all();\n \t$section = Section::where('id', $params['id']) -> first();\n \t$themes = Section::find($params['id']) -> themes;\n \tforeach ($themes as $theme){\n \t\t$theme['count'] = Theme::find($theme['id']) -> posts -> count();\n \t}\n\t\t$column = Section::find($params['id']) -> column;\n \t$data = [\n \t\t'sid' => $params['id'],\n \t\t'section' => $section,\n \t\t'themes' => $themes,\n \t\t\t'column' => $column,\n \t];\n// \tdd($section);\n\t\t// 获取广告\n \t$adverts = $this -> getAdverts();\n \t// 获取友情链接\n \t$links = $this -> getLinks();\n \t// 获取网站信息\n \t$website = $this -> getWeb();\n \t$datas = [\n \t\t\t'adverts' => $adverts,\n \t\t\t'links' => $links,\n \t\t\t'website' => $website,\n \t\t\t'data' => $data,\n \t];\n// \tdd($params);\n \treturn view('home.post.add', $datas);\n }", "public function store(PostRequets $request)\n {\n $now = new DateTime();\n $data = request()->except('_token');\n $data['slug'] = Str::slug($data['title']);\n $data['title'] = Str::title($data['title']);\n $data['day_add'] = $now;\n Post::create($data);\n return redirect()->route('post.index')->with('msg', 'Thêm bài viết thành công !');\n }", "public function insertPost()\n {\n $data = [\n 'kategori' => $this->request->getVar('kategori'),\n 'judul' => $this->request->getVar('judul'),\n 'slug' => url_title($this->request->getVar('judul'), '-', true),\n 'isi' => $this->request->getVar('isi'),\n 'updated_at' => DateTime::createFromFormat('Y-m-d H:i:s', Time::now('Asia/Jakarta'))->format('j F Y, G:i') . ' WIB'\n ];\n\n $this->postModel->insertPost($data);\n return redirect()->to('/adminpage/editpost');\n }", "public static function create()\n {\n if(isset($_POST['create_post']) && Html::form()->validate())\n {\n $postId = Blog::post()->insert(array(\n 'user_id' => User::current()->id,\n 'title' => $_POST['title'],\n 'slug' => String::slugify($_POST['title']),\n 'body' => $_POST['body']\n ));\n\n if($postId)\n {\n foreach($_POST['category_id'] as $catId)\n {\n Db::table('categories_posts')->insert(array(\n 'category_id' => $catId,\n 'post_id' => $postId\n ));\n }\n\n Message::ok('Post created successfully.');\n $_POST = array(); // Clear form\n }\n else\n Message::error('Error creating post. Please try again.');\n }\n\n $formData[] = array(\n 'fields' => array(\n 'title' => array(\n 'title' => 'Title',\n 'type' => 'text',\n 'validate' => array('required')\n ),\n 'body' => array(\n 'title' => 'Body',\n 'type' => 'textarea',\n 'attributes' => array('class' => 'tinymce')\n ),\n 'category_id[]' => array(\n 'title' => 'Category',\n 'type' => 'select',\n 'options' => self::_getSelectCategories(),\n 'attributes' => array(\n 'multiple' => 'multiple'\n ),\n 'validate' => array('required')\n ),\n 'create_post' => array(\n 'type' => 'submit',\n 'value' => 'Create Post'\n )\n )\n );\n\n return array(\n 'title' => 'Create Post',\n 'content' => Html::form()->build($formData)\n );\n }", "function create(Request $request)\n {\n\n $post = new Post();\n\n $post->lang = $request->get('lang', app()->getLocale());\n $post->title = $request->get('title');\n $post->excerpt = $request->get('excerpt');\n $post->content = $request->get('content');\n $post->image_id = $request->get('image_id', 0);\n $post->media_id = $request->get('media_id', 0);\n $post->lang = $this->user->lang;\n $post->user_id = $this->user->id;\n $post->status = $request->get(\"status\", 1);\n $post->format = $request->get(\"format\", \"post\");\n\n // Validate and save requested user\n if (!$post->validate()) {\n\n // return validation error\n return $this->response($post->errors(), \"validation error\");\n }\n\n if ($post->save()) {\n\n // Saving categories\n $categories = $request->get(\"category_ids\", []);\n $post->categories()->sync($categories);\n\n // Saving tags\n if ($request->filled(\"tag_ids\")) {\n $tags = $request->get(\"tag_ids\", []);\n $post->tags()->sync($tags);\n } elseif ($request->filled(\"tag_names\")) {\n $tags = Tag::saveNames($request->get(\"tag_names\"));\n $post->tags()->sync($tags);\n }\n\n return $this->response($post);\n }\n\n }", "function index_post() {\n $this->crud_post($this->post());\n }", "public function create()\n {\n return view('post.new_post');\n }", "public function create()\n {\n return view('create-post');\n }", "public function create()\n {\n \n\n\n }", "public function post($post);", "public function create()\n {\n //\n return view('posts.create');\n }", "public function create()\n {\n //\n return view('posts.create');\n }", "public function create()\n {\n //\n return view('posts.create');\n }", "public function actionCreate()\n {\n $model = new Post();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->alias = Inflector::slug($model->title);\n $model->created_date = time();\n $model->publish_date = time();\n if($model->save()) {\n \\Yii::$app->session->setFlash('success', Module::t('general', 'Create post successfull'));\n return $this->redirect(['view', 'id' => $model->id]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function addNewAction()\n {\n\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\n $title = $_POST['title'];\n $content = $_POST['content'];\n $error = '';\n\n /*\n * validate fields\n *\n */\n if ($title == 'aaa') {\n $error = 'Greska - polje Title ne moze da ima ovaj sadrzaj';\n $errors[] = $error;\n }\n\n if ($content== 'aaa') {\n $error = 'Greska - polje Content ne moze da ima ovaj sadrzaj';\n $errors[] = $error;\n }\n\n if (empty($errors)) {\n\n try {\n\n $post = PostService::create($title,$content);\n View::renderTemplate('Posts/addPost.html', [\n 'post' => $post\n ]);\n\n return;\n\n } catch (\\PDOException $e) {\n $errors[] = $e->getMessage();\n }\n\n }\n\n View::renderTemplate('Posts/addPost.html', [\n 'title' => $title,\n 'content' => $content,\n 'errors' => $errors\n ]);\n exit();\n }\n View::renderTemplate('Posts/addPost.html');\n }", "public function post()\n {\n $postId = $this->request->getParameter(\"id\"); /* le parametre disparait lors de l'annonce de \"public function post($postId)\". On l'annonce\n du coup en début de la méthode en faisant appel à la méthode getParameter de la class Request */\n $post = $this->post->getPost($postId); // va chercher la méthode GetPost($postId) dans le Model Post.php l.33\n $this->buildView(array('post' => $post));\n }", "public function create()\n {\n //\n\n\n\n }", "public function create()\n {\n return view('admin/post.create');\n }", "public function store(CreateRequest $request)\n {\n $inputs = $request->except(['_token','slug','type']);\n $inputs['uid'] = Auth::id();\n $request->index_seo == NULL ? ($inputs['index_seo'] = 0) : ($inputs['index_seo'] = 1);\n $request->public == NULL ? ($inputs['public'] = 0) : ($inputs['public'] = 1);\n $data = $this->repoPost->create($inputs);\n $idSlugs = $this->repoSlug->create([\n 'slug'=>$request->slug,\n 'type'=>$request->type,\n 'refid'=>$data->id\n ]);\n $data->tag()->sync($request->input('tag'));\n $data->cates()->sync((array)$request->input('cate'));\n if($idSlugs->wasRecentlyCreated === false){\n $this->repoPost->delete($data->id);\n }else{\n return redirect()->route('post.index')\n ->with('success','Tạo mới bài viết thành công');\n }\n\n }", "public function create() {\n\t\treturn parent::post(false, ['api_key'=>self::$apiKey]);\n\t}", "public function create()\n {\n return view('backview.post.create');\n }", "public function actionCreate()\r\n {\r\n $model = new Post();\r\n $model->setAttributes(Yii::$app->getRequest()->getBodyParams());\r\n $model->user_id = Yii::$app->user->identity->id;\r\n $model->save();\r\n return $model;\r\n }", "public function create()\n {\n // \n\t\treturn view('posts.create');\n }", "public function create()\n {\n return view('add-post');\n }", "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 create() //forma za novi post\n {\n return view('posts.new');\n }", "public function postAction() {}", "public function store()\n\t{\n $post = new Post;\n //$post->title='test title';\n //$post->body='test body';\n $data = [\n 'title'=>'title',\n 'body'=>'body',\n 'user_id'=>1\n ];;\n Posts::create($data);\n $post->save();\n\t}", "public function create(Request $request)\n {\n $post= new Post;\n $post->text=$request->text;\n $post->user_id=Auth::id();\n $post->save();\n return redirect('posts/admin');\n }", "public function create()\n {\n return view('frontend.blog.post.create');\n }", "public function create(){\n \n }", "public function create()\n {\n \n return view(\"posts.create\");\n }" ]
[ "0.738942", "0.7039857", "0.68104506", "0.6791263", "0.67362994", "0.67085475", "0.6657472", "0.66420287", "0.66184336", "0.66146517", "0.66137683", "0.6607518", "0.6598134", "0.6596656", "0.6584335", "0.6580934", "0.65526885", "0.65375274", "0.65375274", "0.65375274", "0.6525996", "0.64898324", "0.64868546", "0.6477057", "0.64727455", "0.6452223", "0.6446812", "0.643934", "0.64384747", "0.6435419", "0.64238775", "0.64236015", "0.6410549", "0.6407588", "0.6404407", "0.63905275", "0.63767225", "0.6376598", "0.63669735", "0.63589364", "0.63576967", "0.63568026", "0.6350411", "0.6343653", "0.6343653", "0.6343653", "0.6343653", "0.6343653", "0.6343653", "0.6343653", "0.6343653", "0.6343653", "0.6343653", "0.6343653", "0.6338375", "0.6338375", "0.63204706", "0.63140005", "0.6309476", "0.6308196", "0.6295813", "0.62881917", "0.62789327", "0.62789327", "0.62789327", "0.62774676", "0.62761176", "0.62675536", "0.6256344", "0.625539", "0.6254032", "0.6251805", "0.62516296", "0.6249673", "0.62400275", "0.62386423", "0.62354374", "0.62325853", "0.6228506", "0.6228506", "0.6228506", "0.6227114", "0.6226631", "0.6220519", "0.62194556", "0.6214373", "0.62140036", "0.6213287", "0.62022704", "0.61984134", "0.6197446", "0.61935365", "0.6192432", "0.61912215", "0.61892873", "0.6186592", "0.61831594", "0.6182279", "0.618005", "0.61798704" ]
0.7189276
1
Sets a new entityKeyPrefix
Устанавливает новый префикс ключа сущности
public function setEntityKeyPrefix($entityKeyPrefix) { $this->entityKeyPrefix = $entityKeyPrefix; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prefixKey($prefix);", "public function setKeyPrefix($prefix)\n\t{\n\t\t$this->_redisKeyPrefix = $prefix;\n\t}", "public function setPrefix($prefix)\n {\n $this->idPrefix = $prefix;\n }", "public function setPrefix($prefix)\n\t{\n\t\tif (func_num_args() == 1) {\n\t\t\t$this->id_prefix = $prefix;\n\t\t} else {\n\t\t\t$args = func_get_args();\n\t\t\t$args = Arrays::castToType($args, 'string');\n\t\t\t$this->id_prefix = implode('.', $args);\n\t\t}\n\n\t\tif (substr($this->id_prefix, -1, 1) != '.') {\n\t\t\t$this->id_prefix .= '.';\n\t\t}\n\t}", "protected function setTablePrefix()\n {\n }", "public function prefixKey($prefix)\n {\n if (empty($this->key)) {\n $this->key = $prefix;\n } else {\n $this->key = $prefix . '.' . $this->key;\n }\n\n return $this;\n }", "public function setPrefix() {\n\t}", "public function setPrefix( $prefix );", "public static function setCacheKeyPrefix($cacheKeyPrefix)\n {\n static::$cacheKeyPrefix = $cacheKeyPrefix;\n }", "public function setPrefix($prefix);", "public function setPrefixKey($prefixKey)\n {\n return $this->setNamespace($prefixKey);\n }", "protected function setPrefix()\n {\n if (array_key_exists('prefix', $this->config)) {\n $this->prefix = $this->config['prefix'];\n }\n }", "public function setPrefixFromDB(){\n foreach($this->getTables() as $table){\n $prefix = explode('_', $table);\n if(isset($prefix[1])){\n if($this->prefix==$prefix[0]) break;\n else $this->prefix = $prefix[0];\n }\n }\n }", "public function setPrefix($prefix){\n\t\t$this->prefix = $prefix;\n\t}", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setEntityKeys($entityKey)\n {\n $this->_entityKey = $entityKey;\n }", "public function setPrefix($prefix) {\n $this->prefix = $prefix;\n }", "public function setPrefix($prefix) {\n $this->prefix = $prefix;\n }", "public function setPrefix($prefix)\n {\n $this->prefix = $prefix;\n }", "public function setPrefix($prefix)\n {\n $this->prefix = $prefix;\n }", "public static function setTablePrefix($prefix)\n {\n }", "public function setCustomerPrefix($customerPrefix);", "public function setPrefix($prefix)\n\t{\n\t\t$this->prefix = $prefix;\n\t}", "public function setPrefix($prefix)\n {\n $this->prefix = !empty($prefix) ? $prefix . ':' : '';\n }", "public function setPrefix(string $prefix): void\n {\n $this->prefix = $prefix;\n }", "public function setPrefix(string $prefix): void\n {\n $this->prefix = $prefix;\n }", "public function setPrefix($prefix = \"\") {\n $this->_prefix = !empty($prefix) ? $prefix : '';\n }", "public function setCollectionKeyPrefix($group, $prefix_definition)\n\t{\n\t\t$prefix = array();\n\t\tforeach ($prefix_definition as $p) {\n\t\t\t$prefix[] = $this->getViewData($p['group_id'], $p['field_id']);\n\t\t}\n\t\t$this->group_keys_prefix[$group] = $prefix;\n\t\treturn $prefix;\n\t}", "public function setPrefix($prefix)\n {\n $this->__set(self::FIELD_PREFIX,$prefix);\n return $this;\n }", "public function setNamespacePrefix($prefix) {\n $this->nsprefix= $prefix;\n }", "public static function setLockPrefix($prefix)\n {\n self::$lockPrefix = $prefix;\n }", "public function setPrefix( $prefix ) {\n $this->_prefix = $prefix;\n return $this;\n }", "public function setPrefix($prefix) {\n\t\tif ($prefix == $this->prefix) return;\n\t\t\n\t\t$this->prefix = $prefix;\n\t\t$sql = \"UPDATE \twbb\".WBB_N.\"_thread\n\t\t\tSET\tprefix = '\".escapeString($prefix).\"'\n\t\t\tWHERE \tthreadID = \".$this->threadID;\n\t\tWCF::getDB()->registerShutdownUpdate($sql);\n\t}", "private function _setObjectDataPrefix($dataPrefix = false)\n\t{\n\t\tif (!$dataPrefix) {\n\t\t\t$dataPrefix = get_class($this);\n\t\t}\n\t\t$this->registryInstance->set(\"MvcObjectDataPrefix:\" . get_class($this), $dataPrefix);\n\t\t$this->objectDataPrefix = $dataPrefix;\n\t}", "public function setPrefix($prefix)\n {\n $this->getVariableModel()->save(self::VARIABLE_NAME_PREFIX, $prefix);\n return $this;\n }", "public function setPrefix($value)\n {\n $this->prefix = $value;\n }", "public function db_changeTablePrefix( $table_prefix )\n\t{\n\t\tif ($table_prefix !== '?') {\n\t\t\t$this->table_prefix = $table_prefix;\n\t\t}\n\t}", "public function getDeletedPrefixKey() {}", "public function setPrefix($p)\t{\n\t\t$this->prefix = $p;\n\t}", "public function setPrefixSymbol(bool $prefixSymbol)\n\t{\n\t\t$this->prefixSymbol=$prefixSymbol; \n\t\t$this->keyModified['prefix_symbol'] = 1; \n\n\t}", "public function setPrice_prefix( $price_prefix ) {\n\t\t$this->price_prefix = $price_prefix;\n\t}", "public function set_key ( $key = '' )\n {\n if ( ! empty( $key ) )\n {\n if ( is_array( $key ) )\n {\n $this->key = $key;\n } else {\n // String has special delimiter\n if ( strpos( $key, ':' ) > -1 )\n {\n $this->key = explode( ':', $key );\n }\n else\n {\n $this->key = [ $key ];\n }\n }\n\n // Default to the entity's name\n } else {\n $this->key = [ $this->name ];\n }\n\n return $this->get_key();\n }", "public function setPrefix($prefix): self\n {\n $this->prefix = is_array($prefix) ? $prefix : [$prefix];\n\n return $this;\n }", "function setPrefix($str)\r\n\t{\r\n\t\t$this->url_prefix = $str;\r\n\t}", "public function setPrefix($prefix)\n {\n $this->prefix = $prefix;\n return $this;\n }", "public function setPrefix($address_prefix)\n\t{\n\t\t$this->address_prefix = trim($address_prefix);\n\t}", "static function set_table_prefix($tp) {\n\t\tself::$table_prefix = $tp;\n\t}", "public function setNamePrefix(string $prefix): self\n {\n $this->namePrefix = $prefix;\n\n return $this;\n }", "public function setPrefix(string $prefix): self\n {\n $this->prefix = $prefix;\n return $this;\n }", "public function setApiKeyPrefix($apiKeyIdentifier, $prefix)\n {\n $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix;\n return $this;\n }", "public function setApiKeyPrefix($apiKeyIdentifier, $prefix)\n {\n $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix;\n return $this;\n }", "public function setTablePrefix(string $prefix)\n {\n $this->tablePrefix = $prefix;\n\n return $this;\n }", "public function setPrefix(string $prefix = null)\n {\n $this->prefix = $prefix;\n return $this;\n }", "private function prefixValue(&$key)\n {\n $key = $this->prefix.$key;\n }", "public static function setFilePrefix($filePrefix) {}", "public function test_updatePrefix()\n\t{\n\t}", "public function setPrefix($prefix)\n {\n if (! is_string($prefix)) {\n throw new Exception\\InvalidArgumentException(sprintf(\n '%s expects \"prefix\" to be string; received \"%s\"',\n __METHOD__,\n is_object($prefix) ? get_class($prefix) : gettype($prefix)\n ));\n }\n\n $this->options['prefix'] = $prefix;\n\n return $this;\n }", "private function _setPrefixDir($prefixdir)\n {\n $this->_prefixDir = $prefixdir;\n }", "public function setPrefix(string $prefix): self\n {\n $this->prefix = $prefix;\n\n return $this;\n }", "private function setStagingPrefix()\n {\n // Get & find a new prefix that does not already exist in database.\n // Loop through up to 1000 different possible prefixes should be enough here;)\n for ($i = 0; $i <= 10000; $i++) {\n $this->options->prefix = isset($this->options->existingClones) ?\n 'wpstg' . (count($this->options->existingClones) + $i) . '_' :\n 'wpstg' . $i . '_';\n\n $sql = \"SHOW TABLE STATUS LIKE '{$this->options->prefix}%'\";\n $tables = $this->db->get_results($sql);\n\n // Prefix does not exist. We can use it\n if (!$tables) {\n return $this->options->prefix;\n }\n }\n $this->returnException(\"Fatal Error: Can not create staging prefix. '{$this->options->prefix}' already exists! Stopping for security reasons. Contact support@wp-staging.com\");\n wp_die(\"Fatal Error: Can not create staging prefix. Prefix '{$this->options->prefix}' already exists! Stopping for security reasons. Contact support@wp-staging.com\");\n }", "public static function setProcessPrefix($prefix)\n\t{\n\t\tself::$processPrefix = $prefix;\n\t}", "public function setPrefix($prefix)\n\t{\n\t\t$this->prefix = $prefix;\n\t\t\n\t\treturn $this;\n\t}", "public function setRoutePrefix($prefix)\n {\n if (Str::startsWith($prefix, Lit::url(''))) {\n $prefix = Str::replaceFirst(Lit::url(''), '', $prefix);\n }\n\n $this->routePrefix = $prefix;\n }", "public function setPathPrefix($prefix)\n {\n $prefix = ltrim($prefix, '/');\n\n return parent::setPathPrefix($prefix);\n }", "public function setPricePrefix($var)\n {\n GPBUtil::checkString($var, True);\n $this->price_prefix = $var;\n\n return $this;\n }", "public function setColumnPrefix($solumnPrefix);", "public function tablePrefix( $prefix = null ) {\n\t\treturn wfSetVar( $this->mTablePrefix, $prefix );\n\t}", "public static function setPlaceholderPrefix($prefix)\r\n {\r\n self::addPlaceholderClassPrefix($prefix);\r\n }", "public function setXpathPrefix($prefix)\n {\n $this->xpathPrefix = $prefix;\n }", "public function setObjectDataPrefix($dataPrefix = false)\n\t{\n\t\t$this->_setObjectDataPrefix($dataPrefix);\n\t}", "public function setPathPrefix($prefix)\n {\n $prefix = (string) $prefix;\n\n if ($prefix === '') {\n $this->pathPrefix = null;\n return;\n }\n\n $this->pathPrefix = rtrim($prefix, '\\\\/') . $this->pathSeparator;\n }", "protected function updateBaseTablePrefix()\n {\n //Do nothing since this is the single-site class\n }", "public function table_prefix($prefix) {\r\n\t\t$this->_prefix = $prefix;\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "function setUserTablePrefix($prefix=\"shared\") {\n\t\t$this->_db_user = $prefix . \"_sessions\"; \n\t}", "public function getPrefixKey()\n {\n return $this->getNamespace();\n }", "private function setPrefix($prefix)\n {\n $this->metas->setPrefix($prefix);\n\n return $this;\n }", "public function setTargetPrefix(?string $value): void {\n $this->getBackingStore()->set('targetPrefix', $value);\n }", "public function setPrefix($prefix): self\n {\n $this->prefix = $prefix;\n\n return $this;\n }", "public function set_dbprefix($prefix = '')\n\t{\n\t\treturn $this->dbprefix = $prefix;\n\t}", "public function set(string $prefix, string $key, int $data): void;", "public function makeKey($tag, $prefix = null)\n {\n return ($prefix ? $prefix : $this->getSlug()).'_'.$tag;\n }", "public static function keyPrefix()\n {\n return Inflector::camel2id(StringHelper::basename(get_called_class()), '_');\n }", "public function prefix($prefix = null)\n {\n if ($prefix === null) {\n return $this->_prefix;\n }\n return $this->_prefix = $prefix;\n }", "public function setPrefix(?string $value = null): self\n {\n throw_if(is_string($value) && strlen(trim($value)) == 0, RuntimeException::class,\n 'Cannot use empty string as prefix.');\n\n $this->prefixCache = is_string($value) && $this->isVersioning() ?\n str_replace('%VERSION%', $this->getVersionForPrefix(), $value) :\n $value;\n\n return $this;\n }", "public function test_insertPrefix()\n\t{\n\t}", "public function setProducts_attributes_weight_prefix( $products_attributes_weight_prefix ) {\n\t\t$this->products_attributes_weight_prefix = $products_attributes_weight_prefix;\n\t}", "public function convertStorageToEntityKey($key);", "protected function getPrefix($entity)\n {\n $entity_class = get_class($entity);\n $metadata = $entity_class::metadata();\n $entity_class = $metadata->name;\n\n $entity_namespace = $entity_class::getModule();\n $module = \\Module::exists($entity_namespace);\n $prefix = $entity->urlPrefix();\n \n if ($module !== false && $entity_namespace != '')\n {\n $module_prefix = \\Arr::get($this->moduleUrls, $entity_namespace, $entity_namespace);\n if (strpos($prefix, '/'.$module_prefix) === 0) return $prefix;\n return \"/$module_prefix\".$prefix;\n }\n \n return $prefix;\n }", "public function setPrefix($value = NULL)\n\t{\n\t\tif (NULL !== $value) {\n\t\t $this->prefix = $value;\n\t\t}\n\t\treturn $this;\n\t}", "protected function getDefaultFieldNamePrefix() {}", "protected function getDefaultFieldNamePrefix() {}" ]
[ "0.69170266", "0.6827639", "0.6752836", "0.6727159", "0.6696086", "0.66696656", "0.6625726", "0.6598669", "0.63972265", "0.63609684", "0.635862", "0.6340957", "0.6340455", "0.62784034", "0.61900604", "0.61900604", "0.61900604", "0.61900604", "0.61900604", "0.61900604", "0.61900604", "0.61900604", "0.61900604", "0.61900604", "0.61900604", "0.61532366", "0.61532366", "0.6152534", "0.6152534", "0.6149955", "0.6093186", "0.6092608", "0.60568607", "0.6056763", "0.6056763", "0.60348225", "0.60017025", "0.5990085", "0.5961345", "0.5923356", "0.590302", "0.5894713", "0.58919144", "0.5834664", "0.58063936", "0.5784972", "0.5776244", "0.5759878", "0.57142484", "0.57088166", "0.56993234", "0.5689137", "0.56889534", "0.5684354", "0.56350696", "0.56295663", "0.5625479", "0.56248724", "0.5603523", "0.5603523", "0.56008", "0.55983186", "0.5585691", "0.55841637", "0.5559644", "0.5555186", "0.55397856", "0.55331", "0.5521407", "0.55001265", "0.54966044", "0.5474737", "0.54641336", "0.5463528", "0.54502726", "0.54440445", "0.5439167", "0.5433223", "0.5431141", "0.543077", "0.5417063", "0.5409599", "0.5398451", "0.53954726", "0.5382687", "0.53797114", "0.5375272", "0.5371571", "0.5367542", "0.5367441", "0.5346768", "0.5343446", "0.5295386", "0.52936715", "0.5286165", "0.5277531", "0.5269647", "0.5266963", "0.5255428", "0.5255428" ]
0.81922144
0
Sets a new entityType
Устанавливает новый тип сущности
public function setEntityType($entityType) { $this->entityType = $entityType; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setType(EntityType $type);", "public function setMappedEntityType($entity_type);", "public function setEntityType($var)\n {\n GPBUtil::checkString($var, True);\n $this->entity_type = $var;\n\n return $this;\n }", "public function getEntityType() {\n return $this->entityType;\n }", "public function setEntityClass($entityClass);", "public function setEntityClass(?string $entityClass);", "public function __construct(EntityTypeManagerInterface $entityType) {\n $this->entityType = $entityType;\n }", "function setEntity($entity_type, $entity_id) {\n $this->checkChange();\n\n // Ignore empty values.\n if (empty($entity_type) || empty($entity_id)) {\n return $this;\n }\n\n $this->entity_type = $entity_type;\n $this->entity_id = $entity_id;\n return $this;\n }", "private function setEntityTypeFromArray(array $input, string $key = 'entity-type'): void\n {\n $this->entityType = is_null($entityType = ArrayAccess::getString($input, $key))\n ? new EntityType()\n : new EntityType($entityType);\n }", "public function getEntityType();", "public function setEntityTypes($types) {\n $this->entity_types = $types;\n }", "public function setType($type) :ISEntity\n {\n array_walk($this->types, function($name, $index) use ($type) {\n if($type === $name){\n $this->type = $index;\n }\n });\n if(is_null($this->type)) {\n if(isset($this->types[$type])) {\n $this->type = $type;\n }\n }\n return $this;\n }", "public function getEntityType(): EntityType\n {\n return $this->entityType;\n }", "protected abstract function initializeEntityType(): string;", "public function __get($entityType)\n {\n return new Entity($this, $entityType);\n }", "public function setEntity($entity) {\n\t\tif ($entity instanceof Orm\\ActiveEntity) {\n\t\t\t$this->_entityInstance = $entity;\n\t\t\tlist($id) = $entity->getMetadata()->getIdFields();\n\t\t\t$this->setEntityId($entity->$id);\n\t\t\t$entity = get_class($entity);\n\t\t} elseif (is_string($entity)) {\n\t\t\tif (!class_exists($entity)) {\n\t\t\t\tthrow new Nette\\InvalidArgumentException(\"Class '$entity' does not exist!\");\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Nette\\InvalidArgumentException('You have to supply either an entity name or its instance!');\n\t\t}\n\t\t//parent::setEntity($entity);\n\t\t$this->defaultSetter('entity', $entity); // Because of PHP<5.3.4\n\t}", "function getEntityType() {\n return $this->entity_type;\n }", "public function setEntityTypeId($entityTypeId) {\n $this->entityTypeId = $entityTypeId;\n }", "public function getEntityType(): string\n {\n return $this->entityType;\n }", "public function setEntity( $entity )\n {\n \n $this->entity = $entity;\n \n }", "public function set($typeId, $class);", "public function getEntityType()\n {\n return $this->entity_type;\n }", "public function getEntityType()\n {\n return $this->entity_type;\n }", "public function setEntity(\\GoetasWebservices\\Client\\SalesforceEnterprise\\Sobject\\ContractType $entity)\n {\n $this->entity = $entity;\n return $this;\n }", "public function getEntityTypeId() {\n return $this->entityType->id();\n }", "public function getEntityType()\n\t{\n\t\treturn $this->entity_type;\n\t}", "public function __construct(EntityTypeManager $entityTypeManager) {\n $this->entityTypeManager = $entityTypeManager;\n }", "public function getEntityType() {\n return $this->datasource()->getEntityType();\n }", "function set_entity($ent){\n $this -> table = $ent;\n }", "public static function getRelatedEntityType(): EntityType\n {\n return new EntityType(EntityType::LABEL);\n }", "abstract protected function getEntityType(): string;", "public function setTypeAttribute($newValue) {\n $type = NodeType::get($newValue);\n $this->attributes['type'] = $type->getValue();\n }", "public function setEntity( $entity )\n {\n\n $this->setEntityWbfsysEntityTag( $entity );\n\n }", "public function updateEntityType($entityTypeId, $request)\n {\n return $this->start()->uri(\"/api/entity/type\")\n ->urlSegment($entityTypeId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->put()\n ->go();\n }", "public function setContentType($type)\n {\n $this->setContentTypeInHeaders($type);\n // Keep track of the value so that if the content-type changes automatically\n // due to added child entities, it can be restored if they are later removed\n $this->userContentType = $type;\n\n return $this;\n }", "public static function getRelatedEntityType(): EntityType\n {\n return new EntityType(EntityType::PLACE);\n }", "public function setModelType($type)\n {\n $this->modelType = $type;\n }", "public function setEntityTypeFilter($typeId)\n {\n return $this;\n }", "public function restoreEntityType() {\n $nid = $this->og_controller->og_node->nid;\n $path = \"private://dumper/restore.{$nid}/private://dumper/{$nid}/{$this->entity_type}\";\n foreach (file_scan_directory($path, '/\\.json/') as $file) {\n $this->restoreEntity($file->name);\n }\n }", "public function onEntityTypeEvent(EntityTypeEvent $event, $event_name) {\n switch ($event_name) {\n case EntityTypeEvents::CREATE:\n $this->onEntityTypeCreate($event->getEntityType());\n break;\n\n case EntityTypeEvents::UPDATE:\n $this->onEntityTypeUpdate($event->getEntityType(), $event->getOriginal());\n break;\n\n case EntityTypeEvents::DELETE:\n $this->onEntityTypeDelete($event->getEntityType());\n break;\n }\n }", "public function setEntity($entityClass)\n {\n $entityClass = $this->str($entityClass);\n if ($entityClass->contains('.')) {\n $parts = $entityClass->explode('.');\n $entityClass = '\\\\WebinyPlatform\\\\Apps\\\\' . $parts[0] . '\\\\Components\\\\' . $parts[1] . '\\\\Entities\\\\' . $parts[2];\n }\n $this->entityClass = StdObjectWrapper::toString($entityClass);\n\n return $this;\n }", "function setTaxonomyType($setTaxType) {\n $this->taxonomyType = $setTaxType;\n }", "public function createEntityType($entityTypeId, $request)\n {\n return $this->start()->uri(\"/api/entity/type\")\n ->urlSegment($entityTypeId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public static function getRelatedEntityType(): EntityType\n {\n return new EntityType(EntityType::URL);\n }", "public function setEntity(MEntityDescription $entity) {\n\t\t\t$this->entity = $entity;\n\t\t}", "public function setModelType($modelType)\n {\n if ($modelType !== self::MODELTYPE_ENTITY && $modelType !== self::MODELTYPE_VALUEOBJECT) {\n throw new \\InvalidArgumentException('\"' . $modelType . '\" is an invalid model type.', 1212519195);\n }\n $this->modelType = $modelType;\n if ($modelType === self::MODELTYPE_VALUEOBJECT) {\n $this->identityProperties = [];\n $this->repositoryClassName = null;\n }\n }", "protected function getForm_Type_EntityService()\n {\n return $this->services['form.type.entity'] = new \\Symfony\\Bridge\\Doctrine\\Form\\Type\\EntityType($this->get('doctrine'));\n }", "public function getMappedEntityType();", "public function loadByEntityType($object, $entityId, $entityType, $storeId)\n {\n $connection = $this->getConnection();\n\n $select = $connection->select()->from(\n ['t_def' => $this->getMainTable()],\n ['entity_id', 'entity_type', 'experiment_script', 'code_id']\n )->where(\n 't_def.entity_id=?',\n $entityId\n )->where(\n 't_def.entity_type=?',\n $entityType\n )->where(\n 't_def.store_id IN (0, ?)',\n $storeId\n )->order(\n 't_def.store_id DESC'\n )->limit(\n 1\n );\n\n $data = $connection->fetchRow($select);\n\n if ($data) {\n $object->setData($data);\n }\n $this->_afterLoad($object);\n return $this;\n }", "public function testSetEntity()\n {\n $this->testObject->setEntity('abc');\n\n $this->assertEquals('dev_abc', $this->testObject->getEntity());\n }", "public function getType(): EntityType;", "protected function setForm(&$form) {\n if (is_array($form) && isset($form['#entity'])) {\n $this->form =& $form;\n $this->entity =& $form['#entity'];\n $this->type = \"{$this->entity->type}_entity_form\";\n }\n elseif (is_object($form) && $form instanceof Entity) {\n $entity =& $form;\n $type = $entity->type;\n $bundle = $type;\n $form_id = \"eck__entity__form__add_{$type}_{$bundle}\";\n\n $this->form = drupal_get_form($form_id, $entity);\n $this->entity =& $entity;\n $this->type = \"{$type}_entity_form\";\n }\n else {\n $this->form =& $form;\n $this->type = 'non_entity_form';\n }\n }", "abstract protected function getEntitySetWithDefaults();", "public function getEntityTypeManagerMock(){\n $manager = $this->prophet->prophesize('Drupal\\Core\\Entity\\EntityTypeManagerInterface');\n $storage = $this->getStorageMock()->reveal();\n try {\n $manager->getStorage(Argument::type('string'))->willReturn($storage);\n } catch (InvalidPluginDefinitionException $e) {\n } catch (PluginNotFoundException $e) {\n }\n return $manager;\n }", "public function __construct(EntityTypeManagerInterface $entity_type_manager) {\n $this->entityTypeManager = $entity_type_manager;\n $this->entityTypeStorage = $this->entityTypeManager->getStorage('condition_rulesets');\n }", "abstract public function getEntityTypeID();", "protected function setContentType()\n {\n $this->content_type = 'Page';\n }", "final public static function getRelatedEntityType(): EntityType\n {\n return new EntityType(EntityType::URL);\n }", "function setInitiateType( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->InitiateType = $value;\n }", "public function setEntity( $entity )\n {\n\n $this->entity = $entity;\n $this->rowid = $entity->getId();\n \n }", "public function getEntityType()\n {\n if (empty($this->_type)) {\n $this->setType(\\OuterEdge\\Layout\\Model\\Element::ENTITY);\n }\n \n return parent::getEntityType();\n }", "public function __construct(EntityTypeManager $type_manager) {\n $this->typeManager = $type_manager;\n }", "public function create(string $entityType, array $options = [\n 'label' => InputOption::VALUE_REQUIRED,\n 'machine-name' => InputOption::VALUE_REQUIRED,\n 'description' => InputOption::VALUE_OPTIONAL,\n 'show-machine-names' => InputOption::VALUE_OPTIONAL,\n ]): void\n {\n $definition = $this->entityTypeManager->getDefinition(sprintf('%s_type', $entityType));\n $storage = $this->entityTypeManager->getStorage(sprintf('%s_type', $entityType));\n\n $values = [\n 'status' => true,\n $definition->getKey('id') => $this->input()->getOption('machine-name'),\n $definition->getKey('label') => $this->input()->getOption('label'),\n 'description' => $this->input()->getOption('description') ?? '',\n 'entity_type' => $entityType,\n ];\n\n // Command files may customize $values as desired.\n $handlers = $this->getCustomEventHandlers('eck-bundle-create');\n foreach ($handlers as $handler) {\n $handler($values);\n }\n\n $bundle = $storage->create($values);\n $bundle->save();\n\n $this->entityTypeManager->clearCachedDefinitions();\n $this->logResult($bundle);\n }", "public function setType(TM_Attribute_AttributeType $value)\n {\n $this->_type = $value;\n }", "function entity_class($entityTypeKey)\n {\n if ($entityTypeClass = config('app.entity_types')[$entityTypeKey] ?? null) {\n return $entityTypeClass;\n }\n throw new \\Illuminate\\Database\\Eloquent\\ModelNotFoundException();\n }", "public function setEntityDefinition(\\GoetasWebservices\\Client\\SalesforceEnterprise\\Sobject\\EntityDefinitionType $entityDefinition)\n {\n $this->entityDefinition = $entityDefinition;\n return $this;\n }", "public function setEntity(/*\\MU\\ImageModule\\Entity\\AlbumEntity */$entity)\n {\n $this->entity = $entity;\n }", "public function setType($t){\n $this->type = $t;\n }", "public function _setEntity($current, $new){\n trigger_error('Setting entity is not allowed', E_USER_ERROR);\n }", "public function getEntityClass();", "protected function setInferredClassName()\n\t{\n\t\t$singularize = ($this instanceOf HasMany ? true : false);\n\t\t$this->setClassName(\\ChickenTools\\Str::classify($this->attributeName, $singularize));\n\t}", "public function getEntityTypeId() {\n return $this->entityTypeId;\n }", "public function getEntityTypeId();", "public function setRoleEntityClass($className);", "public function setType($type){ }", "public function patchEntityType($entityTypeId, $request)\n {\n return $this->start()->uri(\"/api/entity/type\")\n ->urlSegment($entityTypeId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->patch()\n ->go();\n }", "function setType($type) {\n $this->type = $type;\n }", "public function getMappingEntityType();", "public function testNewEntityType(): void {\n\n $res = FormFactory::newEntityType(NavigationNode::class, $this->entities);\n $this->assertCount(3, $res);\n $this->assertArrayHasKey(\"class\", $res);\n $this->assertArrayHasKey(\"choice_label\", $res);\n $this->assertArrayHasKey(\"choices\", $res);\n\n $this->assertEquals(NavigationNode::class, $res[\"class\"]);\n\n $this->assertCount(3, $res[\"choices\"]);\n $this->assertSame($this->entities[0], $res[\"choices\"][0]);\n $this->assertSame($this->entities[1], $res[\"choices\"][1]);\n $this->assertSame($this->entities[2], $res[\"choices\"][2]);\n\n $this->assertIsCallable($res[\"choice_label\"]);\n $this->assertEquals(\"─ This option must implements [Translated]ChoiceLabelInterface\", $res[\"choice_label\"]($res[\"choices\"][0]));\n $this->assertEquals(\"─ This option must implements [Translated]ChoiceLabelInterface\", $res[\"choice_label\"]($res[\"choices\"][1]));\n $this->assertEquals(\"─ This option must implements [Translated]ChoiceLabelInterface\", $res[\"choice_label\"]($res[\"choices\"][2]));\n }", "abstract protected function getEntityClass();", "public function setClass($class);", "public function setEntity($entity)\r\n {\r\n $this->entity = $entity;\r\n\r\n return $this;\r\n }", "public function __construct(EntityTypeManagerInterface $entity_type_manager) {\n $this->entityTypeManager = $entity_type_manager;\n }", "public function __construct(EntityTypeManagerInterface $entity_type_manager) {\n $this->entityTypeManager = $entity_type_manager;\n }", "public function __construct(EntityTypeManagerInterface $entity_type_manager) {\n $this->entityTypeManager = $entity_type_manager;\n }", "public function __construct(EntityTypeManagerInterface $entity_type_manager) {\n $this->entityTypeManager = $entity_type_manager;\n }", "public function __construct(EntityTypeManagerInterface $entity_type_manager) {\n $this->entityTypeManager = $entity_type_manager;\n }", "public function getExtendedType()\n {\n return EntityType::class;\n }", "public function setTyp( $type );", "function nestedbox_core_entity_info_alter(array &$entity_info) {\n foreach (nestedbox_get_types() as $type => $info) {\n $entity_info['nestedbox']['bundles'][$type] = array(\n 'label' => $info->label,\n 'admin' => array(\n /* @see nestedbox_type_load() */\n 'path' => 'admin/structure/nestedbox-types/manage/%nestedbox_type',\n 'real path' => 'admin/structure/nestedbox-types/manage/' . $type,\n 'bundle argument' => 4,\n 'access arguments' => array('administer nestedbox types'),\n ),\n );\n }\n}", "public function hasEntityType() {\n return $this->_has(6);\n }", "private function createEntityClassParameter()\n {\n $id = $this->getServiceId('class');\n if (!$this->container->hasParameter($id)) {\n $this->container->setParameter($id, $this->options['entity']);\n }\n\n $this->configureInheritanceMapping(\n $this->prefix.'.'.$this->resourceName,\n $this->options['entity'],\n $this->options['repository']\n );\n }", "public function set_type( $type ) {\n\t\t$this->set_prop( 'type', sanitize_title( $type ) ) ;\n\t}", "public function setTypeIdAttribute($input)\n {\n $this->attributes['type_id'] = $input ? $input : null;\n }", "public function getEntityType(): ?string;", "function _mongo_node_update_type($old_entity_type, $entity_type) {\n // Update collection names.\n _mongo_node_rename_collection($old_entity_type, $entity_type);\n\n // Update bundle name in mongo entities.\n $collection = mongodb_collection('fields_current', $entity_type);\n $result = $collection->update(\n array('_type' => $old_entity_type),\n array('$set' => array('_type' => $entity_type, 'type' => $entity_type))\n );\n}", "public static function convertToEntityClass(\n ValueNormalizer $valueNormalizer,\n string $entityType,\n RequestType $requestType\n ): string {\n return $valueNormalizer->normalizeValue($entityType, DataType::ENTITY_CLASS, $requestType);\n }", "function setObjtype($objtype) {\n $this->objtype = $objtype;\n }", "public function hasEntityType() {\n return $this->_has(5);\n }", "public function __construct(SqlEntityType $sqlEntityType)\n\t\t{\n\t\t\t$this->sqlEntityType = $sqlEntityType;\n\t\t}" ]
[ "0.7705399", "0.6784407", "0.64521676", "0.631977", "0.63128513", "0.62907165", "0.6183195", "0.61203974", "0.60822463", "0.6041833", "0.6012842", "0.5932546", "0.59062904", "0.58379114", "0.58357686", "0.58011335", "0.5795091", "0.5764072", "0.5761457", "0.57495964", "0.5670604", "0.5669103", "0.5669103", "0.56440544", "0.56137574", "0.5608982", "0.54829025", "0.53994614", "0.53627163", "0.53599346", "0.5358785", "0.5357981", "0.53519636", "0.5294591", "0.52580136", "0.52570236", "0.5255362", "0.5248851", "0.52460104", "0.52349377", "0.52295727", "0.52241594", "0.52235496", "0.51943487", "0.5191562", "0.5178268", "0.51781136", "0.51536596", "0.51038814", "0.5067853", "0.50660795", "0.5065251", "0.5059125", "0.5056296", "0.50557584", "0.50458646", "0.5023517", "0.4987433", "0.4983105", "0.49761182", "0.49747172", "0.49556303", "0.49554023", "0.4954798", "0.49414602", "0.493446", "0.4931577", "0.49271563", "0.49250108", "0.49230877", "0.49229607", "0.49090594", "0.49038827", "0.4901963", "0.489277", "0.48871124", "0.48766315", "0.48750678", "0.4874121", "0.48737493", "0.48722443", "0.48721212", "0.48713768", "0.48713768", "0.48713768", "0.48713768", "0.48713768", "0.48628667", "0.48536238", "0.48513427", "0.48408124", "0.48378044", "0.4831491", "0.4826116", "0.48213875", "0.48203108", "0.48189375", "0.48183712", "0.48150393", "0.48136726" ]
0.7270525
1
Update membership end date when subscription expiration date is changed
Обновите дату окончания членства при изменении даты окончания подписки
public function update_membership_end_date( $is_set, $expiration_date, $subscription_key ) { $user_memberships = $this->get_memberships_from_subscription( $subscription_key ); if ( ! $user_memberships ) { return; } foreach ( $user_memberships as $user_membership ) { $plan_id = $user_membership->get_plan_id(); if ( $plan_id && $this->plan_grants_access_while_subscription_active( $plan_id ) ) { $end_date = $expiration_date ? date( 'Y-m-d H:i:s', $expiration_date ) : ''; $user_membership->set_end_date( $end_date ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renewMembership(&$user){\n\t\t$dateEnd = $user->getSetting('dateEndMembership', 0);\n\t\tif (!$dateEnd) $dateEnd = 0;\n\t\t\n\t\t// if the membership is expired, extend it to today + 1 year\n\t\t$time = time();\n\t\tif ($dateEnd < $time ) $dateEnd = $time;\n\n\t\t$dateEnd = mktime(23, 59, 59, date(\"m\", $dateEnd), date(\"d\", $dateEnd), date(\"Y\", $dateEnd)+1);\n\t\t$user->updateSetting('dateEndMembership', $dateEnd, 'date', 0);\n\t}", "function _renewSubscription(&$subscription) {\n\t\tif ($subscription->isNonExpiring()) return;\n\n\t\t$subscriptionTypeDao =& DAORegistry::getDAO('SubscriptionTypeDAO');\n\t\t$subscriptionType =& $subscriptionTypeDao->getSubscriptionType($subscription->getTypeId());\n\n\t\t$duration = $subscriptionType->getDuration();\n\t\t$dateEnd = strtotime($subscription->getDateEnd());\n\n\t\t// if the subscription is expired, extend it to today + duration of subscription\n\t\t$time = time();\n\t\tif ($dateEnd < $time ) $dateEnd = $time;\n\n\t\t$subscription->setDateEnd(mktime(23, 59, 59, date(\"m\", $dateEnd)+$duration, date(\"d\", $dateEnd), date(\"Y\", $dateEnd)));\n\n\t\t// Reset reminder dates\n\t\t$subscription->setDateRemindedBefore(null);\n\t\t$subscription->setDateRemindedAfter(null);\n\n\t\t$this->updateSubscription($subscription);\n\t}", "private function _retrieveEndDate()\n {\n global $preferences;\n\n $bdate = new \\DateTime($this->_begin_date);\n if ( $preferences->pref_beg_membership != '' ) {\n //case beginning of membership\n list($j, $m) = explode('/', $preferences->pref_beg_membership);\n $edate = new \\DateTime($bdate->format('Y') . '-' . $m . '-' . $j);\n while ( $edate <= $bdate ) {\n $edate->modify('+1 year');\n }\n $this->_end_date = $edate->format('Y-m-d');\n } else if ( $preferences->pref_membership_ext != '' ) {\n //case membership extension\n $dext = new \\DateInterval('P' . $this->_extension . 'M');\n $edate = $bdate->add($dext);\n $this->_end_date = $edate->format('Y-m-d');\n }\n }", "function e20r_extend_enddate_by_duration( $enddate, $user_id, $level_obj, $startdate ) {\n\n //does this level expire? \n\tif(!empty($level_obj) && !empty($level_obj->expiration_number) )\n\t{\n\t\t//get the current enddate of their membership\n\t\t$membership_level = pmpro_getMembershipLevelForUser($user_id);\n\t\t$expiration_date = $membership_level->enddate;\n\t\t\n\t\t//calculate days left\n\t\t$todays_date = current_time('timestamp');\n\t\t$time_left = $expiration_date - $todays_date;\n\t\t\n\t\t//time left?\n\t\tif($time_left > 0)\n\t\t{\n\t\t\t//convert to days and add to the expiration date (assumes expiration was 1 year)\n\t\t\t$days_left = floor($time_left/(60*60*24));\n\t\t\t\n\t\t\t//figure out days based on period\n\t\t\tif($level_obj->expiration_period == \"Day\")\n\t\t\t\t$total_days = $days_left + $level_obj->expiration_number;\n\t\t\telseif($level_obj->expiration_period == \"Week\")\n\t\t\t\t$total_days = $days_left + $level_obj->expiration_number * 7;\n\t\t\telseif($level_obj->expiration_period == \"Month\")\n\t\t\t\t$total_days = $days_left + $level_obj->expiration_number * 30;\n\t\t\telseif($level_obj->expiration_period == \"Year\")\n\t\t\t\t$total_days = $days_left + $level_obj->expiration_number * 365;\n\t\t\t\n\t\t\t//update the end date\n\t\t\t$enddate = date(\"Y-m-d\", strtotime(\"+ $total_days Days\", $todays_date));\n\t\t}\n\t}\n\t\t\n\treturn $enddate;\n\n }", "function updateSubscriptionEndDate($subscription_start_date, $timePeriodForService) {\n $subscriptionEndDate = '';\n if ($timePeriodForService == \"1 Month\") {\n $timePeriod = \"1 month\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n } elseif ($timePeriodForService == \"3 months\" || $timePeriodForService == \"3 Months\"){ // Added as per discussion with Faizan CCP-5379\n $timePeriod = \"3 months\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n } elseif ($timePeriodForService == \"1 Year\" || ($timePeriodForService == '' || $timePeriodForService == null)) {\n $timePeriod = \"365 day\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n } elseif ($timePeriodForService == \"2 Years\") {\n $timePeriod = \"730 day\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n } elseif ($timePeriodForService == \"3 Years\") {\n $timePeriod = \"1095 day\";\n $subscriptionEndDate = date('Y-m-d',strtotime($subscription_start_date . \" + \". $timePeriod));\n }\n\n return $subscriptionEndDate;\n }", "function caculateUserMembershipEndDate($user_id)\n\t{\n\t\t//get user membership data\n\t\t$sql=\"SELECT B.timeline, A.purchase_date FROM \".$this->table.\" AS A\";\n\t\t$sql.=\" LEFT JOIN membership_level AS B ON B.id=A.membership_id\";\n\t\t$sql.=\" WHERE A.user_id=\".$user_id;\n\t\t\n\t\t$result=$this->db->query($sql);\n\t\t$user_data=$result->row();\n\n\t\t$start = date_timestamp_get(date_create($user_data->purchase_date));\n\t\t$end = $start + (3600*24*$user_data->timeline);\n\n\t\treturn date('Y-m-d', $end);\n\t}", "public function setEndDate(DrupalDateTime $end_date = NULL);", "protected function _actionEditsubscription( KCommandContext $context )\n {\n if( $subscription = $this->_subscriber->changeSubscriptionTo( $this->getItem() ) )\n {\n $subscription->endDate = $context->data->endDate;\n }\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 markAsExpired()\n {\n // Set subscription to end on next billing date\n $this->trialEndsAt = $this->trialEndsAt ? : $this->nextBillingDate;\n $this->endsAt = $this->nextBillingDate;\n\n return $this->save();\n }", "public function setNewSubscriptionExpireDate(int $userSubscriptionId, int $expiresAt);", "public function filter_rcp_member_renewal_expiration( $expiration, $subscription, $user_id ) {\n\t\t$base_date = current_time( 'timestamp' );\n\n\t\tif( $subscription->duration > 0 ) {\n\n\t\t\t$last_day = cal_days_in_month( CAL_GREGORIAN, date( 'n', $base_date ), date( 'Y', $base_date ) );\n\t\t\t$expiration = date( 'Y-m-d H:i:s', strtotime( '+' . $subscription->duration . ' ' . $subscription->duration_unit . ' 23:59:59', $base_date ) );\n\n\t\t\tif( date( 'j', $base_date ) == $last_day && 'day' != $subscription->duration_unit ) {\n\t\t\t\t$expiration = date( 'Y-m-d H:i:s', strtotime( $expiration . ' +2 days' ) );\n\t\t\t}\n\n\t\t} else {\n\t\t\t$expiration = 'none';\n\t\t}\n\n\t\treturn $expiration;\n\t}", "function acadp_listing_expiry_date( $post_id, $start_date = NULL ) {\n\n\t// Get number of days to add\n\t$general_settings = get_option( 'acadp_general_settings' );\n\t$days = apply_filters( 'acadp_listing_duration', $general_settings['listing_duration'], $post_id );\n\n\tif( $days <= 0 ) {\n\t\tupdate_post_meta( $post_id, 'never_expires', 1 );\n\t\t$days = 999;\n\t} else {\n\t\tdelete_post_meta( $post_id, 'never_expires' );\n\t}\n\n\tif( $start_date == NULL ) {\n\t\t// Current time\n\t\t$start_date = current_time( 'mysql' );\n\t}\n\n\t// Calculate new date\n\t$date = new DateTime( $start_date );\n\t$date->add( new DateInterval( \"P{$days}D\" ) );\n\n\t// return\n\treturn $date->format( 'Y-m-d H:i:s' );\n\n}", "private function _updateDeadline()\n {\n global $zdb;\n\n try {\n $due_date = self::getDueDate($this->_member);\n\n if ( $due_date != '' ) {\n $date_fin_update = $due_date;\n } else {\n $date_fin_update = new Expression('NULL');\n }\n\n $update = $zdb->update(Adherent::TABLE);\n $update->set(\n array('date_echeance' => $date_fin_update)\n )->where(\n Adherent::PK . '=' . $this->_member\n );\n $zdb->execute($update);\n return true;\n } catch (\\Exception $e) {\n Analog::log(\n 'An error occured updating member ' . $this->_member .\n '\\'s deadline |' .\n $e->getMessage(),\n Analog::ERROR\n );\n return false;\n }\n }", "public function getExpirationDate();", "public function setDateEnd($dateEnd)\n {\n $this->dateEnd = VT::toDateTimeImmutable($dateEnd);\n }", "public function membershipAction()\n {\n $common = $this->getServiceLocator()->get('Application\\Model\\Common');\n $api_url = $this->getServiceLocator()->get('config')['api_url']['value'];\n $data = array('status_id' => 1, 'subscription_end_date' => date('Y-m-d', strtotime('+2 days'))); // 2days before subscription end\n $results = $common->subscriptionData($api_url, $data);\n if (count($results) > 0) {\n foreach ($results as $detail) {\n // Start :- Auto renew subscription\n if ($detail['auto_renewal'] == '1') {\n $this->autorenewcodeAction($api_url,$common,$detail);\n // End :- Auto renew subscription\n } \n }\n }\n die;\n }", "function setEndDate($classId, $end) {\r\n $data['classEndDate'] = $end;\r\n $this->db->where('id', $classId);\r\n $this->db->update('class', $data);\r\n }", "function setEndDate($end_date = \"\") \n\t{\n\t\t$this->end_date = $end_date;\n\t}", "function releasePurchase($postdata) {\n \t \t\n \t$now = mktime();\n \t\n \t$sql = \"\n \t\tUPDATE \n \t\t\topm_products_accounts\n \t\tSET\n \t\t\tenddate = $now\n \t\twhere\n \t\t\tid = \" . intval($postdata['id']);\n \t\n \tif ($query = $this->db->query($sql)) {\n \t\t\n \t\tif ($this->db->affected_rows() == 1) {\n \t\t\t\n \t\t\treturn $now;\n \t\t\n \t\t}\n \t\n \t}\n \t\n \treturn false;\n \n }", "public function getExpirationDate()\n {\n return $this->user_expiration;\n }", "public function setEndDate($value)\n {\n $this->endDate = $value;\n }", "public function setExpirationDate(?Date $value): void {\n $this->getBackingStore()->set('expirationDate', $value);\n }", "public function away_mode_end_date() {\n\n\t\t$current = current_time( 'timestamp' ); //The current time\n\n\t\t//if saved date is in the past update it to something in the future\n\t\tif ( isset( $this->settings['end'] ) && isset( $this->settings['enabled'] ) && $current < $this->settings['end'] ) {\n\t\t\t$end = $this->settings['end'];\n\t\t} else {\n\t\t\t$end = strtotime( date( 'n/j/y 12:00 \\a\\m', ( current_time( 'timestamp' ) + ( 86400 * 2 ) ) ) );\n\t\t}\n\n\t\t//Date Field\n\t\t$content = '<input class=\"end_date_field\" type=\"text\" id=\"itsec_away_mode_end_date\" name=\"itsec_away_mode[away_end][date]\" value=\"' . date( 'm/d/y', $end ) . '\"/><br>';\n\t\t$content .= '<label class=\"end_date_field\" for=\"itsec_away_mode_end_date\"> ' . __( 'Set the date at which the admin dashboard should become available', 'it-l10n-ithemes-security-pro' ) . '</label>';\n\n\t\techo $content;\n\n\t}", "public function setExpirationDate(int $expiration_date);", "public function setEndDate(string $date);", "function _sf_set_spot_expiry_date($post) {\n\t\t\n\t\t///// FIRSTLY LET'S ADD A METABOX FOR OUR EXPIRY DATE\n\t\t$exp_date = time() + (ddp('submission_days') * (60*60*24));\n\t\t\n\t\t$midnight_time = $exp_date;\n\t\t\n\t\tupdate_post_meta($post->ID, 'expiry_date', $midnight_time);\n\t\t\n\t\t///// SETS UP OUR CRON JOB\n\t\twp_schedule_single_event($midnight_time, 'expire_spot_submission', array($post->ID, $post->post_title, $post->post_author, ''.$midnight_time.''));\n\t\t\n\t}", "public function endMaintenancePeriod() : void\n {\n $this->getHesAdminDb()->update('\n UPDATE maintenance_periods SET end_time = now() WHERE end_time IS NULL\n ');\n }", "private function setExpiryDate(Session $session, \\DateInterval $dateInterval)\n {\n if (is_null($session->getSubscribeExpireDate())) {\n /** @var \\DateTime */\n $examDate = $session->getDatetime();\n $expiryDate = (clone $examDate)->sub($dateInterval);\n $session->setSubscribeExpireDate($expiryDate);\n }\n }", "function setExpireDate($ed) {\n\t\tif ($ed) {\n\t\t\t$newtime = dateTimeConvert($ed);\n\t\t\tif ($newtime === false) return;\n\t\t\t$this->set('expiredate', $newtime);\n\t\t} else {\n\t\t\t$this->set('expiredate', NULL);\n\t\t}\n\t}", "public function setEndDate($date)\n\t\t{\n\t\t\t$this->end_date = $date;\n\t\t}", "public function setEndDate($endDate) {\n $this->endDate = $endDate;\n }", "public function extendAccessPeriod($newExpire)\n {\n // get last expiration date\n $expire = $this->getAccessExpire();\n // we will be updating only records with this expiration date\n // because all other records are already expired and we will\n // not touch it\n $count = 0;\n foreach ($this->getAccessRecords() as $accessRecord) {\n if ($accessRecord->expire_date != $expire)\n continue;\n $accessRecord->setDisableHooks(true);\n $accessRecord->expire_date = $newExpire;\n $accessRecord->update();\n $accessRecord->setDisableHooks(false);\n $count++;\n }\n if ($count)\n $this->getDi()->userTable->load($this->user_id)->checkSubscriptions(true);\n }", "public function setEndDate($end_date)\n {\n $this->json()->end_date = $this->dateToString($end_date);\n }", "public function updateSession($session_id,$extension,$end_date) {\n this->$end_date = date('Y-m-d', strtotime($end_date. \" + {$extension} days \"));\n this->$next_session_id = ($session_id + 1) % 3 ; //ginete me mod3 i praksi dioti ta id ton session ine 3 kai otan to session_id einai 3 theloume na pigenei apo tin arxi\n $query = \"UPDATE sessions SET end_date = '$end_date' WHERE session_id = '$session_id'\";\n mysqli_query($db, $query);\n $query = \"UPDATE sessions SET start_date = '$end_date' WHERE session_id = '$next_session_id'\";\n mysqli_query($db, $query);\n die();\n }", "function SetAExpire($TL, $sToken, $uid){\n if((checkUsrPermissions($sToken) == \"ar\") | (checkUsrPermissions($sToken) == \"an\")){\n if(chkUsrExist((int)$uid)){\n $ex = GetExp($TL);\n if($ex == \"Err :: Select One Of This : [1h,12h,1d,1w,2w,1m,3m,1y,3y,5y,lifetime]\"){\n return \"Err :: Check TimeLimit\";\n }else{\n $_SESSION['db']->prepare(\"UPDATE users SET `expire-date`=:ex WHERE id=:id\")->execute(['id' => $uid,'ex' => $ex]);\n $_SESSION['db']->prepare(\"UPDATE users SET `Subscription-create-date`=:cd WHERE id=:id\")->execute(['id' => $uid,'cd' => gmdate('Y-m-d h:i:s')]);\n return \"done\"; \n }\n }else{\n return \"UserID Not Exist !!\";\n } \n }else{\n return \"Err :: May u are not admin !\";\n }\n}", "function setEndDate(&$oDate)\n {\n if (is_a($oDate, 'date')) {\n $oDate->setHour(23);\n $oDate->setMinute(59);\n $oDate->setSecond(59);\n $oDate->subtractSeconds(25200);\n }\n }", "public function setEndDate(?Date $value): void {\n $this->getBackingStore()->set('endDate', $value);\n }", "public function setEndDate(?Carbon $endDate): RecurringConfig\n {\n $this->endDate = $endDate;\n\n return $this;\n }", "public function expiryDate();", "function updateMemberExpiryDate($userId, $date) {\r\n $sql = $this->db->prepare(\"UPDATE USER SET expiry=:expiry_date WHERE UserID=:user_id\");\r\n if($sql->execute(array(\r\n 'user_id' => $userId,\r\n 'expiry_date' => $date\r\n )))\r\n return true;\r\n else {\r\n return false;\r\n }\r\n }", "public function setExpirationDateTime($val)\n {\n $this->_propDict[\"expirationDateTime\"] = $val;\n return $this;\n }", "public function setExpirationDateTime($val)\n {\n $this->_propDict[\"expirationDateTime\"] = $val;\n return $this;\n }", "function roomify_conversations_add_end_date_field() {\n field_info_cache_clear();\n\n // \"conversation_book_end_date\" field.\n if (field_read_field('conversation_book_end_date') === FALSE) {\n $field = array(\n 'field_name' => 'conversation_book_end_date',\n 'type' => 'datetime',\n 'cardinality' => 1,\n 'locked' => 1,\n 'settings' => array(\n 'cache_count' => 4,\n 'cache_enabled' => 0,\n 'granularity' => array(\n 'day' => 'day',\n 'hour' => 0,\n 'minute' => 0,\n 'month' => 'month',\n 'second' => 0,\n 'year' => 'year',\n ),\n 'profile2_private' => FALSE,\n 'timezone_db' => '',\n 'todate' => '',\n 'tz_handling' => 'none',\n ),\n );\n field_create_field($field);\n }\n\n field_cache_clear();\n\n // \"conversation_book_end_date\" field instance.\n if (field_read_instance('roomify_conversation', 'conversation_book_end_date', 'standard') === FALSE) {\n $instance = array(\n 'field_name' => 'conversation_book_end_date',\n 'entity_type' => 'roomify_conversation',\n 'label' => 'End Date',\n 'bundle' => 'standard',\n 'required' => FALSE,\n 'widget' => array(\n 'type' => 'date_popup',\n ),\n 'settings' => array(\n 'default_value' => 'now',\n 'default_value2' => 'same',\n 'default_value_code' => '',\n 'default_value_code2' => '',\n 'user_register_form' => FALSE,\n ),\n );\n field_create_instance($instance);\n }\n}", "function _sf_set_spot_expiry_date_new($post) {\n\t\t\n\t\t//// LETS GET THE EXPIRY DATE AND MAKE SURE IT'S IN THE FUTURE\n\t\tif(is_object($post)) { if($post->post_type == 'spot') {\t\t\t\n\t\t\t\n\t\t\t$exp_date = get_post_meta($post->ID, 'expiry_date', true);\n\t\t\t$now = time();\n\t\t\t\n\t\t\t//// IF ITS IN THE FUTURE\n\t\t\tif($exp_date > $now) {\n\t\t\t\t\n\t\t\t\t//// SCHEDULE EVENT\n\t\t\t\twp_schedule_single_event($exp_date, 'expire_spot_submission', array($post->ID, $post->post_title, $post->post_author, $exp_date));\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} }\n\t\t\n\t}", "public function getExpirationDate()\n {\n return $this->expirationDate;\n }", "public function getExpirationDate()\n {\n return $this->expirationDate;\n }", "public function onSubscriptionRenew(SubscriptionInterface $subscription, OrderInterface $order, OrderInterface $next_order);", "private static function updateExpire($record)\n {\n// $params = Yii::$app->getParams();\n// $interval = $params['restful_token_expired_seconds'];\n $interval = 30 * 24 * 60 * 60;\n $record->expire_date = date('Y-m-d H:i:s', time() + $interval);\n $record->save(false, array('expire_date'));\n }", "public function setEndDate($value) \n {\n $this->_fields['EndDate']['FieldValue'] = $value;\n return $this;\n }", "public function setExpiration($expiration = '0000') {\n $exp = array(\n 'x_exp_date'=>$this->cleanExpDate($expiration),\n );\n $this->NVP = array_merge($this->NVP, $exp); \n }", "public function set_end_date()\n {\n if ($this->end_date === NULL && $this->start_date === NULL) {\n $this->formated_end_date = \"the game has not started yet\";\n } elseif($this->end_date === NULL && $this->start_date !== NULL) {\n $this->formated_end_date = \"the game is not finished yet\";\n } else {\n $end_date = Carbon::createFromTimestamp($this->end_date / 1000);\n $this->formated_end_date = $end_date->toDayDateTimeString();\n }\n return $this->formated_end_date; \n }", "public function setEndDate($value)\n {\n return $this->set('EndDate', $value);\n }", "public function setEndDate($value)\n {\n return $this->set('EndDate', $value);\n }", "public function setEndDate($endDate='')\r\n\t\t{\r\n\t\t\tif ($endDate != '')\r\n\t\t\t{\r\n\t\t\t\t$this->end_date = $endDate;\r\n\t\t\t}\r\n\t\t}", "public function getExpirationDate(): \\DateTime\n {\n return $this->expiration_date;\n }", "public function getEndDate()\r\n\t\t{\r\n\t\t\treturn $this->end_date;\r\n\t\t}", "public function setEndDate( KCommandContext $context )\n {\n $data = $context->data;\n \n if( $data->day || $data->month || $data->year )\n { \n $date = new KDate();\n \n $date->day( (int) $data->day );\n \n $date->month( (int) $data->month );\n \n $date->year( (int) $data->year );\n \n $data->endDate = $date;\n }\n }", "public function get_end_date()\n\t{\n\t\treturn $this->end_date;\n\t}", "public function getMembershipDefaultExpiration()\n {\n return (new \\DateTime('now'))->modify('+1 year');\n }", "public function setEndDate($endDate) {\n $this->endDate = $endDate;\n }", "public function getPurchaseRequestValidEndDate()\n\t{\n\t return $this->purchaseRequestValidEndDate;\n\t}", "public function getExpiration()\n {\n return $this->getCreated()->add(new DateInterval('P2W'));\n }", "public function setEndDate($date)\n {\n\t\tif($date==null){\n\t\t\t$this->complete_at = null;\n\t\t\t$this->save();\n\t\t\t$this->fireModelEvent('end-refreshed');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif($this->complete_at){\n\t\t\tif($model->complete_at->greaterThan($date)){\n\t\t\t\t$this->complete_at = $date;\n \t\t$this->save();\n\t\t\t\t$this->fireModelEvent('end-delayed');\n\t\t\t}else{\n\t\t\t\t$this->complete_at = $date;\n \t\t$this->save();\n\t\t\t\t$this->fireModelEvent('end-forwarded');\n\t\t\t}\n\t\t}else{\n\t\t\t$this->complete_at = $date;\n \t$this->save();\n\t\t\t$this->fireModelEvent('end-inited');\n\t\t}\n }", "function getDateExpiration() {\n return $this->dateExpiration;\n }", "public static function expiration()\n {\n return strtotime( \"+\" . self::EXPIRATION );\n }", "function erp_financial_end_date() {\n $financial_year_dates = erp_get_financial_year_dates();\n\n return $financial_year_dates['end'];\n}", "function lb_subscription_set_billing_period($account, $subscription, $billing_period) {\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($entity, $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 if ($account_subscription_data['billing_period'] != $billing_period) {\n $entity->field_subscription[LANGUAGE_NONE][$account_subscription_data['delta']]['field_billing_period'] = array(\n LANGUAGE_NONE => array(\n 0 => array(\n 'value' => $billing_period,\n ),\n ),\n );\n entity_save('user', $entity);\n }\n }\n}", "public function getEndDate() {\n\n return $this->end_date;\n }", "public function setExpirationDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('expirationDateTime', $value);\n }", "public function setExpirationDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('expirationDateTime', $value);\n }", "public function getEndDate() {\n return $this->endDate;\n }", "public function updatedOptIn()\n {\n $this->updateValue(\n 'opt_in',\n $this->optIn,\n \"You have updated the customer's marketing email subscription.\"\n );\n }", "public function expire()\n {\n return $this->update([\n $this->model->getExpirationAttribute() => Carbon::now()\n ]);\n }", "public function contract_boot_update_end_date_null_if_empty()\n {\n self::$contract->update(['end_date' => '']);\n $this->assertNull(self::$contract->end_date);\n }", "public function getEndDate()\n {\n return $this->EndDate;\n }", "public function getEndDate(): Date\n {\n return $this->endDate;\n }", "function flagReminded($subscriptionId, $reminderType) {\n\t\t$this->update(\n\t\t\tsprintf(\n\t\t\t\t'UPDATE subscriptions SET %s=%s WHERE subscription_id=?',\n\t\t\t\t$reminderType==SUBSCRIPTION_REMINDER_FIELD_BEFORE_EXPIRY?'date_reminded_before':'date_reminded_after',\n\t\t\t\t$this->datetimeToDB(Core::getCurrentDate())\n\t\t\t),\n\t\t\tarray((int) $subscriptionId)\n\t\t);\n\t}", "public function setCertificateExpirationDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('certificateExpirationDateTime', $value);\n }", "public function getExpirationDateFormattedAttribute()\n {\n if (empty($this->nextBillingDate)) {\n return null;\n } else {\n return Carbon::createFromFormat('Y-m-d H:i:s', $this->endsAt ?? $this->nextBillingDate)->format('M d Y');\n }\n }", "function getEndDate() \n\t{\n\t\treturn (strlen($this->end_date)) ? $this->end_date : NULL;\n\t}", "public function setAvailabilityEndDateTime($val)\n {\n $this->_propDict[\"availabilityEndDateTime\"] = $val;\n return $this;\n }", "public function expiresAfterSale(): void\n {\n if ($this->isPerishable() && $this->isAfterSale()) {\n $this->setToLowestQuality();\n }\n }", "public function setDateEnd($var)\n {\n GPBUtil::checkString($var, True);\n $this->dateEnd = $var;\n\n return $this;\n }", "function set_expiration($post_id) {\n remove_action('save_post', 'expirationdate_update_post_meta');\n //Pull the date we need\n if(get_post_meta( $post_id , 'expiration', true )){\n $date = get_post_meta( $post_id , 'expiration', true );\n expirationdate_update_post_meta_acf($post_id, $date);\n } else{\n return;\n }\n}", "protected function renewDatabase($subscription,$nextRenewDate) {\n \n $day = 86400; // = 24h * 60m * 60s => 1 day in seconds\n \n\t $nextRenewDate = date('Y-m-d H:i:s',strtotime($subscription->nextRenewDate)+7*$day);\n \n $this->mapper->updateStatusById($subscription->id, 'active', $nextRenewDate);\n return true;\n }", "function setLastchange($d) {\n\t\tif ($d) {\n\t\t\t$newtime = dateTimeConvert($d);\n\t\t\tif ($newtime === false) return;\n\t\t\t$this->set('expiredate', $newtime);\n\t\t} else {\n\t\t\t$this->set('expiredate', NULL);\n\t\t}\n\t}", "function has_signup_period_ended($signupDate)\n{\n return time() - (60 * 60 * 24) >= strtotime($signupDate);\n}", "public function getExpirationDate(): int;", "public function setEndDate($date)\n\t{\n\t\treturn $this->setDate('End', $date);\n\t}", "function lb_subscription_set_renewal_flag($account, $subscription, $payment_type) {\n if ($payment_type == 'check') {\n $renew = 0;\n }\n else {\n $renew = 1;\n }\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($entity, $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 if ($account_subscription_data['renew'] != $renew) {\n $entity->field_subscription[LANGUAGE_NONE][$account_subscription_data['delta']]['field_renew'] = array(\n LANGUAGE_NONE => array(\n 0 => array(\n 'value' => $renew,\n ),\n ),\n );\n entity_save('user', $entity);\n }\n }\n}", "public function setExpiry( $expiry );", "public function getEndDate();", "public function getEndDate();", "public function getExpiration()\n {\n }", "public function expire() {\n logit_r($this, 'expire'); \n $status = ($this->status == UserLoginReq::STATUS_NOTIFIED) ? UserLoginReq::STATUS_PAST_GRACE : UserLoginReq::STATUS_EXPIRED;\n logit_r($status, 'status');\n $this->status = $status;\n $this->save(true);\n }", "function EndOldSalesPrice($str_start_date,\r\n $int_price_recored_id) {\r\n global $db_iwex;\r\n $str_update_old=\"UPDATE pricing\r\n\t\t\t\t\t\tSET end_date = DATE_ADD(\".($str_start_date && $str_start_date != \"0000-00-00\" ? \"'$str_start_date'\" : \"NOW()\").\", INTERVAL -1 DAY),\r\n\t\t\t\t\t\t\tmodified_by = '\" . $GLOBALS[\"employee_id\"] . \"',\r\n\t\t\t\t\t\t\tmodified = NOW()\r\n\t\t\t\t\t\tWHERE recordID = $int_price_recored_id\";\r\n echo \"<h2>Let op er is een oude price vervallen!</h2>\";\r\n return \t$db_iwex->query($str_update_old);\r\n}", "public function setEndDateAttribute($value)\n\t{\n\t\treturn $this->attributes['end_date'] = Carbon::parse($value)->format('Y-m-d H:i:s');\n\t}", "public function getPaymentAuthExpiration();", "function _updateSubscription(&$subscription) {\n\t\t$returner = $this->update(\n\t\t\tsprintf('UPDATE subscriptions\n\t\t\t\tSET\n\t\t\t\t\tjournal_id = ?,\n\t\t\t\t\tuser_id = ?,\n\t\t\t\t\ttype_id = ?,\n\t\t\t\t\tdate_start = %s,\n\t\t\t\t\tdate_end = %s,\n\t\t\t\t\tdate_reminded_before = %s,\n\t\t\t\t\tdate_reminded_after = %s,\n\t\t\t\t\tstatus = ?,\n\t\t\t\t\tmembership = ?,\n\t\t\t\t\treference_number = ?,\n\t\t\t\t\tnotes = ?\n\t\t\t\tWHERE subscription_id = ?',\n\t\t\t\t$this->dateToDB($subscription->getDateStart()),\n\t\t\t\t$this->datetimeToDB($subscription->getDateEnd()),\n\t\t\t\t$this->datetimeToDB($subscription->getDateRemindedBefore()),\n\t\t\t\t$this->datetimeToDB($subscription->getDateRemindedAfter())\n\t\t\t), array(\n\t\t\t\t$subscription->getJournalId(),\n\t\t\t\t$subscription->getUserId(),\n\t\t\t\t$subscription->getTypeId(),\n\t\t\t\t$subscription->getStatus(),\n\t\t\t\t$subscription->getMembership(),\n\t\t\t\t$subscription->getReferenceNumber(),\n\t\t\t\t$subscription->getNotes(),\n\t\t\t\t$subscription->getId()\n\t\t\t)\n\t\t);\n\n\t\treturn $returner;\n\t}" ]
[ "0.70345396", "0.6584539", "0.6440476", "0.6289389", "0.61278355", "0.6068972", "0.59100837", "0.5908071", "0.5857778", "0.57571006", "0.56894684", "0.5610006", "0.5559061", "0.55220616", "0.5509971", "0.5506381", "0.5491396", "0.54852813", "0.54703873", "0.54534024", "0.54524523", "0.5442479", "0.5438378", "0.5427428", "0.5405188", "0.5373417", "0.5365003", "0.5342781", "0.533939", "0.5332479", "0.53081554", "0.53075266", "0.530128", "0.5276421", "0.52759874", "0.52747893", "0.52656907", "0.52643955", "0.5262065", "0.5253846", "0.52490354", "0.5221666", "0.5221666", "0.5208633", "0.51942486", "0.5188519", "0.5188519", "0.5182571", "0.51793754", "0.5175635", "0.5169487", "0.5164515", "0.51626605", "0.5161818", "0.51600194", "0.51597846", "0.51506126", "0.5147848", "0.51464206", "0.5134815", "0.5131639", "0.51199603", "0.51161844", "0.5110556", "0.51098114", "0.5099648", "0.50967705", "0.508291", "0.5080471", "0.5070384", "0.5070384", "0.506744", "0.50614345", "0.5061153", "0.50574076", "0.505695", "0.5047797", "0.50446516", "0.5043004", "0.5040493", "0.50404197", "0.50322306", "0.50266296", "0.5023424", "0.5017364", "0.50158274", "0.50070375", "0.50034696", "0.49922016", "0.49842265", "0.4982352", "0.49796337", "0.4976205", "0.4976205", "0.49740145", "0.49716794", "0.4968102", "0.49627328", "0.49626744", "0.49601352" ]
0.74767065
0
Get user memberships by subscription key
Получить членства пользователя по ключу подписки
public function get_memberships_from_subscription( $subscription_key ) { $user_memberships = array(); $user_membership_ids = new WP_Query( array( 'post_type' => 'wc_user_membership', 'post_status' => array_keys( wc_memberships_get_user_membership_statuses() ), 'fields' => 'ids', 'nopaging' => true, 'suppress_filters' => 1, 'meta_query' => array( array( 'key' => '_subscription_key', 'value' => $subscription_key, ), ), ) ); if ( ! empty( $user_membership_ids->posts ) ) { $user_memberships = array(); foreach ( $user_membership_ids->posts as $user_membership_id ) { $user_memberships[] = wc_memberships_get_user_membership( $user_membership_id ); } } return $user_memberships; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getSubscription()\n {\n $members = [];\n $page = 1;\n while(count($members) > 0 || $page === 1) {\n $members = $this->mangopay->listUsers($page);\n foreach ($members as $member) {\n if ($member->Email === 'user-vip@prono-bet.com') {\n // check wallet\n $wallets = $this->mangopay->listWallets($member->Id);\n foreach ($wallets as $wallet) {\n if ($wallet->Balance->Amount > 10) {\n $this->createUserSubscription($member->Id, $wallet);\n return true;\n }\n }\n }\n }\n $page++;\n }\n\n return false;\n }", "public function getUserIdsWithSubscriptionId(int $subscriptionId);", "public function getSubscription($key)\n {\n // check if key is string and not empty\n if (empty($key) || !is_string($key)) {\n require_once 'Zend/Feed/Pubsubhubbub/Exception.php';\n throw new Zend_Feed_Pubsubhubbub_Exception(\n 'Invalid parameter \"key\"' .\n ' of \"' .\n $key .\n '\" must be a non-empty string'\n );\n }\n\n // generate uri with subscription id\n $subscriptionResourceUri = $this->_generateSubscriptionResourceUri(\n $this->_subscriptionConfig->get('classUri'),\n $key\n );\n\n // get the subscription as OntoWiki resource\n $subscriptionResource = new OntoWiki_Model_Resource(\n $this->_selectedModelInstance->getStore(),\n $this->_selectedModelInstance,\n $subscriptionResourceUri\n );\n\n // get all properties of the subscription\n $subscriptionResourceProperties = $subscriptionResource->getValues();\n\n // if the subscription had proberties\n if (0 < count($subscriptionResourceProperties)) {\n $modelIri = $this->_selectedModelInstance->getModelIri();\n $subscriptionResourceProperties = $subscriptionResourceProperties[$modelIri];\n\n // init subscriber data array an save the proberties plain\n $data = array();\n $data['resourceProperties'] = $subscriptionResourceProperties;\n // fill the subscriber data array with the subscription resource content\n foreach ($this->_propertyMatching as $dataKey => $propertyKey) {\n // get property content\n $propertyUri = $this->_subscriptionConfig->get($propertyKey);\n $propertyArray = isset($subscriptionResourceProperties[$propertyUri]) ?\n $subscriptionResourceProperties[$propertyUri] :\n null;\n\n // if property content exists write it to the subscriber data array\n if (isset($propertyArray) && \"\" != $propertyArray[0]['content']) {\n $data[$dataKey] = $propertyArray[0]['content'];\n } else {\n $data[$dataKey] = null;\n }\n }\n return $data;\n }\n return false;\n }", "function get_profiles_for_subscription( $action_key, $role = '', $status = '' ) {\n\t\tif( !( $users = get_transient( '_um_mailchimp_users_' . $action_key . '_' . $role . '_' . $status ) ) ) {\n\t\t\t//get all users with selected role and status\n\t\t\t$args = array(\n\t\t\t\t'fields' => array( 'user_email', 'ID' )\n\t\t\t);\n\n\t\t\tif ( ! empty( $role ) ) {\n\t\t\t\t$args['role'] = $role;\n\t\t\t}\n\n\t\t\tif ( ! empty( $status ) ) {\n\t\t\t\t$args['meta_query'][] = array(\n\t\t\t\t\t'key' => 'account_status',\n\t\t\t\t\t'value' => $status,\n\t\t\t\t\t'compare' => '=',\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$query_users = new \\WP_User_Query( $args );\n\t\t\t$users = $query_users->get_results();\n\n\t\t\t//set users list cache\n\t\t\tset_transient( '_um_mailchimp_users_' . $action_key . '_' . $role . '_' . $status, $users, 24 * 3600 );\n\t\t}\n\t\treturn $users;\n\t}", "public function _list() {\n\t\t// assign user based on api key\n\t\tif (empty($this->params[0])) {\n\t\t\t$json = [\n\t\t\t\t'error' => 'No channel specified'\n\t\t\t];\n\t\t\treturn $json;\n\t\t}\n\t\t$account = filter_var($this->params[0], FILTER_SANITIZE_STRING);\n\t\t$params = array($account);\n\t\t$sql = \"SELECT * FROM \" . $this->db->sub_table . \" WHERE subscriber = $1 OR host_account = $1\";\n\t\t$result = pg_query_params($this->db->link, $sql, $params);\n\t\t$subscribed = [];\n\t\t$subscribers = [];\n\t\twhile ($row = pg_fetch_assoc($result)) {\n\t\t\tif ($row['host_account'] === $account) {\n\t\t\t\t$subscribers[] = $row['subscriber'];\n\t\t\t} \n\t\t\tif ($row['subscriber'] === $account) {\n\t\t\t\t$subscribed[] = $row['host_account'];\n\t\t\t}\n\t\t}\n\t\t$json = [\n\t\t\t'subscribed' => $subscribed,\n\t\t\t'subscribers' => $subscribers\n\t\t];\n\t\treturn json_encode($json);\n\t}", "public function get_subscriptions_from_uid($uid) {\r\n $query = '\r\n -- get sections where the user is subcribed\r\n SELECT user_subscr.sid\r\n FROM user_subscr INNER JOIN user ON user.uid=user_subscr.uid\r\n WHERE user.uid=:uid;\r\n ';\r\n return $this->dbh->fetch_list($query, [ ':uid' => $uid ]);\r\n }", "public function getSubscriptions() {\n\t\t$urlSubscriptions = \"http://www.reddit.com/reddits/mine.json\";\n\t\treturn $this->runCurl ( $urlSubscriptions );\n\t}", "public function get_invited_users( $subscription_id ){\n return pms_get_member_subscription_meta( $subscription_id, 'pms_gm_invited_emails' );\n }", "function &getSubscribedUsers($journalId, $rangeInfo = null) {\n\t\t$result =& $this->retrieveRange(\n\t\t\t'SELECT\tu.*\n\t\t\tFROM\tsubscriptions s,\n\t\t\t\tsubscription_types st,\n\t\t\t\tusers u\n\t\t\tWHERE\ts.type_id = st.type_id AND\n\t\t\t\tst.institutional = 1 AND\n\t\t\t\ts.user_id = u.user_id AND\n\t\t\t\ts.journal_id = ?\n\t\t\tORDER BY u.last_name ASC, s.subscription_id',\n\t\t\tarray((int) $journalId),\n\t\t\t$rangeInfo\n\t\t);\n\n\t\t$userDao =& DAORegistry::getDAO('UserDAO');\n\t\t$returner = new DAOResultFactory($result, $userDao, '_returnUserFromRow');\n\n\t\treturn $returner;\n\t}", "public static function getSubscribedProfiles()\n\t{\n\n\t\treturn self::where('status', '=', 'subscribed');\n\n\t}", "public function memberships_get()\n {\n\n $em = $this->doctrine->em;\n\n $maembershipRepo = $em->getRepository('Entities\\Membership');\n $memberships = $maembershipRepo->findAll();\n $result[\"desc\"] = \"Listado de membresias\";\n $result[\"data\"] = $memberships;\n $this->set_response($result, REST_Controller::HTTP_OK);\n }", "public function getSubscriptionKey() { return $this->subscriptionKey; }", "public function getUserSubscriptionWithId(int $userSubscriptionId);", "function lobby_membersapi_getMemberships($args)\r\n{\r\n\t$uid = (int)$args['uid'];\r\n\tif ($uid == 0) {\r\n\t\treturn false;\r\n\t} else {\r\n\t \t$tables = pnDBGetTables();\r\n\t \t$column = $tables['lobby_members_column'];\r\n\t \t$where = $column['uid'].\" = '\".$uid.\"'\";\r\n\t\t$result = DBUtil::selectObjectArray('lobby_members',$where);\r\n\t\t$r = array();\r\n\t\tforeach ($result as $item) {\r\n\t\t\t$r[]=$item['gid'];\r\n\t\t}\r\n\t\treturn $r;\r\n\t}\r\n}", "public function getSubscriptionWithId(int $subscriptionId);", "function getSubscriptions ()\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['cms_manager_url']}/resources/subscriptions.json\",array(),'json');\n return $this->createResponse($result,'get My Subscriptions');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function membershipAction()\n {\n $common = $this->getServiceLocator()->get('Application\\Model\\Common');\n $api_url = $this->getServiceLocator()->get('config')['api_url']['value'];\n $data = array('status_id' => 1, 'subscription_end_date' => date('Y-m-d', strtotime('+2 days'))); // 2days before subscription end\n $results = $common->subscriptionData($api_url, $data);\n if (count($results) > 0) {\n foreach ($results as $detail) {\n // Start :- Auto renew subscription\n if ($detail['auto_renewal'] == '1') {\n $this->autorenewcodeAction($api_url,$common,$detail);\n // End :- Auto renew subscription\n } \n }\n }\n die;\n }", "function og_simplenews_get_subscriptions($tid) {\n $emails = array();\n\n $result = db_query('\n SELECT ss.mail\n FROM {simplenews_subscriptions} ss\n INNER JOIN {simplenews_snid_tid} sn\n ON ss.snid = sn.snid\n WHERE sn.tid = %d', $tid);\n\n while ($row = db_fetch_array($result)) {\n $emails[] = $row['mail'];\n }\n\n return $emails;\n}", "public function userFromKey($key){\r\n $query = $this->conn->prepare('SELECT `user_id` FROM `user` WHERE confirmationKey = :key'); // Création de la requête + utilisation order by pour ne pas utiliser sort\r\n $query->execute([':key' => $key ]); // Exécution de la requête\r\n return $query->fetch(\\PDO::FETCH_ASSOC);\r\n\r\n }", "function subscriptions ($user_id) {\n global $sql;\n return $sql->sql_select_array_query(\"SELECT * FROM `subscription` WHERE user_id = '{$user_id}' ORDER BY id DESC\");\n }", "public function getAccount($key = null);", "public function getSubscriptions($userId = null, $sessionId = null)\n\t{\n\t\t// no user_id provided, get one from the auth service\n\t\tif (!isset($user_id)) {\n\t\t\tif ($auth = Zend_Auth::getInstance()->getIdentity()) {\n\t\t\t\t$userId = ($userId) ? $userId : $auth->user_id;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// no session id provided, get all sessions user is subscribed to\n\t\tif (!isset($sessionId)) {\n\t\t\treturn $this->getAdapter()->fetchCol(\n\t\t\t\t$this->select()\n\t\t\t\t->from($this->_name, 'session_id')\n\t\t\t\t->where('user_id = ?', $userId)\n\t\t\t);\n\t\t}\n\n\t\t// session_id provided, get all users who are subscribed to specific session\n\t\treturn $this->getAdapter()->fetchAll(\n\t\t\t\"select u.fname, u.lname, u.email from subscribers_sessions ss left join users u on (u.user_id = ss.user_id)\n\t\t\twhere ss.session_id=\".$sessionId\n\t\t);\n\t}", "public function hasSubscription($key)\n {\n // check if key is string and not empty\n if (empty($key) || !is_string($key)) {\n require_once 'Zend/Feed/Pubsubhubbub/Exception.php';\n throw new Zend_Feed_Pubsubhubbub_Exception(\n 'Invalid parameter \"key\"' .\n ' of \"' .\n $key .\n '\" must be a non-empty string'\n );\n }\n\n // generate uri with subscription id\n $subscriptionResourceUri = $this->_generateSubscriptionResourceUri(\n $this->_subscriptionConfig->get('classUri'),\n $key\n );\n\n // get the subscription as OntoWiki resource\n $subscriptionResource = new OntoWiki_Model_Resource(\n $this->_selectedModelInstance->getStore(),\n $this->_selectedModelInstance,\n $subscriptionResourceUri\n );\n\n // get all properties of the subscription\n $subscriptionResourceProperties = $subscriptionResource->getValues();\n\n if (0 < count($subscriptionResourceProperties)) {\n return true;\n } else {\n return false;\n }\n }", "public static function getSubscriptionProductsList() {\n $sku = array();\n $query = db_select('commerce_product', 'cp');\n $query->fields('cp', array('sku'));\n $query->leftJoin('field_data_field_product', 'pr', 'cp.product_id = pr.entity_id');\n $query->condition('pr.bundle', 'subscription', '=');\n $result = $query->execute();\n while ($product = $result->fetchAssoc()) {\n $sku[] = $product['sku'];\n }\n return new Response(TRUE, $sku, NULL);\n }", "public function get_vendor_memberships() {\n $this->db->select('*');\n $this->db->from('vendor_membership');\n $query = $this->db->get();\n $query_result = $query->result();\n\n return $query_result;\n }", "public function memberList()\n {\n return User::where('status', 1)->where('role_id', 2)->get();\n }", "protected function getTagsByKey($key){\n return $this->getAdapter()->sMembers($this->_keyFromId($key));\n }", "private static function getUserFromKey() {\n\t\tstatic $user;\n\t\t\n\t\tif ($user === null) {\n\t\t\t$user = false;\n\t\t\tif ($key = Request::getGET('key')) {\n\t\t\t\t$l = User::getUsers();\n\t\t\t\t$l = $l->filter($l->exprEqual($l->exprMember('unconfirmedEmailKey'),\n\t\t\t\t\t$key));\n\t\t\t\tif ($l->getCount() == 1)\n\t\t\t\t\t$user = $l->get(0);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($user === false)\n\t\t\treturn null;\n\t\telse\n\t\t\treturn $user;\n\t}", "public function retrieveSubscription() {\n // Adrian: Get user subscription details from the database\n /**$subscription = Subscription::where('user_id', $this->model->id)\n ->where('plan_id', $this->plan)\n ->first();**/\n\n $result = ChargeBee_Subscription::retrieve($this->user->subscription_id);\n\n return $result;\n }", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(memberProfilePeer::ID, $key, Criteria::EQUAL);\n }", "function flashcard_get_participants($flashcardid) {\n global $DB;\n\n $sql = \"\n SELECT DISTINCT\n userid,\n userid\n FROM\n {flashcard_card}\n WHERE\n flashcardid = ?\n \";\n $userids = $DB->get_records_sql_menu($sql, array('flashcardid' => $flashcardid));\n if ($userids) {\n $users = $DB->get_records_list('user', 'id', array_keys($userids));\n }\n\n if (!empty($users)) {\n return $users;\n }\n\n return false;\n}", "public function index()\n {\n $user_id = Auth::id();\n $subscribes = User::findOrFail($user_id)->subscriptions;\n // return $subscribes;\n return view('profile.subscription')->with('subscribes', $subscribes);\n }", "function getUsers() {\n\n\tglobal $db;\n\treturn $db->getUsersByGroup ( $GLOBALS [\"targetId\"] );\n\n}", "public function subscriptions()\n {\n return Subscription::byCustomer($this->id);\n }", "public function getMembers ()\n {\n $userIds = (array) $this['users']->getValue ();\n\n // Users should already be in the instance pool, so we retrieve them\n // one by one with findPk\n $users = array ();\n foreach ($userIds as $uid)\n $users[] = UserQuery::create ()->findPk($uid);\n\n return $users;\n }", "public function get_user_info($key, $id) {\r\n $connection = DB::connect();\r\n $stmt = \"SELECT $key FROM users WHERE `id` = '$id'\";\r\n $result = $connection->query($stmt);\r\n\r\n return $result->fetch_assoc()[$key];\r\n }", "public function getMembers($group_id);", "public function getPartinUsersList(){\n return $this->_get(2);\n }", "public function getSubscriptions();", "public function getSubscriptionById($id_subscription) {\n $this->db->where('ID_SUBSCRIPTION', $id_subscription);\n $query = $this->db->get($this->table);\n return $query->row();\n}", "public function get_memberships() {\n \n $active_memberships = pmpro_getMembershipLevelForUser($this->user_id);\n \n if (is_object($active_memberships)) {\n $return[$active_memberships->ID] = $active_memberships->name;\n return $return;\n }\n\n $return = [];\n if (is_array($active_memberships)) {\n foreach ($active_memberships as $membership) {\n $return[$membership->ID] = $membership->name;\n }\n }\n \n return $return;\n }", "public function getSubusers()\n\t{\n\t\treturn $this->getObjectArray('subusers', null, 'user', array());\n\t}", "function getUserListWithID($ac_token, $twitter_id, $slug) {\n return self::getInstance()->_getUserListWithID($ac_token, $twitter_id, $slug);\n }", "function fetchPermissionUsers($permission_id) {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT id, user_id FROM user_permission_matches WHERE permission_id = ?\",array($permission_id));\n\t$results = $query->results();\n\treturn ($results);\n\t$row[$user] = array('id' => $id, 'user_id' => $user);\n\tif (isset($row)){\n\t\treturn ($row);\n\t}\n}", "public function getUsers();", "public function getUsers();", "public function getUsers();", "public function GetSubscriptionsList()\n {\n \t$output = array();\n \n \t$rs = mysql_query(\"SELECT subscription_id, \" . $this->lang_name_field . \" FROM subscriptions ORDER BY \" . $this->lang_name_field . \" ASC\");\n \n \tif(mysql_num_rows($rs)==0)\n \t{\n \t\t$output = 0;\n \t}\n \telse\n \t{\n \t\twhile($row=mysql_fetch_array($rs))\n \t\t{\n \t\t\t$output[] = array(\n\t \t\t\t\t\t\"subscription_id\" => $row['subscription_id'],\n\t \t\t\t\t\t\"subscription_name\"\t=> $row[$this->lang_name_field]\n \t\t\t);\n \t\t}\n \t}\n \n \treturn $output;\n }", "public function getSubscriptionsToEmail()\n {\n $principal = System_Api_Principal::getCurrent();\n\n $query = 'SELECT s.subscription_id, s.issue_id, s.user_id, s.stamp_id'\n . ' FROM {subscriptions} AS s'\n . ' JOIN {issues} AS i ON i.issue_id = s.issue_id'\n . ' JOIN {folders} AS f ON f.folder_id = i.folder_id'\n . ' JOIN {projects} AS p ON p.project_id = f.project_id';\n if ( !$principal->isAdministrator() )\n $query .= ' JOIN {effective_rights} AS r ON r.project_id = f.project_id AND r.user_id = %1d';\n $query .= ' WHERE s.user_id = %1d AND i.stamp_id > s.stamp_id AND p.is_archived = 0';\n\n return $this->connection->queryTable( $query, $principal->getUserId() );\n }", "public function index(GetSubuserRequest $request, Server $server)\n {\n return $this->fractal->collection($server->subusers)\n ->transformWith($this->getTransformer(SubuserTransformer::class))\n ->toArray();\n }", "public function subscription($userId)\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn $this->db->table(Config::get('throttle::tables.subscriptions'))\n\t\t\t\t->where('user_id', $userId)\n\t\t\t\t->where('is_active', '1')\n\t\t\t\t->select('id', 'user_id', 'plan_id', 'subscribed_at')\n\t\t\t\t->first();\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\tthrow new Exceptions\\InternalException;\n\t\t}\n\t}", "public function getByExpiredUsers($paymentGateway='')\n\t{\n\t\t$today = time();\n\t\t$startat = 1477060836;\n $queryBuilder = $this->createQueryBuilder('s');\n $query = $queryBuilder\n ->select('s')\n ->innerJoin('Api\\\\V1\\\\Entity\\\\User', 'u')\n ->where('u.subscriptionId = s.id')\n ->andWhere('s.paymentGateway = :paymentGateway')\n ->andWhere('u.subscriptionExpireAt > 0')\n ->andWhere('u.subscriptionExpireAt <= :today')\n ->andWhere('u.subscriptionStartAt >= :startat')\n ->andWhere('u.flags <> :status')\n ->setParameter('paymentGateway', $paymentGateway)\n ->setParameter('today', $today)\n ->setParameter('startat', $startat)\n ->setParameter('status', User::STATUS_SUSPENDED)\n\t\t\t->getQuery();\n\t\t/*$sql =\"select * from subscription as s INNER JOIN user as u where u.subscription_id=s.id and u.subscription_start_at>=$start_at and u.subscription_expire_at >0 and u.subscription_expire_at<=$today and u.flags!=1 and s.payment_gateway='$paymentGateway'\";\n\t\t$stmt = $this->getEntityManager()->getConnection()->prepare($sql);\n $stmt->execute();\n\t\t$subscriptions = $stmt->fetchAll();*/\n\t//\t$q=$query->getSQL();\n\t//\terror_log(\"Query: \".$q.\"\\n\" , 3, \"/volumes/log/api/test-log.log\");\n\t//\terror_log(\"Parameters: \".print_r($query->getParameters(), TRUE).\"\\n\" , 3, \"/volumes/log/api/test-log.log\");\n $subscriptions = $query->getResult();\n\n return $subscriptions;\n }", "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(RegistrationPeer::ID, $key, Criteria::EQUAL);\n\t}", "public function subscribers()\n { \n return $this->contracts()->inProgress()->with('auth')->get()->map->auth->push($this->auth);\n }", "function getProfileInfo($member)\n\t\t{\n\t\n\t\t $query = \"SELECT * FROM tbl_member WHERE `user_name` = '\".$member.\"'\";\n\t\t $rs\t\t=\t$this->Execute($query);\n\t\t return $this->_getPageArray($rs, 'Subscriber');\n\t\t}", "private function itemsList()\n {\n /**\n * Defined variables\n */\n $request = $this->getRequest();\n $publicKey = $request->getServer('PHP_AUTH_USER');\n\n $searchCriteriaBuilder = $this->searchCriteria;\n $searchCriteria = $searchCriteriaBuilder->addFilter(\n 'auth_key',\n $publicKey,\n 'eq'\n )->create();\n $authenticationList = $this->customerAuthRepository->getList($searchCriteria);\n $items = $authenticationList->getItems();\n\n return $items;\n }", "protected function get() {\n $subc = \"get_\".$this->sub_collection;\n if ($subc !== null && method_exists($this, $subc)) {\n $this->im_here();\n if ($this->sub_collection == \"users\") {\n $current_users = intval($this->params->number);\n while (1) {\n $this->clear_inactive_users();\n $users = $this->get_users();\n if (sizeof($users) !== $current_users) {\n return $users;\n }else {\n sleep(1);\n }\n }\n }\n return $this->$subc();\n }else {\n $this->write_error(\"Request error!\");\n }\n }", "function j2_get_yt_subs() {\n $api_key = get_option('youtube_api_key');\n $channel_id = get_option('youtube_api_channel_id');\n\n // Return if the option fields do not exist\n if(!$api_key || !$channel_id)\n return false;\n\n $youtube_url = 'https://www.googleapis.com/youtube/v3/channels?part=statistics&id='.$channel_id.'&key='.$api_key;\n $data = @file_get_contents($youtube_url);\n $json_data = json_decode($data);\n\n if(!$json_data)\n return false;\n\n $subs = $json_data->items\n }", "public function getMembers()\n {\n \t$companyId = session('company_id');\n \t$userRepo = $this->em->getRepository('App\\Entity\\Management\\User');\n \t$users = $userRepo->getUsersByCompany($companyId);\n\n echo json_encode($users);\n\n }", "public function getUserInfo($id)\n {\n $qry = \"SELECT users.* FROM `users` WHERE users.id = \".$id;\n// JOIN `subscription` ON users.id = subscription.user_id\n// JOIN `packages` ON subscription.p_id = packages.id\n\n\n $dbcon = new DatabaseClass();\n $result = mysqli_query($dbcon->conn, $qry);\n if (mysqli_num_rows($result) > 0) {\n return mysqli_fetch_assoc($result);\n }\n }", "public static function fetch_subscribed_users($reactforum, $groupid = 0, $context = null, $fields = null,\n $includediscussionsubscriptions = false) {\n global $CFG, $DB;\n\n if (empty($fields)) {\n $allnames = get_all_user_name_fields(true, 'u');\n $fields =\"u.id,\n u.username,\n $allnames,\n u.maildisplay,\n u.mailformat,\n u.maildigest,\n u.imagealt,\n u.email,\n u.emailstop,\n u.city,\n u.country,\n u.lastaccess,\n u.lastlogin,\n u.picture,\n u.timezone,\n u.theme,\n u.lang,\n u.trackforums,\n u.mnethostid\";\n }\n /// JLH u.trackreactforums above changed to u.trackforums\n \n // Retrieve the reactforum context if it wasn't specified.\n $context = reactforum_get_context($reactforum->id, $context);\n\n if (self::is_forcesubscribed($reactforum)) {\n $results = \\mod_reactforum\\subscriptions::get_potential_subscribers($context, $groupid, $fields, \"u.email ASC\");\n\n } else {\n // Only active enrolled users or everybody on the frontpage.\n list($esql, $params) = get_enrolled_sql($context, '', $groupid, true);\n $params['reactforumid'] = $reactforum->id;\n\n if ($includediscussionsubscriptions) {\n $params['sreactforumid'] = $reactforum->id;\n $params['dsreactforumid'] = $reactforum->id;\n $params['unsubscribed'] = self::REACTFORUM_DISCUSSION_UNSUBSCRIBED;\n\n $sql = \"SELECT $fields\n FROM (\n SELECT userid FROM {reactforum_subscriptions} s\n WHERE\n s.reactforum = :sreactforumid\n UNION\n SELECT userid FROM {reactforum_discussion_subs} ds\n WHERE\n ds.reactforum = :dsreactforumid AND ds.preference <> :unsubscribed\n ) subscriptions\n JOIN {user} u ON u.id = subscriptions.userid\n JOIN ($esql) je ON je.id = u.id\n ORDER BY u.email ASC\";\n\n } else {\n $sql = \"SELECT $fields\n FROM {user} u\n JOIN ($esql) je ON je.id = u.id\n JOIN {reactforum_subscriptions} s ON s.userid = u.id\n WHERE\n s.reactforum = :reactforumid\n ORDER BY u.email ASC\";\n }\n $results = $DB->get_records_sql($sql, $params);\n }\n\n // Guest user should never be subscribed to a reactforum.\n unset($results[$CFG->siteguest]);\n\n // Apply the activity module availability resetrictions.\n $cm = get_coursemodule_from_instance('reactforum', $reactforum->id, $reactforum->course);\n $modinfo = get_fast_modinfo($reactforum->course);\n $info = new \\core_availability\\info_module($modinfo->get_cm($cm->id));\n $results = $info->filter_user_list($results);\n\n return $results;\n }", "public function hasAccount($key);", "public static function retrieve_subscribed_forum_users($forum_id)\n {\n $condition = new EqualityCondition(\n new PropertyConditionVariable(ForumSubscribe::class_name(), ForumSubscribe::PROPERTY_FORUM_ID),\n new StaticConditionVariable($forum_id));\n\n $subscriptions = DataManager::retrieves(\n ForumSubscribe::class_name(),\n new DataClassRetrievesParameters($condition));\n\n $users = array();\n\n while ($subscription = $subscriptions->next_result())\n {\n $user = \\Chamilo\\Core\\User\\Storage\\DataManager::retrieve_by_id(\n User::class_name(),\n (int) $subscription->get_user_id());\n $users[$user->get_id()] = $user;\n }\n\n return $users;\n }", "public static function get_users_in($itemids) {}", "public function getMembershipList($token, $id)\n {\n return $this->getQuery($this->getFullUrl('/groups/' . $id . '/memberships'), $token);\n }", "function getMemberList() {\n return getAll(\"SELECT * FROM member \");\n}", "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(UserPeer::UID, $key, Criteria::EQUAL);\n\t}", "function fetchPermissionUsers($permission_id) {\n global $mysqli, $db_table_prefix;\n $stmt = $mysqli->prepare(\"SELECT id, user_id\n\t\tFROM \" . $db_table_prefix . \"user_permission_matches\n\t\tWHERE permission_id = ?\n\t\t\");\n $stmt->bind_param(\"i\", $permission_id);\n $stmt->execute();\n $stmt->bind_result($id, $user);\n while ($stmt->fetch()) {\n $row[$user] = array('id' => $id, 'user_id' => $user);\n }\n $stmt->close();\n if (isset($row)) {\n return ($row);\n }\n}", "public function getMembers()\n {\n if (!is_null($this->members_relation)) {\n return array_keys($this->members_relation);\n }\n\n if ($this->members_objs == null) {\n // load members\n $response = Helper::get('group/'.$this->unique_id);\n if (isset($response->body['result']['members'])) {\n $this->__construct($response->body['result']);\n }\n }\n\n if ($this->members_objs != null) {\n $list = array();\n foreach ($this->members_objs as $user) {\n $list[] = $user instanceof User ? $user->username : $user;\n }\n\n return $list;\n }\n }", "public function get_my_tribe_member_list($post_data){\n $searchId = $post_data['searchId'];\n $loginUserId = $post_data['loginUserId']; \n \n $sql = \"SELECT * FROM tribe WHERE searchId= $searchId AND fromuserId= $loginUserId AND deleteFlag !=1 AND status = 'accept'\";\n $record = $this->db->query($sql);\n if($record->num_rows()>0){\n return $record->result_array();\n } \n }", "public function index(Request $request)\n {\n //\n $requestData = $request->all();\n\n if(isset($requestData['user_id']))\n {\n $decryptedID = Crypt::decryptString($requestData['user_id']);\n }\n else {\n $user = JWTAuth::User(); \n $decryptedID = $user['id'];\n }\n\n $subscribers = DB::table('hashtag_subscribers')\n ->join('users', 'users.id', '=', 'user_id')\n ->join('hashtags', 'hashtag_id', '=', 'hashtags.id')\n ->select('users.username','hashtag_id','user_id','hashtags.hashtag','users.profile_image')\n ->where('user_id','=',$decryptedID)\n ->get();\n\n return SubscriberResource::collection($subscribers);\n }", "public function getMembership()\n {\n return Member::getByID($this->site_members_id);\n }", "function hcml_wp_ajax_hc_memberslist_csv() {\n // check user capabilities\n /* if (!current_user_can('manage_options') ||\n ! current_user_can('pmpro_memberslist')) {\n return;\n * }*/\n global $wpdb, $pmpro_currency_symbol, $woocommerce;\n // returns $s, $l, $pn, $limit, $start, $end\n extract(hcml_parse_request($_REQUEST, \"list-users-csv\"));\n $theusers = get_members($l, $s, $limit, $start);\n require_once( HC_ML_PLUGIN_PATH . '/views/list-users-csv.php');\t\n exit;\t\n\n}", "public function getMembers($gid)\n {\n // Session key is *required*\n if ($this->_facebook->auth->getSessionKey()) {\n throw new Horde_Service_Facebook_Exception(\n 'session_key is required',\n Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);\n }\n\n return $this->_facebook->callGraphApi($gid . '/members');\n }", "function getMembers() {\n\t\t$query = $this->createQuery();\n\t\t$query .= \"WHERE c2.status = '\" . KontakteData::$STATUS_MEMBER . \"'\";\n\t\t$query .= \" OR c2.status = '\" . KontakteData::$STATUS_ADMIN . \"' \";\n\t\t$query .= \"ORDER BY c2.name ASC\";\n\t\treturn $this->database->getSelection($query);\n\t}", "public function subscribe_member( $user_id, $group_id, $subsribe_mode ) {\n $m = $this->call( \"membershipSubscribe\", [\n \"userId\" => $user_id,\n \"groupId\" => $group_id,\n \"subscriptionMode\" => $subsribe_mode ] );\n return ( isset( $m ) && $m != false ) ? true : false;\n }", "public function subscription($id) {\n\n if (!isset($this->account_details['access_token'])) {\n throw new GoCardless_ClientException('Access token missing');\n }\n\n return GoCardless_Subscription::find_with_client($this, $id);\n\n }", "public function getActiveSubscriptionsForUserId(int $userId);", "public function index()\n {\n return MembersResource::collection(Member::latest()->get());\n }", "public function user($key = null) {\n return $this->getUser($key);\n }", "public function getSubscriptionList()\n {\n $recruiterOffice = RecruiterOffice::getAllOffices();\n $subscription['data'] = [];\n $customerId = RecruiterProfile::where(['user_id' => Auth::user()->id])->pluck('customer_id');\n if ($customerId[0] == null) {\n $subscription['customer'] = [];\n } else {\n $customer = \\Stripe\\Customer::retrieve($customerId[0]);\n $subscription['customer'] = [$customer];\n }\n foreach ($recruiterOffice as $office) {\n if ($office['free_trial_period'] != config('constants.ZeroValue')) {\n $subscription['data'] = $office;\n break;\n }\n }\n return $subscription;\n }", "function getAllMembers() {\r\n $api = new wlmapiclass($api_adres, $api_m);\r\n $api->return_format = 'php'; // <- value can also be xml or json\r\n\r\n $data = array();\r\n// $data['user_login'] = $name;\r\n// $data['user_email'] = $email;\r\n// // $data['custom_exp_date']=$expDate;\r\n $response = $api->get('/members');\r\n $response = unserialize($response);\r\n\r\n // $response = $api->post('/levels',$data)\r\n\r\n if (secssesResponce($response)) {\r\n\r\n $mem = $response['members']['member']; //hold array of all members \r\n\r\n return($mem);\r\n }\r\n}", "private function getUsers()\n {\n $url = $this->base_uri.'user/assignable/multiProjectSearch?projectKeys='.$this->project;\n $users = $this->request($url);\n if (!$this->infos['errorBoolean']) {\n return json_decode($users);\n }\n }", "private function showPremiumMembers() {\n $query = \"SELECT DISTINCT u.id, n.nhc_pin, u.user_login, um1.meta_value AS first_name, um2.meta_value AS last_name, u.user_email\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um ON um.user_id = u.id AND um.meta_key = 'member_level' AND um.meta_value IN ('paid-75', 'paid-95')\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n JOIN {$this->db->prefix}usermeta um7 ON um7.user_id = u.id AND um7.meta_key = 'expiration_date' AND um7.meta_value {$this->expireDateClause}\n ORDER BY um.meta_value\";\n \n $membersArr = $this->db->get_results($query, ARRAY_A);\n \n foreach($membersArr as $key => $m) {\n $tmp = get_user_meta($m['id']);\n $membersArr[$key]['addr1'] = $tmp['addr1'][0];\n $membersArr[$key]['addr2'] = $tmp['addr2'][0];\n $membersArr[$key]['city'] = $tmp['city'][0];\n $membersArr[$key]['thestate'] = $tmp['thestate'][0];\n $membersArr[$key]['zip'] = $tmp['zip'][0];\n $membersArr[$key]['country'] = $tmp['country'][0];\n $membersArr[$key]['level'] = $tmp['member_level'][0];\n }\n \n $this->showResults($membersArr, 'premium', true);\n }", "public function getUserChannels($uid){\n\n $channels = DB::table('channels')\n ->join('rights','rights.pagepath','=','channels.channel_id')\n ->join('user_rights', 'user_rights.rights_id','=','rights.rights_id')\n ->select('channels.*')\n ->where('rights.label', '=', 'channel')\n ->where('user_rights.user_id', '=', $uid)\n ->get();\n\n return $channels;\n }", "public function get_subscription_from_membership( $user_membership ) {\n\n\t\t$user_membership_id = is_object( $user_membership ) ? $user_membership->id : $user_membership;\n\t\t$subscription_key = $this->get_user_membership_subscription_key( (int) $user_membership_id );\n\n\t\tif ( ! $subscription_key ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$user_membership = wc_memberships_get_user_membership( $user_membership_id );\n\n\t\t// It seems that the order has been deleted\n\t\tif ( false === get_post_status( $user_membership->get_order_id() ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// It seems the subscription product has been removed from the order\n\t\tif ( ! WC_Subscriptions_Order::get_item_id_by_subscription_key( $subscription_key ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn WC_Subscriptions_Manager::get_subscription( $subscription_key );\n\t}", "public function getSubscription($request);", "function user_data($key){\n global $mysqli;\n @$token = addslashes($_SESSION['user']['token']);\n @$username = addslashes($_SESSION['user']['name']);\n\n if(!isset($token) && !isset($username)){\n return false;\n } else {\n\n $sql = \"SELECT * FROM user WHERE username = '\" . $username . \"' AND token = '\" . $token . \"'\";\n $result = $mysqli->query($sql);\n\n $result = $result->fetch_object();\n return @$result->$key;\n }\n }", "function _getUserListWithID($ac_token, $twitter_id, $slug) {\n $api = 'https://api.twitter.com/1/lists/show.json';\n $data = array('slug' => $slug, 'owner_id' => $twitter_id);\n return $this->_execTwApi($ac_token, $api, $data, 'get');\n }", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(UserPeer::ID, $key, Criteria::EQUAL);\n }", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(UserPeer::ID, $key, Criteria::EQUAL);\n }", "function getMemberInfoBySessionId($sessionId){\n\t\n\t\t$dbname = \"forums\";\n\t\t$conn = new PDO(\"mysql:host=\".servername.\";dbname=$dbname\", username, password);\n\t\t$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\t\t$stmt = $conn->prepare(\"SELECT m.member_id, m.donator_points_overall, m.donator_points_current FROM `sessions` s, `members` m where s.id = :sessionId and s.member_id = m.member_id\");\n\t\t$stmt->execute(array(':sessionId'=> $sessionId));\n\n\t\t$rows = $stmt->fetchAll();\n\n\t\t\t\t\t\t\t\t\t\t\n\t\treturn $rows;\n\t}", "public function getUserslistToInvite()\n\t{\n\t\t//get current login user session\n\t\t$results = array();\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\t\t\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t//get allsection setting sections for same course\n\t\t$sections_list = $this->__allSections();\n\t\t$options = array('course'=>$course_name,'section'=>$sections_list,'userName !='=>$user);\n\t\t$results = $this->PleUser->find('all',array('conditions'=>$options,'fields'=>array('userName','name'),'order' => array('PleUser.name ASC')));\n\t\tif ($results) {\n\t\t\treturn $results;\n\t\t}\n\t\treturn $results;\n\t}", "function getUsersWithUserRights() {\n\n $userRightsUsers = array();\n $allUsers = REDCap::getUsers();\n foreach($allUsers as $cnt => $user) {\n $rights = REDCap::getUserRights($user);\n if ($rights[$user][\"user_rights\"] == 1) {\n $userRightsUsers[] = $user;\n }\n }\n\n return $userRightsUsers;\n\n}", "function sync_list_users( $list_id ) {\n\t\tif( !( $users = get_transient( '_um_mailchimp_sync_users' ) ) ) {\n\t\t\t//get all users with selected role and status\n\t\t\t$query_users = new \\WP_User_Query( array(\n\t\t\t\t'fields' => array( 'user_email', 'ID' )\n\t\t\t) );\n\t\t\t$users = $query_users->get_results();\n\t\t\t//set users list cache\n\t\t\tset_transient( '_um_mailchimp_sync_users', $users, 24 * 3600 );\n\t\t}\n\n\t\tif( count( $users ) > 0 ) {\n\t\t\t//get subscribers from mailchimp list\n\t\t\t$mailchimp_members = $this->get_external_list_users( $list_id );\n\n\t\t\t$subscribe = get_transient('_um_mailchimp_subscribe_users');\n\t\t\tforeach ( $users as $key => $user ) {\n\t\t\t\t$internal_user_lists = isset( $user->internal_lists ) ? $user->internal_lists : get_user_meta( $user->ID, \"_mylists\", true );\n\t\t\t\tif( is_array( $internal_user_lists ) && count( $internal_user_lists ) ) {\n\n\t\t\t\t\t//check if user isn't mailchimp subscriber for list with id $list_id but subscribed on current site\n\t\t\t\t\tif( !in_array( $user->user_email, $mailchimp_members ) && isset( $internal_user_lists[ $list_id ] ) ) {\n\t\t\t\t\t\t/*$this->mailchimp_subscribe()*/\n\n\t\t\t\t\t//check if user is mailchimp subscriber for list with id $list_id but didn't subscribed on current site\n\t\t\t\t\t} else if( in_array( $user->user_email, $mailchimp_members ) && !isset( $internal_user_lists[ $list_id ] ) ) {\n\t\t\t\t\t\tif( !is_array( $subscribe[ $list_id ] ) ) $subscribe[ $list_id ] = array();\n\t\t\t\t\t\t$subscribe[ $list_id ][] = $user;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif( !is_array( $subscribe[ $list_id ] ) ) $subscribe[ $list_id ] = array();\n\t\t\t\t\t$subscribe[ $list_id ][] = $user;\n\t\t\t\t}\n\t\t\t}\n\t\t\tset_transient( '_um_mailchimp_subscribe_users', $subscribe, 24 * 3600 );\n\t\t}\n\t}", "public static function user($key=false){\n if(self::isLoggedIn()){\n return self::getUser($_SESSION['logged_user_id'], $key);\n } else {\n return false;\n }\n }", "function get_conversations_list($request)\n{\n global $redis_server;\n\n if(!validate_fields($request, array('user'))) {\n die(bad_request('missing field'));\n }\n\n $client = new Predis\\Client($redis_server);\n $convs = $client->smembers(\"user-{$request->data['user']}-conversations-list\");\n\n return json_encode(array('code' => '1', 'conversations' => $convs, 'user' => $request->data['user']));\n}", "function &getUsers($uids)\n {\n $criteria = new CriteriaCompo();\n $criteria->add(new Criteria('uid', '(' . implode(',', $uids) . ')', 'IN'));\n $criteria->setSort('uid');\n\n $member_handler =& xoops_gethandler('member');\n $users =& $member_handler->getUsers($criteria, true);\n return $users;\n }", "public function getUsersGroups($token, $id)\n {\n return $this->getQuery($this->getFullUrl('/users/' . $id . '/memberships'), $token);\n }", "function wcs_get_subscriptions( $args ) {\n\tglobal $wpdb;\n\n\t$args = wp_parse_args( $args, array(\n\t\t\t'subscriptions_per_page' => 10,\n\t\t\t'paged' => 1,\n\t\t\t'offset' => 0,\n\t\t\t'orderby' => 'start_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'customer_id' => 0,\n\t\t\t'product_id' => 0,\n\t\t\t'variation_id' => 0,\n\t\t\t'order_id' => 0,\n\t\t\t'subscription_status' => array( 'any' ),\n\t\t\t'meta_query_relation' => 'AND',\n\t\t)\n\t);\n\n\t// if order_id is not a shop_order\n\tif ( 0 !== $args['order_id'] && 'shop_order' !== get_post_type( $args['order_id'] ) ) {\n\t\treturn array();\n\t}\n\n\t// Ensure subscription_status is an array.\n\t$args['subscription_status'] = $args['subscription_status'] ? (array) $args['subscription_status'] : array();\n\n\t// Grab the native post stati, removing pending and adding any.\n\t$builtin = get_post_stati( array( '_builtin' => true ) );\n\tunset( $builtin['pending'] );\n\t$builtin['any'] = 'any';\n\n\t// Make sure status starts with 'wc-'\n\tforeach ( $args['subscription_status'] as &$status ) {\n\t\tif ( isset( $builtin[ $status ] ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$status = wcs_sanitize_subscription_status_key( $status );\n\t}\n\n\t// Prepare the args for WP_Query\n\t$query_args = array(\n\t\t'post_type' => 'shop_subscription',\n\t\t'post_status' => $args['subscription_status'],\n\t\t'posts_per_page' => $args['subscriptions_per_page'],\n\t\t'paged' => $args['paged'],\n\t\t'offset' => $args['offset'],\n\t\t'order' => $args['order'],\n\t\t'fields' => 'ids',\n\t\t'meta_query' => isset( $args['meta_query'] ) ? $args['meta_query'] : array(), // just in case we need to filter or order by meta values later\n\t);\n\n\t// Maybe only get subscriptions created by a certain order\n\tif ( 0 != $args['order_id'] && is_numeric( $args['order_id'] ) ) {\n\t\t$query_args['post_parent'] = $args['order_id'];\n\t}\n\n\t// Map subscription specific orderby values to internal/WordPress keys\n\tswitch ( $args['orderby'] ) {\n\t\tcase 'status' :\n\t\t\t$query_args['orderby'] = 'post_status';\n\t\t\tbreak;\n\t\tcase 'start_date' :\n\t\t\t$query_args['orderby'] = 'date';\n\t\t\tbreak;\n\t\tcase 'trial_end_date' :\n\t\tcase 'end_date' :\n\t\t\t// We need to orderby post meta value: http://www.paulund.co.uk/order-meta-query\n\t\t\t$date_type = str_replace( '_date', '', $args['orderby'] );\n\t\t\t$query_args = array_merge( $query_args, array(\n\t\t\t\t'orderby' => 'meta_value',\n\t\t\t\t'meta_key' => wcs_get_date_meta_key( $date_type ),\n\t\t\t\t'meta_type' => 'DATETIME',\n\t\t\t) );\n\t\t\t$query_args['meta_query'][] = array(\n\t\t\t\t'key' => wcs_get_date_meta_key( $date_type ),\n\t\t\t\t'compare' => 'EXISTS',\n\t\t\t\t'type' => 'DATETIME',\n\t\t\t);\n\t\t\tbreak;\n\t\tdefault :\n\t\t\t$query_args['orderby'] = $args['orderby'];\n\t\t\tbreak;\n\t}\n\n\t// Maybe filter to a specific user\n\tif ( 0 != $args['customer_id'] && is_numeric( $args['customer_id'] ) ) {\n\t\t$query_args['meta_query'][] = array(\n\t\t\t'key' => '_customer_user',\n\t\t\t'value' => $args['customer_id'],\n\t\t\t'type' => 'numeric',\n\t\t\t'compare' => ( is_array( $args['customer_id'] ) ) ? 'IN' : '=',\n\t\t);\n\t};\n\n\t// We need to restrict subscriptions to those which contain a certain product/variation\n\tif ( ( 0 != $args['product_id'] && is_numeric( $args['product_id'] ) ) || ( 0 != $args['variation_id'] && is_numeric( $args['variation_id'] ) ) ) {\n\t\t$query_args['post__in'] = wcs_get_subscriptions_for_product( array( $args['product_id'], $args['variation_id'] ) );\n\t}\n\n\tif ( ! empty( $query_args['meta_query'] ) ) {\n\t\t$query_args['meta_query']['relation'] = $args['meta_query_relation'];\n\t}\n\n\t$query_args = apply_filters( 'woocommerce_get_subscriptions_query_args', $query_args, $args );\n\n\t$subscription_post_ids = get_posts( $query_args );\n\n\t$subscriptions = array();\n\n\tforeach ( $subscription_post_ids as $post_id ) {\n\t\t$subscriptions[ $post_id ] = wcs_get_subscription( $post_id );\n\t}\n\n\treturn apply_filters( 'woocommerce_got_subscriptions', $subscriptions, $args );\n}" ]
[ "0.6504515", "0.62734777", "0.6230953", "0.6120904", "0.59495854", "0.59205645", "0.5730152", "0.567319", "0.5672288", "0.5550507", "0.55431294", "0.55325675", "0.55160296", "0.5474513", "0.54615414", "0.54485065", "0.54293877", "0.54163957", "0.54128474", "0.5389833", "0.53354293", "0.5313734", "0.5281147", "0.5244318", "0.5208563", "0.5202443", "0.5183852", "0.51759624", "0.5173457", "0.5168946", "0.5151892", "0.5146631", "0.5143316", "0.51421905", "0.5125635", "0.51154", "0.5113069", "0.5106082", "0.51019555", "0.51006144", "0.5094045", "0.5093001", "0.5080081", "0.5071886", "0.5066656", "0.5066656", "0.5066656", "0.5051466", "0.5044919", "0.50362164", "0.5021991", "0.50217885", "0.5018603", "0.5017262", "0.5005657", "0.5002701", "0.4997768", "0.49961644", "0.4986308", "0.49823925", "0.49693635", "0.49684447", "0.4967521", "0.49610117", "0.49480063", "0.4947848", "0.49477348", "0.49433276", "0.49426913", "0.4937459", "0.4936088", "0.4931145", "0.49229708", "0.49220014", "0.49206197", "0.4900934", "0.48983553", "0.48975554", "0.4892773", "0.48920843", "0.4888812", "0.48842722", "0.48835215", "0.48790973", "0.48703527", "0.48604536", "0.48543853", "0.48536292", "0.4852795", "0.48485515", "0.48485515", "0.48481888", "0.48451635", "0.4844565", "0.48443156", "0.4841368", "0.48409608", "0.48405793", "0.48383185", "0.4837668" ]
0.7590308
0
Check if order contains a Subscription
Проверьте, содержит ли заказ подписку
protected function order_contains_subscription( $order ) { return WC_Subscriptions_Order::order_contains_subscription( $order ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_subscription( $order_id ) {\n\t\treturn ( function_exists( 'wcs_order_contains_subscription' ) && ( wcs_order_contains_subscription( $order_id ) || wcs_is_subscription( $order_id ) || wcs_order_contains_renewal( $order_id ) ) );\n\t}", "protected function order_contains_subscription( $order_id ) {\n\t\treturn class_exists( 'WC_Subscriptions_Order' ) && ( WC_Subscriptions_Order::order_contains_subscription( $order_id ) || WC_Subscriptions_Renewal_Order::is_renewal( $order_id ) );\n\t}", "public function hasRecurringOrders();", "public function hasRecurringOrder(OrderInterface $order);", "function wcs_do_subscriptions_exist() {\n\tglobal $wpdb;\n\t$sql = $wpdb->prepare( \"SELECT ID FROM {$wpdb->posts} WHERE post_type = %s LIMIT 1;\", 'shop_subscription' );\n\n\t// query is the fastest, every other built in method uses this. Plus, the return value is the number of rows found\n\t$num_rows_found = $wpdb->query( $sql );\n\n\treturn ( 0 !== $num_rows_found ) ? true: false;\n}", "protected function maybe_handle_subscription( $order ) {\n\t\tif ( ! class_exists( 'WC_Subscriptions' ) ) {\n\t\t\treturn array( false, false, array() );\n\t\t}\n\n\t\tif ( ! wcs_order_contains_subscription( $order ) ) {\n\t\t\treturn array( false, false, array() );\n\t\t}\n\n\t\t$subscription = current( wcs_get_subscriptions_for_order( $order->get_id() ) );\n\t\t$subscription_id = $subscription->get_id();\n\n\t\t$ppec_billing = get_post_meta( $subscription_id, '_ppec_billing_agreement_id', true );\n\n\t\tif ( empty( $ppec_billing ) ) {\n\t\t\treturn array( false, false, array() );\n\t\t}\n\n\t\tif ( $subscription->has_status( apply_filters( 'woocommerce_paypal_express_checkout_privacy_eraser_subs_statuses', array( 'on-hold', 'active' ) ) ) ) {\n\t\t\treturn array( false, true, array( sprintf( __( 'Order ID %d contains an active Subscription' ), $order->get_id() ) ) );\n\t\t}\n\n\t\t$renewal_orders = WC_Subscriptions_Renewal_Order::get_renewal_orders( $order->get_id() );\n\n\t\tforeach ( $renewal_orders as $renewal_order_id ) {\n\t\t\tdelete_post_meta( $renewal_order_id, '_woo_pp_txnData' );\n\t\t\tdelete_post_meta( $renewal_order_id, '_ppec_billing_agreement_id' );\n\t\t\tdelete_post_meta( $renewal_order_id, '_paypal_status' );\n\t\t}\n\n\t\tdelete_post_meta( $subscription_id, '_woo_pp_txnData' );\n\t\tdelete_post_meta( $subscription_id, '_ppec_billing_agreement_id' );\n\t\tdelete_post_meta( $subscription_id, '_paypal_status' );\n\n\t\treturn array( true, false, array( __( 'PayPal Checkout Subscriptions Data Erased.', 'woocommerce-gateway-paypal-express-checkout' ) ) );\n\t}", "public function hasSubscribers(){\n return $this->subscriber_count > 1;\n }", "private function has_publisher_subscription()\n {\n $has_subscription = false;\n if (isset($this->options['subscription']) && $this->options['subscription'] == 1)\n {\n $has_subscription = true;\n }\n return $has_subscription;\n }", "protected function subscriptionIsPresent($items)\n {\n if ($items instanceof Collection) {\n foreach ($items as $item) {\n if ($this->quoteItemHelper->hasSubscription($item)) {\n return true;\n }\n }\n }\n return false;\n }", "function wcs_is_subscription( $subscription ) {\n\n\tif ( is_object( $subscription ) && is_a( $subscription, 'WC_Subscription' ) ) {\n\t\t$is_subscription = true;\n\t} elseif ( is_numeric( $subscription ) && 'shop_subscription' == get_post_type( $subscription ) ) {\n\t\t$is_subscription = true;\n\t} else {\n\t\t$is_subscription = false;\n\t}\n\n\treturn apply_filters( 'wcs_is_subscription', $is_subscription, $subscription );\n}", "public function hasActiveSubscription()\n {\n return $this->user->hasActiveSubscription();\n }", "function pgm_subscriber_has_subscription($subscriber_id, $list_id){\n //set default value\n $has_subscription = false;\n\n //get the subscriber from database\n $subscriber = get_post($subscriber_id);\n\n //get subscriptions from database\n $subscriptions = pgm_get_subscriptions($subscriber_id);\n\n //check subscriptions for $list_id\n if(in_array($list_id,$subscriptions)){\n\n $has_subscription = true;\n } else{\n\n //leave to default\n }\n\n return $has_subscription;\n}", "public function hasOrder()\n {\n return $this->_has('_order');\n }", "public function everSubscribed()\n {\n return !empty($this->billing_subscription);\n }", "function subscriptionExists($subscriptionId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT COUNT(*)\n\t\t\tFROM\n\t\t\tsubscriptions s,\n\t\t\tsubscription_types st\n\t\t\tWHERE s.type_id = st.type_id\n\t\t\tAND st.institutional = 1\n\t\t\tAND s.subscription_id = ?',\n\t\t\t$subscriptionId\n\t\t);\n\n\t\t$returner = isset($result->fields[0]) && $result->fields[0] != 0 ? true : false;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "public function existSubscription(Users $customer, Services $service) {\n $subscription = Subscriptions::where([\n 'user_id' => $customer->id,\n 'service_id' => $service->id\n ])->orderBy('id', 'desc')->first();\n \n return $subscription?$subscription:false;\n }", "function subscriptionExists($subscriptionId) {\n\t\t// must be implemented by sub-classes\n\t\tassert(false);\n\t}", "public function hasShoporder(){\n return $this->_has(27);\n }", "function is_subscribed($thread, $subs) {\n foreach ($subs as $sub) {\n if ($sub->threadid == $thread->id) return true;\n }\n return false;\n}", "public function isSubscribed()\n {\n // TODO there seems to be an inconsistency when getting database records via Repository or via ObjectStorage\n // TODO when getting via Repository, a Typo3bb-FrontendUser is returned\n // TODO when getting via ObjectStorage, IglarpTemplate-FrontendUser is returned\n $user = FrontendUserUtility::getCurrentUser();\n if (is_null($user)) {\n return false;\n } else {\n return $this->subscribers->contains($user);\n }\n }", "function subscriptionExistsByUser($subscriptionId, $userId){ \n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT COUNT(*)\n\t\t\tFROM\n\t\t\tsubscriptions s,\n\t\t\tsubscription_types st\n\t\t\tWHERE s.type_id = st.type_id\n\t\t\tAND st.institutional = 1\n\t\t\tAND s.subscription_id = ?\n\t\t\tAND s.user_id = ?',\n\t\t\tarray(\n\t\t\t\t$subscriptionId,\n\t\t\t\t$userId\n\t\t\t)\n\t\t);\n\n\t\t$returner = isset($result->fields[0]) && $result->fields[0] != 0 ? true : false;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "public function hasSubscription($key)\n {\n // check if key is string and not empty\n if (empty($key) || !is_string($key)) {\n require_once 'Zend/Feed/Pubsubhubbub/Exception.php';\n throw new Zend_Feed_Pubsubhubbub_Exception(\n 'Invalid parameter \"key\"' .\n ' of \"' .\n $key .\n '\" must be a non-empty string'\n );\n }\n\n // generate uri with subscription id\n $subscriptionResourceUri = $this->_generateSubscriptionResourceUri(\n $this->_subscriptionConfig->get('classUri'),\n $key\n );\n\n // get the subscription as OntoWiki resource\n $subscriptionResource = new OntoWiki_Model_Resource(\n $this->_selectedModelInstance->getStore(),\n $this->_selectedModelInstance,\n $subscriptionResourceUri\n );\n\n // get all properties of the subscription\n $subscriptionResourceProperties = $subscriptionResource->getValues();\n\n if (0 < count($subscriptionResourceProperties)) {\n return true;\n } else {\n return false;\n }\n }", "public static function is_subscription($items)\n {\n $is_subscription = false;\n if (sizeof($items) == 1) {\n foreach ($items as $cart_item_key => $cart_item) {\n $is_recurrent = (method_exists($cart_item, 'get_meta')) ?\n $cart_item->get_meta('_used_gateway') : get_post_meta($cart_item['product_id'], '_mp_recurring_is_recurrent', true);\n if ($is_recurrent == 'yes') {\n $is_subscription = true;\n }\n }\n }\n return $is_subscription;\n }", "public function isSubscribed()\n {\n return null !== $this->queue;\n }", "public function subscribed()\n {\n if ($this->billing_free) {\n if (!$this->billing_subscription_ends_at\n || time() < strtotime($this->billing_subscription_ends_at)\n ) {\n return true;\n }\n }\n \n if (!isset($this->cardUpFront) || $this->cardUpFront) {\n return $this->billingIsActive() || $this->onGracePeriod();\n }\n \n return $this->billingIsActive() || $this->onGracePeriod() || $this->onTrial();\n }", "function checkSubscriptionRenewal($order)\n {\n $plan = & $order['PaidOrder']['plan_info']['plan_array'];\n if($order['PaidOrder']['order_status'] == 'Complete') /* The order had already been procesed in the past */\n {\n $PaidTxnLog = ClassRegistry::getClass('PaidTxnLogModel');\n $PaidTxnLog->addNote(\"Subscription Renewal\");\n $new_expiration = PaidOrderModel::getExpirationDate($plan['duration_period'],$plan['duration_number'],$order['PaidOrder']['order_expires']);\n $order['PaidOrder']['order_expires'] = $new_expiration;\n $plan['moderation'] = 0; // If it was published before no need to moderate it again\n }\n\n return $order;\n }", "function wcs_get_subscription( $the_subscription ) {\n\n\tif ( is_object( $the_subscription ) && wcs_is_subscription( $the_subscription ) ) {\n\t\t$the_subscription = $the_subscription->get_id();\n\t}\n\n\t$subscription = WC()->order_factory->get_order( $the_subscription );\n\n\tif ( ! wcs_is_subscription( $subscription ) ) {\n\t\t$subscription = false;\n\t}\n\n\treturn apply_filters( 'wcs_get_subscription', $subscription );\n}", "public function canHandleSubscriptions():bool\n {\n return false;\n }", "public function checkIfOrderExist($orderId);", "public function getIsSubscribedToAttribute()\n {\n return $this->subscriptions()\n ->where('user_id', auth()->id())\n ->exists();\n }", "public function addSubscription()\n {\n $custId = $this->request->id;\n $customerObj = $this->_customer->find($custId);\n if (! is_object($customerObj)) {\n return false;\n }\n $fromDate = $this->request->start_date;\n $planId = $this->request->subscription_plan;\n $orderId = $this->request->orderid;\n $getPlan = SubscriptionPlan::where('id', $planId)->first();\n $duration = $getPlan->duration;\n $planName = $getPlan->name;\n $date = Carbon::createFromFormat('d-m-Y', $fromDate);\n $fromDate = Carbon::createFromFormat('d-m-Y', $fromDate)->format('Y-m-d');\n $endDate = $date->addDays($duration);\n $customerObj->expires_at = $endDate;\n $customerObj->save();\n $subscriber = new Subscribers();\n $subscriber->subscription_plan_id = $planId;\n $subscriber->customer_id = $custId;\n $subscriber->start_date = $fromDate;\n $subscriber->end_date = $endDate;\n $subscriber->is_active = 1;\n $subscriber->save();\n $paymentTrans = new PaymentTransactions();\n $paymentTrans->payment_method_id = 2;\n $paymentTrans->customer_id = $custId;\n $paymentTrans->status = \"Success\";\n $paymentTrans->transaction_message = \"Success\";\n $paymentTrans->transaction_id = $orderId;\n $paymentTrans->response = \"Success\";\n $paymentTrans->plan_name = $planName;\n $paymentTrans->subscriber_id = $custId;\n $paymentTrans->subscription_plan_id = $planId;\n $paymentTrans->save();\n return true;\n }", "public function test_payOrder_called_withSubscriptionShouldRemoveWalletSubscription()\n {\n $expected = Wallet::create(0,0,9800);\n $user = UserMother::aUserWith50EurInItsSubscriptionWallet()->build();\n $order = OrderMother::aJustOrderWithSubscription()->buildWithWallet();\n $entityManager_stub = $this->getEntityManagerDouble();\n $entityManager_stub->persist($user)->shouldBeCalled();\n $entityManager_stub->flush($user)->shouldBeCalled();\n $sut = new WalletService($this->getEntityManagerRevealed(), $this->currencyConversionService_double->reveal(),$this->transactionService_double->reveal());\n $actual = $sut->payOrder($user,$order);\n $this->assertEquals($expected,$actual->getWallet());\n }", "function _culturefeed_mailing_check_user_subscription($user_id, $mailing_id) {\n try {\n $subscriptions = DrupalCultureFeed::getMailingSubscriptions($user_id)->objects;\n $newsletters = array();\n foreach ($subscriptions as $subscription) {\n $newsletters[$subscription->id] = $subscription->id;\n }\n return in_array($mailing_id, $newsletters);\n }\n catch (Exception $e) {\n watchdog_exception('culturefeed_mailing', $e);\n return FALSE;\n }\n}", "function harvest_in_order( $order ) {\n\n\t$items = $order->get_items(); \n\n\tforeach ( $items as $item_id => $item ) {\n\n\t\tif ( $item->get_product_id() === 37592 ) {\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\n\t}\n\t\n\treturn false;\n\n}", "public function hasOrder() {\n return $this->_has(2);\n }", "public function isSubscribed(): bool;", "function wcs_is_view_subscription_page() {\n\tglobal $wp;\n\n\treturn ( is_page( wc_get_page_id( 'myaccount' ) ) && isset( $wp->query_vars['view-subscription'] ) ) ? true : false;\n}", "function subscriptionExistsByUser($subscriptionId, $userId) {\n\t\t// must be implemented by sub-classes\n\t\tassert(false);\n\t}", "function subscriptionExistsByUserForJournal($userId, $journalId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT COUNT(*)\n\t\t\tFROM\n\t\t\tsubscriptions s,\n\t\t\tsubscription_types st\n\t\t\tWHERE s.type_id = st.type_id\n\t\t\tAND st.institutional = 1\n\t\t\tAND s.user_id = ?\n\t\t\tAND s.journal_id = ?',\n\t\t\tarray(\n\t\t\t\t$userId,\n\t\t\t\t$journalId\n\t\t\t)\n\t\t);\n\n\t\t$returner = isset($result->fields[0]) && $result->fields[0] != 0 ? true : false;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "function subscriptionExistsByUserForJournal($userId, $journalId) {\n\t\t// must be implemented by sub-classes\n\t\tassert(false);\n\t}", "public function canStoreOrder();", "public function hasActiveOrders()\n {\n }", "public function status_subscription(){\n\t\t\treturn true;\n\t\t}", "public function isOrder();", "protected function hasCreatedPackSubscription(): bool\n {\n return !!$this->packSubscription;\n }", "public function onSubscriptionActivate(SubscriptionInterface $subscription, OrderInterface $order);", "public function hasOrderid(){\n return $this->_has(8);\n }", "public static function paidOrderFilter(Request $request, $order)\n {\n $subscriber = User::findOrFail( $order->subscriber_id);\n $subscription = Subscription::where('subscription_id', $order->subscription_id)->firstOrFail();\n\n // validate amount\n /*if ($r->mc_gross != $subscription->subscription_price) {\n \\Log::error('On subscription #' . $subscription->id . ' received amount was ' . $r->mc_gross . ' while the cost of subscription is ' . $subscription->subscription_price);\n exit;\n }*/\n\n // update expires\n $subscription->subscription_expires = now()->addMonths(1);\n $subscription->status = 'Active';\n $subscription->save();\n\n // notify creator on site & email\n $creator = $subscription->creator;\n $creator->notify(new NewSubscriberNotification($subscriber));\n\n // update creator balance\n $creator->balance += $subscription->creator_amount;\n $creator->save();\n\n // create invoice to be able to have stats in admin\n $i = new Invoice;\n $i->invoice_id = $subscription->subscription_id;\n $i->user_id = $subscription->subscriber_id;\n $i->subscription_id = $subscription->id;\n $i->amount = $subscription->subscription_price;\n $i->payment_status = 'Paid';\n $i->invoice_url = '#';\n $i->save();\n\n //YourOrderController::saveOrderAsPaid($order);\n\n // Return TRUE if the order is saved as \"paid\" in the database or FALSE if some error occurs.\n // If you return FALSE, then you can repeat the failed paid requests on the unitpay website manually.\n return true;\n }", "public function isSubscribedBy($userId = null): bool;", "public static function searchOrderFilter(Request $request, $order_id) {\n\n if(strpos($order_id, 'tip') !== false) {\n\n }\n else {\n $subscription = Subscription::where('subscription_id', $order_id)->firstOrFail();\n if ($subscription) {\n\n $subscription['UNITPAY_orderSum'] = $subscription->subscription_price; // from your database\n $subscription['UNITPAY_orderCurrency'] = 'RUB'; // from your database\n\n // if the current_order is already paid in your database, return strict \"paid\";\n // if not, return something else\n if($subscription->status == 'Active')\n $status = 'paid';\n else\n $status = $subscription->status;\n $subscription['UNITPAY_orderStatus'] = $status;//$subscription->staus; // from your database\n\n return $subscription;\n }\n }\n\n return false;\n }", "protected function hasSuccessfullySubscribedAccounts(): bool\n {\n return $this->getSubscribedSubscriptions()->count() === $this->accounts->count();\n }", "function comment_subscription_status() {\n\tglobal $comment;\n\treturn !!_stc()->is_subscribed( $comment->comment_ID );\n}", "public function hasSub()\n {\n if(is_null($this->items) || !count($this->items)) return false;\n return true;\n }", "public function hasInvoiceNeedsCapture($order)\n {\n foreach ($order->getInvoiceCollection() as $invoice) {\n /* @var $invoice Mage_Sales_Model_Order_Invoice */\n if ($invoice->canCapture()) {\n return true;\n }\n }\n\n return false;\n }", "public function hasItems () {\n\n $order = $this->getOrder();\n\n if ( !$order ) {\n return false;\n }\n\n return $order->hasItems();\n }", "function isSubscribed($number, $service) {\n\t\t$sql = \"SELECT * FROM \\\"Subscriptions\\\" WHERE \\\"Number\\\" = '$number' \" . \n\t\t\"AND \\\"Service\\\" = '$service'\";\n\t\t$result = pg_query($this->dbConnection, $sql);\n\t\tif (pg_num_rows($result) > 0) {\n\t\t\t$subscription = pg_fetch_array($result);\n\t\t\treturn $subscription[\"Status\"];\n\t\t} else {\n\t\t\treturn \"Not Subscribed\";\n\t\t}\n\t}", "public function supports($subjectOrOrderItem)\n {\n if ($subjectOrOrderItem instanceof SubscriptionInterface) {\n return true;\n }\n\n if ($subjectOrOrderItem instanceof OrderItemInterface) {\n return $subjectOrOrderItem->getSubjectType() === $this->getName()\n && array_key_exists('id', $subjectOrOrderItem->getSubjectData());\n }\n\n return false;\n }", "public function isSubscribed($key) {\n if (isset($this->notifications['all']) && !$this->notifications['all']) {\n return false;\n }\n if (isset($this->notifications[$key]) && !$this->notifications[$key]) {\n return false;\n }\n return true;\n }", "private function members_can_be_invited( $subscription ){\n return pms_gm_get_used_seats( $subscription->id ) >= pms_gm_get_total_seats( $subscription ) ? false : true;\n }", "function is_purchased($song){\n if (in_array($song, $this->purchased_songs)){\n return True;\n }\n return False;\n }", "function hasOrder($user_id, $order_id)\n {\n $order = $this->order($order_id)\n ->where('uzivatele_id', $user_id)\n ->fetch();\n\n return $order !== false;\n }", "public function canSubscribe()\n {\n if ($this->getDateLimitSigningUp() > date('Y-m-d H:i:s') && count($this->getParticipants())<$this->getNbSigningUpMax() && $this->getState()->getId() == 2)\n {\n return true;\n }\n return false;\n }", "public function canInvoice($order)\n {\n if ($order->getPayment()->canCapture()) {\n foreach ($order->getAllItems() as $item) {\n /* @var $item Mage_Sales_Model_Order_Item */\n if ($item->getQtyToInvoice() > 0) {\n return true;\n }\n }\n }\n\n return false;\n }", "private function getSubscription()\n {\n $members = [];\n $page = 1;\n while(count($members) > 0 || $page === 1) {\n $members = $this->mangopay->listUsers($page);\n foreach ($members as $member) {\n if ($member->Email === 'user-vip@prono-bet.com') {\n // check wallet\n $wallets = $this->mangopay->listWallets($member->Id);\n foreach ($wallets as $wallet) {\n if ($wallet->Balance->Amount > 10) {\n $this->createUserSubscription($member->Id, $wallet);\n return true;\n }\n }\n }\n }\n $page++;\n }\n\n return false;\n }", "public function activated_subscription( $order ) {\n\n\t\t// set properties\n\t\t$properties = apply_filters( 'wc_kissmetrics_activated_subscription_properties',\n\t\t\tarray(\n\t\t\t\t'subscription_name' => WC_Subscriptions_Order::get_item_name( $order ),\n\t\t\t\t'total_initial_payment' => WC_Subscriptions_Order::get_total_initial_payment( $order ),\n\t\t\t\t'initial_sign_up_fee' => WC_Subscriptions_Order::get_sign_up_fee( $order ),\n\t\t\t\t'subscription_period' => WC_Subscriptions_Order::get_subscription_period( $order ),\n\t\t\t\t'subscription_interval' => WC_Subscriptions_Order::get_subscription_interval( $order ),\n\t\t\t\t'subscription_length' => WC_Subscriptions_Order::get_subscription_length( $order ),\n\t\t\t\t'subscription_trial_period' => WC_Subscriptions_Order::get_subscription_trial_period( $order ),\n\t\t\t\t'subscription_trial_length' => WC_Subscriptions_Order::get_subscription_trial_length( $order )\n\t\t\t), $order, $this\n\t\t);\n\n\t\t// record event\n\t\t$this->api_record_event( $this->event_name['activated_subscription'],\n\t\t\tarray(\n\t\t\t\t$this->property_name['subscription_name'] => $properties['subscription_name'],\n\t\t\t\t$this->property_name['total_initial_payment'] => $properties['total_initial_payment'],\n\t\t\t\t$this->property_name['initial_sign_up_fee'] => $properties['initial_sign_up_fee'],\n\t\t\t\t$this->property_name['subscription_period'] => $properties['subscription_period'],\n\t\t\t\t$this->property_name['subscription_interval'] => $properties['subscription_period'],\n\t\t\t\t$this->property_name['subscription_length'] => $properties['subscription_interval'],\n\t\t\t\t$this->property_name['subscription_trial_period'] => $properties['subscription_trial_period'],\n\t\t\t\t$this->property_name['subscription_trial_length'] => $properties['subscription_trial_length'],\n\t\t\t),\n\t\t\t$this->get_identity( $order->user_id )\n\t\t);\n\n\t}", "function jobsearch_pdf_pckg_is_subscribed($pckg_id = 0, $user_id = 0)\n{\n if ($user_id <= 0 && is_user_logged_in()) {\n $user_id = get_current_user_id();\n }\n $args = array(\n 'post_type' => 'shop_order',\n 'posts_per_page' => '-1',\n 'post_status' => 'wc-completed',\n 'order' => 'DESC',\n 'orderby' => 'ID',\n 'fields' => 'ids',\n 'meta_query' => array(\n array(\n 'key' => 'package_type',\n 'value' => 'cand_resume',\n 'compare' => '=',\n ),\n array(\n 'key' => 'jobsearch_order_package',\n 'value' => $pckg_id,\n 'compare' => '=',\n ),\n array(\n 'key' => 'jobsearch_order_user',\n 'value' => $user_id,\n 'compare' => '=',\n ),\n ),\n );\n $pkgs_query = new WP_Query($args);\n $pkgs_query_posts = $pkgs_query->posts;\n\n if (!empty($pkgs_query_posts)) {\n foreach ($pkgs_query_posts as $order_post_id) {\n return $order_post_id;\n }\n }\n return false;\n}", "public function isSubscribedToMailchimpList();", "public function containsProduct(Product $product): bool;", "function is_upsell_exists( $order ) {\n\n\t\t$flow_id = wcf()->utils->get_flow_id_from_order( $order->get_id() );\n\n\t\tif ( $flow_id ) {\n\n\t\t\t$navigation = false;\n\n\t\t\t$step_id = wcf()->utils->get_checkout_id_from_order( $order->get_id() );\n\n\t\t\t$next_step_id = wcf()->utils->get_next_step_id( $flow_id, $step_id );\n\n\t\t\tif ( $next_step_id && wcf()->utils->check_is_offer_page( $next_step_id ) ) {\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function is_renew_order_paid($original_order_id) {\n\t$sql = \"SELECT * from orders WHERE original_order_id='$original_order_id' AND status='renew_paid' \";\n\t$result = mysql_query ($sql) or die(mysql_error());\n\tif (mysql_num_rows($result)>0) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n\n}", "public function canOrderBySubscription( $project ): bool\n {\n if ( $project instanceof Project ) {\n $project = $project->code;\n }\n\n // get user's active subscriptions for this project\n $activeSubscriptionsForProject = in_array( $project, $this->activeSubscriptionsForProject )\n ? $this->activeSubscriptionsForProject[ $project ]\n : $this->activeSubscriptionsForProject( $project );\n\n $canOrderByMonthlySubscription = false;\n $canOrderByPayPerDownloadSubscription = false;\n foreach ( $activeSubscriptionsForProject as $userSubscription ) {\n // ask if the user can order by limited-monthly-downloads subscription\n $canOrderByMonthlySubscription = $userSubscription->canUseFeature( config( 'rinvex.subscriptions.features.limited-monthly-downloads' ) );\n\n if ( $canOrderByMonthlySubscription === true ) {\n $this->currentFeature = config( 'rinvex.subscriptions.features.limited-monthly-downloads' );\n $this->currentSubscription = $userSubscription;\n $this->canReleaseOrderBySubscription = true;\n break;\n }\n else {\n // ask if the user can order by pay-per-download subscription\n $canOrderByPayPerDownloadSubscription = $userSubscription->canUseFeature( config( 'rinvex.subscriptions.features.pay-per-download' ) );\n if ( $canOrderByPayPerDownloadSubscription === true ) {\n $this->currentFeature = config( 'rinvex.subscriptions.features.pay-per-download' );\n $this->currentSubscription = $userSubscription;\n $this->canReleaseOrderBySubscription = false;\n break;\n }\n }\n }\n\n if ( $canOrderByMonthlySubscription === true || $canOrderByPayPerDownloadSubscription === true ) {\n return true;\n }\n\n $this->canReleaseOrderBySubscription = false;\n return false;\n }", "public function checkIfSubscriptionIsPaid($subscription_id){\n\t\t$subscription = Braintree_Subscription::find($subscription_id);\n\t\tif(!empty($subscription)){\n\t\t\tif($subscription->status === Braintree_Subscription::ACTIVE || $subscription->status === Braintree_Subscription::PENDING){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private function has_token($hash) {\n\t\tif (!isset($this->tyk_subscriptions) || !is_array($this->tyk_subscriptions)) {\n\t\t\t$user_data = $this->fetch_from_tyk();\n\t\t\tif (!isset($user_data->subscriptions)) {\n\t\t\t\tthrow new Exception('Missing policy subscriptions');\n\t\t\t}\n\t\t\t$this->tyk_subscriptions = array_flip((array) $user_data->subscriptions);\n\t\t}\n\t\treturn isset($this->tyk_subscriptions[$hash]);\n\t}", "private function isSubscribed()\n {\n try\n {\n $request = $_POST;\n\n $uid = userid();\n\n if (!$uid)\n throw_error_msg( lang(\"you_not_logged_in\") ) ;\n\n if( !isset($request['userid']) || $request['userid']==\"\" )\n throw_error_msg(\"userid not provided\");\n\n if( !is_numeric($request['userid']) )\n throw_error_msg(\"invalid userid\");\n\n global $userquery;\n $is_subscribed = $userquery->is_subscribed($request['userid'],$uid);\n \n if(!$is_subscribed)\n {\n throw_error_msg(\"user is not subscribed\"); \n }\n else\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'user is subscribed', \"data\" => $is_subscribed);\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function hasInvoiceItems(): bool\n {\n return ($this->invoices()->count() !== 0) ? true : false;\n }", "protected function shouldAddPayment(): bool\r\n {\r\n return DocumentTypes::hasPayments($this->documentType);\r\n }", "protected function createBasicSubscriptionAndOrder() {\n $subscription = Subscription::create([\n 'type' => 'product_variation',\n 'store_id' => $this->store->id(),\n 'billing_schedule' => $this->billingSchedule,\n 'uid' => $this->user,\n 'payment_method' => $this->paymentMethod,\n 'purchased_entity' => $this->variation,\n 'title' => $this->variation->getOrderItemTitle(),\n 'unit_price' => new Price('2', 'USD'),\n 'state' => 'pending',\n 'starts' => \\Drupal::time()->getRequestTime() - 5,\n 'ends' => \\Drupal::time()->getRequestTime() + 1000,\n ]);\n $subscription->save();\n\n $order_storage = \\Drupal::entityTypeManager()->getStorage('commerce_order');\n $result = $order_storage->getQuery()\n ->condition('type', 'recurring')\n ->pager(1)\n ->execute();\n $this->assertEmpty($result);\n\n $subscription->getState()->applyTransition($subscription->getState()->getTransitions()['activate']);\n $subscription->save();\n\n $orders = $order_storage->loadMultiple($order_storage->getQuery()\n ->condition('type', 'recurring')\n ->execute());\n $this->assertCount(1, $orders);\n $order = reset($orders);\n\n return [$subscription, $order];\n }", "public function orderExists ( $orderId ) {\n\t\treturn $this->mapper->orderExist( $orderId );\n\t}", "public function hasOrders()\n {\n return $this->orders->count();\n }", "public function isAvailable(Order $order)\n {\n $availabilityPolicy = AvailabilityPolicyFactory::create($this, $order);\n\n return $availabilityPolicy->isAvailable();\n }", "public function isSubscribed($in)\n {\n $elt = $this->getElement($in);\n\n return ($elt && ($elt['a'] & self::ELT_IS_SUBSCRIBED));\n }", "abstract public function add_subscription( Payment_Subscription $subscription );", "public function has(ProductInterface $product);", "public function checkAndHandleWCSubscriptionTxnNotif( $midtrans_notification, $order ) {\n // @TAG: order-id-suffix-handling\n $order_id = \n WC_Midtrans_Utils::check_and_restore_original_order_id($midtrans_notification->order_id);\n // Process if this is a subscription transaction\n if ( wcs_order_contains_subscription( $order_id ) || wcs_is_subscription( $order_id ) || wcs_order_contains_renewal( $order_id ) ) {\n // if not subscription and wc status pending, don't process (because that's a recurring transaction)\n if ( wcs_order_contains_renewal( $order_id) && $order->get_status() == 'pending' ) {\n return false;\n }\n $subscriptions = wcs_get_subscriptions_for_order( $order, array( 'order_type' => 'any' ) );\n foreach ( $subscriptions as $subscription ) {\n // Store card token to meta if customer choose save card on previous payment\n if ($midtrans_notification->saved_token_id ) {\n $subscription->update_meta_data('_mt_subscription_card_token',$midtrans_notification->saved_token_id);\n $subscription->save();\n }\n // Customer didn't choose save card option on previous payment\n else {\n $subscription->add_order_note( __( 'Customer didn\\'t tick <b>Save Card Info</b>. <br>The next payment on ' . $subscription->get_date('next_payment', 'site') . ' will fail.', 'midtrans-woocommerce'), 1 );\n $order->add_order_note( __('Customer didn\\'t tick <b>Save Card Info</b>, next payment will fail', 'midtrans-woocommerce'), 1 );\n $subscription->update_meta_data('_mt_subscription_card_token',$midtrans_notification->saved_token_id);\n $subscription->save();\n }\n }\n }\n }", "public function isInvoiced() {\n\t\treturn true;\n\t}", "public function subscriptionConfirmed()\n {\n return $this->status == 'CONFIRMED' ? true : false;\n }", "public function subscribedToPlan($plans, $subscription = 'default')\n {\n $subscription = $this->subscription($subscription);\n\n if ( ! $subscription || ! $subscription->valid()) {\n return false;\n }\n\n foreach ((array)$plans as $plan) {\n if ($subscription->paddle_plan_id === Cashier::getPlanId($plan)) {\n return true;\n }\n }\n\n return false;\n }", "function checkSubscriptions($subscriber,$keyword){\n\t$keyword = strtoupper($keyword);\n\t$sqlCheck=\"select count(*) as duplicates from subscriptions inner join infoChannels on infoChannels.channelID = subscriptions.channelID and keyword like '%$keyword%'and msisdn = '$subscriber'\";\n\t$results=mysql_query($sqlCheck);\n\t\n\t$subLogs=\"About to check whether $subscriber has already subscribed to $keyword \";\n\t$subLogs .= \"SQL CODE: \".$sqlCheck;\n\tlogSubs($subLogs, $_SERVER[\"SCRIPT_FILENAME\"]);\n\t\n\tif(!$results){\n\t\t\n\t\t$dbErr=\"SQL Error: \".mysql_error().\" SQL CODE: \".$sqlCheck;\n\t\tflog($dbErr, $_SERVER[\"SCRIPT_FILENAME\"]);\n\t}else{\n\t\twhile($rows=mysql_fetch_array($results)){\n\t\t\t$duplicates=$rows['duplicates'];\n\t\t\tif($duplicates >= 1){\n\t\t\t\tduplicateSubscriptions($subscriber,$keyword);\n\t\t\t\t$subLogs=\"Duplicate Error: $subscriber has already subscribed to $keyword.\";\n\t\t\t\t#echo \"DUP:n \".$duplicates.\"\\n\";\n\t\t\t\tlogSubs($subLogs, $_SERVER[\"SCRIPT_FILENAME\"]);\n\t\t\t\treturn FALSE;\n\t\t\t}else{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t}\n}", "protected function _maybe_register_callback_in_subscriptions() {\n\t\tif ( ! class_exists( 'WC_Subscriptions_Order' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_action( 'woocommerce_scheduled_subscription_payment_' . $this->id, array( $this, 'scheduled_subscription_payment' ), 10, 2 );\n\t\tadd_action( 'woocommerce_subscription_failing_payment_method_' . $this->id, array( $this, 'update_failing_payment_method' ) );\n\t}", "private function checkIsYourOrder($order)\n {\n $customerData = $this->sessionCustomer->getCustomer();\n $nameCustomerOrder = $order->getCustomerName();\n $nameCustomerSesstion = $customerData->getName();\n if ($nameCustomerOrder !== $nameCustomerSesstion) {\n return false;\n }\n return true;\n }", "public function testIsInscriptionsOpen()\n {\n \n }", "public function existsSubdominio(Shop $shop, \\stdClass $std);", "protected function _canViewOrder($order)\r\n {\r\n $currentOrder = Mage::registry('current_order');\r\n if ($order->getId() && ($order->getId() === $currentOrder->getId())) {\r\n return true;\r\n }\r\n return false;\r\n }", "function create_subscription($subscription) {\n\n // Get codeigniter object instance\n $CI = &get_instance();\n\n // Try to save the subscription\n if ( $CI->base_model->insert('subscriptions', $subscription) ) {\n\n return true;\n\n } else {\n\n return false;\n\n }\n \n }", "public function hasQuantity(): bool;", "public function checkIfSubscriptionIsActive($subscription_id){\n\t\t$subscription = Braintree_Subscription::find($subscription_id);\n\t\tif(!empty($subscription)){\n\t\t\tif($subscription->status != Braintree_Subscription::CANCELED && $subscription->status != Braintree_Subscription::EXPIRED){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "protected function successfullySubscribedAccount(): bool\n {\n return $this->isRelatedAppPaid()\n && $this->isAccountCompatibleWithPlan()\n && $this->foundACustomer()\n && $this->createdASubscription();\n }", "public function testSubscriptionsList()\n {\n }", "public function hasOrdering()\n\t\t{\n\t\t\treturn count($this->order) > 0;\t\t\t\n\t\t}", "function wcs_get_subscriptions( $args ) {\n\tglobal $wpdb;\n\n\t$args = wp_parse_args( $args, array(\n\t\t\t'subscriptions_per_page' => 10,\n\t\t\t'paged' => 1,\n\t\t\t'offset' => 0,\n\t\t\t'orderby' => 'start_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'customer_id' => 0,\n\t\t\t'product_id' => 0,\n\t\t\t'variation_id' => 0,\n\t\t\t'order_id' => 0,\n\t\t\t'subscription_status' => array( 'any' ),\n\t\t\t'meta_query_relation' => 'AND',\n\t\t)\n\t);\n\n\t// if order_id is not a shop_order\n\tif ( 0 !== $args['order_id'] && 'shop_order' !== get_post_type( $args['order_id'] ) ) {\n\t\treturn array();\n\t}\n\n\t// Ensure subscription_status is an array.\n\t$args['subscription_status'] = $args['subscription_status'] ? (array) $args['subscription_status'] : array();\n\n\t// Grab the native post stati, removing pending and adding any.\n\t$builtin = get_post_stati( array( '_builtin' => true ) );\n\tunset( $builtin['pending'] );\n\t$builtin['any'] = 'any';\n\n\t// Make sure status starts with 'wc-'\n\tforeach ( $args['subscription_status'] as &$status ) {\n\t\tif ( isset( $builtin[ $status ] ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$status = wcs_sanitize_subscription_status_key( $status );\n\t}\n\n\t// Prepare the args for WP_Query\n\t$query_args = array(\n\t\t'post_type' => 'shop_subscription',\n\t\t'post_status' => $args['subscription_status'],\n\t\t'posts_per_page' => $args['subscriptions_per_page'],\n\t\t'paged' => $args['paged'],\n\t\t'offset' => $args['offset'],\n\t\t'order' => $args['order'],\n\t\t'fields' => 'ids',\n\t\t'meta_query' => isset( $args['meta_query'] ) ? $args['meta_query'] : array(), // just in case we need to filter or order by meta values later\n\t);\n\n\t// Maybe only get subscriptions created by a certain order\n\tif ( 0 != $args['order_id'] && is_numeric( $args['order_id'] ) ) {\n\t\t$query_args['post_parent'] = $args['order_id'];\n\t}\n\n\t// Map subscription specific orderby values to internal/WordPress keys\n\tswitch ( $args['orderby'] ) {\n\t\tcase 'status' :\n\t\t\t$query_args['orderby'] = 'post_status';\n\t\t\tbreak;\n\t\tcase 'start_date' :\n\t\t\t$query_args['orderby'] = 'date';\n\t\t\tbreak;\n\t\tcase 'trial_end_date' :\n\t\tcase 'end_date' :\n\t\t\t// We need to orderby post meta value: http://www.paulund.co.uk/order-meta-query\n\t\t\t$date_type = str_replace( '_date', '', $args['orderby'] );\n\t\t\t$query_args = array_merge( $query_args, array(\n\t\t\t\t'orderby' => 'meta_value',\n\t\t\t\t'meta_key' => wcs_get_date_meta_key( $date_type ),\n\t\t\t\t'meta_type' => 'DATETIME',\n\t\t\t) );\n\t\t\t$query_args['meta_query'][] = array(\n\t\t\t\t'key' => wcs_get_date_meta_key( $date_type ),\n\t\t\t\t'compare' => 'EXISTS',\n\t\t\t\t'type' => 'DATETIME',\n\t\t\t);\n\t\t\tbreak;\n\t\tdefault :\n\t\t\t$query_args['orderby'] = $args['orderby'];\n\t\t\tbreak;\n\t}\n\n\t// Maybe filter to a specific user\n\tif ( 0 != $args['customer_id'] && is_numeric( $args['customer_id'] ) ) {\n\t\t$query_args['meta_query'][] = array(\n\t\t\t'key' => '_customer_user',\n\t\t\t'value' => $args['customer_id'],\n\t\t\t'type' => 'numeric',\n\t\t\t'compare' => ( is_array( $args['customer_id'] ) ) ? 'IN' : '=',\n\t\t);\n\t};\n\n\t// We need to restrict subscriptions to those which contain a certain product/variation\n\tif ( ( 0 != $args['product_id'] && is_numeric( $args['product_id'] ) ) || ( 0 != $args['variation_id'] && is_numeric( $args['variation_id'] ) ) ) {\n\t\t$query_args['post__in'] = wcs_get_subscriptions_for_product( array( $args['product_id'], $args['variation_id'] ) );\n\t}\n\n\tif ( ! empty( $query_args['meta_query'] ) ) {\n\t\t$query_args['meta_query']['relation'] = $args['meta_query_relation'];\n\t}\n\n\t$query_args = apply_filters( 'woocommerce_get_subscriptions_query_args', $query_args, $args );\n\n\t$subscription_post_ids = get_posts( $query_args );\n\n\t$subscriptions = array();\n\n\tforeach ( $subscription_post_ids as $post_id ) {\n\t\t$subscriptions[ $post_id ] = wcs_get_subscription( $post_id );\n\t}\n\n\treturn apply_filters( 'woocommerce_got_subscriptions', $subscriptions, $args );\n}" ]
[ "0.71747226", "0.71717185", "0.6739315", "0.67205507", "0.65633047", "0.6429702", "0.6339807", "0.6261275", "0.61559397", "0.6135418", "0.611952", "0.6118669", "0.60814667", "0.6044969", "0.6043291", "0.60286", "0.6028257", "0.6006084", "0.59678966", "0.59616643", "0.5951888", "0.59506", "0.5900912", "0.58802", "0.5872384", "0.5866089", "0.5861931", "0.58499813", "0.5841494", "0.58389765", "0.58372784", "0.58302975", "0.5827775", "0.58239657", "0.58233696", "0.5818361", "0.5817224", "0.5807763", "0.5801209", "0.5799419", "0.5793267", "0.57883346", "0.5787651", "0.57059616", "0.57043576", "0.5701649", "0.56949824", "0.56834936", "0.5675987", "0.56652516", "0.56647706", "0.56407547", "0.5633988", "0.56324774", "0.5616773", "0.56158924", "0.55890805", "0.5576661", "0.5570864", "0.5565205", "0.55449986", "0.55447704", "0.55377764", "0.55343336", "0.55156195", "0.54898226", "0.5463602", "0.5445875", "0.54443276", "0.54393274", "0.5424556", "0.5420604", "0.541026", "0.54071486", "0.53955793", "0.5386775", "0.5379395", "0.5373951", "0.5364378", "0.5357159", "0.5355787", "0.53547096", "0.53372914", "0.533405", "0.53282225", "0.5324682", "0.53142613", "0.5309262", "0.52957654", "0.5295695", "0.52907205", "0.5290501", "0.5286389", "0.5285057", "0.52820164", "0.5280079", "0.5279234", "0.5271223", "0.5268452", "0.52651703" ]
0.7819213
0
Get a Subscription renewal url for a Subscriptiontied Membership
Получить URL продления подписки для подписки, связанной с членством
public function get_subscription_renewal_url( $user_membership ) { $subscription_key = $this->get_user_membership_subscription_key( $user_membership->get_id() ); $url = WC_Subscriptions_Renewal_Order::get_users_renewal_link( $subscription_key ); return $url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_renewal_url() {\n\t\t$renewal_url = add_query_arg(\n\t\t\tarray(\n\t\t\t\t'subscription' => $this->get_id(),\n\t\t\t\t'key' => $this->get_key(),\n\t\t\t\t'action' => 'renew',\n\t\t\t), home_url()\n\t\t);\n\n\t\treturn $renewal_url;\n\t}", "public function new_subscription_url($params) {\n return $this->new_limit_url('subscription', $params);\n }", "public function getUrl()\n {\n return \\Util_HandyServerUtils::getCurrentServerRoot() . \"subs/\" . $this->auth_key;\n }", "public function get_subscription_url( $subscription_id, $api_mode = 'live' ) {\n\n\t\treturn add_query_arg(\n\t\t\tarray(\n\t\t\t\t'cmd' => '_profile-merchant-pull',\n\t\t\t\t'flag_flow' => 'merchant',\n\t\t\t\t'mp_id' => $subscription_id,\n\t\t\t),\n\t\t\t$this->get_dashboard_url( $api_mode )\n\t\t);\n\n\t}", "function ical_subscribe() {\n \t$this->wireframe->print_button = false;\n\n $ical_url = assemble_url('ical', array(\n 'token' => $this->logged_user->getToken(true),\n ));\n\n $ical_subscribe_url = str_replace(array('http://', 'https://'), array('webcal://', 'webcal://'), $ical_url);\n\n $this->smarty->assign(array(\n 'ical_url' => $ical_url . '&subscribe=no',\n 'ical_subscribe_url' => $ical_subscribe_url\n ));\n }", "public function get_subscribe_link() {\n\t\t$url = $this->get_subscribe_url();\n\t\treturn sprintf( '<a href=\"%s\">%s</a>', $url, $url );\n\t}", "protected function composeReentryURL()\n\t{\n\t\t$s = SERVER_URL\n\t\t\t\t. $this->model->director->getSiteUrl('account/password_reset_reentry')\n\t\t\t\t. '/' . $this->myAuthID . '/' . $this->myNewToken\n\t\t\t\t;\n//\t\t$this->debugLog( 'Created reentry URL [' . $s\n//\t\t\t\t. '] for email bound for [' . $this->myEmailAddr . '].'\n//\t\t\t\t);\n\t\treturn $s ;\n\t}", "public function getRechargeUrl()\n {\n return $this->get(self::_RECHARGE_URL);\n }", "public function getExternalUpdateProfileUrl();", "public function getUpdateSubscriberUrl()\n {\n return $this->UpdateSubscriberUrl;\n }", "public function membershipAction()\n {\n $common = $this->getServiceLocator()->get('Application\\Model\\Common');\n $api_url = $this->getServiceLocator()->get('config')['api_url']['value'];\n $data = array('status_id' => 1, 'subscription_end_date' => date('Y-m-d', strtotime('+2 days'))); // 2days before subscription end\n $results = $common->subscriptionData($api_url, $data);\n if (count($results) > 0) {\n foreach ($results as $detail) {\n // Start :- Auto renew subscription\n if ($detail['auto_renewal'] == '1') {\n $this->autorenewcodeAction($api_url,$common,$detail);\n // End :- Auto renew subscription\n } \n }\n }\n die;\n }", "public function getUrl() {\n\t\treturn sprintf(self::ENDPOINT, $this->_account);\n\t}", "public static function profile_link( $subscription ) {\n\t\tif ( wcs_is_subscription( $subscription ) && 'paypal' == $subscription->get_payment_method() ) {\n\n\t\t\t$paypal_profile_id = wcs_get_paypal_id( $subscription );\n\n\t\t\tif ( ! empty( $paypal_profile_id ) ) {\n\n\t\t\t\t$url = '';\n\n\t\t\t\tif ( false === wcs_is_paypal_profile_a( $paypal_profile_id, 'billing_agreement' ) ) {\n\t\t\t\t\t// Standard subscription\n\t\t\t\t\t$url = 'https://www.paypal.com/?cmd=_profile-recurring-payments&encrypted_profile_id=' . $paypal_profile_id;\n\t\t\t\t} else if ( wcs_is_paypal_profile_a( $paypal_profile_id, 'billing_agreement' ) ) {\n\t\t\t\t\t// Reference Transaction subscription\n\t\t\t\t\t$url = 'https://www.paypal.com/?cmd=_profile-merchant-pull&encrypted_profile_id=' . $paypal_profile_id . '&mp_id=' . $paypal_profile_id . '&return_to=merchant&flag_flow=merchant';\n\t\t\t\t}\n\n\t\t\t\techo '<div class=\"address\">';\n\t\t\t\techo '<p class=\"paypal_subscription_info\"><strong>';\n\t\t\t\techo esc_html( __( 'PayPal Subscription ID:', 'woocommerce-subscriptions' ) );\n\t\t\t\techo '</strong>';\n\t\t\t\tif ( ! empty( $url ) ) {\n\t\t\t\t\techo '<a href=\"' . esc_url( $url ) . '\" target=\"_blank\">' . esc_html( $paypal_profile_id ) . '</a>';\n\t\t\t\t} else {\n\t\t\t\t\techo esc_html( $paypal_profile_id );\n\t\t\t\t}\n\t\t\t\techo '</p></div>';\n\t\t\t}\n\t\t}\n\n\t}", "function generateSubTokenUrl($nextUrl = null)\n{\n $secure = false;\n $session = true;\n\n if (!$nextUrl) {\n $nextUrl = OPERATIONS_URL;\n }\n\n $url = Zend_Gdata_AuthSub::getAuthSubTokenUri($nextUrl, GDATA_SCOPE, $secure, $session);\n \n return $url;\n}", "public function getUnsubcribeUrl() {\n\t\treturn $this->getEmailActionLink(\"email/unsubscribeWeeklyNews\");\n\t}", "public function getNewsletterUrl()\n {\n return $this->urlBuilder->getUrl('walleycheckout/newsletter');\n }", "public function get_subscribe_url() {\n\n\t\t$podcast = \\Podlove\\Model\\Podcast::get_instance();\n\n\t\t$url = sprintf(\n\t\t\t'%s/feed/%s/',\n\t\t\tget_bloginfo( 'url' ),\n\t\t\t$this->slug\n\t\t);\n\n\t\treturn apply_filters( 'podlove_subscribe_url', $url );\n\t}", "public function subscription($attributes)\n {\n $attributes = shortcode_atts(array('id' => ''), $attributes, 'happyrsubscription');\n\n $id = $attributes['id'];\n if (empty($id)) {\n return 'You are missing company ID. See https://happyr.com/integration/doc/retrieveId';\n }\n\n return 'https://happyr.com/user/spontaneous/'.$id.'/start';\n }", "public function getBaseUrl()\n\t{\n\t\treturn self::URL_MANAGEMENT . '/' . $this->_subscriptionId;\n\t}", "public function getSubscription()\n {\n $recruiter = RecruiterProfile::where(['user_id' => Auth::user()->id])->first();\n if ($recruiter['is_subscribed'] == config('constants.ZeroValue')) {\n $result = view('web.subscription', ['activeTab' => '4']);\n } else {\n $result = redirect('jobtemplates');\n }\n return $result;\n }", "public function getSubscription($request);", "public function getSubscriptionId();", "public function getSubscriptionDetails($request);", "public function getBaseRevokeTokenUrl()\n {\n return 'https://oauth.accounting.sage.com/revoke';\n }", "public function getEditUrl()\n {\n return $this->_urlBuilder->getUrl('*/*/edit', ['id' => $this->getSubscription()->getId()]);\n }", "public function getUnsubscribeUrl() : string\n\t{\n\t\t$utils = $this->getUtilsObj();\n\n\t\treturn $utils->getUnsubscribeUrl($this);\n\t}", "function getAuthSubUrl()\n{\n $next = getCurrentUrl();\n $scope = 'https://docs.google.com/feeds/documents';\n $secure = false;\n $session = true;\n return Zend_Gdata_AuthSub::getAuthSubTokenUri($next, $scope, $secure,\n $session);\n}", "function renewSubscription(&$institutionalSubscription) {\n\t\treturn $this->_renewSubscription($institutionalSubscription);\n\t}", "function create_new_listing_actions_renew_subscription($uid) {\r\n \r\n if (!is_numeric($uid)) {\r\n drupal_set_message(t('Invalid user id specified'), 'error');\r\n return;\r\n }\r\n\r\n // Find all recurring open orders\r\n $query = db_query('SELECT order_id FROM commerce_order WHERE status = :status AND type = :type AND uid = :uid ORDER BY order_id DESC LIMIT 1', array(':status' => 'canceled', ':type' => 'recurring', ':uid' => $uid));\r\n\r\n $result = $query->fetchField();\r\n\r\n if (!$result) {\r\n drupal_set_message(t('Unable to find billing cycle.'), 'error');\r\n return;\r\n }\r\n\r\n $order = commerce_order_load($result);\r\n $order->status = 'recurring_open';\r\n commerce_order_save($order);\r\n\r\n drupal_set_message(t('Your subscription will be renewed automatically.'));\r\n}", "public function getSponsorlink() {}", "public function getRssUrl()\n {\n return Mage::getUrl('tpl_eventsmanager/invitationstatus/rss');\n }", "function getUnsubscribeUrl($object) {\n return assemble_url('project_object_unsubscribe_user', array(\n 'project_id' => $object->getProjectId(),\n 'object_id' => $object->getId(),\n 'user_id' => $this->getId(),\n ));\n }", "protected function _getAuthUrl()\n {\n\t\t$url = CS_REST_General::authorize_url(\n\t\t\t$this->_getClientId(),\n\t\t\t$this->_getAuthRedirectUri(),\n\t\t\t'ImportSubscribers,ManageLists'\n\t\t);\n\t\t\n return $url;\n }", "public function getSubscriptionId()\n\t{\n\t\treturn $this->_subscriptionId;\n\t}", "public function getSubscription()\n {\n return $this->subscription;\n }", "public function getReinitUrl()\n {\n return $this->urlBuilder->getUrl('walleycheckout/reinit');\n }", "function _renewSubscription(&$subscription) {\n\t\tif ($subscription->isNonExpiring()) return;\n\n\t\t$subscriptionTypeDao =& DAORegistry::getDAO('SubscriptionTypeDAO');\n\t\t$subscriptionType =& $subscriptionTypeDao->getSubscriptionType($subscription->getTypeId());\n\n\t\t$duration = $subscriptionType->getDuration();\n\t\t$dateEnd = strtotime($subscription->getDateEnd());\n\n\t\t// if the subscription is expired, extend it to today + duration of subscription\n\t\t$time = time();\n\t\tif ($dateEnd < $time ) $dateEnd = $time;\n\n\t\t$subscription->setDateEnd(mktime(23, 59, 59, date(\"m\", $dateEnd)+$duration, date(\"d\", $dateEnd), date(\"Y\", $dateEnd)));\n\n\t\t// Reset reminder dates\n\t\t$subscription->setDateRemindedBefore(null);\n\t\t$subscription->setDateRemindedAfter(null);\n\n\t\t$this->updateSubscription($subscription);\n\t}", "public function getSchedulesUrl()\n {\n if ($listKey = Mage::getStoreConfig('bs_register/schedule/url_rewrite_list')) {\n return Mage::getUrl('', array('_direct'=>$listKey));\n }\n return Mage::getUrl('bs_register/schedule/index');\n }", "public function onSubscriptionRenew(SubscriptionInterface $subscription, OrderInterface $order, OrderInterface $next_order);", "public function getBaseRefreshTokenUrl()\n {\n return \"https://$this->dataCenter.adobesign.com/oauth/refresh\";\n }", "public function getActivationUrl() {\n\t\t$activationUrl = '/registration/activation';\n\t\tif (isset ( $this->profile )) {\n\t\t\t$params ['key'] = $this->activationKey;\n\t\t\t$params ['email'] = $this->profile->email;\n\t\t\t\n\t\t\treturn Yii::app ()->controller->createAbsoluteUrl ( $activationUrl, $params );\n\t\t}\n\t}", "protected function verificationUrl($notifiable)\n {\n return URL::temporarySignedRoute(\n 'verificationapi.verify', Carbon::now()->addMinutes(60), ['id' => $notifiable->getKey()]\n ); // this will basically mimic the email endpoint with get request\n }", "function user_subscription_plans()\n {\n global $ilance, $phrase, $ilconfig;\n \n $notice = $failedrenewalusernames = $noautopayrenewalusernames = $paidrenewalusernames = $freerenewalusernames = '';\n $failedrenewalcount = $noautopayrenewalcount = $paidrenewalcount = $freerenewalcount = 0;\n $slng = isset($_SESSION['ilancedata']['user']['slng']) ? $_SESSION['ilancedata']['user']['slng'] : 'eng'; \n \n\t\t// find all plans that have expired- don't include recurring subscriptions..\n $subscriptioncheck = $ilance->db->query(\"\n SELECT u.*, s.id, s.subscriptionid, s.user_id, s.paymethod, s.startdate, s.renewdate, s.autopayment as subscription_autopayment, s.active, s.cancelled, s.migrateto, s.migratelogic, s.recurring, s.invoiceid, s.roleid, s.autorenewal\n FROM \" . DB_PREFIX . \"subscription_user AS s,\n \" . DB_PREFIX . \"users AS u\n WHERE u.user_id = s.user_id\n AND s.renewdate <= '\" . DATETODAY . \" \" . TIMENOW . \"'\n AND s.cancelled = '0'\n AND s.recurring = '0'\n AND u.status = 'active'\n GROUP BY u.user_id\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($subscriptioncheck) > 0)\n {\n \t\n\t\t\t\n while ($res_subscription_check = $ilance->db->fetch_array($subscriptioncheck, DB_ASSOC))\n {\n // #### AUTO SUBSCRIPTION MIGRATION ############\n // did admin specify this subscription plan will migrate the user to another?\n if ($res_subscription_check['migrateto'] > 0)\n {\n $sql_subscription_plan = $ilance->db->query(\"\n SELECT subscriptionid, title_\" . $slng . \" AS title, description_\" . $slng . \" AS description, cost, length, units, subscriptiongroupid, roleid, active, canremove, visible_registration, visible_upgrade, icon, migrateto, migratelogic\n FROM \" . DB_PREFIX . \"subscription\n WHERE subscriptionid = '\" . $res_subscription_check['migrateto'] . \"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql_subscription_plan) > 0)\n {\n $subscription_plan_result = $ilance->db->fetch_array($sql_subscription_plan, DB_ASSOC);\n $sql_user = $ilance->db->query(\"\n SELECT user_id, email, username\n FROM \" . DB_PREFIX . \"users\n WHERE user_id = '\" . $res_subscription_check['user_id'] . \"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql_user) > 0)\n {\n $res_user = $ilance->db->fetch_array($sql_user, DB_ASSOC);\n switch ($res_subscription_check['migratelogic'])\n {\n\t\t\t\t\t\t\t\t// no transaction will be created\n case 'none':\n {\n $subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n $subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"subscription_user\n SET active = 'yes',\n renewdate = '\" . $subscription_renew_date . \"',\n startdate = '\" . DATETIME24H . \"',\n subscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n migrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n migratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n invoiceid = '0'\n WHERE user_id = '\" . $res_user['user_id'] . \"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n $freerenewalusernames .= $res_user['username'] . ', ';\n $freerenewalcount++;\n break;\n } \n // insert waived transaction & activate new subscription plan\n\t\t\t\t\t\t\t\tcase 'waived':\n {\n $renewed_invoice_id = $ilance->accounting->insert_transaction(\n intval($res_subscription_check['subscriptionid']),\n 0,\n 0,\n intval($res_user['user_id']),\n 0,\n 0,\n 0,\n '{_subscription_payment_for} ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n '0.00',\n '0.00',\n 'paid',\n 'subscription',\n $res_subscription_check['paymethod'],\n DATETIME24H,\n DATEINVOICEDUE,\n DATETIME24H,\n '{_subscription_plan_migrated_to} ' . $subscription_plan_result['title'],\n 0,\n 0,\n 1\n );\n $subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n $subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"subscription_user\n SET active = 'yes',\n renewdate = '\" . $subscription_renew_date . \"',\n startdate = '\" . DATETIME24H . \"',\n subscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n migrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n migratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n invoiceid = '\" . $renewed_invoice_id.\"'\n WHERE user_id = '\" . $res_user['user_id'].\"'\n LIMIT 1\n \", 0, null, __FILE__, __LINE__);\n $freerenewalusernames .= $res_user['username'] . ', ';\n $freerenewalcount++;\n break;\n } \n // insert unpaid transaction & deactivate new subscription plan\n\t\t\t\t\t\t\t\tcase 'unpaid':\n {\n\t\t\t\t\t\t\t\t\tif ($res_subscription_check['active'] == 'yes')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// customer may log-in and make payment via online account\n\t\t\t\t\t\t\t\t\t\t$renewed_invoice_id = $ilance->accounting->insert_transaction(\n\t\t\t\t\t\t\t\t\t\t\t$res_subscription_check['subscriptionid'],\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t$res_user['user_id'],\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t'{_subscription_payment_for} ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n\t\t\t\t\t\t\t\t\t\t\tsprintf(\"%01.2f\", $subscription_plan_result['cost']),\n\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t'scheduled',\n\t\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t\t$res_subscription_check['paymethod'],\n\t\t\t\t\t\t\t\t\t\t\tDATETIME24H,\n\t\t\t\t\t\t\t\t\t\t\tDATEINVOICEDUE,\n\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\t'{_subscription_plan_migrated_to} ' . $subscription_plan_result['title'],\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t1\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t// update subscription table\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"subscription_user\n\t\t\t\t\t\t\t\t\t\t\tSET active = 'no',\n\t\t\t\t\t\t\t\t\t\t\tsubscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n\t\t\t\t\t\t\t\t\t\t\tmigrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n\t\t\t\t\t\t\t\t\t\t\tmigratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n\t\t\t\t\t\t\t\t\t\t\tinvoiceid = '\" . $renewed_invoice_id . \"'\n\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t// log subscription email for today so we do not resend\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\t\t(subscriptionlogid, user_id, date_sent)\n\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t'\" . $res_user['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"')\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t// insert subscription invoice reminder so we don't resend again today\n\t\t\t\t\t\t\t\t\t\t$dateremind = $ilance->datetimes->fetch_date_fromnow($ilconfig['invoicesystem_daysafterfirstreminder']);\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"invoicelog\n\t\t\t\t\t\t\t\t\t\t\t(invoicelogid, user_id, invoiceid, invoicetype, date_sent, date_remind)\n\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t'\" . $res_subscription_check['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . $renewed_invoice_id . \"',\n\t\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . $dateremind . \"')\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t}\n $failedrenewalusernames .= $res_user['username'] . ', ';\n $failedrenewalcount++;\n break;\n } \n // create paid transaction\n\t\t\t\t\t\t\t\tcase 'paid':\n {\n $renewed_invoice_id = $ilance->accounting->insert_transaction(\n intval($res_subscription_check['subscriptionid']),\n 0,\n 0,\n intval($res_user['user_id']),\n 0,\n 0,\n 0,\n '{_subscription_payment_for} ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n sprintf(\"%01.2f\", $subscription_plan_result['cost']),\n sprintf(\"%01.2f\", $subscription_plan_result['cost']),\n 'paid',\n 'subscription',\n $res_subscription_check['paymethod'],\n DATETIME24H,\n DATEINVOICEDUE,\n DATETIME24H,\n '{_subscription_plan_migrated_to} ' . $subscription_plan_result['title'],\n 0,\n 0,\n 1\n );\n $subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n $subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"subscription_user\n SET active = 'yes',\n renewdate = '\" . $subscription_renew_date . \"',\n startdate = '\" . DATETIME24H . \"',\n subscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n migrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n migratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n invoiceid = '\" . $renewed_invoice_id . \"'\n WHERE user_id = '\" . $res_user['user_id'] . \"'\n \", 0, null, __FILE__, __LINE__);\n $paidrenewalusernames .= $res_user['username'] . ', ';\n $paidrenewalcount++;\n break;\n }\n }\n if ($res_subscription_check['migratelogic'] != 'none' AND $res_subscription_check['active'] == 'yes')\n {\n\t\t\t\t\t\t\t\t// obtain any unpaid subscription migration invoice\n\t\t\t\t\t\t\t\t$sql_new_invoice = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\tSELECT amount, invoiceid, description\n\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\tWHERE invoiceid = '\" . intval($renewed_invoice_id) . \"'\n\t\t\t\t\t\t\t\t\t\tAND (status = 'unpaid' OR status = 'scheduled')\n\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sql_new_invoice) > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$res_new_invoice = $ilance->db->fetch_array($sql_new_invoice, DB_ASSOC);\n\t\t\t\t\t\t\t\t\tif ($res_subscription_check['subscription_autopayment'] == '1')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// subscription log > did we already sent an email to this customer?\n\t\t\t\t\t\t\t\t\t\t$senttoday = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tSELECT subscriptionlogid\n\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t AND date_sent = '\" . DATETODAY . \"'\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($senttoday) == 0)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// log subscription email for today and send email to customer\n\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\t\t\t(subscriptionlogid, user_id, date_sent)\n\t\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t\t'\" . $res_user['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"')\n\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t// subscription renewal via online account balance\n\t\t\t\t\t\t\t\t\t\t\t$sq1_account_balance = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\tSELECT available_balance, total_balance\n\t\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"users\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sq1_account_balance) > 0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$get_account_array = $ilance->db->fetch_array($sq1_account_balance, DB_ASSOC);\n\t\t\t\t\t\t\t\t\t\t\t\tif ($get_account_array['available_balance'] >= $res_new_invoice['amount'])\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$now_total = $get_account_array['total_balance'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$now_avail = $get_account_array['available_balance'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$new_total = ($now_total - $res_new_invoice['amount']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$new_avail = ($now_avail - $res_new_invoice['amount']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// re-adjust customers online account balance (minus subscription fee amount)\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"users\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET available_balance = '\" . sprintf(\"%01.2f\", $new_avail) . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotal_balance = '\" . sprintf(\"%01.2f\", $new_total) . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// pay existing subscription invoice via online account\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET status = 'paid',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaid = '\" . sprintf(\"%01.2f\", $res_new_invoice['amount']) . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaiddate = '\" . DATETIME24H . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t AND invoiceid = '\" . $res_new_invoice['invoiceid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// adjust members total amount received for referral payments from admin\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->accounting_payment->insert_income_reported($res_user['user_id'], sprintf(\"%01.2f\", $res_new_invoice['amount']), 'credit');\n\t\t\t\t\t\t\t\t\t\t\t\t\t// update customer subscription table with new subscription information\n\t\t\t\t\t\t\t\t\t\t\t\t\t$subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// update subscription table\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"subscription_user\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET active = 'yes',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trenewdate = '\" . $subscription_renew_date . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartdate = '\" . DATETIME24H . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsubscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmigrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmigratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinvoiceid = '\" . $res_new_invoice['invoiceid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->mail = $res_user['email'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->slng = fetch_user_slng($res_user['user_id']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->get('subscription_payment_renewed');\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->set(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{customer}}' => $res_user['username'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{amount}}' => $ilance->currency->format($res_new_invoice['amount']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{description}}' => $res_new_invoice['description'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->send();\n\t\t\t\t\t\t\t\t\t\t\t\t\t$paidrenewalusernames .= $res_user['username'] . ', ';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$paidrenewalcount++; \n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n }\n }\n }\n }\n // #### REGULAR SUBSCRIPTION RENEWAL [NO AUTO-MIGRATION] #######\n else\n {\n $sql_user = $ilance->db->query(\"\n SELECT first_name, last_name, username, email, user_id\n FROM \" . DB_PREFIX . \"users\n WHERE user_id = '\" . $res_subscription_check['user_id'] . \"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql_user) > 0)\n {\n $res_user = $ilance->db->fetch_array($sql_user, DB_ASSOC);\n $ilance->subscription_plan->deactivate_subscription_plan($res_subscription_check['user_id']);\n if ($res_subscription_check['autorenewal'] > 0)\n {\n\t\t\t\t\t\t\t// obtain customer subscription plan information\n\t\t\t\t\t\t\t$sql_subscription_plan = $ilance->db->query(\"\n\t\t\t\t\t\t\t\tSELECT cost, title_\" . $slng . \" AS title, length, units, migrateto, migratelogic, subscriptionid\n\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"subscription\n\t\t\t\t\t\t\t\tWHERE subscriptionid = '\" . $res_subscription_check['subscriptionid'] . \"'\n\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\tif ($ilance->db->num_rows($sql_subscription_plan) > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$subscription_plan_result = $ilance->db->fetch_array($sql_subscription_plan, DB_ASSOC);\n\t\t\t\t\t\t\t\t// if the subscription plan's cost is free, auto-renew subscription for this user\n\t\t\t\t\t\t\t\tif ($subscription_plan_result['cost'] > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$senttoday = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\tSELECT user_id\n\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_subscription_check['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t AND date_sent = '\" . DATETODAY . \"'\n\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($senttoday) == 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// log subscription email for today and send email to customer\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"subscriptionlog\n\t\t\t\t\t\t\t\t\t\t\t(subscriptionlogid, user_id, date_sent)\n\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t'\" . $res_subscription_check['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"')\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t// do we already have a scheduled subscription invoice for this customer?\n\t\t\t\t\t\t\t\t\t\t$sqlpaidchk = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tSELECT invoiceid\n\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\tAND subscriptionid = '\" . $res_subscription_check['subscriptionid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\tAND (status = 'scheduled' OR status = 'unpaid')\n\t\t\t\t\t\t\t\t\t\t\t\tAND invoicetype = 'subscription'\n\t\t\t\t\t\t\t\t\t\t\t\tAND (paid = '0.00' OR paid = '' OR paid = '0')\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sqlpaidchk) > 0)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// yes customer already has pending subscription transaction associated to this subscription id so use this instead\n\t\t\t\t\t\t\t\t\t\t\t$respaid = $ilance->db->fetch_array($sqlpaidchk, DB_ASSOC);\n\t\t\t\t\t\t\t\t\t\t\t$renewed_invoice_id = $respaid['invoiceid'];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$renewed_invoice_id = $ilance->accounting->insert_transaction(\n\t\t\t\t\t\t\t\t\t\t\t\tintval($res_subscription_check['subscriptionid']),\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\tintval($res_user['user_id']),\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t'{_subscription_payment_for}' . ' ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n\t\t\t\t\t\t\t\t\t\t\t\tsprintf(\"%01.2f\", $subscription_plan_result['cost']),\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'scheduled',\n\t\t\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t\t\t$res_subscription_check['paymethod'],\n\t\t\t\t\t\t\t\t\t\t\t\tDATETIME24H,\n\t\t\t\t\t\t\t\t\t\t\t\tDATEINVOICEDUE,\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'',\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t1\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// insert subscription invoice reminder so we don't resend again today\n\t\t\t\t\t\t\t\t\t\t$dateremind = $ilance->datetimes->fetch_date_fromnow($ilconfig['invoicesystem_daysafterfirstreminder']);\n\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"invoicelog\n\t\t\t\t\t\t\t\t\t\t\t(invoicelogid, user_id, invoiceid, invoicetype, date_sent, date_remind)\n\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t\t\t\t'\" . $res_subscription_check['user_id'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . intval($renewed_invoice_id) . \"',\n\t\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t\t'\" . DATETODAY . \"',\n\t\t\t\t\t\t\t\t\t\t\t'\" . $dateremind . \"')\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t// obtain invoice information once again\n\t\t\t\t\t\t\t\t\t\t$sql_new_invoice = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\tSELECT totalamount, invoiceid, amount, description\n\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\t\t\tWHERE invoiceid = '\" . intval($renewed_invoice_id) . \"'\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sql_new_invoice) > 0)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$res_new_invoice = $ilance->db->fetch_array($sql_new_invoice, DB_ASSOC);\n\t\t\t\t\t\t\t\t\t\t\t// auto-payments checkup (user sets this option via subscription menu)\n\t\t\t\t\t\t\t\t\t\t\tif ($res_subscription_check['subscription_autopayment'] == '1')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t// subscription renewal via online account balance\n\t\t\t\t\t\t\t\t\t\t\t\t$sq1_account_balance = $ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tSELECT available_balance, total_balance\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"users\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\tif ($ilance->db->num_rows($sq1_account_balance) > 0)\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t$get_account_array = $ilance->db->fetch_array($sq1_account_balance, DB_ASSOC);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// #### ONLINE ACCOUNT BALANCE CHECK UP ####################################\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($get_account_array['available_balance'] >= $res_new_invoice['totalamount'])\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$now_total = $get_account_array['total_balance'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$now_avail = $get_account_array['available_balance'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$new_total = ($now_total - $res_new_invoice['totalamount']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$new_avail = ($now_avail - $res_new_invoice['totalamount']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// re-adjust customers online account balance (minus subscription fee amount)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"users\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET available_balance = '\" . sprintf(\"%01.2f\", $new_avail) . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotal_balance = '\" . sprintf(\"%01.2f\", $new_total) . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// pay existing subscription invoice via online account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET status = 'paid',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaid = '\" . sprintf(\"%01.2f\", $res_new_invoice['totalamount']) . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaiddate = '\" . DATETIME24H . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t AND invoiceid = '\" . $res_new_invoice['invoiceid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// record spending habits for this user\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->accounting_payment->insert_income_spent($res_user['user_id'], sprintf(\"%01.2f\", $res_new_invoice['totalamount']), 'credit');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// update customer subscription table with new subscription information\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"subscription_user\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET active = 'yes',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trenewdate = '\" . $subscription_renew_date . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartdate = '\" . DATETIME24H . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmigrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmigratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinvoiceid = '\" . $res_new_invoice['invoiceid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t AND subscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->mail = $res_user['email'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->slng = fetch_user_slng($res_user['user_id']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->get('subscription_payment_renewed');\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->set(array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{customer}}' => $res_user['username'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{amount}}' => $ilance->currency->format($res_new_invoice['amount']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{{description}}' => $res_new_invoice['description'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ilance->email->send();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$paidrenewalusernames .= $res_user['username'] . ', ';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$paidrenewalcount++; \n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// create waived transaction\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$renewed_invoice_id = $ilance->accounting->insert_transaction(\n\t\t\t\t\t\t\t\t\t\tintval($res_subscription_check['subscriptionid']),\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\tintval($res_user['user_id']),\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t'{_subscription_payment_for}' . ' ' . $subscription_plan_result['title'] . ' (' . $subscription_plan_result['length'] . print_unit($subscription_plan_result['units']) . ')',\n\t\t\t\t\t\t\t\t\t\t'0.00',\n\t\t\t\t\t\t\t\t\t\t'0.00',\n\t\t\t\t\t\t\t\t\t\t'paid',\n\t\t\t\t\t\t\t\t\t\t'subscription',\n\t\t\t\t\t\t\t\t\t\t'account',\n\t\t\t\t\t\t\t\t\t\tDATETIME24H,\n\t\t\t\t\t\t\t\t\t\tDATEINVOICEDUE,\n\t\t\t\t\t\t\t\t\t\tDATETIME24H,\n\t\t\t\t\t\t\t\t\t\t'{_subscription_plan_was_renewed}',\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t1\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t// update subscription table\n\t\t\t\t\t\t\t\t\t$subscription_length = $this->subscription_length($subscription_plan_result['units'], $subscription_plan_result['length']);\n\t\t\t\t\t\t\t\t\t$subscription_renew_date = print_subscription_renewal_datetime($subscription_length);\n\t\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"subscription_user\n\t\t\t\t\t\t\t\t\t\tSET active = 'yes',\n\t\t\t\t\t\t\t\t\t\trenewdate = '\" . $subscription_renew_date . \"',\n\t\t\t\t\t\t\t\t\t\tstartdate = '\" . DATETIME24H . \"',\n\t\t\t\t\t\t\t\t\t\tsubscriptionid = '\" . $subscription_plan_result['subscriptionid'] . \"',\n\t\t\t\t\t\t\t\t\t\tmigrateto = '\" . $subscription_plan_result['migrateto'] . \"',\n\t\t\t\t\t\t\t\t\t\tmigratelogic = '\" . $subscription_plan_result['migratelogic'] . \"',\n\t\t\t\t\t\t\t\t\t\tinvoiceid = '\" . $renewed_invoice_id . \"'\n\t\t\t\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\t\t$freerenewalusernames .= $res_subscription_check['username'] . ', ';\n\t\t\t\t\t\t\t\t\t$freerenewalcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n \t\t} \n\t }\n }\n }\n if (!empty($paidrenewalusernames))\n {\n $paidrenewalusernames = mb_substr($paidrenewalusernames, 0, -2);\n }\n else\n {\n $paidrenewalusernames = 'None';\n }\n $notice .= \"Renewed $paidrenewalcount paid subscription plans for the following users: $paidrenewalusernames. \";\n if (!empty($freerenewalusernames))\n {\n $freerenewalusernames = mb_substr($freerenewalusernames, 0, -2);\n }\n else\n {\n $freerenewalusernames = 'None';\n }\n $notice .= \"Renewed $freerenewalcount free subscription plans for the following users: $freerenewalusernames. \";\n }\n else\n {\n $notice .= \"No user subscription plans to expire at this time.\"; \n }\n return $notice;\n }", "public function getInscriptionURL(){\n return $this->rootUrl().\"inscription\";\n }", "abstract public function getPaymentPageUrl();", "public function getActivationUrl()\n\t{\n\t\treturn url('account/activate/'.$this->id.'/'.$this->activation_token);\n\t}", "public function createProfile()\n {\n $cart = session()->get('subscription_cart');\n\n if (! $cart) {\n return redirect()->route('admin.subscription.plan.index');\n }\n\n $nvpdo = \"&USER=\" . company()->getSuperConfigData('subscription.payment.paypal.user_name')\n . \"&PWD=\" . company()->getSuperConfigData('subscription.payment.paypal.password')\n . \"&SIGNATURE=\" . company()->getSuperConfigData('subscription.payment.paypal.signature')\n . \"&METHOD=CreateRecurringPaymentsProfile\" \n . \"&VERSION=108\" \n . \"&EMAIL=\" . urlencode($cart['address']['email'])\n . \"&FIRSTNAME=\" . urlencode($cart['address']['first_name'])\n . \"&LASTNAME=\" . urlencode($cart['address']['last_name'])\n . \"&STREET=\" . urlencode($cart['address']['address1'])\n . \"&CITY=\" . urlencode($cart['address']['city'])\n . \"&STATE=\" . urlencode($cart['address']['state'])\n . \"&ZIP=\" . urlencode($cart['address']['postcode'])\n . \"&COUNTRYCODE=\" . urlencode($cart['address']['country'])\n . \"&PAYMENTACTION=Sale\"\n . \"&TOKEN=\" . session()->get('token')\n . \"&PAYERID=\" . session()->get('PayerID')\n . \"&PROFILESTARTDATE=\" . gmdate(\"Y-m-d\\TH:i:s\\Z\")\n . \"&DESC=\" . $cart['plan']->name\n . \"&BILLINGPERIOD=\" . ucfirst($cart['period_unit'])\n . \"&BILLINGFREQUENCY=1\"\n . \"&AUTOBILLOUTAMT=AddToNextBilling\"\n . \"&PROFILEREFERENCE=BookingCommerce\"\n . \"&AMT=\" . round($cart['amount'], 2)\n . \"&CURRENCYCODE=\" . config('app.currency')\n . \"&L_PAYMENTREQUEST_0_ITEMCATEGORYn=Digital\" \n . \"&L_PAYMENTREQUEST_0_NAMEn=\" . $cart['plan']->name \n . \"&L_PAYMENTREQUEST_0_AMTn=\" . round($cart['amount'], 2)\n . \"&L_PAYMENTREQUEST_0_QTYn=1\"\n . \"&MAXFAILEDPAYMENTS=2\";\n \n $doEC = $this->paypalHelper->request($nvpdo);\n\n if ($doEC['ACK'] == \"Success\") {\n \n $recurringProfile = $this->subscriptionHelper->createRecurringProfile($doEC);\n\n $nextDueDate = $this->subscriptionHelper->getNextDueDate($recurringProfile);\n\n $invoice = $this->subscriptionHelper->createInvoice([\n 'recurring_profile' => $recurringProfile,\n 'saas_subscription_purchased_plan_id' => $recurringProfile->purchased_plan->id,\n 'saas_subscription_recurring_profile_id' => $recurringProfile->id,\n 'grand_total' => $recurringProfile->amount,\n 'cycle_expired_on' => $nextDueDate,\n 'customer_email' => $recurringProfile->company->email,\n 'customer_name' => $recurringProfile->company->username,\n 'payment_method' => 'Paypal',\n 'status' => 'Success',\n ]);\n\n $this->recurringProfileRepository->update([\n 'saas_subscription_invoice_id' => $invoice->id,\n 'cycle_expired_on' => $nextDueDate,\n 'next_due_date' => $nextDueDate,\n ], $recurringProfile->id);\n\n\n\n session()->forget('subscription_cart');\n\n session()->flash('success', trans('saassubscription::app.super-user.plans.profile-created-success'));\n\n return redirect()->route($this->_config['redirect']);\n } else {\n session()->flash('error', $doEC['L_LONGMESSAGE0']);\n\n return redirect()->route('admin.subscription.plan.index');\n }\n }", "function subscriptionPlan(){\n\n return view('auth.subscriptionPlan');\n }", "public function is_subscription_linked_to_membership_renewable( $subscription, $user_Membership ) {\n\t\treturn WC_Subscriptions_Renewal_Order::can_subscription_be_renewed( $this->get_user_membership_subscription_key( $user_Membership->get_id() ), $user_Membership->get_user_id() );\n\t}", "public function getRegistrationCompareUrl () {\n\t $date = date('Y-m-d H:i:s', $this->regisrtime);\n\t $date = urlencode($date);\n return 'http://'.$_SERVER['HTTP_HOST'].'/users/confirmregistration/?date='.$date.'&id='.$this->id.'&code='.$this->getRegistrationCode();\n }", "public function getSubscriptionDetails($request)\n {\n //require_once (dirname(__FILE__) . '/Model/GetSubscriptionDetailsResponse.php');\n return MarketplaceWebServiceWebstore_Model_GetSubscriptionDetailsResponse::fromXML($this->_invoke('GetSubscriptionDetails'));\n }", "function renewSubscription(&$subscription) {\n\t\t// must be implemented by sub-classes\n\t\tassert(false);\n\t}", "public function getActivationUrl()\n\t{\n\t\tif (Yum::module('registration')) {\n\t\t\t$activationUrl = Yum::module('registration')->activationUrl;\n\t\t\tif (is_array($activationUrl) && isset($this->profile)) {\n\t\t\t\t$activationUrl = $activationUrl[0];\n\t\t\t\t$params['key'] = $this->activationKey;\n\t\t\t\t$params['email'] = $this->profile->email;\n\n\t\t\t\treturn Yii::app()->controller->createAbsoluteUrl($activationUrl, $params);\n\t\t\t}\n\t\t}\n\t\treturn Yum::t('Activation Url cannot be retrieved');\n\t}", "protected function verificationUrl()\n {\n return Url::temporarySignedRoute(\n 'verification.verify',\n Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),\n ['id' => $this->user->getKey()]\n );\n }", "protected function getApiUrl(): string\n {\n return preg_replace($this->regexPattern,$this->currencyDate,$this->apiEndpoint);\n }", "public function getRegistrationInitURL() {\n\t\treturn Mage::helper(\"adminhtml\")->getUrl(self::URL_REGISTRATION_INIT);\n\t}", "public function getBaseAuthorizationUrl()\n {\n return 'https://redbooth.com/oauth2/authorize';\n }", "public function getUri()\n {\n return 'https://'.$this->getAuth().'@'.self::BASE_URI.'/v1/';\n }", "public function getSubscriptionId() {\n\t\treturn $this->container['subscription_id'];\n\t}", "public function getURL()\n {\n return Config::get('URL') . 'auth/unl/';\n }", "private function getLicenseActivateUrl()\n {\n if (is_null($this->_licenseActivateUrl)) {\n $this->_licenseActivateUrl = ($this->_feedHelper->getStoreConfig(\\Ced\\Booking\\Block\\Extensions::LICENSE_USE_HTTPS_PATH) ? 'https://' : 'http://')\n . $this->_feedHelper->getStoreConfig(self::LICENSE_ACTIVATION_URL_PATH);\n }\n return $this->_licenseActivateUrl;\n }", "public function get_revoke_url() {\n\n $url = new moodle_url('/repository/repository_callback.php');\n $url->param('callback', 'yes');\n $url->param('repo_id', $this->id);\n $url->param('revoke', 'yes');\n $url->param('reloadparentpage', true);\n $url->param('sesskey', sesskey());\n return '<a target=\"_blank\" href=\"'.$url->out(false).'\">'.get_string('revokeyourgoogleaccount', 'repository_googledrive').'</a>';\n }", "function get_checkout_url() {\n\t\t\t$checkout_page_id = get_option('cmdeals_checkout_page_id');\n\t\t\tif ($checkout_page_id) :\n\t\t\t\tif (is_ssl()) return str_replace('http:', 'https:', get_permalink($checkout_page_id));\n\t\t\t\treturn get_permalink($checkout_page_id);\n\t\t\tendif;\n\t\t}", "function checkSubscriptionRenewal($order)\n {\n $plan = & $order['PaidOrder']['plan_info']['plan_array'];\n if($order['PaidOrder']['order_status'] == 'Complete') /* The order had already been procesed in the past */\n {\n $PaidTxnLog = ClassRegistry::getClass('PaidTxnLogModel');\n $PaidTxnLog->addNote(\"Subscription Renewal\");\n $new_expiration = PaidOrderModel::getExpirationDate($plan['duration_period'],$plan['duration_number'],$order['PaidOrder']['order_expires']);\n $order['PaidOrder']['order_expires'] = $new_expiration;\n $plan['moderation'] = 0; // If it was published before no need to moderate it again\n }\n\n return $order;\n }", "protected function getNotificationURL ()\n {\n return Mage::getUrl('securehosting/redirect/notify/', array('_secure' => true));\n }", "function generate_get_premium_url( $url = 'https://generatepress.com/premium' ) \r\n{\r\n\t// Get our URL\r\n\t$url = trailingslashit( $url );\r\n\t\r\n\t// Set up args\r\n\t$args = apply_filters( 'generate_premium_url_args', array(\r\n\t\t'ref' => null,\r\n\t\t'campaign' => null\r\n\t) );\r\n\t\r\n\t// Set up our URL if we have an ID\r\n\tif ( isset( $args[ 'ref' ] ) ) {\r\n\t\t$url = add_query_arg( 'ref', absint( $args[ 'ref' ] ), $url );\r\n\t}\r\n\t\r\n\t// Set up our URL if we have a campaign\r\n\tif ( isset( $args[ 'campaign' ] ) ) {\r\n\t\t$url = add_query_arg( 'campaign', sanitize_text_field( $args[ 'campaign' ] ), $url );\r\n\t}\r\n\t\r\n\t// Return our URL with the optional referral ID\r\n\treturn esc_url( $url );\r\n}", "public function getInvitationsstatusUrl()\n {\n if ($listKey = Mage::getStoreConfig('tpl_eventsmanager/invitationstatus/url_rewrite_list')) {\n return Mage::getUrl('', array('_direct'=>$listKey));\n }\n return Mage::getUrl('tpl_eventsmanager/invitationstatus/index');\n }", "public function getSubscriptionWithId(int $subscriptionId);", "public function getURL()\n {\n return $this->uRL;\n }", "function generateInviteLink(){\n\t\treturn \"https://app.healthlynked.com/#!/group_join_invite/\".$this->secret.\"?return_url=access_control\";\n\t}", "public function woo_slg_linkedin_auth_url() {\n\t\t\t\n\t\t\t//Remove unused scope for login\n\t\t\t\n\t\t\t$scope\t= array( 'r_emailaddress', 'r_liteprofile' );\n\t\t\t\n\t\t\t//load linkedin class\n\t\t\t$linkedin = $this->woo_slg_load_linkedin();\n\t\t\t\n\t\t\t//check linkedin loaded or not\n\t\t\tif( !$linkedin ) return false;\n\t\t\t\n\t\t\t//Get Linkedin config\n\t\t\t$config\t= $this->linkedinconfig;\n\t\t\t\n\t\t\ttry {//Prepare login URL\n\t\t\t\t$preparedurl\t= $this->linkedin->getAuthorizeUrl( $config['appKey'], $config['callbackUrl'], $scope );\n\t\t\t} catch( Exception $e ) {\n\t\t\t\t$preparedurl\t= '';\n\t }\n\t \n\t\t\treturn $preparedurl;\n\t\t}", "public function getSSLUrl()\n {\n return preg_replace('|^http://|i', 'https://', $this->getUrl());\n }", "function _build_url() {\n\t\t// Add transaction ID for better detecting double requests in AUTH server\n\t\tif($GLOBALS['config']['application']['tid'] == '') $GLOBALS['config']['application']['tid'] = rand(0, 10000);\n\n\t\t$url = $this->url.'&action='.$this->action.'&tid='.$GLOBALS['config']['application']['tid'];\n\t\t\n\t\treturn $url;\n\t}", "public function getUrl() {\n return $this->getProfileUri();\n }", "public function getBaseRefreshTokenUrl()\n {\n return $this->getBaseAccessTokenUrl([]);\n }", "function sendMembershipRenewalEmails($row, $config) {\r\n\t\t$jconfig = new JConfig();\r\n\t\t$db = & JFactory::getDBO();\r\n\t\t$fromEmail = $jconfig->mailfrom;\r\n\t\t$fromName = $jconfig->fromname;\r\n\t\t$sql = \"SELECT * FROM #__osmembership_plans WHERE id=\".$row->plan_id ;\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$plan = $db->loadObject();\r\n\t\tif ($row->renew_option_id) {\r\n\t\t\t$numberDays = $row->subscription_length ;\r\n\t\t} else {\r\n\t\t\t$sql = 'SELECT number_days FROM #__osmembership_renewrates WHERE id='.$row->renew_option_id ;\r\n\t\t\t$db->setQuery($sql) ;\r\n\t\t\t$numberDays = $db->loadResult();\r\n\t\t}\t\t\r\n\t\t//Need to over-ridde some config options\r\n\t\t$emailContent = OSMembershipHelper::getEmailContent($config, $row);\r\n\t\t$replaces = array() ;\r\n\t\t$replaces['plan_title'] = $plan->title ;\r\n\t\t$replaces['first_name'] = $row->first_name ;\r\n\t\t$replaces['last_name'] = $row->last_name ;\r\n\t\t$replaces['organization'] = $row->organization ;\r\n\t\t$replaces['address'] = $row->address ;\r\n\t\t$replaces['address2'] = $row->address ;\r\n\t\t$replaces['city'] = $row->city ;\r\n\t\t$replaces['state'] = $row->state ;\r\n\t\t$replaces['zip'] = $row->zip ;\r\n\t\t$replaces['country'] = $row->country ;\r\n\t\t$replaces['phone'] = $row->phone ;\r\n\t\t$replaces['fax'] = $row->phone ;\r\n\t\t$replaces['email'] = $row->email ;\r\n\t\t$replaces['comment'] = $row->comment ;\r\n\t\t$replaces['amount'] = number_format($row->amount, 2) ;\r\n\t\t$replaces['discount_amount'] = number_format($row->discount_amount, 2) ;\r\n\t\t$replaces['tax_amount'] = number_format($row->tax_amount, 2) ;\r\n\t\t$replaces['gross_amount'] = number_format($row->gross_amount, 2) ;\r\n\t\t$replaces['end_date'] = JHTML::_('date', $row->to_date, $config->date_format);\r\n\t\t$replaces['number_days'] = $numberDays ;\r\n\t\t\t\r\n\t\t$replaces['transaction_id'] = $row->transaction_id ;\r\n\t\tif ($row->payment_method) {\r\n\t\t\t$replaces['payment_method'] = JText::_(os_payments::loadPaymentMethod($row->payment_method)->title) ;\r\n\t\t}\r\n\t\t//Should we create map to custom fields\r\n\t\t$sql = 'SELECT field_id, field_value FROM #__osmembership_field_value WHERE subscriber_id = '.$row->id;\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$rowValues = $db->loadObjectList();\r\n\t\t$sql = 'SELECT a.id, a.name FROM #__osmembership_fields AS a WHERE a.published=1 AND (a.plan_id = 0 OR a.plan_id='.$row->plan_id.')';\r\n\t\t$db->setQuery($sql) ;\r\n\t\t$rowFields = $db->loadObjectList();\r\n\t\t$fields = array() ;\r\n\t\tfor ($i = 0 , $n = count($rowFields) ; $i < $n ; $i++) {\r\n\t\t\t$rowField = $rowFields[$i] ;\r\n\t\t\t$fields[$rowField->id] = $rowField->name ;\r\n\t\t}\r\n\t\tfor ($i = 0 , $n = count($rowValues) ; $i < $n ; $i++) {\r\n\t\t\t$rowValue = $rowValues[$i] ;\r\n\t\t\t$replaces[$fields[$rowValue->field_id]] = $rowValue->field_value ;\r\n\t\t}\t\t\t\t\r\n\t\t$subject = $config->user_renew_email_subject ;\t\t\t\t\r\n\t\t$subject = str_replace('[PLAN_TITLE]', $plan->title, $subject) ;\r\n\t\t$body = $config->user_renew_email_body ;\r\n\t\t$body = str_replace('[SUBSCRIPTION_DETAIL]', $emailContent, $body) ;\r\n\r\n\t\t\r\n\t\tforeach ($replaces as $key=>$value) {\r\n\t\t\t$key = strtoupper($key) ;\r\n\t\t\t$body = str_replace(\"[$key]\", $value, $body) ;\r\n\t\t}\r\n\t\t\r\n\t\tif (version_compare(JVERSION, '3.0', 'ge')) {\r\n\t\t\t$j3 = true ;\r\n\t\t\t$mailer = new JMail() ;\r\n\t\t} else {\r\n\t\t\t$j3 = false ;\r\n\t\t}\r\n\t\tif ($j3) {\r\n\t\t\t$mailer->sendMail($fromEmail, $fromName, $row->email, $subject, $body, 1);\r\n\t\t} else {\r\n\t\t\tJUtility::sendMail($fromEmail, $fromName, $row->email, $subject, $body, 1);\r\n\t\t}\t\t\t\t\r\n\t\t//Send emails to notification emails\r\n\t\tif ($config->notification_emails == '')\r\n\t\t\t$notificationEmails = $fromEmail;\r\n\t\telse\r\n\t\t\t$notificationEmails = $config->notification_emails;\r\n\t\t$notificationEmails = str_replace(' ', '', $notificationEmails);\r\n\t\t$emails = explode(',', $notificationEmails);\r\n\t\t$subject = $config->admin_renw_email_subject ;\t\t\r\n\t\t$subject = str_replace('[PLAN_TITLE]', $plan->title, $subject) ;\r\n\t\t$body = $config->admin_renew_email_body ;\r\n\t\t$body = str_replace('[SUBSCRIPTION_DETAIL]', $emailContent, $body);\r\n\t\tforeach ($replaces as $key=>$value) {\r\n\t\t\t$key = strtoupper($key) ;\r\n\t\t\t$body = str_replace(\"[$key]\", $value, $body) ;\r\n\t\t}\r\n\t\tfor ($i = 0, $n = count($emails); $i < $n ; $i++) {\r\n\t\t\t$email = $emails[$i];\r\n\t\t\tif ($j3) {\r\n\t\t\t\t$mailer->sendMail($fromEmail, $fromName, $email, $subject, $body, 1);\r\n\t\t\t} else {\r\n\t\t\t\tJUtility::sendMail($fromEmail, $fromName, $email, $subject, $body, 1);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}", "public function getSubscriptionForLicense($licenseKey){\n $this->load->model('ls_api');\n $con = $this->getCon();\n $license = $this->getTableRowByKey(\"Licenses\",\"LicenseKey\",$licenseKey);\n echo \"Total Number of Licenses: $licCount<br>\\n\";\n// die();\n $selected = 0;\n $page = 100;\n $end = 180000;\n while($selected < $licCount){\n $res = $this->queryOLS(\"select * from Licenses order by licenseId limit $selected,$page\");\n $numI = mysqli_num_rows($res);\n echo \"Selected $selected, Number returned: $numI<br>\\n\";\n $i = $selected;\n $selected += $numI;\n if($selected > $end) die();\n \n $emails = [];\n while($license = $res->fetch_assoc()) {\n \n// var_dump($contact);\n $id = $license['licenseId'];\n $key = $license['licenseKey'];\n $ls_info = $this->ls_api->getLicenseInformation($key);\n $exp = $ls_info['UpgradeSubscriptionExpirationDate'];\n// echo \"$key expires on $exp\\n\";\n if(!$exp || $exp == '') continue;\n $exp = date(\"Y-m-d H:i:s\", strtotime($exp));\n echo \"$key expires on $exp\\n\";\n $this->updateOLS('Licenses', ['novaCareExpiration' => $exp], 'licenseId', $id);\n// die();\n \n }\n \n// die();\n }\n }", "public function getURL() {\n $defaultPorts= array(\n 'http' => 80,\n 'https' => 443\n );\n \n // Determine which settings we need to pass\n $xsr= array();\n if (\n ($this->getProduct() != $this->getDefaultProduct()) ||\n ($this->getLanguage() != $this->getDefaultLanguage())\n ) {\n $xsr[]= $this->getProduct();\n $xsr[]= $this->getLanguage();\n }\n if ($this->getSessionId()) $xsr[]= 'psessionid='.$this->getSessionId();\n\n $port= '';\n if (\n $this->getPort() &&\n (!isset($defaultPorts[$this->getScheme()]) ||\n $this->getPort() != $defaultPorts[$this->getScheme()])\n ) {\n $port= ':'.$this->getPort();\n }\n\n\n return sprintf(\n '%s://%s%s/xml/%s%s%s%s',\n $this->getScheme(),\n $this->getHost(),\n $port,\n (sizeof($xsr) ? implode('.', $xsr).'/' : ''),\n $this->getStateName(), \n $this->getQuery() ? '?'.$this->getQuery() : '',\n $this->getFragment() ? '#'.$this->getFragment() : ''\n );\n }", "public function getRevokeAccessTokenUrl() {\n return Mage::helper('adminhtml')->getUrl('adminhtml/aw_vidtest_authsub/revoke', array('api_model_code' => $this->getApiModelCode()));\n }", "protected function getAPIcreditUrl()\n {\n return \"api/credit\";\n }", "function wcs_get_subscription( $the_subscription ) {\n\n\tif ( is_object( $the_subscription ) && wcs_is_subscription( $the_subscription ) ) {\n\t\t$the_subscription = $the_subscription->get_id();\n\t}\n\n\t$subscription = WC()->order_factory->get_order( $the_subscription );\n\n\tif ( ! wcs_is_subscription( $subscription ) ) {\n\t\t$subscription = false;\n\t}\n\n\treturn apply_filters( 'wcs_get_subscription', $subscription );\n}", "public function getUrl()\n {\n return Mage::getUrl('magna_news', array('news_id' => $this->getId(), '_secure' => true));\n }", "abstract public function getAuthorizeUrl(): string;", "function getSubscriptionId(){\n\n $isSubsId = $this->common_model->getsingle(USERS,array('userId'=>$this->session->userdata('userId')));\n\n return !empty($isSubsId) ? $isSubsId->bizSubscriptionId : FALSE;\n \n }", "public function getAuthUrl();", "function createURLLink($purchase_id){\r\n\t\t$p_removed_id = substr($purchase_id, 1);\r\n\t\t$link = '<a href=\"https://www.trademe.co.nz/MyTradeMe/PurchaseSummary.aspx?asid='.$p_removed_id.'\">'.$purchase_id.'</a>';\r\n\t\treturn $link;\r\n\t}", "function wp_registration_url()\n {\n }", "protected function getFetchUrl() {\n $url = 'sites/' . $this->site->get('id') . '/authorizations';\n return $url;\n }", "public function get_subscribe_link( $args = array() ){\n\n\t\t$link = site_url() . '/?feed=wptticsfeeds';\n\n\t\tif ( isset( $args ) && is_array( $args ) ){\n\n\t\t\t// adding author feed links\n\t\t\tif ( isset( $args['author'] ) ){\n\t\t\t\t$user = get_userdata( (int) $args['author'] );\n\t\t\t\t$link = $link . '&wpttauthor=' . $user->user_login;\n\t\t\t}\n\n\t\t} // if\n\n\t\treturn esc_url( $link );\n\n\t}", "public function getSubscriptionKey() { return $this->subscriptionKey; }", "public function get_url()\n\t{\n\t\treturn append_sid($this->phpbb_root_path . 'ucp.' . $this->php_ext, \"i=pm&amp;mode=view&amp;p={$this->item_id}\");\n\t}", "public function getBaseRevokeTokenUrl()\n {\n return \"https://$this->dataCenter.adobesign.com/oauth/revoke\";\n }", "function getResetPasswordUrl() {\n \treturn assemble_url('reset_password', array(\n \t 'user_id' => $this->getId(),\n \t 'code' => $this->getPasswordResetKey(),\n \t));\n }", "protected function get_url()\n {\n return $this->base_url + $this->api_version; \n }", "public function getApiUrl() \n {\n return ( $this->getSSL() ? 'https://' : 'http://' ) . $this->_api_url;\n }", "private static function _getUrl(String $resource)\n {\n if (null == static::$api_url) {\n static::$api_url = 'https://' .\n substr(\n static::$api_key,\n strrpos(static::$api_key, '-') + 1\n ) .\n '.api.mailchimp.com/3.0';\n }\n return rtrim(static::$api_url, '/') . \"/\" . $resource;\n }", "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 getAccountUrl()\n {\n return $this->accountUrl;\n }", "function getSubscriptions ()\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['cms_manager_url']}/resources/subscriptions.json\",array(),'json');\n return $this->createResponse($result,'get My Subscriptions');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "function canRenewMembership($renewOptionId, $fromSubscriptionId) {\r\n\t\treturn true ;\r\n\t}" ]
[ "0.7509436", "0.6820527", "0.63464165", "0.61982125", "0.60496145", "0.604195", "0.6018879", "0.598256", "0.5924393", "0.5900339", "0.58577156", "0.58441734", "0.58365834", "0.58042365", "0.5786703", "0.5777251", "0.57770866", "0.5769336", "0.5738676", "0.5706045", "0.569512", "0.56929386", "0.5651787", "0.5641349", "0.563536", "0.56177694", "0.56022406", "0.55672103", "0.5530574", "0.5520577", "0.5495116", "0.54751897", "0.54577345", "0.54553425", "0.54519534", "0.5437824", "0.5425881", "0.5425704", "0.54118544", "0.5397835", "0.5377839", "0.5357216", "0.5354454", "0.53512734", "0.5340874", "0.5337697", "0.5335168", "0.5333204", "0.52867734", "0.52801335", "0.52789164", "0.5274937", "0.5269241", "0.52552706", "0.5240968", "0.5237664", "0.5224861", "0.52246964", "0.5222397", "0.5217163", "0.52135545", "0.5210641", "0.52044386", "0.5202866", "0.5202679", "0.5178938", "0.5173414", "0.5166851", "0.5152763", "0.51393896", "0.51349217", "0.5133837", "0.5133133", "0.5132702", "0.513101", "0.51296157", "0.5120987", "0.51173234", "0.5116112", "0.51158977", "0.5115743", "0.51128393", "0.51118374", "0.51059663", "0.5103556", "0.5095409", "0.5082906", "0.5075102", "0.507432", "0.5073134", "0.50702745", "0.50619644", "0.5049279", "0.50479585", "0.504741", "0.50463545", "0.5045571", "0.5042308", "0.50421846", "0.50323737" ]
0.7367929
1
end bh products category loop add sorting scripts to footer add_action('genesis_after_footer','bh_ajax_sort_posts');
end bh products category loop add sorting scripts to footer add_action('genesis_after_footer','bh_ajax_sort_posts');
function bh_ajax_sort_posts(){ ?> <script> //add drop-downs to js pages $jq('.select-post-sorting').html( '<form action="#">Sort by:<select name="posts_sort" class="posts_sort"><option value="newest">Release Date, Newest First</option><option value="oldest">Release Date, OIdest First</option><option value="az">Product Title, A-Z</option><option value="za">Product Title, Z-A</option></select> Quantity: <select name="posts_number" class="posts_number"><option value="10">10</option><option value="15">15</option><option value="20">20</option><option value="25" selected>25</option><option value="50">50</option></select></form>' ); //collect dropdown data $jq('.select-post-sorting select').on('change',function(){ //get value from each box $sortby = $jq('.posts_sort').val(); $number = $jq('.posts_number').val(); var loc = String(window.location); $link = loc.substring(0,(loc.lastIndexOf('/')+1)); switch($sortby){ case 'oldest': o = '?orderby=pubdate&order=ASC'; break; case 'az': o = '?orderby=title&order=ASC'; break; case 'za': o = '?orderby=title&order=DESC'; break; default: //newest o = '?orderby=pubdate&order=DESC'; } if($number){ n='&ppp='+$number; }else{ n='&ppp=25'; //default 25 } $link = $link + o + n; //v1 - load new page in div $plist = $jq('.product-category.product-list'); $plist.fadeOut(300,function(){ $jq(this).load($link + ' .product-category.product-list',function(){ $plist.fadeIn(500); // update page url/hash if($link!=window.location){ //window.history.pushState({path:$link},'',$link); } // if new url doesn't match current location }); //end load }); //end fade }); //end jq </script> <?php //v2 - use admin-ajax }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jigoshop_categories_scripts () {\n\t\n\tif( !isset($_GET['taxonomy']) || $_GET['taxonomy'] !== 'product_cat') return;\n\t\n\twp_register_script('jigoshop-categories-ordering', jigoshop::plugin_url() . '/assets/js/categories-ordering.js', array('jquery-ui-sortable'));\n\twp_print_scripts('jigoshop-categories-ordering');\n\t\n}", "function _asc_footer_scripts() {\n\tprint_late_styles();\n\tprint_footer_scripts();\n}", "function script_enqueue() {\n\t$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );\n\tisset($term->term_id) ? $is_detailed_category = get_woocommerce_term_meta( $term->term_id, '_woocommerce_detailed_category', true ) : $is_detailed_category = 0;\n\tif ($is_detailed_category) {\n\t\t// only load ad-gallery if is post : prevent from loading on other pages\n\t\twp_register_script('wc_dc_sortable', plugins_url('/assets/js/sortable.min.js', __FILE__));\n\t\twp_enqueue_script('wc_dc_sortable');\n\t\twp_register_script('wc_dc_loading_cart', plugins_url('/assets/js/loading-cart.min.js', __FILE__));\n\t\twp_enqueue_script('wc_dc_loading_cart');\n\t\twp_register_style( 'wc_dc_sortable_style', plugins_url('/assets/css/style.css', __FILE__) );\n\t\twp_enqueue_style( 'wc_dc_sortable_style' );\n\t}\n}", "function bh_products_category_loop(){\n//post sorting\n\n\n?>\n\n<?php\n//display content\n?>\t\n\n<div class=\"inner\">\n<div class=\"sidebar grid col-220 product-categories\">\n<?php //get_sidebar(); \n//should only be child category, so display parent.\n\nif (is_category()) {\n$this_category = get_category( get_query_var( 'cat' ) );\n}\n\n\n\n//if child category\nif($this_category->category_parent) {\n$parent_cat = get_category($this_category->category_parent);\n//check for third-level cat\n\tif($parent_cat->category_parent){\n\t\t$parent_parent = get_category($parent_cat->category_parent);\n\t\techo '<h2><a href=\"'. get_category_link($parent_parent->cat_ID) .'\">'. $parent_parent->name .'</a></h2>';\n\t\techo '<ul>';\n\t\t$categorylist = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&child_of='.$parent_cat->category_parent.\"&orderby=slug&hide_empty=0&exclude=1649\"); \t\n\t\techo '</ul>';\n\t\t\n\tif ($parent_parent->name == \"Apps\"){\n\techo '<p>&nbsp;</p>';\n\techo '<h2>Platforms</h2>';\n\techo '<ul>';\n\t$platforms = \twp_list_categories('show_count=0&title_li=&use_desc_for_title=0&hide_empty=0&child_of=1649');\n\techo '</ul>';\n\t\n}\n\t\t\n\t}else{\n\t\techo '<h2><a href=\"'. get_category_link($parent_cat->cat_ID) .'\">'. $parent_cat->name .'</a></h2>';\n\t\techo '<ul>';\n\t\t$categorylist = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&child_of='.$this_category->category_parent.\"&orderby=slug&hide_empty=0&exclude=1649\"); \n\t\techo '</ul>';\n\t\t\n\t\tif ($parent_cat->name == \"Apps\"){\n\techo '<p>&nbsp;</p>';\n\techo '<h2>Platforms</h2>';\n\techo '<ul>';\n\t$platforms = \twp_list_categories('show_count=0&title_li=&use_desc_for_title=0&hide_empty=0&child_of=1649');\n\techo '</ul>';\n\t\n}\n\t}\n}else{\n\n//if top-level category\necho '<h2>'. $this_category->name .'</h2>';\necho '<ul>';\n$categorylist = wp_list_categories('show_count=0&title_li=&use_desc_for_title=0&child_of='.$this_category->cat_ID.\"&orderby=slug&hide_empty=0&exclude=1649\");\necho '</ul>';\n\nif ($this_category->name == \"Apps\"){\n\techo '<p>&nbsp;</p>';\n\techo '<h2>Platforms</h2>';\n\techo '<ul>';\n\t$platforms = \twp_list_categories('show_count=0&title_li=&use_desc_for_title=0&hide_empty=0&child_of=1649');\n\techo '</ul>';\n\t\n}\n}\necho '<p>&nbsp;</p>';\n\n\n\n ?>\n\t\n\n</div>\n\n <div id=\"content\" class=\"grid col-700 fit\">\n <!-- <div class=\"select-post-sorting\"></div> -->\n\t\t<?php \n\t\t$cat = get_query_var('cat');\n\t\t$category_info = get_category($cat);\n\t\t//echo 'Is first level? = '. $category_info->parent;\n\t\t\n\t\t$parent_info = get_category($category_info->parent);\n\t\t//echo 'Is second level? = '. $parent_info->parent;\n\t\t\n\t\t$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; //pagination\t\t\n\t\t//$ext_query = '&meta_key=wpcf-pubdate&orderby=meta_value_num&posts_per_page=25&paged='.$paged.'';\n\t\t$sort_meta_key = 0; //init\n\t\t//get sort information from query vars or defaults\n\t\t$sort_orderby = (get_query_var('orderby')) ? get_query_var('orderby') : 'pubdate';\n\t\t$sort_order = (get_query_var('order')) ? get_query_var('order') : 'DESC';\n\t\t$sort_posts_per_page = (get_query_var('ppp')) ? get_query_var('ppp') : '25';\n\t\t\n\t\tif($sort_orderby =='pubdate'){\n\t\t\t$sort_orderby = 'meta_value_num';\n\t\t\t$sort_meta_key = 'wpcf-pubdate';\n\t\t}\n\t\n\t\t$ext_query = array(\n\t\t\t\t\t\t\t\t\t\t\t\t'post_type'=>'products',\n\t\t\t\t\t\t\t\t\t\t\t\t'category_name'=>$category_info->slug,\n\t\t\t\t\t\t\t\t\t\t\t\t'meta_key'=>'wpcf-pubdate',\n\t\t\t\t\t\t\t\t\t\t\t\t'orderby'=>'meta_value_num',\n\t\t\t\t\t\t\t\t\t\t\t\t'order'=>'DESC',\n\t\t\t\t\t\t\t\t\t\t\t\t'posts_per_page'=>'25',\n\t\t\t\t\t\t\t\t\t\t\t\t'tag'=>'listed',\n\t\t\t\t\t\t\t\t\t\t\t\t'paged'=>$paged\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\n\t\tif($sort_meta_key){\n\t\t\t$ext_query['meta_key'] = $sort_meta_key;\t\n\t\t}\n\t\t\n\t\t$title_qual = \"\";\n\t\t//query_posts($query_string . $ext_query );\n\t\tglobal $wp_query;\n\t\t//show only main product of groups, if product-group-parent field is populated, hide the post\n\t\t//edit: needs refinement - only for Bibles, and needs to compare non-existent OR blank\n\t\t// modified 3/18/14 to use custom SQL searching indexed taxonomy instead of custom field\n\t\t\n\t\t\n\t\t$newQuery = $ext_query;\n\t\t//$newQuery = array_replace($wp_query->query_vars, $ext_query);// + $p_groups; //changed for WP 4.0 something in WP_Query changed, found 0 posts\n\t\t//var_dump($newQuery);\n\t\n\t\t\t$books_in_cat = new WP_Query($newQuery);\n\t\t\n\t\t//echo '<br/>#posts: '.$books_in_cat->found_posts; //troubleshooting\n\t\t\t\nif ($books_in_cat->have_posts()) : ?>\n<div>\n<div class=\"product-category product-list\">\n<h2><?php echo $title_qual; ?><?php single_cat_title(); ?> </h2>\n<ul>\n\t\t<?php while ($books_in_cat->have_posts()) : $books_in_cat->the_post(); ?>\n \n <li id=\"post-<?php the_ID(); ?>\" <?php post_class(); ?>>\n\t\t<?php\n\t\t\t bh_thumbnail(get_the_ID(),'medium',true);\n\t\t\t \n\t\t\t $product_title = get_the_title(); //init\n\t\t\t $pg_names = array(); //init\n\t\t\t \n\t\t\t if (has_term('listed','post_tag')){\n\t\t\t\t $pg_names = wp_get_post_terms(get_the_ID(),'product-group',array('fields'=>'names'));\n\t\t\t\t if (!empty($pg_names)){\n\t\t\t\t\t$product_title = reset($pg_names);//change to product group title\n\t\t\t\t }\n\t\t\t\t $pg_names = array(); //re-initalize array\n\t\t\t }\n\t\t\t \n\t\t\t $short_title = wp_trim_words($product_title,8);\n?>\n <a href=\"<?php the_permalink(); ?>\"><?php echo $short_title; ?></a>\n \t\t\t\t<?php $pubdate = get_post_meta(get_the_ID(),'wpcf-pubdate',true); \n\t\t\t\t\t\t\t//turn pubdate into Month Year\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t//modify product list display\n\t\t\t\t\t\t\t//if title is too long, don't show subtitle/authors\n\t\t\t\t\t\t\tif(strlen(get_the_title())<32){\n\t\t\t\t\t\t\t\t//get current category or parent category\n\t\t\t\t\t\t\t\t//get category\n\t\t\t\t\t\t\t\tif($parent_info){\n\t\t\t\t\t\t\t\t\t//if child category\n\t\t\t\t\t\t\t\t\t$current_cat = $parent_info->slug;\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$current_cat = $category_info->slug;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//ge\tt subtitle\n\t\t\t\t\t\t\t$p_subtitle = types_render_field('subtitle', array(\"raw\"=>\"true\"));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//if Bibles or Reference, show subtitle\n\t\t\t\t\t\t\t//echo $current_cat;\n\t\t\t\t\t\t\tif($current_cat =='bibles' || $current_cat == 'reference' || $category_info->slug == 'commentaries' ):\n\t\t\t\t\t\t\t?>\n <span class=\"author-names\"><?php echo $p_subtitle ?></span>\n <?php\t\n\t\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t//else show author(s)\t\n\t\t\t\t\t\t\t//get author name(s)\n\t\t\t\t\t\t\t$a_list=false;\n\t\t\t\t\t\t\t$a_terms = wp_get_post_terms(get_the_ID(), 'a', array(\"fields\" => \"names\"));\n\t\t\t\t\t\t\tif($a_terms){\n\t\t\t\t\t\t\t\t$a_list = implode(', ', $a_terms);\t\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\tif($a_list){\n\t\t\t\t\t\t\t?>\n <span class=\"author-names\"><?php echo $a_list; ?></span>\n <?php\n\t\t\t\t\t\t\t}elseif ($p_subtitle){\n\t\t\t\t\t\t\t//no authors (?) - show subtitle if exists\t\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t <span class=\"author-names\"><?php echo $p_subtitle; ?></span>\n <?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t//title too long, no room for other text\n\t\t\t\t\t\t\t}\n ?>\n </li><!-- end of #post-<?php the_ID(); ?> -->\n \n\n \n <?php endwhile; \n\t\t if(!$hide_navi){\n\t\t if(function_exists('wp_pagenavi')) { \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twp_pagenavi( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'query' =>$books_in_cat \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)\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t }\n\t\t\n\t\t?> \n \n\t\t</ul>\n </div>\n\t <?php else : ?>\n\n <!-- <h1 class=\"title-404\"><?php _e('404 &#8212; Fancy meeting you here!', 'minimum'); ?></h1> -->\n \n <p><?php _e('No products found in '. $parent_info->name.' > '. single_cat_title('',false) .'.', 'minimum'); ?></p>\n \n <!-- <h6><?php printf( __('You can return %s or search for the page you were looking for.', 'minimum'),\n\t sprintf( '<a href=\"%1$s\" title=\"%2$s\">%3$s</a>',\n\t\t esc_url( get_home_url() ),\n\t\t esc_attr__('Home', 'minimum'),\n\t\t esc_attr__('&larr; Home', 'minimum')\n\t )); \n\t\t\t ?></h6>\n \n <?php get_search_form(); ?> -->\n\n<?php endif; ?> \n \n </div><!-- end of #content -->\n</div>\n</div>\n<?php\n}", "function codepress_footer_js()\n {\n }", "function asc_print_footer_scripts() {\n\t/**\n\t * Fires when footer scripts are printed.\n\t *\n\t * @since 2.8.0\n\t */\n\tdo_action( 'asc_print_footer_scripts' );\n}", "function _wp_footer_scripts()\n {\n }", "function wp_footer() {\n SLPlus_Actions::ManageTheScripts();\n\t\t}", "function ct_js_to_footer() {\n remove_action( 'wp_head', 'wp_print_scripts' );\n remove_action( 'wp_head', 'wp_print_head_scripts', 9 );\n remove_action( 'wp_head', 'wp_enqueue_scripts', 1 );\n}", "public function after_footer_scripts_code () {\n // Sets initial JS variables value\n ?>\n <script type=\"text/javascript\">\n ct_current_role = '<?php echo $this->role; ?>';\n ct_current_orderby = '<?php echo $this->orderby; ?>';\n ct_current_order = '<?php echo $this->order; ?>';\n ct_current_page = <?php echo $this->page; ?>;\n ct_total_pages = <?php echo $this->total_pages; ?>;\n </script>\n <?php\n }", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "protected function after_filter()\n {\n $this->render('footer.php');\n }", "function woocommerce_rrp_add_bulk_admin_footer() {\n\t\t\tglobal $post_type;\n\t\t\t\n\t\t\tif($post_type == 'product') {\n\t\t\t\t?>\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tjQuery(document).ready(function() {\n\t\t\t\t\t\t\tjQuery('<option>').val('set_price_to_rrp').text('<?php _e('Set price to RRP')?>').appendTo(\"select[name='action']\");\n\t\t\t\t\t\t\tjQuery('<option>').val('set_price_to_rrp').text('<?php _e('Set price to RRP')?>').appendTo(\"select[name='action2']\");\n\t\t\t\t\t\t});\n\t\t\t\t\t</script>\n\t\t\t\t<?php\n\t \t}\n\t\t}", "protected function add_footer_scripts() {\n\t\t\tdo_action( 'admin_print_footer_scripts' );\n\t\t}", "public function custom_bulk_admin_footer() {\n\t\tglobal $post_type;\n\t\t\n\t\tif($post_type == 'post') {\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\tjQuery(document).ready(function() {\n\t\t\t\t\t\tjQuery('<option>').val('build').text('<?php _e('Build flat file')?>').appendTo(\"select[name='action']\");\n\t\t\t\t\t\tjQuery('<option>').val('build').text('<?php _e('Build flat file')?>').appendTo(\"select[name='action2']\");\n\t\t\t\t\t\tjQuery('#doaction').on('click', function(e) {\n\t\t\t\t\t\t\t// e.preventDefault();\n\t\t\t\t\t\t\tif(jQuery('#bulk-action-selector-top')[0].value == 'build') {\n\t\t\t\t\t\t\t\tif (jQuery('.updated')[0]) {\n\t\t\t\t\t\t\t\t\tjQuery('.updated').html('<p style=\"display:inline-block;\">Currently building...<span style=\"margin-top:0;\" class=\"spinner is-active\"></span></p>');\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tjQuery('.wrap h1').after('<div class=\"updated\"><p style=\"display:inline-block;\">Currently building...<span style=\"margin-top:0;\" class=\"spinner is-active\"></span></p></div>');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t<?php\n \t}\n\t}", "function wpstocks_action_javascript_footer()\n{\n}", "function udesign_footer_before() {\r\n do_action('udesign_footer_before');\r\n}", "function add_late_scripts()\n\t{\n\t\t// only procceed if we have finished printing footer scripts\n\t\tif (did_action('bwp_minify_after_footer_scripts'))\n\t\t\t$this->todo_late_scripts = 'footer' . $this->late_script_order;\n\t}", "function addWPActions ()\n\t{\n\t\t//Add Front End Jquery and CSS\n\t\t//add_action( 'wp_footer', array( $this, 'frontendEnqueues' ) );\n\t\t\n\t}", "function ajax_footer_js(){\n ?>\n <script type=\"text/javascript\">\n jQuery(document).ready(function($){\n // Ajax Chosen Product Selectors\n jQuery(\"select.ajax_chosen_select_tabs\").select2({});\n });\n </script>\n <?php\n }", "function ajax_filter_posts_scripts() {\n // Enqueue script\n //wp_register_script('afp_script', 'get_template_directory_uri() . '/js-folder/'ajax-filter-posts.js', false, null, false);\n wp_register_script('afp_script', get_template_directory_uri().'/assets/ajax-filter-posts.js', false, null, false);\n wp_enqueue_script('afp_script');\n\n wp_localize_script( 'afp_script', 'afp_vars', array(\n 'afp_nonce' => wp_create_nonce( 'afp_nonce' ), // Create nonce which we later will use to verify AJAX request\n 'afp_ajax_url' => admin_url( 'admin-ajax.php' ),\n )\n );\n}", "function wp_print_footer_scripts()\n {\n }", "public function bulk_action_scripts() {\n\t\t \tglobal $post_type;\n\t\t\tif( $post_type == 'shop_order' ) {\n\t\t\t\twp_register_script(\n\t\t\t\t\t'dropbox-export',\n\t\t\t\t\tplugins_url( 'js/dropbox-export.js' , dirname(__FILE__) ),\n\t\t\t\t\tarray( 'jquery', 'thickbox' )\n\t\t\t\t);\n\t\t\t\twp_enqueue_script( 'dropbox-export' );\n\t\t\t\twp_enqueue_style( 'thickbox' );\n\t\t\t}\n\n\t\t}", "public function print_scripts() {\n\t\tglobal $pagenow, $hook_suffix;\n\t\t$pages = array( 'edit.php' );\n\n\t\tif ( in_array( $pagenow, $pages ) ) {\n\t\t\twp_register_script( 'reorder_nested', AERIA_RESOURCE_URL . 'js/jquery.mjs.nestedSortable.js', array( 'jquery-ui-sortable' ), '1.3.5', true );\n\t\t\twp_enqueue_script( 'reorder_posts', AERIA_RESOURCE_URL . 'js/reorder-sort.js', array( 'reorder_nested' ) );\n\t\t\twp_localize_script( 'reorder_posts', 'reorder_posts', array(\n\t\t\t\t'expand' => esc_js( __( 'Expand', 'reorder' ) ),\n\t\t\t\t'collapse' => esc_js( __( 'Collapse', 'reorder' ) ),\n\t\t\t\t'sortnonce' => wp_create_nonce( 'sortnonce' ),\n\t\t\t\t'hierarchical' => is_post_type_hierarchical( $this->post_type ) ? 'true' : 'false',\n\t\t\t) );\n\t\t}\n\t}", "public function hookFooter()\n {\n $ga_scripts = '';\n $this->js_state = 0;\n\n if (isset($this->context->cookie->ga_cart)) {\n $this->filterable = 0;\n\n $gacarts = unserialize($this->context->cookie->ga_cart);\n foreach ($gacarts as $gacart) {\n if ($gacart['quantity'] > 0) {\n } elseif ($gacart['quantity'] < 0) {\n $gacart['quantity'] = abs($gacart['quantity']);\n }\n }\n unset($this->context->cookie->ga_cart);\n }\n\n $controller_name = Tools::getValue('controller');\n $products = $this->wrapProducts($this->context->smarty->getTemplateVars('products'), [], true);\n\n if ($controller_name == 'order' || $controller_name == 'orderopc') {\n $this->eligible = 1;\n $step = Tools::getValue('step');\n if (empty($step)) {\n $step = 0;\n }\n }\n\n if (version_compare(_PS_VERSION_, '1.5', '<')) {\n if ($controller_name == 'orderconfirmation') {\n $this->eligible = 1;\n }\n } else {\n $confirmation_hook_id = (int) Hook::getIdByName('orderConfirmation');\n if (isset(Hook::$executed_hooks[$confirmation_hook_id])) {\n $this->eligible = 1;\n }\n }\n\n if (isset($products) && count($products) && $controller_name != 'index') {\n if ($this->eligible == 0) {\n $ga_scripts .= $this->addProductImpression($products);\n }\n $ga_scripts .= $this->addProductClick($products);\n }\n\n return $this->_runJs($ga_scripts);\n }", "function my_footer_shh() {\n remove_filter( 'update_footer', 'core_update_footer' );\n}", "function tmpl_archives_sorting_opt(){\r\n\tglobal $wp_query,$sort_post_type;\r\n\t\r\n\tif(!is_search()){\r\n\t\t$post_type = (get_post_type()!='')? get_post_type() : get_query_var('post_type');\r\n\t\t$sort_post_type = apply_filters('tmpl_tev_sorting_for_'.$post_type,$post_type);\r\n\t\t\r\n\t}else{\r\n\t\t/* on search page what happens if user search with multiple post types */\r\n\t\tif(isset($_REQUEST['post_type'])){\r\n\t\t\tif(is_array($_REQUEST['post_type']) && count($_REQUEST['post_type'])==1){\r\n\t\t\t\t$sort_post_type= $_REQUEST['post_type'][0];\r\n\t\t\t}else{\r\n\t\t\t\t$sort_post_type= $_REQUEST['post_type'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\tif(!$sort_post_type){\r\n\t\t\t\t$sort_post_type='directory';\r\n\t\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\t$templatic_settings=get_option('templatic_settings');\r\n\t$googlemap_setting=get_option('city_googlemap_setting');\r\n\t\r\n\t/*custom post type link */\r\n\t$current_posttype = get_post_type();\r\n\t\r\n\tif(empty($current_posttype)){\r\n\t\t$current_posttype = $wp_query->query['post_type'];\r\n\t}\r\n\t\t\r\n\tif(!is_tax() && is_archive() && !is_search())\r\n\t{\r\n\t\t$current_term = $wp_query->get_queried_object();\t\t\r\n\t\t$permalink = get_post_type_archive_link($current_posttype);\r\n\t\t$permalink=str_replace('&'.$sort_post_type.'_sortby=alphabetical&sortby='.$_REQUEST['sortby'],'',$permalink);\r\n\t}elseif(is_search()){\r\n\t\t$search_query_str=str_replace('&'.$sort_post_type.'_sortby=alphabetical&sortby='.@$_REQUEST['sortby'],'',$_SERVER['QUERY_STRING']);\r\n\t\t$permalink= site_url().\"?\".$search_query_str;\r\n\t}else{\r\n\t\t$current_term = $wp_query->get_queried_object();\r\n\t\t$permalink=($current_term->slug) ? get_term_link($current_term->slug, $current_term->taxonomy):'';\r\n\t\tif(isset($_REQUEST['sortby']) && $_REQUEST['sortby']!='')\r\n\t\t\t$permalink=str_replace('&'.$sort_post_type.'_sortby=alphabetical&sortby='.$_REQUEST['sortby'],'',$permalink);\r\n\t\t\r\n\t}\r\n\t\r\n\t$post_type= get_post_type_object( get_post_type());\r\n\t\r\n\t/* get all the request url and con-cat with permalink to get the exact results */\r\n $req_uri = '';\r\n\tforeach($_GET as $key=>$val){\r\n\t\tif($key !='' && !strstr($key,'_sortby')){\r\n\t\t\t$req_uri .= $key.\"=\".$val.\"&\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t/* permalink */\r\n\tif(false===strpos($permalink,'?')){\r\n\t $url_glue = '?'.$req_uri;\r\n\t}else{\r\n\t\t$url_glue = '&amp;'.$req_uri;\t\r\n\t}\r\n\t\r\n\t/* no grid view list view if no results found */\r\n\t\r\n\tif($wp_query->found_posts!=0){\r\n\t?>\r\n\t<div class='directory_manager_tab clearfix'>\r\n\t<div class=\"sort_options\">\r\n\t<?php if(have_posts()!='' && current_theme_supports('tmpl_show_pageviews')): ?>\r\n\t\t<ul class='view_mode viewsbox'>\r\n\t\t\t<?php if(function_exists('tmpl_wp_is_mobile') && tmpl_wp_is_mobile()){ \r\n\t\t\t\tif(isset($templatic_settings['category_googlemap_widget']) && $templatic_settings['category_googlemap_widget']=='yes'){\r\n\t\t\t\t?>\r\n\t\t\t\t<li><a class='switcher last listview <?php if($templatic_settings['default_page_view']==\"listview\"){echo 'active';}?>' id='listview' href='#'><?php _e('LIST VIEW','templatic');?></a></li>\r\n\t\t\t\t<li><a class='map_icon <?php if($templatic_settings['default_page_view']==\"mapview\"){echo 'active';}?>' id='locations_map' href='#'><?php _e('MAP','templatic');?></a></li>\r\n\t\t\t<?php }\t\r\n\t\t\t}else{ ?>\r\n\t\t\t\t<li><a class='switcher first gridview <?php if($templatic_settings['default_page_view']==\"gridview\"){echo 'active';}?>' id='gridview' href='#'><?php _e('GRID VIEW','templatic');?></a></li>\r\n\t\t\t\t<li><a class='switcher last listview <?php if($templatic_settings['default_page_view']==\"listview\"){echo 'active';}?>' id='listview' href='#'><?php _e('LIST VIEW','templatic');?></a></li>\r\n\t\t\t\t<?php if(isset($templatic_settings['category_googlemap_widget']) && $templatic_settings['category_googlemap_widget']=='yes'):?> \r\n\t\t\t\t<li><a class='map_icon <?php if($templatic_settings['default_page_view']==\"mapview\"){echo 'active';}?>' id='locations_map' href='#'><?php _e('MAP','templatic');?></a></li>\r\n\t\t\t\t<?php endif;\r\n\t\t\t}\r\n\t\t\t?>\r\n\t\t</ul>\t\r\n\t<?php endif;\r\n\r\n\tif(isset($_GET[$sort_post_type.'_sortby']) && $_GET[$sort_post_type.'_sortby']=='alphabetical'){\r\n\t\t$_SESSION['alphabetical']='1';\t\r\n\t}else{\r\n\t\tunset($_SESSION['alphabetical']);\r\n\t}\r\n\t\r\n\tif(!empty($templatic_settings['sorting_option'])){\r\n\r\n\t\t/* take \"directory\" as a post type if additional post type is detected */\r\n\t\t$exclude_arr = apply_filters('exclude_sorting_posttypes',array('event','property','classified'));\r\n\t\tif(!in_array(get_post_type(),$exclude_arr)){\r\n\t\t\t$sort_post_type_name = 'tevolution';\r\n\t\t}\t\r\n\t\telse{\t\r\n\t\t\t$sort_post_type_name = get_post_type();\r\n\t\t}\r\n\t\t\r\n\t\t$sel_sort_by = isset($_REQUEST[$sort_post_type_name.'_sortby']) ? $_REQUEST[$sort_post_type_name.'_sortby'] : '';\r\n\t\t$sel_class = 'selected=selected';\r\n\t\t\r\n\t?>\r\n\t\t<div class=\"tev_sorting_option\">\r\n\t\t\t<form action=\"<?php if(function_exists('tmpl_directory_full_url')){ echo tmpl_directory_full_url('directory'); } ?>\" method=\"get\" id=\"<?php echo $sort_post_type.'_sortby_frm'; ?>\" name=\"<?php echo $sort_post_type.'_sortby_frm'; ?>\">\r\n <select name=\"<?php echo $sort_post_type_name.'_sortby'; ?>\" id=\"<?php echo $sort_post_type_name.'_sortby'; ?>\" onchange=\"sort_as_set(this.value)\" class=\"tev_options_sel\">\r\n\t\t\t\t<option <?php if(!$sel_sort_by){ echo $sel_class; } ?>><?php _e('Sort By','templatic'); ?></option>\r\n\t\t\t\t<?php\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_title_alphabetical');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('title_alphabetical',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"alphabetical\" <?php if($sel_sort_by =='alphabetical'){ echo $sel_class; } ?>><?php _e('Alphabetical','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_title_alphabetical');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_title_asc');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('title_asc',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"title_asc\" <?php if($sel_sort_by =='title_asc'){ echo $sel_class; } ?>><?php _e('Title Ascending','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_title_asc');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_title_desc');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('title_desc',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"title_desc\" <?php if($sel_sort_by =='title_desc'){ echo $sel_class; } ?>><?php _e('Title Descending','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_title_desc');\r\n\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_date_asc');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('date_asc',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"date_asc\" <?php if($sel_sort_by =='date_asc'){ echo $sel_class; } ?>><?php _e('Publish Date Ascending','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_date_asc');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_date_desc');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('date_desc',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"date_desc\" <?php if($sel_sort_by =='date_desc'){ echo $sel_class; } ?>><?php _e('Publish Date Descending','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_date_desc');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_reviews');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('reviews',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"reviews\" <?php if($sel_sort_by =='reviews'){ echo $sel_class; } ?>><?php _e('Reviews','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_reviews');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_rating');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('rating',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"rating\" <?php if($sel_sort_by =='rating'){ echo $sel_class; } ?>><?php _e('Rating','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_rating');\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo_action('tmpl_before_sortby_random');\r\n\t\t\t\t\tif(!empty($templatic_settings['sorting_option']) && in_array('random',$templatic_settings['sorting_option'])):?>\r\n\t\t\t\t\t\t<option value=\"random\" <?php if($sel_sort_by =='random'){ echo $sel_class; } ?>><?php _e('Random','templatic');?></option>\r\n\t\t\t\t<?php endif;\r\n\t\t\t\t\tdo_action('tmpl_after_sortby_random');\r\n\t\t\t\t\t?> \r\n\t\t\t </select>\r\n\t\t\t </form>\r\n <?php add_action('wp_footer','sorting_option_of_listing'); ?>\r\n\t\t</div>\r\n <?php\r\n\t}\r\n\r\n\t?>\r\n \t</div><!--END sort_options div -->\r\n </div><!-- END directory_manager_tab Div -->\r\n\t<?php\r\n\t}\r\n\t\r\n\t\r\n\t/* On archive and category pages - alphabets order should display even there is no post type pass in argument */\r\n\t$exclude_arr = array('event','property','classified');\r\n\tif(isset($_REQUEST['alpha_sort_post_type']) && $_REQUEST['alpha_sort_post_type'] != '')\r\n\t\t$sort_post_type = $_REQUEST['alpha_sort_post_type'];\r\n\tif(!in_array($sort_post_type,$exclude_arr))\r\n\t\t$sort_post_type = 'tevolution';\r\n\telse\t\r\n\t\t$sort_post_type = $sort_post_type;\r\n\tif(!$sort_post_type){ $sort_post_type=\"tevolution\"; }\r\n\tif((isset($_REQUEST[$sort_post_type.'_sortby']) && $_REQUEST[$sort_post_type.'_sortby']=='alphabetical') || (isset($_SESSION['alphabetical']) && $_SESSION['alphabetical']==1)):\r\n\t\r\n\t$alphabets = array(__('A','templatic'),__('B','templatic'),__('C','templatic'),__('D','templatic'),__('E','templatic'),__('F','templatic'),__('G','templatic'),__('H','templatic'),__('I','templatic'),__('J','templatic'),__('K','templatic'),__('L','templatic'),__('M','templatic'),__('N','templatic'),__('O','templatic'),__('P','templatic'),__('Q','templatic'),__('R','templatic'),__('S','templatic'),__('T','templatic'),__('U','templatic'),__('V','templatic'),__('W','templatic'),__('X','templatic'),__('Y','templatic'),__('Z','templatic'));\r\n\t/*show all result when we click on all in alphabetical sort order*/\r\n\t$all = str_replace('?sortby='.$_REQUEST['sortby'].'&','/?',$url_glue);\r\n\t?>\r\n <div id=\"directory_sort_order_alphabetical\" class=\"sort_order_alphabetical\">\r\n\t\t<input type=\"hidden\" name=\"alpha_sort\" id=\"alpha_sort\" /> <!-- for listfilter -->\r\n\t <ul>\r\n\t\t\t<li class=\"<?php echo (!isset($_REQUEST['sortby']))?'active':''?>\"><a href=\"<?php echo remove_query_arg('sortby',$permalink.$all.$sort_post_type.'_sortby=alphabetical');?>\"><?php _e('All','templatic');?></a></li>\r\n\t\t\t<?php\r\n\t\t\tforeach($alphabets as &$value){ \r\n\t\t\t\t$key = $value;\r\n\t\t\t\t$val = strtolower($key);\r\n\t\t\t\t?>\r\n\t\t\t\t<li class=\"<?php echo (isset($_REQUEST['sortby']) && $_REQUEST['sortby'] == $val)? 'active':''?>\"><a href=\"<?php echo $permalink.$url_glue .$sort_post_type.'_sortby=alphabetical&sortby='.$val.'&alpha_sort_post_type='.$sort_post_type;?>\"><?php echo $key; ?></a></li>\r\n\t\t\t\t<?php \r\n\t\t\t} ?>\r\n\t </ul>\r\n </div>\r\n <?php endif;\r\n}", "function wp_ajax_widgets_order()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "function udesign_footer_inside() {\r\n do_action('udesign_footer_inside');\r\n}", "function udesign_single_portfolio_entry_after() {\r\n do_action('udesign_single_portfolio_entry_after');\r\n}", "public function after_main_content() {\n\t?>\n\n\t\t\t</div><!-- #bbp-content -->\n\t\t</div><!-- #bbp-container -->\n\n\t<?php\n\t}", "public function sort_posts() {\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t#icon-reorder-posts {\n\t\t\tdisplay: none;\n\t\t\tbackground:url(<?php echo $this->icon; ?>) no-repeat;\n\t\t}\n\t\t</style>\n\t\t<div class=\"wrap\">\n\t\t\t<?php screen_icon( 'reorder-posts' ); ?>\n\t\t\t<h2>\n\t\t\t\t<?php echo $this->heading; ?><br>\n\t\t\t\t<span style=\"font-size:13px\">Trascina per determinare l'ordine manuale di visualizzazione degli elementi.</span>\n\t\t\t\t<img src=\"<?php echo admin_url( 'images/loading.gif' ); ?>\" id=\"loading-animation\" />\n\t\t\t</h2>\n\t\t\t<div id=\"reorder-error\"></div>\n\t\t\t<?php echo $this->initial; ?>\n\t\t\t<div id=\"list\">\n\t\t\t<input class=\"search\" placeholder=\"Search\" />\n\t\t\t<div id=\"message-order\" class=\"updated\" style=\"display:none;\">\n\t <p><h3>ATTENZIONE</h3>Il sistema di <b>ordinamento</b> è disabilitato nella lista filtrata. Rimuovere i criteri di ricerca per riabilitare il sistema.</p>\n\t </div>\n\t\t\t<ul id=\"post-list\" class=\"list\">\n\t\t<?php\n\t\tif ( is_post_type_hierarchical( $this->post_type ) ) {\n\t\t\t$pages = get_pages( array(\n\t\t\t\t'sort_column' => 'menu_order',\n\t\t\t\t'post_type' => $this->post_type,\n\t\t\t ) );\n\t\t\t //Get hiearchy of children/parents\n\t\t\t $top_level_pages = array();\n\t\t\t $children_pages = array();\n\t\t\t foreach( $pages as $page ) {\n\t\t\t\tif ( $page->post_parent == 0 ) {\n\t\t\t\t\t//Parent page\n\t\t\t\t\t$top_level_pages[] = $page;\n\t\t\t\t} else {\n\t\t\t\t\t$children_pages[ $page->post_parent ][] = $page;\n\t\t\t\t}\n\t\t\t } //end foreach\n\n\t\t\t foreach( $top_level_pages as $page ) {\n\t\t\t\t$page_id = $page->ID;\n\t\t\t\tif ( isset( $children_pages[ $page_id ] ) && !empty( $children_pages[ $page_id ] ) ) {\n\t\t\t\t\t//If page has children, output page and its children\n\t\t\t\t\t$this->output_row_hierarchical( $page, $children_pages[ $page_id ], $children_pages );\n\t\t\t\t} else {\n\t\t\t\t\t$this->output_row( $page );\n\t\t\t\t}\n\t\t\t }\n\t\t} else {\n\t\t\t//Output non hierarchical posts\n\t\t\t$post_query = new WP_Query(\n\t\t\t\tarray(\n\t\t\t\t\t'post_type' => $this->post_type,\n\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t'orderby' => 'menu_order',\n \t\t\t'suppress_filters' => false,\n\t\t\t\t\t'order' => $this->order,\n\t\t\t\t\t'post_status' => $this->post_status,\n\t\t\t\t)\n\t\t\t);\n\t\t\t$posts = $post_query->get_posts();\n\t\t\tif ( !$posts ) return;\n\t\t\tforeach( $posts as $post ) {\n\t\t\t\t$this->output_row( $post );\n\t\t\t} //end foreach\n\t\t}\n\t\t?>\n\t\t</ul>\n\t\t</div>\n\t\t<?php\n\t\techo $this->final;\n\t\t?>\n\t\t</div><!-- .wrap -->\n\t\t<?php\n\t}", "public function wp_footer() {\n\t\t\twp_register_style('sv_core_init_style', $this->get_url_core('frontend/css/style.css'));\n\n\t\t\tforeach ( $this->get_scripts() as $script ) {\n\t\t\t\tif(!$script->get_is_backend() && !$script->get_load_in_header()) {\n\t\t\t\t\t$this->add_script($script);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// inline styles are printed\n\t\t\twp_enqueue_style('sv_core_init_style');\n\n\t\t\tob_start();\n\t\t\t// now remove the attached style\n\t\t\tadd_action('wp_print_footer_scripts', function(){\n\t\t\t\t$this->replace_type_attributes();\n\t\t\t});\n\t\t}", "public function do_footer_items()\n {\n }", "public function do_footer_items()\n {\n }", "function fashe_woocommerce_short_code_shop($atts) {\n\n $atts = shortcode_atts( array(\n 'per_page' => '6',\n 'page' => 1,\n 'paginate' =>true\n ), $atts);\n\n $query_cat_name = isset($_GET['query_cat_name']) ? wc_clean( wp_unslash( $_GET['query_cat_name'])) : '';\n?>\n\n<script type=\"text/javascript\">\n\n$(document).ready(function() {\n\n var paged_default = \"<?php echo $atts['page']?>\";\n var posts_per_page = \"<?php echo $atts['per_page'];?>\";\n var query_cat_name = \"<?php echo $query_cat_name ;?>\"\n var paged = paged_default;\n var orderby ;\n var price;\n var query_keyword;\n var query_product_color;\n var filter_by_cat;\n\n // Load Products Function .\n function load_products_ajax(page_default) {\n\n /** Get data-page */\n var paged_ajax = (page_default === false) ? paged : paged_default;\n var orderby_ajax = (page_default === false) ? orderby : 'popularity';\n var price_ajax = (page_default === false) ? price : '';\n var query_keyword_ajax = (page_default === false) ? query_keyword : '';\n var query_product_color_ajax = (page_default === false) ? query_product_color : '';\n var filter_by_cat_ajax = (page_default === false) ? filter_by_cat : '';\n //get Product if have choose category from home page .\n if( query_cat_name !== '') filter_by_cat_ajax = query_cat_name ;\n\n /** Ajax Call */\n $.ajax({\n cache: false,\n url: svl_array_ajaxp.admin_ajax,\n type: \"POST\",\n data: ({\n action: 'LoadProductPagination',\n paged: paged_ajax,\n posts_per_page: posts_per_page,\n orderby: orderby_ajax,\n price: price_ajax,\n query_keyword: query_keyword_ajax,\n query_product_color: query_product_color_ajax,\n filter_by_cat : filter_by_cat_ajax\n }),\n beforeSend: function () {\n },\n success: function (data, textStatus, jqXHR) {\n $('#load_ajax_shop_product').html(data);\n },\n error: function (jqXHR, textStatus, errorThrown) {\n console.log('The following error occured: ' + textStatus, errorThrown);\n },\n complete: function (jqXHR, textStatus) {\n //Show total results after Loaded ajax product .\n var total_results = $('div.product_results').attr('data-total-results');\n $('span.show_all_results').html(total_results);\n // if no Product loaded .\n if(parseInt(total_results) === 0) {\n var results_html = '<div class =\"row\">';\n results_html +='<span > Product not found ! </span>' ;\n results_html += '</div>' ;\n\n $('#load_ajax_shop_product').html(results_html) ;\n }\n }\n });\n\n }//End function\n\n //Load Page Default .\n load_products_ajax(page_default = true);\n // Load Page Default if Click Reset Button .\n $('button.reset-filter-shoppage-button').click(function(){\n window.location.href = \"<?php echo get_bloginfo('url').'/shop' ;?>\" ;\n });\n\n //Load Product filters by orderby box\n $('#orderby_filters').change(function () {\n\n orderby = $('#orderby_filters option:selected').attr('value');\n load_products_ajax(page_default = false);\n });\n\n //Load Product filters by Price box\n $('#orderby_price').change(function () {\n\n //Set Price filter Bar .\n var price_filter_box = $('#orderby_price option:selected').attr('value');\n price_filter_box = (typeof price_filter_box !== 'undefined') ? $.parseJSON(price_filter_box) : '';\n price = price_filter_box;\n\n load_products_ajax(page_default = false);\n\n // Reset noUI Slide\n jQuery('#filter-bar')[0].noUiSlider.reset();\n\n });\n\n //Load page with Pagination\n $('#load_ajax_shop_product').on('click', '#paginative_product_ajax a', function () {\n paged = $(this).attr('data-page');\n console.log('Jquery',paged);\n load_products_ajax(page_default = false);\n });\n\n //Load page with Search Product\n $('#left-bar-search-product').on('keyup', function () {\n query_keyword = $('#left-bar-search-product').val() ;\n load_products_ajax(page_default = false);\n });\n\n //Load page with Filter by color\n $(\"#filter-product-color\").on(\"click\", 'input.checkbox-color-filter', function () {\n\n var box = $(this);\n box.attr('name', 'notCheck');\n\n if (box.is(\":checked\")) {\n var group = \"input:checkbox[name='\" + box.attr(\"name\") + \"']\";\n $(group).prop(\"checked\", false);\n box.prop(\"checked\", true);\n }\n\n query_product_color = $( \"input.checkbox-color-filter:checked\" ).val();\n load_products_ajax(page_default = false);\n });\n\n //Load page with Filter by Price (noUI Style)\n $('#price-noui-filter-button').on('click', function () {\n\n var price_lower = $('#value-lower').text();\n var price_upper = $('#value-upper').text();\n price = [price_lower, price_upper];\n\n load_products_ajax(page_default = false);\n\n //Reset Filter Price by Price box\n $('#orderby_price option:first').prop('selected', true);\n $('span.select2-selection__rendered').text('Price');\n });\n\n //Load page with Fillter by Category .\n $('#get_product_cat_ajax li.p-t-4').each(function () {\n $(this).click(function () {\n //If isset category query by $_GET ..then Clear it .\n if(typeof query_cat_name !== \"undefined\" && query_cat_name !== '' ){\n var uri = window.location.toString();\n if (uri.indexOf(\"?\") > 0) {\n var clean_uri = uri.substring(0, uri.indexOf(\"?\"));\n window.history.replaceState({}, document.title, clean_uri);\n }\n query_cat_name = '' ;\n }\n //Filter and Load Product .\n filter_by_cat = $(this).attr('value');\n load_products_ajax(page_default = false);\n // Set Current Style for Product .\n $('#get_product_cat_ajax li.p-t-4 a').removeClass('active1');\n $(this).children().addClass('active1');\n });\n });\n\n // Set Style for Category if call by $_GET .\n if(typeof query_cat_name !== \"undefined\" && query_cat_name !== '' ){\n $('#get_product_cat_ajax li.p-t-4 a').removeClass('active1');\n $('#get_product_cat_ajax li[value=\"'+query_cat_name+'\"]').children().addClass('active1');\n }\n\n })//End Jquery .\n\n </script>\n\n\n<?php\n}", "function print_footer_scripts() {\n\tglobal $asc_scripts, $concatenate_scripts;\n\n\tif ( !is_a($asc_scripts, 'ASC_Scripts') )\n\t\treturn array(); // No need to run if not instantiated.\n\n\tscript_concat_settings();\n\t$asc_scripts->do_concat = $concatenate_scripts;\n\t$asc_scripts->do_footer_items();\n\n\t/**\n\t * Filter whether to print the footer scripts.\n\t *\n\t * @since 2.8.0\n\t *\n\t * @param bool $print Whether to print the footer scripts. Default true.\n\t */\n\tif ( apply_filters( 'print_footer_scripts', true ) ) {\n\t\t_print_scripts();\n\t}\n\n\t$asc_scripts->reset();\n\treturn $asc_scripts->done;\n}", "public function move_js_to_footer() {\n\t\t$this->remove_action( 'wp_head', 'wp_print_scripts' );\n\t\t$this->remove_action( 'wp_head', 'wp_print_head_scripts', 9 );\n\t\t$this->remove_action( 'wp_head', 'wp_enqueue_scripts', 1 );\n\t}", "function bethel_add_frontend_javascript() {\n global $post;\n if (is_front_page()) {\n wp_enqueue_script('bethel-frontend', get_stylesheet_directory_uri().'/js/frontend.js', array('jquery'), '0.1', true);\n wp_localize_script('bethel-frontend', 'bethel', array('siteurl'=>site_url()));\n }\n if ((is_page() || is_single()) && (strpos ($post->post_content, '[gallery ') !== FALSE)) {\n wp_enqueue_script('bethel_gallery', get_stylesheet_directory_uri().'/js/colorbox/jquery.colorbox'.(WP_DEBUG ? '.js' : '-min.js'), 'jquery', '1.6.0', true);\n wp_enqueue_style('bethel_gallery', get_stylesheet_directory_uri().'/js/colorbox/colorbox.css');\n }\n //add_action ('wp_print_footer_scripts', 'bethel_viewport_js_to_footer');\n}", "function enqueue_scripts() {\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ), 21 );\n\t\tadd_action( 'admin_init', array( $this, 'add_pagination' ) );\n\t\tadd_action( \"bc_plugin_browser_content_{$this->page_slug}\", array( $this, 'display_plugins_browser' ), 10, 2 );\n\t}", "function truethemes_hook_footer_scripts(){\n\n\t//get option values\n global $ttso;\n\t$jcycle_timeout = $ttso->ka_jcycle_timeout; // jQuery banner cycle time\n\t$jcycle_pause_hover = $ttso->ka_jcycle_pause_hover; //whether pause on hover.\n\n\tif ($jcycle_pause_hover == \"true\"){\n\t\t$jcycle_pause_hover_results = '1';\n\t}else{\n\t\t$jcycle_pause_hover_results = '';\n\t}\n\n\n//init slider if is Template Homepage :: jQuery 2\nif(is_page_template('template-homepage-jquery-2.php')){\n\necho \"<!-- jQuery Banner Init Script for Template Homepage :: jQuery 2 -->\\n\";\t\necho \"<script type='text/javascript'>\\n\";\necho \"//<![CDATA[\njQuery(window).load(function(){\n\tjQuery('.home-banner-wrap ul').css('background-image','none');\n\tjQuery('.jqslider').css('display','block');\n\tjQuery('.big-banner #main .main-area').css('padding-top','16px');\n \tjQuery('.home-banner-wrap ul').after('<div class=\\\"jquery-pager\\\">&nbsp;</div>').cycle({\n\t\tfx: 'fade',\n\t\ttimeout: '{$jcycle_timeout}',\n\t\theight: 'auto',\n\t\tpause: '{$jcycle_pause_hover_results}',\n\t\tpager: '.jquery-pager',\n\t\tcleartypeNoBg: true\n\n\t});\n});\n//]]>\\n\";\necho \"</script>\\n\";\n}\n\n//init slider if is Template Homepage :: jQuery\nif(is_page_template('template-homepage-jquery.php')){\n\necho \"<!-- jQuery Banner Init Script for Template Homepage :: jQuery -->\\n\";\t\necho \"<script type='text/javascript'>\\n\";\necho \"//<![CDATA[\njQuery(window).load(function(){\n\tjQuery('.home-bnr-jquery ul').css('background-image','none');\n\tjQuery('.jqslider').css('display','block');\n jQuery('.home-bnr-jquery ul').after('<div class=\\\"jquery-pager\\\">&nbsp;</div>').cycle({\n\t\tfx: 'fade',\n\t\ttimeout: '{$jcycle_timeout}',\n\t\theight: 'auto',\n\t\tpause: '{$jcycle_pause_hover_results}',\n\t\tpager: '.jquery-pager',\n\t\tcleartypeNoBg: true\n\t\t});\n});\n//]]>\n</script>\\n\";\t\n}\n\n//Testimonial init script\nglobal $ttso;\n$testimonial_enable = $ttso->ka_testimonial_enable;\n\nif($testimonial_enable == \"true\"){\n$testimonial_timeout = $ttso->ka_testimonial_timeout;\n$testimonial_pause_hover = $ttso->ka_testimonial_pause_hover;\n\tif ($testimonial_pause_hover == \"true\"){\n\t\t$testimonial_pause_hover_results = '1';\n\t}else{\n\t$testimonial_pause_hover_results = '0';\n\t}\n\necho \"<!-- Testimonial init script -->\\n\";\necho \"<script type='text/javascript'>\n//<![CDATA[\njQuery(document).ready(function(){\n\tfunction adjust_container_height(){\n\t\t//get the height of the current testimonial slide\n\t\tvar hegt = jQuery(this).height();\n\t\t//set the container's height to that of the current slide\n\t\tjQuery(this).parent().animate({height:hegt});\n\t}\n jQuery('.testimonials').after('<div class=\\\"testimonial-pager\\\">&nbsp;</div>').cycle({\n\t\tfx: 'fade',\n\t\ttimeout: '{$testimonial_timeout}',\n\t\theight: 'auto',\n\t\tpause: '{$testimonial_pause_hover_results}',\n\t\tpager: '.testimonial-pager',\n\t\tbefore: adjust_container_height,\n\t\tcleartypeNoBg: true\n\n\t});\n});\n\n//]]>\n</script>\\n\";\n}\t\t\t\t\t\n}", "function santo_flickr_gallery_shortcode_exist() {\r\n\t\tadd_action( 'wp_footer', 'santo_flickr_js',100 );\r\n\t\tadd_action( 'wp_enqueue_scripts', 'santo_flickr_scripting' );\r\n}", "function tdl_custom_latest_products($atts, $content = null) {\n\t$sliderrandomid = rand();\n\textract(shortcode_atts(array(\n\t\t\"title\" => '',\n\t\t'per_page' => '8',\n\t\t'orderby' => 'date',\n\t\t'order' => 'desc',\n\t\t'category' => '',\n\t), $atts));\n\tob_start();\n\n\t?>\n\t\n\t<?php \n\t/**\n\t* Check if WooCommerce is active\n\t**/\n\tif ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {\n\t?>\n\t\n\t<script>\n\t(function($){\n\t\t$(window).load(function(){\n\t\t/* items_slider */\n\t\t$('.items_slider_id_<?php echo $sliderrandomid ?> .items_slider').iosSlider({\n\t\t\tsnapToChildren: true,\n\t\t\tdesktopClickDrag: true,\n\t\t\tnavNextSelector: $('.items_slider_id_<?php echo $sliderrandomid ?> .items_sliders_nav .big_arrow_right'),\n\t\t\tnavPrevSelector: $('.items_slider_id_<?php echo $sliderrandomid ?> .items_sliders_nav .big_arrow_left'),\n\t\t\tonSliderLoaded: custom_latest_products_UpdateSliderHeight,\n\t\t\tonSlideChange: custom_latest_products_UpdateSliderHeight,\n\t\t\tonSliderResize: custom_latest_products_UpdateSliderHeight\n\t\t});\n\t\t\n\t\tfunction custom_latest_products_UpdateSliderHeight(args) {\n\t\t\t\t\t\t\t\t\n\t\t\tcurrentSlide = args.currentSlideNumber;\n\t\t\t\n\t\t\t/* update height of the first slider */\n\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t<?php global $sellegance_op; ?>\n\t\t\t\t\t<?php if ($sellegance_op['tdl_product_animation']) { ?>\n\t\t\t\t\t<?php if ($sellegance_op['tdl_productanim_type'] == \"productanim3\") { ?>\n\t\t\t\t\t$('li.productanim3').each(function() {\n\t\t\t\t\t\t\t\tvar productImageHeight = $(this).find('.loop_product > img').height();\n\t\t\t\t\t\t\t\t$(this).find('.image_container').css('padding-bottom', productImageHeight + 'px');\n\t\t\t\t\t});\n\t\t\t\t\t<?php } ?>\n\t\t\t\t\t <?php } ?>\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tvar setHeight = $('.items_slider_id_<?php echo $sliderrandomid ?> .items_slider .product_item:eq(' + (args.currentSlideNumber-1) + ')').outerHeight(true);\n\t\t\t\t\t$('.items_slider_id_<?php echo $sliderrandomid ?> .items_slider').animate({ height: setHeight+20 }, 300);\n\t\t\t\t},300);\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t})\n\t})(jQuery);\n\t</script>\n\t\n\t<div class=\"woocommerce prod_slider items_slider_id_<?php echo $sliderrandomid ?> four_side\">\n\t\n\t\t<div class=\"items_sliders_header\">\n\t\t\t<div class=\"items_sliders_title\">\n\t\t\t\t<div class=\"featured_section_title\"><span><?php echo $title ?></span></div>\n\t\t\t</div>\n\t\t\t<div class=\"clearfix\"></div>\n\t\t\t<div class=\"items_sliders_nav\"> \n\t\t\t\t<a class='big_arrow_right'></a>\n\t\t\t\t<a class='big_arrow_left'></a>\n\t\t\t\t<div class='clearfix'></div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"items_slider_wrapper\">\n\t\t\t<div class=\"items_slider\">\n\t\t\t\t<ul class=\"slider\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\n\t\t\t\t\t$args = array(\n\t\t\t\t\t\t'post_type' => 'product',\n\t\t\t\t\t\t'product_cat' => $category,\n\t\t\t\t\t\t'post_status' => 'publish',\n\t\t\t\t\t\t'ignore_sticky_posts' => 1,\n\t\t\t\t\t\t'posts_per_page' => $per_page\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$products = new WP_Query( $args );\n\t\t\t\t\t\n\t\t\t\t\tif ( $products->have_posts() ) : ?>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<?php while ( $products->have_posts() ) : $products->the_post(); ?>\n\t\t\t\t\t\n\t\t\t\t\t\t\t<?php woocommerce_get_template_part( 'content', 'product' ); ?>\n\t\t\t\t\n\t\t\t\t\t\t<?php endwhile; // end of the loop. ?>\n\t\t\t\t\t\t\n\t\t\t\t\t<?php\n\t\t\t\t\t\n\t\t\t\t\tendif; \n\t\t\t\t\t//wp_reset_query();\n\t\t\t\t\twp_reset_postdata();\n\t\t\t\t\t?>\n\t\t\t\t</ul> \n\t\t\t</div>\n\t\t</div>\n\t\n\t</div>\n\t\n\t<?php } ?>\n\n\t<?php\n\t$content = ob_get_contents();\n\tob_end_clean();\n\treturn $content;\n}", "public function customizer_footer_scripts()\n {\n $this->add_activate_switch();\n $this->change_title_html();\n do_action('mo_optin_customizer_footer_scripts', $this);\n }", "function print_footer_scripts()\n {\n }", "function reviews_scripts() {\n if(is_archive('review')){\n wp_enqueue_script( 'isotope-lib', get_stylesheet_directory_uri() . '/js/isotope.min.js', array('jquery'), 11112014, false );\n wp_enqueue_script( 'isotope-settings', get_stylesheet_directory_uri() . '/js/isotope.settings.js', array('isotope-lib'), 11112014, false );\n }\n}", "public function after()\n {\n if($this->auto_render)\n {\n // Define defaults\n $styles = array( \n 'assets/css/style-responsive.css'=>'screen',\n 'assets/css/style.css'=>'screen', \n 'assets/font-awesome/css/font-awesome.css'=>'screen', \n 'assets/css/bootstrap.css'=>'screen',\n );\n $scripts = array( \n 'assets/js/jquery.nicescroll.js', \n 'assets/js/jquery.scrollTo.min.js', \n 'assets/js/jquery.dcjqaccordion.2.7.js', \n 'assets/js/jquery.ui.touch-punch.min.js', \n 'assets/js/jquery-ui-1.9.2.custom.min.js',\n 'assets/js/bootstrap.min.js',\n //'assets/js/jquery.js',\n 'media/js/jquery-1.10.1.min.js',\n );\n\n // Add defaults to template variables.\n $this->template->styles = array_reverse(array_merge($this->template->styles, $styles));\n $this->template->scripts = array_reverse(array_merge($this->template->scripts, $scripts));\n }\n // Run anything that needs to run after this.\n parent::after();\n }", "function ft_hook_add_js_call_footer() {}", "public function print_footer_scripts()\n {\n }", "static function on_td_wp_booster_after_header() {\r\n $page_id = get_queried_object_id();\r\n\r\n if (is_page()) {\r\n\r\n\t // previous meta\r\n\t //$td_unique_articles = get_post_meta($page_id, 'td_unique_articles', true);\r\n\r\n\t $meta_key = 'td_page';\r\n\t $td_page_template = get_post_meta($page_id, '_wp_page_template', true);\r\n\t if (!empty($td_page_template) && ($td_page_template == 'page-pagebuilder-latest.php')) {\r\n\t\t $meta_key = 'td_homepage_loop';\r\n\r\n\t }\r\n\r\n\t $td_unique_articles = get_post_meta($page_id, $meta_key, true);\r\n\t if (!empty($td_unique_articles['td_unique_articles'])) {\r\n\t\t self::$keep_rendered_posts_ids = true; //for new module hook\r\n\t\t self::$unique_articles_enabled = true; //for datasource\r\n\t }\r\n }\r\n if (td_util::get_option('tds_ajax_post_view_count') == 'enabled') {\r\n self::$keep_rendered_posts_ids = true;\r\n }\r\n }", "public function print_footer_scripts()\n {\n }", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "function bs_disable_footer( $args = array() ){\n global $flag_disable_footer, $current_page_base, $cPath_array;\n \n if ( in_array( $current_page_base, $args['page'] ) ) {\n $flag_disable_footer = true;\n }\n\n if ( !$flag_disable_footer && zen_not_null( $args['categories'] ) ){\n foreach ( $cPath_array as $category_id ) {\n if ( in_array( $category_id, $args['categories'] ) ) {\n $flag_disable_footer = true;\n }\n }\n }\n\n if ( !$flag_disable_footer && isset( $_GET['products_id'] ) && zen_not_null( $args['products'] ) ) {\n if ( in_array( (int) $_GET['products_id'], $args['products'] ) ) {\n $flag_disable_footer = true;\n }\n }\n\n}", "public function _post_filter()\n {\n }", "public function adminScripts()\n\t{\n\t\twp_enqueue_script('jquery');\n\t\twp_enqueue_script('wpm-sort_post_types-interface', $this->jsUrl . '/interface-1.2.js', array('jquery'));\n\t\twp_enqueue_script('wpm-sort_post_types-nested', $this->jsUrl . '/inestedsortable.js', array('wpm-sort_post_types-interface'));\n\t\twp_enqueue_script('wpm-sort_post_types', $this->jsUrl . '/sort-post-types.js', array('wpm-sort_post_types-nested'));\n\t}", "private function init_hooks(){ \r\n add_filter('manage_edit-category_columns', array($this, 'bamobile_manage_category_columns'));\r\n add_filter('manage_category_custom_column', array($this, 'bamobile_manage_category_columns_fields'), 10, 3);\r\n $taxonomies = get_taxonomies();\r\n foreach ((array)$taxonomies as $taxonomy) {\r\n $this->bamobile_add_custom_column_fields($taxonomy);\r\n }\r\n add_action('edit_term', array($this, 'bamobile_save_image'));\r\n add_action('create_term', array($this, 'bamobile_save_image'));\r\n add_action( 'admin_enqueue_scripts',array($this,'bamobile_add_styles'));\r\n }", "public static function move_jquery_to_footer() {\n\t\tadd_action('wp_enqueue_scripts', function() {\n\t\t\tif (is_admin()) {\n\t\t return;\n\t\t }\n\n\t\t $wp_scripts = wp_scripts();\n\n\t\t $wp_scripts->add_data('jquery', 'group', 1);\n\t\t $wp_scripts->add_data('jquery-core', 'group', 1);\n\t\t $wp_scripts->add_data('jquery-migrate', 'group', 1);\n\t\t}, 0);\n\t}", "function get_product_list() {\n/**\nif You haven't category object, please use this request\n$catData = current_category_data($post->ID);\n*/\n$catData = current_category_data($post->ID);\n\n?>\n\n\n<script type=\"text/javascript\">\n\n var vallo_ready_cartus = <?php echo json_encode($_COOKIE['vallo_cf7_cartus_3']); ?>;\n var produc_CF7_image = '<?php \n $image = wp_get_attachment_image_src( get_post_thumbnail_id( $loop->post->ID ), 'single-post-thumbnail' );\n echo $image[0]; ?>';\n var produc_CF7_title = '<?php \n wp_title(''); ?>';\n var produc_CF7_category = '<?php \n echo $catData->term_id; ?>';\n</script>\n<script type='text/javascript' src='<?php echo plugins_url('/js/get_product_list.js?ver=1.9',__FILE__ ) ?>'></script>\n<?php\n// add new products to basket\n?><script type='text/javascript' src='<?php echo plugins_url('/js/add_to_product_list.js?ver=2.1',__FILE__ ) ?>'></script>\n<script type='text/javascript' src='<?php echo plugins_url('/js/add_to_product_activation.js?ver=1.2',__FILE__ ) ?>'></script>\n<?php\n\n\n###\n# end of base function\n###\n}", "function woocommerce_isotope_scripts() {\n\twp_enqueue_style( 'wp_woocommerce-isotope', plugins_url().'/wp_woocommerce-isotope/css/style.css');\n\t/*wp_enqueue_script( 'masonry', plugins_url().'/wp_woocommerce-isotope/js/masonry.pkgd.min.js', array('jquery'), '3.1.2', true );*/\n\twp_enqueue_script( 'isotope', plugins_url().'/wp_woocommerce-isotope/js/jquery.isotope.min.js', array('jquery'), '1.5.25', true );\n\twp_enqueue_script( 'wp_woocommerce-isotope', plugins_url().'/wp_woocommerce-isotope/js/main.js', array('isotope'), '1.0', true );\n}", "public function enqueue_scripts() {\n wp_register_script('wp_infinite_categories', plugins_url('js/wp-infinite-categories.js', __FILE__), array('jquery'));\n wp_enqueue_script('wp_infinite_categories');\n \n // Passes admin-ajax url and current_query_vars to the javascipt file.\n wp_localize_script('wp_infinite_categories', 'ajax_data', array(\n 'url' => admin_url('admin-ajax.php'),\n 'query_vars' => $this->current_query_vars,\n ));\n }", "function footer_scripts(){\n\tglobal $post;\n\n\tif( wp_script_is( 'functions', 'done' ) ) :\n\n?>\n\t\t<script type=\"text/javascript\">\n\n\n\t\t\t<?php if( is_home() ) : ?>\n\t\t\t\t/*------------------------------------*\\\n\t\t\t\t\t#HOME\n\t\t\t\t\\*------------------------------------*/\n\n\t\t\t\t//toggleElementOnSscroll( $('header'), '.hero__text');\n\t\t\t\ttoggleElementOnSscroll( $('.image-bg--hero'), '.btn--map--float');\n\n\t\t\t\t$(window).scroll(function(){\n\t\t\t\t\t//toggleElementOnSscroll( $('header'), '.hero__text');\n\t\t\t\t\ttoggleElementOnSscroll( $('.image-bg--hero'), '.btn--map--float');\n\t\t\t\t});\n\n\t\t\t<?php endif; ?>\n\n\t\t\t<?php if( is_archive() ) : ?>\n\t\t\t\t/*------------------------------------*\\\n\t\t\t\t\t#MAP\n\t\t\t\t\\*------------------------------------*/\n\n\t\t\t\taddAllMarkers();\n\n\t\t\t<?php endif; ?>\n\n\n\t\t\t<?php if( is_single() ) : ?>\n\t\t\t\t/*------------------------------------*\\\n\t\t\t\t\t#SINGLE\n\t\t\t\t\\*------------------------------------*/\n\n\t\t\t\twindow.fbAsyncInit = function() {\n\t\t\t\t\tFB.init({\n\t\t\t\t\t\tappId : '1487150328256182',\n\t\t\t\t\t\txfbml : true,\n\t\t\t\t\t\tversion : 'v2.4'\n\t\t\t\t\t});\n\t\t\t\t};\n\n\t\t\t\t(function(d, s, id){\n\t\t\t\t var js, fjs = d.getElementsByTagName(s)[0];\n\t\t\t\t if (d.getElementById(id)) {return;}\n\t\t\t\t js = d.createElement(s); js.id = id;\n\t\t\t\t js.src = \"//connect.facebook.net/en_US/sdk.js\";\n\t\t\t\t fjs.parentNode.insertBefore(js, fjs);\n\t\t\t\t}(document, 'script', 'facebook-jssdk'));\n\n\n\t\t\t\t/**\n\t\t\t\t * Triggered events\n\t\t\t\t**/\n\n\t\t\t\t// Pasar a función\n\t\t\t\tvar lat = <?php echo get_lat( get_the_ID() ); ?>;\n\t\t\t\tvar lng = <?php echo get_lng( get_the_ID() ); ?>;\n\t\t\t\tvar decada = <?php echo get_decada( get_the_ID() ); ?>;\n\t\t\t\tvar isAerial = <?php echo get_vista_aerea( get_the_ID() ) ?>;\n\t\t\t\tvar heading = <?php echo get_heading( get_the_ID() ) ?>;\n\n\t\t\t\tshowSingleMap( lat, lng, heading, isAerial, decada );\n\n\t\t\t\t$('.js-fb-share').click( function(){\n\t\t\t\t\tFB.ui(\n\t\t\t\t\t{\n\t\t\t\t\t\tmethod: 'share',\n\t\t\t\t\t\tname: '<?php echo get_the_title(); ?>',\n\t\t\t\t\t\thref: '<?php echo the_permalink() ?>'\n\t\t\t\t\t}, function(response){ console.log( response )});\n\t\t\t\t});\n\n\t\t\t<?php endif; ?>\n\t\t</script>\n<?php\n\tendif;\n}", "function sort_admin_categories()\n {\n $this->outer_template = null;\n\n // Require admin login\n if(!(isset($_SESSION['active_user']) && $_SESSION['active_user']['type'] == 'admin'))\n die;\n\n if(!isset($_POST['SortOrder']))\n die;\n\n $order = explode(',', $_POST['SortOrder']); \n\n $m_categories = instance_model('member_categories');\n\n $m_categories->update_sort($order);\n }", "function feature_filter_order($orderby){\r\n\tglobal $wpdb,$wp_query;\r\n\t\r\n\tif((is_category() || is_tax() || is_archive() || is_search()) && $wp_query->tax_query->queries[0]['taxonomy'] != 'product_cat'){\r\n\t\r\n\t\tif (isset($_REQUEST['tevolution_sortby']) && ($_REQUEST['tevolution_sortby'] == 'title_asc' || $_REQUEST['tevolution_sortby'] == 'alphabetical')){\r\n\t\t\t$orderby= \"$wpdb->posts.post_title ASC,(select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id=$wpdb->posts.ID and $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') ASC\";\r\n\t\t}elseif (isset($_REQUEST['tevolution_sortby']) && $_REQUEST['tevolution_sortby'] == 'title_desc' ){\r\n\t\t\t$orderby = \"$wpdb->posts.post_title DESC,(select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id=$wpdb->posts.ID and $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') DESC\";\r\n\t\t}elseif (isset($_REQUEST['tevolution_sortby']) && $_REQUEST['tevolution_sortby'] == 'date_asc' ){\r\n\t\t\t$orderby = \"$wpdb->posts.post_date ASC,(select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id=$wpdb->posts.ID and $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') DESC\";\r\n\t\t}elseif (isset($_REQUEST['tevolution_sortby']) && $_REQUEST['tevolution_sortby'] == 'date_desc' ){\r\n\t\t\t$orderby = \"$wpdb->posts.post_date DESC,(select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id=$wpdb->posts.ID and $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') DESC\";\r\n\t\t}elseif(isset($_REQUEST['tevolution_sortby']) && $_REQUEST['tevolution_sortby'] == 'random' ){\r\n\t\t\t$orderby = \" (select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id=$wpdb->posts.ID and $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') DESC,rand()\";\r\n\t\t}elseif(isset($_REQUEST['tevolution_sortby']) && $_REQUEST['tevolution_sortby'] == 'reviews' ){\r\n\t\t\t$orderby = 'DESC';\r\n\t\t\t$orderby = \" comment_count $orderby,(select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id=$wpdb->posts.ID and $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') DESC\";\r\n\t\t}elseif(isset($_REQUEST['tevolution_sortby']) && $_REQUEST['tevolution_sortby'] == 'rating' ){\r\n\r\n\t\t\t$orderby = \" (select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id = $wpdb->posts.ID and $wpdb->postmeta.meta_key like \\\"average_rating\\\") DESC,(select distinct $wpdb->postmeta.meta_value from $wpdb->postmeta where $wpdb->postmeta.post_id=$wpdb->posts.ID and $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') DESC\";\r\n\t\t}else{\r\n\t\t\t$orderby = \" (SELECT DISTINCT $wpdb->postmeta.meta_value from $wpdb->postmeta where ($wpdb->posts.ID = $wpdb->postmeta.post_id) AND $wpdb->postmeta.meta_key = 'featured_c' AND $wpdb->postmeta.meta_value = 'c') DESC,$wpdb->posts.post_date DESC\";\r\n\t\t}\r\n\t}\r\n\treturn $orderby;\r\n}", "public function onBeforeCompileHead() {\n\t\t$document = JFactory::getDocument();\n\t\t$headData = $document->getHeadData();\n\t\t$scripts = &$headData['scripts'];\n\n\t\t// удалить скрипт из массива в админке\n\t\tunset($scripts['/media/k2/assets/js/k2.frontend.js?v=2.8.0&amp;sitepath=/']);\n\t\t$headData['scripts'] = $scripts;\n\t\t$document->setHeadData($headData);\n\n // Проверить это это страницы админки\n $app = JFactory::getApplication();\n if ($app->isSite()) {\n return;\n }\n\n $document = JFactory::getDocument();\n\n // подключить скрипт для сортировки\n $document->addScript(JUri::root().'plugins/system/newwallet_sort/js/sort.js' );\n\t}", "function modifyThemeFooter() {\n?>\n<!-- W3TC-include-js-head -->\n<?php\n}", "function listposts_scripts()\n{\n wp_enqueue_style('frontend-layout', plugin_dir_url(__FILE__) . 'assets/front/css/style.css');\n // wp_enqueue_style( 'frontend-layout', plugin_dir_url( __FILE__ ).'css/msg-style.css' ); \n wp_enqueue_script('validate-application', plugin_dir_url(__FILE__) . 'js/custom.js', '', '', true);\n \n \n wp_enqueue_style('ibenic-bootstrap-css', \"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css\");\n wp_enqueue_script('ibenic-bootstrap-js', \"https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\", array(\n 'jquery'\n ), '1.0.0');\n wp_enqueue_script('bootstrap-js', \"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js\", array(\n 'jquery'\n ), '1.0.0', true);\n}", "function aqa_gallery_scripts() {\n\twp_enqueue_script( 'aqa-gallery-menu', get_stylesheet_directory_uri() . '/aqa-gallery-menu.js', array('jquery') );\n}", "function footer_js(){\n\t\t$r = array();\n\t\t?>\n\t\t<script type='text/javascript'>\n\t\t\tvar wpfc_loaded = false;\n\t\t\tvar wpfc_counts = {};\n\t\t\tvar wpfc_data = { action : 'WP_FullCalendar'<?php\n\t\t\t\t\t//these arguments were assigned earlier on when displaying the calendar, and remain constant between ajax calls\n\t\t\t\t\tif(!empty(self::$args)){ echo \", \"; }\n\t\t\t\t\t$strings = array(); \n\t\t\t\t\tforeach( self::$args as $key => $arg ){\n\t\t\t\t\t\t$arg = is_numeric($arg) ? (int) $arg : \"'$arg'\"; \n\t\t\t\t\t\t$strings[] = \"'$key'\" .\" : \". $arg ; \n\t\t\t\t\t}\n\t\t\t\t\techo implode(\", \", $strings);\n\t\t\t?> };\n\t\t\tjQuery(document).ready( function($){\t\n\t\t\t\tvar fullcalendar_args = {\n\t\t\t\t\ttimeFormat: '<?php echo get_option('wpfc_timeFormat', 'h(:mm)t'); ?>',\n\t\t\t\t\tdefaultView: '<?php echo get_option('wpfc_defaultView', 'month'); ?>',\n\t\t\t\t\tweekends: <?php echo get_option('wpfc_weekends',true) ? 'true':'false'; ?>,\n\t\t\t\t\theader: {\n\t\t\t\t\t\tleft: 'prev,next today',\n\t\t\t\t\t\tcenter: 'title',\n\t\t\t\t\t\tright: '<?php echo implode(',', get_option('wpfc_available_views', array('month','basicWeek','basicDay'))); ?>'\n\t\t\t\t\t},\n\t\t\t\t\tmonth: <?php echo self::$args['month']; ?>,\n\t\t\t\t\tyear: <?php echo self::$args['year']; ?>,\n\t\t\t\t\ttheme: WPFC.wpfc_theme,\n\t\t\t\t\tfirstDay: WPFC.firstDay,\n\t\t\t\t\teditable: false,\n\t\t\t\t\teventSources: [{\n\t\t\t\t\t\t\turl : WPFC.ajaxurl,\n\t\t\t\t\t\t\tdata : wpfc_data,\n\t\t\t\t\t\t\tignoreTimezone: true,\n\t\t\t\t\t\t\tallDayDefault: false\n\t\t\t\t\t}],\n\t\t\t\t eventRender: function(event, element) {\n\t\t\t\t\t\tif( event.post_id > 0 && WPFC.wpfc_qtips == 1 ){\n\t\t\t\t\t\t\tvar event_data = { action : 'wpfc_qtip_content', post_id : event.post_id, event_id:event.event_id };\n\t\t\t\t\t\t\telement.qtip({\n\t\t\t\t\t\t\t\tcontent:{\n\t\t\t\t\t\t\t\t\ttext : 'Loading...',\n\t\t\t\t\t\t\t\t\tajax : {\n\t\t\t\t\t\t\t\t\t\turl : WPFC.ajaxurl,\n\t\t\t\t\t\t\t\t\t\ttype : \"POST\",\n\t\t\t\t\t\t\t\t\t\tdata : event_data\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\tposition : {\n\t\t\t\t\t\t\t\t\tmy: WPFC.wpfc_qtips_my,\n\t\t\t\t\t\t\t\t\tat: WPFC.wpfc_qtips_at\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tstyle : { classes:WPFC.wpfc_qtips_classes }\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t },\n\t\t\t\t\tloading: function(bool) {\n\t\t\t\t\t\tif (bool) {\n\t\t\t\t\t\t\tvar position = $('#wpfc-calendar').position();\n\t\t\t\t\t\t\t$('.wpfc-loading').css('left',position.left).css('top',position.top).css('width',$('#calendar').width()).css('height',$('#calendar').height()).show();\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\twpfc_counts = {};\n\t\t\t\t\t\t\t$('.wpfc-loading').hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tviewDisplay: function(view) {\n\t\t\t\t\t\tif( !wpfc_loaded ){\n\t\t\t\t\t\t\t$('.fc-header tbody').append('<tr><td id=\"wpfc-filters\" colspan=\"3\"></td></tr>');\n\t\t\t\t\t\t\tsearch_menu = $('#wpfc-calendar-search').show();\n\t\t\t\t\t\t\t$('#wpfc-filters').append(search_menu);\n\t\t\t\t\t\t\t//catchall selectmenu handle\n\t\t\t\t\t\t\t$('select.wpfc-taxonomy').selectmenu({\n\t\t\t\t\t\t\t\tformat: function(text){\n\t\t\t\t\t\t\t\t\t//replace the color hexes with color boxes\n\t\t\t\t\t\t\t\t\treturn text.replace(/#([a-zA-Z0-9]{3}[a-zA-Z0-9]{3}?) - /g, '<span class=\"wpfc-cat-icon\" style=\"background-color:#$1\"></span>');\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\topen: function(){\n\t\t\t\t\t\t\t\t\t$('.ui-selectmenu-menu').css('z-index','1005');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}).change(function(event){\n\t\t\t\t\t\t\t\twpfc_data[$(this).attr('name')] = $(this).find(':selected').val();\n\t\t\t\t\t\t\t\t$('#wpfc-calendar').fullCalendar('removeEventSource', WPFC.ajaxurl).fullCalendar('addEventSource', {url : WPFC.ajaxurl, allDayDefault:false, ignoreTimezone: true, data : wpfc_data});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\twpfc_loaded = true;\n\t\t\t\t }\n\t\t\t\t};\n\t\t\t\tif( WPFC.wpfc_locale ){\n\t\t\t\t\t$.extend(fullcalendar_args, WPFC.wpfc_locale);\n\t\t\t\t}\n\t\t\t\t$(document).trigger('wpfc_fullcalendar_args', [fullcalendar_args]);\n\t\t\t\t$('#wpfc-calendar').fullCalendar(fullcalendar_args);\n\t\t\t\tif( WPFC.wpfc_theme_css != '' ){ // add themeroller\n\t\t\t\t\t$('script#jquery-ui-css').remove(); //remove old css if exists\n\t\t\t\t\tvar script = document.createElement(\"link\"); script.id = \"jquery-ui-css\"; script.rel = \"stylesheet\"; script.href = WPFC.wpfc_theme_css;\n\t\t\t\t\tdocument.body.appendChild(script);\n\t\t\t\t}\n\t\t\t});\n\t\t\t//selectmenu @ https://github.com/fnagel/jquery-ui\n\t\t\t(function(e){e.widget(\"ui.selectmenu\",{options:{appendTo:\"body\",typeAhead:1e3,style:\"dropdown\",positionOptions:null,width:null,menuWidth:null,handleWidth:26,maxHeight:null,icons:null,format:null,escapeHtml:false,bgImage:function(){}},_create:function(){var t=this,n=this.options;var r=this.element.uniqueId().attr(\"id\");this.ids=[r,r+\"-button\",r+\"-menu\"];this._safemouseup=true;this.isOpen=false;this.newelement=e(\"<a />\",{\"class\":\"ui-selectmenu ui-widget ui-state-default ui-corner-all\",id:this.ids[1],role:\"button\",href:\"#nogo\",tabindex:this.element.attr(\"disabled\")?1:0,\"aria-haspopup\":true,\"aria-owns\":this.ids[2]});this.newelementWrap=e(\"<span />\").append(this.newelement).insertAfter(this.element);var i=this.element.attr(\"tabindex\");if(i){this.newelement.attr(\"tabindex\",i)}this.newelement.data(\"selectelement\",this.element);this.selectmenuIcon=e('<span class=\"ui-selectmenu-icon ui-icon\"></span>').prependTo(this.newelement);this.newelement.prepend('<span class=\"ui-selectmenu-status\" />');this.element.bind({\"click.selectmenu\":function(e){t.newelement.focus();e.preventDefault()}});this.newelement.bind(\"mousedown.selectmenu\",function(e){t._toggle(e,true);if(n.style==\"popup\"){t._safemouseup=false;setTimeout(function(){t._safemouseup=true},300)}e.preventDefault()}).bind(\"click.selectmenu\",function(e){e.preventDefault()}).bind(\"keydown.selectmenu\",function(n){var r=false;switch(n.keyCode){case e.ui.keyCode.ENTER:r=true;break;case e.ui.keyCode.SPACE:t._toggle(n);break;case e.ui.keyCode.UP:if(n.altKey){t.open(n)}else{t._moveSelection(-1)}break;case e.ui.keyCode.DOWN:if(n.altKey){t.open(n)}else{t._moveSelection(1)}break;case e.ui.keyCode.LEFT:t._moveSelection(-1);break;case e.ui.keyCode.RIGHT:t._moveSelection(1);break;case e.ui.keyCode.TAB:r=true;break;case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.HOME:t.index(0);break;case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.END:t.index(t._optionLis.length);break;default:r=true}return r}).bind(\"keypress.selectmenu\",function(e){if(e.which>0){t._typeAhead(e.which,\"mouseup\")}return true}).bind(\"mouseover.selectmenu\",function(){if(!n.disabled)e(this).addClass(\"ui-state-hover\")}).bind(\"mouseout.selectmenu\",function(){if(!n.disabled)e(this).removeClass(\"ui-state-hover\")}).bind(\"focus.selectmenu\",function(){if(!n.disabled)e(this).addClass(\"ui-state-focus\")}).bind(\"blur.selectmenu\",function(){if(!n.disabled)e(this).removeClass(\"ui-state-focus\")});e(document).bind(\"mousedown.selectmenu-\"+this.ids[0],function(n){if(t.isOpen&&!e(n.target).closest(\"#\"+t.ids[1]).length){t.close(n)}});this.element.bind(\"click.selectmenu\",function(){t._refreshValue()}).bind(\"focus.selectmenu\",function(){if(t.newelement){t.newelement[0].focus()}});if(!n.width){n.width=this.element.outerWidth()}this.newelement.width(n.width);this.element.hide();this.list=e(\"<ul />\",{\"class\":\"ui-widget ui-widget-content\",\"aria-hidden\":true,role:\"listbox\",\"aria-labelledby\":this.ids[1],id:this.ids[2]});this.listWrap=e(\"<div />\",{\"class\":\"ui-selectmenu-menu\"}).append(this.list).appendTo(n.appendTo);this.list.bind(\"keydown.selectmenu\",function(n){var r=false;switch(n.keyCode){case e.ui.keyCode.UP:if(n.altKey){t.close(n,true)}else{t._moveFocus(-1)}break;case e.ui.keyCode.DOWN:if(n.altKey){t.close(n,true)}else{t._moveFocus(1)}break;case e.ui.keyCode.LEFT:t._moveFocus(-1);break;case e.ui.keyCode.RIGHT:t._moveFocus(1);break;case e.ui.keyCode.HOME:t._moveFocus(\":first\");break;case e.ui.keyCode.PAGE_UP:t._scrollPage(\"up\");break;case e.ui.keyCode.PAGE_DOWN:t._scrollPage(\"down\");break;case e.ui.keyCode.END:t._moveFocus(\":last\");break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:t.close(n,true);e(n.target).parents(\"li:eq(0)\").trigger(\"mouseup\");break;case e.ui.keyCode.TAB:r=true;t.close(n,true);e(n.target).parents(\"li:eq(0)\").trigger(\"mouseup\");break;case e.ui.keyCode.ESCAPE:t.close(n,true);break;default:r=true}return r}).bind(\"keypress.selectmenu\",function(e){if(e.which>0){t._typeAhead(e.which,\"focus\")}return true}).bind(\"mousedown.selectmenu mouseup.selectmenu\",function(){return false});e(window).bind(\"resize.selectmenu-\"+this.ids[0],e.proxy(t.close,this))},_init:function(){var t=this,n=this.options;var r=[];this.element.find(\"option\").each(function(){var i=e(this);r.push({value:i.attr(\"value\"),text:t._formatText(i.text(),i),selected:i.attr(\"selected\"),disabled:i.attr(\"disabled\"),classes:i.attr(\"class\"),typeahead:i.attr(\"typeahead\"),parentOptGroup:i.parent(\"optgroup\"),bgImage:n.bgImage.call(i)})});var i=t.options.style==\"popup\"?\" ui-state-active\":\"\";this.list.html(\"\");if(r.length){for(var s=0;s<r.length;s++){var o={role:\"presentation\"};if(r[s].disabled){o[\"class\"]=\"ui-state-disabled\"}var u={html:r[s].text||\" \",href:\"#nogo\",tabindex:-1,role:\"option\",\"aria-selected\":false};if(r[s].disabled){u[\"aria-disabled\"]=r[s].disabled}if(r[s].typeahead){u[\"typeahead\"]=r[s].typeahead}var a=e(\"<a/>\",u).bind(\"focus.selectmenu\",function(){e(this).parent().mouseover()}).bind(\"blur.selectmenu\",function(){e(this).parent().mouseout()});var f=e(\"<li/>\",o).append(a).data(\"index\",s).addClass(r[s].classes).data(\"optionClasses\",r[s].classes||\"\").bind(\"mouseup.selectmenu\",function(n){if(t._safemouseup&&!t._disabled(n.currentTarget)&&!t._disabled(e(n.currentTarget).parents(\"ul > li.ui-selectmenu-group \"))){t.index(e(this).data(\"index\"));t.select(n);t.close(n,true)}return false}).bind(\"click.selectmenu\",function(){return false}).bind(\"mouseover.selectmenu\",function(n){if(!e(this).hasClass(\"ui-state-disabled\")&&!e(this).parent(\"ul\").parent(\"li\").hasClass(\"ui-state-disabled\")){n.optionValue=t.element[0].options[e(this).data(\"index\")].value;t._trigger(\"hover\",n,t._uiHash());t._selectedOptionLi().addClass(i);t._focusedOptionLi().removeClass(\"ui-selectmenu-item-focus ui-state-hover\");e(this).removeClass(\"ui-state-active\").addClass(\"ui-selectmenu-item-focus ui-state-hover\")}}).bind(\"mouseout.selectmenu\",function(n){if(e(this).is(t._selectedOptionLi())){e(this).addClass(i)}n.optionValue=t.element[0].options[e(this).data(\"index\")].value;t._trigger(\"blur\",n,t._uiHash());e(this).removeClass(\"ui-selectmenu-item-focus ui-state-hover\")});if(r[s].parentOptGroup.length){var l=\"ui-selectmenu-group-\"+this.element.find(\"optgroup\").index(r[s].parentOptGroup);if(this.list.find(\"li.\"+l).length){this.list.find(\"li.\"+l+\":last ul\").append(f)}else{e('<li role=\"presentation\" class=\"ui-selectmenu-group '+l+(r[s].parentOptGroup.attr(\"disabled\")?\" \"+'ui-state-disabled\" aria-disabled=\"true\"':'\"')+'><span class=\"ui-selectmenu-group-label\">'+r[s].parentOptGroup.attr(\"label\")+\"</span><ul></ul></li>\").appendTo(this.list).find(\"ul\").append(f)}}else{f.appendTo(this.list)}if(n.icons){for(var c in n.icons){if(f.is(n.icons[c].find)){f.data(\"optionClasses\",r[s].classes+\" ui-selectmenu-hasIcon\").addClass(\"ui-selectmenu-hasIcon\");var h=n.icons[c].icon||\"\";f.find(\"a:eq(0)\").prepend('<span class=\"ui-selectmenu-item-icon ui-icon '+h+'\"></span>');if(r[s].bgImage){f.find(\"span\").css(\"background-image\",r[s].bgImage)}}}}}}else{e(' <li role=\"presentation\"><a href=\"#nogo\" tabindex=\"-1\" role=\"option\"></a></li>').appendTo(this.list)}var p=n.style==\"dropdown\";this.newelement.toggleClass(\"ui-selectmenu-dropdown\",p).toggleClass(\"ui-selectmenu-popup\",!p);this.list.toggleClass(\"ui-selectmenu-menu-dropdown ui-corner-bottom\",p).toggleClass(\"ui-selectmenu-menu-popup ui-corner-all\",!p).find(\"li:first\").toggleClass(\"ui-corner-top\",!p).end().find(\"li:last\").addClass(\"ui-corner-bottom\");this.selectmenuIcon.toggleClass(\"ui-icon-triangle-1-s\",p).toggleClass(\"ui-icon-triangle-2-n-s\",!p);if(n.style==\"dropdown\"){this.list.width(n.menuWidth?n.menuWidth:n.width)}else{this.list.width(n.menuWidth?n.menuWidth:n.width-n.handleWidth)}this.list.css(\"height\",\"auto\");var d=this.listWrap.height();var v=e(window).height();var m=n.maxHeight?Math.min(n.maxHeight,v):v/3;if(d>m)this.list.height(m);this._optionLis=this.list.find(\"li:not(.ui-selectmenu-group)\");if(this.element.attr(\"disabled\")){this.disable()}else{this.enable()}this._refreshValue();this._selectedOptionLi().addClass(\"ui-selectmenu-item-focus\");clearTimeout(this.refreshTimeout);this.refreshTimeout=window.setTimeout(function(){t._refreshPosition()},200)},destroy:function(){this.element.removeData(this.widgetName).removeClass(\"ui-selectmenu-disabled\"+\" \"+\"ui-state-disabled\").removeAttr(\"aria-disabled\").unbind(\".selectmenu\");e(window).unbind(\".selectmenu-\"+this.ids[0]);e(document).unbind(\".selectmenu-\"+this.ids[0]);this.newelementWrap.remove();this.listWrap.remove();this.element.unbind(\".selectmenu\").show();e.Widget.prototype.destroy.apply(this,arguments)},_typeAhead:function(e,t){var n=this,r=String.fromCharCode(e).toLowerCase(),i=null,s=null;if(n._typeAhead_timer){window.clearTimeout(n._typeAhead_timer);n._typeAhead_timer=undefined}n._typeAhead_chars=(n._typeAhead_chars===undefined?\"\":n._typeAhead_chars).concat(r);if(n._typeAhead_chars.length<2||n._typeAhead_chars.substr(-2,1)===r&&n._typeAhead_cycling){n._typeAhead_cycling=true;i=r}else{n._typeAhead_cycling=false;i=n._typeAhead_chars}var o=(t!==\"focus\"?this._selectedOptionLi().data(\"index\"):this._focusedOptionLi().data(\"index\"))||0;for(var u=0;u<this._optionLis.length;u++){var a=this._optionLis.eq(u).text().substr(0,i.length).toLowerCase();if(a===i){if(n._typeAhead_cycling){if(s===null)s=u;if(u>o){s=u;break}}else{s=u}}}if(s!==null){this._optionLis.eq(s).find(\"a\").trigger(t)}n._typeAhead_timer=window.setTimeout(function(){n._typeAhead_timer=undefined;n._typeAhead_chars=undefined;n._typeAhead_cycling=undefined},n.options.typeAhead)},_uiHash:function(){var t=this.index();return{index:t,option:e(\"option\",this.element).get(t),value:this.element[0].value}},open:function(e){if(this.newelement.attr(\"aria-disabled\")!=\"true\"){var t=this,n=this.options,r=this._selectedOptionLi(),i=r.find(\"a\");t._closeOthers(e);t.newelement.addClass(\"ui-state-active\");t.list.attr(\"aria-hidden\",false);t.listWrap.addClass(\"ui-selectmenu-open\");if(n.style==\"dropdown\"){t.newelement.removeClass(\"ui-corner-all\").addClass(\"ui-corner-top\")}else{this.list.css(\"left\",-5e3).scrollTop(this.list.scrollTop()+r.position().top-this.list.outerHeight()/2+r.outerHeight()/2).css(\"left\",\"auto\")}t._refreshPosition();if(i.length){i[0].focus()}t.isOpen=true;t._trigger(\"open\",e,t._uiHash())}},close:function(e,t){if(this.newelement.is(\".ui-state-active\")){this.newelement.removeClass(\"ui-state-active\");this.listWrap.removeClass(\"ui-selectmenu-open\");this.list.attr(\"aria-hidden\",true);if(this.options.style==\"dropdown\"){this.newelement.removeClass(\"ui-corner-top\").addClass(\"ui-corner-all\")}if(t){this.newelement.focus()}this.isOpen=false;this._trigger(\"close\",e,this._uiHash())}},change:function(e){this.element.trigger(\"change\");this._trigger(\"change\",e,this._uiHash())},select:function(e){if(this._disabled(e.currentTarget)){return false}this._trigger(\"select\",e,this._uiHash())},widget:function(){return this.listWrap.add(this.newelementWrap)},_closeOthers:function(t){e(\".ui-selectmenu.ui-state-active\").not(this.newelement).each(function(){e(this).data(\"selectelement\").selectmenu(\"close\",t)});e(\".ui-selectmenu.ui-state-hover\").trigger(\"mouseout\")},_toggle:function(e,t){if(this.isOpen){this.close(e,t)}else{this.open(e)}},_formatText:function(t,n){if(this.options.format){t=this.options.format(t,n)}else if(this.options.escapeHtml){t=e(\"<div />\").text(t).html()}return t},_selectedIndex:function(){return this.element[0].selectedIndex},_selectedOptionLi:function(){return this._optionLis.eq(this._selectedIndex())},_focusedOptionLi:function(){return this.list.find(\".ui-selectmenu-item-focus\")},_moveSelection:function(e,t){if(!this.options.disabled){var n=parseInt(this._selectedOptionLi().data(\"index\")||0,10);var r=n+e;if(r<0){r=0}if(r>this._optionLis.size()-1){r=this._optionLis.size()-1}if(r===t){return false}if(this._optionLis.eq(r).hasClass(\"ui-state-disabled\")){e>0?++e:--e;this._moveSelection(e,r)}else{this._optionLis.eq(r).trigger(\"mouseover\").trigger(\"mouseup\")}}},_moveFocus:function(e,t){if(!isNaN(e)){var n=parseInt(this._focusedOptionLi().data(\"index\")||0,10);var r=n+e}else{var r=parseInt(this._optionLis.filter(e).data(\"index\"),10)}if(r<0){r=0}if(r>this._optionLis.size()-1){r=this._optionLis.size()-1}if(r===t){return false}var i=\"ui-selectmenu-item-\"+Math.round(Math.random()*1e3);this._focusedOptionLi().find(\"a:eq(0)\").attr(\"id\",\"\");if(this._optionLis.eq(r).hasClass(\"ui-state-disabled\")){e>0?++e:--e;this._moveFocus(e,r)}else{this._optionLis.eq(r).find(\"a:eq(0)\").attr(\"id\",i).focus()}this.list.attr(\"aria-activedescendant\",i)},_scrollPage:function(e){var t=Math.floor(this.list.outerHeight()/this._optionLis.first().outerHeight());t=e==\"up\"?-t:t;this._moveFocus(t)},_setOption:function(e,t){this.options[e]=t;if(e==\"disabled\"){if(t)this.close();this.element.add(this.newelement).add(this.list)[t?\"addClass\":\"removeClass\"](\"ui-selectmenu-disabled \"+\"ui-state-disabled\").attr(\"aria-disabled\",t)}},disable:function(e,t){if(typeof e==\"undefined\"){this._setOption(\"disabled\",true)}else{if(t==\"optgroup\"){this._toggleOptgroup(e,false)}else{this._toggleOption(e,false)}}},enable:function(e,t){if(typeof e==\"undefined\"){this._setOption(\"disabled\",false)}else{if(t==\"optgroup\"){this._toggleOptgroup(e,true)}else{this._toggleOption(e,true)}}},_disabled:function(t){return e(t).hasClass(\"ui-state-disabled\")},_toggleOption:function(e,t){var n=this._optionLis.eq(e);if(n){n.toggleClass(\"ui-state-disabled\",t).find(\"a\").attr(\"aria-disabled\",!t);if(t){this.element.find(\"option\").eq(e).attr(\"disabled\",\"disabled\")}else{this.element.find(\"option\").eq(e).removeAttr(\"disabled\")}}},_toggleOptgroup:function(e,t){var n=this.list.find(\"li.ui-selectmenu-group-\"+e);if(n){n.toggleClass(\"ui-state-disabled\",t).attr(\"aria-disabled\",!t);if(t){this.element.find(\"optgroup\").eq(e).attr(\"disabled\",\"disabled\")}else{this.element.find(\"optgroup\").eq(e).removeAttr(\"disabled\")}}},index:function(t){if(arguments.length){if(!this._disabled(e(this._optionLis[t]))&&t!=this._selectedIndex()){this.element[0].selectedIndex=t;this._refreshValue();this.change()}else{return false}}else{return this._selectedIndex()}},value:function(e){if(arguments.length&&e!=this.element[0].value){this.element[0].value=e;this._refreshValue();this.change()}else{return this.element[0].value}},_refreshValue:function(){var e=this.options.style==\"popup\"?\" ui-state-active\":\"\";var t=\"ui-selectmenu-item-\"+Math.round(Math.random()*1e3);this.list.find(\".ui-selectmenu-item-selected\").removeClass(\"ui-selectmenu-item-selected\"+e).find(\"a\").attr(\"aria-selected\",\"false\").attr(\"id\",\"\");this._selectedOptionLi().addClass(\"ui-selectmenu-item-selected\"+e).find(\"a\").attr(\"aria-selected\",\"true\").attr(\"id\",t);var n=this.newelement.data(\"optionClasses\")?this.newelement.data(\"optionClasses\"):\"\";var r=this._selectedOptionLi().data(\"optionClasses\")?this._selectedOptionLi().data(\"optionClasses\"):\"\";this.newelement.removeClass(n).data(\"optionClasses\",r).addClass(r).find(\".ui-selectmenu-status\").html(this._selectedOptionLi().find(\"a:eq(0)\").html());this.list.attr(\"aria-activedescendant\",t)},_refreshPosition:function(){var t=this.options,n={of:this.newelement,my:\"left top\",at:\"left bottom\",collision:\"flip\"};if(t.style==\"popup\"){var r=this._selectedOptionLi();n.my=\"left top\"+(this.list.offset().top-r.offset().top-(this.newelement.outerHeight()+r.outerHeight())/2);n.collision=\"fit\"}this.listWrap.removeAttr(\"style\").zIndex(this.element.zIndex()+2).position(e.extend(n,t.positionOptions))}})})(jQuery)\n\t\t</script>\n\t\t<?php\n\t}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "function escort_files() {\n wp_enqueue_script('adding-js', get_theme_file_uri('/script.js'), array(), false, true );\n wp_register_style('add-bx-css1', get_stylesheet_directory_uri() . '/css/style.css', array(), '1', 'all');\n wp_register_style('add-bx-css2', get_stylesheet_directory_uri() . '/css/bootstrap.css', array(), '1', 'all');\n wp_register_style('add-bx-css3', get_stylesheet_directory_uri() . '/css/flexslider.css', array(), '1', 'all');\n wp_register_style('add-bx-css4', get_stylesheet_directory_uri() . '/css/popuo-box.css', array(), '1', 'all');\n wp_register_style('font-awesome', get_stylesheet_directory_uri() . '/css///netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '1', 'all');\n\n /* wp_enqueue_script('add-bx-js1');\n wp_enqueue_script('add-bx-js2');\n wp_enqueue_script('add-bx-js3');\n wp_enqueue_script('add-bx-js4');\n wp_enqueue_script('add-bx-js5');\n wp_enqueue_script('add-bx-js6');*/\n wp_enqueue_style('add-bx-css1');\n wp_enqueue_style('add-bx-css2');\n wp_enqueue_style('add-bx-css3');\n wp_enqueue_style('add-bx-css4');\n wp_enqueue_style('font-awesome');\n}", "function ajax_filter_get_posts( $post ) {\n\n\t// Verify nonce\n\tif( !isset( $_POST['afp_nonce'] ) || !wp_verify_nonce( $_POST['afp_nonce'], 'afp_nonce' ) )\n\t\tdie('Permission denied');\n\n\t$category = $_POST['category'];\n\t$tag = $_POST['tag'];\n\t$postType = $_POST['postType'];\n\t\n\t$postTypeArray = explode(',',$postType);\n\t\n\t$categoryArray = explode(',',$category);\n\t$search = $_POST['search'];\n\t$author = $_POST['author'];\n\t//excluded posts\n\t$exclude = $_POST['ids'];\n\t//what type of filter?\n\t$filterType = $_POST['filterType'];\n\t//what is the selection?\n\t$selection = $_POST['selection'];\n\t$selectionArray = explode(',',$selection);\n\t//are we filtering or loading more?\n\t$loadMore = $_POST['loadMore'];\n\t//what type of page are we on?\n\t$pageType = $_POST['pageType'];\n\t//if we are on a category or tag page, what is the term?\n\t$pageCategory = $_POST['pageCategory'];\n\n\t//separate the year and month\n\t$year = $selectionArray[0];\n\t$month = $selectionArray[1];\n\t\n\tif($month) {\n\t\t$month = $month;\n\t} else {\n\t\t$month = '';\n\t}\n\n\n\tif($loadMore == 'true') {\n\t\t//if we are loading more\n\n\t\tif($filterType == 'author') {\n\t\t\t\t//if load more on author archive\n\t\t\t\t$args = array(\n\t\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t\t'author_name'\t\t=> $selection\n\t\t\t\t); \n\t\t} else if($filterType == 'year' && $pageType == 'category') {\n\t\t\t//if filtering by year on a category page and loading more\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t'cat'\t\t\t\t=> $pageCategory,\n\t\t\t\t'date_query' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'year' => $year,\n\t\t\t\t\t\t\t'month' => $month\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'year' && $pageType == 'tag') {\n\t\t\t//if filtering by year on a tag page and loading more\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t'tag_id'\t\t\t=> $pageCategory,\n\t\t\t\t'date_query' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'year' => $year,\n\t\t\t\t\t\t\t'month' => $month\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'year' && $pageType == 'press') {\n\t\t\t//if filtering by year on press page and loading more\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'press',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t'date_query' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'year' => $year,\n\t\t\t\t\t\t\t'month' => $month\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'press_tag') {\n\t\t\t//if filtering by press_tag on press page and loading more\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'press',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t'tax_query' \t\t=> array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'taxonomy' => 'press_tag',\n\t\t\t\t\t\t\t'field' => 'term_id',\n\t\t\t\t\t\t\t'terms' => $selection,\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'category' && $pageType == 'blog') {\n\t\t\t//if loading more on a category page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t'category__in'\t\t=> $selectionArray \n\t\t\t); \n\t\t} else if($pageType == 'blog') {\n\t\t\t//if loading more on blog landing page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t); \n\t\t} else if($filterType == 'category') {\n\t\t\t//if loading more on a category page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t'category__in'\t\t=> $selectionArray \n\t\t\t); \n\t\t} else if($pageType == 'press') {\n\t\t\t//if loading more on a press page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'press',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t); \n\t\t} else if($filterType == 'tag') {\n\t\t\t//if loading more on a tag page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t\t'tag__in'\t\t\t=> $selectionArray \n\t\t\t); \n\t\t} else if($filterType == 'type') {\n\t\t\t//if filtering by post type\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> $selectionArray,\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t's'\t\t\t\t\t=> $search,\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t); \n\t\t}\t\n\t} else {\n\t\t//if we are filtering\n\n\t\tif($filterType == 'year' && $pageType == 'category') {\n\t\t\t//if filtering by year on a category page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'cat'\t\t\t\t=> $pageCategory,\n\t\t\t\t'date_query' \t\t=> array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'year' => $year,\n\t\t\t\t\t\t\t'month' => $month\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'year' && $pageType == 'tag') {\n\t\t\t//if filtering by year on a tag page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'tag_id'\t\t\t=> $pageCategory,\n\t\t\t\t'date_query' \t\t=> array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'year' => $year,\n\t\t\t\t\t\t\t'month' => $month\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'year' && $pageType == 'press') {\n\t\t\t//if filtering by year on a press page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'press',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'date_query' \t\t=> array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'year' => $year,\n\t\t\t\t\t\t\t'month' => $month\n\t\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'press_tag' && $pageType == 'press') {\n\t\t\t//if filtering by press tag on a press page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'press',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'tax_query' \t\t=> array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'taxonomy' => 'press_tag',\n\t\t\t\t\t\t\t'field' => 'term_id',\n\t\t\t\t\t\t\t'terms' => $selection,\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t); \n\t\t} else if($filterType == 'category' && $pageType == 'blog') {\n\t\t\t//if filtering by category on blog landing page\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> 'post',\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t'cat'\t\t\t\t=> $selection,\n\t\t\t); \n\t\t} else if($filterType == 'type') {\n\t\t\t//if filtering by post type\n\t\t\t$args = array(\n\t\t\t\t'posts_per_page' \t=> 10,\n\t\t\t\t'orderby'\t\t\t=> 'date',\n\t\t\t\t'order' \t\t\t=> 'DESC',\n\t\t\t\t'post_type' \t\t=> $selectionArray,\n\t\t\t\t'post_status' \t\t=> 'publish',\n\t\t\t\t's'\t\t\t\t\t=> $search,\n\t\t\t\t'post__not_in'\t\t=> $exclude,\n\t\t\t); \n\t\t}\n \n\n\t}\n\n\t$query = new WP_Query( $args );\n\t$count = $query->post_count;\n\n\tif ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();\n\t\t\t\t\n\t\t\tif($search) {\n\t\t\t\t$search = 'true';\n\t\t\t} else {\n\t\t\t\t$search = 'false';\n\t\t\t}\n\n\t\t\t$postID = get_the_ID();\n\t\t\t$maxPages = $query->max_num_pages;\n\t\t\t$link = get_the_permalink($postID);\n\t\t\t$postType = get_post_type($postID);\n\t\t\t$category = get_the_category($postID);\n\t\t\t$thumbnail = get_the_post_thumbnail_url($postID, 'full');\n\n\t\t\tif($thumbnail) {\n\t\t\t\t $thumbnail = '<div class=\"image-wrapper\"><img width=\"800\" height=\"800\" src=\"'.$thumbnail.'\" class=\"attachment-square size-square wp-post-image\" alt=\"\"></div>';\n\t\t\t\t $thumbnailClass = ' feed-item-image';\n\t\t\t} else {\n\t\t\t\t$thumbnail = '';\n\t\t\t\t$thumbnailClass = '';\n\t\t\t}\n\n\n\n\t\t\t$results = '';\n\n\t\t\tif(($postType == 'post') || ($search == 'true') || ($postType == 'press')) {\n\t\t\t\t$results = '<li class=\"new-elements load-item feed-item background-white'.$thumbnailClass.'\" data-post-id=\"'.$postID.'\" data-max-pages=\"'.$maxPages.'\" data-results-count=\"'.$count.'\">'.$thumbnail.'<a href=\"'.$link.'\" class=\"full-link\"></a><div class=\"feed-item-inner padding-mobile-20\"><time class=\"caption margin-mobile-bottom-20\"><a href=\"/category/'.$category[0]->slug.'\">'.$category[0]->name.'</a></time><h2 class=\"headline3 margin-mobile-bottom-10\"><a href=\"'.$link.'\">'.get_the_title($postID).'</a></h2><p>'.excerpt(15).'</p><a href=\"'.$link.'\" class=\"cta-link cta-link-small cta-link-absolute\">Posted '.get_the_time('F j, Y').' &mdash; Read more</a></div></li>';\n\t\t\t\t\n\t\t\t} else if($postType == 'challenges') {\n\t\t\t\t$results = '<li class=\"new-elements load-item feed-item news-item no-indent background-white\" data-post-id=\"'.$postID.'\" data-max-pages=\"'.$maxPages.'\" data-results-count=\"'.$count.'\"> <a class=\"full-link\" href=\"'.$link.'\"></a><h5 class=\"eyebrow margin-mobile-bottom-10\">'.get_field('challenges_header', $postID).'</h5><h3 class=\"headline2-alt\">'.get_the_title($postID).'</h3></li>';\n\t\t\t} else if($postType == 'campaigns') {\n\t\t\t\t$results = '<div class=\"new-elements load-item small-content-item feed-item column pure-u-lg-12-12 pure-u-md-12-12 pure-u-sm-12-12\" data-post-id=\"'.$postID.'\" data-max-pages=\"'.$maxPages.'\" data-results-count=\"'.$count.'\"><a href=\"'.$link.'\" class=\"full-link\"></a><div class=\"small-content-inner\"><div class=\"small-image\"><img alt=\"'.get_the_title($postID).'\" src=\"'.get_the_post_thumbnail_url($postID, 'full').'\" title=\"'.get_the_title($postID).'\"></div><div class=\"small-content\"><h2 class=\"headline2-alt\"><a href=\"'.$link.'\">'.get_the_title($postID).'</a></h2><p class=\"margin-mobile-bottom-10 margin-tablet-landscape-bottom-20 margin-mobile-top-10 margin-tablet-landscape-top-20\">'.excerpt(30).'</p><a class=\"cta-link cta-link-small\" href=\"'.$link.'\" title=\"Read more\">Read more</a></div></div></div>';\n\t\t\t} else {\n\t\t\t\t$results = '<li class=\"new-elements load-item feed-item background-white'.$thumbnailClass.'\" data-post-id=\"'.$postID.'\" data-max-pages=\"'.$maxPages.'\" data-results-count=\"'.$count.'\">'.$thumbnail.'<a href=\"'.$link.'\" class=\"full-link\"></a><div class=\"feed-item-inner padding-mobile-20\"><time class=\"caption margin-mobile-bottom-20\">'.get_the_time('F j, Y').'</time><h2 class=\"headline3 margin-mobile-bottom-10\"><a href=\"'.$link.'\">'.get_the_title($postID).'</a></h2><p>'.excerpt(15).'</p><a href=\"'.$link.'\" class=\"cta-link cta-link-small cta-link-absolute\">Read more</a></div></li>';\n\t\t\t}\n\t\t\t\t\t\t\t\n\n\t\t\t$result['response'][] = $results;\n\t\t\t$result['status'] = 'done';\n\t\n\tendwhile; else:\n\t\t$result['response'] = '<li class=\"feed-item load-item padding-mobile-20 padding-tablet-landscape-40 padding-tablet-landscape-left-85 component-theme-white padding-tablet-landscape-right-85\" data-max-pages=\"0\" data-results-count=\"0\"><h3 class=\"headline3\">There is no content that matches your filter</h3></li>';\n\t\t$result['status'] = '404';\n\tendif;\n \n\t$result = json_encode($result);\n\techo $result;\n\t\n\n\tdie();\n}", "public static function footer_scripts()\n\t{\n\t\tself::$_configInstance->footer_scripts();\n\t}", "function wck_page_load_scripts() {\t\t\r\n\t\t?>\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\t//<![CDATA[\r\n\t\t\tjQuery(document).ready( function($) {\r\n\t\t\t\t$('.if-js-closed').removeClass('if-js-closed').addClass('closed');\r\n\t\t\t\tpostboxes.add_postbox_toggles( '<?php echo $this->hookname; ?>' );\r\n\t\t\t});\r\n\t\t\t//]]>\r\n\t\t</script><?php\r\n\t}", "function jb_dripdeals_load_more_scripts()\n{\n\n global $wp_query;\n\n $args = array(\n 'post_type' => 'product',\n 'posts_per_page' => POST_PER_PAGE,\n);\n$products = new WP_Query($args);\n$variables = $products->query_vars;\n$page = $variables['paged'];\n\n//var_dump($products->max_num_pages);\n // In most cases it is already included on the page and this line can be removed\n wp_enqueue_script('jquery');\n\n wp_register_script('loadmore', get_stylesheet_directory_uri() . '/js/loadmore.js', array('jquery'));\n\n \n wp_localize_script('loadmore', 'jb_dripdeals_loadmore_params', array(\n 'ajaxurl' => site_url() . '/wp-admin/admin-ajax.php', // WordPress AJAX\n 'posts' => json_encode($variables), // everything about our loop is here\n 'current_page' => $page ? $page : 1,\n 'max_page' => $products->max_num_pages,\n ));\n\n wp_enqueue_script('loadmore');\n}", "function rssmi_footer_scripts() {\n\twp_enqueue_style( 'frontend', plugins_url( 'css/frontend.css', dirname( __FILE__ ) ) );\n\twp_enqueue_script( 'showexcerpt', plugins_url( 'scripts/show-excerpt.js', dirname( __FILE__ ) ) );\n}", "public function after() {\n if ($this->auto_render) {\n // Define defaults\n $styles = array('assets/css/main.css' => 'screen');\n $scripts = array('assets/js/jquery-1.10.1.js');\n\n // Add defaults to template variables.\n $this->template->styles = array_reverse(array_merge($this->template->styles, $styles));\n $this->template->scripts = array_reverse(array_merge($this->template->scripts, $scripts));\n }\n\n // Run anything that needs to run after this.\n parent::after();\n }", "public function init()\r\n {\r\n add_action('wp_footer', array($this, 'display'));\r\n }", "function _appthemes_register_theme_scripts() {\n\n\t// Minimize prod or show expanded in dev.\n\t$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\trequire_once APP_THEME_FRAMEWORK_DIR . '/js/localization.php';\n\n\twp_register_script( 'colorbox', APP_THEME_FRAMEWORK_URI . \"/js/colorbox/jquery.colorbox{$min}.js\", array( 'jquery' ), '1.6.1' );\n\twp_register_style( 'colorbox', APP_THEME_FRAMEWORK_URI . \"/js/colorbox/colorbox{$min}.css\", false, '1.6.1' );\n\twp_register_style( 'font-awesome', APP_THEME_FRAMEWORK_URI . \"/lib/font-awesome/css/font-awesome{$min}.css\", false, '4.7.0' );\n\n\twp_register_script( 'footable', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable{$min}.js\", array( 'jquery' ), '2.0.3' );\n\twp_register_script( 'footable-grid', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.grid{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-sort', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.sort{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-filter', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.filter{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-striping', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.striping{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-paginate', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.paginate{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-bookmarkable', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.bookmarkable{$min}.js\", array( 'footable' ), '2.0.3' );\n\n\t_appthemes_localize_theme_scripts();\n}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "function cmdeals_meta_scripts() {\n\t?>\n\t<script type=\"text/javascript\">\n\t\tjQuery(function(){\n\t\t\t<?php do_action('cmdeals_deals_write_panel_js'); ?>\n\t\t});\n\t</script>\n\t<?php\n}", "function onAfterRender()\r\n {\r\n $app = JFactory::getApplication();\r\n\t\tif($app->isAdmin()) return;\t\r\n\r\n $input = $output = JResponse::getBody();\r\n $bparts = explode('<body',$input);\r\n \r\n if (count($bparts)>1)\r\n \t{\r\n \t$before = $bparts[0];\r\n \t$input = '<body';\r\n \tfor($c=1; $c < count($bparts); $c++) $input .= $bparts[$c];\r\n \t$output = $input;\r\n \t}\t\r\n \t\r\n if (preg_match_all(\"#{(.*?)}#s\", $input, $matches) > 0) // any plugins?\r\n \t{\r\n\t\tforeach ($matches[0] as $match) // loop through all plugins\r\n\t\t\t{\t\r\n\t\t\t$parts = explode('|',trim($match,'{}'));\r\n \t\t\tif ($parts[0]=='hotelgallery') // found a match!\r\n \t\t\t\t{\r\n\t \t\t\t\t$pluginRoot = JURI::root().\"/plugins/system/hotelgallery\";\r\n \t\t\t\t\t$id = $parts[1];\r\n \t\t\t\t\t\r\n \t\t\t\t\t$db = JFactory::getDBO();\r\n \t\t\t\t\t$db->setQuery(\"SELECT * FROM `#__hotelreservation_hotel_pictures` WHERE hotel_id=$id\");\r\n \t\t\t\t\t$pictures= $db->loadObjectList();\r\n \t\t\t\t\t//dmp($pictures);\r\n \t\t\t\t\t$div = \"<div class=\\\"gamma-container gamma-loading\\\" id=\\\"gamma-container\\\">\r\n \t\t\t\t\t\t\t<ul class=\\\"gamma-gallery\\\">\";\r\n \t\t\t\t\t$script = \" </ul>\r\n \t\t\t\t\t<div class=\\\"gamma-overlay\\\"></div>\r\n\t\t \r\n\t\t</div>\r\n\r\n\t\t<script src=\\\"https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\\\"></script>\r\n\t\t<script src=\\\"{$pluginRoot}/gallery/js/modernizr.custom.70736.js\\\"></script>\r\n\t\t<script src=\\\"{$pluginRoot}/gallery/js/jquery.masonry.min.js\\\"></script>\r\n\t\t<script src=\\\"{$pluginRoot}/gallery/js/jquery.history.js\\\"></script>\r\n\t\t<script src=\\\"{$pluginRoot}/gallery/js/js-url.min.js\\\"></script>\r\n\t\t<script src=\\\"{$pluginRoot}/gallery/js/jquerypp.custom.js\\\"></script>\r\n\t\t<script src=\\\"{$pluginRoot}/gallery/js/gamma.js\\\"></script>\r\n\t\t<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"{$pluginRoot}/gallery/css/style.css\\\"/>\r\n\t\t<script type=\\\"text/javascript\\\">\r\n\t\t\t\t$ = jQuery.noConflict( true );\r\n\t\t\t\t$(function() {\r\n\r\n\t\t\t\tvar GammaSettings = {\r\n\t\t\t\t\t\t// order is important!\r\n\t\t\t\t\t\tviewport : [ {\r\n\t\t\t\t\t\t\twidth : 1200,\r\n\t\t\t\t\t\t\tcolumns : 5\r\n\t\t\t\t\t\t}, {\r\n\t\t\t\t\t\t\twidth : 900,\r\n\t\t\t\t\t\t\tcolumns : 4\r\n\t\t\t\t\t\t}, {\r\n\t\t\t\t\t\t\twidth : 500,\r\n\t\t\t\t\t\t\tcolumns : 3\r\n\t\t\t\t\t\t}, { \r\n\t\t\t\t\t\t\twidth : 320,\r\n\t\t\t\t\t\t\tcolumns : 2\r\n\t\t\t\t\t\t}, { \r\n\t\t\t\t\t\t\twidth : 0,\r\n\t\t\t\t\t\t\tcolumns : 2\r\n\t\t\t\t\t\t} ]\r\n\t\t\t\t};\r\n\r\n\t\t\t\tGamma.init( GammaSettings, fncallback );\r\n\t\t\t\tfunction fncallback() {\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t\t\t\t\r\n\t\t</script>\t\";\r\n\r\n \t\t\t\t\tforeach( $pictures as $index=>$picture ){\r\n \t\t\t\t\t\t$picture->hotel_picture_path = JURI::root() .PATH_PICTURES.$picture->hotel_picture_path;\r\n$replace .= <<<ASDF\r\n\r\n\t\t\r\n\t\t \r\n\t\t \r\n\t\t <li>\r\n\t\t <div data-alt=\"img01\" data-description=\"<h3>{$pictures[$index]->hotel_picture_info}</h3>\" data-max-width=\"1800\" data-max-height=\"2400\">\r\n\t\t <div data-src=\"{$pictures[$index]->hotel_picture_path}\" data-min-width=\"1300\"></div>\r\n\t\t <div data-src=\"{$pictures[$index]->hotel_picture_path}\" data-min-width=\"1000\"></div>\r\n\t\t <div data-src=\"{$pictures[$index]->hotel_picture_path}\" data-min-width=\"700\"></div>\r\n\t\t <div data-src=\"{$pictures[$index]->hotel_picture_path}\" data-min-width=\"300\"></div>\r\n\t\t <div data-src=\"{$pictures[$index]->hotel_picture_path}\" data-min-width=\"200\"></div>\r\n\t\t <div data-src=\"{$pictures[$index]->hotel_picture_path}\" data-min-width=\"140\"></div>\r\n\t\t <div data-src=\"{$pictures[$index]->hotel_picture_path}\"></div>\r\n\t\t <noscript>\r\n\t\t <img src=\"{$pictures[$index]->hotel_picture_path}\" alt=\"img01\"/>\r\n\t\t </noscript>\r\n\t\t </div>\r\n\t\t </li>\r\n\t\t\t\t\t\t \t\t\t \t\t \t\t \r\n\t\t \r\n\t\t \r\n\t\t \r\nASDF;\r\n$valor = $div.$replace.$script;\r\n\t\t\t\t\t} \r\n\r\n \t\t\t\t// replace\r\n \t\t\t\t$output\t= str_replace($match,$valor,$output);\r\n \t\t\t\t}\r\n \t\t}\r\n \t}\r\n\t\tif ($input != $output) JResponse::setBody($before . $output);\r\n\t\treturn true;\r\n\t\t}", "public static function displayFooter() {\r\n ?>\r\n <br><br><br>\r\n <div id=\"push\"></div>\r\n </div>\r\n <div id=\"footer\"><br>&copy 2016 Power House. All Rights Reserved.</div>\r\n <script type=\"text/javascript\" src=\"<?= BASE_URL ?>/www/js/ajax_autosuggestion.js\"></script>\r\n </body>\r\n </html>\r\n <?php\r\n }", "function boom_enqueue_scripts() {\n\twp_enqueue_style( 'boom-styles', get_stylesheet_uri(), array(), '1.0' );\n\twp_enqueue_script( 'jquery' );\n\twp_enqueue_script( 'main_js', get_template_directory_uri() . '/js/scripts.pack.js', array(), '1.0', true );\n\n\n\t// LOCALIZE SCRIPT (References for Ajax Functions)\n\tglobal $wp_query, $post;\n\n\t\n\t$query = $wp_query;\n\t$section = getBlogSectionName();\n\tif($section == 'home'){\n\t\t$exlude_post_ids = [];\n\n\t\t// Exclude first 3 featured posts\n\t\t$featured_args = array(\n\t\t 'posts_per_page' => 3,\n\t\t 'meta_key' => 'featuredPost-checkbox',\n\t\t 'meta_value' => 'yes'\n\t\t);\n\t\t$featured_posts = new WP_Query($featured_args);\n\t\twhile($featured_posts->have_posts()):\n\t\t\t$featured_posts->the_post();\n\t\t\tarray_push($exlude_post_ids, get_the_ID());\n\t\tendwhile;\n\t\twp_reset_postdata(); \n\n\t\t// Exclude 3 'Latest' Posts\n\t\t$latest_args = array(\n\t\t 'posts_per_page' => 3,\n\t\t 'post__not_in' => $exlude_post_ids\n\t\t);\n\t\t$latest_posts = new WP_Query($latest_args);\n\t\twhile($latest_posts->have_posts()):\n\t\t\t$latest_posts->the_post();\n\t\t\tarray_push($exlude_post_ids, get_the_ID());\n\t\tendwhile;\n\t\twp_reset_postdata(); \n\n\t\t// Get All posts, except selected posts from above\n\t\t$args = array(\n\t\t 'post__not_in' => $exlude_post_ids\n\t\t);\n\t\t$query = new WP_Query($args);\n\n\n\t} else if($section == 'single'){\n\t\t$args = array(\n\t\t\t'cat'\t\t\t\t=> array(get_the_category($query->post->ID)[0]->term_id),\n\t\t\t'posts_per_page'\t=> 1,\n\t\t\t'post__not_in'\t\t=> array($post->ID)\n\t\t);\n\t\t$query = new WP_Query($args);\n\n\n\t} else if($section == 'category'){\n\t\t$args = array(\n\t\t\t'cat'\t\t\t\t=> array(get_category(get_query_var( 'cat' ))->cat_ID),\n\t\t\t'posts_per_page'\t=> 7,\n\t\t\t'offset'\t\t\t=> 10\n\t\t);\n\t\t$query = new WP_Query($args);\n\t}\n\n\t$reference_object = array(\n\t\t'base'\t\t\t\t=> get_template_directory_uri(),\n\t\t'ajaxurl'\t\t\t=> admin_url( 'admin-ajax.php' ),\n\t\t'query_vars' \t\t=> json_encode( $query->query_vars ),\n\t\t'actual_page'\t\t=> get_query_var('paged') > 1 ? get_query_var('paged') : 1,\n\t\t'total_pages'\t\t=> $query->max_num_pages,\n\t\t'section'\t\t\t=> $section,\n\t\t'isMobile'\t\t\t=> wp_is_mobile() ? 'true' : 'false',\n 'category' => get_category($query->query_vars['cat'])->slug\n\n\t);\n\twp_localize_script('main_js', 'base_reference', $reference_object );\n}", "function ineedmyjava() {\n\tif (!is_admin()) {\n \n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js', false, '1.11.0', true);\n\t\twp_enqueue_script('jquery');\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'custom',\n\t\t\tget_bloginfo('template_directory') . '/js/custom.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('custom');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'isotope',\n\t\t\tget_bloginfo('template_directory') . '/js/isotope.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('isotope');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'images',\n\t\t\tget_bloginfo('template_directory') . '/js/images-loaded.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('images');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'bootstrap',\n\t\t\tget_bloginfo('template_directory') . '/js/bootstrap.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('bootstrap');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'colorbox',\n\t\t\tget_bloginfo('template_directory') . '/js/colorbox.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('colorbox');\n\t\t\n\t\t\n\t\t\n\t}\n}", "function childtheme_override_postfooter() {}", "function neobeat_include_masonry_scripts() {\n\t\twp_enqueue_script( 'isotope' );\n\t\twp_enqueue_script( 'packery' );\n\t}", "function get_all_product_posts($query ) {\n if (is_post_type_archive( 'product') && !is_admin() && $query->is_main_query()) {\n $query->set('posts_per_page' , '16');\n $query->set('orderby', 'title');\n $query->set('order' , 'ASC');\n } //elseif for categories\n}", "public static function alm_enqueue_filters_admin_scripts(){\n\n \twp_enqueue_style( 'alm-filters-admin', ALM_FILTERS_URL. '/dist/css/admin_styles.css', '');\n \twp_enqueue_script( 'alm-filters-admin', ALM_FILTERS_URL. '/dist/js/admin.js', '', ALM_FILTERS_VERSION, true);\n\n \twp_localize_script(\n \t\t'alm-filters-admin', 'alm_filters_localize', array(\n \t\t\t'root' => esc_url_raw( rest_url() ),\n \t\t\t'nonce' => wp_create_nonce( 'wp_rest' ),\n \t\t\t'base_url' => get_admin_url() .'admin.php?page=ajax-load-more-filters',\n \t\t\t'delete_filter' => __('Are you sure you want to delete', 'ajax-load-more-filters'),\n \t\t\t'ordering_parameters' => __('Ordering Parameters', 'ajax-load-more-filters'),\n \t\t\t'date_parameters' => __('Date Parameters', 'ajax-load-more-filters'),\n \t\t\t'category_parameters' => __('Category Parameters', 'ajax-load-more-filters'),\n\t\t\t\t\t'field_type_beta' => __('Beta', 'ajax-load-more-filters'),\n\t\t\t\t\t'field_type_basic' => __('Basic Form Fields', 'ajax-load-more-filters'),\n\t\t\t\t\t'field_type_adv' => __('Advanced Form Fields', 'ajax-load-more-filters'),\n \t\t\t'tag_parameters' => __('Tag Parameters', 'ajax-load-more-filters'),\n \t\t\t'create_filter' => __('Create Filter', 'ajax-load-more-filters'),\n \t\t\t'update_filter' => __('Save Changes', 'ajax-load-more-filters'),\n \t\t\t'saved_filter' => __('Filter Saved', 'ajax-load-more-filters')\n \t\t)\n \t);\n\n \t}", "public function dld_enqueue_scripts($hook)\n {\n if (array_key_exists('page', $_GET) && $_GET['page'] == 'woocommerce-delivery-schedular') {\n wp_enqueue_script('jquery-ui-datepicker');\n wp_enqueue_script('WOO-QB-bootstrap-javascript', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js');\n }\n global $post;\n if ($hook == 'post-new.php' || $hook == 'post.php' || (array_key_exists('page', $_GET) && $_GET['page'] == 'woocommerce-delivery-schedular')) {\n if ($post && 'product' === $post->post_type || (array_key_exists('page', $_GET) && $_GET['page'] == 'woocommerce-delivery-schedular')) {\n wp_enqueue_script($this->plugin_name . '-admin', plugin_dir_url(__FILE__) . '../woocommerce-delivery-schedular/admin/js/delivery-date-admin.js', array('jquery'), $this->version, false);\n wp_enqueue_script($this->plugin_name . '-custom-admin', plugin_dir_url(__FILE__) . '/custom-delivery-date-admin.js', array('jquery'), $this->version, false);\n wp_enqueue_script($this->plugin_name . '-multiDatepicker', plugin_dir_url(__FILE__) . '../woocommerce-delivery-schedular/admin/js/jquery-ui.multidatespicker.js', array('jquery'), $this->version, false);\n\n wp_enqueue_script($this->plugin_name . '-moment', plugin_dir_url(__FILE__) . '../woocommerce-delivery-schedular/admin/js/moment.min.js', array('jquery'), $this->version, false);\n wp_enqueue_script($this->plugin_name . '-daterangepicker', plugin_dir_url(__FILE__) . '../woocommerce-delivery-schedular/admin/js/daterangepicker.min.js', array('jquery'), $this->version, false);\n }\n }\n }", "function Helsingborg_scripts() {\n wp_deregister_script( 'jquery' );\n\n // register scripts\n wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr/modernizr.min.js', array(), '1.0.0', false );\n wp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery/dist/jquery.min.js', array(), '1.0.0', false );\n wp_enqueue_script( 'jquery-ui', get_template_directory_uri() . '/js/jquery/dist/jquery-ui.min.js', array(), '1.0.0', false );\n\n /**\n * EVENT LIST PAGE\n **/\n if ( is_page_template( 'templates/event-list-page.php' )) {\n // Register scripts\n wp_enqueue_script( 'zurb5-multiselect', get_template_directory_uri() . '/js/foundation-multiselect/zmultiselect/zurb5-multiselect.js', array(), '1.0.0', false );\n wp_enqueue_script( 'jquery-datetimepicker', get_template_directory_uri() . '/js/jquery.datetimepicker.js', array(), '1.0.0', false );\n wp_enqueue_script( 'knockout', get_template_directory_uri() . '/js/knockout/dist/knockout.js', array(), '3.2.0', false );\n wp_enqueue_script( 'event-list-model', get_template_directory_uri() . '/js/helsingborg/event_list_model.js', array(), '1.0.0', false );\n\n // Register styles\n wp_enqueue_style( 'zurb5-multiselect', get_template_directory_uri() . '/css/multiple-select.css', array(), '1.0.0', 'all' );\n wp_enqueue_style( 'jquery-datetimepicker', get_template_directory_uri() . '/js/jquery.datetimepicker.css', array(), '1.0.0', 'all' );\n \n }\n\n wp_enqueue_script( 'foundation', get_template_directory_uri() . '/js/app.js', array('jquery'), '1.0.0', true );\n wp_enqueue_script( 'tablesorter', get_template_directory_uri() . '/js/plugins/jquery.tablesorter.min.js', array(), '1.0.0', true );\n\n // TODO: Remove! This should be merged into app.js\n wp_enqueue_script( 'dev', get_template_directory_uri() . '/js/dev/hbg.dev.js', array(), '1.0.0', true );\n\t\t\n\t\n // Readspeaker should be added last\n wp_enqueue_script( 'readspeaker', 'http://f1.eu.readspeaker.com/script/5507/ReadSpeaker.js?pids=embhl', array(), '1.0.0', false);\n \n // Enqueue vergic.js previously in footer.php\n\twp_enqueue_script( 'script-vergic', get_template_directory_uri() . '/js/helsingborg/vergic.js', array(), '1.0.0', true );\n // Enqueue styles previously in header.php\n wp_enqueue_style( 'style-normalize', get_template_directory_uri() . '/css/normalize.css' );\n wp_enqueue_style( 'style-app', get_template_directory_uri() . '/css/app.css' ); \n \n }", "function shutdown() {\n // Safety for themes not using wp_footer\n SLPlus_Actions::ManageTheScripts();\n\t\t}", "public static function _wp_footer()\n\t{\n\t\tforeach (static::$footer_scripts as $params) {\n\t\t\tif (!isset($params['url'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (isset($params['localize']) && isset($params['localize']['name']) && isset($params['localize']['data'])) {\n\t\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\tvar <?php $params['localize']['name'] ?> = <?php echo json_encode($params['localize']['data']); ?>;\n\t\t\t\t</script>\n\t\t\t\t<?php\n\t\t\t}\n\n\t\t\tif (isset($params['version']) && $params['version']) {\n\t\t\t\t$join_char = (stripos($params['url'], '?') !== false) ? '&' : '?';\n\t\t\t\t$params['url'] .= $join_char.'ver='.$params['version'];\n\t\t\t}\n\n\t\t\t$attrs_str = 'type=\"text/javascript\" src=\"'.$params['url'].'\"';\n\n\t\t\tif (isset($params['async']) && $params['async']) {\n\t\t\t\t$attrs_str .= ' async';\n\t\t\t}\n\n\t\t\tif (isset($params['defer']) && $params['defer']) {\n\t\t\t\t$attrs_str .= ' defer';\n\t\t\t}\n\n\t\t\techo \"<script {$attrs_str}></script>\\n\";\n\t\t}\n\t}", "function add_admin_scripts() {\n\t\tglobal $post;\n\t\t$post_type = $post->post_type;\n\t\tif ( 'product' == $post_type ) {\n\t\t\twp_enqueue_script(\n 'heweb17-admin',\n plugins_url( '/js/heweb17-admin.js', __FILE__ ),\n array( 'jquery' ) );\n\t\t}\n\t}", "function add_ordin_widget_scripts() {\n if( ! apply_filters( 'add_ordin_widget_scripts', true, $this->id_base ) )\n return;\n ?>\n <script>\n jQuery(document).ready(function( $ ) {\n\n });\n </script>\n <?php\n }", "public function registerActions() {\n $this->addAction('wp_footer', array('Chayka\\\\LinkedIn\\\\HtmlHelper', 'renderJsInit'));\n \t/* chayka: registerActions */\n }" ]
[ "0.7241142", "0.6526731", "0.6444402", "0.6413683", "0.6400463", "0.63700396", "0.6369376", "0.6338886", "0.630546", "0.6296617", "0.6249045", "0.6207119", "0.61928964", "0.61739033", "0.61543816", "0.61080056", "0.6093143", "0.6033762", "0.6032027", "0.6030236", "0.60086805", "0.6001226", "0.59697604", "0.59487045", "0.594843", "0.5941049", "0.5938484", "0.59146017", "0.5896967", "0.5896967", "0.5896967", "0.5896967", "0.5896967", "0.5890156", "0.5876459", "0.5831385", "0.5811524", "0.5810624", "0.57903826", "0.57903826", "0.5789098", "0.5785293", "0.5777126", "0.5773174", "0.5757678", "0.57439184", "0.5743063", "0.5738771", "0.5737273", "0.5734238", "0.5729473", "0.57263756", "0.5720172", "0.5715475", "0.57134646", "0.57082045", "0.5687526", "0.5685971", "0.5680793", "0.5680456", "0.5672112", "0.56681", "0.56662184", "0.5665719", "0.5656073", "0.56534725", "0.56457865", "0.5635625", "0.5633864", "0.56325173", "0.563149", "0.56310403", "0.56287545", "0.5628627", "0.5628423", "0.56232315", "0.56176054", "0.56105", "0.5595017", "0.55882615", "0.5556301", "0.5544112", "0.55396146", "0.55195075", "0.5511016", "0.55038005", "0.549943", "0.54945177", "0.5492116", "0.5490358", "0.5489363", "0.5485369", "0.5483127", "0.5474342", "0.5471772", "0.54681563", "0.5464937", "0.546027", "0.54596937", "0.5450936" ]
0.71792096
1
get image categoryselector form element
получить элемент формы выбора категории изображения
function abl_droploader_get_image_cat_select() { $image_categories = getTree('root', 'image'); //$image_categories_select = str_ireplace("\n", '', tag('<label for="image-category">' . gTxt('image_category') . '</label>' . br . // treeSelectInput('category', $image_categories, '', 'image-category'), 'div', ' id="abl-droploader-image-cat-sel" class="category"')); //$alt_caption = tag('<label for="alt-text">'.gTxt('alt_text').'</label>'.br. // fInput('text', 'alt', '', 'edit', '', '', 50, '', 'alt-text'), 'div', ' class="alt text"'). // tag('<label for="caption">'.gTxt('caption').'</label>'.br. // '<textarea id="caption" name="caption"></textarea>' // , 'div', ' class="caption description text"'); $image_categories_select = str_ireplace("\n", '', tag(tag('<label for="image-category">'.gTxt('image_category').'</label>'.br. treeSelectInput('category', $image_categories, '', 'image-category'), 'div', ' class="category"'), 'div', ' id="abl-droploader-image-cat-sel"')); return $image_categories_select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOptionCategoryImage()\n {\n return $this->optionCategoryImage;\n }", "function add_category_image ( $taxonomy ) { ?>\n <div class=\"form-field term-group\">\n <label for=\"category-image-id\"><?php _e('Image', 'hero-theme'); ?></label>\n <input type=\"hidden\" id=\"category-image-id\" name=\"category-image-id\" class=\"custom_media_url\" value=\"\">\n <div id=\"category-image-wrapper\"></div>\n <p>\n <input type=\"button\" class=\"button button-secondary ct_tax_media_button\" id=\"ct_tax_media_button\" name=\"ct_tax_media_button\" value=\"<?php _e( 'Add Image', 'hero-theme' ); ?>\" />\n <input type=\"button\" class=\"button button-secondary ct_tax_media_remove\" id=\"ct_tax_media_remove\" name=\"ct_tax_media_remove\" value=\"<?php _e( 'Remove Image', 'hero-theme' ); ?>\" />\n </p>\n </div>\n <?php\n }", "public function get_image_select_form() {\n\t\t$options = get_option('netx_options');\n\t\t$wrapper = new netxRestWrapper();\n\t\t$netx = $wrapper->getNetx();\n\n\t\t$supportedFileTypes = array(\n\t\t\t//images\n\t\t\t\"jpg\",\n\t\t\t\"jpeg\",\n\t\t\t\"png\",\n\t\t\t\"gif\",\n\t\t\t\"ico\",\n\t\t\t//documents\n\t\t\t\"pdf\",\n\t\t\t\"doc\",\n\t\t\t\"ppt\",\n\t\t\t\"odt\",\n\t\t\t\"xls\",\n\t\t\t\"psd\",\n\t\t\t//audio\n\t\t\t\"mp3\",\n\t\t\t\"m4a\",\n\t\t\t\"ogg\",\n\t\t\t\"wav\",\n\t\t\t//video\n\t\t\t\"mp4\",\n\t\t\t\"mov\",\n\t\t\t\"wmv\",\n\t\t\t\"avi\",\n\t\t\t\"mpg\",\n\t\t\t\"ogv\",\n\t\t\t\"3gp\",\n\t\t\t\"3g2\"\n\t\t);\n\n\t\t$pagingSize = intval($options['netx_paging_size']);\n\t\tif($pagingSize == 0) {\n\t\t\t$pagingSize = 200;\n\t\t}\n\n\t\t//get current category id\n\t\t$currentCatId = (trim($_POST['catId']) != '') ? $_POST['catId'] : $options['netx_base_category_id'];\n\n\t\t//get assets in current category\n\t\t$catAssets = $netx->getAssetsByCategoryID($currentCatId);\n\t\t$catAssetsNum = 0;\n\t\tforeach($catAssets as $key=>$asset){\n\t\t\t$catAssetsNum++;\n\t\t}\n\n\t\t$postID = intval($_REQUEST['post_id']);\n//\t$proxyURL = dirname(__FILE__) . '/proxy.php'\n\t\t?>\n\t\t<script type=\"text/javascript\">post_id = <?php echo $postID ?>;</script>\n\t\t<?php\n\t\t$paged = isset($_GET['paged']) ? $_GET['paged'] : 1;\n\t\t$catAssetsPages = ceil($catAssetsNum/$pagingSize);\n\t\t$catAssetsPage = $netx->getAssetsByCategoryID($currentCatId,$paged);\n\t\tif($catAssetsPages > 1){\n\n\t\t\techo '<div class=\"tablenav\"><div class=\"tablenav-pages\">';\n\t\t\tif($paged != 1){\n\t\t\t\techo '<a class=\"next page-numbers\" data-post-id=\"'.$postID.'\" data-page-num=\"'.($paged-1).'\">&laquo;</a>';\n\t\t\t}\n\t\t\tfor($i=($catAssetsPages <= 5) ? 1 : $paged;$i<=$paged+4;$i++){\n\t\t\t\tif($paged == $i){\n\t\t\t\t\techo '<span class=\"page-numbers current\">'.$i.'</span>';\n\t\t\t\t} else {\n\t\t\t\t\techo '<a class=\"page-numbers\" data-post-id=\"'.$postID.'\" data-page-num=\"'.$i.'\">'.$i.'</a>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($paged != $catAssetsPages){\n\t\t\t\techo '<a class=\"next page-numbers\" data-post-id=\"'.$postID.'\" data-page-num=\"'.($paged+1).'\">&raquo;</a>';\n\t\t\t}\n\t\t\techo '</div></div>';\n\t\t}\n\n\t\t$catAssetsPageFiltered = array();\n\n\t\tif(count($catAssetsPage) > 0) {\n\t\t\tforeach($catAssetsPage as $key=>$asset){\n\t\t\t\t$assetID = $asset->getAssetID();\n\t\t\t\t$ast = $netx->getAsset($assetID);\n\n\t\t\t\t$fileIsSupported = false;\n\t\t\t\tforeach($supportedFileTypes as $supportedFileType) {\n\t\t\t\t\t$filename = $ast->getFile();\n\n\t\t\t\t\t$substrlength = strlen('.' . $supportedFileType);\n\t\t\t\t\tif(substr($filename, - $substrlength) === ('.' . $supportedFileType)) {\n\t\t\t\t\t\t$fileIsSupported = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif($fileIsSupported) {\n\t\t\t\t\t$catAssetsPageFiltered[$key] = $asset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(count($catAssetsPageFiltered) > 0) {\n\t\t\tforeach($catAssetsPageFiltered as $key=>$asset){\n\t\t\t\t$assetID = $asset->getAssetID();\n\t\t\t\t$ast = $netx->getAsset($assetID);\n\t\t\t\t?>\n\t\t\t\t<div id=\"media-item-<?php echo $assetID; ?>\" class=\"media-item\">\n\t\t\t\t\t<img class=\"pinkynail toggle\" style=\"margin-top: 3px; display: block;\" alt=\"<?php echo $asset->getLabel1(); ?>\" src=\"<?php echo $wrapper->netxThumbUrl($assetID) ?>\" />\n\t\t\t\t\t<a class=\"toggle describe-toggle-on\" style=\"display: block;\">Show</a>\n\t\t\t\t\t<a class=\"toggle describe-toggle-off\" style=\"display: none;\">Hide</a>\n\t\t\t\t\t<div class=\"filename toggle\"><span class=\"title\"><?php echo $asset->getLabel1(); ?></span></div>\n\t\t\t\t\t<table class=\"slidetoggle describe\" style=\"display:none;\">\n\n\t\t\t\t\t\t<thead id=\"media-head-<?php echo $assetID; ?>\" class=\"media-item-info\">\n\t\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t\t<td id=\"thumbnail-head-<?php echo $assetID; ?>\" class=\"\">\n\t\t\t\t\t\t\t\t<p><a target=\"_blank\" href=\"<?php echo $wrapper->netxPreviewUrl($assetID); ?>\"><img style=\"margin-top: 3px\" alt=\"\" src=\"<?php echo $wrapper->netxThumbUrl($assetID); ?>\" class=\"thumbnail\"></a></p>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<p><strong>File name:</strong> <?php echo $asset->getLabel2(); ?></p>\n\t\t\t\t\t\t\t\t<p><strong>File type:</strong> <?php echo $asset->getLabel3(); ?></p>\n\t\t\t\t\t\t\t\t<p><strong>File size:</strong> <?php echo $asset->getLabel4(); ?></p>\n\t\t\t\t\t\t\t\t<p><strong>Upload date:</strong> <?php echo $asset->getLabel5(); ?></p>\n\t\t\t\t\t\t\t</td></tr>\n\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr class=\"image-size\">\n\t\t\t\t\t\t\t<th valign=\"top\" class=\"label\" scope=\"row\"><label for=\"asset[<?php echo $assetID; ?>][image-size]\"><span class=\"alignleft\">Size</span><br class=\"clear\"></label></th>\n\t\t\t\t\t\t\t<td class=\"field\">\n\t\t\t\t\t\t\t\t<div class=\"image-size-item\"><input type=\"radio\" value=\"thumbnail\" id=\"image-size-thumbnail-<?php echo $assetID; ?>\" name=\"asset[<?php echo $assetID; ?>][image-size]\"><label for=\"image-size-thumbnail-<?php echo $assetID; ?>\">Thumbnail</label> <label class=\"help\" for=\"image-size-thumbnail-<?php echo $assetID; ?>\">(150&nbsp;x&nbsp;150)</label></div>\n\t\t\t\t\t\t\t\t<div class=\"image-size-item\"><input type=\"radio\" value=\"medium\" id=\"image-size-preview-<?php echo $assetID; ?>\" name=\"asset[<?php echo $assetID; ?>][image-size]\"><label for=\"image-size-preview-<?php echo $assetID; ?>\">Preview</label> <label class=\"help\" for=\"image-size-full-<?php echo $assetID; ?>\">(<?php echo $ast->getPreviewfilewidth(); ?>&nbsp;x&nbsp;<?php echo $ast->getPreviewfileheight(); ?>)</label></div>\n\t\t\t\t\t\t\t\t<div class=\"image-size-item\"><input type=\"radio\" checked=\"checked\" value=\"full\" id=\"image-size-full-<?php echo $assetID; ?>\" name=\"asset[<?php echo $assetID; ?>][image-size]\"><label for=\"image-size-full-<?php echo $assetID; ?>\">Full Size</label> <label class=\"help\" for=\"image-size-full-<?php echo $assetID; ?>\">(<?php echo $ast->getFilewidth(); ?>&nbsp;x&nbsp;<?php echo $ast->getFileheight(); ?>)</label></div>\n\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tif(!empty($ast->getViewNames())){\n\t\t\t\t\t\t\t\t\tforeach($ast->getViewNames() as $viewName) {\n\t\t\t\t\t\t\t\t\t\tif($viewName === 'previewXMP') {\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<div class=\"image-size-item\"><input type=\"radio\" checked=\"checked\" value=\"<?php echo $viewName ?>\" id=\"image-size-full-<?php echo $assetID; ?>\" name=\"asset[<?php echo $assetID; ?>][image-size]\"><label for=\"image-size-full-<?php echo $assetID; ?>\">View: </label> <label class=\"help\" for=\"image-size-full-<?php echo $assetID; ?>\"><?php echo $viewName ?></label></div>\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t<?php if(isset($options[\"netx_access_token\"]) && !empty(trim($options[\"netx_access_token\"]))): ?>\n\t\t\t\t\t\t\t<tr class=\"enable-download\">\n\t\t\t\t\t\t\t\t<th valign=\"top\" class=\"label\" scope=\"row\"><label for=\"asset[<?php echo $assetID; ?>][enable-download]\"><span class=\"alignleft\">Enable Download</span><br class=\"clear\"></label></th>\n\t\t\t\t\t\t\t\t<td class=\"field\">\n\t\t\t\t\t\t\t\t\t<div class=\"image-size-item\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" value=\"enable-download\" id=\"asset[<?php echo $assetID; ?>][enable-download]\" name=\"asset[<?php echo $assetID; ?>][enable-download]\">\n\t\t\t\t\t\t\t\t\t\t<label for=\"asset[<?php echo $assetID; ?>][enable-download]\">Save as download link</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t<tr class=\"submit\">\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td class=\"savesend\">\n\t\t\t\t\t\t\t\t<input type=\"button\" data-asset-id=\"<?php echo($assetID); ?>\" value=\"Insert into Post\" class=\"button netx-submit-button netx-add-item-submit\" id=\"\" name=\"send[<?php echo $assetID; ?>]\">\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}else{\n\t\t\t?>\n\t\t\t<p class=\"netx-no-files-found-label\">No Files Found</p>\n\t\t\t<?php\n\t\t}\n\n\t\twp_die();\n\t}", "public function getCategoryFormElements($category) {\n //TYPE\n //DEFAULT ELEMENTS\n //Category ELEMENTS\n \n }", "function extra_category_fields( $tag ) { //check for existing featured ID\n $t_id = $tag->term_id;\n $cat_meta = get_option( \"category_$t_id\");\n\t?>\n\t<tr class=\"form-field\">\n\t\t<th scope=\"row\" valign=\"top\"><label for=\"cat_Image_url\"><?php _e('Category Url'); ?></label></th>\n\t\t<td><input type=\"text\" name=\"Cat_meta[cat_url]\" id=\"Cat_meta[img]\" size=\"3\" style=\"width:60%;\" value=\"<?php echo $cat_meta['cat_url'] ? $cat_meta['cat_url'] : ''; ?>\"><br />\n\t <span class=\"description\"><?php _e('Url for category'); ?></span>\n\t\t</td>\n\t</tr>\n\t<?php\n}", "function updated_category_image ( $term_id, $tt_id ) {\n if( isset( $_POST['category-image-id'] ) && '' !== $_POST['category-image-id'] ){\n $image = $_POST['category-image-id'];\n update_term_meta ( $term_id, 'category-image-id', $image );\n } else {\n update_term_meta ( $term_id, 'category-image-id', '' );\n }\n }", "function category_add_thumbnail_field( $category ) {\n\t\tglobal $wp_taxonomies;\n\t\t?>\n\n\t\t<div class=\"form-field hide-if-no-js\">\n\t\t\t<p style=\"color:#222;font-style:normal;\"><?php _e( 'Featured Image' ); ?></p>\n\t\t\t<div id=\"image-container\">\n\t\t\t\t\n\t\t\t\t<div id=\"selected-image\"></div>\n\t\t\t\t\n\t\t\t\t<a id=\"set-category-thumbnail\" title=\"<?php _e( 'Set featured image' ); ?>\" data-uploader-title=\"<?php _e( 'Choose a thumbnail for this category', 'category-thumbnail' ); ?>\" data-uploader-button-text=\"<?php _e( 'Set Category Thumbnail', 'category-thumbnail' ); ?>\" href=\"#\" class=\"button thickbox\">\n\t\t\t\t\t<?php _e( 'Set featured image' ); ?>\n\t\t\t\t</a>\n\t\t\t\t\n\t\t\t\t<a id=\"remove-category-thumbnail\" title=\"<?php _e( 'Set featured image' ); ?>\" href=\"#\" style=\"display:none;\">\n\t\t\t\t\t<?php _e( 'Remove featured image' ); ?>\n\t\t\t\t</a>\n\t\t\t\t\n\t\t\t</div>\n\t\t\t<input name=\"image\" id=\"image-id\" type=\"hidden\" value=\"\" />\n\t\t\t<p>\n\t\t\t\t<?php printf( __( 'The thumbnail to this %s', 'category-thumbnail' ), $wp_taxonomies[ $category ]->labels->singular_name ); ?>\n\t\t\t</p>\n\t\t</div>\n\t\t\n\t\t<?php\n\t\t\n\t}", "function classiera_my_category_fields($tag) {\r\n $tag_extra_fields = get_option(MY_CATEGORY_FIELDS);\r\n\t$category_icon_code = isset( $tag_extra_fields[$tag->term_id]['category_icon_code'] ) ? esc_attr( $tag_extra_fields[$tag->term_id]['category_icon_code'] ) : '';\r\n\t$category_image = isset( $tag_extra_fields[$tag->term_id]['category_image'] ) ? esc_attr( $tag_extra_fields[$tag->term_id]['category_image'] ) : '';\r\n $category_icon_color = isset( $tag_extra_fields[$tag->term_id]['category_icon_color'] ) ? esc_attr( $tag_extra_fields[$tag->term_id]['category_icon_color'] ) : '';\r\n $your_image_url = isset( $tag_extra_fields[$tag->term_id]['your_image_url'] ) ? esc_attr( $tag_extra_fields[$tag->term_id]['your_image_url'] ) : '';\r\n ?>\r\n\r\n<div class=\"form-field\">\t\r\n<table class=\"form-table\">\r\n <tr class=\"form-field\">\r\n \t<th scope=\"row\" valign=\"top\"><label for=\"category-page-slider\"><?php esc_html_e( 'Icon Code', 'classiera' ); ?></label></th>\r\n \t<td>\r\n\r\n\t\t\t\t<input id=\"category_icon_code\" type=\"text\" size=\"36\" name=\"category_icon_code\" value=\"<?php $category_icon = stripslashes($category_icon_code); echo esc_attr($category_icon); ?>\" />\r\n <p class=\"description\"><?php esc_html_e( 'AwesomeFont code', 'classiera' ); ?>: <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">fontawesome.io/icons</a> Ex: fa fa-desktop</p>\r\n\r\n\t\t\t</td>\r\n </tr>\r\n\t\t<tr class=\"form-field\">\r\n <th scope=\"row\" valign=\"top\"><label for=\"category-page-slider\"><?php esc_html_e( 'Category Image', 'classiera' ); ?>&nbsp;Size:370x200px:</label></th>\r\n <td>\r\n <?php \r\n\r\n if(!empty($category_image)) {\r\n\r\n echo '<div style=\"width: 100%; float: left;\"><img id=\"category_image_img\" src=\"'. $category_image .'\" style=\"float: left; margin-bottom: 20px;\" /> </div>';\r\n echo '<input id=\"category_image\" type=\"text\" size=\"36\" name=\"category_image\" style=\"max-width: 200px; float: left; margin-top: 10px; display: none;\" value=\"'.$category_image.'\" />';\r\n echo '<input id=\"category_image_button_remove\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px;\" value=\"Remove\" /> </br>';\r\n echo '<input id=\"category_image_button\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px; display: none;\" value=\"Upload Image\" /> </br>'; \r\n\r\n } else {\r\n\r\n echo '<div style=\"width: 100%; float: left;\"><img id=\"category_image_img\" src=\"'. $category_image .'\" style=\"float: left; margin-bottom: 20px;\" /> </div>';\r\n echo '<input id=\"category_image\" type=\"text\" size=\"36\" name=\"category_image\" style=\"max-width: 200px; float: left; margin-top: 10px; display: none;\" value=\"'.$category_image.'\" />';\r\n echo '<input id=\"category_image_button_remove\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px; display: none;\" value=\"Remove\" /> </br>';\r\n echo '<input id=\"category_image_button\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px;\" value=\"Upload Image\" /> </br>';\r\n\r\n }\r\n\r\n ?>\r\n </td>\r\n\t\t\t\r\n <script>\r\n var image_custom_uploader;\r\n jQuery('#category_image_button').click(function(e) {\r\n e.preventDefault();\r\n\r\n //If the uploader object has already been created, reopen the dialog\r\n if (image_custom_uploader) {\r\n image_custom_uploader.open();\r\n return;\r\n }\r\n\r\n //Extend the wp.media object\r\n image_custom_uploader = wp.media.frames.file_frame = wp.media({\r\n title: 'Choose Image',\r\n button: {\r\n text: 'Choose Image'\r\n },\r\n multiple: false\r\n });\r\n\r\n //When a file is selected, grab the URL and set it as the text field's value\r\n image_custom_uploader.on('select', function() {\r\n attachment = image_custom_uploader.state().get('selection').first().toJSON();\r\n var url = '';\r\n url = attachment['url'];\r\n jQuery('#category_image').val(url);\r\n jQuery( \"img#category_image_img\" ).attr({\r\n src: url\r\n });\r\n jQuery(\"#category_image_button\").css(\"display\", \"none\");\r\n jQuery(\"#category_image_button_remove\").css(\"display\", \"block\");\r\n });\r\n\r\n //Open the uploader dialog\r\n image_custom_uploader.open();\r\n });\r\n\r\n jQuery('#category_image_button_remove').click(function(e) {\r\n jQuery('#category_image').val('');\r\n jQuery( \"img#category_image_img\" ).attr({\r\n src: ''\r\n });\r\n jQuery(\"#category_image_button\").css(\"display\", \"block\");\r\n jQuery(\"#category_image_button_remove\").css(\"display\", \"none\");\r\n });\r\n </script>\r\n </tr>\r\n <tr class=\"form-field\">\r\n <th scope=\"row\" valign=\"top\"><label for=\"category-page-slider\"><?php esc_html_e( 'Icon Background Color', 'classiera' ); ?></label></th>\r\n <td>\r\n\r\n <link rel=\"stylesheet\" media=\"screen\" type=\"text/css\" href=\"<?php echo get_template_directory_uri() ?>/inc/color-picker/css/colorpicker.css\" />\r\n <script type=\"text/javascript\" src=\"<?php echo get_template_directory_uri() ?>/inc/color-picker/js/colorpicker.js\"></script>\r\n <script type=\"text/javascript\">\r\n jQuery.noConflict();\r\n jQuery(document).ready(function(){\r\n jQuery('#colorpickerHolder').ColorPicker({color: '<?php echo $category_icon_color; ?>', flat: true, onChange: function (hsb, hex, rgb) { jQuery('#category_icon_color').val('#' + hex); }});\r\n });\r\n </script>\r\n\r\n <p id=\"colorpickerHolder\"></p>\r\n\r\n <input id=\"category_icon_color\" type=\"text\" size=\"36\" name=\"category_icon_color\" value=\"<?php echo $category_icon_color; ?>\" style=\"margin-top: 20px; max-width: 90px; visibility: hidden;\" />\r\n\r\n </td>\r\n </tr>\r\n <tr class=\"form-field\">\r\n <th scope=\"row\" valign=\"top\"><label for=\"category-page-slider\"><?php esc_html_e( 'Map Pin', 'classiera' ); ?>&nbsp;Size:70x70px:</label></th>\r\n <td>\r\n <?php \r\n\r\n if(!empty($your_image_url)) {\r\n\r\n echo '<div style=\"width: 100%; float: left;\"><img id=\"your_image_url_img\" src=\"'. $your_image_url .'\" style=\"float: left; margin-bottom: 20px;\" /> </div>';\r\n echo '<input id=\"your_image_url\" type=\"text\" size=\"36\" name=\"your_image_url\" style=\"max-width: 200px; float: left; margin-top: 10px; display: none;\" value=\"'.$your_image_url.'\" />';\r\n echo '<input id=\"your_image_url_button_remove\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px;\" value=\"Remove\" /> </br>';\r\n echo '<input id=\"your_image_url_button\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px; display: none;\" value=\"Upload Image\" /> </br>'; \r\n\r\n } else {\r\n\r\n echo '<div style=\"width: 100%; float: left;\"><img id=\"your_image_url_img\" src=\"'. $your_image_url .'\" style=\"float: left; margin-bottom: 20px;\" /> </div>';\r\n echo '<input id=\"your_image_url\" type=\"text\" size=\"36\" name=\"your_image_url\" style=\"max-width: 200px; float: left; margin-top: 10px; display: none;\" value=\"'.$your_image_url.'\" />';\r\n echo '<input id=\"your_image_url_button_remove\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px; display: none;\" value=\"Remove\" /> </br>';\r\n echo '<input id=\"your_image_url_button\" class=\"button\" type=\"button\" style=\"max-width: 140px; float: left; margin-top: 10px;\" value=\"Upload Image\" /> </br>';\r\n\r\n }\r\n\r\n ?>\r\n </td>\r\n\r\n <script>\r\n var image_custom_uploader2;\r\n jQuery('#your_image_url_button').click(function(e) {\r\n e.preventDefault();\r\n\r\n //If the uploader object has already been created, reopen the dialog\r\n if (image_custom_uploader2) {\r\n image_custom_uploader2.open();\r\n return;\r\n }\r\n\r\n //Extend the wp.media object\r\n image_custom_uploader2 = wp.media.frames.file_frame = wp.media({\r\n title: 'Choose Image',\r\n button: {\r\n text: 'Choose Image'\r\n },\r\n multiple: false\r\n });\r\n\r\n //When a file is selected, grab the URL and set it as the text field's value\r\n image_custom_uploader2.on('select', function() {\r\n attachment = image_custom_uploader2.state().get('selection').first().toJSON();\r\n var url = '';\r\n url = attachment['url'];\r\n jQuery('#your_image_url').val(url);\r\n jQuery( \"img#your_image_url_img\" ).attr({\r\n src: url\r\n });\r\n jQuery(\"#your_image_url_button\").css(\"display\", \"none\");\r\n jQuery(\"#your_image_url_button_remove\").css(\"display\", \"block\");\r\n });\r\n\r\n //Open the uploader dialog\r\n image_custom_uploader2.open();\r\n });\r\n\r\n jQuery('#your_image_url_button_remove').click(function(e) {\r\n jQuery('#your_image_url').val('');\r\n jQuery( \"img#your_image_url_img\" ).attr({\r\n src: ''\r\n });\r\n jQuery(\"#your_image_url_button\").css(\"display\", \"block\");\r\n jQuery(\"#your_image_url_button_remove\").css(\"display\", \"none\");\r\n });\r\n </script>\r\n </tr>\r\n</table>\r\n</div>\r\n\r\n <?php\r\n}", "public function get_selector()\n {\n }", "function update_category_image ( $term, $taxonomy ) { ?>\n <tr class=\"form-field term-group-wrap\">\n <th scope=\"row\">\n <label for=\"category-image-id\"><?php _e( 'Image', 'hero-theme' ); ?></label>\n </th>\n <td>\n <?php $image_id = get_term_meta ( $term -> term_id, 'category-image-id', true ); ?>\n <input type=\"hidden\" id=\"category-image-id\" name=\"category-image-id\" value=\"<?php echo $image_id; ?>\">\n <div id=\"category-image-wrapper\">\n <?php if ( $image_id ) { ?>\n <?php echo wp_get_attachment_image ( $image_id, 'thumbnail' ); ?>\n <?php } ?>\n </div>\n <p>\n <input type=\"button\" class=\"button button-secondary ct_tax_media_button\" id=\"ct_tax_media_button\" name=\"ct_tax_media_button\" value=\"<?php _e( 'Add Image', 'hero-theme' ); ?>\" />\n <input type=\"button\" class=\"button button-secondary ct_tax_media_remove\" id=\"ct_tax_media_remove\" name=\"ct_tax_media_remove\" value=\"<?php _e( 'Remove Image', 'hero-theme' ); ?>\" />\n </p>\n </td>\n </tr>\n <?php\n }", "function &GetSelector()\r\n\t{\r\n\t\treturn $this->FindControl(\"selectorGroup\");\r\n\t}", "public function getCategoryImage($categoryId)\n {\n //$AccentOpaque = array(\"15\",\"50\",\"51\",\"52\",\"57\");\n //$Williamsburg = array(\"26\",\"86\",\"87\",\"88\",\"93\"); \n //$Carolina = array(\"23\",\"59\",\"66\",\"274\"); \n //$Springhill = array(\"25\",\"77\",\"78\",\"79\",\"84\");\n\t $AccentOpaque = array(\"57\");\n\t\t$Hammermill = array(\"246\");\n\t\t$Williamsburg = array(\"93\"); \n\t\t$Carolina = array(\"66\"); \n\t\t$Springhill = array(\"84\");\n\t\t//$PPAllBrands = array(\"209\");\n\t\t$Envelope = array(\"131\");\n\t\t$Forms = array(\"262\", \"263\", \"264\", \"265\", \"266\", \"267\", \"269\", \"270\", \"271\");\n\t\t$Bristols = array(\"233\", \"234\", \"235\", \"236\", \"237\", \"238\", \"239\", \"240\", \"241\");\n\t\t$Specialty = array(\"152\");\n\t\t$HotCupsLids = array(\"182\", \"178\", \"179\", \"183\", \"181\", \"220\", \"228\", \"229\", \"230\");\n\t\t$ColdCupsLids = array(\"158\", \"154\", \"275\", \"276\", \"277\");\n\t\t$FoodPackaging = array(\"213\", \"172\", \"212\", \"221\", \"222\", \"223\", \"214\", \"278\");\n \n //For category logo\n if(in_array($categoryId, $AccentOpaque)){\n //$catImgLogo = \"logo-accentopaque.jpg\";\n $catImgLogo = \"Accent Opaque\";\n }\n\t\t else if(in_array($categoryId, $Hammermill)){\n $catImgLogo = \"Hammermill\";\n }\n else if(in_array($categoryId, $Williamsburg)){\n $catImgLogo = \"Williamsburg\";\n }\n else if(in_array($categoryId, $Carolina)){\n $catImgLogo = \"Carolina\";\n }\n else if(in_array($categoryId, $Springhill)){\n $catImgLogo = \"Springhill\";\n }\n\t\t else if(in_array($categoryId, $Envelope)){\n $catImgLogo = \"Envelope\";\n }\n\t\t else if(in_array($categoryId, $Forms)){\n $catImgLogo = \"Forms\";\n }\n\t\t else if(in_array($categoryId, $Bristols)){\n $catImgLogo = \"Bristols\";\n }\n\t\t else if(in_array($categoryId, $Specialty)){\n $catImgLogo = \"Specialty\";\n }\n\t\t else if(in_array($categoryId, $HotCupsLids)){\n $catImgLogo = \"Hot Cups and Lids\";\n }\n\t\t else if(in_array($categoryId, $ColdCupsLids)){\n $catImgLogo = \"Cold Cups and Lids\";\n }\n\t\t else if(in_array($categoryId, $FoodPackaging)){\n $catImgLogo = \"Food Packaging\";\n }\n return $catImgLogo;\n }", "function category_edit_thumbnail_field( $tag, $taxonomy ) {\n\t\tglobal $wp_taxonomies;\n\t\t\n\t\t$image = get_option( 'category_thumbnail_image' );\n\t\t\n\t\tif ( is_array( $image ) && array_key_exists( $tag->term_id, $image ) ) {\n\t\t\t$image = $image[ $tag->term_id ];\n\t\t\t$attach = wp_get_attachment_image_src( (int) $image );\n\t\t\n\t\t} else {\n\t\t\t$image = false;\n\t\t\t\n\t\t}\n\t?>\n\t<tr class=\"form-field hide-if-no-js\">\n\t\t<th scope=\"row\" valign=\"top\">\n\t\t\t<p style=\"color:#222;font-size:13px;\"><?php _e( 'Featured Image' ); ?></p>\n\t\t</th>\n\t\t<td>\n\t\t\t<div id=\"image-container\">\n\t\t\t\t\t\t\t\t\n\t\t\t\t<?php if ( $image ) : ?>\n\t\t\t\t\t\n\t\t\t\t<div id=\"selected-image\">\n\t\t\t\t\t<img src=\"<?php echo esc_url( $attach[0] ); ?>\" />\n\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t<a id=\"set-category-thumbnail\" title=\"<?php _e( 'Set featured image' ); ?>\" data-uploader-title=\"<?php _e( 'Choose a thumbnail for this category', 'category-thumbnail' ); ?>\" data-uploader-button-text=\"<?php _e( 'Set Category Thumbnail', 'category-thumbnail' ); ?>\" href=\"#\" class=\"button thickbox\" style=\"display:none;\">\n\t\t\t\t\t<?php _e( 'Set featured image' ); ?>\n\t\t\t\t</a>\n\t\t\t\t\n\t\t\t\t<a id=\"remove-category-thumbnail\" title=\"<?php _e( 'Set featured image' ); ?>\" href=\"#\">\n\t\t\t\t\t<?php _e( 'Remove featured image' ); ?>\n\t\t\t\t</a>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t<?php else : ?>\n\t\t\t\t\n\t\t\t\t<div id=\"selected-image\"></div>\n\t\t\t\t\n\t\t\t\t<a id=\"set-category-thumbnail\" title=\"<?php _e( 'Set featured image' ); ?>\" data-uploader-title=\"<?php _e( 'Choose a thumbnail for this category', 'category-thumbnail' ); ?>\" data-uploader-button-text=\"<?php _e( 'Set Category Thumbnail', 'category-thumbnail' ); ?>\" href=\"#\" class=\"button thickbox\">\n\t\t\t\t\t<?php _e( 'Set featured image' ); ?>\n\t\t\t\t</a>\n\t\t\t\t\n\t\t\t\t<a id=\"remove-category-thumbnail\" title=\"<?php _e( 'Set featured image' ); ?>\" href=\"#\" style=\"display:none;\">\n\t\t\t\t\t<?php _e( 'Remove featured image' ); ?>\n\t\t\t\t</a>\n\t\t\t\t\n\t\t\t\t<?php endif; ?>\n\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t<input name=\"image\" id=\"image-id\" type=\"hidden\" value=\"<?php echo $image; ?>\" />\n\t\t\t\n\t\t\t<p class=\"description\">\n\t\t\t\t<?php printf( __( 'The thumbnail to this %s', 'category-thumbnail' ), $wp_taxonomies[ $taxonomy ]->labels->singular_name ); ?>\n\t\t\t</p>\n\t\t\t\n\t\t</td>\n\t</tr>\n\t<?php\n\t\t\n\t}", "function classiera_update_my_category_fields($term_id) {\r\n\tif(isset($_POST['taxonomy'])){\t\r\n\t if($_POST['taxonomy'] == 'category'):\r\n\t\t$tag_extra_fields = get_option(MY_CATEGORY_FIELDS);\r\n\t\t$tag_extra_fields[$term_id]['your_image_url'] = strip_tags($_POST['your_image_url']);\r\n\t\t$tag_extra_fields[$term_id]['category_image'] = $_POST['category_image'];\r\n\t\t$tag_extra_fields[$term_id]['category_icon_code'] = $_POST['category_icon_code'];\r\n\t\t$tag_extra_fields[$term_id]['category_icon_color'] = $_POST['category_icon_color'];\r\n\t\tupdate_option(MY_CATEGORY_FIELDS, $tag_extra_fields);\r\n\t endif;\r\n\t}\r\n}", "public function es_edit_category_fields( $term, $taxonomy ) {\n\n\t\t\t$banner_id = absint( get_woocommerce_term_meta( $term->term_id, 'banner_id', true ) );\n\n\t\t\tif ( $banner_id ) {\n\t\t\t\t$image = wp_get_attachment_thumb_url( $banner_id );\n\t\t\t} else {\n\t\t\t\t$image = wc_placeholder_img_src();\n\t\t\t}\n\t\t\t?>\n\t\t\t<tr class=\"form-field\">\n\t\t\t\t<th scope=\"row\" valign=\"top\"><label><?php _e( 'Banner', 'woocommerce' ); ?></label></th>\n\t\t\t\t<td>\n\t\t\t\t\t<div id=\"product_cat_banner\" style=\"float:left;margin-right:10px;\"><img src=\"<?php echo esc_url( $image ); ?>\" width=\"60px\" height=\"60px\" /></div>\n\t\t\t\t\t<div style=\"line-height:60px;\">\n\t\t\t\t\t\t<input type=\"hidden\" id=\"product_cat_banner_id\" name=\"product_cat_banner_id\" value=\"<?php echo esc_attr( $banner_id ); ?>\" />\n\t\t\t\t\t\t<button type=\"submit\" class=\"banner_upload_image_button button\"><?php _e( 'Upload/Add image', 'woocommerce' ); ?></button>\n\t\t\t\t\t\t<button type=\"submit\" class=\"banner_remove_image_button button\"><?php _e( 'Remove image', 'woocommerce' ); ?></button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<script type=\"text/javascript\">\n\n\t\t\t\t\t\t// Uploading files\n\t\t\t\t\t\tvar file_frame;\n\n\t\t\t\t\t\tjQuery( document ).on( 'click', '.banner_upload_image_button', function( event ) {\n\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t// Create the media frame.\n\t\t\t\t\t\t\tfile_frame = wp.media.frames.downloadable_file = wp.media({\n\t\t\t\t\t\t\t\ttitle: '<?php _e( 'Choose an image', 'woocommerce' ); ?>',\n\t\t\t\t\t\t\t\tbutton: {\n\t\t\t\t\t\t\t\t\ttext: '<?php _e( 'Use image', 'woocommerce' ); ?>',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tmultiple: false\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// When an image is selected, run a callback.\n\t\t\t\t\t\t\tfile_frame.on( 'select', function() {\n\t\t\t\t\t\t\t\tattachment = file_frame.state().get('selection').first().toJSON();\n\n\t\t\t\t\t\t\t\tjQuery('#product_cat_banner_id').val( attachment.id );\n\t\t\t\t\t\t\t\tjQuery('#product_cat_banner img').attr('src', attachment.url );\n\t\t\t\t\t\t\t\tjQuery('.banner_remove_image_button').show();\n\n\t\t\t\t\t\t\t\tfile_frame = undefined;\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// Finally, open the modal.\n\t\t\t\t\t\t\tfile_frame.open();\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tjQuery( document ).on( 'click', '.banner_remove_image_button', function( event ) {\n\t\t\t\t\t\t\tjQuery('#product_cat_banner img').attr('src', '<?php echo esc_url( wc_placeholder_img_src() ); ?>');\n\t\t\t\t\t\t\tjQuery('#product_cat_banner_id').val('');\n\t\t\t\t\t\t\tjQuery('.banner_remove_image_button').hide();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t</script>\n\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<?php\n\t\t}", "public function es_add_category_fields() {\n\t\t\t?>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label><?php _e( 'Banner', 'woocommerce' ); ?></label>\n\t\t\t\t<div id=\"product_cat_banner\" style=\"float:left;margin-right:10px;\"><img src=\"<?php echo esc_url( wc_placeholder_img_src() ); ?>\" width=\"60px\" height=\"60px\" /></div>\n\t\t\t\t<div style=\"line-height:60px;\">\n\t\t\t\t\t<input type=\"hidden\" id=\"product_cat_banner_id\" name=\"product_cat_banner_id\" />\n\t\t\t\t\t<button type=\"button\" class=\"banner_upload_image_button button\"><?php _e( 'Upload/Add image', 'woocommerce' ); ?></button>\n\t\t\t\t\t<button type=\"button\" class=\"banner_remove_image_button button\"><?php _e( 'Remove image', 'woocommerce' ); ?></button>\n\t\t\t\t</div>\n\n\n\t\t\t<script type=\"text/javascript\">\n\n\t\t\t\t// Only show the \"remove image\" button when needed\n\t\t\t\tif ( ! jQuery('#product_cat_banner_id').val() ) {\n\t\t\t\t\tjQuery('.banner_remove_image_button').hide();\n\t\t\t\t}\n\n\t\t\t\t// Uploading files\n\t\t\t\tvar file_frame;\n\n\t\t\t\tjQuery( document ).on( 'click', '.banner_upload_image_button', function( event ) {\n\n\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t// Create the media frame.\n\t\t\t\t\tfile_frame = wp.media.frames.downloadable_file = wp.media({\n\t\t\t\t\t\ttitle: '<?php _e( 'Choose an image', 'woocommerce' ); ?>',\n\t\t\t\t\t\tbutton: {\n\t\t\t\t\t\t\ttext: '<?php _e( 'Use image', 'woocommerce' ); ?>',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmultiple: false\n\t\t\t\t\t});\n\n\t\t\t\t\t// When an image is selected, run a callback.\n\t\t\t\t\tfile_frame.on( 'select', function() {\n\t\t\t\t\t\tattachment = file_frame.state().get('selection').first().toJSON();\n\n\t\t\t\t\t\tjQuery('#product_cat_banner_id').val( attachment.id );\n\t\t\t\t\t\tjQuery('#product_cat_banner img').attr('src', attachment.url );\n\t\t\t\t\t\tjQuery('.banner_remove_image_button').show();\n\n\t\t\t\t\t\tfile_frame = undefined;\n\n\t\t\t\t\t});\n\n\t\t\t\t\t// Finally, open the modal.\n\t\t\t\t\tfile_frame.open();\n\t\t\t\t});\n\n\t\t\t\tjQuery( document ).on( 'click', '.banner_remove_image_button', function( event ) {\n\t\t\t\t\tjQuery('#product_cat_banner img').attr('src', '<?php echo esc_url( wc_placeholder_img_src() ); ?>');\n\t\t\t\t\tjQuery('#product_cat_banner_id').val('');\n\t\t\t\t\tjQuery('.banner_remove_image_button').hide();\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\n\t\t\t</script>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "function eZImageCategory( $id=-1 )\r\n {\r\n $this->ExcludeFromSearch = \"false\";\r\n if ( $id != -1 )\r\n {\r\n $this->ID = $id;\r\n $this->get( $this->ID );\r\n }\r\n }", "function gtags_group_category_form() {\n\tglobal $bp, $show_group_add_form_cats;\t\n\tif ($show_group_add_form_cats) return; // prevents showing form twice\n\t$show_group_add_form_cats = true;\n\n\t// the group category\t\n\t$group_cats = get_option('gtags_category'); \n\tif (empty($group_cats)) return;\n\t\n\t$selected = groups_get_groupmeta( $bp->groups->current_group->id, 'gtags_group_cat' ); \n\t?><label for=\"group-cat\"><?php _e( 'Group Category', 'gtags' ) ?></label>\n\t<select name=\"group-cat\" id=\"group-cat\" />\n\t\t<option value=\"\"><?php _e('--- SELECT ONE ---', 'gtags') ?></option>\n\t<?php foreach ( $group_cats as $tag => $desc ): ?>\n\t\t<?php if ( !$desc ) $desc = $tag; ?>\n\t\t<option value=\"<?php echo $tag; ?>\" <?php if ( $tag == $selected ) echo 'selected=\"selected\"' ?>><?php echo $desc; ?></option>\n\t<?php endforeach; ?>\n\t</select>\n\t<i><?php _e('(the primary group activity)', 'gtags'); ?></i><br><?php \t\n}", "function helperGetCategoryImage($catImg, $parent=0) {\n\t\t$table = 'tx_rggooglemap_cat';\n\t\t$field = 'uid,image,parent_uid';\n\t\t$where = 'deleted = 0 AND hidden=0 ';\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($field,$table,$where,$groupBy='',$orderBy,$limit='');\n\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\tif ($row['image']=='') {\n\t\t\t\t// get image of parent category\n\t\t\t\t$whereTemp = 'deleted = 0 AND hidden=0 AND uid = ' . $row['parent_uid'];\n\t\t\t\t$res2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery($field,$table,$whereTemp);\n\t\t\t\t$row2 = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res2);\n\t\t\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res2);\n\t\t\t\t$catImg[$row['uid']] = $row2['image'];\n\t\t\t} else {\n\t\t\t\t$catImg[$row['uid']] = $row['image'];\n\t\t\t}\n\t\t}\n\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res);\n\n\t\treturn $catImg;\n\t}", "function colorpicker_field_add_new_category( $taxonomy ) { ?> \r\n\t<div class=\"form-field term-colorpicker-wrap\"> \r\n\t<label for=\"term-colorpicker\">Category Color</label> \r\n\t<input name=\"_category_color\" value=\"#ffffff\" class=\"colorpicker\" id=\"term-colorpicker\" /> \r\n\t<p>This is the field description where you can tell the user how the color is used in the theme.</p> \r\n\t</div> <?php }", "function createRatingSelector() {\n global $serendipity;\n\n // Since the inputs are set up with the proper names, the config item\n // gets saved automatically, with no need for magic\n\n // Get the filename to be automatically selected\n $this->set_valid_image_data();\n $cursel = $this->image_name;\n\n $this->select_css = '';\n $this->select_html = '';\n // We will be wrapped in a <tr><td colspan=\"2\">\n $this->select_html .= \"\n<strong>\" . PLUGIN_KARMA_IMAGE . \"</strong><br />\n<span style='color: rgb(94, 122, 148); font-size: 8pt;'>&nbsp;\".PLUGIN_KARMA_IMAGE_DESC.\"</span>\";\n if ($serendipity['version'][0] < 2) {\n $this->select_html .= \"\n</td>\n<td></td>\n</tr>\n<tr>\n<td colspan='2'>\\n\";\n }\n $this->select_html .= \"\n<table border='1' class='serendipity_karmaVote_selectorTable'>\";\n // Add the 'text-only' selection and its CSS\n if ($cursel == '0') {\n $checked = 'checked=\"checked\" ';\n } else {\n $checked = '';\n }\n $this->image_name = '0';\n $bar = $this->createRatingBar('', 0, 0, 'textbar');\n $this->select_html .= \"\n<tr id='serendipity_karmaVote_selectorTable_textOnly'>\n<td colspan='3' align='center'><input type='radio' name='serendipity[plugin][base_image]' value='0' $checked/>\" . PLUGIN_KARMA_STATISTICS_POINTS_NO . \"<br />$bar<br /></td>\\n\";\n $this->select_css .= \"\n.textbar, .textbar a, .textbar a:hover {\n font-size: 100%;\n position: relative;\n background: none;\n}\n.serendipityAdminContent span.textbar {\n color: black !important;\n}\n\";\n // Retrieve all the *valid* images from the image directory\n $files = $this->getImageFiles();\n // Add an <ol> for each rating bar, and add its CSS overrides\n $n = 0;\n foreach ($files as $fdata) {\n // Columnize\n if (($n % 3) == 0) {\n // Time to start a new row\n $this->select_html .= \"</tr>\\n<tr>\\n\";\n }\n\n // Set the image data\n $fname = $fdata['fname'];\n $height = $fdata['height'];\n $width = $fdata['width'];\n $ratio = $width / $height;\n // If this is a single segment, adjust width\n if ($ratio < $this->max_segment_ratio) {\n $width = $width * 5;\n }\n $height = $height / 3;\n // Set up class variables correctly\n $this->image_name = $fname;\n $this->image_width = $width;\n $this->image_height = $height;\n\n // Create a rating bar of this image\n //\n // What would be a good CSS class for this image?\n $css_class = str_replace(array('.',' '), array('_','_'), $fname);\n $checked = '';\n if ($fname == $cursel) {\n $checked = 'checked=\"checked\" ';\n }\n $bar_html = \n\"<td align='center' id='serendipity_karmaVote_select_$css_class'>\n <input type='radio' name='serendipity[plugin][base_image]' value='$fname' $checked/>\n <span style='font-size: 8pt;'>$fname</span><br />\\n\" . \n $this->createRatingBar('', -1, 2, $css_class) .\n\"</td>\\n\";\n $bar_html = sprintf($bar_html, '', '2.5 of 5', '1');\n $this->select_html .= $bar_html;\n // Add the necessary CSS to the stylesheet (will be added when css hooks are called)\n // Sorry to interrupt your regularly scheduled HTML; I need to\n // use the $css_class while it's still here.\n $this->select_css .= \"\n/* Overrides for $css_class */\n.$css_class \n{\n width: ${width}px;\n height: ${height}px;\n}\n.$css_class,\n.$css_class a:hover,\n.$css_class .serendipity_karmaVoting_current-rating\n{\n background-image: url({$serendipity['baseURL']}plugins/serendipity_event_karma/img/${fname});\n}\n.$css_class,\n.$css_class a,\n.$css_class .serendipity_karmaVoting_current-rating\n{\n line-height: ${height}px;\n height: ${height}px;\n}\n\n\";\n $n++;\n } // Go back up for another image\n\n // Check for nothing displayed\n if ($n == 0) {\n // There were no images!\n $this->select_html .= \"</tr>\\n<tr><td>\" . PLUGIN_KARMA_NO_IMAGES . \"</td>\";\n }\n\n // End the table, with a config-item bottom-border separator\n $this->select_html .= \n\"</tr>\\n</table>\\n\";\n if ($serendipity['version'][0] < 2) {\n $this->select_html .= \n\"<tr><td colspan='2' style='border-bottom: 1px solid #000000; vertical-align: top'>&nbsp;<td></tr>\\n\";\n }\n // The config item and row are closed by the core code\n\n return $this->select_html;\n }", "private function categoriesFormInputs()\n {\n // Get the field name of the field with the category icon\n // #47631, dwildt, 1-\n //$arrLabels[ 'catIcon' ] = $this->confMap['configuration.']['categories.']['fields.']['categoryIcon'];\n // #47631, #i0007, dwildt, 10+\n switch ( true )\n {\n case( $this->pObj->typoscriptVersion <= 4005004 ):\n $arrLabels[ 'catIcon' ] = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'categoryIcon' ];\n break;\n case( $this->pObj->typoscriptVersion <= 4005007 ):\n default:\n $arrLabels[ 'catIcon' ] = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryIcon' ];\n break;\n }\n // #47631, #i0007, dwildt, 10+\n // Default space in HTML code\n $tab = ' ';\n\n // FOREACH category label\n//$this->pObj->dev_var_dump( $this->arrCategories );\n // #i0118, dwildt, 1-/+\n //foreach ( $this->arrCategories[ 'labels' ] as $labelKey => $labelValue )\n foreach ( ( array ) $this->arrCategories[ 'labels' ] as $labelKey => $labelValue )\n {\n // Get the draft for an input field\n $cObj_name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'form_input' ];\n $cObj_conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'form_input.' ];\n $input = $this->pObj->cObj->cObjGetSingle( $cObj_name, $cObj_conf );\n // replace the category marker\n $input = str_replace( '###CAT###', $labelValue, $input );\n // 4.1.17, 120927, dwildt\n // replace the category marker\n //$labelValueWoSpc = str_replace( ' ', null, $labelValue );\n $labelValueWoSpc = $this->zz_properFormLabel( $labelValue );\n $input = str_replace( '###CAT_WO_SPC###', $labelValueWoSpc, $input );\n // 4.1.17, 120927, dwildt\n // #54548, 131221, dwildt, 6+\n $class = $this->arrCategories[ 'cssClass' ][ $labelKey ];\n if ( !empty( $class ) )\n {\n $class = ' class=\"' . $class . '\"';\n }\n $input = str_replace( '###CLASS###', $class, $input );\n\n // IF draft for an input field contains ###IMG###, render an image\n $pos = strpos( $input, '###IMG###' );\n if ( !( $pos === false ) )\n {\n // SWITCH : Render the image\n switch ( true )\n {\n // #i0062\n case( $labelKey == $this->arrWoCategories[ 'iconKey' ] ):\n $name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey ];\n $conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey . '.' ];\n $img = $this->pObj->cObj->cObjGetSingle( $name, $conf );\n break;\n case( is_array( $this->arrCategories[ 'icons' ] ) ):\n // 4.1.7, dwildt, +\n $this->cObjDataAddArray( array( $arrLabels[ 'catIcon' ] => $this->arrCategories[ 'icons' ][ $labelKey ] ) );\n $img = $this->renderMapMarkerVariablesSystemItem( 'categoryIconLegend' );\n $this->cObjDataRemoveArray( array( $arrLabels[ 'catIcon' ] => $this->arrCategories[ 'icons' ][ $labelKey ] ) );\n // 4.1.7, dwildt, +\n break;\n default:\n // Render the image\n $name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey ];\n $conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey . '.' ];\n $img = $this->pObj->cObj->cObjGetSingle( $name, $conf );\n break;\n }\n // SWITCH : Render the image\n\n $input = str_replace( '###IMG###', $img, $input );\n }\n // IF draft for an input field contains ###IMG###, render an image\n\n $arrInputs[] = $tab . $input;\n }\n // FOREACH category label\n // Move array of input fields to a string\n // #i0118, dwildt, 1-/+\n //$inputs = implode( PHP_EOL, $arrInputs );\n $inputs = implode( PHP_EOL, ( array ) $arrInputs );\n $inputs = trim( $inputs );\n\n // RETURN input fields\n return $inputs;\n }", "public function getImageTag();", "public function getName()\n {\n return 'category_form';\n }", "public function getValueAfterElementHtml()\n {\n $html = '';\n\n switch ($this->getAttribute()) {\n case 'category_ids':\n $image = $this->_assetRepo->getUrl('images/rule_chooser_trigger.gif');\n break;\n }\n\n if (!empty($image)) {\n $html = '<a href=\"javascript:void(0)\" class=\"rule-chooser-trigger\"><img src=\"' .\n $image .\n '\" alt=\"\" class=\"v-middle rule-chooser-trigger\" title=\"' .\n __(\n 'Open Chooser'\n ) . '\" /></a>';\n }\n return $html;\n }", "public function getImagenesIndexCategorias(){\n foreach($this->indexContent as $content){\n //echo \"--------------------- Imagenes --------------<br>\";\n $vectorImagenes = array();\n $dom = new DOMDocument();\n $dom->loadHTML(\"$content\");\n $xpath = new DOMXPath($dom);\n $tag = \"div\";\n $class = \"home-category-box\";\n $consulta = \"//\".$tag.\"[@class='\".$class.\"']\";\n $resultados = $xpath->query($consulta);\n if ($resultados->length > 0){\n $contador = 0;\n foreach($resultados as $imagenes){\n if ($contador == 0){\n $todasImagenes = $imagenes->getElementsByTagName(\"img\");\n if ($todasImagenes->length > 0){\n foreach($todasImagenes as $imagen){\n $urlImagen = $imagen->getAttribute(\"src\");\n //echo \"url imagen categorias padre: \".$urlImagen.\"<br>\";\n array_push($vectorImagenes,$urlImagen);\n }\n }\n }\n $contador++;\n }\n }\n //echo \"--------------------- Fin Imagenes --------------<br>\";\n }\n return $vectorImagenes;\n }", "public function getCategoryIcon();", "public function getFormCategory()\n\t{\n\t\treturn strtolower($this->_removeNonAlphaCharacters($this->category));\n\t}", "public function getSearchCategory(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Block\\Booking\\Form' );\n }", "public function category() {\n\t\treturn static::get_thrive_advanced_label();\n\t}", "function work_category_add_new_meta_field() {\r\n\t\t$textdomain = 'milk';\r\n\t\t?>\r\n\t \t\t<div class=\"row\">\r\n\t \t\t\t<p class=\"col-md-6 desc\" >\r\n\t \t\t\t\t<label for=\"term_meta[featured_img]\"><?php _e( \"Featured Image\", $textdomain ); ?></label>\r\n\t \t\t\t\t<br/>\r\n\t \t\t\t\t<label for=\"term_meta[featured_img]\"><?php _e( \"If you choose to show work categories on work page instead of works, you need to upload featured image for category\", $textdomain ); ?></label>\r\n\t \t\t\t</p>\r\n\t\t\t \r\n\t\t\t\t<div class=\"col-md-6\">\r\n\t\t\t\t\t<input \tclass=\"post_meta_image_upload button button-primary\" \r\n\t\t\t\t\t\tname=\"image_btn\" \r\n\t\t\t\t\t\ttype=\"button\" \r\n\t\t\t\t\t\tdata-uploader_title=<?php _e( \"Choose image\", $textdomain ); ?>\r\n\t\t\t\t\t\tdata-uploader_button_text=<?php _e( \"Select\" , $textdomain ); ?>\r\n\t\t\t\t\t\tvalue=<?php _e( \"Select images\", $textdomain ); ?>/>\r\n\t\t\t\t\t<input id=\"term_meta[featured_img]\"\r\n\t\t\t\t\t\tname=\"term_meta[featured_img]\"\r\n\t\t\t\t\t\tclass=\"img_url\" \r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tstyle=\"display:none\"\r\n\t\t\t\t\t\tvalue=\"\"/>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"row\">\r\n\t\t\t \t<p class=\"col-md-6 desc\" >\r\n\t \t\t\t\t<label for=\"term_meta[work_color]\"><?php _e( \"Acent Color\", $textdomain ); ?></label>\r\n\t \t\t\t\t<br/>\r\n\t \t\t\t\t<label for=\"term_meta[work_color]\"><?php _e( \"If you choose to show work categories on work page instead of works, you need to select accent color for work categorie preview\", $textdomain ); ?></label>\r\n\t \t\t\t</p>\r\n\t \t\t\t<div class=\"col-md-6\">\r\n\t\t \t\t\t<input name=\"term_meta[work_color]\" \r\n\t\t\t\t \t\ttype=\"text\" \r\n\t\t\t\t \t\tclass=\"colorPicker\"\r\n\t\t\t\t \t\tid=\"term_meta[work_color]\" \r\n\t\t\t\t \t\tvalue=\"\"\r\n\t\t\t\t \t\tdata-default-color=\"#49b4ff\">\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t<?php }", "public function create_acf_group()\n {\n if( function_exists('acf_add_local_field_group') ):\n\n acf_add_local_field_group(array(\n 'key' => 'group_60c9f2328988d',\n 'title' => 'Category Options',\n 'fields' => array(\n array(\n 'key' => 'field_60c9f24923514',\n 'label' => 'Category Image',\n 'name' => self::ACF_CAT_IMAGE,\n 'type' => 'image',\n 'instructions' => '',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'return_format' => 'url',\n 'preview_size' => 'medium',\n 'library' => 'all',\n 'min_width' => '',\n 'min_height' => '',\n 'min_size' => '',\n 'max_width' => '',\n 'max_height' => '',\n 'max_size' => '',\n 'mime_types' => '',\n ),\n ),\n 'location' => array(\n array(\n array(\n 'param' => 'taxonomy',\n 'operator' => '==',\n 'value' => 'category',\n ),\n ),\n ),\n 'menu_order' => 0,\n 'position' => 'normal',\n 'style' => 'default',\n 'label_placement' => 'top',\n 'instruction_placement' => 'label',\n 'hide_on_screen' => '',\n 'active' => true,\n 'description' => '',\n ));\n \n endif;\n }", "public function buildForm(FormBuilderInterface $builder, array $options)\n {\n// dd($category->findAll());\n $builder\n ->add('price')\n ->add('name')\n ->add('description')\n /*->add('category', CollectionType::class, array(\n 'entry_type' => CategoryType::class,\n 'allow_add' => true,\n ))*/\n ->add('category', EntityType::class, array(\n 'class' => Category::class,\n 'query_builder' => function (EntityRepository $repository) {\n return $repository -> createQueryBuilder('c')\n ->orderBy('c.name', 'ASC');\n },\n 'choice_label' => 'name',\n ))\n// ->add('images', CollectionType::class, array(\n// 'entry_type' => ImageType::class\n// ))\n ->add('images', FileType::class, [\n 'mapped' => false,\n 'label' => 'Upload images'\n ]);\n }", "function getForumCategoryFormCfg() {\n return array(\n 'infoNotification' => __('NOTIFY_FORUM_IMAGE_SIZE'),\n 'items' => array(\n 'htmlForumCategoryImage' => '',\n 'nom' => array(\n 'label' => __('NAME'),\n 'type' => 'text',\n 'size' => 30,\n 'dataType' => 'text',\n 'required' => true\n ),\n 'image' => array(\n 'label' => __('IMAGE'),\n 'type' => 'text',\n 'size' => 42,\n 'uploadField' => 'uploadImage'\n ),\n 'uploadImage' => array(\n 'label' => __('UPLOAD_IMAGE'),\n 'type' => 'file',\n 'allowedExtension' => array('jpg', 'jpeg', 'png', 'gif'),\n 'uploadDir' => 'upload/Forum/cat'\n ),\n 'niveau' => array(\n 'label' => __('LEVEL'),\n 'type' => 'select',\n 'options' => array(\n 0 => 0,\n 1 => 1,\n 2 => 2,\n 3 => 3,\n 4 => 4,\n 5 => 5,\n 6 => 6,\n 7 => 7,\n 8 => 8,\n 9 => 9\n )\n ),\n 'ordre' => array(\n 'label' => __('ORDER'),\n 'type' => 'text',\n 'value' => '0',\n 'size' => 2,\n 'dataType' => 'integer',\n 'required' => true\n )\n ),\n 'itemsFooter' => array(\n 'submit' => array(\n 'type' => 'submit',\n 'value' => array('CREATE_CATEGORY', 'MODIFY_THIS_CATEGORY'),\n 'inputClass' => array('button')\n )\n )\n );\n}", "function l1NodeCategory($x) {\n global $dom;\n $root = $dom->documentElement;\n $children = $root->childNodes;\n\n $node = $children->item($x);\n $nodeName = $node->nodeName;\n\n switch($nodeName) {\n case p:\n $category = \"pOrBlockquote\";\n break;\n case blockquote:\n $category = \"pOrBlockquote\";\n break;\n case h2:\n $category = \"h\";\n break;\n case h3:\n $category = \"h\";\n break;\n case h4:\n $category = \"h\";\n break;\n case h5:\n $category = \"h\";\n break;\n case pre:\n $category = \"pre\";\n break;\n case hr:\n $category = \"hr\";\n break;\n case table:\n $category = \"table\";\n break;\n case ol:\n $category = \"list\";\n break;\n case ul:\n $category = \"list\";\n break;\n case div:\n // If the first grandchild's nodeName is img then $category is image.\n if ($node->hasChildNodes()) {\n $grandChildren = $node->childNodes;\n $firstGChild = $grandChildren->item(0);\n $fGCNodeName = $firstGChild->nodeName;\n if ($fGCNodeName == \"img\") {\n $category = \"image\";\n break;\n }\n }\n // If there is a class attribute whose value is remarkbox then\n // $category is remark.\n $classAtt = $node->getAttribute(\"class\");\n if ($classAtt == \"remarkbox\") {\n $category = \"remark\";\n break;\n }\n form_destroy();\n die('The div is weird. Err 5187854. -Programmer.');\n default:\n form_destroy();\n die('Node category undefined. Err 6644297. -Programmer.');\n }\n\n return $category;\n}", "function type_url_form_image()\n {\n }", "function mosModelCategoryGetGD($url =null)\r\n{\r\n\tif ($url == null) {\r\n\t\t$url\t\t=\t'http://giaoduc.net.vn/';\r\n\t}\r\n\t$browser\t=\tnew phpWebHacks();\r\n\t$response\t=\t$browser->get($url);\r\n\t$html_obj\t=\tloadHtmlString($response);\r\n\t$arrMenu\t=\tarray();\r\n\tif ($boxsection = $html_obj->find('div[id=\"boxsection\"]',0)) {\r\n\t\t$c_boxgiua1\t=\t$boxsection->find('div[class=\"c_boxgiua1\"]');\r\n\t\tfor ($i=0;$i<count($c_boxgiua1); $i++)\r\n\t\t{\t\t\r\n\t\t\t$obj_menu\t=\tnew stdClass();\r\n\t\t\t$obj_menu->title\t=\t$c_boxgiua1[$i]->find('div[class=\"c_boxgiua1_text\"]',0)->first_child()->innertext;\r\n\t\t\t$obj_menu->link\t=\t$c_boxgiua1[$i]->find('div[class=\"c_boxgiua1_text\"]',0)->first_child()->href;\r\n\t\t\t$obj_menu->parent\t=\t-1;\r\n\t\t\t$obj_menu->published\t=\t0;\r\n\t\t\t$parent\t=\tcount($arrMenu);\r\n\t\t\t$arrMenu[]\t=\t$obj_menu;\r\n\t\t\t$sub_menu\t=\t$c_boxgiua1[$i]->find('div[class=\"c_boxgiua1_nd\"]',0)->first_child();\r\n\t\t\t$items\t\t=\t$sub_menu->find('a');\r\n\t\t\tfor ($j=0; $j<count($items); $j++)\r\n\t\t\t{\r\n\t\t\t\t$item\t=\t$items[$j];\r\n\t\t\t\t$obj_submenu\t=\tnew stdClass();\r\n\t\t\t\t$obj_submenu->title\t=\t$item->innertext;\r\n\t\t\t\t$obj_submenu->link\t=\t$item->href;\r\n\t\t\t\t$obj_submenu->parent=\t$parent;\r\n\t\t\t\t$obj_submenu->published=\t1;\r\n\t\t\t\t$arrMenu[]\t=\t$obj_submenu;\t\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}\r\n\tif ($contentleft = $html_obj->find('div[id=\"contentleft\"]',0)) {\r\n\t\t$showcat_sec\t=\t$contentleft->find('div[class=\"showcat_sec\"]');\r\n\t\t\r\n\t\tfor ($i=0;$i<count($showcat_sec); $i++)\r\n\t\t{\r\n\t\t\t$obj_menu\t=\tnew stdClass();\r\n\t\t\t$obj_menu->title\t=\t$showcat_sec[$i]->find('div[class=\"link_sec\"]',0)->first_child()->innertext;\r\n\t\t\t$obj_menu->link\t=\t$showcat_sec[$i]->find('div[class=\"link_sec\"]',0)->first_child()->href;\r\n\t\t\t$obj_menu->parent\t=\t-1;\r\n\t\t\t$obj_menu->published\t=\t0;\r\n\t\t\t$parent\t=\tcount($arrMenu);\r\n\t\t\t$arrMenu[]\t=\t$obj_menu;\r\n\t\t\t$sub_menu\t=\t$showcat_sec[$i]->find('ul',0);\t\t\t\r\n\t\t\t$items\t\t=\t$sub_menu->find('a');\r\n\t\t\tfor ($j=0; $j<count($items); $j++)\r\n\t\t\t{\r\n\t\t\t\t$item\t=\t$items[$j];\r\n\t\t\t\t$obj_submenu\t=\tnew stdClass();\r\n\t\t\t\t$obj_submenu->title\t=\t$item->innertext;\r\n\t\t\t\t$obj_submenu->link\t=\t$item->href;\r\n\t\t\t\t$obj_submenu->parent=\t$parent;\r\n\t\t\t\t$obj_submenu->published=\t1;\r\n\t\t\t\t$arrMenu[]\t=\t$obj_submenu;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif ($contentleft = $html_obj->find('div[id=\"contentleft\"]',0)) {\r\n\t\t$c_box_k2_tit\t=\t$contentleft->find('div[class=\"c_box_k2_tit\"]');\r\n\t\t\r\n\t\tfor ($i=0;$i<count($c_box_k2_tit); $i++)\r\n\t\t{\r\n\t\t\t$obj_menu\t=\tnew stdClass();\r\n\t\t\t$obj_menu->title\t=\t$c_box_k2_tit[$i]->find('div[class=\"c_box_k2_tittext\"]',0)->first_child()->innertext;\r\n\t\t\t$obj_menu->link\t=\t$c_box_k2_tit[$i]->find('div[class=\"c_box_k2_tittext\"]',0)->first_child()->href;\r\n\t\t\t$obj_menu->parent\t=\t-1;\r\n\t\t\t$obj_menu->published\t=\t0;\r\n\t\t\t$parent\t=\tcount($arrMenu);\r\n\t\t\t$arrMenu[]\t=\t$obj_menu;\r\n\t\t\t$sub_menu\t=\t$c_box_k2_tit[$i]->find('ul',0);\t\t\t\r\n\t\t\t$items\t\t=\t$sub_menu->find('a');\r\n\t\t\tfor ($j=0; $j<count($items); $j++)\r\n\t\t\t{\r\n\t\t\t\t$item\t=\t$items[$j];\r\n\t\t\t\t$obj_submenu\t=\tnew stdClass();\r\n\t\t\t\t$obj_submenu->title\t=\t$item->innertext;\r\n\t\t\t\t$obj_submenu->link\t=\t$item->href;\r\n\t\t\t\t$obj_submenu->parent=\t$parent;\r\n\t\t\t\t$obj_submenu->published=\t1;\r\n\t\t\t\t$arrMenu[]\t=\t$obj_submenu;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $arrMenu;\r\n}", "public function admin_image_by_category($id = null) {\n $this->loadModel('GiftImage');\n $logged_in_user = $this->Session->read('Auth.User.id');\n $logged_in_user_parent = $this->Session->read('Auth.User.parent_id');\n $giftImageData = $this->GiftImage->find('all',\n array(\n 'fields' => array('GiftImage.id',\n 'GiftImage.eng_title',\n 'GiftImage.image'),\n 'conditions' => array(\n 'OR' => array(\n array('AND' =>array(\n 'GiftImage.status' => 1,\n 'GiftImage.gift_image_category_id' => $id,\n 'GiftImage.user_id' => 1,\n )),\n array('AND' =>array(\n 'GiftImage.status' => 1,\n 'GiftImage.gift_image_category_id' => $id,\n 'GiftImage.user_id' => $logged_in_user,\n )),\n array('AND' =>array(\n 'GiftImage.status' => 1,\n 'GiftImage.gift_image_category_id' => $id,\n 'GiftImage.user_id' => $logged_in_user_parent,\n )),\n ),\n )\n ));\n $this->set('giftImageData', $giftImageData);\n if($this->request->is('ajax')){\n $this->layout = 'ajax';\n $this->viewPath = \"Elements/admin/GiftCertificates\";\n $this->render('admin_image_by_category');\n }\n }", "public function uploadImage(string $type, $id, $request): ProductCategory;", "function getSelectorName() ;", "function getSelectorName() ;", "function HERITAGE_logo_select_cbk() {\n $logo_url = HERITAGE_get_theme_option('heritage_theme_general_options', 'lc_custom_logo');\n\n ?>\n <input id=\"lc_swp_logo_upload_value\" type=\"text\" name=\"heritage_theme_general_options[lc_custom_logo]\" size=\"150\" value=\"<?php echo esc_url($logo_url); ?>\"/>\n <input id=\"lc_swp_upload_logo_button\" type=\"button\" class=\"button\" value=\"<?php echo esc_html__('Upload Logo', 'heritage'); ?>\" />\n <input id=\"lc_swp_remove_logo_button\" type=\"button\" class=\"button\" value=\"<?php echo esc_html__('Remove Logo', 'heritage'); ?>\" />\n <p class=\"description\">\n <?php echo esc_html__('Upload a custom logo image.', 'heritage'); ?>\n </p>\n\n <div id=\"lc_logo_image_preview\">\n <img class=\"lc_swp_setting_preview_logo\" src=\"<?php echo esc_url($logo_url); ?>\">\n </div>\n\n <?php\n}", "public function form($instance) {\n\n // set up background color\n $bg_color = \"#212121\";\n if (isset($instance['bg_color'])) {\n $bg_color = $instance['bg_color'];\n }\n?>\n <div class=\"an-catlinks-settings-container\">\n <p>\n <label for=\"<?php echo $this->get_field_id( 'bg_color' ); ?>\" style=\"display:block;\"><?php _e( 'Background Color:', 'an_catlinks_wiget' ); ?></label>\n <input class=\"widefat color-picker an-catlist-bg-color-picker\"\n id=\"<?php echo $this->get_field_id( 'bg_color' ); ?>\"\n name=\"<?php echo $this->get_field_name( 'bg_color' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $bg_color ); ?>\" />\n </p>\n\n<?php\n // setup font color\n $font_color = \"#ffffff\";\n if (isset($instance['font_color'])) {\n $font_color = $instance['font_color'];\n }\n?>\n <p>\n <label for=\"<?php echo $this->get_field_id( 'font_color' ); ?>\" style=\"display:block;\"><?php _e( 'Font color:', 'an_catlinks_wiget' ); ?></label>\n <input class=\"widefat color-picker\"\n id=\"<?php echo $this->get_field_id( 'font_color' ); ?>\"\n name=\"<?php echo $this->get_field_name( 'font_color' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $font_color ); ?>\" />\n </p>\n\n<?php\n // set up 1st category\n $cat = 0;\n if (isset($instance['cat1'])) {\n $cat = $instance['cat1'];\n }\n?>\n <!-- 1st category and image -->\n <label for=\"<?php _e($this->get_field_id('cat1')); ?>\"><?php esc_html__(\"Category 1\", \"an_catlinks_wiget\"); ?></label>\n <select id=\"<?php _e($this->get_field_id('cat1')); ?>\" name=\"<?php _e($this->get_field_name('cat1')); ?>\" class=\"widefat\" width=\"100%\">\n <option value-\"0\"><?php _e('(not selected)', 'an_catlinks_wiget'); ?></option>\n <?php foreach(get_terms('category','parent=0&hide_empty=0') as $category): ?>\n <option <?php $cat == $category->term_id ? _e(\"selected\") : _e(\"\"); ?> value=\"<?php _e($category->term_id); ?>\">\n <?php _e($category->name); ?>\n </option>\n <?php endforeach; ?>\n </select>\n\n<?php\n // set up image for the first category\n $image = '';\n if(isset($instance['image1']))\n {\n $image = $instance['image1'];\n }\n?>\n\n <p class=\"an-catlinks-image-demo\">\n <label for=\"<?php _e($this->get_field_name( 'image1' )); ?>\"><?php _e( 'Image 1:', 'an_catlinks_wiget' ); ?></label>\n\n <input name=\"<?php _e($this->get_field_name( 'image1' )); ?>\"\n id=\"<?php _e($this->get_field_id( 'image1' )); ?>\"\n class=\"widefat\" type=\"text\" size=\"36\"\n value=\"<?php _e(esc_url( $image )); ?>\" />\n <img src=\"<?php _e(esc_url( $image )); ?>\" style=\"max-width: 100%; height: auto; background: <?php _e($bg_color); ?>\" />\n <input class=\"upload_image_button\" type=\"button\" value=\"<?php _e('Upload Image','an_catlinks_wiget'); ?>\" />\n </p>\n\n <!-- 2nd category and image -->\n<?php\n $cat = 0;\n if (isset($instance['cat2'])) {\n $cat = $instance['cat2'];\n }\n?>\n <label for=\"<?php _e($this->get_field_id('cat2')); ?>\"><?php esc_html__(\"Category 2\", \"an_catlinks_wiget\"); ?></label>\n <select id=\"<?php _e($this->get_field_id('cat2')); ?>\" name=\"<?php _e($this->get_field_name('cat2')); ?>\" class=\"widefat\" width=\"100%\">\n <option value-\"0\"><?php _e('(not selected)', 'an_catlinks_wiget'); ?></option>\n <?php foreach(get_terms('category','parent=0&hide_empty=0') as $category): ?>\n <option <?php $cat == $category->term_id ? _e(\"selected\") : _e(\"\"); ?> value=\"<?php _e($category->term_id); ?>\">\n <?php _e($category->name); ?>\n </option>\n <?php endforeach; ?>\n </select>\n\n<?php\n $image = '';\n if(isset($instance['image2']))\n {\n $image = $instance['image2'];\n }\n?>\n\n <p class=\"an-catlinks-image-demo\">\n <label for=\"<?php _e($this->get_field_name( 'image2' )); ?>\"><?php _e( 'Image 2:', 'an_catlinks_wiget' ); ?></label>\n\n <input name=\"<?php _e($this->get_field_name( 'image2' )); ?>\"\n id=\"<?php _e($this->get_field_id( 'image2' )); ?>\"\n class=\"widefat\" type=\"text\" size=\"36\"\n value=\"<?php _e(esc_url( $image )); ?>\" />\n <img src=\"<?php _e(esc_url( $image )); ?>\" style=\"max-width: 100%; height: auto;background: <?php _e($bg_color); ?>\" />\n <input class=\"upload_image_button\" type=\"button\" value=\"<?php _e('Upload Image','an_catlinks_wiget'); ?>\" />\n </p>\n\n <!-- 3rd category and image -->\n\n <?php\n $cat = 0;\n if (isset($instance['cat3'])) {\n $cat = $instance['cat3'];\n }\n ?>\n <label for=\"<?php _e($this->get_field_id('cat3')); ?>\"><?php esc_html__(\"Category 3\", \"an_catlinks_wiget\"); ?></label>\n\n <select id=\"<?php _e($this->get_field_id('cat3')); ?>\" name=\"<?php _e($this->get_field_name('cat3')); ?>\" class=\"widefat\" width=\"100%\">\n <option value-\"0\"><?php _e('(not selected)', 'an_catlinks_wiget'); ?></option>\n <?php foreach(get_terms('category','parent=0&hide_empty=0') as $category): ?>\n <option <?php $cat == $category->term_id ? _e(\"selected\") : _e(\"\"); ?> value=\"<?php _e($category->term_id); ?>\">\n <?php _e($category->name); ?>\n </option>\n <?php endforeach; ?>\n </select>\n\n<?php\n $image = '';\n if(isset($instance['image3']))\n {\n $image = $instance['image3'];\n }\n?>\n\n <p class=\"an-catlinks-image-demo\">\n <label for=\"<?php _e($this->get_field_name( 'image3' )); ?>\"><?php _e( 'Image 3:', 'an_catlinks_wiget' ); ?></label>\n\n <input name=\"<?php _e($this->get_field_name( 'image3' )); ?>\"\n id=\"<?php _e($this->get_field_id( 'image3' )); ?>\"\n class=\"widefat\" type=\"text\" size=\"36\"\n value=\"<?php _e(esc_url( $image )); ?>\" />\n <img src=\"<?php _e(esc_url( $image )); ?>\" style=\"max-width: 100%; height: auto;background: <?php _e($bg_color); ?>\" />\n <input class=\"upload_image_button\" type=\"button\" value=\"<?php _e('Upload Image','an_catlinks_wiget'); ?>\" />\n </p>\n </div>\n <script>\n\n (function($) {\n\n $(document).ready(function() {\n $('.color-picker').wpColorPicker({\n change: function(event, ui) {\n $(this).parent().trigger('change');\n\n if ($(this).hasClass('an-catlist-bg-color-picker')) {\n $('.an-catlinks-image-demo img').css('background',$(this).val());\n }\n },\n\n clear: function(event) {\n $(this).parent().trigger('change');\n\n if ($(this).hasClass('an-catlist-bg-color-picker')) {\n $('.an-catlinks-image-demo img').css('background','transparent');\n }\n }\n\n });\n\n });\n }\n )(jQuery);\n\n </script>\n\n<?php\n\n }", "function getParentSelectorName() ;", "function get_category_thumbnail_object( $cat = '' ) {\n\t\tglobal $wp_taxonomies;\n\t\t\n\t\tif ( is_object( $cat ) )\n\t\t\t$cat_id = $cat->term_id;\n\t\t\n\t\tif ( is_numeric( $cat ) )\n\t\t\t$cat_id = (int) $cat;\n\t\t\n\t\tif ( '' == $cat )\n\t\t\t$cat_id = get_category( get_query_var( 'cat' ) )->term_id;\n\t\t\n\t\t\n\t\t$image = get_option( 'category_thumbnail_image' );\n\t\t\n\t\tif ( is_array( $image ) && array_key_exists( $cat_id, $image ) ) {\n\t\t\t$image = $image[ $cat_id ];\n\t\t\t$image = wp_get_attachment_image_src( (int) $image );\n\t\t\t\n\t\t\t$return = new stdClass;\n\t\t\t$return->url = $image[0];\n\t\t\t$return->width = $image[1];\n\t\t\t$return->height = $image[2];\n\t\t\t\n\t\t\treturn $return;\n\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}", "function getChildSelectorName() ;", "function ag_coll_builder() {\n\trequire_once(AG_DIR . '/functions.php');\n\n\tif(!isset($_POST['coll_id'])) {die('missing data');}\n\t$coll_id = addslashes($_POST['coll_id']);\n\t\t\t\n\t// item categories list\n\t$item_cats = get_terms( 'ag_gall_categories', 'hide_empty=0' );\n\t\n\t// cat and page selector\n\t?>\n <h2></h2>\n \n <div id=\"ag_grid_builder_cat\" class=\"postbox\" style=\"min-width: 630px;\">\n <h3 class=\"hndle\"><?php _e(\"Add Collection Galleries\", 'ag_ml'); ?></h3>\n <div class=\"inside\">\n \n <div class=\"lcwp_mainbox_meta\">\n <table class=\"widefat lcwp_table lcwp_metabox_table\" style=\"border: none;\">\n <tr>\n <td>\n <label style=\"width: 145px;\"><?php _e(\"Gallery Categories\", 'ag_ml'); ?></label>\n \n <select data-placeholder=\"<?php _e(\"Select gallery categories\", 'ag_ml'); ?> ..\" name=\"ag_gall_cats\" id=\"ag_gall_cats\" class=\"lcweb-chosen\" style=\"width: 314px;\" autocomplete=\"off\">\n <option value=\"all\"><?php _e('Any category', 'ag_ml') ?></option>\n \n <?php \n foreach($item_cats as $cat) {\n // WPML fix - get original ID\n if (function_exists('icl_object_id') && isset($GLOBALS['sitpress'])) {\n global $sitepress;\n\t\t\t\t\t\t\t$term_id = icl_object_id($cat->term_id, 'ag_gall_categories', true, $sitepress->get_default_language());\n }\n else {$term_id = $cat->term_id;}\n \n echo '<option value=\"'.$term_id.'\">'.$cat->name.'</option>';\n }\n ?>\n </select>\n </td>\n </tr>\n <tr>\n <td style=\"padding-bottom: 0 !important;\">\n <div>\n <label style=\"width: 145px;\"><?php _e(\"Select galleries\", 'ag_ml'); ?></label>\n <input type=\"text\" name=\"ag_coll_gall_search\" id=\"ag_coll_gall_search\" style=\"width: 314px; padding-right: 28px;\" placeholder=\"<?php _e('search galleries', 'ag_ml') ?>\" autocomplete=\"off\" />\n \n <i class=\"ag_cgs_mag\" title=\"<?php _e('search', 'ag_ml') ?>\"></i>\n <i class=\"ag_cgs_del\" title=\"<?php _e('cancel', 'ag_ml') ?>\"></i>\n \n <a href=\"javascript:void(0)\" class=\"ag_cgs_show_all\">(<?php _e('expand', 'ag_ml') ?>)</a>\n </div>\n \n <ul id=\"ag_coll_gall_picker\">\n <?php \n $post_list = ag_cat_galleries_code('all'); \n \n if(!$post_list) {echo '<span>'. __('No galleries found', 'ag_ml') .' ..</span>';}\n else {echo $post_list;}\n ?>\n </ul>\n </td>\n </tr>\n </table> \n <div> \n </div>\n\t</div>\n </div>\n </div>\n \n <div class=\"postbox\" style=\"min-width: 630px;\">\n <h3 class=\"hndle\"><?php _e(\"Collection Builder\", 'ag_ml'); ?></h3>\n <div class=\"inside\">\n \n\t\t<div id=\"visual_builder_wrap\">\n \n\t\t<table id=\"ag_coll_builder\">\n <?php\n $coll_data = get_term($coll_id, 'ag_collections');\n\t\t $coll_composition = unserialize($coll_data->description);\n\t\t $coll_galleries = $coll_composition['galleries'];\n\t\t \n if(is_array( $coll_galleries) && count( $coll_galleries) > 0) {\n\t\t\t\n\t\t\t$a = 0; \n foreach( $coll_galleries as $gdata) {\n\t\t\t $gid = $gdata['id'];\n\t\t\t $gall_img = ag_get_gall_first_img($gid);\t\n\t\t\t\t\n\t\t\t if(get_post_status($gid) == 'publish' && $gall_img) {\n\n\t\t\t\t $rand_check \t= (isset($gdata['rand']) && $gdata['rand'] != 0) ? 'checked=\"checked\"' : '';\n\t\t\t\t $wmark_check \t= (isset($gdata['wmark']) && $gdata['wmark'] != 0) ? 'checked=\"checked\"' : ''; \n\t\t\t\t $filter_check\t= (isset($gdata['filters']) && $gdata['filters'] != 0) ? 'checked=\"checked\"' : ''; \n\t\t\t\t \t\n\t\t\t\t $link_subj \t= (isset($gdata['link_subj'])) ? $gdata['link_subj'] : 'none'; \n\t\t\t\t $link_val \t= (isset($gdata['link_val'])) ? $gdata['link_val'] : '';\n\t\t\t\t $descr \t\t= (isset($gdata['descr'])) ? $gdata['descr'] : ''; \n\t\t\t\t \n\t\t\t\t // custom image\n\t\t\t\t if(isset($gdata['cust_img']) && $gdata['cust_img']) {\n\t\t\t\t\t$cust_img = ag_thumb_src($gdata['cust_img'], 500, 500, 70);\n\t\t\t\t\t$cust_img_id = $gdata['cust_img'];\n\t\t\t\t\t$ci_icon_sel_class = 'ag_coll_cust_img_sel'; \n\t\t\t\t } \n\t\t\t\t else {\n\t\t\t\t\t$cust_img = '';\n\t\t\t\t\t$cust_img_id = '';\n\t\t\t\t\t$ci_icon_sel_class = ''; \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t $orig_thumb = ag_thumb_src($gall_img, 500, 500, 70);\n\t\t\t\t $thumb_to_use = (empty($cust_img)) ? $orig_thumb : $cust_img;\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t // categories\n\t\t\t\t $gall_cats = ag_gallery_cats($gid, 'list', ', ');\n\t\t\t\t $gall_cats = (empty($gall_cats)) ? '<em>'. __('No associated categories', 'ag_ml') .' ..</em>' : '<em class=\"dashicons dashicons-tag\" title=\"'. esc_attr(__('Categories', 'ag_ml')) .'\" style=\"padding-right: 3px; font-size: 16px; line-height: 23px;\"></em> '.$gall_cats;\n\n\t\t\t\t echo '\n\t\t\t\t <tr class=\"coll_component\" id=\"ag_coll_'.$gid.'\">\n\t\t\t\t\t<td class=\"ag_coll_gall_imgbox\" style=\"width: 230px; vertical-align: top; background-image: url('. $thumb_to_use .');\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"lcwp_del_row ag_del_gall\"></div>\n\t\t\t\t\t\t<div class=\"lcwp_move_row\"></div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"ag_coll_cust_img_btn '. $ci_icon_sel_class .'\" title=\"'. esc_attr(__('Manage custom main image', 'ag_ml')) .'\">\n\t\t\t\t\t\t\t<i class=\"fa fa-camera\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"ag_coll_cust_img\" value=\"'. $cust_img_id .'\" class=\"ag_coll_cust_img\" />\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"ag_coll_del_cust_img_btn\" title=\"'. esc_attr(__('Remove custom main image', 'ag_ml')) .'\" orig-img=\"'. $orig_thumb .'\">\n\t\t\t\t\t\t\t\t<i class=\"fa fa-camera\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"ag_coll_gall_cats\">\n\t\t\t\t\t\t\t<span>'. $gall_cats .'</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class=\"ag_coll_gall_inner\" style=\"vertical-align: top;\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<h2>\n\t\t\t\t\t\t\t\t<a href=\"'.get_admin_url().'post.php?post='.$gid.'&action=edit\" target=\"_blank\" title=\"'. __('edit gallery', 'ag_ml').'\">'.get_the_title($gid).'</a>\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div style=\"width: 12.3%; margin-right: 4%;\">\n\t\t\t\t\t\t\t\t<p>'.__('Random display?', 'ag_ml').'</p>\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"random\" class=\"ip-checkbox\" value=\"1\" '.$rand_check.' />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style=\"width: 12.3%; margin-right: 4%;\">\n\t\t\t\t\t\t\t\t<p>'.__('Use tags filter?', 'ag_ml').'</p>\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"tags_filter\" class=\"ip-checkbox\" value=\"1\" '.$filter_check.' />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style=\"width: 12.3%; margin-right: 4%;\">\n\t\t\t\t\t\t\t\t<p>'.__('Use watermark?', 'ag_ml').'</p>\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"watermark\" class=\"ip-checkbox\" value=\"1\" '.$wmark_check.' />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style=\"width: 50%;\">\n\t\t\t\t\t\t\t\t<p>'.__('Image link', 'ag_ml').'</p>\n\t\t\t\t\t\t\t\t<select name=\"ag_linking_dd\" class=\"ag_linking_dd\">\n\t\t\t\t\t\t\t\t\t<option value=\"none\">'. __('No link', 'ag_ml') .'</option>\n\t\t\t\t\t\t\t\t\t<option value=\"page\" '; if($link_subj == 'page') {echo 'selected=\"selected\"';} echo '>'. __('To a page', 'ag_ml') .'</option>\n\t\t\t\t\t\t\t\t\t<option value=\"custom\" '; if($link_subj == 'custom') {echo 'selected=\"selected\"';} echo '>'. __('Custom link', 'ag_ml') .'</option>\n\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t<div class=\"ag_link_wrap\">'. ag_link_field($link_subj, $link_val) .'</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<textarea name=\"coll_descr\" class=\"coll_descr\" placeholder=\"'. esc_attr(__('Gallery description - supports %IMG-NUM% placeholder', 'ag_ml')) .'\">'.$descr.'</textarea>\n\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t ';\n\t\t\t }\n\t\t\t $a++;\n }\n }\n\t\t else {echo '<tr><td colspan=\"5\"><p>'.__('No selected galleries', 'ag_ml').' ..</p></td></tr>';}\n ?>\n\n </table>\n </div> \n \n\t</div>\n </div>\n </div>\n\t<?php\n\tdie();\n}", "function categoryImage($catId)\n\t{\t\t\n\t\t\n\t\t$table=\"productimages\";\n\t\t$fields=\"*\";\n\t\t$id='*';\n\t\t$key = array(\"productId\"=>0,\"approved\" => 1, \"isCategory\"=>1,\"categoryId\"=>$catId);\n\t\t$fetchUser = $this->get_record_by_ID($table,$key,$id,$fields);\n\t\tif(count($fetchUser)>0)\n\t\t{\n\t\t\treturn $fetchUser;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fetchUser[0]['image640By480']= \"../images/default.gif\";\n\t\t\t$fetchUser[0]['image640by480Height']= 480;\n $fetchUser[0]['image640by480Width'] = 640;\n\t\t\t$fetchUser[0]['image400by300'] =\"../images/default.gif\";;\n $fetchUser[0]['image400by300Height'] = 300;\n $fetchUser[0]['image400by300Width'] = 400;\n $fetchUser[0]['image100by80'] = \"../images/default_100_75.gif\";\n $fetchUser[0]['image100by80Height'] = 75;\n $fetchUser[0]['image100by80Width'] = 100;\n\t\t\treturn $fetchUser;\n\t\t}\n\t}", "protected function _loadPictureForm() {\n\t\tCgn::loadLibrary('Form::lib_cgn_form');\n\t\tCgn::loadLibrary('Html_widgets::lib_cgn_widget');\n\t\t$f = new Cgn_Form('form_upload_profile_pic', '', 'POST', 'multipart/form-data');\n\t\t$f->width = '40em';\n\t\t$f->formHeader = 'Select an image file on your computer (4MB max)';\n\n\t\t$f->layout = new Cgn_Form_Layout_Dl();\n\n\t\t$f->action = cgn_sappurl('account', 'img', 'save');\n\n\t\t$f->appendElement(new Cgn_Form_ElementFile('pic', ''));\n\n\t\treturn $f;\n\t}", "public function getChildSelectorName();", "public function getSelectorHolder()\n {\n return \"$(\\\".step-button-wrapper[data-for='{$this->Name}']\\\")\";\n }", "function getCategory() {\n\t\treturn $this->node->firstChild->toString();\n\t}", "function &getByName( $name )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n $topic = new eZImageCategory();\r\n\r\n if ( $name != \"\" )\r\n {\r\n $db->array_query( $author_array, \"SELECT ID, Name FROM eZImageCatalogue_Category WHERE Name='$name'\" );\r\n\r\n if ( count( $author_array ) == 1 )\r\n {\r\n $topic = new eZImageCategory( $author_array[0][$db->fieldName( \"ID\" )] );\r\n }\r\n }\r\n\r\n return $topic;\r\n }", "protected function get_display_category()\n\t{\n\t\t$image = ATTACHMENT_CATEGORY_IMAGE;\n\t\t$none = ATTACHMENT_CATEGORY_NONE;\n\t\t$thumb = ATTACHMENT_CATEGORY_THUMB;\n\n\t\t$display_cat = (strpos($this->get('mimetype'), 'image') === 0) ? $image : $none;\n\n\t\tif ($display_cat == $image)\n\t\t{\n\t\t\tif ($this->get('thumbnail'))\n\t\t\t{\n\t\t\t\t$display_cat = $thumb;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($this->config['img_display_inlined'])\n\t\t\t\t{\n\t\t\t\t\tif ($this->config['img_link_width'] || $this->config['img_link_height'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$dimension = @getimagesize($this->get_filepath());\n\n\t\t\t\t\t\t// If the dimensions could not be determined or the image being 0x0 we display it as a link for safety purposes\n\t\t\t\t\t\tif ($dimension === false || empty($dimension[0]) || empty($dimension[1]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$display_cat = $none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$display_cat = ($dimension[0] <= $this->config['img_link_width'] && $dimension[1] <= $this->config['img_link_height']) ? $image : $none;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$display_cat = $none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Make some decisions based on user options being set.\n\t\tif (($display_cat == $image || $display_cat == $thumb) && !$this->user->optionget('viewimg'))\n\t\t{\n\t\t\t$display_cat = $none;\n\t\t}\n\t\treturn $display_cat;\n\t}", "protected function getCategoryButton() {\n\t\treturn [\n\t\t\t'attributes' => [\n\t\t\t\t'href' => '#/categories',\n\t\t\t\t// add hidden class (the overlay works only, when JS is enabled (class will\n\t\t\t\t// be removed in categories/init.js)\n\t\t\t\t'class' => 'category-button hidden',\n\t\t\t],\n\t\t\t'label' => $this->msg( 'categories' )->text()\n\t\t];\n\t}", "public function getSelectorName();", "public function output_category_widget() {\n\n\t\t$categories = get_terms( 'product_cat', array( 'orderby' => 'name' ) );\n\t\t?>\n\t\t<form method=\"GET\">\n\t\t\t<div>\n\t\t\t\t<select multiple=\"multiple\" data-placeholder=\"<?php _e( 'Select categories&hellip;', 'woocommerce-cost-of-goods' ); ?>\" class=\"wc-enhanced-select\" id=\"category_ids\" name=\"category_ids[]\" style=\"width: 205px;\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$r = array();\n\t\t\t\t\t$r['pad_counts'] = 1;\n\t\t\t\t\t$r['hierarchical'] = 1;\n\t\t\t\t\t$r['hide_empty'] = 1;\n\t\t\t\t\t$r['value'] = 'id';\n\t\t\t\t\t$r['selected'] = $this->category_ids;\n\n\t\t\t\t\tinclude_once( WC()->plugin_path() . '/includes/walkers/class-product-cat-dropdown-walker.php' );\n\n\t\t\t\t\techo wc_walk_category_dropdown_tree( $categories, 0, $r );\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t\t<a href=\"#\" class=\"select_none\"><?php esc_html_e( 'None', 'woocommerce-cost-of-goods' ); ?></a>\n\t\t\t\t<a href=\"#\" class=\"select_all\"><?php esc_html_e( 'All', 'woocommerce-cost-of-goods' ); ?></a>\n\t\t\t\t<input type=\"submit\" class=\"submit button\" value=\"<?php esc_attr_e( 'Show', 'woocommerce-cost-of-goods' ); ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"range\" value=\"<?php if ( ! empty( $_GET['range'] ) ) echo esc_attr( $_GET['range'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"start_date\" value=\"<?php if ( ! empty( $_GET['start_date'] ) ) echo esc_attr( $_GET['start_date'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"end_date\" value=\"<?php if ( ! empty( $_GET['end_date'] ) ) echo esc_attr( $_GET['end_date'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"page\" value=\"<?php if ( ! empty( $_GET['page'] ) ) echo esc_attr( $_GET['page'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"tab\" value=\"<?php if ( ! empty( $_GET['tab'] ) ) echo esc_attr( $_GET['tab'] ) ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"report\" value=\"<?php if ( ! empty( $_GET['report'] ) ) echo esc_attr( $_GET['report'] ) ?>\" />\n\t\t\t</div>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tjQuery( function() {\n\t\t\t\t\t// select all\n\t\t\t\t\tjQuery( '.chart-widget' ).on( 'click', '.select_all', function() {\n\t\t\t\t\t\tjQuery(this).closest( 'div' ).find( 'select option' ).attr( \"selected\", \"selected\" );\n\t\t\t\t\t\tjQuery(this).closest( 'div' ).find('select').change();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} );\n\n\t\t\t\t\t// select none\n\t\t\t\t\tjQuery( '.chart-widget').on( 'click', '.select_none', function() {\n\t\t\t\t\t\tjQuery(this).closest( 'div' ).find( 'select option' ).removeAttr( \"selected\" );\n\t\t\t\t\t\tjQuery(this).closest( 'div' ).find('select').change();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t</script>\n\t\t</form>\n\t\t<?php\n\t}", "function get_gallery_article($thisPost){\n $id = $thisPost->ID;\n $title = $thisPost->post_title;\n $image = get_the_post_thumbnail_url($id)?get_the_post_thumbnail_url($id):DF_IMAGE. '/noimage.png';\n $link = get_permalink($id);\n // $terms = get_the_terms( $post->ID, 'publication_category' );\n $data_taxaonomy = get_the_terms($id, 'categories-gallery');\n ?>\n <div class=\"gallery--cont-image\" data-post_id = \"<?php echo $id;?>\" data-slug = \"<?php echo $data_taxaonomy[0]->slug; ?>\">\n <div class=\"background--hidden\"></div>\n <?php \n $data_taxaonomy = get_the_terms($thisPost, 'categories-gallery');\n if(check_taxaonomy($data_taxaonomy) == true):\n ?>\n <div class=\"background-360\">\n <div class=\"content-group\">\n <div class=\"cont-icon\"><img src=\"<?php echo DF_IMAGE.'/icon-3d.png';?>\" alt=\"icon-3d\" /></div>\n <div class=\"cont-text\">EXPLORE 3D SPACE</div>\n </div>\n </div>\n <?php\n endif;\n ?>\n <a href=\"<?php echo $link;?>\">\n <img src=\"<?php echo $image;?>\" alt=\"image-work-page\"/>\n </a>\n </div>\n <?php\n}", "public function getCategoryImageUrlAttribute()\n {\n if (!$this->has_image) return null;\n return asset($this->imageDirectory . '/' . $this->categoryImageFileName);\n }", "public function getComboKindCategory()\n {\n $querystr = <<<EOQUERY\n SELECT * FROM askme_kind_category a\n ORDER BY a.`desc` LIMIT 0,10\nEOQUERY;\n\n $results = $this->c->query($querystr);\n if ($results === FALSE)\n return \"\";\n\n $ret = '<select class=\"gradient_combo\" id=\"id_kind_category\" '.\n 'style=\"margin-right: 10px; width: '.$this->width.'px;\">';\n $ret .= \"<option value='0'>\";\n $ret .= $this->first_element;\n $ret .= \"</option>\";\n\n while (($row = $results->fetch_assoc()) !== NULL)\n {\n $ret .= \"<option value='{$row['id_kind_category']}'>\";\n $ret .= $row['desc'];\n $ret .= \"</option>\";\n }\n\n $ret .= \"</select>\";\n\n $results->close();\n\n return $ret;\n\n }", "function ag_cat_galleries_code($fnc_cat = false) {\t\n\tinclude_once(AG_DIR . '/functions.php');\n\t$cat = $fnc_cat;\n\t$code = '';\n\t\n\t// if is not called directly\n\tif(!$cat) {\n\t\tif(!isset($_POST['gallery_cat'])) {die('missing data');}\n\t\t$cat = $_POST['gallery_cat'];\n\t}\n\n\t$post_list = ag_cat_galleries($cat);\t\n\tif(!$post_list) {return false;}\n\t\n\tforeach($post_list as $post) {\n\t\t$code .= '\n\t\t<li style=\"background-image: url('.ag_thumb_src($post['img'], 200, 170, 70).');\" rel=\"'.$post['id'].'\" title=\"'. __('add to collection', 'ag_ml') .'\" ag-cats=\"'.$post['cats'].'\" ag-img=\"'.ag_thumb_src($post['img'], 500, 500, 70).'\">\n\t\t\t<div title=\"'.$post['title'].'\">'.$post['title'].'</div>\n\t\t</li>';\n\t}\n\n\t\n\tif($fnc_cat == false) {die( $code );}\n\telse {return $code;}\n}", "public function bamobile_taxonomy_field($template, $taxonomy){\r\n $params = array(\r\n 'label' => array(\r\n 'image' => __('Mobile App Images'),\r\n 'upload_image' => __('Upload/Edit Image'),\r\n 'remove_image' => __('Remove image'),\r\n 'note' => __('* This picture only work on Mobile App')\r\n ),\r\n 'mobiconnector_attachment' => null\r\n );\r\n\r\n\r\n if (isset($taxonomy->term_id) && $this->bamobile_has_image($taxonomy->term_id)) {\r\n $image = self::bamobile_get_category_image(array(\r\n 'term_id' => $taxonomy->term_id\r\n ), true);\r\n \r\n $attachment_id = $this->bamobile_get_attachment_id($taxonomy->term_id);\r\n\r\n $params = array_replace_recursive($params, array(\r\n 'mobiconnector_category_avatar' => $image,\r\n 'mobiconnector_attachment' => $attachment_id,\r\n ));\r\n }\r\n\r\n return bamobile_mobiconnector_get_category_template($template, $params, false);\r\n }", "public function getSelectorName() {}", "public function getSelectorName() {}", "public function getSelectorName() {}", "public function getSelectorName() {}", "protected function getSelectorName() {}", "function template_preprocess_excur_service_category(&$vars) {\n $city = menu_get_object('taxonomy_term', 2);\n $vars['city'] = $city->name;\n\n $vocabulary = taxonomy_vocabulary_machine_name_load('category');\n foreach (taxonomy_get_tree($vocabulary->vid, 0, NULL, TRUE) as $key => $term) {\n $vars['categories'][$key]['name'] = $term->name;\n $vars['categories'][$key]['id'] = $term->tid;\n $vars['categories'][$key]['icon'] = theme('image_style', array(\n 'style_name' => '50x50',\n 'path' => $term->field_image[LANGUAGE_NONE][0]['uri'],\n 'alt' => $term->name,\n 'title' => $term->name,\n 'attributes' => array(\n 'class' => array('categoty-icon'),\n ),\n ));\n }\n}", "public function categoryForm(){\n $table = \"categories\";\n $cresults = $this->getAllrecords($table);\n foreach($cresults as $category){\n echo('<option value=\"'.$category[\"cat_id\"].'\">'.$category[\"cat_name\"].'</option>');\n }\n\n\n }", "public function getArticleSelector() {\n $result = '';\n if ($this->data['wiki_page'] > 0) {\n $result .= sprintf(\n '<article-select href=\"%s\">',\n $this->getWebLink($this->data['wiki_page'])\n );\n $result .= sprintf('<hidden param=\"%s[mode]\"/>', $this->paramName);\n $result .= sprintf(\n '<field param=\"%s[article_field]\" caption=\"%s\" />',\n $this->paramName,\n papaya_strings::escapeHTMLChars($this->data['caption_article'])\n );\n $result .= sprintf(\n '<button caption=\"%s\" />',\n papaya_strings::escapeHTMLChars($this->data['caption_go'])\n );\n $result .= '</article-select>';\n }\n return $result;\n }", "public function chooseCategory(){\n $req = $this->db->query('SELECT * FROM p5_files_category');\n $req->setFetchMode(\\PDO::FETCH_CLASS | \\PDO::FETCH_PROPS_LATE, \n 'taekwondo\\model\\Category');\n return $req;\n }", "public function getCategoriesGroup() {\n\t\t$imageTypes = $this->getImagesTypes();\n\t\t$categories = $this->getCollection()\n\t\t\t\t->addFieldToFilter('status',1);\n\t\t$arrayOptions = array();\n\t\t$i = 1;\n\t\tforeach($imageTypes as $key => $imageType)\n\t\t{\n\t\t\tif($key == 'uncategorized')\n\t\t\t{\n\t\t\t\t$arrayOptions[0] = 'Uncategorized';\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$arrayValue = array();\n\t\t\tforeach($categories as $category)\n\t\t\t{\n\t\t\t\tif($category->getImageTypes() == $key)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$arrayValue[] = array('value'=>$category->getId(),'label'=>$category->getTitle());\n\t\t\t\t}\n\t\t\t}\n\t\t\t$arrayOptions[$i]['value'] = $arrayValue;\n\t\t\t$arrayOptions[$i]['label'] = $imageType;\n\t\t\t$i++;\n\t\t}\n\t\treturn $arrayOptions;\n\t}", "public function getProductDefaultConfig() {\n //Selected Image Categories\n $categories = array();\n $imageCategories = $this->artworkcateFactory->create()->getArtworkCateCollection();\n if($imageCategories->count()) {\n foreach($imageCategories as $_category) {\n $categories[$_category->getId()] = array('position' => $_category->getPosition());\n } \n }\n return array(\n 'selected_image' => json_encode($categories),\n );\n }", "public function getOptionImage()\n {\n return $this->optionImage;\n }", "function ciniki_recipes_web_categories($ciniki, $settings, $tnid) {\n\n $strsql = \"SELECT DISTINCT category AS name \"\n . \"FROM ciniki_recipes \"\n . \"WHERE ciniki_recipes.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND (ciniki_recipes.webflags&0x01) = 1 \"\n . \"AND category <> '' \"\n . \"ORDER BY category \"\n . \"\";\n \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryTree');\n $rc = ciniki_core_dbHashQueryTree($ciniki, $strsql, 'ciniki.recipes', array(\n array('container'=>'categories', 'fname'=>'name', 'name'=>'category',\n 'fields'=>array('name')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['categories']) ) {\n return array('stat'=>'ok');\n }\n $categories = $rc['categories'];\n\n //\n // Load highlight images\n //\n foreach($categories as $cnum => $cat) {\n //\n // Look for the highlight image, or the most recently added image\n //\n $strsql = \"SELECT ciniki_recipes.primary_image_id, ciniki_images.image \"\n . \"FROM ciniki_recipes, ciniki_images \"\n . \"WHERE ciniki_recipes.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND category = '\" . ciniki_core_dbQuote($ciniki, $cat['category']['name']) . \"' \"\n . \"AND ciniki_recipes.primary_image_id = ciniki_images.id \"\n . \"AND (ciniki_recipes.webflags&0x01) = 1 \"\n . \"ORDER BY (ciniki_recipes.webflags&0x10) DESC, \"\n . \"ciniki_recipes.date_added DESC \"\n . \"LIMIT 1\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.recipes', 'image');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['image']) ) {\n $categories[$cnum]['category']['image_id'] = $rc['image']['primary_image_id'];\n } else {\n $categories[$cnum]['category']['image_id'] = 0;\n }\n }\n\n return array('stat'=>'ok', 'categories'=>$categories); \n}", "function getSelector1Name() ;", "function setup_cat()\n {\n $this->ipsclass->DB->simple_construct( array( \"select\" => 'perms_view, def_view, id, name', 'from' => 'gallery_categories', 'where' => \"id={$this->ipsclass->input['cat']}\" ) );\n $this->ipsclass->DB->simple_exec(); \n $cat = $this->ipsclass->DB->fetch_row();\n\n // Are we allowed to view this category?\n if( ! $this->ipsclass->check_perms( $cat['perms_view'] ) )\n {\n $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); \n }\n\n return $cat;\n }", "public function getTinyCropImage()\n {\n return $this->getFilterImage(TinyCrop::identifier());\n }", "function _arc_meta_category_meta($event, $step, $data, $rs)\n{\n // category types).\n if ($rs['type']!='article') {\n return $data;\n }\n\n // Get the existing meta data for this category.\n $meta = _arc_meta('category', $rs['name'], true);\n\n $form = hInput('arc_meta_id', $meta['id']);\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_title\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_title'), 'label', ' for=\"arc_meta_title\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . fInput('text', 'arc_meta_title', $meta['title'], '', '', '', '32', '', 'arc_meta_title') . '</div>';\n $form .= '</div>';\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_image\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_image'), 'label', ' for=\"arc_meta_image\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . fInput('number', 'arc_meta_image', $meta['image'], '', '', '', '32', '', 'arc_meta_image') . '</div>';\n $form .= '</div>';\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_robots\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_robots'), 'label', ' for=\"arc_meta_description\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . selectInput('arc_meta_robots', _arc_meta_robots(), $meta['robots'], 'arc_meta_robots') . '</div>';\n $form .= '</div>';\n\n return $data . $form;\n}", "public static function category_box() {\n\t\t\t\n\t\t\tglobal $post;\n\t\t\tglobal $wpdb;\n\t\n\t\t\t$cat_list = $wpdb->get_results( \"SELECT re_int, re_title FROM \".$wpdb->prefix.self::$table_name);?>\n\t\t\t\n\t\t\t<label for=\"siteurl\">Select the appropriate Menu Category for this current dish.<br /></label>\n\t\t\t<p>\n\t\t\t\n\t\t\t\t<?php\n\t\t\t\t\tif(!empty($cat_list)){\n\t\t\t\t\t\techo \"<select style='width:200px' name='cat_id'>\";\n\t\t\t\t\t\tforeach($cat_list as $list => $val){\n\t\t\t\t\t\t\t$sel = \"\";\n\t\t\t\t\t\t\tif(isset($_GET['menucat']) && ($_GET['menucat'] == $val->re_int )) { \n\t\t\t\t\t\t\t\t$sel = ' selected=\"selected\"'; \n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$menucat = get_post_meta($post->ID, \"meta_menucat\", true);\n\t\t\t\t\t\t\t\tif($menucat == $val->re_int ) { $sel = ' selected=\"selected\"';} \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo \"<option value='\".$val->re_int.\"' \".$sel.\">\".$val->re_title.\"</option>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"</select>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<a href='edit.php?post_type=menucategory-post&page=menu_listings'>Add Categories First.</a>\";\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t</p>\n\t\t\n\t\t\t<?php\n\t\t}", "function PricerrTheme_category_images()\n{\n $id_icon = 'icon-options-general-img';\n $ttl_of_stuff = 'PricerrTheme - ' . __('Category Images', 'PricerrTheme');\n global $menu_admin_PricerrTheme_theme_bull;\n\n //------------------------------------------------------\n\n $arr = array(\"yes\" => __(\"Yes\", 'PricerrTheme'), \"no\" => __(\"No\", 'PricerrTheme'));\n\n echo '<div class=\"wrap\">';\n echo '<div class=\"icon32\" id=\"' . $id_icon . '\"><br/></div>';\n echo '<h2 class=\"my_title_class_sitemile\">' . $ttl_of_stuff . '</h2>';\n\n ?>\n\n<?php\n\nif (isset($_POST['set_category_image'])) {\n $category_id = $_POST['category_id'];\n $category_image = $_POST['category_image'];\n\n if (!empty($_FILES['category_image']['name'])):\n\n $upload_overrides = array('test_form' => false);\n $uploaded_file = wp_handle_upload($_FILES['category_image'], $upload_overrides);\n\n $file_name_and_location = $uploaded_file['file'];\n $file_title_for_media_library = $_FILES['category_image']['name'];\n\n $arr_file_type = wp_check_filetype(basename($_FILES['category_image']['name']));\n $uploaded_file_type = $arr_file_type['type'];\n\n if ($uploaded_file_type == \"image/png\" or $uploaded_file_type == \"image/jpg\" or $uploaded_file_type == \"image/jpeg\" or $uploaded_file_type == \"image/gif\") {\n\n $attachment = array(\n 'post_mime_type' => $uploaded_file_type,\n 'post_title' => addslashes($file_title_for_media_library),\n 'post_content' => '',\n 'post_status' => 'inherit',\n 'post_parent' => 0,\n\n 'post_author' => $cid,\n );\n\n $attach_id = wp_insert_attachment($attachment, $file_name_and_location, 0);\n $attach_data = wp_generate_attachment_metadata($attach_id, $file_name_and_location);\n wp_update_attachment_metadata($attach_id, $attach_data);\n\n update_post_meta($attach_id, 'category_image', $category_id);\n\n }\n\n echo '<div class=\"saved_thing\">' . __('Image attached. Done.', 'PricerrTheme') . '</div>';\n\n else:\n\n\n echo '<div class=\"saved_thing\">' . __('Please select an image.', 'PricerrTheme') . '</div>';\n\n endif;\n\n}\n\n?>\n\n <style>\n\n .crme_brullet {\n padding: 2px;\n background: white;\n border: 1px solid #ccc;\n }\n\n </style>\n\n\n <script type=\"text/javascript\">\n\n function delete_this_my_pic(id) {\n jQuery.ajax({\n method: 'get',\n url: '<?php echo get_bloginfo('siteurl');?>/index.php?_ad_delete_pid=' + id,\n dataType: 'text',\n success: function (text) {\n window.location.reload();\n\n return false;\n }\n });\n //alert(\"a\");\n\n return false;\n\n }\n\n </script>\n\n\n<div id=\"usual2\" class=\"usual\">\n <ul>\n <li><a href=\"#tabs1\"><?php _e('Set Images', 'PricerrTheme'); ?></a></li>\n </ul>\n\n <div id=\"tabs1\">\n <?php\n\n $categories = get_terms('job_cat', array(\n 'parent' => '0',\n 'hide_empty' => 0\n ));\n if (count($categories) > 0) {\n ?>\n\n <table class=\"sitemile-table\" width=\"650\">\n <tr>\n <td><strong><?php echo __('Category Name', 'PricerrTheme') ?></strong></td>\n <td><strong><?php echo __('Upload Picture', 'PricerrTheme') ?></strong></td>\n <td><strong><?php echo __('Current Picture', 'PricerrTheme') ?></strong></td>\n </tr>\n\n\n <?php\n foreach ($categories as $cat) {\n\n $PricerrTheme_get_cat_pic_attached = PricerrTheme_get_cat_pic_attached($cat->term_id);\n\n ?>\n\n <form method=\"post\" enctype=\"multipart/form-data\">\n <input type=\"hidden\" value=\"<?php echo $cat->term_id ?>\" name=\"category_id\"/>\n <tr>\n <td><?php echo $cat->name ?></td>\n <td><?php if ($PricerrTheme_get_cat_pic_attached == false): ?>\n\n <input type=\"file\" name=\"category_image\" size=\"20\"/>\n\n <?php else: ?>\n <?php _e('Picture attached already.', 'PricerrTheme'); ?>\n <?php endif; ?>\n </td>\n <td>\n\n <?php if ($PricerrTheme_get_cat_pic_attached == false): ?>\n\n <input type=\"submit\" name=\"set_category_image\" size=\"20\" value=\"<?php _e('Upload Image', 'PricerrTheme'); ?>\"/>\n\n <?php else: ?>\n\n <img src=\"<?php echo PricerrTheme_generate_thumb2($PricerrTheme_get_cat_pic_attached, 40, 40); ?>\" width=\"40\" height=\"40\" class=\"crme_brullet\"/>\n <a href=\"\" onclick=\"return delete_this_my_pic('<?php echo $PricerrTheme_get_cat_pic_attached ?>')\">\n <img src=\"<?php bloginfo('template_url') ?>/images/delete.gif\" border=\"0\"/>\n </a>\n <?php endif; ?>\n\n </td>\n </tr>\n </form>\n\n <?php } ?>\n\n </table>\n <?php } ?>\n\n </div>\n\n <?php\n\n echo '</div>';\n\n}", "function surgeon_add_checkbox_image_field($post, $product_addons, $loop, $option) {\n wp_enqueue_media();\n ob_start();\n ?>\n <td class=\"checkbox_column\">\n <input type=\"hidden\" name=\"product_addon_option_image[<?php echo $loop; ?>][]\" value=\"<?php echo esc_attr( $option['image'] ); ?>\" class=\"image_attachment_id\" />\n <?php if (is_numeric($option['image'])) { \n $image_src = wp_get_attachment_image_src($option['image']);\n ?>\n <img class=\"image-preview\" src=\"<?php echo $image_src[0]; ?>\" width=\"60\" height=\"60\" style=\"max-height: 60px; width: 60px;\">\n <?php } ?>\n <input type=\"button\" class=\"button upload_image_button\" value=\"<?php _e( 'Upload image' ); ?>\" />\n </td>\n <?php\n $output = ob_get_clean();\n echo $output;\n\n}", "public function getChildSelectorName() {}", "private function getCategory()\n {\n $catobj = (object)Array();\n $catobj->preview = $this->getFilePath('preview');\n $catobj->category = $this->category_number;\n $catobj->html = $this->getContent();\n $catobj->googleFonts = [];\n $catobj->contentCss = $this->getFilePath('relative_css');\n $catobj->contentClass = $this->getCSSClass($this->getFilePath('css'));\n return $catobj;\n }", "function colorpicker_field_edit_category( $term ) { \r\n\t$color = get_term_meta( $term->term_id, '_category_color', true ); \r\n\t$color = ( ! empty( $color ) ) ? \"#{$color}\" : '#ffffff'; ?> \r\n\t<tr class=\"form-field term-colorpicker-wrap\"> \r\n\t<th scope=\"row\">\r\n\t<label for=\"term-colorpicker\">Select Color</label>\r\n\t</th> \r\n\t<td> \r\n\t<input name=\"_category_color\" value=\"<?php echo $color; ?>\" class=\"colorpicker\" id=\"term-colorpicker\" /> \r\n\t<p class=\"description\">This is the field description where you can tell the user how the color is used in the theme.</p> \r\n\t</td> \r\n\t</tr> <?php }", "public function testComDayCqWcmDesignimporterParserTaghandlersFactoryImageComponen()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.wcm.designimporter.parser.taghandlers.factory.ImageComponentTagHandlerFactory';\n\n $crawler = $client->request('POST', $path);\n }", "function getCategorySelection() {\n\t\tif($this->conf['hideCategorySelection'])\n return '';\n\n\t\t$this->getCategoryQuery();\n\n\t\t$select_fields = \t'tx_tdcalendar_categories.uid';\n\t\t$select_fields .=\t', tx_tdcalendar_categories.title';\n\t\t$select_fields .=\t', tx_tdcalendar_categories.color';\n\n\t\t$from_table =\t\t'tx_tdcalendar_categories';\n\n\t\t$where_clause = \t'1';\n\t\t$where_clause .= \t$this->enableFieldsCategories;\n\t\t$where_clause .= \t$this->getCategoryQuery();\n\n\t\t$where_clause .=\t$this->getPagesQuery('tx_tdcalendar_categories');\n\n\t\t$orderBy =\t\t\t'tx_tdcalendar_categories.uid';\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t$select_fields,\n\t\t\t$from_table,\n\t\t\t$where_clause,\n\t\t\t$groupBy='',\n\t\t\t$orderBy,\n\t\t\t$limit=''\n\t\t);\n\n\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res) <= 1)\n\t\t\treturn '';\n\n\t\t$vars['category'] = 0;\n\n\t\t$cats = array();\n\t\t$cats[$this->pi_linkTP_keepPIvars_url($vars, $this->caching)] = $this->pi_getLL('allCats');\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){\n\t\t\tif($this->conf['currCat']==$row['uid'])\n\t\t\t\t$sel=$row['title'];\n\t\t\t$vars['category']=$row['uid'];\n\t\t\t$cats[$this->pi_linkTP_keepPIvars_url($vars, $this->caching)] = $row['title'];\n }\n\n\t\treturn $this->selectInputOnChange('category', $cats, $sel ,\"document.location = '' + this.options[selectedIndex].value;\");\n\t}", "function getHomeCategoriesSelect()\n {\n return $this->getCategoryDropDown('frmDoSearch_Keyword_Category', 0, true);\n }", "public function getParentSelectorName() {}", "public function getViewedCategory();", "function CategoryForm() {\r\n\r\n\t\t$member = Member::currentUser();\r\n\r\n\t\t// Need to sort out how going to handle multiple instances of category\r\n\t\t// front end grid field : https://github.com/webbuilders-group/silverstripe-frontendgridfield\r\n\t\t// grid field extension : https://github.com/silverstripe-australia/silverstripe-gridfieldextensions\r\n\t\t$category = Category::get()->first();\r\n\t\t$fields = $category->FormFields();\r\n\r\n $actions = FieldList::create(\r\n FormAction::create(\"doCategoryForm\")->setTitle(\"Submit\")->addExtraClass('productive'),\r\n FormAction::create(\"cancel\")->setTitle(\"Cancel\")\r\n );\r\n\r\n $form = Form::create($this, 'CategoryForm', $fields, $actions);\r\n\r\n return $form;\r\n\r\n\t}", "public function getSelector()\n {\n return $this->Selector;\n }", "static function get_images_by_cat_id($post){\n\t\treturn self::$db->where('cat_id',$post)->get('stock')->row();\n\t}", "public function getParentSelectorName();", "public function getCategoryImageFileNameAttribute()\n {\n return $this->id . '-image.png';\n }", "protected\n\tfunction getOptions()\n\t{\n\n\t\t// Initialize variables.\n\t\t$session = Factory::getSession();\n\t\t$options = array();\n\n\t\t// Initialize some field attributes.\n\t\t$extension = $this->element['extension'] ? (string) $this->element['extension'] : (string) $this->element['scope'];\n\t\t$published = (string) $this->element['published'];\n\n\t\t// OLD values\n\t\t// Load the category options for a given extension.\n\t\tif (!empty($extension))\n\t\t{\n\n\t\t\t// Filter over published state or not depending upon if it is present.\n\t\t\tif ($published)\n\t\t\t{\n\t\t\t\t$options = HTMLHelper::_('category.options', $extension, array('filter.published' => explode(',', $published)));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$options = HTMLHelper::_('category.options', $extension);\n\t\t\t}\n\n\t\t\t// Verify permissions. If the action attribute is set, then we scan the options.\n\t\t\tif ($action = (string) $this->element['action'])\n\t\t\t{\n\n\t\t\t\t// Get the current user object.\n\t\t\t\t$user = Factory::getUser();\n\n\t\t\t\t// TODO: Add a preload method to Access so that we can get all the asset rules in one query and cache them.\n\t\t\t\t// eg Access::preload('core.create', 'com_content.category')\n\t\t\t\tforeach ($options as $i => $option)\n\t\t\t\t{\n\t\t\t\t\t// Unset the option if the user isn't authorised for it.\n\t\t\t\t\tif (!$user->authorise($action, $extension . '.category.' . $option->value))\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($options[$i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFactory::getApplication()->enqueueMessage('500 - ' . Text::_('JLIB_FORM_ERROR_FIELDS_CATEGORY_ERROR_EXTENSION_EMPTY'), 'warning');\n\t\t}\n\n\t\t// if no value exists, try to load a selected filter category from the old category filters\n\t\tif (!$this->value && ($this->form instanceof Form))\n\t\t{\n\t\t\t$context = $this->form->getName();\n\t\t\t$this->value = array();\n\t\t\tfor ($i = 0; $i < 20; $i++)\n\t\t\t{\n\t\t\t\tif ($this->form->getValue(\"catid$i\", \"params\", 0))\n\t\t\t\t{\n\t\t\t\t\t$this->value[] = $this->form->getValue(\"catid$i\", \"params\", 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Merge any additional options in the XML definition.\n\t\t$options = array_merge(parent::getOptions(), $options);\n\n\t\treturn $options;\n\n\t}", "public function gallery_get_images_post()\n {\n $data['selected_id'] = $this->input->post('id', true);\n\n if ($data['selected_id'] == 0) {\n $data['images'] = $this->gallery_image_model->get_images();\n } else {\n $data['images'] = $this->gallery_image_model->get_images_by_category($data['selected_id']);\n }\n\n $data['categories'] = $this->gallery_category_model->get_categories();\n $this->load->view('blog/partials/_get_photos', $data);\n }", "public function getCategory()\n\t{\n\t\tglobal $jlistConfig;\n $options = '';\n \n if (!is_object($this->_item)) {\n\n\t\t\t$categories = JDCategories::getInstance('jdownloads', $options);\n\t\t\t$this->_item = $categories->get($this->getState('category.id', 'root'));\n\n\t\t\t// Compute selected asset permissions.\n\t\t\tif (is_object($this->_item)) {\n\t\t\t\t$user\t= JFactory::getUser();\n\t\t\t\t$userId\t= $user->get('id');\n\t\t\t\t$asset\t= 'com_jdownloads.category.'.$this->_item->id;\n\n\t\t\t\t// Check general create permission.\n\t\t\t\tif ($user->authorise('core.create', $asset)) {\n\t\t\t\t\t$this->_item->getParams()->set('access-create', true);\n\t\t\t\t}\n\n\t\t\t\t// TODO: Why aren't we lazy loading the children and siblings?\n\t\t\t\t$this->_children = $this->_item->getChildren();\n\t\t\t\t$this->_parent = false;\n\n\t\t\t\tif ($this->_item->getParent()) {\n\t\t\t\t\t$this->_parent = $this->_item->getParent();\n\t\t\t\t}\n\n\t\t\t\t$this->_rightsibling = $this->_item->getSibling();\n\t\t\t\t$this->_leftsibling = $this->_item->getSibling(false);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_children = false;\n\t\t\t\t$this->_parent = false;\n\t\t\t}\n \n if (count($this->_children)){\n for ($i = 0; $i < count($this->_children); $i++) { \n if(isset($this->_children[$i])){\n // Get the tags\n $this->_children[$i]->tags = new JHelperTags;\n $this->_children[$i]->tags->getItemTags('com_jdownloads.category', $this->_children[$i]->id);\n }\n }\n }\n\t\t}\n\n\t\treturn $this->_item;\n\t}", "function extra_category_fields( $tag ) {\n\n\t// Get term id\n\t$tag_id\t\t= $tag->term_id;\n\t$term_meta\t= get_option( \"category_$tag_id\");\n\n\t// Category Style\n\t$style = isset ( $term_meta['athen_term_style'] ) ? $term_meta['athen_term_style'] : '' ; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_style\"><?php _e( 'Style', 'athen_transl' ); ?></label></th>\n\t<td>\n\t\t<select name=\"term_meta[athen_term_style]\" id=\"term_meta[term_style]\">\n\t\t\t<option value=\"\" <?php selected( $style ); ?>><?php _e( 'Default', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"large-image\" <?php selected( $style, 'large-image' ); ?>><?php _e( 'Large Image', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"thumbnail\" <?php selected( $style, 'thumbnail' ); ?>><?php _e( 'Thumbnail', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"grid\" <?php selected( $style, 'grid' ); ?>><?php _e( 'Grid', 'athen_transl' ); ?></option>\n\t\t</select>\n\t</td>\n\t</tr>\n\t\n\t<?php\n\t// Grid Columns\n\t$grid_cols = isset ( $term_meta['athen_term_grid_cols'] ) ? $term_meta['athen_term_grid_cols'] : '' ; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_grid_cols\"><?php _e( 'Grid Columns', 'athen_transl' ); ?></label></th>\n\t<td>\n\t\t<select name=\"term_meta[athen_term_grid_cols]\" id=\"term_meta[athen_term_grid_cols]\">\n\t\t\t<option value=\"\" <?php selected( $grid_cols ); ?>><?php _e( 'Default', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"4\" <?php selected( $grid_cols, 4 ) ?>>4</option>\n\t\t\t<option value=\"3\" <?php selected( $grid_cols, 3 ) ?>>3</option>\n\t\t\t<option value=\"2\" <?php selected( $grid_cols, 2 ) ?>>2</option>\n\t\t\t<option value=\"1\" <?php selected( $grid_cols, 1 ) ?>>1</option>\n\t\t</select>\n\t</td>\n\t</tr>\n\n\t<?php\n\t// Grid Style\n\t$grid_style = isset ( $term_meta['athen_term_grid_style'] ) ? $term_meta['athen_term_grid_style'] : '' ; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_grid_style\"><?php _e( 'Grid Style', 'athen_transl' ); ?></label></th>\n\t<td>\n\t\t<select name=\"term_meta[athen_term_grid_style]\" id=\"term_meta[athen_term_grid_style]\">\n\t\t\t<option value=\"\" <?php selected( $grid_style ) ?>><?php _e( 'Default', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"fit-rows\" <?php selected( $grid_style, 'fit-rows' ) ?>><?php _e( 'Fit Rows', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"masonry\" <?php selected( $grid_style, 'masonry' ) ?>><?php _e( 'Masonry', 'athen_transl' ); ?></option>\n\t\t</select>\n\t</td>\n\t</tr>\n\t\n\t<?php\n\t// Layout Style\n\t$layout = isset ( $term_meta['athen_term_layout'] ) ? $term_meta['athen_term_layout'] : '' ; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_layout\"><?php _e( 'Layout', 'athen_transl' ); ?></label></th>\n\t<td>\n\t\t<select name=\"term_meta[athen_term_layout]\" id=\"term_meta[athen_term_layout]\">\n\t\t\t<option value=\"\" <?php selected( $layout ) ?>><?php _e( 'Default', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"right-sidebar\" <?php selected( $layout, 'right-sidebar' ) ?>><?php _e( 'Right Sidebar', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"left-sidebar\" <?php selected( $layout, 'left-sidebar' ) ?>><?php _e( 'Left Sidebar', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"full-width\" <?php selected( $layout, 'full-width' ) ?>><?php _e( 'Full Width', 'athen_transl' ); ?></option>\n\t\t</select>\n\t</td>\n\t</tr>\n\t\n\t<?php\n\t// Pagination Type\n\t$pagination = isset ( $term_meta['athen_term_pagination'] ) ? $term_meta['athen_term_pagination'] : ''; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_pagination\"><?php _e( 'Pagination', 'athen_transl' ); ?></label></th>\n\t<td>\n\t\t<select name=\"term_meta[athen_term_pagination]\" id=\"term_meta[athen_term_pagination]\">\n\t\t\t<option value=\"\" <?php echo ( $pagination == \"\") ? 'selected=\"selected\"': ''; ?>><?php _e( 'Default', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"standard\" <?php selected( $pagination, 'standard' ) ?>><?php _e( 'Standard', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"infinite_scroll\" <?php selected( $pagination, 'infinite_scroll' ) ?>><?php _e( 'Inifinite Scroll', 'athen_transl' ); ?></option>\n\t\t\t<option value=\"next_prev\" <?php selected( $pagination, 'next_prev' ) ?>><?php _e( 'Next/Previous', 'athen_transl' ); ?></option>\n\t\t</select>\n\t</td>\n\t</tr>\n\t\n\t<?php\n\t// Excerpt length\n\t$excerpt_length = isset ( $term_meta['athen_term_excerpt_length'] ) ? $term_meta['athen_term_excerpt_length'] : ''; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_excerpt_length\"><?php _e( 'Excerpt Length', 'athen_transl' ); ?></label></th>\n\t\t<td>\n\t\t<input type=\"text\" name=\"term_meta[athen_term_excerpt_length]\" id=\"term_meta[athen_term_excerpt_length]\" size=\"3\" style=\"width:100px;\" value=\"<?php echo $excerpt_length; ?>\">\n\t\t</td>\n\t</tr>\n\t\n\t<?php\n\t// Posts Per Page\n\t$posts_per_page = isset ( $term_meta['athen_term_posts_per_page'] ) ? $term_meta['athen_term_posts_per_page'] : ''; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_posts_per_page\"><?php _e( 'Posts Per Page', 'athen_transl' ); ?></label></th>\n\t\t<td>\n\t\t<input type=\"text\" name=\"term_meta[athen_term_posts_per_page]\" id=\"term_meta[athen_term_posts_per_page]\" size=\"3\" style=\"width:100px;\" value=\"<?php echo $posts_per_page; ?>\">\n\t\t</td>\n\t</tr>\n\t\n\t<?php\n\t// Image Width\n\t$athen_term_image_width = isset ( $term_meta['athen_term_image_width'] ) ? $term_meta['athen_term_image_width'] : '';?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_image_width\"><?php _e( 'Image Width', 'athen_transl' ); ?></label></th>\n\t\t<td>\n\t\t<input type=\"text\" name=\"term_meta[athen_term_image_width]\" id=\"term_meta[athen_term_image_width]\" size=\"3\" style=\"width:100px;\" value=\"<?php echo $athen_term_image_width; ?>\">\n\t\t</td>\n\t</tr>\n\t\t\n\t<?php\n\t// Image Height\n\t$athen_term_image_height = isset ( $term_meta['athen_term_image_height'] ) ? $term_meta['athen_term_image_height'] : ''; ?>\n\t<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"athen_term_image_height\"><?php _e( 'Image Height', 'athen_transl' ); ?></label></th>\n\t\t<td>\n\t\t<input type=\"text\" name=\"term_meta[athen_term_image_height]\" id=\"term_meta[athen_term_image_height]\" size=\"3\" style=\"width:100px;\" value=\"<?php echo $athen_term_image_height; ?>\">\n\t\t</td>\n\t</tr>\n<?php\n}", "function getElement(array $config, $options = array()){\n \n // die(var_dump($this->_value));\n \n if(empty($options['set'])){\n \n $element = new Zend_Form_Element_MultiCheckbox($config); \n $element->setDescription('Catergory Set Empty @todo click to edit');\n // $element->setMultiOptions($options);\n // echo debugArray($this->_value);\n // die(debugArray($config));\n //$element->setValue($this->_value);\n return $element;\n \n throw new InvalidArgumentException('Missing Set Id');\n }\n $service = new Content_Model_Category_Service();\n\n $objects = $service->getObjectsBySet($options['set']);\n $options = array();\n foreach($objects as $value){\n $options[$value->id] = $value->title;\n }\n \n $element = new Zend_Form_Element_MultiCheckbox($config); \n $element->setMultiOptions($options);\n // echo debugArray($this->_value);\n // die(debugArray($config));\n $element->setValue($this->_value);\n return $element;\n }" ]
[ "0.62970215", "0.62586004", "0.6227012", "0.57733345", "0.56803226", "0.56673837", "0.5647469", "0.5637749", "0.5631106", "0.56053597", "0.55868727", "0.55862486", "0.55563235", "0.55137765", "0.5445103", "0.54429305", "0.5440785", "0.5428641", "0.54227984", "0.53898305", "0.5370384", "0.5331752", "0.53148514", "0.53062683", "0.5296137", "0.5259856", "0.52558374", "0.5246756", "0.52417064", "0.52321017", "0.52298325", "0.5225191", "0.51865447", "0.5179011", "0.5172592", "0.514073", "0.51391894", "0.51309305", "0.5126503", "0.51166534", "0.51166534", "0.51158744", "0.510456", "0.510018", "0.5096931", "0.5091613", "0.50829625", "0.5076928", "0.50750196", "0.50702214", "0.50692266", "0.5064669", "0.50528926", "0.5042306", "0.50421095", "0.50277925", "0.50242865", "0.5019893", "0.50093585", "0.5001064", "0.4997466", "0.49968255", "0.49965945", "0.49965945", "0.49965945", "0.49965945", "0.49960983", "0.4992572", "0.49875733", "0.4986789", "0.49857205", "0.49802333", "0.49797735", "0.49756122", "0.49683583", "0.49680713", "0.49576032", "0.49490923", "0.49489295", "0.49473888", "0.49399534", "0.4938406", "0.4930045", "0.49297243", "0.4928996", "0.49250498", "0.4922242", "0.49214575", "0.4915779", "0.4914858", "0.4909482", "0.49094573", "0.49064726", "0.49060413", "0.48805144", "0.48783404", "0.48589772", "0.4852246", "0.4851539", "0.48515078" ]
0.7250795
0
Filter the HTML script tag of `fontawesome` script to add `defer` attribute.
Фильтруйте тег скрипта HTML `fontawesome` для добавления атрибута `defer`.
function add_defer_attribute( $tag, $handle ) { if ( 'font-awesome' === $handle ) { $tag = str_replace( ' src', ' defer src', $tag ); } return $tag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filter_script_loader_tag( $tag, $handle ) {\n foreach ( [ 'async', 'defer' ] as $attr ) {\n if ( ! wp_scripts()->get_data( $handle, $attr ) ) {\n continue;\n }\n // Prevent adding attribute when already added in #12009.\n if ( ! preg_match( \":\\s$attr(=|>|\\s):\", $tag ) ) {\n $tag = preg_replace( ':(?=></script>):', \" $attr\", $tag, 1 );\n }\n // Only allow async or defer, not both.\n break;\n }\n return $tag;\n}", "function ic_add_scripts_attribute( $tag, $handle ) {\n\t$handles = array(\n\t\t'main_scripts',\n\t);\n\tforeach( $handles as $defer_script) :\n\t\tif ( $defer_script === $handle ) {\n\t\t\treturn str_replace( ' src', ' defer rel=\"preload\" as=\"script\" src', $tag );\n\t\t}\n\tendforeach;\n\treturn $tag;\n}", "function wsds_defer_scripts( $tag, $handle, $src ) {\n $defer_scripts = array( \n 'autocompletejs',\n 'admin-bar',\n 'ala_custom_js',\n 'jquery-migrate',\n 'child-pages-shortcode',\n );\n\n if ( in_array( $handle, $defer_scripts ) ) {\n return '<script src=\"' . $src . '\" defer=\"defer\" type=\"text/javascript\"></script>' . \"\\n\";\n }\n \n return $tag;\n}", "public static function add_defer_attribute($tag, $handle) {\n $scripts_to_defer = array( \n 'tether-js',\n //'vue-js',\n 'bootstrap-js',\n 'jquery-ui-js'\n );\n \n foreach($scripts_to_defer as $defer_script) {\n if ($defer_script === $handle) {\n return str_replace(' src', ' defer=\"defer\" src', $tag);\n }\n }\n return $tag;\n }", "function defer_js_async($tag){\n\t\n\t// list of scripts to defer\n $scripts_to_defer = array('');\n\n\t// list of scripts to async\n\t$scripts_to_async = array('/src/js/nav.js', 'https://fonts.googleapis.com/css?family=Julius+Sans+One', 'https://fonts.googleapis.com/css?family=Raleway');\n\t \n\t// defer scripts\n\tforeach($scripts_to_defer as $defer_script){\n\t\tif(true == strpos($tag, $defer_script ) )\n\t\treturn str_replace( ' src', ' defer=\"defer\" src', $tag );\t\n\t}\n\n\t// async scripts\n\tforeach($scripts_to_async as $async_script){\n\t\tif(true == strpos($tag, $async_script ) )\n\t\treturn str_replace( ' src', ' async=\"async\" src', $tag );\t\n\t}\n\treturn $tag;\n\t}", "function add_asyncdefer_attribute($tag, $handle) {\n if (strpos($handle, 'async') !== false) {\n // return the tag with the async attribute\n return str_replace( '<script ', '<script async ', $tag );\n }\n // if the unique handle/name of the registered script has 'defer' in it\n else if (strpos($handle, 'defer') !== false) {\n // return the tag with the defer attribute\n return str_replace( '<script ', '<script defer ', $tag );\n }\n // otherwise skip\n else {\n return $tag;\n }\n }", "function script_loader_tag( $tag, $handle ) {\n\t$script_execution = wp_scripts()->get_data( $handle, 'script_execution' );\n\n\tif ( ! $script_execution ) {\n\t\treturn $tag;\n\t}\n\n\tif ( 'async' !== $script_execution && 'defer' !== $script_execution ) {\n\t\treturn $tag;\n\t}\n\n\t// Abort adding async/defer for scripts that have this script as a dependency. _doing_it_wrong()?\n\tforeach ( wp_scripts()->registered as $script ) {\n\t\tif ( in_array( $handle, $script->deps, true ) ) {\n\t\t\treturn $tag;\n\t\t}\n\t}\n\n\t// Add the attribute if it hasn't already been added.\n\tif ( ! preg_match( \":\\s$script_execution(=|>|\\s):\", $tag ) ) {\n\t\t$tag = preg_replace( ':(?=></script>):', \" $script_execution\", $tag, 1 );\n\t}\n\n\treturn $tag;\n}", "function fa_load_script( $script, $dependency = array( 'jquery' ) ){\t\n\t\n\tif( defined('FA_SCRIPT_DEBUG') && FA_SCRIPT_DEBUG ){\n\t\t$script .= '.dev';\n\t}\n\t\n\t$url = fa_get_uri( 'assets/front/js/' . $script . '.js' );\n\twp_enqueue_script(\n\t\t'fa-script-' . $script,\n\t\t$url,\n\t\t$dependency,\n\t\tfalse\t\t\n\t);\t\n\treturn 'fa-script-' . $script;\n}", "function maybe_enqueue_font_awesome( $field )\n\t{\n\t\tif( 'font-awesome' == $field['type'] && $field['enqueue_fa'] ) {\n\t\t\tadd_action( 'wp_footer', array( $this, 'frontend_enqueue_scripts' ) );\n\t\t}\n\n\t\treturn $field;\n\t}", "function profbud_script_loader_tag( $tag, $handle ) {\r\n\t$scripts_to_load = array(\r\n\t\tarray(\r\n\t\t\t( 'name' ) => 'jquery',\r\n\t\t\t( 'integrity' ) => 'sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=',\r\n\t\t)\r\n\t);\r\n\t$key = array_search( $handle, array_column( $scripts_to_load, 'name' ) );\r\n\tif ( $key !== false ) {\r\n\t\t$tag = str_replace( '></script>', ' integrity=\\'' . $scripts_to_load[$key]['integrity'] . '\\' crossorigin=\\'anonymous\\'></script>', $tag );\r\n\t}\r\n\treturn $tag;\r\n}", "function addJS($src, $async, $defer){\n echo '<script src=\"'. $src .'\"'. ($async? \" async\":\"\") . ($defer? \" defer\":\"\") .'> </script>';\n}", "public function add_script_tag_attributes($tag, $handle) {\n switch ($handle) {\n // adding async to main js bundle\n // for defer, replace async=\"async\" with defer=\"defer\"\n case ('pan_bootstrap_scripts'):\n return str_replace( ' src', ' async=\"async\" src', $tag );\n break;\n\n // example adding CDN integrity and crossorigin attributes\n // Note: popper.js is loaded into the main.bundle.js from npm\n // This is just an example\n case ('popper-js'):\n return str_replace( ' min.js', 'min.js\" integrity=\"sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q\" crossorigin=\"anonymous\"', $tag );\n break;\n\n // example adding CDN integrity and crossorigin attributes\n // Note: bootstrap.js is loaded into the main.bundle.js from npm\n // This is just an example\n case ('bootstrap-js'):\n return str_replace( ' min.js', 'min.js\" integrity=\"sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4\" crossorigin=\"anonymous\"', $tag );\n break;\n\n default:\n return $tag;\n\n } // /switch\n }", "function font_awesome()\n{\n wp_enqueue_style(\"font_awesome\", \"//use.fontawesome.com/releases/v5.6.3/css/all.css\");\n}", "public function testAttributes() {\n $build['#attached']['library'][] = 'common_test/js-attributes';\n $assets = AttachedAssets::createFromRenderArray($build);\n\n $js = $this->assetResolver->getJsAssets($assets, FALSE)[1];\n $js_render_array = \\Drupal::service('asset.js.collection_renderer')->render($js);\n $rendered_js = $this->renderer->renderPlain($js_render_array);\n $expected_1 = '<script src=\"http://example.com/deferred-external.js\" foo=\"bar\" defer></script>';\n $expected_2 = '<script src=\"' . $this->fileUrlGenerator->generateString('core/modules/system/tests/modules/common_test/deferred-internal.js') . '?v=1\" defer bar=\"foo\"></script>';\n $this->assertStringContainsString($expected_1, $rendered_js, 'Rendered external JavaScript with correct defer and random attributes.');\n $this->assertStringContainsString($expected_2, $rendered_js, 'Rendered internal JavaScript with correct defer and random attributes.');\n }", "function add_extra_attributes_to_enqueued_js( $tag, $handle ) {\n\n\t$search = '></script>';\n\n\tif ( 'jquery' === $handle ) {\n\t\treturn str_replace( $search, \" integrity='sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj' crossorigin='anonymous'\" . $search, $tag );\n\t}\n\n\tif ( 'bootstrap-bundle' === $handle ) {\n\t\treturn str_replace( $search, \" integrity='sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx' crossorigin='anonymous'\" . $search, $tag );\n\t}\n\n\tif ( 'font-awesome' === $handle ) {\n\t\treturn str_replace( $search, \" integrity='sha512-UwcC/iaz5ziHX7V6LjSKaXgCuRRqbTp1QHpbOJ4l1nw2/boCfZ2KlFIqBUA/uRVF0onbREnY9do8rM/uT/ilqw==' crossorigin='anonymous'\" . $search, $tag );\n\t}\n\n\treturn $tag;\n\n}", "public function enqueue_font_awesome() {\n\t\tglobal $hestia_load_fa;\n\n\t\tif ( $hestia_load_fa !== true ) {\n\t\t\treturn false;\n\t\t}\n\n\t\twp_enqueue_style( 'font-awesome-5-all', get_template_directory_uri() . '/assets/font-awesome/css/all.min.css', array(), HESTIA_VENDOR_VERSION );\n\t\tif ( $this->should_load_shim() ) {\n\t\t\twp_enqueue_style( 'font-awesome-4-shim', get_template_directory_uri() . '/assets/font-awesome/css/v4-shims.min.css', array(), HESTIA_VENDOR_VERSION );\n\t\t}\n\n\t\treturn true;\n\t}", "function register_scripts_admin() {\n\twp_enqueue_style('font-awesome', 'http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css');\n}", "static public function deregister_scripts() {\n wp_dequeue_script( 'filterable-portfolio' );\n wp_deregister_script( 'filterable-portfolio' );\n }", "function demo_plugin_font_awesome() {\n\t\twp_enqueue_style( 'load-fa', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css' );\n\t\twp_enqueue_style( 'load-select2-css', 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/css/select2.min.css' );\n\t\twp_enqueue_script( 'load-select2-js', 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/js/select2.min.js' );\n\t\twp_enqueue_style( 'load-datatables-css', 'https://cdn.datatables.net/1.10.16/css/jquery.dataTables.css' );\n\t\twp_enqueue_script( 'load-datatables-js', 'https://cdn.datatables.net/1.10.16/js/jquery.dataTables.js' );\n\t\twp_enqueue_script( 'load-datepicker-js', 'https://code.jquery.com/ui/1.12.1/jquery-ui.js' );\n\t\twp_enqueue_style( 'load-datepicker-css', 'https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css' );\n\t}", "function theme_add_bootstrap_fontawesome() {\n\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() . '/css/bootstrap.min.css' );\n\twp_enqueue_style( 'style-css', get_stylesheet_directory_uri() . '/style.css' );\n\twp_enqueue_style( 'fontawesome-css', get_stylesheet_directory_uri() . '/css/font-awesome.min.css' );\n\twp_enqueue_script( 'bootstrap-js', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array(), '3.0.0', true );\n}", "function pagely_load_font_awesome() {\n\t\n\twp_enqueue_style( 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css', false, false, false ); \n}", "function defer_parsing_of_js( $url ) {\r\n if ( is_user_logged_in() ) return $url; //don't break WP Admin\r\n if ( FALSE === strpos( $url, '.js' ) ) return $url;\r\n if ( strpos( $url, 'jquery.js' ) ) return $url;\r\n return str_replace( ' src', ' defer src', $url );\r\n}", "public function input_admin_enqueue_scripts() {\n\t\t// Min version ?\n\t\t$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG === true ? '' : '.min';\n\n\t\twp_localize_script( 'acf-input-svg-icon', 'svg_icon_format_data', $this->parse_svg() );\n\t\twp_register_style( 'acf-input-svg-icon', ACF_SVG_ICON_URL . 'assets/css/style' . $suffix . '.css', array( 'select2' ), ACF_SVG_ICON_VER );\n\n\t\twp_enqueue_script( 'acf-input-svg-icon' );\n\t\twp_enqueue_style( 'acf-input-svg-icon' );\n\t}", "public function loadAssets()\n {\n add_action('admin_enqueue_scripts', [$this, 'enqueueAdminAssets']);\n add_filter('script_loader_tag', [$this, 'addAssetAttribute'], 10, 3);\n }", "public function getScriptAttributes() {\n\t\treturn ' ' . trim( preg_replace( '/\\s+/', ' ', apply_filters( 'aioseo_ga_attributes', '' ) ) );\n\t}", "function harvest_deregister_scripts() {\n\tglobal $wp_query, $post;\n\t\n\tif( ! ( strpos( json_encode( $wp_query ), '[contact-form-7' ) || strpos( json_encode( $post ), '[contact-form-7' ) ) ) {\n\t\t\twp_deregister_script( 'contact-form-7' );\n\t\t\twp_deregister_style( 'contact-form-7' );\n\t}\n\n}", "public function scripts_styles_footer() {\n\t\tif ( is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$theme_url = get_template_directory_uri();\n\t\t$fa_ver = '4.7.0';\n\t\t$fa_url = \"//maxcdn.bootstrapcdn.com/font-awesome/$fa_ver/css/font-awesome.min.css\";\n\t\t$main_js_url = $theme_url . '/js/main.min.js';\n\t\t$main_js_path = get_template_directory() . '/js/main.min.js';\n\t\t$main_js_ver = file_exists( $main_js_path ) ? filemtime( $main_js_path ) : '';\n\n\t\twp_enqueue_style( 'fa-style', $fa_url, null, $fa_ver );\n\t\twp_enqueue_style( 'gfont', 'https://fonts.googleapis.com/css?family=Handlee' );\n\t\twp_enqueue_script( 'superiocity-script', $main_js_url, null, $main_js_ver, true );\n\t}", "public function remove_conflicting_asset_files() {\n\t\t$scripts = array(\n\t\t\t'jetpack-onboarding-vendor', // Jetpack Onboarding Bluehost.\n\t\t);\n\n\t\tif ( ! empty( $scripts ) ) {\n\t\t\tforeach ( $scripts as $script ) {\n\t\t\t\twp_dequeue_script( $script ); // Remove JS file.\n\t\t\t\twp_deregister_script( $script );\n\t\t\t}\n\t\t}\n\t}", "function script_loader_filter ($src) {\n if (FALSE === strpos ($src, 'ajax.googleapis.com')) {\n\treturn $src;\n }\n\n $new_src = explode('?', $src);\n return $new_src[0];\n\n}", "private function prepare_allowed_scripts_regex() {\n\t\t$delay_js_scripts = $this->options->get( 'delay_js_scripts', [] );\n\n\t\t/**\n\t\t * Filters JS files to included into delay JS.\n\t\t *\n\t\t * @since 3.7\n\t\t *\n\t\t * @param array $delay_js_scripts List of allowed JS files.\n\t\t */\n\t\t$delay_js_scripts = (array) apply_filters( 'rocket_delay_js_scripts', $delay_js_scripts );\n\n\t\tif ( empty( $delay_js_scripts ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tforeach ( $delay_js_scripts as $i => $delay_js_script ) {\n\t\t\t$delay_js_scripts[ $i ] = preg_quote( str_replace( '#', '\\#', $delay_js_script ), '#' );\n\t\t}\n\n\t\treturn implode( '|', $delay_js_scripts );\n\n\t}", "function wp_add_inline_script($handle, $data, $position = 'after')\n {\n }", "function ahla_register_assets()\n{\n\t$assets = AHLAURL . '/assets';\n\t$ver \t = AHLAVER;\n\n\t// theme style.css\n\twp_register_style( 'theme-style' , get_stylesheet_uri() );\n\n\t// others\n\t$file = $assets.'/js/skip-link-focus-fix.js';\n\twp_register_script( 'skip-link-focus-fix', $file, array(), $ver, true );\n\n\tdo_action('ahla_register_assets');\n}", "function scripts() {\n\t/**\n\t * Flag whether to enable loading uncompressed/debugging assets. Default false.\n\t *\n\t * @param bool additive_script_debug\n\t */\n\t$debug = apply_filters( 'additive_script_debug', false );\n\t$min = ( $debug || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\twp_enqueue_script(\n\t\t'additive',\n\t\tADDITIVE_TEMPLATE_URL . \"/assets/js/additive{$min}.js\",\n\t\tarray(),\n\t\tADDITIVE_VERSION,\n\t\ttrue\n\t);\n}", "function jngfa_scripts() {\n\twp_enqueue_style('icons', 'https://use.fontawesome.com/releases/v5.0.9/css/all.css');\n\twp_enqueue_style('slick', get_theme_file_uri('/assets/js/slick/slick.css'));\n\twp_enqueue_style('slick-theme', get_theme_file_uri('/assets/js/slick/slick-theme.css'));\n\twp_enqueue_style('fancybox', 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.css');\n\twp_enqueue_style('datepicker', get_theme_file_uri('/assets/js/datepicker/datepicker.min.css'));\n\twp_enqueue_style('jngfa-style', get_stylesheet_uri());\n\n\tif(ar()){\n\t\twp_enqueue_style('jngfa-style-ar', get_theme_file_uri('/rtl.css'));\n\t}\n\n\twp_enqueue_script('slick', 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.js', array('jquery'), '1.0.0', true);\n\twp_enqueue_script('fancybox', get_theme_file_uri('/assets/js/slick/slick.min.js'), array('jquery'), '1.0.0', true);\n\twp_enqueue_script('moment', get_theme_file_uri('/assets/js/moment.min.js'), array('jquery'), '1.0.0', true);\n\twp_enqueue_script('datepicker', get_theme_file_uri('/assets/js/datepicker/datepicker.min.js'), array('jquery'), '1.0.0', true);\n\twp_enqueue_script('mainjs', get_theme_file_uri('/assets/js/main.js'), array('jquery', 'moment', 'datepicker'), '1.0.0', true);\n}", "public static function wcap_dequeue_scripts_atc_modal() {\n\n $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';\n\n wp_dequeue_script('wc-add-to-cart');\n\n wp_register_script( \n 'wc-add-to-cart', \n WCAP_PLUGIN_URL . '/assets/js/frontend/wcap_atc_modal' . $suffix . '.js', \n '', \n '', \n true );\n wp_enqueue_script( 'wc-add-to-cart' );\n }", "function fdcw52_assets() {\n\twp_enqueue_script(\n\t\t'fdcw52-find-css-deprecations',\n\t\tplugins_url( 'find-deprecated-css-in-wp52.js', __FILE__ ),\n\t\tarray( 'wp-data' )\n\t);\n}", "function frontend_enqueue_scripts()\n\t{\n\t\twp_register_style('font-awesome', $this->stylesheet, array(), $this->version);\n\n\t\twp_enqueue_style( array( 'font-awesome' ) );\n\t}", "function textdomain_scripts_styles() {\n\t\t// We're using the awesome Font Awesome icon font. http://fortawesome.github.io/Font-Awesome\n\t\twp_register_style( 'fontawesome', trailingslashit( get_template_directory_uri() ) . '/inc/assets/css/fontawesome-all.min.css' , array(), '5.8.2', 'all' );\n\t\twp_enqueue_style( 'fontawesome' );\n\t}", "function defer_parsing_of_js ( $url ) {\nif ( FALSE === strpos( $url, '.js' ) ) return $url;\nif ( strpos( $url, 'jquery.js' ) ) return $url;\nreturn \"$url' defer\";\n}", "function wp_add_inline_script( $handle, $data, $position = 'after' ) {\n\t_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );\n\n\tif ( false !== stripos( $data, '</script>' ) ) {\n\t\t_doing_it_wrong( __FUNCTION__, sprintf(\n\t\t\t/* translators: 1: <script>, 2: wp_add_inline_script() */\n\t\t\t__( 'Do not pass %1$s tags to %2$s.' ),\n\t\t\t'<code>&lt;script&gt;</code>',\n\t\t\t'<code>wp_add_inline_script()</code>'\n\t\t), '4.5.0' );\n\t\t$data = trim( preg_replace( '#<script[^>]*>(.*)</script>#is', '$1', $data ) );\n\t}\n\n\treturn wp_scripts()->add_inline_script( $handle, $data, $position );\n}", "function ccac_2020_new_enqueue_scripts() {\n\n wp_deregister_script( 'webfont' );\n wp_enqueue_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', false, null, false);\n\n wp_register_script( 'inline-script-1', '', [], '', false );\n wp_enqueue_script( 'inline-script-1' );\n wp_add_inline_script( 'inline-script-1', 'WebFont.load({ google: { families: [\"Lato:100,100italic,300,300italic,400,400italic,700,700italic,900,900italic\",\"Montserrat:100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic\",\"Roboto:100,300,300italic,regular,italic,500,700,900\",\"Poppins:regular,500,600,700,800\",\"Work Sans:regular,600,700,800\"] }});');\n\n wp_register_script( 'inline-script-2', '', [], '', false );\n wp_enqueue_script( 'inline-script-2' );\n wp_add_inline_script( 'inline-script-2', '!function(o,c){var n=c.documentElement,t=\" w-mod-\";n.className+=t+\"js\",(\"ontouchstart\"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+\"touch\")}(window,document);');\n\n wp_register_script( 'inline-script-3', '', [], '', false );\n wp_enqueue_script( 'inline-script-3' );\n wp_add_inline_script( 'inline-script-3', '(function(i,s,o,g,r,a,m){i[\\'GoogleAnalyticsObject\\']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,\\'script\\',\\'https://www.google-analytics.com/analytics.js\\',\\'ga\\');\n ga(\\'create\\', \\'UA-91610200-1\\', \\'auto\\');\n ga(\\'send\\', \\'pageview\\');');\n\n wp_deregister_script( 'installpopupbutton' );\n wp_enqueue_script( 'installpopupbutton', 'https://donorbox.org/install-popup-button.js', false, null, false);\n\n wp_register_script( 'inline-script-4', '', [], '', false );\n wp_enqueue_script( 'inline-script-4' );\n wp_add_inline_script( 'inline-script-4', 'window.DonorBox = { widgetLinkClassName: \\'custom-dbox-popup\\' }');\n\n wp_deregister_script( 'jqueryafdd' );\n wp_enqueue_script( 'jqueryafdd', 'https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.4.1.min.220afd743d.js?site=5e7694e31a5b6b0c04a48342', false, null, true);\n\n wp_deregister_script( 'webflow' );\n wp_enqueue_script( 'webflow', get_template_directory_uri() . '/js/webflow.js', false, null, true);\n\n /* Pinegrow generated Enqueue Scripts End */\n\n /* Pinegrow generated Enqueue Styles Begin */\n wp_enqueue_style( 'wp-webflow-compatibility', get_template_directory_uri().'/css/wp-webflow.css', false, null);\n\n wp_deregister_style( 'normalize' );\n wp_enqueue_style( 'normalize', get_template_directory_uri() . '/css/normalize.css', false, null, 'all');\n\n wp_deregister_style( 'webflow' );\n wp_enqueue_style( 'webflow', get_template_directory_uri() . '/css/webflow.css', false, null, 'all');\n\n wp_deregister_style( 'ccacwebflow' );\n wp_enqueue_style( 'ccacwebflow', get_template_directory_uri() . '/css/ccac-2020.webflow.css', false, null, 'all');\n\n wp_deregister_style( 'style' );\n wp_enqueue_style( 'style', get_bloginfo('stylesheet_url'), false, null, 'all');\n\n /* Pinegrow generated Enqueue Styles End */\n\n }", "function _h_remove_jetpack_footer_assets() {\n wp_deregister_script('sharing-js');\n\n // disable spinner when infinite loading is enabled\n wp_deregister_script('jquery.spin');\n wp_deregister_script('spin');\n}", "public function admin_scripts() {\n\t\twp_enqueue_style( 'wpex-font-awesome', WPEX_CSS_DIR_URI .'font-awesome.min.css' );\n\t}", "function check_fa4_styles() {\n\n\t\tglobal $wp_styles;\n\t\tforeach ( $wp_styles->queue as $style ) {\n\t\t\tif ( strstr( $wp_styles->registered[ $style ]->src, 'font-awesome.min.css' ) ) {\n\t\t\t\tupdate_option( 'hestia_load_shim', 'yes' );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function prefix_enqueue_awesome() {\n\twp_enqueue_style( 'prefix-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3' );\n}", "function flexiauto_scripts_loader() {\n\t\t/* Load custom styles */\n\t\twp_enqueue_style('reset', TPL_DIR . '/assets/css/vendor/reset.css');\n\t\twp_enqueue_style('bootstrap-styles', TPL_DIR . '/assets/css/vendor/bootstrap.min.css');\n\t\twp_enqueue_style('flexi-styles', TPL_DIR . '/assets/css/flexi.min.css');\n\n\t\t/* Load custom scripts */\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', TPL_DIR . '/assets/js/vendor/jquery.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery');\n\n\t\twp_enqueue_script('bootstrap-scripts', TPL_DIR . '/assets/js/vendor/bootstrap.min.js', array(), false, true);\n\t\twp_enqueue_script('nicescroll', TPL_DIR . '/assets/js/vendor/jquery.nicescroll.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery-validate', TPL_DIR . '/assets/js/vendor/jquery.validate.min.js', array(), false, true);\n\t\twp_enqueue_script('match-height', TPL_DIR . '/assets/js/vendor/jquery.matchHeight.min.js', array(), false, true);\n\t\twp_enqueue_script('flexi-scripts', TPL_DIR . '/assets/js/flexi.min.js', array(), false, true);\n\n\t}", "function wp_default_packages_inline_scripts($scripts)\n {\n }", "public function testAggregatedAttributes() {\n $build['#attached']['library'][] = 'common_test/js-attributes';\n $assets = AttachedAssets::createFromRenderArray($build);\n\n $js = $this->assetResolver->getJsAssets($assets, TRUE)[1];\n $js_render_array = \\Drupal::service('asset.js.collection_renderer')->render($js);\n $rendered_js = $this->renderer->renderPlain($js_render_array);\n $expected_1 = '<script src=\"http://example.com/deferred-external.js\" foo=\"bar\" defer></script>';\n $expected_2 = '<script src=\"' . $this->fileUrlGenerator->generateString('core/modules/system/tests/modules/common_test/deferred-internal.js') . '?v=1\" defer bar=\"foo\"></script>';\n $this->assertStringContainsString($expected_1, $rendered_js, 'Rendered external JavaScript with correct defer and random attributes.');\n $this->assertStringContainsString($expected_2, $rendered_js, 'Rendered internal JavaScript with correct defer and random attributes.');\n }", "function enqueue_font_awesome(){\n\twp_enqueue_style('font-awesome', get_stylesheet_directory_uri() . '/library/css/font-awesome.css');\n}", "function ajax_filter_posts_scripts() {\n // Enqueue script\n //wp_register_script('afp_script', 'get_template_directory_uri() . '/js-folder/'ajax-filter-posts.js', false, null, false);\n wp_register_script('afp_script', get_template_directory_uri().'/assets/ajax-filter-posts.js', false, null, false);\n wp_enqueue_script('afp_script');\n\n wp_localize_script( 'afp_script', 'afp_vars', array(\n 'afp_nonce' => wp_create_nonce( 'afp_nonce' ), // Create nonce which we later will use to verify AJAX request\n 'afp_ajax_url' => admin_url( 'admin-ajax.php' ),\n )\n );\n}", "function prepare_scripts() {\n\twp_register_script('ajax_autofill', plugin_dir_url(__FILE__) . \"js/autofill_ajax.js\", array('jquery'));\n\twp_enqueue_script('ajax_autofill');\n}", "function enqueue_script() {\n\t\twp_enqueue_script( 'aztec-vendors-script', get_stylesheet_directory_uri() . '/assets/vendor.js', [], false, true );\n\t\twp_enqueue_script( 'aztec-script', get_stylesheet_directory_uri() . '/assets/app.js', [ 'aztec-vendors-script', 'jquery' ], false, true );\n\t}", "protected function addFilteringJsAndCss()\n {\n $this->setStylesheets('');\n $this->setJavascripts('');\n }", "function wordpressboilerplate_scripts (){\n wp_enqueue_style( 'wordpressboilerplate-style', get_stylesheet_uri() );\n wp_enqueue_script( 'wordpressboilerplate-script', get_template_directory_uri() . 'js/main.js', array( 'jquery' ) );\n\n wp_register_style('animate.css', get_stylesheet_uri() . 'assets/vendor/font-awesome/css/font-awesome.min.css');\n}", "function acf_enqueue_scripts($args = array())\n{\n}", "function wp_get_loading_optimization_attributes($tag_name, $attr, $context)\n {\n }", "function blur_header_scripts()\n {\n if ($GLOBALS['pagenow'] != 'wp-login.php' && !is_admin()) {\n\n wp_register_script('conditionizr', get_template_directory_uri() . '/js/lib/conditionizr-4.3.0.min.js', array(), '4.3.0'); // Conditionizr\n wp_enqueue_script('conditionizr'); // Enqueue it!\n\n wp_register_script('modernizr', get_template_directory_uri() . '/js/lib/modernizr-2.7.1.min.js', array(), '2.7.1'); // Modernizr\n wp_enqueue_script('modernizr'); // Enqueue it!\n\n wp_register_script('blur', get_template_directory_uri() . '/js/scripts.js', array('jquery'), '1.0.0'); // Custom scripts\n wp_enqueue_script('blur'); // Enqueue it!\n }\n }", "public function addScript(string $name, string $src, array $attributes = [], string $placement = Meta::PLACEMENT_FOOTER);", "private function register_script() {\n\n\t\tif ( $this->inline ) {\n\t\t\twp_register_script(\n\t\t\t\t$this->handle,\n\t\t\t\t'',\n\t\t\t\t$this->deps,\n\t\t\t\t$this->ver,\n\t\t\t\t$this->footer\n\t\t\t);\n\t\t\tif ( $this->does_file_exist( $this->src ) ) {\n\t\t\t\twp_add_inline_script( $this->handle, file_get_contents( $this->src ) );\n\t\t\t}\n\t\t} else {\n\t\t\twp_register_script(\n\t\t\t\t$this->handle,\n\t\t\t\t$this->src,\n\t\t\t\t$this->deps,\n\t\t\t\t$this->ver,\n\t\t\t\t$this->footer\n\t\t\t);\n\t\t}\n\n\t\tif ( ! empty( $this->localize ) ) {\n\t\t\twp_localize_script( $this->handle, $this->handle, $this->localize );\n\t\t}\n\n\t\twp_enqueue_script( $this->handle );\n\t}", "public static function _wp_enqueue_scripts()\n\t{\n\t\tstatic::$has_run = true;\n\n\t\tforeach (static::$scripts as $name => $params) {\n\t\t\tif (!isset($params['url'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!isset($params['deps'])) $params['deps'] = array();\n\t\t\tif (!isset($params['footer'])) $params['footer'] = true;\n\n\t\t\twp_register_script($name, $params['url'], $params['deps'], $params['version'], $params['footer']);\n\n\t\t\tif (isset($params['localize'])) {\n\t\t\t\twp_localize_script($name, $params['localize']['name'], $params['localize']['data']);\n\t\t\t}\n\n\t\t\tif (isset($params['register_only']) && $params['register_only']) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\twp_enqueue_script($name);\n\t\t}\n\t}", "function add_late_scripts()\n\t{\n\t\t// only procceed if we have finished printing footer scripts\n\t\tif (did_action('bwp_minify_after_footer_scripts'))\n\t\t\t$this->todo_late_scripts = 'footer' . $this->late_script_order;\n\t}", "function cultiv8_deregister_scripts() {\n\tglobal $wp_query, $post;\n\t\n\tif( ! ( strpos( json_encode( $wp_query ), '[contact-form-7' ) || strpos( json_encode( $post ), '[contact-form-7' ) ) ) {\n\t\t\twp_deregister_script( 'contact-form-7' );\n\t\t\twp_deregister_style( 'contact-form-7' );\n\t}\n\n}", "public function admin_enqueue_fontawesomeBlock(){\n\t\t}", "function smash_filter_script_loader_src( $src, $handle ) {\n\n\t$scripts = wp_scripts();\n\n\tif ( $handle === 'comment-reply' ) {\n\n\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array(\n\t\t\t'loadjs' => array(\n\t\t\t\t'async' => TRUE,\n\t\t\t\t'onLoad' => TRUE\n\t\t\t)\n\t\t);\n\t} else if ( $handle === 'wp-embed' ) {\n\t\t// @issue https://github.com/inpsyde/smashing-magazin/issues/440\n\t\t// Adding ABSPATH to src, otherwhise the file_get_contents will fail.\n\t\t$scripts->registered[ $handle ]->src = ABSPATH . $scripts->registered[ $handle ]->src;\n\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array( 'inlinejs' => TRUE );\n\t} else if ( function_exists( '\\CloudFour\\ServiceWorkerManager\\get_config' ) ) {\n\t\t$config = \\CloudFour\\ServiceWorkerManager\\get_config();\n\t\tif ( $handle === $config[ 'serviceWorkerRegistrationHandle' ] ) {\n\t\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array(\n\t\t\t\t'inlinejs' => TRUE\n\t\t\t);\n\t\t}\n\t}\n\n\treturn $src;\n}", "function debuggify_enqueue_script() {\n global $debuggify_options;\n if($debuggify_options['enabled'] == '1') {\n wp_enqueue_script('debuggify-logger-http-js', 'https://cdn.debuggify.net/js/'.$debuggify_options['apikey'].'/debuggify.logger.http.js', null, DEBUGGIFY_VERSION.'&platform=wordpress', false);\n }\n }", "private function \t\t\t\tbuild_script_tags() {\n\t\t$load=array(\n\t\t\t\"assets/js/jquery/jquery-3.3.1.min.js\",\n\t\t\t\"assets/js/bootstrap/bootstrap.min.js\",\n\t\t\t// \"assets/js/fontawesome/all.min.js\",\n\t\t\t\"assets/js/app/fetch.js\",\n\t\t\t\"assets/js/app/modal.js\",\n\t\t\t\"assets/js/app/common.js\"\n\t\t);\n\n\t\treturn array_reduce(array_unique(array_merge($load, $this->section_js)), function($_acum, $_item) {\n\t\t\t$_acum.=<<<R\n\n\t\t<script type=\"text/javascript\" src=\"{$_item}\"></script>\nR;\n\t\t\treturn $_acum;\n\t\t}, '');\n\t}", "function plugin_frontend_scripts_styles()\r\r\n{\r\r\n $options = get_option('oneclick');\r\r\n $gmap_iconizer_apikey = $options['gmap_iconizer_apikey'];\r\r\n if ($gmap_iconizer_apikey != \"\") {\r\r\n wp_enqueue_script('gmap_main_js', 'https://maps.googleapis.com/maps/api/js?v=3key=' . $gmap_iconizer_apikey, '', '', false);\r\r\n }\r\r\n else {\r\r\n wp_enqueue_script('sensor_js', 'http://maps.googleapis.com/maps/api/js?sensor=false', '', false);\r\r\n }\r\r\n}", "function acf_enqueue_script($name)\n{\n}", "public static function callback( $attrs, $content = '' ) {\n\t\treturn '<script async src=\"https://genius.codes\"></script>';\n\t}", "function et_extra_builder_get_minified_scripts( $scripts ) {\n\treturn array_merge( $scripts, array(\n\t\t'hash-persistance', // Internally made by ET\n\t\t'imagesloaded',\n\t\t'jquery-imagesloaded', // Possible alternative name\n\t\t'raty',\n\t\t'jquery-raty', // Possible alternative name\n\t\t'validation',\n\t\t'jquery-validation', // Possible alternative name\n\t\t'smooth-scroll',\n\t) );\n}", "public function theme_scripts() {\n\t\t$suffix = !TALEMY_DEV_MODE ? '.min' : '';\n\n\t\t// stylesheets\n\t\twp_register_style(\n\t\t\t'font-awesome-5-all',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/font-awesome/css/all.min.css',\n\t\t\tfalse,\n\t\t\t'5.10.1'\n\t\t);\n\n\t\twp_register_style(\n\t\t\t'font-awesome-5-shim',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/font-awesome/css/v4-shims.min.css',\n\t\t\tfalse,\n\t\t\t'5.10.1'\n\t\t);\n\t\t\n\t\twp_register_style(\n\t\t\t'fancybox',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/css/fancybox.min.css'\n\t\t);\n\n\t\twp_register_style(\n\t\t\t'talemy',\n\t\t\tTALEMY_THEME_URI . 'assets/css/style'. $suffix . '.css',\n\t\t\tfalse,\n\t\t\tTALEMY_THEME_VERSION\n\t\t);\n\n\t\twp_enqueue_style( 'font-awesome-5-all' );\n\t\twp_enqueue_style( 'font-awesome-5-shim' );\n\t\twp_enqueue_style( 'talemy' );\n\t\twp_style_add_data( 'talemy', 'rtl', 'replace' );\n\n\t\t// scripts\n\n \twp_register_script(\n \t\t'fancybox',\n \t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.fancybox.min.js',\n \t\tarray( 'jquery' ),\n \t\tTALEMY_THEME_VERSION,\n \t\ttrue\n \t);\n\n\t\twp_register_script(\n\t\t\t'jquery-fitvids',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.fitvids.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-matchheight',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.matchHeight.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'0.7.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-placeholder',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.placeholder.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'2.3.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-requestanimationframe',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.requestanimationframe.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'0.2.3',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-selectric',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.selectric.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.13.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-superfish',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.superfish.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.7.10',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-throttle-debounce',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.throttle-debounce.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'resize-sensor',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/ResizeSensor.min.js',\n\t\t\tarray(),\n\t\t\tnull,\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'theia-sticky-sidebar',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/theia-sticky-sidebar.min.js',\n\t\t\tarray( 'jquery', 'resize-sensor' ),\n\t\t\t'1.7.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy-modernizr',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/modernizr.js',\n\t\t\tarray(),\n\t\t\t'3.6.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy-block',\n\t\t\tTALEMY_THEME_URI . 'assets/js/talemy-block.min.js',\n\t\t\tarray( 'jquery', 'imagesloaded', 'jquery-matchheight' ),\n\t\t\tTALEMY_THEME_VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy',\n\t\t\tTALEMY_THEME_URI . 'assets/js/talemy' . $suffix . '.js',\n\t\t\tarray(\n\t\t\t\t'jquery',\n\t\t\t\t'imagesloaded',\n\t\t\t\t'jquery-fitvids',\n\t\t\t\t'jquery-superfish',\n\t\t\t\t'jquery-selectric',\n\t\t\t\t'jquery-throttle-debounce',\n\t\t\t\t'jquery-requestanimationframe',\n\t\t\t\t'jquery-matchheight',\n\t\t\t\t'jquery-placeholder',\n\t\t\t\t'theia-sticky-sidebar',\n\t\t\t\t'talemy-modernizr'\n\t\t\t),\n\t\t\tTALEMY_THEME_VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\twp_enqueue_script( 'jquery-fitvids' );\n\t\twp_enqueue_script( 'jquery-superfish' );\n\t\twp_enqueue_script( 'jquery-selectric' );\n\t\twp_enqueue_script( 'jquery-throttle-debounce' );\n\t\twp_enqueue_script( 'jquery-requestanimationframe' );\n\t\twp_enqueue_script( 'jquery-matchheight' );\n\t\twp_enqueue_script( 'jquery-placeholder' );\n\t\twp_enqueue_script( 'theia-sticky-sidebar' );\n\t\twp_enqueue_script( 'talemy-modernizr' );\n\t\twp_enqueue_script( 'talemy' );\n\t\twp_localize_script( 'talemy', 'talemy_js_data', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );\n\n\t\tif ( is_single() ) {\n\t\t\tif ( talemy_get_option( 'post_comments' ) && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\t}\n\t\t\tif ( is_singular( 'sfwd-courses' ) ) {\n\t\t\t\twp_enqueue_style( 'fancybox' );\n\t\t\t\twp_enqueue_script( 'fancybox' );\n\t\t\t} else {\n\t\t\t\t$in_focus_mode = false;\n\t\t\t\tif ( class_exists( 'LearnDash_Settings_Section' ) ) {\n\t\t\t\t\t$in_focus_mode = LearnDash_Settings_Section::get_section_setting( 'LearnDash_Settings_Theme_LD30', 'focus_mode_enabled' );\n\t\t\t\t}\n\t\t\t\tif ( !$in_focus_mode && in_array( get_post_type(), array( 'sfwd-lessons', 'sfwd-topic' ) ) ) {\n\t\t\t\t\twp_enqueue_style( 'fancybox' );\n\t\t\t\t\twp_enqueue_script( 'fancybox' );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( is_page() && !is_front_page() ) {\n\t\t\tif ( talemy_get_option( 'page_comments' ) && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\t}\n\t\t}\n\t}", "public function replace_scripts( $matches ) {\n\t\tif (\n\t\t\tempty( $this->allowed_scripts )\n\t\t\t||\n\t\t\t(\n\t\t\t\t! empty( $this->allowed_scripts )\n\t\t\t\t&&\n\t\t\t\t! preg_match( '#(' . $this->allowed_scripts . ')#', $matches[0] )\n\t\t\t)\n\t\t) {\n\t\t\treturn $matches[0];\n\t\t}\n\n\t\t$src = '';\n\t\t$matches['attr'] = trim( $matches['attr'] );\n\n\t\tif ( ! empty( $matches['attr'] ) ) {\n\t\t\tif ( preg_match( '/src=([\"\\'])(.*?)\\1/', $matches['attr'], $src_matches ) ) {\n\t\t\t\t$src = $src_matches[2];\n\n\t\t\t\t// Remove the src attribute.\n\t\t\t\t$matches['attr'] = str_replace( $src_matches[0], '', $matches['attr'] );\n\t\t\t}\n\t\t}\n\n\t\tif ( empty( $src ) ) {\n\t\t\t// Get the JS content.\n\t\t\tif ( ! empty( $matches['content'] ) ) {\n\t\t\t\t$src = 'data:text/javascript;base64,' . base64_encode( $matches['content'] );// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode\n\t\t\t}\n\t\t}\n\n\t\tif ( empty( $src ) ) {\n\t\t\treturn $matches[0];\n\t\t}\n\n\t\treturn \"<script data-rocketlazyloadscript='{$src}' {$matches['attr']}></script>\";\n\t}", "public static function _script_loader_tag(string $tag, string $handle): string\n\t{\n\t\t$attrs = array();\n\n\t\tif (isset(static::$scripts[$handle]['async']) && static::$scripts[$handle]['async']) {\n\t\t\t$attrs[] = 'async';\n\t\t}\n\n\t\tif (isset(static::$scripts[$handle]['defer']) && static::$scripts[$handle]['defer']) {\n\t\t\t$attrs[] = 'defer';\n\t\t}\n\n\t\tif ($attrs) {\n\t\t\t$tag = str_replace(' src', ' '.implode(' ', $attrs).' src', $tag);\n\t\t}\n\n\t\treturn $tag;\n\t}", "public function alm_filters_enqueue_scripts(){\n\n \t// Get ALM Options\n \t\t$options = get_option( 'alm_settings' );\n\n \t\t// JS and Localization\n \t\t$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; // Use minified libraries if SCRIPT_DEBUG is turned off\n \t\twp_register_script( 'ajax-load-more-filters', plugins_url( '/dist/js/filters'. $suffix .'.js', __FILE__ ), 'ajax-load-more', ALM_FILTERS_VERSION, true );\n\n \t\t// Enqueue CSS\n \t\tif(!alm_do_inline_css('_alm_inline_css') && !alm_css_disabled('_alm_filters_disable_css')){ // Not inline or disabled\n\n \t\t$file = ALM_FILTERS_URL.'/dist/css/styles.css';\n \tif(class_exists('ALM_ENQUEUE')){\n \tALM_ENQUEUE::alm_enqueue_css(ALM_FILTERS_SLUG, $file);\n \t}\n\n \t\t}\n\n \t\t// Datepickr Themes\n \t\twp_register_style( 'alm-flatpickr-default', ALM_FILTERS_URL . '/vendor/flatpickr/flatpickr.css' );\n \t\twp_register_style( 'alm-flatpickr-airbnb', ALM_FILTERS_URL . '/vendor/flatpickr/themes/airbnb.css' );\n \t\twp_register_style( 'alm-flatpickr-confetti', ALM_FILTERS_URL . '/vendor/flatpickr/themes/confetti.css' );\n \t\twp_register_style( 'alm-flatpickr-dark', ALM_FILTERS_URL . '/vendor/flatpickr/themes/dark.css' );\n \t\twp_register_style( 'alm-flatpickr-light', ALM_FILTERS_URL . '/vendor/flatpickr/themes/light.css' );\n \t\twp_register_style( 'alm-flatpickr-material_blue', ALM_FILTERS_URL . '/vendor/flatpickr/themes/material_blue.css' );\n \t\twp_register_style( 'alm-flatpickr-material_green', ALM_FILTERS_URL . '/vendor/flatpickr/themes/material_green.css' );\n \t\twp_register_style( 'alm-flatpickr-material_orange', ALM_FILTERS_URL . '/vendor/flatpickr/themes/material_orange.css' );\n \t\twp_register_style( 'alm-flatpickr-material_red', ALM_FILTERS_URL . '/vendor/flatpickr/themes/material_red.css' );\n\n \t}", "public function add_async_attribute( $tag, $handle ) {\n if(is_admin() || is_customize_preview()) return $tag;\n\n do_action('before_add_async_attribute', $tag ,$handle);\n\n if(isset($_GET['action'])) return $tag;\n\n if('jquery' === $handle || 'jquery-core' === $handle){\n return $tag;\n }\n\n if(function_exists('wc') && (is_woocommerce())){return $tag;}\n\n if(function_exists('is_checkout') && is_checkout()){\n return $tag;\n }\n return str_replace( ' src', ' defer src', $tag );\n }", "function uni_files(){\n // wp_enqueue_script('uni-main-js', get_theme_file_uri('/js/scripts-bundled.js'), NULL, '1.0', true);\n wp_enqueue_script('uni-main-js', get_theme_file_uri('/js/scripts-bundled.js'), NULL, microtime(), true);\n // wp_enqueue_style('uni_main_styles', get_stylesheet_uri());\n wp_enqueue_style('uni_main_styles', get_stylesheet_uri(), NULL, microtime());\n wp_enqueue_style('custom_google_font','//fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700,700i|Roboto:100,300,400,400i,700,700i');\n wp_enqueue_style('font-awesome','//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');\n }", "function smash_get_scripts() {\n\n\t$asset_uri = get_template_directory_uri();\n\t$js_uri = $asset_uri . '/assets/js/';\n\t$suffix = smash_get_script_suffix();\n\n\t$version = smash_get_script_version();\n\n\t$js_assets = array(\n\t\t'html5shiv' => array(\n\t\t\t'file' => $js_uri . 'html5shiv' . $suffix . '.js',\n\t\t\t'deps' => array(),\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => FALSE,\n\t\t\t'data' => array(\n\t\t\t\t'conditional' => 'IE 8',\n\t\t\t)\n\t\t),\n\t\t'smash-onload' => array(\n\t\t\t'file' => $js_uri . 'onload' . $suffix . '.js',\n\t\t\t'deps' => array(),\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => TRUE,\n\t\t\t'data' => array(\n\t\t\t\t'filters' => array(\n\t\t\t\t\t'loadjs' => array( 'async' => TRUE, 'onLoad' => TRUE )\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\t'smash-fastclick' => array(\n\t\t\t'file' => $js_uri . 'fastclick' . $suffix . '.js',\n\t\t\t'deps' => array(),\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => TRUE,\n\t\t\t'data' => array(\n\t\t\t\t'filters' => array(\n\t\t\t\t\t'loadjs' => array( 'async' => TRUE, 'onLoad' => TRUE )\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\t'smash-lazy-images' => array(\n\t\t\t'file' => $js_uri . 'lazy-images' . $suffix . '.js',\n\t\t\t'deps' => array(),\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => TRUE,\n\t\t\t'data' => array(\n\t\t\t\t'filters' => array(\n\t\t\t\t\t'loadjs' => array( 'async' => TRUE, 'onLoad' => TRUE )\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\t'smash-blocked' => array(\n\t\t\t'file' => $js_uri . 'blocked' . $suffix . '.js',\n\t\t\t'deps' => array(),\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => TRUE,\n\t\t\t'data' => array(\n\t\t\t\t'filters' => array(\n\t\t\t\t\t'loadjs' => array( 'async' => TRUE, 'onLoad' => TRUE )\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t);\n\n\tif ( is_singular() ) {\n\n\t\t// enqueue comments-reply script\n\t\t//if ( comments_open() ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t\t//}\n\n\t\t// codepen embed\n\t\t$js_assets[ 'codepen' ] = array(\n\t\t\t'file' => $js_uri . 'codepen.js',\n\t\t\t'deps' => array(),\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => TRUE,\n\t\t\t'data' => array(\n\t\t\t\t'filters' => array(\n\t\t\t\t\t'loadjs' => array( 'async' => TRUE, 'onLoad' => TRUE )\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t// prism\n\t\t$js_assets[ 'prism' ] = array(\n\t\t\t'file' => $js_uri . 'prism.js',\n\t\t\t'deps' => array(),\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => TRUE,\n\t\t\t'data' => array(\n\t\t\t\t'filters' => array(\n\t\t\t\t\t'loadjs' => array( 'async' => TRUE, 'onLoad' => TRUE )\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t// tablesaw - only when enabled via PostMeta in Backend.\n\t\t$meta = (bool) get_post_meta( get_the_ID(), 'enable_tablesaw', TRUE );\n\t\tif ( $meta ) {\n\t\t\t$js_assets[ 'tablesaw' ] = array(\n\t\t\t\t'file' => $js_uri . 'tablesaw' . $suffix . '.js',\n\t\t\t\t'deps' => array( 'jquery-core' ),\n\t\t\t\t'ver' => $version,\n\t\t\t\t'in_footer' => TRUE,\n\t\t\t);\n\t\t}\n\t}\n\n\t// check if the current post/page has ads deactivated\n\t$disable_ads = FALSE;\n\tif ( is_single() ) {\n\t\t$disable_ads = (bool) get_post_meta( get_the_ID(), 'disable_wholeads', TRUE );\n\t}\n\n\tif ( ! $disable_ads ) {\n\t\t$js_assets[ 'smash-ads' ] = array(\n\t\t\t'file' => $js_uri . 'ads' . $suffix . '.js',\n\t\t\t'deps' => '',\n\t\t\t'ver' => $version,\n\t\t\t'in_footer' => TRUE,\n\t\t\t'localize' => array(\n\t\t\t\t'AdsI18N' => array(\n\t\t\t\t\t'Advertisement' => __( 'Advertisement', 'smashing' )\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}\n\n\treturn $js_assets;\n}", "function input_admin_enqueue_scripts()\n\t{\n\t\t// register acf scripts\n\t\twp_enqueue_script('acf-input-font-awesome-select2', $this->settings['dir'] . 'js/select2/select2.min.js', array(), $this->settings['version']);\n\t\twp_enqueue_script('acf-input-font-awesome-edit-input', $this->settings['dir'] . 'js/edit_input.js', array(), $this->settings['version']);\n\t\twp_enqueue_style('acf-input-font-awesome-input', $this->settings['dir'] . 'css/input.css', array(), $this->settings['version']);\n\t\twp_enqueue_style('acf-input-font-awesome-fa', $this->stylesheet, array(), $this->version);\n\t\twp_enqueue_style('acf-input-font-awesome-select2-css', $this->settings['dir'] . 'css/select2.css', array(), $this->settings['version']);\n\t}", "function input_admin_enqueue_scripts() {\n\n\t\t$dir = plugin_dir_url( __FILE__ );\n\n\t\t// register & include JS\n//\t\twp_register_script( 'acf-address-render-field', \"{$dir}js/render_field.js\" );\n\t\twp_register_script( 'acf-address-render-field', \"{$dir}js/min/render_field-min.js\" );\n\t\twp_enqueue_script( 'acf-address-render-field' );\n\n\t\t// Adicionando o script personalizado para PT-BR\n\t\twp_register_script( 'acf-address-pt-br', \"{$dir}js/pt-br.js\" );\n\t\twp_enqueue_script( 'acf-address-pt-br' );\n\n\n\n\t\t// register & include CSS\n\t\twp_register_style( 'acf-input-address', \"{$dir}css/render_field.css\" );\n\t\twp_enqueue_style( 'acf-input-address' );\n\n\t}", "public static function use_inline_scripts(){\n return false;\n }", "function wp_enqueue_script( $handle, $src = '', $deps = array(), $ver = false, $in_footer = false ) {\n\t$wp_scripts = wp_scripts();\n\n\t_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );\n\n\n\tif ( $src || $in_footer ) {\n\t\t$_handle = explode( '?', $handle );\n\n\t\tif ( $src ) {\n\t\t\t$wp_scripts->add( $_handle[0], $src, $deps, $ver );\n\t\t}\n\n\t\tif ( $in_footer ) {\n\t\t\t$wp_scripts->add_data( $_handle[0], 'group', 1 );\n\t\t}\n\t}\n\n\t$wp_scripts->enqueue( $handle );\n}", "public function jsFileBundler()\n {\n return $this->fileFilter(\n 'scripts.js',\n $this->createPath('public/js'),\n new GlobAsset($this->createPath('assets/js/*')),\n $this->filters['js']\n );\n }", "function mila_scripts() {\n\twp_enqueue_style('font-awesome', get_template_directory_uri() . '/fontawesome-free-5.8.1-web/css/all.css' );\n\twp_enqueue_style('font-roboto', get_template_directory_uri() . '/font/fonts.css' );\n\twp_enqueue_style( 'mila-style', get_stylesheet_uri() );\n\n\t// add print JS only to Posts \n\t//https://developer.wordpress.org/reference/functions/wp_enqueue_script/\n\tif ( is_single() ) {\n wp_enqueue_script('my-script', get_template_directory_uri() . '/js/print.js', array(), 'null', true );\n } \n\n}", "public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}", "public function filterLoad($asset) {}", "function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) {\r\n\tglobal $wp_scripts;\r\n\tif ( !is_a($wp_scripts, 'WP_Scripts') )\r\n\t\t$wp_scripts = new WP_Scripts();\r\n\r\n\tif ( $src ) {\r\n\t\t$_handle = explode('?', $handle);\r\n\t\t$wp_scripts->add( $_handle[0], $src, $deps, $ver );\r\n\t\tif ( $in_footer )\r\n\t\t\t$wp_scripts->add_data( $_handle[0], 'group', 1 );\r\n\t}\r\n\t$wp_scripts->enqueue( $handle );\r\n}", "function enqueue_font_awesome_stylesheets(){\n wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');\n}", "public function get_script_depends() {\n\t\treturn array( 'uael-social-share' );\n\t}", "public function boot()\n {\n Blade::directive('fa', function ($arguments) {\n list($icon, $attributes) = explode(',', str_replace(['(', ')', ' ', \"'\"], '', $arguments), 2);\n\n $options = [];\n\n if ($attributes != '') {\n $rawAttributes = str_replace(['array(', '[', ']', ')'], '', $attributes);\n $arrAttributes = explode(',', $rawAttributes);\n\n if (count($arrAttributes) > 0) {\n foreach ($arrAttributes as $string) {\n $attr = explode('=>', $string);\n $options[$attr[0]] = $attr[1];\n }\n }\n }\n\n return (new LaravelFontAwesome())->icon($icon, $options);\n });\n }", "function ct_remove_assets() {\n wp_dequeue_style( 'bigcommerce-styles' );\n\n if ( ct_is_pagespeed() ) {\n wp_dequeue_script( 'bigcommerce-manifest' );\n wp_dequeue_script( 'bigcommerce-vendors' );\n wp_dequeue_script( 'bigcommerce-scripts' );\n } else {\n wp_enqueue_script( 'smile.io', 'https://cdn.sweettooth.io/assets/storefront.js', array(), '1.0', true );\n }\n}", "function limpiahtml($salida){\n $regex = \"/<script.*?>.*?<\\/script>/ims\";\n preg_match_all($regex, $salida, $matches, null, 0);\n if(count($matches)>0){\n $tags2add = \"\"; \n foreach($matches[0] as $tag){\n if(!strstr($tag, \"inmovil\")){\n $retag = $tag;\n $tag = JSMin::minify($tag);\n $tags2add .= $tag;\n $salida = str_replace($retag, \"\", $salida);\n }\n }\n } \n $salida = minify_html($salida);\n\n\n $salida = str_replace(array(\"</body>\"),array($tags2add.\"</body>\"),$salida);\n return $salida;\n echo preg_last_error();\n}", "function field_group_admin_enqueue_scripts()\n\t{\n\t\t// register acf scripts\n\t\twp_enqueue_script('font-awesome-select2', $this->settings['dir'] . 'js/select2/select2.min.js', array(), $this->settings['version']);\n\t\twp_enqueue_script('font-awesome-create-input', $this->settings['dir'] . 'js/create_input.js', array(), $this->settings['version']);\n\t\twp_enqueue_style('acf-input-font-awesome-input', $this->settings['dir'] . 'css/input.css', array(), $this->settings['version']);\n\t\twp_enqueue_style('acf-input-font-awesome-fa', $this->stylesheet, array(), $this->version);\n\t\twp_enqueue_style('acf-input-font-awesome-select2-css', $this->settings['dir'] . 'css/select2.css', array(), $this->settings['version']);\n\t}", "public function withScript(ScriptElement $script, $scope = 'header');", "function debounce_activate_third_party() {\r\r\n\r\r\n\t// The ajax request endpoint is public now.\r\r\n\tadd_filter( 'debounce_api_is_private', '__return_false' );\r\r\n\tadd_action( 'wp_enqueue_scripts', array( DEBOUNCE_Plugin::get_instance(), 'enqueue_frontend' ), 11 );\r\r\n\tadd_action( 'wp_footer', array( DEBOUNCE_Plugin::get_instance(), 'footer_styles' ) );\r\r\n}", "public static function maybe_enqueue_scripts() {\n\n\t\tif ( self::contains_grunion_shortcode() ){\n\t\t\t$grunion_handle = 'grunion-ajax';\n\n\t\t\twp_enqueue_script( $grunion_handle, self::$grunion_dir_url . '/grunion-ajax.js', array( 'jquery' ) );\n\t\t\t$object_name = 'grunionAjax';\n\t\t\t$script_data = array( \n\t\t\t\t'loadingImageUri' => self::$grunion_dir_url . '/loader.gif',\n\t\t\t\t'ajaxUri' => admin_url( 'admin-ajax.php' )\n\t\t\t);\n\n\t\t\twp_localize_script( $grunion_handle, $object_name, $script_data );\n\t\t}\n\t}", "function ka_enqueue_scripts() {\n\n /* Adiciona o script principal do tema */\n wp_enqueue_script( 'main', get_bundle_file( 'assets/js/dist/', 'index.*.js' ) , null, null, true );\n }", "function feistner_scripts() {\n\n\twp_enqueue_style( 'feistner-style', get_stylesheet_uri() );\n\twp_enqueue_style( 'feistner-body-font', 'https://fonts.googleapis.com/css?family=Raleway:300,400,400i,700' );\n\twp_enqueue_style( 'feistner-headline-font', 'https://fonts.googleapis.com/css?family=Arvo:400,700' );\n\n\twp_enqueue_style( 'font-awesome-cdn' , 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', array(), '4.4.0');\n\n\twp_enqueue_script( 'feistner-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );\n\n\twp_enqueue_script( 'feistner-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "public function autocomplete_enqueue_scripts() {\n\t\twp_enqueue_script( 'jquery-ui-autocomplete' );\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script('autocomplete-js-2', plugin_dir_url( __FILE__ ).'js/wp6.js', array('jquery'));\n\t\twp_localize_script('autocomplete-js-2', 'autojs', array('ajax_url'=>admin_url('admin-ajax.php')));\n\t}", "function asc_deregister_script( $handle ) {\n\tglobal $asc_scripts;\n\tif ( ! is_a( $asc_scripts, 'ASC_Scripts' ) ) {\n\t\tif ( ! did_action( 'init' ) )\n\t\t\t_doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),\n\t\t\t\t'<code>asc_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );\n\t\t$asc_scripts = new ASC_Scripts();\n\t}\n\n\t/**\n\t * Do not allow accidental or negligent de-registering of critical scripts in the admin.\n\t * Show minimal remorse if the correct hook is used.\n\t */\n\t$current_filter = current_filter();\n\tif ( ( is_admin() && 'admin_enqueue_scripts' !== $current_filter ) ||\n\t\t( 'wp-login.php' === $GLOBALS['pagenow'] && 'login_enqueue_scripts' !== $current_filter )\n\t) {\n\t\t$no = array(\n\t\t\t'jquery', 'jquery-core', 'jquery-migrate', 'jquery-ui-core', 'jquery-ui-accordion',\n\t\t\t'jquery-ui-autocomplete', 'jquery-ui-button', 'jquery-ui-datepicker', 'jquery-ui-dialog',\n\t\t\t'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-menu', 'jquery-ui-mouse',\n\t\t\t'jquery-ui-position', 'jquery-ui-progressbar', 'jquery-ui-resizable', 'jquery-ui-selectable',\n\t\t\t'jquery-ui-slider', 'jquery-ui-sortable', 'jquery-ui-spinner', 'jquery-ui-tabs',\n\t\t\t'jquery-ui-tooltip', 'jquery-ui-widget', 'underscore', 'backbone',\n\t\t);\n\n\t\tif ( in_array( $handle, $no ) ) {\n\t\t\t$message = sprintf( __( 'Do not deregister the %1$s script in the administration area. To target the frontend theme, use the %2$s hook.' ),\n\t\t\t\t\"<code>$handle</code>\", '<code>asc_enqueue_scripts</code>' );\n\t\t\t_doing_it_wrong( __FUNCTION__, $message, '3.6' );\n\t\t\treturn;\n\t\t}\n\t}\n\n\t$asc_scripts->remove( $handle );\n}", "function smash_enqueue_scripts() {\n\n\tglobal $wp_scripts;\n\n\t$js_assets = smash_get_scripts();\n\n\tforeach ( $js_assets AS $handle => $asset ) {\n\n\t\twp_enqueue_script( $handle, $asset[ 'file' ], $asset[ 'deps' ], $asset[ 'ver' ], $asset[ 'in_footer' ] );\n\n\t\t// checking for localize script args\n\t\tif ( array_key_exists( 'localize', $asset ) && ! empty( $asset[ 'localize' ] ) ) {\n\t\t\tforeach ( $asset[ 'localize' ] as $name => $args ) {\n\t\t\t\twp_localize_script( $handle, $name, $args );\n\t\t\t}\n\t\t}\n\n\t\tif ( array_key_exists( 'data', $asset ) ) {\n\t\t\tforeach ( $asset[ 'data' ] as $key => $value ) {\n\t\t\t\t$wp_scripts->add_data( $handle, $key, $value );\n\t\t\t}\n\t\t}\n\n\t}\n}" ]
[ "0.7237725", "0.6505373", "0.6418179", "0.6246111", "0.59877104", "0.59083897", "0.5795956", "0.5675229", "0.5587274", "0.54035765", "0.53767705", "0.53493905", "0.5349385", "0.5293278", "0.52620023", "0.52599305", "0.5229869", "0.5225538", "0.52089006", "0.5190596", "0.5188605", "0.51255214", "0.50795376", "0.5071968", "0.5063119", "0.50477403", "0.5018843", "0.5018157", "0.50087327", "0.50084317", "0.5001649", "0.49524727", "0.49278435", "0.49274188", "0.49224377", "0.49127543", "0.49080282", "0.49071765", "0.4896563", "0.48835486", "0.48722875", "0.48697418", "0.48403957", "0.48387486", "0.48303965", "0.48216188", "0.48189938", "0.4809049", "0.48077717", "0.4804979", "0.47959232", "0.4789189", "0.47798377", "0.47750342", "0.4774464", "0.477428", "0.47697866", "0.47605333", "0.47603408", "0.47544298", "0.47339702", "0.47257754", "0.47143313", "0.47060585", "0.47026983", "0.4699728", "0.46953952", "0.4678688", "0.46756494", "0.46749392", "0.46696982", "0.4661001", "0.46556735", "0.46554196", "0.4650977", "0.46509007", "0.46492505", "0.46395507", "0.4632077", "0.46304482", "0.46277428", "0.46276733", "0.46217772", "0.462013", "0.46182576", "0.4606974", "0.4594218", "0.45894578", "0.45868385", "0.4582342", "0.45774347", "0.45690134", "0.45666668", "0.45562962", "0.45544517", "0.4548287", "0.454608", "0.45453715", "0.454512", "0.4536389" ]
0.7009983
1
Add support for custom color palettes in Gutenberg.
Добавить поддержку пользовательских палитр цветов в Gutenberg.
function tewwie_gutenberg_color_palette() { add_theme_support( 'editor-color-palette', array( array( 'name' => esc_html__( 'Primary', '@@textdomain' ), 'slug' => 'primary', 'color' => 'rgb(94, 114, 228)', ), array( 'name' => esc_html__( 'Secondary', '@@textdomain' ), 'slug' => 'secondary', 'color' => 'rgb(245, 54, 92)', ), array( 'name' => esc_html__( 'Green', '@@textdomain' ), 'slug' => 'green', 'color' => 'rgb(67, 170, 139)', ), array( 'name' => esc_html__( 'Dark Grey', '@@textdomain' ), 'slug' => 'dark-grey', 'color' => 'rgb(68,68,68)', ) ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hotel_lux_gutenberg_support() {\r\n\t$colors = cmsmasters_color_picker_palettes();\r\n\t\r\n\t$color_palette = array();\r\n\t\r\n\t\r\n\tforeach ($colors as $color) {\r\n\t\t$color_palette[] = array(\r\n\t\t\t'color' => $color,\r\n\t\t);\r\n\t}\r\n\t\r\n\t\r\n\tadd_theme_support('editor-color-palette', $color_palette);\r\n}", "function lalita_enqueue_color_palettes() {\n\t\t// Old versions of WP don't get nice things\n\t\tif ( ! function_exists( 'wp_add_inline_script' ) )\n\t\t\treturn;\n\n\t\t// Grab our palette array and turn it into JS\n\t\t$palettes = json_encode( lalita_get_default_color_palettes() );\n\n\t\t// Add our custom palettes\n\t\t// json_encode takes care of escaping\n\t\twp_add_inline_script( 'wp-color-picker', 'jQuery.wp.wpColorPicker.prototype.options.palettes = ' . $palettes . ';' );\n\t}", "function dg_gutenberg_custom_colors() {\n\t\n\t// disable custom colors\n\tadd_theme_support( 'disable-custom-colors' );\n\t\n\t// add custom color palette\n\tadd_theme_support( 'editor-color-palette', array(\n\t\tarray(\n\t\t\t'name' => __( 'Pale Lemon Yellow', 'dehli-grolimund' ),\n\t\t\t'slug' => 'pale-lemon-yellow',\n\t\t\t'color'\t=> '#fceeb2',\n\t\t),\t\n\t\tarray(\n\t\t\t'name' => __( 'Hermosa Pink', 'dehli-grolimund' ),\n\t\t\t'slug' => 'hermosa-pink',\n\t\t\t'color'\t=> '#e6bdc3',\n\t\t),\n\t\tarray(\n\t\t\t'name' => __( 'Coral Red', 'dehli-grolimund' ),\n\t\t\t'slug' => 'coral-red',\n\t\t\t'color'\t=> '#d98c7f',\n\t\t),\n\t\tarray(\n\t\t\t'name' => __( 'Pale Kings Blue', 'dehli-grolimund' ),\n\t\t\t'slug' => 'pale-king-blue',\n\t\t\t'color'\t=> '#aeced7',\n\t\t),\n\t\tarray(\n\t\t\t'name' => __( 'Olympic Blue', 'dehli-grolimund' ),\n\t\t\t'slug' => 'olympic-blue',\n\t\t\t'color'\t=> '#5f769c',\n\t\t),\t\t\n\t\tarray(\n\t\t\t'name' => __( 'Cobalt Green', 'dehli-grolimund' ),\n\t\t\t'slug' => 'cobalt-green',\n\t\t\t'color'\t=> '#9ec7a2',\n\t\t),\t\t\n\t\tarray(\n\t\t\t'name' => __( 'Venice Green', 'dehli-grolimund' ),\n\t\t\t'slug' => 'venice-green',\n\t\t\t'color'\t=> '#7cbbb1',\n\t\t),\n\n\t) );\t\n}", "public function custom_color_variables() {\n\t\tif ( 'd1e4dd' !== strtolower( get_theme_mod( 'background_color', 'D1E4DD' ) ) ) {\n\t\t\twp_add_inline_style( 'twenty-twenty-one-style', $this->generate_custom_color_variables() );\n\t\t}\n\t}", "function fp_setup() {\n\t\n\tadd_theme_support('custom-background', array('default-color' => 'ffffff'));\n\t\n}", "function hello_pro_inline_color_palette() {\n\t$css = '';\n\n\t$appearance = genesis_get_config( 'appearance' );\n\n\t$editor_color_palette = $appearance['editor-color-palette'];\n\n\tforeach ( $editor_color_palette as $color_info ) {\n\n\t\t$css .= sprintf(\n\t\t\t'.site-container .has-%1$s-color,\n\t\t.site-container .wp-block-button .wp-block-button__link.has-%1$s-color,\n\t\t.site-container .wp-block-button.is-style-outline .wp-block-button__link.has-%1$s-color {\n\t\t\tcolor: %2$s;\n\t\t}\n\n\t\t.site-container .has-%1$s-background-color,\n\t\t.site-container .wp-block-button .wp-block-button__link.has-%1$s-background-color,\n\t\t.site-container .wp-block-pullquote.is-style-solid-color.has-%1$s-background-color {\n\t\t\tbackground-color: %2$s;\n\t\t}\n\n\t\t',\n\t\t\t$color_info['slug'],\n\t\t\t$color_info['color']\n\t\t);\n\n\t}\n\n\t// Get Primary Color.\n\t$color_primary = get_theme_mod( 'hello_pro_link_color', $appearance['default-colors']['primary'] );\n\n\t// Get Secondary Color.\n\t$color_secondary = get_theme_mod( 'hello_pro_accent_color', $appearance['default-colors']['secondary'] );\n\n\t// Define Primary Color elements.\n\t$css .= sprintf(\n\t\t'/* PRIMARY COLOR */\n\t\ta,\n\t\t.home-features > .wrap > .widget .textwidget > h3 > span,\n\t\t.social-proof-slider-wrap .testimonial-item .testimonial-text .author .author-name,\n\t\t.entry-header .entry-meta .entry-comments-link a,\n\t\t.footer-widgets a:hover,\n\t\t.footer-widgets a:focus,\n\t\t.genesis-nav-menu a:focus,\n\t\t.genesis-nav-menu a:hover,\n\t\t.genesis-nav-menu .current-menu-item > a,\n\t\t.genesis-nav-menu .sub-menu .current-menu-item > a:focus,\n\t\t.genesis-nav-menu .sub-menu .current-menu-item > a:hover,\n\t\t.genesis-nav-menu .current-menu-parent > a,\n\t\t.menu-toggle:focus,\n\t\t.menu-toggle:hover,\n\t\t.sub-menu-toggle:focus,\n\t\t.sub-menu-toggle:hover,\n\t\ta:hover,\n\t\t.entry-meta a,\n\t\t.entry-meta a:hover,\n\t\t.entry-meta a:focus,\n\t\t.footer-widgets .entry-title a:hover,\n\t\t.site-footer a:hover,\n\t\t.site-footer a:focus,\n\t\t.entry-content .featured-articles button.slick-arrow > span,\n\t\t.entry-content .featured-articles ul.slick-dots li button::before,\n\t\t.entry-content .featured-articles ul.slick-dots li.slick-active button:before {\n\t\t\tcolor: %1$s;\n\t\t}\n\n\t\t.menu-toggle,\n\t\t.archive-pagination li a,\n\t\ta.button,\n\t\tbutton,\n\t\tinput[type=\"button\"],\n\t\tinput[type=\"reset\"],\n\t\tinput[type=\"submit\"],\n\t\t.sidebar .enews-widget input[type=\"submit\"],\n\t\t.sidebar-primary .widget input[type=\"submit\"],\n\t\t.sidebar-primary .widget .button,\n\t\t.wpforms-form button[type=submit] {\n\t\t\tbackground-color: %1$s;\n\t\t\tcolor: %2$s !important;\n\t\t}\n\n\t\t.entry-content .featured-articles .featured-article {\n\t\t\tbackground-color: %1$s !important;\n\t\t}\n\n\t\t.wp-block-button .wp-block-button__link.has-primary-background-color,\n\t\t.ab-block-button > .ab-button,\n\t\t.gb-block-button > .gb-button {\n\t\t\tbackground-color: %1$s !important;\n\t\t\tcolor: %2$s !important;\n\t\t}\n\n\t\t.wp-block-button .wp-block-button__link:not(.has-background) {\n\t\t background-color: %1$s !important;\n\t\t}\n\n\t\t.wp-block-button.is-style-outline .wp-block-button__link:not(.has-background):not(.has-text-color),\n\t\t.wp-block-button.is-style-outline .wp-block-button__link.has-primary-background-color {\n\t\t\tbackground-color: transparent !important;\n\t\t border-color: %1$s !important;\n\t\t\tcolor: %1$s !important;\n\t\t}\n\n\t\t',\n\t\t$color_primary,\n\t\thello_pro_color_contrast( $color_primary )\n\t);\n\n\t// Define Secondary Color elements.\n\t$css .= sprintf(\n\t\t'/* SECONDARY COLOR */\n\t\t.menu-toggle:focus,\n\t\t.menu-toggle:hover,\n\t\t.archive-pagination li a:hover,\n\t\t.archive-pagination li a:focus,\n\t\t.archive-pagination li.active a,\n\t\t.button:hover,\n\t\t.button:focus,\n\t\ta.button:hover,\n\t\ta.button:focus,\n\t\tbutton:not(.slick-arrow):hover,\n\t\tbutton:not(.slick-arrow):focus,\n\t\tbutton:not(id^=\"slick-\"),\n\t\tinput:hover[type=\"button\"],\n\t\tinput:hover[type=\"reset\"],\n\t\tinput:hover[type=\"submit\"],\n\t\tinput:focus[type=\"button\"],\n\t\tinput:focus[type=\"reset\"],\n\t\tinput:focus[type=\"submit\"],\n\t\t.sidebar-primary .widget .button:focus,\n\t\t.sidebar-primary .widget .button:hover,\n\t\t.sidebar .enews-widget input[type=\"submit\"]:focus,\n\t\t.sidebar .enews-widget input[type=\"submit\"]:hover,\n\t\t.wpforms-form button[type=submit]:focus,\n\t\t.wpforms-form button[type=submit]:hover {\n\t\t\tbackground-color: %1$s !important;\n\t\t\tcolor: %2$s !important;\n\t\t}\n\n\t\t.wp-block-button .wp-block-button__link:not(.has-background):hover {\n\t\t background-color: %1$s !important;\n\t\t\tcolor: %2$s !important;\n\t\t}\n\n\t\t.wp-block-button.is-style-outline .wp-block-button__link.has-secondary-background-color {\n\t\t\tbackground-color: transparent !important;\n\t\t border-color: %1$s !important;\n\t\t\tcolor: %1$s !important;\n\t\t}\n\n\t\t.wp-block-button.is-style-outline .wp-block-button__link:focus,\n\t\t.wp-block-button.is-style-outline .wp-block-button__link:hover,\n\t\t.wp-block-button.is-style-outline .wp-block-button__link:not(.has-background):focus,\n\t\t.wp-block-button.is-style-outline .wp-block-button__link:not(.has-background):hover {\n\t\t\tbackground-color: %1$s !important;\n\t\t\tborder-color: %1$s !important;\n\t\t\tcolor: %2$s !important;\n\t\t}',\n\t\t$color_secondary,\n\t\thello_pro_color_contrast( $color_secondary )\n\t);\n\n\treturn $css;\n}", "function dizzy7_gutenberg_features() {\n\t\t\n\n// Theme supports wide images, galleries and videos.\n add_theme_support( 'align-wide' );\n add_theme_support( 'align-full' );\n add_theme_support( 'wide-images' );\n \n add_theme_support(\n\t\t'editor-color-palette', array(\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Main Color', '@@textdomain' ),\n\t\t\t\t'slug' => 'main-color',\n\t\t\t\t'color' => get_theme_mod( 'diz-theme-main-color'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Second Color', '@@textdomain' ),\n\t\t\t\t'slug' => 'second-color',\n\t\t\t\t'color' => get_theme_mod( 'diz-theme-second-color'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Highlight Color', '@@textdomain' ),\n\t\t\t\t'slug' => 'highlight-color',\n\t\t\t\t'color' => get_theme_mod( 'diz-theme-third-color'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Special Color', '@@textdomain' ),\n\t\t\t\t'slug' => 'special-color',\n\t\t\t\t'color' => get_theme_mod( 'diz-theme-fourth-color'),\n\t\t\t)\n\t\t)\n\t);\n}", "public function colors()\n {\n $section = self::$panel . '_colors';\n\n /**\n * Add Section and fields for Colors\n */\n Customizer::addSection($section, array(\n 'title' => esc_html__('Colors', 'stage'),\n 'description' => esc_html__('Set color settings for your website', 'stage'),\n 'priority' => 60,\n 'panel' => self::$panel,\n ));\n\n // Fields are calculated from ColorsPanel.php\n }", "function wp_register_colors_support($block_type)\n {\n }", "protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }", "function register_admin_color_schemes()\n {\n }", "public function editor_custom_color_variables() {\n\t\twp_enqueue_style(\n\t\t\t'twenty-twenty-one-custom-color-overrides',\n\t\t\tget_theme_file_uri( 'assets/css/custom-color-overrides.css' ),\n\t\t\tarray(),\n\t\t\t(string) filemtime( get_theme_file_path( 'assets/css/custom-color-overrides.css' ) )\n\t\t);\n\n\t\t$background_color = get_theme_mod( 'background_color', 'D1E4DD' );\n\t\tif ( 'd1e4dd' !== strtolower( $background_color ) ) {\n\t\t\twp_add_inline_style( 'twenty-twenty-one-custom-color-overrides', $this->generate_custom_color_variables( 'editor' ) );\n\t\t}\n\t}", "function CustomThemeSupport(){\n // coloring\n if(!empty(SELF::$WPgutenberg_ColorPalette)):\n $newColors = array();\n foreach (SELF::$WPgutenberg_ColorPalette as $colorkey => $color) {\n $newColors[] = array(\n 'name' => __( $color[\"key\"], 'WPgutenberg' ),\n 'slug' => prefix_core_BaseFunctions::Slugify($color[\"key\"]),\n 'color'\t=> $color[\"value\"],\n );\n }\n add_theme_support( 'editor-color-palette', $newColors );\n endif;\n // font sizes\n if(!empty(SELF::$WPgutenberg_FontSizes)):\n $newColors = array();\n foreach (SELF::$WPgutenberg_FontSizes as $sizekey => $size) {\n $newColors[] = array(\n 'name' => __( $size[\"key\"], 'WPgutenberg' ),\n 'slug' => prefix_core_BaseFunctions::Slugify($size[\"key\"]),\n 'size'\t=> $size[\"value\"],\n );\n }\n add_theme_support( 'editor-font-sizes', $newColors );\n // disable custom color picker\n if(SELF::$WPgutenberg_ColorPalette_CP == 0):\n add_theme_support( 'disable-custom-colors');\n endif;\n endif;\n // disable default patterns\n if($this->WPgutenberg_DefaultPatterns == 0):\n remove_theme_support( 'core-block-patterns' );\n endif;\n\n }", "function colloquium_theme_setup() {\n add_action('wp_head', 'colloquium_bbpress_custom_color');\n}", "function shell_custom_background(){\r\n\r\n\t\t/* Custom Background */\r\n\t\tadd_theme_support( 'custom-background', array( 'default-color' => 'f9f9f9' ) );\r\n\t}", "function themename_customize_color_register( $wp_customize ) {\n\t$wp_customize->get_setting( 'themename_theme_bgcolor1' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_header_bgcolor' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_theme_hovercolor' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_widget_bgcolor' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_mainpost_bgcolor' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_popularpost_bgcolor' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_a_bgcolor' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_text_color' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'themename_readmore_bgcolor' )->transport = 'postMessage';\n}", "public function useColor($name);", "function WPBC_after_setup_theme__customs(){\n\t$defaults = array(\n\t\t'default-color' => 'red',\n\t\t'default-image' => '',\n\t\t'default-repeat' => 'no-repeat',\n\t\t'default-position-x' => 'center',\n\t\t'default-position-y' => 'center',\n\t\t'default-size' => 'cover',\n\t\t'default-attachment' => 'fixed',\n\t\t'wp-head-callback' => '_custom_background_cb',\n\t\t'admin-head-callback' => '',\n\t\t'admin-preview-callback' => ''\n\t);\n\t// add_theme_support( 'custom-background', $defaults );\n\t\n}", "function ux_mce4_options( $init ) {\r\n global $flatsome_opt;\r\n $default_colours = '\r\n \"000000\", \"Black\", \"993300\", \"Burnt orange\", \"333300\", \"Dark olive\", \"003300\", \"Dark green\", \"003366\", \"Dark azure\", \"000080\", \"Navy Blue\", \"333399\", \"Indigo\", \"333333\", \"Very dark gray\", \r\n \"800000\", \"Maroon\", \"FF6600\", \"Orange\", \"808000\", \"Olive\", \"008000\", \"Green\", \"008080\", \"Teal\", \"0000FF\", \"Blue\", \"666699\", \"Grayish blue\", \"808080\", \"Gray\", \r\n \"FF0000\", \"Red\", \"FF9900\", \"Amber\", \"99CC00\", \"Yellow green\", \"339966\", \"Sea green\", \"33CCCC\", \"Turquoise\", \"3366FF\", \"Royal blue\", \"800080\", \"Purple\", \"999999\", \"Medium gray\", \r\n \"FF00FF\", \"Magenta\", \"FFCC00\", \"Gold\", \"FFFF00\", \"Yellow\", \"00FF00\", \"Lime\", \"00FFFF\", \"Aqua\", \"00CCFF\", \"Sky blue\", \"993366\", \"Brown\", \"C0C0C0\", \"Silver\", \r\n \"FF99CC\", \"Pink\", \"FFCC99\", \"Peach\", \"FFFF99\", \"Light yellow\", \"CCFFCC\", \"Pale green\", \"CCFFFF\", \"Pale cyan\", \"99CCFF\", \"Light sky blue\", \"CC99FF\", \"Plum\", \"FFFFFF\", \"White\"\r\n ';\r\n $custom_colours = '\r\n \"e14d43\", \"Primary Color\", \"d83131\", \"Color 2 Name\", \"ed1c24\", \"Color 3 Name\", \"f99b1c\", \"Color 4 Name\", \"50b848\", \"Color 5 Name\", \"00a859\", \"Color 6 Name\", \"00aae7\", \"Color 7 Name\", \"282828\", \"Color 8 Name\"\r\n ';\r\n $init['textcolor_map'] = '['.$custom_colours.','.$default_colours.']';\r\n return $init;\r\n }", "function wp_apply_colors_support($block_type, $block_attributes)\n {\n }", "protected function parsePalettes(ContainerInterface $container)\n {\n $palettesDca = $this->getFromDca('palettes');\n\n // Skip while there is no extended palette definition.\n if (!is_callable($palettesDca)) {\n return;\n }\n\n if ($container->hasDefinition(PalettesDefinitionInterface::NAME)) {\n $palettesDefinition = $container->getDefinition(PalettesDefinitionInterface::NAME);\n } else {\n $palettesDefinition = new DefaultPalettesDefinition();\n $container->setDefinition(PalettesDefinitionInterface::NAME, $palettesDefinition);\n }\n\n call_user_func($palettesDca, $palettesDefinition, $container);\n }", "public function changeEditorColorPalette(): void\n\t{\n\t\t// Unable to use state due to this method is used in JS and store is not registered there.\n\t\t$colors = $this->getSettingsManifest()['globalVariables']['colors'] ?? [];\n\n\t\tif ($colors) {\n\t\t\t\\add_theme_support('editor-color-palette', $colors);\n\t\t}\n\t}", "public function tcb_get_palettes_from_config() {\n\t\treturn ! empty( $this->skin_palettes_config['palette'] ) ? $this->skin_palettes_config['palette'] : [];\n\t}", "function alt_add_color_scheme()\n {\n wp_admin_css_color(\n 'alt-design',\n __('Alt Design', 'alt-design-color-scheme'),\n get_template_directory_uri() . '/lib/alt-admin/css/admin-color-scheme.css',\n array('#25282b', '#363b3f', '#ff6600', '#ff6600')\n );\n }", "function techfak_color_schemes() {\n\t$color_scheme_options = array(\n\t\t'blau' => array(\n\t\t\t'value' => 'blau',\n\t\t\t'label' => __( 'Blue', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-blau.png',\n\t\t),\n\t\t'graublau' => array(\n\t\t\t'value' => 'graublau',\n\t\t\t'label' => __( 'Blue-grey', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-graublau.png',\n\t\t),\n\t\t'karibikgruen' => array(\n\t\t\t'value' => 'karibikgruen',\n\t\t\t'label' => __( 'Caribic-green', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-karibikgruen.png',\n\t\t),\n\t\t'gruen' => array(\n\t\t\t'value' => 'gruen',\n\t\t\t'label' => __( 'Green', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-gruen.png',\n\t\t),\n\t\t'hellblau' => array(\n\t\t\t'value' => 'hellblau',\n\t\t\t'label' => __( 'Light-blue', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-hellblau.png',\n\t\t),\n\t\t'orange' => array(\n\t\t\t'value' => 'orange',\n\t\t\t'label' => __( 'Orange', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-orange.png',\n\t\t),\n\t\t'rot' => array(\n\t\t\t'value' => 'rot',\n\t\t\t'label' => __( 'Red', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-rot.png',\n\t\t),\n\t\t'gelb' => array(\n\t\t\t'value' => 'gelb',\n\t\t\t'label' => __( 'Yellow', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-gelb.png',\n\t\t),\n\n\t);\n\n\treturn apply_filters( 'techfak_color_schemes', $color_scheme_options );\n}", "function capezzahill_colors_css_wrap() {\r\n\t// Only include custom colors in customizer or frontend.\r\n\tif ( ( ! is_customize_preview() && 'default' === get_theme_mod( 'primary_color', 'default' ) ) || is_admin() ) {\r\n\t\treturn;\r\n\t}\r\n\trequire_once get_parent_theme_file_path( '/inc/color-patterns.php' );\r\n\t$primary_color = 199;\r\n\tif ( 'default' !== get_theme_mod( 'primary_color', 'default' ) ) {\r\n\t\t$primary_color = get_theme_mod( 'primary_color_hue', 199 );\r\n\t}\r\n\t?>\r\n\r\n\t<style type=\"text/css\" id=\"custom-theme-colors\" <?php echo is_customize_preview() ? 'data-hue=\"' . absint( $primary_color ) . '\"' : ''; ?>>\r\n\t\t<?php echo capezzahill_custom_colors_css(); ?>\r\n\t</style>\r\n\t<?php\r\n}", "function land_theme_customizer( $wp_customize ){\r\n\r\n $wp_customize->add_setting(\r\n 'primary_color',\r\n array(\r\n 'default' => '#ff5c36'\r\n )\r\n );\r\n $wp_customize->add_control(\r\n new WP_Customize_Color_Control(\r\n $wp_customize,\r\n 'primary_color',\r\n array(\r\n 'label' => __('Primary color', 'land'),\r\n 'section' => 'colors',\r\n 'priority' => 9\r\n )\r\n )\r\n );\r\n\r\n $wp_customize->add_setting(\r\n 'header_bg_color',\r\n array(\r\n 'default' => '#f5f5f5'\r\n )\r\n );\r\n $wp_customize->add_control(\r\n new WP_Customize_Color_Control(\r\n $wp_customize,\r\n 'header_bg_color',\r\n array(\r\n 'label' => __('Header background color', 'land'),\r\n 'section' => 'background_image',\r\n 'priority' => 9\r\n )\r\n )\r\n );\r\n}", "function twentyseventeen_colors_css_wrap() {\n\tif ( 'custom' !== get_theme_mod( 'colorscheme' ) && ! is_customize_preview() ) {\n\t\treturn;\n\t}\n\n\trequire_once( get_parent_theme_file_path( '/inc/color-patterns.php' ) );\n\t$hue = absint( get_theme_mod( 'colorscheme_hue', 250 ) );\n?>\n\t<style type=\"text/css\" id=\"custom-theme-colors\" <?php if ( is_customize_preview() ) { echo 'data-hue=\"' . $hue . '\"'; } ?>>\n\t\t<?php echo twentyseventeen_custom_colors_css(); ?>\n\t</style>\n<?php }", "function my_mce4_options($init) {\n\t$default_colors = '';\n\tif(get_field('wysiwyg_colors','option')):\n\t\twhile(has_sub_field('wysiwyg_colors','option')):\n\t\t\t$default_colors .= '\"' . ltrim(get_sub_field('color'), '#') . '\", \"' . get_sub_field('color_name') . '\",';\n\t\tendwhile;\n\tendif;\n\t$init['textcolor_map'] = '['.$default_colors.']';\n\treturn $init;\n}", "function puzzle_modify_puzzle_colors($colors) {\n /* Edit existing theme colors */\n // $colors->theme_color('primary')->set_color('#f6a4cd')\n // ->set_name('Pink')\n // ->set_text_color_scheme('dark');\n \n /* Remove existing theme colors */\n // $colors->remove_theme_color('dark-gray');\n \n /* Add new colors */\n // $accent = new PuzzleColor(array(\n // 'name' => __('Accent Color'),\n // 'id' => 'accent',\n // 'color' => '#f00',\n // 'text_color_scheme' => 'light',\n // 'order' => 11\n // ));\n // $colors->add_theme_color($accent);\n \n /* Edit text colors */\n // $colors->set_text_colors(array(\n // 'headline_dark' => '#333',\n // 'text_dark' => '#555',\n // 'headline_light' => '#fff',\n // 'text_light' => '#fff'\n // ));\n \n /* Edit link colors */\n // $colors->set_link_colors(array(\n // 'link_dark' => '#3b54a5',\n // 'link_dark_hover' => '#2cb799',\n // 'link_light' => '#fff',\n // 'link_light_hover' => 'rgba(255, 255, 255, 0.75)'\n // ));\n}", "function modshrink_s_register_custom_background() {\n\t$args = array(\n\t\t'default-color' => 'ffffff',\n\t\t'default-image' => '',\n\t);\n\n\t$args = apply_filters( 'modshrink_s_custom_background_args', $args );\n\n\tif ( function_exists( 'wp_get_theme' ) ) {\n\t\tadd_theme_support( 'custom-background', $args );\n\t} else {\n\t\tdefine( 'BACKGROUND_COLOR', $args['default-color'] );\n\t\tif ( ! empty( $args['default-image'] ) )\n\t\t\tdefine( 'BACKGROUND_IMAGE', $args['default-image'] );\n\t\tadd_custom_background();\n\t}\n}", "function get_peepso_color_template() {\n $color = \"\";\n\n if (class_exists( 'PeepSo' )) {\n $color = PeepSo::get_option('site_css_template','');\n }\n\n return $color;\n}", "function gcb_custom_background() {\r\n\tadd_custom_background( apply_filters( 'gcb_args' , 'gcb_do_theme_background' ) );\t\r\n}", "public function backgroundColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function backgroundColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function init()\n {\n $this->shortcode->getHandlers()->add('color', function (ShortcodeInterface $sc) {\n $color = $sc->getParameter('c', null);\n $bgColor = $sc->getParameter('bg', null);\n $padding = $sc->getParameter('padding', 3);\n\n if ($color || $bgColor) {\n $colorString = sprintf(\"%s%s%s\",\n $color !== null ? \"color:{$color};\" : '',\n $bgColor !== null ? \"background-color:{$bgColor};\" : '',\n $bgColor !== null ? \"padding-left:{$padding}px;padding-right:{$padding}px;\" : ''\n );\n\n return '<span style=\"' . $colorString . '\">' . $sc->getContent() . '</span>';\n }\n });\n }", "function upgrade_colourFields($p_currentSettings, $p_pluginName ) {\n\t// 1. site-wide 'colour_offsets'\n\tif (isset( $p_currentSettings['colour_offsets'])) {\n\t\t$l_newSettingsArray = splitOldColourValues(\n\t\t\t\t$p_currentSettings['colour_offsets']\n\t\t\t,\t'clr_off_' );\t\n\t\tforeach ( $l_newSettingsArray as $l_newKey => $l_newValue ) {\n\t\t\tset_config( $l_newKey, $l_newValue,\t$p_pluginName);\n\t\t}//foreach\n\t\tset_config( \t'colour_offsets_bak'\n\t\t\t\t\t, \t$p_currentSettings['colour_offsets']\n\t\t\t\t\t,\t$p_pluginName);\n\t\tunset_config('colour_offsets', $p_pluginName);\n\t}\n\t// 2. site-wide 'colour_palettes'\n\tif (isset( $p_currentSettings['colour_palettes'])) {\n\t\t$l_newSettingsArray = splitOldColourValues(\n\t\t\t\t$p_currentSettings['colour_palettes']\n\t\t\t,\t'clr_pal_' );\n\t\t\t\n\t\tforeach ( $l_newSettingsArray as $l_newKey => $l_newValue ) {\n\t\t\tset_config( $l_newKey, $l_newValue,\t$p_pluginName);\n\t\t}//foreach\n\t\tset_config( \t'colour_palettes_bak'\n\t\t\t\t\t, \t$p_currentSettings['colour_palettes']\n\t\t\t\t\t,\t$p_pluginName);\n\t\tunset_config('colour_palettes', $p_pluginName);\t\t\t\n\t}//if (isset(...\n\t\n\t// 3. course overrides for 'colour_offsets' and 'colour_palettes'\n\t$l_allOverridesString = $p_currentSettings[IcandConstantsBackend::DB_FIELD_COURSE_OVERRIDES];\n\t$l_allOverridesString = preg_replace( IcandConstantsBackend::PREG_REMOVE_FROM_OVERRIDES, '', $l_allOverridesString); \t\t\n\t$l_allOverridesString = substr( $l_allOverridesString,0,-1);\n\t$l_allOverridesArray = IcandConstantsBackend::explode2( \n\t\t\t\t\t\tIcandConstantsBackend::OVERRIDE_ALL_SEPARATOR \n\t\t\t\t\t,\tIcandConstantsBackend::OVERRIDE_ALL_CONNECTOR\n\t\t\t\t\t,\t$l_allOverridesString );\n\t$l_madeAnyChange = false;\n\tforeach ( $l_allOverridesArray as $l_course => $l_courseOverridesString ) {\n\t\t$l_courseOverridesString = substr($l_courseOverridesString,1); //remove leading '{'\n\t\t$l_courseOverridesString = preg_replace( IcandConstantsBackend::PREG_REMOVE_FROM_OVERRIDES, '', $l_courseOverridesString );\n\t\t$l_courseOverridesArray = IcandConstantsBackend::explode2(\n\t\t\t\t\tIcandConstantsBackend::OVERRIDE_ONE_SEPARATOR \n\t\t\t\t,\tIcandConstantsBackend::OVERRIDE_ONE_CONNECTOR\n\t\t\t\t,\t$l_courseOverridesString\n\t\t\t\t,\t2 ); // only get key and value\n\t\t$l_madeChangeToCourse = false;\n\t\tif (isset( $l_courseOverridesArray['colour_offsets'])) {\n\t\t\t$l_madeChangeToCourse = true;\n\t\t\t$l_newSettingsArray = splitOldColourValues(\n\t\t\t\t\t$l_courseOverridesArray['colour_offsets']\n\t\t\t\t,\t'clr_off_' );\n\t\t\t$l_courseOverridesArray = array_merge($l_courseOverridesArray,$l_newSettingsArray );\t\t\t\t\n\t\t\tunset( $l_courseOverridesArray['colour_offsets'] ); \n\t\t}\n\t\tif (isset( $l_courseOverridesArray['colour_palettes'])) {\n\t\t\t$l_madeChangeToCourse = true;\n\t\t\t$l_newSettingsArray = splitOldColourValues(\n\t\t\t\t\t$l_courseOverridesArray['colour_palettes']\n\t\t\t\t,\t'clr_pal_' );\n\t\t\t$l_courseOverridesArray = array_merge($l_courseOverridesArray,$l_newSettingsArray );\n\t\t\tunset( $l_courseOverridesArray['colour_palettes'] ); \t\t\t\n\t\t}\n\t\tif ($l_madeChangeToCourse) {\n\t\t\t$l_madeAnyChange = true;\n\t\t\t$l_allOverridesArray[ $l_course ] = \n\t\t\t\t\t'{' \n\t\t\t\t\t. \t(IcandConstantsBackend::implode2(\n\t\t\t\t\t\t\tIcandConstantsBackend::OVERRIDE_ONE_SEPARATOR . IcandConstantsBackend::STR_APPEND_TO_OVERRIDES\n\t\t\t\t\t\t,\tIcandConstantsBackend::OVERRIDE_ONE_CONNECTOR\n\t\t\t\t\t\t,\t$l_courseOverridesArray )\n\t\t\t\t\t\t);\n\t\t}\n\t}//foreach\n\tif ($l_madeAnyChange) {\t// write course overrides back to database\n\t\t$l_newValue = IcandConstantsBackend::implode2(\n\t\t\t\t\t\tIcandConstantsBackend::OVERRIDE_ALL_SEPARATOR . IcandConstantsBackend::STR_APPEND_TO_OVERRIDES\n\t\t\t\t\t,\tIcandConstantsBackend::OVERRIDE_ALL_CONNECTOR\n\t\t\t\t\t,\t$l_allOverridesArray );\n\t\tif (strlen( $l_newValue ) > 0) {\n\t\t\t$l_newValue .= IcandConstantsBackend::OVERRIDE_ALL_TERMINATOR;\n\t\t\tset_config( IcandConstantsBackend::DB_FIELD_COURSE_OVERRIDES\n\t\t\t\t, \t$l_newValue\n\t\t\t\t,\t$p_pluginName);\t\n\t\t}//if\t\t\n\t}//if\n}", "final private function setColors()\n {\n\n $systemColorFile = new PhingFile(Phing::getResourcePath(\"phing/listener/defaults.properties\"));\n\n try {\n $prop = new Properties();\n\n $prop->load($systemColorFile);\n\n $err = $prop->getProperty(\"HtmlColorLogger.ERROR_CLASS\");\n $warn = $prop->getProperty(\"HtmlColorLogger.WARNING_CLASS\");\n $info = $prop->getProperty(\"HtmlColorLogger.INFO_CLASS\");\n $verbose = $prop->getProperty(\"HtmlColorLogger.VERBOSE_CLASS\");\n $debug = $prop->getProperty(\"HtmlColorLogger.DEBUG_CLASS\");\n if ($err !== null) {\n $this->errColor = self::PREFIX . $err . self::SUFFIX;\n }\n if ($warn !== null) {\n $this->warnColor = self::PREFIX . $warn . self::SUFFIX;\n }\n if ($info !== null) {\n $this->infoColor = self::PREFIX . $info . self::SUFFIX;\n }\n if ($verbose !== null) {\n $this->verboseColor = self::PREFIX . $verbose . self::SUFFIX;\n }\n if ($debug !== null) {\n $this->debugColor = self::PREFIX . $debug . self::SUFFIX;\n }\n } catch (IOException $ioe) {\n //Ignore exception - we will use the defaults.\n }\n }", "function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}", "public function theme_color_customizer( $wp_customize ){\n\n\t\t$theme_color_locations = $this->colorcase_theme_support();\n\n\t\t// bail if no theme support\n\t\tif( $theme_color_locations == false ){\n\t\t\treturn;\n\t\t}\n\n\t\t// get custom inputs\n\t\tinclude_once('customizer-inputs.php');\n\n\t\t// remove title color customization\n\t\t$wp_customize->remove_control( 'header_textcolor' );\n\n\t\t// add theme colors panel\n\t\t$wp_customize->add_panel( 'theme_colors', array(\n\t\t\t'priority' => 35,\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'theme_supports' => 'colorcase',\n\t\t\t'title' => 'Theme Colors',\n\t\t\t'description' => 'Pick a color palette, or choose custom colors.',\n\t\t) );\n\n\t\t// bail if not areas to customize\n\t\tif( !isset( $theme_color_locations['sections'] ) || empty( $theme_color_locations['sections'] ) ){\n\t\t\treturn;\n\t\t}\n\n\t\tif( isset( $theme_color_locations['palettes'] ) && !empty( $theme_color_locations['palettes'] ) ){\n\n\t\t\t$section_label = 'Color Palettes';\n\t\t\t$section_slug = sanitize_title( $section_label );\n\n\t\t\t// add theme color palettes section to customizer\n\t\t\t$wp_customize->add_section(\n\t\t\t\t'theme_colors_' . $section_slug,\n\t\t\t\tarray(\n\t\t\t\t\t'title' => $section_label,\n\t\t\t\t\t'description' => '',\n\t\t\t\t\t'priority' => 10,\n\t\t\t\t\t'panel' => 'theme_colors',\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$wp_customize->add_setting(\n\t\t\t\t$section_slug . '_Picker',\n\t\t\t\tarray(\n\t\t\t\t\t'default' => 'default',\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$wp_customize->add_control(\n\t\t\t\tnew Color_Palette_Picker_Customize_Control(\n\t\t\t\t\t$wp_customize,\n\t\t\t\t\t$section_slug . '_Picker',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' => 'Color Palette',\n\t\t\t\t\t\t'section' => 'theme_colors_' . $section_slug,\n\t\t\t\t\t\t// 'settings' => ''\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tforeach( $theme_color_locations['sections'] as $section_label => $theme_color_section_locations ){\n\n\t\t\t$section_slug = sanitize_title( $section_label );\n\n\t\t\t// add theme colors section to customizer\n\t\t\t$wp_customize->add_section(\n\t\t\t\t'theme_colors_' . $section_slug,\n\t\t\t\tarray(\n\t\t\t\t\t'title' => $section_label,\n\t\t\t\t\t'description' => '',\n\t\t\t\t\t'priority' => 10,\n\t\t\t\t\t'panel' => 'theme_colors',\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tforeach( $theme_color_section_locations as $color_location_label => $color_location ){\n\n\t\t\t\t$slug = sanitize_title( $section_label . '_' . $color_location_label );\n\n\t\t\t\t$wp_customize->add_setting(\n\t\t\t\t\t$slug,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'default' => $color_location['default'],\n\t\t\t\t\t\t'sanitize_callback' => 'sanitize_hex_color',\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tif( isset( $color_location['description'] ) ){\n\t\t\t\t\t$color_location_label .= '<p class=\"description\"><small>' . $color_location['description'] . '</small></p>';\n\t\t\t\t}\n\n\t\t\t\t$wp_customize->add_control(\n\t\t\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t\t\t$wp_customize,\n\t\t\t\t\t\t$slug,\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'label' => $color_location_label,\n\t\t\t\t\t\t\t'section' => 'theme_colors_' . $section_slug,\n\t\t\t\t\t\t\t'settings' => $slug,\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t}\n\n\t}", "function scbirs_add_theme_meta() {\r\n?>\r\n\t<meta name=\"theme-color\" content=\"#005fab\">\r\n<?php\r\n}", "function wpcom_vip_audio_player_colors( $colors ) {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "public function update_lp_palettes_config_v2( $palettes_config_v2 ) {\n\t\tupdate_post_meta( $this->lp_id, static::LP_PALETTES_CONFIG, $palettes_config_v2 );\n\n\t\t$this->skin_palettes_config = $palettes_config_v2;\n\t}", "private function start_color_schemes() {\r\n\t\t$handler = 'unapp-style-overrides';\r\n\r\n\t\t$args = array(\r\n\t\t\t'fields' => $this->get_color_scheme(),\r\n\t\t\t'css' => Epsilon_Color_Scheme::load_css_overrides( get_template_directory() . '/assets/css/style-overrides.css' ),\r\n\t\t);\r\n\r\n\t\tEpsilon_Color_Scheme::get_instance( $handler, $args );\r\n\t}", "function callback_color($args)\n {\n }", "public function __construct() {\n $this->foreground_colors['black'] = '0;30';\n $this->foreground_colors['dark_gray'] = '1;30';\n $this->foreground_colors['blue'] = '0;34';\n $this->foreground_colors['light_blue'] = '1;34';\n $this->foreground_colors['green'] = '0;32';\n $this->foreground_colors['light_green'] = '1;32';\n $this->foreground_colors['cyan'] = '0;36';\n $this->foreground_colors['light_cyan'] = '1;36';\n $this->foreground_colors['red'] = '0;31';\n $this->foreground_colors['light_red'] = '1;31';\n $this->foreground_colors['purple'] = '0;35';\n $this->foreground_colors['light_purple'] = '1;35';\n $this->foreground_colors['brown'] = '0;33';\n $this->foreground_colors['yellow'] = '1;33';\n $this->foreground_colors['light_gray'] = '0;37';\n $this->foreground_colors['white'] = '1;37';\n\n $this->background_colors['black'] = '40';\n $this->background_colors['red'] = '41';\n $this->background_colors['green'] = '42';\n $this->background_colors['yellow'] = '43';\n $this->background_colors['blue'] = '44';\n $this->background_colors['magenta'] = '45';\n $this->background_colors['cyan'] = '46';\n $this->background_colors['light_gray'] = '47';\n }", "function client_portal_get_theme_colors_gutenberg() {\n\n\t// Grab our ACF theme colors.\n\t$colors = client_portal_get_theme_colors();\n\n\tif ( ! $colors ) {\n\t\treturn array();\n\t}\n\n\tforeach ( $colors as $key => $color ) {\n\t\t$gutenberg_colors[] = array(\n\t\t\t'name' => esc_html( $key ),\n\t\t\t'slug' => sanitize_title( $key ),\n\t\t\t'color' => esc_attr( $color ),\n\t\t);\n\t}\n\n\treturn $gutenberg_colors;\n}", "function writr_add_wpcom_support() {\n\tglobal $themecolors;\n\n\tif ( ! isset( $themecolors ) ) {\n\n\t\t// Set a default theme color array.\n\t\t$themecolors = array(\n\t\t\t'bg' => 'ffffff',\n\t\t\t'border' => 'ffffff',\n\t\t\t'text' => '656565',\n\t\t\t'link' => '1abc9c',\n\t\t\t'url' => '1abc9c',\n\t\t);\n\n\t}\n\n\t// Add print stylesheet.\n\tadd_theme_support( 'print-style' );\n\n}", "function theme_custamize_add_color_control($name, $id, $section, $default, $wp_customize) {\n $wp_customize->add_setting( $id, array( 'default' => $default, ) );\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n $id,\n array(\n 'label' => __( $name, $id ),\n 'section' => $section,\n 'settings' => $id,\n )\n )\n );\n}", "function htmlconvertwordpresstheme($wp_customize){\n $wp_customize->add_panel('htmlconvertwordpresstheme_settings', array(\n\n 'title'=>__('htmlconvertwordpresstheme_settings'),\n 'description' =>'',\n 'priority'=>10,\n\n\n ));\n\n\n $wp_customize->add_section('htmlconvertwordpresstheme_colors', array(\n 'title'=>'color',\n 'panel'=> 'htmlconvertwordpresstheme_settings',\n\n\n ));\n\n\n $wp_customize->add_setting('htmlconvertwordpresstheme_nav_bg_color', array(\n\n 'type'=>'theme_mod',\n 'capability'=> 'edit_theme_options',\n 'default'=>'',\n 'transport'=>'refresh',\n 'sanitize_callback'=>'sanitize_hex_color',\n ));\n\n\n $wp_customize->add_control('htmlconvertwordpresstheme_nav_bg_color', array(\n \n 'label'=>__('Menu Background'),\n 'type'=>'color',\n 'section'=>'htmlconvertwordpresstheme_colors',\n ));\n\n/* customize setting body background color*/\n$wp_customize->add_setting('htmlconvertwordpresstheme_body_background_color', array(\n\n 'type'=>'theme_mod',\n 'capability'=> 'edit_theme_options',\n 'default'=>'#fff',\n 'transport'=>'refresh',\n 'sanitize_callback'=>'sanitize_hex_color',\n));\n\n\n$wp_customize->add_control('htmlconvertwordpresstheme_body_background_color', array(\n\n 'label'=>__('Body Background color'),\n 'type'=>'color',\n 'section'=>'htmlconvertwordpresstheme_colors',\n));\n\n\n}", "public function __construct() {\n\t\t$this->foreground_colors['black'] = '0;30';\n\t\t$this->foreground_colors['dark_gray'] = '1;30';\n\t\t$this->foreground_colors['blue'] = '0;34';\n\t\t$this->foreground_colors['light_blue'] = '1;34';\n\t\t$this->foreground_colors['green'] = '0;32';\n\t\t$this->foreground_colors['light_green'] = '1;32';\n\t\t$this->foreground_colors['cyan'] = '0;36';\n\t\t$this->foreground_colors['light_cyan'] = '1;36';\n\t\t$this->foreground_colors['red'] = '0;31';\n\t\t$this->foreground_colors['light_red'] = '1;31';\n\t\t$this->foreground_colors['purple'] = '0;35';\n\t\t$this->foreground_colors['light_purple'] = '1;35';\n\t\t$this->foreground_colors['brown'] = '0;33';\n\t\t$this->foreground_colors['yellow'] = '1;33';\n\t\t$this->foreground_colors['light_gray'] = '0;37';\n\t\t$this->foreground_colors['white'] = '1;37';\n\n\t\t$this->background_colors['black'] = '40';\n\t\t$this->background_colors['red'] = '41';\n\t\t$this->background_colors['green'] = '42';\n\t\t$this->background_colors['yellow'] = '43';\n\t\t$this->background_colors['blue'] = '44';\n\t\t$this->background_colors['magenta'] = '45';\n\t\t$this->background_colors['cyan'] = '46';\n\t\t$this->background_colors['light_gray'] = '47';\n\t}", "function _ga_typography_color( $option ) {\n\n\tif ( ! ( $_color = genesis_get_option( $option, GA_CHILDTHEME_FIELD ) ) )\n\t\treturn false;\n\n\t return 'color: ' . $_color . ';';\n\n}", "function pl_link_color(){\n\t\n\t$color = ( pl_check_color_hash( ploption( 'linkcolor' ) ) ) ? pl_hash_strip( ploption( 'linkcolor' ) ) : '225E9B';\n\t\n\treturn $color;\t\n}", "function pt_text_color_render()\n\t\t{ \n\t\t\t$options = get_option( 'pt_settings' );\n\t\t\t?>\n\t\t\t<input type='text' name='pt_settings[pt_text_field_color]' value='<?php if( @$options['pt_text_field_color'] != '') echo $options['pt_text_field_color']; else echo '#ffffff';?>'> (Hex color code, ex white: \"#ffffff\")\n\t\t\t<?php\n\t\t}", "public function customizer_register( WP_Customize_Manager $wp_customize ) {\n\t\t$wp_customize->add_setting( 'color_scheme', array(\n\t\t 'default' => 'default',\n\t\t //'transport' => 'postMessage',\n\t\t) );\n\t\t\n\t\n $entrepreneur_color_scheme = new entrepreneur_color_scheme();\n $color_schemes = $entrepreneur_color_scheme->get_color_schemes();\n $choices = array();\n foreach ($color_schemes as $color_scheme => $value) {\n $choices[$color_scheme] = $value['label'];\n }\n\n\t\t$wp_customize->add_control( 'color_scheme', array(\n\t\t 'label' => __( 'Color scheme', 'entrepreneur' ),\n\t\t 'section' => 'theme_common_color_section',\n\t\t 'type' => 'select',\n\t\t 'choices' => $choices,\n\t\t) );\n\n\n/*\n\t\t$options = array(\n\t\t 'primary_color' => __( 'Primary color', 'entrepreneur' ),\n\t\t 'primary_hover_color' => __( 'Primary hover color', 'entrepreneur' ),\n\t\t 'secondary_color' => __( 'Secondary color', 'entrepreneur' ),\n\t\t 'secondary_hover_color' => __( 'Secondary hover color', 'entrepreneur' ),\n\t\t);\n\t\tforeach ( $options as $key => $label ) {\n\t\t $wp_customize->add_setting( $key, array(\n\t\t 'sanitize_callback' => 'sanitize_hex_color',\n\t\t 'transport' => 'postMessage',\n\t\t ) );\n\t\t $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $key, array(\n\t\t 'label' => $label,\n\t\t 'section' => 'colors',\n\t\t ) ) );\n\t\t}\n\t\t*/\n\t}", "public function __construct() {\n\t\t\t$this->foreground_colors['black'] = '0;30';\n\t\t\t$this->foreground_colors['dark_gray'] = '1;30';\n\t\t\t$this->foreground_colors['blue'] = '0;34';\n\t\t\t$this->foreground_colors['light_blue'] = '1;34';\n\t\t\t$this->foreground_colors['green'] = '0;32';\n\t\t\t$this->foreground_colors['light_green'] = '1;32';\n\t\t\t$this->foreground_colors['cyan'] = '0;36';\n\t\t\t$this->foreground_colors['light_cyan'] = '1;36';\n\t\t\t$this->foreground_colors['red'] = '0;31';\n\t\t\t$this->foreground_colors['light_red'] = '1;31';\n\t\t\t$this->foreground_colors['purple'] = '0;35';\n\t\t\t$this->foreground_colors['light_purple'] = '1;35';\n\t\t\t$this->foreground_colors['brown'] = '0;33';\n\t\t\t$this->foreground_colors['yellow'] = '1;33';\n\t\t\t$this->foreground_colors['light_gray'] = '0;37';\n\t\t\t$this->foreground_colors['white'] = '1;37';\n \n\t\t\t$this->background_colors['black'] = '40';\n\t\t\t$this->background_colors['red'] = '41';\n\t\t\t$this->background_colors['green'] = '42';\n\t\t\t$this->background_colors['yellow'] = '43';\n\t\t\t$this->background_colors['blue'] = '44';\n\t\t\t$this->background_colors['magenta'] = '45';\n\t\t\t$this->background_colors['cyan'] = '46';\n\t\t\t$this->background_colors['light_gray'] = '47';\n\t\t}", "public function extendPalettes($strName)\n\t{\n\t\tif ($strName != 'tl_module')\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t$GLOBALS['TL_DCA']['tl_module']['subpalettes']['reg_activate'] = str_replace('reg_jumpTo,reg_text', 'reg_jumpTo,reg_text,nc_registration_notify_admin,nc_registration_notify_admin_activate', $GLOBALS['TL_DCA']['tl_module']['subpalettes']['reg_activate']);\n\t}", "public function generate_custom_color_variables( $context = null ) {\n\n\t\t$theme_css = 'editor' === $context ? ':root .editor-styles-wrapper{' : ':root{';\n\t\t$background_color = get_theme_mod( 'background_color', 'D1E4DD' );\n\n\t\tif ( 'd1e4dd' !== strtolower( $background_color ) ) {\n\t\t\t$theme_css .= '--global--color-background: #' . $background_color . ';';\n\t\t\t$theme_css .= '--global--color-primary: ' . $this->custom_get_readable_color( $background_color ) . ';';\n\t\t\t$theme_css .= '--global--color-secondary: ' . $this->custom_get_readable_color( $background_color ) . ';';\n\t\t\t$theme_css .= '--button--color-background: ' . $this->custom_get_readable_color( $background_color ) . ';';\n\t\t\t$theme_css .= '--button--color-text-hover: ' . $this->custom_get_readable_color( $background_color ) . ';';\n\n\t\t\tif ( '#fff' === $this->custom_get_readable_color( $background_color ) ) {\n\t\t\t\t$theme_css .= '--table--stripes-border-color: rgba(240, 240, 240, 0.15);';\n\t\t\t\t$theme_css .= '--table--stripes-background-color: rgba(240, 240, 240, 0.15);';\n\t\t\t}\n\t\t}\n\n\t\t$theme_css .= '}';\n\n\t\treturn $theme_css;\n\t}", "public function colorList() {}", "public function __construct() {\n\t\t$this->foreground_colors['black'] = '0;30';\n\t\t$this->foreground_colors['dark_gray'] = '1;30';\n\t\t$this->foreground_colors['blue'] = '0;34';\n\t\t$this->foreground_colors['light_blue'] = '1;34';\n\t\t$this->foreground_colors['green'] = '0;32';\n\t\t$this->foreground_colors['light_green'] = '1;32';\n\t\t$this->foreground_colors['cyan'] = '0;36';\n\t\t$this->foreground_colors['light_cyan'] = '1;36';\n\t\t$this->foreground_colors['red'] = '0;31';\n\t\t$this->foreground_colors['light_red'] = '1;31';\n\t\t$this->foreground_colors['purple'] = '0;35';\n\t\t$this->foreground_colors['light_purple'] = '1;35';\n\t\t$this->foreground_colors['brown'] = '0;33';\n\t\t$this->foreground_colors['yellow'] = '1;33';\n\t\t$this->foreground_colors['light_gray'] = '0;37';\n\t\t$this->foreground_colors['white'] = '1;37';\n \n\t\t$this->background_colors['black'] = '40';\n\t\t$this->background_colors['red'] = '41';\n\t\t$this->background_colors['green'] = '42';\n\t\t$this->background_colors['yellow'] = '43';\n\t\t$this->background_colors['blue'] = '44';\n\t\t$this->background_colors['magenta'] = '45';\n\t\t$this->background_colors['cyan'] = '46';\n\t\t$this->background_colors['light_gray'] = '47';\n\t\t}", "function header_footer_color_customizer($wp_customize) {\n\t$default_theme_bgcolor1 = \"#000000\";\n $defaule_header_bgcolor = \"#b3daff\";\n\t$default_theme_hovercolor = \"#ffffff\";\n\t$default_widget_bgcolor = \"#b3daff\";\n\t$default_mainpost_bgcolor = \"#f0f0f0\";\n\t$default_popularpost_bgcolor =\"#c3c3c3\";\n\t$default_a_bgcolor = \"#9e0c78\";\n\t$default_readmore_bgcolor = \"#ff3a3a\";\n\t$default_text_color = \"#000000\";\n\n\t$wp_customize->add_setting('themename_theme_bgcolor1', array(\n\t\t'default' => $default_theme_bgcolor1,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_theme_bgcolor1', array(\n\t\t'label' => 'Theme color1',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_theme_bgcolor1',\n\t)));\n\t$wp_customize->add_setting('themename_header_bgcolor', array(\n\t\t'default' => $defaule_header_bgcolor,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_header_bgcolor', array(\n\t\t'label' => 'Header bgcolor',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_header_bgcolor',\n\t)));\n\t$wp_customize->add_setting('themename_theme_hovercolor', array(\n\t\t'default' => $default_theme_hovercolor,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_theme_hovercolor', array(\n\t\t'label' => 'Theme hovercolor',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_theme_hovercolor',\n\t)));\n\t$wp_customize->add_setting('themename_widget_bgcolor', array(\n\t\t'default' => $default_widget_bgcolor,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_widget_bgcolor', array(\n\t\t'label' => 'Widget bgcolor',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_widget_bgcolor',\n\t)));\n\t$wp_customize->add_setting('themename_mainpost_bgcolor', array(\n\t\t'default' => $default_mainpost_bgcolor,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_mainpost_bgcolor', array(\n\t\t'label' => 'Main Post bgcolor',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_mainpost_bgcolor',\n\t)));\n\t$wp_customize->add_setting('themename_popularpost_bgcolor', array(\n\t\t'default' => $default_popularpost_bgcolor,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_popularpost_bgcolor', array(\n\t\t'label' => 'Popular bgcolor',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_popularpost_bgcolor',\n\t)));\n\t$wp_customize->add_setting('themename_a_bgcolor', array(\n\t\t'default' => $default_a_bgcolor,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_a_bgcolor', array(\n\t\t'label' => 'Text Link color',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_a_bgcolor',\n\t)));\n\t$wp_customize->add_setting('themename_readmore_bgcolor', array(\n\t\t'default' => $default_readmore_bgcolor,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_readmore_bgcolor', array(\n\t\t'label' => 'ReadMore bgcolor',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_readmore_bgcolor',\n\t)));\n\t$wp_customize->add_setting('themename_text_color', array(\n\t\t'default' => $default_text_color,\n\t\t'wp-head-callback' => 'scm_test_style',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'themename_text_color', array(\n\t\t'label' => 'Text color',\n\t\t'section' => 'colors',\n\t\t'settings' => 'themename_text_color',\n\t)));\n}", "function pewc_enqueue_color_picker( $hook_suffix ) {\n wp_enqueue_style( 'wp-color-picker' );\n wp_enqueue_script( 'wp-color-picker');\n}", "function enlight_render_visual_preferences_meta_box($post)\n{\n $highlightColor = get_post_meta($post->ID, 'enlight_highlight_color', true);\n?>\n <p>\n <strong><?php _e('Highlight Color', 'enlight'); ?></strong>\n </p>\n <p>\n <select name=\"enlight_highlight_color\">\n <?php foreach (enlight_get_colors() as $name => $color) : ?>\n <option value=\"<?php echo esc_attr($name); ?>\"<?php selected($name, $highlightColor); ?> style=\"color: <?php echo $color; ?>\"><?php echo $name; ?></option>\n <?php endforeach; ?>\n </select>\n </p>\n<?php\n}", "function block_core_page_list_build_css_colors($attributes, $context)\n {\n }", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function colour();", "function inkpro_add_theme_button_type( $button_types ) {\r\n\t\r\n\t$additional_button_types = array();\r\n\t$additional_button_types['wolf-wpb-button'] = esc_html__( 'Theme Accent Color', 'inkpro' );\r\n\r\n\treturn $additional_button_types + $button_types;\r\n}", "function wp_ajax_save_user_color_scheme()\n {\n }", "function costum_setting_colors_fontColorHaveBackground_callback() {\n\t$fontColorHaveBackground = esc_attr( get_option( 'fontColorHaveBackground' ) ); ?>\n\n\t<div class=\"input-color-container\">\n\t\t<input name=\"fontColorHaveBackground\" id=\"input-fontColorHaveBackground\" value=\"<?php echo $fontColorHaveBackground; ?>\" class=\"input-color\" type=\"color\">\n\t</div>\n\n\t<?php\n}", "function costum_setting_colors_transparentColor_callback() {\n\t$transparentColor = esc_attr( get_option( 'transparentColor' ) ); ?>\n\n\t<div class=\"input-color-container\">\n\t\t<input name=\"transparentColor\" id=\"input-transparentColor\" value=\"<?php echo $transparentColor; ?>\" class=\"input-color\" type=\"color\">\n\t</div>\n\n\t<?php\n}", "function capezzahill_editor_customizer_styles() {\r\n\twp_enqueue_style( 'capezzahill-editor-customizer-styles', get_theme_file_uri( '/style-editor-customizer.css' ), false, '1.1', 'all' );\r\n\tif ( 'custom' === get_theme_mod( 'primary_color' ) ) {\r\n\t\t// Include color patterns.\r\n\t\trequire_once get_parent_theme_file_path( '/inc/color-patterns.php' );\r\n\t\twp_add_inline_style( 'capezzahill-editor-customizer-styles', capezzahill_custom_colors_css() );\r\n\t}\r\n}", "function block_core_home_link_build_css_colors($context)\n {\n }", "public function getColor()\n {\n }", "public function modifyPalette()\n\t{\n\t\tif (version_compare(VERSION . '.' . BUILD, '2.11.0', '<'))\n\t\t\t{\n\t\t\t\t$GLOBALS['TL_DCA']['tl_module']['fields']['newslist_comments_avatarSize'] = array\n\t\t\t\t(\n\t\t\t\t\t'label' => &$GLOBALS['TL_LANG']['tl_content']['size'],\n\t\t\t\t\t'exclude' => false,\n\t\t\t\t\t'inputType' => 'imageSize',\n\t\t\t\t\t'options' => array('crop', 'proportional', 'box'),\n\t\t\t\t\t'reference' => &$GLOBALS['TL_LANG']['MSC'],\n\t\t\t\t\t'eval' => array('rgxp'=>'digit', 'nospace'=>true, 'tl_class'=>'w50')\n\t\t\t\t);\n\t\t}\n\t}", "public function update_lp_palettes_v2( $palettes_v2 ) {\n\t\tupdate_post_meta( $this->lp_id, static::LP_PALETTES, $palettes_v2 );\n\n\t\t$this->skin_palettes = $palettes_v2;\n\t}", "public function get_variables_for_css() {\n\t\t$data = '';\n\n\t\tif ( ! empty( $this->skin_palettes_config ) && is_array( $this->skin_palettes_config ) ) {\n\t\t\t$palette = $this->skin_palettes_config ['palette'];\n\n\t\t\tforeach ( $palette as $variable ) {\n\n\t\t\t\t$color_name = static::SKIN_COLOR_VARIABLE_PREFIX . $variable['id'];\n\n\t\t\t\tif ( ! empty( $variable['hsla_code'] ) && ! empty( $variable['hsla_vars'] ) && is_array( $variable['hsla_vars'] ) ) {\n\t\t\t\t\t$data .= $color_name . ':' . $variable['hsla_code'] . ';';\n\n\t\t\t\t\tforeach ( $variable['hsla_vars'] as $var => $css_variable ) {\n\t\t\t\t\t\t$data .= $color_name . '-' . $var . ':' . $css_variable . ';';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$data .= $color_name . ':' . $variable['color'] . ';';\n\n\t\t\t\t\tif ( function_exists( 'tve_rgb2hsl' ) && function_exists( 'tve_print_color_hsl' ) ) {\n\t\t\t\t\t\t$data .= tve_print_color_hsl( $color_name, tve_rgb2hsl( $variable['color'] ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( function_exists( 'tve_prepare_master_variable' ) ) {\n\t\t\t$palettes = $this->get_smart_lp_palettes_v2();\n\t\t\t$active_id = (int) $palettes['active_id'];\n\t\t\t$master_variable = $palettes['palettes'][ $active_id ]['modified_hsl'];\n\t\t\t$general_master_variable = tve_prepare_master_variable( array( 'hsl' => $master_variable ) );\n\t\t\t$theme_master_variable = str_replace( '--tcb-main-master', '--tcb-theme-main-master', $general_master_variable );\n\n\t\t\t$data .= $general_master_variable;\n\t\t\t$data .= $theme_master_variable;\n\t\t}\n\n\t\treturn $data;\n\t}", "public static function register($wp_customize)\n {\n require_once(get_template_directory().\"/customizer/alpha-color-picker-customizer.php\");\n\n if (!isset($lc_customize['menu_mobile_bg_color'])) {\n $lc_customize['menu_mobile_bg_color'] = 'rgba(35, 35, 35, 1)';\n }\n if (!isset($lc_customize['mobile_border_bottom_color'])) {\n $lc_customize['mobile_border_bottom_color'] = '#333333';\n }\n\n\n //Define a new section (if desired) to the Theme Customizer\n $wp_customize->add_section( 'lc_second_color',\n array(\n 'title' => esc_html__('Vibrant Color', 'heritage'), \t\t\t\t//Visible title of section\n 'priority' => 1, \t\t\t\t\t\t\t\t\t\t\t//Determines what order this appears in\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t//Capability needed to tweak\n 'description' => esc_html__('Choose the link color', 'heritage'), //Descriptive tooltip\n )\n );\n\n //Register new settings to the WP database...\n $wp_customize->add_setting( 'lc_customize[lc_second_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#18aebf', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n //Finally, we define the control itself (which links a setting to a section and renders the HTML controls)...\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_second_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Secondary Color', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_second_color', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_second_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 1, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*\n MENU OPTIONS\n */\n $wp_customize->add_section('lc_menu_options',\n array(\n 'title' => esc_html__('Menu Colors', 'heritage'), \t\t\t\t//Visible title of section\n 'priority' => 2, \t\t\t\t\t\t\t\t\t\t\t//Determines what order this appears in\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t//Capability needed to tweak\n 'description' => esc_html__('Choose menu colors', 'heritage'), //Descriptive tooltip\n )\n );\n\n /*menu bar color*/\n $wp_customize->add_setting('lc_customize[menu_bar_bg_color]',\n array(\n 'default' => 'rgba(255, 255, 255, 0)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'menu_bar_bg_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Menu Bar Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_bar_bg_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*sticky menu bar color*/\n $wp_customize->add_setting('lc_customize[menu_sticky_bar_bg_color]',\n array(\n 'default' => 'rgba(255, 255, 255, 1)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'menu_sticky_bar_bg_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Sticky Menu Bar Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_sticky_bar_bg_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*mobile menu bar color*/\n $wp_customize->add_setting('lc_customize[menu_mobile_bg_color]',\n array(\n 'default' => 'rgba(255, 255, 255, 1)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'menu_mobile_bg_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Mobile Menu Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_mobile_bg_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*mobile menu border bottom color*/\n $wp_customize->add_setting('lc_customize[mobile_border_bottom_color]',\n array(\n 'default' => '#e1e1e1', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'mobile_border_bottom_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Mobile Menu Border Bottom Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[mobile_border_bottom_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*above the menu bar*/\n $wp_customize->add_setting('lc_customize[above_the_menu_bar]',\n array(\n 'default' => 'rgba(241, 246, 247, 0.9)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'above_the_menu_bar', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Above The Menu Bar Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[above_the_menu_bar]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*menu text color*/\n $wp_customize->add_setting('lc_customize[menu_text_color]',\n array(\n 'default' => '#000000', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'lc_menu_text_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Menu Text Color', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_text_color]',\n 'priority' => 2,\n )\n ));\n\n /*menu text hover color*/\n $wp_customize->add_setting('lc_customize[menu_text_hover_color]',\n array(\n 'default' => '#ffffff', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'lc_menu_text_hover_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Menu Text Color on Hover', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[menu_text_hover_color]',\n 'priority' => 3,\n )\n ));\n\n /*current menu item text color*/\n $wp_customize->add_setting('lc_customize[current_menu_item_text_color]',\n array(\n 'default' => '#18aebf',\t\t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'lc_current_menu_item_text_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Current Menu Item Text Color', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[current_menu_item_text_color]',\n 'priority' => 5,\n )\n ));\n\n /*sub menu bg color*/\n $wp_customize->add_setting('lc_customize[submenu_bg_color]',\n array(\n 'default' => 'rgba(255, 255, 255, 0)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'submenu_bg_color', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Sub Menu Background Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[submenu_bg_color]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 6\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*menu bar color*/\n $wp_customize->add_setting('lc_customize[creative_menu_overlay_bg]',\n array(\n 'default' => 'rgba(255, 255, 255, 0.9)', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control(\n new Customize_Alpha_Color_Control( \t\t\t\t\t\t\t\t\t\t\t\t//Instantiate the color control class\n $wp_customize, \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Pass the $wp_customize object (required)\n 'creative_menu_overlay_bg', \t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Creative Menu Overlay Color', 'heritage'), \t\t\t\t\t\t\t//Admin-visible name of the control\n 'section' => 'lc_menu_options', \t\t\t\t\t\t\t\t// ID of the section this control should render in (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[creative_menu_overlay_bg]', \t\t\t\t\t\t//Which setting to load and manipulate (serialized is okay)\n 'priority' => 7\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Determines the order this control appears in for the specified section\n )\n ));\n\n /*top icons on creative menu*/\n $wp_customize->add_setting('lc_customize[creative_icons_color]',\n array(\n 'default' => '#000000', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'lc_creative_icons_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Top Icons Color For Creative Menu. Also, the color for mobile menu icons, menu icon and search icon.', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[creative_icons_color]',\n 'priority' => 8\n )\n ));\n\n /*login signup wish list color*/\n $wp_customize->add_setting('lc_customize[login_wishlist_color]',\n array(\n 'default' => '#959595', \t\t\t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage' \t\t\t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'at_login_wishlist_color',\t \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Text color for login, sign-up and wish list links on the menu bar.', 'heritage'),\n 'section' => 'lc_menu_options',\t//ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[login_wishlist_color]',\n 'priority' => 8\n )\n ));\n\n /*buttons*/\n $wp_customize->add_section( 'lc_button_colors',\n array(\n 'title' => esc_html__('Button Colors', 'heritage'), \t\t\t\t//Visible title of section\n 'priority' => 3, \t\t\t\t\t\t\t\t\t\t\t//Determines what order this appears in\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t//Capability needed to tweak\n 'description' => esc_html__('Set button colors.', 'heritage'), //Descriptive tooltip\n )\n );\n\n $wp_customize->add_setting( 'lc_customize[lc_use_custom_btn_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => 'use_defaults', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback'\t=> 'HERITAGE_sanitize_buttons_custom',\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control('lc_use_custom_btn_color_control' ,\n array(\n 'label' \t=> esc_html__('Buttons Colors', 'heritage'),\n 'section' \t=> 'lc_button_colors',\n 'settings' \t=> 'lc_customize[lc_use_custom_btn_color]',\n 'priority' \t=> 1,\n 'type'\t\t=> 'select',\n 'choices' => array(\n 'use_defaults' \t\t=> esc_html__('Use Theme Defaults', 'heritage'),\n 'custom_btn_colors' => esc_html__('Use Custom Colors', 'heritage' ),\n ),\n )\n );\n\n /*btn bg color*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_bg_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#000000', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_bg_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Background Color', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_bg_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 2, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn text color*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_txt_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#ffffff', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_txt_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Text Color', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_txt_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 3, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn border color*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_border_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#000000', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_border_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Border Color', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_border_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 3, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn bg color on hover*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_bg_color_hover]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#555555', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_bg_color_hover', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Background Color On Hover', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_bg_color_hover]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 2, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn text color on hover*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_txt_color_hover]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#ffffff', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_txt_color_hover', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Text Color On Hover', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_txt_color_hover]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 3, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*btn border color on hover*/\n $wp_customize->add_setting( 'lc_customize[lc_btn_border_color_hover]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#555555', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_btn_border_color_hover', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Button Border Color On Hover', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_button_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_btn_border_color_hover]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 3, //Determines the order this control appears in for the specified section\n )\n ));\n\n\n /*Various*/\n $wp_customize->add_section( 'lc_various_colors',\n array(\n 'title' => esc_html__('Various Colors', 'heritage'), \t\t\t\t//Visible title of section\n 'priority' => 3, \t\t\t\t\t\t\t\t\t\t\t//Determines what order this appears in\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t//Capability needed to tweak\n 'description' => esc_html__('Set general colors.', 'heritage'), //Descriptive tooltip\n )\n );\n\n /*bg color for single post with no featured img in blog template*/\n $wp_customize->add_setting( 'lc_customize[lc_blog_brick_bg_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#1d1d1d', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_blog_brick_bg_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Background Color For Blog Items With No Featured Image', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_various_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_blog_brick_bg_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 1, //Determines the order this control appears in for the specified section\n )\n ));\n\n /*bg color for minicart and wishlist popups*/\n $wp_customize->add_setting( 'lc_customize[lc_minicart_wishlist_popup_bg_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => '#ffffff', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'sanitize_hex_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n //define the control\n $wp_customize->add_control( new WP_Customize_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_minicart_wishlist_popup_bg_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Background Color For Minciart And Wishlist Popups', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_various_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_minicart_wishlist_popup_bg_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 2, //Determines the order this control appears in for the specified section\n )\n ));\n\n\n /*bg color for overlay on shop page*/\n $wp_customize->add_setting( 'lc_customize[lc_shop_overlay_bg_color]', \t//Give it a SERIALIZED name (so all theme settings can live under one db record)\n array(\n 'default' => 'rgba(255,255,255, 0.7)', \t\t\t\t\t\t\t\t\t\t//Default setting/value to save\n 'sanitize_callback' => 'HERITAGE_sanitize_rgba_color',\t\t\t\t\t//Sanitizer\n 'type' => 'option', \t\t\t\t\t\t\t\t\t\t\t//Is this an 'option' or a 'theme_mod'?\n 'capability' => 'edit_theme_options', \t\t\t\t\t\t\t//Optional. Special permissions for accessing this setting.\n 'transport' => 'postMessage', \t\t\t\t\t\t\t\t\t//What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?\n )\n );\n\n //define the control\n $wp_customize->add_control( new Customize_Alpha_Color_Control( //Instantiate the color control class\n $wp_customize, \t\t\t\t//Pass the $wp_customize object (required)\n 'lc_shop_overlay_bg_color', \t\t\t//Set a unique ID for the control\n array(\n 'label' => esc_html__('Background Color Product Actions Overlay On Shop Page', 'heritage'), //Admin-visible name of the control\n 'section' => 'lc_various_colors', //ID of the section (can be one of yours, or a WordPress default section)\n 'settings' => 'lc_customize[lc_shop_overlay_bg_color]', //Which setting to load and manipulate (serialized is okay)\n 'priority' => 4, //Determines the order this control appears in for the specified section\n )\n ));\n\n }", "public function textColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function textColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public static function plantuml_colour_scheme(): array\n\t{\n\t\treturn [\n\t\t\t'background' => 'FireBrick',\n\t\t\t'border' => 'DarkRed',\n\t\t\t'text' => 'White',\n\t\t];\n\t}", "function gopathemes_save_custom_css(){\n \n if (!function_exists('ot_get_option')) {\n return;\n }\n \n /* CUSTOM COLOR STYLING */\n if (ot_get_option('haira_custom_styling', 'off') == 'on') {\n\n $primary_color = ot_get_option('haira_primary_color','#FFBA00');\n $secondary_color = ot_get_option( 'haira_secondary_color', '#333333' );\n $body_bg = ot_get_option( 'haira_body_background', '#f6f6f6' );\n \n $body_font = ot_get_option('haira_body_font', \n array(\n 'font-family' => \"source-sans-pro, sans-serif\", \n 'font-color' => '#8a8a8a', \n 'font-size' => '14px',\n 'line-height' => '24px',\n 'font-weight' => '400'\n ));\n \n $heading_font = ot_get_option('haira_heading_font', \n array(\n 'font-family' => \"source-sans-pro, sans-serif\", \n 'font-color' => '#333333', \n 'font-weight' => '700'\n ));\n \n $menu_typo = ot_get_option( 'haira_menu_typography',\n array(\n 'font-color' => '#FFFFFF', \n 'font-size' => '13px', \n 'font-weight' => '400', \n 'letter-spacing' => '0.03em', \n 'text-transform' => 'none'\n ));\n \n $submenu_typo = ot_get_option( 'haira_submenu_typography',\n array(\n 'font-color' => '#FFFFFF', \n 'font-size' => '12px', \n 'font-weight' => '400', \n 'line-height' => '45px', \n 'letter-spacing' => '0.03em', \n 'text-transform' => 'none'\n ));\n\n $variables = array(\n 'primary-color' => $primary_color,\n 'second-color' => $secondary_color,\n 'bg-color' => $body_bg,\n \n 'header-bg' => ot_get_option( 'haira_header_bg' ),\n 'header-height' => ot_get_option( 'haira_header_height' ),\n \n 'menu-fs' => $menu_typo['font-size'],\n 'menu-link-color' => $menu_typo['font-color'],\n 'menu-link-color-hover' => ot_get_option( 'haira_menu_link_color_hover' ),\n 'menu-link-bg-hover' => ot_get_option( 'haira_menu_link_bg_hover' ),\n 'menu-link-ls' => $menu_typo['letter-spacing'],\n 'menu-font-weight' => $menu_typo['font-weight'],\n 'menu-text-transform' => $menu_typo['text-transform'],\n \n 'submenu-bg' => ot_get_option( 'haira_submenu_bg' ),\n 'submenu-fs' => $submenu_typo['font-size'],\n 'submenu-link-color' => $submenu_typo['font-color'],\n 'submenu-link-color-hover' => ot_get_option( 'haira_submenu_link_color_on_hover' ),\n 'submenu-link-bg-hover' => ot_get_option( 'haira_submenu_link_bg_on_hover' ),\n 'submenu-link-ls' => $submenu_typo['letter-spacing'],\n 'submenu-font-weight' => $submenu_typo['font-weight'],\n 'submenu-text-transform' => $submenu_typo['text-transform'],\n 'submenu-lh' => $submenu_typo['line-height'],\n \n 'heading-color' => $heading_font['font-color'],\n 'heading-font' => $heading_font['font-family'],\n 'hweight' => $heading_font['font-weight'],\n \n 'text-color' => $body_font['font-color'],\n 'body-font' => $body_font['font-family'],\n 'fsize' => $body_font['font-size'],\n 'lheight' => $body_font['line-height'],\n 'bweight' => $body_font['font-weight']\n );\n\n\n $default_vars = file( get_template_directory().'/scss/_vars.scss' );\n \n gopathemes_compile_css( haira_setup_scss_vars($default_vars, $variables) );\n }\n \n}", "function xanthia_admin_updateColors($args)\n{\n\textract($args);\n\t// check the session auth key\n\tif (!pnSecConfirmAuthKey())\t{\n\t\tpnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_BADAUTHKEY));\n\t\tpnRedirect(pnModURL('Xanthia', 'admin', 'main'));\n\t\treturn true;\n\t}\n\n\t// grab our parameters in a secure manner\n\tlist($skin, $paletteid) = pnVarCleanFromInput('skin','paletteid');\n\tlist($palname,\n\t\t $bgcolor,\n\t\t $color1,\n\t\t $color2,\n\t\t $color3,\n\t\t $color4,\n\t\t $color5,\n\t\t $color6,\n\t\t $color7,\n\t\t $color8,\n\t\t $sepcolor,\n\t\t $text1,\n\t\t $text2,\n\t\t $link,\n\t\t $vlink,\n\t\t $hover) = pnVarCleanFromInput('palname',\n\t\t\t\t\t\t\t\t\t 'bgcolor',\n\t\t\t\t\t\t\t\t\t 'color1',\n\t\t\t\t\t\t\t\t\t 'color2',\n\t\t\t\t\t\t\t\t\t 'color3',\n\t\t\t\t\t\t\t\t\t 'color4',\n\t\t\t\t\t\t\t\t\t 'color5',\n\t\t\t\t\t\t\t\t\t 'color6',\n\t\t\t\t\t\t\t\t\t 'color7',\n\t\t\t\t\t\t\t\t\t 'color8',\n\t\t\t\t\t\t\t\t\t 'sepcolor',\n\t\t\t\t\t\t\t\t\t 'text1',\n\t\t\t\t\t\t\t\t\t 'text2',\n\t\t\t\t\t\t\t\t\t 'link',\n\t\t\t\t\t\t\t\t\t 'vlink',\n\t\t\t\t\t\t\t\t\t 'hover');\n\n\t// check for our parameters\n\tif (empty($palname)) {\n\t\tpnSessionSetVar('errormsg', pnVarPrepForDisplay(_XA_ARGSERROR));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n\t\treturn false;\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// Update colors\n\tif (pnModAPIFunc('Xanthia', 'admin', 'updateColors',\n\t\t\t\t\t\t array('skin'\t => $skin,\n 'paletteid' => $paletteid,\n 'palname' => $palname,\n 'bgcolor' => $bgcolor,\n 'color1' => $color1,\n 'color2' => $color2,\n 'color3' => $color3,\n 'color4' => $color4,\n 'color5' => $color5,\n 'color6' => $color6,\n 'color7' => $color7,\n 'color8' => $color8,\n 'sepcolor' => $sepcolor,\n 'text1' => $text1,\n 'text2' => $text2,\n 'link' => $link,\n 'vlink' => $vlink,\n 'hover' => $hover))) {\n\t\t// Success\n\t\tpnSessionSetVar('statusmsg', pnVarPrepForDisplay(_XA_COLORSUPDATED));\n\t\t\n // Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\t \n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n\t\n\t\n\t$skinName = pnModAPIFunc('Xanthia','user','getSkinFromID',\n\t\t\tarray('id' => $skin));\n\n\t\t\tif ($paletteid == pnModGetVar('Xanthia',''.$skinName.'use')){\n\t\t\t\t\n\t\t\t\t$cachedthemes = pnModGetVar('Xanthia',''.$skinName.'themecache');\n\t\t\t\t\n\t\t\t\tif (isset($cachedthemes)){\n\t\t\t\t\tpnModAPIFunc('Xanthia', 'admin', 'writepalettescache', array('skinid' => $skin));\n\t\t\t\t\tpnModAPIFunc('Xanthia', 'admin', 'writestylesheet', array('skinid' => $skin,\n\t\t\t\t\t\t\t'paletteid' => $paletteid));\n\t\t\t\t}\n\t\t\t}\n }\n\t// Work completed, return to main\n\tpnRedirect(pnModURL('Xanthia', 'admin', 'editTheme',\n\t\t\t\t\t\t\tarray('todo' => 'colors',\n\t\t\t\t\t\t\t 'skin' => $skinName)));\n\treturn true;\n}", "abstract public function register_style();", "public function get_color_scheme() {\r\n\r\n return \tarray(\r\n 'epsilon_general_separator' => array(\r\n 'label' => esc_html__( 'Accent Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n 'epsilon_accent_color' => array(\r\n 'label' => esc_html__( 'Accent Color #1', 'unapp' ),\r\n 'description' => esc_html__( 'Theme main color.', 'unapp' ),\r\n 'default' => '#798eea',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_accent_color_second' => array(\r\n 'label' => esc_html__( 'Accent Color #2', 'unapp' ),\r\n 'description' => esc_html__( 'The second main color.', 'unapp' ),\r\n 'default' => '#4aca85',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n 'epsilon_accent_color_third' => array(\r\n 'label' => esc_html__( 'Accent Color #3', 'unapp' ),\r\n 'description' => esc_html__( 'The third main color.', 'unapp' ),\r\n 'default' => '#499bea',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_text_separator' => array(\r\n 'label' => esc_html__( 'Typography Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n 'epsilon_title_color' => array(\r\n 'label' => esc_html__( 'Title Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for titles.', 'unapp' ),\r\n 'default' => '#303133',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_text_color' => array(\r\n 'label' => esc_html__( 'Text Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for paragraphs.', 'unapp' ),\r\n 'default' => '#808080',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_link_color' => array(\r\n 'label' => esc_html__( 'Link Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for links.', 'unapp' ),\r\n 'default' => '#4aca85',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_link_hover_color' => array(\r\n 'label' => esc_html__( 'Link Hover Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for hovered links.', 'unapp' ),\r\n 'default' => '#5ed092',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_menu_separator' => array(\r\n 'label' => esc_html__( 'Navigation Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n \r\n\r\n 'epsilon_menu_item_color' => array(\r\n 'label' => esc_html__( 'Menu item color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_menu_item_hover_color' => array(\r\n 'label' => esc_html__( 'Menu item hover color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item hover color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_menu_item_active_color' => array(\r\n 'label' => esc_html__( 'Menu item active color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item active color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_background' => array(\r\n 'label' => esc_html__( 'Dropdown background', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu background.', 'unapp' ),\r\n 'default' => '#000000',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_item_color' => array(\r\n 'label' => esc_html__( 'Dropdown menu item color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item color.', 'unapp' ),\r\n 'default' => '#999999',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_item_hover_color' => array(\r\n 'label' => esc_html__( 'Dropdown menu item hover color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item hover color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_item_active_color' => array(\r\n 'label' => esc_html__( 'Dropdown menu item active color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item active color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_separator' => array(\r\n 'label' => esc_html__( 'Footer Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n 'epsilon_footer_contact_background' => array(\r\n 'label' => esc_html__( 'Footer Widget Background', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer widget background.', 'unapp' ),\r\n 'default' => '#303133',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_background' => array(\r\n 'label' => esc_html__( 'Footer Copyright Background', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer copyright background.', 'unapp' ),\r\n 'default' => '#262626',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_title_color' => array(\r\n 'label' => esc_html__( 'Footer Title Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer widget title.', 'unapp' ),\r\n 'default' => '#e6e6e6',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_text_color' => array(\r\n 'label' => esc_html__( 'Text Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer text.', 'unapp' ),\r\n 'default' => '#808080',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_link_color' => array(\r\n 'label' => esc_html__( 'Link Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer link.', 'unapp' ),\r\n 'default' => '#4aca85',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_link_hover_color' => array(\r\n 'label' => esc_html__( 'Link Hover Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer link hover.', 'unapp' ),\r\n 'default' => '#5ed092',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n );\r\n\t}", "function dwwp_register_custom_settings_colors() {\n\tregister_setting( 'colors-settings-group','color1' );\n\t// Register Color Background Two\n\tregister_setting( 'colors-settings-group','color2' );\n\t// Register Color Main Color\n\tregister_setting( 'colors-settings-group','color3' );\n\t// Register Color Main Color\n\tregister_setting( 'colors-settings-group','color4' );\n\t// Register Color Main Color\n\tregister_setting( 'colors-settings-group','color5' );\n\t// Register Color Main Color\n\tregister_setting( 'colors-settings-group','color6' );\n\t// Register Color Main Color\n\tregister_setting( 'colors-settings-group','color7' );\n\t// Register Color Fonts\n\tregister_setting( 'colors-settings-group','color8' );\n\t// Register Color Fonts\n\tregister_setting( 'colors-settings-group','infoColor' );\n\t// Register Transparent Image Background Color\n\tregister_setting( 'colors-settings-group','transparentColor' );\n\t// Register Font Color Have Deffrent Background\n\tregister_setting( 'colors-settings-group','fontColorHaveBackground' );\n\t// Register Scroll Color\n\tregister_setting( 'colors-settings-group','mainScrollColor' );\n\t// Register Words Under Logo\n\tregister_setting( 'colors-settings-group','wordsUnderLogo' );\n\t// Register Notification Upperbar\n\tregister_setting( 'colors-settings-group','notificationUpperbar' );\n\t// Register Notification Upperbar Link\n\tregister_setting( 'colors-settings-group','notificationUpperbarLink' );\n\t// Shoose Your Logo Image\n\tregister_setting( 'colors-settings-group','logoImages' );\n\t// Shoose Your Images For Header\n\tregister_setting( 'colors-settings-group','headerImages' );\n\n\tadd_settings_section( 'main-colors-settings', '', 'colors_main__options', 'colors_setting' );\n\n\t// Color Background One\n\tadd_settings_field( 'color1', 'background One', 'costum_setting_colors_background1_callback', 'colors_setting', 'main-colors-settings' );\n\t// Color Background Two\n\tadd_settings_field( 'color2', 'background Two', 'costum_setting_colors_background2_callback', 'colors_setting', 'main-colors-settings' );\n\t// Main Color\n\tadd_settings_field( 'color3', 'Main Color 1', 'costum_setting_colors_color3_callback', 'colors_setting', 'main-colors-settings' );\n\t// Main Color\n\tadd_settings_field( 'color4', 'Main Color 2', 'costum_setting_colors_color4_callback', 'colors_setting', 'main-colors-settings' );\n\t// Main Color\n\tadd_settings_field( 'color5', 'Main Color 3', 'costum_setting_colors_color5_callback', 'colors_setting', 'main-colors-settings' );\n\t// Main Color\n\tadd_settings_field( 'color6', 'Main Color 4', 'costum_setting_colors_color6_callback', 'colors_setting', 'main-colors-settings' );\n\t// Main Color\n\tadd_settings_field( 'color7', 'Main Color 5', 'costum_setting_colors_color7_callback', 'colors_setting', 'main-colors-settings' );\n\t// Fonts Color One\n\tadd_settings_field( 'color8', 'Fonts Color One', 'costum_setting_colors_color8_callback', 'colors_setting', 'main-colors-settings' );\n\t// Fonts Color Two\n\tadd_settings_field( 'infoColor', 'Fonts Color Two', 'costum_setting_colors_infoColor_callback', 'colors_setting', 'main-colors-settings' );\n\t// font Color Have Background\n\tadd_settings_field( 'fontColorHaveBackground', 'Font Color Three', 'costum_setting_colors_fontColorHaveBackground_callback', 'colors_setting', 'main-colors-settings' );\n\t// Transparent Image\n\tadd_settings_field( 'transparentColor', 'Transparent Image', 'costum_setting_colors_transparentColor_callback', 'colors_setting', 'main-colors-settings' );\n\t// Scroll Image\n\tadd_settings_field( 'mainScrollColor', 'main Scroll Color', 'costum_setting_colors_mainScrollColor_callback', 'colors_setting', 'main-colors-settings' );\n\t// Words Under Logo\n\tadd_settings_field( 'wordsUnderLogo', 'Words Under Logo', 'costum_setting_colors_wordsUnderLogo_callback', 'colors_setting', 'main-colors-settings' );\n\t// Notification Upperbar\n\tadd_settings_field( 'notificationUpperbar', 'Notification Upperbar', 'costum_setting_notificationUpperbar_callback', 'colors_setting', 'main-colors-settings' );\n\t// Notification Upperbar\n\tadd_settings_field( 'notificationUpperbarLink', 'Notification Upperbar Link', 'costum_setting_notificationUpperbarLink_callback', 'colors_setting', 'main-colors-settings' );\n\t// Shoose Your Logo Image\n\tadd_settings_field( 'logoImages', 'Logo Images', 'costum_setting_LogoImages_callback', 'colors_setting', 'main-colors-settings' );\n\t// Shoose Your Images For Header\n\tadd_settings_field( 'headerImages', 'Header Images', 'costum_setting_headerImages_callback', 'colors_setting', 'main-colors-settings' );\n\n}", "function colorMap(): array\n{\n return [\n 'black' => 'white',\n 'red' => 'white',\n 'green' => 'black',\n 'yellow' => 'black',\n 'blue' => 'white',\n 'magenta' => 'white',\n 'cyan' => 'black',\n 'white' => 'black',\n 'default' => 'white',\n ];\n}", "function costum_setting_colors_color3_callback() {\n\t$color3 = esc_attr( get_option( 'color3' ) ); ?>\n\n\t<div class=\"input-color-container\">\n\t\t<input name=\"color3\" id=\"input-color3\" value=\"<?php echo $color3; ?>\" class=\"input-color\" type=\"color\">\n\t</div>\n\n\t<?php\n}", "function costum_setting_colors_background1_callback() {\n\t$color1 = esc_attr( get_option( 'color1' ) ); ?>\n\n\t<div class=\"input-color-container\">\n\t\t<input name=\"color1\" id=\"input-color1\" value=\"<?php echo $color1; ?>\" class=\"input-color\" type=\"color\">\n\t</div>\n\n\t<?php\n}", "public function getColor() {}", "public function getColor() {}", "protected function setTransparencyColor():void{\n\n\t\tif($this->options->outputType === QROutputInterface::GDIMAGE_JPG || !$this->options->imageTransparent){\n\t\t\treturn;\n\t\t}\n\n\t\t$transparencyColor = $this->background;\n\n\t\tif($this::moduleValueIsValid($this->options->transparencyColor)){\n\t\t\t$transparencyColor = $this->prepareModuleValue($this->options->transparencyColor);\n\t\t}\n\n\t\timagecolortransparent($this->image, $transparencyColor);\n\t}", "public function color()\n {\n }", "function generateSocialColorPalette()\n {\n $socialnetworks = array(\"twitter\", \"instagram\", \"facebook\", \"storify\");\n \n $properties = array(\"cti\", \"cte\", \"ca\", \"cbg\", \"cbc\", \"cbs\", \"cbr\", \"cfs\", \"ctmtb\", \"ctmlr\");\n /*$properties[$socialnetowks[1]] = array(\"cti\", \"cte\", \"ca\", \"cbg\", \"cbc\", \"cbs\", \"cbr\", \"cfs\", \"cmtb\", \"cmlr\");\n $properties[$socialnetowks[2]] = array(\"cti\", \"cte\", \"ca\", \"cbg\", \"cbc\", \"cbs\", \"cbr\", \"cfs\", \"cmtb\", \"cmlr\");\n $properties[$socialnetowks[3]] = array(\"cti\", \"cte\", \"ca\", \"cbg\", \"cbc\", \"cbs\", \"cbr\", \"cfs\", \"cmtb\", \"cmlr\");\n */\n // Twitter default values\n $default_properties[$socialnetworks[0]] = array(\"#ffffff\", \"#ffffff\", \"#002957\", \"#4099ff\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n // Instagram default values\n $default_properties[$socialnetworks[1]] = array(\"#ffffff\", \"#000000\", \"#ffffff\", \"#517fa4\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n // Facebook default values\n $default_properties[$socialnetworks[2]] = array(\"#ffffff\", \"#000000\", \"#ffffff\", \"#3B5998\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n // Storify default values\n $default_properties[$socialnetworks[3]] = array(\"#3a96db\", \"#3a96db\", \"#dfe5ea\", \"#a9bbcc\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n \n \n $db = JFactory::getDBO();\n\n foreach($socialnetworks as $socialnetwork)\n {\n $category_id = self::checkCategoryExists($socialnetwork);\n if($category_id)\n {\n $propertyIndex = 0;\n foreach($properties as $property)\n {\n $value = $default_properties[$socialnetwork][$propertyIndex++]; \n if(!self::checkExistingCategoryColorPalette($property, $category_id)) \n {\n $sql = \"INSERT INTO #__activategrid (context, name, value) VALUES ('category_color', '\".$property.\"_\".$category_id.\"', '{$value}');\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n }\n }\n \n \n // Default properties for other categories\n $default_properties[\"other\"] = array(\"#000000\", \"#000000\", \"#002bff\", \"#ebebeb\", \"\", \"0\", \"10\", \"12\", \"20\", \"20\");\n \n // Other categories \n $sql = \"SELECT id FROM #__categories WHERE extension='com_content' AND title <> 'twitter' AND title <> 'facebook' AND title <> 'instagram' AND title <> 'storify'\";\n $db->setQuery($sql);\n $db->execute();\n $result = $db->loadObjectList();\n foreach($result as $category)\n { \n $category_id = $category->id; \n $propertyIndex = 0;\n foreach($properties as $property)\n {\n $value = $default_properties[\"other\"][$propertyIndex++]; \n if(!self::checkExistingCategoryColorPalette($property, $category_id)) \n {\n $sql = \"INSERT INTO #__activategrid (context, name, value) VALUES ('category_color', '\".$property.\"_\".$category_id.\"', '{$value}');\";\n $db->setQuery($sql);\n $db->execute();\n }\n }\n }\n }", "function wp_tinycolor_hue_to_rgb($p, $q, $t)\n {\n }" ]
[ "0.72150284", "0.69665104", "0.6926205", "0.64307857", "0.614706", "0.6119006", "0.61009115", "0.60835445", "0.60757315", "0.60445267", "0.60401005", "0.6023986", "0.60196173", "0.5969022", "0.5923433", "0.586679", "0.5779214", "0.5763321", "0.57502395", "0.5736252", "0.5730938", "0.5656518", "0.5647034", "0.56443346", "0.5594995", "0.5584178", "0.55325514", "0.5528638", "0.5492364", "0.5481506", "0.5441452", "0.543912", "0.5435025", "0.54269475", "0.54269475", "0.54113346", "0.5381968", "0.5363842", "0.5356244", "0.53519833", "0.53498834", "0.5345584", "0.53266245", "0.5318394", "0.53179044", "0.53014684", "0.52980715", "0.529352", "0.5288625", "0.52757704", "0.52582157", "0.5248254", "0.5229616", "0.52283025", "0.52214926", "0.5198083", "0.51947683", "0.518959", "0.51894873", "0.51831734", "0.51584715", "0.5158285", "0.51401573", "0.51384425", "0.5129733", "0.5129733", "0.5129733", "0.5129733", "0.5129733", "0.5129733", "0.51297265", "0.5126454", "0.5116464", "0.5111363", "0.5109498", "0.5109008", "0.51080155", "0.5096496", "0.50936574", "0.50816524", "0.50808775", "0.50802386", "0.50761116", "0.5074816", "0.5074816", "0.50695044", "0.506775", "0.50671923", "0.5062138", "0.505741", "0.50524026", "0.5050118", "0.50488764", "0.50406975", "0.5033328", "0.5033328", "0.50320965", "0.5032052", "0.5030233", "0.5024881" ]
0.7064425
1
Remove page templates inherited from the parent theme.
Удалить шаблоны страниц, наследованные от родительской темы.
function child_theme_remove_page_template( $page_templates ) { unset( $page_templates['page-templates/blank.php'],$page_templates['page-templates/empty.php'], $page_templates['page-templates/fullwidthpage.php'], $page_templates['page-templates/left-sidebarpage.php'], $page_templates['page-templates/both-sidebarspage.php'] ); return $page_templates; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function be_remove_genesis_page_templates( $page_templates ) {\n\tunset( $page_templates['page_archive.php'] );\n\tunset( $page_templates['page_blog.php'] );\n\treturn $page_templates;\n}", "function wmf_undo_redirect_template_changes_in_admin() {\n\tremove_filter( 'page_link', 'wmf_skip_redirect_template_in_page_link' );\n\tremove_filter( 'the_title', 'wmf_skip_redirect_template_in_title' );\n}", "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_parent_features() {\n \tremove_action( 'init', 'gdlr_register_portfolio_admin_option' );\n remove_action('init', 'gdlr_init_page_feature');\n\n //remove theme support for post formats\n remove_theme_support('post-formats');\n}", "function jn_htmlInUrl_deactive() {\r\n\t\tglobal $wp_rewrite;\r\n\t\tif ( in_array( 'page', $this->selected_post_type ) ) {\r\n\t\t\t$wp_rewrite->page_structure = str_replace( '.html','',$wp_rewrite->page_structure );\r\n\t\t\t$wp_rewrite->flush_rules();\r\n\t\t}\r\n\t}", "function ws_kill_parent_theme($themes) {\r\n\tunset( $themes['thematic'] );\r\n\treturn $themes;\r\n}", "public static function use_parent_template() {\n add_action('save_post', array('core_admin', 'switch_page_template'));\n }", "function remove_post_type_support_for_pages() {\n\t\t// UNCOMMENT if you want to remove some stuff\n\t\t// Replace 'page' with 'post' or a custom post/content type\n\t\t# remove_post_type_support( 'page', 'title' );\n\t\t// remove_post_type_support( 'page', 'editor' );\n\t\tremove_post_type_support( 'page', 'thumbnail' );\n\t\t# remove_post_type_support( 'page', 'page-attributes' );\n\t\t# remove_post_type_support( 'page', 'excerpt' );\n}", "public function remove_page_editor() {\n\t\tremove_post_type_support('page', 'editor');\n\t}", "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 unhook_parent_style() {\n \n wp_dequeue_style( 'genericons' );\n\twp_deregister_style( 'genericons' );\n wp_dequeue_style( 'twentyfifteen-ie' );\n\twp_deregister_style( 'twentyfifteen-ie' );\n wp_dequeue_style( 'twentyfifteen-ie7' );\n\twp_deregister_style( 'twentyfifteen-ie7' );\n wp_dequeue_style( 'twentyfifteen-fonts' );\n\twp_deregister_style( 'twentyfifteen-fonts' );\n}", "function _ut_remove_default_vc_templates( $data ) {\r\n \r\n $data = array();\r\n \r\n return $data;\r\n \r\n}", "function remove_guttenberg_from_pages() {\n\tremove_post_type_support( 'youthclub', 'editor' );\n}", "function remove_theme_mods()\n {\n }", "function _remove_theme_attribute_in_block_template_content($template_content)\n {\n }", "function childtheme_no_superfish(){\r\n\tremove_theme_support('thematic_superfish');\r\n}", "function remove_post_support() {\n remove_post_type_support( 'page', 'editor' );\n }", "public function deleteCompiledTemplates() {\n\t\t// templates\n\t\t$filenames = glob(WCF_DIR.'templates/compiled/*_'.$this->languageID.'_*.php');\n\t\tif ($filenames) foreach ($filenames as $filename) @unlink($filename);\n\t\t\n\t\t// acp templates\n\t\t$filenames = glob(WCF_DIR.'acp/templates/compiled/*_'.$this->languageID.'_*.php');\n\t\tif ($filenames) foreach ($filenames as $filename) @unlink($filename);\n\t}", "function deactivate() {\r\n global $wp_rewrite;\r\n\r\n $wp_rewrite->page_structure = str_replace(\".\" . $this->options->extension, \"\", $wp_rewrite->page_structure);\r\n $wp_rewrite->flush_rules();\r\n }", "public static function register_templates() {\n if (version_compare(floatval(get_bloginfo('version')), '4.7', '<')) {\n // 4.6 and older\n add_filter('page_attributes_dropdown_pages_args', array(get_called_class(), 'register_project_templates'));\n } else {\n // Add a filter to the wp 4.7 version attributes metabox\n add_filter('theme_page_templates', array(get_called_class(), 'add_new_template'));\n }\n // Add a filter to the save post to inject out template into the page cache\n add_filter('wp_insert_post_data', array(get_called_class(), 'register_project_templates'));\n // Add a filter to the template include to determine if the page has our \n // template assigned and return it's path\n add_filter('template_include', array(get_called_class(), 'view_project_template'));\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 kill_unused_templates() {\n\tglobal $wp_query, $post;\n\n\tif ( is_author() || is_attachment() || is_day() || is_search() || is_feed() ) {\n\t\twp_redirect( home_url() );\n\t\texit();\n\t}\n}", "public static function switch_page_template() {\n\n global $post;\n\n $post_type = get_post_type($post->ID);\n\n if (is_page() or is_post_type_hierarchical($post_type)) {// Checks if current post type is a page, rather than a post\n $current_page_template = get_post_meta($post->ID, '_wp_page_template', true);\n $parent_page_template = get_post_meta($post->post_parent, '_wp_page_template', true);\n $parents = get_post_ancestors($post->ID);\n\n if ($parents) {\n update_post_meta($post->ID, '_wp_page_template', $parent_page_template, $current_page_template);\n }\n }// End check for page\n }", "function jetpackme_remove_rp() {\n\tif ( class_exists( 'Jetpack_relatedPosts')) {\n\t\t$jprp = Jetpack_relatedPosts::init();\n\t\t$callback = array ( $jprp, 'filter_add_target_to_dom' );\n\t\tremove_filter( 'the_content', $callback, 40);\n\t}\n}", "final public function removePages(): void\n {\n $this->pages = [];\n $this->index = [];\n }", "function rd_fix_blog_tab_on_cpt($classes, $item, $args) {\n if (!is_singular('post') && !is_category() && !is_tag()) {\n $blog_page_id = intval(get_option('page_for_posts'));\n if ($blog_page_id != 0) {\n if ($item->object_id == $blog_page_id) {\n unset($classes[array_search('current_page_parent', $classes)]);\n }\n }\n }\n return $classes;\n}", "function custom_page_home() {\n\tif(isset($_GET['post']))\n\t\t$post_id = $_GET['post'];\n\telse if(isset($_POST['post_ID']))\n\t\t$post_id = $_POST['post_ID'];\n\n\tif(!isset($post_id) || empty($post_id))\n\t\treturn;\n\n\t// Get the name of the Page Template file.\n\t$template_file = get_post_meta($post_id, '_wp_page_template', true);\n\n\t// Do something for the template\n\tif($template_file == \"home\") {\n\t\tremove_post_type_support('page','author');\n\t\tremove_post_type_support('page','custom-fields');\n\t\tremove_post_type_support('page','comments');\n\t\tremove_post_type_support('page','excerpt' );\n\t\tremove_post_type_support('page','trackbacks');\n\t\tremove_post_type_support('page','revisions');\n\t}\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}", "protected function uninstall_templates()\n {\n // initialize the Finder\n $finder = new Finder();\n // we need only the top level\n $finder->depth('== 0');\n // get all directories in the /Examples\n $finder->directories()->in(MANUFAKTUR_PATH.'/TemplateTools/Examples');\n \n foreach ($finder as $directory) {\n $template_name = $directory->getFilename();\n $target_directory = CMS_PATH.'/templates/'.$template_name;\n \n if ($this->app['filesystem']->exists($target_directory)) {\n // the template exists - remove it\n $this->app['filesystem']->remove($target_directory);\n }\n \n $this->app['db']->delete(CMS_TABLE_PREFIX.'addons', \n array('type' => 'template', 'directory' => $template_name));\n }\n }", "function _preview_theme_template_filter()\n {\n }", "function my_remove_post_type_support()\n{\n\tremove_post_type_support('page', 'editor');\n\tremove_post_type_support('post', 'editor');\n\tremove_post_type_support('companies', 'editor');\n\tremove_post_type_support('group_of_companies', 'editor');\n}", "public function remove_sub_menus() {\n remove_menu_page( 'edit-comments.php' );\n\n if ( current_user_can( 'editor' ) ) {\n remove_submenu_page( 'themes.php', 'themes.php' );\n\n global $submenu;\n unset( $submenu['themes.php'][6] );\n }\n }", "function ti_wp_foundation_theme_head_cleanup() {\n\t// Remove category feeds\n\t// remove_action( 'wp_head', 'feed_links_extra', 3 );\n\t// Remove post and comment feeds\n\t// remove_action( 'wp_head', 'feed_links', 2 );\n\t// Remove EditURI link\n\tremove_action( 'wp_head', 'rsd_link' );\n\t// Remove Windows live writer\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t// Remove index link\n\tremove_action( 'wp_head', 'index_rel_link' );\n\t// Remove previous link\n\tremove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );\n\t// Remove start link\n\tremove_action( 'wp_head', 'start_post_rel_link', 10, 0 );\n\t// Remove links for adjacent posts\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );\n\t// Remove WP version\n\tremove_action( 'wp_head', 'wp_generator' );\n}", "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}", "function remove_genesis_features() {\n remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );\n remove_action('genesis_footer', 'genesis_do_footer');\n remove_action('genesis_footer', 'genesis_footer_markup_open', 5);\n remove_action('genesis_footer', 'genesis_footer_markup_close', 15);\n remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );\n remove_action( 'genesis_entry_footer', 'genesis_post_meta' );\n}", "function PREFIX_remove_page_class_from_post_class($classes) {\n\t$classes = array_diff( $classes, array(\"page\") );\n\n\treturn $classes;\n}", "function remove_menus(){\n// remove_menu_page( 'edit.php' ); //Posts\n\n// remove_menu_page( 'edit.php?post_type=page' ); //Pages\n\n\n}", "public function Setup_Templates_List() : void\n {\n $this->Templates = apply_filters(\"WP_Plugin_virtual_pages_templates\",[\n ...array('page.php', 'index.php' ), ...(array) $this->Template]);\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 customize_themes_print_templates()\n {\n }", "public static function plugin_deactivated() {\n\n\t\t// define page array\n\t\t$page_definitions = [\n\t\t\t'codeable-users-table-shortcode-page' => [\n\t\t\t\t'title' => __( 'Codeable Users Table Shortcode Page', 'codeable-user-tables' ),\n\t\t\t\t'content' => '[codeable_users_table]'\n\t\t\t],\n\t\t];\n\n\t\tforeach ( $page_definitions as $slug => $page ) {\n\t\t\t// remove all the data we created\n\t\t\t$page = get_page_by_path( $slug, OBJECT, 'page' );\n\t\t\twp_delete_post( $page->ID, true );\n\t\t}\n\n\t}", "public function page_templates()\n {\n // Single Chiro Quiz page template\n if (is_single() && get_post_type() == $this->token) {\n if (!defined('PLATFORM_FUNNEL')) {\n define('PLATFORM_FUNNEL', 'CHIRO_QUIZ');\n }\n\n include($this->template_path . 'single-quiz.php');\n exit;\n }\n }", "public function removeNodeThemes()\n\t{\n\t\t$this->removeNode( 'themes' );\n\t}", "function minim_preprocess_page(&$vars) {\n //for some reason system main inserts itself into content region even if empty\n //so we remove it here to prevent bloat\n //to test if this is still applicable comment out, clear caches and look for a white space at\n //bottom of the front page\n if (count($vars['page']['content']) == 1 && empty($vars['page']['content']['system_main']['main']['#markup'])) {\n unset($vars['page']['content']);\n }\n\n //default styling for tabs\n if (!empty($vars['tabs'])) {\n foreach ($vars['tabs']['#primary'] as $tab_key => $tab) {\n $vars['tabs']['#primary'][$tab_key]['#link']['localized_options']['attributes']['class'][] = 'padding-xxs'; \n $vars['tabs']['#primary'][$tab_key]['#link']['localized_options']['attributes']['class'][] = 'margin-s'; \n $vars['tabs']['#primary'][$tab_key]['#link']['localized_options']['attributes']['class'][] = 'block-link'; \n $vars['tabs']['#primary'][$tab_key]['#link']['localized_options']['attributes']['class'][] = 'bg-green'; \n }\n }\n\n //node-type adjustments\n if (is_object($vars['node'])) {\n $node_type = $vars['node']->getType();\n switch ($node_type) {\n case 'google_form':\n //all the js and css specific to dealing with google forms\n minim_add_google_form_elements($vars);\n break;\n case 'portfolio_piece':\n //no titles on portfolio pages\n $vars['title'] = false;\n break;\n case 'facility':\n //automatically setting parent for facility nodes\n $menu_tree = \\Drupal::service('menu_link.tree');\n $menu_tree->setPath('main', 'tools/facilities');\n break;\n }\n\n //set a variable here for nodes without bodies that\n //way we can hide titles as well.. allows for easy creation\n //of pages without content that we can place blocks on\n $body = $vars['node']->get('body')->getValue();\n if (empty($body[0]['value']) && $node_type != 'google_form') {\n $vars['page']['no_body'] = true;\n } \n }\n if (\\Drupal::request()->attributes->get('_system_path') == '2011-annual-report') {\n $drop_menus = array(\n '#attached' => array(\n 'css' => array(\n drupal_get_path('theme', 'minim') . '/css/ar2011.css',\n ),\n ),\n );\n drupal_render($drop_menus);\n }\n}", "public function removePage()\n\t{\n\t\tif(isset($this->searchFilters[$this->ref_page]))\n\t\t{\n\t\t\tunset($this->searchFilters[$this->ref_page]);\n\t\t}\n\t}", "function mdwpfp_init_markup_cleanup() {\n add_action('init', 'mdwpfp_head_cleanup');\n\n // Remove WP version from the RSS feed.\n add_filter('the_generator', 'mdwpfp_rss_version');\n\n // Clean the WP generated code around images.\n add_filter('the_content', 'mdwpfp_filter_ptags_on_images');\n\n // Remove pesky injected css for recent comments widget.\n add_filter('wp_head', 'mdwpfp_remove_wp_widget_recent_comments_style', 1);\n // Clean up injected comment styles in the <head>.\n add_action('wp_head', 'mdwpfp_remove_recent_comments_style', 1);\n\n // Clean the default WP photo gallery output.\n add_filter('gallery_style', 'mdwpfp_gallery_style');\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 childtheme_remove_scripts(){\n remove_action('wp_enqueue_scripts','thematic_head_scripts');\n}", "function noc_deregister_scripts() {\n\n //Deregister styles\n\n\t// Parent\n\twp_dequeue_style( 'theme-style-child' );\n\twp_deregister_style( 'theme-style-child' );\n\n\t// Theme child from parent\n\twp_dequeue_style( 'theme-style' );\n\twp_deregister_style( 'theme-style' );\n\n\t// // tt-main-style\n\t// wp_dequeue_style( 'tt-main-style' );\n\t// wp_deregister_style( 'tt-main-style' );\n\n\t// // tt-theme-style\n\t// wp_dequeue_style( 'tt-theme-style' );\n\t// wp_deregister_style( 'tt-theme-style' );\n\n}", "public function stop_previewing_theme()\n {\n }", "function itcr_preprocess_page( & $variables ) {\n\tif ( $variables[ 'is_front' ] ) {\n\t\t$variables[ 'title' ] = '';\n\t\tunset( $variables[ 'page' ][ 'content' ][ 'system_main' ][ 'default_message' ] );\n\t}\n}", "function GTPress_hide_themes()\r\n{\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('themes.php', $disabled_menu_items)) {\r\n\t\tadd_menu_page ( 'Look & Feel', 'Look & Feel', 'edit_theme_options', 'nav-menus.php' );\r\n\t\tadd_submenu_page( 'nav-menus.php', 'Menus', 'Menus', 'edit_theme_options', 'nav-menus.php' );\r\n\t\tadd_submenu_page( 'nav-menus.php', 'Custom Header', 'Custom Header', 'edit_theme_options', 'themes.php?page=custom-header' );\r\n\t\tadd_submenu_page( 'nav-menus.php', 'Custom Background', 'Custom Background', 'edit_theme_options', 'themes.php?page=custom-background' );\r\n\t}\r\n}", "public static function resetTemplates()\n\t{\n\t\tself::$_template_names = array();\n\t}", "function phptemplate_preprocess_page(&$vars) {\n $vars['tabs2'] = menu_secondary_local_tasks();\n // Hook into color.module\n if (module_exists('color')) {\n _color_page_alter($vars);\n }\n// Add per content type pages\n#\n if (isset($vars['node'])) {\n# // Add template naming suggestion. It should alway use hyphens.\n#// If node type is \"custom_news\", it will pickup \"page-custom-news.tpl.php\".\n#\n $vars['template_files'][] = 'page-' . str_replace('_', '-', $vars['node']->type);\n }\n drupal_add_js('sites/all/libraries/tinymce/jscripts/tiny_mce/tiny_mce.js');\n drupal_add_js('sites/all/libraries/ckeditor5/ckeditor.js');\n $vars['scripts'] = drupal_get_js();\n}", "public function tear_down(): void {\n\t\tremove_action( 'wp_body_open', [ $this->instance, 'embed_web_stories' ] );\n\n\t\tremove_theme_support( 'web-stories' );\n\n\t\tdelete_option( Customizer::STORY_OPTION );\n\t\tupdate_option( 'stylesheet', $this->stylesheet );\n\n\t\tparent::tear_down();\n\t}", "function cera_grimlock_remove_actions() {\n\t\tif ( is_page_template( 'template-homepage.php' ) || is_page_template( 'template-dashboard.php' ) || is_page_template( 'template-homepage-minimal.php' ) ) :\n\t\t\tremove_action( 'cera_header', 'cera_grimlock_before_content', 20 );\n\t\t\tadd_action( 'cera_header', 'cera_grimlock_homepage_before_content', 20 );\n\n\t\t\tremove_action( 'cera_footer', 'cera_grimlock_after_content', 10 );\n\t\t\tadd_action( 'cera_footer', 'cera_grimlock_homepage_after_content', 10 );\n\t\telseif ( is_404() ) :\n\t\t\tremove_action( 'cera_header', 'cera_grimlock_before_content', 20 );\n\t\t\tadd_action( 'cera_header', 'cera_grimlock_404_before_content', 20 );\n\n\t\t\tremove_action( 'cera_footer', 'cera_grimlock_after_content', 10 );\n\t\t\tadd_action( 'cera_footer', 'cera_grimlock_404_after_content', 10 );\n\t\tendif;\n\t}", "function dentario_clients_settings_theme_setup2() {\n\t\tdentario_add_theme_inheritance( array('clients' => array(\n\t\t\t'stream_template' => 'blog-clients',\n\t\t\t'single_template' => 'single-client',\n\t\t\t'taxonomy' => array('clients_group'),\n\t\t\t'taxonomy_tags' => array(),\n\t\t\t'post_type' => array('clients'),\n\t\t\t'override' => 'custom'\n\t\t\t) )\n\t\t);\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 d4tw_remove_sidebars () {\r\n\tunregister_sidebar( 'statichero' );\r\n\tunregister_sidebar( 'hero' );\r\n\tunregister_sidebar( 'footerfull' );\r\n\tunregister_sidebar( 'left-sidebar' );\r\n unregister_sidebar( 'right-sidebar' );\r\n unregister_sidebar( 'herocanvas' );\r\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}", "public static function removeDefaultViews()\n {\n File::delete(resource_path('/views/home.blade.php'));\n File::delete(resource_path('/views/welcome.blade.php'));\n }", "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 _h_remove_jetpack_related_posts() {\n if (class_exists('Jetpack_RelatedPosts')) {\n $jprp = Jetpack_RelatedPosts::init();\n $callback = [$jprp, 'filter_add_target_to_dom'];\n remove_filter('the_content', $callback, 40);\n }\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}}", "function cleaning_wp(){\n remove_action('wp_head', 'wp_generator'); // remove WP tag\n\n remove_action( 'wp_head', 'feed_links_extra', 3 ); // remove extra feeds\n remove_action( 'wp_head', 'feed_links', 2 ); // remove general feeds\n remove_action( 'wp_head', 'rsd_link' ); // remove RSD link\n remove_action( 'wp_head', 'wlwmanifest_link' ); // remove manifest link\n remove_action( 'wp_head', 'index_rel_link' ); // remove index link\n remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // remove prev link\n remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // remove start link\n remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); // remove links to adjacent posts\n remove_action( 'wp_head', 'wp_shortlink_wp_head'); // remove shortlink\n\n // disable admin bar\n add_filter('the_generator', '__return_false');\n add_filter('show_admin_bar','__return_false');\n\n // disable emoji\n remove_action( 'wp_head', 'print_emoji_detection_script', 7);\n remove_action( 'wp_print_styles', 'print_emoji_styles' );\n\n // disbale json\n remove_action( 'wp_head', 'rest_output_link_wp_head' );\n remove_action( 'wp_head', 'wp_oembed_add_discovery_links' );\n remove_action( 'template_redirect', 'rest_output_link_header', 11 );\n}", "function thb_disable_layout_default_options_splash_page() {\n\t\tif ( thb_get_admin_template() == 'template-splash.php' ) {\n\t\t\t$fields_container = thb_theme()->getPostType( 'page' )->getMetabox( 'layout' )->getContainer( 'layout_container' );\n\t\t\t$fields_container->removeField('subtitle');\n\t\t\t$fields_container->removeField('pageheader_disable');\n\t\t}\n\t}", "function kstHelpWordpressSitePages_customPageTemplates() {\n ?>\n <p>\n WordPress offers incredible flexibility as a CMS (Content Management System).\n Theme and plugin developers often include special layout templates that you\n can use on your site pages to present information in a different format or\n layout, as well as to add functionality to certain pages of your site.\n </p>\n <p>\n Examples include contact forms, multi-column layouts, magazine style\n index layouts, or even mini applications.\n </p>\n <p>\n Occasionally these templates can be so complex that you can't really\n even edit the content the page and the page that appears in your\n Pages Admin List is really only a place holder. It will be obvious\n if you come across one of these pages.\n </p>\n <p>\n You will know that the creator of your theme or plugins included custom\n layout templates for you to use if (when creating/editing a Site Page)\n you see \"Template\" with a dropdown box under it in the right hand sidebar.\n </p>\n <p>\n Choosing a template and publishing the page will use that template instead of\n the default \"pages\" template that your site pages use.\n </p>\n <?php\n}", "public function clearTemplateCache()\n {\n $this->loadedTemplates = array();\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 remove_menus(){ \n\t// remove_menu_page('edit.php');\n\t// remove_menu_page('edit-comments.php');\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 fes_remove_posts_admin_menus() {\n remove_menu_page( 'edit.php' );\n}", "function deenqueue_parent_scripts_styles() {\n wp_dequeue_script( 'one-page-slitslider' );\n wp_deregister_script( 'one-page-slitslider' );\n wp_dequeue_script( 'one-page-custom' );\n wp_deregister_script( 'one-page-custom' );\n}", "function purity_theme_init() {\n elgg_extend_view('page/elements/head', 'purity_theme/meta');\n elgg_unregister_menu_item('topbar', 'elgg_logo');\n\telgg_register_plugin_hook_handler('index', 'system', 'purity_theme');\n}", "function ru_filter_styles(){\n $this->removestyle(\"bbp-default\");\n\n // download monitor is not used in the front-end.\n $this->removestyle(\"wp_dlmp_styles\");\n\n if( !is_singular( 'docs' ) ){\n // the table of contents plugin is being used on documentation pages only\n $this->removestyle(\"toc-screen\");\n }\n\n if ( !( is_page( 'account' ) || is_page( 'edit-profile' )) ){\n // this should not be like this. Need to look into it.\n $this->removestyle(\"wppb_stylesheet\");\n }\n\n if( !is_singular( array('docs', 'post' ) ) ){\n $this->removestyle(\"codebox\");\n }\n }", "function my_footer_shh() {\n remove_filter( 'update_footer', 'core_update_footer' );\n}", "function init_remove_support(){\n if( !empty($_GET['post']) && intval($_GET['post']) == get_option( 'page_on_front' ) ) {\n remove_post_type_support('page', 'editor');\n }\n}", "public function createPlaceholdersAndDeleteLiveParentPage() {}", "function vida_theme_setup() {\n\t\n\tadd_theme_support( 'title-tag' );\n\n\t/*\n\t * Remove parent theme setups we don't need/use\n\t */\t\n\t\n\tremove_theme_support( 'custom-header' );\n\t\n\t// remove post formats\n\tremove_theme_support( 'post-formats' );\n\n\t// remove custom scripts\n\tremove_action( 'wp_enqueue_scripts', 'moesia_custom_styles');\n\t\n\t// remove images sizes\n\tif ( function_exists( 'remove_image_size' ) ) {\n\t\t\n\t\tremove_image_size('moesia-thumb');\n\t\tremove_image_size('project-image');\n\t\tremove_image_size('moesia-news-thumb');\n\t\tremove_image_size('moesia-news-thumb');\n\t\tremove_image_size('moesia-clients-thumb');\n\t\tremove_image_size('moesia-testimonials-thumb');\t\n\t\tremove_image_size('moesia-employees-thumb');\t\t\n\t\t\n\t}\n\t\n\t// hide wp generator\n\tremove_action('wp_head', 'wp_generator');\n\t\n\t// removes EditURI/RSD (Really Simple Discovery) link.\n\tremove_action('wp_head', 'rsd_link');\n\t\n\t// removes wlwmanifest (Windows Live Writer) link.\n\tremove_action('wp_head', 'wlwmanifest_link');\t\n\t\n\t// Remove the REST API lines from the HTML Header\n remove_action( 'wp_head', 'rest_output_link_wp_head', 10 );\n\t\n\tremove_action( 'after_setup_theme', 'moesia_custom_header_setup', 10 );\n\t\n\tremove_action('wp_head', 'print_emoji_detection_script', 7);\n\t\n\tremove_action('wp_print_styles', 'print_emoji_styles');\t\n\t\n\t/*\n\t * Add our custom theme setups\n\t *\n\t * Footer menu, additional sidebars, etc..\n\t */\n\n\t// Add our footer menu\n\tregister_nav_menus( array(\n\t\t'secondary' => __( 'Footer Menu', 'vida-footer-menu' ),\n\t\t'tertiary' => __( 'Blog - Posts', 'vida-blog-menu' ),\n\t\t'footerblog' => __( 'Blog - Posts Footer Menu', 'vida-blog-footer' ),\n\t) );\t\n\t\n\t// Register the articles pages' sidebar. \n\tregister_sidebar(\n\t\tarray(\n\t\t\t'id' => 'article-header-widget',\n\t\t\t'name' => __( 'Articles Header Widget', 'moesia-vida' ),\n\t\t\t'description' => __( 'Header widget for the articles pages only', 'moesia-vida' ),\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</aside>',\n\t\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t\t'after_title' => '</h2>'\n\t\t)\n\t);\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar Search', 'moesia' ),\n\t\t'id' => 'sidebar-search',\n\t\t'description' => __( 'Widget to add a search box in the sidebar, goes at the top most of the sidebar.', 'moesia-vida' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget sidebar-nopadding %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar Optin', 'moesia' ),\n\t\t'id' => 'sidebar-optin',\n\t\t'description' => __( 'Widget to display an optin in the posts\\' sidebar, goes above the main sidebar.', 'moesia-vida' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget sidebar-nopadding %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar - Matchmaking', 'moesia' ),\n\t\t'id' => 'sidebar-matchmaking',\n\t\t'description' => __( 'Widget to display an optin in the posts\\' sidebar, goes above the main sidebar.', 'moesia-vida' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget sidebar-nopadding %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\t\n\t// Add custom image sizes\n\tif ( function_exists('add_image_size') ) {\n\n\t\n\t\t//add_image_size( 'vida-blog-thumb', xxx, xxx, TRUE ); <-- in case of changing blog featured\n\t\t\n\t\t// used mainly as the featured\n\t\tadd_image_size( 'vida-blog-featured', 682, 480, TRUE );\n\t\t\n\t\t// blog full width\n\t\tadd_image_size( 'vida-blog-full', 720, 9999 );\n\t\t\n\t\t// blog three-fourth width\n\t\tadd_image_size( 'vida-blog-threefourth', 525, 9999 );\n\t\t\n\t\t// blog two-third width\n\t\tadd_image_size( 'vida-blog-twothird', 460, 9999 );\n\t\t\n\t\t// blog half width \n\t\tadd_image_size( 'vida-blog-onehalf', 355, 9999 );\t\t\n\t\t\n\t\t// blog one-third width\n\t\tadd_image_size( 'vida-blog-onethird', 230, 9999 );\n\n\t\t// related posts thumbs\n\t\tadd_image_size( 'vida-rel-thumb', 237, 165, true );\t\t\n\t\t\n\t} //end custom image sizes\n\t\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}", "public function wp_delete_theme(){\n\n\t\trequire_once( 'wp-load.php' );\n\t\trequire_once( 'wp-admin/includes/upgrade.php' );\n\n\t\tdelete_theme( 'twentyfourteen' );\n\t\tdelete_theme( 'twentythirteen' );\n\t\tdelete_theme( 'twentytwelve' );\n\t\tdelete_theme( 'twentyeleven' );\n\t\tdelete_theme( 'twentyten' );\n\t\t// We delete the _MACOSX folder (bug with a Mac)\n\t\tdelete_theme( '__MACOSX' );\n\t}", "public function remove_content_filter() {\n\t\t// @todo also check if this page supports blocks.\n\t\tif ( is_page() ) {\n\t\t\tremove_filter( 'the_content', 'wpautop', 10 );\n\t\t\tadd_filter( 'the_content', array( $this, 'spineautop' ), 10 );\n\t\t}\n\t}", "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}", "public static function uninstall() {\r\n // $pop_ups = get_pages( array('post_type'=>DGDSCROLLBOXTYPE));\r\n // foreach($pop_ups as $pop_up) {\r\n // wp_delete_post($pop_up->ID, true);\r\n // }\r\n }", "public function theme() {\n // Do nothing by default\n }", "function delete_sample_page() {\n $default_page = get_page_by_title( 'Sample Page' );\n if ($default_page) {\n wp_delete_post( $default_page->ID );\n }\n }", "function child_theme_setup_before_parent() {\n}", "public static function cleanTemplatesCache()\r\n {\r\n $path = APP_VAR_DIR.'/_compiled/site/*';\r\n exec('rm -rf '.$path);\r\n return true;\r\n }", "function childtheme_override_postfooter() {}", "function tsapress_clean_assets($content) {\n\t$tsapress_base_dir = tsapress_base_dir();\n $theme_name = next(explode('/themes/', $content));\n \n $current_path = '/'.$tsapress_base_dir.'wp-content/themes/' . $theme_name;\n $new_path = '';\n $content = str_replace($current_path, $new_path, $content);\n \n return $content;\n}", "function shift_admin_menu_cleanup() {\n remove_menu_page( 'edit.php' );\n remove_menu_page( 'edit-comments.php' );\n}", "private function hierarchy()\n {\n $types = [\n '404',\n 'archive',\n 'attachment',\n 'author',\n 'category',\n 'date',\n 'embed',\n 'frontpage',\n 'home',\n 'index',\n 'page',\n 'paged',\n 'search',\n 'single',\n 'singular',\n 'tag',\n 'taxonomy',\n ];\n\n foreach ($types as $type) {\n add_filter(\"{$type}_template_hierarchy\", [$this, 'addTemplateDirectory']);\n }\n }", "function replace_widjets_content() {\n remove_action( 'widgets_init', 'envo_storefront_widgets_init' );\n}", "public function restore_templates( $name = '' ) {\n\t\t\t$theme = wp_get_theme( $name );\n\n\t\t\tif ( empty( $theme ) || ! $theme->exists() ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( isset( $this->restored[ $theme->get( 'Name' ) ] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( empty( $this->saved[ $theme->get( 'Name' ) ] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$old_version = get_option( 'theme_version ' . $theme->get( 'Name' ) );\n\t\t\t$version = $theme->get( 'Version' );\n\t\t\tif ( $old_version === $version ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$temp_dir = UM()->uploader()->get_core_temp_dir() . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $theme->get( 'template' );\n\t\t\tif ( ! is_dir( $temp_dir ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$um_dir = $theme->get_stylesheet_directory() . DIRECTORY_SEPARATOR . 'ultimate-member';\n\t\t\t@mkdir( $um_dir, 0777, true );\n\n\t\t\t$src = realpath( $temp_dir );\n\t\t\t$dest = realpath( $um_dir );\n\t\t\tif ( $src && $dest ) {\n\t\t\t\tself::recurse_copy( $src, $dest );\n\t\t\t\terror_log( \"UM Log. Theme '\" . $theme->get( 'template' ) . \"' templates restored.\" );\n\t\t\t\tUM()->files()->remove_dir( $src );\n\t\t\t} else {\n\t\t\t\terror_log( \"UM Error. Can not restore theme templates.\" );\n\t\t\t}\n\n\t\t\tdelete_option( 'theme_version ' . $theme->get( 'Name' ) );\n\t\t\t$this->restored[ $theme->get( 'Name' ) ] = $theme->get( 'Version' );\n\t\t}", "function wpgrade_head_cleanup() {\r\n\t// Remove WP version\r\n\tremove_action( 'wp_head', 'wp_generator' );\r\n\t\r\n\tremove_action( 'wp_head', 'rsd_link' );\r\n\t// windows live writer\r\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\r\n\t\r\n\t// remove WP version from css - those parameters can prevent caching\r\n\t//add_filter( 'style_loader_src', 'wpgrade_noversion_css_js', 9999 );\r\n\t// remove WP version from scripts - those parameters can prevent caching\r\n\t//add_filter( 'script_loader_src', 'wpgrade_noversion_css_js', 9999 );\r\n\r\n}", "function remove_thefeeds()\r\n{\r\n remove_theme_support( 'automatic-feed-links' ); //remove feed links in head\r\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 pd_head_cleanup()\n{\n\n /* ===============\n Remove RSS from header\n =============== */\n remove_action('wp_head', 'rsd_link'); #remove page feed\n remove_action('wp_head', 'feed_links_extra', 3); // Remove category feeds\n remove_action('wp_head', 'feed_links', 2); // Remove Post and Comment Feeds\n\n\n /* ===============\n remove windindows live writer link\n =============== */\n remove_action('wp_head', 'wlwmanifest_link');\n\n\n /* ===============\n links for adjacent posts\n =============== */\n remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);\n\n\n /* ===============\n WP version\n =============== */\n remove_action('wp_head', 'wp_generator');\n\n\n /* ===============\n remove WP version from css\n =============== */\n add_filter('style_loader_src', 'pd_remove_wp_ver_css_js', 9999);\n\n\n /* ===============\n remove Wp version from scripts\n =============== */\n add_filter('script_loader_src', 'pd_remove_wp_ver_css_js', 9999);\n}", "public function plugin_deactive_hook(){\r\n delete_transient( 'woolentor_template_info' );\r\n delete_metadata( 'user', null, 'woolentor_dismissed_lic_notice', null, true );\r\n }", "function full_reset(){\n\t/**\n\t* This function will reset all the header links\n\t* http://wordpress.stackexchange.com/questions/207104/edit-theme-wp-head\n\t*/\n\t// Removes the wlwmanifest link\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t// Removes the RSD link\n\tremove_action( 'wp_head', 'rsd_link' );\n\t// Removes the WP shortlink\n\t//remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );\n\t// Removes the canonical links\n\t//remove_action( 'wp_head', 'rel_canonical' );\n\t// Removes the links to the extra feeds such as category feeds\n\t//remove_action( 'wp_head', 'feed_links_extra', 3 ); \n\t// Removes links to the general feeds: Post and Comment Feed\n\t//remove_action( 'wp_head', 'feed_links', 2 ); \n\t// Removes the index link\n\tremove_action( 'wp_head', 'index_rel_link' ); \n\t// Removes the prev link\n\tremove_action( 'wp_head', 'parent_post_rel_link' ); \n\t// Removes the start link\n\tremove_action( 'wp_head', 'start_post_rel_link' ); \n\t// Removes the relational links for the posts adjacent to the current post\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link' );\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );\n\t// Removes the WordPress version i.e. -\n\tremove_action( 'wp_head', 'wp_generator' );\n\t\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_action( 'admin_print_styles', 'print_emoji_styles' );\n\t\n\t/**\n\t*https://wordpress.org/support/topic/wp-44-remove-json-api-and-x-pingback-from-http-headers\n\t*/\n\tadd_filter('rest_enabled', '_return_false');\n\tadd_filter('rest_jsonp_enabled', '_return_false');\n\t\n\tremove_action( 'wp_head', 'rest_output_link_wp_head', 10 );\n\tremove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 );\n\t\n\tremove_action('wp_head', 'wp_print_scripts');\n //remove_action('wp_head', 'wp_print_head_scripts', 9);\n add_action('wp_footer', 'wp_print_scripts', 5);\n add_action('wp_footer', 'wp_print_head_scripts', 5);\n}" ]
[ "0.702426", "0.65037644", "0.64131457", "0.6406326", "0.6262876", "0.62376744", "0.61424834", "0.6110962", "0.61082923", "0.6108143", "0.6036941", "0.60307467", "0.602198", "0.5971363", "0.59237164", "0.58937496", "0.5886289", "0.5847543", "0.58383566", "0.5826905", "0.5806757", "0.5801867", "0.5782649", "0.5775987", "0.57499826", "0.57460856", "0.5743062", "0.57243055", "0.5705576", "0.56426513", "0.56407607", "0.56347555", "0.56237876", "0.5618678", "0.5617391", "0.5613601", "0.5605866", "0.5598111", "0.5590409", "0.55682844", "0.55120546", "0.5504017", "0.5485255", "0.5477747", "0.5474641", "0.5468583", "0.5448823", "0.54335845", "0.5408053", "0.54067576", "0.54059404", "0.540026", "0.53872985", "0.53782916", "0.53493255", "0.53492683", "0.5345255", "0.53424835", "0.5335433", "0.53352004", "0.5335157", "0.53329825", "0.5329625", "0.5323008", "0.5312587", "0.53035575", "0.52992743", "0.52986866", "0.52908677", "0.5287484", "0.52851605", "0.52746713", "0.52704227", "0.5268362", "0.5266471", "0.52653843", "0.52513397", "0.5249128", "0.5246151", "0.52433425", "0.52425134", "0.5239628", "0.5222094", "0.5213075", "0.5208597", "0.5204263", "0.51930004", "0.5192849", "0.51921654", "0.51860934", "0.5175579", "0.5168917", "0.5161614", "0.51603353", "0.5151271", "0.51494986", "0.5141813", "0.514177", "0.51397103", "0.51374274" ]
0.7632337
0
Display only sticky posts
Показывать только прикрепленные посты
function be_display_only_sticky_posts( $args, $atts ) { $sticky_variations = array( 'sticky_posts', 'sticky-posts', 'sticky posts' ); if( !empty( $atts['id'] ) && in_array( $atts['id'], $sticky_variations ) ) { $sticky_posts = get_option( 'sticky_posts' ); $args['post__in'] = $sticky_posts; } if( !empty( $atts['exclude'] ) && in_array( $atts['exclude'], $sticky_variations ) ) { $sticky_posts = get_option( 'sticky_posts' ); $args['post__not_in'] = $sticky_posts; } return $args; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onlyStickyPosts()\r\n{\r\n\t$sticky = get_option('sticky_posts');\r\n\t// check if there are any\r\n\tif (!empty($sticky)) {\r\n\t\t// optional: sort the newest IDs first\r\n\t\trsort($sticky);\r\n\t\t// override the query\r\n\t\t$args = array(\r\n\t\t\t'post__in' => $sticky\r\n\t\t);\r\n\t\tquery_posts($args);\r\n\t\t// the loop\r\n\t\twhile (have_posts()) {\r\n\t\t\tthe_post();\r\n\t\t\t// your code\r\n\t\t\tget_template_part('article');\r\n\t\t}\r\n\t}\r\n\twp_reset_query();\r\n}", "function wpb_latest_sticky() { \n\n/* Get all sticky posts */\n$sticky = get_option( 'sticky_posts' );\n\n/* Sort the stickies with the newest ones at the top */\nrsort( $sticky );\n\n/* Get the 5 newest stickies (change 5 for a different number) */\n$sticky = array_slice( $sticky, 0, 5 );\n\n/* Query sticky posts */\n$the_query = new WP_Query( array( 'post__in' => $sticky, 'ignore_sticky_posts' => 2 ) );\n// The Loop\nif ( $the_query->have_posts() ) {\n\t$return = '<ul>';\n\twhile ( $the_query->have_posts() ) {\n\t\t$the_query->the_post();\n\t\t$return .= '<li><a href=\"' .get_permalink(). '\" title=\"' . get_the_title() . '\">' . get_the_title() . '</a><br />' . get_the_excerpt(). '</li>';\n\t\t\n\t}\n\t$return .= '</ul>';\n\t\n} else {\n\t// no posts found\n}\n/* Restore original Post Data */\nwp_reset_postdata();\n\nreturn $return; \n\n}", "function areThereStickyPosts()\r\n{\r\n\t$sticky = get_option('sticky_posts');\r\n\t// check if there are any\r\n\treturn !empty($sticky) ? true : false;\r\n}", "function simpleTheme_blog_loop() {\n\n $loop = new WP_Query( array( 'post__in' => get_option('sticky_posts') ) );\n echo '<ul class=\"stick-posts\">';\n while ( $loop->have_posts() ) : $loop->the_post();\n echo '<li class=\"simple-theme-sticky\"><a href=\"' . get_the_permalink() . '\">' . get_the_title() . '</a>';\n simpleTheme_date();\n echo '</li>';\n endwhile;\n echo '</ul>';\n\n}", "public function showsticky() {\n }", "function is_sticky() {\n\tglobal $discussion;\n\treturn $discussion['sticky'];\n}", "function getSticky()\n {\n \t$query = 'SELECT t.id, t.post_subject, t.topic_type, t.hits, ' .\n \t\t\t\t't.forum_id, t.post_time, t.post_user, t.post_username ' .\n \t\t\t'FROM #__ccb_topics AS t ' .\n \t\t\t'WHERE ((t.topic_type = 1 OR t.topic_type = 3) AND (t.hold=0)) ' .\n \t\t\t'ORDER BY t.topic_type, t.post_time DESC ';\n\n\t\t$sticky = ($sticky = $this->_getList($query))? $sticky :array();\n\n\t\treturn $sticky;\n }", "function ppo_posted_on() {\n if ( is_sticky() && is_home() && ! is_paged() ) {\n echo '<span class=\"featured-post\">' . __( 'Sticky post', SHORT_NAME ) . '</span>';\n }\n\n // Set up and print post meta information.\n printf( '<span class=\"entry-date\"><a href=\"%1$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%2$s\"><i class=\"fa fa-calendar\"></i> %3$s</time></a></span> <span class=\"byline\"><span class=\"author vcard\"><a class=\"url fn n\" href=\"%4$s\" rel=\"author\"><i class=\"fa fa-user\"></i> %5$s</a></span></span>',\n esc_url( get_permalink() ),\n esc_attr( get_the_date( 'c' ) ),\n esc_html( get_the_date() ),\n esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n get_the_author()\n );\n}", "public function homepage_ignore_sticky( $query ) {\n\t\t\tif ( $query->is_front_page() && $query->is_main_query() ) {\n\t\t\t\t$query->set( 'ignore_sticky_posts', 1 );\n\t\t\t}\n\t\t}", "function cc_get_sticky_page() {\n\tglobal $wpdb;\n\n\t$query = \"\n\t\tSELECT posts.*\n\t\tFROM $wpdb->posts posts, $wpdb->postmeta postmeta\n\t\tWHERE posts.ID = postmeta.post_id\n\t\tAND postmeta.meta_key = 'show_on_index'\n\t\tAND postmeta.meta_value = 'yes'\n\t\tAND posts.post_status = 'publish'\n\t\tAND posts.post_type = 'page'\n\t\tORDER BY posts.post_date ASC LIMIT 1\";\n\t$page = $wpdb->get_row ($query);\n\n\treturn $page;\n}", "function thinkup_input_sticky() {\n\tprintf( '<span class=\"sticky\"><a href=\"%1$s\" title=\"%2$s\">' . esc_html__( 'Sticky', 'ESTSB' ) . '</a></span>',\n\t\tesc_url( get_permalink() ),\n\t\tesc_attr( get_the_title() )\n\t);\n}", "public function isSticky()\n {\n return $this->sticky;\n }", "function horizon_theme_posted_on() {\n\t\tif ( is_sticky() && is_home() && ! is_paged() ) {\n\t\t\techo '<span class=\"featured-post\">' . __( 'Sticky', 'horizon-theme' ) . ' </span>';\n\t\t}\n\n\t\t// Set up and print post meta information.\n\t\tprintf( '<span class=\"entry-date\">%s <time class=\"entry-date\" datetime=\"%s\">%s</time></span> <span class=\"byline\">%s <span class=\"author vcard\"><a class=\"url fn n\" href=\"%s\" rel=\"author\">%s</a></span>.</span>',\n\t\t\t__( 'Posted in', 'horizon-theme' ),\n\t\t\tesc_attr( get_the_date( 'c' ) ),\n\t\t\tesc_html( get_the_date() ),\n\t\t\t__( 'by', 'horizon-theme' ),\n\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\tget_the_author()\n\t\t);\n\t}", "function post_pagination($query)\r\n{\r\n\t$sticky = get_option('sticky_posts');\r\n\tif ($query->is_home() && $query->is_main_query()) {\r\n\t\t$query->set('posts_per_page', '5');\r\n\t\t$query->set('post__not_in', get_option('sticky_posts'));\r\n\t}\r\n}", "public function getIsSticky()\n {\n return $this->isSticky;\n }", "public static function get_sticky_data()\n {\n /**\n * Put all results in the response array.\n */\n $response = [];\n\n /**\n * \n */\n $sticky = [\n 'id' => 0,\n 'title' => 'Uitgelicht',\n 'items' => [],\n 'hasMore' => false\n ];\n\n /**\n * Get all fragments with the sticky meta.\n */\n $args = [\n 'post_type' => 'fragment',\n 'post_status' => 'publish',\n 'posts_per_page' => -1,\n 'orderby' => 'menu_order',\n 'order' => 'ASC',\n 'meta_query' => [\n [\n 'key' => 'fragment_sticky',\n 'value' => 1,\n 'compare' => '='\n ]\n ]\n ];\n\n $query = new \\WP_Query($args);\n if ($query->have_posts()) {\n while ($query->have_posts()) {\n $query->the_post();\n\n $fragment_id = get_the_id();\n $audio_file = get_field('fragment_audio_file');\n $still = get_field('fragment_still');\n\n $title = apply_filters('the_title', get_the_title());\n $title = html_entity_decode($title);\n\n /**\n * Only append items that have valid audio files.\n */\n if ($audio_file) {\n $sticky['items'][] = [\n 'id' => 'sticky-' . $fragment_id,\n 'title' => $title,\n 'category' => 0,\n 'thumbnail' => [\n '@1x' => $still['sizes']['fragment-thumbnail@1x'],\n 'alt' => $still['alt']\n ],\n 'audio' => [\n 'url' => $audio_file['url'],\n 'mimeType' => $audio_file['mime_type']\n ]\n ];\n }\n }\n\n wp_reset_postdata();\n }\n\n $response[] = $sticky;\n return $response;\n }", "public function index() {\n \n if (!Auth::check()) {\n return Redirect::to('login');\n }\n\n $results = Sticky::where('user_id', '=', Auth::user()->id)\n ->orderBy('id', 'DESC')\n ->skip(0)\n ->take(8)\n ->get();\n $count = Sticky::where('user_id', '=', Auth::user()->id)\n ->count();\n \n $this->layout->content = View::make('sticky.show')\n ->with(array('results'=>$results,'count'=>$count));\n }", "function ridizain_has_featured_posts() {\r\n\treturn ! is_paged() && (bool) ridizain_get_featured_posts();\r\n}", "function sticky_class($post_id = \\null)\n {\n }", "function tptn_pop_posts( $daily = false , $widget = false ) {\r\n\tglobal $wpdb, $siteurl, $tableposts, $id;\r\n\tif ($daily) $table_name = $wpdb->prefix . \"top_ten_daily\"; \r\n\t\telse $table_name = $wpdb->prefix . \"top_ten\";\r\n\t$tptn_settings = tptn_read_options();\r\n\t$limit = $tptn_settings['limit'];\r\n\r\n\tif (!$daily) {\r\n\t\t$sql = \"SELECT postnumber, cntaccess as sumCount, ID, post_type, post_status, post_content \";\r\n\t\t$sql .= \"FROM $table_name INNER JOIN \". $wpdb->posts .\" ON postnumber=ID \" ;\r\n\t\tif ($tptn_settings['exclude_pages']) $sql .= \"AND post_type = 'post' \";\r\n\t\t$sql .= \"AND post_status = 'publish' \";\r\n\t\t$sql .= \"ORDER BY sumCount DESC LIMIT $limit\";\r\n\t} else {\r\n\t\t$daily_range = $tptn_settings[daily_range] - 1;\r\n\t\t$current_time = gmdate( 'Y-m-d', ( time() + ( get_option( 'gmt_offset' ) * 3600 ) ) );\r\n\t\t$current_date = strtotime ( '-'.$daily_range. ' DAY' , strtotime ( $current_time ) );\r\n\t\t$current_date = date ( 'Y-m-j' , $current_date );\r\n\t\t\r\n\t\t$sql = \"SELECT postnumber, SUM(cntaccess) as sumCount, dp_date, ID, post_type, post_status, post_content \";\r\n\t\t$sql .= \"FROM $table_name INNER JOIN \". $wpdb->posts .\" ON postnumber=ID \" ;\r\n\t\tif ($tptn_settings['exclude_pages']) $sql .= \"AND post_type = 'post' \";\r\n\t\t$sql .= \"AND post_status = 'publish' AND dp_date >= '$current_date' \";\r\n\t\t$sql .= \"GROUP BY postnumber \";\r\n\t\t$sql .= \"ORDER BY sumCount DESC LIMIT $limit\";\r\n\t}\r\n\t$results = $wpdb->get_results($sql);\r\n\t$output = '';\r\n\r\n\tif (!$widget) {\r\n\t\tif (!$daily) {\r\n\t\t\t$output .= '<div id=\"tptn_related\">'.$tptn_settings['title'];\r\n\t\t} else {\r\n\t\t\t$output .= '<div id=\"tptn_related_daily\">'.$tptn_settings['title_daily'];\r\n\t\t}\r\n\t}\r\n\t\r\n\tif ($results) {\r\n\t\t$output .= $tptn_settings['before_list'];\r\n\t\tforeach ($results as $result) {\r\n\t\t\t$title = trim(stripslashes(get_the_title($result->postnumber)));\r\n\t\t\t$output .= $tptn_settings['before_list_item'];\r\n\r\n\t\t\tif (($tptn_settings['post_thumb_op']=='inline')||($tptn_settings['post_thumb_op']=='thumbs_only')) {\r\n\t\t\t\t$output .= '<a href=\"'.get_permalink($result->postnumber).'\" rel=\"bookmark\">';\r\n\t\t\t\tif ((function_exists('has_post_thumbnail')) && (has_post_thumbnail($result->postnumber))) {\r\n\t\t\t\t\t$output .= get_the_post_thumbnail( $result->postnumber, array($tptn_settings[thumb_width],$tptn_settings[thumb_height]), array('title' => $title,'alt' => $title, 'class' => 'tptn_thumb', 'border' => '0'));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$postimage = get_post_meta($result->postnumber, $tptn_settings[thumb_meta], true);\t// Check \r\n\t\t\t\t\tif ((!$postimage)&&($tptn_settings['scan_images'])) {\r\n\t\t\t\t\t\tpreg_match_all( '|<img.*?src=[\\'\"](.*?)[\\'\"].*?>|i', $result->post_content, $matches );\r\n\t\t\t\t\t\t// any image there?\r\n\t\t\t\t\t\tif( isset( $matches ) && $matches[1][0] ) {\r\n\t\t\t\t\t\t\t$postimage = $matches[1][0]; // we need the first one only!\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!$postimage) $postimage = $tptn_settings[thumb_default];\r\n\t\t\t\t\t$output .= '<img src=\"'.$postimage.'\" alt=\"'.$title.'\" title=\"'.$title.'\" width=\"'.$tptn_settings[thumb_width].'\" height=\"'.$tptn_settings[thumb_height].'\" border=\"0\" class=\"tptn_thumb\" />';\r\n\t\t\t\t}\r\n\t\t\t\t$output .= '</a> ';\r\n\t\t\t}\r\n\t\t\tif (($tptn_settings['post_thumb_op']=='inline')||($tptn_settings['post_thumb_op']=='text_only')) {\r\n\t\t\t\t$output .= '<a href=\"'.get_permalink($result->postnumber).'\" rel=\"bookmark\">'.$title.'</a>';\r\n\t\t\t}\t\t\r\n\t\t\tif ($tptn_settings['show_excerpt']) {\r\n\t\t\t\t$output .= '<span class=\"tptn_excerpt\"> '.tptn_excerpt($result->post_content,$tptn_settings['excerpt_length']).'</span>';\r\n\t\t\t}\r\n\t\t\tif ($tptn_settings['disp_list_count']) $output .= ' ('.$result->sumCount.')';\r\n\t\t\t$output .= $tptn_settings['after_list_item'];\r\n\t\t}\r\n\t\tif ($tptn_settings['show_credit']) $output .= '<li>Popular posts by <a href=\"http://ajaydsouza.com/wordpress/plugins/top-10/\">Top 10 plugin</a></li>';\r\n\t\t$output .= $tptn_settings['after_list'];\r\n\t}\r\n\tif (!$widget) $output .= '</div>';\r\n\r\n\treturn $output;\r\n}", "function tptn_show_pop_posts() {\r\n\techo tptn_pop_posts(false,false);\r\n}", "function have_posts()\n {\n }", "function wp_bottom_featured_bar_post() {\n global $post;\n // show only if the post type is a blog post\n if($post && $post->post_type != \"post\")\n return null;\n\n // load categories \n $categories = wp_get_post_categories($post->ID);\n $args = array( 'posts_per_page' => 5, 'orderby' => 'rand', 'exclude' => $post->ID ); \n\n if ( $count = count($categories) > 0 ) {\n if ( $count == 1 && $categories[0] == 1) {\n // ignore the filter.\n } else {\n $args['category'] = implode($categories, \",\");\n }\n }\n\n $rand_posts = get_posts( $args );\n\n return $rand_posts[0];\n}", "function otm_show_featured_posts() {\n\n\t$my_query = new WP_Query( array( \n\t\t'meta_key' \t\t\t\t=> 'is_featured',\n\t\t'post_type'\t\t\t\t=> 'post',\n\t\t'meta_value'\t\t\t=> true,\n\t\t'numberposts' \t\t=> 3\n\t) );\n\n\t// If our query has posts\n\tif ( $my_query->have_posts() ) :\n\t\twhile ( $my_query->have_posts() ) : $my_query->the_post();\n\n\t\t\t// Get specific template-part\n\t\t\tget_template_part( 'template-parts/post/content-featured' );\n\n\t\tendwhile;\n\tendif;\n\n\twp_reset_query();\n}", "function tptn_show_daily_pop_posts() {\r\n\tglobal $tptn_url;\r\n\t$tptn_settings = tptn_read_options();\r\n\tif ($tptn_settings['d_use_js']) {\r\n\t\techo '<script type=\"text/javascript\" src=\"'.$tptn_url.'/top-10-daily.js.php?widget=1\"></script>';\r\n\t} else {\r\n\t\techo tptn_pop_posts(true,false);\r\n\t}\r\n}", "public function show() {\n $skip=Input::get('limit');\n $take=3;\n $results = Sticky::where('user_id', '=', Auth::user()->id)\n ->orderBy('id', 'DESC')\n ->skip($skip)\n ->take($take)\n ->get();\n \n return View::make('sticky.scroll')\n ->with('results', $results);\n }", "function show_posts(\n $thread, $forum, $start, $postid, $sort_style, $filter, $logged_in_user\n) {\n $n = 1;\n\n $num_to_show = 20;\n if ($logged_in_user && $logged_in_user->prefs->display_wrap_postcount > 0) {\n $num_to_show = $logged_in_user->prefs->display_wrap_postcount;\n }\n\n // let moderators see all posts, including hidden ones\n //\n if (is_moderator($logged_in_user, $forum)) {\n $show_hidden = true;\n } else {\n $show_hidden = false;\n }\n\n $posts = get_thread_posts($thread->id, $sort_style, $show_hidden);\n\n $latest_viewed = 0;\n $forum_log = null;\n if ($logged_in_user) {\n $forum_log = BoincForumLogging::lookup($logged_in_user->id, $thread->id);\n if ($forum_log) {\n $latest_viewed = $forum_log->timestamp;\n }\n }\n\n if ($sort_style == CREATE_TIME_OLD) {\n // show the last page\n //\n $nposts = sizeof($posts);\n if ($nposts) $nposts -= 1;\n $page = (int)($nposts/$num_to_show);\n $default_start = $page*$num_to_show;\n } else {\n $default_start = 0;\n }\n\n // jump to a specific post if needed\n //\n $jump_to_post = null;\n if ($start === null) {\n if ($postid) {\n // jump to a specific post\n //\n $i = 0;\n foreach ($posts as $post) {\n if ($post->id == $postid) {\n $start = $i - ($i % $num_to_show);\n $jump_to_post = $post;\n break;\n }\n $i++;\n }\n if ($start === null) {\n echo \"Post $postid not found.\";\n return;\n }\n } else if ($logged_in_user && $logged_in_user->prefs->jump_to_unread) {\n // jump to the first unread post\n //\n $i = 0;\n $ibest = 0;\n foreach ($posts as $post) {\n if ($post->timestamp > $latest_viewed) {\n if (!$jump_to_post || ($post->timestamp < $jump_to_post->timestamp)) {\n $jump_to_post = $post;\n $ibest = $i;\n }\n }\n $i++;\n }\n if ($jump_to_post) {\n $start = $ibest - ($ibest % $num_to_show);\n } else {\n $start = $default_start;\n }\n } else {\n $start = $default_start;\n }\n }\n\n $page_nav = page_links(\n \"forum_thread.php?id=$thread->id&sort_style=$sort_style\",\n sizeof($posts),\n $num_to_show,\n $start\n );\n\n echo $page_nav;\n\n $num_shown = 0;\n $num_skipped = 0;\n $headings = array(array(tra(\"Author\"),\"authorcol\"), array(tra(\"Message\"),\"\"));\n start_forum_table($headings, \"id=\\\"thread\\\" cellspacing=0\");\n\n $latest_shown_timestamp = 0;\n foreach ($posts as $post) {\n if ($num_skipped < $start) {\n $num_skipped++;\n continue;\n }\n if ($num_shown == $num_to_show) {\n break;\n }\n show_post(\n $post, $thread, $forum, $logged_in_user, $latest_viewed, $n,\n FORUM_CONTROLS, $filter\n );\n $n = ($n+1)%2;\n \n if ($post->timestamp > $latest_shown_timestamp) {\n $latest_shown_timestamp = $post->timestamp;\n }\n $num_shown++;\n }\n end_table();\n echo $page_nav;\n\n if ($jump_to_post) {\n echo \"<script>function jumpToUnread(){location.href='#\".$jump_to_post->id.\"';}</script>\";\n } else {\n echo \"<script>function jumpToUnread(){};</script>\";\n }\n\n if ($logged_in_user) {\n if (!$forum_log || $latest_shown_timestamp > $forum_log->timestamp) {\n BoincForumLogging::replace(\n $logged_in_user->id, $thread->id, $latest_shown_timestamp\n );\n }\n }\n}", "function twentyfourteen_has_featured_posts() {\n\treturn ! is_paged() && (bool) twentyfourteen_get_featured_posts();\n}", "function twentyfourteen_has_featured_posts() {\n\treturn ! is_paged() && (bool) twentyfourteen_get_featured_posts();\n}", "function wpex_has_sticky_header() {\n\n\t// Disable for custom header and in VC Live editor\n\tif ( wpex_has_custom_header() || wpex_vc_is_inline() ) {\n\t\treturn;\n\t}\n\n\t// Disabled by default\n\t$return = false;\n\n\t// Get current post id\n\t$post_id = wpex_get_current_post_id();\n\n\t// Check meta first it should override any filter!\n\tif ( $post_id && 'disable' == get_post_meta( $post_id, 'wpex_sticky_header', true ) ) {\n\t\treturn false;\n\t}\n\n\t// Get header style\n\t$header_style = wpex_header_style( $post_id );\n\n\t// Return true if header is not disabled and header style is either 1 or 2\n\tif ( 'disabled' != wpex_sticky_header_style() && ( 'one' == $header_style || 'five' == $header_style ) ) {\n\t\t$return = true;\n\t}\n\n\t// No sticky header for the vertical header\n\tif ( 'six' == $header_style ) {\n\t\t$return = false;\n\t}\n\n\t// Apply filters and return\n\treturn apply_filters( 'wpex_has_fixed_header', $return );\n\n}", "function oppen_pre_get_posts($query) {\n /*if ($_GET['infinity'] === 'scrolling' && !$query->is_category('blogg')) {\n return;\n }*/\n\n // If we're in the admin, don't modify the query\n if (is_admin()) {\n return;\n }\n\n // If we're on the front page, fetch the 3 latest blog posts\n if ($query->is_home() && $query->is_main_query()) {\n $query->set('is_category_blog', true);\n $query->set('category_name', 'blogg');\n $query->set('showposts', 3);\n return;\n }\n\n // If we're on the blog category page, increase the post\n // limit to 90 posts and order descending by date.\n if (!$query->is_home() && $query->is_category('blogg')) {\n $query->set('showposts', 9);\n $query->set('orderby', 'date');\n $query->set('order', 'desc');\n } else {\n // Otherwise, order ascending by title\n $query->set('orderby', 'title');\n $query->set('order', 'asc');\n }\n}", "function hkr_skip_featured_post() {\n global $post, $_hkr_displayed_ids;\n\n if ( in_array($post->ID, $_hkr_displayed_ids) ) {\n the_post(); // advance to the next post\n }\n}", "function getPublishedPostsOnly() {\n\tglobal $conn;\n\t$sql = \"SELECT * FROM posts WHERE published=true order by created_at DESC LIMIT 3\";\n\t$result = mysqli_query($conn, $sql);\n\n\t// fetch all posts as an associative array called $posts\n\t$posts = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\t$final_posts = array();\n\tforeach ($posts as $post) {\n\t\t$post['topic'] = getPostTopic($post['id']); \n\t\tarray_push($final_posts, $post);\n\t}\n\treturn $final_posts;\n}", "function broadcast_content() {\n\t// Always print broadcast title\n\tbroadcast_archive_title();\n\t\n\tif ( have_posts() ) : \n\t\n\t\t/* Start the Loop */ \n\n\t\t// Set variable for first post\n\t\t$first_post = true;\n\n\t\t// Get paged variable\n\t\t$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;\n\n\t\twhile ( have_posts() ) : the_post();\n\n\t\t\t// Is it a specialpost?\n\t\t\t$specialpost = ( 1 === (int) get_post_meta( get_the_ID(), 'rabe_specialpost', true ) ) ? true : false;\n\t\t\t\n\t\t\t// Is it really first post on first page? Open a div with first-post class\n\t\t\tif ( $first_post && 1 === $paged ) {\n\t\t\t\t$first_post_div = true;\n\t\t\t\techo '<div class=\"first-post\">';\t\t\t\n\t\t\t} else {\n\t\t\t\t$first_post_div = false;\n\t\t\t}\n\t\t\t\n\t\t\t?>\n\t\t\t<article <?php omega_attr( 'post' ); ?>>\n\t\t\t<div class=\"entry-wrap\">\n\t\t\t\t<div class=\"text-wrap\">\n\t\t\t\t<?php\n\t\t\t\t// Display first post (full post, take the_content())\n\t\t\t\tif ( $first_post_div ) {\n\t\t\t\t\t$first_post = false; // Now we are in first post, set false for next loop\n\t\t\t\t\tdo_action( 'omega_before_entry' ); ?>\n\t\t\t\t\t<div <?php omega_attr( 'entry-content' ); ?>>\n\t\t\t\t\t\t<?php the_content(); ?>\n\t\t\t\t\t</div><?php\n\t\t\t\t\tdo_action( 'omega_after_entry' );\n\t\t\t\t// Only print title on specialposts\n\t\t\t\t} elseif ( $specialpost ) {\n\t\t\t\t\techo '<header class=\"entry-header\">';\n\t\t\t\t\tget_template_part( 'partials/entry', 'title' );\n\t\t\t\t\techo '</header><!-- .entry-header -->';\n\t\t\t\t// Normal posts\n\t\t\t\t} else {\n\t\t\t\t\tdo_action( 'omega_before_entry' );\n\t\t\t\t\tdo_action( 'omega_entry' );\n\t\t\t\t\tdo_action( 'omega_after_entry' );\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"hide-overflow\"></div>\n\t\t\t</div>\n\t\t\t</article>\n\t\t\t<?php\n\t\t\t// Close div of first post\n\t\t\tif ( $first_post_div ) {\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t\t\n\t\tendwhile; \n\t\t\n\t\tdo_action( 'omega_after_loop'); \n\tendif; \n}", "function cosmetro_sticky_label() {\n\n\tif ( ! is_sticky() || ! is_home() || is_paged() ) {\n\t\treturn;\n\t}\n\n\t$sticky_label = get_theme_mod( 'blog_sticky_label' );\n\n\tif ( empty( $sticky_label ) ) {\n\t\treturn;\n\t}\n\n\tprintf( '<span class=\"sticky__label\">%s</span>', cosmetro_render_icons( $sticky_label ) );\n}", "private function unsetStickyArticle()\n {\n\t\t$articles = $this->model->getArticles()->where('sticky', TRUE);\n\t\tforeach ($articles as $article) {\n\t\t\t$this->model->getArticles()->find($article->id)->update(array('sticky' => 0));\n\t\t}\n }", "function wgom_top_featured_posts($pinned_categories, $featured_tags) {\n\t// Query for last Cup of Coffee post (catid = 5) and Video post\n\t// (catid = 22).\n\t//$pinned_categories = array(5, 22);\n\n\t$pinned_categories_sql = implode(', ', $pinned_categories);\n\t$category_posts = array();\n\tforeach ($pinned_categories as $catid) {\n\t\t$post = get_posts(array(\n\t\t\t'fields' => 'ids',\n\t\t\t'numberposts' => 1,\n\t\t\t'category' => $catid,\n\t\t\t'orderby' => 'post_date',\n\t\t\t'order' => 'DESC',\n\t\t));\n\t\tif ($post) {\n\t\t\t$category_posts[] = $post[0];\n\t\t}\n\t}\n\n\t// Map the tag names to IDs. The get_posts function needs the tag ID.\n\t$featured_tag_ids = array();\n\t// Return sticky post ids if no tag name is set.\n\tforeach ($featured_tags as $tag_name => $num_posts) {\n\t\t$term = get_term_by('name', $tag_name, 'post_tag');\n\t\tif ($term) {\n\t\t\t$featured_tag_ids[$term->term_id] = $num_posts;\n\t\t}\n\t}\n\n\t$featured_tag_posts = array();\n\t// Query for featured tag posts.\n\tforeach ($featured_tag_ids as $featured_tag => $num_posts) {\n\t\t$tag_posts = get_posts( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'numberposts' => $num_posts,\n\t\t\t'orderby' => 'post_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'tax_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'field' => 'term_id',\n\t\t\t\t\t'taxonomy' => 'post_tag',\n\t\t\t\t\t'terms' => $featured_tag,\n\t\t\t\t),\n\t\t\t),\n\t\t) );\n\n\t\t$featured_tag_posts = array_merge($featured_tag_posts, $tag_posts);\n\t}\n\n\t$pinned_row_ids = array_merge($category_posts, $featured_tag_posts);\n\treturn $pinned_row_ids;\n}", "public function mostRecentPostsForSidebar()\n {\n return $this->where(['status' => 'active'])\n ->order(['date_created' => 'DESC'])\n ->limit(10);\n }", "function delivery_pre_get_posts( $query ) {\n\n\t// Bail if not home or not main query.\n\tif ( ! $query->is_home() || ! $query->is_main_query() ) {\n\t\treturn;\n\t}\n\n\t$page_on_front = get_option( 'page_on_front' );\n\n\t// Bail if the blog page is not the front page.\n\tif ( ! empty( $page_on_front ) ) {\n\t\treturn;\n\t}\n\n\t// Get the tag.\n\t$featured = get_theme_mod( 'delivery_featured_posts', 'featured' );\n\n\t// Bail if no featured posts.\n\tif ( ! $featured ) {\n\t\treturn;\n\t}\n\n\t// Get the tag name.\n\t$exclude = get_term_by( 'name', $featured, 'post_tag' );\n\n\t// Exclude the main query.\n\tif ( ! empty( $exclude ) ) {\n\t\t$query->set( 'tag__not_in', $exclude->term_id );\n\t}\n\n}", "function ridizain_get_featured_posts() {\r\n\t/**\r\n\t * Filter the featured posts to return in Ridizain.\r\n\t *\r\n\t * @since Ridizain 1.0\r\n\t *\r\n\t * @param array|bool $posts Array of featured posts, otherwise false.\r\n\t */\r\n\treturn apply_filters( 'ridizain_get_featured_posts', array() );\r\n}", "function block_core_calendar_has_published_posts()\n {\n }", "function caldol_no_replies_bbpress_topics_shortcode() {\n\n\t?>\n\n<!-- html custom-functions -->\n\n<h4 style=\"margin-top: 15px;\">Discussions with No Replies. Be the first to jump in!</h4>\n\n<?php\n\n\n\nif ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'meta_key' => '_bbp_reply_count', 'orderby' => 'post_date', 'meta_value' => '0', 'meta_compare' => '=', 'post_parent' => 'any', 'posts_per_page' => 10 ) ) )\n\nbbp_get_template_part( 'bbpress/loop', 'topics' );\n\n?>\n\n<!-- end -->\n\n<?php }", "function more_posts() \n{\n global $wp_query;\n return $wp_query->current_post + 1 < $wp_query->post_count;\n}", "function ajan_use_embed_in_forum_posts() {\n\treturn apply_filters( 'ajan_use_embed_in_forum_posts', !defined( 'AJAN_EMBED_DISABLE_FORUM_POSTS' ) || !AJAN_EMBED_DISABLE_FORUM_POSTS );\n}", "public function woo_single_product_sticky() {\n\n\t\t\tif ( ! astra_get_option( 'single-product-sticky-summary' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tadd_action( 'woocommerce_before_single_product_summary', array( $this, 'sticky_content_wrapper_start' ), 10 );\n\t\t\tadd_action( 'woocommerce_after_single_product_summary', array( $this, 'sticky_content_wrapper_end' ), 9 );\n\t\t}", "function otm_get_featured_posts() {\n\n\t$my_query = new WP_Query( array( \n\t\t'meta_key' \t\t\t\t=> 'is_featured',\n\t\t'post_type'\t\t\t\t=> 'post',\n\t\t'meta_value'\t\t\t=> true,\n\t\t'numberposts' \t\t=> 3\n\t) );\n\n\t// If our query has posts\n\tif ( $my_query->have_posts() ) :\n\t\treturn true;\n\t\twp_reset_query();\n\telse :\n\t\twp_reset_query();\n\t\treturn;\n\tendif;\n}", "public function is_posts_page() {\n return ( is_home() && 'page' == get_option( 'show_on_front' ) );\n }", "public function toggleStickinessObject()\n\t{\n\t\tglobal $ilAccess;\n\t\t\n\t\tif ($ilAccess->checkAccess('moderate_frm', '', $_GET['ref_id']))\n\t\t{\n\t\t\tif ($this->objCurrentTopic->isSticky())\n\t\t\t{\n\t\t\t\t$this->objCurrentTopic->unmakeSticky();\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->objCurrentTopic->makeSticky();\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->viewThreadObject();\n\t\t\n\t\treturn true;\n\t}", "function more_posts() {\n global $wp_query; // following the current one\n return $wp_query->current_post + 1 < $wp_query->post_count;\n}", "function ind_pre_get_posts(&$query) {\r\n\tif (\r\n\t\tisset( $query->query_vars['post_status'] ) && $query->query_vars['post_status'] == 'draft'\r\n\t\t&& isset( $query->query_vars['post_type'] ) && $query->query_vars['post_type'] == 'post'\r\n\t\t&& isset( $query->query_vars['author'] ) && $query->query_vars['author'] == $GLOBALS['current_user']->ID\r\n\t\t&& isset( $query->query_vars['posts_per_page'] ) && $query->query_vars['posts_per_page'] == 5\r\n\t\t&& isset( $query->query_vars['orderby'] ) && $query->query_vars['orderby'] == 'modified'\r\n\t\t&& isset( $query->query_vars['order'] ) && $query->query_vars['order'] == 'DESC'\r\n\t\t) {\r\n\t\t// show all post types\r\n\t\t$query->query_vars['post_type'] = 'any';\r\n\t\t// show 10 drafts\r\n\t\t$query->query_vars['posts_per_page'] = 10;\r\n\t\t// if admin or editor, show drafts of all users\r\n\t\tif ( current_user_can( 'administrator' ) || current_user_can( 'editor' ) ) {\r\n\t\t\tunset( $query->query_vars['author'] );\r\n\t\t}\r\n\t}\r\n\r\n\tif ( $query->is_admin ) return;\r\n\r\n\tif ( !$query->is_main_query() ) return;\r\n\r\n\tif (!empty($query->query['post_type']) && ( $query->query['post_type'] == 'memberlevel' ) ) return;\r\n\r\n\tif ( $query->is_search ) {\r\n\t\t$query->set( 'posts_per_page', -1);\r\n\t \tif ( ! empty( $query->query_vars['filter'] ) ) {\r\n\t \t\t$query->set( 'post_type', $query->query_vars['filter'] );\r\n\t\t\tunset( $query->query['filter'] );\r\n \t\t} else if ( !empty( $_GET['filter'] ) ) {\r\n\t\t\t$query->set( 'post_type', $_GET['filter'] );\r\n\t \t} else {\r\n\t\t\t$query->set( 'post_type', array( 'hotel', 'restaurant', 'shop', 'activity', 'itinerary', 'library', 'article', 'offer', 'insidertrip' ) );\r\n\t\t}\r\n\t}\r\n\r\n\tif ( is_archive() ) {\r\n\t\tif ( !empty($query->query['post_type']) && in_array($query->query['post_type'], array(\r\n\t\t\t\t\t\t'hotel',\r\n\t\t\t\t\t\t'restaurant',\r\n\t\t\t\t\t\t'shop',\r\n\t\t\t\t\t\t'activity',\r\n\t\t\t\t\t\t'offer'\r\n\t\t\t\t\t)\r\n\t\t\t\t)\r\n\t\t\t) {\r\n\t\t\t$query->set('orderby', array( 'post_title' => 'ASC' ) );\r\n\r\n\t } else if ( !empty($query->query['post_type']) && $query->query['post_type'] == 'article' && getLastPathSegment($_SERVER['REQUEST_URI']) !== 'features' ) {\r\n\t\t // order articles by reverse date except features page\r\n\t\t$query->set( 'orderby', array( 'date' => 'DESC' ) );\r\n\t }\r\n\t}\r\n}", "function has_posts() {\n\tif(($posts = IoC::resolve('posts')) === false) {\n\t\t$params['sortby'] = 'id';\n\t\t$params['sortmode'] = 'desc';\n\t\t\n\t\t$posts = Posts::list_all($params);\n\t\tIoC::instance('posts', $posts, true);\n\t}\n\t\n\treturn $posts->length() > 0;\n}", "function block_core_calendar_update_has_published_posts()\n {\n }", "function accouk_homepage_latest_posts() {\n\n $args = array('post_type' => 'post', 'category_name' => 'blog', 'posts_per_page' => 4, 'orderby' => 'date', 'order' => 'DESC');\n $query = new WP_Query( $args );\n\n if ( $query->have_posts() ) {\n\n echo '<ul class=\"post-list homepage-post-list\">';\n\n \twhile ( $query->have_posts() ) {\n \t\t$query->the_post(); ?>\n\n <li>\n <a href=\"<?php the_permalink(); ?>\" title=\"<?php the_title(); ?>\">\n <div class=\"main-tile-part\">\n <?php echo accouk_post_tile_image(); ?>\n <span><h3><?php the_title(); ?></h3></span>\n </div>\n <div class=\"sub-tile-part\">\n <span class=\"excerpt\"><?php the_excerpt(); ?></span>\n <span class=\"date\"><?php echo get_the_date(); ?></span>\n <span class=\"cta\">Read Now</span>\n </div>\n </a>\n </li>\n <?php\n \t}\n\n \techo '</ul>';\n\n } else {\n \techo \"<p>Sorry, an error has occurred</p>\";\n }\n\n}", "function tptn_daily_lists() {\r\n\tglobal $wpdb, $siteurl, $tableposts, $id;\r\n\t$table_name = $wpdb->prefix . \"top_ten_daily\";\r\n\t\r\n\t$is_widget = intval($_GET['widget']);\r\n\t\r\n\t$tptn_settings = tptn_read_options();\r\n\t$limit = $tptn_settings['limit'];\r\n\t$daily_range = $tptn_settings[daily_range]-1;\r\n\t$current_time = gmdate( 'Y-m-d', ( time() + ( get_option( 'gmt_offset' ) * 3600 ) ) );\r\n\t$current_date = strtotime ( '-'.$daily_range. ' DAY' , strtotime ( $current_time ) );\r\n\t$current_date = date ( 'Y-m-j' , $current_date );\r\n\t\r\n\t$sql = \"SELECT postnumber, SUM(cntaccess) as sumCount, dp_date, ID, post_type, post_status \";\r\n\t$sql .= \"FROM $table_name INNER JOIN \". $wpdb->posts .\" ON postnumber=ID \" ;\r\n\tif ($tptn_settings['exclude_pages']) $sql .= \"AND post_type = 'post' \";\r\n\t$sql .= \"AND post_status = 'publish' AND dp_date >= '$current_date' \";\r\n\t$sql .= \"GROUP BY postnumber \";\r\n\t$sql .= \"ORDER BY sumCount DESC LIMIT $limit\";\r\n\r\n\t$results = $wpdb->get_results($sql);\r\n\t\r\n\t$output = '<div id=\"tptn_related_daily\">';\r\n\tif(!$is_widget) $output .= $tptn_settings['title_daily'];\r\n\r\n\tif ($results) {\r\n\t\t$output .= $tptn_settings['before_list'];\r\n\t\tforeach ($results as $result) {\r\n\t\t\t$title = trim(stripslashes(get_the_title($result->postnumber)));\r\n\t\t\t$output .= $tptn_settings['before_list_item'];\r\n\r\n\t\t\tif (($tptn_settings['post_thumb_op']=='inline')||($tptn_settings['post_thumb_op']=='thumbs_only')) {\r\n\t\t\t\t$output .= '<a href=\"'.get_permalink($result->postnumber).'\" rel=\"bookmark\">';\r\n\t\t\t\tif ((function_exists('has_post_thumbnail')) && (has_post_thumbnail($result->postnumber))) {\r\n\t\t\t\t\t$output .= get_the_post_thumbnail( $result->postnumber, array($tptn_settings[thumb_width],$tptn_settings[thumb_height]), array('title' => $title,'alt' => $title, 'class' => 'tptn_thumb', 'border' => '0'));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$postimage = get_post_meta($result->postnumber, $tptn_settings[thumb_meta], true);\t// Check \r\n\t\t\t\t\tif ((!$postimage)&&($tptn_settings['scan_images'])) {\r\n\t\t\t\t\t\tpreg_match_all( '|<img.*?src=[\\'\"](.*?)[\\'\"].*?>|i', $result->post_content, $matches );\r\n\t\t\t\t\t\t// any image there?\r\n\t\t\t\t\t\tif( isset( $matches ) && $matches[1][0] ) {\r\n\t\t\t\t\t\t\t$postimage = $matches[1][0]; // we need the first one only!\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!$postimage) $postimage = $tptn_settings[thumb_default];\r\n\t\t\t\t\t$output .= '<img src=\"'.$postimage.'\" alt=\"'.$title.'\" title=\"'.$title.'\" width=\"'.$tptn_settings[thumb_width].'\" height=\"'.$tptn_settings[thumb_height].'\" border=\"0\" class=\"tptn_thumb\" />';\r\n\t\t\t\t}\r\n\t\t\t\t$output .= '</a> ';\r\n\t\t\t}\r\n\t\t\tif (($tptn_settings['post_thumb_op']=='inline')||($tptn_settings['post_thumb_op']=='text_only')) {\r\n\t\t\t\t$output .= '<a href=\"'.get_permalink($result->postnumber).'\" rel=\"bookmark\">'.$title.'</a>';\r\n\t\t\t}\t\t\r\n\t\t\tif ($tptn_settings['show_excerpt']) {\r\n\t\t\t\t$output .= '<span class=\"tptn_excerpt\"> '.tptn_excerpt($result->post_content,$tptn_settings['excerpt_length']).'</span>';\r\n\t\t\t}\r\n\t\t\tif ($tptn_settings['disp_list_count']) $output .= ' ('.$result->sumCount.')';\r\n\t\t\t$output .= $tptn_settings['after_list_item'];\r\n\t\t}\r\n\t\tif ($tptn_settings['show_credit']) $output .= $tptn_settings['before_list_item'].'Popular posts by <a href=\"http://ajaydsouza.com/wordpress/plugins/top-10/\">Top 10 plugin</a>'.$tptn_settings['after_list_item'];\r\n\t\t$output .= $tptn_settings['after_list'];\r\n\t}\r\n\t\r\n\t$output .= '</div>';\r\n\r\n\techo \"document.write('\".$output.\"')\";\r\n}", "public function onPostShowing(Post $post)\n {\n $user = auth()->user();\n if (!isAdmin($user)) {\n $post->increment('view_count');\n }\n if (auth()->check()) {\n $unreadNotifications = $user->unreadNotifications;\n foreach ($unreadNotifications as $notifications) {\n $comment = $notifications->data;\n if ($comment['commentable_type'] == 'App\\Model\\Post' && $comment['commentable_id'] == $post->id) {\n $notifications->markAsRead();\n }\n }\n }\n }", "function bones_related_posts() {\n\techo '<ul id=\"bones-related-posts\">';\n\tglobal $post;\n\t$tags = wp_get_post_tags( $post->ID );\n\tif($tags) {\n\t\tforeach( $tags as $tag ) {\n\t\t\t$tag_arr .= $tag->slug . ',';\n\t\t}\n\t\t$args = array(\n\t\t\t'tag' => $tag_arr,\n\t\t\t'numberposts' => 5, /* you can change this to show more */\n\t\t\t'post__not_in' => array($post->ID)\n\t\t);\n\t\t$related_posts = get_posts( $args );\n\t\tif($related_posts) {\n\t\t\tforeach ( $related_posts as $post ) : setup_postdata( $post ); ?>\n\t\t\t\t<li class=\"related_post\"><a class=\"entry-unrelated\" href=\"<?php the_permalink() ?>\" title=\"<?php the_title_attribute(); ?>\"><?php the_title(); ?></a></li>\n\t\t\t<?php endforeach; }\n\t\telse { ?>\n\t\t\t<?php echo '<li class=\"no_related_post\">' . __( 'No Related Posts Yet!', 'bonestheme' ) . '</li>'; ?>\n\t\t<?php }\n\t}\n\twp_reset_postdata();\n\techo '</ul>';\n}", "public function onPostShowing(Post $post)\n {\n $user = auth()->user();\n if (!isAdmin($user)) {\n $post->increment('view_count');\n }\n\n if (auth()->check()) {\n $unreadNotifications = $user->unreadNotifications;\n foreach ($unreadNotifications as $notifications) {\n $comment = $notifications->data;\n if ($comment['commentable_type'] == 'App\\Post' && $comment['commentable_id'] == $post->id) {\n $notifications->markAsRead();\n }\n }\n }\n }", "function top_news_hot_post($title,$time_limit,$limit,$el_class){\n $unqID = uniqid();\n ?>\n <div id=\"post-widget-<?php echo esc_attr($unqID);?>\" data-content-id=\"post-widget-<?php echo esc_attr($unqID);?>\" class=\"posts-widget posts-lists archive-row x2 ajax block <?php echo esc_attr($el_class); ?>\">\n <?php if(! empty($title)) : ?>\n <h2 class=\"widget-title\"><span><?php echo esc_html($title); ?></span></h2>\n <div class=\"clearfix\"></div>\n <?php endif; ?>\n <div class=\"rp-ajax-row\">\n <?php\n $query_args = array(\n 'post_type' => 'post',\n 'posts_per_page' => $limit,\n 'meta_key' => 'post_views_count', \n 'orderby' => 'meta_value_num', \n 'ignore_sticky_posts' => true, \n 'date_query' => array(\n array(\n 'after' => esc_html($time_limit).' weeks ago',\n ),\n ),\n );\n\n $the_query = new WP_Query( $query_args );\n if ( $the_query->have_posts() ) :\n while ( $the_query->have_posts() ) : $the_query->the_post();\n $meta_data = get_post_meta( get_the_ID(), '_format-video', true );\n ?>\n <article class=\"post-item <?php echo ( has_post_thumbnail()) ? 'has-post-thumbnail' : '' ; ?>\">\n <?php if ( has_post_thumbnail() ) : ?>\n <div class=\"post-thumb\">\n <a href=\"<?php the_permalink();?>\">\n <?php the_post_thumbnail('top-news-thumbnail-x2'); ?>\n </a>\n <?php if( !empty($meta_data['embedded_link'])) : ?> \n <a href=\"<?php the_permalink(); ?>\" class=\"play-btn\"></a>\n <?php endif; ?> \n </div> <!--.thumbnail --> \n <?php endif; ?>\n\n <div class=\"content\">\n <h2 class=\"title\">\n <a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a>\n </h2>\n <div class=\"meta\">\n <?php top_news_block_meta() ?>\n </div> <!--/.meta--> \n <div class=\"excerpt\"> \n <?php\n $trimexcerpt = get_the_excerpt();\n $shortexcerpt = wp_trim_words( $trimexcerpt, $num_words = '20', $more = '&#8230;' );\n echo $shortexcerpt;\n ?>\n </div> <!--/.excerpt--> \n </div><!-- /.content -->\n </article><!-- /.post-item -->\n <?php endwhile; wp_reset_postdata(); ?> \n <?php else : ?>\n <p><?php esc_html__( 'Sorry, no posts matched your criteria.' , 'top-news'); ?></p>\n <?php endif; ?>\n </div>\n </div><!-- /.posts-lists --> \n<?php }", "function bones_related_posts() {\n\techo '<ul id=\"bones-related-posts\">';\n\tglobal $post;\n\t$tags = wp_get_post_tags($post->ID);\n\tif($tags) {\n\t\tforeach($tags as $tag) { $tag_arr .= $tag->slug . ','; }\n $args = array(\n \t'tag' => $tag_arr,\n \t'numberposts' => 5, /* you can change this to show more */\n \t'post__not_in' => array($post->ID)\n \t);\n $related_posts = get_posts($args);\n if($related_posts) {\n \tforeach ($related_posts as $post) : setup_postdata($post); ?>\n\t \t<li class=\"related_post\"><a href=\"<?php the_permalink() ?>\" title=\"<?php the_title_attribute(); ?>\"><?php the_title(); ?></a></li>\n\t <?php endforeach; }\n\t else { ?>\n <li class=\"no_related_post\">No Related Posts Yet!</li>\n\t\t<?php }\n\t}\n\twp_reset_query();\n\techo '</ul>';\n}", "function moments_qodef_like_latest_posts() {\n\t\treturn moments_qodef_like()->add_like();\n\t}", "public function showSoftDeleted()\n {\n $posts = Post::onlyTrashed()->get();\n return view('admin-posts', ['posts' => $posts]);\n }", "static function on_td_wp_booster_after_header() {\r\n $page_id = get_queried_object_id();\r\n\r\n if (is_page()) {\r\n\r\n\t // previous meta\r\n\t //$td_unique_articles = get_post_meta($page_id, 'td_unique_articles', true);\r\n\r\n\t $meta_key = 'td_page';\r\n\t $td_page_template = get_post_meta($page_id, '_wp_page_template', true);\r\n\t if (!empty($td_page_template) && ($td_page_template == 'page-pagebuilder-latest.php')) {\r\n\t\t $meta_key = 'td_homepage_loop';\r\n\r\n\t }\r\n\r\n\t $td_unique_articles = get_post_meta($page_id, $meta_key, true);\r\n\t if (!empty($td_unique_articles['td_unique_articles'])) {\r\n\t\t self::$keep_rendered_posts_ids = true; //for new module hook\r\n\t\t self::$unique_articles_enabled = true; //for datasource\r\n\t }\r\n }\r\n if (td_util::get_option('tds_ajax_post_view_count') == 'enabled') {\r\n self::$keep_rendered_posts_ids = true;\r\n }\r\n }", "function widget( $args, $instance )\r\n {\r\n $instance = wp_parse_args( (array) $instance, array(\r\n 'title' => esc_html__( 'Recent Posts', 'fastway' ),\r\n 'number' => 4,\r\n 'post_in' => '',\r\n 'layout' => '1',\r\n ) );\r\n\r\n $title = empty( $instance['title'] ) ? esc_html__( 'Recent Posts', 'fastway' ) : $instance['title'];\r\n $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );\r\n\r\n echo wp_kses_post($args['before_widget']);\r\n\r\n echo wp_kses_post($args['before_title']) . wp_kses_post($title) . wp_kses_post($args['after_title']);\r\n\r\n $number = absint( $instance['number'] );\r\n if ( $number <= 0 || $number > 10)\r\n {\r\n $number = 4;\r\n }\r\n $post_in = $instance['post_in'];\r\n $layout = $instance['layout'];\r\n $sticky = '';\r\n if($post_in == 'featured') {\r\n $sticky = get_option( 'sticky_posts' );\r\n }\r\n $r = new WP_Query( array(\r\n 'post_type' => 'post',\r\n 'posts_per_page' => $number,\r\n 'no_found_rows' => true,\r\n 'post_status' => 'publish',\r\n 'ignore_sticky_posts' => true,\r\n 'post__in' => $sticky,\r\n ) );\r\n\r\n if ( $r->have_posts() )\r\n {\r\n echo '<div class=\"posts-list layout-'.esc_attr($layout).'\">';\r\n\r\n while ( $r->have_posts() )\r\n {\r\n $r->the_post();\r\n global $post;\r\n echo '<div class=\"post-item row gutters-15\">';\r\n if (has_post_thumbnail($post->ID) && wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), false)):\r\n $thumbnail_url = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumbnail', false); ?>\r\n <div class=\"entry-media col-auto\">\r\n <a href=\"<?php the_permalink(); ?>\"><img src=\"<?php echo esc_url($thumbnail_url[0]); ?>\" alt=\"<?php echo esc_attr(get_the_title($post->ID)); ?>\" /></a>\r\n </div>\r\n <?php endif; ?>\r\n <div class=\"entry-content col\">\r\n <?php switch ($layout) {\r\n case '2':\r\n ?>\r\n <?php printf(\r\n '<h6 class=\"entry-title text-uppercase\"><a href=\"%1$s\" title=\"%2$s\">%3$s</a></h6>',\r\n esc_url( get_permalink() ),\r\n esc_attr( get_the_title() ),\r\n get_the_title()\r\n ); ?>\r\n <ul class=\"entry-meta\">\r\n <li><?php fastway_post_author(); ?></li>\r\n <li><?php fastway_post_comment(['text' => '','cmt_with_text' => false]); ?></li>\r\n </ul>\r\n <?php\r\n break;\r\n \r\n default:\r\n ?>\r\n <div class=\"entry-meta\">\r\n <?php echo get_the_date(); ?>\r\n </div>\r\n <?php printf(\r\n '<h6 class=\"entry-title text-uppercase\"><a href=\"%1$s\" title=\"%2$s\">%3$s</a></h6>',\r\n esc_url( get_permalink() ),\r\n esc_attr( get_the_title() ),\r\n get_the_title()\r\n ); ?>\r\n <?php # code...\r\n break;\r\n } ?>\r\n </div>\r\n </div>\r\n <?php }\r\n\r\n echo '</div>';\r\n }\r\n\r\n wp_reset_postdata();\r\n wp_reset_query();\r\n\r\n echo wp_kses_post($args['after_widget']);\r\n }", "public function index()\n {\n $posts = Post::all()->take('300')->sortByDesc('id');\n $feed_posts = [];\n foreach($posts as $post){\n if($post->visible() === true){\n array_push($feed_posts,$post);\n }\n }\n\n return view('auth.dashboard', ['posts' => $feed_posts]);\n }", "public function myPinnedPost()\n {\n return $this->posts()\n ->get()\n ->firstWhere('pinned', 1);\n }", "function wpex_has_shrink_sticky_header() {\n\n\t// Disabled by default\n\t$bool = false;\n\n\t// Sticky header must be enabled\n\tif ( wpex_has_sticky_header() ) {\n\n\t\t// Get sticky header style\n\t\t$sticky_style = wpex_sticky_header_style();\n\n\t\t// Check if enabled via sticky style\n\t\tif ( 'shrink' == $sticky_style || 'shrink_animated' == $sticky_style ) {\n\n\t\t\t// Get header style\n\t\t\t$header_style = wpex_header_style();\n\n\t\t\t// Only enabled for header styles 1 and 5\n\t\t\tif ( 'one' == $header_style || 'five' == $header_style ) {\n\t\t\t\t$bool = true;\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t// Apply filters and return\n\treturn apply_filters( 'wpex_has_shrink_sticky_header', $bool );\n\n}", "public function myposts() {\n\t\t$this->template->content = View::instance('v_posts_myposts');\n\t\t$this->template->title = \"My Posts\";\n\n\t\t# only select posts created by the logged in user\n\t\t# the latest modified one is on the top\n\t\t$q = \"SELECT *\n\t\t\tFROM posts where user_id = \" . $this->user->user_id .\n\t\t\t\" ORDER BY modified DESC\";\n\t\t\t\n// echo $q;\t\t\t\n\n\t\t# Run the query\n\t\t$posts = DB::instance(DB_NAME)->select_rows($q);\n\n\t\t# Pass data to the View\n\t\t$this->template->content->posts = $posts;\n\n\t\t# Render the View\n\t\techo $this->template;\n\t}", "public function showPosts() {\r\n\t\t$allposts = $this->renderPostTemplate();\r\n\t\tforeach($allposts as $post) {\r\n\t\t\techo $post;\r\n\t\t}\r\n\t}", "function previous_posts($display = \\true)\n {\n }", "public function onPostShowing(Post $post)\n {\n $is_viewed_already=(bool) View::where('user_id', \\Auth::id())\n ->where('post_id', $this->id)\n ->first();\n\n $user = auth()->user();\n if($is_viewed_already == false){\n \\Auth::user()->views()->attach($post->id);\n }\n \n /* $unreadNotifications = $user->unreadNotifications;\n foreach ($unreadNotifications as $notifications) {\n $comment = $notifications->data;\n if ($comment['commentable_type'] == 'App\\Post' && $comment['commentable_id'] == $post->id) {\n $notifications->markAsRead();\n }\n }*/\n }", "function dg_display_home_posts( $query ) {\n\t\n if ( !is_admin() && $query->is_main_query() ) {\n\t \n if ( $query->is_home() ) {\n\t\t\n\t\t// POST TYPE\n\t\t// LANGUAGE\n\t\t// PAGINATION\n\t\t$query->set( 'posts_per_page', -1 );\n\t\t\n\t\t// ORDER: orders the post by post_type ASC and by date DESC\n\t\t$post_order = array(\n\t\t\t'post_type' => 'ASC',\n\t\t\t'date' => 'DESC',\n\t\t);\n\t\t$query->set( 'orderby', $post_order );\t\t\n }\n }\n}", "public function isFooterSticky()\r\n\t{\r\n\t\treturn $this->footerSticky;\r\n\t}", "function clix_uppe_post_display( $content ){\r\n\t$bail_out = ( ( defined( 'WP_ADMIN' ) && WP_ADMIN == true ) || ( strpos( $_SERVER[ 'PHP_SELF' ], 'wp-admin' ) !== false ) );\r\n\tif($bail_out){\r\n\t\treturn $content;\r\n\t\t}\r\n\tglobal $id, $clix_rss_fail, $clix_content_fail;\r\n\tif( !is_user_logged_in() && is_single() ){\r\n\t\tif( is_feed() && get_post_meta( $id, '_clix_uppe_disable_unlessshow', true )==1 ){\r\n\t\t\t$content=$clix_rss_fail;\r\n\t\t\t}\r\n\t\telseif( get_post_meta( $id, '_clix_uppe_disable_unlessshow', true )==1 ){\r\n\t\t\t$content=$clix_content_fail;\r\n\t\t\t}\r\n\t\t}\r\n\treturn $content;\r\n}", "public function isMainPost()\n\t{\n\t\t$topic = ForumTopic::with(['messages' => function($q) {\n\t\t\t$q->orderBy('created_at','asc');\n\t\t}])->find($this->topic_id);\n\n\t\tif($topic->messages[0]->id == $this->id) return true;\n\n\t\treturn false;\n\n\t}", "function cmdeals_front_page_featured_paging_fix() {\n\t\t\n\tif ( is_front_page() && is_page( get_option('cmdeals_featured_page_id') )) :\n\t\t\n\t\tquery_posts( array( 'page_id' => get_option('cmdeals_featured_page_id'), 'is_paged' => true ) );\n\t\t\n\t\tdefine('FEATURED_IS_ON_FRONT', true);\n\t\t\n\tendif;\n}", "public function index()\n {\n $number_posts = Post::where('visible', true)->count();\n return view('home', ['posts' => Post::where('visible', true)->orderBy('created_at', 'DESC')->take(3)->get(), 'number_posts' => $number_posts]);\n }", "public function isPublished()\n {\n return $this->postID > 0;\n }", "function remove_sticky_class( $classes ){\n\tif( in_array( 'sticky', $classes ) ){\n\t\t$classes = array_diff( $classes, array( \"sticky\" ) );\n\t\t$classes[] = 'wp-sticky';\n\t}\n\t\n\treturn $classes;\n}", "function tennis_pre_get_posts( $query ) {\n\t// check if the user is requesting an admin page \n\t// or current query is not the main query\n\tif ( is_admin() || ! $query->is_main_query() ){\n\t\treturn;\n\t}\n\n\t$my_post_types = array( 'tenniseventcpt' );\n\t \n\tif( ! is_singular( $my_post_types) && ! is_post_type_archive( $my_post_types ) ) {\n\t return $template;\n\t}\n\n\t$manage = get_query_var( 'manage' );\n\n\t// add meta_query elements\n\tif( !empty( $manage ) ){\n\t\t$query->set( 'meta_key', 'manage' );\n\t\t$query->set( 'meta_value', $manage );\n\t\t$query->set( 'meta_compare', '=' );\n\t}\n\n}", "public function has_remaining_posts() {\n\t\treturn $this->has_remaining_posts;\n\t}", "function show_posts_nav() {\n\tglobal $wp_query;\n\treturn ($wp_query->max_num_pages > 1);\n}", "public function showAllPosts()\n {\n foreach ($this->_postsArray as $post) {\n $post['content']= substr($post['content'], 0, 160).'...';\n echo postsTemplate($this->_view, $post);\n };\n }", "public function getDrafts()\n {\n $mostRecommended = Post::mostRecommended();\n $last = Post::lastPosts()\n ->orderBy('created_at')\n ->where('public', 0)\n ;\n\n $categories = PostCategory::all();\n\n $drafts = Post::where('public', 0)->get();\n\n $last = $last->paginate(4);\n\n return View('blog/index',\n array(\n 'title'=>\"News\",\n 'mostRecommended'=>$mostRecommended,\n 'last'=>$last,\n 'categories' => $categories,\n 'category' => \"Drafts\" , \n 'drafts' => $drafts\n )\n );\n }", "public function index()\n {\n\t\t$blog = BlogModel::where('pinned_featured', 'y')->first();\n\t\treturn view('front', array('featured' => $blog,'featured_sub' => [$blog, $blog],'blogs' => $blog ));\n }", "function show_post(\n $post, $thread, $forum, $logged_in_user, $latest_viewed, $n,\n $controls=FORUM_CONTROLS, $filter=true\n) {\n global $country_to_iso3166_2;\n\n $user = BoincUser::lookup_id($post->user);\n BoincForumPrefs::lookup($user);\n if (is_banished($user) && !is_moderator($logged_in_user, $forum)) {\n return;\n }\n\n // If the user no longer exists, skip the post\n //\n if (!$user){\n return;\n }\n\n $config = get_config();\n $no_forum_rating = parse_bool($config, \"no_forum_rating\");\n\n $tokens = \"\";\n $options = get_output_options($logged_in_user);\n\n // check whether the poster is on the list of people to ignore\n //\n $ignore_poster = false;\n if ($logged_in_user){\n $tokens = url_tokens($logged_in_user->authenticator);\n if (is_ignoring($logged_in_user, $user)){\n $ignore_poster = true;\n }\n }\n\n // The creator can edit the post, but only in a specified amount of time\n // (exception: a moderator can edit his/her posts at any time)\n //\n $can_edit = false;\n if ($logged_in_user) {\n if ($user->id == $logged_in_user->id) {\n if (is_moderator($logged_in_user, $forum)) {\n $can_edit = true;\n } else if (can_reply($thread, $forum, $logged_in_user)) {\n $time_limit = $post->timestamp+MAXIMUM_EDIT_TIME;\n $can_edit = time()<$time_limit;\n } else {\n $can_edit = false;\n }\n }\n }\n\n\n // Print the special user lines, if any\n //\n global $special_user_bitfield;\n $fstatus=\"\";\n $keys = array_keys($special_user_bitfield);\n $is_posted_by_special = false;\n for ($i=0; $i<sizeof($special_user_bitfield);$i++) {\n if ($user->prefs && $user->prefs->privilege($keys[$i])) {\n $fstatus.=$special_user_bitfield[$keys[$i]].\"<br>\";\n $is_posted_by_special = true;\n }\n }\n \n // Highlight special users if set in prefs;\n //\n if ($logged_in_user && $logged_in_user->prefs){\n $highlight = $logged_in_user->prefs->highlight_special && $is_posted_by_special;\n } else {\n $highlight = $is_posted_by_special;\n }\n echo \"\n <tr>\n <td class=\\\"leftcol \".($highlight?\"highlighted_\":\"\").\"row$n\\\" rowspan=\\\"3\\\">\n <a name=\\\"$post->id\\\"></a>\n <div class=\\\"authorcol\\\">\n \";\n\n echo user_links($user);\n echo \"<br>\";\n if ($user->create_time > time()-ST_NEW_TIME) $fstatus.=ST_NEW.\"<br>\";\n if ($fstatus) echo \"<font size=\\\"-2\\\">$fstatus</font>\";\n\n echo \"<span class=\\\"authorinfo\\\">\";\n if (!$filter || !$ignore_poster){\n if ($user->prefs && $user->prefs->avatar!=\"\" && (!$logged_in_user || ($logged_in_user->prefs->hide_avatars==false))) {\n echo \"<img class=authorinfo width=\\\"\".AVATAR_WIDTH.\"\\\" height=\\\"\".AVATAR_HEIGHT.\"\\\" src=\\\"\".$user->prefs->avatar.\"\\\" alt=\\\"Avatar\\\"><br>\";\n }\n }\n \n $url = \"pm.php?action=new&amp;userid=\".$user->id;\n $name = $user->name;\n show_button($url, tra(\"Send&nbsp;message\"), tra(\"Send %1 a private message\",$name));\n echo \"<br>\".tra(\"Joined: %1\", gmdate('j M y', $user->create_time)), \"<br>\";\n\n if (!isset($user->nposts)) {\n $user->nposts = BoincPost::count(\"user=$user->id\");\n }\n \n if (function_exists('project_forum_user_info')){\n project_forum_user_info($user);\n } else {\n echo tra(\"Posts: %1\", $user->nposts).\"<br>\";\n // circumvent various forms of identity spoofing\n // by displaying the user id of the poster.\n //\n //echo \"ID: \".$user->id.\"<br>\";\n if (!no_computing()) {\n echo tra(\"Credit: %1\", number_format($user->total_credit)) .\"<br>\";\n echo tra(\"RAC: %1\", number_format($user->expavg_credit)).\"<br>\";\n }\n // to use this feature:\n // - get flags from http://www.famfamfam.com/lab/icons/flags/famfamfam_flag_icons.zip\n // - put the .png's in html/user/flags/\n // - put define(COUNTRY_FLAGS, 1) in your html/project/project.inc\n //\n if (defined(\"COUNTRY_FLAGS\")) {\n if (array_key_exists($user->country, $country_to_iso3166_2)) {\n $code = $country_to_iso3166_2[$user->country];\n echo \"<img class=flag alt=\\\"$user->country\\\" title=\\\"$user->country\\\" src=flags/$code.png><br>\\n\";\n }\n }\n }\n echo \"</span></div></td>\";\n\n echo \"<td class=\\\"postheader\\\">\";\n if ($controls == FORUM_CONTROLS) {\n echo \"<form action=\\\"forum_rate.php?post=\", $post->id, \"\\\" method=\\\"post\\\">\";\n }\n\n if ($logged_in_user && $post->timestamp>$latest_viewed){\n //show_image(NEW_IMAGE, tra(\"You haven't read this message yet\"), tra(\"Unread\"), NEW_IMAGE_HEIGHT);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<i class=\"icon-comment\"></i>\n\t\t\t\t\t\t<?\n\n }\n\n echo \" <a href=\\\"forum_thread.php?id=\".$thread->id.\"&amp;postid=$post->id\\\">\".tra(\"Message %1\", $post->id).\"</a> - \";\n if ($post->hidden) echo \"<font color=red>[\".tra(\"hidden\").\"] </font>\";\n echo tra(\"Posted: %1\", pretty_time_str($post->timestamp)), \" \";\n\n if ($post->parent_post) {\n echo tra(\" - in response to \").\"<a href=\\\"forum_thread.php?id=\".$thread->id.\"&amp;postid=\".$post->parent_post.\"\\\">\".tra(\"Message %1\", $post->parent_post).\"</a>.\";\n }\n if ($can_edit && $controls != NO_CONTROLS) {\n show_button(\"forum_edit.php?id=\".$post->id.\"$tokens\", tra(\"Edit\"), tra(\"Edit this message\"),\"btn btn\");\n }\n if (is_moderator($logged_in_user, $forum)) {\n show_post_moderation_links($config, $logged_in_user, $post, $forum, $tokens);\n }\n if ($post->modified) {\n echo \"<br>\".tra(\"Last modified: %1\", pretty_time_Str($post->modified));\n }\n if ($ignore_poster && $filter){\n echo \"<br>\".tra(\"This post is not shown because the sender is on your 'ignore' list. Click %1here%2 to view this post\",\"<a href=\\\"?id=\".$thread->id.\"&amp;filter=false#\".$post->id.\"\\\">\",\"</a>\");\n }\n if ($controls == FORUM_CONTROLS) {\n echo \"</form>\\n\";\n }\n echo \"</td>\n </tr>\n <tr class=\\\"\".($highlight?\"highlighted_\":\"\").\"row$n\\\">\n <td class=\\\"postbody\\\">\n \";\n\n if (!$filter || !$ignore_poster){\n $posttext = $post->content;\n\n // If the creator of this post has a signature and\n // wants it to be shown for this post AND the logged in\n // user has signatures enabled: show it\n //\n if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)){\n $posttext.=\"\\n____________\\n\".$user->prefs->signature;\n }\n\n $posttext = output_transform($posttext, $options);\n \n echo \"<p>\", $posttext, \"</p>\";\n echo \"</td></tr><tr><td class=\\\"postfooter\\\">ID: \", $post->id;\n if ($no_forum_rating) {\n echo \" | <a href=\\\"forum_report_post.php?post=\".$post->id.\"\\\">\";\n show_image(REPORT_POST_IMAGE, tra(\"Report this post as offensive\"), tra(\"Report as offensive\"), REPORT_POST_IMAGE_HEIGHT);\n echo \"</a>\";\n } else {\n $rating = $post->rating();\n echo \" | \".tra(\"Rating: %1\", $rating).\" | \".tra(\"rate: \").\"\n <a href=\\\"forum_rate.php?post=\".$post->id.\"&amp;choice=p$tokens\\\">\n \";\n //show_image(RATE_POSITIVE_IMAGE, tra(\"Click if you like this message\"), tra(\"Rate +\"), RATE_POSITIVE_IMAGE_HEIGHT);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<i class=\"icon-thumbs-up\"></i>\n\t\t\t\t\t\t<?\n echo \"</a> / <a href=\\\"forum_rate.php?post=\".$post->id.\"&amp;choice=n$tokens\\\">\";\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<i class=\"icon-thumbs-down\"></i>\n\t\t\t\t\t\t<?\n //show_image(RATE_NEGATIVE_IMAGE, tra(\"Click if you don't like this message\"), tra(\"Rate -\"), RATE_NEGATIVE_IMAGE_HEIGHT);\n echo \"</a> <a href=\\\"forum_report_post.php?post=\".$post->id.\"\\\">\";\n //show_image(REPORT_POST_IMAGE, tra(\"Report this post as offensive\"), tra(\"Report as offensive\"), REPORT_POST_IMAGE_HEIGHT);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<i class=\"icon-warning-sign\"></i>\n\t\t\t\t\t\t<?\n echo \"</a>\";\n }\n if (($controls == FORUM_CONTROLS) && (can_reply($thread, $forum, $logged_in_user))) {\n echo \"&nbsp;&nbsp;&nbsp;&nbsp;<div class=\\\"btn-group\\\">\";\n $url = \"forum_reply.php?thread=\" . $thread->id . \"&amp;post=\" . $post->id . \"&amp;no_quote=1#input\";\n show_button($url, tra(\"Reply\"), tra(\"Post a reply to this message\"));\n $url = \"forum_reply.php?thread=\" . $thread->id . \"&amp;post=\" . $post->id . \"#input\";\n show_button($url, tra(\"Quote\"), tra(\"Post a reply by quoting this message\"));\n\t\t\t\t\t\techo \"</div>\";\n }\n echo \"</td></tr>\";\n } else {\n echo \"</td></tr><tr><td class=\\\"postfooter\\\">\";\n }\n //echo \"<tr class=\\\"postseparator\\\"><td colspan=2></td></tr>\";\n}", "function grve_print_recent_portfolio_items() {\n\n\t$exclude_ids = array( get_the_ID() );\n\t$args = array(\n\t\t'post_type' => 'portfolio',\n\t\t'post_status'=>'publish',\n\t\t'post__not_in' => $exclude_ids ,\n\t\t'posts_per_page' => 3,\n\t\t'paged' => 1,\n\t);\n\n\n\t$query = new WP_Query( $args );\n\n\tif ( $query->have_posts() && $query->found_posts > 1 ) {\n?>\n\t<div class=\"grve-related-post\">\n\t\t<h5 class=\"grve-related-title\"><?php _e( 'Recent Entries', GRVE_THEME_TRANSLATE ); ?></h5>\n\t\t<ul>\n\n<?php\n\n\t\tif ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();\n\t\t\techo '<li>';\n\t\t\tget_template_part( 'templates/portfolio', 'recent' );\n\t\t\techo '</li>';\n\t\tendwhile;\n\t\telse :\n\t\tendif;\n?>\n\t\t</ul>\n\t</div>\n<?php\n\t\twp_reset_postdata();\n\t}\n}", "function stick_post($post_id)\n {\n }", "function block_core_calendar_update_has_published_posts() {\n\tglobal $wpdb;\n\t$has_published_posts = (bool) $wpdb->get_var( \"SELECT 1 as test FROM {$wpdb->posts} WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1\" );\n\tupdate_option( 'wp_calendar_block_has_published_posts', $has_published_posts );\n\treturn $has_published_posts;\n}", "public function topicsPinnedFirst() {\n\t\treturn $this->hasMany(Forum::getTopicClass(), \"section_id\")->orderBy(\"is_pinned\", \"desc\")->orderBy(\"id\", \"desc\");\n\t}", "function torch_tabs_popular_posts($instance) \r\n{\r\n\textract( $instance );\r\n\t$popular = new WP_Query('orderby=comment_count&posts_per_page='.$popular_num);\r\n\r\n\twhile ($popular->have_posts()) : $popular->the_post();\r\n\t?>\r\n <li>\r\n <?php \r\n if ( has_post_thumbnail() ) {\r\n the_post_thumbnail(\"side-slider\");\r\n } \r\n ?>\r\n <div class=\"tab-inner-box\">\r\n <div><a title=\"<?php the_title(); ?>\" href=\"<?php the_permalink() ?>\"><?php the_title(); ?></a></div>\r\n <div><i class=\"fa fa-comments\"></i>&nbsp;&nbsp;<?php the_date(\"M d.Y\")?></div>\r\n </div>\r\n\t\t <div class=\"clear\"></div>\r\n </li>\r\n\t<?php\r\n\tendwhile; \r\n\twp_reset_postdata() ;\r\n}", "public function index()\n {\n return PostShort::collection(\n BlogPost::orderByRaw('(CASE WHEN publication = 0 THEN id END) DESC')\n ->orderBy('publication_date', 'desc')\n ->paginate(20)\n );\n }", "public function index() {\n $posts = $this->postModel->getPosts();\n\n // Check whether user like some post\n if (isLoggedIn()) {\n foreach ($posts as $post) {\n $likes = $this->postModel->getLikesByPostId($post->postId);\n\n foreach ($likes as $like) {\n if ($like->user_id === $_SESSION['user_id']) {\n // Add field with likes\n $post->isLiked = true;\n }\n }\n }\n }\n\n $data = [\n 'posts' => $posts\n ];\n\n $this->view('posts/index', $data);\n }", "function LatestPosts() {\n\t\treturn Post::get()\n\t\t\t->filter('AuthorID', (int)$this->urlParams['ID'])\n \t\t\t->limit(0,5)\n\t\t\t->sort(\"Created\", \"DESC\")\n\t\t\t->filterByCallback(function($post){\n\t\t\t\treturn $post->canView();\n\t\t\t});\n\t}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function flatsome_single_page_header(){\n if(is_singular('post') && get_theme_mod('blog_post_style') == 'top'){\n\t\techo get_template_part( 'template-parts/posts/partials/single-featured', get_theme_mod('blog_post_style'));\n\t}\n}", "public static function jetpack_infinite_scroll_render() {\n\n\t\t\tif ( is_home() ) {\n\t\t\t\t$layout = get_theme_mod( 'theme_slug_blog_content_posts_layout', 'classic' );\n\t\t\t} else {\n\t\t\t\t$layout = get_theme_mod( 'theme_slug_archives_content_posts_layout', 'classic' );\n\t\t\t}\n\n\t\t\twhile ( have_posts() ) {\n\t\t\t\tthe_post();\n\n\t\t\t\tif ( 'grid' === $layout || 'classic-grid' == $layout ) {\n\t\t\t\t\tget_template_part( 'template-parts/content/archive-entry-grid' );\n\t\t\t\t} elseif ( 'list' === $layout || 'classic-list' == $layout ) {\n\t\t\t\t\tget_template_part( 'template-parts/content/archive-entry-list' );\n\t\t\t\t} else {\n\t\t\t\t\tget_template_part( 'template-parts/content/archive-entry-classic' );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function grav_related_posts() {\n\techo '<ul id=\"grav-related-posts\">';\n\tglobal $post;\n\t$tags = wp_get_post_tags($post->ID);\n\tif($tags) {\n\t\tforeach($tags as $tag) { $tag_arr .= $tag->slug . ','; }\n $args = array(\n \t'tag' => $tag_arr,\n \t'numberposts' => 5, /* you can change this to show more */\n \t'post__not_in' => array($post->ID)\n \t);\n $related_posts = get_posts($args);\n if($related_posts) {\n \tforeach ($related_posts as $post) : setup_postdata($post); ?>\n\t \t<li class=\"related_post\"><a href=\"<?php the_permalink() ?>\" title=\"<?php the_title_attribute(); ?>\"><?php the_title(); ?></a></li>\n\t <?php endforeach; } \n\t else { ?>\n <li class=\"no_related_post\">No Related Posts Yet!</li>\n\t\t<?php }\n\t}\n\twp_reset_query();\n\techo '</ul>';\n}", "function is_posts_page() {\r\n global $wp_query;\r\n return $wp_query->is_posts_page ? true : false;\r\n }", "function twentyfourteen_get_featured_posts() {\n\t/**\n\t * Filter the featured posts to return in Twenty Fourteen.\n\t *\n\t * @since Twenty Fourteen 1.0\n\t *\n\t * @param array|bool $posts Array of featured posts, otherwise false.\n\t */\n\treturn apply_filters( 'twentyfourteen_get_featured_posts', array() );\n}", "function twentyfourteen_get_featured_posts() {\n\t/**\n\t * Filter the featured posts to return in Twenty Fourteen.\n\t *\n\t * @since Twenty Fourteen 1.0\n\t *\n\t * @param array|bool $posts Array of featured posts, otherwise false.\n\t */\n\treturn apply_filters( 'twentyfourteen_get_featured_posts', array() );\n}" ]
[ "0.7932049", "0.7375507", "0.7180215", "0.7099434", "0.683806", "0.67774963", "0.6630844", "0.65019584", "0.6468794", "0.6466884", "0.640469", "0.6374649", "0.6162739", "0.6154045", "0.6144017", "0.60648507", "0.6064456", "0.60457355", "0.5959761", "0.59366274", "0.5935665", "0.5914284", "0.59112513", "0.5836461", "0.5833897", "0.5832001", "0.582627", "0.5819392", "0.5819392", "0.57889605", "0.5761027", "0.5709578", "0.57019895", "0.56996113", "0.56912124", "0.56893355", "0.5682753", "0.56823283", "0.56764084", "0.5640587", "0.5630742", "0.5621878", "0.56090564", "0.5603808", "0.56019974", "0.5571635", "0.5548749", "0.553642", "0.55232465", "0.5514297", "0.5503574", "0.547377", "0.54706377", "0.546839", "0.5468271", "0.5468172", "0.5455512", "0.5455129", "0.54524666", "0.54455334", "0.544123", "0.54397553", "0.5435144", "0.5429818", "0.54276985", "0.54227525", "0.54202056", "0.54055464", "0.5402208", "0.54001725", "0.5398158", "0.53969467", "0.5395933", "0.53869593", "0.53788865", "0.53777224", "0.53732693", "0.5371143", "0.5364727", "0.5360939", "0.5360505", "0.5355661", "0.5345877", "0.53409106", "0.5335038", "0.53280216", "0.5327698", "0.5320132", "0.53171295", "0.53168195", "0.5315521", "0.53119546", "0.5309944", "0.5307602", "0.53011376", "0.5300663", "0.5299915", "0.5294206", "0.52941453", "0.52941453" ]
0.76922
1
/ Test create consignee with incorrect parameters
/ Тест создания получателя с неправильными параметрами
public function testCreateConsigneeWithIncorrectParameters() { $this->expectException( WebException::class); // Give wrong/missing parameters to provoke an error response $builder = new ConsigneeBuilder(); $consignee = $builder->build(); $this->api->createConsignee( $consignee ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testQuarantineCreate()\n {\n\n }", "public function testCannotBeCreatedFromInvalidEmailAddress()\n {\n\n }", "function testCreate() {\n # fails due to not verified...\n $this->aRequest['email'] = 'unverified@example.com';\n $this->assertFalse($this->oObject->create());\n\n # but verified users works\n $this->aRequest['email'] = 'moderator@example.com';\n $this->assertTrue($this->oObject->create());\n $this->oObject->destroy(session_id());\n }", "public function testCanBeCreatedFromValidEmailAddress()\n {\n\n }", "public function testExcepcionSiSeCreaEmpleadoConDniQueContengaLetras(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear(null, null, \"4kh123l\");\n\t\t}", "public function testExcepcionSiSeCreaEmpleadoConDniVacio(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear(null, null,$dni=\"\");\n\t\t}", "public function testExcepcionSiSeCreaEmpleadoConApellidoVacio(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear($nombre=\"Franco\", $Apellido=\"\");\n\t\t}", "public function testCreation()\n {\n $this->module->enableRegistration = false;\n\n $this->specify(\"we have create user if registration disabled\", function () {\n $user = new User([\n 'email' => 'user@example.com',\n 'password' => 'password',\n 'name' => 'Test user',\n ]);\n expect(\"we can create user if registration disabled\", $user->create())->true();\n $this->tester->dontSeeEmailIsSent();\n //create() on existing user throw \\RuntimeException\n $user->create();\n }, ['throws' => new \\RuntimeException]);\n\n $this->module->enableRegistration = true;\n $this->specify(\"we have create user with register email\", function () {\n $user = new User([\n 'email' => 'user2@example.com',\n 'password' => 'password',\n 'name' => 'Test user 2',\n ]);\n expect(\"we can create user if registration disabled\", $user->create(true))->true();\n /** @var TestMailer $message */\n /** @var yii\\swiftmailer\\Message $message */\n $this->tester->seeEmailIsSent();\n $message = $this->tester->grabLastSentEmail();\n expect(\"we must see email\", $message)->notNull();\n expect(\"we must see email to user\", $message->getTo())->hasKey($user->email);\n expect(\"we must see registration email\", $message->getSubject())->contains('register');\n });\n\n $this->specify(\"we have create user wit autogenerated password\", function () {\n $user = new User([\n 'email' => 'user3@example.com',\n 'name' => 'Test user',\n ]);\n expect(\"we can create user with autogenerated password\", $user->create())->true();\n });\n\n $this->specify(\"we have create user without name\", function () {\n $user = new User([\n 'email' => 'user4@example.com',\n 'password' => 'password',\n ]);\n expect(\"we can't create user without name\", $user->create())->false();\n expect(\"we can see error `name`\", $user->getErrors())->hasKey('name');\n });\n }", "public function testCreateSuperfund()\n {\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function testCreateNetworkMerakiAuthUser()\n {\n }", "public function testFailNoCustomerNoForAccountCreate()\n {\n $card = new Card();\n $card->setToken('test-token');\n\n $config = new SinglePayConfig();\n $config->setServiceConfig(self::$testConfig);\n\n $data = new SinglePayData();\n\n $data->setCard($card)\n ->setExtras(array(\n 'method' => 'update'\n ));\n\n $transactionSetup = ExpressFactory::buildTransactionSetup($config, $data);\n }", "public function testExcepcionSiSeCreaEmpleadoConSalarioVacio(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear(null, null, null,$Salario=\"\");\n\t\t}", "public function testShouldCreateANewUser()\n {\n $user = factory(User::class)->create();\n\n $role = Role::where(\"name\", \"admin\")->first();\n $user->attachRole($role);\n\n $this->actingAs($user);\n\n $invitationLink = (new CreateInvitationLinkService($user))->execute([\n \"type\" => \"STUDENT\",\n ]);\n\n $createdUser = (new CreateUserService())->execute([\n \"name\" => $this->faker->name,\n \"email\" => $this->faker->unique()->safeEmail,\n \"password\" => \"12345678\",\n \"hash\" => $invitationLink->hash,\n ]);\n\n $this->assertTrue(is_numeric($createdUser->id));\n }", "public function testProfileCreate()\n {\n\n }", "public function testExcepcionSiSeCreaEmpleadoConNombreVacio(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear($nombre=\"\");\n\t\t}", "public function testCreatingContactWithNegativeUserIdFails(): void\n {\n // Creates expectation.\n $this->expectException(\\InvalidArgumentException::class);\n\n // Create random attributes.\n $attributes = [\n 'id' => $this->faker->numberBetween(),\n 'user_id' => -1,\n 'token_id' => $this->faker->randomAscii,\n 'revoked' => $this->faker->boolean,\n 'expires_at' => $this->faker->dateTimeBetween('+10 days', '+20 days')->format('Y-m-d H:i:s'),\n ];\n\n // Performs test.\n new AccessToken($attributes);\n }", "public function testCreateCertificates()\n {\n }", "public function testIs20200519CustomerCreatableThrowInvalidArgumentException()\n {\n $this->expectException(\\Xendit\\Exceptions\\InvalidArgumentException::class);\n $params = [\n 'reference_id' => self::REFERENCE_ID\n ];\n\n Customers::createCustomer($params);\n }", "public function testCreateExpedicao()\n {\n }", "public function testRegisterNewContract()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(factory(User::class)->create());\n $property = factory(Property::class)->create([\n 'rented' => null,\n 'status' => Property::STATUS_ACTIVE\n ]);\n $lessee = factory(Lessee::class)->create();\n\n $browser\n ->visit(route('contrato.create'))\n ->on(new CreateContractPage())\n ->assertSee('Nuevo Contrato');\n\n\n\n\n\n $browser->selectLessor($property->lessor->id);\n $browser->selectProperty($property->id);\n $browser->selectLessee($lessee->id);\n $browser->typeSlowly('@years',1);\n // Contract dates\n $this->fillInputDate($browser,'periods[0][fecha_inicio]', now());\n $this->fillInputDate($browser,'periods[0][fecha_fin]', now()->addMonth());\n $browser->typeSlowly('input[name=\\'periods[0][cantidad]\\']', random_int(1000,1210));\n\n $browser->pause(500);\n $browser->screenshot('after');\n $browser->screenshot('test');\n $browser->type('@bonus',10);\n $browser->type('@deposit',5000);\n $browser->click('@submit');\n\n $browser->assertRouteIs('contrato.index');\n $browser->assertSee('Catalogo de Contratos');\n });\n }", "public function testProfilePrototypeCreateQuarantines()\n {\n\n }", "public function testShouldFailIFARegistrationIsCreatedWithoutSource() {\n $this->expectException(\\PDOException::class);\n \n $entity = new Registration;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = 'mail@mail.com';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n }", "public function test_user_can_create_despesa()\n {\n // Prepare User Login\n\n // $user = User::factory()->create();\n\n\n // $credentials = [\n // 'email' => $user->email,\n // 'password' => 'password'\n // ];\n\n // $response = $this->post(route('auth.user'), $credentials);\n\n\n // Create Despesa\n\n // $post = Despesas::factory()->create();\n\n // $data = $post->only(['descricao', 'valor', 'id_usuario']);\n // $data['data_criacao'] = Carbon::now();\n\n // Despesas::create($data);\n\n // $response = $this->post(route('new-post'), $data);\n\n // $response->assertStatus(302);\n }", "public function testBuildAccountCreateTransactionSetup()\n {\n $config = new SinglePayConfig();\n $config->setServiceConfig(self::$testConfig);\n\n $data = new SinglePayData();\n $data->setCustomerNo('112')\n ->setExtras(array(\n 'method' => 'create'\n ));\n\n $transactionSetup = ExpressFactory::buildTransactionSetup($config, $data);\n $this->assertInstanceOf('\\SinglePay\\PaymentService\\Element\\Express\\Method\\TransactionSetup', $transactionSetup);\n $this->assertEquals($transactionSetup->transactionSetup->TransactionSetupMethod, 'PaymentAccountCreate');\n $this->assertEquals($transactionSetup->transactionSetup->ProcessTransactionTitle, 'Save Card');\n }", "public function testShouldFailIFARegistrationIsCreatedWithoutRegistrant() {\n $this->expectException(\\PDOException::class);\n\n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = 'mail@mail.com';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n }", "public function testParticipantsMePasswordPut()\n {\n }", "public function test_crear_proceso_nombre_codigo_existentes()\n {\n\n Artisan::call('migrate:fresh');\n Artisan::call('db:seed');\n \n $user = factory(User::class)->create();\n $this->actingAs($user);\n\n $proceso1 = factory(Proceso::class)->create(['nombre'=>'Proceso 1','codigo'=>'AAAC']);\n\n $result = $this->post(route('procesos.store'),['nombre'=>'Proceso 1','codigo'=>'AAAC']);\n\n $result->assertSessionHasErrors();\n }", "public function testCreateChallengeTemplate()\n {\n }", "public function testCreateChallengeActivityTemplate()\n {\n }", "public function testNewPersonsOwnershipExistingCustomers() {\n $this->addProductToCart($this->product);\n $this->goToCheckout();\n $this->assertCheckoutProgressStep('Event registration');\n\n // Save first registrant.\n $this->clickLink('Add registrant');\n $this->submitForm([\n 'person[field_name][0][value]' => 'Person 1',\n 'person[field_email][0][value]' => 'person1@example.com',\n 'field_comments[0][value]' => 'No commments',\n ], 'Save');\n\n // Assert that this person profile is now owned by the current logged in\n // user.\n $person = Profile::load(1);\n // Assert that we are checking the expected person.\n $this->assertEquals('Person 1', $person->field_name->value);\n $this->assertEquals($this->adminUser->id(), $person->getOwnerId());\n }", "public function testItCreatesANewUserWithValidData()\n {\n $data = factory(User::class)->make([\n \"tenant_id\" => $this->user->tenant->id,\n \"address\" => [\n \"city\" => \"springfield\",\n \"country\" => \"united states of america\",\n \"state\" => \"missouri\",\n \"street\" => \"1742 evergreen terrace\",\n ]\n ]);\n\n $response = $this->actingAs($this->user)\n ->postJson(\n \"api/v1/users/\",\n $data->only([\n \"address\",\n \"email\",\n \"firstname\",\n \"lastname\",\n \"tenant_id\",\n ])\n )->assertOk();\n \n $user = User::all()->last();\n\n $response\n ->assertJson([\n \"id\" => $user->id,\n \"firstname\" => $user->firstname,\n \"lastname\" => $user->lastname,\n ]);\n }", "public function testCreateContador()\n {\n }", "public function testVolunteerHourCreateForContactFailure_BasicUser()\n {\n // Set test user as current authenticated user\n $this->be($this->basicUser);\n \n $this->session([\n 'username' => $this->basicUser->username, \n 'access_level' => $this->basicUser->access_level\n ]);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/volunteer/'.$volunteerID);\n \n // Assert redirected to access denied page\n $this->assertRedirectedToRoute('unauthorized');\n }", "public function test_create_user_invalid_email()\n {\n\n $response = $this->json('POST', '/user_create',\n [\n 'name' => $this->name,\n 'email' => 'test' . rand(1, 10), \n 'password' => $this->password]);\n $response\n ->assertStatus(200)\n ->assertExactJson([\n $this->all_message => $this->user_create_invalid_email,\n ]);\n }", "public function createInvoice()\n {\n //seccion para registrar certificaos relacionados con un RFC \n /* $params = [ \n 'Rfc' => 'AAA010101AAA',\n 'Certificate' => 'MIIF+TCCA+GgAwIBAgIUMzAwMDEwMDAwMDAzMDAwMjM3MDEwDQYJKoZIhvcNAQELBQAwggFmMSAwHgYDVQQDDBdBLkMuIDIgZGUgcHJ1ZWJhcyg0MDk2KTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFjacOzbiBkZSBTZWd1cmlkYWQgZGUgbGEgSW5mb3JtYWNpw7NuMSkwJwYJKoZIhvcNAQkBFhphc2lzbmV0QHBydWViYXMuc2F0LmdvYi5teDEmMCQGA1UECQwdQXYuIEhpZGFsZ28gNzcsIENvbC4gR3VlcnJlcm8xDjAMBgNVBBEMBTA2MzAwMQswCQYDVQQGEwJNWDEZMBcGA1UECAwQRGlzdHJpdG8gRmVkZXJhbDESMBAGA1UEBwwJQ295b2Fjw6FuMRUwEwYDVQQtEwxTQVQ5NzA3MDFOTjMxITAfBgkqhkiG9w0BCQIMElJlc3BvbnNhYmxlOiBBQ0RNQTAeFw0xNzA1MTgwMzU0NTFaFw0yMTA1MTgwMzU0NTFaMIHlMSkwJwYDVQQDEyBBQ0NFTSBTRVJWSUNJT1MgRU1QUkVTQVJJQUxFUyBTQzEpMCcGA1UEKRMgQUNDRU0gU0VSVklDSU9TIEVNUFJFU0FSSUFMRVMgU0MxKTAnBgNVBAoTIEFDQ0VNIFNFUlZJQ0lPUyBFTVBSRVNBUklBTEVTIFNDMSUwIwYDVQQtExxBQUEwMTAxMDFBQUEgLyBIRUdUNzYxMDAzNFMyMR4wHAYDVQQFExUgLyBIRUdUNzYxMDAzTURGUk5OMDkxGzAZBgNVBAsUEkNTRDEwX0FBQTAxMDEwMUFBQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIiV+76Q7p9i5Bj4G1YuYuPtf/cO/dyNX19o6y57CiKcgGYEqPqb88cJ/IPPyFPIFtBdxYJmqikxMwxDHTIsolI0GMvqEO1BsokcDOL4UfMZt7NmYaH1P8Nj/fO5xn0b1qSnSfQHGdPLMgXsLPhaR69HREsVEIowEMM5ucoNArSNzel4XJU8X/dnoumZvaOyCdvEC076NzB3UJA53ZD1xvvPEedUfAfj2eaUCQJYPnToyf7TAOGzzGkX5EGcjxC3YfcXGwG2eNdbSbxSiADPx6QACgslCu1vzmCzwQAmfeHWQvirpZccJyD/8shd7z7fv5A/G0g3aDloM5AXwA3nDVsCAwEAAaMdMBswDAYDVR0TAQH/BAIwADALBgNVHQ8EBAMCBsAwDQYJKoZIhvcNAQELBQADggIBAJepSmoMRmasH1IyLe68oM6+Qpm/kXjwQw8ALMkhHTI3XmxjUVqpJ6k9zZQfwyTLc2UZIo8jdO4WH3bcRBDcYOkciW3KxhKAbLgJPHAieVOyObXViET0ktLL6xeDHnf5Au4LOi0m01E8IPFbxYKb+RU1xpOKqJuRHH5dfRBg4HV8y+OTa5lVZil+sAhwdyXFsPf9FqN1SNn9EuKjYc9+lkRiGcHPNb1ZAtDsaQdGzoAbR+Z6m9FdZB/XU+Huls+ePdkw1t2/37AJZkYqr3wVNKrrpQkax9DrnFT8E+7xKXLcbpw3YOYBoENj2+NuMn29sn3U97wKlpyn/GeMwbkCmOGBAMtK9O6+wRrcEmu9Js68asHd5JQSzA39BRAUjb/9aefmWTb6DNm22IUUSSOT9MK5yWGncdWxKrNtMvx7OyYlYV2/qG4p/rMlj6nZcIpwONhyLUwxr74kO0Jo3zus81t9S/J91jumiwyNVqJZ77vmAy6lQnr8Og9/YaIzDH5L/byJQJquDKEmLvuya4sQ2iJj+p282RNpBscO/iyma8T+bZjG2CFYUTwGtOEZ2aLqApJ4cCBW7Ip569B+g7mgG8fdij6E1OlJ8Y3+ovBMak8LtnFVxsfthdWOK+AU2hWGU88rfZkLJ0RJn8oAq/6ri0iJNCKym/mc9g0JpNw+asMM',\n 'PrivateKey' => 'MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIAgEAAoIBAQACAggAMBQGCCqGSIb3DQMHBAgwggS9AgEAMASCBMh4EHl7aNSCaMDA1VlRoXCZ5UUmqErAbucRBAKNQXH8tz2zJ7hdZaOZx7PEfMiWh5Nh6e8G8kxY+GW4YCSbLxslkhBtfTR6v5JYv3vhgH7XzMCwJPOfX6gxeeCYZ4HTdDNAyBVCjTbJpqbo778ri33o+I4yx7zgMqA3mzVE61re6MPrGXh1YT/K9zZeEdmwvXQfPs9VnioKUhiswoMcJ3kc3FxGLrEAsjQqv/ZVOHPY3NrbcfpQUyprsCKv3rRdxkIRdMPY4eiA720mffzvDqyzeQ8xfwHTE8Xjunja4KXvW/mV7ItTH0vRXHc3HJQ0dNnyawXmbC1FiYbCVdswoYuVQmslvq3QEXUGwP3KYfxQzKatnU7nprkmsipPqPBqDrzqc6NSN/8rxIc5zTAL4bFul+CEKz9VybwdavgewEy7u3fPnKPN+y4HilNgmlbtS7seWpbIgVPA+woG2Ph5hsgREXZCjGKSRuI77/FLcI5CMrZR+FvbnaqG+gXDBTz2lWhK9pmWlVawT2pvfiHOLzYRf2YyuVbJ79D2EgbUKyp3kCQ6fddMzspPhD/pvLQizExeyIxImb/kQXs2mmtDnyFIsj4Hcn5wCcs+SDIj+FJnwRiKB6YfdzjIig/ZMfpgMpl0u69LX649uL318o+Hy3d5t3wxgSkTaJ5McKhWyh9x9vlHZhYyM6HArBNfP9cGF86M3GwAMHAiJQl9UevyKe6rlvAIDlop6l3M02m5hHUXUpPjz4j7inFXZzvSv0tFoSbEqGgno0Pa+0gWHqRwBEGLGEwHVfyEy+Of8g4+0jzo0jNPIcurA5xRh9HSRSAd3kdEhx75eeVL7lBdLjRUkbtRtg7nelSjqAX7tQZK6Awp5C/17W96+f/vtjB+Y+ZgrSUjnQDADnZCnapIrzHgE3ZanhGAtnMMl+o4aLd1+74inG4jht/GJB60raSQfYrDrM3kBs0oyfpbEk5TI8ISzRlRmejv+mqpTogJaAqhnLP7rAli3d4pRhUjbACn/xQSFKxl2OURdmnMlvlbb6pleXviJHRxzPPQ25NVdWvmCYWrDfAZYn8X1sABOdyrth38BfmAVsyyPATYFB+5cXuNIZkPz1swz3859iZWTn5JRfPEAGICu5G6w6nrgOLYM9UqOPmxofzEdiEPafLQ5orMxdSWF6+3mD2Yw/VP+B43B/oYehgfrYjBUJt2D04VU/v8XK1ZUVgX/Co0odcdcszAP+ljQ7UVhW+uxVMd2sEprwepPPjYT3HvdI6RBB94yYBWfkoCSo/jsrrRpw2DVEyvoDp/hOXKyt8Y/8UGLCxJUhhv5fEiezYnlUAmwAGjgZfzfAErx0gkQFBgNKglEA7jz0Dqc2Z92pGVGTyPtXqRsqX3IYX5WsZVUoJim0wI7+LNmKpu147ePC0G4Sf4AGoZyPWVXq2SZSPpN261pIKSoLEDeA8WIKj2U5JG2DMMYokV0bZ1TsabrwHvwsp3muLnaP8L+n2fBplbhAEE2buBXvsATixMGu57ZI5WKFLnHn4KIBrZzALCtGehfFbCsdf1nBR6aAt+BpWhhZki54fZTurgMr6zuC5hAaP4rExW+LCc3upHMW7R9DcHWaZuZIfwnVDImnAQ9UOsz+A=',\n 'PrivateKeyPassword' => '12345678a'\n ];\n $lstNameIds = $this->facturama->post('api-lite/csds', $params ); */\n\n\n $params = [\n \"Issuer\" => [\n \"FiscalRegime\" => \"601\",\n \"Rfc\" => \"AAA010101AAA\",\n \"Name\" => \"EXPRESION EN SOFTWARE\"\n ],\n \"Receiver\" => [\n \"Name\" => \"Entidad receptora\",\n \"CfdiUse\" => \"P01\",\n \"Rfc\" => \"AAA010101AAA\"\n ],\n //agregado NO \n 'Folio' => '102',\n \"CfdiType\" => \"I\",\n \"NameId\" => \"1\",\n \"ExpeditionPlace\" => \"12345\",\n \"PaymentForm\" => \"03\",\n \"PaymentMethod\" => \"PUE\",\n \"Currency\" => \"MXN\",\n \"Date\" => \"2021-01-19T09:51:39\",\n \"Items\" => [\n [\n \"Quantity\" => \"100\",\n \"ProductCode\" => \"84111506\",\n \"UnitCode\" => \"E48\",\n \"Unit\" => \"Unidad de servicio\",\n \"Description\" => \" API folios adicionales\",\n \"IdentificationNumber\" => \"23\",\n \"UnitPrice\" => \"0.50\",\n \"Subtotal\" => \"50.00\",\n \"Discount\" => \"10\",\n \"DiscountVal\" => \"10\",\n \"Taxes\" => [\n [\n \"Name\" => \"IVA\",\n \"Rate\" => \"0.16\",\n \"Total\" => \"6.4\",\n \"Base\" => \"40\",\n \"IsRetention\" => \"false\"\n ]\n ],\n \"Total\" => \"46.40\"\n ],\n [\n \"Quantity\" => \"1\",\n \"ProductCode\" => \"84111506\",\n \"UnitCode\" => \"E48\",\n \"Unit\" => \"Unidad de servicio\",\n \"Description\" => \" API Implementación \",\n \"IdentificationNumber\" => \"21\",\n \"UnitPrice\" => \"6000.00\",\n \"Subtotal\" => \"6000.00\",\n \"Taxes\" => [\n [\n \"Name\" => \"IVA\",\n \"Rate\" => \"0.16\",\n \"Total\" => \"960\",\n \"Base\" => \"6000\",\n \"IsRetention\" => \"false\"\n ]\n ],\n \"Total\" => \"6960.00\"\n ]\n ]\n ];\n\n // $result = $this->facturama->post('2/cfdis', $params);\n // api-lite\n $result = $this->facturama->post('api-lite/2/cfdis', $params);\n return $result;\n }", "public function testProjectProjectIDInviteUserPost()\n {\n }", "public function create_unsigned_contract()\n {\n $contract_id = factory(Contract::class, 'testing_unsigned_legal')->create([\n 'value' => $value = self::$faker->numberBetween(5000, 100000),\n 'start_date' => '',\n 'end_date' => '',\n 'participants' => $participants = rand(12, 20),\n 'payments' => $payments = rand(0, 12),\n 'client_id' => $client_id = factory(Legal::class, 'accept_meeting')->create()->client_id\n ])->id;\n for ($i = 1; $i <= $participants; $i++) {\n $participant_id = factory(Participant::class)->create()->id;\n factory(ContractParticipant::class)->create([\n 'contract_id' => $contract_id,\n 'participant_id' => $participant_id\n ]);\n }\n for ($i = 1; $i <= $payments; $i++) {\n $payment_id = factory(Payment::class)->create([\n 'value_euro' => $value_euro = round($value/$payments),\n 'pay_date' => date('Y-m-d', strtotime(\"+\".$i.\" month\")),\n 'contract_id' => $contract_id\n ])->id;\n factory(Invoice::class)->create([\n 'value_euro' => $value_euro,\n 'paid_date' => date('Y-m-d', strtotime(\"+\".$i.\" month\")),\n 'payment_id' => $payment_id,\n 'contract_id' => $contract_id,\n 'client_id' => $client_id\n ]);\n }\n }", "public function testIs20201031CustomerCreatableThrowInvalidArgumentException()\n {\n $this->expectException(\\Xendit\\Exceptions\\InvalidArgumentException::class);\n $params = [\n 'reference_id' => self::REFERENCE_ID,\n 'api-version' => '2020-10-31'\n ];\n\n Customers::createCustomer($params);\n }", "public function testCreateChamado()\n {\n }", "public function testChannelsCreate()\n {\n }", "public function testRegistrationEmailAlreadyInUse(): void { }", "public function testCreate()\n {\n\n $data = array(\n 'achRoutingNumber' => '987654321',\n 'achAccountNumber' => '123456789',\n 'achAccountType' => 'CHECKING',\n 'foo' => 'bar'\n );\n\n $transaction = $this->client->transaction()->create($data);\n $this->assertEquals($data, get_object_vars($transaction->post), 'Passed variables are not correct');\n $this->assertEquals('POST', $transaction->request_method, 'The PHP Verb Is Incorrect');\n $this->assertEquals('/transactions', $transaction->path, 'The path is incorrect');\n }", "public function testItDoesntCreateANewUserWithInvalidData()\n {\n $data = factory(User::class)->make([\n \"address\" => [\n \"city\" => \"springfield\",\n \"country\" => \"united states of america\",\n \"state\" => \"missouri\",\n \"street\" => \"1742 evergreen terrace\",\n ]\n ]);\n\n $this->actingAs($this->user)\n ->postJson(\n \"api/v1/users/\",\n $data->only([\n \"email\",\n \"address\",\n \"lastname\",\n \"tenant_id\",\n ])\n )\n ->assertStatus(422);\n }", "public function testCreateGrantExceptions()\n {\n $throws_missing_client_id_exception = false;\n try {\n self::$api->create('', self::$apiIdentifier, []);\n } catch (CoreException $e) {\n $throws_missing_client_id_exception = $this->errorHasString($e, 'Empty or invalid \"client_id\" parameter');\n }\n\n $this->assertTrue($throws_missing_client_id_exception);\n\n $throws_missing_audience_exception = false;\n try {\n self::$api->create(self::$env['APP_CLIENT_ID'], '', []);\n } catch (CoreException $e) {\n $throws_missing_audience_exception = $this->errorHasString($e, 'Empty or invalid \"audience\" parameter');\n }\n\n $this->assertTrue($throws_missing_audience_exception);\n }", "public function testCreateChallengeActivity()\n {\n }", "public function testCreatePayrun()\n {\n }", "public function testRegistrationEmailWrongFormat(): void { }", "public function testHandleCreateValidationError()\n {\n // Set parameter and remove dealer account name\n $params = $this->customDealerAccountData;\n unset($params['name']);\n \n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/create', $params, [], [], ['HTTP_REFERER' => '/dealer-account/create']);\n \n $this->assertRedirectedTo('/dealer-account/create');\n $this->assertSessionHasErrors();\n $this->assertHasOldInput();\n }", "public function testCreateChallenge()\n {\n }", "public function testCreateSiteMembershipRequestForPerson()\n {\n }", "public function canCreateAUser ()\n {\n\n $faker = Factory::create();\n\n $this->withoutExceptionHandling();\n\n\n $response = $this->json('POST', 'api/users', [\n 'name' => $name = $faker->company,\n 'surName' => $surName = $faker->company,\n 'email' => $email = $faker->company,\n 'password' => $password = $faker->company,\n 'entity' => $entity = $faker->company,\n 'street' => $street = $faker->company,\n 'number' => $number = random_int(0,9999),\n 'city' => $city = $faker->company,\n 'CP' => $CP = random_int(0,9999),\n ])\n ->assertStatus(201);\n\n $this->assertDatabaseHas('users', [\n 'name'=> $name,\n 'surName'=> $surName,\n 'email'=>$email,\n 'password'=>$password,\n 'entity'=>$entity,\n 'street'=>$street,\n 'number'=>$number,\n 'city'=>$city,\n 'CP'=>$CP,\n ]);\n }", "public function testAuthenticationsEmailIdPut()\n {\n }", "public function testMeetingCreatePost()\n {\n $user = factory(App\\User::class)->create();\n }", "public function testAuthenticationServiceAuthenticationCreate()\n {\n }", "public function testCreate() {\n\t$zc=new ZbootaClient(\"shadiakiki1986@yahoo.com\",\"dummy\",\"us-east-1\");\n\t$zc->connect();\n\tif(count($zc->entry)>0) {\n\t\t// delete the added entry so that the test can run \n\t\t$zc->client->deleteItem(array(\n\t\t 'TableName' => 'zboota-users',\n\t\t 'Key' => array( 'email' => array('S' => \"shadiakiki1986@yahoo.com\") )\n\t\t));\n\t}\n\n\t// create user\n\t$zc=new ZbootaClient(\"shadiakiki1986@yahoo.com\",\"\",\"us-east-1\");\n\t$zc->newUser();\n\n\t// test that user was created\n\t$zc->connect();\n\t$this->assertTrue(array_key_exists(\"email\",$zc->entry));\n\t$this->assertTrue(array_key_exists(\"pass\",$zc->entry));\n }", "public function testCreate()\n\t{\n\t\t$this->dispatchWithExpectedException(\"/comment/create\", 'Bootstrap_Service_Exception_Authorization');\n\t}", "public function testCreatePerson()\n {\n }", "public function test_user_can_create_an_address()\n {\n $this->actingAs(factory(User::class)->create())->post('/address', [\n 'street' => \"new\",\n 'city' => \"rneogr\",\n 'pincode' => 1233221,\n 'state' => 'penns',\n 'phone_number' => 8909456721\n ])->assertSuccessful();\n\n }", "public function testThatCreateUserRequestIsFormattedProperly()\n {\n $api = new MockManagementApi( [ new Response( 200, self::$headers ) ] );\n\n $api->call()->users()->create( [\n 'connection' => '__test_connection__',\n 'email' => '__test_email__',\n 'password' => '__test_password__',\n ] );\n\n $this->assertEquals( 'POST', $api->getHistoryMethod() );\n $this->assertEquals( 'https://api.test.local/api/v2/users', $api->getHistoryUrl() );\n\n $headers = $api->getHistoryHeaders();\n $this->assertEquals( 'Bearer __api_token__', $headers['Authorization'][0] );\n $this->assertEquals( self::$expectedTelemetry, $headers['Auth0-Client'][0] );\n $this->assertEquals( 'application/json', $headers['Content-Type'][0] );\n\n $body = $api->getHistoryBody();\n $this->assertArrayHasKey( 'connection', $body );\n $this->assertEquals( '__test_connection__', $body['connection'] );\n $this->assertArrayHasKey( 'email', $body );\n $this->assertEquals( '__test_email__', $body['email'] );\n $this->assertArrayHasKey( 'password', $body );\n $this->assertEquals( '__test_password__', $body['password'] );\n }", "public function test_user_created()\n {\n $this->wrongCredentials = false;\n $credentials = self::DEFAULT_CREDENTIALS;\n $user = $this->registerService->registerUser($credentials);\n $this->assertInstanceOf(User::class, $user);\n $this->assertEquals($credentials['email'], $user->email);\n $this->assertEquals($credentials['name'], $user->name);\n\n }", "public function testCouponCreation()\n {\n $this->Details=array( 'recipient_id' => \"13245245\",\n 'offerType' => \"4534234\",\n 'expringdate' => date(\"Y-m-d H:i:s\")\n );\n $this->Coupon = new Coupon();\n $this->assertContains('success', $this->Coupon->addCoupon($this->Details));\n\n }", "public function testAltaComercializador()\n {\n $data = $this->data();\n $service = new ABM_ComercializadorService();\n $service->crearComer($data);\n\n\n\n $user = ['usuario' => $data['usuario'], 'email' => $data['email']];\n $data['usuario'] = 2;\n unset($data['password']);\n $this->assertDatabaseHas('imputaciones', ['nombre' => 'Comisiones a pagar '.$data['nombre'].' '.$data['apellido'], 'codigo' => 311020001]);\n $this->assertDatabaseHas('saldos_cuentas', ['saldo' => 0, 'codigo' => 311020001, 'nombre' => 'Comisiones a pagar '.$data['nombre'].' '.$data['apellido']]);\n $this->assertDatabaseHas('users', $user);\n $this->assertDatabaseHas('role_users', ['user_id' => 2, 'role_id' => 2]);\n $this->assertDatabaseHas('comercializadores', $data);\n }", "public function testCreateUserWithInvalidPartsFails()\n {\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Invalid value: has_custom_certificate');\n\n $s = json_decode('{\"url\":\"https://www.test.net:8443/webhook\",\"has_custom_certificate\":1,\"pending_update_count\":0,\"max_connections\":40}');\n $t = new WebhookInfo($s);\n }", "public function testCreatedException()\n {\n $this->expectException(DomainException::class);\n County::create('County One',0, 200);\n }", "public function testAddToNewsLetterFailForIncompleteDetails()\n {\n $request = Request::create('/api/contact/subscribe', 'POST', $this->invalidSubscriber);\n $response = $this->contactController->addToNewsletter($request);\n $this->assertEquals(ResponseMessage::INPUT_ERROR, $response->getData()->message);\n $this->assertObjectHasAttribute('name',$response->getData()->data);\n $this->assertObjectHasAttribute('email',$response->getData()->data);\n $this->assertDatabaseMissing('newsletter_subscribers', $this->invalidSubscriber);\n }", "public function testCreateAccountTest()\n {\n $data = new Request();\n $data->name = $this->faker->name;\n $data->amount = rand(1000,9999) ;\n\n $banco = new BancoController();\n\n $nuevo = $banco->createAccount($data);\n\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testExample()\n\t{\n\t\t$factory->define(App\\User::class, function (Faker\\Generator $faker)\n\t\t{\n\t\t// \treturn [\n\t\t// \t\t'email' => $faker->email,\n\t\t// \t\t'name' => ,\n\t\t// \t\t'gmail_token' => ,\n\t\t// \t\t'created_at' => ,\n\t\t// \t\t'track_email' => 'yes',\n\t\t// \t\t'timezone' => 'America/New_York',\n\t\t// \t\t'referer' => '',\n\n\t\t// \t\t'paid' => 'yes',\n\t\t// \t\t'belongs_to' => ,\n\n\t\t// \t\t//admin?\n\t\t// \t];\n\t\t// });\n\n\t\t// factory(App\\Customer::class, 5)->create();\n\t\t// factory(App\\Email::class, 5)->create();\n\t\t// factory(App\\Message::class, 5)->create();\n\t\t// factory(App\\User::class, 5)->create();\n\n\t\t//post tests\n\t\t// $this->call('POST', '/returnFields', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/createTemplate', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/makePreviews', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/updatePreviews', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/saveSettings', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/upgrade', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/createTeam', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/useLicense', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/saveTemplate', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/copyTemplate', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/sendFeedback', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/revokeAccess', ['name' => 'Taylor'])->assertResponseOk();\n\t\t// $this->call('POST', '/updateSubscription/{direction}', ['name' => 'Taylor'])->assertResponseOk();\n\n\t\t//get tests\n\t\t// $this->visit('/archive/{id}')->assertResponseOk();\n\t\t// $this->visit('/dearchive/{id}')->assertResponseOk();\n\t\t// $this->visit('/hubify/{id}/{status}')->assertResponseOk();\n\t\t// $this->visit('/sendEmail/{email_id}/{message_id}')->assertResponseOk();\n\n\t}\n}", "public function testCreationFailsWithoutUserInfo()\n {\n $cleanPDO = new cleanPDO([\n 'dbname'=>'unit_test'\n ]);\n }", "public function testSubuserWithExcessivelyLongEmailCannotBeCreated()\n {\n [$user, $server] = $this->generateTestAccount();\n\n $email = str_repeat(Str::random(20), 9) . '1@gmail.com'; // 191 is the hard limit for the column in MySQL.\n\n $response = $this->actingAs($user)->postJson($this->link($server) . '/users', [\n 'email' => $email,\n 'permissions' => [\n Permission::ACTION_USER_CREATE,\n ],\n ]);\n\n $response->assertOk();\n\n $response = $this->actingAs($user)->postJson($this->link($server) . '/users', [\n 'email' => $email . '.au',\n 'permissions' => [\n Permission::ACTION_USER_CREATE,\n ],\n ]);\n\n $response->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY);\n $response->assertJsonPath('errors.0.detail', 'The email must be between 1 and 191 characters.');\n $response->assertJsonPath('errors.0.meta.source_field', 'email');\n }", "public function testGenerateAddressAuthCodeById()\n {\n\n }", "public function test_calledCreateMethod_withValidParameters_argumentsHasBeenSetted()\n {\n $dataContainerMock = $this->getDataConteinerMock();\n\n $sut = DataWrapper::create(\n 200,\n \"Ok\",\n \"copyright\",\n \"attribution text\",\n \"attribution HTML\",\n $dataContainerMock,\n \"etag\"\n );\n\n $this->assertEquals(200, $sut->getCode());\n $this->assertEquals(\"Ok\", $sut->getStatus());\n $this->assertEquals(\"copyright\", $sut->getCopyright());\n $this->assertEquals(\"attribution text\", $sut->getAttributionText());\n $this->assertEquals(\"attribution HTML\", $sut->getAttributionHTML());\n $this->assertEquals(\"etag\", $sut->getEtag());\n }", "public function testCreateNotaEspelhoPatrimonio()\n {\n }", "public function create()\n\t{\n\t\treturn $this->fail(lang('RESTful.notImplemented', ['create']), 501);\n\t}", "public function testCustomerPaymentMethodCreateCustomerPaymentMethod()\n {\n }", "public function testCreateUser()\n {\n }", "public function testCreatePatrimonio()\n {\n }", "public function testParticipantsPost()\n {\n }", "function evel_construct_email($spec) {\n global $evel_client;\n $params = func_get_args();\n $result = $evel_client->call('EvEl.construct_email', $params);\n return $result;\n}", "public function testCreateIdentity()\n {\n }", "public function testUserCanCreated()\n {\n $user = factory(App\\UserMongo::create([\n \t'first_name' => 'agus',\n \t'last_name' => 'yusida',\n \t'email' => 'agusyusida@gmail.com',\n \t]));\n \t$this->seeInDatabase('users',[\n \t\t'first_name' => 'agus',\n \t'last_name' => 'yusida',\n \t'email' => 'agusyusida@gmail.com',\n \t\t]);\n }", "public function testFailNoCustomerNoForAccountUpdate()\n {\n $config = new SinglePayConfig();\n $config->setServiceConfig(self::$testConfig);\n\n $data = new SinglePayData();\n $data->setExtras(array(\n 'method' => 'create'\n ));\n\n $transactionSetup = ExpressFactory::buildTransactionSetup($config, $data);\n }", "public function testCanCreateCourse()\n {\n \n $response = $this->call('POST', '/course', [\n 'name' => 'Kursur PHP Advance',\n 'level' => 'Beginner',\n 'benefit' => 'Bisa membuat website sendiri'\n ]);\n $this->assertEquals(201, $response->status());\n }", "public function testCustomerInvoicesV2SendEmail()\n {\n }", "public function testCreatingContactWithEmptyTokenIdFails(): void\n {\n // Creates expectation.\n $this->expectException(\\InvalidArgumentException::class);\n\n // Create random attributes.\n $attributes = [\n 'user_id' => $this->faker->numberBetween(),\n 'token_id' => ' ',\n 'revoked' => $this->faker->boolean,\n 'expires_at' => $this->faker->dateTimeBetween('+10 days', '+20 days')->format('Y-m-d H:i:s'),\n ];\n\n // Performs test.\n new AccessToken($attributes);\n }", "public function test_crear_proceso_campos_vacios()\n {\n Artisan::call('migrate:fresh');\n Artisan::call('db:seed');\n \n $user = factory(User::class)->create();\n $this->actingAs($user);\n\n $result = $this->post(route('procesos.store'),['nombre'=>'','codigo'=>'']);\n\n $result->assertSessionHasErrors();\n }", "public function testCreaSolicitud($me_solicitud)\n\t{\n\t\t$id_version = 34;\n\t\t$id_proceso = 43;\n\t\t$edf = 1;\n\t\t$fecha = '2016-09-13';\n\t\t$jornadas = 2;\n\t\t$lab_actual = 0;\n\t\t$observacion = 'prueba desd el modelo '.time();\n\t\t$id_solicitud = $me_solicitud->crearSolicitud($id_version, $id_proceso, $edf, $fecha, $jornadas, $lab_actual, $observacion);\n\t\t$this->assertNotFalse($id_solicitud);\n\t\treturn $id_solicitud;\n\t}", "public function testParticipantsMePut()\n {\n }", "public function testChannelsInvite()\n {\n }", "public function testPointsCanSendByOnlyAuthorizedUsers()\n {\n $this->model = new \\app\\models\\SendForm([\n 'receiverName' => 'demo',\n 'amount' => 100\n ]);\n\n \\Yii::$app->user->identity = null;\n expect_not($this->model->validate());\n expect($this->model->errors)->hasKey('receiverName');\n }", "public function testCreateUnsuccessfulReason()\n {\n }", "public function testRequestEnrollment()\n {\n }", "public function test_create_user_success()\n {\n if( User::where('email',$this->email)->exists()){\n User::where('email',$this->email)->delete();\n }\n $response = $this->json('POST', '/user_create',\n [\n 'name' => $this->name,\n 'email' => $this->email,\n 'password' => $this->password]);\n $response\n ->assertStatus(200)\n ->assertExactJson([\n $this->all_message => $this->user_create_success,\n ]);\n }", "public function testQuarantineCreateChangeStreamPostQuarantinesChangeStream()\n {\n\n }", "public function create()\n {\n $this->sesClient->verifyEmailIdentity(\n [\n 'EmailAddress' => $this->identity->getIdentity(),\n ]\n );\n }", "public function testCreateClientWithoutName() {\n\n $this->withoutMiddleware();\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->post('/clients/create', ['phone' => '0725433317'])\n ->seeJson(['success' => false]);\n\n }", "public function test_create_calledTwoTimes_resultShouldDifferent()\n {\n $expected = CastilloTicketId::create();\n $actual = CastilloTicketId::create();\n $this->assertNotEquals($expected,$actual);\n }", "public function testLinkCustomersToCertificate()\n {\n }", "public function testRefuseCreation()\n {\n $newActor = new \\eddie\\Models\\Actor();\n $newActor->save();\n }", "public function testContractorWithNewOrganisation()\n {\n\t\t$faker = \\Faker\\Factory::create('en_GB');\n\t\t$faker->seed(10060); // Seed\n\t\t$company = array();\n\t\t$company['name'] = $faker->company;\n\t\t$company['phone'] = $faker->phoneNumber;\n\t\t$company['email'] = $faker->email;\n\t\t$company['website'] = $faker->url;\n\t\t$company['address'] = $faker->streetAddress;\n\t\t$company['postcode'] = $faker->postcode;\n\t\t$company['town'] = $faker->city;\n\n\t\t$faker->seed(10070); // Seed\n\t\t$contact = array();\n\t\t$contact['name'] = $faker->firstName;\n\t\t$contact['surname'] = $faker->lastName;\n\t\t$contact['email'] = $faker->email;\n\t\t$contact['landline'] = $faker->phoneNumber;\n\t\t$contact['mobile'] = $faker->phoneNumber;\n\n\t\t$faker->seed(10071); // Seed\n\t\t$areas = array();\n\t\t$areas[] = array('postcode' => $faker->postcode);\n\t\t$areas[] = array('postcode' => $faker->postcode);\n\t\t$areas[] = array('postcode' => $faker->postcode);\n\t\t$areas[] = array('postcode' => $faker->postcode);\n\n \t$this->loginAs('admin');\n\n\t\t$this->webDriver->wait(10,500)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::id('btn-add-contact')\n\t\t )\n\t\t);\n\n\t\t// Click in btn-add-contact\n\t\t$btnAddContact = $this->webDriver->findElement(\\WebDriverBy::id('btn-add-contact'))->click();\n\n\t\t$this->webDriver->wait(100)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::id('choose_contact_type')\n\t\t )\n\t\t);\n\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('choose_contact_type'))->findElement(\\WebDriverBy::cssSelector(\"option[value='3']\"))->click();\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::id('btn-save-contractor')\n\t\t )\n\t\t);\n\n\t\t// Create organisation\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('a.btn:nth-child(2)'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::id('organisation_name')\n\t\t )\n\t\t);\n\n\t\tsleep(1);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_type'))->findElement(\\WebDriverBy::cssSelector(\"option[value='2']\"))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_name'))->clear()->sendKeys($company['name']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_phone'))->clear()->sendKeys($company['phone']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_email'))->clear()->sendKeys($company['email']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_website'))->clear()->sendKeys($company['website']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_address'))->clear()->sendKeys($company['address']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_postcode'))->clear()->sendKeys($company['postcode']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('organisation_town'))->clear()->sendKeys($company['town']);\n\n\t\t// Save organisation\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('button.btn-success'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::id('contact_title')\n\t\t )\n\t\t);\n\n\t\tsleep(1);\n\n\t\t// Resto de campos\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_title'))->findElement(\\WebDriverBy::cssSelector(\"option[value='2']\"))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_name'))->sendKeys($contact['name']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_surname'))->sendKeys($contact['surname']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_email'))->sendKeys($contact['email']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_landline'))->sendKeys($contact['landline']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_mobile'))->sendKeys($contact['mobile']);\n\n\t\t$this->webDriver->findElement(\\WebDriverBy::xpath(\"//label[contains(text(),'General')]\"))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::xpath(\"//label[contains(text(),'Electrician')]\"))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::xpath(\"//label[contains(text(),'Decorator')]\"))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::xpath(\"//input[@name='contact[require_certification]' and @value=0]\"))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::xpath(\"//input[@name='contact[liability_insurance]' and @value=1]\"))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_status'))->findElement(\\WebDriverBy::cssSelector(\"option[value='1']\"))->click();\n\n\t\t// Editar Areas\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('btn-start-edit-areas'))->click();\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::cssSelector('a.btn-success:nth-child(2)')\n\t\t )\n\t\t);\n\n\t\t// Area #1\n\t\tsleep(1); // wait for knockout\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('.area-distance > option:nth-child(2)'))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('.area-postcode'))->sendKeys($areas[0]['postcode']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-1 > div:nth-child(2) > div:nth-child(1) > a:nth-child(2)'))->click();\n\n\t\t// Area #2\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('btn-new-area'))->click();\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::cssSelector('#area-2 > div:nth-child(2) > div:nth-child(1) > a:nth-child(2)')\n\t\t )\n\t\t);\n\t\tsleep(1); // wait for knockout\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-2 > div:nth-child(1) > div:nth-child(4) > select:nth-child(1) > option:nth-child(3)'))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-2 > div:nth-child(1) > div:nth-child(5) > input:nth-child(1)'))->sendKeys($areas[1]['postcode']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-2 > div:nth-child(2) > div:nth-child(1) > a:nth-child(2)'))->click();\n\n\t\t// Area #3\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('btn-new-area'))->click();\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::cssSelector('#area-3 > div:nth-child(2) > div:nth-child(1) > a:nth-child(2)')\n\t\t )\n\t\t);\n\t\tsleep(1); // wait for knockout\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-3 > div:nth-child(1) > div:nth-child(4) > select:nth-child(1) > option:nth-child(3)'))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-3 > div:nth-child(1) > div:nth-child(5) > input:nth-child(1)'))->sendKeys($areas[2]['postcode']);\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-3 > div:nth-child(2) > div:nth-child(1) > a:nth-child(2)'))->click();\n\n\t\t// Area #4\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('btn-new-area'))->click();\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::cssSelector('#area-4 > div:nth-child(2) > div:nth-child(1) > a:nth-child(2)')\n\t\t )\n\t\t);\n\t\tsleep(1); // wait for knockout\n\n\t\t// Stop edit areas\n\t\t$this->stopEditAreas();\n\n\t\t$message = $this->webDriver->findElement(\\WebDriverBy::cssSelector('#modal-message > div:nth-child(1) > div:nth-child(1) > div:nth-child(2)'));\n\t\t$this->assertContains('There are unsaved changes. Please, save all the areas before continue.', $message->getText());\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('modal-box-btn-close'))->click();\n\n\t\t$this->webDriver->wait(10,500)->until(\n\t\t \\WebDriverExpectedCondition::invisibilityOfElementLocated(\n\t\t \\WebDriverBy::id('modal-message')\n\t\t )\n\t\t);\n\n\t\t$this->webDriver->wait(10,500)->until(\n\t\t\t\\WebDriverExpectedCondition::elementToBeClickable(\n\t\t\t\\WebDriverBy::cssSelector('#area-4 > div:nth-child(2) > div:nth-child(1) > a:nth-child(1)')\n\t\t\t)\n\t\t);\n\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#area-4 > div:nth-child(2) > div:nth-child(1) > a:nth-child(1)'))->click();\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#btn-stop-edit-areas'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t\t\\WebDriverExpectedCondition::elementToBeClickable(\n\t\t\t\\WebDriverBy::id('btn-save-contractor')\n\t\t\t)\n\t\t);\n\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('btn-save-contractor'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::id('btn-add-contact')\n\t\t )\n\t\t);\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::className('alert-success')\n\t\t )\n\t\t);\n\n\t\t$message = $this->webDriver->findElement(\\WebDriverBy::className('alert-success'));\n\n $this->assertContains('Congrats! The contact was created successfully', $message->getText());\n\n sleep(1); // reload table\n\n\t\t/**************************/\n /*** \tVerify record */\n /**************************/\n $this->assertContains($contact['name'], $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(2)\"))->getText());\n $this->assertContains($contact['surname'], $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(3)\"))->getText());\n\n\n // Verify show view\n $this->webDriver->findElement(\\WebDriverBy::cssSelector('#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(8) > div:nth-child(1) > a:nth-child(1)'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::cssSelector('div.pull-right:nth-child(1) > a:nth-child(1)')\n\t\t )\n\t\t);\n\n\t\t$this->assertContains($contact['email'], $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#contact-details-fieldset > div:nth-child(2) > div:nth-child(2)\"))->getText());\n\t\t$this->assertContains($company['address'], $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#address-fieldset > div:nth-child(2) > div:nth-child(2)\"))->getText());\n\t\t$this->assertContains('Unapproved', $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#administration-fieldset > div:nth-child(2) > div:nth-child(2)\"))->getText());\n\n\t\t$this->assertContains('General', $this->webDriver->findElement(\\WebDriverBy::cssSelector(\".form-horizontal > fieldset:nth-child(6) > div:nth-child(2)\"))->getText());\n\t\t$this->assertContains('Decorator', $this->webDriver->findElement(\\WebDriverBy::cssSelector(\".form-horizontal > fieldset:nth-child(6) > div:nth-child(2)\"))->getText());\n\t\t$this->assertContains('Electrician', $this->webDriver->findElement(\\WebDriverBy::cssSelector(\".form-horizontal > fieldset:nth-child(6) > div:nth-child(2)\"))->getText());\n\n\t\t// go to index\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('div.pull-right:nth-child(1) > a:nth-child(1)'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::cssSelector('#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(8) > div:nth-child(1) > a:nth-child(2)')\n\t\t )\n\t\t);\n\n\t\t// Verify edit view\n\t\t$this->webDriver->findElement(\\WebDriverBy::cssSelector('#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(8) > div:nth-child(1) > a:nth-child(2)'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::id('btn-save-contractor')\n\t\t )\n\t\t);\n\n\t\t// Change status\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('contact_status'))->findElement(\\WebDriverBy::cssSelector(\"option[value='2']\"))->click();\n\n\t\t// Save & verify\n\t\t$this->webDriver->findElement(\\WebDriverBy::id('btn-save-contractor'))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::id('btn-add-contact')\n\t\t )\n\t\t);\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::className('alert-success')\n\t\t )\n\t\t);\n\n\t\t$message = $this->webDriver->findElement(\\WebDriverBy::className('alert-success'));\n\n $this->assertContains('Congrats! The contact was updated successfully', $message->getText());\n\n // Verify new status\n $this->assertContains('Pending Approval', $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(5)\"))->getText());\n\n // Click delete\n $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(8) > div:nth-child(1) > a:nth-child(3)\"))->click();\n\n\t\t$this->webDriver->wait(10,500)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::id('modal-message')\n\t\t )\n\t\t);\n\n\t\t$this->webDriver->wait(10,500)->until(\n\t\t \\WebDriverExpectedCondition::elementToBeClickable(\n\t\t \\WebDriverBy::id('btn-delete-contact')\n\t\t )\n\t\t);\n\n // Verify name in popup delete\n $this->assertContains(\"{$contact['name']} {$contact['surname']}\", $this->webDriver->findElement(\\WebDriverBy::cssSelector(\".text-center\"))->getText());\n\n // Delete record\n $this->webDriver->findElement(\\WebDriverBy::cssSelector(\"#btn-delete-contact\"))->click();\n\n\t\t$this->webDriver->wait(10)->until(\n\t\t \\WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(\n\t\t \\WebDriverBy::cssSelector('.alert')\n\t\t )\n\t\t);\n\n\t\tsleep(1); // Wait popup is loaded\n\n\t\t$this->assertContains('Congrats! The contact was deleted successfully', $this->webDriver->findElement(\\WebDriverBy::cssSelector(\".alert\"))->getText());\n\n\t\tsleep(1); // wait table reload\n\n\t\t$elements = $this->webDriver->findElements(\\WebDriverBy::cssSelector(\"#table-javascript > tbody:nth-child(2) > tr:nth-child(13) > td:nth-child(1)\"));\n\n\t\t// Verify record doesn't exist in table.\n\t\t$this->assertCount(0, $elements);\n\n }" ]
[ "0.6802849", "0.6537524", "0.64769465", "0.64532065", "0.6296269", "0.61695564", "0.6125048", "0.6089019", "0.60516536", "0.602815", "0.6021496", "0.5986568", "0.59795356", "0.5977144", "0.5974034", "0.5964491", "0.5945142", "0.5940745", "0.59194815", "0.5912024", "0.5876557", "0.58700484", "0.58488595", "0.58283174", "0.58201647", "0.5820042", "0.5819581", "0.581423", "0.5813121", "0.5812988", "0.58103526", "0.58074486", "0.57940453", "0.5793369", "0.57867396", "0.5765381", "0.5762747", "0.5762726", "0.57617795", "0.57542694", "0.57355195", "0.5733851", "0.572782", "0.5727503", "0.57263356", "0.57224673", "0.57212275", "0.5718871", "0.57143694", "0.5700326", "0.5700285", "0.5683942", "0.56785333", "0.56708753", "0.56666", "0.56664026", "0.565858", "0.5658412", "0.565041", "0.5649292", "0.5642163", "0.5625691", "0.56252205", "0.56232", "0.56222945", "0.5620396", "0.56195986", "0.5619382", "0.56091726", "0.5605144", "0.56032425", "0.5598713", "0.5596464", "0.5594103", "0.5587263", "0.55857843", "0.55805826", "0.5577699", "0.5569969", "0.55667895", "0.5565509", "0.5564995", "0.55589175", "0.555557", "0.55512345", "0.55499494", "0.55466354", "0.5543693", "0.55432403", "0.5537795", "0.55375427", "0.5537197", "0.5536934", "0.553452", "0.5527535", "0.552571", "0.5519274", "0.5516277", "0.5511534", "0.5495623" ]
0.7950649
0
Get a new identifier
Получить новый идентификатор
public function newIdentifier(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNewId();", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "public function getIdentifier();", "abstract public function getIdentifier();", "public abstract function getIdentifier();", "function getIdentifier();", "function getIdentifier();", "public function getIdentifier()\n {\n }", "public function intGetNewId() {\n $this->XaoThrow(\n \"_EntBase::Build(): This entity does not implement retrieval of a \".\n \"new numeric identifier as a descrite function. It may not be \" .\n \"applicable.\"\n , debug_backtrace()\n );\n }", "function getIdentifier() ;", "function getIdentifier() ;", "function getIdentifier() ;", "public function getIdentifier(): string;", "public function getIdentifier(): string;", "public function getIdentifier()\n {\n // TODO: Implement getIdentifier() method.\n }", "public static abstract function getIdentifier() : string;", "public function getIdentifier()\n {\n return 1;\n }", "public function getId(): Identifier;", "public function getIdentifier(): mixed;", "abstract public function getIdent();", "public function getIdentifier()\n {\n return new Identifier(self::IDENTIFIER);\n }", "public function __newID() {\n\t\treturn ('#'.$this->_fieldid);\n\t}", "public function getUniqueObjectIdentifier();", "public function getIdentifier(): string|int;", "protected function getNewID()\n {\n $ids = [];\n $namedIds = [];\n foreach (static::$ids as $k) {\n // attempt use the supplied value if the ID property is mutable\n $property = static::getProperty($k);\n if (in_array($property['mutable'], [self::MUTABLE, self::MUTABLE_CREATE_ONLY]) && isset($this->_unsaved[$k])) {\n $id = $this->_unsaved[$k];\n } else {\n $id = self::$driver->getCreatedID($this, $k);\n }\n\n $ids[] = $id;\n $namedIds[$k] = $id;\n }\n\n $this->_id = implode(',', $ids);\n $this->_ids = $namedIds;\n }", "public function obtenerID();", "public function determineId() {}", "public function getIdentifier()\n {\n return new Identifier($this->code);\n }", "public function getIdentifier(): string\n {\n return $this->identifier;\n }", "public function getIdentifier(): string\n {\n return $this->identifier;\n }", "public function getIdentifier(): string\n {\n return $this->identifier;\n }", "function getID();", "public function obtenerId() {}", "abstract public function get_id();", "public function getIdentifier()\n {\n return $this->id;\n }", "public function newId()\n {\n return md5(microtime());\n }", "public function getIdentifierField();", "public function getIdentifier() {\n\n\t\treturn parent::getIdentifier() . '_' . parent::getValue();\n\t}", "function generateNewId(){\n\t\t$id = null;\n\t\t//while ( $this->getSessionData($id) !== null ){\n\t\t\t$id = rand(0,100000);\n\t\t//}\n\t\treturn $id;\n\t}", "public function getID();", "public function getID();", "public function getID();", "public function getIdentifier() : string\n\t{\n\t\treturn $this->identifier;\n\t}", "public function getIdentifier() : string\n\t{\n\t\treturn $this->identifier;\n\t}", "protected function getInstanceIdentifier() {}", "function getId();", "public function getID() : string;", "public function getIdentifier(): string\n {\n return self::IDENTIFIER;\n }", "public function getIdentifier(): string\n {\n return self::IDENTIFIER;\n }", "abstract public function identifier(): string;", "function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n\t{\n\t\treturn $this->identifier;\n\t}", "public function identifier()\n {\n return $this->id;\n }", "public function getID(): string;", "public function newid($str = 'id')\n {\n $this->idgen += 1;\n return $str.$this->idgen;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function getIdentifier()\n {\n return $this->identifier;\n }", "public function get_identifier() {\n return $this->identifier;\n }", "public function getIdentifier() {\n\t\treturn $this->identifier;\n\t}", "abstract public function getUniqueId();", "public function GetId () ;", "function getIdentifier()\n {\n return $this->_identifier;\n }", "public function getIdentifier()\n {\n return $this->_identifier;\n }", "public function getIdentifier()\n {\n return $this->_identifier;\n }", "public function getIdentifier()\n {\n return $this->_identifier;\n }", "public function getIdentifier()\n {\n return $this->_identifier;\n }", "public function get_id();", "public function get_id();", "public function getIdentifier()\n {\n\n return $this->identifier;\n\n }", "public function createCompositeIdentifier()\n {\n $itemId = $this['id'];\n \n return $itemId;\n }", "public function createCompositeIdentifier()\n {\n $itemId = $this['id'];\n \n return $itemId;\n }", "public function getIdentifier()\n {\n return $this->slug ?: $this->id;\n }", "public function createID()\n {\n $myID = new \\MongoID();\n\n return (string) $myID;\n }", "public function getIdentifier() {\n return $this->identifier;\n }", "public function getIdentifier() {\n return $this->identifier;\n }", "abstract function getId();" ]
[ "0.80312693", "0.8014722", "0.8014218", "0.8014218", "0.8014218", "0.8014218", "0.8014218", "0.80135", "0.80135", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7962092", "0.7954783", "0.7890156", "0.7890156", "0.7722734", "0.7710018", "0.7702121", "0.7702121", "0.7699496", "0.76342916", "0.76342916", "0.7531337", "0.74982566", "0.7467266", "0.7407107", "0.7405491", "0.72461396", "0.72292125", "0.7194488", "0.71733457", "0.7161101", "0.7160368", "0.71478957", "0.71419245", "0.71044666", "0.7090671", "0.7090671", "0.7090671", "0.70876616", "0.70635897", "0.7049167", "0.702084", "0.70059663", "0.6973718", "0.6965296", "0.69428504", "0.6934931", "0.6934931", "0.6934931", "0.69327796", "0.69327796", "0.69140506", "0.69107616", "0.6910476", "0.68873346", "0.68873346", "0.6876023", "0.6870584", "0.6859126", "0.68467265", "0.6843085", "0.68398446", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68304384", "0.68301326", "0.6827191", "0.68099076", "0.6797762", "0.67810374", "0.6778854", "0.6778854", "0.6778854", "0.6778854", "0.6774558", "0.6774558", "0.67646176", "0.6749305", "0.6749305", "0.67353517", "0.67296046", "0.67239535", "0.67239535", "0.6720169" ]
0.84006816
0
Add a version Mark this version as upgrade
Добавить версию Отметить эту версию как обновление
public function add(string $version);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_version() {\n $installed = get_option( 'wd_academy_installed' );\n if ( $installed ) {\n update_option( 'wd_academy_installed', time() );\n }\n update_option( 'wd_academy_version', WD_ACADEMY_VERSION );\n }", "public function upgrade () {\r\n }", "protected function incrementVersion(): void\n {\n $version = $this->getVersion() + 1;\n\n $this->store->forever($this->getCacheVersionKey(), $version);\n\n static::$versions[$this->prefix] = $version;\n }", "public function setVersion($version) {}", "public function setVersion($version) {}", "protected function whenNewVersionWasRequested()\n {\n }", "function add_new_version( $version ) {\n\t$sql = \"INSERT INTO movie_versions (version_name) VALUES (\".\n\t\t\tformat_sql( $version ) . \n\t\t\t\")\";\n\t//echo $sql;\n\t$res = mysql_query( $sql );\n\tif ( $res ) {\n\t\treturn TRUE;\n\t} else {\n\t\treturn FALSE;\n\t}\n}", "public function setVersion($version);", "public function setVersion($version);", "public function setVersion($version);", "public function setVersion($version);", "public function setVersion($version);", "protected function _upgrade()\n {\n $this->helper->pluginBroker->callHook(\n 'upgrade', array('old_version' => self::$oldVersion), 'Neatline'\n );\n }", "public function setVersion(string $version);", "public function registerVersion() {\n $this->loadModel('Versions');\n $result = $this->Versions->newEntity();\n if ($this->request->is('post') || $this->request->is('put')) {\n $this->Versions->patchEntity($result, $this->request->data(), [\n 'validate' => 'adminAdd'\n ]);\n if ($this->Versions->save($result)) {\n $this->redirect(array('controller' => 'users', 'action' => 'version'));\n }\n }\n $this->set(compact('result'));\n }", "public function prependVersion(Version $version)\n {\n array_unshift($this->versions, $version);\n }", "private function _log_version_number () {\n update_option( $this->_token . '_version', $this->_version );\n }", "public function setVersion($version) {\n throw new \\BadFunctionCallException('Cannot set version number of graded version');\n }", "public function upgrade( $installed_version ) {\n\n\t\t$this->installed_version = $installed_version;\n\n\t\tadd_action( 'woocommerce_after_register_taxonomy', array( $this, 'delayed_upgrade' ) );\n\t}", "private function _log_version_number () {\n\t\tupdate_option( $this->_token . '_version', $this->_version );\n\t}", "protected function upgrade() {\r\n\t\tif (!$version = $this->ci->options->get('gw_users_version', false)) {\r\n\t\t\t$this->setup();\r\n\t\t}\r\n\t}", "private function setVersion($v){\n\t\t$this->version = $v;\n\t}", "public function upgrade($old_version)\r\n\t{\r\n\t\t// Upgrade Logic\r\n\t\treturn true;\r\n\t}", "public function addComponentToCheck($name, $version)\n {\n $this->componentsToCheck[$name] = $version;\n }", "public function upgrade(){\n \n global $DB;\n \n $return = true;\n $version = $this->version; # This is the current DB version we will be using to upgrade from \n\n \n if ($version < 2013102401)\n {\n \n $DB->insert_record(\"lbp_plugin_report_elements\", array(\"pluginid\" => $this->id, \"getstringname\" => \"reports:bcgt_target_grades:aspgrades\", \"getstringcomponent\" => \"block_bcgt\"));\n $this->version = 2013102401;\n $this->updatePlugin();\n \\mtrace(\"## Inserted plugin_report_element data for plugin: {$this->title}\");\n \n }\n \n if ($version < 2014012402)\n {\n $DB->insert_record(\"lbp_plugin_report_elements\", array(\"pluginid\" => $this->id, \"getstringname\" => \"reports:bcgt_target_grades:percentwithaspgrades\", \"getstringcomponent\" => \"block_bcgt\"));\n $this->version = 2014012402;\n $this->updatePlugin();\n \\mtrace(\"## Inserted plugin_report_element data for plugin: {$this->title}\");\n }\n \n \n return $return; # Never actually seems to change..\n \n \n }", "public function increment($var,$version)\n {\n $this->redis->set($var,$version);\n }", "public function setVersion($name) {\n\n // Take what is the $current variable and copy it into an entry in\n // the versions variable.\n $this->versions[$name] = $this->current;\n }", "public function updateDatabase($version) {\n\t\t$installedVersion = get_option(UserAgentThemeSwitcherData::VERSION_KEY, 0);\n\n\t\tif($installedVersion == 0) {\n\t\t\t$this->createDatabase($version);\n\t\t}\n\n\t\tif($installedVersion != $version) {\n\t\t\tif($version != 0) {\n\t\t\t\tadd_option(UserAgentThemeSwitcherData::VERSION_KEY, $version);\n\t\t\t}\n\t\t}\n\t}", "function updateVersion() {\n\t\tif ($this->newVersion->compare($this->currentVersion) > 0) {\n\t\t\t$versionDao =& DAORegistry::getDAO('VersionDAO');\n\t\t\tif (!$versionDao->insertVersion($this->newVersion)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$result = true;\n\t\tHookRegistry::call('Installer::updateVersion', array(&$this, &$result));\n\n\t\treturn $result;\n\t}", "public function setVersion($version)\n {\n $this->version = $version;\n }", "function generator_decla_upgrade($nom_meta_base_version, $version_cible) {\n\t\n\t$maj = array();\n\n\tinclude_spip('base/upgrade');\n\tmaj_plugin($nom_meta_base_version, $version_cible, $maj);\n}", "public function setVersion($version) {\n\t\t$this->version = $version;\n\t}", "protected function assignVersion()\n {\n\n }", "public function setNewVersion()\n {\n $difference = '9223372036854775806';\n $rand_percent = bcdiv(mt_rand(), mt_getrandmax(), 12);\n $version = bcmul($difference, $rand_percent, 0);\n $this->owner->setAttribute($this->versionField, $version);\n }", "public function upgrade() {\n//\t\tupdate it's database table, you will need to run this:\n//\t\t\n//\t\t$est = AttributeType::getByHandle('attribute_handle');\n//\t\t$path = $est->getAttributeTypeFilePath(FILENAME_ATTRIBUTE_DB);\n//\t\tPackage::installDB($path);\n\n\t\tparent::upgrade();\n\t\t//$pkg = Package::getByHandle($this->pkgHandle);\n\t\t//$this->installAdditionalPageAttributes($pkg);\n\t}", "public function hookUpgrade($args) {\n\t\t$oldVersion = $args['old_version'];\n $newVersion = $args['new_version'];\n $doMigrate = false;\n\n $versions = array();\n foreach (glob(IIIF_API_BRIDGE_DIRECTORY . '/libraries/IiifApiBridge/Migration/*.php') as $migrationFile) {\n $className = 'IiifApiBridge_Migration_' . basename($migrationFile, '.php');\n include $migrationFile;\n $versions[$className::$version] = new $className();\n }\n uksort($versions, 'version_compare');\n\n foreach ($versions as $version => $migration) {\n if (version_compare($version, $oldVersion, '>')) {\n $doMigrate = true;\n }\n if ($doMigrate) {\n $migration->up();\n if (version_compare($version, $newVersion, '>')) {\n break;\n }\n }\n }\n\t}", "public function setVersion($value){\n $this->version = $value;\n }", "public function addCheckingForUpdate() {\n global $laterpay_version;\n\n if ( get_option('laterpay_version') != $laterpay_version ) {\n $this->activate();\n }\n }", "public function setVersion(string $version): void\n {\n $this->version = $version;\n }", "public function setVersion($version)\n {\n $this->version = $version;\n }", "public function setVersion($version)\n {\n $this->version = $version;\n }", "public function setVersion($version)\n {\n $this->version = $version;\n }", "public function wd_se_activate() {\n\t\t$install_date = get_option( 'wd_se_install_date', time() );\n\n\t\tif( ! $install_date ) {\n\t\t\tupdate_option( 'version', WD_SE_RELEASE_NUMBER );\n\t\t}\n\t}", "private function setNewModuleVersionNumber( $version )\n {\n $sql = \"UPDATE {$this->config->dbTablePrefix}common_module\n SET\n `version`='{$version}'\n WHERE\n `name`='keyword'\";\n\n $this->model->dba->query($sql);\n }", "public function action_update_check()\n\t{\n\t\tUpdate::add( $this->info->name, '9bfb17aa-f8f0-4638-a549-af4f86a9d412', $this->info->version );\n\t}", "public function upgrade($version)\n {\n if (version_compare($version, '1.1.0', '<')) {\n $updator = new Updator110($this->handler);\n $result = $updator->upgrade($version);\n if (false === $result) {\n return $result;\n }\n }\n if (version_compare($version, '1.2.2', '<')) {\n $updator = new Updator122($this->handler);\n $result = $updator->upgrade($version);\n if (false === $result) {\n return $result;\n }\n }\n if (version_compare($version, '1.3.0', '<')) {\n $updator = new Updator130($this->handler);\n $result = $updator->upgrade($version);\n if (false === $result) {\n return $result;\n }\n }\n if (version_compare($version, '1.3.1', '<')) {\n $updator = new Updator131($this->handler);\n $result = $updator->upgrade($version);\n if (false === $result) {\n return $result;\n }\n }\n \n if (version_compare($version, '1.3.2', '<')) {\n $updator = new Updator132($this->handler);\n $result = $updator->upgrade($version);\n if (false === $result) {\n return $result;\n }\n }\n $result = $this->from133($version);\n\n return $result;\n }", "function do_core_upgrade($reinstall = \\false)\n {\n }", "public function upgrade($oldversion)\n {\n switch ($oldversion)\n {\n case '2.0':\n // Module variables initialisation\n ModUtil::setVar('ShoutIt', 'shoutit_refresh_rate', '10');\n \n // Register hook\n HookUtil::registerSubscriberBundles($this->version->getHookSubscriberBundles());\n }\n return true;\n }", "public function upgrade($oldversion)\n {\n // Update successful\n return true;\n }", "public function setVersion(Version $version): void\n {\n $this->version = $version;\n }", "public function setVersion(?string $value): void {\n $this->getBackingStore()->set('version', $value);\n }", "public function setVersion(?string $value): void {\n $this->getBackingStore()->set('version', $value);\n }", "public function addNewVersion($module, $version, $desc = '')\n {\n $id = $this->getQueueId($module);\n if ($id === false) {\n throw new Horde_Exception('Unable to locate requested queue');\n }\n\n $method = 'tickets.addVersion';\n $params = array($id, $version, $desc);\n try {\n $res = Horde_Rpc::request('jsonrpc', $this->_params['url'], $method, $this->_http, $params);\n } catch (Horde_Http_Client_Exception $e) {\n throw new Horde_Exception_Wrapped($e);\n }\n }", "public function updateVersion(string $extension, ?string $version): void\n {\n $this->set(\"{$extension}/version\", $version);\n $this->updateHistory($extension, $version);\n }", "public function install () {\n\t\t$this->_log_version_number();\n\t}", "public function setVersion($version)\n\t{\n\t\t$this->version = (int) $version;\n\t}", "public function addCoreUpdateVersion($updates){\n global $wp_version;\n\n if($updates === false){\n return;\n }\n\n $newVersion = get_option('svc_upgrade_version');\n\n //no version was set so don't attempt to change to custom version\n if($newVersion < 1) {\n return $updates;\n }\n\n //we don't need to add a new version if they match\n if (version_compare( $wp_version, $newVersion ) == 0) {\n return $updates;\n }\n\n $url = \"https://downloads.wordpress.org/release/en_GB/wordpress-{$newVersion}.zip\";\n\n $updates->updates[0]->download = $url;\n $updates->updates[0]->packages->full = $url;\n $updates->updates[0]->packages->no_content = '';\n $updates->updates[0]->packages->new_bundled = '';\n $updates->updates[0]->current = $newVersion;\n\n return $updates;\n }", "private function setNewModuleVersionNumber( $version )\n {\n $sql = \"UPDATE {$this->config->dbTablePrefix}common_module\n SET\n `version`='{$version}'\n WHERE\n `name`='modcreator'\";\n\n $this->model->dba->query($sql); \n }", "public function upgrade__0_1_5__0_1_6()\n {\n }", "private function up($version)\n {\n $sql = sprintf('INSERT INTO schema_migration (version,created_at) VALUES (%s, now())', $version);\n $this->connection->execute($sql);\n }", "public function migrateToVersion($version, $up = true)\n {\n $this->createIfNotExists();\n $currentVersion = $this->getCurrentVersion();\n if ($up) {\n $this->up($version);\n } else {\n $this->down($version);\n }\n }", "function upgrade_101()\n {\n }", "public function action_update_check()\n\t{\n\t \tUpdate::add( 'DateNinja', 'e64e02e0-38f8-11dd-ae16-0800200c9a66', $this->info->version );\n\t}", "public function install () {\n $this->_log_version_number();\n }", "public function setVersionReference($version)\n {\n assertion(! $this->isStockItem());\n $this->version = trim($version);\n }", "function pmb_upgrade($nom_meta_base_version,$version_cible){\n\t$current_version = 0.0;\n\tif ( (!isset($GLOBALS['meta'][$nom_meta_base_version]) )\n\t\t\t|| (($current_version = $GLOBALS['meta'][$nom_meta_base_version])!=$version_cible)){\n\t\tinclude_spip('base/pmb');\n include_spip('base/create');\n\t\tinclude_spip('base/abstract_sql');\n\t\tcreer_base();\n\t\tecrire_meta($nom_meta_base_version,$current_version=$version_cible,'non');\n\t}\n}", "function setCurrentVersion(&$version) {\n\t\t$this->currentVersion = $version;\n\t}", "public function upgrade($oldVersion)\n {\n // update successful\n return true;\n }", "public function addPatchversion( $value){\n return $this->_add(40, $value);\n }", "public function makeNewVersion(): Versionable;", "function cv_upgrade($nom_meta_base_version, $version_cible){\n\t$maj = array();\n\t\n\t// Première installation\n\t$maj['create'] = array(\n\t\tarray('cv_configuration_base',true),\n\t\tarray('cv_creer_rubriques',true)\n\t);\n\t\n\tinclude_spip('base/upgrade');\n\tmaj_plugin($nom_meta_base_version, $version_cible, $maj);\n}", "public function ajouterVersionBD($version) {\n\t\t\n\t\t\t$this->log->debug(\"Maintenance::ajouterVersionBD() Début - version : '$version'\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\t$sql = \"insert into tconfig (version,date_modification) values (?, now())\";\n\t\t\t\t$sth = $this->dbh->prepare($sql);\n\t\t\t\t$sth->execute(array($version));\n\t\t\t\t\t\n\t\t\t} catch (Exception $e) {\n\t\t\t\tErreur::erreurFatal('018', \"Maintenance::ajouterVersionBD() - Erreur technique détectée : '\" . $e->getMessage() . $e->getTraceAsString() . \"'\", $this->log);\n\t\t\t}\n\t\t\n\t\t\t$this->log->debug(\"Maintenance::ajouterVersionBD()\");\n\t\t\n\t\t\treturn $version;\n\t\t}", "function RSS_upgrade($oldversion)\n{\n // Update successful\n return true;\n}", "function qtype_IPAtranscription_upgrade($oldversion=0) {\n global $CFG;\n\n ////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.\n\n return true;\n}", "public function testAddVersion()\n {\n $this->document->addJsonApiVersion('1.0', ['some' => 'meta']);\n $this->document->unsetData();\n\n $expected = <<<EOL\n {\n \"jsonapi\":{\n \"version\" : \"1.0\",\n \"meta\" : { \"some\" : \"meta\" }\n }\n }\nEOL;\n $this->check($expected);\n }", "public function action_update_check()\n\t{\n\t\tUpdate::add('Ohloh Badge', '42aaa113-4285-42ef-a811-3eb4281cee7c', $this->info->version);\n\t}", "private function _log_version_number () {\n\t\t// Log the version number.\n\t\tupdate_option( $this->token . '-version', $this->version );\n\t}", "public function upgradeAction()\r\n\t{\r\n\t try {\r\n \t // run the upgrade command\r\n \t $packageName = $this->_runCommand(\r\n \t $command = Faett_Core_Interfaces_Service::COMMAND_UPGRADE\r\n \t );\r\n // attach a message to the session\r\n \t\tMage::getSingleton('adminhtml/session')->addSuccess(\r\n \t\t Mage::helper('adminhtml')->__(\r\n \t\t '201.success.package-upgrade', $packageName\r\n \t\t )\r\n \t\t);\r\n\t } catch(Faett_Manager_Exceptions_InvalidCommandException $ice) {\r\n Mage::getSingleton('adminhtml/session')->addError(\r\n \t\t $ice->getMessage()\r\n \t\t);\r\n\t } catch(Exception $e) {\r\n Mage::getSingleton('adminhtml/session')->addError(\r\n \t\t Mage::helper('manager')->__(\r\n \t\t '900.pear.exception',\r\n \t\t $e->getMessage()\r\n \t\t )\r\n \t\t);\r\n\t }\r\n // redirect to the licence overview\r\n $this->_redirect('*/*/');\r\n\t}", "public function upgrade( $previous_version ) {\n\n\t\t// Was previous Add-On version before 1.0.6?\n\t\t$previous_is_pre_custom_app_only = ! empty( $previous_version ) && version_compare( $previous_version, '1.0.6', '<' );\n\n\t\t// Run 1.0.6 upgrade routine.\n\t\tif ( $previous_is_pre_custom_app_only ) {\n\n\t\t\t// Get plugin settings.\n\t\t\t$settings = $this->get_plugin_settings();\n\n\t\t\t// Set default app flag.\n\t\t\tif ( ! rgar( $settings, 'customAppEnable' ) && $this->initialize_api() ) {\n\t\t\t\t$settings['defaultAppEnabled'] = '1';\n\t\t\t}\n\n\t\t\t// Remove custom app flag.\n\t\t\tunset( $settings['customAppEnable'] );\n\n\t\t\t// Save plugin settings.\n\t\t\t$this->update_plugin_settings( $settings );\n\n\t\t}\n\n\t\t// Was previous Add-On version before 2.0?\n\t\t$previous_is_pre_20 = ! empty( $previous_version ) && version_compare( $previous_version, '2.0dev2', '<' );\n\n\t\t// Run 2.0 upgrade routine.\n\t\tif ( $previous_is_pre_20 ) {\n\n\t\t\t// Get plugin settings.\n\t\t\t$settings = $this->get_plugin_settings();\n\n\t\t\t// Set custom app state.\n\t\t\tif ( rgar( $settings, 'defaultAppEnabled' ) ) {\n\t\t\t\tunset( $settings['defaultAppEnabled'], $settings['customAppEnable'] );\n\t\t\t} else {\n\t\t\t\t$settings['customAppEnable'] = '1';\n\t\t\t}\n\n\t\t\t// Save plugin settings.\n\t\t\t$this->update_plugin_settings( $settings );\n\n\t\t}\n\n\t}", "public static function activate() {\n self::version_compare();\n update_option(self::version_option_name, self::version);\n }", "protected function bumperUpdate($version)\n {\n $filename = 'version';\n foreach (['', '.txt'] as $extension) {\n $filepath = $filename . $extension;\n foreach ([strtoupper($filename) . $extension, ucfirst($filepath), $filepath] as $path) {\n if (file_exists($path)) {\n $file = $path;\n break;\n }\n }\n\n if (!isset($file)) {\n continue;\n }\n\n $this->taskWriteToFile($file)->line($version)->run();\n unset($file);\n }\n\n if (file_exists('composer.json')) {\n $this->taskReplaceInFile('composer.json')\n ->regex('/\"version\": \"[^\\\"]*\"/')\n ->to('\"version\": \"' . ltrim($version, 'v') . '\"')\n ->run();\n }\n }", "public function add( $data = '', $version = false ) {\n\t\t\tif ( file_exists( trailingslashit( $data ) . 'index.php' ) ) {\n\t\t\t\tif ( false === $version ) {\n\t\t\t\t\t$args = get_file_data( trailingslashit( $data ) . 'index.php', array( 'version' => 'Version' ) );\n\t\t\t\t\t$version = ( isset( $args['version'] ) && ! empty( $args['version'] ) ) ? $args['version'] : $version;\n\t\t\t\t}\n\t\t\t\tself::$data[ $version ] = trailingslashit( $data );\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "public static function recordComponentSuccessfullyUpdated($name, $version)\n {\n try {\n Option::set(self::getNameInOptionTable($name), $version, $autoLoad = 1);\n } catch (\\Exception $e) {\n // case when the option table is not yet created (before 0.2.10)\n }\n }", "public function setRequestedVersion($version)\n {\n $this->_options['requested_version'] = $version;\n }", "public function please_upgrade() {\n\t\t$this->infoAlert(\"Please Upgrade Message\");\n\t}", "public function updateVersionMatrix() {}", "public function updateVersionMatrix() {}", "public function SetVersion($version)\n {\n $this->messageBuilder->SetVersion($version);\n }", "public function hookUpgrade($args)\n {\n $oldVersion = $args['old_version'];\n $newVersion = $args['new_version'];\n\n // Earlier than version 1.1.\n if (version_compare($oldVersion, '1.1', '<')) {\n if (!get_option('neatlinetime')) {\n $this->setDefaultOptions();\n }\n }\n\n if (version_compare($oldVersion, '2.0.2', '<') && version_compare($oldVersion, '2.0', '>') ) {\n if ($timelines = get_records('NeatlineTimeTimeline')) {\n foreach ($timelines as $timeline) {\n $query = unserialize($timeline->query);\n while (!is_array($query)) {\n $query = unserialize($query);\n }\n $timeline->query = serialize($query);\n $timeline->save();\n }\n }\n }\n\n if (version_compare($oldVersion, '2.1', '<')) {\n $rows = $this->_db->query(\n \"show columns from {$this->_db->prefix}neatline_time_timelines where field='center_date';\"\n );\n\n if ($rows->rowCount() === 0) {\n $sqlNeatlineTimeline = \"ALTER TABLE `{$this->_db->prefix}neatline_time_timelines`\n ADD COLUMN `center_date` date NOT NULL default '0000-00-00'\";\n\n $this->_db->query($sqlNeatlineTimeline);\n }\n }\n\n if (version_compare($oldVersion, '2.1.1', '<')) {\n $sql = \"ALTER TABLE `{$this->_db->prefix}neatline_time_timelines`\n MODIFY COLUMN `center_date` date NOT NULL default '2018-01-01',\n MODIFY COLUMN `added` timestamp NOT NULL default CURRENT_TIMESTAMP\";\n $this->_db->query($sql);\n }\n\n if (version_compare($oldVersion, '2.1.2', '<')) {\n $sql = \"ALTER TABLE `{$this->_db->prefix}neatline_time_timelines`\n MODIFY COLUMN `added` timestamp NOT NULL default '2000-01-01 00:00:00'\";\n $this->_db->query($sql);\n }\n\n }", "function acf_has_upgrade()\n{\n}", "function microblog_upgrade($nom_meta_base_version,$version_cible){\n\t$current_version = 0.0;\n\tif ( (!isset($GLOBALS['meta'][$nom_meta_base_version]) )\n\t\t\t|| (($current_version = $GLOBALS['meta'][$nom_meta_base_version])!=$version_cible)){\n\n\t\tif ($current_version==0.0){\n\t\t\tsql_alter(\"table spip_articles ADD microblog VARCHAR(140) DEFAULT '' NOT NULL\");\n\t\t\tecrire_meta($nom_meta_base_version,$current_version=$version_cible);\n\t\t}\n\t}\n}", "public function addNextVersion($version, $initial_note,\n $stability_api = null,\n $stability_release = null)\n {\n $notes = \"\\n* \" . $initial_note . \"\\n \";\n $api = $this->getNodeText('/p:package/p:version/p:api');\n if ($stability_api === null) {\n $stability_api = $this->getNodeText('/p:package/p:stability/p:api');\n }\n if ($stability_release === null) {\n $stability_release = $this->getNodeText(\n '/p:package/p:stability/p:release'\n );\n }\n $version_node = $this->findNode('/p:package/p:version');\n $this->replaceTextNodeRelativeTo(\n './p:release', $version_node, $version\n );\n $this->replaceTextNode('/p:package/p:notes', $notes);\n $this->replaceTextNode('/p:package/p:date', date('Y-m-d'));\n $this->replaceTextNode('/p:package/p:time', date('H:i:s'));\n\n $changelog = $this->findNode('/p:package/p:changelog');\n $this->_insertWhiteSpace($changelog, ' ');\n\n $release = $this->_xml->createElementNS(self::XMLNAMESPACE, 'release');\n $this->_appendVersion($release, $version, $api, \"\\n \");\n $this->_appendStability($release, $stability_release, $stability_api, \"\\n \");\n $this->_appendChild($release, 'date', date('Y-m-d'), \"\\n \");\n $this->_appendLicense(\n $release,\n $this->getLicense(),\n $this->getLicenseLocation(),\n \"\\n \"\n );\n $this->_appendChild($release, 'notes', $notes . ' ', \"\\n \");\n $this->_insertWhiteSpace($release, \"\\n \");\n $changelog->appendChild($release);\n $this->_insertWhiteSpace($changelog, \"\\n \");\n }", "function acf_update_db_version($version = '')\n{\n}", "public function store(int $version)\n {\n $this->filesystem->put($this->filename, $version);\n }", "function upgrade_600()\n {\n }", "function Legal_upgrade($oldversion)\n{\n // Upgrade dependent on old version number\n switch($oldversion) {\n case 1.1:\n\t\t\tpnModSetVar('legal', 'termsofuse', true);\n\t\t\tpnModSetVar('legal', 'privacypolicy', true);\n\t\t\tpnModSetVar('legal', 'accessibilitystatement', true);\n\t pnModSetVar('legal', 'refundpolicy', true);\n \treturn Legal_upgrade(1.2);\n break;\n }\n\n // Update successful\n return true;\n}", "public function can_upgrade($type, $version) {\r\n return false;\r\n }", "function update_extension($current = '')\n\t{\n\t\tif ($current == '' OR $current == $this->version)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif ($current < '0.2.1')\n\t\t{\n\t\t\t//update to version 0.1\n\t\t}\n\n\t\t$this->EE->db->where('class', __CLASS__);\n\t\t$this->EE->db->update(\n\t\t\t'extensions',\n\t\t\tarray('version' => $this->version)\n\t\t);\n\t}", "public function install()\n {\n $this->initConfig();\n $this->loadConfig();\n $this->config['installed']=ASTAT_VERSION2;\n $this->config['newInstall']='y';\n $this->saveConfig();\n\n GPCCore::register($this->getPluginName(), ASTAT_VERSION, ASTAT_GPC_NEEDED);\n\n return(true);\n }", "public function laterThan($version);" ]
[ "0.6990274", "0.6209433", "0.6165426", "0.6125037", "0.6125037", "0.60869944", "0.6077672", "0.60432667", "0.60432667", "0.60432667", "0.60432667", "0.60432667", "0.5943941", "0.5942448", "0.592736", "0.5889506", "0.5815514", "0.5784992", "0.5761434", "0.57479626", "0.5715671", "0.5694075", "0.56812245", "0.5664076", "0.56574893", "0.5606888", "0.5606879", "0.5603481", "0.5602644", "0.5595461", "0.558081", "0.55734855", "0.55716574", "0.55674535", "0.5555724", "0.5527113", "0.55268097", "0.5509763", "0.54943347", "0.54889464", "0.54889464", "0.54889464", "0.548847", "0.5482098", "0.5476163", "0.54744524", "0.5471066", "0.5466942", "0.5437584", "0.54285747", "0.54166305", "0.54166305", "0.54117066", "0.539421", "0.5381671", "0.5379437", "0.53763676", "0.53694993", "0.53674644", "0.53669345", "0.5358986", "0.53491396", "0.5347135", "0.5346359", "0.5339469", "0.5329848", "0.5327495", "0.5313796", "0.529623", "0.52873826", "0.52777475", "0.5276697", "0.5276513", "0.5272192", "0.5257961", "0.52578676", "0.52557176", "0.5248762", "0.523099", "0.52257556", "0.52143365", "0.52121437", "0.5208575", "0.51986647", "0.519266", "0.51707333", "0.51692456", "0.5168493", "0.5152002", "0.51509136", "0.51461333", "0.51450086", "0.5140651", "0.51381665", "0.5137453", "0.5132969", "0.5129763", "0.51198953", "0.51168054", "0.5109096" ]
0.7515287
0
Remove a version Mark this version as downgrade
Удалить версию Отметить эту версию как downgrade
public function remove(string $version);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function uninstall()\n {\n\n $this->markUninstalled();\n //or call parent::uninstall(); \n }", "function bft_remove_version() {\n\treturn '';\n}", "function pramble_remove_version(){\n\t\t\t\treturn '';\n\t\t\t}", "public function uninstall();", "public function uninstall();", "function uninstall(){}", "function dimaan_remove_version() { return ''; }", "public function uninstall() {\n\n\n }", "function wpb_remove_version() {\nreturn '';\n}", "public function uninstall(): void\n {\n $this->output(\"TODO: Drop the journal table, remove the files and show the composer command to remove the package\");\n exit;\n }", "public function uninstall(){\n\t\t$this->_uninstall();\n\t\t$model = $this->getCounterpartModel();\n\n\t\tif( $model->getConfigValue( 'uninstall_clear_db' ) ) {\n\t\t\t$this->_uninstallDb();\n\t\t}\n\t\tif( $model->getConfigValue( 'uninstall_clear_settings' ) ) {\n\t\t\t$this->_uninstallSettings();\n\t\t}\n\n\t\t//mark the extension as uninstalled\n\t\t//better to use editSetting - since there is may be no 'installed' value in config after uninstall\n\t\tAdvertikon::getExtendedModel( 'setting_setting' )->editSettingValue( 'installed' , 0 );\n\t}", "function wpb_remove_version() {\r\n return '';\r\n}", "private function down($version)\n {\n $sql = sprintf('DELETE FROM schema_migration WHERE version = \\'%s\\'', $version);\n $this->connection->execute($sql);\n }", "function wpb_remove_version() {\n return '';\n}", "public static function uninstall() {\n\t\t}", "function complete_version_removal() { return ''; }", "public function uninstall()\n {\n }", "public function uninstall()\n {\n }", "function uninstall() {\n\t}", "function wpversion_remove_version() {\n return '';\n }", "public static function uninstall(){\n }", "public static function uninstall() {\n\n\t}", "function uninstall(){\n\n }", "public function uninstall()\n\t{\n\t\treturn true;\n\t}", "public function uninstall() {\n\t\tdelete_option('hotlink-no-more');\n\t}", "function version_unregister($module, &$content)\n{\n $install_file = PHPWS_SOURCE_DIR . 'mod/' . $module . '/boost/install.sql';\n\n if (!is_file($install_file)) {\n return;\n }\n\n $install_sql = file($install_file);\n\n if (empty($install_file)) {\n return;\n }\n\n foreach ($install_sql as $sql) {\n if (!preg_match('/^create /i', $sql)) {\n continue;\n }\n\n $table_name = PHPWS_DB::extractTableName($sql);\n\n if (empty($table_name)) {\n continue;\n }\n\n $version_table = $table_name . '_version';\n $version_table_seq = $version_table . '_seq';\n\n if (!PHPWS_DB::isTable($version_table)) {\n continue;\n }\n\n $result = PHPWS_DB::dropTable($version_table);\n if (PHPWS_Error::isError($result)) {\n PHPWS_Error::log($result);\n $content[] = dgettext('version', 'There was an error removing a version table.');\n } else {\n $content[] = sprintf(dgettext('version', 'Version table removed: %s'), $version_table);\n }\n }\n}", "function startertheme_remove_version() {\nreturn '';\n}", "public function delete()\n {\n foreach ($this->versions as $version)\n {\n $version->delete();\n }\n\n parent::delete();\n }", "function uninstall()\n {\n \t// For now nothing in unistall, because we don't want user lose the data. \n }", "public static function drop()\n {\n global $wpdb;\n $tableName = static::getTableName($wpdb->prefix);\n\n $sql = \"DROP TABLE IF EXISTS $tableName;\";\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\n $wpdb->query($sql);\n \\delete_option($tableName . '_version');\n }", "public function uninstall()\n {\n return true;\n }", "public function on_plugin_uninstall(): void {\n\t\tif ( is_multisite() ) {\n\t\t\tdelete_site_option( self::OPTION_SHOW_ACTIVATION_NOTICE );\n\t\t}\n\t\tdelete_option( self::OPTION_SHOW_ACTIVATION_NOTICE );\n\t}", "public function removeUpdateVersion($action, $type){\n if($action == 'update' && $type == 'core'){\n delete_option('svc_upgrade_version');\n }\n }", "public function uninstall()\n\t{\n\t\treturn false;\n\t}", "public function uninstall()\n\t{\n\t\treturn false;\n\t}", "public function uninstall() {\n\t\tdelete_option( $this->options_key );\n\t}", "public function revert()\n {\n $this->curlSender->post(\n $this->uninstallRequest->getUrl(),\n $this->uninstallRequest->getParams()\n );\n }", "function wpmudev_remove_version() {\nreturn '';\n}", "function uninstall() {\n SQLExec('DROP TABLE IF EXISTS app_vkbot');\n parent::uninstall();\n }", "function on_uninstall ()\n{\n}", "function on_uninstall ()\n{\n}", "function uninstall() {\n SQLExec('DROP TABLE IF EXISTS mixcloud_favorites');\n parent::uninstall();\n }", "public function downModule()\n {\n /** @var App $app_record */\n $app_record = App::findOne(['name' => $this->module->id, 'className' => $this->module->getModuleClassName()]);\n if (!is_null($app_record))\n {\n if ($app_record->core_module == 1)\n {\n throw new yii\\base\\Exception('Module ' . $this->module->id . ' is core, so it can\\'t be uninstalled.');\n }\n\n $app_record->delete();\n $app_record = NULL;\n } else\n {\n throw new yii\\base\\Exception('No installed APP named ' . $this->module->id . ' found.');\n }\n }", "public function _uninstall() {\n\t\tdelete_option( $this->identifier . '_indexing' );\n\n\t\tparent::_uninstall();\n\t}", "function unsinstall()\n\t\t{\n\t\t}", "public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }", "function bajweb_remove_meta_version() {\n\treturn '';\n}", "function onUninstall(){\n\tdelete_option( 'stackoverflowUser' );\n\tdelete_option( 'StackoverflowData' );\n}", "function sunset_remove_meta_version(){\n return '' ;\n}", "function delete()\n {\n jimport('joomla.installer.installer');\n $installer =& JInstaller::getInstance();\n\n require_once(JPATH_COMPONENT.DS.'adapters'.DS.'sef_ext.php');\n $adapter = new JInstallerSef_Ext($installer);\n $installer->setAdapter('sef_ext', $adapter);\n\n $result = $installer->uninstall('sef_ext', $this->_id, 0);\n\n return $result;\n }", "function uninstall() {\n global $DB, $USER;\n if(!$USER->may(INSTALL)) return false;\n $DB->dropTable($this->DBTable);\n }", "public static function uninstall() {\n\t\tUninstall::uninstall();\n\t}", "protected function afterUninstall()\n {\n }", "function uninstall() {\r\n SQLExec('DROP TABLE IF EXISTS watchfolders');\r\n parent::uninstall();\r\n }", "public function uninstall()\r\n {\r\n Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'clubmembre');\r\n\r\n return parent::uninstall();\r\n }", "function wfs_remove_meta_version() {\n\treturn '';\n}", "public function uninstall()\n\t{\n\t\treturn FALSE;\n\t}", "function remove_version_number() {\n return '';\n}", "public function uninstall()\n {\n // drop tables\n DoctrineHelper::dropSchema($this->entityManager, array('Downloads_Entity_Download',\n 'Downloads_Entity_Categories'));\n\n //remove files from data folder\n $uploaddir = DataUtil::formatForOS($this->getVar('upload_folder'));\n FileUtil::deldir($uploaddir, true);\n\n // remove all module vars\n $this->delVars();\n\n HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles());\n\n return true;\n }", "function uninstall() {\n SQLExec('DROP TABLE IF EXISTS lagartoservers');\n SQLExec('DROP TABLE IF EXISTS lagartoendpoints');\n parent::uninstall();\n }", "public static function uninstall() {\n $sql = 'DROP TABLE IF EXISTS `'.self::tableName.'`;';\n db_query($sql);\n }", "function uninstall()\n\t{\n\t\t$GLOBALS['SITE_DB']->drop_if_exists('customtasks');\n\t}", "function logger_remove_firmware_upgrade_request($device) {\n\n db_delete('logger_firmware_upgrade_request')\n ->condition('device', $device)\n ->execute();\n}", "function wrmp_uninstall()\n{\n\tif(!class_exists('WildcardPluginInstaller'))\n\t{\n\t\trequire_once MYBB_ROOT . 'inc/plugins/wrmp/classes/installer.php';\n\t}\n\t$installer = new WildcardPluginInstaller(MYBB_ROOT . 'inc/plugins/wrmp/install_data.php');\n\t$installer->uninstall();\n\n\t// delete our cached version\n\twrmp_unset_cache_version();\n}", "function uninstall() {\n SQLExec('DROP TABLE IF EXISTS AliIPRelays');\n SQLExec('DROP TABLE IF EXISTS AliIPRelay');\n SQLExec('DROP TABLE IF EXISTS AliIPRelays_queue');\n parent::uninstall();\n }", "public function remove() {\n if ( ! $this->can_remove() ) {\n return;\n }\n $location = add_query_arg( 'tab', 'export', admin_url( 'options-general.php?page=wpsupercache' ) );\n if ( $this->backupFileExists() )\n $file = @unlink( self::$cache_config_file_backup );\n if ( ! $file ) {\n wp_safe_redirect( add_query_arg( 'message', 4, $location ) );\n exit;\n }\n delete_option( '_wp_super_cache_backup_options' );\n wp_safe_redirect( add_query_arg( 'message', 6, $location ) );\n exit;\n }", "public function down()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "function uninstall_hook()\n\t\t{\n\t\t\t// Delete plugin options\t\t\t\n\t\t\tdelete_option('verify-meta-tags');\n\t\t}", "public function uninstall() {\n $this->helper_pricealert->deleteTables();\n $this->__deleteEvents();\n }", "public function uninstall()\n\t\t{\n\t\t\t$this->_Parent->Database->delete('tbl_pages_types', \"`page_id` = 4294967295\");\n\t\t}", "public function destroy(Version $version)\n {\n //\n }", "public function uninstall()\n {\n $this->log->uninstall();\n }", "public function uninstall()\n {\n $query = \"ALTER TABLE `\" . Common::prefixTable('log_visit') . \"` DROP `location_provider`\";\n Db::exec($query);\n }", "public function uninstall(){\n if (!parent::uninstall())\n Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.$this->name.'`');\n \n $this->deleteConfiguration(); // delete settings\n \n return parent::uninstall();\n }", "public function uninstall()\r\n {\r\n // ee()->db->where('class', ucfirst(EXT_SHORT_NAME).'_ext');\r\n // ee()->db->delete('extensions');\r\n\r\n ee()->db->where('module_name', EXT_NAME);\r\n ee()->db->delete('modules');\r\n\r\n ee()->db->delete('modules', array( 'module_name' => EXT_NAME));\r\n\r\n // ee()->load->dbforge();\r\n // $sql[] = \"DROP TABLE IF EXISTS exp_email_cache_plus\";\r\n // $sql[] = \"DROP TABLE IF EXISTS exp_email_queue_plus\";\r\n // $this->runSQL($sql);\r\n return true;\r\n }", "function uninstall()\n\t{\n\t\t$GLOBALS['NO_DB_SCOPE_CHECK']=true;\n\t\t$GLOBALS['SITE_DB']->drop_if_exists('f_welcome_emails');\n\t\t$GLOBALS['NO_DB_SCOPE_CHECK']=false;\n\t}", "public function uninstall()\n {\n $this->deleteConfig();\n GPCCore::unregister($this->getPluginName());\n }", "function spr_section_exclude_uninstall() {\nglobal $spr_exclude_db_debug;\n\n\t$res = safe_query(\"ALTER TABLE \".safe_pfx(\"txp_section\").\" DROP COLUMN spr_exclude;\",$spr_exclude_db_debug);\n\treturn $res;\n}", "public static function remove($package_name, $no_output=false) {\n if(isset(self::$_packages[$package_name])) {\n $version_installed = self::$_packages[$package_name];\n //remove from packagist\n unset(self::$_packages[$package_name]);\n self::save();\n //get package info\n $package_info = json_decode(file_get_contents(self::URL.\"/$package_name.json\"), true);\n $git_name = $package_info[\"package\"][\"repository\"];\n $git_name = substr($git_name, strrpos($git_name, '/', strrpos($git_name, '/') - strlen($git_name) - 1) + 1);\n //get all directories\n $package_directory = App::libs()->directory('Packagist.'.trim(str_replace('/', '-', strtolower($git_name))));\n $installed_versions = $package_directory->directories();\n //remove from autoload\n foreach($installed_versions as $version) {\n if(isset(self::$_autoload[$version->name()])) {\n unset(self::$_autoload[$version->name()]);\n }\n //remove version\n $version->remove();\n }\n self::save();\n //remove remaining directory\n $package_directory->remove();\n //show packages\n $to_install = self::match($package_info, $version_installed);\n $notice = \"\";\n foreach($to_install[\"require\"] as $p => $v) {\n if(strpos($p, '/')!==false) {\n $notice .= \"$p : $v\\n\";\n }\n }\n if(($notice!=\"\")&&($no_output===false)) {\n echo \"Don't forget, following packags were required by $package_name but might not be needed anymore\\n(You can run 'autoremove $package_name $version_installed' or 'autoremove $package_name' to remove them automatically\".PHP_EOL;\n echo $notice;\n }\n return true;\n }\n return false;\n }", "public function uninstall()\r\n {\r\n // Remove\r\n ee()->dbforge->drop_table('tagger');\r\n ee()->dbforge->drop_table('tagger_links');\r\n ee()->dbforge->drop_table('tagger_groups');\r\n ee()->dbforge->drop_table('tagger_groups_entries');\r\n\r\n ee('Model')->get('Action')->filter('class', ucfirst($this->module_name))->all()->delete();\r\n ee('Model')->get('Module')->filter('module_name', ucfirst($this->module_name))->all()->delete();\r\n\r\n return true;\r\n }", "public function uninstall() {\n $this->load->model('extension/module/export_yml');\n $this->model_extension_module_export_yml->uninstallPromCategoryTable();\n $this->model_extension_module_export_yml->uninstallPromProductTable();\n }", "static public function deregisterMigration($machine_name) {\n $rows_deleted = db_delete('migrate_status')\n ->condition('machine_name', $machine_name)\n ->execute();\n }", "public function uninstall($parent)\n {\n }", "function uninstall() {\n\t\t/** globalising of the needed variables, objects and arrays */\n\t\tglobal $db, $apcms;\n\t\t\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['plugins'].\"` WHERE `name`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['rightsidebar'].\"` WHERE `plugin`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['leftsidebar'].\"` WHERE `plugin`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['rightsidebar'].\"` WHERE `plugin`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\n\t}", "public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function uninstallHook()\n\t{\n\t\t$ok =\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_PUB_KEY) &&\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_PUB_KEY_HASH);\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_STORE_AVATAR_HASHES)\n\t\t;\n\t}", "public function unsetCatalogVersion(): void\n {\n $this->catalogVersion = [];\n }", "public static function uninstall() {\n\t\tglobal $wpdb;\n\t\t$wpdb->query( \"DROP TABLE IF EXISTS {$wpdb->prefix}product_list\" );\n\t\t$wpdb->query( \"DROP TABLE IF EXISTS {$wpdb->prefix}product_list_detail\" );\n\t\tdelete_option( 'product_list_version' );\n\n\t\twp_clear_scheduled_hook('my_cron_event');\n\n\t}", "public function down()\n {\n echo \"m000000_000001_media does not support migration down.\\n\";\n return false;\n }", "function uninstall() {\n\n\t// Delete the data.\n\tHelpers\\clear_pending_data();\n\n\t// Include our action so that we may add to this later.\n\tdo_action( Core\\HOOK_PREFIX . 'uninstall_process' );\n\n\t// And flush our rewrite rules.\n\tflush_rewrite_rules();\n}", "function uninstall()\n\t{\n\t\tdelete_config_option('youtube_channel_update_time');\n\t}", "function uninstall()\n\t{\n\t\t$this->EE->load->dbforge();\n\n\t\t$this->EE->db->select('module_id');\n\t\t$query = $this->EE->db->get_where('modules', array('module_name' => 'LikEE'));\n\n\t\t$this->EE->db->where('module_id', $query->row('module_id'));\n\t\t$this->EE->db->delete('module_member_groups');\n\n\t\t$this->EE->db->where('module_name', 'Likee');\n\t\t$this->EE->db->delete('modules');\n\n\t\t$this->EE->db->where('class', 'Likee');\n\t\t$this->EE->db->delete('actions');\n\n\t\t$this->EE->dbforge->drop_table('likee');\n\t\t\n\t\treturn TRUE;\n\t}", "private function _update_package_to_version_141()\n {\n $this->EE->db->delete('actions',\n array('class' => ucfirst($this->get_package_name())));\n }", "public function uninstall()\r\n {\r\n $this->db->query('DROP TABLE IF EXISTS `' . DB_PREFIX . 'accept_cards_tokens`;');\r\n }", "protected function uninstallCustom() : void\n {\n }", "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "protected function uninstallCustom(): void\n {\n }", "function uninstall() {\nunsubscribeFromEvent($this->name, 'HOURLY');\nSQLExec('DROP TABLE IF EXISTS camshoter_devices');\nSQLExec('DROP TABLE IF EXISTS camshoter_config');\nSQLExec('DROP TABLE IF EXISTS camshoter_recognize');\nSQLExec('DROP TABLE IF EXISTS camshoter_people');\n\n\n parent::uninstall();\n\n }", "public function remove_rss_version() {\n\t\treturn '';\n\t}", "function deactivate() {\r\n delete_option(\"bvd_post_version\");\t\r\n delete_option(\"bvd_post_type\");\r\n delete_option(\"bvd_connection\");\r\n delete_option(\"bvd_show_version\");\r\n delete_option(\"bvd_favorites\");\r\n }" ]
[ "0.65213996", "0.6320239", "0.6307188", "0.62853426", "0.62853426", "0.61895514", "0.6139495", "0.613305", "0.60173833", "0.60069394", "0.6003697", "0.598573", "0.5975026", "0.59682363", "0.59232265", "0.5914587", "0.59127164", "0.59127164", "0.591234", "0.58904654", "0.58347124", "0.5826518", "0.5809069", "0.58056515", "0.5803643", "0.57798964", "0.57770365", "0.57727474", "0.57671964", "0.57616687", "0.5749003", "0.5694019", "0.5669523", "0.5659675", "0.5659675", "0.5652901", "0.56323534", "0.56308895", "0.5616971", "0.5594516", "0.5594516", "0.5575467", "0.5557634", "0.55389345", "0.55339676", "0.55332464", "0.5500945", "0.54707265", "0.54676867", "0.54637426", "0.5450099", "0.544716", "0.5442947", "0.5420437", "0.5410157", "0.5407423", "0.54020834", "0.5379878", "0.53736025", "0.5362986", "0.5362573", "0.5361452", "0.5361064", "0.5345246", "0.5334809", "0.5308238", "0.53046083", "0.53028363", "0.5293311", "0.5291669", "0.52916574", "0.52912086", "0.5288752", "0.52622706", "0.5262225", "0.5257663", "0.52460015", "0.52385443", "0.523735", "0.5234597", "0.52334684", "0.5222977", "0.52064747", "0.52041435", "0.52038276", "0.52024513", "0.5199255", "0.5196588", "0.519591", "0.51943046", "0.5180574", "0.5180267", "0.51689667", "0.5156232", "0.51523393", "0.5149046", "0.5148341", "0.51413286", "0.51363564", "0.51292986" ]
0.710458
0
select db and tb
выберите базу данных и таблицу
final public function select($db, $tb) { $this->db = $db; $this->tb = $tb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function select_db($dbname);", "public function pick_db($db)\n\t\t{\t$this->db = $db\n\t\t}", "public function selectDb($dbName) {}", "public function select($db, $dbh = \\null)\n {\n }", "public function sql_select_db() {}", "public function sql_select_db() {}", "public function sacarmonbredb($tb,$dbt,$id){\n\t\t\t$db=Db::conectar();\n\t\t\t$select=$db->prepare('SELECT '.$tb.' FROM '.$dbt.' WHERE '.$id.'');\n\t\t\t$select->execute();\n\t\t\twhile ($registro=$select->fetch()){\n\t\t\treturn $registro;\n }\n Db::desconectar();\t\t\t\t\n\t\t}", "abstract public function getSelectedDatabase();", "public function selectDB( $db ) {\n\t\t# Stub. Shouldn't cause serious problems if it's not overridden, but\n\t\t# if your database engine supports a concept similar to MySQL's\n\t\t# databases you may as well.\n\t\t$this->mDBname = $db;\n\n\t\treturn true;\n\t}", "function select($tbl = \"\", $eq = array(\"\", \"\"))\n\t{\n\t\t($eq[0] !== \"\" && $eq[1] !== \"\") ? $sql = \"SELECT * FROM $tbl WHERE \" . $eq[0] . \" = ?\" : $sql = \"SELECT * FROM $tbl\";\n\t\t\n\t\t$stmt = $this->db->prepare($sql);\n\t\t\n\t\t($eq[0] !== \"\" && $eq[1] !== \"\") ? $stmt->execute(array(\n\t\t\t$eq[1]\n\t\t)) : $stmt->execute(array());\n\t\t\n\t\treturn $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t}", "function use_db($data1){\n\t\tglobal $i18n_std;\n\t\tif(!$this->real_select($data1)){\n\t\t\techo('no db connection:'.$data1.' ('.$this->real_error().') engine='.$this->engine_name);\n\t\t\t//.'cwd='.getcwd()\n\t\t\tdie('');\n\t\t}\n\t}", "abstract public function selectDatabase($name);", "function select($db, $dbh = null){\n\t\tif (is_null($dbh)){\n\t\t\t$dbh = $this->dbh;\n\t\t}\n\t\tif (!@mysql_select_db( $db, $dbh )){\n\t\t\t$this->ready = false;\n\t\t\t$error_message = sprintf(SQ_DB_SELECT_TABLE_ERROR_MESSAGE, $db);\n\t\t\tthrow new SQ_Exception($message, SQ_DB_SELECT_TABLE_ERROR_CODE);\n\t\t}\n\t}", "function select_db($base_datos) {\r\n\t\t//\"implementado en la clase <i>\" . get_class($this) . \"</i></h1>\";\r\n\t\treturn FALSE;\r\n\t}", "final public function db($db)\r\n\t{ //select db\r\n\r\n\t\t$this->db = $db;\r\n\t}", "private function selectDB($link)\n\t{\n\t\t$db_selected = mysqli_select_db($link,MYSQL_DATABASE);\n\t\tif (!$db_selected) \n\t\t{\n\t\t\treturn $link;\n\t\t}\n\t\telse if(!$db_selected)\n\t\t{\n\t\t\tthrow new Exception('could not select db',1);\n\t\t}\n\t\t//else if() reviso si tiene tablas para la bd que queremos probar\n\n\t}", "function SelectDB($dbname)\n\t{\n\t\t$this->database = $dbName;\n\t\t$this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions\n\t\tif ($this->connectionID) {\n $rs = $this->Execute('USE '.$dbName); \n if($rs) {\n return true;\n } else return false;\t\t\n\t\t}\n\t\telse return false;\t\n\t}", "function wrapper_select_db($dbname) {\n\t\treturn $this->functions['select_db']($dbname, $this->link_id);\n\t}", "function select($db) {\n\t\t\tif (!$this->dbh) $this->connect();\n\t\t\tif ( !@mysql_select_db($db,$this->dbh)) {\n\t\t\t\t$this->print_error(\"<ol><b>Error selecting database <u>$db</u>!</b><li>Are you sure it exists?<li>Are you sure there is a valid database connection?</ol>\");\n\t\t\t}\n\t\t}", "public function select_db($db)\n {\n $this->dbname = $db;\n return $this;\n }", "function get_sql_combo() {\n try {\n $app = Slim\\Slim::getInstance();\n $table = $app->request->params('table_name');\n\n $gii = new easyuigii();\n $gii->set_db_setting();\n $model_combo = $gii->get_table_model_from_db($table);\n $data = $gii->get_sql_for_select($table, $model_combo);\n\n $app->render(200, ['success' => true, 'sql' => $data]);\n } catch (Exception $e) {\n $app->render(200, ['isError' => true, 'msg' => $e->getMessage()]);\n error_log(LogTime() . 'error - get sql for combo' . PHP_EOL, 3, 'logs/error.log');\n }\n}", "public function selected(?string $table = null): bool\n {\n global $dbs;\n\n $database = (function() use ($dbs) {\n return (isset($_GET['db']) AND $dbs[$_GET['db']] == $this) ? true : false;\n })();\n\n if (null === $table)\n return $database;\n\n return (isset($_GET['table']) AND $_GET['table'] == $table) ? true : false;\n }", "public function do_select_db($table, $clm, $ac)\n\t{\n\t\ttry { \n\t\t\t$log_data = null;\n\t\t\t$stmt = $this->conn->prepare(\"SELECT * FROM \".$table.\" WHERE \".$clm.\"=:\".$clm.\"\");\n\t\t\t$stmt->execute(array(':'.$clm=>$ac));\n\t\t\tif ($stmt->rowCount() == 1) {\n\t\t\t\t$result_row=$stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t$select_status = $result_row;\n\t\t\t\t$log_data = \"successfully selected\";\n\t\t\t}\n\t\t\telse if ($stmt->rowCount() == 0) {\n\t\t\t\t$select_status = 'wrong';\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\t$select_status = 'error';\n\t\t\t$log_data = \"\".$e->getMessage().\"\".CONFIG::NEWLINE_ERROR.\"|\";\n\t\t}\n\t\treturn array($log_data, $select_status);\n\t}", "function select($selection,$db) {\n\n\t\t$conn = new mysqli('localhost','id6847947_tadas','322559',$db);\n\n\n\tif ($conn->connect_error) {\n\t\tdie(\"Connection failed: \" . $conn->connect_error);\n\t} \n\n\t$result = $conn->query($selection);\n\treturn $result;\n}", "function m_seleBD(){\n\t\tmysql_select_db($this->a_nomBD, $this->a_conexion);\n\t}", "public function select_db($dbname){\n $errormsg='';\n if (!$dbname)\n $errormsg=self::$_error_code_list[8];\n if(!$this->_db_exists($dbname))\n $errormsg=sprintf (self::$_error_code_list[9],$dbname);\n if($errormsg){\n $this->_trigger_error($errormsg);\n return FALSE;\n }\n $this->_currentDB=$dbname;\n return TRUE;\n }", "function db_select($table, $column, $group, $ret)\n {\n $result = null;\n global $db_is_connected, $db;\n\t\tif (!$db_is_connected)\n\t\t{\n\t\t\tdb_connnect();\n\t\t}\n if (!$db_is_connected)\n {\t\n consol_message(\"Error: Could not connect to database.\");\n return FALSE;\n }else{\n $query = \"SELECT $column FROM $table $group;\";\n $rslt = $db->query($query);\n if (!$rslt)\n {\n consol_message($query.\" isn't correct .\");\n return FALSE;\n }else{\n while ($row = $rslt->fetch_assoc()) {\n $result[] = $row[\"$ret\"];\n }\n return $result;\n }\n }\n return FALSE;\n }", "public function select($database)\n\t{\n\t\treturn true;\n\t}", "function sql_select_db($db,&$dbh=NULL)\n {\n global $MYSQL_HOST, $MYSQL_USER, $MYSQL_PASSWORD, $MYSQL_DATABASE, $MYSQL_CONN, $MYSQL_HANDLER, $SQL_DBH;\n global $CONF;\n//echo '<hr />'.print_r($dbh,true).'<hr />';\n//exit;\n if ( !is_null($dbh) )\n {\n if ($dbh->exec(\"USE $db\") !== false)\n return 1;\n return 0;\n }\n\n try\n {\n $SQL_DBH = NULL;\n list($host,$port) = explode(\":\",$MYSQL_HOST);\n if (isset($port)) {\n $portnum = $port;\n $port = ';port='.trim($port);\n }\n else {\n $port = '';\n $portnum = '';\n }\n //$SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.trim($host).$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n //$SQL_DBH = sql_connect();\n switch ($MYSQL_HANDLER[1]) {\n case 'sybase':\n case 'dblib':\n if (is_numeric($portnum)) $port = ':'.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.$host.$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'mssql':\n if (is_numeric($portnum)) $port = ','.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.$host.$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'oci':\n if (is_numeric($portnum)) $port = ':'.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':dbname=//'.$host.$port.'/'.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'odbc':\n if (is_numeric($portnum)) $port = ';PORT='.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':DRIVER={IBM DB2 ODBC DRIVER};HOSTNAME='.$host.$port.';DATABASE='.$db.';PROTOCOL=TCPIP;UID='.$MYSQL_USER.';PWD='.$MYSQL_PASSWORD);\n break;\n case 'pgsql':\n if (is_numeric($portnum)) $port = ';port='.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.$host.$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'sqlite':\n if (is_numeric($portnum)) $port = ':'.intval($portnum);\n else $port = '';\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':'.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n case 'sqlite2':\n trigger_error(\"Critical Error : sqlite2 driver is not suported. \", E_USER_ERROR);\n break;\n default:\n //mysql\n $SQL_DBH = new PDO($MYSQL_HANDLER[1].':host='.$host.$port.';dbname='.$db, $MYSQL_USER, $MYSQL_PASSWORD);\n break;\n }\n return 1;\n }\n catch (PDOException $e)\n {\n if ($CONF['debug'])\n $msg = '<p>a3 Error!: ' . $e->getMessage() . '</p>';\n else\n {\n $msg = '<p>a3 Error!: ';\n $pattern = '/(Access denied for user|Unknown database)/i';\n if (preg_match($pattern, $e->getMessage(), $m))\n $msg .= $m[1];\n $msg .= '</p>';\n }\n startUpError($msg, 'Connect Error');\n return 0;\n }\n }", "function testDBSelect() {\r\n\t$db = MetadataDB::getInstance();\r\n\t// error in sql...\r\n\t$sql = 'select varable from metadata';\r\n\t$result = $db->select($sql);\r\n\tif (!$result) {\r\n\t} else {\r\n\t\t//print 'All OK!';\r\n\t}\r\n}", "public function selectDb($db)\n {\n /* Valid db name? */\n if (empty($db)) {\n return $this->_error(E_USER_NOTICE, 'Cannot select database \\'' . $db . '\\'');\n }\n\n /* Does it exist? */\n if (!$this->_dbExist($db)) {\n return $this->_error(E_USER_NOTICE, 'Database \\'' . $db . '\\' doesn\\'t exist');\n }\n\n /* Select the database */\n $this->_SELECTEDDB = $this->_query->_SELECTEDDB = $db;\n\n return true;\n }", "function select_default($db,$table) { \n\n\t$conn = new mysqli('localhost','id6847947_tadas','322559',$db);\n\n\n\tif ($conn->connect_error) {\n\t\tdie(\"Connection failed: \" . $conn->connect_error);\n\t} \n\n\t$selection= \"SELECT * FROM \" . $table . \" ORDER BY id ASC\";\n\treturn $result = $conn->query($selection);\n}", "public function select_data_from_db_for_labels( $db_info = '', $label_column = '', $table = '', $where = '', $order_by = '' ) {\n global $wpdb;\n $query = \"SELECT `\" . $label_column . \"` FROM \" . $table . $where . \" ORDER BY \" . $order_by;\n $db_info = trim($db_info, '[]');\n if ( $db_info ) {\n $temp = explode( '@@@wdfhostwdf@@@', $db_info );\n $host = $temp[ 0 ];\n $temp = explode( '@@@wdfportwdf@@@', $temp[1] );\n $port = $temp[ 0 ];\n if ($port) {\n $host .= ':' . $port;\n }\n $temp = explode( '@@@wdfusernamewdf@@@', $temp[ 1 ] );\n $username = $temp[ 0 ];\n $temp = explode( '@@@wdfpasswordwdf@@@', $temp[ 1 ] );\n $password = $temp[ 0 ];\n $temp = explode( '@@@wdfdatabasewdf@@@', $temp[ 1 ] );\n $database = $temp[ 0 ];\n $wpdb_temp = new wpdb( $username, $password, $database, $host );\n $choices_labels = $wpdb_temp->get_results( $query, ARRAY_N );\n } else {\n $choices_labels = $wpdb->get_results( $query, ARRAY_N );\n }\n\n return $choices_labels;\n }", "public function selectDb($dbname = null)\n {\n return true;\n }", "function queryOther($conn, $currentid, $currenttable, $currentfield){\n\t\t\t$otherquery = \"SELECT $currentfield FROM $currenttable WHERE id='$currentid'\";\n\t\t\t$result = $conn->query($otherquery);\n\t\t\techo \"Selected $currenttable: \";\n\t\t\tif ($result->num_rows > 0) {\n\t\t\t\twhile($row = $result->fetch_assoc()){\n\t\t\t\t\techo $row[\"$currentfield\"] . \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"</br>\";\n\t\t}", "function selectDBType()\n\t{\n\t\t$this->checkDisplayMode(\"create_new_client\");\n\n\nif (true)\n{\n\t\t$this->initDBSelectionForm();\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\", $this->form->getHTML());\n}\nelse\n{\n\t\t// output\n\n\t\t$this->tpl->addBlockFile(\"SETUP_CONTENT\",\"setup_content\",\"tpl.clientsetup_select_db.html\", \"setup\");\n\n\t\t$this->tpl->setVariable(\"FORMACTION\", \"setup.php?cmd=gateway\");\n\t\t$this->tpl->setVariable(\"TXT_SAVE\", $this->lng->txt(\"save\"));\n\n\t\t$this->tpl->setVariable(\"TXT_DB_TYPE\", $this->lng->txt(\"db_type\"));\n\t\t$this->tpl->setVariable(\"TXT_DB_SELECTION\", $this->lng->txt(\"db_selection\"));\n}\n\t\tif ($this->setup->getClient()->status[\"ini\"][\"status\"])\n\t\t{\n\t\t\t$this->setButtonNext(\"db\");\n\t\t}\n\n\t\t$this->checkPanelMode();\n\t}", "function create_db_combo($tblname, $key_field, $value_field, $order_field, $additional_value='-Plese Select-', $param=''){\n $ci =& get_instance();\n //load databse library\n $ci->load->database();\n\n $ci->db->from($tblname);\n if($param!=''){\n $ci->db->where($param);\n }\n $ci->db->order_by($order_field);\n $result = $ci->db->get();\n\n $dd[''] = $additional_value ;\n if ($result->num_rows() > 0){\n foreach ($result->result() as $row) {\n $dd[$row->$key_field] = $row->$value_field;\n }\n }\n return $dd;\n }", "public function select();", "public function select();", "public function select();", "function print_query($db) {\n\t\techo \"<pre>\";print_r($db->get_compiled_select());echo \"</pre>\";\n\t}", "function select_sql($table='', $fields='*', ...$get_args) {\n\t\t$this->select_result = false;\n return $this->selecting($table, $fields, ...$get_args);\t \n }", "function getConnection($db,$custom);", "private function database($database= NULL) {\n if (NULL !== $database) return $database;\n return $this->conn->query('select database() as db')->next('db');\n }", "function select_db($dbname) {\n\t\t try {\n\t\t\tmysql_select_db($dbname, $this->conn);\n\t\t\t}catch(Exception $e) {\n\t\t\t\t\t$this->show_error(\"Error Connecting to DB \" . $e->getMessage());\n\t\t\t}\n\t\t}", "function choosedb() {\n $web = \"enwiki.web.db.svc.eqiad.wmflabs\";\n $analytics = \"enwiki.analytics.db.svc.eqiad.wmflabs\";\n\n $ts_pw = posix_getpwuid(posix_getuid());\n $ts_mycnf = parse_ini_file($ts_pw['dir'] . \"/replica.my.cnf\");\n\n $webtest = mysqli_connect( $web, $ts_mycnf['user'], $ts_mycnf['password'], 'heartbeat_p' );\n $analyticstest = mysqli_connect( $analytics, $ts_mycnf['user'], $ts_mycnf['password'], 'heartbeat_p' );\n\n $lagq = \"select lag from heartbeat where shard = 's1';\";\n\n $lag_wr = mysqli_query( $webtest, $lagq );\n $lag_ar = mysqli_query( $analyticstest, $lagq );\n\n $lag_webrow = mysqli_fetch_assoc( $lag_wr );\n $lag_anarow = mysqli_fetch_assoc( $lag_ar );\n\n $weblag = $lag_webrow['lag'];\n $analag = $lag_anarow['lag'];\n\n if( $weblag < 600 ) {\n $dbhost = $web;\n } elseif ( $weblag <= $analag ) {\n $dbhost = $web;\n } elseif( $analag <= $weblag ) {\n $dbhost = $analytics;\n } else {\n $dbhost = $web;\n }\n mysqli_close( $webtest );\n mysqli_close( $analyticstest );\n return( $dbhost );\n}", "public function Select($cond)\r\n\t\r\n {\r\n\t\tglobal $db;\r\n if($cond==\"\")\r\n {\r\n $sql = \"SELECT * FROM \".$this->TableName;\r\n } else\r\n {\t\r\n\t\t \t\r\n\t\t $sql = \"SELECT * FROM \". $this->TableName.\" \".$cond;\r\n }\r\n try{\r\n $query = $db->prepare($sql);\r\n $query->execute();\r\n $arr['rows'] = $query->fetchAll(PDO::FETCH_ASSOC);\r\n $arr['err'] = false;\r\n } catch(PDOException $e){\r\n $arr['err'] = true;\r\n $arr['msg'] = $e->getMessage(); \r\n } \r\n return $arr;\r\n }", "public function setQuery($db)\n {\n /** Create Select */\n $query = $db->createSelect();\n /** Get where condition */\n $where = $db->getQueryBuilder()->build($this);\n\n /** Setting query and fquery */\n $queryWhere = \"*:*\";\n if(!empty($where) && is_string($where)){\n $queryWhere = $where;\n }elseif(!empty($where) && is_array($where)){\n $k = key($where[0]);\n $v = $where[0][key($where[0])] === '' ? '\"\"' : $where[0][key($where[0])];\n $queryWhere = $k.':'.$v;\n if(count($where)>1){\n unset($where[0]);\n foreach ($where as $key=>$value){\n $k = key($value);\n $v = $value[key($value)] === '' ? '\"\"' : $value[key($value)];\n $query->createFilterQuery($k.$key)->setQuery($k.\":\".$v);\n }\n }\n }\n $query->setQuery($queryWhere);\n\n\n /** set fields to fetch (this overrides the default setting 'all fields') */\n if($this->select !== null){\n $query->setFields($this->select);\n }\n\n /** set start and rows param (comparable to SQL limit) using fluent interface */\n if(!empty($this->offset)){\n if((int)$this->offset < 0){\n $this->offset = 0;\n }\n $query->setStart($this->offset);\n }\n\n if(!empty($this->limit)){\n if((int)$this->limit < 0){\n $this->limit = 10;\n }\n $query->setRows($this->limit);\n }\n\n /** sort the results by price ascending */\n if($this->orderBy !== null){\n foreach ($this->orderBy as $key=>$value) {\n $query->addSort($key, $value == SORT_ASC ? 'ASC' :'DESC');\n }\n }\n\n /** Document highlight */\n if($this->highlight !== null && !empty($this->highlight['fields'])){\n $Highlighting = $query->getHighlighting();\n $pre_tags = empty($this->highlight['pre_tags']) ? '<b>' : $this->highlight['pre_tags'];\n $post_tags = empty($this->highlight['post_tags']) ? '</b>' : $this->highlight['post_tags'];\n $fields = is_string($this->highlight['fields']) ? explode(',',$this->highlight['fields']) : $this->highlight['fields'];\n foreach ($fields as $value){\n $Highlighting->getField($value)->setSimplePrefix($pre_tags)->setSimplePostfix($post_tags);\n }\n }\n return $query;\n }", "public function SelecionaBanco()\r\n\t\t{\r\n\t\t\tmysql_select_db($this->banco);\r\n\t\t}", "function createSelect($_table, $_value, $_colum)\n{\n\n $_prev_par= false;\n $_query = \"SELECT * FROM $_table\";\n\n foreach ($_value as $_key => $_value)\n {\n if ($_value != \"\")\n {\n if ($_prev_par)\n {\n $_query.= \" AND \";\n }\n else\n {\n $_query.= \" WHERE \";\n }\n\n $_query.= $_colum[$_key].\" = '$_value'\";\n $_prev_par = true;\n }\n }\n $_query.=\";\";\n\n return $_query;\n}", "public function db_select($database_name){\n\t\t@mysql_select_db($database_name, $this->conn) or $this->error(\"Failure on db selection\");\n\t}", "function testDBSelectCorrect() {\r\n\t$db = MetadataDB::getInstance();\r\n\t// error in sql...\r\n\t$sql = 'select variable from metadata';\r\n\t$result = $db->select($sql);\r\n\tif (!$result) {\r\n\t} else {\r\n\t\t//print 'All OK!';\r\n\t}\r\n}", "function selectConexion($database){\n \n return $conexion = conexionlocal();\n \n \n }", "function allinea_db() {\r\n\t\t\r\n\t\t$in=$this->session_vars;\r\n\t\t$conn=$this->conn;\r\n\t\t$service=$this->service;\r\n\t\t$tb_exist = false;\r\n\t\t$str_synonym=\"select * from USER_SYNONYMS where synonym_name='\" . $this->form ['TABLE'] . \"'\";\r\n\t\t$sql = new query ( $conn );\r\n\t\t$sql->set_sql ( $str_synonym );\r\n\t\t$sql->exec ();//non richiede binding\r\n\t\t$sql->get_row();\r\n\t\tif($sql->row['TABLE_NAME']!='') $this->form ['TABLE']=$sql->row['TABLE_NAME'];\r\n\t\t$query = \"select column_name from user_col_comments where table_name='\" . $this->form ['TABLE'] . \"'\";\r\n\t\t$sql = new query ( $conn );\r\n\t\t$sql->set_sql ( $query );\r\n\t\t$sql->exec ();//non richiede binding\r\n\t\t$all_field_exist = true;\r\n\t\tforeach ( $this->fields as $key => $val ) {\r\n\t\t\tif (isset ( $val ['TYPE'] ) && $val ['TYPE'] != '')\r\n\t\t\t$field_type = \"field_{$val['TYPE']}\";\r\n\t\t\telse\r\n\t\t\t$field_type = \"field\";\r\n\t\t\t\r\n\t\t\tif ($this->config_service['field_lib'] != '' && file_exists ( $this->config_service['field_lib'] . $field_type . \".inc\" )) {\r\n\t\t\t\tinclude_once $this->config_service['field_lib'] . $field_type . \".inc\";\r\n\t\t\t} else\r\n\t\t\tinclude_once \"{$field_type}.inc\";\r\n\t\t\t$this->no_field_value_by_tb=true;\r\n\t\t\t$field_obj = new $field_type ( $this, $key, $this->conn, $this->tb_vals, $this->session_vars, $this->service, $this->errors);\r\n\t\t\t$this->no_field_value_by_tb=false;\r\n\t\t\t$allinea_stmt [$key] = $field_obj->allinea_db ();\r\n\t\t\tif ($field_obj->attributes ['PK'] == 'yes') {\r\n\t\t\t\t$sql_pk_fields .= \"{$field_obj->attributes['VAR']},\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$sql_pk_fields = rtrim ( $sql_pk_fields, \",\" );\r\n\t\tif ($sql->numrows > 0) {\r\n\t\t\t$tb_exist = true;\r\n\t\t\t$i = 0;\r\n\t\t\twhile ( $sql->get_row () ) {\r\n\t\t\t\t$res [$i] = $sql->row ['COLUMN_NAME'];\r\n\t\t\t\t$i ++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($tb_exist) {\r\n\t\t\t$sql_pk = null;\r\n\t\t\t$c = 0;\r\n\t\t\t$all_field_exist = true;\r\n\t\t\tforeach ( $allinea_stmt as $key => $val ) {\r\n\t\t\t\tif ($val != '') {\r\n\t\t\t\t\t$field_exist = false;\r\n\t\t\t\t\tforeach ( $val as $vk => $vval ) {\r\n\t\t\t\t\t\t$nome_campo = explode ( \" \", $vval );\r\n\t\t\t\t\t\t$field_exist [$key] [$vk] = false;\r\n\t\t\t\t\t\tforeach ( $res as $key_res => $val_res ) {\r\n\t\t\t\t\t\t\tif ($val_res == $nome_campo [0] || $nome_campo [0] == '') {\r\n\t\t\t\t\t\t\t\t$field_exist [$key] [$vk] = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tforeach ( $field_exist as $key1 => $val1 ) {\r\n\t\t\t\t\t\tforeach ( $val1 as $vk => $boolval )\r\n\t\t\t\t\t\tif (! $boolval) {\r\n\t\t\t\t\t\t\t$all_field_exist = false;\r\n\t\t\t\t\t\t\t$index = (count ( $this->fields ) * $vk) + $key;\r\n//\t\t\t\t\t\t\t$eq_sql_str [$index] = \"alter table EQ_\" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\r\n\t\t\t\t\t\t\t$s_sql_str [$index] = \"alter table S_\" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\r\n\t\t\t\t\t\t\t$sql_str [$index] = \"alter table \" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\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$sql_pk_drop = \"alter table \" . $this->form ['TABLE'] . \" drop constraint PK_\" . $this->form ['TABLE'] . \" cascade\";\r\n\t\t\t$sql_pk = \"alter table \" . $this->form ['TABLE'] . \" add constraint PK_\" . $this->form ['TABLE'] . \" primary key ($sql_pk_fields)\";\r\n\t\t\t$sql_fk_coord_drop = \"alter table \" . $this->form ['TABLE'] . \" drop constraint FK_\" . $this->form ['TABLE'] . \"_COORD cascade\";\r\n\t\t\tglobal $config_service;\r\n\t\t\tif ($config_service ['VISITNUM_PROGR'] == 1)\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t\telse\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t} else {\r\n\t\t\t$this->body .= \"Table <b>\" . $this->form ['TABLE'] . \"</b> doesn't exist<br/>\";\r\n\t\t\tforeach ( $allinea_stmt as $key => $val ) {\r\n\t\t\t\tforeach ( $val as $key_f => $val_f )\r\n\t\t\t\tif ($val_f != '')\r\n\t\t\t\t$sql_create_fields .= \"{$val_f},\";\r\n\t\t\t}\r\n\t\t\t$sql_create_fields = rtrim ( $sql_create_fields, \",\" );\r\n\t\t\t$sql_str_ini = \"create table \" . $this->form ['TABLE'] . '(';\r\n\t\t\t$sql_str_end = \")\";\r\n\t\t\t$sql_str [0] = $sql_str_ini . $sql_create_fields . $sql_str_end;\r\n\t\t\t$sql_pk = \"alter table \" . $this->form ['TABLE'] . \" add constraint PK_\" . $this->form ['TABLE'] . \" primary key ($sql_pk_fields)\";\r\n\t\t\t$config_service=$this->config_service;\r\n\t\t\tif ($config_service ['VISITNUM_PROGR'] == 1)\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t\telse\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n//\t\t\t$eq_sql_str [0] = \"create table EQ_\" . $this->form ['TABLE'] . \" (ID NUMBER, COMMENTO varchar2(400),\" . $sql_create_fields . $sql_str_end;\r\n//\t\t\t$eq_sql_str [1] = \"alter table EQ_\" . $this->form ['TABLE'] . \" add constraint EQ_PK_\" . $this->form ['TABLE'] . \" primary key (ID)\";\r\n\r\n\t\t\t$s_sql_str [0] = \"create table S_\" . $this->form ['TABLE'] . \"(USERID VARCHAR2(20),MODDT DATE,MODPROG NUMBER not null,FL_QUERY CHAR(1) not null,ID_QUERY NUMBER,\" . $sql_create_fields . $sql_str_end;\r\n\t\t\t$s_sql_str [1] = \"alter table S_\" . $this->form ['TABLE'] . \" add constraint S_PK_\" . $this->form ['TABLE'] . \" primary key (MODPROG)\";\r\n\r\n\t\t}\r\n\t\tif (isset ( $in ['CREATE'] ) || isset ( $in ['CREATE_' . $this->form ['TABLE']] )) {\r\n\t\t\tforeach ( $sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tforeach ( $eq_sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tforeach ( $s_sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tif ($sql_pk_drop != '') {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($sql_pk_drop); // bind non necessario\r\n\t\t\t}\r\n\t\t\t$sql = new query ( $conn );\r\n\t\t\t$sql->ins_upd ($sql_pk); // bind non necessario\r\n\t\t\tif ($sql_fk_coord_drop != '') {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($sql_fk_coord_drop); // bind non necessario\r\n\t\t\t}\r\n\t\t\t$sql = new query ( $conn );\r\n\t\t\t$sql->ins_upd ($sql_fk_coord); // bind non necessario\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\treturn ($tb_exist && $all_field_exist);\r\n\t}", "public function select($tienda);", "function adv_select($table, array $where = null, array $fields = null, $order = '', $limit = null, $offset = null);", "function selectOptions($table,$current,$orderby=\"\",$value=\"value\",$label=\"label\",$where=\"\") {\r\n\r\n\tglobal $TESTMODE;\r\n\t\r\n\t$sql = \"SELECT $value,$label FROM $table WHERE testmode<=\".escapeValue($TESTMODE);\r\n\r\n\tif ($where != \"\") $sql .= \" AND $where\";\r\n\r\n\tif ($orderby != \"\") $sql .= \" ORDER BY $orderby\";\r\n\r\n\t$query = db_query($sql);\r\n\t\r\n\tfor ($i=0; $result = db_fetch($query,$i); $i++) {\r\n\t\r\n\t\techo \"<option value=\\\"\".$result[$value].\"\\\"\";\r\n\t\tif ($result[$value] == $current) echo \" selected\";\r\n\t\techo \">\".$result[$label].\"</option>\\n\";\r\n\t\t\r\n\t}\r\n\r\n}", "function selectDB($db)\n\t{\n\n\t\tglobal $connections,$config;\n\n\t\tif (!isset($connections[$db]))\n\t\t\tdie('Core-Error: Invalid database in selectDB()');\n\n\t\tif ($connections[$db]===false)\n\t\t{\n\n\t\t\t$connections[$db]\t= @mssql_connect($config['db'][$db]['host'],$config['db'][$db]['user'],$config['db'][$db]['pass']);\n\n\t\t\tif ($connections[$db] === false)\n\t\t\t{\n\n\t\t\t\t$msg\t\t= mssql_get_last_message();\n\n\t\t\t\techo '<b>Core-Error</b>: Failed to connect to database!<br />';\n\n\t\t\t\tif (trim($msg)!='')\n\t\t\t\t\techo 'Error: '.htmlspecialchars($msg);\n\t\t\t\telse\n\t\t\t\t{\n\n\t\t\t\t\tif (trim(strtolower($config['db'][$db]['host'])) == '(local)')\n\t\t\t\t\t\t$config['db'][$db]['host']\t= 'localhost';\n\n\t\t\t\t\t// Lets see if we can establish a connection to the db-server\n\n\t\t\t\t\t$file = @fsockopen ($config['db'][$db]['host'], 80, $errno, $errstr, 10);\n\n\t\t\t\t\tif (!$file)\n\t\t\t\t\t\t$status = -1; // Site is down\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$status\t= 0;\n\t\t\t\t\t\tfclose($file);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($status == -1)\n\t\t\t\t\t\techo 'Error: #'.$errno.', '.htmlspecialchars($errstr).'';\n\t\t\t\t\telse\n\t\t\t\t\t\techo 'Error: Please check if MSSQL-service is running <b>and</b> reachable (firewall, etc.).';\n\n\t\t\t\t}\n\n\t\t\t\tif (DEBUG)\n\t\t\t\t{\n\t\t\t\t\techo '<br /><br />';\n\t\t\t\t\techo '<b>Connection-Details</b>:<br /><br />';\n\t\t\t\t\techo '<table width=\"400\">';\n\t\t\t\t\techo '<tr><td>Host:</td><td>'.htmlspecialchars($config['db'][$db]['host']).'</td></tr>';\n\t\t\t\t\techo '<tr><td>User:</td><td>'.htmlspecialchars($config['db'][$db]['user']).'</td></tr>';\n\t\t\t\t\techo '<tr><td>Password:</td><td>'.htmlspecialchars($config['db'][$db]['pass']).'</td></tr>';\n\t\t\t\t\techo '<tr><td>Database:</td><td>'.htmlspecialchars($config['db'][$db]['db']).'</td></tr>';\n\t\t\t\t\techo '</table>';\n\t\t\t\t}\n\n\t\t\t\tdie('');\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ($connections[$db]!==false)\n\t\t\tmssql_select_db($config['db'][$db]['db']);\n\n\t}", "function db_select ($db, $table, $columns = null, $where = null, $order = null, $group = null)\n{\n\tif (isset($columns)) {\n\t\tif (is_array($columns))\n\t\t\t$cols = implode ($columns, ',');\n\t\telse\n\t\t\t$cols = $columns;\n\n\t\t$key = $columns[0];\n\t\t$key = 'id';\n\t} else {\n\t\t$cols = '*';\n\t\t$key = 'id';\n\t}\n\n\t$query = \"select {$cols} from {$table}\";\n\n\tif (isset ($where)) {\n\t\tif (is_array ($where))\n\t\t\t$w = implode ($where, ' and ');\n\t\telse\n\t\t\t$w = $where;\n\t\t$query .= ' where ' . $w;\n\t}\n\n\tif (isset ($group)) {\n\t\t$query .= ' group by ' . $group;\n\t}\n\n\tif (isset ($order)) {\n\t\t$query .= ' order by ' . $order;\n\t}\n\n\t//echo \"$query;<br>\";\n\t$result = $db->query($query);\n\n\t$list = array();\n\tif ($result) {\n\t\twhile ($row = $result->fetch_array(MYSQLI_ASSOC)) {\n\t\t\t$list[$row[$key]] = $row;\n\t\t}\n\t}\n\n\t$result->close();\n\treturn $list;\n}", "public function select($table, array $fields = null);", "public function brand_select() {\n //formulate select query\n $sql = \"SELECT * FROM brands\"; \n //execute query \n return $this->db_query($sql);\n }", "function database_select($database_name)\n {\n\t return mysql_select_db($database_name, $this->database_connection);\n\t}", "abstract protected function getTable();", "public function select($table, $fields, $where, $order, $start);", "function BDDselect($sql, $param){\n $bdd = BDDopen();\n $req = $bdd->prepare($sql);\n if($req->execute($param) === FALSE){\n echo 'Errore de la requette';\n print_r($param);\n }\n return $req;\n}", "abstract public function prepareSelect();", "function showcon()\r\n {\r\n $c=$this->connector();\r\n $r='';\r\n $r.=$this->logout();\r\n $db=$_GET['db'];\r\n $tbl=$_GET['table'];\r\n $r.=\"<div id='isi'>\r\n <center><a href='?act=showtable&db=$db'>Show Tables </a></center><br />\r\n <table width=100% align='center' cellspacing=0 class='xpltab'><tr>\";\r\n \r\n $query=$this->qe(\"SELECT * FROM $db.$tbl\");\r\n $col=array();\r\n $iml=$this->qe(\"SHOW COLUMNS FROM $db.$tbl\");\r\n $r.=\"<tr>\";\r\n while ($c=mysql_fetch_assoc($iml)) {\r\n array_push($col,$c['Field']);\r\n $r.=\"<th style='border:thin solid #000;'>\".strtoupper($c['Field']).\"</th>\";\r\n }\r\n $r.=\"<th>Action</th></tr>\";\r\n while($data=mysql_fetch_row($query))\r\n {\r\n $cols=mysql_fetch_row($iml);\r\n\r\n $r.=\"<tr>\";\r\n foreach ($data as $da) {\r\n $r.=\"<td style='border-right:thin solid #f00;'>\".$da.\"</td>\";\r\n }\r\n\r\n $r.=\"<td><a href='?act=editrow&db=$db&table=$tbl&col=$col[0]&val=$data[0]'>Edit</a> | <a href='?act=delrow&db=$db&table=$tbl&col=$col[0]&val=$data[0]'>Delete</a>\";\r\n \r\n $r.=\"</td></tr>\";\r\n }\r\n $r.= \"</table><br /><center><a href='?act=insertrow&db=$db&table=$tbl'><input type='button' id='but' value='Insert Row'></a></center>\".$this->sqlcommand().\"</div>\";\r\n $this->free($query);\r\n $this->free($iml);\r\n return $r;\r\n }", "public function table($tbl){\n if(empty($this->tbl)){\n $this->tbl = $tbl;\n $this->query = r\\table($tbl);\n $this->old_state = $this->query;\n }\n }", "function logs_tbl()\n {\n // SELECT \n }", "function db_selectData($query)\n\t{\n\t$this->OpenLink();\n\t$this->SelectDB();\n\t$this->query=$query;\n\t$this->result= mysqli_query($this->link,$this->query);\n\treturn $this->result;\n\t\n\t}", "function make_db_current($tables = 'all')\n {\n }", "function Dbtable($dbhost=false, $dbuser=false, $dbpassword=false, $dbname=false){\n\t\tif($dbhost){\n\t\t\t$this->_customDb = true;\n\t\t\t$this->dbhost = $dbhost;\n\t\t\t$this->dbuser = $dbuser;\n\t\t\t$this->dbpassword = $dbpassword;\n\t\t\t$this->dbname = $dbname;\n\t\t}\n\t\t$this->qryStr = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : NULL;\n\t\tparse_str($this->qryStr, $this->qryCurr); //current url\n\t\t$this->qryUrl = $this->qryCurr;\n\t\t$this->imagePath = array();\n\t}", "function show($dbname=null, $type=null){\n //\n $this->bind_arg('dbname', $dbname);\n $this->try_bind_arg(\"type\", $type);\n //\n //Get the involved database\n sql::get_dbase($dbname);\n //\n //Get the fields \n $fields= $this->fields->get_array();\n //\n //Execute this sql \n $array= $this->get_sql_data($dbname);\n //\n //Ouptut a table\n echo \"<table name='{$this->entity->name}'>\";\n echo $this->header();\n //\n //Loop through the array and display the results in a table \n foreach ($array as $row) {\n //\n //The id should be the primary value \n $id=$this->entity->name;\n //\n echo \"<tr onclick='record.select(this)' id='$row[$id]'>\";\n //\n //Step through the columns\n foreach($fields as $field){\n //\n //Get the indexes of the field\n $name= is_null($field->alias) ? $field->column->name:$field->alias;\n //\n //Get the field value\n $value = $row[$name];\n \n echo $field->show($value);\n \n }\n \n echo \"</tr>\";\n }\n echo \"</table>\";\n \n \n }", "function select($table)\n {\n $query = $this->db->get($table);\n\t\treturn $query->result();\n }", "public function getDb();", "public function hack($tabel){\n\t\t$this->db->select('*');\n\t\t$this->db->from($tabel);\n\t\t$this->show($this->db->get()); // SELECT * FROM $tabel;\t\n\t}", "function show($dbname=null, $type=null){\n $this->bind_arg('dbname', $dbname);\n $this->try_bind_arg(\"type\", $type);\n //\n //Execute this sql \n $array= $this->get_sql_data($this->dbname);\n //\n //Ouptut a table\n echo \"<table id='fields' name='{$this->entity->name}'>\";\n echo '<thead>';\n echo $this->header();\n echo '</thead>';\n echo '<tbody id=\"table-body\">';\n //\n //Loop through the array and display each row as a tr element\n foreach ($array as $row) {\n $id= \"{$this->entity->name}\";\n //\n echo \"<tr onclick='record.select(this)' id='$id'>\";\n //\n //loop through the column and out puts its td element.\n foreach ($this->entity->columns as $col){\n //\n //Get the value from the row, remebering that the row is indexed\n //by column name\n $value = $row[$col->name];\n //\n //\n echo $col->show($value);\n }\n //\n echo \"</tr>\";\n }\n \n echo \"</tbody>\";\n echo \"</table>\";\n \n \n }", "public function select_db($database = \"\") {\r\n\t\tif ($database == \"\") {\r\n\t\t\t$database = $this->DATABASE;\r\n\t\t}\r\n\t\t\r\n\t\tif ($database != \"\") {\r\n\t\t\tif (! @mysql_select_db ( $database, $this->conn )) {\r\n\t\t\t\t$this->log_error ( @mysql_error () );\r\n\t\t\t\tdie ( 'Error selecting database ' . $database );\r\n\t\t\t} else {\r\n\t\t\t\t// Successful\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function getSelectStatement($db, $params, $onlyCount) {\n\n\t\t$tableName = $db->escape_string($params[0], $db);\n\t\t$tableNameWithPrefix = $_ENV[\"table_prefix\"] . $tableName;\n\n\t\tif ($onlyCount) {\n\t\t\t$sqlQuery = \"select count(*) from `$tableNameWithPrefix`\";\n\t\t\t//if (isset($params[1])) {\n\t\t\t\t$sqlQuery .= $this->getFilter($db, $tableName, $params[1]);\n\t\t\t//}\n\t\t} else {\n\t\t\tif ($tableName == \"users\") {\n\t\t\t\t// change password to a dummy value\n\t\t\t\t$sqlQuery = \"SELECT id, username, 'dummy' as `password`, firstname, lastname, email, id_team, rights FROM `$tableNameWithPrefix`\";\n\t\t\t} else if ($tableName == \"play_table\") {\n\t\t\t\t$sqlQuery = \"select @rownum:=@rownum+1 as rank, t.*,\"\n\t\t\t\t\t\t. \" (t.wins * 3 + t.stand_off) as points,\"\n\t\t\t\t\t\t. \" (t.shoot - t.got) as goals_diff, \"\n\t\t\t\t\t\t. \" concat(shoot, ':', got) as goals\"\n\t\t\t\t\t\t. \" from `$tableNameWithPrefix` t, (SELECT @rownum:=0) r\";\n\t\t\t} else if ($tableName == \"player_match\") {\n\t\t\t\t$sqlQuery = \"select PM.*, SP.id_saison_team from `$tableNameWithPrefix` PM\"\n\t\t\t\t\t\t. \" left join `\" . $_ENV[\"table_prefix\"] . \"saison_player` SP on SP.id = PM.id_saison_player\";\n\t\t\t} else {\n\t\t\t\t$sqlQuery = \"select * from `$tableNameWithPrefix`\";\n\t\t\t}\n\n\t\t\t// set filter\n\t\t\t//if (isset($params[5])) {\n\t\t\t\t$sqlQuery .= $this->getFilter($db, $tableName, $params[5]);\n\t\t\t//}\n\n\t\t\t// set order\n\t\t\tif ($tableName == \"play_table\") {\n\t\t\t\t$sqlQuery .= \" order by points desc, goals_diff desc, t.shoot desc\";\n\t\t\t} else {\n\t\t\t\tif (isset($params[1]) && isset($params[2])) {\n\n\t\t\t\t\t$sortField = $params[1];\n\t\t\t\t\t$sortOrder = $params[2];\n\n\t\t\t\t\t$sqlQuery .= \" order by $sortField $sortOrder\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// set limit\n\t\t\tif (isset($params[3]) && isset($params[4])) {\n\t\t\t\t$firstIndex = $params[3];\n\t\t\t\t$maxRows = $params[4] - $firstIndex;\n\n\t\t\t\t$sqlQuery .= \" limit $firstIndex, $maxRows\";\n\t\t\t}\n\t\t}\n\t\t//\techo $sqlQuery;\n\t\treturn $sqlQuery;\n\t}", "function browseTable($ar){\n $p = new XParam($ar, array('tplentry'=>'br'));\n $boid = $p->get('boid');\n $tplentry = $p->get('tplentry');\n $options = $p->get('options');\n $x = XDataSource::objectFactory8($boid);\n $lar = array('options'=>$options, '_options'=>array('local'=>true), 'pagesize'=>9999, 'first'=>0, 'selectedfields'=>'all', 'tplentry'=>$tplentry);\n $x->browse($lar);\n }", "public function selectDB($squema) {\r\n\t\tmysql_select_db($squema, $this->connection);\r\n\t}", "function dbSelect() {\n global $con, $dbname;\n $selected = mysqli_select_db($con, $dbname);\n if(!$selected) {\n throw new Exception('<font color=\"white\">Could not select '.$dbname.'</font>');\n }\n}", "public function cpSelect($tablename,$value1=0,$value2=0) {\n /*\n * Prepare the select statement\n */\n $sql=\"SELECT * FROM $tablename\";\n if($value1!=0)\n { $key1= key($value1);\n $sql.=\" where $key1='$value1[$key1]'\";\n }\n if($value1!=0 && $value2!=0) \n {\n $key2= key($value2);\n $sql.=\" AND $key2='$value2[$key2]'\";\n }\n \n $sth = $this->dbh->prepare($sql);\n $sth->execute();\n $result = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n \n}", "function showtable()\r\n {\r\n $c=$this->connector();\r\n $r='';\r\n $r.=$this->logout();\r\n $r.=\"<div id='isi'>\r\n <center><a href='?act=mysql'>Show Database</a></center><br />\r\n <table width=50% align='center' class='xpltab' cellspacing=0 ><tr><th style='border-left:thin solid #f00;'>Table</th><th>Column count</th><th>Dump</th><th>Drop</th></tr>\";\r\n $db=$_GET['db'];\r\n $query=$this->qe(\"SHOW TABLES FROM $db\");\r\n while($data=mysql_fetch_array($query))\r\n {\r\n\r\n $iml=$this->qe(\"SHOW COLUMNS FROM $db.$data[0]\");\r\n $h=(mysql_num_rows($iml))?mysql_num_rows($iml):0;\r\n $r.= \"<tr><td><a href='?act=showcon&db=$db&table=$data[0]'>$data[0]</td><td>$h</td><td><a href='?act=downdb&db=$db&table=$data[0]'>Dump</a></td><td><a href='?act=dropdb&db=$db&tbl=$data[0]'>Drop</a></td></tr>\";\r\n \r\n }\r\n \r\n $r.= \"</table>\".$this->sqlcommand().\"</div>\";\r\n return $r;\r\n $this->free($query);\r\n $this->free($iml);\r\n mysql_close($c);\r\n }", "public static function get($db_type='')\n {\n if ($db_type == \"master\")\n {\n static $mdb = null;\n if ( $mdb == null )\n $mdb = new DBConnection($db_type);\n return $mdb;\n }\n else\n {\n static $sdb = null;\n if ( $sdb == null )\n $sdb = new DBConnection($db_type);\n return $sdb;\n }\n\n }", "public function select_data($tbl_name, $where=\"\", $other=\"\")\n\t\t{\n\t\t\t$query = \"SELECT * FROM $tbl_name\";\n\t\t\tif($where != \"\")\n\t\t\t{\n\t\t\t\t$query .= \" WHERE $where\";\n\t\t\t}\n\t\t\tif($other != \"\")\n\t\t\t{\n\t\t\t\t$query .= \" $other\";\n\t\t\t}\n\t\t\treturn $query;\n\t\t}", "public function selectAllactor() {\n\t\t$this->dbAdapter->dbOpen();\n\t\t$result = $this->dbAdapter->actorSelectAll();\n\t\t$this->dbAdapter->dbClose();\n\t\t$this->error = $this->dbAdapter->lastError();\n\t\t\n\t\treturn $result;\t\t\n\t}", "function buildSelect($db_name,$table_name,$columns,$where_select){\n\n\t$query_select = \"SELECT \";\n\t//FILL COLUMNS FOR GET\n\tforeach ($columns as $c) {\n\t\t$query_select .= $c;\n\t\tif(array_search($c,$columns) != count($columns) - 1) $query_select .= \",\";\n\t}\n\tif($where_select != \"*\"){//GET \n\t\t//INTERMEDIATE\n\t\t$query_select .= \" FROM $table_name WHERE \";\n\t\t//FILL VALUES WHERE\n\t\tend($where_select);\n\t\t$last_key = key($where_select);\n\t\tforeach ($where_select as $key => $value) {\n\t\t\t$query_select .= $key . \"=\" . \":\" . $key;\n\t\t\tif($key != $last_key) $query_select .= \" AND \";\n\t\t}\n\t\texecuteQuery(\"USE $db_name\");\n\t\treturn executeQuery($query_select,$where_select);\n\t}\n\telse{//GET ALL SELECT\n\t\t//INTERMEDIATE\n\t\t$query_select .= \" FROM $table_name\";\n\t\texecuteQuery(\"USE $db_name\");\n\t\treturn executeQuery($query_select,\"*\");\n\t}\n\n}", "public static function db($database);", "function selecting($table='', $fields='*', ...$get_args) { \n\t\t$getfromtable = $this->fromtable;\n\t\t$getselect_result = $this->select_result; \n\t\t$getisinto = $this->isinto;\n \n\t\t$this->fromtable = null;\n\t\t$this->select_result = true;\t\n\t\t$this->isinto = false;\t\n \n $skipwhere = false;\n $wherekeys = $get_args;\n $where = '';\n\t\t\n if ( ! isset($table) || $table=='' ) {\n $this->setParamaters();\n return false;\n }\n \n $columns = $this->to_string($fields);\n \n\t\tif (isset($getfromtable) && ! $getisinto) \n\t\t\t$sql=\"CREATE TABLE $table AS SELECT $columns FROM \".$getfromtable;\n elseif (isset($getfromtable) && $getisinto) \n\t\t\t$sql=\"SELECT $columns INTO $table FROM \".$getfromtable;\n else \n\t\t\t$sql=\"SELECT $columns FROM \".$table;\n\n if (!empty($get_args)) {\n\t\t\tif (is_string($get_args[0])) {\n $args_by = '';\n $groupbyset = false; \n $havingset = false; \n $orderbyset = false; \n\t\t\t\tforeach ($get_args as $where_groupby_having_orderby) {\n if (strpos($where_groupby_having_orderby,'WHERE')!==false ) {\n $args_by .= $where_groupby_having_orderby;\n $skipwhere = true;\n } elseif (strpos($where_groupby_having_orderby,'GROUP BY')!==false ) {\n $args_by .= ' '.$where_groupby_having_orderby;\n $groupbyset = true;\n } elseif (strpos($where_groupby_having_orderby,'HAVING')!==false ) {\n if ($groupbyset) {\n $args_by .= ' '.$where_groupby_having_orderby;\n $havingset = true;\n } else {\n $this->setParamaters();\n return false;\n }\n } elseif (strpos($where_groupby_having_orderby,'ORDER BY')!==false ) {\n $args_by .= ' '.$where_groupby_having_orderby; \n $orderbyset = true;\n }\n }\n if ($skipwhere || $groupbyset || $havingset || $orderbyset) {\n $where = $args_by;\n $skipwhere = true;\n }\n\t\t\t}\t\t\n\t\t} else {\n $skipwhere = true;\n } \n \n if (! $skipwhere)\n $where = $this->where( ...$wherekeys);\n \n if (is_string($where)) {\n $sql .= $where;\n if ($getselect_result) \n return (($this->getPrepare()) && !empty($this->getParamaters())) ? $this->get_results($sql, OBJECT, true) : $this->get_results($sql); \n else \n return $sql;\n } else {\n $this->setParamaters();\n return false;\n } \n }", "private function selectTable(){\n\t\tView::show(\"user/seleccionaTablas\");\n\t}", "public abstract function getDbTable();", "static function loadDb($table) {\n $tab = new self($table);\n $cols = stdDB::selectArray(\"SHOW COLUMNS FROM `$table`\");\n foreach($cols as $col)\n $tab->cols[$col['Field']] = new schemaColumn($col['Field'],$col['Type'],\n $col['Null'], $col['Default'], $col['Extra']);\n $rows = stdDB::selectArray(\"SHOW INDEX FROM `$table`\");\n $idxrow = array(); $idxs = array();\n foreach($rows as $row){\n $idxrow[$row[\"Key_name\"]][] = $row[\"Column_name\"];\n $idxs[$row[\"Key_name\"]] = $row;\n }\n foreach($idxs as $k=>$row) {\n $tab->idx[$k] = new schemaIndex($k, $idxrow[$k],\n $row['Non_unique'], $row['Sub_part']);\n }\n return $tab;\n }", "function get( $db ,$table ,$input )\n{\n\n\tif( array_key_exists( 'cmd' ,$input ) )\n\t{\n\t\t//fixme fare confronto lovercase del cmd, per evitare stupidi problemi case sensitive\n\t\t$cmd= strtolower( $input['cmd'] );\n\t\t//$cmd= $input['cmd'];\t\t\n\t\n\n\t\tif( $cmd == 'gettable' )\n\t\t\treturn $table;\t\t\t\n\n\t\tif( $cmd == 'currenttable' )\n\t\t\treturn $db->currentTable( );\t\t\n\n\n\n\t\tif( $cmd == 'getall' )\n\t\t\treturn $db->tableGetAll( $table ,$input );\t\t\t\n\n\t\t//?cmd=getOne&rowid=99\n\t\tif( $cmd == 'getone' )\n\t\t\treturn $db->tableGetOne( $table ,$input );\t\t\t\n\n\t\tif( $cmd == 'columns' )\n\t\t\treturn $db->tableDescribe( $table );\n\n\n\t\tif( $cmd == 'tables' )\n\t\t\treturn $db->tableTables( $table );\n\n\n\t\t//?cmd=count\n\t\tif( $cmd == 'count' )\n\t\t\treturn $db->tableGetCount( $table ,$input );\n\n\t\t//?cmd=autocomeplete&column=nome&word=pi &limit=10\n\t\tif( $cmd == 'autocomplete' )\n\t\t\treturn $db->tableAutocomplete( $table ,$input );\n\n\n\t\t//if( $cmd == strtolower('getAllArray') )\n\t\t//\treturn $db->tableGetAll( $table ,$input ,true ) ;\n\n\n\t\tif( array_key_exists( 'cmd' ,$input ) )\n\t\t\treturn $db->restDie( -1 ,\"get.parametro cmd: funzione corrispondente al parametro cmd non trovata\" );\n\t}\n\n\t//return $db->tableGetAll( $table ,$input ) ;\n\t\n\n\t\n\t$f= \"gui.php\"; //se questo presente, servilo e termina\n\tif( file_exists( $f ) )\n\t{\n\t\tinclude( $f );\n\t\tdie( \"\");\n\t}\n\n\t$f= \"gui.html\";//se questo presente, servilo e termina\n\tif( file_exists( $f ) )\n\t{\n\t\tinclude( $f );\n\t\tdie( \"\");\n\t}\n\n\n\n}", "function Sql_DB_Create($db=\"\")\n {\n $query=$this->DB_Create_Query($db);\n $this->DB_Query($query);\n }", "function get_db( $db = null ) {\n\n\t\tif ( $db == null && !is_null($this->db) ) {\n\t\t\treturn $this->db;\n\t\t}\n\n\t\tif ( is_object( $db ) ) {\n\t\t\t$db = $db->name;\n\t\t}\n\t\t\n\t\t\n\t\tif ( !array_key_exists( $db, $this->dbs ) ) {\n\t\t\t$this->error( 'Invalid Database', 404 );\n\t\t}\n\n\t\treturn $this->dbs[$db];\n\n\t}", "public function select($table_name, $fields = array(), $where = array(), $order_by = '')\r\n {\r\n }", "abstract protected function fetchTableNamesDb();", "public function SetFromDB($db){\r\n\t\t$this->db=$db;\r\n\t}", "protected static function db(){\n\t\treturn DatabasePDO::getCurrentpdo();\n\t}" ]
[ "0.6528299", "0.6523396", "0.6441326", "0.6288948", "0.62825274", "0.6281867", "0.62785035", "0.6225119", "0.61457175", "0.61379474", "0.6058814", "0.60488206", "0.6018403", "0.6014407", "0.59870315", "0.5964312", "0.5956833", "0.59456414", "0.5869428", "0.58607244", "0.57583016", "0.5716278", "0.57056075", "0.565631", "0.56534374", "0.5633263", "0.561958", "0.5602415", "0.55818355", "0.55693704", "0.55599546", "0.5558588", "0.55498946", "0.5541788", "0.5528788", "0.5510161", "0.54967576", "0.54907584", "0.54907584", "0.54907584", "0.54547477", "0.54376525", "0.54211134", "0.5420595", "0.5415749", "0.54114664", "0.5393542", "0.53812426", "0.53782845", "0.53703874", "0.5369249", "0.5361462", "0.53596896", "0.5345107", "0.53397197", "0.53223354", "0.5318448", "0.5290506", "0.5288725", "0.5288515", "0.5280458", "0.5277912", "0.52752", "0.52727556", "0.5271464", "0.5269018", "0.52622855", "0.5253868", "0.5250152", "0.52437663", "0.52309823", "0.52294964", "0.5227483", "0.5225661", "0.52249706", "0.5224285", "0.52099425", "0.5208172", "0.5208066", "0.5200499", "0.51982176", "0.5182743", "0.51728183", "0.51655614", "0.516062", "0.5160012", "0.5159056", "0.51518834", "0.5149472", "0.514849", "0.5146377", "0.51346004", "0.5133402", "0.51332897", "0.51314545", "0.51267564", "0.511005", "0.51055384", "0.51049894", "0.5104619" ]
0.7610733
0
Return an instance of DOMDocument constructed with the property of results
Вернуть экземпляр DOMDocument, созданный с свойством результатов
protected function getDom() { if (! isset($this->dom)) { $dom = new DOMDocument(); if (is_null($this->getResults())) { throw new \RuntimeException('There doesnt appear to be any results to load'); } // suppress warning but throw Exception if (! @$dom->loadXML($this->getResults())) { throw new \RuntimeException('Could not load results into DOMDocument'); } $this->dom = $dom; } return $this->dom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function createDomDocument()\n {\n $document = new DOMDocument('1.0', 'utf-8');\n $document->preserveWhiteSpace = false;\n $document->formatOutput = true;\n\n return $document;\n }", "private static function createDomDocument()\n {\n $document = new DOMDocument('1.0', 'utf-8');\n $document->preserveWhiteSpace = false;\n $document->formatOutput = true;\n\n return $document;\n }", "public function executeDom()\n {\n $xml = $this->execute();\n\n // create new DOMDocument and load the response text.\n $dom = new \\DOMDocument();\n $dom->loadXML($xml);\n\n return $dom;\n }", "public function createQuery() {\n return new XML\\DOM();\n }", "public function getDomDocument() {}", "public function getDOMDocumentObject() {\n if (!(isset($this->_domDocument) && $this->_domDocument instanceof DOMDocument)) {\n $this->_domDocument = new DOMDocument;\n $this->_domDocument->preserveWhiteSpace = FALSE;\n }\n return $this->_domDocument;\n }", "public function toDomDocument() : DOMDocument\n {\n $document = new DOMDocument();\n $document->appendChild($this->toDomElement($document));\n return $document;\n }", "protected function load_dom()\n\t{\n\t\tif ($this->dom)\n\t\t{\n\t\t\treturn $this->dom;\n\t\t}\n\n\t\t$output = $this->ci->output->get_output();\n\n\t\t$this->dom = new DOMDocument;\n\t\tlibxml_use_internal_errors(TRUE);\n\t\t$this->dom->loadHTML($output);\n\t\tlibxml_clear_errors();\n\n\t\treturn $this->dom;\n\t}", "public function getDOMDocument(): DOMDocument\n {\n $dom = new DOMDocument();\n\n $dom->loadXML($this->document);\n return $dom;\n }", "public function createXmlDocument()\n {\n $dom = new \\DOMDocument('1.0');\n $dom->formatOutput = true;\n\n return $dom;\n }", "public function __construct (DOMDocument $doc) {}", "public function __construct(DomDocument $dom) {\n $this->totalResultsAvailable = (int) $dom->documentElement->getAttribute('totalResultsAvailable');\n $this->totalResultsReturned = (int) $dom->documentElement->getAttribute('totalResultsReturned');\n $this->firstResultPosition = (int) $dom->documentElement->getAttribute('firstResultPosition');\n\n $this->_dom = $dom;\n \t$this->_xpath = new DOMXPath($dom);\n\n \t$this->_xpath->registerNamespace(\"yh\", $this->_namespace);\n\n \t$this->_results = $this->_xpath->query(\"//yh:Result\");\n }", "public static function from_dom(DOMElement $dom) {\n\t\t$xrd = new XRD();\n\n\t\tforeach ($dom->childNodes as $node) {\n\t\t\tif (!isset($node->tagName)) continue;\n\n\t\t\tswitch($node->tagName) {\n\t\t\t\tcase 'Expires':\n\t\t\t\t\t$xrd->expires = $node->nodeValue;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Subject':\n\t\t\t\t\t$xrd->subject = $node->nodeValue;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Alias':\n\t\t\t\t\t$xrd->alias[] = $node->nodeValue;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Property':\n\t\t\t\t\t$property = XRD_Property::from_dom($node);\n\t\t\t\t\t$xrd->property[] = $property;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Link':\n\t\t\t\t\t$link = XRD_Link::from_dom($node);\n\t\t\t\t\t$xrd->link[] = $link;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $xrd;\n\t}", "public function create($source) {\n $markup = $this->markupProvider->getMarkup($source);\n $domDocument = new DOMDocument();\n $domDocument->formatOutput=false;\n $domDocument->preserveWhiteSpace=false;\n @$domDocument->loadHTML($markup, LIBXML_HTML_NODEFDTD);\n return $domDocument;\n }", "public function toDOM() {\n\t\treturn self::hashToDomDocument($this->toHash(), 'Factuurmaand');\n\t}", "public function to_dom($dom = null) {\n\t\tif ($dom == null) {\n\t\t\t$dom = new DOMDocument();\n\t\t}\n\n\t\t$xrd_dom = $dom->createElementNS(XRD::XML_NS, 'XRD');\n\t\t$dom->appendChild($xrd_dom);\n\n\t\tif ($this->expires) {\n\t\t\t$expires_dom = $dom->createElement('Expires', $this->expires);\n\t\t\t$xrd_dom->appendChild($expires_dom);\n\t\t}\n\n\t\tif ($this->subject) {\n\t\t\t$subject_dom = $dom->createElement('Subject', $this->subject);\n\t\t\t$xrd_dom->appendChild($subject_dom);\n\t\t}\n\n\t\tforeach ($this->alias as $alias) {\n\t\t\t$alias_dom = $dom->createElement('Alias', $alias);\n\t\t\t$xrd_dom->appendChild($alias_dom);\n\t\t}\n\n\t\tforeach ($this->property as $property) {\n\t\t\t$property_dom = $property->to_dom($dom);\n\t\t\t$xrd_dom->appendChild($property_dom);\n\t\t}\n\n\t\tforeach ($this->link as $link) {\n\t\t\t$link_dom = $link->to_dom($dom);\n\t\t\t$xrd_dom->appendChild($link_dom);\n\t\t}\n\n\t\treturn $dom;\n\t}", "public function __construct(DOMElement $result)\n {\n $this->_fields = ['Summary', 'MimeType', 'ModificationDate'];\n parent::__construct($result);\n\n $this->_xpath = new DOMXPath($result->ownerDocument);\n $this->_xpath->registerNamespace('yh', $this->_namespace);\n\n // check if the cache section exists\n $cacheUrl = $this->_xpath->query('./yh:Cache/yh:Url/text()', $result)->item(0);\n if ($cacheUrl instanceof DOMNode)\n {\n $this->CacheUrl = $cacheUrl->data;\n }\n $cacheSize = $this->_xpath->query('./yh:Cache/yh:Size/text()', $result)->item(0);\n if ($cacheSize instanceof DOMNode)\n {\n $this->CacheSize = (int) $cacheSize->data;\n }\n }", "public function getDocument(): Document {\n $document = new Document($this->_document->xmlVersion, $this->_document->xmlEncoding);\n foreach ($this->_document->childNodes as $node) {\n $this->addNode($document, $node);\n }\n return $document;\n }", "public function __toDOM() {\n // Basically, use a JSX-ish syntax to do so and just\n // return the DOM fragment that had been built.\n // A DOM interpreter will turn that into an actual HTML\n // output. Something that could be used here is caching, where\n // a presenter could mark itself as being cacheable OR it\n // could dynamicaly allocate cached states of itself and just skip\n // processing itself entirely. It may only do so for fragments within too.\n return (<div class=\"articles\">\n // ...\n </div>);\n }", "public function __construct (DomDocument $doc) {}", "protected function createResultObject() {\n\t\t$result = new Result();\n\t\treturn $result;\n\t}", "public function getDocument() {\n $document = new Document();\n $document->registerNamespace('json', self::XMLNS_JSONX);\n $this->addNode($document, $this->_document->documentElement);\n return $document;\n }", "function htmlSoupToDOMDocument($html, $logPrefix = null) {\n $prevUseExtErrorsVal = libxml_use_internal_errors(true);\n\n $dom = new DOMDocument();\n $dom->loadHTML($html);\n\n # Output (if requested) and then clear the errors that libxml produced...\n if ($logPrefix !== null) {\n # TODO: We should not be directly accessing logging library here!\n foreach (libxml_get_errors() as $error) warn($logPrefix . \": \" . trim($error->message));\n }\n libxml_clear_errors();\n\n libxml_use_internal_errors($prevUseExtErrorsVal);\n return $dom;\n}", "private static function getDoc()\r\n {\r\n if (self::$docXML == null) {\r\n self::$docXML = new \\DOMDocument();\r\n self::$docXML->load(XML_SLIDER);\r\n }\r\n \r\n return self::$docXML;\r\n }", "protected function _as_doc($result){\n return new CouchDocument($this, $result);\n }", "private function createXmlDocument($html)\n {\n $xmlDocument = new \\DOMDocument;\n $xmlDocument->strictErrorChecking = false;\n $xmlDocument->formatOutput = true;\n $libXmlState = libxml_use_internal_errors(true);\n $xmlDocument->loadHTML($this->unifyHtml($html));\n libxml_clear_errors();\n libxml_use_internal_errors($libXmlState);\n\n $this->ensureExistenceOfBodyElement($xmlDocument);\n\n return $xmlDocument;\n }", "public function getDomDocument()\n {\n return $this->xmlDocument;\n }", "private function getNodesFromQueryResult($propResult, $node=null){\t\n\t\tif(is_array($propResult)){\n\t\t\tforeach ($propResult as $value){\n\t\t\t\t $values[] = new Node($value['fulltext'], $value['fullurl'], $node);\n\t\t\t}\n\t\t}\n\t\treturn $values;\n\t}", "public function toDOM() {\n\t\treturn self::hashToDomDocument($this->toHash(), 'Representacions');\n\t}", "protected function dom_init() {\r\n\t\t\r\n\t\t// severe hack!\r\n\t\t//$this->code = preg_replace(' xmlns=\"[^\"]*?\"', '', $this->code);\r\n\t\t/*print('XXX9o9beep19o9XXX\r\n');\r\n\t\tprint('$this->code in dom_init: ' . $this->code);\r\n\t\tprint('\r\nXXX9o9beep29o9XXX\r\n');*/\r\n\t\tif($this->dom) {\r\n\t\t\treturn $this->xpath_init();\r\n\t\t}\r\n\t\tif($this->xpath) {\r\n\t\t\t$this->xpath = false;\r\n\t\t}\r\n\t\t// HTML5?\r\n\t\tif($this->config['use_local_DTD']) {\r\n\t\t\tpreg_match('/(<!DOCTYPE\\s*html\\s*PUBLIC\\s*\"[^\"]*\"\\s*\")([^\"]*)(\">)/is', $this->code, $matches);\r\n\t\t\t$this->temp_DTD_file = $matches[2];\r\n\t\t\t$this->code = str_replace($matches[1] . $matches[2] . $matches[3], $matches[1] . DTD::getDTDfile() . $matches[3], $this->code);\r\n\t\t}\r\n\t\t//print('this->config[\\'encoding\\'] 1: ');var_dump($this->config['encoding']);\r\n\t\t//ReTidy::updateEncoding();\r\n\t\t//ReTidy::convert_to($this->config['encoding']);\r\n\t\t//print('this->config[\\'encoding\\'] 2: ');var_dump($this->config['encoding']);\r\n\t\t//$this->dom = new DOMDocument('1.0', $this->config['encoding']);\r\n\t\t//$this->dom = new DOMDocument('1.0', $this->config['encoding']);\r\n\t\t$this->dom = new DOMDocument('1.0', 'utf-8');\r\n\t\tif(!$this->dom) {\r\n\t\t\t$this->logMsg(self::$lang['dom_init_error']);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->dom->resolveExternals = true;\r\n\t\t\r\n\t\t//$this->dom->preserveWhiteSpace = false;\r\n\t\tif(!$this->dom->loadXML($this->code)) {\r\n\t\t\t$this->dom->loadHTML($this->code);\r\n\t\t}\r\n\t\t//$this->dom->formatOutput = true;\r\n\t\t//if(isset($this->config['encoding'])) {\r\n\t\t//\t// this should be set by cleanCode\r\n\t\t//\t$this->dom->encoding = $this->config['encoding'];\r\n\t\t//} else {\r\n\t\t//\t$this->dom->encoding = 'iso-8859-1';\r\n\t\t//}\r\n\r\n\t\t$this->logMsg('dom_init = true');\r\n\t\treturn $this->xpath_init();\r\n\t}", "public function getDocument(){\n $this->endElement();\n $this->endDocument();\n return $this->outputMemory();\n }", "public function toDOM() {\n\t\treturn self::hashToDomDocument($this->toHash(), 'Tchat');\n\t}", "protected function loadNlmxmlDom()\n {\n $this->nlmxmlDom = new DOMDocument;\n return $this->nlmxmlDom->loadXML(file_get_contents($this->inputFile));\n }", "private static function _get_parsed_dom($content) {\n $dom = new DOMDocument();\n libxml_use_internal_errors(TRUE);\n $dom->loadHTML($content);\n $libxml_errors = libxml_get_errors();\n $actual_errors = array();\n foreach ($libxml_errors as $error) {\n if ($error->level == LIBXML_ERR_ERROR || $error->level == LIBXML_ERR_FATAL) {\n $msg = $error->message;\n $line = $error->line;\n self::$error_msg[] = \"HTML Parse Error: $msg (Line $line)\";\n }\n }\n libxml_clear_errors(); // clear error buffer\n if (count($actual_errors) !== 0) {\n return new DOMDocument();\n }\n return $dom;\n }", "public function document(): DocumentNode\n {\n return ASTHelper::cloneNode($this->documentNode);\n }", "public function getDOMDocumentFromContent($content = '')\n {\n libxml_use_internal_errors(true);\n\n $doc = new \\DOMDocument();\n $doc->loadHTML($content);\n\n libxml_use_internal_errors(false);\n\n return $doc;\n }", "public function build()\n {\n if(($document = $this->getDocument()) === null) {\n $document = $this->loader->getInstance(NodeLoader::DOCUMENT_NODE);\n $this->setDocument($document);\n }\n\n if(($header = $document->getHeader()) === null) {\n $header = $this->loader->getInstance(NodeLoader::HEADER_NODE);\n $document->setHeader($header);\n }\n\n if(($supplier = $header->getSupplier()) === null) {\n $supplier = $this->loader->getInstance(NodeLoader::SUPPLIER_NODE);\n $header->setSupplier($supplier);\n }\n\n if(($catalog = $header->getCatalog()) === null) {\n $catalog = $this->loader->getInstance(NodeLoader::CATALOG_NODE);\n $header->setCatalog($catalog);\n }\n\n if(($datetime = $catalog->getDateTime()) === null) {\n $datetime = $this->loader->getInstance(NodeLoader::DATE_TIME_NODE);\n $catalog->setDateTime($datetime);\n }\n\n if(($newCatalog = $document->getNewCatalog()) === null) {\n $newCatalog = $this->loader->getInstance(NodeLoader::NEW_CATALOG_NODE);\n $document->setNewCatalog($newCatalog);\n }\n\n return $document;\n }", "public function read() {\n if ($this->_expires > 0) {\n $name = preg_replace(\n '([^A-Za-z\\d]+)', '_', get_class($this->_source)\n );\n $cacheData = $this->_cache->read(\n $name, $this->_identifier, $this->_expires\n );\n if ($cacheData) {\n $dom = new \\DOMDocument();\n $dom->loadXml($cacheData);\n return $dom;\n } else {\n $dom = $this->_source->read();\n $this->_cache->write(\n $name, $this->_identifier, $this->_expires, $dom->saveXml()\n );\n return $dom;\n }\n }\n return NULL;\n }", "function getXMLResult($sql) {\n\t\tif ((! $res = $this->goSQL ( $sql )) || ($res->num_rows == 0))\n\t\t\treturn false;\n\t\t$xml = new XMLWriter ();\n\t\t$xml->openMemory ();\n\t\t$xml->startDocument ( \"1.0\", \"UTF-8\" );\n\t\t$xml->startElement ( \"items\" );\n\t\twhile ( $item = $res->fetch_assoc () ) {\n\t\t\t$xml->startElement ( \"item\" );\n\t\t\tforeach ( $item as $key => $value ) {\n\t\t\t\t$xml->writeElement ( $key, $value );\n\t\t\t}\n\t\t\t$xml->endElement ();\n\t\t}\n\t\t$xml->endElement ();\n\t\treturn $xml->outputMemory ();\n\t}", "function toXml() {\n $domtree = new DOMDocument('1.0', 'UTF-8');\n $this->addSelfToDocument($domtree, $domtree);\n return $domtree->saveXML();\n }", "public function getDomDocument($value)\n {\n if (is_array($value)) {\n $df = $this->createDocument($value);\n if ($df->hasChildNodes()) $this->doc->appendChild($df->cloneNode(true));\n return $this->doc;\n }\n else {\n\n }\n }", "public static function generate() {\n\t\tstatic::$document = new DOMDocument('1.0', 'UTF-8');\n\t\t\n\t\t// create our rss feed\n\t\t$rss = static::element('rss', null, array('version' => '2.0'));\n\t\tstatic::$document->appendChild($rss);\n\t\t\n\t\t// create channel\n\t\t$channel = static::element('channel');\n\t\t$rss->appendChild($channel);\n\t\n\t\t\t// title\n\t\t\t$title = static::element('title', Config::get('metadata.sitename'));\n\t\t\t$channel->appendChild($title);\n\n\t\t\t// link\n\t\t\t$link = static::element('link', 'http://' . $_SERVER['HTTP_HOST']);\n\t\t\t$channel->appendChild($link);\n\n\t\t\t// description\n\t\t\t$description = static::element('description', Config::get('metadata.description'));\n\t\t\t$channel->appendChild($description);\n\n\t\t// articles\n\t\t$params = array('status' => 'published', 'sortby' => 'id', 'sortmode' => 'desc');\n\n\t\tforeach(Posts::list_all($params) as $post) {\n\t\t\t$item = static::element('item');\n\t\t\t$channel->appendChild($item);\n\n\t\t\t\t// title\n\t\t\t\t$title = static::element('title', $post->title);\n\t\t\t\t$item->appendChild($title);\n\t\t\n\t\t\t\t// link\n\t\t\t\t$url = 'http://' . $_SERVER['HTTP_HOST'] . Url::make(IoC::resolve('posts_page')->slug . '/' . $post->slug);\n\t\t\t\t$link = static::element('link', $url);\n\t\t\t\t$item->appendChild($link);\n\t\t\t\n\t\t\t\t// description\n\t\t\t\t$description = static::element('description', $post->description);\n\t\t\t\t$item->appendChild($description);\n\t\t\t\t\n\t\t\t\t// date\n\t\t\t\t$date = static::element('pubDate', date(DATE_RSS, $post->created));\n\t\t\t\t$item->appendChild($date);\n\n\t\t}\n\n\t\t// dump xml tree\n\t\treturn static::$document->saveXML();\n\t}", "public function build()\n\t{\n\t\t$this->rssNode = $this->buildRssNode();\n\t\t$this->document->appendChild($this->rssNode);\n\n\t\treturn $this;\n\t}", "public function domElement(\\DOMDocument &$aframe_dom): DOMElement;", "protected function loadDomDocument()\n {\n $this->doc = new DomDocument();\n $this->doc->formatOutput = true;\n $this->doc->loadHtml(\n mb_convert_encoding($this->html, 'HTML-ENTITIES', 'UTF-8'),\n LIBXML_HTML_NODEFDTD\n );\n }", "function setDOMDocument(&$doc) \n\t{\t\n $this->_helper->setDOMDocument($doc);\n\t\t$this->type = null;\n\t\t$this->title = null;\t\t\n\t\t$this->datasources = new VDBIQueryType_Datasources($this);\n\t\t$this->tables = new VDBIQueryType_Tables($this);\n\t\t$this->table_relationships = new VDBIQueryType_RelationshipGroupList($this);\t\t\n\t\t$this->input_filters = new VDBIQueryType_FilterList($this,'input_filters');\n\t\t$this->summary_options = new VDBIQueryType_SummaryOptions($this);\n\t\t$this->groupings = new VDBIQueryType_FieldList($this,'groupings');\t\t\t\t\n\t\t$this->output_filters = new VDBIQueryType_FilterList($this,'output_filters');\n\t\t$this->labels = new VDBIQueryType_LabelList($this);\n\t\t$this->values = new VDBIQueryType_ValueList($this);\t\t\t\n\t}", "public function XMLResult2Object()\n {\n\n\n if(!empty($this->_xml_retorno) > 0){\n libxml_use_internal_errors(true);\n $xml = simplexml_load_string(strtr($this->_xml_retorno, array(' xmlns:'=>' ')),NULL,NULL,\"http://schemas.xmlsoap.org/soap/envelope/\");\n if(!isset($xml->xpath)){\n $xml =simplexml_load_string(strtr($this->_xml_retorno, array(' xmlns:'=>' ')));\n }\n\n if(is_object($xml)){\n $xml->registerXPathNamespace('S', 'http://schemas.xmlsoap.org/soap/envelope/');\n $xml->registerXPathNamespace('ns0', 'http://br.com.getnet.ecommerce.ws.service');\n $xpath = $xml->xpath('//result');\n if(empty($xpath)){ # caso seja um erro não tratavel\n $xpath = $xml->xpath('//*');\n }\n return $xpath;\n }else{\n $this->_errors = $this->setError(101,'Falha ao receber os dados do servidor da GETNET','Resposta inválida do servidor da GETNET.');\n return false;\n }\n }else{\n $this->_errors = $this->setError(101,'Falha ao receber os dados do servidor da GETNET','Tente novamente em alguns segundos.');\n return false;\n }\n }", "abstract function getAsElem($dom);", "final function getDocumentRootElement () { return new XDTNodeList($this->root); }", "public function readDOM ( ) {\n\n return $this->getStream()->readDOM();\n }", "public function getPromotionContentDOM() {\n\t\t$contentDOM = $this->getContentDOM();\n\t\t$xpath = new \\DOMXPath($contentDOM);\n\n\t\t$list = $xpath->query(\"//promotion/content\");\n\n\t\t$this->promotionContentDOM = new \\DOMDocument('1.0','UTF-8');\n\t\t$this->promotionContentDOM->loadXML($list->item(0)->textContent);\n\n\t\treturn $this->promotionContentDOM;\n\t}", "public function parserResult($result)\n {\n\n // for now return object\n return $result;\n }", "public function toDom() {\n $dom = new DOMDocument('1.0', 'utf-8');\n\n $entry = $dom->createElementNS(Client::SCHEMA_TYPES, self::NAME);\n $entry->setAttribute(self::ATTRIBUTE_KEY, $this->Key);\n\n if ($this->Street) {\n $street = $dom->createElement(self::ELEMENT_STREET, htmlspecialchars($this->Street));\n $entry->appendChild($street);\n }\n\n if ($this->City) {\n $city = $dom->createElement(self::ELEMENT_CITY, htmlspecialchars($this->City));\n $entry->appendChild($city);\n }\n\n if ($this->State) {\n $state = $dom->createElement(self::ELEMENT_STATE, htmlspecialchars($this->State));\n $entry->appendChild($state);\n }\n\n if ($this->CountryOrRegion) {\n $country = $dom->createElement(self::ELEMENT_COUNTRY_OR_REGION, htmlspecialchars($this->CountryOrRegion));\n $entry->appendChild($country);\n }\n\n if ($this->PostalCode) {\n $postalCode = $dom->createElement(self::ELEMENT_POSTAL_CODE, htmlspecialchars($this->PostalCode));\n $entry->appendChild($postalCode);\n }\n\n $dom->appendChild($entry);\n\n return $dom;\n }", "public function toDomElement(DOMDocument $document): DOMElement\n {\n return $document->createElement('version', $this->getVersion());\n }", "public function toDOMElement(DOMDocument $dom): DOMElement\n {\n $node = $dom->createElementNS(self::NODE_NS_URI, self::NODE_NS_NAME);\n\n foreach ($this->getAttributes() as $attr => $value) {\n $node->setAttribute($attr, $value);\n }\n\n // Payments Node\n foreach ($this->payments as $payment) {\n $paymentNode = $payment->toDOMElement($dom);\n $node->appendChild($paymentNode);\n }\n\n return $node;\n }", "public function __construct()\n {\n // create XML DOM object\n $this->xmldoc = new DOMDocument('1.0', 'utf-8');\n }", "public function toDomElement(DOMDocument $document): DOMElement\n {\n $element = $document->createElement('error');\n $element->appendChild($document->createElement('summary', $this->getSummary()));\n\n // Optional\n if (! empty($this->getDetail())) {\n $element->appendChild($document->createElement('detail', $this->getDetail()));\n }\n\n return $element;\n }", "public function build()\n {\n return $this->generateXml();\n }", "public function __toString()\r\n\t{\r\n\t\treturn $this->dom->saveXML();\r\n\t}", "protected function wrapResults($outputs)\n {\n return new Google_Documents_CopyDocument_Results($outputs);\n }", "function returnXPathObject($item)\n {\n $xmlPageDom = new DOMDocument(); // khoi tao DomDocument object\n libxml_use_internal_errors(true); // dom chuyen tu html5 -> html4\n @$xmlPageDom->loadHTML('<?xml encoding=\"utf-8\" ?>' . $item); // Loading html page\n $xmlPageXPath = new DOMXPath($xmlPageDom); // khoi tao XPath DOM object\n return $xmlPageXPath; // tra ve XPath object\n }", "protected function wrapResults($outputs)\n {\n return new Google_Documents_CreateEmptyDocument_Results($outputs);\n }", "public static function getDOMDocument($source) {\n\t\tif ($source instanceof DOMDOCUMENT)\n\t\t\treturn $source;\n\t\t$source = self::getDocumentID($source);\n\t\treturn $source\n\t\t\t? self::$documents[$id]['document']\n\t\t\t: null;\n\t}", "public function asRDF()\n\t{\n\t\tif (!$this->document) return $this->return_error('1');\n\t\t$dom = new DomDocument();\n\t\t@$dom->loadHtml($this->document);\n\t\t$xpath = new DomXpath($dom);\n\t\t$this->data = $this->usedata != '' ? $this->get_file_contents($this->usedata) : $this->get_file_contents($this->json_dataset($xpath, $this->url));\n\t\tif (!$this->data) return $this->return_error('2');\n\t\t$this->json = json_decode($this->data);\n\t\tif (!$this->json) return $this->return_error('3');\n\t\t$object = $this->json;\n\t\tif (isset($object->from)) $this->url = $this->return_url($object->from , $this->url);\n\t\t$xml = new DOMDocument('1.0', 'utf-8');\n\t\t$xml->preserveWhiteSpace = true;\n\t\t$xml->formatOutput = true;\n\t\t$root = $xml->createElementNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'rdf:RDF');\n\t\t$root->setAttribute(\"xml:base\", $this->url);\n\t\t$this->setXmlns($object, $root);\n\t\t$xml->appendChild($root);\n\t\t$documentTags = $dom->getElementsByTagName('*');\n\t\tforeach ( $documentTags as $documentTag ) {\n\t\t\t$this->json_query_rdf_properties($this->url, $object, $documentTag, $root, $xml, false);\n\t\t}\n\t\t$document = $xml->saveXML();\n\t\t$this->set_headers();\n\t\treturn $document;\n\t}", "abstract protected function buildData(DOMDocument $xml);", "public function __construct()\n\t{\n\t\t$this->type = 'html';\n\t\t\n\t\t$docTitle = 'PHP RUN-TEST RESULTS';\n\t\t\n\t\t// dom\n\t\t$imp = new DOMImplementation();\n\t\t$dtd = $imp->createDocumentType(\"html\", \"-//W3C//DTD XHTML 1.0 Transitional//EN\", \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\");\n \t$this->dom = $imp->createDocument(\"\", \"\", $dtd);\n\n \t// html\n \t$htmlNode = $this->dom->createElement('html');\n \t$this->dom->appendChild($htmlNode);\n \t\n \t// head\n \t$headNode = $this->dom->createElement('head');\n \t$htmlNode->appendChild($headNode);\n \t$headNode->appendChild($this->dom->createElement('title', $docTitle));\n \t\n \t// body\n \t$bodyNode = $this->dom->createElement('body');\n \t$htmlNode->appendChild($bodyNode);\n \t\n \t// stage\n \t$this->stage = $this->dom->createElement('div');\n \t$this->stage->setAttribute('id', 'stage');\n \t$bodyNode->appendChild($this->stage);\n \t\n \t$this->stage->appendChild($this->dom->createElement('h1', $docTitle));\n\t}", "protected function buildXml()\n\t{\n\t\t$xml = new DOMDocument('1.0', 'utf8');\n\t\t$cra_inquiry = $xml->createElement('LoanRecord');\n\t\t$cra_inquiry->appendChild($this->buildData($xml));\n\t\t\n\t\t$xml->appendChild($cra_inquiry);\n\t\t\n\t\treturn $xml;\n\t}", "public static function newSitemapDocument()\n {\n return simplexml_load_string('<?xml version=\"1.0\" encoding=\"UTF-8\"?>' .\n '<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" />');\n }", "public static function newDocumentHTML($markup = null, $charset = null) : PhpQueryObject\n {\n $contentType = $charset ? \";charset=$charset\" : '';\n return self::newDocument($markup, \"text/html{$contentType}\");\n }", "protected function return_node_value($doc, $result = '') \n\t{\t\n\t\t$tmpdoc = new DOMDocument();\n\t\t$tmpdoc->appendChild($tmpdoc->importNode($doc, TRUE));\n\t\t$tmpdoc->formatOutput = true;\n\t\t$result .= $tmpdoc->saveXML();\n\t\t$result = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", \"&#xD;\"), '', $result);\n\t\t$result = trim(preg_replace('/<\\?xml.*\\?>/', '', $result, 1));\n\t\treturn $result;\n\t}", "abstract function build($result);", "public function toDomElement(DOMDocument $document): DOMElement\n {\n $response = $document->createElement('response');\n $response->setAttribute('xmlns', self::XML_NAMESPACE);\n\n $response->appendChild($this->getVersion()->toDomElement($document));\n\n if ($this->isSuccessful()) {\n $success = $document->createElement('success');\n $message = $document->createElement('message', $this->getSuccess());\n $response->appendChild($success);\n $success->appendChild($message);\n } else {\n // Get error element.\n $error = $document->createElement('error');\n\n // Append summary to error\n $summary = $document->createElement('summary', $this->getError()->getSummary());\n $error->appendChild($summary);\n\n // If error has detail, append it.\n if ($this->getError()->hasDetail()) {\n $detail = $document->createElement('detail', $this->getError()->getDetail());\n $error->appendChild($detail);\n }\n $response->appendChild($error);\n\n }\n\n return $response;\n }", "public static function newDocumentXML($markup = null, $charset = null) : PhpQueryObject\n {\n $contentType = $charset ? \";charset=$charset\" : '';\n\n return self::newDocument($markup, \"text/xml{$contentType}\");\n }", "function fetchDomNodes ($offset = 0, $limit = null)\n {\n $this->_enterSection('fetchDomNodes');\n $result = array();\n if ($this->_extractedNodes) {\n if ($this->_phpVersion == 5) {\n for ($i=$offset; $i < $this->_extractedNodes->length \n and (is_null($limit) or $i < $offset + $limit); $i++) {\n $result[] = $this->_extractedNodes->item($i); \n }\n } else {\n $this->_extractedNodes->rewind();\n for ($i=0; $i < $offset and $this->_extractedNodes->next(); $i++);\n for ($i=0; (is_null($limit) or $i < $limit) \n and $this->_extractedNodes->next(); $i++) {\n $result[] = $this->_extractedNodes->pointer;\n }\n }\n } else {\n if ($strings = $this->fetchStrings ($offset, $limit)) {\n $reconstructed = '<?xml version=\"1.0\"?>';\n $ns = $this->getNameSpaces();\n $nsDecl = array();\n foreach ($ns as $prefix => $uri) {\n $nsDecl[] = \"xmlns:$prefix=\\\"$uri\\\"\";\n }\n $reconstructed .= '<root ' . join(' ', $nsDecl) . '>' . \n join('',$strings) . '</root>';\n\n if ($this->_phpVersion == 5) {\n $dom = new DomDocument();\n $dom->loadXml($reconstructed);\n $nodeset = $dom->documentElement->childNodes;\n $ii = $nodeset->length;\n for ($i = 0; $i < $ii; $i++) {\n $result[] = $nodeset->item($i);\n }\n } else {\n // assuming PHP4\n $dom = domxml_open_mem ($reconstructed);\n $root = $dom->document_element();\n $result = $root->child_nodes();\n }\n }\n }\n $this->_leaveSection('fetchDomNodes');\n return $result;\n }", "public function setDomDocument(DOMDocument $dom)\n {\n $this->domDocument = $dom;\n return $this;\n }", "public function fetch_dom_doc( $doc_name ) {\n\t\tif ( ! is_string( $doc_name ) ) {\n\t\t\tthrow new InvalidArgumentException();\n\t\t}\n\t\t$doc = new DOMDocument();\n\t\t$sanitized_doc_name = $this->sanitize( $doc_name );\n\t\t$status = $doc->loadHTMLFile( PATH_HTML . $sanitized_doc_name,\n\t\t\tLIBXML_COMPACT /* Optimization. */\n\t\t\t| LIBXML_HTML_NODEFDTD /* Prevent a default doctype being added when one is not found. */\n\t\t);\n\t\tif ( false === $status ) {\n\t\t\tthrow new DocException( $sanitized_doc_name );\n\t\t}\n\t\treturn $doc;\n\t}", "public function returnResult() {\r\n\t\treturn $this->_html;\r\n\t}", "private function createRootElement(): \\DOMElement {\n $attribute = [\n 'office:version' => '1.2',\n 'xmlns:office' => 'urn:oasis:names:tc:opendocument:xmlns:office:1.0',\n 'xmlns:style' => 'urn:oasis:names:tc:opendocument:xmlns:style:1.0',\n 'xmlns:text' => 'urn:oasis:names:tc:opendocument:xmlns:text:1.0',\n 'xmlns:table' => 'urn:oasis:names:tc:opendocument:xmlns:table:1.0',\n 'xmlns:draw' => 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0',\n 'xmlns:fo' => 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0',\n 'xmlns:xlink' => 'http://www.w3.org/1999/xlink',\n 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/',\n 'xmlns:meta' => 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0',\n 'xmlns:number' => 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0',\n 'xmlns:svg' => 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0',\n 'xmlns:chart' => 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0',\n 'xmlns:dr3d' => 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0',\n 'xmlns:math' => 'http://www.w3.org/1998/Math/MathML',\n 'xmlns:form' => 'urn:oasis:names:tc:opendocument:xmlns:form:1.0',\n 'xmlns:script' => 'urn:oasis:names:tc:opendocument:xmlns:script:1.0',\n 'xmlns:ooo' => 'http://openoffice.org/2004/office',\n 'xmlns:ooow' => 'http://openoffice.org/2004/writer',\n 'xmlns:oooc' => 'http://openoffice.org/2004/calc',\n 'xmlns:dom' => 'http://www.w3.org/2001/xml-events',\n 'xmlns:rpt' => 'http://openoffice.org/2005/report',\n 'xmlns:of' => 'urn:oasis:names:tc:opendocument:xmlns:of:1.2',\n 'xmlns:xhtml' => 'http://www.w3.org/1999/xhtml',\n 'xmlns:grddl' => 'http://www.w3.org/2003/g/data-view#',\n 'xmlns:tableooo' => 'http://openoffice.org/2009/table',\n 'xmlns:css3t' => 'http://www.w3.org/TR/css3-text/',\n 'xmlns:xforms' => 'http://www.w3.org/2002/xforms',\n 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema',\n 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',\n 'xmlns:field' => 'urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0',\n 'xmlns:formx' => 'urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0'];\n\n $rootElement = $this->createNewElement('office:document-content', $attribute);\n $bodyElement = $this->createNewElement('office:body', $attribute);\n $textElement = $this->createNewElement('office:text');\n\n $this->getDocument()->appendChild($rootElement);\n $rootElement->appendChild($bodyElement);\n $bodyElement->appendChild($textElement);\n\n return $textElement;\n }", "function domdoctoxpath($domdocinput) {\n //local variables clean themselves up, no need to unset.\n $newdomdoc = new SmartDOMDocument();\n $newdomdoc->appendChild($newdomdoc->importNode($domdocinput, true));\n $newxpathtable = new DOMXPath($newdomdoc);\n //DEBUG $image = $newdomdoc->saveHTMLExact();echo($image);\n return $newxpathtable;\n}", "function ilDOMXML ()\n\t{\n\t\t$num = func_num_args();\n\t\t$args = func_get_args();\n\t\t\n\t\tif (($num == 1) && is_object($args[0]))\n\t\t{\n\t\t\t$this->doc = $args[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->initNewDocument($args[0],$args[1],$args[2]);\n\t\t}\n\t}", "public function generateDom()\n {\n require_once 'Amazon/CloudFront.php';\n\n $dom = new DOMDocument();\n\n $root = $dom->createElementNS(\n Amazon_CloudFront::NAMESPACE,\n 'DistributionConfig');\n $dom->appendChild($root);\n\n if (empty($this->_origin)) {\n require_once 'Amazon/CloudFront/Exception.php';\n throw new Amazon_CloudFront_Exception(\n \"DistributionConfig requires 'Origin'\");\n }\n $origin = $dom->createElementNS(\n Amazon_CloudFront::NAMESPACE,\n 'Origin',\n $this->getOrigin());\n $root->appendChild($origin);\n\n $ref = $dom->createElementNS(\n Amazon_CloudFront::NAMESPACE,\n 'CallerReference',\n $this->getCallerReference());\n $root->appendChild($ref);\n\n foreach ($this->getCname() as $cname) {\n $cnameElement = $dom->createElementNS(\n Amazon_CloudFront::NAMESPACE,\n 'CNAME',\n $cname);\n $root->appendChild($cnameElement);\n }\n\n $comment = $dom->createElementNS(\n Amazon_CloudFront::NAMESPACE,\n 'Comment',\n $this->getComment());\n $root->appendChild($comment);\n\n $enabled = $dom->createElementNS(\n Amazon_CloudFront::NAMESPACE,\n 'Enabled',\n $this->isEnabled(true));\n $root->appendChild($enabled);\n\n return $dom;\n }", "protected function getRemoteDocument($url) {\n $feed_contents = file_get_contents($url);\n $dom = new \\DOMDocument();\n $dom->loadXML($feed_contents);\n return $dom;\n }", "function parseXMLResult($doc, &$result) {\n\tglobal $gbRepeatView;\n\n\t$result = array();\n\t$median = $doc->getElementsByTagName('median')->item(0); // This is the block of info representing ALL the data of the \"median\" run.\n\tif ( ! $median ) {\n\t\treturn;\n\t}\n\t$pageview = $median->getElementsByTagName( $gbRepeatView ? 'repeatView' : 'firstView' )->item(0); // change this to 'repeatView' for primed cache\n\tif ( ! $pageview ) {\n\t\treturn;\n\t}\n\n\t$result['medianRun'] = (int)$pageview->getElementsByTagName('run')->item(0)->nodeValue;\n}", "public function asXML();", "public function getDOM($type)\n {\n $variable = $type . 'DOM';\n if (isset($this->$variable)) {\n return $this->$variable;\n }\n throw new OpenDocument_Exception('No DOM for ' . $type);\n }", "private function __construct(){\r\n $this->dom = new DOMDocument();\r\n $this->xslt = new XSLTProcessor();\r\n }", "function printResults($us) \r\n{\r\n \theader('Content-type:text/xml;charset=\"utf-8\"');\r\n \t$xmlDoc = new MiniXMLDoc();\r\n \t$xmlRoot =& $xmlDoc->getRoot();\r\n \t$resultadosGenerales =& $xmlRoot->createChild('resultadosGenerales');\r\n\t$resultadosGenerales->attribute('resultado', 1); \r\n\t\r\n\t$op_tipo =& $resultadosGenerales->createChild('tipo');\r\n\t$op_tipo->text($us->getTipo());\r\n\t\r\n\t$op_usuario =& $resultadosGenerales->createChild('usuario');\r\n\t$op_usuario->text($us->getUsuario());\r\n\t\r\n\t$op_clave =& $resultadosGenerales->createChild('clave');\r\n\t$op_clave->text($us->getClave());\r\n\t\r\n\tprint html_entity_decode($xmlDoc->toString(MINIXML_NOWHITESPACES));\r\n}", "protected function _document( $html ) {\n\t\t$reporting = error_reporting( 0 );\n\t\t$Document = DomDocument::loadHTML( $html );\n\t\terror_reporting( $reporting );\n\n\t\tif ( $Document === false ) {\n\t\t\tthrow new Exception( 'Unable to load HTML document.' );\n\t\t}\n\n\t\treturn $Document;\n\t}", "public function getDocument() {\n\t\treturn phpQuery::getDocument($this->getDocumentID());\n\t}", "public function getDocument() {\n\t\treturn phpQuery::getDocument($this->getDocumentID());\n\t}", "private function return_query_cdata($xml, $class, $val, $documentTag, $prop, $result)\n\t{\n\t\t$children = $documentTag->childNodes;\n\t\t$property = $xml->createElement($this->get_label($val, $prop));\n\t\tforeach ($children as $child) {\n\t\t\t$result .= $this->return_node_value($child);\n\t\t}\n\t\t$cdata = $property->ownerDocument->createCDATASection($result);\n\t\t$property->appendChild($cdata);\n\t\t$class->appendChild($property);\n\t}", "public function createDocument()\r\n {\r\n return new Document($this);\r\n }", "public function html()\n\t{\n\t\t$output = \"\";\n\t\t\n\t\t$doc = new DOMDocument(\"1.0\", \"UTF-8\");\n\t\t$element = $doc->importNode(dom_import_simplexml($this), true);\n\t\t\n\t\t$doc->appendChild($element);\n\t\t\n\t\tforeach($doc->firstChild->childNodes as $child)\n\t\t\t$output .= $child->ownerDocument->saveHTML($child);\n\t\t\n\t\treturn $output;\n\t}", "protected function wrapResults($outputs)\n {\n return new Google_Documents_GetAllDocuments_Results($outputs);\n }", "private function getPageSource(string $fullUrl): ?DOMDocument\n {\n $handle = curl_init($fullUrl);\n\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);\n $output = curl_exec($handle);\n\n if(!empty($output)) {\n $dom = new DOMDocument();\n libxml_use_internal_errors(true);\n $output = str_replace(\"&nbsp;\",\"\", $output);\n $dom->loadHTML($output);\n libxml_use_internal_errors(false);\n curl_close($handle);\n return $dom;\n }\n curl_close($handle);\n return NULL;\n }", "function buildOutput()\n {\n $dom = new DOMDocument('1.0', 'UTF-8');\n $field = $dom->createElement('field');\n if ( !isset($this->class) )\n {\n $field->setAttribute('class', $this->type);\n } else {\n $field->setAttribute('class', $this->class);\n }\n $field->setAttribute('id', $this->name);\n $field->setAttribute('label', $this->label);\n $field->setAttribute('name', $this->name);\n $field->setAttribute('type', $this->type);\n if ( is_array($this->options) )\n {\n foreach ( $this->options AS $name=>$value )\n {\n $field->setAttribute($name, $value);\n }\n }\n $field->appendChild($dom->createCDATASection($this->value));\n return $field;\n }", "public function first () { return new XDTNodeList($this[0]); }", "protected function wrapResults($outputs)\n {\n return new Google_Documents_DownloadBase64EncodedDocument_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new Google_Plus_Domains_Comments_Get_Results($outputs);\n }", "public function asDom(DOMDocument $doc)\n {\n return $doc->createElement('Cd', $this->code);\n }" ]
[ "0.6937923", "0.6937923", "0.68195045", "0.67717385", "0.66584253", "0.659529", "0.65547985", "0.6502658", "0.64987546", "0.6346673", "0.6260541", "0.61434364", "0.6108336", "0.6086359", "0.6032171", "0.6025498", "0.59359473", "0.58533907", "0.5848541", "0.58449787", "0.5841908", "0.5833102", "0.5783593", "0.5776076", "0.5773906", "0.5763467", "0.5756459", "0.5744123", "0.5732371", "0.57322514", "0.5728205", "0.5706415", "0.5698706", "0.5670512", "0.56678003", "0.5625685", "0.561796", "0.55989754", "0.5569457", "0.5546128", "0.5545989", "0.55442107", "0.5543895", "0.5537482", "0.55355877", "0.5510104", "0.5491772", "0.5480355", "0.54732937", "0.54728806", "0.54606324", "0.5458705", "0.5447628", "0.54353166", "0.54209924", "0.540532", "0.53980815", "0.5364563", "0.5351558", "0.5347769", "0.5338595", "0.5320184", "0.5304527", "0.53013957", "0.52966315", "0.5283208", "0.52776253", "0.52743727", "0.5259574", "0.5258888", "0.5239601", "0.52290213", "0.5226897", "0.52180254", "0.52167654", "0.5214624", "0.52144873", "0.52040523", "0.51964706", "0.5195852", "0.5177516", "0.51756936", "0.517358", "0.51643264", "0.51613486", "0.5161041", "0.5155297", "0.51374495", "0.51292825", "0.51292825", "0.51286256", "0.5113369", "0.5108047", "0.5105458", "0.51006705", "0.5096496", "0.50956106", "0.5077926", "0.5068465", "0.5066106" ]
0.7134096
0
Return a DateTime instance containing the created attribute of the DOMDocument as returned from the web service
Вернуть экземпляр DateTime, содержащий атрибут created DOMDocument, как возвращается из веб-сервиса
public function getCreated() { if (! isset($this->created)) { $this->created = new DateTime($this->getXPath($this->getDom())->query($this->getCreatedQuery())->item(0)->value); } return $this->created; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDate()\n {\n $yearconst = $this->getValue(self::XPATH_YEAR);\n $monthconst = $this->getValue(self::XPATH_MONTH);\n $dayconst = $this->getValue(self::XPATH_DAY);\n\n return $this->formateDate($yearconst, $monthconst, $dayconst);\n }", "public function getDateCreated() : DateTime\n {\n $rtn = $this->data['date_created'];\n\n if (!empty($rtn)) {\n $rtn = new DateTime($rtn);\n }\n\n return $rtn;\n }", "public function getDateTaken()\n {\n if (!isset($this->dateTaken)) {\n $this->dateTaken = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getDateTakenQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->dateTaken;\n }", "public function getDateCreated()\n {\n $rtn = $this->data['date_created'];\n\n if (!empty($rtn)) {\n $rtn = new \\DateTime($rtn);\n }\n\n return $rtn;\n }", "protected function _created()\n {\n $element = new Zend_Form_Element_Text('date_create');\n $element->setLabel('Date create')\n ->addValidator(new Zend_Validate_Date('Y-m-d H:i:s'));\n\n return $element;\n }", "public function getDateCreated();", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "public function getCreatedDateTime()\n {\n if (array_key_exists(\"createdDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"createdDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"createdDateTime\"])) {\n return $this->_propDict[\"createdDateTime\"];\n } else {\n $this->_propDict[\"createdDateTime\"] = new \\DateTime($this->_propDict[\"createdDateTime\"]);\n return $this->_propDict[\"createdDateTime\"];\n }\n }\n return null;\n }", "function the_date_xml()\n {\n }", "function getCreatedDate() {\n\t\treturn $this->_CreatedDate;\n\t}", "public function getCreated(): DateTime\n {\n return $this->created;\n }", "public function getDateCreated() {\r\n return $this->_date_created;\r\n }", "public function getCreated()\n {\n $date = $this->getEntityValue('created', 0);\n // The ISO8601 DateTime format is not compatible with ISO-8601, but is left this way for backward compatibility\n // reasons. Use DateTime::ATOM or DATE_ATOM for compatibility with ISO-8601 instead.\n // See http://php.net/manual/en/class.datetime.php\n $datetime = DateTime::createFromFormat(DateTime::ATOM, $date);\n\n return $datetime;\n }", "public function getDateCreated()\n {\n return $this->_DateCreated;\n }", "public function getDate_creation()\n {\n return $this->date_creation;\n }", "function getCreateDate() {\n\t\treturn $this->_CreateDate;\n\t}", "function getCreateDate() {\n\t\treturn $this->_CreateDate;\n\t}", "public function getDateCreate()\n\t{\n\t\treturn $this->dateCreate;\n\t}", "public function getDateCreated()\n {\n if (isset($this->data['CreatedDate'])) {\n return $this->data['CreatedDate'];\n } else {\n return false;\n }\n }", "public function _getCreatedOn() {\n\t\treturn $this->_createdOn;\n\t}", "public function getDateCreation()\n {\n return $this->date_creation;\n }", "function get_creation_date()\n\t{\n\t\treturn $this->creation_date;\n\t}", "public function getCreatedTime()\n {\n if (preg_match('/data-utime=\"(.+?)\"/', $this->body, $matches)) {\n return $matches[1];\n }\n\n return false;\n }", "public function getCreatedOn(): \\DateTime\n {\n return $this->createdOn;\n }", "public function getDateCreate()\n {\n return $this->date_create;\n }", "public function getDateCreate()\n {\n return $this->date_create;\n }", "public function get_date_created();", "public function getCreated()\n {\n if (is_string($this->created))\n $this->created = new UDate($this->created);\n return $this->created;\n }", "public function getDateCreation()\n {\n return $this->dateCreation;\n }", "public function getDateCreation()\n {\n return $this->dateCreation;\n }", "public function getDateCreation()\n {\n return $this->dateCreation;\n }", "public function getDateCreated()\n {\n return $this->date_created;\n }", "public function getDateCreated()\n {\n return $this->date_created;\n }", "public function getCreationDate() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->creationDate;\r\n\t}", "public function getCreatedDate()\n {\n return isset($this->CreatedDate) ? $this->CreatedDate : null;\n }", "public function created() {\n\t\treturn gmdate( 'Y-m-d\\TH:i:s\\Z' );\n\t}", "public function getDate() {\n return @$this->attributes['date'];\n }", "public function getReviewDateTime() : \\DateTime {\n\t\treturn ($this->reviewDateTime);\n\t}", "function getCreatedTime() {\n\t\tif (is_null($this->created_time)) {\n\t\t\t$this->created_time = new \\MongoDate();\n\t\t}\n\t\treturn $this->created_time;\n\t}", "public function getCreated() {\n\n $createdDateTime = \\DateTime::createFromFormat('Y-m-d H:i:s', $this->created);\n return $createdDateTime;\n\n }", "public function getDateUpload()\n {\n if (!isset($this->dateUpload)) {\n $this->dateUpload = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getDateUploadQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->dateUpload;\n }", "public function getCreateDate()\n {\n $this->create_date = null;\n\n return;\n }", "public function getCreated()\n {\n return $this->_created;\n }", "public function getCreated()\n {\n return $this->_created;\n }", "private function GetCreated()\n\t\t{\n\t\t\treturn $this->created;\n\t\t}", "public function getCreationDate()\n {\n return $this->created;\n }", "public function getDateCreated()\n {\n return $this->dateCreated;\n }", "public function getDateCreated()\n {\n return $this->dateCreated;\n }", "public function get_creation_date()\n {\n return $this->get_default_property(self::PROPERTY_CREATION_DATE);\n }", "public function getDate()\n {\n return $this->date = new \\DateTime($this->get()->post_date);\n }", "public function getDate()\n {\n return $this->getNodeText('/p:package/p:date');\n }", "public function fromMeta(): ?DateTime\n {\n $tags = [\n ['attribute' => 'class', 'value' => 'date', 'content' => 'data-datetime'],\n ['attribute' => 'property', 'value' => 'rnews:datePublished', 'content' => 'content'],\n ['attribute' => 'property', 'value' => 'article:published_time', 'content' => 'content'],\n ['attribute' => 'name', 'value' => 'OriginalPublicationDate', 'content' => 'content'],\n ['attribute' => 'itemprop', 'value' => 'datePublished', 'content' => 'datetime'],\n ['attribute' => 'property', 'value' => 'og:published_time', 'content' => 'content'],\n ['attribute' => 'name', 'value' => 'article_date_original', 'content' => 'content'],\n ['attribute' => 'name', 'value' => 'publication_date', 'content' => 'content'],\n ['attribute' => 'name', 'value' => 'sailthru.date', 'content' => 'content'],\n ['attribute' => 'name', 'value' => 'PublishDate', 'content' => 'content'],\n ['attribute' => 'pubdate', 'value' => 'pubdate', 'content' => 'datetime'],\n ];\n\n foreach ($tags as $selector) {\n $filter = sprintf('[%s=\"%s\"]', $selector['attribute'], $selector['value']);\n\n foreach ($this->dom->filter($filter) as $tag) {\n if (true === $tag->hasAttribute($selector['content'])) {\n try {\n $content = $this->decode($tag->getAttribute($selector['content']));\n\n return new DateTime($content);\n } catch (Exception $e) {\n // continue\n }\n }\n }\n }\n\n return null;\n }", "public function getCreateddate()\n {\n return $this->createddate;\n }", "public function getDateCreated() {\n return($this->dateCreated);\n }", "public function get_date_create()\n\t{\n\t\treturn $this->date_create;\n\t}", "public function getDateCreated() {\n return $this->dateCreated;\n }", "public function getCreatedDate()\n {\n return $this->created_date;\n }", "public function getCreateDate() {\n\t\treturn $this->createDate;\n\t}", "public function getCreateDate() {\n\t\treturn $this->createDate;\n\t}", "public function getCreateDate()\n {\n return $this->create_date;\n }", "public function getCreatedAt()\n {\n return \\DateTime::createFromFormat(DATE_ISO8601, $this->file->get(self::SETTING_CREATED_AT));\n }", "public function getCreationDate() \r\n { \r\n return $this->_creationDate; \r\n }", "public function getCreatedDate();", "public function getCreatedDate()\r\n\t\t{\r\n\t\t\treturn date('m/d/Y', strtotime($this->_created_date));\r\n\t\t}", "public function getCreated()\n {\n\n if (!$this->createdat instanceof DateTime) {\n return new DateTime();\n }\n\n return $this->createdat;\n }", "public function getCreateDate()\n\t{\n\t\treturn $this->CreateDate;\n\t}", "public function getArticleDate(): \\DateTime {\n\t\treturn ($this->articleDate);\n\t}", "public function getCreated()\r\n {\r\n return $this->created;\r\n }", "function getCreationTime() ;", "public function getCreationDate();", "public function getCreatedAt() : \\DateTime\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAd;\n }", "public function getCreated() \n\t{\n\t\treturn $this->created;\n\t}", "public function getCreationDatetime()\n {\n return $this->getValue('nb_icontact_prospect_creation_datetime');\n }", "public function getCreate_date(){\n return $this->create_date;\n }", "public function getCreate_time()\r\n {\r\n return $this->create_time;\r\n }", "public function fromMeta(): ?DateTime\n {\n $tags = [\n ['attribute' => 'property', 'value' => 'article:modified_time', 'content' => 'content'],\n ['attribute' => 'itemprop', 'value' => 'dateModified', 'content' => 'datetime'],\n ['attribute' => 'property', 'value' => 'og:modified_time', 'content' => 'content'],\n ];\n\n foreach ($tags as $selector) {\n $filter = sprintf('[%s=\"%s\"]', $selector['attribute'], $selector['value']);\n\n foreach ($this->dom->filter($filter) as $tag) {\n if (true === $tag->hasAttribute($selector['content'])) {\n try {\n $content = $this->decode($tag->getAttribute($selector['content']));\n\n return new DateTime($content);\n } catch (Exception $e) {\n // continue\n }\n }\n }\n }\n\n return null;\n }", "public function getDateCreated()\n {\n return $this->getDateModified();\n }", "private function XML_addDate() {\n\t\t$dateEntity = $this->xmlHandler->createElement('date');\n\t\t$dateEntity->appendChild($this->xmlHandler->createTextNode(date(\"F j, Y, g:i a\")));\n\n\t\t$this->xmlRoot->appendChild($dateEntity);\n\t}", "public function getDate()\n {\n return $this->getData('created_at');\n }", "function get_date() {\n\t\treturn $this->get_data( 'comment_date' );\n\t}", "public function getCreatedAtAttribute()\n {\n return strtotime($this->attributes['created_at']);\n }", "function get_timecreated() {\n return $this->timecreated;\n }", "public\n\tfunction getPostDate(): \\DateTime {\n\t\treturn ($this->postDate);\n\t}", "public function getTimestampCreated()\n {\n return $this->_getData(self::TIMESTAMP_CREATED);\n }", "public function getCreationDate()\n {\n return $this->creation_date;\n }", "public function getCreationDate()\n {\n return $this->creation_date;\n }", "public function getCreated()\n {\n return $this->created;\n }", "public function getCreated()\n {\n return $this->created;\n }", "public function getCreated()\n {\n return $this->created;\n }", "public function getCreated()\n {\n return $this->created;\n }", "public function getCreated()\n {\n return $this->created;\n }", "public function getCreated()\n {\n return $this->created;\n }", "public function getCreated()\n {\n return $this->created;\n }" ]
[ "0.67757446", "0.6628347", "0.6293689", "0.6265451", "0.6250675", "0.6211613", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6135572", "0.61332995", "0.610985", "0.61069834", "0.60814273", "0.60775733", "0.6069899", "0.6064826", "0.6064826", "0.605501", "0.6054867", "0.6049929", "0.60454047", "0.60393333", "0.6022242", "0.6003466", "0.59866536", "0.59866536", "0.59635067", "0.5957372", "0.5956701", "0.5956701", "0.5956701", "0.5956529", "0.5956529", "0.59408265", "0.59191275", "0.5912799", "0.59113604", "0.590364", "0.5894237", "0.5891287", "0.5880861", "0.5871403", "0.5869207", "0.5869207", "0.5864846", "0.5861925", "0.5857976", "0.5857976", "0.5855606", "0.5835623", "0.5830464", "0.58262163", "0.5823721", "0.58231676", "0.58204585", "0.5819366", "0.5812139", "0.5805716", "0.5805716", "0.5798329", "0.5798005", "0.57955104", "0.57863647", "0.5779156", "0.5778713", "0.57761085", "0.5773962", "0.577042", "0.57641", "0.5760427", "0.57461584", "0.5742127", "0.5736216", "0.57359004", "0.5735129", "0.57350767", "0.5725393", "0.57219017", "0.57210827", "0.57139933", "0.5713707", "0.5711356", "0.5708133", "0.5705877", "0.5696482", "0.56893927", "0.56893927", "0.5689075", "0.5689075", "0.5689075", "0.5689075", "0.5689075", "0.5689075", "0.5689075" ]
0.747618
0
Return an instance of XmlFactory
Вернуть экземпляр XmlFactory
protected function getFactory() { if (! isset($this->factory)) { $this->factory = new \MphpMusicBrainz\Adapter\Xml\XmlFactory(); } return $this->factory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFactory()\n {\n return new Factory();\n }", "public function getFactory() {}", "public function getFactory(): Factory;", "public static function factory()\n {\n return new self;\n }", "public static function factory()\r\n {\r\n return parent::factory(__CLASS__);\r\n }", "protected static function newFactory()\n {\n return ExampleFactory::new();\n }", "public static function factory() {\n\t\tstatic $instance;\n\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\n\t\treturn $instance;\n\t}", "public static function factory() {\n\t\tstatic $instance = false;\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\t\treturn $instance;\n\t}", "public function getFactory()\n {\n return $this->_factory;\n }", "public static function factory() {\n\t\tstatic $instance = false;\n\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\n\t\treturn $instance;\n\t}", "public static function getFactory()\r\n\t{\r\n\t\treturn self::$factory;\r\n\t}", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public static function newFactory()\n {\n return ReceiptFactory::new();\n }", "public function getQomFactory() {}", "protected static function newFactory()\n {\n //\n }", "static function factory()\n {\n if (self::$_instance == NULL) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "public static function newFactory()\n {\n return TaxCollectionFactory::new();\n }", "public function createXML() {}", "public function getNodeFactory();", "final public function getFactory() {\n\t\treturn '';\n\t}", "public function loadFactory()\n {\n $this->di = new Di\\FactoryDefault;\n\n return $this;\n }", "protected static function newFactory(): Factory\n {\n return OrderPaymentFactory::new();\n }", "protected static function newFactory()\n {\n return TypeFactory::new();\n }", "protected static function newFactory()\n {\n return new LocationFactory();\n }", "public static function newFactory()\n {\n return OrderFactory::new();\n }", "protected static function newFactory(): Factory\n {\n return ProductInventoryFactory::new();\n }", "public static function init() {\n\t\treturn Factory::get_instance( self::class );\n\t}", "function getLayoutFactory()\n {\n $factory = new \\Layout\\Core\\Factory(\n app('layout.event'),\n app('layout.config'),\n app('layout.profile')\n );\n\n $factory->setLayout(\n new \\Layout\\Core\\Layout(\n app('layout.event'),\n new \\Layout\\Core\\Update(app('layout.cache'), app('layout.config'), app('layout.profile')),\n app('layout.config'),\n app('layout.profile')\n )\n );\n\n return $factory;\n }", "public function getResponseFactory()\n {\n return $this->responseFactory;\n }", "public static function newFactory()\n {\n return ReturnOrderLineFactory::new();\n }", "public static function create() {\n $factory = new static();\n return $factory->createFlo();\n }", "protected static function newFactory(): Factory\n {\n return ProductDownloadableLinkTranslationFactory::new();\n }", "protected static function newFactory(): Factory\n {\n return HotelFactory::new();\n }", "protected function getResourceFactory()\n {\n return ResourceFactory::getInstance();\n }", "public static function create() {\n\t\treturn new self();\n\t}", "public function getFactory()\n\t{\n\t\treturn empty($this->factory) ? 'new '.$this->getClass() : $this->factory;\n\t}", "protected function xmlServicesMapFactory()\n {\n $map = new Map();\n $map->add(\n Path::factory('/fwk/services', 'services', array())\n ->loop(true, '@xml')\n ->attribute('xmlMap')\n );\n \n return $map;\n }", "public static function newFactory()\n {\n return InventorySupplyFactory::new();\n }", "private static function engine(): Factory\n {\n if (!(self::$engine instanceof Factory)) {\n $loader = new FileLoader(new Filesystem(), self::$translationFolderPath);\n $translator = new Translator($loader, self::$lang);\n self::$engine = new Factory($translator, new Container());\n }\n\n return self::$engine;\n }", "protected function getNewXMLReader()\n {\n $path = $this->getFilePath();\n\n $xml = new \\XMLReader();\n if (!@$xml->open($path)) {\n throw new \\DomainException(\"Could not open file {$path} with XMLReader\");\n }\n\n return $xml;\n }", "public static function newFactory()\n {\n return PriceFactory::new();\n }", "protected static function newFactory()\n {\n return MessageFactory::new();\n }", "protected static function newFactory(): Factory\n {\n return BookingProductEventTicketFactory::new();\n }", "public static function newFactory()\n {\n return AdFactory::new();\n }", "public static function getInstance() {\n\t\tif (is_null(self::$_instance)){\n\t\t\tself::$_instance = new HTMLtoOpenXML();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "public static function factory($config = array())\n\t{\n\t\t$config = Kohana::config('furi');\n\n\t\t// Check for 'auto' driver and adjust configuration\n\t\tif ( strtolower($config->driver == 'auto') )\n\t\t{\n\t\t\tif ( function_exists('curl_init') )\n\t\t\t{\n\t\t\t\t$config->driver = 'cURL';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$config->driver = 'Stream';\n\t\t\t}\n\t\t}\n\t\t$driver = 'Furi_Driver_' . $config->driver;\n\n\t\t$fury = new $driver($config->as_array());\n\t\t\n\t\treturn $fury;\n\t}", "protected static function newFactory()\n {\n return PostFactory::new();\n }", "public function getParserFactory() {}", "protected static function newFactory(): Factory\n {\n return MessageFactory::new();\n }", "static public function factory($config) {}", "protected static function newFactory(): CustomerFactory\n {\n return CustomerFactory::new();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public function getFactoryNamespace();", "public function getSolrDocumentFactory() {\n return $this->solrDocumentFactory ?: \\Drupal::getContainer()->get($this->solr_document . '.factory');\n }", "public static function create()\n\t\t{\n\t\t\treturn new self();\n\t\t}", "static public function factory($config)\n {\n return new self();\n }", "public static function create() {\n return new self();\n }", "public function create(){\r\n\treturn new $this->class();\r\n }", "static public function getInstance() {\n\t\treturn GeneralUtility::makeInstance('Fab\\Media\\ObjectFactory');\n\t}", "public function newInstance()\n {\n return new self();\n }", "public static function create()\n\t{\n\t\treturn new self;\n\t}", "static public function create()\n\t{\n\t\treturn new static;\n\t}", "static public function create()\n {\n return new static();\n }", "public static function create()\n {\n return new static;\n }", "public static function create()\n {\n return new static;\n }", "public static function create()\n {\n return new static;\n }", "public static function create()\n {\n return new static;\n }", "public static function create(){\r\n\t\tif(self::$instance === null){\r\n\t\t\tself::$instance = new self();\r\n\t\t}\r\n\t\treturn self::$instance;\r\n\t}", "public function getObjectFactory(): ObjectFactoryInterface;", "protected static function newFactory()\n {\n return LoanFactory::new();\n }", "function factoryDefault();", "public static function newInstance()\n {\n $instance = new self;\n return $instance;\n }", "public static function newFactory()\n {\n return PhoneFactory::new();\n }" ]
[ "0.68133634", "0.6687715", "0.6544517", "0.65268314", "0.65139043", "0.650521", "0.64808017", "0.6466598", "0.64327395", "0.6400517", "0.63851243", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6298765", "0.6278735", "0.6230155", "0.62003076", "0.6189119", "0.61633795", "0.6151434", "0.6113034", "0.60988456", "0.60823864", "0.60812855", "0.60688645", "0.60625565", "0.6039424", "0.6033046", "0.5999337", "0.5998898", "0.59873825", "0.5964895", "0.59369886", "0.5914115", "0.58939505", "0.5864578", "0.58644354", "0.58566487", "0.58520573", "0.5850456", "0.58390874", "0.583724", "0.5831248", "0.5829494", "0.58144975", "0.58114797", "0.5806664", "0.5786807", "0.5776844", "0.5773796", "0.5749242", "0.5740503", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57283217", "0.57234305", "0.5722882", "0.5716551", "0.5711441", "0.5709348", "0.57056314", "0.5684835", "0.5679726", "0.56781113", "0.56636065", "0.56543136", "0.5652612", "0.5652612", "0.5652612", "0.5652612", "0.5642839", "0.56382", "0.5634809", "0.56332636", "0.5616692", "0.5616081" ]
0.84304833
0
ANTI XSS & SQL INJECTION//
АНТИ XSS & SQL-ИНЪЕКЦИЯ//
function antiinjection($data){ $filter_sql = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES))); return $filter_sql; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sqlInjections($data){\n\t$value1=mysqli_real_escape_string($GLOBALS['link'],$data);\n\t$value1=trim($value1);\n\treturn $value1;\n\t}", "function anti_injection($data){\n\t$filter = stripslashes(strip_tags(htmlspecialchars($data, ENT_QUOTES)));\n\treturn $filter;\n}", "public function anti_injection($sql){\r\n /*\r\n\t\t$seg = preg_replace(sql_regcase(\"/(from|select|insert|delete|where|drop table|show tables|\\*|--|\\\\\\\\)/\"),\"\",$sql);\r\n\t\t$seg = trim($seg);//limpa espaços vazio\r\n\t\t$seg = strip_tags($seg);//tira tags html e php\r\n\t\t$seg = addslashes($seg);//Adiciona barras invertidas a uma string\r\n\t\treturn $seg;\r\n */\r\n return $sql;\r\n\t}", "public static function evilStrings()\n {\n while (true) {\n yield \"* WHERE 1=1; --\";\n yield \"<script>alert('xss')</script>\";\n }\n }", "function sqlsanitize($sql)\r\n{\r\n\t$trysan = str_replace(\"\\\\\", \"\\\\\\\\\", $sql);\r\n\t$trysan = str_replace(\"\\\"\", \"\\\"\\\"\", $trysan);\r\n\t$trysan = str_replace(\"'\", \"''\", $trysan);\r\n\treturn $trysan;\r\n}", "function anti_injection($sql)\n{\n\t$sql = preg_replace(sql_regcase(\"/(from|select|insert|delete|where|drop table|show tables|#|\\*|--|\\\\\\\\)/\"),\"\",$sql);\n\t$sql = trim($sql);//limpa espaços vazio\n\t$sql = strip_tags($sql);//tira tags html e php\n\t$sql = addslashes($sql);//Adiciona barras invertidas a uma string\n\treturn $sql;\n}", "function escape($s) {\r\n //return mysql_real_escape_string(strip_tags($s)); // uncomment in when you will use connection with database\r\n return strip_tags($s);\r\n}", "function security($input)\n{\n $input = mysql_real_escape_string($input);\n $input = strip_tags($input);\n $input = stripslashes($input);\n return $input;\n}", "function sanitize( $input ){\n $mysqli = self::dbconnect();\n $input = $mysqli->real_escape_string( $input );\n $input = trim($input);\n $input = htmlentities($input);\n $mysqli->close();\n return $input;\n }", "function safety($text){\r\n $text = strip_tags($text); //Remove html tags\r\n $text = $this->ixd->real_escape_string($text); // Make safe for Database.\r\n return $text;\r\n }", "function secure_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n // tbd mysql_real_escape_string\r\n return $data;\r\n}", "public function XSSfilter()\n {\n /**\n * @var array Исключения для полей с визуальным редактором\n */\n $exceptionsAllowingHTML = array( 'contest_text', 'results_contest' );\n\n foreach ($_POST as $key => $value){\n if (is_array($value)) {\n foreach ($value as $sub_key => $sub_value) {\n $sub_value = stripos( $sub_value, 'سمَـَّوُوُحخ ̷̴̐خ ̷̴̐خ ̷̴̐خ امارتيخ ̷̴̐خ') !== false ? '' : $sub_value ;\n $_POST[$key][$sub_key] = Security::xss_clean(HTML::chars($sub_value));\n }\n continue;\n }\n $value = stripos($value, 'سمَـَّوُوُحخ ̷̴̐خ ̷̴̐خ ̷̴̐خ امارتيخ ̷̴̐خ') !== false ? '' : $value ;\n\n /** $exceptionsAllowingHTML — allow html tags (does not fire HTML Purifier) */\n if ( in_array($key, $exceptionsAllowingHTML) === false) {\n $_POST[$key] = Security::xss_clean(HTML::chars($value));\n }\n }\n foreach ($_GET as $key => $value) {\n $value = stripos( $value, 'سمَـَّوُوُحخ ̷̴̐خ ̷̴̐خ ̷̴̐خ امارتيخ ̷̴̐خ') !== false ? '' : $value ;\n $_GET[$key] = Security::xss_clean(HTML::chars($value));\n }\n\n }", "function sanitize($data) \n{\n\treturn htmlentities(strip_tags(mysql_real_escape_string($data)));\n}", "function sanitize_input($input) {\n $input = mysql_real_escape_string($input);\n return $input;\n}", "function sanitize ($data) {\n\t\treturn htmlentities (mysqli_real_escape_string ($GLOBALS['con'], $data),ENT_NOQUOTES,\"utf-8\");\n\t}", "function sanitize($data) {\n return htmlentities(strip_tags(mysql_real_escape_string($data)));\n }", "function sanitizeDBData($input) {\n $halfSan = filter_var($input, FILTER_SANITIZE_EMAIL);\n\n //sets slashes infront of \" ' and \\\n $output = filter_var($halfSan, FILTER_SANITIZE_MAGIC_QUOTES);\n\n return $output;\n}", "function db_output($string) {\n return htmlspecialchars($string);\n }", "public function ex_sanitize($data){\n\n\t\treturn mysql_real_escape_string(htmlentities(trim($data)));\n\n\t}", "function secur($string){return htmlspecialchars($string, ENT_QUOTES|ENT_SUBSTITUTE);}", "public function inject()\n\t{\n\t\t$insert = '?id=1%27 and 1%3d1 union select ';\n\t\treturn $insert;\n\t}", "function filterQuery($query){\n $query=htmlspecialchars(stripslashes($query));\n $query=str_ireplace(\"script\", \"blocked\", $query);\n $query=mysql_escape_string($query);\n\n return $query;\n}", "function sanitize($data){\r\n $conn = db ();\r\n return mysqli_real_escape_string($conn, $data);\r\n}", "function db_escape($input)\n{\n\tglobal $db;\n\treturn $db->real_escape_string($input);\n}", "function escape($value){//XSS attacks protection\n return htmlspecialchars($value , ENT_QUOTES,'UTF-8');\n }", "function xssafe($data, $encoding = 'UTF-8')\n{\n //return htmlspecialchars($data,ENT_QUOTES | ENT_HTML401,$encoding);\n return htmlspecialchars($data);\n}", "function sanitizeString($var)\n{\nglobal $connection;\n$var = strip_tags($var);\n$var = htmlentities($var);\n$var = stripslashes($var);\nreturn $connection->real_escape_string($var);\n}", "function esc_sql($data)\n {\n }", "public function sanitize($data){\n\n\t\treturn mysql_real_escape_string(htmlentities($data));\n\n\t}", "function sanitize($input){\n\tglobal $link;\n\t$input = htmlentities(strip_tags(trim($input)));\n\t$input = mysqli_real_escape_string($link, $input);\n\treturn $input;\n}", "abstract protected function _escape($s);", "function db_output($string) {\n\treturn htmlspecialchars($string);\n}", "function sanitize($data){\n$data=trim($data);\n$data=htmlspecialchars($data);\n$data=mysql_real_escape_string($data);\nreturn $data;\n}", "function sqlText($s, $db){\n\t// @ ! : _ - = + ? . , ' # / [ ] ( )\n\t$result = preg_replace(\"/[^a-zA-Z0-9@!: \\[\\]\\(\\)_\\-\\=\\+\\?\\.\\,\\'\\#\\/]+/\", \"\", $s);\n\treturn trim($db->real_escape_string($result));\n}", "public function sanitizing_attributes_sql($atr){\n\t\t$atr1 = $mysqli->real_escape_string($atr); //escapes special chars\n\t\treturn $atr1;\n\t}", "function hash_mysql_sanitize($pdata){\n\t\nif( isset($pdata) ){\n\n\t//make sure that $pdata is cleaned. put this in a header.\n\tforeach( $pdata as $key => $value ){\n\t\t//clean up!\n\t\tmysql_real_escape_string($value);\n\t}\n}\n\nreturn $pdata;\n}", "private function preventSQLInjection($string) {\n foreach ($string as $key => $value) {\n //Escapes special characters in a string for use in an SQL statement\n $value = mysql_real_escape_string($value);\n }\n return $string;\n }", "function insertData($strInput)//Use In inserting or updating data into database\n{\n\t$strInput = addslashes(unconvertHTML($strInput));\n\treturn $strInput;\n}", "function sql_desanitize($sql)\r\n{\r\n\t$trysan = str_replace(\"\\\\\\\\\", \"\\\\\", $sql);\r\n\t$trysan = str_replace(\"\\\"\\\"\", \"\\\"\", $trysan);\r\n\t$trysan = str_replace(\"''\", \"'\", $trysan);\r\n\treturn $trysan;\r\n}", "public static function test_input($data) {\r\n $data = trim($data);\r\n //This PHP function returns a string with backslashes in front of each character that needs to be quoted in a database query\r\n $data = addslashes($data);\r\n //The htmlspecialchars() function converts some predefined characters to HTML entities.\r\n //Translates: <script>location.href('http://www.hacked.com')</script> \r\n //To: &lt;script&gt;location.href('http://www.hacked.com')&lt;/script&gt;\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n }", "function rehtmlspecialchars($arg){\n\t//$arg = str_replace(\"\", \"<\", $arg);\n\t//$arg = str_replace(\" \", \"_\", $arg);\n\t$arg = str_replace(\"/\", \"\", $arg);\n\t$arg = str_replace(\"&\", \"\", $arg);\n\t$arg = str_replace(\"'\", \"\", $arg);\n\t$arg = str_replace(\"#\", \"\", $arg);\n\t$arg = str_replace(\"(\", \"\", $arg);\n\t$arg = str_replace(\")\", \"-\", $arg);\n\t$arg = str_replace(\".\", \"\", $arg);\n\t\n\treturn $arg;\n\t}", "function ppPrepareForDB($var) {\n $var = COM_checkHTML($var);\n $var = addslashes($var);\n return $var;\n}", "function safe_import($data)\n {\n return trim(mysql_real_escape_string($data));\n }", "function clean_input( $dirty_data ){\n\t//use the DB connection already established\n\tglobal $db;\n\t//clean the data and 'return' it so we can continue working with it\n\treturn mysqli_real_escape_string($db, strip_tags( $dirty_data ));\n}", "function make_safe($text) {\n\t// make_safe MUST be called AFTER db_connect()\n\t// database must be connected to use escape string function\n\t\n\t$text = stripslashes($text);\n\t$text = htmlentities($text);\n\t$text = strip_tags($text);\n\t$text = $GLOBALS['db_connection'] -> real_escape_string($text);\n\treturn $text;\n}", "function test_input($con,$data){\r\n$data=trim($data);\r\n$data= stripslashes($data);\r\n$data= mysqli_real_escape_string($con, $data);\r\n$data= htmlspecialchars($data);\r\nreturn $data;\r\n}", "function escaped_str($string)\n{\n $safe_string = Database::getInstance()->getConnection()->real_escape_string($string);\n return $safe_string;\n}", "private function mysql_protect($string) \n {\n return @ mysql_escape_string(trim(strip_tags(addslashes($string))));\n }", "function safe_import($data)\n {\n return trim(mysql_real_escape_string($data));\n }", "public static function escape($som) {}", "function SafeConvert($data){\n\t$data=trim($data);\n\t//convert special characters to html entities\n\t//most hacking inputs in XSS are HTML in nature, so converting them to special characters so that they are not harmful\n\t$data=htmlspecialchars($data);\n\t//sanitize before using any MySQL database queries\n\t//this will escape quotes in the input.\n\t$data = mysql_real_escape_string($data);\n\treturn $data;\n}", "abstract public function sanitize();", "public static function InjectionCleaner($var)\n {\n $var = htmlspecialchars($var);\n $var = str_replace(\"<?php\", \"\", $var);\n $var = str_replace(\"?>\", \"\", $var);\n $var = str_replace(\"SELECT\", \"\", $var);\n $var = str_replace(\"INSERT\", \"\", $var);\n $var = str_replace(\"UPDATE\", \"\", $var);\n $var = str_replace(\"DROP\", \"\", $var);\n $var = str_replace(\"TRUNCATE\", \"\", $var);\n $var = str_replace(\"CREATE\", \"\", $var);\n $var = str_replace(\"<script\", \"\", $var);\n $var = str_replace(\"data:image/jpeg;base64,\", \"\", $var);\n $var = str_replace(\"data:image/png;base64,\", \"\", $var);\n\n return $var;\n }", "protected function sanitize() {}", "private function quote( )\n {\n if ( @ count( $this->data_buffer ) == 0 )\n return;\n foreach ( $this->data_buffer as $key => $val )\n {\n if ( in_array( $key, $this->string_fields ))\n $this->data_buffer[$key] = @\"'\".mysql_real_escape_string($val,underQL::$db_handle).\"'\";\n else\n $this->data_buffer[$key] = $val;\n }\n }", "function db_input($string) {\n\t$DB = DB::DB()->getLink();\n\treturn $DB->real_escape_string($string);\n}", "function sloodle_clean_for_db($str)\n {\n return htmlentities($str, ENT_QUOTES, 'UTF-8');\n }", "function init__database_security_filter()\n{\n global $DB_ESCAPE_STRING_LIST;\n $DB_ESCAPE_STRING_LIST = array();\n}", "function escape_string($string)\n{\n\tglobal $connection;\n\t$string=htmlentities($string);\n\treturn $string;\n}", "function sterilize($input){\r\n return htmlspecialchars($input);\r\n }", "function escs(String $value)\n{\n // bring the global db connect object into function\n global $conn;\n\n $val = trim($value); // remove empty space sorrounding string\n $data = stripslashes($val);\n $data = htmlspecialchars($data);\n $val = mysqli_real_escape_string($conn, $value);\n\n return $data;\n}", "function mysql_prep_string($string) {\n global $db;\n return mysqli_real_escape_string($db->connection, htmlentities(strip_tags($string)));\n}", "public function _real_escape($data)\n {\n }", "private function mysql_protect($txt) \n\t\t{\n\t\t\t$txt = $this->link_mt->real_escape_string($txt);\n\t\t\treturn $txt;\n\t\t}", "function sanitize($data)\n{\n$data = trim($data);\n \n// apply stripslashes if magic_quotes_gpc is enabled\nif(get_magic_quotes_gpc())\n{\n$data = stripslashes($data);\n}\n \n// a mySQL connection is required before using this function\n$data = mysql_real_escape_string($data);\n \nreturn $data;\n}", "function sanitize_input($data)\n {\n $data = trim($data); //remove whitespaces \n $data = stripslashes($data); //such as '\n $data = htmlspecialchars($data); //such as >,<&\n return $data;\n }", "function check_input($data){\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n $data = htmlentities($data);\n $data = mysql_real_escape_string($data);\n return $data;\n}", "function check_input($data){\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n $data = htmlentities($data);\n $data = mysql_real_escape_string($data);\n return $data;\n}", "function fixSQLInjection($value){\n $newstring=$value;\n //echo \"value=\".$value.\"<br/>\";\n $latestPos=0;\n $counter=0;\n if (strpos($value,',')!==false) throw new Exception (\"PASS. Comma is unavaiable as a character. PGSQL doesn\\'t like it :( \");\n //echo \"position of ': \";var_dump(strpos($value,'\\'')); echo \"<br/>\";\n while(($positionOfXrenb=strpos($value,'\\'',$latestPos))!==false){\n //echo \"GG\";\n $newstring = substr($newstring,0,$positionOfXrenb+$counter);\n $newstring.='\\'';\n $newstring.=substr($value,$positionOfXrenb,strlen($value)-$positionOfXrenb);\n //var_dump ($newstring);\n //echo \"<br/>\";\n $latestPos=$positionOfXrenb;\n $value[$positionOfXrenb]='X';\n $counter++;\n \n }\n //var_dump ($newstring);\n return $newstring;\n}", "function sanitize($db_link, $var) {\n\t\tif(get_magic_quotes_gpc()) $var = stripslashes($var);\n\t\t$var = htmlentities($var);\n\t\t$var = strip_tags($var);\n\t\t$var = mysqli_real_escape_string($db_link, $var);\n\t\treturn $var;\n\t}", "function filter($string){\n\t\t\t\t\t\t$string = htmlspecialchars($string);\n\t\t\t\t\t\t$string = preg_replace(array('`[^a-z0-9]`i','`[-]+`'), '-', $string);\n\t\t\t\t\t\t$string = mysql_escape_string($string);\n\t\t\t\t\t\treturn $string;\n\t\t\t\t\t}", "function escape($unsafe_string) {\n return mysqli_real_escape_string($dbc , $unsafe_string);\n}", "function html_xss_clean($text) {\n return htmlspecialchars($text);\n}", "function secure_input($input) {\n\t\t\t$input = trim($input);\n\t\t\t$input = htmlspecialchars($input);\n\t\t\treturn $input;\n\t\t}", "function escape_data ($data) {\n global $dbc;\n if (ini_get('magic_quotes_gpc')) {\n $data = stripslashes($data);\n }\n return mysql_real_escape_string (trim ($data), $dbc);\n}", "function sanitize($data)\n {\n $data=trim($data);\n $data=mysql_real_escape_string($data);\n return $data;\n }", "function secure_input($data) {\n $data = trim($data);\n // remove backslashes (\\)\n $data = stripslashes($data);\n // save as HTML escaped code --> any scripts in input data will not run\n $data = htmlspecialchars($data);\n return $data;\n }", "function sanitizeInput(&$string){\n $string = $this->connection->real_escape_string($string);\n }", "function escape($data){\r\n\t\t\tglobal $link;\r\n\t\t\treturn mysqli_real_escape_string($link, $data);\r\n\t\t}", "function _replacePlaceholdersInSQL(&$data){\n // allow current user name in filter:\n $data['sql'] = str_replace('%user%', $_SERVER['REMOTE_USER'], $data['sql']);\n // allow current date in filter:\n $data['sql'] = str_replace('%now%', dformat(null, '%Y-%m-%d'),$data['sql']);\n }", "private static function escapeSql($s) // {{{\n {\n $matches = array(\"\\\\\", \"'\", \"\\\"\" /*,\"\\0\", \"\\b\", \"\\n\", \"\\r\", \"\\t\"*/);\n $replacements = array(\"\\\\\\\\\", \"\\\\'\", \"\\\\\\\"\", /*\"\\\\0\", \"\\\\b\", \"\\\\n\", \"\\\\r\",\n \"\\\\t\"*/);\n $st = str_replace($matches, $replacements, $s);\n return $st;\n }", "function sS($var) {\n\t\t$var = strip_tags($var);\n\t\t$var = htmlentities($var);\n\t\t$var = stripslashes($var);\n\t\tglobal $connection;\n\t\treturn $connection->real_escape_string($var); //?\n\t}", "function clean($value) {\r\n\r\n\t/*$str = @trim($str);\r\n\r\n\tif(get_magic_quotes_gpc()) {\r\n\r\n\t\t$str = stripslashes($str);\r\n\r\n\t}\r\n\r\n\treturn mysql_real_escape_string($str);*/\r\n\r\n\t\r\n\r\n\t\t//function to check for both sql injection and cross site scripting\r\n\r\n\t\t //Trim the value\r\n\r\n\t\t $value = trim($value);\r\n\r\n\t\t \r\n\r\n\t\t// Stripslashes\r\n\r\n\t\tif (get_magic_quotes_gpc()) {\r\n\r\n\t\t\t$value = stripslashes($value);\r\n\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\t // Convert all &lt;, &gt; etc. to normal html and then strip these\r\n\r\n\t\t $value = strtr($value,array_flip(get_html_translation_table(HTML_ENTITIES)));\r\n\r\n\t\t\r\n\r\n\t\t // Strip HTML Tags\r\n\r\n\t\t $value = strip_tags($value);\r\n\r\n\t\t\r\n\r\n\t\t// Quote the value\r\n\r\n\t\t$value = mysql_real_escape_string($value);\r\n\r\n\t\t$value = htmlspecialchars ($value);\r\n\r\n\t\treturn $value;\r\n\r\n}", "function escape_sq($str)\n{\n $esc_str = str_replace(\"'\", \"''\", $str);\n return $esc_str;\n}", "function pdo_escape_string($str, $link=NULL) {\r\n return pdo_real_escape_string($str, $link);\r\n }", "function sqlCode($s, $db){\n\t$result = preg_replace(\"/[^a-zA-Z0-9\\-]+/\", \"\", $s);\n\treturn trim($db->real_escape_string($result));\n}", "function normalizeInputedString($input, $connection) {\n $input = strip_tags($input);\n $input = mysqli_real_escape_string($connection, $input);\n return $input;\n}", "function escape_data($dataFromForms) {\n if (function_exists('mysql_real_escape_string')) {\n $dataFromForms = mysqli_real_escape_string (trim($dataFromForms), $connection);\n $dataFromForms = strip_tags($dataFromForms);\n } else {\n $dataFromForms = mysqli_escape_string (trim($dataFromForms));\n $dataFromForms = strip_tags($dataFromForms);\n }\n return $dataFromForms;\n }", "function safeSQL($source, &$connection) {\n\t\t// clean all elements in this array\n\t\tif (is_array($source)) {\n\t\t\tforeach($source as $key => $value)\n\t\t\t\t// filter element for SQL injection\n\t\t\t\tif (is_string($value)) $source[$key] = $this->quoteSmart($this->decode($value), $connection);\n\t\t\treturn $source;\n\t\t// clean this string\n\t\t} else if (is_string($source)) {\n\t\t\t// filter source for SQL injection\n\t\t\tif (is_string($source)) return $this->quoteSmart($this->decode($source), $connection);\n\t\t// return parameter as given\n\t\t} else return $source;\t\n\t}", "function strClean($strCadena){\n $string = preg_replace(['/\\s+/','/^\\s|\\s$/'],[' ',''], $strCadena);\n $string = trim($string); //Elimina espacios en blanco al inicio y al final\n $string = stripslashes($string); // Elimina las \\ invertidas\n $string = str_ireplace(\"<script>\",\"\",$string);\n $string = str_ireplace(\"</script>\",\"\",$string);\n $string = str_ireplace(\"<script src>\",\"\",$string);\n $string = str_ireplace(\"<script type=>\",\"\",$string);\n $string = str_ireplace(\"SELECT * FROM\",\"\",$string);\n $string = str_ireplace(\"DELETE FROM\",\"\",$string);\n $string = str_ireplace(\"INSERT INTO\",\"\",$string);\n $string = str_ireplace(\"SELECT COUNT(*) FROM\",\"\",$string);\n $string = str_ireplace(\"DROP TABLE\",\"\",$string);\n $string = str_ireplace(\"OR '1'='1\",\"\",$string);\n $string = str_ireplace('OR \"1\"=\"1\"',\"\",$string);\n $string = str_ireplace('OR ´1´=´1´',\"\",$string);\n $string = str_ireplace(\"is NULL; --\",\"\",$string);\n $string = str_ireplace(\"is NULL; --\",\"\",$string);\n $string = str_ireplace(\"LIKE '\",\"\",$string);\n $string = str_ireplace('LIKE \"',\"\",$string);\n $string = str_ireplace(\"LIKE ´\",\"\",$string);\n $string = str_ireplace(\"OR 'a'='a\",\"\",$string);\n $string = str_ireplace('OR \"a\"=\"a',\"\",$string);\n $string = str_ireplace(\"OR ´a´=´a\",\"\",$string);\n $string = str_ireplace(\"OR ´a´=´a\",\"\",$string);\n $string = str_ireplace(\"--\",\"\",$string);\n $string = str_ireplace(\"^\",\"\",$string);\n $string = str_ireplace(\"[\",\"\",$string);\n $string = str_ireplace(\"]\",\"\",$string);\n $string = str_ireplace(\"==\",\"\",$string);\n return $string;\n }", "function test_input($data){\r\n $data = trim($data); //remove white spaces\r\n $data = stripcslashes($data); //remove backslashes\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n }", "function postValidate($string)\r\n\t{\r\n\t $instrucoesSQL = array( \"INSERT\", \"insert\", \"UPDATE\", \"update\", \"DELETE\", \"delete\", \"TRUNCATE\", \"truncate\", \"WHERE\", \"where\" );\r\n\r\n\t $retirandoPossiveisInjections = str_replace($instrucoesSQL, \"\", $string);\r\n\r\n\t return addslashes($retirandoPossiveisInjections);\r\n\t}", "function filterSpecials($data){\n\n if(!$this->isUTF8($data))\n $data = utf8_encode($data);\n $data = htmlspecialchars($data, ENT_QUOTES);\n\n return $data;\n }", "function input_validation($input) {\r\n\r\n global $con;\r\n $input_t = trim($input);\r\n $input_v = mysql_real_escape_string($con, $input_t);\r\n return $input_v;\r\n}", "function formatAndQuery() {\n\tglobal $DB;\n\t$args = func_get_args();\n\t$query = array_shift($args); #remove the first element of the array as its own variable\n\t$query = str_replace(\"%sv\",\"'%s'\",$query);\n\tforeach ($args as $key => $val)\n\t {\n\t $args[$key] = $DB->real_escape_string($val);\n\t\t\t$args[$key] = htmlspecialchars($val);\n\t }\n\t$query = vsprintf($query, $args);\n\t$result = $DB->query($query);\n\tif (!$result)\n\t{\n\tthrow new Exception($DB->error.\" [$query]\");\n\t}\n\treturn $result;\n}", "function sanitise_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "public function sanitize($str){\n\t\tglobal $con;\n\t\t$invalid_characters = array(\"$\", \"%\", \"#\", \"<\", \">\", \"|\");\n\t\t$str = str_replace($invalid_characters, \"\", $str);\n\t\t$str=mysqli_real_escape_string($con,$str);\n\t\treturn $str;\n\t}", "function db_security($conn, $string) {\n if(ctype_digit($string))\n $string = intval($string);\n else {\n /*mysql_real_escape_string — Protège une commande SQL de la présence de caractères spéciaux*/\n $string = mysqli_real_escape_string($conn, $string);\n $string = addcslashes($string, '%_');\n }\n return ($string);\n }", "function sanitize_string_xss(string $data): string\n{\n return filter_var($data, FILTER_SANITIZE_STRING);\n}", "function sql_real_escape_string($val,$dbh=NULL)\n {\n $s = sql_quote_string($val, $dbh);\n return (string) substr($s, 1, strlen($s) -2 );\n// return addslashes($val);\n }" ]
[ "0.6846932", "0.6671799", "0.66669977", "0.6589908", "0.658406", "0.65651757", "0.65582883", "0.65257055", "0.6510999", "0.65039515", "0.6479666", "0.6462158", "0.6458724", "0.64330816", "0.6429838", "0.64138585", "0.64120257", "0.63999945", "0.6394304", "0.63847834", "0.63721806", "0.6369639", "0.63440466", "0.6341101", "0.6328934", "0.6323839", "0.63193756", "0.6313061", "0.6294414", "0.62867063", "0.6280756", "0.6269203", "0.6217232", "0.6216259", "0.6207281", "0.61881", "0.6180568", "0.6165488", "0.6161735", "0.6158982", "0.6124148", "0.6121815", "0.6119028", "0.6109477", "0.6104698", "0.60924923", "0.6070197", "0.60679966", "0.60573316", "0.6043115", "0.6039622", "0.60333824", "0.60327303", "0.603109", "0.6022736", "0.60172105", "0.60153824", "0.60129786", "0.60004425", "0.59902126", "0.598679", "0.5985277", "0.5977797", "0.5965188", "0.5951668", "0.59500164", "0.5941245", "0.5941245", "0.5936295", "0.5932831", "0.59296995", "0.59255844", "0.59214556", "0.5920814", "0.59207207", "0.5920216", "0.5918085", "0.59175867", "0.5915714", "0.5913356", "0.5909924", "0.5906209", "0.59042585", "0.589674", "0.58882064", "0.5870795", "0.5866516", "0.5864648", "0.5860482", "0.5860427", "0.5857407", "0.5855029", "0.58540195", "0.5852381", "0.5848831", "0.584264", "0.58293587", "0.5826272", "0.5825992", "0.58062977" ]
0.7492571
0
Truncate data in table before alter his structure
Обрезать данные в таблице перед изменением её структуры
public function truncateTable() { Schema::disableForeignKeyConstraints(); DB::table('questions')->truncate(); DB::table('answers')->truncate(); Schema::enableForeignKeyConstraints(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function truncate()\n {\n // Désactivation des contraintes FK\n $this->co->executeQuery('SET foreign_key_checks = 0');\n // On tronque\n $this->co->executeQuery('TRUNCATE TABLE casting');\n $this->co->executeQuery('TRUNCATE TABLE department');\n $this->co->executeQuery('TRUNCATE TABLE genre');\n $this->co->executeQuery('TRUNCATE TABLE job');\n $this->co->executeQuery('TRUNCATE TABLE movie');\n $this->co->executeQuery('TRUNCATE TABLE movie_genre');\n $this->co->executeQuery('TRUNCATE TABLE person');\n $this->co->executeQuery('TRUNCATE TABLE review');\n $this->co->executeQuery('TRUNCATE TABLE team');\n $this->co->executeQuery('TRUNCATE TABLE user');\n }", "public function truncate()\n {\n $this->_getWriteAdapter()->truncateTable($this->getMainTable());\n }", "public function truncate(): void\n {\n $sql = <<<SQL\nTRUNCATE TABLE `cfg_centreonbroker`;\nTRUNCATE TABLE `cfg_centreonbroker_info`\nSQL;\n $stmt = $this->db->prepare($sql);\n $stmt->execute();\n }", "public function truncateTable() {\n Schema::disableForeignKeyConstraints();\n DB::table('missed_calls')->truncate();\n Schema::enableForeignKeyConstraints();\n }", "function truncateData(){\n\t\t$userid=$GLOBALS['username'];\n mysql_query(\"SET FOREIGN_KEY_CHECKS=0;\");\n\t\t$truncateSource = mysql_query(\"TRUNCATE TABLE \".$userid.\"nertag\") or die(mysql_error());\n\t\t$truncateTarget = mysql_query(\"TRUNCATE TABLE \".$userid.\"sentences\") or die(mysql_error());\n mysql_query(\"SET FOREIGN_KEY_CHECKS=1;\");\n}", "abstract public function truncate($table);", "public final function truncate()\n {\n $sql = 'TRUNCATE {db_prefix}' . $this->tbl;\n $this->db->query($sql);\n }", "function truncateTable() {\n\t\t$dbh=$this->getdbh();\n\t\treturn $dbh->query('TRUNCATE TABLE '.$this->enquote($this->tablename));\n\t\t\n\t}", "public function clean(): void\n {\n $this->truncateJournalTable();\n $this->output(\"<success>Table {$this->internalTable} truncated</success>\");\n }", "public function postTruncate($drupal_table_name);", "public function onRsformBackendFormRestoreTruncate(): void\n\t{\n\t\t$this->db->truncateTable('#__rsform_jdideal');\n\t}", "public function truncateTables()\n {\n $tables = [\n 'properties',\n 'users',\n ];\n\n DB::unprepared('TRUNCATE TABLE ' . implode(',', $tables) . ' RESTART IDENTITY CASCADE');\n }", "public function preTruncate($drupal_table_name);", "public function clear()\r\n\t{\r\n\t\t$this->db->runQuery(\"TRUNCATE TABLE `\" . $this->name . \"`\");\r\n\t}", "function truncate(){\n\t\t$this->db_tools->truncate();\t\t\n\t\t$this->db_tools->echo_truncate();\n\t}", "public function truncateTable($table)\n {\n $this->db->createCommand()->truncateTable($table)->execute();\n }", "public function truncate($table) {\n\t\t$table = str_replace('`', '', $table);\n\t\t$table = explode('.', $table);\n\t\t$table = '`' . $table[0] . '`' . (isset($table[1]) ? '.`' . $table[1] . '`' : '') ;\n\t\t$this->query('TRUNCATE TABLE ' . $table);\n\t}", "public function truncate()\n {\n foreach ($this->grammar->compileTruncate($this) as $sql => $bindings)\n {\n $this->connection->statement($sql, $bindings);\n }\n }", "public function truncate($table)\r\n\t\t{\r\n\t\t\t$this->_query = $this->_prepare(\"TRUNCATE TABLE `{$this->_prefix}{$table}`\");\r\n\t\t\t$this->_execute($this->_query);\r\n\t\t\t$this->_errors($this->_query);\r\n\t\t\t$this->close();\r\n\t\t}", "protected function truncateTables()\n {\n \\DB::table('cities')->truncate();\n \\DB::table('states')->truncate();\n }", "function emptyIndexTable(){\n\t\t$this->ecmDBhandle->truncateTable($this->dfs_db-> table_name);\n\t}", "public function truncate()\n\t{\n\t\tdebugInfo(get_class($this).\"->truncate\");\n\n\t\t// clear private variables\n\t\t$this->_clear();\n\n\t\t$this->_query = \"TRUNCATE TABLE $this->_table;\";\n\n\t\t$return = $this->_execute(false);\n\n\t\tdebug('->truncate(), $return', $return);\n\t\treturn $return;\n\t}", "public function clear()\n {\n self::foreignChecks(false);\n $this->model->truncate();\n self::foreignChecks(true);\n }", "public function truncateTable($table) {\n\t\t$this->getDbConnection()->createCommand()->truncateTable($table);\n\t}", "public function truncate() {\n\t\t$qs = ('TRUNCATE TABLE '.$this->table);\n\t\treturn $this->query($qs);\n\t}", "public function truncate() {\n\t\t$sql = \"TRUNCATE `\" . static::tablename() . \"`\";\n\t\t$q = $this->_fizz_pdo->prepare($sql);\n\t\treturn $this->_fizz_execute($q, array());\n\t}", "private function cleanDatabase()\n {\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n foreach($this->tables as $table)\n {\n\n DB::table($table)->truncate();\n\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n\n\n }", "abstract protected function platformTruncateStatement($table);", "public function purgeUndoTable()\n\t{\n\t\t$objDatabase = \\Database::getInstance();\n\n\t\t// Truncate the table\n\t\t$objDatabase->execute(\"TRUNCATE TABLE tl_undo\");\n\n\t\t// Add a log entry\n\t\t$this->log('Purged the undo table', __METHOD__, TL_CRON);\n\t}", "public function truncateTable($tableName);", "function clear_table($table, $dbh)\n{\n\ttry {\n\t $dbh->beginTransaction();\n\n\t $stmt = $dbh->prepare(\"TRUNCATE TABLE $table\");\n\n\t $stmt->execute();\n\n\t $dbh->commit();\n\t} catch(PDOException $ex) {\n\t //Something went wrong rollback!\n\t $dbh->rollBack();\n\t echo $ex->getMessage();\n\t} \n}", "public function truncateLaratrustTables()\n {\n Schema::disableForeignKeyConstraints();\n DB::table('permission_role')->truncate();\n DB::table('permission_user')->truncate();\n DB::table('role_user')->truncate();\n \\App\\User::truncate();\n \\App\\Role::truncate();\n \\App\\Permission::truncate();\n Schema::enableForeignKeyConstraints();\n }", "protected function truncate()\n\t{\n\t\treturn Yii::$app->db->createCommand()\n ->truncateTable($this->table)\n ->execute();\n\t}", "function best_levels_truncate($pdo)\n{\n $result = $pdo->exec('TRUNCATE TABLE best_levels');\n\n if ($result === false) {\n throw new Exception(\"Could not truncate all-time best levels table.\");\n }\n\n return $result;\n}", "function truncate()\n\t{\n\t\t$this->data = array();\n\t\t;\n\t}", "private function clear_dummy_data()\n {\n $this->adapter->query('DELETE FROM ' . RUCKUSING_TS_SCHEMA_TBL_NAME);\n }", "public function truncate()\n {\n\n $this->connection->truncate($this->collection);\n }", "function clear($table){\n\t\t$r=mysql_query(\"TRUNCATE `$table`\");\n\t}", "public static function doTruncate() {\n\t\t$conn = new wgConnector();\n\t\treturn (bool) $conn->truncate(self::TABLE_NAME);\n\t}", "public static function doTruncate() {\n\t\t$conn = new wgConnector();\n\t\treturn (bool) $conn->truncate(self::TABLE_NAME);\n\t}", "public static function doTruncate() {\n\t\t$conn = new wgConnector();\n\t\treturn (bool) $conn->truncate(self::TABLE_NAME);\n\t}", "public static function doTruncate() {\n\t\t$conn = new wgConnector();\n\t\treturn (bool) $conn->truncate(self::TABLE_NAME);\n\t}", "public function truncate() {\n try {\n $this->db->exec(\"TRUNCATE `\" . $this->table . \"`\");\n return new DynamicTable($this->table, $this->db);\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "public function truncate($tabel)\n {\n $this->app_db->from($tabel);\n $this->app_db->truncate();\n }", "public function reset()\n {\n $db = PDOController::getInstance();\n \n $req = $db->prepare(\"TRUNCATE TABLE `executedtask` \");\n $req->execute([]);\n }", "function Truncate()\n {\n $databasename = $this->databasename;\n $tablename = $this->tablename;\n $path = $this->path;\n $this->numrecords = -1;\n $this->numrecordscache = array();\n remove_dir_rec(\"$path/$databasename/$tablename\");\n $this->ClearCachefile();\n return true;\n }", "public function resetTable();", "public function truncateAll(): void\n {\n $tables = [\n Newsletter::TABLE_NAME,\n Link::TABLE_NAME,\n Log::TABLE_NAME,\n Queue::TABLE_NAME,\n ];\n foreach ($tables as $table) {\n DatabaseUtility::getConnectionForTable($table)->truncate($table);\n }\n }", "public function cleanRoleAndPermissionTables() : void\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('roles')->truncate();\n DB::table('permissions')->truncate();\n DB::table('role_has_permissions')->truncate();\n DB::table('model_has_roles')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function actionTruncate()\n {\n $dbName = Yii::$app->db->createCommand('SELECT DATABASE()')->queryScalar();\n if ($this->confirm('This will truncate all tables of current database [' . $dbName . '].')) {\n Yii::$app->db->createCommand('SET FOREIGN_KEY_CHECKS=0')->execute();\n $tables = Yii::$app->db->schema->getTableNames();\n foreach ($tables as $table) {\n $this->stdout('Truncating table ' . $table . PHP_EOL, Console::FG_RED);\n Yii::$app->db->createCommand()->truncateTable($table)->execute();\n }\n Yii::$app->db->createCommand('SET FOREIGN_KEY_CHECKS=1')->execute();\n }\n }", "public function truncate()\r\n {\r\n }", "public function truncateJournalTable()\n {\n return $this->conn->delete($this->internalTable, ['1' => '1']);\n }", "public static function clear_schema()\n {\n }", "public function testTruncateTableTable()\n {\n $sql = 'TRUNCATE TABLE `name`';\n $statement = (new TruncateTable($this->mockConnection))->table('name');\n $this->assertEquals($sql, $statement->toSql());\n }", "public function truncateTable($table)\n\t{\n\t\t$n = $this->setText(\"TRUNCATE TABLE \".$this->_connection->quoteTableName($table))->execute();\n\t\treturn $n;\n\t}", "public static function dbClearTable($table){\n\t\tif (App::runningUnitTests()) {\n\t\t\tif (DB::table($table)->count() != 0) {\n\t\t\t\t//Turn foreign key checks off <- USE WITH CAUTION!\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\t\t\t//Delete all entries & reset indexes\n\t\t\t\tDB::table($table)->truncate();\n\t\t\t\t//Turn foreign key checks on <- SHOULD RESET ANYWAY BUT JUST TO MAKE SURE!\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\t\t\t}\n\t\t}\n\t}", "public function run()\n {\n DB::table('companies')->truncate();\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0;');\n DB::table('usuario')->truncate();\n DB::table('rol')->truncate();\n DB::table('rol_usuario')->truncate();\n DB::table('permiso')->truncate();\n DB::table('permiso_rol')->truncate();\n DB::table('permiso_usuario')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS = 1;');\n }", "public function truncate($initAutoIncrement = false): void;", "public function purgeVersionTable()\n\t{\n\t\t$objDatabase = \\Database::getInstance();\n\n\t\t// Truncate the table\n\t\t$objDatabase->execute(\"TRUNCATE TABLE tl_version\");\n\n\t\t// Add a log entry\n\t\t$this->log('Purged the version table', __METHOD__, TL_CRON);\n\t}", "public function TruncateTable($table)\r\n\t{\r\n\t\t$sql = \"delete from $table\";\r\n\t\treturn $this->Execute($sql);\r\n\t}", "public function deleteAll()\n {\n $query = 'TRUNCATE TABLE `'. $this->getTableName() .'`';\n $this->db->sql_query($query);\n }", "public function testTruncate()\n {\n \t$this->conn->delete('test', NULL, DB::ALL_ROWS);\n\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n \t$this->assertNull($result->fetchOrdered());\n }", "private function clearTable(){\n\t\n\t\t$db = new manejaDB();\n\t\t$query = \"truncate alert\";\n\t\t$db->query($query);\n\t\treturn true;\n\t\t\n\t}", "function base_clear(){\n $tables = array(\n 'oc_product',\n 'oc_product_image',\n 'oc_manufacturer',\n 'oc_manufacturer_description',\n 'oc_product_description',\n 'oc_product_to_category',\n 'oc_product_attribute',\n 'oc_attribute',\n 'oc_attribute_description',\n // 'oc_attribute_value',\n // 'oc_category',\n // 'oc_category_description',\n 'oc_product_to_store',\n // 'oc_category_to_store',\n 'oc_manufacturer_to_store',\n 'oc_product_to_layout',\n // 'oc_category_to_layout',\n );\n foreach ($tables as $table)\n {\n sDb::query(\"TRUNCATE TABLE $table\");\n echo \"Таблица $table очищена\\n\";\n }\n}", "private function purgeTables()\n\t{\t\n\t\t$this->db->query(\"DELETE FROM categories\");\n\t\t$this->db->query(\"DELETE FROM album_art\");\n\t\t$this->db->query(\"TRUNCATE TABLE albums\");\n\t\t\n\t}", "function cleanVisitorTable($database = \"\"){\n\t\t\n\t\t$sql = \"TRUNCATE TABLE visitor\"; \n\t\t\n\t\ttry{\n\t\t\t\n\t\t\t$query = $database->exec($sql);\n\t\t\t\n\t\t\techo 'Succesfully ran rhe clean up operation.';\n\t\t\t\n\t\t} catch(PDOException $error){\n\t\t\n\t\t\techo 'Error with query. '.$error->getMessage();\n\t\t\n\t\t}\n\t\t\n\t}", "public function updateAggregationTable()\n {\n DB::table($this->aggregation_table)->truncate();\n foreach ($this->affiliates as $affiliate) {\n DB::table($this->aggregation_table)->insert(['affiliate_id'=>$affiliate->affiliate_id, \n 'revenue' =>$affiliate->revenue]);\n }\n }", "function empty_table($name) {\n\t\t\t$result = $this->checkup(\"\", $name);\n\t\t\tif ($result == false) {\n\t\t\t\treturn $this->error(\"could not truncate.\");\n\t\t\t}\n\n\t\t\t#if ( mysql_query ( \"TRUNCATE TABLE \" . $name, $this->CONN ) ) {\n\t\t\tif ($this->one_query(\"TRUNCATE TABLE \".$name)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t$this->error(\"error truncating table '$name' !\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function truncateTable($table)\n\t{\n\t\t$sql = $this->connection->getQueryBuilder()->truncateTable($table);\n\t\treturn $this->setSql($sql)->execute();\n\t}", "public function truncate(array $param = array('table'=>'')) {\n // (REQUIRED) name of table\n $tableName = isset($param['table']) ? $param['table'] : '';\n\n if( empty( $tableName ) ) {\n echo \"table name missing\";\n die;\n }\n\n $strQry = \"TRUNCATE TABLE `\".$tableName.\"`;\";\n\n $pdo = $this->getConnection();\n $this->stmt = $pdo->prepare($strQry);\n $executed = $this->stmt->execute();\n if( $executed ) {\n echo 'table truncated successfully.';\n } else {\n echo 'fails to truncate table';\n }\n $this->stmt = null;\n die;\n }", "public function wipe($type) {\n\t\t$table = $this->safeTable($type);\n\t\t$this->adapter->exec(\"DELETE FROM $table\");\n\t}", "public function acfedu_truncate_table() {\n\t\t\t\tif ( isset( $_POST[\"truncate_table_nonce\"] ) ) {\n\t\t\t\t\tif ( ! wp_verify_nonce( $_POST[\"truncate_table_nonce\"], 'truncate-table-nonce' ) ) {\n\t\t\t\t\t\t$this->acfedu_errors()->add( 'error_no_nonce_match', esc_html__( 'Something went wrong, please try again.', 'acf-faculty-selector' ) );\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( isset( $_POST['delete_faculty'] ) ) {\n\t\t\t\t\t\t\tif ( isset( $_POST['delete_faculty'] ) && 1 == $_POST[\"delete_faculty\"] ) {\n\n\t\t\t\t\t\t\t\tglobal $wpdb;\n\t\t\t\t\t\t\t\t$prefix = $wpdb->get_blog_prefix();\n\t\t\t\t\t\t\t\t$wpdb->query( 'TRUNCATE TABLE ' . $prefix . 'faculty' );\n\t\t\t\t\t\t\t\t$this->acfedu_errors()->add( 'success_table_truncated', esc_html__( 'All faculty are deleted.', 'acf-faculty-selector' ) );\n\n\t\t\t\t\t\t\t\tdo_action( 'acfedu_after_success_nuke' );\n\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}", "public static function truncate($model){\n\t\t$table = self::table_for($model);\n\t\treturn self::do_query(\"TRUNCATE TABLE \" . $table);\t\n\t}", "public function truncate()\n {\n }", "public function clearMessages() {\n $this->connection->truncate($this->messageTable)\n ->execute();\n }", "function clearwatson(){\n\t\t$connection = Database::getConnection();\n\t\t//Empty watson table\n\t\t$query=\"TRUNCATE TABLE watson\";\n\t\tif (!$connection->query($query)){\n\t\t\techo \"Error :\" .$query . \"<br>\" . $connection->error;\n\t\t}\n\t\t//Empty watson_country table\n\t\t$query=\"TRUNCATE TABLE watson_country\";\n\t\tif (!$connection->query($query)){\n\t\t\techo \"Error :\" .$query . \"<br>\" . $connection->error;\n\t\t}\n\t}", "public function wipe($connection, $table);", "public function truncate_table_data()\n {\n if($this->isloggedIn())\n {\n $group = $this->session->userdata['role'];\n $data['menu'] = $this->Menu_model->getMenuItems($group);\n $data['users'] = $this->Settings_model->getAdminUsers();\n $data['company_info'] = $this->Settings_model->get_company_info();\n\n $result = $this->db->query(\"SHOW TABLE STATUS\")->result();\n $tableinfo = array();\n $totalsize = 0;\n $totalrows = 0;\n foreach($result as $res){\n $size = round($res->Data_length/1000,2);\n $totalsize += $size;\n $totalrows += $res->Rows;\n $tableinfo['all'][] = (object)array(\"name\" => $res->Name, \"size\" => $size.\" KB\", \"rows\" => $res->Rows);\n }\n $tableinfo['totalSize'] = round(($totalsize/1000),2).\" MB\";\n $tableinfo['totalRows'] = $totalrows;\n $data['dbtables'] = $tableinfo;\n $data['title'] = $data['company_info']['name'].\" | Database Backup\";\n $this->load->view(\"admin/truncate_table_data\", $data);\n }\n else\n {\n redirect(base_url());\n }\n }", "private function cleanCoreTables() {\n\n $core_tables = [\n 'glpi_datacenters',\n 'glpi_dcrooms',\n 'glpi_items_racks',\n 'glpi_pdus',\n 'glpi_racks',\n 'glpi_rackmodels',\n 'glpi_racktypes',\n 'glpi_passivedcequipments',\n 'glpi_passivedcequipmenttypes',\n 'glpi_passivedcequipmentmodels',\n ];\n\n foreach ($core_tables as $table) {\n $result = $this->db->query('TRUNCATE ' . DB::quoteName($table));\n\n if (!$result) {\n throw new RuntimeException(\n sprintf('Unable to truncate table \"%s\"', $table)\n );\n }\n }\n }", "public static function emptyTruncateAll()\n {\n self::empty();\n self::truncateAll();\n }", "public function flush()\n {\n $this->table()->delete();\n }", "function doempty()\r\n\t{\r\n\t\t$model\t= &$this->getModel( 'table' );\r\n\t\t$model->truncate();\r\n\t\t$this->display();\r\n\t}", "public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}", "function clearTable($table){\n // Server Connection Information\n $servername = \"localhost\";\n $username = \"root\";\n $password = \"T3mp12\";\n $dbname = \"temp\";\n \n // Create Connection\n $conn = new mysqli($servername, $username, $password, $dbname);\n // Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n } \n\n $sql = \"TRUNCATE TABLE $table\";\n\n if ($conn->query($sql) === TRUE) {\n // echo \"New Table Created. <br>\";\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n\n //Close Connection\n $conn->close();\n}", "public static function truncate();", "public function run()\n {\n echo PHP_EOL , 'cleaning old data....', PHP_EOL;\n\n DB::statement(\"SET foreign_key_checks=0\");\n\n User::truncate();\n Role::truncate();\n UserRole::truncate();\n Permission::truncate();\n DB::table('roles_permissions')->truncate();\n DB::table('users_permissions')->truncate();\n\n DB::statement(\"SET foreign_key_checks=1\");\n\n $this->call(RolesTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n }", "public function truncateTables($truncate_users=false)\n {\n $database_name = $this->conn->getDatabase();\n $tables_to_truncate = array(\n 'omp_attributes',\n 'omp_class_attributes',\n 'omp_class_groups',\n 'omp_classes',\n 'omp_lookups',\n 'omp_lookups_values',\n 'omp_relations',\n 'omp_roles',\n 'omp_roles_classes',\n 'omp_tabs',\n );\n\n if ($truncate_users)\n {\n $tables_to_truncate[]='omp_users';\n }\n\n $tables_truncate_queries = '';\n\n foreach ($tables_to_truncate as $aTable)\n {\n $tables_truncate_queries .= \"DROP TABLE IF EXISTS $database_name.$aTable;\\n\";\n }\n\n $commands = \"SET FOREIGN_KEY_CHECKS=0;\\n\".$tables_truncate_queries.\"SET FOREIGN_KEY_CHECKS=1;\\n\";\n\n $this->conn->executeQuery($commands);\n\n $editora_structure = file_get_contents(__DIR__ .'/../../../../data/editora.sql');\n\n $this->conn->executeQuery($editora_structure);\n }", "function empty_table( $name )\n\t{\n\t\t$result = $this->checkup( \"\", $name );\n\t\tif ($result==false) {\n\t\t\treturn $this->error( \"could not truncate.\" );\n\t\t}\n\t\t\n\t\tif ( mysql_query ( \"TRUNCATE TABLE \" . $name, $this->CONN ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$this->error ( \"error truncating table '$name' !\" );\n\t\t\treturn false;\n\t\t}\n\t}", "public function truncate($class_name)\n\t{\n\t\t$this->setContext($class_name);\n\t\t$table_name = $this->storeNameOf($class_name);\n\t\t$this->query('TRUNCATE TABLE ' . BQ . $table_name . BQ);\n\t}", "protected function _after()\n {\n $this->_adapter->execute('drop table if exists comments;\n drop table if exists posts_tags;\n drop table if exists posts;\n drop table if exists tags;\n drop table if exists profiles;\n drop table if exists credentials;\n drop table if exists people;\n ');\n parent::_after();\n }", "protected function _clearSchema()\n {\n\n // Show all tables in the installation.\n foreach (get_db()->query('SHOW TABLES')->fetchAll() as $row) {\n\n // Extract the table name.\n $rv = array_values($row);\n $table = $rv[0];\n\n // If the table is a Neatline table, drop it.\n if (in_array('neatline', explode('_', $table))) {\n $this->db->query(\"DROP TABLE $table\");\n }\n\n }\n\n }", "function revert_table() {\r\n $this->_table = $this->_table_org;\r\n $this->_table_org = NULL;\r\n }", "public function delete_data_to_tombstone(){\n }", "public abstract function getTruncate(Table $table);", "public function limpiar($pdo){\n\t\t$sql = \"TRUNCATE TABLE lista_venta\";\n\t\t$sentencia= $pdo -> prepare($sql); \n\t\t$sentencia -> execute(); \n\n\t\t\n\t}", "public function run()\n {\n DB::table('messages')->truncate();\n DB::table('medicinal_plants_history')->truncate();\n DB::table('medicinal_plants_reports')->truncate();\n DB::table('medicinal_plants_reviews')->truncate();\n DB::table('remedies_history')->truncate();\n DB::table('remedies_reports')->truncate();\n DB::table('remedies_reviews')->truncate();\n DB::table('store_prescriptions')->truncate();\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('TRUNCATE TABLE bands');\n }", "public function truncateTable($table, $db) {\n return 'DELETE FROM ' . $db->quoteId($table) . \" WHERE 1;\\n\";\n }", "public function wipeAll() {\n\t\tforeach($this->getTables() as $t) {\n\t\t\tforeach($this->getKeys($t) as $k) {\n\t\t\t\t$this->adapter->exec(\"ALTER TABLE \\\"{$k['FKTABLE_NAME']}\\\" DROP FOREIGN KEY \\\"{$k['FK_NAME']}\\\"\");\n\t\t\t}\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t\tforeach($this->getTables() as $t) {\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t}" ]
[ "0.7778109", "0.7232321", "0.72232217", "0.7217286", "0.7166768", "0.7090838", "0.7081197", "0.6998966", "0.69685507", "0.69621325", "0.6954953", "0.6933242", "0.6917339", "0.68343383", "0.6774539", "0.6695984", "0.6688773", "0.6658805", "0.6617286", "0.65879977", "0.6577454", "0.6567431", "0.6554648", "0.6514124", "0.6510891", "0.65086097", "0.65014255", "0.64961123", "0.6492612", "0.6468223", "0.6439698", "0.64097816", "0.6370143", "0.63617843", "0.63447344", "0.63358814", "0.6331058", "0.632885", "0.63222754", "0.63222754", "0.63222754", "0.63222754", "0.6319864", "0.62311894", "0.62062395", "0.62049", "0.6196967", "0.61814266", "0.61808085", "0.6175195", "0.6155204", "0.6147292", "0.6133518", "0.612159", "0.6112736", "0.61036414", "0.6099371", "0.6096862", "0.608084", "0.6078992", "0.60692656", "0.6040795", "0.6036427", "0.602445", "0.6018843", "0.5995487", "0.59747595", "0.5969556", "0.5969207", "0.5964636", "0.5950487", "0.5949983", "0.5948627", "0.5943258", "0.59293616", "0.59208333", "0.59163576", "0.586851", "0.5867473", "0.5859748", "0.58496255", "0.58474904", "0.58467335", "0.58418405", "0.58388186", "0.5833123", "0.58112556", "0.58004504", "0.57989484", "0.5796349", "0.5794794", "0.57926553", "0.57816213", "0.5763797", "0.57621074", "0.57607603", "0.5754272", "0.57461256", "0.5743995", "0.5742371" ]
0.7258272
1
Return TRUE if OpenID verification was successful
Верните TRUE, если проверка OpenID была успешной
function verified($proxy=NULL) { preg_match_all('/(?<=^|&)openid\.([^=]+)=([^&]+)/', $_SERVER['QUERY_STRING'],$matches,PREG_SET_ORDER); foreach ($matches as $match) $this->args[$match[1]]=urldecode($match[2]); if (isset($this->args['mode']) && $this->args['mode']!='error' && $this->url=$this->discover($proxy)) { $this->args['mode']='check_authentication'; $var=[]; foreach ($this->args as $key=>$val) $var['openid.'.$key]=$val; $req=\Web::instance()->request( $this->url, [ 'method'=>'POST', 'content'=>http_build_query($var), 'proxy'=>$proxy ] ); return (bool)preg_match('/is_valid:true/i',$req['body']); } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function simpleid_checkid_ok($request) {\n global $version;\n \n $message = array(\n 'openid.mode' => 'id_res',\n 'openid.op_endpoint' => simpleid_url(),\n 'openid.response_nonce' => openid_nonce()\n );\n \n if (isset($request['openid.assoc_handle'])) $message['openid.assoc_handle'] = $request['openid.assoc_handle'];\n if (isset($request['openid.identity'])) $message['openid.identity'] = $request['openid.identity'];\n if (isset($request['openid.return_to'])) $message['openid.return_to'] = $request['openid.return_to'];\n \n if (($version >= OPENID_VERSION_2) && isset($request['openid.claimed_id'])) {\n $message['openid.claimed_id'] = $request['openid.claimed_id'];\n }\n \n $message = array_merge($message, extension_invoke_all('response', TRUE, $request));\n \n log_info('OpenID authentication response: ' . log_array($message));\n return openid_indirect_message($message, $version);\n}", "function simpleid_check_authentication($request) {\n global $version;\n \n log_info('OpenID direct verification: ' . log_array($request));\n \n $is_valid = simpleid_verify_signatures($request);\n\n if ($is_valid) {\n $response = array('is_valid' => 'true');\n } else {\n $response = array('is_valid' => 'false');\n }\n \n // RP wants to check whether a handle is invalid\n if (isset($request['openid.invalidate_handle'])) {\n $invalid_assoc = cache_get('association', $request['openid.invalidate_handle']);\n \n if (!$invalid_assoc || ($invalid_assoc['created'] + SIMPLEID_ASSOC_EXPIRES_IN < time())) {\n // Yes, it's invalid\n $response['invalidate_handle'] = $request['openid.invalidate_handle'];\n }\n }\n\n log_info('OpenID direct verification response: ' . log_array($response));\n \n openid_direct_response(openid_direct_message($response, $version));\n}", "public function isVerified();", "protected function Validate() : Bool\n {\n $params = [];\n\n foreach ($this->verifyWhitelist as $k => $v) {\n if( isset($_GET[$v]) ){\n $params[$k] = $_GET[$v];\n }\n }\n\n $params[\"openid.mode\"] = \"check_authentication\"; \n \n if ( !isset($params[\"openid.return_to\"]) || $params[\"openid.return_to\"] != $this->redirectParams[\"openid.return_to\"] ){\n return false;\n } \n\n $client = $this->Client();\n\n $response = $client->request(\"POST\", $this->urlAuthorize, [ \n \"form_params\" => $params, \n \"headers\" => [ \"Accept\" => \"application/json\" ] \n ]);\n\n $response = (string) $response->getBody(); \n\n if( strpos($response, \"is_valid:true\") === false ){\n return false;\n } \n\n return true;\n }", "public function isVerified(): bool;", "function processopenidresponse() {\n\t\t$consumer = new Auth_OpenID_Consumer(new OpenIDStorage(), new SessionWrapper());\n\n\t\t$trust_root = Director::absoluteBaseURL();\n\t\t$return_to_url = $trust_root . $this->Link('ProcessOpenIDResponse');\n\n\t\t// Complete the authentication process using the server's response.\n\t\t$response = $consumer->complete($return_to_url);\n\n\t\tif($response->status == Auth_OpenID_SUCCESS) {\n\t\t\tSession::clear(\"FormInfo.Form_RegistrationWithOpenIDForm.data\");\n\t\t\t$openid = $response->identity_url;\n\n\t\t\tif($response->endpoint->canonicalID) {\n\t\t\t\t$openid = $response->endpoint->canonicalID;\n\t\t\t}\n\n\t\t\t$sreg_resp = Auth_OpenID_SRegResponse::fromSuccessResponse($response);\n\t\t\t$sreg = $sreg_resp->contents();\n\n\t\t\t// Convert the simple registration data to the needed format\n\t\t\t// try to split fullname to get firstname and surname\n\t\t\t$data = array('IdentityURL' => $openid);\n\t\t\tif(isset($sreg['nickname']))\n\t\t\t\t$data['Nickname'] = $sreg['nickname'];\n\t\t\tif(isset($sreg['fullname'])) {\n\t\t\t\t$fullname = explode(' ', $sreg['fullname'], 2);\n\t\t\t\tif(count($fullname) == 2) {\n\t\t\t\t\t$data['FirstName'] = $fullname[0];\n\t\t\t\t\t$data['Surname'] = $fullname[1];\n\t\t\t\t} else {\n\t\t\t\t\t$data['Surname'] = $fullname[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($sreg['country']))\n\t\t\t\t$data['Country'] = $sreg['country'];\n\t\t\tif(isset($sreg['email']))\n\t\t\t\t$data['Email'] = $sreg['email'];\n\n\t\t\tSession::set(\"FormInfo.Form_RegistrationForm.data\", $data);\n\t\t\treturn $this->redirect($this->Link('register'));\n\t\t}\n\n\n\t\t// The server returned an error message, handle it!\n\t\tif($response->status == Auth_OpenID_CANCEL) {\n\t\t\t$error_message = _t('ForumMemberProfile.CANCELLEDVERIFICATION','The verification was cancelled. Please try again.');\n\t\t} else if($response->status == Auth_OpenID_FAILURE) {\n\t\t\t$error_message = _t('ForumMemberProfile.AUTHENTICATIONFAILED','The OpenID/i-name authentication failed.');\n\t\t} else {\n\t\t\t$error_message = _t('ForumMemberProfile.UNEXPECTEDERROR','An unexpected error occured. Please try again or register without OpenID');\n\t\t}\n\n\t\t$this->RegistrationWithOpenIDForm()->addErrorMessage(\"Blurb\",\n\t\t\t$error_message, 'bad');\n\n\t\treturn $this->redirect($this->Link('registerwithopenid'));\n\t}", "function isVerified(){\n\n}", "function verify () {\n// $aop->alipayrsaPublicKey='MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjUzhXrdJ7GDsgJ59fMLlk7hyYrXkkeGwnYD/eO2HBZh39Y9gTfLJ61Yogc7keOn2uAnZY/zBlw3n+T6mb6/5JYFgvXQi8Qzeh6BkBrNnROu+k4PjhmSbORJFoLrrIxDnsYkQ995kYYhpbS0yf2Al++55v4SrD3/YoVBhWPcRg4xI0QD94FLwhCmcCkft/ILRtUxQk2QeVPLSesvMx2mmUK2L2x2hFA8ewRoGmUdG2Fu9YFIxk//16RI+H7KI8LaoXoVDqHobPae9p0ACE7k9G5vs/cYuikSMKu+lnxghte1jNO+CqrvTP4Pes/mW4e7CEMCTAmEnsXLUrQ6FpfKMcQIDAQAB';\n return $this->aop->rsaCheckV1($_POST, NULL, \"RSA2\");\n }", "function is_verified()\n {\n return false;\n }", "public function verify()\n {\n if (!$this->user->validateOtpByIdentityLoggedIn($this->otp)) {\n $this->addError('otp', Yii::t('app', 'Otp is invalid!'));\n\n return false;\n } else {\n return true;\n }\n }", "function simpleid_verify_signatures($request) {\n global $version;\n \n log_info('simpleid_verify_signatures');\n \n $is_valid = TRUE;\n \n $assoc = (isset($request['openid.assoc_handle'])) ? cache_get('association', $request['openid.assoc_handle']) : NULL;\n $stateless = (isset($request['openid.response_nonce'])) ? cache_get('stateless', $request['openid.response_nonce']) : NULL;\n \n if (!$assoc) {\n log_notice('simpleid_verify_signatures: Association not found.');\n $is_valid = FALSE;\n } elseif (!$assoc['assoc_type']) {\n log_error('simpleid_verify_signatures: Association does not contain valid assoc_type.');\n $is_valid = FALSE;\n } elseif (!isset($assoc['private']) || ($assoc['private'] != 1)) {\n log_warn('simpleid_verify_signatures: Attempting to verify an association with a shared key.');\n $is_valid = FALSE;\n } elseif (!$stateless || ($stateless['assoc_handle'] != $request['openid.assoc_handle'])) {\n log_warn('simpleid_verify_signatures: Attempting to verify a response_nonce more than once, or private association expired.');\n $is_valid = FALSE;\n } else {\n $mac_key = $assoc['mac_key'];\n $assoc_types = openid_association_types();\n $hmac_func = $assoc_types[$assoc['assoc_type']]['hmac_func'];\n \n $signed_keys = explode(',', $request['openid.signed']);\n $signature = openid_sign($request, $signed_keys, $mac_key, $hmac_func, $version);\n log_debug('***** Signature: ' . $signature);\n \n if ($signature != $request['openid.sig']) {\n log_warn('simpleid_verify_signatures: Signature supplied in request does not match the signatured generated.');\n $is_valid = FALSE;\n }\n \n cache_delete('stateless', $request['openid.response_nonce']);\n }\n \n return $is_valid;\n}", "public function verify();", "public function verified()\n {\n return $this->verifyToken === null;\n }", "protected function IsReturned() : bool\n {\n return isset($_GET[\"openid_mode\"]) && !empty($_GET[\"openid_mode\"]); \n }", "public function authIsOk() {\n return $this->userID !== 0;\n }", "function simpleid_checkid_approval_required($request) {\n global $version;\n \n if ($version >= OPENID_VERSION_2) {\n $message = array('openid.mode' => 'setup_needed');\n } else {\n $request['openid.mode'] = 'checkid_setup';\n $message = array(\n 'openid.mode' => 'id_res', \n 'openid.user_setup_url' => simpleid_url('continue', 's=' . rawurlencode(pickle($request)))\n );\n }\n \n $message = array_merge($message, extension_invoke_all('response', FALSE, $request));\n \n log_info('OpenID authentication response: ' . log_array($message));\n return openid_indirect_message($message, $version);\n}", "private static function verify() {\r\n\t\t// create code object for the given code we will be verifying\r\n\t\tif (!isset($_SESSION['user'])) {\r\n\t\t\tself::alertMessage('danger', 'Unable to find session user data. Try logging out and logging in again.');\r\n\t\t\tVerificationView::show();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$userID = $_POST['userID'] = $_SESSION['user']->getUserID();\r\n\t\t$code = new VerificationCode($_POST);\r\n\r\n\t\t// load and validate expected code from database\r\n\t\t$codeInDatabase = VerificationCodesDB::get($userID);\r\n\t\tif (is_null($codeInDatabase)) {\r\n\t\t\tself::alertMessage('danger', 'No active verification code found. Your code may have expired. Click \"Resend Code\" to send a new code to your phone.');\r\n\t\t\tVerificationView::show();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// compare given/expected codes\r\n\t\tif ($code->getCode() !== $codeInDatabase->getCode()) {\r\n\t\t\tself::alertMessage('danger', 'The code you entered is incorrect. Please check your code and try again.');\r\n\t\t\tVerificationView::show();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// verification successful. mark phone number as verified\r\n\t\t$user = UsersDB::getUser($userID);\r\n\t\t$user->setIsPhoneVerified(true);\r\n\t\tUsersDB::edit($user);\r\n\t\t$_SESSION['user'] = $user;\r\n\r\n\t\t// clean up and show dashboard\r\n\t\tVerificationCodesDB::clear($userID);\r\n\t\tDashboardView::show();\r\n\t}", "public function doVerification() {\n $this->validate ( $this->request, $this->getRules () );\n $user = $this->_user->where ( StringLiterals::EMAIL, $this->decodeParam ( $this->request->user ) )->where ( 'otp', $this->request->otp )->first ();\n if (count ( $user ) > 0) {\n Auth::loginUsingId ( $user->id );\n return true;\n } else {\n return false;\n }\n }", "function verify_person () {\n $bh=new gs_base_handler($this->data,$this->params);\n $f=$bh->validate();\n if (!is_object($f) || !is_a($f,'g_forms')) return $f;\n $d=$f->clean();\n\n $rec=person($this->params['role']);\n if (!$rec) {\n $f->trigger_error('FORM_ERROR','REC_NOTFOUND');\n return $bh->showform($f);\n }\n\n $fname=$this->params['field_name'].'_secret';\n $ga=new GoogleAuthenticator;\n $code=$ga->getCode($rec->$fname);\n\n\n if ($code!=$d['ga_code']) {\n $f->trigger_error('FORM_ERROR','GA_INCORRECT_CODE');\n return $bh->showform($f);\n }\n\n $person=person();\n $fname=$this->params['field_name'].'_verified';\n $person->$fname=TRUE;\n return true;\n }", "public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }", "public function verifyIdToken( $token ) {\n\n\t\t$config = $this->getConfig();\n\t\t$jwk = Security::getOpenIdJWK( $token, $config );\n\t\t$verifiedTokenData = Security::openIdVerifyToken( $token, $jwk );\n\n\t\tif( !$verifiedTokenData ) \n\t\t\treturn false;\n\t\t\n\t\treturn $verifiedTokenData[\"payload\"];\n\t}", "function simpleid_checkid_identity(&$request, $immediate) {\n global $user, $version;\n \n $realm = openid_get_realm($request, $version);\n \n // Check 1: Is the user logged into SimpleID as any user?\n if ($user == NULL) {\n return CHECKID_LOGIN_REQUIRED;\n } else {\n $uid = $user['uid'];\n }\n \n // Check 2: Is the user logged in as the same identity as the identity requested?\n // Choose the identity URL for the user automatically\n if ($request['openid.identity'] == OPENID_IDENTIFIER_SELECT) {\n $test_user = user_load($uid);\n $identity = $test_user['identity'];\n \n log_info('OpenID identifier selection: Selected ' . $uid . ' [' . $identity . ']');\n } else {\n $identity = $request['openid.identity'];\n $test_user = user_load_from_identity($identity);\n }\n if ($test_user == NULL) return CHECKID_IDENTITY_NOT_EXIST;\n if ($test_user['uid'] != $user['uid']) {\n log_notice('Requested user ' . $test_user['uid'] . ' does not match logged in user ' . $user['uid']);\n return CHECKID_IDENTITIES_NOT_MATCHING;\n }\n \n // Pass the assertion to extensions\n $assertion_results = extension_invoke_all('checkid_identity', $request, $identity, $immediate);\n $assertion_results = array_merge(array_diff($assertion_results, array(NULL)));\n \n // Populate the request with the selected identity\n if ($request['openid.identity'] == OPENID_IDENTIFIER_SELECT) {\n $request['openid.claimed_id'] = $identity;\n $request['openid.identity'] = $identity;\n }\n \n // Check 3: Discover the realm and match its return_to\n $user_rp = (isset($user['rp'][$realm])) ? $user['rp'][$realm] : NULL;\n\n if (($version >= OPENID_VERSION_2) && SIMPLEID_VERIFY_RETURN_URL_USING_REALM) {\n $verified = FALSE;\n \n $rp_info = simpleid_get_rp_info($realm);\n $services = discovery_get_service_by_type($rp_info['services'], OPENID_RETURN_TO);\n \n log_info('OpenID 2 discovery: ' . count($services) . ' matching services');\n \n if ($services) {\n $return_to_uris = array();\n \n foreach ($services as $service) {\n $return_to_uris = array_merge($return_to_uris, $service['uri']);\n }\n foreach ($return_to_uris as $return_to) {\n if (openid_url_matches_realm($request['openid.return_to'], $return_to)) {\n log_info('OpenID 2 discovery: verified');\n $verified = TRUE;\n break;\n }\n }\n }\n \n $rp_info['return_to_verified'] = $verified;\n simpleid_set_rp_info($realm, $rp_info);\n \n if (!$verified) {\n if (($user_rp != NULL) && ($user_rp['auto_release'] == 1)) {\n log_notice('OpenID 2 discovery: not verified, but overridden by user preference');\n } else {\n log_notice('OpenID 2 discovery: not verified');\n $assertion_results[] = CHECKID_RETURN_TO_SUSPECT;\n }\n }\n }\n \n // Check 4: For checkid_immediate, the user must already have given\n // permission to log in automatically. \n if (($user_rp != NULL) && ($user_rp['auto_release'] == 1)) {\n log_info('Automatic set for realm ' . $realm);\n $assertion_results[] = CHECKID_OK;\n return min($assertion_results);\n } else {\n $assertion_results[] = CHECKID_APPROVAL_REQUIRED;\n return min($assertion_results);\n }\n}", "public function verify($token):bool;", "public function isAuthenticatedSuccessfully(): bool;", "private function _checkIdent()\n {\n $auth = Zend_Auth::getInstance();\n $auth->setStorage(new Zend_Auth_Storage_Session('hl_connect'));\n \n if ($auth->hasIdentity())\n $this->_agentSchemeNumber = $auth->getStorage()->read()->agentschemeno;\n \n return $auth->hasIdentity();\n }", "public function isVerified()\n\t{\n\t\tif (($record=$this->getActiveRecord())===null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn (bool)$record->correo_verificado;\n\t}", "public function isVerified()\n\t{\n\t\tif($this->test_status_id == Test::VERIFIED)\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}", "function is_verified()\n {\n if( ereg(\"VERIFIED\", $this->paypal_response) )\n {\n return true;\n }\n else\n {\n return false;\n }\n\n }", "public function verify() {\r\n $stmp = $this->_db->prepare(\"SELECT `id`,`email` FROM `anope_db_NickCore` WHERE `display`= ? AND `pass` = ?;\");\r\n $stmp->execute(array($this->_username,$this->_password));\r\n \r\n if ($stmp->rowCount() == \"1\") {\r\n $row = $stmp->fetch(PDO::FETCH_ASSOC);\r\n $this->_id = $row['id'];\r\n $this->_email = $row['email'];\r\n return $this->_id;\r\n }\r\n else {\r\n return false;\r\n }\r\n }", "function checkAuth($doRedirect) {\n\t\tif (isset($_SESSION[\"onidid\"]) && $_SESSION[\"onidid\"] != \"\") return $_SESSION[\"onidid\"];\n\n\t\t// create URL as callback\n\t\t$pageURL = 'http';\n\t\tif (isset($_SERVER[\"HTTP\"]) && $_SERVER[\"HTTP\"] == \"on\") {$pageURL .= \"s\";}\n\t\t$pageURL .= \"://\";\n\t\tif ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"SCRIPT_NAME\"];\n\t\t} else {\n\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"SCRIPT_NAME\"];\n\t\t}\n\n\t\t// check for ticket\n\t\t$ticket = isset($_REQUEST[\"ticket\"]) ? $_REQUEST[\"ticket\"] : \"\";\n\n\t\t// if ticket then set ONID session, else send to login\n\t\tif ($ticket != \"\") {\n\t\t\t$url = \"https://login.oregonstate.edu/cas/serviceValidate?ticket=\".$ticket.\"&service=\".$pageURL;\n\t\t\t$html = file_get_contents($url);\n\t\t\t$onididPattern = '/\\\\<cas\\\\:user\\\\>([a-zA-Z0-9]+)\\\\<\\\\/cas\\\\:user\\\\>/';\n\t\t\t$firstnamePattern = '/\\\\<cas\\\\:firstname\\\\>([a-zA-Z0-9]+)\\\\<\\\\/cas\\\\:firstname\\\\>/';\n\t\t\t$lastnamePattern = '/\\\\<cas\\\\:lastname\\\\>([a-zA-Z0-9]+)\\\\<\\\\/cas\\\\:lastname\\\\>/';\n\t\t\tpreg_match($onididPattern, $html, $onididMatches);\n\t\t\tpreg_match($firstnamePattern, $html, $firstnameMatches);\n\t\t\tpreg_match($lastnamePattern, $html, $lastnameMatches);\n\t\t\tif ($onididMatches && count($onididMatches) > 0 && $firstnameMatches && count($firstnameMatches) > 0 && $lastnameMatches && count($lastnameMatches) > 0) {\n\t\t\t\t$onidid = $onididMatches[1];\n\t\t\t\t$_SESSION[\"onidid\"] = $onidid;\n\n\t\t\t\t$firstname = $firstnameMatches[1];\n\t\t\t\t$_SESSION['firstname'] = $firstname;\n\n\t\t\t\t$lastname = $lastnameMatches[1];\n\t\t\t\t$_SESSION['lastname'] = $lastname;\n\n\t\t\t\t$_SESSION[\"ticket\"] = $ticket;\n\t\t\t\treturn $onidid;\n\t\t\t}\n\t\t} else if ($doRedirect) {\n\t\t\t$url = \"https://login.oregonstate.edu/cas/login?service=\".$pageURL;\n\t\t\techo \"<script>location.replace('\" . $url . \"');</script>\";\n\t\t}\n\n\t\treturn \"\";\n\t}", "function simpleid_checkid_login_required($request) {\n global $version;\n \n if ($version >= OPENID_VERSION_2) {\n $message = array('openid.mode' => 'setup_needed');\n } else { \n $message = array(\n 'openid.mode' => 'id_res',\n 'openid.user_setup_url' => simpleid_url('login', 'destination=continue&s=' . rawurlencode(pickle($request)))\n );\n }\n \n $message = array_merge($message, extension_invoke_all('response', FALSE, $request));\n \n log_info('OpenID authentication response: ' . log_array($message));\n return openid_indirect_message($message, $version);\n}", "public function return_verify() {\n\t\treturn true;\n if($_POST['payer_status'] == 'verified')\n {\n // check the payment_status is Completed\n if ($_POST['payment_status'] != 'Completed' && $_POST['payment_status'] != 'Pending')\n {\n return false;\n }\n\n // check that receiver_email is your Primary PayPal email\n if ($_POST['receiver_email'] != $this->payment['paypal_account'])\n {\n return false;\n }\n\n if ($this->order['api_pay_amount'] != $_POST['mc_gross'])\n {\n return false;\n }\n if ($this->payment['paypal_currency'] != $_POST['mc_currency'])\n {\n return false;\n }\n return true;\n }\n else\n {\n // log for manual investigation\n return false;\n }\n }", "function verify_user($conn, $id, $hash){\n\t$sql = \"SELECT id from Session\n\tWHERE id=$id and hash='$hash'\";\n\n\t$result = $conn->query($sql);\n\n\treturn ($result->num_rows > 0);\n}", "public function actionVerify() {\n require(dirname(__FILE__) . DIRECTORY_SEPARATOR.'../vendor/codebird/codebird.php');\n \\Codebird\\Codebird::setConsumerKey(\"FxVQdRHrWKLZY8DG1BNPhmOWi\", \"eamViRP7QbeZlaJpL69OYZi8vlarO83L9R54SFwzcYO55eQG0f\");\n $cb = \\Codebird\\Codebird::getInstance();\n \n session_start();\n if (! isset($_SESSION['oauth_token'])) {\n // get the request token\n $reply = $cb->oauth_requestToken([\n 'oauth_callback' => 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']\n ]);\n\n // store the token\n $cb->setToken($reply->oauth_token, $reply->oauth_token_secret);\n $_SESSION['oauth_token'] = $reply->oauth_token;\n $_SESSION['oauth_token_secret'] = $reply->oauth_token_secret;\n $_SESSION['oauth_verify'] = true;\n\n // redirect to auth website\n $auth_url = $cb->oauth_authorize();\n header('Location: ' . $auth_url);\n die();\n\n } elseif (isset($_GET['oauth_verifier']) && isset($_SESSION['oauth_verify'])) {\n // verify the token\n $cb->setToken($_SESSION['oauth_token'], $_SESSION['oauth_token_secret']);\n unset($_SESSION['oauth_verify']);\n\n // get the access token\n $reply = $cb->oauth_accessToken([\n 'oauth_verifier' => $_GET['oauth_verifier']\n ]);\n\n // store the token (which is different from the request token!)\n $_SESSION['oauth_token'] = $reply->oauth_token;\n $_SESSION['oauth_token_secret'] = $reply->oauth_token_secret;\n\n echo $_SESSION['oauth_token'] .\"<br />\". $_SESSION['oauth_token_secret'];\n exit;\n }\n \n echo $_SESSION['oauth_token'] .\"<br />\". $_SESSION['oauth_token_secret'];\n exit;\n }", "public function hasVerifiedEmail();", "public function verifyApplicationId()\n\t{\n\t\tif ($this->getApplicationId() !== $this->config['application_id']) {\n\t\t\tthrow new AlexaVerificationException('Request verification failed: invalid application ID.');\n\t\t}\n\n\t\treturn true;\n\t}", "function simpleid_checkid_error($request, $immediate = false) {\n global $version;\n \n $message = array();\n if ($immediate) {\n if ($version >= OPENID_VERSION_2) {\n $message['openid.mode'] = 'setup_needed';\n } else {\n $message['openid.mode'] = 'id_res';\n }\n } else {\n $message['openid.mode'] = 'cancel';\n }\n \n $message = array_merge($message, extension_invoke_all('response', FALSE, $request));\n \n log_info('OpenID authentication response: ' . log_array($message));\n return openid_indirect_message($message, $version);\n}", "public function getVerify(): bool\n {\n }", "public function hasVerificationCode(){\n return $this->_has(3);\n }", "public function hasVerificationCode(){\n return $this->_has(3);\n }", "public function isVerified() {\n\t\treturn $this->oehhstat == 'V';\n\t}", "function user_verify(){\n \n $verify = false;\n \n if( isset($_SESSION['user_id']) ){\n \n if( isset($_SESSION['user_ip']) && $_SERVER['REMOTE_ADDR'] == $_SESSION['user_ip'] ){\n \n if( isset($_SESSION['user_agent']) && $_SERVER['HTTP_USER_AGENT'] == $_SESSION['user_agent'] ){\n \n $verify = true;\n\n }\n \n }\n \n }\n \n return $verify;\n \n }", "public function hasVerifiedPhone();", "function verifyAuth()\n\t{\n\t\tsanitizeRequest($_POST);\n\t\tsanitizeRequest($_GET);\n\t\t\n\t\t$currentUser = UserService::getInstance()->getCurrentUser();\n\t\tif (!$currentUser || !$currentUser->getSessionId()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t$payload = JWT::decode($currentUser->getSessionId(), SERVER_KEY, array('HS256'));\n\t\t\t$sessionId = UserService::getInstance()->getSessionId($currentUser->getId());\n\t\t\tif ($sessionId === $currentUser->getSessionId() &&\n\t\t\t\t\t$currentUser->getId() === $payload->id &&\n\t\t\t\t\t$currentUser->getEmail() === $payload->email) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\tif ($currentUser->isRemember() && $e->getMessage() === 'Expired token') {\n\t\t\t\t$currentUser->extendSession();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "function verifiedUser($num, $pid, $td_user)\n{\n\t$db_obj = Db::getInstance()->ExecuteS('SELECT * FROM '.pSQL(_DB_PREFIX_.'sociallogin').' as c WHERE c.id_customer='.\" '$num'\".'\n\tAND c.provider_id='.\" '$pid'\".' LIMIT 0,1');\n\t$verified = $db_obj['0']['verified'];\n\tif ($verified == 1 || $td_user == 'yes')\n\t\treturn true;\n\treturn false;\n}", "public function verify(){\n\t\t// getting the username and code from url\n\t\t$code=$_GET['c'];\n\t\t$user=$_GET['u'];\n\t\t// load the regmod model\n\t\t$this->load->model('regmod');\n\t\t// calling the function Vemail that check the valodation code with the username\n\t\t$flag=$this->regmod->Vemail($user,$code);\n\t\t// checking the Vemail the respond\n\t\tif($flag)\n\t\t\t{$data['res']= \"You have successfully verified your email. You may login to Hungry.lk with your username and password\";}\n\t\telse\n\t\t\t{$data['res']= \"Opps An error occurred in our system, try again later\";}\n\t\t$this->load->view(\"register_status_view\",$data);\n\t}", "public function verify() {\n // Compare session_id as a binary safe string.\n if (strcmp($this->session_id, '0') !== 0) {\n // Session id cookie is set, build the SQL to validate the session id.\n $sql = \"SELECT A.id FROM Users U INNER JOIN Administrators A ON U.id = A.id WHERE session_id = '$this->session_id'\";\n } else {\n // Session id cookie is not set, build the SQL to check the email and password.\n $sql = \"SELECT A.id FROM Users U INNER JOIN Administrators A ON U.id = A.id WHERE email = '$this->email' AND password = '$this->password'\";\n }\n\n // Query the database.\n $results = parent::queryDatabase($sql);\n\n // There should only be one result to the query. If there are any more,\n // something else has failed, default to to fail status - do not grant\n // user access.\n if ($results->num_rows === 1) {\n return True;\n } else {\n return False;\n }\n }", "public function isVerified(): bool\n {\n return $this->verified;\n }", "public function isSuccessful();", "function verifyUser ($username, $hash) {\r\n //TO-DO\r\n\r\n //if credentials match return true\r\n\r\n //else return false\r\n\r\n //dummy CODE\r\n return true;\r\n}", "function id_matches_db($username, $password)\n{\n global $idStore;\n\n if($idStore->authenticate($username, $password))\n {\n return true;\n }else{\n return false;\n }\n}", "function check_verify($code, $id = ''){\n $verify = new \\Think\\Verify();\n return $verify->check($code, $id);\n}", "public function checkAuth()\n {\n return $this->api->check('GP', session('nxs_gp.username'));\n }", "public function verify()\n {\n $this->setVerifiedFlag()->save();\n\n // :TODO: Fire an event here\n }", "public function verify_device($identity)\n {\n $this->result = $this->verify_authorization($identity);\n\n if (!is_numeric($this->result)) {\n\n if ($this->increase_device_authorization($identity)) {\n\n $this->ion_auth->logout();\n $this->ion_auth_model->set_error('device_confirmation_sent');\n\n return FALSE;\n }\n } else {\n\n if ($this->result != 1) {\n\n $this->ion_auth->logout();\n $this->ion_auth_model->set_error('login_unsuccessful_not_allowed');\n\n return FALSE;\n } else {\n $this->ion_auth_model->set_message('login_successful');\n return TRUE;\n }\n }\n }", "public function authenticate() {\n $id = $this->_id;\n if (!empty($id)) {\n $consumer = new Zend_OpenId_Consumer($this->_storage);\n $consumer->setHttpClient($this->_httpClient);\n /* login() is never returns on success */\n if (!$this->_check_immediate) {\n if (!$consumer->login($id,\n $this->_returnTo,\n $this->_root,\n $this->_extensions,\n $this->_response)) {\n return new Zend_Auth_Result(\n Zend_Auth_Result::FAILURE,\n $id,\n [\"Authentication failed\", $consumer->getError()]);\n }\n } else {\n if (!$consumer->check($id,\n $this->_returnTo,\n $this->_root,\n $this->_extensions,\n $this->_response)) {\n return new Zend_Auth_Result(\n Zend_Auth_Result::FAILURE,\n $id,\n [\"Authentication failed\", $consumer->getError()]);\n }\n }\n } else {\n $params = (isset($_SERVER['REQUEST_METHOD']) &&\n $_SERVER['REQUEST_METHOD']=='POST') ? $_POST: $_GET;\n $consumer = new Zend_OpenId_Consumer($this->_storage);\n $consumer->setHttpClient($this->_httpClient);\n if ($consumer->verify(\n $params,\n $id,\n $this->_extensions)) {\n return new Zend_Auth_Result(\n Zend_Auth_Result::SUCCESS,\n $id,\n [\"Authentication successful\"]);\n } else {\n return new Zend_Auth_Result(\n Zend_Auth_Result::FAILURE,\n $id,\n [\"Authentication failed\", $consumer->getError()]);\n }\n }\n }", "public function verifyAction()\n\t{\n\t\t$this->view->headTitle(\"Registration Process\");\n\t\t\n\t\t//Retrieve key from url\n\t\t$registrationKey = $this->getRequest()->getParam('key');\n\t\t\n\t\t//Identitfy the user associated with the key\n\t\t$user = new Default_Model_User();\n\t\t\n\t\t//Determine is user already confirm\n\t\tif($user->isUserConfirmed($registrationKey)){\n\t\t$this->view->isConfirmed = 1;\n\t\t$this->view->errors[] = \"User is already confirmed\";\n\t\treturn;\n\t\t}\n\n\t\t$resultRow = $user->getUserByRegkey($registrationKey);\n\t\t\n\t\t//If the user has been located, set the confirmed column.\n\t\tif(count($resultRow)){\n\t\t\t$resultRow->confirmed = 1;\n\t\t\t$resultRow->save();\n\t\t\t\n\t\t\t$this->view->success = 1;\n\t\t\t$this->view->firstName = $resultRow->first_name;\n\t\t\n\t\t} else{\n\t\t\t$this->view->errors[] = \"Unable to locate registration key\";\n\t\t}\n\n\t}", "function verification() {\n\t\t$reffer_code = $_REQUEST['user_reffer_code'];\n\t\t$code = $_REQUEST['user_verification_code'];\n\t\t$mobile = $_REQUEST['user_mobile_no'];\n\t\t//$token = $_POST['token'];\n\t\tif (!empty($code)) {\n\n\t\t\t// Refferal amount\n\t\t\t$reffer_records = $this -> conn -> get_all_records('reffer_amount');\n\t\t\t$refferal_amount = $reffer_records[0]['reffer_amount'];\n\t\t\t//-----------------/////\n\n\t\t\t$records = $this -> conn -> get_table_row_byidvalue('user', 'user_contact_no', $mobile);\n\t\t\tif (!empty($records)) {\n\n\t\t\t\t$user_id = $records['0']['user_id'];\n\t\t\t\t$token = $records['0']['user_verified_code'];\n\t\t\t\t$status = $records['0']['user_mobile_verify_status'];\n\t\t\t\t$user_email = $records['0']['user_email'];\n\t\t\t\t$user_self_reffer = $records['0']['user_refferal_code'];\n\t\t\t\t$wallet_amount = $records[0]['wallet_amount'];\n\t\t\t\t$user_profile_pic = $records[0]['user_profile_pic'];\n\t\t\t\tif (!empty($user_profile_pic)) {\n\t\t\t\t\tif (filter_var($user_profile_pic, FILTER_VALIDATE_URL)) {\n\t\t\t\t\t\t$img = $user_profile_pic;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$img = self_img_url . $user_profile_pic;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$img = '';\n\t\t\t\t}\n\t\t\t\tif ($code != $token) {\n\t\t\t\t\t$post = array('status' => 'false', 'message' => 'Invalid Varification code');\n\t\t\t\t\techo $this -> json($post);\n\t\t\t\t} else if ($code == $token) {\n\t\t\t\t\tif ($status == '1') {\n\t\t\t\t\t\t$post = array('status' => 'false', 'message' => 'Already verified');\n\t\t\t\t\t\techo $this -> json($post);\n\t\t\t\t\t\texit();\n\t\t\t\t\t}\n\t\t\t\t\t$data['user_mobile_verify_status'] = 1;\n\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $user_id, $data);\n\n\t\t\t\t\t//check reffer code\n\t\t\t\t\t$reffer_records = $this -> conn -> get_table_row_byidvalue('user', 'user_refferal_code', $reffer_code);\n\t\t\t\t\tif (!empty($reffer_records)) {\n\t\t\t\t\t\t$user11_id = $reffer_records['0']['user_id'];\n\n\t\t\t\t\t\t$data12['reffer_user_id'] = $user11_id;\n\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $user_id, $data12);\n\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\t if(!empty($reffer_records)){\n\t\t\t\t\t * \t$reffer_records = $this -> conn -> get_all_records('reffer_amount');\n\t\t\t\t\t $refferal_amount = $reffer_records[0]['reffer_amount'];\n\t\t\t\t\t $user11_id = $reffer_records['0']['user_id'];\n\t\t\t\t\t $reffer_code_database = $reffer_records['0']['user_refferal_code'];\n\t\t\t\t\t $wallet = $reffer_records['0']['wallet_amount'];\n\t\t\t\t\t $frnd_number = $reffer_records['0']['user_contact_no'];\n\t\t\t\t\t $current_date=date(\"Y-m-d h:i:sa\");\n\t\t\t\t\t $transaction_id= strtotime(\"now\").mt_rand(10000000, 99999999);\n\t\t\t\t\t $wt_type=2; // credit in frnd acconnt\n\t\t\t\t\t $refferamount=$refferal_amount; // reffer amount\n\t\t\t\t\t $wt_category=9; // refferal amount recieved in wallet\n\t\t\t\t\t $wt_desc=\"Refferal amount add in your wallet using by \".substr($mobile,4);\n\t\t\t\t\t if($reffer_code == $reffer_code_database){\n\n\t\t\t\t\t $add_reffer_money = $this -> conn -> insertnewrecords('refferal_records','refferal_user_id,refferal_frnd_id,refferal_amount,refferal_date', '\"' . $user_id . '\",\"' . $user11_id . '\",\"' . $refferamount . '\",\"' . $current_date . '\"');\n\n\t\t\t\t\t $add_money = $this -> conn -> insertnewrecords('wallet_transaction','wt_user_id, wt_datetime,wt_type,wt_amount,wt_category,transaction_id,wt_desc,cashbackrecord_id', '\"' . $user11_id . '\",\"' . $current_date . '\",\"' . $wt_type . '\",\"' . $refferamount . '\",\"' . $wt_category . '\",\"' . $transaction_id . '\",\"' . $wt_desc . '\",\"' . $frnd_number . '\"');\n\t\t\t\t\t $data12['reffer_amount_status']=$wallet+$refferal_amount;\n\t\t\t\t\t $update_toekn=$this -> conn -> updatetablebyid('user', 'user_id',$user11_id, $data12);\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t */\n\n\t\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Successfully verified\", \"mobile\" => $_REQUEST['user_mobile_no'], 'user_id' => $user_id, 'user_wallet' => $wallet_amount, 'user_email' => $user_email, 'login_type' => 1, 'user_reffer_code' => $user_self_reffer, 'profile_pic' => $img, 'user_pin_status' => '2');\n\t\t\t\t\techo $this -> json($post);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t$error = array('status' => \"false\", \"message\" => \"User not Exist\");\n\t\t\t\techo $this -> json($error);\n\t\t\t}\n\t\t} else {\n\t\t\t$error = array('status' => \"false\", \"message\" => \"Please Enter a valid verification code\", 'user_mobile_no' => $_POST['user_mobile_no'], 'verification_code' => $_POST['user_verification_code']);\n\t\t\techo $this -> json($error);\n\t\t}\n\t}", "public function hasVerification()\r\n {\r\n // No need for CVN in creating/updating token\r\n return Mage::getModel('ewayrapid/method_notsaved')->hasVerification();\r\n }", "public function verifySession()\n\t{\n\t\t$userData = array(\n\t\t\t'email' \t=> $this->input->post('email'),\n\t\t\t'password' \t=> sha1($this->input->post('password'))\n \t\t);\n\n\t\treturn $this->assistant_model->verifySession($userData);\n\t}", "public function verifyRequest()\n {\n }", "function verify()\n {\n $activation = null;\n $param = getParameter();\n if (!empty($param[0])) {\n $activation = $param[0];\n }\n $resultActive = $this->model->khachhang->activeAccount($activation);\n switch ($resultActive) {\n case 1 :\n redirect('user/active_expire');\n break;\n case 2:\n redirect('user/active_success');\n break;\n case 3:\n redirect('user/active_fail');\n break;\n }\n }", "protected function isCaptureSuccessful()\n {\n return in_array($this->reader->getResponseCode(), self::CAPTURE_APPROVED_STATUS_CODES, true);\n }", "public function verify_code($params) {\n\n $verification_code = $params['verification_code'];\n $code_id = $params['code_id'];\n\n $options = array('body'=> array());\n $options['body']['code']= ['verify'=> $verification_code];\n\n $uri = $code_id.\"/verify\";\n $uri = \"/cpaas/auth/v1/\".$this->client->user_id.\"/codes/\".$uri;\n $url = $this->client->_root.$uri;\n $response = $this->client->_request(\"PUT\", $url, $options);\n\n // check if test response\n if ($this->client->check_if_test($response)) {\n return $response;\n }\n // check if error response\n // if ($this->client->check_if_error($response)) {\n // $response = $this->client->build_error_response($response);\n // return $response;\n // }\n\n if ($response->getStatusCode() == 204) {\n $custom_response = ['verified'=> true, 'message'=> 'Success'];\n } else {\n $custom_response = ['verified'=> false, 'message'=> 'Code invalid or expired'];\n }\n\n return $custom_response;\n }", "public function isSuccessful()\n {\n return isset($this->data['response_code']) \n && \n ( substr($this->data['response_code'], 2) == '000' );\n }", "public function verify()\r\n\t{\r\n\t\treturn ($this->verifyHeaders() && $this->verifyDataFormat() && $this->verifySignature());\r\n\t}", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "function logon($params) {\n\t\tglobal $db_prefix, $settings;\n\n\t\t// step 1: redirect to the openid provider of choice\n\n\t\t// do we have a (valid) openid URL?\n\t\tif (isset($params['openid_url']) && isURL($params['openid_url'])) {\n\t\t\t// load the openid class, and redirect to the openid provider\n\t\t\trequire_once(PATH_INCLUDES.\"authentication/class.openid.php\");\n\t\t\t$openid = new SimpleOpenID;\n\t\t\t$openid->SetIdentity($params['openid_url']);\n\t\t\t$openid->SetApprovedURL($settings['siteurl'].\"setuser.php\");\n\t\t\t$openid->SetTrustRoot($settings['siteurl']);\n\t\t\t$server_url = $openid->GetOpenIDServer();\n\t\t\tif ($server_url) {\n\t\t\t\tredirect($openid->GetRedirectURL() , \"script\");\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\t// step 2: validate the openid provider return information\n\n\t\tif (isset($params['openid_mode'])) {\n\t\t\t// handle openid login\n\t\t\trequire_once(PATH_INCLUDES.\"authentication/class.openid.php\");\n\t\t\t$openid = new SimpleOpenID;\n\t\t\t$openid->SetIdentity(urldecode($_GET['openid_identity']));\n\t\t\tif ($openid->ValidateWithServer()) {\n\t\t\t\t$openid_url = strtolower($openid->OpenID_Standarize($_GET['openid_identity']));\n\t\t\t\t$result = dbquery(\"SELECT * FROM \".$db_prefix.\"users WHERE user_openid_url='\".$openid_url.\"'\");\n\t\t\t\tif (dbrows($result) == 0) {\n\t\t\t\t\t// not found, display an error message\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\t// retrieve the record and store it for retrieval\n\t\t\t\t\t$this->userrecord = dbarray($result);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttrigger_error($openid->GetError());\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function verify()\n {\n $this->verified = true;\n\n $this->save();\n\n $this->verifyUser()->delete();\n }", "public function verifyRequest()\n\t{\n\t\t$this->verifyApplicationId();\n\t\t$this->verifyTimestamp();\n\t\t$this->verifySignatureCertificateUrl($this->getSignatureCertificateUrl());\n\n\t\t$certificate = $this->persistence->getCertificateForKey($this->certificate_url);\n\n\t\tif (! $certificate) {\n\t\t\t$certificate = new Certificate($this->certificate_url);\n\t\t}\n\n\t\t$this->verifyCertificate($certificate);\n\t}", "function Check()\n {\n $this->_RegenerateId();\n return (isset($_SESSION['ss_fprint1']) && $_SESSION['ss_fprint1'] == $this->_Fingerprint());\n }", "function doregisterwithopenid($data, $form) {\n\t\t$openid = trim($data['OpenIDURL']);\n\t\tSession::set(\"FormInfo.Form_RegistrationWithOpenIDForm.data\", $data);\n\n \tif(strlen($openid) == 0) {\n\t\t\tif(!is_null($form)) {\n \t\t\t$form->addErrorMessage(\"Blurb\",\n\t\t\t\t\t\"Please enter your OpenID or your i-name.\",\n\t\t\t\t\t\"bad\");\n\t\t\t}\n\t\t\treturn $this->redirectBack();\n\t\t}\n\n\n\t\t$trust_root = Director::absoluteBaseURL();\n\t\t$return_to_url = $trust_root . $this->Link('processopenidresponse');\n\n\t\t$consumer = new Auth_OpenID_Consumer(new OpenIDStorage(), new SessionWrapper());\n\n\n\t\t// No auth request means we can't begin OpenID\n\t\t$auth_request = $consumer->begin($openid);\n\t\tif(!$auth_request) {\n\t\t\tif(!is_null($form)) {\n \t\t\t$form->addErrorMessage(\"Blurb\",\n\t\t\t\t\t\"That doesn't seem to be a valid OpenID or i-name identifier. \" .\n\t\t\t\t\t\"Please try again.\",\n\t\t\t\t\t\"bad\");\n\t\t\t}\n\t\t\treturn $this->redirectBack();\n\t\t}\n\n\t\t$SQL_identity = Convert::raw2sql($auth_request->endpoint->claimed_id);\n\t\tif($member = Member::get()->filter('IdentityURL', $SQL_identity)->first()) {\n\t\t\tif(!is_null($form)) {\n \t\t\t$form->addErrorMessage(\"Blurb\",\n\t\t\t\t\t\"That OpenID or i-name is already registered. Use another one.\",\n\t\t\t\t\t\"bad\");\n\t\t\t}\n\t\t\treturn $this->redirectBack();\n\t\t}\n\n\n\t\t// Add the fields for which we wish to get the profile data\n \t$sreg_request = Auth_OpenID_SRegRequest::build(null,\n \tarray('nickname', 'fullname', 'email', 'country'));\n\n \tif($sreg_request) {\n\t\t\t$auth_request->addExtension($sreg_request);\n \t}\n\n\n\t\tif($auth_request->shouldSendRedirect()) {\n\t\t\t// For OpenID 1, send a redirect.\n\t\t\t$redirect_url = $auth_request->redirectURL($trust_root, $return_to_url);\n\n\t\t\tif(Auth_OpenID::isFailure($redirect_url)) {\n\t\t\t\tdisplayError(\"Could not redirect to server: \" .\n\t\t\t\t\t\t\t\t\t\t $redirect_url->message);\n\t\t\t} else {\n\t\t\t\treturn $this->redirect($redirect_url);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// For OpenID 2, use a javascript form to send a POST request to the\n\t\t\t// server.\n\t\t\t$form_id = 'openid_message';\n\t\t\t$form_html = $auth_request->formMarkup($trust_root, $return_to_url,\tfalse, array('id' => $form_id));\n\n\t\t\tif(Auth_OpenID::isFailure($form_html)) {\n\t\t\t\tdisplayError(\"Could not redirect to server: \" .$form_html->message);\n\t\t\t} else {\n\t\t\t\t$page_contents = array(\n\t\t\t\t\t \"<html><head><title>\",\n\t\t\t\t\t \"OpenID transaction in progress\",\n\t\t\t\t\t \"</title></head>\",\n\t\t\t\t\t \"<body onload='document.getElementById(\\\"\". $form_id .\n\t\t\t\t\t \"\\\").submit()'>\",\n\t\t\t\t\t $form_html,\n\t\t\t\t\t \"<p>Click &quot;Continue&quot; to login. You are only seeing \" .\n\t\t\t\t\t \"this because you appear to have JavaScript disabled.</p>\",\n\t\t\t\t\t \"</body></html>\");\n\n\t\t\t\tprint implode(\"\\n\", $page_contents);\n\t\t\t}\n\t\t}\n\t}", "public function validate()\n {\n // generate Token String\n $idTokenString = $this->getTokenString($this->_key);\n return ($idTokenString == $this->_tokenString);\n }", "public function isSuccessful()\n {\n if (!isset($this->data['error'])) {\n return $this->data['code'] === 'SUCCESS' && $this->data['transactionResponse']['state'] === 'APPROVED';\n }\n return false;\n }", "private function check_auth() {\n if (empty($this->user_id) || empty($this->privatekey)) {\n $this->send_error('AUTH_FAIL');\n exit;\n } elseif ($this->users_model->validate_privatekey($this->user_id, $this->privatekey)) {\n return true;\n }\n }", "protected function _checkAuthentication($version, $params)\n {\n $ret = [];\n if ($version >= 2.0) {\n $ret['ns'] = Zend_OpenId::NS_2_0;\n }\n $ret['openid.mode'] = 'id_res';\n\n if (empty($params['openid_assoc_handle']) ||\n empty($params['openid_signed']) ||\n empty($params['openid_sig']) ||\n !$this->_storage->getAssociation($params['openid_assoc_handle'],\n $macFunc, $secret, $expires)) {\n $ret['is_valid'] = 'false';\n return $ret;\n }\n\n $signed = explode(',', $params['openid_signed']);\n $data = '';\n foreach ($signed as $key) {\n $data .= $key . ':';\n if ($key == 'mode') {\n $data .= \"id_res\\n\";\n } else {\n $data .= $params['openid_' . strtr($key,'.','_')].\"\\n\";\n }\n }\n if ($this->_secureStringCompare(base64_decode($params['openid_sig']),\n Zend_OpenId::hashHmac($macFunc, $data, $secret))) {\n $ret['is_valid'] = 'true';\n } else {\n $ret['is_valid'] = 'false';\n }\n return $ret;\n }", "public function check($credentials, array $options = array()) {\n $conditions = $this->_filters($credentials->data);\n $options += $this->_config;\n\n /*\n try {\n if (!$this->openId->mode) {\n if(isset($_POST[$this->_field])) {\n $this->openId->identity = $_POST[$this->_field];\n\n # The following two lines request email, full name, and a nickname\n # from the provider. Remove them if you don't need that data.\n $this->openId->required = array('contact/email');\n $this->openId->optional = array('namePerson', 'namePerson/friendly');\n header('Location: ' . $this->openId->authUrl());\n }\n } elseif ($this->openId->mode == 'cancel') {\n return false;\n } elseif ($this->openId->validate()) {\n return true;\n //echo 'User ' . ($this->openId->validate() ? $this->openId->identity . ' has ' : 'has not ') . 'logged in.';\n //print_r($this->openId->getAttributes());\n }\n } catch(ErrorException $e) {\n echo $e->getMessage();\n return false;\n }\n */\n\n return false;\n }", "public function accountVerifyConfirmAction()\n {\n // get the view vars\n $errors = $this->view->errors; /* @var Sly_Errors $errors */\n $site = $this->view->site; /* @var BeMaverick_Site $site */\n $validator = $this->view->validator; /* @var BeMaverick_Validator $validator */\n\n // set the input params\n $requiredParams = array(\n 'code',\n );\n\n $input = $this->processInput( $requiredParams, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n // decode the hash and gets its parts, confirm all good and account is valid\n list( $username, $timestamp, $signature ) = explode( '|', base64_decode( urldecode( $input->code ) ) );\n\n $user = $site->getUserByUsername( $username );\n\n $validator->checkValidUser( $user, $errors );\n $validator->checkValidVerifyAccountCode( $site, $username, $timestamp, $signature, $errors );\n\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n $user->setEmailVerified( true );\n $user->save();\n\n // set the cookie\n BeMaverick_Cookie::updateUserCookie( $user );\n\n return $this->renderPage( 'authAccountVerifyConfirm' );\n }", "function verify_appota_user($appota_access_token, $appota_userid, $appota_username) {\n $url = sprintf('https://api.appota.com/game/get_user_info?access_token=%s', $appota_access_token);\n $result = call_curl_get($url, null);\n return ($result[\"error_code\"] == 0 and $result[\"data\"][\"username\"] == $appota_username and $result[\"data\"][\"user_id\"]);\n}", "function verification() {\n\t\t$reffer_code = $_REQUEST['user_reffer_code'];\n\t\t$code = $_REQUEST['user_verification_code'];\n\t\t$mobile = country_code.$_REQUEST['user_mobile_no'];\n\t\t//$token = $_POST['token'];\n\t\tif (!empty($code)) {\n\t\t\t\n\t\t\t\t// Refferal amount\n\t\t\t\t$reffer_records = $this -> conn -> get_all_records('reffer_amount');\n\t\t\t\t$refferal_amount = $reffer_records[0]['reffer_amount'];\n\t\t\t\t//-----------------/////\n\t\t\t\n\t\t\t\t$records = $this -> conn -> get_table_row_byidvalue('user', 'user_contact_no', $mobile);\n\t\t\t\tif (!empty($records)) {\n\t\t\t\t\n\t\t\t\t$user_id = $records['0']['user_id'];\n\t\t\t\t$token = $records['0']['user_verified_code'];\n\t\t\t\t$status = $records['0']['user_mobile_verify_status'];\n\t\t\t\t$user_email = $records['0']['user_email'];\n\t\t\t\t$user_self_reffer = $records['0']['user_refferal_code'];\n\t\t\t\t$wallet_amount=$records[0]['wallet_amount'];\n\t\t\t\t$user_profile_pic=$records[0]['user_profile_pic'];\n\t\t\t\tif (!empty($user_profile_pic)) \t{\n\t\t\t\t\tif (filter_var($user_profile_pic, FILTER_VALIDATE_URL)) {\n \t\t\t\t\t$img = $user_profile_pic;\n\t\t\t\t\t} else {\n \t\t\t\t\t$img = self_img_url.$user_profile_pic;\n\t\t\t\t\t}\n\t\t\t\t\t} else \t{\n\t\t\t\t\t$img = '';\t\n\t\t\t\t\t}\n\t\t\t\tif ($code != $token) {\n\t\t\t\t\t$post = array('status' => 'false', 'message' => 'Invalid Varification code');\n\t\t\t\t\techo $this -> json($post);\n\t\t\t\t} else if ($code == $token) {\n\t\t\t\t\tif($status=='1'){\n\t\t\t\t\t$post = array('status' => 'false', 'message' => 'Already verified');\n\t\t\t\t\techo $this -> json($post);\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t\t\t$data['user_mobile_verify_status']=1;\n\t\t\t\t\t$update_toekn=$this -> conn -> updatetablebyid('user', 'user_id',$user_id, $data);\n\t\t\t\t\t\n\t\t\t\t\t//check reffer code\n\t\t\t\t\t$reffer_records = $this -> conn -> get_table_row_byidvalue('user', 'user_refferal_code',$reffer_code);\n\t\t\t\tif(!empty($reffer_records)){\n\t\t\t\t\t\t$user11_id = $reffer_records['0']['user_id'];\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$data12['reffer_user_id']=$user11_id;\n\t\t\t\t\t$update_toekn=$this -> conn -> updatetablebyid('user', 'user_id',$user_id, $data12);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\tif(!empty($reffer_records)){\n\t\t\t\t * \t$reffer_records = $this -> conn -> get_all_records('reffer_amount');\n\t\t\t\t$refferal_amount = $reffer_records[0]['reffer_amount'];\n\t\t\t\t\t\t\t\t\t\t$user11_id = $reffer_records['0']['user_id'];\n\t\t\t\t\t\t\t\t\t\t$reffer_code_database = $reffer_records['0']['user_refferal_code'];\n\t\t\t\t\t\t\t\t\t\t\t$wallet = $reffer_records['0']['wallet_amount'];\n\t\t\t\t\t\t\t\t\t\t\t$frnd_number = $reffer_records['0']['user_contact_no'];\n\t\t\t\t\t\t\t\t\t\t\t$current_date=date(\"Y-m-d h:i:sa\");\n\t\t\t\t\t\t\t\t\t\t\t$transaction_id= strtotime(\"now\").mt_rand(10000000, 99999999);\n\t\t\t\t\t\t\t\t\t\t\t$wt_type=2; // credit in frnd acconnt\n\t\t\t\t\t\t\t\t\t\t\t$refferamount=$refferal_amount; // reffer amount\n\t\t\t\t\t\t\t\t\t\t\t$wt_category=9; // refferal amount recieved in wallet\n\t\t\t\t\t\t\t\t\t\t\t$wt_desc=\"Refferal amount add in your wallet using by \".substr($mobile,4);\n\t\t\t\t\t\t\t\t\t\tif($reffer_code == $reffer_code_database){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$add_reffer_money = $this -> conn -> insertnewrecords('refferal_records','refferal_user_id,refferal_frnd_id,refferal_amount,refferal_date', '\"' . $user_id . '\",\"' . $user11_id . '\",\"' . $refferamount . '\",\"' . $current_date . '\"');\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$add_money = $this -> conn -> insertnewrecords('wallet_transaction','wt_user_id, wt_datetime,wt_type,wt_amount,wt_category,transaction_id,wt_desc,cashbackrecord_id', '\"' . $user11_id . '\",\"' . $current_date . '\",\"' . $wt_type . '\",\"' . $refferamount . '\",\"' . $wt_category . '\",\"' . $transaction_id . '\",\"' . $wt_desc . '\",\"' . $frnd_number . '\"');\n\t\t\t\t\t\t\t\t\t\t\t$data12['reffer_amount_status']=$wallet+$refferal_amount;\n\t\t\t\t\t\t\t\t\t$update_toekn=$this -> conn -> updatetablebyid('user', 'user_id',$user11_id, $data12);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Successfully verified\", \"mobile\" => $_REQUEST['user_mobile_no'],'user_id'=>$user_id,'user_wallet'=>$wallet_amount,'user_email'=>$user_email,'login_type'=>1,'user_reffer_code'=>$user_self_reffer,'profile_pic'=>$img,'user_pin_status'=>'2');\n\t\t\t\t\techo $this -> json($post);\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t$error = array('status' => \"false\", \"message\" => \"User not Exist\");\n\t\t\t\techo $this -> json($error);\n\t\t\t}\n\t\t} else {\n\t\t\t$error = array('status' => \"false\", \"message\" => \"Please Enter a valid verification code\" ,'user_mobile_no' => $_POST['user_mobile_no'],'verification_code'=>$_POST['user_verification_code']);\n\t\techo $this -> json($error);\n\t\t}\n\t}", "public function isSuccessful() {\n\t\t$status = $this->checkReturnHashPayment();\n\t\tif ($status !== true) {\n\t\t\t$this->message = $status;\n\t\t}\n\t\treturn $status === true;\n\t}", "public function verify_phone_number()\n\t{\n\t\t$user_id = Input::get('userId');\n\t\t$verification_code = Input::get('verificationCode');\n\n\t\tif ($this->notifyRepo->smsVerificationCheck($user_id, $verification_code))\n\t\t{\n\t\t\t$this->notifyRepo->smsSaveVerifiedPhoneNumber($user_id);\n\t\t\t$this->notifyRepo->smsDeleteVerifyRecord($user_id);\n\t\t\t$valid = [\n\t\t\t\t'status' => true,\n\t\t\t\t'message' => 'Your phone number has been verified.'\n\t\t\t];\n\t\t\treturn $valid;\n\t\t}\n\n\t\t$valid = [\n\t\t\t'status' => false,\n\t\t\t'message' => 'The code you entered does not match the code we sent you.'\n\t\t];\n\t\treturn $valid;\n\t}", "private function checkSessionId() {\r\n\r\n $hijackTest = FALSE;\r\n \r\n if ($this->hijackBlock) {\r\n $this->SQLStatement_GetSessionInfos->bindParam(':sid', $this->sessionId, PDO::PARAM_STR, $this->sid_len);\r\n $this->SQLStatement_GetSessionInfos->execute();\r\n $val = $this->SQLStatement_GetSessionInfos->fetchAll(PDO::FETCH_ASSOC);\r\n //var_dump($val);\r\n //echo \"<br> UA:\".$this->getUa().\"<br>\";\r\n if ($val[0][\"ua\"] ==$this->getUa()) {\r\n $hijackTest = TRUE;\r\n } else {\r\n $hijackTest = FALSE;\r\n }\r\n } else {\r\n $hijackTest = TRUE;\r\n }\r\n\r\n if ($hijackTest==TRUE) return true;\r\n else return false;\r\n \r\n }", "public function isSuccessful() {}", "protected function _checkId($version, $params, $immediate, $extensions=null,\n Zend_Controller_Response_Abstract $response = null)\n {\n $ret = [];\n\n if ($version >= 2.0) {\n $ret['openid.ns'] = Zend_OpenId::NS_2_0;\n }\n $root = $this->getSiteRoot($params);\n if ($root === false) {\n return false;\n }\n\n if (isset($params['openid_identity']) &&\n !$this->_storage->hasUser($params['openid_identity'])) {\n $ret['openid.mode'] = ($immediate && $version >= 2.0) ? 'setup_needed': 'cancel';\n return $ret;\n }\n\n /* Check if user already logged in into the server */\n if (!isset($params['openid_identity']) ||\n $this->_user->getLoggedInUser() !== $params['openid_identity']) {\n $params2 = [];\n foreach ($params as $key => $val) {\n if (strpos($key, 'openid_ns_') === 0) {\n $key = 'openid.ns.' . substr($key, strlen('openid_ns_'));\n } else if (strpos($key, 'openid_sreg_') === 0) {\n $key = 'openid.sreg.' . substr($key, strlen('openid_sreg_'));\n } else if (strpos($key, 'openid_') === 0) {\n $key = 'openid.' . substr($key, strlen('openid_'));\n }\n $params2[$key] = $val;\n }\n if ($immediate) {\n $params2['openid.mode'] = 'checkid_setup';\n $ret['openid.mode'] = ($version >= 2.0) ? 'setup_needed': 'id_res';\n $ret['openid.user_setup_url'] = $this->_loginUrl\n . (strpos($this->_loginUrl, '?') === false ? '?' : '&')\n . Zend_OpenId::paramsToQuery($params2);\n return $ret;\n } else {\n /* Redirect to Server Login Screen */\n Zend_OpenId::redirect($this->_loginUrl, $params2, $response);\n return true;\n }\n }\n\n if (!Zend_OpenId_Extension::forAll($extensions, 'parseRequest', $params)) {\n $ret['openid.mode'] = ($immediate && $version >= 2.0) ? 'setup_needed': 'cancel';\n return $ret;\n }\n\n /* Check if user trusts to the consumer */\n $trusted = null;\n $sites = $this->_storage->getTrustedSites($params['openid_identity']);\n if (isset($params['openid_return_to'])) {\n $root = $params['openid_return_to'];\n }\n if (isset($sites[$root])) {\n $trusted = $sites[$root];\n } else {\n foreach ($sites as $site => $t) {\n if (strpos($root, $site) === 0) {\n $trusted = $t;\n break;\n }\n\n /* OpenID 2.0 (9.2) check for realm wild-card matching */\n $n = strpos($site, '://*.');\n if ($n != false) {\n $regex = '/^'\n . preg_quote(substr($site, 0, $n+3), '/')\n . '[A-Za-z1-9_\\.]+?'\n . preg_quote(substr($site, $n+4), '/')\n . '/';\n if (preg_match($regex, $root)) {\n $trusted = $t;\n break;\n }\n }\n }\n }\n\n if (is_array($trusted)) {\n if (!Zend_OpenId_Extension::forAll($extensions, 'checkTrustData', $trusted)) {\n $trusted = null;\n }\n }\n\n if ($trusted === false) {\n $ret['openid.mode'] = 'cancel';\n return $ret;\n }\n\n if ($trusted === null) {\n /* Redirect to Server Trust Screen */\n $params2 = [];\n\n foreach ($params as $key => $val) {\n if (strpos($key, 'openid_ns_') === 0) {\n $key = 'openid.ns.' . substr($key, strlen('openid_ns_'));\n } else if (strpos($key, 'openid_sreg_') === 0) {\n $key = 'openid.sreg.' . substr($key, strlen('openid_sreg_'));\n } else if (strpos($key, 'openid_') === 0) {\n $key = 'openid.' . substr($key, strlen('openid_'));\n }\n $params2[$key] = $val;\n }\n if ($immediate) {\n $params2['openid.mode'] = 'checkid_setup';\n $ret['openid.mode'] = ($version >= 2.0) ? 'setup_needed': 'id_res';\n $ret['openid.user_setup_url'] = $this->_trustUrl\n . (strpos($this->_trustUrl, '?') === false ? '?' : '&')\n . Zend_OpenId::paramsToQuery($params2);\n return $ret;\n } else {\n Zend_OpenId::redirect($this->_trustUrl, $params2, $response);\n return true;\n }\n }\n\n return $this->_respond($version, $ret, $params, $extensions);\n }", "private function _checkPk() {\n\t\t$result = false;\n\t\t$private_key = Mage::helper ( 'masterpass' )->checkPrivateKey ();\n\t\tif (! $private_key) {\n\t\t\tMage::getSingleton ( 'core/session' )->addError ( Mage::getStoreConfig ( 'masterpass/config/checkouterrormessage' ) );\n\t\t\t// save long access token\n\t\t\t$customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();\n\t\t\t$customerData = Mage::getModel ( 'customer/customer' )->load ( $customer->getId () );\n\t\t\t$longAccessToken = null;\n\t\t\t$customerData->setData ( 'longtoken', $longAccessToken );\n\t\t\t\n\t\t\t$customerData->save ();\n\t\t\t// $this->_redirect('checkout/cart');\n\t\t\t// $this->getResponse()->setRedirect(Mage::helper('customer')->getLoginUrl());\n\t\t\t$result = true;\n\t\t}\n\t\treturn $result;\n\t}", "public function authorize()\n {\n if (app()->environment() == 'testing') {\n return true;\n }\n \n $signature = $this->header('X-Pingplusplus-Signature');\n return $this->verify_signature(file_get_contents('php://input'), $signature) === 1;\n }", "function isSuccessful() ;", "function verify_success($user_id)\n\t\t{\n\t\t\t$statement = $this->conn_id->prepare(\"update users set is_active = 1 where user_id = :user_id\");\n\t\t\treturn $statement->execute(array(':user_id' => $user_id));\n\t\t}", "public function isVerified()\n {\n return $this->verified;\n }", "public function isVerified()\n {\n return $this->verified;\n }", "public function isVerified()\n {\n return $this->verified;\n }", "public function testVerify()\n {\n $this->assertFalse(\n SmsVerification::of($this->config)->verify('+456', 'TEST_SECRET')\n );\n\n // Assert false when the phone is not stored\n $this->assertFalse(\n SmsVerification::of($this->config)->verify('+123', 'CLIENT_SECRET')\n );\n\n // Assert true when the phone and secret are properly given\n $this->assertFalse(\n SmsVerification::of($this->config)->verify('+123', 'TEST_SECRET')\n );\n }", "function simpleid_process_openid($request) {\n global $version;\n \n $version = openid_get_version($request);\n \n switch ($request['openid.mode']) {\n case 'associate':\n simpleid_associate($request);\n return;\n case 'checkid_immediate':\n case 'checkid_setup':\n return simpleid_checkid($request);\n case 'check_authentication':\n simpleid_check_authentication($request);\n break;\n default:\n if (isset($request['openid.return_to'])) {\n // Indirect communication - send error via indirect communication.\n header_response_code('404 Bad Request');\n set_message('Invalid OpenID message.');\n page_dashboard();\n } else {\n // Direct communication\n openid_direct_error('Invalid OpenID message.');\n }\n }\n}", "public function hasCredential(string $id): bool;", "function verifyAuth(){\n // on the config values. In this case we just check for user 0.\n $query = \"SELECT name FROM users WHERE user_id = 0\";\n try {\n $sth = $this->spdo->prepare($query);\n $sth->execute();\n }\n catch(PDOException $e) {\n endProcess(0,\"Could not get user information because \".pdoError($e));\n }\n if($this->spdo->query(\"SELECT FOUND_ROWS()\")->fetchColumn() != 1)\n return false;\n return true;\n }", "public function checkAuth();", "public function checkAuth();", "public function verifyAction()\n {\n $email = Request::post('email', Filter::FILTER_EMAIL, false);\n\n if (!$email || !Validator_Email::validate($email)) {\n Response::jsonError($this->moduleLang->get('email_invalid'));\n }\n\n $model = Model::factory('User');\n\n $userIds = $model->getList(\n ['limit' => 1],\n [\n 'email' => $email,\n 'enabled'=> true\n ],\n ['id']\n );\n\n if (count($userIds) == 0) {\n Response::jsonError($this->moduleLang->get('email_user_unknown'));\n }\n\n $userId = $userIds[0]['id'];\n\n $user = Db_Object::factory('User', $userId);\n $authCode = Utils::hash(uniqid(time(),true));\n\n $confDate = new DateTime('now');\n $confDate = $confDate->add(new DateInterval('P1D'))->format('Y-m-d H:i:s');\n\n try{\n $user->setValues(array(\n 'confirmation_code' => $authCode,\n 'confirmation_expiried' => $confDate\n ));\n if(!$user->save())\n throw new Exception('Cannot update user info');\n }catch (Exception $e){\n Response::jsonError($this->_lang->get('CANT_EXEC'));\n }\n\n $this->sendEmail($user);\n\n Response::jsonSuccess(array(\n 'msg' => $this->moduleLang->get('pwd_success')\n ));\n }", "public function validate() : bool\n {\n if (!$this->request) {\n throw new Exception(\"Missing request, please use setRequest to specify it.\");\n }\n\n if (!$this->requestIsValid()) {\n return false;\n }\n\n $requestOptions = $this->getDefaultRequestOptions();\n $response = $this->guzzleClient->request('POST', $this->getOpenIdUrl().'/login', $requestOptions);\n\n $this->parseSteamID();\n $this->parseInfo();\n\n return $response->getStatusCode() === 200;\n }" ]
[ "0.73925734", "0.69684803", "0.67869836", "0.6735506", "0.6664794", "0.66517764", "0.6561427", "0.65513575", "0.65010786", "0.6498432", "0.6449355", "0.6417599", "0.6397924", "0.6354561", "0.63356715", "0.63136905", "0.6278225", "0.6266145", "0.62433296", "0.62351215", "0.6223248", "0.6144716", "0.60977703", "0.6093364", "0.60889596", "0.6087161", "0.6081175", "0.6065847", "0.60590553", "0.6057337", "0.60045314", "0.6004257", "0.6002021", "0.6001003", "0.5985093", "0.5926208", "0.5918693", "0.58887047", "0.58813953", "0.58813953", "0.5879052", "0.5875827", "0.58360696", "0.58297414", "0.58260804", "0.5824629", "0.5821678", "0.5801581", "0.5794146", "0.5774373", "0.5750406", "0.57479423", "0.57463336", "0.5745074", "0.57438844", "0.57383555", "0.5731108", "0.5689236", "0.56631726", "0.5659965", "0.56562585", "0.56388223", "0.56360966", "0.5635721", "0.56349033", "0.56332916", "0.5631058", "0.56298393", "0.5622167", "0.562119", "0.5606658", "0.5603727", "0.5597614", "0.55972546", "0.55953205", "0.558848", "0.558684", "0.5586576", "0.5586157", "0.5584472", "0.5583536", "0.5580047", "0.55772114", "0.5574281", "0.5565946", "0.55605704", "0.5558616", "0.55492884", "0.55488634", "0.5547889", "0.5547889", "0.5547889", "0.5543021", "0.5542593", "0.5540154", "0.5539192", "0.5530736", "0.5530736", "0.55305237", "0.55235034" ]
0.76412565
0
/ This PHP file contains Cookie Ultilities Accessing Cookies with PHP
// Этот файл PHP содержит утилиты для работы с куками, доступ к кукам через PHP
function getCookiesInfo(){ echo "Cookies information: <br>"; if( isset($_COOKIE["name"])){ echo "_COOKIE[\"name\"]: " . $_COOKIE["name"] . "<br />"; } else{ echo "Sorry... _COOKIE[\"name\"] is not set yet !" . "<br />"; } //echo "HTTP_COOKIE_VARS[\"name\"]: " . $HTTP_COOKIE_VARS["name"]. "<br />"; //echo "_COOKIE[\"age\"]: " . $_COOKIE["age"] . "<br />"; //echo "HTTP_COOKIE_VARS[\"name\"]: " . $HTTP_COOKIE_VARS["name"] . "<br />"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_cookies()\n {\n }", "function doCookies() {\r\n setcookie(\"cli_num\", 123456789, time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_fname\", $_POST['first_name'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_lname\", $_POST['last_name'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_dob\", $_POST['dob'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_email\", $_POST['email'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_phone\", $_POST['phone'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_add\", $_POST['address'], time() + (86400 * 1), \"/\");\r\n \r\n /* //print the cookies\r\n echo \"Value is: \" . $_COOKIE[\"cli_num\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_fname\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_lname\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_dob\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_email\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_phone\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_add\"];*/\r\n \r\n}", "public function getCookies()\n {\n\n }", "function Cookies()\n{\n //en bewaar zijn antwoord in een sessievariabele\n\n\n //check of eerder al een antwoord ivm de cookies opgeslagen werd in de sessievariabele,\n //zoniet toon dan de cookies-tekst en stop de PHP code uitvoering\n\n //toon in een hidden div waarop de gebruiker geklikt heeft (cookies geaccepteerd of niet)\n\n}", "function setcookies()\n\t{\n\t\tfor($x=0; $x<count($this->headers); $x++)\n\t\t{\n\t\tif(preg_match('/^set-cookie:[\\s]+([^=]+)=([^;]+)/i', $this->headers[$x],$match))\n\t\t\t$this->cookies[$match[1]] = urldecode($match[2]);\n\t\t}\n\t}", "public function getCookieVariables();", "function ms_cookie_constants()\n {\n }", "public function getCookie(): array;", "function getCookie($username, $pass) {\n\t\t\t\tglobal $botinfo, $clientinfo, $Crono;\n\t\tconsole( \"Attempting to get Certificate.. \", \"Core\");\n\t\t// Method to get the cookie! Yeah! :D\n\t\t// Our first job is to open an SSL connection with our host.\n\t\t$this->socket = fsockopen(\"ssl://www.deviantart.com\", 443);\n\t\tconsole( \"[Cookie] - Opened socket!\", \"Core\");\n\t\t// If we didn't manage that, we need to exit!\n\t\tif($this->socket === false) {\n\t\tconsole( \"Error: Please check your internet connection!\", \"Core\");\n\t\t}\n\t\t// Fill up the form payload\n\t\t$POST = '&username='.urlencode($username);\n\t\t$POST.= '&password='.urlencode($pass);\n\t\t$POST.= '&remember_me=1';\n\t\t// And now we send our header and post data and retrieve the response.\n\t\t$response = $this->send_headers(\n\t\t\t$this->socket,\n\t\t\t\"www.deviantart.com\",\n\t\t\t\"/users/login\",\n\t\t\t\"http://www.deviantart.com/users/rockedout\",\n\t\t\t$POST\n\t\t);\n\t \n\t\t// Now that we have our data, we can close the socket.\n\t\tfclose ($this->socket);\n\t\t// And now we do the normal stuff, like checking if the response was empty or not.\n\t\tif(empty($response))\n\t\treturn 'No response returned from the server';\n\t\tif(stripos($response, 'set-cookie') === false)\n\t\treturn 'No cookie returned';\n\t\t// Grab the cookies from the header\n\t\t$response=explode(\"\\r\\n\", $response);\n\t\t$cookie_jar = array();\n\t\tforeach ($response as $line)\n\t\t\tif (strpos($line, \"Set-Cookie:\")!== false)\n\t\t\t\t$cookie_jar[] = substr($line, 12, strpos($line, \"; \")-12);\n\n\t\t// Using these cookies, we're gonna go to chat.deviantart.com and get\n\t\t// our authtoken from the dAmn client.\n\t\tif (($this->socket = @fsockopen(\"ssl://www.deviantart.com\", 443)) == false)\n\t\t return 'Could not open an internet connection';\n\n\t\t$response = $this->send_headers(\n\t\t\t$this->socket,\n\t\t\t\"chat.deviantart.com\",\n\t\t\t\"/chat/\",\n\t\t\t\"http://chat.deviantart.com\",\n\t\t\tnull,\n\t\t\t$cookie_jar\n\t\t);\n\n\t\t// Now search for the authtoken in the response\n\t\t$cookie = null;\n\t\tif (($pos = strpos($response, \"dAmn_Login( \")) !== false)\n\t\t{\n\t\t\t$response = substr($response, $pos+12);\n\t\t\t$cookie = substr($response, strpos($response, \"\\\", \")+4, 32);\n\t\t}\n\t\telse return 'No authtoken found in dAmn client';\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t// Because errors still happen, we need to make sure we now have an array!\n\t\tif(!$cookie)\n\t\treturn 'Malformed cookie returned';\n\t\t// We got a valid cookie!\n\t\tglobal $dAmn, $running;\n\t\t$running = true;\n\t\t$dAmn->cookie = $cookie;\n\t\treturn $cookie;\n\t\tconsole( \"Cookie: \".$cookie, \"Connection\"\t\t);\n\t}", "protected function __setCookie()\n\t{\n\t\t$this->Cookie->type('cipher');\n\t\t$this->Cookie->name = 'Stats';\n\t\t$this->Cookie->time = '90 days';\n\t\t$this->Cookie->path = '/';\n\n\t\t# Dev or production server\n\t\tif (empty($_SERVER['APPLICATION_ENV'])) {\n\t\t\t$domain = get_domain(env('HTTP_HOST'));\n\t\t\t$domain = \"cms.muoriginfree.com\";\n\t\t\t#$domain = '45.117.77.125';\n\t\t} else {\n\t\t\t$domain = env('HTTP_HOST');\n\t\t}\n\t\t$this->Cookie->domain = $domain;\n\t\t\n\t\t$this->Cookie->key = 'quanvh_qSdd%ddId2121232xdddddxqADYhG93b0qyJfIxfs1232guVoUubWwvaniR2G0FgaC9mis*&saX6Owsd121!';\n\t}", "protected function handle_cookie()\n {\n }", "function verifyCookies()\n\t{\n\t\tif (isset($_COOKIE['cookieUserName']))\n\t\t{\n\t\t\techo json_encode(array('cookieUserName' => $_COOKIE['cookieUserName']));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# Cookie not set yet\n\t\t die(json_encode(errors(417)));\n\t\t}\n\t}", "function wp_cookie_constants()\n {\n }", "protected function _setCookies() {\n\t\tforeach ($this->_cookies as $name => $c) {\n\t\t\tsetcookie(\n\t\t\t\t$name, $c['value'], $c['expire'], $c['path'],\n\t\t\t\t$c['domain'], $c['secure'], $c['httpOnly']\n\t\t\t);\n\t\t}\n\t}", "public function loadCookies($username = '');", "function check_cookie($value){\n \n}", "public function set_cookie()\n {\n }", "function get_cookie($name)\n{\n if (isset($_COOKIE[$name])) {\n return json_decode(base64_decode(stripslashes($_COOKIE[$name])), true);\n }\n\n return array();\n}", "function testCookies() {\n\t$config = getConfig();\n\t$root = getRootPath();\n\t\n\t// Get the test page.\n\t$http = new \\AutoHttp\\Http($config);\n\t$page = $http->getPage($root . '/test/pages/http/cookie.php');\n\t\n\t// Verify we didn't send a cookie.\n\tif (strpos($page['body'], \"Cookie named 'user' is not set!\") === false)\n\t\treturn 'The cookie shouldn\\'t be set on our first page access.';\n\t\t\n\t// Get the page again.\n\t$page = $http->getPage($root . '/test/pages/http/cookie.php');\n\t\n\t// Verify we sent a cookie this time.\t\t\n\tif (strpos($page['body'], \"Cookie 'user' is set!\") === false ||\n\t\tstrpos($page['body'], \"Value is: John Doe\") === false)\n\t\treturn 'The cookie should be set on our second page access.';\n\t\t\n\treturn true;\n}", "function getCookies(){\n\t\treturn $this->_HTTPCookies;\n\t}", "public function enableCookies() {}", "public function cookies() {\n $cookies = $this->command('cookies');\n $objCookies = array();\n foreach ($cookies as $cookie) {\n $objCookies[$cookie[\"name\"]] = new Cookie($cookie);\n }\n return $objCookies;\n }", "function get_cookie() {\n\tglobal $_COOKIE;\n\t// $_COOKIE['main_user_id_1'] = '22760600|2c3a1c1487520d9aaf15917189d5864';\n\t$hid = explode ( \"|\", $_COOKIE ['main_tcsso_1'] );\n\t$handleName = $_COOKIE ['handleName'];\n\t// print_r($hid);\n\t$hname = explode ( \"|\", $_COOKIE ['direct_sso_user_id_1'] );\n\t$meta = new stdclass ();\n\t$meta->handle_id = $hid [0];\n\t$meta->handle_name = $handleName;\n\treturn $meta;\n}", "function store_cookies($cookie_file)\n\t{\n\t\t//连接关闭以后,存放cookie信息的文件名称 (cookies stored in $cookie_file)\n\t\tcurl_setopt ($this->ch, CURLOPT_COOKIEJAR, $cookie_file);\n\t\t//包含cookie信息的文件名称,这个cookie文件可以是Netscape格式或者HTTP风格的header信息\n\t\tcurl_setopt ($this->ch, CURLOPT_COOKIEFILE, $cookie_file);\n\t}", "function define_settings_cookie()\n\t{\n\t\t\n\t\t$settings = json_decode($_COOKIE['doctor'], TRUE);\n\t\t\n\t\t//Did the user change the theme?\n\t\tif ( isset($_POST['theme']) && ($settings['theme'] != $_POST['theme']) ) $settings = define_theme_colors($_POST['theme'], $settings);\n\n\t\t//Were the .htpasswd credentials changed?\n\t\tif (isset($_POST['enableHtaccess']))\n\t\t{\n\t\t\tif ( update_htacess_protection($_POST['htaccess']) ) \n\t\t\t{\n\t\t\t\tif ($_POST['enableHtaccess'] == 'true') $settings['htpasswd'] = TRUE;\n\t\t\t\telse $settings['htpasswd'] = FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$settings = json_encode($settings);\n\t\tsetcookie( 'doctor', $settings, time()+(3600*24)*30, '/' );\n\t}", "protected function setCookies() {\n $this->cookies = array();\n\n $headers = $this->getHeader(Header::HEADER_COOKIE);\n if (!$headers) {\n return;\n }\n\n if (!is_array($headers)) {\n $headers = array($headers);\n }\n\n foreach ($headers as $header) {\n $cookies = explode(';', $header);\n foreach ($cookies as $cookie) {\n if (strpos($cookie, '=')) {\n list($name, $value) = explode('=', trim($cookie), 2);\n } else {\n $name = $cookie;\n $value = true;\n }\n\n $this->cookies[$name] = $value;\n }\n }\n }", "public function cookie($name);", "function setUrlCookie($url, $postdata, $username)\n\t{\n\t\t// check the user cookie whether exists\n\t\t// if not, create a new cookie file\n\t\t// else use the same filename \n\t\t/* 可能有bug */\n\t\t//$status = 400;\n\t\t//$response = NULL;\n\t\t$chk_cookie = glob('./cookie/'.$username.'*');\n\t\tif($chk_cookie != null) {\n\t\t\tpreg_match(\"/[^(.\\/cookie\\/)].*/\", $chk_cookie[0], $match);\n\t\t\t$cookie_jar = \"/usr/local/www/apache22/data/curl_test/cookie/\".$match[0];\n\t\t\t//echo $cookie_jar.\"<br>\";\n\t\t}\n\t\telse {\n\t\t\t$cookie_jar = tempnam('./cookie/',$username); // Create file with unique file name (cookie*)\n\t\t\t//echo $cookie_jar.\"<br>\";\n\t\t}\n\t\t//$cookie_jar = \"./cookie/\".$username.\"cookie.txt\";\n\n\t\t$resource = curl_init();\n\t\tcurl_setopt($resource, CURLOPT_URL, $url);\n\t\tcurl_setopt($resource, CURLOPT_POST, 1);\n\t\tcurl_setopt($resource, CURLOPT_POSTFIELDS, $postdata);\n\t\tcurl_setopt($resource, CURLOPT_COOKIEJAR, $cookie_jar);\n\t\tcurl_setopt($resource, CURLOPT_COOKIEFILE, $cookie_jar);\n\t\tcurl_setopt($resource, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_exec($resource);\n\n\t\t// echo cookie filename to front-end, it will be used to auth user identity.\n\t\tpreg_match(\"/[^(\\/usr\\/local\\/www\\/apache22\\/data\\/curl_test\\/cookie\\/)].*/\",$cookie_jar, $match);\n\t\t\n\t\t//if(filesize('cookie/'.$match[0]) > 0) {\n\t\t//clearstatcache();\n\t\t//echo filesize($cookie_jar);\n\t\t/*\n\t\tif(filesize($cookie_jar) > 0)\n\t \t{\n\t\t\t$response = $match[0];\n\t\t\t$status = 200;\n\t\t}\n\t\telse {\n\t\t\t$response = \"error\";\n\t\t}\n\n\t\t\n\t\t$response_arr = array(\"status_code\" => $status,\n\t\t \"response\" => $response\n\t\t );\n\t\techo json_encode($response_arr, JSON_UNESCAPED_UNICODE);\n\t\t*/\n\t\treturn $match[0];\n\t}", "public function test_protected_setCookie()\n {\n $cookies = $this->object->getCookies($this->serviceUrl_1c);\n $this->assertInternalType('array', $cookies);\n $this->assertEquals(1, count($cookies));\n $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);\n }", "#[Pure]\nfunction http_parse_cookie($cookie, $flags = null, ?array $allowed_extras = null) {}", "#[Pure]\n public function getCookies() {}", "function setCookies() {\r\n\t\t//cookies are set to 1 month, or 30 days, from now.\r\n\t\tsetcookie(\"phoneNumber\", $this->phone_number, time() + (60 * 60 * 24 * 30));\r\n\t\tsetcookie(\"email\", $this->email, time() + (60 * 60 * 24 * 30));\r\n\t}", "private function get_auth_cookie() {\r\n $postfields = http_build_query([\r\n 'username' => $this->username,\r\n 'password' => $this->password,\r\n 'csrfmiddlewaretoken' => $this->csrf_token\r\n ]);\r\n curl_setopt_array($this->curl_handle, [\r\n CURLOPT_URL => $this->auth_url,\r\n CURLOPT_COOKIEJAR => self::COOKIE_FILE,\r\n CURLOPT_COOKIEFILE => self::COOKIE_FILE,\r\n CURLOPT_POST\t => false,\r\n CURLOPT_POSTFIELDS => $postfields,\r\n CURLOPT_FAILONERROR => true,\r\n CURLOPT_FOLLOWLOCATION => true,\r\n CURLOPT_REFERER => $this->auth_url,\r\n CURLOPT_AUTOREFERER => true,\r\n CURLOPT_HTTPHEADER => ['User-Agent: '.self::USER_AGENT],\r\n //CURLOPT_VERBOSE => true,\r\n CURLOPT_RETURNTRANSFER => true\r\n ]);\r\n\r\n curl_exec($this->curl_handle);\r\n }", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "private function retrieveCookiesAndIdentifiers()\n {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, \"http://www.facebook.com\");\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_ENCODING, \"\");\n curl_setopt($curl, CURLOPT_COOKIEJAR, $this->cookiePath);\n curl_setopt(\n $curl,\n CURLOPT_USERAGENT,\n \"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2) \n Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)\"\n );\n $curlData = curl_exec($curl);\n curl_close($curl);\n\n $this->identifiers = $this->retrieveIdentifiers($curlData);\n }", "function cookie($name, $value, $time){\n setCookie($name, $value, $time, \"/\", \"www.cubebomb.com\");\n}", "function set_usercookies() {\r\n\t\tglobal $login_name, $login_password, $lang, $actual_user_is_admin, $actual_user_is_logged_in, $actual_user_id, $actual_user_name, $actual_user_showname, $actual_user_passwd_md5, $actual_user_lang, $actual_user_online_id, $_COOKIE;\r\n\t\r\n\t\t$actual_user_online_id = \"\";\r\n\t\t$actual_user_is_admin = false;\r\n\t\t$actual_user_is_logged_in = false;\r\n\t\t$actual_user_id = 0;\r\n\t\t//\r\n\t\t// FIX ME: get this by default config or by HTTP headers of the client\r\n\t\t//\r\n\t\t$actual_user_lang = 'de'; \r\n\t\t$actual_user_name = '';\r\n\t\t$actual_user_showname = '';\r\n\t\t$actual_user_passwd_md5 = '';\r\n\t\t$languages = array('de', 'en');\r\n\t\t//\r\n\t\t// Check: has the user changed the language by hand?\r\n\t\t//\r\n\t\tif(isset($lang)) {\r\n\t\t\tif(in_array($lang, $languages))\r\n\t\t\t\t$actual_user_lang = $lang;\r\n\t\t}\r\n\t\t//\r\n\t\t// Get the language from the cookie if it' s not changed\r\n\t\t//\r\n\t\telseif(isset($_COOKIE['CMS_user_lang'])) {\r\n\t\t\tif(in_array($_COOKIE['CMS_user_lang'], $languages))\r\n\t\t\t\t$actual_user_lang = $_COOKIE['CMS_user_lang'];\r\n\t\t}\r\n\t\t//\r\n\t\t// Set the cookie (for the next 93(= 3x31) Days)\r\n\t\t//\r\n\t\tsetcookie('CMS_user_lang', $actual_user_lang, time() + 8035200); \r\n\t\t//\r\n\t\t// Tells the cookie: \"the user is logged in!\"?\r\n\t\t//\r\n\t\tif(isset($_COOKIE['CMS_user_cookie'])) {\r\n\t\t\t$data = explode('|', $_COOKIE['CMS_user_cookie']);\r\n\t\t\t$actual_user_online_id = @$data[0];\r\n\t\t\t$actual_user_name = @$data[1];\r\n\t\t\t$actual_user_passwd_md5 = @$data[2];\r\n\t\t}\r\n\t\t//\r\n\t\t// Tries somebody to log in?\r\n\t\t//\r\n\t\tif(isset($login_name) && isset($login_password)) {\r\n\t\t\t$actual_user_name = $login_name;\r\n\t\t\t$actual_user_passwd_md5 = md5($login_password);\r\n\t\t}\r\n\t\t\r\n\t\tif($actual_user_online_id == '')\r\n\t\t\t$actual_user_online_id = md5(uniqid(rand()));\r\n\t\t//\r\n\t\t// Check: is the user really logged in?\r\n\t\t//\r\n\t\tif($actual_user_name != \"\" && $actual_user_passwd_md5 != \"\") {\r\n\t\t\t$sql = \"SELECT *\r\n\t\t\t\tFROM \" . DB_PREFIX . \"users\r\n\t\t\t\tWHERE user_name='$actual_user_name' AND user_password='$actual_user_passwd_md5'\";\r\n\t\t\t$original_user_result = db_result($sql);\r\n\t\t\t$original_user = mysql_fetch_object($original_user_result);\r\n\t\t\tif(@$original_user->user_name == '') {\r\n\t\t\t\t$actual_user_is_admin = false;\r\n\t\t\t\t$actual_user_is_logged_in = false;\r\n\t\t\t\t$actual_user_name = '';\r\n\t\t\t\t$actual_user_passwd_md5 = '';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$actual_user_is_logged_in = true;\r\n\t\t\t\t$actual_user_showname = $original_user->user_showname;\r\n\t\t\t\t$actual_user_id = $original_user->user_id;\r\n\t\t\t\tif($original_user->user_admin == 'y')\r\n\t\t\t\t\t$actual_user_is_admin = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tsetcookie('CMS_user_cookie',$actual_user_online_id . '|' . $actual_user_name . '|' . $actual_user_passwd_md5, time() + 14400);\r\n\t}", "function _rocket_add_aelia_currencyswitcher_dynamic_cookies( $cookies ) {\n\t$cookies[] = 'aelia_cs_recalculate_cart_totals';\n\t$cookies[] = 'aelia_cs_selected_currency';\n\t$cookies[] = 'aelia_customer_country';\n\treturn $cookies;\n}", "function setacookiet($value, $expire)\r\n{\r\n\tglobal $cookie_name, $cookie_path, $cookie_domain;\r\n\t$cookie_namet=$cookie_name.\"_terms\";\r\n\tif (version_compare(PHP_VERSION, '5.2.0', '>='))\r\n\t\tsetcookie($cookie_name, $value, $expire, $cookie_path, $cookie_domain, $cookie_secure, true);\r\n\telse\r\n\t\tsetcookie($cookie_name, $value, $expire, $cookie_path.'; HttpOnly', $cookie_domain, $cookie_secure);\r\n}", "function check_auth_cookie($appword,$cookexp=0,$cookiename=\"login\",$username=\"\"){\n//debug_string(\"check_auth_cookie()\");\n//debug_string(\"appword\",$appword);\n//debug_string(\"cookexp\",$cookexp);\n//debug_string(\"cookiename\",$cookiename);\n//debug_string(\"username\",$username);\n\n\t$c_data = get_cook_data($cookiename);// get the cookie data\n//debug_array(\"c_data\",$c_data);\n if (!isset($c_data)){// if no data return false\n return false;\n }\n//parse out the data in the cookie\n\t$c_username = $c_data['name'];// get the username\n//debug_string(\"c_username\",$c_username);\n//debug_string(\"mark1\");\n if (\"\"==$username){$username=$c_username;}//use cookie username if none given\n//debug_string(\"mark2\");\n\t$c_time = $c_data['time'];\n\t$c_hash = $c_data['hash'];\n\t$c_expire = $c_data ['expire'];\n//check expiration time; delete cookie and return false if expired\n//debug_string(\"c_time\",$c_time);\n//debug_string(\"c_hash\",$c_hash);\n//debug_string(\"c_expire\",$c_expire);\n//debug_string(\"mark3\");\n\tif (0!=$c_expire && $c_expire<time()){\n//debug_string(\"mark4\");\n\t\tdelete_cookie($cookiename);\n\t\treturn false;\n\t}\n//calc hash\n//debug_string(\"mark5\");\n $hash = md5($appword.$username.$c_time.$cookexp);// calculate hash \n//debug_string(\"hash\",$hash);\n//debug_string(\"c_hash\",$c_hash);\n//debug_string(\"c_username\",$c_username);\n//debug_string(\"username\",$username);\n// check hash\n//debug_string(\"mark6\");\n if(strcmp($c_username,$username)==0 && strcmp($hash,$c_hash)==0 ){\n//debug_string(\"mark7 true\");\n\n return true;\n }else{\n//debug_string(\"mark8 false\");\n return false;\n }\n//debug_string(\"mark9\");\n}", "public function get($cookieName);", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "function load_cookie($file) {\n if (!is_file($file)) {\n return [];\n }\n return json_decode(file_get_contents($file), true);\n}", "#[Pure]\nfunction http_build_cookie(array $cookie) {}", "function getCookies($host) {\n //I will use alredy saved cookies\n global $cookies; \n\n $result=array();\n foreach ($cookies as $cookie) {\n if (strpos($host,$cookie->Dom)!==FALSE) {\n $result[]=\"\".$cookie->Tit.$cookie->Val; \n }\n }\n return implode(\"; \", $result);\n}", "private function refreshCookiesLifetime() {\n\t\t// @see https://www.ccm19.de/\n\t\treturn;\n\n\t\tif (is_array($_COOKIE) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t$expire = time() + (int)$this->settings[\"cookie_lifetime\"] * 60 * 60 * 24;\n\t\t$path = rtrim(PAPOO_WEB_PFAD, \"/\").\"/\";\n\t\t// Cookie-Domain setzen, Cookie mit und ohne www. gültig machen. Dabei ebenfalls lokale Installationen beachten. (aus session_class uebernommen)\n\t\t$domain = str_replace('.www.', '.', (strpos($_SERVER['SERVER_NAME'], '.') === false ? '' : '.'.$_SERVER['SERVER_NAME']));\n\n\t\t// RegEx-Patterns zum Filtern der Cookies nach deren Namen\n\t\t$blacklist = array(\n\t\t\t\"~^_{1,2}g~\",\n\t\t);\n\n\t\tforeach ($_COOKIE as $key => $value) {\n\t\t\t$cookieIsBlacklisted = array_reduce($blacklist, function ($blacklisted, $pattern) use ($key) {\n\t\t\t\treturn $blacklisted || preg_match($pattern, $key);\n\t\t\t}, false);\n\n\t\t\tif ($cookieIsBlacklisted) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t@setcookie($key, $value, $expire, $path, $domain, false, true);\n\t\t}\n\t}", "public function cookies_validate(){\n\t\t\t\n\t\t\tini_set('session.cookie_httponly', true); \n\t\t\theader( 'Expires: Thu, 26 Dec 2012 11:00:00 GMT' ); \n\t\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\n\t\t\theader( 'Cache-Control: private' ); \n\t\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' ); \n\t\t\theader( 'Cache-Control: post-check=0, pre-check=0', false ); \n\t\t\theader( 'Pragma: no-cache' ); \n\n\t\t}", "public static function logout() {\n\t\tif (isset($_COOKIE['sm_constitid'])) {\n\t\t\tsetrawcookie('sm_constitid', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['ERIGHTS'])) {\n\t\t\tsetrawcookie('ERIGHTS', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['JSESSIONID'])) {\n\t\t\tsetrawcookie('JSESSIONID', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['emeta_id'])) {\n\t\t\tsetrawcookie('emeta_id', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['first_name'])) {\n\t\t\tsetrawcookie('first_name', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['last_name'])) {\n\t\t\tsetrawcookie('last_name', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['is_org'])) {\n\t\t\tsetrawcookie('is_org', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['email'])) {\n\t\t\tsetrawcookie('email', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['status'])) {\n\t\t\tsetrawcookie('status', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\t\texit;\n\t}", "public function CookiesCall($Conn)\r\n {\r\n $access_token = $_COOKIE['access_token'];\r\n $access_secret = $_COOKIE['access_secret'];\r\n $this->AccessToken = $access_token;\r\n $CheckCookies = mysqli_query($Conn,'SELECT * FROM authentication WHERE access_token=\"'.$access_token.'\" AND access_secret=\"'.$access_secret.'\" ') or die(mysqli_error($Conn));\r\n if($CheckCookies)\r\n {\r\n // check if Cookies the same\r\n if(mysqli_num_rows($CheckCookies)>=1)\r\n {\r\n // everything is Okay \r\n $FetchCookies = mysqli_fetch_assoc($CheckCookies);\r\n $AdminID= $FetchCookies['id'];\r\n \r\n // make a new query to get admin info.\r\n $GetAdminInfo = mysqli_query($Conn,'SELECT * FROM admins WHERE id = \"'.$AdminID.'\"') or die(mysqli_error($Conn));\r\n if($GetAdminInfo)\r\n {\r\n $FetchAdminInfo = mysqli_fetch_assoc($GetAdminInfo);\r\n $AdminRealID = $FetchAdminInfo['id'];\r\n $AdminUserName = $FetchAdminInfo['username'];\r\n\r\n }\r\n }\r\n else \r\n {\r\n $this->DestroyCookies($Conn);\r\n }\r\n }\r\n else\r\n {\r\n \r\n // Delete authentication \r\n $DeletePastAuthentication = mysqli_query($Conn,'DELETE FROM `authentication` WHERE id=\"'.$AdminID.'\"') or die(mysqli_error($Conn)); \r\n \r\n $DeleteAuthentication = mysqli_query($Conn,'DELETE FROM `authentication` WHERE access_token=\"'.$this->AccessToken.'\"') or die(mysqli_error($Conn)); \r\n // Destroy cookies and logout\r\n setcookie('access_token',null,time()-60*60*24);\r\n setcookie('access_secret',null,time()-60*60*24);\r\n setcookie('login',null,time()-60*60*24); \r\n header('Location: index.php');\r\n\r\n // here we can send to clint he is underrisck and should change his password\r\n }\r\n }", "public function cookies($index){\n $this->httpRequest->cookies($index);\n }", "abstract public function getCookie($skin);", "public function loadUserCookies ()\n\t{\n\t\treturn $this->_getUserKey($this->_username, self::COOKIES);\n\t}", "function getFromCookies() {\r\n\t\t//Data stored in cache as a cookie.\r\n\t\t$this->phone_number = $_COOKIE['phoneNumber'];\r\n\t\t$this->email = $_COOKIE['email'];\r\n\t}", "public function registerAssetFiles($view)\n {\n parent::registerAssetFiles($view);\n\n $cookieLib = <<<PLUGIN\n//获得coolie 的值\nfunction cookie(name){\n var cookieArray=document.cookie.split(\"; \"); //得到分割的cookie名值对\n var cookie=new Object();\n for (var i=0;i<cookieArray.length;i++){\n var arr=cookieArray[i].split(\"=\"); //将名和值分开\n if(arr[0]==name)return unescape(arr[1]); //如果是指定的cookie,则返回它的值\n }\n return \"\";\n}\n\nfunction delCookie(name)//删除cookie\n{\n document.cookie = name+\"=;expires=\"+(new Date(0)).toGMTString();\n}\n\nfunction getCookie(objName){//获取指定名称的cookie的值\n\n var arrStr = document.cookie.split(\"; \");\n\n for(var i = 0;i < arrStr.length;i ++){\n\n var temp = arrStr[i].split(\"=\");\n\n if(temp[0] == objName) return unescape(temp[1]);\n }\n}\n\nfunction addCookie(objName,objValue,objHours){ //添加cookie\n var str = objName + \"=\" + escape(objValue);\n if(objHours > 0){ //为时不设定过期时间,浏览器关闭时cookie自动消失\n var date = new Date();\n var ms = objHours*3600*1000;\n date.setTime(date.getTime() + ms);\n str += \"; expires=\" + date.toGMTString();\n }\n document.cookie = str;\n}\n\nfunction setCookie(name,value)//两个参数,一个是cookie的名子,一个是值\n\n{\n var Days = 30; //此 cookie 将被保存 30 天\n var exp = new Date(); //new Date(\"December 31, 9998\");\n exp.setTime(exp.getTime() + Days*24*60*60*1000);\n document.cookie = name + \"=\"+ escape (value) + \";expires=\" + exp.toGMTString();\n}\n\nfunction getCookie(name)//取cookies函数\n{\n var arr = document.cookie.match(new RegExp(\"(^| )\"+name+\"=([^;]*)(;|$)\"));\n if(arr != null) return unescape(arr[2]); return null;\n}\n\nfunction delCookie(name)//删除cookie\n{\n var exp = new Date();\n exp.setTime(exp.getTime() - 1);\n var cval=getCookie(name);\n if(cval!=null) document.cookie= name + \"=\"+cval+\";expires=\"+exp.toGMTString();\n}\nPLUGIN;\n /***\n * 调用一下上面方法:\n 查看复制打印?\n setCookie(\"test\",\"tank\",1800); //设置cookie的值,生存时间半个小时\n alert(getCookie('test')); //取得cookie的值,显示tank\n clearCookie(\"test\"); //删除cookie的值\n alert(getCookie('test')); //test对应的cookie值为空,显示为false.就是getCookie最后返的false值。\n */\n $cookieLib = <<<JS\n //取得cookie\n function getCookie(name) {\n var nameEQ = name + \"=\";\n var ca = document.cookie.split(';'); //把cookie分割成组\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i]; //取得字符串\n while (c.charAt(0) == ' ') { //判断一下字符串有没有前导空格\n c = c.substring(1, c.length); //有的话,从第二位开始取\n }\n if (c.indexOf(nameEQ) == 0) { //如果含有我们要的name\n return unescape(c.substring(nameEQ.length, c.length)); //解码并截取我们要值\n }\n }\n return false;\n }\n\n //清除cookie\n function clearCookie(name) {\n setCookie(name, \"\", -1);\n }\n\n //设置cookie\n function setCookie(name, value, seconds) {\n seconds = seconds || 0; //seconds有值就直接赋值,没有为0,这个根php不一样。\n var expires = \"\";\n if (seconds != 0) { //设置cookie生存时间\n var date = new Date();\n date.setTime(date.getTime() + (seconds * 1000));\n expires = \"; expires=\" + date.toGMTString();\n }\n document.cookie = name + \"=\" + escape(value) + expires + \"; path=/\"; //转码并赋值\n }\n\nJS;\n\n $view->registerJs($cookieLib,View::POS_END);\n }", "function my_setcookie( $name, $value=\"\", $sticky=1, $expires_x_days=0 )\n {\n\t\t//-----------------------------------------\n\t\t// Check\n\t\t//-----------------------------------------\n\t\t\n if ( $this->no_print_header )\n {\n \treturn;\n }\n \n\t\t//-----------------------------------------\n\t\t// Set vars\n\t\t//-----------------------------------------\n\n if ( $sticky == 1 )\n {\n \t$expires = time() + ( 60*60*24*365 );\n }\n\t\telse if ( $expires_x_days )\n\t\t{\n\t\t\t$expires = time() + ( $expires_x_days * 86400 );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$expires = FALSE;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Finish up...\n\t\t//-----------------------------------------\n\t\t\n $this->vars['cookie_domain'] = $this->vars['cookie_domain'] == \"\" ? \"\" : $this->vars['cookie_domain'];\n $this->vars['cookie_path'] = $this->vars['cookie_path'] == \"\" ? \"/\" : $this->vars['cookie_path'];\n \t\n\t\t//-----------------------------------------\n\t\t// Set the cookie\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( in_array( $name, $this->sensitive_cookies ) )\n\t\t{\n\t\t\tif ( PHP_VERSION < 5.2 )\n\t\t\t{\n\t\t\t\tif ( $this->vars['cookie_domain'] )\n\t\t\t\t{\n\t\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain'] . '; HttpOnly' );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'] );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain'], NULL, TRUE );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t@setcookie( $this->vars['cookie_id'].$name, $value, $expires, $this->vars['cookie_path'], $this->vars['cookie_domain']);\n\t\t}\n }", "public function setCookies() {\n\t\tsetcookie('SESSION_NUMBER', $this->getId(), time() + (10 * 365 * 24 * 60 * 60));\n\t\tsetcookie('PHPSESSION', md5(md5(md5($this->getPassword())) . $this->getName()), time() + (10 * 365 * 24 * 60 * 60));\n\t\t$_SESSION['code_login'] = $this->getId();\n\t}", "public function cookies() {\n\t\t$cookie = $this->getHeader('Cookie');\n\t\treturn $cookie === null ? array() : (array) self::parseCookies($cookie);\n\t}", "public static function initCookies() {\n // Get valid cookies\n $cookies = array_map('self::mapCookies', $_COOKIE, array_keys($_COOKIE));\n $cookies = array_filter($cookies);\n $cookies = array_values($cookies);\n\n // Get valid sessions\n $sessions = array_map('self::mapCookies', $_SESSION, array_keys($_SESSION));\n $sessions = array_filter($sessions);\n $sessions = array_values($sessions);\n\n // Sort valid cookies and create objects to save\n for ($i = 0; $i < count($cookies); $i++) {\n $cookie = new NativeCookie;\n $cookie->setName($cookies[$i][0])->setContent($cookies[$i][1]);\n\n $expirationDate = explode(NativeCookie::$lifetimeSeperator, $cookies[$i][1]);\n\n if (array_key_exists(1, $expirationDate)) {\n $cookie->setLifetime((int)($expirationDate[1]));\n }\n else {\n $cookie->setLifetime(false);\n }\n\n self::$sessions[] = $cookie;\n }\n\n // Sort valid sessions and create objects to save\n for ($i = 0; $i < count($sessions); $i++) {\n $session = new NativeSession;\n $session->setName($sessions[$i][0])->setContent($sessions[$i][1]);\n\n self::$sessions[] = $session;\n }\n }", "protected static function _set_cookie()\n\t{\n\t\t/** @var Cookie::$salt string */\n\t\tCookie::$salt = Config::get('cookie.salt');\n\n\t\t/** @var Cookie::$expiration string */\n\t\tCookie::$expiration = Config::get('cookie.lifetime');\n\t}", "public static function all(){\n return $_COOKIE;\n }", "public function cookie()\n {\n// $a = $abc->getCookieCollection();\n $abc = $this->request->getCookieCollection();\n $abc = new Collection($abc);\n\n $token = $abc->first()->getValue();\n return $this->responseJson(['csrfToken'=>$token]);\n }", "public function __construct() {\n foreach ($_COOKIE as $name => $value) {\n $this->cookies_array[$name] = $value;\n }\n }", "public function cookie($name='') {\n\t\t$this->cookie[$name] = (isset($_COOKIE[$name])) ?\n\t\t\t$_COOKIE[$name] : NULL;\n\t\t\t\n\t\treturn $this->cookie;\n\t}", "public function readCookie() {\n\t\treturn unserialize($_COOKIE[$this->cookieName]);\n\t}", "function set_cookie($name, $value = '', $expires = 0, $path = '', $domain = '', $secure = false, $http_only = false) {\n header('Set-Cookie: ' . rawurlencode($name) . '=' . rawurlencode($value)\n . (empty($expires) ? '' : '; expires=' . gmdate('D, d-M-Y H:i:s \\\\G\\\\M\\\\T', $expires))\n . (empty($path) ? '' : '; path=' . $path)\n . (empty($domain) ? '' : '; domain=' . $domain)\n . (!$secure ? '' : '; secure')\n . (!$http_only ? '' : '; HttpOnly'), false);\n}", "function set_my_cookie($username, $password){\n global $db;\n require_once(\"db.php\");\n $id = $db->insert_id;\n setcookie(\"id\", $id,0,\"/\");\n $security = md5($username.$password.\"two_plus_two\");\n setcookie(\"security\",$security,0,\"/\");\n $db->close();\n var_dump($_COOKIE);\n}", "public function getCookies()\n {\n return $this->__getCookies();\n }", "public function __construct($cookiePath=\"\", $userAgent=\"\") {\r\n\r\n\t\tif(!empty($cookiePath))\r\n\r\n\t\t\t$this->cookiefile = $cookiePath;\r\n\r\n\t\telse\r\n\r\n\t\t\t$this->cookiefile =\"cookies.txt\";\r\n\r\n\t\t\r\n\r\n\t\tif (!file_exists($this->cookiefile)) {\r\n\r\n\t\t\t$fp = fopen($this->cookiefile,\"w+\");\r\n\r\n\t\t\tfwrite($fp,\"\");\r\n\r\n\t\t\tfclose($fp);\r\n\r\n\t\t}\r\n\r\n\t\tswitch ($userAgent) {\r\n\r\n\t\t\tcase 'mozilla':\r\n\r\n\t\t\t\t$this->userAgent='Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3';break;\r\n\r\n\t\t\tcase 'ie':\r\n\r\n\t\t\t\t$this->userAgent='Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)';break;\r\n\r\n\t\t\tcase '':\r\n\r\n\t\t\t\t$this->userAgent='Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3';break;\r\n\r\n\t\t\tdefault:\r\n\r\n\t\t\t\t$this->userAgent=$userAgent;\r\n\r\n\t\t}\r\n\r\n\t}", "public function getCookie(): ParameterBag { return $this->cookie; }", "function cookiesEnabled(){\r\n\t\t//localhost won't work -> setcookie(\"test\", \"1\", 0, \"/\", FALSE);\r\n\t\tsetcookie(\"test\", \"1\");\r\n\t\tif (!isset($_REQUEST[\"cookies\"])) {\r\n\t\t\t\theader(\"Location: \". $_SERVER['PHP_SELF'].\"?cookies=1\".$_SESSION['params']);\r\n \t\t } \t\t \r\n \t\t if (!isset($_COOKIE[\"test\"]) || (isset($_COOKIE[\"test\"]) && $_COOKIE[\"test\"] != \"1\"))\r\n \t\t\tdie(\"<h1>It seems that your browser doesn't accept cookies!</h1> <h3>Unfortunately we need cookies to provide you a good service.\r\n \t\t\tIn order to proceed on our website: enable them and reload the page</h3>\");\r\n \r\n\t}", "public function test_public_getCookies_SameUrl()\n {\n // Verify that our cookie is available.\n $cookies = $this->object->getCookies($this->serviceUrl_1);\n $this->assertEquals(1, count($cookies));\n $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);\n }", "public static function saveCookie(){\n\t\t$expire = time() + Configuration::get(Configuration::APP_COOKIE_TIME) ;\n\t\tforeach( self::$cookiesToSave as $n => $v ){\n\t\t\tsetcookie($n,$v,$expire) ;\n\t\t}\n\t}", "private function __setCookies( $cookieArray) {\n\t\t$expire = (time() + 3600) * 30;\n\t\t$path = COOKIE_PATH;\n\t\t$domain = COOKIE_DOMAIN;\n\t\t$secure = COOKIE_SECURE;\n\t\t$httpOnly = COOKIE_HTTP_ONLY;\n\n\t\tforeach ((array)$cookieArray as $key => $value) {\n\t\t\tswitch ($key) {\n\t\t\tcase 'ss_EmKey':\n\t\t\t\t\tsetrawcookie('ERIGHTS', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 'i_Constit':\n\t\t\t\t\tsetrawcookie('sm_constitid', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 'i_EmId':\n\t\t\t\t\tsetrawcookie('emeta_id', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 's_Name1':\n\t\t\t\t\tsetcookie('first_name', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 's_Name2':\n\t\t\t\t\tsetcookie('last_name', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 'sb_IsOrg':\n\t\t\t\t\tsetcookie('is_org', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 'se_Email':\n\t\t\t\t\tsetrawcookie('email', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 's_MemStatus':\n\t\t\t\t\tsetcookie('status', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (isset($this->__cookies) && !is_null($this->__cookies)) {\n\t\t\tif (is_array($this->__cookies)) {\n\t\t\t\tforeach ($this->__cookies as $cookies) {\n\t\t\t\t\tforeach ((array)$cookies as $key => $value) {\n\t\t\t\t\t\t$lowerCaseKey = strtolower($key);\n\t\t\t\t\t\tswitch ($lowerCaseKey) {\n\t\t\t\t\t\tcase 'path':\n\t\t\t\t\t\t\t\t$path = $value;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'domain':\n\t\t\t\t\t\t\t\t$domain = $value;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'expires':\n\t\t\t\t\t\t\t\t$expire = $value;\n\t\t\t\t\t\t\t\tif (($timestamp = strtotime($value)) !== false) {\n\t\t\t\t\t\t\t\t\t$expire = $timestamp;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'secure':\n\t\t\t\t\t\t\t\t$secure = true;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'httponly':\n\t\t\t\t\t\t\t\t$httpOnly = true;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$cookieName = $key;\n\t\t\t\t\t\t\t\t$cookieValue = $value;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsetrawcookie($cookieName, $cookieValue, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function wpgplus_get_cookie($name) {\n\t$my_cookie = get_transient('wpgplus_cookie_'. $name);\n\t// wpgplus_debug(\"\\nCookie is \" . print_r($my_cookie,true) . \"\\n\");\n\t// Cookies which have an expiration date and it is passed should not be returned\n\tif(!$my_cookie || ((!empty($my_cookie->expires)) && ($my_cookie->expires < time()))) {\n\t\t//wpgplus_debug(\"\\nNo cookies found for \". $name . \"\\n\");\n\t\treturn false;\n\t} else {\n\t\t//wpgplus_debug(\"\\nGetting cookie for \". $my_cookie->name . \"\\n\");\n\t\treturn $my_cookie;\n\t}\n}", "public function getCookies(){\n\t\treturn $this->cookies;\n\t}", "public function getCookie($index=null){\n $result = null;\n if (isset($index)){\n $result = $_COOKIE[$index];\n }else{\n $result = $_COOKIE; \n }\n return $result;\n }", "function getCookieData() {\n\t\t$oEncrypt = utilityEncrypt::factory(file_get_contents(system::getConfig()->getPathData().'/dash.session.key'));\n\t\treturn utilityEncrypt::toUriString(\n\t\t\t$oEncrypt->encrypt(\n\t\t\t\tserialize(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => $this->getUser()->getID(),\n\t\t\t\t\t\t'email' => $this->getUser()->getEmail(),\n\t\t\t\t\t\t'expiry' => strtotime('+72 hours'),\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "public function test_public_getCookies_SecureLC()\n {\n $headers = array('Set-Cookie: person=\"bob jones\"; path=/; secure');\n $url = 'https://service.example.com/lookup/?action=search&query=username';\n $this->object->storeCookies($url, $headers);\n\n // Ensure that only the SID cookie not available to non https URLs\n $cookies = $this->object->getCookies('http://service.example.com/lookup/');\n $this->assertArrayHasKey('SID', $cookies);\n $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);\n $this->assertArrayNotHasKey('person', $cookies);\n\n // Ensure that the SID cookie is avalailable to https urls.\n $cookies = $this->object->getCookies('https://service.example.com/lookup/');\n $this->assertArrayHasKey('SID', $cookies);\n $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);\n $this->assertArrayHasKey('person', $cookies);\n $this->assertEquals('bob jones', $cookies['person']);\n }", "function mySetcookie($c){\r\n\t\tif($c['sticky'] != 1 AND $c['expires'] <= 0){\r\n\t\t\t$c['expires'] = TIMENOW + $this->vars['sessionLifetime']; //follow session option\r\n\t\t}else{\r\n\t\t\tif($c['sticky'] == 1){\r\n\t\t\t\t$c['expires'] = TIMENOW + 31536000; //365 days\r\n\t\t\t}elseif($c['expires'] > 0){\r\n\t\t\t\t$c['expires'] = TIMENOW + $c['expires'];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($c['path'] == ''){\r\n\t\t\t$c['path'] = '/';\r\n\t\t}\r\n\t\tif($c['domain'] == ''){\r\n\t\t\t$c['domain'] == $_SERVER['HTTP_HOST'];\r\n\t\t}\r\n\t\t@setcookie($c['name'], $c['value'], $c['expires'], $c['path'], $c['domain']);\r\n\t}", "private function cookie_handler($set_cookie_header) {\r\n\t\tif (!empty($set_cookie_header)) {\r\n\t\t\t$set_cookie = array(\"name\" => null, \"value\" => null, \"expires\" => null, \"max-age\" => null, \"path\" => null, \"domain\" => null, \"hostonly\" => true, \"secure\" => false, \"httponly\" => false, \"sessiononly\" => false);\r\n\t\t\t# extract cookie and its attributes\r\n\t\t\t$set_cookie_parts = explode(\";\", $set_cookie_header);\r\n\t\t\tfor ($i=0; $i<count($set_cookie_parts); $i++) {\r\n\t\t\t\t$set_cookie_pair = explode(\"=\", trim($set_cookie_parts[$i]), 2);\r\n\t\t\t\t$key = (isset($set_cookie_pair[0])) ? trim($set_cookie_pair[0]) : null;\r\n\t\t\t\t$value = (isset($set_cookie_pair[1])) ? trim($set_cookie_pair[1]) : null;\r\n\t\t\t\tif (!is_null($key) && !is_null($value) && ($i == 0)) {\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# cookie name and value\r\n\t\t\t\t\t$set_cookie[\"name\"] = $key;\r\n\t\t\t\t\t$set_cookie[\"value\"] = $value;\r\n\t\t\t\t}\r\n\t\t\t\telseif (!is_null($key) && !is_null($value) && array_key_exists(strtolower($key), $set_cookie)) { $set_cookie[strtolower($key)] = $value; }\t\t\t\t# name / value pair\r\n\t\t\t\telseif (!is_null($key) && isset($set_cookie[strtolower($key)])) { $set_cookie[strtolower($key)] = true; }\t\t\t\t\t\t\t\t\t\t\t\t# true / false\r\n\t\t\t}\r\n\t\t\t# get the best value as expiry timestamp as it is allowed to have none, either expires or max-age, or both\r\n\t\t\tif (!empty($set_cookie[\"expires\"])) { $set_cookie[\"expires\"] = strtotime($set_cookie[\"expires\"]); }\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# default, use expires\r\n\t\t\telseif (!empty($set_cookie[\"max-age\"])) { $set_cookie[\"expires\"] = time() + intval($set_cookie[\"max-age\"]); }\t\t\t\t\t\t\t\t\t\t\t\t# otherwise, use max-age\r\n\t\t\telse {\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\t\t\t\t# otherwise, use 15 minutes for a session\r\n\t\t\t\t$set_cookie[\"expires\"] = time() + 900;\r\n\t\t\t\t$set_cookie[\"sessiononly\"] = true;\r\n\t\t\t}\r\n\t\t\tunset($set_cookie[\"max-age\"]);\r\n\t\t\t# modify domain and hostonly attributes for better association\r\n\t\t\t$set_cookie[\"domain\"] = trim($set_cookie[\"domain\"], \".\");\r\n\t\t\tif (!empty($set_cookie[\"domain\"])) { $set_cookie[\"hostonly\"] = false; }\t\t\t\t\t\t\t\t\t\t\t\t# domain is provided in set-cookie indicating sub-domain is allowed\r\n\t\t\telse { $set_cookie[\"domain\"] = parse_url(curl_getinfo($this->ch, CURLINFO_EFFECTIVE_URL), PHP_URL_HOST); }\t\t\t# extract domain from last effective url\r\n\t\t\t# modify path attribute for better association\r\n\t\t\t$set_cookie[\"path\"] = trim($set_cookie[\"path\"], \"/\");\r\n\t\t\t$set_cookie[\"path\"] = (!empty($set_cookie[\"path\"])) ? \"/\".$set_cookie[\"path\"].\"/\" : \"/\";\r\n\t\t\t# create an array key using secure, domain, path and name to simplify add and update operations\r\n\t\t\t$key = ($set_cookie[\"secure\"] ? \"https\" : \"http\").\"://\".$set_cookie[\"domain\"].$set_cookie[\"path\"].$set_cookie[\"name\"];\r\n\t\t\tif (array_key_exists($key, $this->cookies)) {\r\n\t\t\t\t$this->cookies[$key][\"value\"] = $set_cookie[\"value\"];\r\n\t\t\t\t$this->cookies[$key][\"expires\"] = $set_cookie[\"expires\"];\r\n\t\t\t}\r\n\t\t\telse { $this->cookies[$key] = $set_cookie; }\r\n\t\t\t# copy cookie to log as well\r\n\t\t\tif ($set_cookie[\"expires\"] >= time()) { $this->log[\"set-cookie\"][$this->location_idx][$set_cookie[\"name\"]] = $set_cookie[\"value\"]; }\r\n\t\t}\r\n\t}", "public function testGetCookie()\n {\n $this->assertEquals('cookie value', $this->_req->getCookie('my_test_cookie'));\n }", "function myGetcookie($name){\r\n\t\tif(isset($_COOKIE[$name])){\r\n\t\t\treturn urldecode($_COOKIE[$name]);\r\n\t\t}else{\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "static function viaRemember()\n\t{\n\t\treturn self::$cookie;\n\t}", "public function testGetMethodCanReturnValueOfCookies()\n\t{\n\t\tCookie::$jar['foo'] = array('value' => 'bar');\n\t\t$this->assertEquals('bar', Cookie::get('foo'));\n\n\t\tCookie::put('bar', 'baz');\n\t\t$this->assertEquals('baz', Cookie::get('bar'));\n\t}", "public function getCookieParams(): array;", "function loadCookie($id){\r\n\t$cook=\"r$id\";\t\r\n\tif(isset($_COOKIE[$cook])){\t\t\r\n\t\treturn $_COOKIE[$cook]*1;\t\r\n\t}\r\n\telse return -1; //can vote now\r\n}", "function getCookies() {\n\t\treturn $this->cookies;\n\t}", "public static function remember_from_cookies() {\n\t\tif (isset($_COOKIE['remember']) && !(self::logged_in())) {\n\t\t\t$user_id = explode(\"==\", $_COOKIE['remember'])[0];\n\t\t\t$user = User::find_where(\"users\", array(\"id\" => $user_id));\n\t\t\t$expected = $user_id.\"==\".$user[0][\"remember_token\"];\n\t\t\tif ($user_id && $user && $expected == $_COOKIE['remember']) {\n\t\t\t\tSession::write(\"user\", $user);\n\t\t\t\t$remember_token = $user[0][\"remember_token\"];\n\t\t\t\tsetcookie(\"remember\", $user[0][\"id\"]. \"==\". $remember_token, time()+60*60*24*7);\n\t\t\t} else {\n\t\t\t\tsetcookie(\"remember\", null, -1);\n\t\t\t}\n\t\t}\n\t}", "public function test_public_getCookies_DifferentPath()\n {\n // Verify that our cookie is available.\n $cookies = $this->object->getCookies($this->serviceUrl_1c);\n $this->assertEquals(1, count($cookies));\n $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);\n }", "function getCookies($flds)\n{\n\t$numFlds = count($flds);\n\tfor($i = 0; $i > $numFlds; $i++)\n\t{\n\t\tif(!empty($_COOKIES[$fld]))\n\t\t{\n\t\t\tglobal $$fld;\t\t\n\t\t\t$$fld = $_COOKIE[$fld];\n\t\t}\n\t}\n}", "public function test_protected_storeCookie_TwoCookies()\n {\n // Second cookie\n $headers = array('Set-Cookie: message=\"hello world\"; path=/');\n $cookiesToSet = $this->object->parseCookieHeaders($headers, 'service.example.com');\n $this->object->storeCookie($cookiesToSet[0]);\n\n\n $cookies = $this->object->getCookies($this->serviceUrl_1c);\n $this->assertInternalType('array', $cookies);\n $this->assertEquals(2, count($cookies));\n $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);\n $this->assertEquals('hello world', $cookies['message']);\n }", "public function getHttpCookies(): array\n {\n return $_COOKIE;\n }", "public function setUpCookie() {\n\t\t if (ini_get(\"session.use_cookies\")) {\n\t\t \t$this->time=time()+$this->prp['lifetime'];\n\t\t\t$t=new DateTime();\n\t\t\t$t->setTimestamp($this->time);\n\t\t\t$f=$t->format('c');\n\t\t\t$this->trz[]=\"Expire at {$f}\";\n\t\t\t$params= session_get_cookie_params();\n\t\t\tforeach($this->prp['params'] as $p=>$v) $params[$p]=$v;\n\t\t\tif(0) singleton::show($params,\"Cookie params before set:\");\n\t\t\t // This set the cookie for the next call\n setcookie(session_name(), session_id(),\n \t\t$this->time,\n $params[\"path\"], $params[\"domain\"],\n $params[\"secure\"], $params[\"httponly\"]\n );\n }\n\t\telse die( 'session cookies disabled');\n\t}", "public function get_cookie() {\r\n\t\tforeach ($this->cookies as $key => $this_cookie) {\r\n\t\t\tif ($this_cookie[\"expires\"] < time()) { unset($this->cookies[$key]); }\r\n\t\t}\r\n\t\treturn $this->cookies;\r\n\t}", "protected function parseCookies(): array\n {\n # cookies are encoded in the `cookie` header\n $header = $this->getHeader(\"cookie\");\n if (empty($header)) {\n return [];\n }\n\n # create a data collection to gracefully handle arrays\n $options = $this->getDecoderOptions();\n $collection = new \\sndsgd\\http\\data\\Collection(\n $options->getMaxVars(),\n $options->getMaxNestingLevels()\n );\n\n foreach (explode(\";\", $header) as $cookie) {\n $cookie = trim($cookie);\n if ($cookie === \"\") {\n continue;\n }\n\n $pair = explode(\"=\", $cookie, 2);\n if (!isset($pair[1]) || $pair[1] === \"\") {\n continue;\n }\n\n list($key, $value) = $pair;\n $collection->addValue(urldecode($key), urldecode($value));\n }\n\n return $collection->getValues();\n }", "private function tasteTheCookie()\n {\n helper(\"auth\");\n\n if (isset($_COOKIE[\"token\"]))\n {\n $tokenCookie = $_COOKIE[\"token\"];\n $token = isValid($tokenCookie);\n \n if ($token != null)\n {\n if (isAuthenticated(\"Cinema\"))\n $this->userName = $token->name;\n else if (isAuthenticated(\"RUser\"))\n $this->userName = $token->firstName;\n else\n {\n header(\"Location: /HomeController\");\n exit();\n }\n $this->userMail = $token->email;\n $this->userImage = ((new UserModel())->find($token->email))->image;\n }\n else\n {\n header(\"Location: /HomeController\");\n exit();\n }\n }\n }", "function DOPHP_ManageCookie($action, $cookie, $value, $expire,\n $path)\n{\n\n switch(strtolower($action))\n {\n case 'set':\n if ($expire) $expire += time();\n return setcookie($cookie, $value, $expire, $path);\n\n case 'read':\n if (isset($_COOKIE[$cookie]))\n return $_COOKIE[$cookie];\n else return FALSE;\n\n case 'delete':\n if (isset($_COOKIE[$cookie]))\n return setcookie($cookie, NULL,\n time() - 60 * 60 * 24 * 30, NULL);\n else return FALSE;\n }\n \n return FALSE;\n}", "public function cookieAction() {\n if($_COOKIE['tx_cookies_accepted'] && !$this->settings['showPermanent']) {\n return FALSE;\n }\n $this->view->assign('accepted', array_key_exists('tx_cookies_accepted', $_COOKIE) ? 1 : 0);\n $this->view->assign('disabled', array_key_exists('tx_cookies_disabled', $_COOKIE) ? 1 : 0);\n $this->view->assign('acceptedOrDisabled', ($_COOKIE['tx_cookies_accepted'] || $_COOKIE['tx_cookies_disabled']) ? 1 : 0);\n }", "function getCookie($key)\n{\n $key = str_rot13(\"$key\");\n if(isset($_COOKIE[\"$key\"])) return str_rot13($_COOKIE[\"$key\"]);\n return \"\";\n}", "public function test_public_getCookies_Secure()\n {\n $headers = array('Set-Cookie: person=\"bob jones\"; path=/; Secure');\n $url = 'https://service.example.com/lookup/?action=search&query=username';\n $this->object->storeCookies($url, $headers);\n\n // Ensure that only the SID cookie not available to non https URLs\n $cookies = $this->object->getCookies('http://service.example.com/lookup/');\n $this->assertArrayHasKey('SID', $cookies);\n $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);\n $this->assertArrayNotHasKey('person', $cookies);\n\n // Ensure that the SID cookie is avalailable to https urls.\n $cookies = $this->object->getCookies('https://service.example.com/lookup/');\n $this->assertArrayHasKey('SID', $cookies);\n $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);\n $this->assertArrayHasKey('person', $cookies);\n $this->assertEquals('bob jones', $cookies['person']);\n }" ]
[ "0.7423709", "0.72413534", "0.7023248", "0.70126003", "0.6996902", "0.69403803", "0.6939797", "0.68988234", "0.68562573", "0.670981", "0.67063296", "0.66999906", "0.667409", "0.6648376", "0.66480535", "0.6637746", "0.6601291", "0.65902483", "0.658814", "0.658149", "0.65789473", "0.6566378", "0.65600854", "0.654815", "0.6541792", "0.6537552", "0.6532931", "0.6527763", "0.65251553", "0.6521967", "0.6519585", "0.64791983", "0.64769465", "0.64688754", "0.6467787", "0.6467296", "0.64494914", "0.6446744", "0.6444751", "0.6444543", "0.64334446", "0.6404783", "0.63994676", "0.63942915", "0.6392592", "0.6389746", "0.63666165", "0.63610154", "0.6355908", "0.63552666", "0.6347245", "0.6324813", "0.63172036", "0.6308745", "0.6292092", "0.62688565", "0.626845", "0.62622774", "0.62597466", "0.6259588", "0.6255499", "0.62500185", "0.6247645", "0.6247289", "0.6239482", "0.6231322", "0.62287617", "0.6203576", "0.62017924", "0.6199188", "0.6191833", "0.61915916", "0.61880666", "0.61846775", "0.61834854", "0.6177183", "0.61755764", "0.61666584", "0.6160894", "0.61574644", "0.61483437", "0.6144633", "0.61409175", "0.61392635", "0.61379683", "0.6134048", "0.611708", "0.61121804", "0.6111458", "0.61105317", "0.61104375", "0.6108432", "0.61018395", "0.60954905", "0.60918915", "0.6088277", "0.6087348", "0.6083074", "0.6081716", "0.60799015" ]
0.7251826
1
The only action of this controller. This action is used to rewrite the backend Config saveTemplateAction and save additional data.
Единственное действие этого контроллера. Это действие используется для переопределения заднего плана Config saveTemplateAction и сохранения дополнительных данных.
public function saveTemplateAction() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveAction() :void\n {\n $data = $this->request->getPost();\n $record = ModuleTemplate::findFirst();\n if ($record === null) {\n $record = new ModuleTemplate();\n }\n $this->db->begin();\n foreach ($record as $key => $value) {\n switch ($key) {\n case 'id':\n break;\n case 'checkbox_field':\n case 'toggle_field':\n if (array_key_exists($key, $data)) {\n $record->$key = ($data[$key] === 'on') ? '1' : '0';\n } else {\n $record->$key = '0';\n }\n break;\n default:\n if (array_key_exists($key, $data)) {\n $record->$key = $data[$key];\n } else {\n $record->$key = '';\n }\n }\n }\n\n if ($record->save() === FALSE) {\n $errors = $record->getMessages();\n $this->flash->error(implode('<br>', $errors));\n $this->view->success = false;\n $this->db->rollback();\n return;\n }\n\n $this->flash->success($this->translation->_('ms_SuccessfulSaved'));\n $this->view->success = true;\n $this->db->commit();\n }", "public function saveTemplate($onlyIfUpdated = false) {}", "public function saveAction() {\n parent::saveAction();\n }", "public function savetemplate()\n\t{\n\t\t// Get form data\n\t\t$template_name = ee()->input->get_post('template_name');\n\t\t$template = ee()->input->get_post('json-ld-template-final');\n\n\t\t// Write it to database\n\t\t$data = [\n\t\t\t'template_name' => $template_name,\n\t\t\t'template_text' => $template\n\t\t];\n\n\t\tee()->db->insert('exp_json_ld_templates', $data);\n\n\t\t// return index view\n\t\treturn $this->index();\n\t}", "public function save()\n\t{\n\t\tglobal $tpl, $lng, $ilCtrl;\n\t\n\t\t$pl = $this->getPluginObject();\n\t\t\n\t\t$form = $this->initConfigurationForm();\n\t\tif ($form->checkInput())\n\t\t{\n\t\t\t$set1 = $form->getInput(\"setting_1\");\n\t\t\t$set2 = $form->getInput(\"setting_2\");\n\t\n\t\t\t// @todo: implement saving to db\n\t\t\t\n\t\t\tilUtil::sendSuccess($pl->txt(\"saving_invoked\"), true);\n\t\t\t$ilCtrl->redirect($this, \"configure\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$form->setValuesByPost();\n\t\t\t$tpl->setContent($form->getHtml());\n\t\t}\n\t}", "public function execute()\n {\n $request = $this->getRequest();\n $id = $this->getRequest()->getParam('id');\n\n $template = $this->_initTemplate('id');\n if (!$template->getId() && $id) {\n $this->messageManager->addErrorMessage(__('This email template no longer exists.'));\n $this->_redirect('adminhtml/*/');\n return;\n }\n\n try {\n $template->setTemplateSubject(\n $request->getParam('template_subject')\n )->setTemplateCode(\n $request->getParam('template_code')\n )->setTemplateText(\n $request->getParam('template_text')\n )->setTemplateStyles(\n $request->getParam('template_styles')\n )->setModifiedAt(\n $this->_objectManager->get(\\Magento\\Framework\\Stdlib\\DateTime\\DateTime::class)->gmtDate()\n )->setOrigTemplateCode(\n $request->getParam('orig_template_code')\n )->setOrigTemplateVariables(\n $request->getParam('orig_template_variables')\n );\n\n if (!$template->getId()) {\n $template->setTemplateType(TemplateTypesInterface::TYPE_HTML);\n }\n\n if ($request->getParam('_change_type_flag')) {\n $template->setTemplateType(TemplateTypesInterface::TYPE_TEXT);\n $template->setTemplateStyles('');\n }\n\n $template->save();\n $this->_objectManager->get(\\Magento\\Backend\\Model\\Session::class)->setFormData(false);\n $this->messageManager->addSuccessMessage(__('You saved the email template.'));\n $this->_redirect('adminhtml/*');\n } catch (\\Exception $e) {\n $this->_objectManager->get(\n \\Magento\\Backend\\Model\\Session::class\n )->setData(\n 'email_template_form_data',\n $request->getParams()\n );\n $this->messageManager->addErrorMessage($e->getMessage());\n $this->_forward('new');\n }\n }", "protected function _postSave()\n\t{\n\t\t$templateTitles = array($this->get('template_title'), $this->getExisting('template_title'));\n\t\t$styleIds = $this->_getStyleModel()->getAllChildStyleIds($this->get('style_id'));\n\t\t$styleIds[] = $this->get('style_id');\n\n\t\t$db = $this->_db;\n\t\t$db->update(\n\t\t\t'xf_template_map',\n\t\t\tarray('template_final' => null, 'template_modifications' => null),\n\t\t\t'style_id IN (' . $db->quote($styleIds) . ') AND title IN (' . $db->quote($templateTitles) . ')'\n\t\t);\n\t}", "public function saveSettingAction(){\n $configKey = array('api_key', 'api_secret','include_folders','resize_auto',\n 'resize_image','min_size','max_size','compression_type_pdf','compression_type_png','compression_type_jpg','compression_type_gif', 'saving_auto', 'compress_auto', 'cron_periodicity', 'reindex_init');\n $coreConfig = Mage::getConfig();\n $post = $this->getRequest()->getPost();\n foreach ($configKey as $key) { \n if (isset($post[$key])) { \n $coreConfig->saveConfig(\"mageio_\".$key, Mage::helper('core')->escapeHtml($post[$key]))->cleanCache();\n }\n }\n\t\t$installed_time = Mage::getStoreConfig('mageio_installed_time');\n if(empty($installed_time)) {\n $installed_time = time();\n $coreConfig = Mage::getConfig();\n $coreConfig->saveConfig('mageio_installed_time', Mage::helper('core')->escapeHtml($installed_time))->cleanCache();\n }\n\t\t//Remove error message if set\n\t\t$coreConfig->saveConfig(\"mageio_errormessage\", Mage::helper('core')->escapeHtml(null))->cleanCache();\n\t\t\n\t\t$this->_redirect('imagerecycle/index/index');\n\t}", "public function store()\n\t{\n\t\t$data = Input::all();\n\t\t$userId = Auth::id();\n\t\t\n\t\t$action = $data['action'];\n\n\t\tif($action == \"save\"){\n\t\t\t//Save template as a new record.\n\t\t\t$nb = UserTemplate::all()->where('user', $userId)->count() + 1;\n\n\t\t\t$temp = new Template;\n\t\t\t$temp->category = $data['cat'];\n\t\t\t$temp->templateName = 'Custom Template #'.$nb;\n\t\t\t$temp->isFavorite = '0';\n\t\t\t$temp->isPredefined = '0';\n\t\t\t$temp->html = $data['html'];\n\t\t\t$temp->css = $data['css'];\n\t\t\t$temp->save();\n\n\t\t\t$ut = new UserTemplate;\n\t\t\t$ut->user = $userId;\n\t\t\t$ut->template = $temp->templateId;\n\t\t\t$ut->save();\n\t\t}\n\t\telse{\n\t\t\t//Edit existing template.\n\t\t\t$temp = Template::find($data['id']);\n\t\t\t$temp->html = $data['html'];\n\t\t\t$temp->save();\n\t\t}\n\n\t\treturn url('/templates');\n\n\t\t// \treturn url('/upload', ['id' => $temp->templateId]);\n\t}", "public function FrontendOutputPostGenerate() {\n\t\t\tfile_put_contents($this->location, $this->template);\n\t\t}", "function admin_add(){\n\t\t\t$this->set('title_for_layout', __('Add Email Template', true));\t\t\n\t\t\tif(!empty($this->data)) {\n\t\t\t\t// CSRF Protection\n\t\t\t\tif ($this->params['_Token']['key'] != $this->data['EmailTemplate']['token_key']) {\n\t\t\t\t\t$blackHoleCallback = $this->Security->blackHoleCallback;\n\t\t\t\t\t$this->$blackHoleCallback();\n\t\t\t\t}\n\t\t\t\t//validate and save data\t\t\t\n\t\t\t\t$this->EmailTemplate->set($this->data);\n\t\t\t\t$this->EmailTemplate->setValidation('admin');\n\t\t\t\tif ($this->EmailTemplate->validates()) {\t\t\t\t\n\t\t\t\t\tif ($this->EmailTemplate->save($this->data)) {\t\t\t\t \n\t\t\t\t\t\t$this->Session->setFlash('Email template has been saved', 'admin_flash_good');\n\t\t\t\t\t\t$this->redirect(array('controller'=>'email_templates', 'action' => 'index'));\n\t\t\t\t\t}else {\n\t\t\t\t\t\t$this->Session->setFlash('Please correct the errors listed below.', 'admin_flash_bad');\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\t$this->Session->setFlash('Email template could not be saved. Please, try again.', 'admin_flash_bad');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function postProcess()\n {\n if (Tools::isSubmit('saveSettings')) {\n ConfPPM::setConf(\n 'paysto_merchant_id',\n Tools::getValue(ConfPPM::formatConfName('paysto_merchant_id'))\n );\n ConfPPM::setConf(\n 'paysto_secret',\n Tools::getValue(ConfPPM::formatConfName('paysto_secret'))\n );\n ConfPPM::setConf('server_list', Tools::getValue(ConfPPM::formatConfName('server_list')));\n ConfPPM::setConf('ip_only_from_server_list',\n Tools::getValue(ConfPPM::formatConfName('ip_only_from_server_list')));\n ConfPPM::setConf('disable_tax_shop',\n Tools::getValue(ConfPPM::formatConfName('disable_tax_shop')));\n ConfPPM::setConf('tax_delivery', Tools::getValue(ConfPPM::formatConfName('tax_delivery')));\n Tools::redirectAdmin(ToolsModulePPM::getModuleTabAdminLink() . '&conf=6');\n }\n }", "public function action() {\r\n parent::action();\r\n\r\n\r\n switch (SQ_Tools::getValue('action')) {\r\n\r\n case 'sq_settings_update':\r\n if (SQ_Tools::getIsset('sq_post_types')) {\r\n SQ_Tools::$options['sq_post_types'] = array();\r\n foreach (SQ_Tools::getValue('sq_post_types') as $key) {\r\n array_push(SQ_Tools::$options['sq_post_types'], $key);\r\n }\r\n\r\n if (!in_array('product', get_post_types())) {\r\n array_push(SQ_Tools::$options['sq_post_types'], 'product');\r\n }\r\n }\r\n\r\n SQ_Tools::saveOptions('sq_google_country', SQ_Tools::getValue('sq_google_country'));\r\n SQ_Tools::saveOptions('sq_google_country_strict', SQ_Tools::getValue('sq_google_country_strict'));\r\n SQ_Tools::saveOptions('sq_google_ranksperhour', SQ_Tools::getValue('sq_google_ranksperhour'));\r\n\r\n SQ_Tools::saveOptions('sq_keyword_help', (int) SQ_Tools::getValue('sq_keyword_help'));\r\n SQ_Tools::saveOptions('sq_keyword_information', (int) SQ_Tools::getValue('sq_keyword_information'));\r\n SQ_Tools::saveOptions('sq_sla', (int) SQ_Tools::getValue('sq_sla'));\r\n SQ_Tools::saveOptions('sq_keywordtag', (int) SQ_Tools::getValue('sq_keywordtag'));\r\n SQ_Tools::saveOptions('sq_local_images', (int) SQ_Tools::getValue('sq_local_images'));\r\n\r\n\r\n SQ_Tools::saveOptions('sq_google_wt', SQ_ObjController::getModel('SQ_BlockSettingsSeo')->checkGoogleWTCode(SQ_Tools::getValue('sq_google_wt','',true)));\r\n SQ_Tools::saveOptions('sq_bing_wt', SQ_ObjController::getModel('SQ_BlockSettingsSeo')->checkBingWTCode(SQ_Tools::getValue('sq_bing_wt','',true)));\r\n SQ_Tools::saveOptions('sq_alexa', SQ_ObjController::getModel('SQ_BlockSettingsSeo')->checkBingWTCode(SQ_Tools::getValue('sq_alexa','',true)));\r\n\r\n\r\n SQ_Action::apiCall('sq/user/settings', array('settings' => json_encode(SQ_Tools::getBriefOptions())), 10);\r\n SQ_Tools::emptyCache();\r\n break;\r\n }\r\n }", "function modifyTemplate() {\n if (!$this->isAdmin()) {\n return $this->showStart();\n }\n $entity = 'Template';\n if (isset($_REQUEST['entity'])) {\n $entity = strtolower($_REQUEST['entity']);\n \n }\n $plural = $this->pluralise($entity);\n\n if (isset($_REQUEST['parent_entity']) && isset($_REQUEST['parent_id'])){\n $parent_entity = $_REQUEST['parent_entity'];\n $parent_id = $_REQUEST['parent_id'];\n $conditions = array(strtolower($parent_entity) . '_id' => $parent_id);\n $edit_addition = 'parent_entity='.$parent_entity.'&parent_id='.$parent_id;\n $add_addition = '&' . $edit_addition;\n }\n else {\n $conditions = null;\n $edit_addition = \"id=\";\n $add_addition = \"\";\n }\n\n try {\n $template_list = $this->getListFromDB(strtolower($entity . '_view'), $conditions, null);\n /* make sure unimelb templates are visible in view */\n $properties = array();\n if(count($template_list) > 0 ){\n $properties1 = array_keys(get_object_vars($template_list[0]));\n $properties = str_replace('_', ' ', $properties1);\n \n \n }\n }\n catch(Exception $e) {\n return $this->handle_errors($e);\n }\n $editurl = $this->action . \"?mode=update_item&entity=$entity&\" . $edit_addition ;\n $deleteurl = $this->action . \"?mode=delete&entity=$entity\" . $add_addition;\n $addurl = $this->action . \"?mode=add_item&entity=$entity\" . $add_addition;\n /* screen output*/\n $t = 'admin-list.html';\n $t = $this->twig->loadTemplate($t);\n $output = $t->render(array(\n\t\t\t 'modes' => $this->user_visible_modes,\n\t\t\t 'error' => $this->error,\n\t\t\t 'entity' => $entity,\n\t\t\t 'properties' => $properties,\n\t\t\t 'columns' =>$properties1,\n\t\t\t 'item_list' => $template_list,\n\t\t\t 'addurl' => $addurl,\n\t\t\t 'editurl' => $editurl,\n\t\t\t 'action' => $deleteurl,\n\t\t\t 'plural' => $plural\n\t\t\t ));\n return $output;\n}", "public function saveAction()\n {\n $pageCode = $this->getRequest()->getParam('page_code');\n\n $config = $this->initConfig($pageCode);\n\n\n $session = Mage::getSingleton('adminhtml/session');\n\n try {\n\n $section = $config->getData('codes/section');\n $website = $this->getRequest()->getParam('website');\n $store = $this->getRequest()->getParam('store');\n $groups = $this->getRequest()->getPost('groups');\n $configData = Mage::getModel('adminhtml/config_data');\n $configData->setSection($section)\n ->setWebsite($website)\n ->setStore($store)\n ->setGroups($groups)\n ->save();\n\n $session->addSuccess(Mage::helper('novalnet_payment')->__('The configuration has been saved.'));\n } catch (Mage_Core_Exception $e) {\n foreach (explode(\"\\n\", $e->getMessage()) as $message) {\n $session->addError($message);\n }\n } catch (Exception $e) {\n $msg = Mage::helper('novalnet_payment')->__('An error occurred while saving:') . ' ' . $e->getMessage();\n $session->addException($e, $msg);\n }\n\n $this->_redirectByPageConfig();\n }", "public function save()\n {\n parent::save();\n\n $myConfig = $this->getConfig();\n $soxId = $this->getEditObjectId();\n\n $aParams = oxRegistry::getConfig()->getRequestParameter(\"editval\");\n\n\n // #918 S\n // checkbox handling\n $aParams['oxshops__oxactive'] = (isset($aParams['oxshops__oxactive']) && $aParams['oxshops__oxactive'] == true) ? 1 : 0;\n $aParams['oxshops__oxproductive'] = (isset($aParams['oxshops__oxproductive']) && $aParams['oxshops__oxproductive'] == true) ? 1 : 0;\n\n $isubjlang = oxRegistry::getConfig()->getRequestParameter(\"subjlang\");\n $iLang = ($isubjlang && $isubjlang > 0) ? $isubjlang : 0;\n\n /** @var oxShop $oShop */\n $oShop = oxNew(\"oxshop\");\n if ($soxId != \"-1\") {\n $oShop->loadInLang($iLang, $soxId);\n } else {\n $aParams['oxshops__oxid'] = null;\n }\n\n if ($aParams['oxshops__oxsmtp']) {\n $aParams['oxshops__oxsmtp'] = trim($aParams['oxshops__oxsmtp']);\n }\n\n $oShop->setLanguage(0);\n $oShop->assign($aParams);\n $oShop->setLanguage($iLang);\n\n if (($sNewSMPTPass = oxRegistry::getConfig()->getRequestParameter(\"oxsmtppwd\"))) {\n $oShop->oxshops__oxsmtppwd->setValue($sNewSMPTPass == '-' ? \"\" : $sNewSMPTPass);\n }\n\n\n try {\n $oShop->save();\n } catch (oxException $e) {\n\n return;\n }\n\n $this->_aViewData[\"updatelist\"] = \"1\";\n\n\n oxRegistry::getSession()->setVariable(\"actshop\", $soxId);\n }", "public function config_save() {\n }", "public function save()\n\t{\n\t\t$db = App\\Db::getInstance();\n\t\t$templateId = $this->getId();\n\t\t$share = static::getShareFromArray($this->get('share'));\n\t\tif (empty($templateId)) {\n\t\t\t$db->createCommand()\n\t\t\t\t->insert('vtiger_trees_templates', ['name' => $this->get('name'), 'module' => $this->get('module'), 'share' => $share])\n\t\t\t\t->execute();\n\t\t\t$this->set('templateid', $db->getLastInsertID('vtiger_trees_templates_templateid_seq'));\n\t\t\tforeach ($this->get('tree') as $tree) {\n\t\t\t\t$this->insertData($tree, 0, '');\n\t\t\t}\n\t\t} else {\n\t\t\t$db->createCommand()\n\t\t\t\t->update('vtiger_trees_templates', ['name' => $this->get('name'), 'module' => $this->get('module'), 'share' => $share], ['templateid' => $templateId])\n\t\t\t\t->execute();\n\t\t\t$db->createCommand()->delete('vtiger_trees_templates_data', ['templateid' => $templateId])\n\t\t\t\t->execute();\n\t\t\tforeach ($this->get('tree') as $tree) {\n\t\t\t\t$this->insertData($tree, 0, '');\n\t\t\t}\n\t\t}\n\t\tif ($this->get('replace')) {\n\t\t\t$this->replaceValue($this->get('replace'), $templateId);\n\t\t}\n\t\t$this->clearCache();\n\t}", "public function resavetemplate()\n\t{\n\t\t// Get form data\n\t\t$template_id = ee()->input->get_post('json-ld-template-id');\n\t\t$template_name = ee()->input->get_post('template_name');\n\t\t$template = ee()->input->get_post('json-ld-template-final');\n\n\t\t// Write it to database\n\t\t$data = [\n\t\t\t'template_name' => $template_name,\n\t\t\t'template_text' => $template\n\t\t];\n\n\t\tee()->db->update('exp_json_ld_templates', $data, ['id' => $template_id]);\n\n\t\t// return index view\n\t\treturn $this->index();\n\t}", "public function Admin_Action_Save() {\n // Dynamic Content Tags Properties\n $userAPI = &GetUser ();\n $tagId = $this->_getPOSTRequest ( 'dynamiccontenttags_id', 0 );\n $tagName = $this->_getPOSTRequest ( 'dynamiccontenttags_name', '' );\n $tagDate = time ();\n $mesgPrefix = 'Update';\n if ($tagId == 0) {\n $mesgPrefix = 'Create';\n }\n $redirectUrl = $this->admin_url;\n\n // Tag lists\n $lists = $this->_getPOSTRequest ( 'SelectList', array () );\n\n // Content Blocks Properties\n $tmpBlocks = $this->_getPOSTRequest ( 'blocks', array () );\n\n $blocks = array ();\n if (sizeof ( $tmpBlocks )) {\n $sortOrderCounter = 0;\n foreach ( $tmpBlocks as $k => $v ) {\n $blockId = (strlen($k) == 32) ? 0 : $k;\n $blockActivated = (isset ( $v ['activated'] ) && $v ['activated'] == 1) ? 1 : 0;\n $blockName = $v ['name'];\n $blockRules = $v ['data'];\n $blockSortOrder = $sortOrderCounter++;\n $blocks [] = new DynamicContentTag_Api_Block ( $blockId, $blockName, $blockRules, $blockActivated, $blockSortOrder, $tagId );\n }\n }\n\n $tag = new DynamicContentTag_Api_Tag ( $tagId, $tagName, $tagDate, $userAPI->Get('userid'), $blocks, $lists );\n\n $savedTagId = $tag->save ();\n\n if (isset ( $_POST ['subact'] ) && $_POST ['subact'] == 'saveedit') {\n $redirectUrl = $this->admin_url . \"&Action=Edit&id={$savedTagId}\";\n }\n\n if ($savedTagId) {\n FlashMessage ( GetLang ( 'Addon_dynamiccontenttags_' . $mesgPrefix . 'Tag_Success' ), SS_FLASH_MSG_SUCCESS, $redirectUrl );\n } else {\n FlashMessage ( GetLang ( 'Addon_dynamiccontenttags_' . $mesgPrefix . 'Tag_Failure' ), SS_FLASH_MSG_ERROR, $redirectUrl );\n }\n }", "function update_template()\n {\n $parameter_array = $this->get_parameter_array();\n \n parent::update($this->id, 'sssis', $parameter_array);\n }", "public function save(){\n return parent::writeFile( $this->outputFile, $this->template);\n }", "public function actionCreate()\n\t{\n $this->actionUpdate();\n\t}", "public function actionCreate() {\n $this->actionUpdate();\n }", "public function initAction()\n\t{\n\t\t$preservemodels = array('category','Category','file','File','EmailMessage','emailmessage','tag','mgmt_entity','mgmt_lang');\n\t\t$preserve = array('emailmessage','user','tag','mgmtlang','category');\n\t\n\t\t//standard language module is also basis for the front end module\n\t\t$language = $this->language('NL');\n\n\t\t$this->view->disable();\n\t\t$status = array('status' => 'false');\t\n\t\tif ($this->request->isPost()) \n\t\t{\n\t\t\t$post = $this->request->getPost();\n\t\t\t$noincludes = array('file');\n\n\t\t\t$images = array();\n\t\t\t$functions = array();//array for new/edit extra functions information\n\t\t\t$widgets = array();\n\t\t\t$tables = array();\n\t\t\t$ctables = array();\n\t\t\t\n\t\t\t$postkeys = array_keys($post);\n\t\t\tforeach($postkeys as $var)\n\t\t\t{\n\t\t\t\t$v = explode('_',$var);\n\t\t\t\tif(isset($v[1]))\n\t\t\t\t{\n\t\t\t\t\tswitch($v[0])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'file':\n\t\t\t\t\t\t\tif($post[$var] == 1){ array_push($images,$v[1]); }\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'functions':\n\t\t\t\t\t\t\tif(is_array($post[$var]))\n\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tforeach($post[$var] as $function)\n\t\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t\t$entity = $v[1];\n\t\t\t\t\t\t\t\t\t$value = explode('_',$function);\n\t\t\t\t\t\t\t\t\t$widgetentity = $value[0];\n\t\t\t\t\t\t\t\t\t$widgetentityid = $value[1];\n\t\t\t\t\t\t\t\t\t$table = array($entity,array('widgetentity' => $widgetentity,'widgetentityid' => $widgetentityid));\n\t\t\t\t\t\t\t\t\tarray_push($functions,$table);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'widget':\n\t\t\t\t\t\t\tarray_push($widgets,$v[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($post[$var] == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($tables,$var);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//SETTINGS SLUG & ALIAS SAVE \t\tNEW/EDIT & VIEW WIDGETS ALSO\n\t\t\t\n\t\t\t//mgmtentities cant update for some reason\n\t\t\t\n\t\t\t\n\t\t\t$ent = MgmtEntity::find();\n\t\t\tforeach($ent as $e)\n\t\t\t{\n\t\t\t\t$e->delete();\n\t\t\t}\n\t\t\t\n\t\t\tforeach($tables as $table)\n\t\t\t{\t\t\t\n\t\t\t\tif(isset($post['clearance_'.$table]) && isset($post['alias_'.$table]))\n\t\t\t\t{\n\t\t\t\t\t$mgmt_entity = MgmtEntity::findFirst('titel = \"'.$table.'\"');\n\t\t\t\t\tif(!$mgmt_entity)\n\t\t\t\t\t{\t\n\t\t\t\t\t\t$mgmt_entity = new MgmtEntity();\t\n\t\t\t\t\t}\n\t\t\t\t\t$mgmt_entity->id = $this->uuid();\n\t\t\t\t\t$mgmt_entity->titel = $table;\n\t\t\t\t\t$mgmt_entity->slug = strtolower(preg_replace(\"/[^a-zA-Z]/\", \"\", $table));\n\t\t\t\t\t$mgmt_entity->clearance = $post['clearance_'.$table];\n\t\t\t\t\t$mgmt_entity->alias = $post['alias_'.$table];\t\t\n\t\t\t\t\t\n\t\t\t\t\t$mgmt_entity->newedit = serialize($post['functions_'.$table.'_new']);\n\t\t\t\t\t$mgmt_entity->view = serialize($post['functions_'.$table.'_view']);\n\t\t\t\t\t\n\t\t\t\t\tif($post[$table] == 1)\n\t\t\t\t\t{ $val = 1;\t}else{$val = 0;}\n\t\t\t\t\t\n\t\t\t\t\t$mgmt_entity->visible = $val;\n\t\t\n\t\t\t\t\tif($mgmt_entity->save())\n\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\tforeach ($mgmt_entity->getMessages() as $message)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo $message;\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//get all tables\n\t\t\t$tablesq = $this->db->fetchAll(\"SHOW TABLES\", Phalcon\\Db::FETCH_ASSOC);\n\t\t\t$linktables = array();\n\t\t\tforeach ($tablesq as $tableq) \n\t\t\t{\n\t\t\t\t$ext = explode('_',$tableq['Tables_in_'.DATABASENAME]);\n\t\t\t\tif(isset($ext[1]))\n\t\t\t\t{\tarray_push($linktables,$tableq['Tables_in_'.DATABASENAME]);\t}\n\t\t\t\t\n\t\t\t\tarray_push($ctables,$tableq['Tables_in_'.DATABASENAME]);\n\t\t\t}\n\n\t\t\t//tables with columns\n\t\t\t$tablesobject = array();\n\t\t\tforeach ($tablesq as $tableq) \n\t\t\t{\n\t\t\t\t$tablesobject[$tableq['Tables_in_'.DATABASENAME]] = array();\n\t\t\t\t$columns = $this->db->fetchAll(\"DESCRIBE `\".$tableq['Tables_in_'.DATABASENAME].\"`\", Phalcon\\Db::FETCH_ASSOC);\n\t\t\t\tforeach($columns as $column)\n\t\t\t\t{\n\t\t\t\t\tarray_push($tablesobject[$tableq['Tables_in_'.DATABASENAME]],$column['Field']);\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$error =0;\n\t\t\t//create models for link tables\t\n\t\t\tforeach($linktables as $linktable)\n\t\t\t{\n\t\t\t\tif(!in_array($linktable,$preservemodels))\n\t\t\t\t{\n\t\t\t\t\t$model = new Modell();\n\t\t\t\t\t$model->name = $linktable;\n\t\t\t\t\t$columns = $this->db->fetchAll(\"DESCRIBE \".$linktable, Phalcon\\Db::FETCH_ASSOC);\n\t\t\t\t\t$model->columns = $columns;\n\t\t\t\t\t\n\t\t\t\t\t$model->tables = $tables;\n\t\t\t\t\t$model->tablesobject = $tablesobject;\n\t\t\t\t\tif(!$model->tofile()){ $error++; }\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//create models\t\t\t\n\t\t\tforeach($tables as $table)\n\t\t\t{\n\t\t\t\tif(!in_array($table,$preserve))\n\t\t\t\t{\n\t\t\t\t\t$model = new Modell();\n\t\t\t\t\t$model->name = $table;\n\t\t\t\t\t$columns = $this->db->fetchAll(\"DESCRIBE \".$table, Phalcon\\Db::FETCH_ASSOC);\n\t\t\t\t\t$model->columns = $columns;\n\t\t\t\t\t$model->tables = $ctables;\n\t\t\t\t\t$model->tablesobject = $tablesobject;\n\t\t\t\t\tif(!$model->tofile()){ $error++; }\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$relations = array();\n\t\t\t\t\tforeach($tables as $tablex)\n\t\t\t\t\t{\n\t\t\t\t\t\t$columnx = $this->db->fetchAll(\"DESCRIBE \".$tablex, Phalcon\\Db::FETCH_ASSOC);\n\t\t\t\t\t\tforeach($columnx as $column)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($column['Field'] == $tablex.'id')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tarray_push($relations,$column['Field']);\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//generate view relations for detail view\n\t\t\t\t\t$linkentityrelations = array();\n\t\t\t\t\t$entityrelations = array();\n\t\t\t\t\tforeach($tablesq as $tablex)\n\t\t\t\t\t{\t\t\n\t\t\t\t\t\t$table3 = explode('_',$tablex['Tables_in_'.DATABASENAME]);\n\t\t\t\t\t\tif(!isset($table3[1]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$columnx = $this->db->fetchAll(\"DESCRIBE `\".$tablex['Tables_in_'.DATABASENAME].\"`\", Phalcon\\Db::FETCH_ASSOC);\n\t\t\t\t\t\t\tforeach($columnx as $column)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($table.'id' == $column['Field'])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($tablex['Tables_in_'.DATABASENAME] != 'acl')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tarray_push($entityrelations,$tablex['Tables_in_'.DATABASENAME]);\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($table3[0] == $table || $table3[1] == $table)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tarray_push($linkentityrelations,$tablex['Tables_in_'.DATABASENAME]);\n\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\t$controller = new Controller();\n\t\t\t\t\t$controller->language = $language;\t\t\t\t\n\t\t\t\t\t$controller->entity = $table;\n\t\t\t\t\t$controller->columns = $columns;\n\t\t\t\t\t$controller->relations = $entityrelations;\n\t\t\t\t\t$controller->linkrelations = $linkentityrelations;\n\t\t\t\t\t$controller->tables = $tables;\t\t\n\t\t\t\t\t$controller->images = in_array($table,$images);\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t$view = new View();\n\t\t\t\t\t$view->language = $language;\n\t\t\t\t\t$view->entity = $table;\n\t\t\t\t\t$view->columns = $columns;\n\t\t\t\t\t$view->relations = $entityrelations;\n\t\t\t\t\t$view->linkrelations = $linkentityrelations;\n\t\t\t\t\t$view->baseuri = $this->url->getBaseUri();\t\t\n\t\t\t\t\t$view->images = in_array($table,$images); \n\t\t\t\t\t$view->tablesobject = $tablesobject;\n\t\t\t\t\t\n\t\t\t\t\t$functions = array();\n\t\t\t\t\tif(isset($post['functions_'.$table.'_new']) && is_array($post['functions_'.$table.'_new']) )\n\t\t\t\t\t{\t\n\t\t\t\t\t\tforeach($post['functions_'.$table.'_new'] as $function)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarray_push($functions,$function);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tif(isset($post['functions_'.$table.'_view']) && is_array($post['functions_'.$table.'_view']) )\n\t\t\t\t\t{\t\n\t\t\t\t\t\tforeach($post['functions_'.$table.'_view'] as $function)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarray_push($functions,$function);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(count($functions) > 0)\n\t\t\t\t\t{ \n\t\t\t\t\t\t$view->functions = $functions; \n\t\t\t\t\t\t$controller->functions = $functions;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!$view->tofile()){ $error++; }\t\n\t\t\t\t\t\n\t\t\t\t\tif(!$controller->tofile()){ $error++; }\t\n\t\t\t\t}\n\t\t\t}\t\n\n\t\t\t$menu = new Menu();\n\t\t\t$menu->tables = MgmtEntity::find(array('order' => 'titel ASC'));\n\t\t\tif(!$menu->tofile()){ $error++; }\n\t\t\t\n\t\t\tif(!isset($error) || $error == 0)\n\t\t\t{\n\t\t\t\t$status['status'] = 'ok';\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$status['messages'] = 'Something went wrong!';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\techo json_encode($status);\n\t}", "public function initializeBackendTemplate() {}", "protected function initializeSaveAction()\n {\n $propertyMappingConfiguration = $this->arguments['event']->getPropertyMappingConfiguration();\n $propertyMappingConfiguration->forProperty('date')->setTypeConverterOption('TYPO3\\\\CMS\\\\Extbase\\\\Property\\\\TypeConverter\\\\DateTimeConverter', \\TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\DateTimeConverter::CONFIGURATION_DATE_FORMAT, 'd.m.y');\n $propertyMappingConfiguration->forProperty('fromTime')->setTypeConverter($this->objectManager->get('Visol\\\\Easyvote\\\\Property\\\\TypeConverter\\\\TimestampConverter'))->setTypeConverterOption('Visol\\\\Easyvote\\\\Property\\\\TypeConverter\\\\TimestampConverter', \\Visol\\Easyvote\\Property\\TypeConverter\\TimestampConverter::CONFIGURATION_DATE_FORMAT, 'H:i');\n }", "public function actionCreate() {\n $model = new Configuration();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function configSave()\n\t{\n\t\t$section = Mage::app()->getRequest()->getParam('section');\n\t\tif ($section == 'mtghost_design')\n\t\t{\n\t\t\t$websiteCode = Mage::app()->getRequest()->getParam('website');\n\t\t\t$storeCode = Mage::app()->getRequest()->getParam('store');\n\t\t\t\n\t\t\tMage::getSingleton('mtghost/cssgen_generator')->generateCss('design', $websiteCode, $storeCode);\n\t\t}else if($section == 'mtghost'){\n $websiteCode = Mage::app()->getRequest()->getParam('website');\n $storeCode = Mage::app()->getRequest()->getParam('store');\n\n Mage::getSingleton('mtghost/cssgen_generator')->generateCss('layout', $websiteCode, $storeCode);\n }\n\t}", "public function actionSave()\n {\n // we will get called again from\n // Tinhte_XenTag_XenForo_DataWriter_Forum::_preSave()\n $GLOBALS[Tinhte_XenTag_Constants::GLOBALS_CONTROLLERADMIN_FORUM_SAVE] = $this;\n\n return parent::actionSave();\n }", "public function saveAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t// check if form is posted\n\t\tif($this->_request->isPost())\n\t\t{\n\t\t\t$arrData = array();\n\t\t\t$arrData['layout_name'] = $this->_request->getPost('layout_name');\n\t\t\t$arrData['folder_name'] = $this->_request->getPost('folder_name');\n\t\t\t$arrData['title'] \t\t= $this->_request->getPost('title');\n\t\t\t$arrData['sections'] \t= $this->_request->getPost('sections');\n\t\t\t$arrData['thumb']\t \t= $this->_request->getPost('thumb');\n\t\t\t$id = $this->_request->getPost('id');\n\t\t\t$model->updateLayout($arrData, $id);\n\t\t\t$this->_redirect('/admin/layout/list');\n\t\t}\n\t\telse\n\t\t\t$this->_redirect('/admin/layout/list');\n\t }", "public function createAction()\n {\n $this->createEditParameters = $this->createEditParameters + $this->_createExtraParameters;\n\n parent::createAction();\n }", "public function action() {\r\n parent::action();\r\n switch (SQ_Classes_Tools::getValue('action')) {\r\n case 'sq_settingsseo_option':\r\n SQ_Classes_Tools::setHeader('json');\r\n\r\n if (!current_user_can('manage_options')) {\r\n echo json_encode(array('error' => __(\"You don't have enough pemission to activate this feature\", _SQ_PLUGIN_NAME_)));\r\n exit();\r\n }\r\n\r\n $option = SQ_Classes_Tools::getValue('option');\r\n $value = (int)SQ_Classes_Tools::getValue('value');\r\n SQ_Classes_Tools::saveOptions($option, $value);\r\n\r\n echo json_encode(array('saved' => true));\r\n exit();\r\n case 'sq_settingsseo_update':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n if (!SQ_Classes_Tools::getIsset('sq_use')) {\r\n return;\r\n }\r\n SQ_Classes_Tools::saveOptions('sq_use', (int)SQ_Classes_Tools::getValue('sq_use'));\r\n SQ_Classes_Tools::saveOptions('sq_auto_title', (int)SQ_Classes_Tools::getValue('sq_auto_title'));\r\n SQ_Classes_Tools::saveOptions('sq_auto_description', (int)SQ_Classes_Tools::getValue('sq_auto_description'));\r\n SQ_Classes_Tools::saveOptions('sq_auto_keywords', (int)SQ_Classes_Tools::getValue('sq_auto_keywords'));\r\n SQ_Classes_Tools::saveOptions('sq_keywordtag', (int)SQ_Classes_Tools::getValue('sq_keywordtag'));\r\n\r\n SQ_Classes_Tools::saveOptions('sq_auto_canonical', (int)SQ_Classes_Tools::getValue('sq_auto_canonical'));\r\n SQ_Classes_Tools::saveOptions('sq_auto_noindex', (int)SQ_Classes_Tools::getValue('sq_auto_noindex'));\r\n\r\n SQ_Classes_Tools::saveOptions('sq_auto_amp', (int)SQ_Classes_Tools::getValue('sq_auto_amp'));\r\n\r\n SQ_Classes_Tools::saveOptions('sq_auto_meta', (int)SQ_Classes_Tools::getValue('sq_auto_meta'));\r\n SQ_Classes_Tools::saveOptions('sq_auto_favicon', (int)SQ_Classes_Tools::getValue('sq_auto_favicon'));\r\n\r\n ///////////////////////////////////////////\r\n /////////////////////////////SOCIAL OPTION\r\n SQ_Classes_Tools::saveOptions('sq_auto_facebook', (int)SQ_Classes_Tools::getValue('sq_auto_facebook'));\r\n SQ_Classes_Tools::saveOptions('sq_auto_twitter', (int)SQ_Classes_Tools::getValue('sq_auto_twitter'));\r\n SQ_Classes_Tools::saveOptions('sq_og_locale', SQ_Classes_Tools::getValue('sq_og_locale'));\r\n\r\n $socials = array_merge(SQ_Classes_Tools::getOption('socials'), SQ_Classes_Tools::getValue('sq_socials', array()));\r\n\r\n if (isset($socials['twitter_site'])) $socials['twitter_site'] = $this->model->checkTwitterAccount($socials['twitter_site']);\r\n if (isset($socials['twitter_site'])) $socials['twitter'] = $this->model->checkTwitterAccountName($socials['twitter_site']);\r\n if (isset($socials['facebook_site'])) $socials['facebook_site'] = $this->model->checkFacebookAccount($socials['facebook_site']);\r\n if (isset($socials['google_plus_url'])) $socials['google_plus_url'] = $this->model->checkGoogleAccount($socials['google_plus_url']);\r\n if (isset($socials['pinterest_url'])) $socials['pinterest_url'] = $this->model->checkPinterestAccount($socials['pinterest_url']);\r\n if (isset($socials['instagram_url'])) $socials['instagram_url'] = $this->model->checkInstagramAccount($socials['instagram_url']);\r\n if (isset($socials['linkedin_url'])) $socials['linkedin_url'] = $this->model->checkLinkeinAccount($socials['linkedin_url']);\r\n if (isset($socials['myspace_url'])) $socials['myspace_url'] = $this->model->checkMySpaceAccount($socials['myspace_url']);\r\n if (isset($socials['youtube_url'])) $socials['youtube_url'] = $this->model->checkYoutubeAccount($socials['youtube_url']);\r\n\r\n $fb_admins = SQ_Classes_Tools::getValue('sq_fb_admins', array());\r\n $socials['fb_admins'] = array();\r\n if (!empty($fb_admins)) {\r\n $fb_admins = array_unique($fb_admins);\r\n foreach ($fb_admins as $index => $value) {\r\n if (isset($value) && $value == '') {\r\n unset($socials['fb_admins'][$index]);\r\n } else {\r\n $socials['fb_admins'][$index]['id'] = $this->model->checkFavebookAdminCode($value);\r\n }\r\n }\r\n }\r\n\r\n //get the facebook app id for sharing\r\n if (SQ_Classes_Tools::getIsset('sq_fbadminapp')) $socials['fbadminapp'] = SQ_Classes_Tools::getValue('sq_fbadminapp');\r\n if (SQ_Classes_Tools::getIsset('twitter_card_type')) $socials['twitter_card_type'] = SQ_Classes_Tools::getValue('twitter_card_type');\r\n\r\n\r\n SQ_Classes_Tools::saveOptions(\"socials\", $socials);\r\n\r\n ///////////////////////////////////////////\r\n /////////////////////////////FIRST PAGE OPTIMIZATION\r\n if ($pageId = get_option('page_on_front')) {\r\n $sq_hash = md5($pageId);\r\n } elseif ($post_id = get_option('page_for_posts')) {\r\n $sq_hash = md5($pageId);\r\n } else {\r\n $sq_hash = md5('wp_homepage');\r\n }\r\n\r\n if ($sq_hash <> '') {\r\n $url = home_url();\r\n $sq = SQ_Classes_ObjController::getClass('SQ_Models_Frontend')->getSqSeo($sq_hash);\r\n\r\n $sq->doseo = 1;\r\n $sq->title = urldecode(SQ_Classes_Tools::getValue('sq_fp_title', false));\r\n $sq->description = urldecode(SQ_Classes_Tools::getValue('sq_fp_description', false));\r\n $sq->keywords = SQ_Classes_Tools::getValue('sq_fp_keywords', false);\r\n $sq->og_media = SQ_Classes_Tools::getValue('sq_fp_ogimage', false);\r\n\r\n $this->model->db_insert(\r\n $url,\r\n $sq_hash,\r\n (int)$pageId,\r\n maybe_serialize($sq->toArray()),\r\n gmdate('Y-m-d H:i:s')\r\n );\r\n }\r\n\r\n ///////////////////////////////////////////\r\n /////////////////////////////SITEMAP OPTION\r\n SQ_Classes_Tools::saveOptions('sq_auto_sitemap', (int)SQ_Classes_Tools::getValue('sq_auto_sitemap'));\r\n SQ_Classes_Tools::saveOptions('sq_auto_feed', (int)SQ_Classes_Tools::getValue('sq_auto_feed'));\r\n SQ_Classes_Tools::saveOptions('sq_sitemap_frequency', SQ_Classes_Tools::getValue('sq_sitemap_frequency'));\r\n SQ_Classes_Tools::saveOptions('sq_sitemap_ping', (int)SQ_Classes_Tools::getValue('sq_sitemap_ping'));\r\n SQ_Classes_Tools::saveOptions('sq_sitemap_perpage', (int)SQ_Classes_Tools::getValue('sq_sitemap_perpage'));\r\n\r\n\r\n foreach (SQ_Classes_Tools::$options['sq_sitemap'] as $key => $value) {\r\n if ($key == 'sitemap') {\r\n continue;\r\n }\r\n SQ_Classes_Tools::$options['sq_sitemap'][$key][1] = 0;\r\n if ($key == 'sitemap-product' && !$this->model->isEcommerce()) {\r\n SQ_Classes_Tools::$options['sq_sitemap'][$key][1] = 2;\r\n }\r\n }\r\n if (SQ_Classes_Tools::getIsset('sq_sitemap')) {\r\n foreach (SQ_Classes_Tools::getValue('sq_sitemap') as $key) {\r\n if (isset(SQ_Classes_Tools::$options['sq_sitemap'][$key][1])) {\r\n SQ_Classes_Tools::$options['sq_sitemap'][$key][1] = 1;\r\n }\r\n }\r\n }\r\n\r\n foreach (SQ_Classes_Tools::$options['sq_sitemap_show'] as $key => $value) {\r\n SQ_Classes_Tools::$options['sq_sitemap_show'][$key] = 0;\r\n }\r\n if (SQ_Classes_Tools::getIsset('sq_sitemap_show')) {\r\n foreach (SQ_Classes_Tools::getValue('sq_sitemap_show') as $key) {\r\n if (isset(SQ_Classes_Tools::$options['sq_sitemap_show'][$key])) {\r\n SQ_Classes_Tools::$options['sq_sitemap_show'][$key] = 1;\r\n }\r\n }\r\n }\r\n\r\n ///////////////////////////////////////////\r\n ///////SAVE THE CODE\r\n $codes = array_merge(SQ_Classes_Tools::getOption('codes'), SQ_Classes_Tools::getValue('sq_codes', array()));\r\n\r\n if (!empty($codes)) {\r\n //if (isset($codes['facebook_pixel'])) $codes['facebook_pixel'] = $codes['facebook_pixel'];\r\n if (isset($codes['google_analytics'])) $codes['google_analytics'] = $this->model->checkGoogleAnalyticsCode($codes['google_analytics']);\r\n if (isset($codes['pinterest_verify'])) $codes['pinterest_verify'] = $this->model->checkPinterestCode($codes['pinterest_verify']);\r\n if (isset($codes['google_wt'])) $codes['google_wt'] = $this->model->checkGoogleWTCode($codes['google_wt']);\r\n if (isset($codes['bing_wt'])) $codes['bing_wt'] = $this->model->checkBingWTCode($codes['bing_wt']);\r\n if (isset($codes['alexa_verify'])) $codes['alexa_verify'] = $this->model->checkBingWTCode($codes['alexa_verify']);\r\n\r\n SQ_Classes_Tools::saveOptions(\"codes\", $codes);\r\n }\r\n\r\n\r\n ///////////////////////////////////////////JSONLD\r\n SQ_Classes_Tools::saveOptions('sq_auto_jsonld', (int)SQ_Classes_Tools::getValue('sq_auto_jsonld'));\r\n if (SQ_Classes_Tools::getIsset('sq_jsonld_type') && isset(SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')])) {\r\n\r\n foreach (SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')] as $key => $value) {\r\n if (isset(SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')][$key])) {\r\n SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')][$key] = SQ_Classes_Tools::getValue('sq_jsonld_' . $key);\r\n }\r\n }\r\n if (isset(SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')]['telephone']) &&\r\n SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')]['telephone'] <> ''\r\n ) {\r\n SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')]['telephone'] = '+' . SQ_Classes_Tools::$options['sq_jsonld'][SQ_Classes_Tools::getValue('sq_jsonld_type')]['telephone'];\r\n }\r\n }\r\n SQ_Classes_Tools::saveOptions('sq_jsonld_type', SQ_Classes_Tools::getValue('sq_jsonld_type'));\r\n\r\n ///////////////////////////////////////////\r\n /////////////////////////////FAVICON OPTION\r\n\r\n /* if there is an icon to upload */\r\n if (!empty($_FILES['favicon'])) {\r\n\r\n $return = $this->model->addFavicon($_FILES['favicon']);\r\n if ($return['favicon'] <> '') {\r\n SQ_Classes_Tools::saveOptions('favicon', strtolower(basename($return['favicon'])));\r\n }\r\n if ($return['message'] <> '') {\r\n define('SQ_MESSAGE_FAVICON', $return['message']);\r\n SQ_Classes_Error::setError(SQ_MESSAGE_FAVICON . \" <br /> \");\r\n }\r\n }\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n if (SQ_Classes_Tools::isAjax()) {\r\n SQ_Classes_Tools::setHeader('json');\r\n echo json_encode(array('saved' => true));\r\n exit();\r\n } else {\r\n //Update the rewrite rules with the new options\r\n add_filter('rewrite_rules_array', array($this, 'rewrite_rules'), 999, 1);\r\n //Flush the rewrite with the new favicon and sitemap\r\n flush_rewrite_rules();\r\n //empty the cache on settings changed\r\n SQ_Classes_Tools::emptyCache();\r\n\r\n }\r\n break;\r\n case 'sq_setstickysla':\r\n SQ_Classes_Tools::saveUserMeta('sq_auto_sticky', (int)SQ_Classes_Tools::getValue('sq_auto_sticky'));\r\n\r\n break;\r\n case 'sq_checkissues':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('sq_checkedissues', 1);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n /* Load the error class */\r\n SQ_Classes_Tools::checkErrorSettings();\r\n\r\n break;\r\n case 'sq_fixautoseo':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('sq_use', 1);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n break;\r\n case 'sq_fixprivate':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n update_option('blog_public', 1);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n break;\r\n case 'sq_fixcomments':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n update_option('comments_notify', 1);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n break;\r\n case 'sq_fixpermalink':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n $GLOBALS['wp_rewrite'] = new WP_Rewrite();\r\n global $wp_rewrite;\r\n $permalink_structure = ((get_option('permalink_structure') <> '') ? get_option('permalink_structure') : '/') . \"%postname%/\";\r\n $wp_rewrite->set_permalink_structure($permalink_structure);\r\n $permalink_structure = get_option('permalink_structure');\r\n\r\n flush_rewrite_rules();\r\n break;\r\n case 'sq_fix_ogduplicate':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('sq_auto_facebook', 0);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n break;\r\n case 'sq_fix_tcduplicate':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('sq_auto_twitter', 0);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n break;\r\n case 'sq_fix_titleduplicate':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('sq_auto_title', 0);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n break;\r\n case 'sq_fix_descduplicate':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('sq_auto_description', 0);\r\n\r\n //Save the api settings for tutorial\r\n SQ_Classes_Action::apiSaveSettings();\r\n\r\n break;\r\n case 'sq_active_help' :\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('active_help', SQ_Classes_Tools::getValue('active_help'));\r\n break;\r\n case 'sq_warnings_off':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('ignore_warn', 1);\r\n break;\r\n case 'sq_copyright_agreement':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::saveOptions('sq_copyright_agreement', 1);\r\n break;\r\n case 'sq_get_snippet':\r\n\r\n if (SQ_Classes_Tools::getValue('url') <> '') {\r\n $url = SQ_Classes_Tools::getValue('url');\r\n } else {\r\n $url = get_bloginfo('url');\r\n }\r\n $snippet = SQ_Classes_Tools::getSnippet($url);\r\n\r\n SQ_Classes_Tools::setHeader('json');\r\n echo json_encode($snippet);\r\n exit();\r\n case 'sq_backup':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::setHeader('text');\r\n header(\"Content-Disposition: attachment; filename=squirrly-settings-\" . gmdate('Y-m-d') . \".txt\");\r\n\r\n if (function_exists('base64_encode')) {\r\n echo base64_encode(json_encode(SQ_Classes_Tools::$options));\r\n } else {\r\n echo json_encode(SQ_Classes_Tools::$options);\r\n }\r\n exit();\r\n break;\r\n case 'sq_restore':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n if (!empty($_FILES['sq_options']) && $_FILES['sq_options']['tmp_name'] <> '') {\r\n $fp = fopen($_FILES['sq_options']['tmp_name'], 'rb');\r\n $options = '';\r\n while (($line = fgets($fp)) !== false) {\r\n $options .= $line;\r\n }\r\n try {\r\n if (function_exists('base64_encode') && base64_decode($options) <> '') {\r\n $options = @base64_decode($options);\r\n }\r\n $options = json_decode($options, true);\r\n if (is_array($options) && isset($options['sq_api'])) {\r\n if (SQ_Classes_Tools::getOption('sq_api') <> '') {\r\n $options['sq_api'] = SQ_Classes_Tools::getOption('sq_api');\r\n }\r\n SQ_Classes_Tools::$options = $options;\r\n SQ_Classes_Tools::saveOptions();\r\n\r\n //Check if there is an old backup from Squirrly\r\n SQ_Classes_Tools::getOptions();\r\n SQ_Classes_Tools::checkUpgrade();\r\n\r\n //Update the rewrite rules with the new options\r\n add_filter('rewrite_rules_array', array($this, 'rewrite_rules'), 999, 1);\r\n //Flush the rewrite with the new favicon and sitemap\r\n flush_rewrite_rules();\r\n\r\n SQ_Classes_Error::setError(__('Great! The backup is restored.', _SQ_PLUGIN_NAME_) . \" <br /> \", 'success');\r\n } else {\r\n SQ_Classes_Error::setError(__('Error! The backup is not valid.', _SQ_PLUGIN_NAME_) . \" <br /> \");\r\n }\r\n } catch (Exception $e) {\r\n SQ_Classes_Error::setError(__('Error! The backup is not valid.', _SQ_PLUGIN_NAME_) . \" <br /> \");\r\n }\r\n } else {\r\n SQ_Classes_Error::setError(__('Error! You have to enter a previous saved backup file.', _SQ_PLUGIN_NAME_) . \" <br /> \");\r\n }\r\n break;\r\n case 'sq_backup_sql':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n header('Content-Type: application/octet-stream');\r\n header(\"Content-Transfer-Encoding: Binary\");\r\n header(\"Content-Disposition: attachment; filename=squirrly-seo-\" . gmdate('Y-m-d') . \".sql\");\r\n\r\n if (function_exists('base64_encode')) {\r\n echo base64_encode($this->model->createTableBackup());\r\n } else {\r\n echo $this->model->createTableBackup();\r\n }\r\n exit();\r\n break;\r\n case 'sq_restore_sql':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n if (!empty($_FILES['sq_sql']) && $_FILES['sq_sql']['tmp_name'] <> '') {\r\n $fp = fopen($_FILES['sq_sql']['tmp_name'], 'rb');\r\n $sql_file = '';\r\n while (($line = fgets($fp)) !== false) {\r\n $sql_file .= $line;\r\n }\r\n\r\n if (function_exists('base64_encode')) {\r\n $sql_file = @base64_decode($sql_file);\r\n }\r\n\r\n if ($sql_file <> '' && strpos($sql_file, 'CREATE TABLE IF NOT EXISTS') !== false) {\r\n try {\r\n $queries = explode(\";\\n\", $sql_file);\r\n $this->model->executeSql($queries);\r\n SQ_Classes_Error::setError(__('Great! The SEO backup is restored.', _SQ_PLUGIN_NAME_) . \" <br /> \", 'success');\r\n\r\n } catch (Exception $e) {\r\n SQ_Classes_Error::setError(__('Error! The backup is not valid.', _SQ_PLUGIN_NAME_) . \" <br /> \");\r\n }\r\n } else {\r\n SQ_Classes_Error::setError(__('Error! The backup is not valid.', _SQ_PLUGIN_NAME_) . \" <br /> \");\r\n }\r\n } else {\r\n SQ_Classes_Error::setError(__('Error! You have to enter a previous saved backup file.', _SQ_PLUGIN_NAME_) . \" <br /> \");\r\n }\r\n break;\r\n case 'sq_dataupgrade':\r\n //Check if there is an old backup from Squirrly\r\n SQ_Classes_Tools::getOptions();\r\n SQ_Classes_Tools::checkUpgrade();\r\n SQ_Classes_Error::setError(__('Great! Squirrly Data Settings is up to date now.', _SQ_PLUGIN_NAME_) . \" <br /> \", 'success');\r\n\r\n break;\r\n case 'sq_resetsettings':\r\n if (!current_user_can('manage_options')) {\r\n return;\r\n }\r\n\r\n SQ_Classes_Tools::$options = SQ_Classes_Tools::getOptions('reset');\r\n SQ_Classes_Tools::saveOptions();\r\n break;\r\n }\r\n }", "public function store(TemplateRequest $request)\n {\n $request['template_content'] = $request->editor1;\n Template::create($request->all());\n session()->flash('success', 'Template successfully added');\n if ($request->save == \"save\") {\n\n return redirect('configurations/template');\n } else {\n return redirect('configurations/template/create');\n }\n }", "public function action_create()\n {\n $this->action_edit(FALSE);\n }", "public function myaction()\n {\n $this->viewBuilder()->disableAutoLayout();\n $this->viewBuilder()->setTemplate('take_action');\n }", "public function saveAction()\n {\n return $this->dispatcher->forward(array('controller' => 'people', 'action' => 'index'));\n }", "public function saveTemplate ()\n {\n // Recovering template data object\n $template = json_decode(Input::get('template'));\n\n //Defining custom validator to work with $template JSON object and not a Request object\n $validator = Validator::make((array)$template, [\n 'name_template' => array('required', 'regex:/^[a-zA-ZáéíóúÁÉÍÓÚñÑ1-9][a-zA-ZáéíóúÁÉÍÓÚñÑ1-9 ]{3,50}$/'),\n 'html' => array('required'),//,'regex:/((<script>){1}.*(<\\/script>){1})/'\n 'icon' => array('required'),\n 'gridster' => array('required')\n ]);\n\n // Returning fail message if validation fails\n if ($validator->fails()) {\n return response()->json([\n 'status' => 'fail'\n ], 200);\n }\n // Saving template if validation success\n else {\n // If the html have any script tag, delete it\n $html = $template->html;\n if ($html . contains(\"&lt;script&gt;\")) {\n $html = preg_replace('/((&lt;script&gt;){1}.*(&lt;\\/script&gt;){1})/', \"\", $html);\n }\n\n // Save data at database\n Ezz_template::create(array(\n 'name_template' => $template -> name_template,\n 'html' => $html,\n 'html_edit' => $template -> html_edit,\n 'icon' => $template -> icon,\n 'gridster' => $template -> gridster\n ));\n\n // Returning success message\n return response()->json([\n 'status' => 'success'\n ], 200);\n }\n }", "public function save(LabelTemplate $labelTemplate);", "public function editEbayTemplate()\n\t{\n\t\tGetLib('class.json');\n\n\t\t$templateId = (int)$_GET['templateId'];\n\n\t\ttry {\n\t\t\t$template = new ISC_ADMIN_EBAY_TEMPLATE($templateId);\n\n\t\t\t$this->template->assign('templateId', $templateId);\n\n\t\t\t$this->template->assign('formTitle', GetLang('EditEbayTemplate'));\n\t\t\t$this->template->assign('hasStore', (bool)GetConfig('EbayStore'));\n\n\t\t\t$this->template->assign('ebaySites', $this->getSupportedSites());\n\t\t\t$this->template->assign('siteId', $template->getSiteId());\n\t\t\t$this->template->assign('templateName', $template->getTemplateName());\n\t\t\t$this->template->assign('templateIsDefault', $template->isDefaultTemplate());\n\t\t\t$this->template->assign('isPrivateListing', $template->isPrivateListing());\n\n\t\t\t// setup category details\n\t\t\t$primaryCategoryOptions = $template->getPrimaryCategoryOptions();\n\t\t\t$secondaryCategoryOptions = $template->getSecondaryCategoryOptions();\n\t\t\t$this->template->assign('primaryCategory', $primaryCategoryOptions['path']);\n\t\t\t$this->template->assign('primaryCategoryOptions', ISC_JSON::encode($primaryCategoryOptions));\n\t\t\t$this->template->assign('categoryOptions', $primaryCategoryOptions);\n\t\t\t$this->template->assign('sellingMethod', $template->getSellingMethod());\n\n\t\t\ttry {\n\t\t\t\tif (empty ($secondaryCategoryOptions)) {\n\t\t\t\t\t$secondaryCategoryId = $template->getSecondaryCategoryId();\n\t\t\t\t\tif (!empty ($secondaryCategoryId)) {\n\t\t\t\t\t\t$secondaryCategoryOptions = '';\n\t\t\t\t\t\t$secondaryCategoryOptions = ISC_ADMIN_EBAY_CATEGORIES::getCategoryFeatures($secondaryCategoryId, $template->getSiteId());\n\t\t\t\t\t\t$categoryPath = ISC_ADMIN_EBAY_CATEGORIES::getFormattedCategoryPath($secondaryCategoryId, $template->getSiteId());\n\t\t\t\t\t\t$secondaryCategoryOptions['path'] = $categoryPath;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$secondaryCategoryOptions = ISC_ADMIN_EBAY_CATEGORIES::getCategoryOptionsFromId($template->getSecondaryCategoryId(), $template->getSiteId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception $ex) {\n\t\t\t\t$secondaryCategoryOptions = array(\n\t\t\t\t\t'category_id'\t=> $template->getSecondaryCategoryId(),\n\t\t\t\t\t'name'\t\t\t=> $template->getSecondaryCategoryName(),\n\t\t\t\t\t'path'\t\t\t=> $template->getSecondaryCategoryName(),\n\t\t\t\t);\n\t\t\t}\n\n\n\t\t\tif ($secondaryCategoryOptions) {\n\t\t\t\t$this->template->assign('secondaryCategoryOptionsData', $secondaryCategoryOptions);\n\t\t\t\t$this->template->assign('secondaryCategory', $secondaryCategoryOptions['path']);\n\t\t\t}\n\t\t\t$secCatNotSupportVariations = (isset ($secondaryCategoryOptions['variations_supported']) && $secondaryCategoryOptions['variations_supported'] == 0);\n\t\t\t$this->template->assign('secCatSelectedNotSupportVariations', ($secCatNotSupportVariations));\n\t\t\t$this->template->assign('secondaryCategoryOptions', ISC_JSON::encode($secondaryCategoryOptions));\n\t\t\t$this->template->assign('categoryFeaturesList', $this->template->render('ebay.template.featureslist.tpl'));\n\n\t\t\t$primaryStoreCategoryOptions = array();\n\t\t\tif ($template->getPrimaryStoreCategoryId()) {\n\t\t\t\t$primaryStoreCategoryOptions = array(\n\t\t\t\t\t'category_id'\t=> $template->getPrimaryStoreCategoryId(),\n\t\t\t\t\t'name'\t\t\t=> $template->getPrimaryStoreCategoryName(),\n\t\t\t\t\t'path'\t\t\t=> $template->getPrimaryStoreCategoryName(),\n\t\t\t\t);\n\n\t\t\t\t$this->template->assign('primaryStoreCategory', $primaryStoreCategoryOptions['path']);\n\t\t\t}\n\t\t\t$this->template->assign('primaryStoreCategoryOptions', ISC_JSON::encode($primaryStoreCategoryOptions));\n\n\t\t\t$secondaryStoreCategoryOptions = array();\n\t\t\tif ($template->getSecondaryStoreCategoryId()) {\n\t\t\t\t$secondaryStoreCategoryOptions = array(\n\t\t\t\t\t'category_id'\t=> $template->getSecondaryStoreCategoryId(),\n\t\t\t\t\t'name'\t\t\t=> $template->getSecondaryStoreCategoryName(),\n\t\t\t\t\t'path'\t\t\t=> $template->getSecondaryStoreCategoryName(),\n\t\t\t\t);\n\n\t\t\t\t$this->template->assign('secondaryStoreCategory', $secondaryStoreCategoryOptions['path']);\n\t\t\t}\n\t\t\t$this->template->assign('secondaryStoreCategoryOptions', ISC_JSON::encode($secondaryStoreCategoryOptions));\n\n\t\t\t$this->template->assign('sellingMethod', $template->getSellingMethod());\n\t\t}\n\t\tcatch (Exception $ex) {\n\t\t\tFlashMessage($ex->getMessage(), MSG_ERROR, 'index.php?ToDo=viewEbay');\n\t\t}\n\n\t\t$GLOBALS['BreadcrumEntries'][GetLang('EditEbayTemplate')] = 'index.php?ToDo=editEbayTemplate';\n\t\t$this->engine->PrintHeader();\n\t\t$this->template->display('ebay.template.form.tpl');\n\t\t$this->engine->PrintFooter();\n\t}", "public function universal()\n {\n if (!get_permission('global_settings', 'is_view')) {\n access_denied();\n }\n\n if ($_POST) {\n if (!get_permission('global_settings', 'is_edit')) {\n access_denied();\n }\n }\n\n $config = array();\n if ($this->input->post('submit') == 'setting') {\n foreach ($this->input->post() as $input => $value) {\n if ($input == 'submit') {\n continue;\n }\n $config[$input] = $value;\n }\n if (empty($config['reg_prefix'])) {\n $config['reg_prefix'] = false;\n }\n $this->db->where('id', 1);\n $this->db->update('global_settings', $config);\n set_alert('success', translate('the_configuration_has_been_updated'));\n redirect(current_url());\n }\n\n if ($this->input->post('submit') == 'theme') {\n foreach ($this->input->post() as $input => $value) {\n if ($input == 'submit') {\n continue;\n }\n $config[$input] = $value;\n }\n $this->db->where('id', 1);\n $this->db->update('theme_settings', $config);\n set_alert('success', translate('the_configuration_has_been_updated'));\n $this->session->set_flashdata('active', 2);\n redirect(current_url());\n }\n\n if ($this->input->post('submit') == 'logo') {\n move_uploaded_file($_FILES['logo_file']['tmp_name'], 'uploads/app_image/logo.png');\n move_uploaded_file($_FILES['text_logo']['tmp_name'], 'uploads/app_image/logo-small.png');\n move_uploaded_file($_FILES['print_file']['tmp_name'], 'uploads/app_image/printing-logo.png');\n move_uploaded_file($_FILES['report_card']['tmp_name'], 'uploads/app_image/report-card-logo.png');\n\n move_uploaded_file($_FILES['slider_1']['tmp_name'], 'uploads/login_image/slider_1.jpg');\n move_uploaded_file($_FILES['slider_2']['tmp_name'], 'uploads/login_image/slider_2.jpg');\n move_uploaded_file($_FILES['slider_3']['tmp_name'], 'uploads/login_image/slider_3.jpg');\n\n set_alert('success', translate('the_configuration_has_been_updated'));\n $this->session->set_flashdata('active', 3);\n redirect(current_url());\n }\n\n $this->data['title'] = translate('global_settings');\n $this->data['sub_page'] = 'settings/universal';\n $this->data['main_menu'] = 'settings';\n $this->data['headerelements'] = array(\n 'css' => array(\n 'vendor/dropify/css/dropify.min.css',\n ),\n 'js' => array(\n 'vendor/dropify/js/dropify.min.js',\n ),\n );\n $this->load->view('layout/index', $this->data);\n }", "public function saveConfVars()\n {\n if ($this->getEditObjectId() === 'findologic_module') {\n $this->_saveConfVars();\n } else {\n parent::saveConfVars();\n }\n }", "public function save() {\n\t\t$vars = $this->vars;\n\t\t$this->copyFromTemplateIfNeeded();\n\t\t$lines = file($this->filePath);\n\t\tforeach ($lines as $key => $line) {\n\t\t\tif (preg_match(\"/^(.+)vars\\[('|\\\")(.+)('|\\\")](.*)=(.*)\\\"(.*)\\\";(.*)$/si\", $line, $arr)) {\n\t\t\t\t$lines[$key] = \"$arr[1]vars['$arr[3]']$arr[5]=$arr[6]\\\"{$vars[$arr[3]]}\\\";$arr[8]\";\n\t\t\t\tunset($vars[$arr[3]]);\n\t\t\t} elseif (preg_match(\"/^(.+)vars\\[('|\\\")(.+)('|\\\")](.*)=([ \t]+)([0-9]+);(.*)$/si\", $line, $arr)) {\n\t\t\t\t$lines[$key] = \"$arr[1]vars['$arr[3]']$arr[5]=$arr[6]{$vars[$arr[3]]};$arr[8]\";\n\t\t\t\tunset($vars[$arr[3]]);\n\t\t\t}\n\t\t}\n\n\t\tunset($vars['module_load_paths']); // hacky\n\n\t\t// if there are additional vars which were not present in the config\n\t\t// file or in template file then add them at end of the config file\n\t\tif (!empty($vars)) {\n\t\t\t$lines []= \"<?php\\n\";\n\t\t\tforeach ($vars as $name => $value) {\n\t\t\t\tif (is_string($value)) {\n\t\t\t\t\t$lines []= \"\\$vars['$name'] = \\\"$value\\\";\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$lines []= \"\\$vars['$name'] = $value;\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$lines []= \"\\n\";\n\t\t}\n\n\t\tfile_put_contents($this->filePath, $lines);\n\t}", "public function process_bulk_action() {\n\n if ( ! isset( $_REQUEST[ 'template' ] ) ) {\n return;\n }\n \n switch( strtolower( $this->current_action() ) ){\n case 'activate':\n do_action( 'aal_action_activate_templates', ( array ) $_REQUEST[ 'template' ], true );\n break;\n case 'deactivate':\n do_action( 'aal_action_deactivate_templates', ( array ) $_REQUEST[ 'template' ], true );\n break; \n default:\n return; // do nothing.\n }\n\n // Reload the page.\n exit( \n wp_safe_redirect( \n add_query_arg( \n array(\n 'post_type' => AmazonAutoLinks_Registry::$aPostTypes[ 'unit' ],\n 'page' => AmazonAutoLinks_Registry::$aAdminPages[ 'template' ],\n 'tab' => 'table',\n ), \n admin_url( $GLOBALS[ 'pagenow' ] ) \n )\n )\n );\n \n }", "public function admin_save()\r\n\t{\r\n\t\tif ($this->Coupon->saveAll($this->data))\r\n\t\t{\r\n\t\t\t$id = (empty($this->data['Coupon']['id'])) ? $this->Coupon->getInsertID() : $this->data['Coupon']['id'];\r\n\r\n\t\t\t$this->Session->setFlash('Record saved.', 'default', array('class' => 'success'));\r\n\t\t\t$this->redirect('/admin/coupons/edit/' . $id);\t\r\n\t\t}\r\n\t\t\r\n\t\t$this->Session->setFlash('Record could not be saved. Please check the form for errors.', 'default', array('class' => 'failure'));\r\n\t\treturn $this->setAction('admin_edit');\t\r\n\r\n\t}", "public function generate() {\n $this->event->getIO()->write(\"<info>Generate settings file:</info>\");\n\n $parameters = $this->getParameters();\n if ($parameters) {\n $new_settings = $this->twigEnvironment->render($this->getTemplateFilename(), $this->getReplacements($parameters));\n $target_settings_file = $this->getDestinationPath() . '/' . $this->getDestinationFile();\n\n // Ensure folder and existing file is writable.\n chmod($this->getDestinationPath(), 0755);\n if (file_exists($target_settings_file)) {\n chmod($target_settings_file, 0644);\n }\n\n file_put_contents($target_settings_file, $new_settings);\n }\n else {\n $this->event->getIO()->write(\"<error>Unable to find any parameters files</error>\");\n }\n }", "public function indexAction()\n\t{\n\t\t// Get the current configuration and\n\t\t// show a form for editing it\n\t\t$this->view->config = $this->adminService->getSystemConfig();\n\t\t$this->renderView('admin/config.php');\n\t}", "public function adminCreateTemplateConfigurationService($model) {\n try {\n \n $returnValue = 'failure';\n $userObj = $this->checkIfTemplateTitleExist($model);\n if(isset($userObj))\n {\n if(isset($model->id) && !empty($model->id) )\n {\n //update\n if($userObj->id == $model->id)\n {\n //allow\n $templateConfigDetailsId = TemplateManagement::model()->updateTemplateConfigurationDetails($model); \n if ($templateConfigDetailsId =='updatetrue') {\n $returnValue = 'updatesuccess';\n }\n }\n else\n {\n //not allow\n $returnValue = 'emailexists';\n }\n }\n else\n {\n //not allow\n $returnValue = 'emailexists';\n }\n }\n else\n {\n //insert\n $templateConfigDetailsId = TemplateManagement::model()->saveNewTemplateConfigurationDetails($model);\n if($templateConfigDetailsId !='false' && $templateConfigDetailsId !='updatetrue' )\n {\n $returnValue = 'success'; \n }\n }\n } catch (Exception $ex) {\n Yii::log(\"SkiptaUserService:adminCreateTemplateConfigurationService::\".$ex->getMessage().\"--\".$ex->getTraceAsString(), 'error', 'application');\n \n }\n return $returnValue;\n }", "public function perform()\n {\n // assign header var with css definitions\n $this->viewVar['htmlHeaderData'] .= $this->controllerLoader->defaultMainCss();\n $this->viewVar['htmlTitle'] .= ' Articles general settings';\n // select advanced link\n $this->viewVar['selectedMenuItem'] = 'advanced';\n\n $this->viewVar['error'] = array();\n $this->viewVar['status'] = array();\n\n $this->fields = array();\n\n $updateOptions = $this->httpRequest->getParameter('updateOptions', 'post', 'alnum');\n $cancel = $this->httpRequest->getParameter('cancel', 'post', 'alnum');\n $save = $this->httpRequest->getParameter('save', 'post', 'alnum');\n $status = $this->httpRequest->getParameter('status', 'get', 'alnum');\n\n if(!empty($updateOptions) || !empty($save))\n {\n if(true == $this->validatePostData())\n {\n $this->model->action( 'common','setConfigVar',\n array('data' => $this->fields,\n 'module' => 'article'));\n\n if(!empty($updateOptions))\n {\n $this->router->redirect( $this->controllerVar['adminWebController'].'/mod/default/cntr/advancedMain' );\n }\n else\n {\n $this->router->redirect( $this->controllerVar['adminWebController'].'/mod/article/cntr/options/status/saved' );\n }\n }\n }\n elseif(!empty($cancel))\n {\n // redirect to the parent node of my site\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/default/cntr/advancedMain');\n }\n elseif(!empty($status))\n {\n $this->viewVar['htmlTitle'] .= '. Status: updated settings';\n $this->viewVar['status'][] = 'Updated settings';\n }\n\n // assign view vars of options\n $this->viewVar['option'] = $this->config->getModuleArray( 'article' );\n }", "public function savesubmit(){\n\t\t$this->autoRender = false;\n\t\t if($this->request->is('POST')){ \n\t\t\t //\n\t\t \n\t\t\t$this->Session->write('project.aftersave', 'sent');\n//\t\t\t$this->Session->write('brief.type', $this->name);\n\t\t\t$this->Session->write('brief.type', $this->params['controller']);\n\t\t\t$this->Session->write('brief.id', $this->Email->id);\n\t\t\t \n\t\t\t \n\t\t\t//echo 'aftersave';\t\n\t\t\t //$this->redirect(array('controller'=>'projects', 'action' => 'view', $this->Session->read('project.id') ));\n\n\t\t }\t\t\n\t}", "protected function handleFormAction(): void\n {\n $action = $_REQUEST['action'] ?? null;\n $editableColumns = $this->editableColumns();\n\n $isFormAction = in_array($action, ['edit', 'create']);\n $isAdmin = current_user_can('manage_options');\n $shouldSkip = 'GET' === $_SERVER['REQUEST_METHOD']\n || empty($_POST)\n || is_null($action);\n\n if ($shouldSkip || !$isFormAction || !$isAdmin) {\n return;\n }\n\n try {\n $this->validateEditableColumns($editableColumns, $_POST);\n } catch (\\Throwable $e) {\n $this->displayResourceNotice($e->getMessage());\n return;\n }\n\n $primaryKey = $this->newModel()->getPrimaryColumn();\n preg_match('/\\w+/', $_POST[$primaryKey] ?? '', $matches);\n\n $resourceId = $matches[0] ?? '';\n $values = $this->filterGuardedAttributes($editableColumns, $_POST);\n\n $model = !strlen($resourceId)\n ? $this->newModel()\n : $this->model::find($resourceId);\n\n $model->fill($values);\n $model->saveOrUpdate();\n\n $this->displayResourceNotice('Resource was updated', 'success');\n\n // to display the edit page after creating new resources\n if ($action === 'create') {\n $this->model = $model;\n }\n }", "public function execute()\n {\n /** @var \\Magento\\Backend\\Model\\View\\Result\\Redirect $resultRedirect */\n $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);\n $data = $this->getRequest()->getPostValue();\n $newData = $this->customData->create()->load($data['custom_entity_id']);\n try {\n if (isset($data['image_full'][0]['url'])) {\n $data['image_full'] = $data['image_full'][0]['url'];\n }\n if (isset($data['image_thumbnail'][0]['url'])) {\n $data['image_thumbnail'] = $data['image_thumbnail'][0]['url'];\n }\n $newData->setData($data);\n $newData->save();\n $this->messageManager->addSuccessMessage(__('Changes Saved Successfully'));\n $this->_getSession()->setFormData(false);\n return $resultRedirect->setPath('*/*/');\n } catch (\\Exception $e) {\n $this->messageManager->addErrorMessage($e->getMessage());\n return $resultRedirect->setPath('*/*/');\n }\n }", "function save_as_template_plan(){\n $replace['new_name'] = trim($this->value('new_name'));\n $replace['javascriptAlert'] = \"\";\n $replace['plan_id'] = $this->value('plan_id');\n \n $user_id = $this->userInfo('user_id');\n if( $this->value('submit_action') == \"Submit\" ){\n if($replace['new_name'] != \"\"){\n $query = \"select count(*) from plan p \n where p.user_id = '{$user_id}' and p.user_type = '2' \n and p.patient_id is null and p.status = 1 \n and p.plan_name = '{$replace['new_name']}' \"; \n $result = @mysql_query($query);\n $count = @mysql_result($result,0);\n if( $count > 0 ){\n $replace['javascriptAlert'] = \"alert('Template name already exist.')\";\n }\n else{\n if( is_numeric($user_id) && is_numeric($replace['plan_id'] )){ \n $this->copy_plan( $user_id, $replace['plan_id'], $replace['new_name']);\n $replace['javascriptAlert'] = \"parent.parent.GB_CURRENT.hide();\";\n $replace['javascriptAlert'] .= \"top.location = 'index.php?action=therapistPlan';\";\n }\n else{\n $replace['javascriptAlert'] = \"alert('Failed to copy Template plan.')\";\n }\n }\n }\n }\n $this->output = $this->build_template($this->get_template(\"save_as_template\"),$replace);\n }", "public function actionCreate()\n {\n $model = new PrintTemplate();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('success', __('Your changes have been saved successfully.'));\n return $this->redirect(['update', 'id' => $model->id]);\n } else {\n $model->validate(['margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'wrapper']);\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function save()\n\t{\n\t\t$this->componentConfig->save();\n\t}", "public function save_email_template(){\t\n\t\t\t$user_id = $this->session->userdata('id');\n\t\t\t$role = $this->session->userdata('role');\n\t\t\t$id = $this->input->post('template_id');\n\t\t\t$name = $this->input->post('template_name');\n\t\t\t$subject = $this->input->post('template_subject');\n\t\t\t$attachment = $this->input->post('attachment');\n\t\t\t$content = htmlentities($this->input->post('content'));\n\t\t\tif( !empty($id) && ($role=='admin')):\n\t\t$this->InteractModal->add_user_meta( $user_id, 'subject_template_id_'.$id , $subject );\n\t\tif(!empty($attachment)){\n\t\t\t$this->InteractModal->add_user_meta( $user_id, 'attach_template_id_'.$id , $attachment );\n\t\t}\n\t\t$response = $this->InteractModal->add_user_meta( $user_id, 'content_template_id_'.$id,$content );\n\t\t\t\tif(!empty($response)):\n\t\t\t\t\t$this->session->set_flashdata('msg', 'Update successfully');\n\t\t\t\telse:\n\t\t\t\t\t$this->session->set_flashdata('msg', 'Template Update Error! Try Again');\n\t\t\t\tendif;\n\t\t\t\tredirect( base_url( 'Interact/user_all_email_template'));\t\t\t\t\n\t\t\telse:\n\t\t\t\tredirect( base_url( 'Interact/login' ));\n\t\t\tendif;\n\t}", "function saveConfiguration() {\n//\t\t$field_value = DevblocksPlatform::importGPC($_POST['field_value']);\n//\t\t$this->params['field_name'] = $field_value;\n\t}", "public function postDispatch()\n\t{\n\t\t// Non-OPT views are ignored.\n\t\tif(! $this->_actionController->view instanceof Opt_View)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t// Set the default name, if not specified.\n\t\tif($this->_actionController->view->getTemplate() == '')\n\t\t{\n\t\t\t$request = $this->getRequest();\n\t\t\t$this->_actionController->view->setTemplate(strtolower($this->_lastController).'/'.strtolower($this->_lastAction).'.tpl');\n\t\t}\n\t\t// If it has been already added somewhere, skip.\n\t\tif(!is_null($this->_actionController->view->placeholder))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Add the view object to the default placeholder.\n\t\t$layout = Invenzzia_Layout::getMvcInstance();\n\t\t$layout->appendView($this->_actionController->view);\n\t}", "public function finalize() {\n\n\t\t// template debug\n\t\tif ($this->config) {\n\t\t\tif ($this->config->get('storefront_template_debug')) {\n\t\t\t\t// storefront enabling\n\t\t\t\tif (!IS_ADMIN && !isset($this->session->data['tmpl_debug']) && isset($this->request->get['tmpl_debug'])) {\n\t\t\t\t\t$this->session->data['tmpl_debug'] = isset($this->request->get['tmpl_debug']);\n\t\t\t\t}\n\n\t\t\t\tif ((isset($this->session->data['tmpl_debug']) && isset($this->request->get['tmpl_debug'])) && ($this->session->data['tmpl_debug'] == $this->request->get['tmpl_debug'])) {\n\n\t\t\t\t\t$block_details = $this->layout->getBlockDetails($this->instance_id);\n\t\t\t\t\t$excluded_blocks = array( 'common/head' );\n\n\t\t\t\t\tif (!empty($this->instance_id) && (string)$this->instance_id != '0' && !in_array($block_details['controller'], $excluded_blocks)) {\n\t\t\t\t\t\tif (!empty($this->parent_controller)) {\n\t\t\t\t\t\t\t//build block template file path based on primary template used\n\t\t\t\t\t\t\t//template path is based on parent block 'template_dir'\n\t\t\t\t\t\t\t$tmp_dir = $this->parent_controller->view->data['template_dir'].\"template/\";\n\t\t\t\t\t\t\t$block_tpl_file = $tmp_dir.$this->view->getTemplate();\n\t\t\t\t\t\t\t$prt_block_tpl_file = $tmp_dir.$this->parent_controller->view->getTemplate();\n\t\t\t\t\t\t\t$args = array( 'block_id' => $this->instance_id,\n\t\t\t\t\t\t\t\t\t\t\t'block_controller' => $this->dispatcher->getFile(),\n\t\t\t\t\t\t\t\t\t\t\t'block_tpl' => $block_tpl_file,\n\t\t\t\t\t\t\t\t\t\t\t'parent_id' => $this->parent_controller->instance_id,\n\t\t\t\t\t\t\t\t\t\t\t'parent_controller' => $this->parent_controller->dispatcher->getFile(),\n\t\t\t\t\t\t\t\t\t\t\t'parent_tpl' => $prt_block_tpl_file\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$debug_wrapper = $this->dispatch('common/template_debug', array( 'instance_id' => $this->instance_id, 'details' => $args ));\n\t\t\t\t\t\t\t$debug_output = $debug_wrapper->dispatchGetOutput();\n\t\t\t\t\t\t\t$output = trim($this->view->getOutput());\n\t\t\t\t\t\t\tif (!empty($output)) $output = '<span class=\"block_tmpl_wrapper\">' . $output . $debug_output . '</span>';\n\t\t\t\t\t\t\t$this->view->setOutput($output);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tunset($this->session->data['tmpl_debug']);\n\t\t\t}\n\t\t}\n\t\t$this->view->render();\n\t}", "public function actionCreate()\n {\n $model = new ConfigConstant();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"action\" => \"index\"\n ));\n }\n\n $type_id = $this->request->getPost(\"type_id\");\n\n $itemsType = ItemsType::findFirstBytype_id($type_id);\n if (!$itemsType) {\n $this->flash->error(\"Items Type does not exist \" . $type_id);\n\n return $this->dispatcher->forward(array(\n \"action\" => \"index\"\n ));\n }\n\n $itemsType->code = $this->request->getPost(\"code\");\n $itemsType->name = $this->request->getPost(\"name\");\n \n\n if (!$itemsType->save()) {\n\n foreach ($itemsType->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n return $this->dispatcher->forward(array(\n \"action\" => \"edit\",\n \"params\" => array($itemsType->type_id)\n ));\n }\n\n $this->flash->success(\"Items Type was updated successfully\");\n\n return $this->dispatcher->forward(array(\n \"action\" => \"index\"\n ));\n\n }", "function saveEditQuoteFinalStepAction()\n\t{\n\n\t\tif($this->_request->isPost())\n\t\t{\n\n\t\t\t$final_parameters=$this->_request->getParams();\n\n\t\t\t$quote_id=$final_parameters['quote_id'];\n\n\t\t\t//echo \"<pre>\";print_r($final_parameters);exit;\n\n\t\t\tif($quote_id)\n\t\t\t{\n\t\t\t\n\t\t\t\t$quote_obj=new Ep_Quote_Quotes();\n\t\t\t\t$quoteDetails=$quote_obj->getQuoteDetails($quote_id);\n\n\t\t\t\t$quotes_update_data = array();\n\t\t\t\t$quotes_update_data['sales_comment']=$final_parameters['bo_comments'];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(count($_FILES['quote_documents']['name'])>0)\t\n\t\t\t\t{\n\t\t\t\t\t$update = false;\n\t\t\t\t\t$documents_path=array();\n\t\t\t\t\t$documents_name=array();\n\t\t\t\t\tforeach($_FILES['quote_documents']['name'] as $index=>$quote_files)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($_FILES['quote_documents']['name'][$index]):\n\t\t\t\t\t\t//upload quote documents\n\t\t\t\t\t\n\t\t\t\t\t\t$quoteDir=$this->quote_documents_path.$quoteIdentifier.\"/\";\n\t\t\t if(!is_dir($quoteDir))\n\t\t\t mkdir($quoteDir,TRUE);\n\t\t\t chmod($quoteDir,0777);\n\t\t\t $document_name=frenchCharsToEnglish($_FILES['quote_documents']['name'][$index]);\n\t\t\t\t\t\t$pathinfo = pathinfo($document_name);\n\t\t\t\t\t\t$document_name =$pathinfo['filename'].rand(100,1000).\".\".$pathinfo['extension'];\n\t\t\t $document_name=str_replace(' ','_',$document_name);\n\t\t\t $document_path=$quoteDir.$document_name;\n\t\t\t if (move_uploaded_file($_FILES['quote_documents']['tmp_name'][$index], $document_path))\n\t\t\t chmod($document_path,0777);\n\n\t\t\t\t\t\t\t$update = true;\n\t\t\t $documents_path[]=$quoteIdentifier.\"/\".$document_name;\n\t\t\t $documents_name[]= str_replace('|',\"_\",$final_parameters['document_name'][$index]);\n\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t $uploaded_documents1 = explode(\"|\",$quoteDetails[0]['documents_path']);\n\t\t\t\t\t $documents_path =array_merge($documents_path,$uploaded_documents1);\n\t\t\t\t\t $quotes_update_data['documents_path']=implode(\"|\",$documents_path);\n\t\t\t\t\t $document_names =explode(\"|\",$quoteDetails[0]['documents_name']);\n\t\t\t\t\t $documents_name =array_merge($documents_name,$document_names);\n\t\t\t\t\t $quotes_update_data['documents_name']=implode(\"|\",$documents_name);\n\t\t \n\t\t\t }\n\n\t\t\t $status=$quoteDetails[0]['sales_review'];\n\t\t\t\tif($status=='not_done')\n\t\t\t\t\t$status='';\n\t\t\t //echo \"<pre>\";print_r($quotes_update_data);exit;\n\n\t\t\t $quote_obj->updateQuote($quotes_update_data,$quote_id);\n\n\t\t\t $this->_redirect(\"/quote/sales-quotes-list?submenuId=ML13-SL2&active=\".$status);\n\t\t\t} \n\t\t}\n\t}", "function btpay_post_action()\n {\n global $wpdb;\n if (!empty($_POST))\n {\n if (isset($_POST['update_config']))\n {\n $id = $_POST['update_config'];\n btpay_handle_config_update();\n include BT_PLUGIN_DIR . '/pages/btpay-config-page.php';\n }\n }\n else\n {\n include BT_PLUGIN_DIR . '/pages/btpay-config-page.php';\n }\n }", "public function actionCreate()\n\t{\n\t\t$this->actionRegister();\n\t\t/*\n\t\tif (isset($_GET['newModel']) && isset(Yii::app()->session[$this->createBackup.'_Time']) && $_GET['newModel']>Yii::app()->session[$this->createBackup.'_Time']){\n\t\t\t\tunset(Yii::app()->session[$this->createBackup]);\n\t\t\t\tunset(Yii::app()->session[$this->createBackup.'_Time']);\n\t\t\t\tunset($_GET['newModel']);\n\t\t}\n\t\t$this->prepareCreateOrUpdate(null, 'create');\n\t\t*/\n\t}", "public static function use_parent_template() {\n add_action('save_post', array('core_admin', 'switch_page_template'));\n }", "public function save_country_settings() {\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n if ($this->checkPrivileges('admin', '2') == TRUE) {\n $condition = array('admin_id' => '1');\n $this->admin_model->commonInsertUpdate(ADMIN, 'update', array(), array(), $condition);\n $countryId = $this->input->post(\"countryId\");\n $config = '<?php ';\n foreach ($this->data['countryList'] as $country) {\n if ($countryId == $country->_id) {\n $countryName = addslashes($country->name);\n $config .= \"\\n\\$config['countryId'] = '$country->_id'; \";\n $config .= \"\\n\\$config['countryName'] = '$countryName'; \";\n $config .= \"\\n\\$config['countryCode'] = '$country->cca3'; \";\n $config .= \"\\n\\$config['dialCode'] = '$country->dial_code'; \";\n }\n }\n $config .= \"\\n ?>\";\n $file = 'commonsettings/dectar_country_settings.php';\n file_put_contents($file, $config);\n $this->setErrorMessage('success', 'Country settings updated successfully','admin_adminlogin_country_setting_updated');\n redirect(ADMIN_ENC_URL.'/adminlogin/admin_country_settings');\n } else {\n redirect(ADMIN_ENC_URL);\n }\n }\n }", "public function saveAction()\n {\n if ($data = $this->getRequest()->getPost('ifeedback')) {\n try {\n $ifeedback = $this->_initIfeedback();\n $ifeedback->addData($data);\n $ifeedback->save();\n $add = '';\n if($this->getRequest()->getParam('popup')){\n $add = '<script>window.opener.'.$this->getJsObjectName().'.reload(); window.close()</script>';\n }\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_kst')->__('Instructor Feedback was successfully saved. %s', $add)\n );\n Mage::getSingleton('adminhtml/session')->setFormData(false);\n if ($this->getRequest()->getParam('back')) {\n $this->_redirect('*/*/edit', array('id' => $ifeedback->getId()));\n return;\n }\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n Mage::getSingleton('adminhtml/session')->setIfeedbackData($data);\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n return;\n } catch (Exception $e) {\n Mage::logException($e);\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('There was a problem saving the instructor feedback.')\n );\n Mage::getSingleton('adminhtml/session')->setIfeedbackData($data);\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('Unable to find instructor feedback to save.')\n );\n $this->_redirect('*/*/');\n }", "function layout_builder_post_update_override_entity_form_controller() {\n // Empty post-update hook.\n}", "function container_ctools_content_types_container_template_edit_form_submit($form, &$form_state) {\n $defaults = array();\n if (isset($form_state['subtype']['defaults'])) {\n $defaults = $form_state['subtype']['defaults'];\n }\n elseif (isset($form_state['plugin']['defaults'])) {\n $defaults = $form_state['plugin']['defaults'];\n }\n\n foreach (array_keys($defaults) as $key) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n}", "public function afterTemplate(){\n\t\t//defaults to empty\n\t}", "public function store()\n {\n // * route: /template [POST]\n\n // echo __FUNCTION__;\n // print_r($data);\n\n // $this->render('user.index');\n }", "public function afterSave()\n\t{\n\t\t//annoying on every edit, move to a checkbox on form and handle in controller\n\t}", "public function autosave() {\n\t $this->use_layout=false;\n\t $this->use_view=false;\n\t $content = new $this->model_class(Request::get(\"id\"));\n\t if($content->primval) {\n\t $content->update_attributes($_POST[\"cms_content\"]);\n\t echo date(\"H:i:s\");\n\t }else{\n\t throw new WXRoutingException('Tried to save in a non-existing database entry!', \"Page not found\", '404');\n\t }\n\t exit;\n\t}", "public function saveMethodAction()\n {\n parent::saveMethodAction();\n if ($this->_isActive() && $this->getRequest()->isPost()) {\n $result = Mage::helper('core')->jsonDecode(\n $this->getResponse()->getBody()\n );\n\n $this->_addHashInfo($result);\n $this->getResponse()->setBody(\n Mage::helper('core')->jsonEncode($result)\n );\n }\n }", "public function actionSettingsIndexTemplate()\n\t{\n\t\t$settingsModel = new SproutForms_SettingsModel;\n\n\t\t$settings = craft()->db->createCommand()\n\t\t\t->select('settings')\n\t\t\t->from('plugins')\n\t\t\t->where('class=:class', array(':class'=> 'SproutForms'))\n\t\t\t->queryScalar();\n\n\t\t$settings = JsonHelper::decode($settings);\n\t\t$settingsModel->setAttributes($settings);\n\n\t\t$variables['settings'] = $settingsModel;\n\n\t\t// Load our template\n\t\t$this->renderTemplate('sproutforms/settings', $variables);\n\n\t}", "public function editAction()\n {\n $this->createEditParameters = $this->createEditParameters + $this->_editExtraParameters;\n\n parent::editAction();\n }", "public function saveTempAction()\n {\n $rows = $this->mappingAction();\n\t\t\n\t\tif (!empty($rows)) {\t\t\n\t\t\t// ************************************************ SAVE NORMA PUPUK TBM TEMP ************************************************\n\t\t\t//generate filename untuk .sh dan .sql\n\t\t\t$filename = $this->_global->genFileName();\n\t\t\t$this->_global->createBashFile($filename); //create bash file\n\t\t\t$this->_global->createSqlFile($filename, \"START : \".date(\"Y-m-d H:i:s\").\"\\n\"); //start create file\n\t\t\t\n\t\t\t//save norma biaya temp\n\t\t\tforeach ($rows as $key => $row) {\n\t\t\t\t$row['filename'] = $filename;\n\t\t\t\t$return = $this->_model->saveTemp($row);\n\t\t\t}\n\t\t\t//execute transaksi\n\t\t\t$this->_global->createSqlFile($filename, \"COMMIT;\\n\"); //add query untuk commit\n\t\t\tshell_exec(\"sh \".getcwd().\"/tmp_query/\".$filename.\".sh\"); //execute query\t\t\n\t\t\t$this->_global->createSqlFile($filename, \"END : \".date(\"Y-m-d H:i:s\").\"\\n\"); //end execute\n\t\t\tshell_exec(\"rm -f -r \".getcwd().\"/tmp_query/\".$filename.\".sh\"); //delete file yg telah diexecute\n\t\t\t\n\t\t\t//pindahkan .sql ke logs\n\t\t\t$uploaddir = getcwd().\"/logs/\".date(\"Y-m-d\").\"/\";\n\t\t\tif ( ! is_dir($uploaddir)) {\n\t\t\t\t$oldumask = umask(0);\n\t\t\t\tmkdir(\"$uploaddir\", 0777, true);\n\t\t\t\tchmod(\"/\".date(\"Y-m-d\"), 0777);\n\t\t\t\tumask($oldumask);\n\t\t\t}\n\t\t\tshell_exec(\"mv \".getcwd().\"/tmp_query/\".$filename.\".sql \".getcwd().\"/logs/\".date(\"Y-m-d\").\"/\".$filename.\".sql\");\n\t\t\t// ************************************************ SAVE NORMA PUPUK TBM TEMP ************************************************\n\t\t}\n\t\t\n\t\tdie('no_alert');\n }", "protected function actionSave() {\r\n $strType = $this->getCurObjectClassName();\r\n $strSystemId = \"\";\r\n\r\n if(!is_null($strType)) {\r\n\r\n /** @var $objRecord interface_model|class_model */\r\n $objRecord = null;\r\n\r\n if($this->getParam(\"mode\") == \"new\") {\r\n $objRecord = new $strType();\r\n $strSystemId = $this->getSystemid();\r\n }\r\n else if($this->getParam(\"mode\") == \"edit\")\r\n $objRecord = new $strType($this->getSystemid());\r\n\r\n if($objRecord != null) {\r\n $objForm = $this->getAdminForm($objRecord);\r\n if(!$objForm->validateForm()) {\r\n if($this->getParam(\"mode\") === \"new\")\r\n return $this->actionNew();\r\n if($this->getParam(\"mode\") === \"edit\")\r\n return $this->actionEdit();\r\n }\r\n\r\n $objForm->updateSourceObject();\r\n $objRecord->updateObjectToDb($strSystemId);\r\n\r\n $this->adminReload(getLinkAdminHref($this->getArrModule(\"modul\"), $this->getActionNameForClass(\"list\", $objRecord), \"&systemid=\".$objRecord->getStrPrevId().($this->getParam(\"pe\") != \"\" ? \"&peClose=1\" : \"\")));\r\n return \"\";\r\n }\r\n }\r\n else\r\n throw new class_exception(\"error on saving current object type not known \", class_exception::$level_ERROR);\r\n\r\n\r\n return $this->getLang(\"commons_error_permissions\");\r\n }", "public function save() {\n $configdata = $this->get('configdata');\n if (!array_key_exists('defaultvalue_editor', $configdata)) {\n $this->field->save();\n return;\n }\n\n if (!$this->get('id')) {\n $this->field->save();\n }\n\n // Store files.\n $textoptions = $this->value_editor_options();\n $tempvalue = (object) ['defaultvalue_editor' => $configdata['defaultvalue_editor']];\n $tempvalue = file_postupdate_standard_editor($tempvalue, 'defaultvalue', $textoptions, $textoptions['context'],\n 'customfield_textarea', 'defaultvalue', $this->get('id'));\n\n $configdata['defaultvalue'] = $tempvalue->defaultvalue;\n $configdata['defaultvalueformat'] = $tempvalue->defaultvalueformat;\n unset($configdata['defaultvalue_editor']);\n $this->field->set('configdata', json_encode($configdata));\n $this->field->save();\n }", "public function actionCreate()\n {\n $model = new NotificationsTemplate();\n\n if ($model->load(\\Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'key' => $model->key]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function config()\n {\n $errors = [];\n $values = [];\n\n if ($this->request->isPost()) {\n $values = $this->request->getValues();\n\n $validation_errors = $this->validateValues($values);\n\n if (!$validation_errors) {\n $values['human_name'] = $this->fixHumanName($values['human_name']); \n $machine_name = $this->createMachineName($values['human_name']);\n $beauty_name = $this->beautyName($values['human_name']);\n $values['machine_name'] = $machine_name;\n $values['beauty_name'] = $beauty_name;\n $type_id = $this->db->table(MetadataTypeModel::TABLE)->persist($values);\n if ($type_id) {\n $this->flash->success(t('Metadata type created successfully.'));\n } else {\n $this->flash->failure(t('Error saving the metadata type. Retry.'));\n }\n } else {\n $errors = $validation_errors;\n $this->flash->failure(t('There are errors in your submission.'));\n }\n }\n\n $metadataTypes = $this->metadataTypeModel->getAll();\n\n $this->response->html($this->helper->layout->config('MetaMagik:config/metadata_types', [\n 'values' => $values,\n 'errors' => $errors,\n 'types' => $metadataTypes,\n 'title' => t('Settings').' &gt; '.t('Custom Fields'),\n ]));\n }", "public function createAction() {\r\n $request = reqEbbs::get('post');\r\n $response = new responseEbbs();\r\n /** @var backupLogTxtModelEbbs $logTxt */\r\n $logTxt = $this->getModel('backupLogTxt');\r\n /** @var backupTechLogModelEbbs $techLog */\r\n $techLog = $this->getModel('backupTechLog');\r\n /** @var warehouseEbbs $bupFolder */\r\n $bupFolder = frameEbbs::_()->getModule('warehouse');\r\n $uploadingList = array();\r\n $backupComplete = false;\r\n\r\n if(!empty($request['opt_values'])){\r\n do_action('bupBeforeSaveBackupSettings', $request['opt_values']);\r\n /* @var $optionsModel optionsModelEbbs*/\r\n $optionsModel = frameEbbs::_()->getModule('options')->getModel();\r\n $optionsModel->saveMainFromDestGroup($request);\r\n $optionsModel->saveGroup($request);\r\n $optionsModel->refreshOptions();\r\n\r\n // if warehouse changed - create necessary dir\r\n if (!$bupFolder->getFolder()->exists())\r\n $bupFolder->getFolder()->create();\r\n }\r\n\r\n $destination = $this->getModel()->getConfig('dest');\r\n if($destination !== 'ftp') {\r\n $isAuthorized = $this->getModel()->checkCloudServiceRemoteServerIsAuth($destination);\r\n if(!$isAuthorized){\r\n $response->addError($this->getModel()->getErrors());\r\n return $response->ajaxExec();\r\n }\r\n }\r\n\r\n // We are need to check \"warehouse\" directory (usually: wp-content/upsupsystic)\r\n if (!$this->getModel()->checkWarehouse()) {\r\n $response->addError($this->getModel()->getWarehouseError());\r\n return $response->ajaxExec();\r\n }\r\n\r\n if($this->getModel()->isFilesystemRequired() && !$this->checkExtensions($response)) {\r\n return $response->ajaxExec();\r\n }\r\n\r\n $currentBackupPath = $this->getModel()->generateFilename(array('zip', 'sql', 'txt'));\r\n $logTxt->setLogName(basename($currentBackupPath['folder']));\r\n $logTxt->writeBackupSettings($request['opt_values']);\r\n $logTxt->add(__('Clear temporary directory', EBBS_LANG_CODE));\r\n $techLog->deleteOldLogs();\r\n $techLog->setLogName(basename($currentBackupPath['folder']));\r\n\r\n if ($this->getModel()->isDatabaseRequired()) {\r\n $logTxt->add(__(sprintf('Start database backup: %s', $currentBackupPath['sql']), EBBS_LANG_CODE));\r\n $this->getModel()->getDatabase()->create($currentBackupPath['sql']);\r\n $dbErrors = $this->getModel()->getDatabase()->getErrors();\r\n\r\n if (!empty($dbErrors)) {\r\n $logTxt->add(__(sprintf('Errors during creation of database backup, errors count %d', count($dbErrors)), EBBS_LANG_CODE));\r\n $response->addError($dbErrors);\r\n return $response->ajaxExec();\r\n }\r\n\r\n $logTxt->add(__('Database backup complete.'), EBBS_LANG_CODE);\r\n $uploadingList[] = $currentBackupPath['sql'];\r\n $backupComplete = true;\r\n }\r\n\r\n if ($this->getModel()->isFilesystemRequired()) {\r\n if(!file_exists($currentBackupPath['folder'])) {\r\n $bupFolder->getController()->getModel('warehouse')->create($currentBackupPath['folder'] . DS);\r\n }\r\n\r\n $logTxt->add(__('Scanning files.', EBBS_LANG_CODE));\r\n $files = $this->getModel()->getFilesList();\r\n // $files = array_map('realpath', $files);\r\n\r\n $logTxt->add(sprintf('%s files scanned.', count($files, true) - count($files)));\r\n $logTxt->add(__('Total stacks: ' . count($files), EBBS_LANG_CODE));\r\n $techLog->set('stacks', $files);\r\n $uploadingList[] = $currentBackupPath['folder'];\r\n $backupComplete = false;\r\n }\r\n\r\n // if need create filesystem backup or send DB backup on cloud - backup not complete\r\n if(!empty($files) || $destination !== 'ftp') {\r\n $backupComplete = false;\r\n $techLog->set('destination', $destination);\r\n $techLog->set('uploadingList', $uploadingList);\r\n $techLog->set('emailNotifications', (frameEbbs::_()->getModule('options')->get('email_ch') == 1) ? true : false);\r\n\r\n $data = array(\r\n 'page' => 'backup',\r\n 'action' => 'createBackupAction',\r\n 'backupId' => $currentBackupPath['folder'],\r\n );\r\n\r\n if(!empty($files))\r\n $logTxt->add(__('Send request to generate backup file stacks', EBBS_LANG_CODE));\r\n\r\n $this->getModel('backup')->sendSelfRequest($data);\r\n }\r\n\r\n if($backupComplete && frameEbbs::_()->getModule('options')->get('email_ch') == 1) {\r\n $email = frameEbbs::_()->getModule('options')->get('email');\r\n $subject = __('DropBox Backup by Supsystic Notifications', EBBS_LANG_CODE);\r\n\r\n $logTxt->add(__('Email notification required.', EBBS_LANG_CODE));\r\n $logTxt->add(sprintf(__('Sending to', EBBS_LANG_CODE) . '%s', $email));\r\n\r\n $message = $logTxt->getContent(false);\r\n\r\n wp_mail($email, $subject, $message);\r\n }\r\n\r\n $response->addData(array(\r\n 'backupLog' => $logTxt->getContent(),\r\n 'backupId' => basename($currentBackupPath['folder']),\r\n 'backupComplete' => $backupComplete\r\n ));\r\n\r\n return $response->ajaxExec();\r\n\r\n $cloud = $log->getCurrentBackupFilesName();\r\n\r\n $handlers = $this->getModel()->getDestinationHandlers();\r\n\r\n if (array_key_exists($destination, $handlers)) {\r\n\r\n $cloud = array_map('basename', $cloud);\r\n\r\n $log->string(__(sprintf('Upload to the \"%s\" required', ucfirst($destination)), EBBS_LANG_CODE));\r\n $log->string(sprintf('Files to upload: %s', rtrim(implode(', ', $cloud), ', ')));\r\n $handler = $handlers[$destination];\r\n $result = call_user_func_array($handler, array($cloud));\r\n if ($result === true || $result == 200 || $result == 201) {\r\n $log->string(__(sprintf('Successfully uploaded to the \"%s\"', ucfirst($destination)), EBBS_LANG_CODE));\r\n\r\n $path = frameEbbs::_()->getModule('warehouse')->getPath();\r\n $path = untrailingslashit($path);\r\n\r\n foreach ($cloud as $file) {\r\n $log->string(__(sprintf('Removing %s from the local storage.', $file), EBBS_LANG_CODE));\r\n if (@unlink($path . '/' . $file)) {\r\n $log->string(__(sprintf('%s successfully removed.', $file), EBBS_LANG_CODE));\r\n } else {\r\n $log->string(__(sprintf('Failed to remove %s', $file), EBBS_LANG_CODE));\r\n }\r\n }\r\n } else {\r\n switch ($result) {\r\n case 401:\r\n $error = __('Authentication required.', EBBS_LANG_CODE);\r\n break;\r\n case 404:\r\n $error = __('File not found', EBBS_LANG_CODE);\r\n break;\r\n case 500:\r\n $error = is_object($handler[0]) ? $handler[0]->getErrors() : __('Unexpected error (500)', EBBS_LANG_CODE);\r\n break;\r\n default:\r\n $error = __('Unexpected error', EBBS_LANG_CODE);\r\n }\r\n\r\n $log->string(__(\r\n sprintf(\r\n 'Cannot upload to the \"%s\": %s',\r\n ucfirst($destination),\r\n is_array($error) ? array_pop($error) : $error\r\n )\r\n , EBBS_LANG_CODE));\r\n }\r\n }\r\n\r\n if(empty($error)) {\r\n $response->addMessage(__('Backup complete.', EBBS_LANG_CODE));\r\n } else {\r\n $response->addError(__('Error occurred: ' . ucfirst($destination) . ', ' . $error, EBBS_LANG_CODE));\r\n }\r\n\r\n // Allow to do new backups.\r\n $this->unlock();\r\n\r\n $backupPath = untrailingslashit($bupStorageRoot) . DS;\r\n $pathInfo = pathinfo($cloud[0]);\r\n $log->save($backupPath . $pathInfo['filename'] . '.txt');\r\n\r\n $response->addData(\r\n array(\r\n 'backupLog' => frameEbbs::_()->getModule('backup')->getModel('backupLog')->getBackupLog(),\r\n )\r\n );\r\n\r\n $log->clear();\r\n\r\n return $response->ajaxExec();\r\n\t}", "protected function setAfterSaveRoute()\n {\n // Default is just go to the index\n if ($this->routeAction) {\n $this->afterSaveRouteUrl[$this->request->getActionKey()] = $this->routeAction;\n }\n $this->afterSaveRouteUrl['controller'] = $this->request->getControllerName();\n }", "private function __saveConfiguration()\n {\n //Check is submit the form\n if (Tools::isSubmit(BECOPAY_PREFIX . 'submit')) {\n\n //clear errors messages\n $this->_errors = array();\n\n //validate is set configuration field\n foreach ($this->config['configuration'] as $config) {\n if ($config['isRequired'] && Tools::getValue(BECOPAY_PREFIX . $config['name']) == NULL)\n $this->_errors[] = $this->l($config['title'] . ' is require');\n }\n\n //if has no errors check with PaymentGateway Constructor validation\n if (empty($this->_errors)) {\n try {\n new PaymentGateway(\n Tools::getValue(BECOPAY_PREFIX . 'apiBaseUrl'),\n Tools::getValue(BECOPAY_PREFIX . 'apiKey'),\n Tools::getValue(BECOPAY_PREFIX . 'mobile')\n );\n } catch (\\Exception $e) {\n $this->_errors[] = $e->getMessage();\n }\n }\n\n //Display error messages if has error\n if (!empty($this->_errors)) {\n $this->_html = $this->displayError(implode('<br>', $this->_errors));\n } else {\n\n //save configuration form fields\n foreach ($this->config['configuration'] as $config)\n if (Tools::getValue(BECOPAY_PREFIX . $config['name']) != NULL)\n Configuration::updateValue(BECOPAY_PREFIX . $config['name'], trim(Tools::getValue(BECOPAY_PREFIX . $config['name'])));\n\n\n //display confirmation message\n $this->_html = $this->displayConfirmation($this->l('Settings updated'));\n }\n }\n }", "protected function afterSave()\n\t{\n\t\tparent::afterSave();\n\t\tif(!$this->status == 1){\n\t\t$title = $this->howtoTitle($this->id);\n\t\t$tags = $this->tagLinks();\n\t\t$title = CHtml::link('Created '.$title , array('/howto/' . $this->id . '/' . $title ) );\n\t\t$shortText = substr($this->content,0,160);\n\t\t$content = $shortText.\"...<br/>Tags:\";\n\t\tforeach($tags as $tag){\n\t\t\t$content .=\" \".$tag.\",\";\n\t\t}\n\t\tAction::newAction($content,$title);\n\t\t}\n\t\t\n\t}", "function before_edit_configuration() { }", "public function postSave() {}", "public function setConfigAction() {\n $response = new stdClass();\n $response->success = false;\n $coreConfig = Mage::getConfig();\n $post = $this->getRequest()->getPost();\t\n\t\t$coreConfig->saveConfig('filter_type', Mage::helper('core')->escapeHtml($post['filter_type']));\n $coreConfig->saveConfig('filter_name', Mage::helper('core')->escapeHtml($post['filter_name']));\n $coreConfig->saveConfig('filter_status', Mage::helper('core')->escapeHtml($post['filter_status']));\n\t\t$coreConfig->cleanCache();\n\n\t\t$response->success = true; \n $cache = Mage::getSingleton('core/cache');\n $cache->flush(); \n exit(json_encode($response));\n }", "public function lastElementDataAction() {\r\n //send data is in .tpl\r\n }", "public function frontend_configuration()\n {\n if ($this->session->userdata('logged_in') == 1 && $this->session->userdata('user_type') != 'Admin') {\n redirect('home/login_page', 'location');\n }\n \n $data['body'] = \"admin/config/frontend_config\";\n $data['time_zone'] = $this->_time_zone_list(); \n $data['language_info'] = $this->_language_list();\n $data['page_title'] = $this->lang->line('front-end settings');\n $this->_viewcontroller($data);\n }", "public function saveAction()\n {\n $request = $this->getRequest();\n $service = $this->get('buggl_main.trip_theme');\n $template = 'BugglMainBundle:Admin\\TripTheme:form.html.twig';\n\n if ($request->getMethod() == 'POST') {\n $form = $this->createFormBuilder()\n ->add('name', 'text',\n array(\n 'constraints'=>new \\Symfony\\Component\\Validator\\Constraints\\NotBlank()\n ))\n ->add('status','checkbox',array('required' => false))\n ->getForm();\n $form->bind($request);\n\n $valid = $form->isValid();\n\n if ($valid) {\n $data = $service->add($form->getData());\n } else {\n $html = $this->renderView(\n $template, array('form'=>$form->createView()));\n $data = array('success' => $valid, 'html' => $html);\n }\n } else {\n $id = $request->get('id');\n $name = trim($request->get('qString'));\n\n $data = $service->update($id, $name);\n }\n\n $response = new \\Symfony\\Component\\HttpFoundation\\JsonResponse($data, 200);\n\n return $response;\n }", "public function saveAction()\n {\n if ($data = $this->getRequest()->getPost('curriculumdoc')) {\n try {\n $data = $this->_filterDates($data, array('cdoc_date'));\n $curriculumdoc = $this->_initCurriculumdoc();\n $curriculumdoc->addData($data);\n $cdocFileName = $this->_uploadAndGetName(\n 'cdoc_file',\n Mage::helper('bs_curriculumdoc/curriculumdoc')->getFileBaseDir(),\n $data\n );\n $curriculumId = null;\n\n if(isset($data['hidden_curriculum_id']) && $data['hidden_curriculum_id'] > 0) {\n $curriculumId = $data['hidden_curriculum_id'];\n }elseif($this->getRequest()->getParam('curriculum_id')){\n $curriculumId = $this->getRequest()->getParam('curriculum_id');\n }\n $curriculumdoc->setData('cdoc_file', $cdocFileName);\n $curriculums = $this->getRequest()->getPost('curriculums', -1);\n if ($curriculums != -1) {\n $curriculumdoc->setCurriculumsData(Mage::helper('adminhtml/js')->decodeGridSerializedInput($curriculums));\n }else {\n if(isset($data['hidden_curriculum_id']) && $data['hidden_curriculum_id'] > 0){\n $curriculumId = $data['hidden_curriculum_id'];\n $curriculumdoc->setCurriculumsData(\n array(\n $data['hidden_curriculum_id'] => array(\n 'position' => \"\"\n )\n )\n );\n }\n }\n\n $curriculumdoc->save();\n\n $add = '';//traininglist_curriculum/edit/id/1/back/edit/tab/curriculum_info_tabs_curriculumdocs/\n $backUrl = $this->getUrl('*/traininglist_curriculum/edit/', array('back'=>'edit','id' => $curriculumId, 'tab'=>'curriculum_info_tabs_curriculumdocs'));\n if($this->getRequest()->getParam('popup')){\n $add = '<script>window.opener.location.href=\\''.$backUrl.'\\'; window.close()</script>';//window.opener.location.reload()\n }\n\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_curriculumdoc')->__('Curriculum Document was successfully saved %s', $add)\n );\n Mage::getSingleton('adminhtml/session')->setFormData(false);\n if ($this->getRequest()->getParam('back')) {\n $this->_redirect('*/*/edit', array('id' => $curriculumdoc->getId()));\n return;\n }\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n if (isset($data['cdoc_file']['value'])) {\n $data['cdoc_file'] = $data['cdoc_file']['value'];\n }\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n Mage::getSingleton('adminhtml/session')->setCurriculumdocData($data);\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n return;\n } catch (Exception $e) {\n Mage::logException($e);\n if (isset($data['cdoc_file']['value'])) {\n $data['cdoc_file'] = $data['cdoc_file']['value'];\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('There was a problem saving the curriculum doc.')\n );\n Mage::getSingleton('adminhtml/session')->setCurriculumdocData($data);\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('Unable to find curriculum doc to save.')\n );\n $this->_redirect('*/*/');\n }", "public function saveAction()\n {\n if ($postData = $this->getRequest()->getPost()) {\n if (isset($_FILES['image']['name']) and (file_exists($_FILES['image']['tmp_name']))) {\n try {\n $file_name_info = pathinfo($_FILES['image']['name']);\n $file_extension = $file_name_info['extension'];\n $filename_hash = md5(str_shuffle($_FILES['image']['name'].rand(1,1000).time()));\n $final_filename = $filename_hash . '.' . $file_extension;\n\n $uploader = new Varien_File_Uploader('image');\n $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));\n $uploader->setAllowRenameFiles(false);\n $uploader->setFilesDispersion(false);\n\n $path = Mage::getBaseDir('media') . DS . 'alliance' . DS . 'bioactives';\n\n $uploader->save($path, $final_filename);\n\n $postData['image'] = 'alliance' . DS .'bioactives' . DS . $final_filename;\n }\n catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')\n ->addError($this->__(\"An error occurred while saving the image for this Key Bioactive. Please make sure the file you\n selected was an image of file type jpg, jpeg, gif, or png, and wasn't too large in filesize.\"));\n }\n }\n else {\n if(isset($postData['image']['delete']) && $postData['image']['delete'] == 1)\n $postData['image'] = '';\n else\n unset($postData['image']);\n }\n\n $model = Mage::getSingleton('alliance_bioactives/bioactive');\n $model->setData($postData);\n\n try {\n $model->save();\n\n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('The bioactive has been saved.'));\n $this->_redirect('*/*/');\n\n return;\n }\n catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n }\n catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')\n ->addError($this->__('An error occurred while saving this bioactive.'));\n }\n\n Mage::getSingleton('adminhtml/session')->setBioactiveData($postData);\n $this->_redirectReferer();\n }\n }", "public function configure(): void\n {\n $this->setDecorator(false);\n $this->setTemplate($this->actionName.$this->getExtension());\n if ('global' == $this->moduleName)\n {\n $this->setDirectory($this->context->getConfiguration()->getDecoratorDir($this->getTemplate()));\n }\n else\n {\n $this->setDirectory($this->context->getConfiguration()->getTemplateDir($this->moduleName, $this->getTemplate()));\n }\n }", "public function save_currency_settings() {\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n if ($this->checkPrivileges('admin', '2') == TRUE) {\n $condition = array('admin_id' => '1');\n $this->admin_model->commonInsertUpdate(ADMIN, 'update', array(), array(), $condition);\n $currency_settings_val = $this->input->post(\"currency\");\n $config = '<?php ';\n foreach ($currency_settings_val as $key => $val) {\n $value = addslashes($val);\n $config .= \"\\n\\$config['$key'] = '$value'; \";\n }\n $config .= \"\\n ?>\";\n $file = 'commonsettings/dectar_currency_settings.php';\n file_put_contents($file, $config);\n $this->setErrorMessage('success', 'Currency settings updated successfully','admin_adminlogin_currency_setting_updated');\n redirect(ADMIN_ENC_URL.'/adminlogin/admin_currency_settings');\n } else {\n redirect(ADMIN_ENC_URL);\n }\n }\n }", "public function setViewConfigurationFilesFromTypoScriptConfiguration()\r\n {\r\n // Sets the template root path with the default\r\n $this->templateRootPath = $this->defaultTemplateRootPath;\r\n $this->getController()\r\n ->getPageTypoScriptConfigurationManager()\r\n ->setViewConfigurationFilesFromPageTypoScriptConfiguration();\r\n $this->getController()\r\n ->getExtensionConfigurationManager()\r\n ->setViewConfigurationFilesFromTypoScriptConfiguration();\r\n $this->getController()\r\n ->getLibraryConfigurationManager()\r\n ->setViewConfigurationFilesFromTypoScriptConfiguration();\r\n }", "public function postDispatch()\n {\n parent::postDispatch();\n if ($this->getFlag('', self::FLAG_NO_POST_DISPATCH)) {\n return;\n }\n Mage::dispatchEvent('controller_action_postdispatch_adminhtml', array('controller_action' => $this));\n }", "function index( $id = \"be1\" ) {\n\n\t\tif ( $this->is_POST()) {\n\t\t// if the method is post\n\n\t\t\t// server side validation\n\t\t\tif ( $this->is_valid_input()) {\n\n\t\t\t\t// save user info\n\t\t\t\t$this->save( $id );\n\t\t\t}\n\t\t}\n\n\t\t//Get Backend_config Object\n\t\t$this->data['backend'] = $this->Backend_config->get_one( $id );\n\n\t\t$this->load_template( 'backend_configs/entry_form',$this->data, true );\n\n\t}", "public function configuration()\n {\n if ($this->session->userdata('logged_in') == 1 && $this->session->userdata('user_type') != 'Admin') {\n redirect('home/login_page', 'location');\n }\n \n $data['body'] = \"admin/config/edit_config\";\n $data['time_zone'] = $this->_time_zone_list(); \n $data['language_info'] = $this->_language_list();\n $data[\"themes\"] = $this->_theme_list();\n $data['page_title'] = $this->lang->line('general settings');\n $this->_viewcontroller($data);\n }", "public function saveAction() {\n $request = $this->getRequest();\n if($request->isPost()) {\n $params = $request->getPost();\n if(!array_key_exists('company_id', $params)) {\n Default_Model_Company::create($params);\n } else {\n Default_Model_Company::update($params);\n }\n }\n \n $this->_redirect($this->view->actions['index']);\n }" ]
[ "0.6807841", "0.6206388", "0.61593", "0.610639", "0.6096789", "0.6075421", "0.5825599", "0.5812048", "0.5737642", "0.56738055", "0.5637621", "0.5622439", "0.5603154", "0.5595343", "0.5590436", "0.55859154", "0.55521786", "0.5511519", "0.54491484", "0.54472715", "0.5446891", "0.5446477", "0.5434309", "0.54195744", "0.5401162", "0.5397", "0.53920585", "0.5388098", "0.5386281", "0.5384591", "0.5367495", "0.53624177", "0.53569007", "0.5351016", "0.5349158", "0.5336876", "0.53093034", "0.53090554", "0.52934223", "0.5264032", "0.52562594", "0.5247381", "0.52389175", "0.52349985", "0.5225689", "0.5225356", "0.5217558", "0.52173424", "0.5209279", "0.52084005", "0.51852435", "0.51831645", "0.5167266", "0.5164326", "0.5162479", "0.5155891", "0.51493376", "0.5148992", "0.5136434", "0.5128057", "0.51272666", "0.51256895", "0.51196694", "0.5118464", "0.5118043", "0.5112669", "0.5111838", "0.51118255", "0.5109532", "0.5103831", "0.510206", "0.5086769", "0.50848764", "0.5084166", "0.50836176", "0.507899", "0.50747573", "0.507464", "0.50706965", "0.50663716", "0.5065151", "0.5064217", "0.5046699", "0.5045948", "0.50441754", "0.50430876", "0.50426596", "0.5036704", "0.5036287", "0.5027026", "0.50258136", "0.50243706", "0.5022423", "0.502077", "0.5020295", "0.5019699", "0.50195825", "0.50160384", "0.5008781", "0.50027585" ]
0.74228793
0
Sets autorization header telling that you need to be authenticated
Устанавливает заголовок авторизации, указывающий, что требуется аутентификация
public function setAuthenticateHeader() { $response = \Yii::$app->response; $response->getHeaders()->set('WWW-Authenticate', "Basic realm=\"{$this->realm}\""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAuthorization()\n\t{\n\t\t// @TODO We don't deal with a case where during your session the token expires\n\t\tif (is_null($this->access_token))\n\t\t{\n\t\t\t$response = $this->getToken();\n\t\t\t$this->access_token = $response->access_token;\n\t\t\t$this->authorization = \"Bearer \" . $this->access_token;\n\t\t}\n\t}", "private function prepareAuth()\n {\n $this->client->setHeaders(\n [\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->zendeskHelper->getToken()\n ]\n );\n }", "public function authentication_header()\n {\n }", "public function auth(){\n if(empty($_COOKIE[\"utoken\"])){\n $cookie_value = $this->uuid();\n $this->utoken = $cookie_value;\n $this->setHeader($this->utoken);\n }else{\n $this->utoken = $_COOKIE[\"utoken\"];\n $this->setHeader($this->utoken);\n }\n }", "protected function setHeader(){\n $this->header = [\n 'Auth-id' => $this->username,\n 'Auth-token' => $this->generateToken(),\n 'Timestamp' => time()\n ];\n }", "protected function set_headers()\n\t{\n\t\tif($this->headers_required) { \n\n\t\t\t$this->headers = [\n\t\t\t \n\t\t\t\t'Authorization: '. $_SESSION['token'] .'',\n\t\t\t];\n\n\t\t}\n\n\t}", "function http_auth_headers() {\n\t\tif($this->http_user || $this->http_pass):\n\t\t\t$this->http_headers_add('Authorization', \" Basic \".base64_encode($this->http_user . \":\" . $this->http_pass));\n\t\tendif;\n\t}", "protected function __authorization(){\n\t\t $this->cURL->headers['Authorization'] = 'Bearer '.$this->access_token;\n }", "public function getAuth()\n {\n $this->getRequestHeaders([\n 'X-User-Id', 'X-Auth-Token'\n ]);\n }", "protected function sendAuthHeaders()\n {\n $sessionId = GlobalRequest::getSessionIdFromCookie();\n $sessionHandleKey = GlobalRequest::getSessionHandleKeyFromCookie();\n\n $this->setHeader('xa-modifier-sid', !empty($sessionId) ? $sessionId : \"null\");\n $this->setHeader('xa-modifier-shk', !empty($sessionHandleKey) ? $sessionHandleKey : \"null\");\n }", "function auth() {\n header('WWW-Authenticate: Basic realm=\"Citations\"');\n header('HTTP/1.0 401 Unauthorized');\n print 'authorisation required';\n exit;\n }", "public function buildAuthorizationHeader ()\n {\n $this->addHeader('Authorization', 'Basic ' . base64_encode($this->clientId . ':' . $this->clientSecret));\n $this->is_preauthorized_request = 1;\n }", "public function setAuthenticated();", "protected function setBasicAuthHeader(): void\n {\n $this->setRequestHeader(\n 'Authorization',\n 'Basic ' . base64_encode($this->appId . ':' . $this->appPassword)\n );\n }", "function wp_populate_basic_auth_from_authorization_header()\n {\n }", "protected function setAuthtoken($authToken)\n {\n $this->header .= \"X-Auth-Token: \" . $authToken . \"\\r\\n\";\n }", "public static function authenticate(): void\n {\n $headers = getallheaders();\n $token = $headers['Authorization'] ?? null;\n\n if ($token === null\n || !self::validate($token)\n ) {\n header('Not authorized', true, 403);\n exit;\n }\n }", "public function buildAccessHeader ()\n {\n $this->is_preauthorized_request = 0;\n if ($this->IsAccessParams())\n $this->addHeader('Authorization', $this->token_type . ' ' . $this->access_token);\n\n }", "public function get_test_authorization_header()\n {\n }", "public function auth()\n {\n\n if (Auth::attempt(['email' => $this->request->header('email'), 'password' => $this->request->header('password')])) {\n $this->user = Auth::user();\n\n } else {\n echo json_encode(['error' => 'Unauthorised']);\n die();\n }\n }", "protected function setCurlHeaderElement() {\n // set header for cur\n $this->header[] = 'Content-type: application/json';\n $this->header[] = 'Authorization: Bearer '.$this->accessToken;\n }", "function setAuthHeaders($authInfos = NULL) {\n if (is_null($authInfos))\n $authInfos = $GLOBALS['clientsAuth'][$GLOBALS['defaultAuth']]; /// TODO revoir pour skidataInventory2\n $auth = new StdClass();\n\n $auth->ClientName = new SoapVar($authInfos['skidataDTAClientName'], XSD_STRING, NULL, NULL, 'ClientName', self::$skidataDTAHeaderNamespace);\n $auth->UserName = new SoapVar($authInfos['skidataDTAUserName'], XSD_STRING, NULL, NULL, 'UserName', self::$skidataDTAHeaderNamespace);\n $auth->Password = new SoapVar($authInfos['skidataDTAPassword'], XSD_STRING, NULL, 'Password', self::$skidataDTAHeaderNamespace);\n $header = new SoapHeader(self::$skidataDTAHeaderNamespace, 'AuthenticationHeader', $auth, false);\n\n $this->__setSoapHeaders(array($header));\n }", "protected function addAuthorization()\n {\n\n $username = $this->getUsername();\n $auth_type = $this->getAuthType();\n $this->addHeader([\n 'Authorization' => ( $auth_type == 'hash')\n ? 'WHM ' . $username . ':' . preg_replace(\"'(\\r|\\n|\\s|\\t)'\", '', $this->getPassword())\n :\n (\n ( $auth_type == 'password')\n ? 'Basic ' . base64_encode($username . ':' .$this->getPassword())\n : null\n )\n ]);\n\n return $this;\n }", "public static function setRedirectUponAuthentication(){\n\n /**\n * Make sure we redirect to the requested page\n */\n if(isset($_SESSION[self::CONST_REQUESTED_URI_SESSION_KEY]) && !empty($_SESSION[self::CONST_REQUESTED_URI_SESSION_KEY])){\n CoreHeaders::setRedirect($_SESSION[self::CONST_REQUESTED_URI_SESSION_KEY]);\n unset($_SESSION[self::CONST_REQUESTED_URI_SESSION_KEY]);\n }else{\n CoreHeaders::setRedirect('/');\n }\n\n }", "protected function protect()\n {\n header('HTTP/1.1 401 Unauthorized');\n\n switch ($this->type) {\n default:\n case self::AUTH_BASIC:\n header('WWW-Authenticate: Basic realm=\"' . $this->realm . '\"');\n break;\n case self::AUTH_DIGEST:\n header(\n 'WWW-Authenticate: Digest realm=\"' . $this->realm .\n '\", qop=\"auth\", nonce=\"' . md5(uniqid()) . '\", opaque=\"' . md5(uniqid()) . '\"'\n );\n break;\n }\n }", "public static function set_headers()\n {\n }", "private function __setAuthUser()\n {\n $authUser = $this->request->session()->read('Auth');\n\n $accountType = 'FREE';\n if (!empty($authUser)) {\n $accountType = $authUser['User']['account_type'];\n }\n\n $this->set(compact('authUser', 'accountType'));\n }", "public function setBasicAuth()\n {\n $auth = $this->auth;\n\n if (null !== $auth['user']) {\n $this->mink->getSession()->setBasicAuth(\n $auth['user'],\n $auth['password']\n );\n }\n }", "function assignFrontAuth() {\n AuthComponent::$sessionKey = 'Auth.User';\n $this->Auth->authenticate = array(\n 'Form' => array(\n 'userModel' => 'User',\n 'fields' => array('username' => 'email', 'password' => 'password', 'store_id'),\n 'scope' => array('User.merchant_id' => $this->Session->read('merchant_id'), 'User.role_id' => array('4', '5'), 'User.is_active' => 1, 'User.is_deleted' => 0)\n )\n );\n }", "private function login()\n {\n if (!isset($_SERVER['PHP_AUTH_USER']) || !$this->isAdmin()) {\n header('WWW-Authenticate: Basic realm=\"My Realm\"');\n header('HTTP/1.0 401 Unauthorized');\n exit;\n }\n }", "public function authorize(){\n $token = $this->retrieveToken(); $this->setToken($token);\n }", "protected function setBearerAuthHeader(string $bearerToken): void\n {\n $this->setRequestHeader('Authorization', 'Bearer ' . $bearerToken);\n }", "function assignHQFrontAuth() {\n AuthComponent::$sessionKey = 'Auth.hqusers';\n $this->Auth->authenticate = array(\n 'Form' => array(\n 'userModel' => 'User',\n 'fields' => array('username' => 'email', 'password' => 'password', 'store_id'),\n 'scope' => array('User.merchant_id' => $this->Session->read('hq_id'), 'User.role_id' => array('4', '5'), 'User.is_active' => 1, 'User.is_deleted' => 0)\n )\n );\n }", "public function testSetsCorrectAuthenticationHeader()\n {\n /** @var \\Koren\\ErplyBooks\\Resource\\Invoices $invoicesResource */\n $invoicesResource = $this->client->Invoices();\n\n $request = new Request('GET', $invoicesResource->getEndpointUrl());\n\n $request = $this->client->authenticate($request);\n $this->assertInstanceOf(\n RequestInterface::class,\n $request\n );\n\n $this->assertTrue(\n $request->hasHeader('Accept')\n );\n\n $this->assertTrue(\n $request->hasHeader('Content-Type')\n );\n\n $this->assertEquals(\n $request->getHeader('Accept')[0],\n 'application/json'\n );\n\n $this->assertEquals(\n $request->getHeader('Content-Type')[0],\n 'application/json'\n );\n }", "public function setHeaders() {\r\n\t\t$this->resource->setHeaders();\r\n\t}", "public function preAuth(Request $request, Response $response);", "public function preAuth(Request $request, Response $response);", "public function test_authorization_header()\n {\n }", "function setHeaders()\n {\n header('Content-type: application/json');\n\n // Calculate Expires Headers if set to > 0\n $expires = $this->grav['config']->get('system.pages.expires');\n if ($expires > 0) {\n $expires_date = gmdate('D, d M Y H:i:s', time() + $expires) . ' GMT';\n header('Cache-Control: max-age=' . $expires);\n header('Expires: '. $expires_date);\n }\n }", "public function authentication_header() {\n return 'Proxy-Authorization: Basic ' . base64_encode($this->authentication());\n }", "public function sendAuthChallengeHeader()\n {\n\t\t\n\t\theader('Authorization: Digest');\n header('WWW-Authenticate: Digest realm=\"' . self::AUTH_REALM \n . '\",qop=\"auth\",nonce=\"' . uniqid() \n\t\t\t . '\",algorithm=\"MD5\"'\n . '\",opaque=\"' . md5(self::AUTH_REALM) . '\"');\n\t\theader('HTTP/1.1 200');\n }", "protected function getBearerAuthHeader()\n {\n return \"Bearer \" . $this->retrieveToken();\n }", "function req_auth($realm = 'Secret Realm') {\n\theader('WWW-Authenticate: Basic realm=\"'.$realm.'\"');\n\theader('HTTP/1.1 401 Unauthorized');\n\tprint '<h1>Error 401: Authorization Required</h1>';\n\texit;\n}", "public static function getHeader(&$headers)\n {\n $headers['Authorization'] = 'Bearer '.self::getToken();\n }", "public function prepareBasicAuth()\n {\n $authString = base64_encode( $this->options['username'] . ':' . $this->options['password'] );\n\n $this->options['headers']['Authorization'] = \"Basic {$authString}\";\n }", "function unauthorized($realm = 'PHPRestSQL') {\n header('WWW-Authenticate: Basic realm=\"'.$realm.'\"');\n header('HTTP/1.0 401 Unauthorized');\n }", "public function setHeadersWithFullWpEnvironment() : void {\n $this->setCacheForPasswordProtected();\n }", "public function setHeaders()\n {\n }", "public function authenticated(): void\n {\n $this->authenticated = true;\n }", "public function setHeaders() : void {\n $this->setCacheHeaders();\n }", "public function authorize($auth)\n {\n $this->auth = $auth;\n }", "protected function getAuthorizationHeader(){\n return base64_encode(\n Controller\\Controller::getEnvironmentData('CCP_SSO_CLIENT_ID') . ':'\n . Controller\\Controller::getEnvironmentData('CCP_SSO_SECRET_KEY')\n );\n }", "abstract public function SetHeaders();", "function auth(){\n\t\t//TODO auth implementieren\n\t\treturn true;\n\t}", "function setHeader($header)\t{\n\t\tif(isset($header))\t{\n\t\t\tcurl_setopt($this->ch, CURLOPT_HTTPHEADER, $header);\n\t\t}\n\t\telse {\n\t\t\techo \"** Expecting header.\\n\";\n\t\t}\n\t}", "public function setAuthenticationParams() {\n }", "function setAuthType($authtype){\r\n\t\t$this->authType=$authtype;\r\n\t}", "private function setupSecurity()\n\t{\n\t\t$rd = $this -> httpHandler -> getResponseData();\n\n\t\t$counter = 0;\n\t\tforeach( $rd['headers']['Set-Cookie'] as $cookie ) :\n\t\t\t$cd = explode( \"=\", $cookie );\n\t\t\t$this -> cookies[$cd[0]] = rtrim( $cd[1], \"; path\" );\n\t\t\tif( $counter == 0 ) :\n\t\t\t\t$this -> authToken = array( \"name\" => $cd[0], \"value\" => rtrim( $cd[1], \"; path\" ) );\n\t\t\t\t$counter ++;\n\t\t\tendif;\n\t\tendforeach;\n\t}", "function setAuthType($authtype){\n $this->authType=$authtype;\n }", "function setAuthType($authtype){\n $this->authType=$authtype;\n }", "public function makeAuthHeader() {\r\n\t\t$this->timestamp = $this->timestamp ? $this->timestamp : $this->getEdgeGridTimestamp();\r\n\t\t$this->nonce = $this->nonce ? $this->nonce : $this->makeNonce();\r\n\r\n\t\t$auth_header = 'EG1-HMAC-SHA256 ' .\r\n\t\t\t\t'client_token=' . $this->client_token . ';' .\r\n\t\t\t\t'access_token=' . $this->access_token . ';' .\r\n\t\t\t\t'timestamp=' . $this->timestamp . ';' .\r\n\t\t\t\t'nonce=' . $this->nonce . ';';\r\n\r\n\t\t$this->verbose('auth_header', $auth_header);\r\n\r\n\t\tswitch ($this->method) {\r\n\t\t\tcase 'POST':\r\n\t\t\t\t$this->body_to_sign = $this->body;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'PUT':\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$this->body = null;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t$this->verbose('body_to_sign', $this->body_to_sign);\r\n\r\n\t\t$signed_auth_header = $auth_header . 'signature=' . $this->signRequest($auth_header);\r\n\t\t$this->verbose('signed_auth_header', $signed_auth_header);\r\n\r\n\t\treturn $signed_auth_header;\r\n\t}", "public function Autenticar(){\n try {\n $r = $this->auth->autenticar(\n $this->model->Acceder(\n $_POST['usuario'],\n $_POST['password']\n )\n );\n \n // Valida modelo de autenticacion definido\n if(__AUTH__ === 'token'){\n header(\"Location: ?c=Historia&token=$r\"); // Si fuera token, redirecciona al controlador por defecto anexando el N° de token generado\n } \n else{\n header('Location: ?c=Historia'); // En caso contrario, redireccion al controlador por defecto \n }\n } \n catch(Exception $e){\n header('Location: index.php'); // En caso de error remite a pagina inicial por defecto para validar credenciales de acceso\n }\n }", "public function\n\t\tsend_http_headers()\n\t{\n\t\tparent::send_http_headers();\n\t\t\n\t\t/*\n\t\t * Make sure that the user is logged in.\n\t\t */\n\t\t$alm = Admin_LoginManager::get_instance();\n\t\t\n\t\tif (!$alm->is_logged_in()) {\n\t\t\t$_SESSION['admin-login-data']['desired-url'] = new HTMLTags_URL();\n\t\t\t\n// $_SESSION['admin-login-data']['desired-url']->set_file('/hc/admin/navigation.html');\n\t\t\t$_SESSION['admin-login-data']['desired-url']->set_file('/Admin_StartPage');\n\t\t\t\n\t\t\t$redirection_manager = new PublicHTML_RedirectionManager();\n\t\t\t$redirection_url = $redirection_manager->get_url();\n\t\t\t\n\t\t\t$redirection_url->set_file('/hc/admin/login.html');\n\t\t\t\n\t\t\t$location_header_line = 'Location: ' . $redirection_url->get_as_string();\n\t\t\t\n\t\t\theader($location_header_line);\n\t\t\texit;\n\t\t}\n\t}", "public function Authenticate()\n {\n $authInfo = array(\n 'iat' => APP_TIME, \n 'nbf' => APP_TIME+1,\n );\n $accesToken = $this->container->get('authenticate')->requestAccessToken($authInfo);\n $this->view->set(array(\n 'accesToken' => $accesToken,\n ));\n }", "public function use_authentication()\n {\n }", "public function setBearerToken($token)\n {\n $this->options['headers']['Authorization'] = \"Bearer $token\";\n }", "public function setAuthorizationElement();", "function authorize()\n {\n try {\n $authRequest = $this->heimdall->validateAuth();\n $authRequest->setUser(new UserEntity());\n $this->heimdall->completeAuth($authRequest);\n } catch (Exception $exception) {\n $this->heimdall->handleException($exception);\n }\n }", "private function _secureBackend()\n\t{\n\t\tif (!$this->_isAuthenticated()) {\n\t\t\theader(\"HTTP/1.1 401 Unauthorized\");\n\t\t\texit();\n\t\t}\n\t}", "private function _prompt_login($user_id = 0)\n {\n header('WWW-Authenticate: Basic realm=\"'.$user_id.'\"');\n header('HTTP/1.0 401 Unauthorized');\n }", "function authenticateHeader($message = 'Authentication required')\n{\n header('WWW-Authenticate: Basic realm=\"FusionDirectory\"');\n header('HTTP/1.0 401 Unauthorized');\n echo \"$message\\n\";\n exit;\n}", "public function proceed ()\n {\n header('X-Viper-Auth: 123456789');\n $dummy = $this -> app() -> getHeader('X-Viper-Auth'); // 123456789\n }", "function authorizedUsersOnly(){\n global $authenticatedUser;\n if(empty($authenticatedUser)){\n header(\"HTTP/1.1 401 Unauthorized\");\n header(\"Location: https://eso.vse.cz/~frim00/marvelous-movies/error-401\");\n exit();\n }\n }", "public function setHeader($header);", "public function authentication(){\n return HelperTest::createBasicHeader();\n }", "public static function requireAuthorized()\n {\n if(!SessionHelper::isUserLoggedIn()){\n header('location: ' . (string)getenv('URL') . 'user/logIn');\n }\n }", "private static function setHeaders()\n {\n header('X-Powered-By: Intellivoid-API');\n header('X-Server-Version: 2.0');\n header('X-Organization: Intellivoid Technologies');\n header('X-Author: Zi Xing Narrakas');\n header('X-Request-ID: ' . self::$ReferenceCode);\n }", "public function ApiRequestAuthenticate($tokenAuth)\n {\n \\Piwik\\Registry::get('auth')->setLogin($login = null);\n \\Piwik\\Registry::get('auth')->setTokenAuth($tokenAuth);\n }", "public function\n\t\tsend_http_headers()\n\t{\n\t\tparent::send_http_headers();\n\t\t\n\t\t/*\n\t\t * Make sure that the user is logged in.\n\t\t */\n\t\t$alm = Admin_LoginManager::get_instance();\n\t\t\n\t\tif (!$alm->is_logged_in()) {\n\t\t\t$_SESSION['admin-login-data']['desired-url'] = new HTMLTags_URL();\n\t\t\t$_SESSION['admin-login-data']['desired-url']->set_file('/Admin_StartPage');\n\t\t\t\n\t\t\t$redirection_manager = new PublicHTML_RedirectionManager();\n\t\t\t$redirection_url = $redirection_manager->get_url();\n\t\t\t\n\t\t\t$redirection_url->set_file('/admin.html');\n\t\t\t\n\t\t\t$location_header_line = 'Location: ' . $redirection_url->get_as_string();\n\t\t\t\n\t\t\theader($location_header_line);\n\t\t\texit;\n\t\t}\n\t}", "public function auth()\n\t{\n\t\t$r = $this->do_auth();\n\t\t$x['status'] = $r;\n\t\techo json_encode($x);die;\n\t}", "public function authorizationHeader()\n {\n return sprintf('%s %s', $this->type, $this->accessToken);\n }", "public function authorization()\n {\n $this->mergeHeader([\n 'API-ACCESS-TOKEN' => \"Bearer \" . config(\"redx.access_token\")\n ]);\n\n return $this;\n }", "public function send401Unauthorized()\n {\n $this->sendHeader('HTTP/1.1 401 Unauthorized');\n }", "public function requestAuth()\n {\n return null;\n }", "function setAuthSignature($AuthSignature)\n {\n \t$this->_authSignature =$AuthSignature;\n }", "public function\r\n\t\tsend_http_headers()\r\n\t{\r\n\t\tparent::send_http_headers();\r\n\t\t\r\n\t\t/*\r\n\t\t * Make sure that the user is logged in.\r\n\t\t */\r\n\t\t$alm = Admin_LoginManager::get_instance();\r\n\t\t\r\n\t\tif (!$alm->is_logged_in()) {\r\n\t\t\t$_SESSION['admin-login-data']['desired-url'] = new HTMLTags_URL();\r\n\t\t\t\r\n\t\t\t$_SESSION['admin-login-data']['desired-url']->set_file('/hc/admin/navigation.html');\r\n\t\t\t\r\n\t\t\t$redirection_manager = new PublicHTML_RedirectionManager();\r\n\t\t\t$redirection_url = $redirection_manager->get_url();\r\n\t\t\t\r\n\t\t\t$redirection_url->set_file('/hc/admin/login.html');\r\n\t\t\t\r\n\t\t\t$location_header_line = 'Location: ' . $redirection_url->get_as_string();\r\n\t\t\t\r\n\t\t\theader($location_header_line);\r\n\t\t\texit;\r\n\t\t}\r\n\t}", "private function _sendPrimaryHeaders() {\n\t\theader(\"Access-Control-Allow-Origin: \".Environment::$api->allowOrigin);\n\t\theader(\"Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS\");\n\t\theader(\"Access-Control-Allow-Headers: Origin, Content-Type, Authorization, X-Custom-Auth\");\t\n\t}", "public function setUp() {\n parent::setUp();\n $session = new Zend_Session_Namespace('Administration');\n $session->admin = $this->createRandomAdministrationUser();\n $this->getRequest()->setHeader('Authorization', 'Basic ' . base64_encode('gf:thisishell'));\n\n }", "public function setAuth($userId, $authToken)\n {\n $this->setRequestHeaders([\n 'X-User-Id' => $userId,\n 'X-Auth-Token' => $authToken,\n ]);\n }", "public function authenticationReqd(){\n\t\theader('HTTP/1.0 401 Unauthorized');\n\t\t$this['app']['hologram']->setModule(\"WWW\")->log(\\Bakery\\Utilities\\Hologram::NORMAL, \"Response: Page requires authentication\");\r\n\t\t\n\t\t$_SESSION['redirect_to'] = $this['request']['uri'];\n\t\t\n\t\tif($this->isJson()){\n\n\t\t\treturn array(\"response\" => \"authentication required\");\n\t\t\t\n\t\t}\n\t\t\n\t\theader(\"Location: {$this['app']['security.login']['handler']}\");\n\t\t\n\t}", "public function setAuthParams()\n {\n if( $this->getUseSession() )\n {\n // FIXME Need to add session functionality\n }\n else\n {\n $this->getHttpClient()->setParameterGet( 'user', $this->getUsername() );\n $this->getHttpClient()->setParameterGet( 'password', $this->getPassword() );\n $this->getHttpClient()->setParameterGet( 'api_id', $this->getApiId() );\n }\n }", "public function setAuthorized() {}", "public function configureHeaders ()\n {\n $config = $this->app->config('github');\n\n $headers = array(\n 'Accept: application/vnd.github.v3+json',\n sprintf('User-Agent: %s', $config['handle'])\n );\n\n $this->addHeaders($headers);\n }", "public function authorize()\n\t{\n\t\t$state = md5(uniqid(rand(), TRUE));\n\t\t$this->oauth->ci->session->set_userdata('state', $state);\n\t\t\t\n\t\t$params = array(\n\t\t\t'client_id' => $this->_config['client_id'],\n\t\t\t'redirect_uri' => $this->_config['redirect_uri'],\n\t\t\t'state' => $state,\n\t\t\t'scope' => 'email'\n\t\t);\n\t\t\n\t\t$url = $this->_authorize_endpoint.http_build_query($params);\n\t\tredirect($url);\n\t}", "public function set_auth_code() {\n\t\t$tokens = new Token_User( '_indieauth_code_' );\n\t\t$tokens->set_user( self::$author_id );\n\t\treturn $tokens->set( static::$test_auth_code, 600 );\n\t}", "private function authenticate()\n {\n $this->client->authenticate($this->token, null, Client::AUTH_HTTP_TOKEN);\n }", "protected function authorize() {\r\n\t\t$authurl = $this->tmhOAuth->url(\"oauth/authorize\", '') . \"?oauth_token={$_SESSION['oauth']['oauth_token']}\";\r\n\t\theader(\"Location: \".$authurl);\r\n\t\texit;\r\n\r\n\t\t// in case the redirect doesn't fire\r\n\t\t$this->addMsg('<p>To complete the OAuth flow please visit URL: <a href=\"' . $authurl . '\">' . $authurl . '</a></p>');\r\n\t}", "public function withAuthHeader($user)\n {\n $token = JWTAuth::fromUser($user);\n $this->headers['Authorization'] = \"Bearer {$token}\";\n return $this;\n }", "function setExternalAccessUserAuthorization( $flag = true )\r\n\t{\r\n\t $this->external_access_user_authorization = $flag;\r\n\t}", "public function openAuthorizationUrl()\n {\n header('Location: ' . $this->getAuthorizationUrl());\n exit(1);\n }" ]
[ "0.702322", "0.7004076", "0.6986348", "0.6976852", "0.6959325", "0.675015", "0.6735196", "0.673283", "0.6685304", "0.66836655", "0.6605274", "0.6583517", "0.64165694", "0.64147997", "0.63940006", "0.6292193", "0.6210134", "0.617427", "0.61313754", "0.6114502", "0.60141236", "0.5990447", "0.59808046", "0.5932632", "0.5926741", "0.5918034", "0.58954966", "0.5859595", "0.58466816", "0.5845771", "0.58324224", "0.5830313", "0.5820453", "0.58184147", "0.58176476", "0.5760749", "0.5760749", "0.5754697", "0.57435805", "0.5740068", "0.5720006", "0.5715307", "0.5679429", "0.5675766", "0.5658141", "0.5644319", "0.56274426", "0.5614516", "0.5603055", "0.5600131", "0.5587494", "0.5568595", "0.5560548", "0.5549712", "0.5541197", "0.55401677", "0.5532409", "0.55203664", "0.55170465", "0.55170465", "0.55128294", "0.5502532", "0.5493883", "0.5493057", "0.5488841", "0.548775", "0.54843664", "0.5480418", "0.54772145", "0.5474896", "0.5472821", "0.54702777", "0.5462316", "0.5460145", "0.54373527", "0.5432638", "0.5431932", "0.54241914", "0.542264", "0.54199487", "0.54132557", "0.5412698", "0.5408797", "0.5406142", "0.5405189", "0.54044807", "0.5401339", "0.5395031", "0.5374104", "0.5365743", "0.53655684", "0.53622615", "0.5361434", "0.53536224", "0.5344395", "0.53411824", "0.5334031", "0.5319937", "0.53180134", "0.5313536" ]
0.70890963
0
generate new user emails checks for generic password
проверка новых email-адресов пользователей для общего пароля
public function generate_new_passwords() { // all users added with "password" will be automatically sent a welcome message // and new password $resetpassword = 'password'; // get users $user_list = $this->get_user->get_all_users(); // go through users foreach($user_list as $user) { // check if password is "password" $user_id = $user->user_id; if ($this->get_user->check_password($user_id, $resetpassword) == 1) { // generate simple random password $newpassword = uniqid(); // write new password to database $data = array( 'password' => $newpassword ); $this->get_user->update('user_id', $user_id, $data); // email user new password $this->send_password_mail($user_id, $newpassword); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateNewPassword($mail);", "static function password_expired_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n\n password_expired_email($user) ?\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você criar uma nova senha.\") :\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "private function emailAtLogin() {}", "public function create_password() {\n\t\tif(!empty($this->request->params['named']['email'])){\n\t\t\t$email = $this->request->params['named']['email'];\n\t\t}\n\t\t\n\t\t$authUserData = $this->Auth->user();\n\t\tif(empty($authUserData)){\n\t\t\t$this->Session->setFlash(__('There was an error logging you in and setting up a password. Your temporary password has been sent to your email address.', true));\n\t\t\t//Send the temporary password to the user's email address\n\t\t\t$options = array(\n\t\t\t\t\t\t\t\t'layout'=>'temporary_password',\n\t\t\t\t\t\t\t\t'subject'=>'Your Temporary Password',\n\t\t\t\t\t\t\t\t'view'=>'default'\n\t\t\t\t\t\t\t\t);\n\t\t\t$viewVars = array('temp_password'=>$authUserData['User']['email'],'user'=>$user);\n\n\t\t\t//Send the email\n\t\t\t$this->_sendEmail($email,$options,$viewVars);\n\t\t\t$this->redirect(array('controller'=>'users','action'=>'login'));\n\t\t}\n\t\t\n\t\t$user = $this->User->find('first',array('conditions'=>array('email'=>$authUserData['User']['email'])));\n\t\tif (!empty($this->request->data)) {\n\t\t\t$this->request->data['User']['id'] = $user['User']['id']; //Get the logged in user's id\n\t\t\tif ($this->User->verifyNewPassword($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('Password created.', true));\n\t\t\t\t$this->redirect(array('controller'=>'uploads','action'=>'index'));\n\t\t\t}\n\t\t}\n\t}", "public function send_password(){\n\t\t$tmpUsername = $_POST[\"txtUsername\"];\n\t\t$tmpEmail = $_POST[\"txtEmail\"];\n\t\t$inRepository = new InterfacePersonRepo;\n\t\t$tmpUser = $inRepository->getRepositoryByUsername($tmpUsername);\n\t\tif(count($tmpUser)>1){\n\t\t\texit();\n\t\t}\n\t\tif($tmpUser[0]->Email == $tmpEmail){\n\t\t\t$fgUser = new Person;\n\t\t\t$fgUser->setUsername($tmpUsername);\n\t\t\t$fgUser->setEmail($tmpEmail);\n\t\t\t$email = $inRepository->sendmailRepository($fgUser);\n\t\t\treturn View::make('alert/authen/alertEmail')->with('Email',$email);\n\t\t}else{\n\t\t\treturn View::make('alert/authen/alertEmail2');\n\t\t}\n\t}", "public function generateResetPassword()\n {\n $this->setRules([ StringLiterals::EMAIL => 'required|max:100|email' ]);\n $this->_validate();\n $this->_customer = $this->_customer->where('email', $this->request->email)->first();\n if (isset($this->_customer) && is_object($this->_customer) && ! empty($this->_customer->id)) {\n $this->_customer->access_otp_token = mt_rand();\n $this->_customer->save();\n $this->email = $this->email->fetchEmailTemplate('password_reset_otp');\n $this->email->content = str_replace([ '##USERNAME##','##OTP##' ], [ $this->_customer->name,$this->_customer->access_otp_token ], $this->email->content);\n $this->notification->email($this->_customer, $this->email->subject, $this->email->content);\n return true;\n }\n return false;\n }", "public function p_emailpassword(){\n\n # if javascript is disabled this checks if user entered email and password to login\n if (!$_POST['email']) {\n Router::redirect(\"/users/emailpassword/error\"); \n }\n # proceed with checking if email exists\n else { \n $q= 'Select user_id \n From users \n WHERE email=\"'.$_POST['email'].'\"';\n \n $user_id= DB::instance(DB_NAME)->select_field($q);\n \n #email doesnt exists\n if(!$user_id){ \n \n Router::redirect(\"/users/emailpassword/error1\"); \n }\n # email exists , email the password that is generated using generate_random_string\n else{\n $password=Utils::generate_random_string(8); \n $new_password=sha1(PASSWORD_SALT.$password);\n $new_modified= Time::now();\n\n $data=Array('modified'=>$new_modified,\n 'password'=>$new_password \n );\n $success= DB::instance(DB_NAME)->update('users',$data,'WHERE user_id=' .$user_id); \n \n \n $to[] = Array(\"name\" => $_POST['email'], \"email\" => $_POST['email']);\n $from = Array(\"name\" => APP_NAME, \"email\" => APP_EMAIL);\n $subject = \"Password reset message from \".APP_NAME; \n \n $body = \"This is the password: \".$password ;\n # Send email\n $sent = Email::send($to, $from, $subject, $body, FALSE, '');\n # IF EMAIL IS SENT and password update is successful proceed to login \n if($sent AND $success)\n Router::redirect('/users/login');\n # else error out, either send email failed or couldnt update database \n else\n Router::redirect('/users/emailpassword/error2');\n }\n } # end of first else \n }", "function userRandomPassword()\n{\n\n global $errorSearch;\n\n $length = 20;\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+-._#!?%';\n $charactersLength = strlen($characters);\n $randomString = '';\n\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n $password_hash = password_hash($randomString, PASSWORD_DEFAULT);\n\n if (database::getConnections()->updateAdminRandomPassword(\"userdata\", $_POST[\"userId\"], $password_hash) == true) {\n $errorSearch = '<p class=\"success\">Erfolgreich das Passwort geändert. Dem User wurde ein Random Passwort per E-Mail zugeschickt!</p>';\n\n // ACHTUNG // ACHTUNG // ACHTUNG // ACHTUNG // ACHTUNG // ACHTUNG // ACHTUNG // ACHTUNG\n // SPÄTER ENTFERNEN NUR ZUM AUSPROBIEREN UND SCHAUEN, SOLANGE AUCH DIE MAIL NICHT AUFTAUCHT!\n echo 'Das Neue Passwort von dem User lautet (Ohne Leerzeichen und \"\") = \"' . $randomString . '\" !';\n } else {\n $errorSearch = '<p class=\"error\">Es ist ein Fehler aufgetreten und das Passwort des Users konnte nicht abgeändert werden. Bitte wende dich an den Besitzer und Backend Developer!</p>';\n }\n\n $newMail = new mail();\n $newMail->randomPasswordMail($_POST[\"userEmail\"], $randomString);\n}", "public function forgot_pwd()\r\n {\r\n //provided the correct combination of user name and email address\r\n\r\n $username = htmlspecialchars($_POST['username']);\r\n $email = htmlspecialchars($_POST['email']);\r\n\r\n require_once 'database/profile.php';\r\n require_once 'database/session.php';\r\n\r\n $usernameId = getUserId($username);\r\n if (!$usernameId) {\r\n return \"Username does not exist.\";\r\n }\r\n\r\n $userInfo = getProfile($usernameId);\r\n if ($userInfo[\"email\"] != $email) {\r\n return \"Email doesn't match the one we have on file.\";\r\n }\r\n\r\n $password = getPassword($userId);\r\n return $this->send_forgotten_pwd($username, $password, $email);\r\n \r\n }", "function sendSignupEmail($user_id, $password){\n define('EMAIL_SUBJECT', 'MW Resource Checkout');\n $from = \"noreply@westwildcats.org\";\n $headers = \"From: $from\\r\\n\";\n $headers .= \"Content-type: text/html\\r\\n\";\n mail(getUserEmail($user_id), EMAIL_SUBJECT, genSignupEmail(getUsername($user_id), $password), $headers);\n}", "public function validateForgotPassword($input){\n $userData = array();\n $error=array();\n\n\n if(empty($input['email'])){\n $error = array_merge($error,array('email' => 'This field is required.'));\n }\n else{\n $cleanData = $this->cleanInput($input['email']);\n require_once('../app/Core/Database.php');\n $db = new Database();\n $conn = $db->setConnection();\n if($conn !== null){\n $stmt = $conn->query(\"SELECT username,email FROM user where email='\".$cleanData.\"'\");\n if($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n $username = $row['username'];\n $newPassword = uniqid();\n require '../app/vendor/autoload.php';\n $mail = new PHPMailer(true);\n try{\n $mail->isSMTP();// set mailer to use smtp\n $mail->Host = 'smtp.gmail.com'; //specify the smtp server\n $mail->SMTPAuth = true; // enable smtp authenticatiion\n $mail->Username = \"seralance2014@gmail.com\"; // SMTP username\n $mail->Password = \"hello@there123HT\"; // SMTP pasword\n $mail->SMTPSecure = \"tls\"; // Enable TLS encryption\n $mail->Port = 587; // TCP port to connect to\n\n // recipient\n $mail->setFrom(\"seralance2014@gmail.com\",\"Seralance\");\n $mail->addAddress($row['email'],$row['email']);\n \n //content\n $mail->isHTML(true); // set email format to html\n $mail->Subject = \"Forgotten password\";\n $msg =<<<EOT\n <html>\n <body>\n <div style=\"text-align: center;\">\n <img src=\"{$_SESSION['baseurl']}public/assets/images/seralance-logo.png\" alt=\"Seralance\">\n </div>\n \n <p style=\"text-align: center;\">\n Your username is {$username}.\n </p>\n <p style=\"text-align: center;\">\n Your newly generated password is {$newPassword}.\n </p>\n </body>\n </html>\n EOT;\n\n $mail->Body =$msg;\n\n $mail->send();\n $this->updatePassword(array('email'=>$row['email'],'newpassword'=>$newPassword));\n\n }\n catch(Exception $e){\n $error = array_merge($error,array('email' => 'Sorry for the inconvenience! We could not send a new password. Please try again later.'));\n } \n }\n else{\n $error = array_merge($error,array('email' => 'Email does not exist.'));\n } \n } \n }\n \n if(empty($error)){\n return array('valid'=>1 ,'data'=>$userData);\n }\n else{\n return array('valid'=>0,'error'=>$error);\n }\n\n \n }", "function generatePW($email){\n $pw = password_hash($email,PASSWORD_DEFAULT);\n return $pw;\n }", "public static function email_password_renew() {\n if ($u = static::check_record_existence()) {\n\n $m = auth_model();\n $u = $m::first(array('where' => 'id = \\'' . $u->id . '\\''));\n\n if ($u->emailPasswordRenew())\n flash('Email com as instruções para Renovação de senha enviado para ' . $u->email . '.');\n else\n flash('Algo ocorreu errado. Tente novamente mais tarde.', 'error');\n }\n\n go_paginate();\n }", "public function passwordEmail()\n {\n $this->shellshock(request(), [\n 'email' => 'required|email',\n 'g-recaptcha-response' => 'sometimes|recaptcha',\n ]);\n\n if (($user = app(config('turtle.models.user'))->where('email', request()->input('email'))->first())) {\n $token = Password::getRepository()->create($user);\n\n Mail::send(['text' => 'turtle::emails.password'], ['token' => $token], function (Message $message) use ($user) {\n $message->subject(config('app.name') . ' Password Reset Link');\n $message->to($user->email);\n });\n\n flash('success', 'Password reset link emailed!');\n\n return response()->json(['reload_page' => true]);\n }\n else {\n return response()->json(['errors' => ['email' => [trans('auth.failed')]]], 422);\n }\n }", "public function testRegisterLongEmail() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\t$this->first_name,\n\t\t\t$this->surname,\n\t\t\tstr_repeat('abc45', 6) + '@' + str_repeat('def90',4) + '.es'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}", "function sendEmailPassword($user_id, $password){\n\t\n\t $result = $GLOBALS['db']->query(\"SELECT email1, email2, first_name, last_name FROM users WHERE id='$user_id'\");\n\t $row = $GLOBALS['db']->fetchByAssoc($result);\n\t \n\t if(empty($row['email1']) && empty($row['email2'])){\n\t \n\t $_SESSION['login_error'] = 'Please contact an administrator to setup up your email address associated to this account';\n\t return;\n\t }\n\t \n\t require_once(\"include/SugarPHPMailer.php\");\n\t\t$notify_mail = new SugarPHPMailer();\n\t\t$notify_mail->CharSet = AppConfig::setting('email.default_charset');\n\t\t$notify_mail->AddAddress(((!empty($row['email1']))?$row['email1']: $row['email2']), $row['first_name'] . ' ' . $row['last_name'] );\n \n\t\tif (empty($_SESSION['authenticated_user_language'])) {\n\t\t\t$current_language = AppConfig::setting('locale.defaults.language');\n\t\t}\n\t\telse {\n\t\t\t$current_language = $_SESSION['authenticated_user_language'];\n\t\t}\n\n\t\t$notify_mail->Subject = 'info@hand Token';\n\t\t$notify_mail->Body = 'Your info@hand session authentication token is: ' . $password;\n\t\tif(AppConfig::setting('email.send_type') == \"SMTP\") {\n\t\t\t$notify_mail->Mailer = \"smtp\";\n\t\t\t$notify_mail->Host = AppConfig::setting('email.smtp_server');\n\t\t\t$notify_mail->Port = AppConfig::setting('email.smtp_port');\n\t\t\tif (AppConfig::setting('email.smtp_auth_req')) {\n\t\t\t\t$notify_mail->SMTPAuth = TRUE;\n\t\t\t\t$notify_mail->Username = AppConfig::setting('email.smtp_user');\n\t\t\t\t$notify_mail->Password = AppConfig::setting('email.smtp_password');\n\t\t\t}\n\t\t}\n\n\t\t$notify_mail->From = 'no-reply@' . AppConfig::setting(array('email.from_host_name', 'site.host_name'));\n\t\t$notify_mail->FromName = 'info@hand Authentication';\n\n\t\tif(!$notify_mail->Send()) {\n\t\t\t$GLOBALS['log']->warn(\"Notifications: error sending e-mail (method: {$notify_mail->Mailer}), (error: {$notify_mail->ErrorInfo})\");\n\t\t}\n\t\telse {\n\t\t\t$GLOBALS['log']->info(\"Notifications: e-mail successfully sent\");\n\t\t}\n\t\n\t\t\t\n\t\t\n\t}", "public function forgotpasswordAction()\n {\n $user_service = $this->getServiceLocator()->get('user');\n $email_sent = false;\n\n if ($this->getRequest()->isPost())\n {\n $data = $this->getRequest()->getPost();\n\n $email = trim($data['email']);\n $email = strtolower($email);\n $user_service->emailPassword($email);\n $email_sent = true;\n }\n\n return ['email_sent' => $email_sent];\n }", "function register(){\r\n\t\tif(!isset($_POST['username']) || !isset($_POST['email']) ){\r\n\t\t\r\n\t\t\t//build response\r\n\t\t\t$this->res->success = false;\r\n\t\t\t$this->res->message = \"Invalid Request\";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\r\n\t\t//get inputs\r\n\t\t$username = $_POST['username'];\r\n\t\t$email = $_POST['email'];\r\n\t\t\r\n\t\t$v = new DooValidator;\r\n\t\t//validate\r\n\t\tif(($error = $v->testEmail($_POST['email'])) != null){\r\n\t\t\t$this->res->success = false;\r\n\t\t\t$this->res->message = $error;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//check if username or email already exist in users db\r\n\t\t$u = Doo::db()->find('Users', array(\r\n\t\t\t'where' => \"username = :username OR email = :email\", \r\n\t\t\t'param' => array(':username' => $username, ':email' => $email)\r\n\t\t\t)\r\n\t\t);\r\n\t\t\r\n\t\t\r\n\t\tif(!empty($u)){\r\n\t\t\t//build response\r\n\t\t\t$this->res->success = false;\r\n\t\t\t$this->res->message = \"Username or Email already exist\";\r\n\t\t\treturn;\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//generate temp password\r\n\t\t$tmpPassword = $this->str_rand(6);\r\n\t\t\r\n\r\n\t\t//send email with temp password\r\n\t\t$to = $email;\r\n\r\n\t\t// Your subject\r\n\t\t$subject = \"Your temp password here\";\r\n\r\n\t\t// From\r\n\t\t$header=\"from: Register-EVAS <sandip.sandhu@ericsson.com>\";\r\n\t\t//$header = null;\r\n\t\t\r\n\t\t// Your message\r\n\t\t$message = \"Your Comfirmation password \\r\\n\";\r\n\t\t$message.= \"$tmpPassword\";\r\n\t\t\r\n\t\t//ini_set ( \"SMTP\", \"smtp-server.example.com\" ); \r\n\t\t\r\n\t\t// send email\r\n\t\tif(!mail($to, $subject, $message, $header)){\r\n\t\t\t//build response\r\n\t\t\t$this->res->success = false;\r\n\t\t\t$this->res->message = \"Error sending email to $email\";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//store new user temp password \r\n\t\tDoo::loadModel('Users');\r\n\t\t$u = new Users;\r\n\t\t$u->username = $username;\r\n\t\t$u->email = $email;\r\n\t\t$u->isEnabled = 1;\r\n\t\t$u->change_password_on_login = 1;\r\n\t\t$u->password = md5($tmpPassword);\r\n\t\t$u->default_basemap = \"Google Streets\";\r\n\t\t$u->cluster_zoom_level = 15;\r\n\t\t$u->is_enabled = 1;\r\n\t\t $u->client = \"T-Mobile\";\r\n\t\t$u->insert();\r\n\t\t\t\r\n\t\t//success!\r\n\t\t$this->res->success = true;\r\n\t}", "function genSignupEmail($username, $password){\n $reg_email = \"\n <h3>Welcome to Millard West Resource Checkout</h3>\n <ul>\n <li>You can use this web app to checkout school resources\n <li>This is the sole method for checking out laptop carts and computer labs\n <li>The Media Center computers are <em>not</em> managed by this system\n </ul>\n\n <p>\n Your new login information is:\n <ul style=\\\"list-style-type:none;\\\">\n <li>Username: $username\n <li>Password: $password\n </ul>\n </p>\n\n <p>Please change your password the first time you login.</p>\n\n <p>To do this:</p>\n <ol>\n <li>Go to the settings tab\n <li>Type in your current password\n <li>Enter your new password twice\n </ol>\n\n <a href=\\\"http://i.westwildcats.org/checkout/\\\">MW Checkout</a>\n \";\n return $reg_email;\n}", "function register($name, $email, $password, $password2) {\n\t\tglobal $pdo;\n\n\t\t//delete old registration attempts\n\t\t$pdo->query(\"DELETE FROM user WHERE verified = 0 AND TIME_TO_SEC(TIMEDIFF(CURRENT_TIMESTAMP, code_generation_time)) > 600\");\n\n\t\t//empty or array check\n\t\tif(empty($name) || is_array($name) || empty($email) || is_array($email) || empty($password) || is_array($password) || empty($password2) || is_array($password2)) {\n\t\t\treturn 1;\n\t\t}\n\n\t\t//check if passwords match\n\t\tif($password !== $password2) {\n\t\t\treturn 2;\n\t\t}\n\n\t\t//check if the password, user name and email meets our requirements\n\t\tif(!password_security_check($password) || !valid_name_check($name) || strlen($email) > 256) {\n\t\t\treturn 3;\n\t\t}\n\n\t\t//check if email is already used\n\t\t$sql = \"SELECT email FROM user WHERE REPLACE(email, \\\".\\\", \\\"\\\") = REPLACE(:email, \\\".\\\", \\\"\\\")\";\n $sth = $pdo->prepare($sql);\n\t\t$sth->bindValue(\":email\", mail_simplify($email), PDO::PARAM_STR);\n $sth->execute();\n\n\t\tif($sth->rowCount() != 0) {\n\t\t\treturn 4;\n\t\t}\n\n\t\t//generate verification code\n\t\t$verification_code = hash(\"sha256\", microtime() . (string)rand() . $email);\n\t\t//hash password\n\t\t$password_hash = password_hash($password, PASSWORD_BCRYPT);\n\n\t\t//get data required for email\n\t\t$reg_link = \"https://swapitg.com/firstlogin/$verification_code\";\n\t\t$subject = \"Registration\";\n\t\t$mailfile = fopen(__DIR__ . \"/register_mail_template.html\", \"r\") or die(\"Unable to open file!\");\n\t\t$message = strtr(fread($mailfile, filesize(__DIR__ . \"/register_mail_template.html\")), array('$reg_link' => $reg_link, '$name' => htmlspecialchars($name)));\n\t\tfclose($mailfile);\n\t\t$sender_email = \"no-reply@swapitg.com\";\n\t\t$sender_name = \"SwapitG no-reply\";\n\n\t\t//send email\n\t\tif(mail($email, $subject, wordwrap($message, 70, \"\\r\\n\"), \"From: $sender_name<$sender_email>\\r\\nContent-type: text/html; charset=utf-8\", \" -f \" . $sender_email)) {\n\t\t\t//if mail send sucessfully create new user wich is not verified yet\n\t\t\t$sql = \"INSERT INTO user (email, name, password, verification_code) VALUES (:email, :name, :password_hash, :verification_code)\";\n\t $sth = $pdo->prepare($sql);\n\t\t\t$sth->bindValue(\":email\", mail_simplify($email), PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":name\", htmlspecialchars($name), PDO::PARAM_STR);\n\t\t\t$sth->bindParam(\":password_hash\", $password_hash, PDO::PARAM_STR);\n\t\t\t$sth->bindParam(\":verification_code\", $verification_code, PDO::PARAM_STR);\n\t $sth->execute();\n\n\t\t\t//set email and password in the session for easier verification if the user verifies the email in the same session\n\t\t\tstart_session();\n\t\t\t$_SESSION[\"reg_email\"] = $email;\n\t\t\t//xor password for security reasons\n\t\t\t$_SESSION[\"reg_password\"] = $password ^ substr(str_pad($verification_code, strlen($password), $verification_code), 0, strlen($password));\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn 5;\n\t\t}\n\t}", "function testGeneratePassword() {\r\n $this->User = new User();\r\n \t\t$pass = $this->User->generatePassword(); \t\r\n \t$this->assertNotNull($pass);\r\n \t$this->assertPattern('#[a-zA-Z0-9]{6,15}#', $pass, 'Password is not between 6 and 15 chars long');\r\n }", "public function forgot_password() {\n $flash = null;\n // if the user has tried logging in\n if(isset($_POST['username'])){\n $email = $_POST['username'];\n $user = $this->User->getByEmail($email);\n $pass = rand(111111, 999999);\n if($this->User->setPassword($user['id'], $pass)) {\n $text = <<<END\nBecause of a request on our site, your password has been reset. To change your password, go to /users/change_password\nYour username is: {$email}\nYour password is: {$pass}\nEND;\n $email = self::getLib('email');\n $html = $email->text2html($text, email);\n $email->setSender('support');\n $email->setReplyTo('support');\n $email->setRecipients( array($recipient) );\n $email->setSubject(\"Your password has been reset\");\n $email->addMessagePart($text);\n $email->addMessagePart($html, \"html\");\n $email->send();\n $flash = \"An email with your new password has been sent to you. You should receive it shortly.\";\n } else {\n $flash = \"An error occured.\";\n }\n } else {\n $flash = \"Please enter a user name.\";\n }\n return array('flash' => $flash);\n }", "public function forgotPassword()\n { \n $siteUrl = ($this->request->type)?env('WEB_SITE_AUDIO_URL'):env('WEB_SITE_URL');\n $this->setRules([ 'email' => 'required|exists:customers,email' ]);\n $this->setMessages('email.exists', trans('customer::customer.email_not_registered'));\n $this->_validate();\n $newPassword = str_random(8);\n $user = $this->_customer->where('email', $this->request->email)->first();\n $user->forgot_password = $newPassword;\n $user->save();\n if (!empty($user) && count($user->toArray()) > 0) {\n $this->email = $this->email->fetchEmailTemplate('forgot_password');\n $this->email->subject = str_replace(['##SITE_NAME##'], [config ()->get ( 'settings.general-settings.site-settings.site_name' )], $this->email->subject);\n $this->email->content = str_replace([ '##USERNAME##','##FORGOTPASSWORD##' ], [ $user->name, $siteUrl.'reset-password' . '/' . $user->forgot_password ], $this->email->content);\n $this->notification->email($user, $this->email->subject, $this->email->content);\n }\n return true;\n }", "function generatePassword() {\n // 57 prefixes\n $aPrefix = array('aero', 'anti', 'ante', 'ande', 'auto', \n 'ba', 'be', 'bi', 'bio', 'bo', 'bu', 'by', \n 'ca', 'ce', 'ci', 'cou', 'co', 'cu', 'cy', \n 'da', 'de', 'di', 'duo', 'dy', \n 'eco', 'ergo', 'exa', \n 'geo', 'gyno', \n 'he', 'hy', 'ki',\n 'intra', \n 'ma', 'mi', 'me', 'mo', 'my', \n 'na', 'ni', 'ne', 'no', 'ny', \n 'omni', \n 'pre', 'pro', 'per', \n 'sa', 'se', 'si', 'su', 'so', 'sy', \n 'ta', 'te', 'tri',\n 'uni');\n\n // 30 suffices\n $aSuffix = array('acy', 'al', 'ance', 'ate', 'able', 'an', \n 'dom', \n 'ence', 'er', 'en',\n 'fy', 'ful', \n 'ment', 'ness',\n 'ist', 'ity', 'ify', 'ize', 'ise', 'ible', 'ic', 'ical', 'ous', 'ish', 'ive', \n 'less', \n 'sion',\n 'tion', 'ty', \n 'or');\n\n // 8 vowel sounds \n $aVowels = array('a', 'o', 'e', 'i', 'y', 'u', 'ou', 'oo'); \n\n // 20 random consonants \n $aConsonants = array('w', 'r', 't', 'p', 's', 'd', 'f', 'g', 'h', 'j', \n 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm', 'qu');\n\n // Some consonants can be doubled\n $aDoubles = array('n', 'm', 't', 's');\n\n // \"Salt\"\n $aSalt = array('!', '#', '%', '?');\n\n $pwd = $aPrefix[array_rand($aPrefix)];\n\n // add random consonant(s)\n $c = $aConsonants[array_rand($aConsonants)];\n if ( in_array( $c, $aDoubles ) ) {\n // 33% chance of doubling it\n if (rand(0, 2) == 1) { \n $c .= $c;\n }\n }\n $pwd .= $c;\n\n // add random vowel\n $pwd .= $aVowels[array_rand($aVowels)];\n\n $pwdSuffix = $aSuffix[array_rand($aSuffix)];\n // If the suffix begins with a vovel, add one or more consonants\n if ( in_array( $pwdSuffix[0], $aVowels ) ) {\n $pwd .= $aConsonants[array_rand($aConsonants)];\n }\n $pwd .= $pwdSuffix;\n\n $pwd .= rand(2, 999);\n # $pwd .= $aSalt[array_rand($aSalt)];\n\n // 50% chance of capitalizing the first letter\n if (rand(0, 1) == 1) {\n $pwd = ucfirst($pwd);\n }\n return $pwd;\n }", "function forgotPassword(){\n\t\t\t$this->__dataDecode();\n\t\t\tif(!empty($this->data)){\n\t\t\t$data = $this->data;\n\t\t\t$username = $data['User']['userName'];\n\t\t\t$userDetail = $this->User->find('first',array('conditions'=>array(\"User.username \"=> $username)));\n\t\t\tif($username==null){\n\t\t\t\techo $username;\n\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t$response['response']['message']\t= 'please Enter userName';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\telse{ \n\t\t\t\t$userID = $userDetail['User']['id'];\n\t\t\t\t$data = $this->data;\n\t\t\t\t$email_to = $userDetail['User']['email'];\n\t\t\t\tif($userDetail['User']['username'] == ($username)){\n\t\t\t\t\t$password= $this->createRandomPassword();\n\t\t\t\t\t$new_password=md5($password);\n\t\t\t\t\t$this->User->id = $userID;\n\t\t\t\t\t$this->data['User']['password'] = trim($new_password);\n\t\t\t\t\tunset($this->User->validate['password']);\n \t\t\t\t\tunset($this->User->validate['confirm_password']);\n\t\t\t\t\tif($this->User->save($this->data)){\n\t\t\t\t\t\t//Default Mail component is called, to send mail. We are setting the variables for sending email\n\t\t\t\t\t\t$this->Email->to = $email_to;\n\t\t\t\t\t\t//$this->Email->bcc = array($adminEmail);\n\t\t\t\t\t\t$this->Email->subject = 'Your password here';\n\t\t\t\t\t\t$this->Email->replyTo = EMAIL_REPLY;\n\t\t\t\t\t\t$this->Email->from = \"iWrestled admin <\".EMAIL_REPLY.\">\";\n\t\t\t\t\t\t//Here, the element in /views/elements/email/html/ is called to create the HTML body\n\t\t\t\t\t\t$this->Email->template = 'simple_message'; // note no '.ctp'\n\t\t\t\t\t\t//Send as 'html', 'text' or 'both' (default is 'text')\n\t\t\t\t\t\t$this->Email->sendAs = 'both'; // because we like to send pretty mail\n\t\t\t\t\t\t//Set view variables as normal\n\t\t\t\t\t\t$this->set('userDetail', $userDetail);\n\t\t\t\t\t\t$this->set(\"password\", $password);\n\t\t\t\t\t\t//Do not pass any args to send()\n\t\t\t\t\t\tif($this->Email->send()){\n\t\t\t\t\t\t\t$response['error']\t\t\t= 0;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'success';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'Password send to your email id';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{ \n\t\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'Password Enter valid email id';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}", "function userSetTemporaryPassword($email) {\n\tqbLogin();\n\tglobal $qb;\n\tglobal $temp_password;\n\t$response = $qb->DoQuery(C_DBID_USERS, \"{'\".C_FID_USER_EMAIL.\"'.EX.'\".$email.\"'}\", 'a');\n\tif (isset($response[0]['3'])) {\n\t\t// Generate and encrypt a temporary password\n\t\t//$temp_password = random_string(10);\n\t\t$temp_password = random_str(10);\n\t\t//$temp_password = substr(bin2hex(openssl_random_pseudo_bytes(128)),0,10);\n\t\t$enc_temp_password = encrypt($temp_password);\n\t\t$fields = array(\n\t\t\tarray(\n\t\t\t\t'fid' => C_FID_USER_TEMPORARY_PASSWORD,\n\t\t\t\t'value' => $enc_temp_password\n\t\t\t)\n\t\t);\n\t\t$qb->EditRecord(C_DBID_USERS, $response[0]['3'], $fields); // Save the temporary password in QuickBase\n\t\tsendMail($email, null, 'forgot', $temp_password); // Send the user their temporary password\n\t}\n}", "function user_regenerate_password() {\n\t\t$this->left_menu_list = array();\n\t\t\n\t\tif (isset($this->data)) {\n\t\t\t$user = $this->User->find('first', array(\n\t\t\t\t'conditions' => array('User.email' => $this->data['User']['email']),\n\t\t\t\t'contain' => array()\n\t\t\t));\n\t\t\tif (empty($user)) {\n\t\t\t\t$this->Session->setFlash('Uživatel se zadanou emailovou adresou neexistuje.');\n\t\t\t} else {\n\t\t\t\t// udelam hash, pomoci ktereho budu moci identifikovat uzivatele a zaslu ho na jeho emailovou adresu (v dane url)\n\t\t\t\t$hash = $this->User->createHash($user);\n\t\t\t\tif ($this->User->sendHash($user, $hash)) {\n\t\t\t\t\t$this->Session->setFlash('Výzva k potvrzení změny hesla byla odeslána.');\n\t\t\t\t} else {\n\t\t\t\t\t$this->Session->setFlash('Výzvu k potvrzení změny hesla se nepodařilo odeslat.');\n\t\t\t\t}\n\t\t\t\t$this->redirect(array('controller' => 'users', 'action' => 'login'));\n\t\t\t}\n\t\t}\n\t}", "public function emailUser () {\n\t\t\t// Load the data helper class and get user instance\n\t\t\t$data = Mage::helper (\"twofactor/data\");\n\t\t\t$user = Mage::getSingleton (\"admin/session\")->getUser ();\n\t\t\t// Load the authentication model that belongs with logged in user\n\t\t\t$auth = Mage::getModel (\"twofactor/auth\");\n\t\t\t$auth->load ( $user->getUserId () );\n\t\t\t$auth->setId ( $user->getUserId () );\n\t\t\t// Construct the user contact's full name\n\t\t\t$fullName = ucfirst ( $user->getFirstname () ) . \" \";\n\t\t\t$fullName .= ucfirst ( $user->getLastname () );\n\t\t\t// Format timestamp date and time\n\t\t\t$timestamp = $auth->getLastTimestamp ();\n\t\t\t$timestampDate = \"-\";\n\t\t\t$timestampTime = \"-\";\n\t\t\tif ( $timestamp !== null ) {\n\t\t\t\t$timestampDate = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\"m/d/Y\", strtotime ( $timestamp )\n\t\t\t\t);\n\t\t\t\t$timestampTime = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\"h:i:s A\", strtotime ( $timestamp )\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Construct and send out ban notice email to user\n\t\t\t$template = Mage::getModel (\"core/email_template\")->loadDefault (\"twofactor_user\");\n\t\t\t$template->setSenderEmail ( Mage::getStoreConfig (\"trans_email/ident_general/email\") );\n\t\t\t$template->setSenderName (\"JetRails 2FA Module\");\n\t\t\t$template->setType (\"html\");\n\t\t\t$template->setTemplateSubject (\n\t\t\t\tMage::helper (\"twofactor\")->__(\"Your Magento admin account is locked\")\n\t\t\t);\n\t\t\t$template->send ( $user->getEmail (), $fullName,\n\t\t\t\tarray (\n\t\t\t\t\t\"base_url\" => Mage::getBaseUrl ( Mage_Core_Model_Store::URL_TYPE_WEB ),\n\t\t\t\t\t\"last_timestamp_date\" => $timestampDate,\n\t\t\t\t\t\"last_timestamp_time\" => $timestampTime,\n\t\t\t\t\t\"ban_attempts\" => $data->getData () [\"ban_attempts\"],\n\t\t\t\t\t\"ban_time\" => $data->getData () [\"ban_time\"],\n\t\t\t\t\t\"username\" => $user->getUsername (),\n\t\t\t\t\t\"year\" => date (\"Y\")\n\t\t\t\t)\n\t\t\t);\n\t\t}", "private function send_new_password_email( $email, $new_password ){\n\t\t\n\t\t$user = $this->mysqli->get_user( $email, md5( $new_password ) );\n\t\t\n\t\t$email_logo_url = get_option( 'ec_option_email_logo' );\n\t \t\n\t\t// Get receipt\n\t\tob_start();\n if( file_exists( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_retrieve_password_email.php' ) )\t\n\t\t\tinclude( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_retrieve_password_email.php' );\t\n\t\telse\n\t\t\tinclude( WP_PLUGIN_DIR . \"/\" . EC_PLUGIN_DIRECTORY . '/design/layout/' . get_option( 'ec_option_latest_layout' ) . '/ec_account_retrieve_password_email.php' );\n\t\t$message = ob_get_contents();\n\t\tob_end_clean();\n\t\t\n\t\t$headers = array();\n\t\t$headers[] = \"MIME-Version: 1.0\";\n\t\t$headers[] = \"Content-Type: text/html; charset=utf-8\";\n\t\t$headers[] = \"From: \" . get_option( 'ec_option_password_from_email' );\n\t\t$headers[] = \"Reply-To: \" . get_option( 'ec_option_password_from_email' );\n\t\t$headers[] = \"X-Mailer: PHP/\".phpversion();\n\t\t\n\t\t$email_send_method = get_option( 'ec_option_use_wp_mail' );\n\t\t$email_send_method = apply_filters( 'wpeasycart_email_method', $email_send_method );\n\t\t\n\t\tif( $email_send_method == \"1\" ){\n\t\t\twp_mail( $email, $GLOBALS['language']->get_text( \"account_forgot_password_email\", \"account_forgot_password_email_title\" ), $message, implode(\"\\r\\n\", $headers));\n\t\t\n\t\t}else if( $email_send_method == \"0\" ){\n\t\t\tmail( $email, $GLOBALS['language']->get_text( \"account_forgot_password_email\", \"account_forgot_password_email_title\" ), $message, implode(\"\\r\\n\", $headers));\n\t\t\t\n\t\t}else{\n\t\t\tdo_action( 'wpeasycart_custom_forgot_password_email', get_option( 'ec_option_password_from_email' ), $email, \"\", $GLOBALS['language']->get_text( \"account_forgot_password_email\", \"account_forgot_password_email_title\" ), $message );\n\t\t\t\n\t\t}\n\t\t\n\t}", "function sendUserForgotPassword($argArrPOST) {\n\n @extract($argArrPost);\n $objValid = new Validate_fields;\n $objCore = new Core();\n $objValid->check_4html = true;\n\n $objValid->add_text_field('Email', strip_tags($argArrPOST['frmUserLoginEmail']), 'email', 'y');\n\n if ($objValid->validation()) {\n $errorMsgFirst = 'Please enter valid email address!';\n } else {\n $errorMsg = $objValid->create_msg();\n }\n if ($errorMsg) {\n $objCore->setErrorMsg($errorMsg);\n return false;\n } else {\n $arrUserFlds = array('pkUserID', 'UserFirstName', 'UserEmail', 'UserPassword');\n $varUserWhere = ' 1 AND UserEmail = \\'' . trim($argArrPOST['frmUserLoginEmail']) . '\\'';\n $arrUserList = $this->select(TABLE_USERS, $arrUserFlds, $varUserWhere);\n if ($arrUserList) {\n //update the random key in the database\n\n $varRandomPassword = $this->generate_random_string(5); //die;\n\n\n $varRandomKey = md5(uniqid(microtime()));\n $arrUpdateArray = array('UserAuthorizationToken' => $varRandomKey, 'UserPassword' => md5($varRandomPassword));\n $varaffectedRecord = $this->update(TABLE_USERS, $arrUpdateArray, $varUserWhere);\n\n\n\n $argUserName = $arrUserList[0]['UserEmail'];\n //$argPassword = $arrUserList[0]['UserPassword'];\n $argPassword = $varRandomPassword;\n $argFirstName = $arrUserList[0]['UserFirstName'];\n\n //Send forget Password To User\n $varPath = '<img src=\"' . SITE_ROOT_URL . 'common/images/logo2.png' . '\"/>';\n\n $varToUser = $argArrPOST['frmUserLoginEmail'];\n $varFromUser = SITE_NAME . '<' . SITE_EMAIL_ADDRESS . '>';\n $varSubject = 'Venueset:Login Details';\n $varResetPasswordlink = '<a href=\"' . SITE_ROOT_URL . 'reset_password.php?userId=' . $arrUserList[0]['pkUserID'] . '&authorizationToken=' . base64_encode($varRandomKey) . '\">Reset Password</a>';\n $varOutput = file_get_contents(SITE_ROOT_URL . 'common/email_template/html/user_forget_password.html');\n $varUnsubscribeLink = 'Click <a href=\"' . SITE_ROOT_URL . 'unsubscribe.php?user=' . md5(trim($argArrPOST['frmUserLoginEmail'])) . '\" target=\"_blank\">here</a> to unsubscribe.';\n\n $arrBodyKeywords = array('{USER_FIRST_NAME}', '{USER_NAME}', '{USER_PASSWORD}', '{IMAGE_PATH}', '{SITE_NAME}', '{RESET_PASSWORD_LINK}', '{UNSUBSCRIBE_LINK}');\n\n $arrBodyKeywordsValues = array($argFirstName, $argUserName, $argPassword, $varPath, SITE_NAME, $varResetPasswordlink, $varUnsubscribeLink);\n $varBody = str_replace($arrBodyKeywords, $arrBodyKeywordsValues, $varOutput);\n //echo $varBody;die;\n $objCore->sendMail($varToUser, $varFromUser, $varSubject, $varBody);\n $objCore->setSuccessMsg(FRON_END_USER_FORGET_PASSWORD_SEND);\n return true;\n } else {\n $objCore->setErrorMsg(FRON_END_USER_EMAIL_EXIST_ERROR);\n return false;\n }\n }\n }", "function textAndEmailUserPassword($mysqli, $userId, $plainTextPassword) {\n\t// email\n\t$email_to = getUsersEmail ( $mysqli, $userId );\n\t$email_subject = \"Your Password\";\n\t$email_message = \"Password: $plainTextPassword\";\n\tmail ( $email_to, $email_subject, $email_message );\n\t// text message\n\t$userPhoneNumber = getUsersPhoneNumber ( $mysqli, $userId );\n\t$userCellCarrier = getUserCellCarrier ( $mysqli, $userId );\n\t$text_to = $userPhoneNumber . $userCellCarrier;\n\t$text_subject = \"Your Password\";\n\t$text_message = \"Password: $plainTextPassword\";\n\tmail ( $text_to, $text_subject, $text_message );\n}", "public function forgot_password_post()\n\t{\n\t\t$array['username'] = strtolower($this->post('username'));\n\n\t\t$error = [];\n\n\t\tif (filter_var($array['username'], FILTER_VALIDATE_EMAIL) \n\t\t\tOR preg_match('/^[A-Za-z][A-Za-z0-9]{5,100}$/', $array['username'])) {\n\n\t\t\tif (empty($array['username'])) {\n\t\t\t\t$this->response(['status' => FALSE, 'error' => 'Username is empty'], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t} else {\n\t\t\t\t$validate_user = $this->api_model->validate_user($array['username'], $array['username']);\n\t\t\t\t\n\t\t\t\tif ($validate_user) {\n\t\t\t\t\t$new_password = $this->get_random_string();\n\t\t\t\t\t$update_user = $this->api_model->update_password($validate_user, $new_password);\n\t\t\t\t\tif ($update_user) {\n\t\t\t\t\t\t$send_email = $this->send_email($validate_user['email'], $new_password);\n\t\t\t\t\t\tif ($send_email) {\n\t\t\t\t\t\t\t$this->response(['status' => TRUE, 'message' => 'New password sent to email'], REST_Controller::HTTP_OK);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->response(['status' => FALSE, 'error' => ['Something went wrong']], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->response(['status' => FALSE, 'error' => ['Password update failed']], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->response(['status' => FALSE, 'error' => ['Username or email is incorrect']], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$error[] = 'Invalid username format.';\n\t\t\t$this->response(['status' => FALSE, 'error' => $error], REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\t}", "public function regeneratePassword(string $email): void;", "function makeUser($firstname, $lastname, $username, $email, $department, $isReadOnly){\n $password = genPassword(7);\n $md5_password = md5($password);\n sqlQuery(\"INSERT INTO users SET user_firstname='$firstname', user_lastname='$lastname', user_username='$username', user_email='$email', user_isreadonly='$isReadOnly', user_department='$department', user_password='$md5_password'\");\n sendSignupEmail(getUserId($username), $password);\n alog(\"Added user $username\");\n}", "public static function password() {\n if ( !isset($_POST['email']) ) {\n return;\n }\n \n $password = substr(Helper::hash(rand(0,16^32).$_POST['email']),0,12);\n \n $result = Database::checkUser($_POST['email']);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzer!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n return;\n }\n \n $id = $result[0]['id'];\n $passwordold = $result[0]['password'];\n \n $pw = Helper::hash($password.$_POST['email']);\n \n $success = Database::setPassword($id,$passwordold,$pw);\n if ( $success !== false ) {\n self::passwordMail($_POST['email'],$password);\n self::setError('Ein neues Passwort wurde dir zugeschickt!<br>');\n } else {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n }\n }", "public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "static function password_forgot() {\n $model = \\Auth::$model;\n\n # hash GET param exists\n if (!$hash = data('hash'))\n go('/');\n\n # user hash exists\n $user = $model::first(array(\n 'fields' => 'id, email, name',\n 'where' => \"hash_password_forgot = '$hash'\"\n ));\n\n if (empty($user))\n go('/');\n\n # POST passwords sent\n if ($model::data()) {\n $user->password = $model::data('password');\n $user->password_confirm = $model::data('password_confirm');\n\n # validate passwords\n if ($user->validate()) {\n $user->password = auth_encrypt($user->password);\n $user->hash_password_forgot = '';\n\n $user->edit() ?\n flash('Sua senha foi alterada com sucesso.') :\n flash('Algo ocorreu errado. Entre em contrato com a empresa.', 'error');\n\n go('/');\n }\n }\n\n globals('user', $user);\n }", "public function forgotpasswordAction() {\n $form = new Admin_Form_ResendPassword();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n //check user is registered\n $values = $form->getValues();\n $siteUsersMapper = new Application_Model_Table_AdminUsers();\n $exists = $siteUsersMapper->fetchByUsername($values['email_address']);\n if($exists){\n //user exists\n $recoveryEmailsMapper = new Application_Model_Table_AdminUserRecoveryEmails();\n $recoveryEmail = $recoveryEmailsMapper->createRow();\n $recoveryEmail->admin_user_id = $exists->admin_user_id;\n $recoveryEmail->email_address = $exists->username;\n $recoveryEmail->hashActivationKey();\n $recoveryEmail->save();\n }\n $this->_helper->FlashMessenger->addMessage('You password has been reset, please check your email' , 'successful');\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-dashboard', true);\n }\n }\n $this->view->form = $form;\n }", "public function testSendPasswordRecoveryEmail()\n {\n }", "protected function handleGeneratePasswordTemplate()\n {\n $id = $this->config['passwordsetting']['generatepasswordtmpl'];\n if (empty($id)) {\n return;\n }\n $bodyHtml = $this->getEmailTemplateBodyHtml($id);\n $find = '<p> $contact_user_link_guid </p>';\n\n if (!empty($bodyHtml) && false !== strpos($bodyHtml, $find)) {\n $replace = '<p> <a title=\"$contact_user_link_guid\" href=\"$contact_user_link_guid\">$contact_user_link_guid</a> </p>';\n $bodyHtml = str_replace($find, $replace, $bodyHtml);\n\n $this->updateEmailTemplateBodyHtml($id, $bodyHtml);\n }\n }", "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 }", "function register_resend_email($email) {\n\t\tglobal $pdo;\n\n\t\t//delete old registration attempts\n\t\t$pdo->query(\"DELETE FROM user WHERE verified = 0 AND TIME_TO_SEC(TIMEDIFF(CURRENT_TIMESTAMP, code_generation_time)) > 600\");\n\n\t\t//empty or array check\n\t\tif(empty($email) || is_array($email)) {\n\t\t\treturn 1;\n\t\t}\n\n\t\t//check if email exists and is not verified\n\t\t$sql = \"SELECT name, verification_code FROM user WHERE REPLACE(email, \\\".\\\", \\\"\\\") = REPLACE(:email, \\\".\\\", \\\"\\\") AND verified = 0\";\n\t\t$sth = $pdo->prepare($sql);\n\t\t$sth->bindValue(\":email\", mail_simplify($email), PDO::PARAM_STR);\n\t\t$sth->execute();\n\n\t\tif($sth->rowCount() == 0) {\n\t\t\t//check if email exists but is already verified\n\t\t\t$sql = \"SELECT id FROM user WHERE REPLACE(email, \\\".\\\", \\\"\\\") = REPLACE(:email, \\\".\\\", \\\"\\\") AND verified = 1\";\n\t\t\t$sth2 = $pdo->prepare($sql);\n\t\t\t$sth2->bindValue(\":email\", mail_simplify($email), PDO::PARAM_STR);\n\t\t\t$sth2->execute();\n\n\t\t\tif($sth2->rowCount() == 0) {\n\t\t\t\treturn 2;\n\t\t\t} else {\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t}\n\n\t\t//get data required for email\n\t\t$name_verification_code = $sth->fetch();\n\t\t$name = $name_verification_code[\"name\"];\n\t\t$verification_code = $name_verification_code[\"verification_code\"];\n\n\t\t$reg_link = \"https://swapitg.com/firstlogin/$verification_code\";\n\t\t$subject = \"Registration\";\n\t\t$mailfile = fopen(__DIR__ . \"/register_mail_template.html\", \"r\") or die(\"Unable to open file!\");\n\t\t$message = strtr(fread($mailfile, filesize(__DIR__ . \"/register_mail_template.html\")), array('$reg_link' => $reg_link, '$name' => htmlspecialchars($name)));\n\t\tfclose($mailfile);\n\t\t$sender_email = \"no-reply@swapitg.com\";\n\t\t$sender_name = \"SwapitG no-reply\";\n\n\t\t//send email\n\t\tif(mail($email, $subject, wordwrap($message, 70, \"\\r\\n\"), \"From: $sender_name<$sender_email>\\r\\nContent-type: text/html; charset=utf-8\", \" -f \" . $sender_email)) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn 4;\n\t\t}\n\t}", "public function verifyAction()\n {\n $email = Request::post('email', Filter::FILTER_EMAIL, false);\n\n if (!$email || !Validator_Email::validate($email)) {\n Response::jsonError($this->moduleLang->get('email_invalid'));\n }\n\n $model = Model::factory('User');\n\n $userIds = $model->getList(\n ['limit' => 1],\n [\n 'email' => $email,\n 'enabled'=> true\n ],\n ['id']\n );\n\n if (count($userIds) == 0) {\n Response::jsonError($this->moduleLang->get('email_user_unknown'));\n }\n\n $userId = $userIds[0]['id'];\n\n $user = Db_Object::factory('User', $userId);\n $authCode = Utils::hash(uniqid(time(),true));\n\n $confDate = new DateTime('now');\n $confDate = $confDate->add(new DateInterval('P1D'))->format('Y-m-d H:i:s');\n\n try{\n $user->setValues(array(\n 'confirmation_code' => $authCode,\n 'confirmation_expiried' => $confDate\n ));\n if(!$user->save())\n throw new Exception('Cannot update user info');\n }catch (Exception $e){\n Response::jsonError($this->_lang->get('CANT_EXEC'));\n }\n\n $this->sendEmail($user);\n\n Response::jsonSuccess(array(\n 'msg' => $this->moduleLang->get('pwd_success')\n ));\n }", "function procForgotPass() {\n global $database, $session, $mailer, $form;\n /* Username error checking */\n $subuser = $_POST['user'];\n $field = \"user\"; //Use field name for username\n if (!$subuser || strlen($subuser = trim($subuser)) == 0) {\n $form->setError($field, \"Username not entered<br>\");\n } else {\n /* Make sure username is in database */\n $subuser = stripslashes($subuser);\n if (strlen($subuser) < 5 || strlen($subuser) > 30 ||\n !eregi(\"^([0-9a-z])+$\", $subuser) ||\n (!$database->usernameTaken($subuser))) {\n $form->setError($field, \"Username does not exist<br>\");\n }\n }\n\n /* Errors exist, have user correct them */\n if ($form->num_errors > 0) {\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $form->getErrorArray();\n }\n /* Generate new password and email it to user */ else {\n /* Generate new password */\n $newpass = $session->generateRandStr(8);\n\n /* Get email of user */\n $usrinf = $database->getUserInfo($subuser);\n $email = $usrinf['email'];\n\n /* Attempt to send the email with new password */\n if ($mailer->sendNewPass($subuser, $email, $newpass)) {\n /* Email sent, update database */\n $database->updateUserField($subuser, \"password\", md5($newpass));\n $_SESSION['forgotpass'] = true;\n }\n /* Email failure, do not change password */ else {\n $_SESSION['forgotpass'] = false;\n }\n }\n\n header(\"Location: \" . $session->referrer);\n }", "function wp_generate_password($length = 12, $special_chars = \\true, $extra_special_chars = \\false)\n {\n }", "function validateAndSend($user_email){\n\t\t\t$userPassword = $this->manage_content->getValue_email('owner_info','password','owner_email',$user_email);\n\t\t\tif(isset($userPassword[0]['password']))\n\t\t\t{\t\n\t\t\t\t$message = \"Your password for the account is\".$userPassword[0]['password'];\n\t\t\t\t$mailsent = $this->mail_function->sendMail($user_email,$message,$user_email);\n\t\t\t\treturn $mailsent;\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"Invalid user.\";\n\t\t\t}\n\n\t\t}", "public static function generatePassword() {\r\n return StringGenerator::generateRandomAlphaAndNumbersAndSpecial(12);\r\n }", "public function request_password($email)\n \t{\n\t//Get the userid from their email address\n\t$getuserid = $this->db->query_first(\"\n\t\t\tSELECT userid\n\t\t\tFROM \".TABLE_PREFIX.\"user\n\t\t\tWHERE email = '\" . $this->db->escape_string($email) . \"'\");\n\t//Gets list of users with the email address\n\t$users = $this->db->query_read_slave(\"\n\t\tSELECT userid, username, email, languageid\n\t\tFROM \" . TABLE_PREFIX . \"user\n\t\tWHERE email = '\" . $this->db->escape_string($email) . \"'\n\t\");\n\tif ($this->db->num_rows($users))\n\t{\n\t\t//Loops through users\n\t\twhile ($user = $this->db->fetch_array($users))\n\t\t{\n\t\t\t//If the userid's do not match up with whats in the database\n\t\t\tif ($getuserid['userid'] AND $getuserid['userid'] != $user['userid'])\n\t\t\t{\n\t\t\t\t//Exit the loop\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//Set vb username\n\t\t\t$user['username'] = unhtmlspecialchars($user['username']);\n\t\t\t//Generate new activation id\n\t\t\t$user['activationid'] = build_user_activation_id($user['userid'], 2, 1);\n\t\t\t//Use custom phrase and send out lost password email\n\t\t\teval(fetch_email_phrases('lostpw', $user['languageid']));\n\t\t\tvbmail($user['email'], $subject, $message, true);\n\t\t}\n\t\t//Return as a success\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn \"No account with that email address exists, please try again.\";\n\t}\n\t\t\n\t}", "protected function emailPassword($snum, $first_name, $last_name)\n {\n $conn = Doctrine_Manager::getInstance();\n $guard_user = Doctrine_Core::getTable('sfGuardUser')->findOneBy('username', array($snum));\n \n //fetch the first 'domain' from the table and set it to $domain\n $domain = Doctrine_Core::getTable('Email')->createQuery('a')->fetchOne()->getDomain();\n\n if ($guard_user == null)\n $guard_user = new sfGuardUser();//FIXME this step useful but only if used as part of the import/addStudents functions. As it is this is just unnecessary as is the following code which is repeated in all 3 functions\n\n $email = 's' . $snum . '@'.$domain;\n\n $password = $this->random_password();\n $guard_user->setUsername($snum);\n $guard_user->setPassword($password);\n $guard_user->setFirstName($first_name);\n $guard_user->setLastName($last_name);\n $guard_user->setIsActive(true);\n $guard_user->setIsSuperAdmin(false);\n \n $guard_user->save();\n\n $message = \"Dear \" . $guard_user->getFirstName() . \",\" . PHP_EOL . PHP_EOL . \n \"Your account has been created for the Project Allocation and Nomination System.\" . PHP_EOL . PHP_EOL .\n \"Username: \" . $snum . PHP_EOL .\n \"Password: \" . $password . PHP_EOL . PHP_EOL .\n \"Please follow the link to access the system.\" . PHP_EOL .\n \"http://\" . $this->getRequest()->getHost() . \n $this->getRequest()->getRelativeUrlRoot() . PHP_EOL . PHP_EOL .\n \"Thanks,\\nProject Allocation and Nomination System (PANS)\" . PHP_EOL . PHP_EOL;\n\n $headers = 'From: ' . $this->getUser()->getGuardUser()->getName() . ' <noreply@' . $domain . '>' . PHP_EOL . 'X-Mailer: PHP-' . phpversion() . PHP_EOL;\n \n $result = mail( $email,\n \"3001ICT - Your password has been created for project nominations\",\n $message,\n $headers);\n \n if ($result == false) \n return $snum;\n else \n return null;\n }", "function newUser($email, $password){\n\n}", "function sending_forgot_password_email($data, &$content) {\n\t\t// Create content\n\t\t$content = sprintf($this->ci->lang->line('auth_forgot_password_content'), \n\t\t\t$this->ci->config->item('DX_website_name'), \n\t\t\t$data['reset_password_uri'],\n\t\t\t$data['password'],\n\t\t\t$data['key'],\n\t\t\t$this->ci->config->item('DX_webmaster_email'),\n\t\t\t$this->ci->config->item('DX_website_name'));\n\t}", "static function password_forgot() {\n parent::password_forgot();\n view_var('user', globals('user'));\n }", "public function passwordEmail()\n {\n $this->validateAjax(request(), [\n 'email' => 'required|email',\n 'g-recaptcha-response' => 'sometimes|recaptcha',\n ]);\n\n if ($user = Students::where('email', request()->input('email'))->first()) {\n $token = Password::getRepository()->create($user);\n\n Mail::send(['text' => 'student.password'], ['token' => $token], function (Message $message) use ($user) {\n $message->subject(config('app.name') . ' Password Reset Link');\n $message->to($user->email);\n });\n\n flash('success', 'Password reset link emailed!');\n\n return response()->json(['reload_page' => true]);\n }\n else {\n return response()->json(['message' => trans('auth.failed')], 422);\n }\n }", "function createNewUser($nickName, $eMail, $password, $rights=2)\n {\n global $usrTableName,\n $usrSessionIDFieldType, $usrSessionIDField,\n $usrUniqueIDFieldType, $usrUniqueIDField,\n $usrEMail, $usrRightsField, $usrNicknameField, $usrPassword,\n $usrPasswordAlgorithm;\n\n\n $this->check_usrFieldTypes();\n\n $stage=0;\n try {\n $cc=db_sql(\"select count(*) from $usrTableName where $usrNicknameField='$nickName'\");\n $stage++;\n if ($cc==0) {\n\n switch (strtoupper($usrUniqueIDFieldType))\n {\n case 'INTEGER':\n $guid=intval(db_sql(\"select max($usrSessionIDField) from $usrTableName\"));\n $guid++;\n break;\n case 'CHAR':\n case 'VARCHAR':\n case 'CHARACTER VARYING':\n if (function_exists($usrPasswordAlgorithm))\n $guid=$usrPasswordAlgorithm(md5('USER_SECURITY'.y_uniqid()));\n else {\n _recordWastedTime(\"Throwing an exception \"+__FILE__+\":\"+__LINE__);\n throw new Exception(\"userPasswordAlgorithm '$usrPasswordAlgorithm' is not a recognized function\");\n }\n break;\n default: {\n _recordWastedTime(\"Throwing an exception \"+__FILE__+\":\"+__LINE__);\n throw new Exception(\"$usrTableName.$usrSessionIDField is of type '$usrSessionIDFieldType' which is not usable by userContext\");\n }\n }\n $stage++;\n\n $userData=array();\n $userData[$usrUniqueIDField]=$guid;\n $userData[$usrPassword]=$usrPasswordAlgorithm($password);\n $userData[$usrEMail]=$eMail;\n $userData[$usrRightsField]=$rights;\n $userData[$usrNicknameField]=$nickName;\n\n // die(\"plain password: '$password'<br>\\n\".var_dump($userData));\n\n $fieldList='';\n $fieldValue='';\n foreach($userData as $k=>$v) {\n if ($k>'') {\n if (db_fieldExists($usrTableName, $k)) {\n $fieldType=strtoupper(db_fieldType($usrTableName,$k));\n if (strpos(\"*$fieldType\",'CHAR')>0)\n $v=\"'$v'\";\n if ($fieldList>'') {\n $fieldList.=', ';\n $fieldValue.=', ';\n }\n $fieldList.=$k;\n $fieldValue.=$v;\n } else\n throw new Exception(\"$k does not exists in table $usrTableName\");\n }\n }\n\n $stage++;\n\n $sql=\"insert into $usrTableName ($fieldList) values ($fieldValue)\";\n // die($password.\"<br>\".$sql);\n db_sql($sql);\n $stage++;\n }\n }\n catch(Exception $e)\n {\n $aux=\"ERROR AT USER CREATION (stage: $stage) \".$e->getMessage();\n _dumpY(8,0,$aux);\n die($aux);\n }\n }", "function send_tempPass($email){\n\n\n $temp_pass = generate_temp_pass();\n $insert_to_db_pass = md5($temp_pass);\n $username = $_SESSION['username'];\n $email = htmlspecialchars($email);\n \n change_to_temp($insert_to_db_pass,$_SESSION['email'],$username);\n $to = $_SESSION['email'];\n\n $subject = \"Temporary Password\";\n\n //message to the user!\n $message = \"\n <html>\n <body style='background: #3B653D;'>\n <div>\n <h1 style = 'color:#ffffff; font-size:32px; text-align: center;'> Here is your account temporary password info $email !<br></h1>\n \n <span style = 'color:#ffffff;' font-size:20px;'> Temporary Password: $temp_pass </span><br>\n <span><a style = 'color:#ffffff;' href =http://farvlu.farmingdale.edu/~foxrc/BCS350_Project/change_password_link.php> Click here to change password </a> </span>\n \n </div>\n </body>\n </html>\";\n $headers = \"MIME-Version: 1.0\" . PHP_EOL;\n $headers .= \"Content-type:text/html;charset=UTF-8\" . PHP_EOL;\n $headers .= \"From: foxryan71@yahoo.com\". PHP_EOL;\n mail($to,$subject,$message,$headers);\n\n}", "public function resetAndUpdatePassword() {\n $this->validate ( $this->request, $this->getRules () );\n $user = User::where ( 'email', $this->request->email )->first ();\n \n if (!empty($user) && count ( $user->toArray() ) > 0) {\n $user->password = Hash::make ( (true) ? config()->get('app.user_password'): $this->generatePassword() );\n \n $user->save ();\n $this->email = $this->email->fetchEmailTemplate ( 'admin_forgot' );\n $this->email->subject = str_replace(['##SITE_NAME##'], [config ()->get ( 'settings.general-settings.site-settings.site_name' )], $this->email->subject);\n $this->email->content = str_replace (['##USERNAME##','##FORGOTPASSWORD##'],[$user->name,'admin123'],$this->email->content );\n $this->notification->email ( $user, $this->email->subject, $this->email->content );\n return true;\n } else {\n return false;\n }\n }", "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'u_email' => $this->username,\n ]);\n\n if ($user) {\n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save(false)) {\n \t$userName = $user->u_name;\n $userEmail = $user->u_email;\n \t \n \tif(!empty($userName) && !empty($userEmail)) {\n $subject = \"[Price Genius]: Your Reset Password Request\";\n $resetLink = Yii::$app->urlManager->createAbsoluteUrl(['api/reset-password', 'token' => $user->password_reset_token]);\n $content = ['userName' => $userName, 'resetLink' => $resetLink];\n $promotionName = \"Forgot Password\";\n return SendMail::sendSupportMail($user->u_email, $user->u_name, $subject, $content, $promotionName);\n \t\t}\n }\n \n }\n return false;\n }", "public function forgotten_password($email)\n\t{\n\t\t$query=\"SELECT * FROM \".parent::SUFFIX.\"user_details where email='\".$email.\"'\";\n\t\t$resultpassword= mysql_query($query);\n\t\t$resultfetchquery=mysql_fetch_object($resultpassword); \n\t\t//$link=\"<a href='\".AbstractDB::SITE_PATH.\"sign_in_new.php'>Clcik here</a>\";\n\t\t$cnf=$this->automailCls->send_automail_user('forgot_password',\n\t\tarray(\n\t\t\t\t\t'first_name'=>$resultfetchquery->first_name,\n\t\t\t\t\t'last_name'=>$resultfetchquery->last_name,\n\t\t\t\t\t'email'=>$resultfetchquery->email,\n\t\t\t\t\t'username'=>$resultfetchquery->username,\n\t\t\t\t\t'password'=>base64_decode($resultfetchquery->password),\n\t\t\t\t\t'link'=>$link),\n\t\t\t\t\tarray($resultfetchquery->email));\n\t\t\t\t\t\n\t\treturn $cnf;\t\t\t\n\t}", "function userForgotPassword($userData)\n\t\t{\n\t\t\tif(isset($userData['email']) && !empty($userData['email']))\n\t\t\t{\n\t\t\t\t//get values from email id\n\t\t\t\t$user = $this->manageContent->getValue_where('user_credentials','*','email_id',$userData['email']);\n\t\t\t\tif(!empty($user[0]))\n\t\t\t\t{\n\t\t\t\t\t//set password\n\t\t\t\t\t$password = uniqid();\n\t\t\t\t\t//update the password\n\t\t\t\t\t$update_pass = $this->manageContent->updateValueWhere('user_credentials','password',md5($password),'email_id',$userData['email']);\n\t\t\t\t\t//mail to user\n\t\t\t\t\t$mailsent = $this->mailSent->forgotPasswordMail($user[0]['email_id'], $user[0]['username'], $password);\n\t\t\t\t\tif($mailsent == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$_SESSION['success'] = 'Password is sent to your mail';\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$_SESSION['warning'] = 'Mail sending unsuccessfull';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$_SESSION['warning'] = 'Invalid EmailId';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function obtain_password() {\n $this -> load -> helper('send_email');\n $user = $this -> basic -> get_where('users', array('user_email' => $this -> input -> post('email'))) -> row();\n $this -> load -> library('form_validation');\n $this -> form_validation -> set_error_delimiters('<p>', '</p>');\n $this -> form_validation -> set_rules('email', t('email'), \"required|trim|valid_email\");\n if ($this -> form_validation -> run()) {\n if ($user != null) {\n $msg = \"<h1>Recuperación de Contraseña</h1> Sent : \" . date('m-d-Y') . \"<br/><br/>\";\n $msg .= \"Remitente: Cenline\" . \"<br/><br/><br/>\";\n $msg .= \"<i>Usted ha solicitado el servicio de recuperación de contraseña de \n Cenline Site. Sus datos de acceso son: </i> <br/> \n Email: \" . $user -> user_email . \"<br/> Contraseña: \" . $user -> user_password . \" \\</a>\";\n\n $contact_send = array('to' => $user -> user_email, 'subject' => 'Recuperación de Contraseña', 'message' => $msg);\n\n send_email($contact_send);\n } else {\n $response['html'] = t('The email user does not exist');\n $response['error'] = 1;\n echo json_encode($response);\n }\n } else {\n $response['html'] = validation_errors();\n $response['error'] = 1;\n echo json_encode($response);\n }\n }", "public static function sendEmailToResetPassword($data)\n {\n $email = $data['email'];\n $user = \\Modules\\Frontend\\Auth\\User::where('email', $email)\n ->first();\n if (empty($user)) {\n return ['rs'=>System::FAIL, 'msg'=>STheme::lang('lang.msg.user_not_exists')];\n } else {\n DB::beginTransaction();\n try {\n $newPass = Functions::generateRandomString(6);\n $user->password = Hash::make($newPass);\n $user->save();\n $params = [\n 'email' => $email,\n 'name' => $user->first_name.' '.$user->last_name,\n 'subject' => STheme::lang('lang.general.reset_password'),\n 'data' => ['newPass'=>$newPass],\n 'template' => 'mails.resetPassword'\n ];\n DB::commit();\n System::sendMail($params);\n if (Mail::failures()) {// check for failures\n return ['rs'=>System::FAIL, 'msg'=>STheme::lang('lang.msg.mail_not_send')];\n }\n Session::flash(System::FLASH_SUCCESS, STheme::lang('lang.msg.send_mail_forgot_password_success'));\n return [\n 'rs'=>System::SUCCESS,\n 'msg'=>'',\n 'redirect_url'=>'/forgot-password'\n ];\n } catch (\\Exception $e) {\n DB::rollBack();\n return ['rs'=>System::FAIL, 'msg'=>$e->getMessage()];\n }\n }\n }", "function __sendForgotPasswordEmail($id = null) {\n $id = $this->request->getData('user_id');\n if (!empty($id)) {\n $user = $this->Users->get($id);\n $email = new Email();\n $email\n ->template('reset_password_request', 'default')\n ->subject('OTP Code Request - DO NOT REPLY')\n ->emailFormat('html')\n ->setViewVars(['user' => $user,\n 'password' => $password])\n ->from('activation@captcha.ph')\n ->to($user->email)\n ->send();\n\n return true;\n }\n return false;\n }", "private function generate_pass()\n {\n echo password_hash('admin', PASSWORD_BCRYPT);\n }", "public function forgotten_password() {\n $email = $this->input->post('email');\n if (!$this->users_model->fields(array('id'))->where('email', $email)->limit(1)->get()) {\n return $this->send_error('NOT_REGISTERED');\n }\n $this->load->helper('string');\n $this->load->library('email');\n $token = random_string('sha1');\n if (!$this->users_model->where('email', $email)->update(array('forgotten_password_code' => $token, 'forgotten_password_time' => time()))) {\n return $this->send_error('ERROR');\n }\n $this->email->from(config_item('email_from'), config_item('email_from_name'))\n ->to($email)\n ->subject('Passwrod reset | Go4Slam app')\n ->message('Hello, <br><br> Press the link below to set a new password. <br><br><a href=\"' . base_url() . 'user/reset_password/' . urlencode($email) . '/' . urlencode($token) . '\">Click here</a>')\n ->set_mailtype('html');\n if (!$this->email->send()) {\n return $this->send_error('UNABLE_TO_SEND_EMAIL');\n }\n return $this->send_success();\n }", "function Trigger_CheckPasswords(&$tNG) {\r\r\n $myThrowError = new tNG_ThrowError($tNG);\r\r\n $myThrowError->setErrorMsg(\"Could not create account.\");\r\r\n $myThrowError->setField(\"password\");\r\r\n $myThrowError->setFieldErrorMsg(\"The two passwords do not match.\");\r\r\n return $myThrowError->Execute();\r\r\n}", "public function testGeneratePassword() {\n // Asking for a password 15 characters long\n $password = security::generate_password( 15 );\n\n // Make sure it's 15 characters\n $this->assertEquals( 15, strlen( $password ) );\n }", "function _generatePassword($member) {\n\t\treturn substr(\n\t\t\tMD5($member['Member']['name'] . $member['Member']['email'] . strtotime('now')), 0 , 6);\n\t}", "function UsernamesWithPassword(){\r\n\r\n // === Users' Array ===\r\n $myUsers = [\"Funke\", \"Blessin\", \"Alex\", \"Felix\", \"Danjuma\"];\r\n\r\n\r\n // Creating a new array from myUsers using randomization\r\n foreach($myUsers as $index => $value){\r\n $ToAdd = rand(100, 999);\r\n if(strlen($value) < 6){ // when lenght of myUser < 6 add 3 random numbers to myUser \r\n $finalUsername[$index] = $value.$ToAdd;\r\n } \r\n elseif(strlen($value) >= 6 && strlen($value) < 8){ // when length of username is greater than 6 and < 8 leave myUser\r\n $finalUsername[$index] = $value;\r\n } \r\n else{// when myUser is > 8 echo\r\n echo \"Username cannot be less than 6 or more than 8 characters\";\r\n return;\r\n } \r\n }\r\n\r\n // === Password array ===\r\n $Password = [\"mjk\", \"hgt\", \"old\", \"plr\", \"yho\"];\r\n\r\n \r\n \r\n // create new password by conncatenating old and random numbers\r\n foreach($Password as $index => $value){\r\n $ToAdd = rand(100, 999);\r\n $password = $value.$ToAdd.$value;\r\n $finalpasswords[$index] = $password;\r\n }\r\n \r\n // ===== Display Final username and password =====\r\n for ($i=0; $i < count($finalUsername); $i++) { \r\n echo \"<h2>username : {$finalUsername[$i]} <br/> password : {$finalpasswords[$i]}</h2>\";\r\n }\r\n return;\r\n}", "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'status' => User::STATUS_ACTIVE,\n 'email' => $this->email,\n ]);\n\n if ($user) {\n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save()) {\n\t\t\t\t$mail = new UserMails;\n\t\t\t\treturn $mail->passwordEmail($user);\n }\n }\n\n return false;\n }", "public function reset($username) {\r\n\t\tglobal $db;\r\n\t\t// Resets a users password.\r\n\t\tif (strpos($username,'@') > 0) {\r\n\t\t\t// Its an Email.\r\n\t\t\t$udata = db::get_array(\"users\",array(\"email\"=>$username));\r\n\t\t} else {\r\n\t\t\t$udata = db::get_array(\"users\",array(\"username\"=>$username));\r\n\t\t}\r\n\t\t// Check if they exist.\r\n\t\tif (count($udata) > 0) {\r\n\t\t\t// Yup\r\n\t\t\t$rand = $this->gen_rand();\r\n\t\t\t$udata = $udata[0];\r\n\t\t\t$uid = $udata['id'];\r\n\t\t\t\r\n\t\t\t// Update their account.\r\n\t\t\tdb::update(\"users\",array(\"passreset\"=>1,\"passresetkey\"=>$rand),array(\"id\"=>$uid));\r\n\t\t\t\r\n\t\t\t// Send them an email.\r\n\t\t\t$e = new email_tmpl();\r\n\t\t\t$e->init($udata['email'],\"Password Reset\");\r\n\t\t\t$e->load(\"password_reset\");\r\n\t\t\t$e->set_var(\"key\",$rand);\r\n\t\t\t$e->set_var(\"username\",$udata['username']);\r\n\t\t\t$eres = $e->send();\r\n\t\t\t\r\n\t\t\t// Add a notification too. C:\r\n\t\t\tif ($eres) {\r\n\t\t\t\t$this->notifications($uid)->create(\"Password Reset\",\"You have requested a password reset, We've sent you an Email to you containing a link to reset your password. If this wasn't you contact support immediately.\");\r\n\t\t\t\treturn array(\"res\"=>true,\"msg\"=>\"Password has been reset and Emailed to {$udata['email']}\",\"email\"=>$udata['email']);\r\n\t\t\t} else {\r\n\t\t\t\t$this->notifications($uid)->create(\"Password Reset\",\"You have requested a password reset. However we were unable to send you an Email. Please open a support ticket or contact us directly via IRC.\");\r\n\t\t\t\treturn array(\"res\"=>true,\"msg\"=>\"Password has been reset but could not be Emailed to {$udata['email']} please open a support ticket if you have account access, e.g. still logged in or talk to staff on IRC.\",\"email\"=>$udata['email']);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Nope.\r\n\t\t\treturn array(\"res\"=>false,\"msg\"=>\"There was no such user with that Username/E-Mail!\");\r\n\t\t}\r\n\t}", "function forgot_password() {\r\n\r\n $this->layout = 'default';\r\n\r\n if(!empty($this->data))\r\n {\r\n\r\n\r\n $errorarray = array();\r\n if (isset($this->data['User']['email']) && (trim($this->data['User']['email']) == '' || trim($this->data['User']['email'])=='Type here')) {\r\n $errorarray['enter_email'] = ENTER_EMAIL;\r\n }\r\n else\r\n {\r\n // For check valid email or not\r\n if($this->IsEmail($this->data['User']['email'])==0)\r\n $errorarray['valid_email'] = ENTER_VALIDEMAIL;\r\n else\r\n {\r\n $check_email = $this->User->find('all', array('conditions' => array('email like'=>$this->data['User']['email'],'user_type like'=>'user','status LIKE'=>0)));\r\n\r\n if(empty($check_email))\r\n {\r\n $errorarray['email_not_match'] = EMAIL_NOTFOUND;\r\n }\r\n }\r\n }\r\n\r\n $this->set('errorarray',$errorarray);\r\n\r\n if(empty($errorarray))\r\n {\r\n $new_pass = $this->generatePassword(PASSWORD_LIMIT);\r\n\r\n $name = trim($check_email[0]['User']['name']);\r\n $email = trim($check_email[0]['User']['email']);\r\n\r\n //$this->email_client_forgetpass($name,$email,$new_pass);\r\n\r\n $update_user['User']['password'] = md5($new_pass);\r\n $update_user['User']['encrypt_password'] = $this->encrypt_pass($new_pass);\r\n $update_user['User']['id'] = $check_email[0]['User']['id'];\r\n\r\n// $this->pre($update_user);\r\n// $this->pre($this->data);\r\n// exit;\r\n\r\n $this->User->save($update_user);\r\n //$this->redirect(DEFAULT_ADMINURL . 'users/forgot_password/succhange');\r\n }\r\n }\r\n }", "function forgotten_password() {\n $this->load->library('form_validation');\n\n $this->form_validation->set_rules('forgot_password_identity', 'Identity (Email / Login)', 'required');\n\n // Run the validation.\n if ($this->form_validation->run()) {\n // The 'forgotten_password()' function will verify the users identity exists and automatically send a 'Forgotten Password' email.\n $response = $this->ez_auth->forgotten_password($this->input->post('forgot_password_identity'));\n\n // Save any public status or error messages (Whilst suppressing any admin messages) to CI's flash session data.\n $this->session->set_flashdata('message', $this->ez_auth->get_messages());\n\n // Redirect user.\n redirect();\n }\n else {\n // Set validation errors.\n $this->data['message'] = validation_errors('<p class=\"error_msg\">', '</p>');\n\n return FALSE;\n }\n }", "public function forgotPassword()\n {\n $email = $this->input->post('email');\n $token = bin2hex(random_bytes(25));\n\n $user_id = $this->authentication_helper->checkEmail($email);\n\n if (isset($user_id) && !empty($user_id)) \n {\n $status = $this->authentication_worker->createToken($token, $user_id);\n if ($status) {\n $to_email = $email;\n $subject = \"Redefina sua senha\";\n $url = site_url('authentication/resetNewPassword' . \"?token=\" . $token);\n $message = \"Redefina sua senha da ZZjober clicando no link<br/><a href='\" . $url. \"'>\".$url.\"</a>\";\n $this->sendMail($to_email, $subject, $message);\n $this->session->set_flashdata('success_msg', 'Verifique seu e-mail para redefinir sua nova senha através do link');\n redirect('home/Entrar');\n }\n } else {\n $this->session->set_flashdata('error_msg', 'E-mail não encontrado');\n redirect('home/Entrar');\n }\n\n }", "public function forget_password($username)\n {\n try\n {\n $stmt = $this->db->prepare(\"SELECT email FROM users WHERE email=:email LIMIT 1\");\n $stmt->execute(array(\n 'email'=> mb_strtolower($username, 'UTF-8')\n ));\n $userRow = $stmt->fetch(PDO::FETCH_ASSOC);\n if($stmt->rowCount() > 0)\n {\n $tokenreset = sha1(uniqid().$username);\n $linkreset = \"http://interminale.fr.nf/forget_password?email=\".$username.\"&token=\".$tokenreset;\n\n $addmdpoublie = $this->db->prepare(\"INSERT INTO forget_password(email,token) VALUES(:email, :token)\");\n $addmdpoublie->execute(array(\n 'email'=> mb_strtolower($username, 'UTF-8'),\n 'token' => $tokenreset\n ));\n\n require $_SERVER['DOCUMENT_ROOT'].'/app/controllers/phpmailer/PHPMailerAutoload.php';\n\n // Retrieve the email template required\n $msg_html = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/app/view/email-forgetpassword.template.html');\n\n // Replace the % with the actual information\n $msg_html = str_replace('%linkreset%', $linkreset, $msg_html);\n\n $mail = new PHPMailer;\n $mail->isSMTP();\n $mail->SMTPDebug = 0;\n $mail->Debugoutput = 'html';\n $mail->Host = 'smtp.gmail.com';\n $mail->Port = 587;\n $mail->SMTPSecure = 'tls';\n $mail->SMTPAuth = true;\n $mail->Username = \"enjoycraftfr@gmail.com\";\n $mail->Password = \"~Py+Ai3j(O5g8!\";\n $mail->isHTML(true);\n $mail->CharSet = 'UTF-8';\n $mail->setFrom('no-reply@interminale.fr', 'Interminale');\n $mail->addReplyTo($username);\n $mail->addAddress($username);\n $mail->Subject = 'Réinitialisation mot de passe - Interminale';\n $mail->Body = $msg_html;\n\n $mail->AltBody = strip_tags($msg_html);\n\n //send the message, check for errors\n if (!$mail->send()) {\n $message = array('status' => 0, 'err' => \"L'email n'a pas pu être envoyé :/ Réessayez.\");\n return $message;\n } else {\n $message = array('status' => 1, 'err' => 'Un mail a été envoyé à '.$username.'.<br />Cliquez sur le lien reçu pour changer le mot de passe');\n return $message;\n }\n }\n else\n {\n $message = array('status' => 0, 'err' => 'L\\'adresse mail ne conrespond à aucun compte :/');\n return $message;\n }\n }\n catch(PDOException $e)\n {\n die('<h1>ERREUR LORS DE LA CONNEXION A LA BASE DE DONNEE. <br />REESAYEZ ULTERIEUREMENT</h1>');\n }\n }", "function SentVerificationEmail($email,$username,$password){\n \t$to = $email;\n\t$subject = 'DoggieCare Forget Password';\n\t$message = 'Username ='.$username.' || Password='.$password;\n\t$headers = 'From: webmaster@example.com' . \"\\r\\n\" .\n 'Reply-To: webmaster@example.com' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\nmail($to, $subject, $message, $headers);\n \n }", "function notify_password($username, $password) {\n\n $conn = db_connect();\n $result = $conn->query(\"select email from user\n where username='\".$username.\"'\");\n if (!$result) {\n throw new Exception('Could not find email address.');\n } else if ($result->num_rows == 0) {\n throw new Exception('Could not find email address.');\n // username not in db\n } else {\n $row = $result->fetch_object();\n $email = $row->email;\n $from = \"From: support@phpbookmark \\r\\n\";\n $mesg = \"Your PHPBookmark password has been changed to \".$password.\"\\r\\n\"\n .\"Please change it next time you log in.\\r\\n\";\n\n if (mail($email, 'PHPBookmark login information', $mesg, $from)) {\n return true;\n } else {\n throw new Exception('Could not send email.');\n }\n }\n}", "function generate_password($username, $password1, $password2) {\n $password1 = $password2 = wp_generate_password();\n }", "public function testRegisterRepeatedEmail() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\t$this->first_name,\n\t\t\t$this->surname,\n\t\t\t$this->email\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}", "protected function composeEmailToUser()\n\t{\n\t\t$theURL = ( empty($this->myReentryURL) ?\n\t\t\t\t$this->composeReentryURL() : $this->myReentryURL ) ;\n\t\t$s = $this->model->getRes( 'account/email_body_pwd_reset_instr/'\n\t\t\t. $this->myEmailAddr . '/'\n\t\t\t. $this->getRandomCharsFromToken() )\n\t\t\t. '<a href=\"' . $theURL . '\">' . $theURL . '</a>'\n\t\t\t;\n\t\treturn $s ;\n\t}", "function password_change($email) {\n\t\tglobal $pdo;\n\n\t\t//empty or array check\n\t\tif(empty($email) || is_array($email)) {\n\t\t\treturn 1;\n\t\t}\n\n\t\t//check if user exists\n\t\t$sql = \"SELECT id FROM user WHERE REPLACE(email, \\\".\\\", \\\"\\\") = REPLACE(:email, \\\".\\\", \\\"\\\") AND verified = 1\";\n\t\t$sth = $pdo->prepare($sql);\n\t\t$sth->bindValue(\":email\", mail_simplify($email), PDO::PARAM_STR);\n\t\t$sth->execute();\n\n\t\tif($sth->rowCount() == 0) {\n\t\t\treturn 2;\n\t\t}\n\n\t\t//get the id of the user\n\t\t$id = $sth->fetch()[\"id\"];\n\n\t\t//generate verification code\n\t\t$verification_code = hash(\"sha256\", microtime() . (string)rand() . $email);\n\n\t\t//get data required for email\n\t\t$change_link = \"https://swapitg.com/changepassword/$verification_code\";\n\t\t$subject = \"Change Passsword\";\n\t\t$mailfile = fopen(__DIR__ . \"/change_password_mail_template.html\", \"r\") or die(\"Unable to open file!\");\n\t\t$message = strtr(fread($mailfile, filesize(__DIR__ . \"/change_password_mail_template.html\")), array('$change_link' => $change_link));\n\t\tfclose($mailfile);\n\t\t$sender_email = \"no-reply@swapitg.com\";\n\t\t$sender_name = \"SwapitG no-reply\";\n\n\t\t//send email\n\t\tif(mail($email, $subject, wordwrap($message, 70, \"\\r\\n\"), \"From: $sender_name<$sender_email>\\r\\nContent-type: text/html; charset=utf-8\", \" -f \" . $sender_email)) {\n\t\t\t//set the verification code\n\t\t\t$sql = \"UPDATE user SET verification_code = :verification_code, code_generation_time = CURRENT_TIMESTAMP WHERE id = :id\";\n\t\t\t$sth = $pdo->prepare($sql);\n\t\t\t$sth->bindParam(\":verification_code\", $verification_code, PDO::PARAM_STR);\n\t\t\t$sth->bindParam(\":id\", $id, PDO::PARAM_INT);\n\t\t\t$sth->execute();\n\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn 3;\n\t\t}\n\t}", "function _mailToUser($userVoornaam, $userAchternaam, $userUsername, $userEmail, $generatedPassword) {\n $to = $userEmail;\n $subject = 'TEDxPXL registratie';\n $message = \"Beste \" . $userVoornaam . \" \" . $userAchternaam . \"\\n\\nBedankt voor uw registratie bij TEDxPXL.\\nU kan nu inloggen met \" . $userUsername . \" met als wachtwoord \" . $generatedPassword . \"\\nU zal uw wachtwoord moeten wijzigen bij de eerste keer inloggen.\\n\\nMet vriendelijke groet\\n\\nTEDxPXL Administratie\";\n $headers = 'From: pxltedx@gmail.com';\n if (!mail($to, $subject, $message, $headers)) {\n //echo \"Email sending failed\";\n }\n }", "function autoregister_create_new_user($itemId)\n {\n $item = Item::newInstance()->findByPrimaryKey($itemId['pk_i_id']);\n // if not exist user\n if( $item['fk_i_user_id'] == NULL ) {\n // create new user + send email\n $name = $item['s_contact_name'];\n $email = $item['s_contact_email'];\n // prepare data for register user\n $aux_password = osc_genRandomPassword();\n // clear params ....\n $input = array();\n $input['s_name'] = Params::getParam('s_name') ;\n Params::setParam('s_name', $name ); // from inserted item\n $input['s_email'] = Params::getParam('s_email') ;\n Params::setParam('s_email', $email ); // from inserted item\n $input['s_password'] = Params::getParam('s_password') ;\n Params::setParam('s_password', $aux_password ); // generated\n $input['s_password2'] = Params::getParam('s_password2') ;\n Params::setParam('s_password2', $aux_password ); // generated\n $input['s_website'] = Params::getParam('s_website') ;\n Params::setParam('s_website', '');\n $input['s_phone_land'] = Params::getParam('s_phone_land') ;\n Params::setParam('s_phone_land', '');\n $input['s_phone_mobile'] = Params::getParam('s_phone_mobile') ;\n Params::setParam('s_phone_mobile', '');\n $input['countryId'] = Params::getParam('countryId');\n Params::setParam('countryId', '');\n $input['regionId'] = Params::getParam('regionId');\n Params::setParam('regionId', '');\n $input['cityId'] = Params::getParam('cityId');\n Params::setParam('cityId', '');\n $input['cityArea'] = Params::getParam('cityArea') ;\n Params::setParam('cityArea', '');\n $input['address'] = Params::getParam('address') ;\n Params::setParam('address', '');\n $input['b_company'] = (Params::getParam('b_company') != '' && Params::getParam('b_company') != 0) ? 1 : 0 ;\n Params::setParam('b_company', '0');\n\n require_once LIB_PATH . 'osclass/UserActions.php' ;\n $userActions = new UserActions(false) ;\n $success = $userActions->add() ;\n\n switch($success) {\n case 1: osc_add_flash_ok_message( _m('The user has been created. An activation email has been sent')) ;\n $success = true;\n break;\n case 2: osc_add_flash_ok_message( _m('Your account has been created successfully')) ;\n $success = true;\n break;\n case 3: osc_add_flash_warning_message( _m('The specified e-mail is already in use')) ;\n $success = false;\n break;\n case 4: osc_add_flash_error_message( _m('The reCAPTCHA was not entered correctly')) ;\n $success = false;\n break;\n case 5: osc_add_flash_warning_message( _m('The email is not valid')) ;\n $success = false;\n break;\n case 6: osc_add_flash_warning_message( _m('The password cannot be empty')) ;\n $success = false;\n break;\n case 7: osc_add_flash_warning_message( _m(\"Passwords don't match\")) ;\n $success = false;\n break;\n }\n\n if($success) {\n Log::newInstance()->insertLog('plugin_autoregister', 'autoregister', '', $email.' '.$_SERVER['REMOTE_ADDR'], 'autoregister', osc_logged_admin_id()) ;\n // update user of item\n $user = User::newInstance()->findByEmail($email);\n Item::newInstance()->update(array('fk_i_user_id' => $user['pk_i_id'] ), array('pk_i_id' => $itemId ) );\n $item = Item::newInstance()->findByPrimaryKey($itemId);\n\n autoregister_sendMail($email, $user, $aux_password);\n\n // not activated\n if( $item['b_active'] != 1 ) {\n osc_run_hook('hook_email_item_validation', $item);\n }\n }\n\n // set params again\n Params::setParam('s_name', $input['s_name']);\n Params::setParam('s_email', $input['s_email']);\n Params::getParam('s_password', $input['s_password']) ;\n Params::getParam('s_password2', $input['s_password2']) ;\n Params::setParam('s_website', $input['s_website']);\n Params::setParam('s_phone_land', $input['s_phone_land']);\n Params::setParam('s_phone_mobile', $input['s_phone_mobile']);\n Params::setParam('countryId', $input['countryId']);\n Params::setParam('regionId', $input['regionId']);\n Params::setParam('cityId', $input['cityId']);\n Params::setParam('cityArea', $input['cityArea'] );\n Params::setParam('address', $input['address']);\n Params::setParam('b_company', $input['b_company']);\n // end\n }\n }", "function CreateUser()\n{\n$names = array(\"Micheal\",\"Chika\",\"Yakubu\",\"Bola\",\"Josephine\");\n//Username values\n\n$passwords = array(\"qwe\",\"rty\",\"uio\",\"pas\",\"dfg\");\n//Password headers values\n\n\n$errormsg = \"not allowed (Username must not exceeed 8 characters)\";\n//Error messages for unallowed characters\n\nfunction RandNum3()\n{\n$randnum=\"\";\nfor ($i=0; $i < 3; $i++) \n{\n$randnum.= rand (0,9);\n}\nreturn $randnum;\n}\n//Function to generate random 3 digits\n\nforeach ($names as $index => $user)\n{\nif (strlen($user) < 6) \n//Sort Usernames lower than 6\n{\n$newuser[$index]=$user.RandNum3();\n//add 3 random digits to Username\n}\n\nif (strlen($user) >= 6 && strlen($user) <= 8)\n//Username between 6 and 8\n{\n$newuser[$index]=$user;\n}\n\nif (strlen($user) > 8) \n//Username greater than 8\n{\necho \"<font color='red'>Error</font> <b>\".$user.\"</b> \".$errormsg.\"<br><br>\";\n//Display error\n}\n\n}\n\nforeach ($passwords as $index => $pass)\n{\n$newpass[$index]=$pass.RandNum3().$pass;\n}\n//Generate password from headers\n\n$arrlength = count($newuser);\n\nfor($x = 0; $x < $arrlength; $x++) \n{\n\necho \"<b>Username:\".$newuser[$x].\"<br>Password:\".$newpass[$x].\"</b><br><br>\";\n// Display user details\n} \n}", "public function validate_forgot_pwd($to_email_id, $username, $encrypted_password, $password) { \n $this->db->select(\"usr.user_id, usr.user_name , usr.password\");\n $this->db->from(\"tms_users usr\");\n $this->db->where(\"usr.registered_email_id\",$to_email_id);\n $this->db->where(\"usr.user_name\",$username);\n $qry = $this->db->get();\n if($qry->num_rows()>0) { \n $this->db->select(\"usr.user_id,pers.first_name, pers.last_name, pers.gender\");\n $this->db->from(\"tms_users usr\");\n $this->db->join(\"tms_users_pers pers\", \" usr.user_id=pers.user_id\");\n $this->db->where(\"usr.user_id\",$qry->row('user_id'));\n $this->db->where(\"usr.user_name\",$username);\n $qry1 = $this->db->get(); \n if($qry1->num_rows()>0) { \n $update_array=array('password'=>$encrypted_password);\n $this->db->where('user_id', $qry->row('user_id'));\n $this->db->trans_start();\n $this->db->update('tms_users',$update_array);\n $this->db->trans_complete();\n if ($this->db->trans_status() === FALSE) { \n return 'database_error';\n }\n $mail_subject= \"Your New TMS Password\";\n $data=$password;\n $mail_body = $this->get_mail_body($data,$qry1->row('first_name'),$qry1->row('gender')); \n $cc_email_id = \"\";\n $mail_result = send_mail($to_email_id,$cc_email_id,$mail_subject,$mail_body); \n if($mail_result) {\n return 'mail_sent';\n } else {\n return 'mail_not_sent';\n }\n } else { \n return 'invalid_username';\n }\n } else {\n return 'email_id_not_present';\n }\n }", "public function passes($attribute, $value)\n {\n \n $value = strtolower($value);\n\n $patternMail = \"/^[a-z0-9]+([._-][a-z0-9]+)*@([a-z0-9]+([._-][a-z0-9]+))+$/\"; \n $patternPhone = \"/^[9|8|7][0-9]{8}$/\";\n $preMail=\"\";\n $postMail=\"\";\n\n if(preg_match($patternPhone, $value)){ \n $userCheck = User::where('phone', '=', $value)->first();\n if (!empty($userCheck)) {\n\n return false;\n\n }elseif(decrypt($userCheck->password)==){\n\n }\n return true;\n\n if ($this->auth->attempt([\n 'phone' => $value,\n 'password' => $password\n ], $remember == 1 ? true : false)) {\n return true;\n }else{\n return false;\n }\n\n }elseif(preg_match($patternMail, $value )){\n\n $email = explode(\"@\", $value );\n $postMail= $email[1];\n if ($email[1]==\"yahoo.com\") {\n $preMail=$email[0];\n }elseif($email[1]==\"yahoo.es\"){\n $preMail=$email[0];\n }elseif ($email[1]==\"hotmail.com\") {\n $preMail=$email[0];\n }elseif ($email[1]==\"outlook.com\") {\n $preMail=$email[0];\n }elseif ($email[1]==\"icloud.com\") {\n $preMail=$email[0];\n }else{\n if(!strpos($email[0], \"+\")){\n $preMail=$email[0]; \n }else{\n $email=explode(\"+\", $email[0]);\n $preMail=$email[0]; \n }\n $preMail=str_replace(\".\", \"\",$email[0]); \n }\n $formattedMail = $preMail.\"@\".$postMail; \n\n if ($this->auth->attempt([\n 'mail' => $formattedMail,\n 'password' => $password\n ], $remember == 1 ? true : false)) {\n return true;\n }else{\n return true;\n }\n\n }else{ \n\n return false; \n\n } //\n }", "function genera_password($longitud,$tipo=\"alfanumerico\"){\n \nif ($tipo==\"alfanumerico\"){\n$exp_reg=\"[^A-Z0-9]\";\n} elseif ($tipo==\"numerico\"){\n$exp_reg=\"[^0-9]\";\n}\n \nreturn substr(eregi_replace($exp_reg, \"\", md5(time())) .\neregi_replace($exp_reg, \"\", md5(time())) .\neregi_replace($exp_reg, \"\", md5(time())),\n0, $longitud);\n}", "public function vxUserCreateCheck() {\n\t\t$rt = array();\n\t\t\n\t\t$rt['errors'] = 0;\n\t\t\n\t\t$rt['usr_email_value'] = '';\n\t\t/* usr_email_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (100 sbs)\n\t\t3 => mismatch\n\t\t4 => conflict\n\t\t999 => unspeicific */\n\t\t$rt['usr_email_error'] = 0;\n\t\t$rt['usr_email_error_msg'] = array(1 => '你忘记填写电子邮件地址了', 2 => '你的电子邮件地址太长了', 3 => '你的电子邮件地址看起来有问题', 4 => '这个电子邮件地址已经注册过了');\n\t\t\n\t\t$rt['usr_nick_value'] = '';\n\t\t/* usr_nick_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (20 mbs)\n\t\t3 => invalid characters\n\t\t4 => conflict\n\t\t999 => unspecific */\n\t\t$rt['usr_nick_error'] = 0;\n\t\t$rt['usr_nick_error_msg'] = array(1 => '你忘记填写昵称了', 2 => '你的昵称太长了,精简一下吧', 3 => '你的昵称中包含了不被允许的字符', 4 => '你填写的这个昵称被别人用了');\n\t\t\n\t\t$rt['usr_password_value'] = '';\n\t\t$rt['usr_confirm_value'] = '';\n\t\t/* usr_password_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (32 sbs)\n\t\t3 => invalid characters\n\t\t4 => not identical\n\t\t999 => unspecific */\n\t\t$rt['usr_password_error'] = 0;\n\t\t$rt['usr_password_error_msg'] = array(1 => '你忘记填写密码了', 2 => '你的这个密码太长了,缩减一下吧', 3 => '你填写的密码中包含了不被允许的字符', 4 => '你所填写的两个密码不匹配');\n\t\t/* usr_confirm_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (32 sbs)\n\t\t3 => invalid characters(should not reach here in final rendering)\n\t\t4 => not identical\n\t\t999 => unspecific */\n\t\t$rt['usr_confirm_error'] = 0;\n\t\t$rt['usr_confirm_error_msg'] = array(1 => '你忘记填写密码确认了', 2 => '你的这个密码确认太长了,缩减一下吧', 3 => '你填写的密码中包含了不被允许的字符', 4 => '你所填写的两个密码不匹配');\n\t\t\n\t\t$rt['c_value'] = 0;\n\t\t$rt['c_error'] = 0;\n\t\t$rt['c_error_msg'] = array(1 => '你忘记填写确认码了', 4 => '你填写的确认码是错的');\n\t\t\n\t\t/* check: c */\n\t\tif (isset($_POST['c'])) {\n\t\t\t$rt['c_value'] = strtolower(trim($_POST['c']));\n\t\t\tif (strlen($rt['c_value']) > 0) {\n\t\t\t\tif ($rt['c_value'] != strtolower($_SESSION['c'])) {\n\t\t\t\t\t$rt['c_error'] = 4;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$rt['c_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['c_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t\t\n\t\t}\n\t\t\n\t\t/* check: usr_email */\n\t\t\n\t\tif (isset($_POST['usr_email'])) {\n\t\t\t$rt['usr_email_value'] = strtolower(make_single_safe($_POST['usr_email']));\n\t\t\tif (strlen($rt['usr_email_value']) == 0) {\n\t\t\t\t$rt['usr_email_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t} else {\n\t\t\t\tif (strlen($rt['usr_email_value']) > 100) {\n\t\t\t\t\t$rt['usr_email_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t} else {\n\t\t\t\t\tif (!is_valid_email($rt['usr_email_value'])) {\n\t\t\t\t\t\t$rt['usr_email_error'] = 3;\n\t\t\t\t\t\t$rt['errors']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_email_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\t\n\t\tif ($rt['usr_email_error'] == 0) {\n\t\t\t$sql = \"SELECT usr_email FROM babel_user WHERE usr_email = '\" . $rt['usr_email_value'] . \"'\";\n\t\t\t$rs = mysql_query($sql, $this->db);\n\t\t\tif (mysql_num_rows($rs) > 0) {\n\t\t\t\t$rt['usr_email_error'] = 4;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t\tmysql_free_result($rs);\n\t\t}\n\t\t\n\t\t/* check: usr_nick */\n\t\t\n\t\tif (isset($_POST['usr_nick'])) {\n\t\t\t$rt['usr_nick_value'] = make_single_safe($_POST['usr_nick']);\n\t\t\tif (strlen($rt['usr_nick_value']) == 0) {\n\t\t\t\t$rt['usr_nick_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t} else {\n\t\t\t\tif (mb_strlen($rt['usr_nick_value']) > 20) {\n\t\t\t\t\t$rt['usr_nick_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t} else {\n\t\t\t\t\tif (!is_valid_nick($rt['usr_nick_value'])) {\n\t\t\t\t\t\t$rt['usr_nick_error'] = 3;\n\t\t\t\t\t\t$rt['errors']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_nick_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif ($rt['usr_nick_error'] == 0) {\n\t\t\t$sql = \"SELECT usr_nick FROM babel_user WHERE usr_nick = '\" . $rt['usr_nick_value'] . \"'\";\n\t\t\t$rs = mysql_query($sql, $this->db);\n\t\t\tif (mysql_num_rows($rs) > 0) {\n\t\t\t\t$rt['usr_nick_error'] = 4;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t\tmysql_free_result($rs);\n\t\t}\n\t\t\n\t\t/* check: usr_gender */\n\t\tif (isset($_POST['usr_gender'])) {\n\t\t\t$rt['usr_gender_value'] = intval($_POST['usr_gender']);\n\t\t\tif (!in_array($rt['usr_gender_value'], array(0,1,2,5,6,9))) {\n\t\t\t\t$rt['usr_gender_value'] = 9;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_gender_value'] = 9;\n\t\t}\n\t\t\n\t\t/* check: usr_password and usr_confirm */\n\t\t\n\t\tif (isset($_POST['usr_password'])) {\n\t\t\t$rt['usr_password_value'] = $_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 (isset($_POST['usr_confirm'])) {\n\t\t\t$rt['usr_confirm_value'] = $_POST['usr_confirm'];\n\t\t\tif (strlen($rt['usr_confirm_value']) == 0) {\n\t\t\t\t$rt['usr_confirm_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_confirm_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_error'] == 0) && ($rt['usr_confirm_error'] == 0)) {\n\t\t\tif (strlen($rt['usr_password_value']) > 32) {\n\t\t\t\t$rt['usr_password_error'] = 2;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t\tif (strlen($rt['usr_confirm_value']) > 32) {\n\t\t\t\t$rt['usr_confirm_error'] = 2;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_error'] == 0) && ($rt['usr_confirm_error'] == 0)) {\n\t\t\tif ($rt['usr_password_value'] != $rt['usr_confirm_value']) {\n\t\t\t\t$rt['usr_confirm_error'] = 4;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $rt;\n\t}", "public function emailpassword($error = NULL) {\n \n $this->template->content3=View::instance('v_users_emailpassword'); \n $this->template->title= APP_NAME. \" :: Login\";\n // add required js and css files to be used in the form\n $client_files_head=Array('/js/languages/jquery.validationEngine-en.js',\n '/js/jquery.validationEngine.js',\n '/css/validationEngine.jquery.css'\n );\n $this->template->client_files_head=Utils::load_client_files($client_files_head); \n # Pass data to the view\n $this->template->content3->error = $error;\n\n echo $this->template;\n\n\n }", "public function postForgotPw(){\n\t\t//find user where email = input email\n\t\t$user = User::where('email','=',Str::lower(Input::get('email')));\n\n\t\t//if user found\n\t\tif($user->count()){\n\n\t\t\t//if match found\n\t\t\t$user \t\t\t\t\t= $user->first();\n\n\t\t\t//generate new activate code and new password\n\t\t\t$code \t\t\t\t\t= str_random(60);\n\t\t\t$password \t\t\t\t= str_random(10);\n\n\t\t\t//update value in db\n\t\t\t$user->activate_code\t= $code;\n\t\t\t$user->password_temp\t= Hash::make($password);\n\n\t\t\t//save to db\n\t\t\tif($user->save()){\n\n\t\t\t\t//send email to user with new password and activate link\n\t\t\t\tMail::send('emails.auth.forgot_mail',array('link' => URL::route('account-recover', $code), 'name' => $user->last_name, 'password'=>$password), function($message) use ($user){\n\t\t\t\t\t$message->to($user->email, $user->last_name)->subject(\"It's ok, it happens. Here is yours...\");\n\t\t\t\t});\t\t\t\t\n\t\t\t\t\n\t\t\t\t//return to forgot-pw page\n\t\t\t\treturn Redirect::route('account-forgot-pw')\n\t\t\t\t\t\t->with('global','<div class=\"alert alert-success\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-envelope\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\tNew password has been sent. Please check your mail.\n\t\t\t\t\t\t\t\t\t\t</div>');\n\t\t\t}\n\n\t\t}else{\n\n\t\t\t//return error msg wrong old password\n\t\t\treturn Redirect::route('account-forgot-pw')\n\t\t\t\t\t->with('global','<div class=\"alert alert-danger\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"sr-only\">Error:</span>\n\t\t\t\t\t\t\t\t\t\tIncorrect Email Address. Please try again.\n\t\t\t\t\t\t\t\t\t</div>');\n\t\t}\n\t}", "function resetPassword($userEmail){\n\n}", "public function newPassword() {\n $this->form_validation->set_rules('email', 'Email', 'required');\n $this->form_validation->set_rules('temp_code', 'Temporärer Code', 'required');\n $this->form_validation->set_rules('password', 'Passwort', 'required');\n \n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n $this->loadUser();\n \n if ($this->user_model->getValue('temp_code') != $this->input->post('temp_code')) {\n \t$this->error(404, 'Verification error');\n }\n \n if ($this->user_model->getValue('temp_code_valid_until') < date('Y-m-d H:i:s')) {\n \t$this->error(408, 'Provided code not valid anymore');\n }\n \n $this->user_model->setValue(\n \t'hashed_password',\n \tpassword_hash($this->input->post('password'), PASSWORD_DEFAULT));\n \t\n if (! $this->user_model->updatePassword()) {\n \t$this->error(400, 'Error wail updating password');\n }\n \n $data['new password'] = 'set';\n $this->response($data);\n }", "protected function forgotPassword($args) {\n\n if ($args['ent_email'] == '' || $args['ent_user_type'] == '')\n return $this->_getStatusMessage(1, 1);\n\n if ($args['ent_user_type'] == '1') {\n $table = 'master';\n $uid = 'mas_id';\n } else if ($args['ent_user_type'] == '2') {\n $table = 'slave';\n $uid = 'slave_id';\n } else {\n return $this->_getStatusMessage(1, 1);\n }\n\n $selectUserQry = \"select email,password,$uid from $table where email = '\" . $args['ent_email'] . \"'\";\n $selectUserRes = mysql_query($selectUserQry, $this->db->conn);\n\n if (mysql_num_rows($selectUserRes) <= 0)\n return $this->_getStatusMessage(66, $selectUserQry);\n\n $userData = mysql_fetch_assoc($selectUserRes);\n\n $randData = $this->_generateRandomString(20) . '_' . $args['ent_user_type'];\n\n $mail = new sendAMail($this->host);\n $resetRes = $mail->forgotPassword($userData, $randData);\n\n if ($resetRes['flag'] == 0) {\n $updateResetDataQry = \"update $table set resetData = '\" . $randData . \"', resetFlag = 1 where email = '\" . $args['ent_email'] . \"'\";\n mysql_query($updateResetDataQry, $this->db->conn);\n//$resetRes['update'] = $updateResetDataQry;\n return $this->_getStatusMessage(67, $resetRes);\n } else {\n return $this->_getStatusMessage(68, $resetRes);\n }\n }", "public function dialogResetPassword(Application $app)\n {\n // get the form values\n $form = $app['request']->get('form');\n // validate the email\n $errors = $app['validator']->validateValue($form['email'], new Assert\\Email());\n if (count($errors) > 0) {\n // invalid email\n $message = '';\n foreach ($errors as $error) {\n $message .= sprintf('%s< br />', $error->getMessage());\n }\n return $this->dialogForgottenPassword($app, $message);\n }\n $Users = new Users($app);\n if (false === ($user = $Users->selectUser($form['email']))) {\n $message = 'There exists no user with the submitted email address.';\n $app['monolog']->addDebug(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $message));\n return $this->dialogForgottenPassword($app, $message);\n }\n // email address is valid, so we can create a new GUID and send a mail\n if (false === ($guid = $Users->createNewGUID($form['email']))) {\n $message = 'Can\\'t create a new GUID as long the last GUID is not expired. You must wait 24 hours between the creation of new passwords.';\n $app['monolog']->addDebug(sprintf('[%s - %s] %s', __METHOD__, __LINE__, 'No GUID created, last creation within the last 24 hours.'));\n return $this->dialogForgottenPassword($app, $message);\n }\n\n // create the email body\n $body = $app['twig']->render($app['utils']->getTemplateFile(\n '@phpManufaktur/Basic/Template',\n 'framework/mail/password.create.twig'),\n array('name' => $user['displayname'], 'server' => FRAMEWORK_URL,\n 'reset_password_url' => FRAMEWORK_URL.'/password/create/'.$guid['guid']\n ));\n // create the message\n $message = \\Swift_Message::newInstance()\n ->setSubject($app['translator']->trans('kitFramework password reset'))\n ->setFrom(array(SERVER_EMAIL_ADDRESS))\n ->setTo(array($form['email']))\n ->setBody($body)\n ->setContentType('text/html');\n // send the message\n $app['mailer']->send($message);\n\n // show a response dialog\n return $app['twig']->render($app['utils']->getTemplateFile(\n '@phpManufaktur/Basic/Template',\n 'framework/password.create.twig'),\n array('email' => $form['email']));\n }", "public function createpost()\n {\n $pass = $_POST['password'];\n for($i=0;$i<5;$i++){\n $pass=md5($pass);\n }\n if($this->input->post('form_key') && $this->input->post('form_key') == $this->session->userdata('formkey'))\n {\n if($this->checkEmail(trim($this->input->post('email')))){\n $salt = $this->hash->key(8);\n $regisdate = mktime(0, 0, 0, date('m'), date('d'), date('Y'));\n $arr = array(\n 'username' => 'taikhoan',\n 'fullname' => $this->input->post('fullname'),\n 'email' => $this->input->post('email'),\n 'phone' => $this->input->post('phone'),\n 'use_regisdate' => $regisdate,\n 'use_salt' => $salt,\n 'password' => $pass,\n 'use_key' => $this->hash->create($this->input->post('fullname'), $this->input->post('fullname'), 'sha256md5'),\n 'active' => 0,\n 'lever' => 0,\n 'block'=>0,\n 'address_province' => $this->input->post('province'),\n );\n $id = $this->f_usersmodel->Add('users',$arr);\n $this->f_usersmodel->Update_Where('users', array('id' => $id),\n array('md5_id' => md5($id), 'token' => md5($this->input->post('email') . $id),));\n if (isset($id)) {\n $config = Array(\n 'protocol' => 'smtp',\n 'smtp_host' => $this->config->item('smtp_hostssl'),\n 'smtp_port' => $this->config->item('smtp_portssl'),\n 'smtp_user' => $this->config->item('smtp_user'), // change it to yours\n 'smtp_pass' => $this->config->item('smtp_pass'), // change it to yours\n 'mailtype' => 'html',\n 'charset' => 'utf-8',\n 'wordwrap' => TRUE\n );\n\n $this->load->library('email', $config);\n $user=$this->f_usersmodel->getFirstRowWhere('users',array('id'=>$id));\n $subject = $this->site_name.' - Kích hoạt tài khoản';\n $message = '\n <p>Nhấn vào link dưới đây để kích hoạt tài khoản:</p>\n <a href=\"'.base_url('users_frontend/userActive?id='.$user->md5_id.'&token='.$user->token).'\">\n '.base_url('users_frontend/userActive?id='.$user->md5_id.'&token='.$user->token).'</a>';\n\n // Get full html:\n $body =\n '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n <html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n <title>' . htmlspecialchars($subject, ENT_QUOTES, $this->email->charset) . '</title>\n <style type=\"text/css\">\n body {\n font-family: Arial, Verdana, Helvetica, sans-serif;\n font-size: 16px;\n }\n </style>\n </head>\n <body>\n ' . $message . '\n </body>\n </html>';\n\n $receiver_email = $user->email . ','.@$this->option->site_email;\n $this->email->set_newline(\"\\r\\n\");\n $this->email->from(@$this->option->site_email,'Thông tin tài khoản'); // change it to yours\n $this->email->to($receiver_email);\n $this->email->subject($subject);\n $this->email->message($body);\n if ($this->email->send()) {\n $this->session->set_flashdata(\"mess\", \"Đăng ký tài khoản thành công!\");\n redirect(base_url('dang-ky-thanh-cong?u='.$user->md5_id));\n } else {\n $this->session->set_flashdata(\"mess_err\", \"Đăng ký thành công! Lỗi gửi email\");\n redirect($_SERVER['HTTP_REFERER']);\n }\n $this->session->set_flashdata(\"mess\", \"Đăng ký tài khoản thành công!\");\n }\n }else{\n redirect($_SERVER['HTTP_REFERER']);\n }\n }\n }", "public function mail_varify(){\n \t$return = $this->login_model->mail_varify(); \t\n \tif($return){ \n \t$data['email'] = $return;\n \t$this->load->view('admin/set_password', $data); \n \t} else { \n\t \t\t$data['email'] = 'allredyUsed';\n \t$this->load->view('admin/set_password', $data);\n \t} \n }", "public function testRegistrationPasswordLessChars()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->type('username', 'Tester1')\n ->type('first_name', 'Test')\n ->type('last_name', 'User')\n ->type('password', 'a1')\n ->type('password_confirmation', 'a1')\n ->click('button[type=\"submit\"]')\n\n // we're still on the registration page\n ->waitForText('The password must be at least 6 characters.')\n ->assertSee('The password must be at least 6 characters.');\n });\n }", "public function generatePasswordResetToken()\n {\n $this->password = Yii::$app->security->generateRandomString() . '_' . time();\n }", "function user_new($user, $mail, $level)\n{\n\n if (!user_level(5) || (!isset($user, $mail, $level)) || (!is_string($user) || empty($user) || isset($user{10})) || (!is_string($mail) || empty($mail) || isset($mail{50})) || !ereg('^[1-5]$', $level)) {\n\techo \"amsd\";\n return false;\n\t}\n\n else if (!user_mail($mail)) {\n\techo \"mah\";\n return false;\n\t}\n\n $pass = RandomString();\n if (!@mysql_num_rows(mysql_query(\"SELECT `id` FROM `amsn_users` WHERE `user` = '\" . mysql_real_escape_string($user) . \"' LIMIT 1\"))) {\n if (@mysql_query(\"INSERT INTO `amsn_users` (user, pass, email, level) VALUES ('\" . mysql_real_escape_string($user) . \"', '\" . sha1($pass) . \"', '\" . mysql_real_escape_string($mail) . \"', '\" . (int)$level . \"')\")) {\n if (email($mail, \"aMSN Web administration\", \"You are now a part of the aMSN webpage administration, welcome!\\nYour username and password are the following:\\n\\n - User: $user\\n - Password: $pass\\n\\nYou can change the password anytime you want in your control panel\", \"From: aMSN Admin <admin@amsn.sf.net>\")) {\n mysql_query(\"DELETE FROM `amsn_users` WHERE id = '\" . mysql_insert_id() . \"' LIMIT 1\");\n\techo \"dude\";\n return false;\n } else\n return true;\n\t} else {\n\t\techo mysql_error();\n\t\techo \"insert problem\";\n\t\treturn false;\n\t}\n } else \n return false;\n\n}", "function motDePasseOublie($mail) { $userManager = new OpenClassrooms\\DWJP4\\Backend\\Model\\UsersManager();\n $emailExist = $userManager->emailExist($mail);\n if($emailExist){\n //S'il existe, on fabrique le code , on update le code , on envoi le message\n $pseudo=$emailExist[0]['USER_PSEUDO'];\n $code = codeValidation();\n //echo $pseudo;\n // echo \" code : \".$code;\n $updatePassword = $userManager->updatePsswd($code,$pseudo);\n $message = messagePasswdOublie($mail,$code);\n //echo $message;\n }else {\n //echo \"pas de mail exist\";\n }\n // on retourne sur la page d'identification\n require ('view/backend/identificationView.php'); \n}", "function reset_email()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Reset email\n\t\tif ($this->tank_auth->activate_new_email($user_id, $new_email_key)) {\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->_show_message($this->lang->line('auth_message_new_email_activated').' '.anchor('/auth/login/', 'Login'));\n\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->_show_message($this->lang->line('auth_message_new_email_failed'));\n\t\t}\n\t}" ]
[ "0.709545", "0.68329805", "0.67693996", "0.6749227", "0.66979414", "0.6665304", "0.66307354", "0.656412", "0.64873266", "0.6419626", "0.6404173", "0.6376843", "0.6341731", "0.6314451", "0.62974715", "0.6284961", "0.6277273", "0.62592727", "0.62543994", "0.6230435", "0.62228", "0.6200125", "0.6196302", "0.61760724", "0.61751735", "0.6169589", "0.61391497", "0.6137654", "0.6135426", "0.61324626", "0.610041", "0.60977966", "0.60967237", "0.60913926", "0.6089611", "0.6081953", "0.60702586", "0.6066019", "0.606313", "0.6061267", "0.6057843", "0.6053627", "0.60485446", "0.6044004", "0.6020906", "0.60197794", "0.60120064", "0.600881", "0.6007361", "0.5992954", "0.5988695", "0.59867036", "0.59759337", "0.59753144", "0.5967582", "0.5959417", "0.59580404", "0.59540766", "0.59444314", "0.5944394", "0.59357226", "0.5932745", "0.5928892", "0.59273607", "0.5923104", "0.59226716", "0.5921998", "0.5918559", "0.5913016", "0.59125406", "0.59116524", "0.5909722", "0.590305", "0.5902639", "0.590263", "0.5898471", "0.5897625", "0.5895358", "0.58886313", "0.58885777", "0.5878691", "0.58767605", "0.5876624", "0.5876537", "0.5876215", "0.587148", "0.5866317", "0.58580613", "0.5857294", "0.58556986", "0.585182", "0.5851048", "0.5850016", "0.584896", "0.58489513", "0.58458525", "0.5840243", "0.58401513", "0.5839648", "0.583549" ]
0.739786
0
Return the meter gain value earned by the dealer.
Верните значение коэффициента усиления метра, полученное дилером.
public function getMeterGain();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_deliveredEnergyMeter(): float\n {\n // $res is a double;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::DELIVEREDENERGYMETER_INVALID;\n }\n }\n $res = $this->_deliveredEnergyMeter;\n return $res;\n }", "public function getEnergyAttribute()\n {\n $energy = 0;\n\n if (! empty($this->attributes['energy'])) {\n $energy = $this->attributes['energy'];\n }\n\n $produced = round(\n $this->production_rate / 3600 * Carbon::now()->diffInSeconds($this->last_energy_changed)\n );\n\n return $energy + $produced;\n }", "public function get_receivedEnergyMeter(): float\n {\n // $res is a double;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::RECEIVEDENERGYMETER_INVALID;\n }\n }\n $res = $this->_receivedEnergyMeter;\n return $res;\n }", "private function woodGain(int $deltaTime) : float\n {\n $gain = $this->buildings['woodcutter']* 2 * 750 ;\n // liczymy zysk na sekunde (godzina/3600)\n $perSecondGain = $gain / 3600;\n //zwracamy zysk w czasie $deltaTime\n return $perSecondGain * $deltaTime;\n }", "public function getMetermaintenancecharge()\n {\n return $this->metermaintenancecharge;\n }", "public function get_meter(): float\n {\n // $res is a double;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::METER_INVALID;\n }\n }\n $res = $this->_meter;\n return $res;\n }", "public function getUtilityMeter()\n {\n return $this->utilityMeter;\n }", "private function ironGain(int $deltaTime) : float\n {\n $gain = $this->buildings['ironMine']*2 * 125;\n // liczymy zysk na sekunde (godzina/3600)\n $perSecondGain = $gain / 3600;\n //zwracamy zysk w czasie $deltaTime\n return $perSecondGain * $deltaTime;\n }", "private function goldGain(int $deltaTime) : float\n {\n $gain = $this->buildings['Bank']* 2 * 0.5 ;\n // liczymy zysk na sekunde (godzina/3600)\n $perSecondGain = $gain / 3600;\n //zwracamy zysk w czasie $deltaTime\n return $perSecondGain * $deltaTime;\n }", "public function getMeasurement()\n {\n return $this->measurement;\n }", "public function getDollarPriceChange(): float;", "public function getAdditionalCharge(){\n return $this->AdditionalCharge;\n }", "public function damage() {\n return $this->damageMultiplier * $this->weapon->damage();\n }", "public function getCharge(){\n return $this->Charge;\n }", "public function getGwPrice() {\n return $this->item->getGwPrice();\n }", "private function getWeight()\n\t{\n\t\treturn $this->cart->getWeight();\n\t}", "function calculateEnergyUse(){\n $this->boilerEnergy = $this->outletSteam->energyFlow + $this->blowdown->energyFlow - $this->feedwater->energyFlow;\n $this->fuelEnergy = $this->boilerEnergy / $this->boilerEff; \n $this->checkWarnings();\n }", "public function countConsumedMoney()\n {\n if( $this -> hasAlreadyUsedUpMoney() )\n {\n return $this -> target_price;\n }\n \n if( count( $this -> payments ) == 0 )\n {\n return 0.0;\n }\n \n $chargerType = $this -> charger_connector_type -> determineChargerType();\n \n $consumedMoney = $chargerType == ChargerTypeEnum :: FAST \n ? $this -> countConsumedMoneyByTime()\n : $this -> countConsumedMoneyByKilowatt();\n \n $consumedMoney = round ( $consumedMoney, 2 );\n\n return $consumedMoney;\n }", "public function getAttackDamage(): float\n {\n return $this->attackDamage;\n }", "private function kamienGain(int $deltaTime) : float\n {\n $gain = $this->buildings['kopalniaKamienia']*2 * 500;\n // liczymy zysk na sekunde (godzina/3600)\n $perSecondGain = $gain / 3600;\n //zwracamy zysk w czasie $deltaTime\n return $perSecondGain * $deltaTime;\n }", "public function getWeightTotal(): float;", "public function discountOrChargeValue()\n {\n return $this->discountOrChargeValueBoleta();\n }", "protected function getMoneyWorth($dkk = 1)\r\n {\r\n return $dkk / floatval(get_option('fanpoint_options', false)['FP_Worth']);\r\n }", "public function percentKnockedOut() : float\n\t{\n\t\treturn $this->percentKnockedOut;\n\t}", "protected function giveCost()\n {\n $novoValor = 4;\n $this->valueNow = 210.54 / $novoValor;\n return $this->valueNow;\n }", "public function amount(): float\n {\n return $this->amount;\n }", "public function getAmount(): float;", "public function getDamageMultiplier() {\n return $this->damageMultiplier();\n }", "public function getFabricQuantity() {\r\n \r\n return doubleVal($this->quantity / 100);\r\n }", "public function getBluetoothAvg() {\n return $this->bluetoothAvg;\n }", "public function getGoodsPrice()\n {\n return $this->goods_price;\n }", "public function getMemberGoodsPrice()\n {\n return $this->member_goods_price;\n }", "public function getOffenseEffectiveness()\n {\n return $this->attacker->getStats()->getStrength();\n }", "public function rate()\n {\n return $this->rate;\n }", "public function rate()\n {\n return $this->rate;\n }", "public function getCurrentCharge()\n {\n return $this->current_charge;\n }", "public function getAmount(): float\n {\n return $this->_amount;\n }", "public function getWeight() {\n return $this->item->getWeight();\n }", "public function getresistanceValue()\n {\n return $this->value;\n }", "protected function giveCost()\n\t{\n\t\t$solarSaving = 2;\n\t\t$this->valueNow = 210.54 / $solarSaving;\n\t\treturn $this->valueNow;\n\t}", "public function getGold()\n {\n return $this->get(self::_GOLD);\n }", "public function getGold()\n {\n return $this->get(self::_GOLD);\n }", "public function getUnitValue(): float\n\t{\n\t\treturn $this->unitValue;\n\t}", "public function getCharge()\n {\n return $this->_fields['Charge']['FieldValue'];\n }", "public function getWeight() {\n }", "public function getGold() {\n\t\treturn $this->gold;\n\t}", "public function getDamage()\n {\n return $this->_damage;\n }", "public function getWeight() : float\n\t{\n\t\treturn $this->weight;\n\t}", "public function getDamage()\n {\n return $this->damage;\n }", "public function damage() {\r\n\t\tif ($this->isWeapon()) {\r\n\t\t\treturn $this->techData['damage'];\r\n\t\t}\r\n\r\n\t\treturn 0;\r\n\t}", "public function getDefense()\n {\n return $this->_bonusDefense;\n }", "public function getLow(): float\n {\n return $this->low;\n }", "public function getGold()\n {\n $value = $this->get(self::GOLD);\n return $value === null ? (integer)$value : $value;\n }", "public function getBalance()\n {\n return (float)$this->client->requestExecute(\"credit\");\n }", "public function getDefense()\n {\n return $this->defense;\n }", "public function getHigh(): float\n {\n return $this->high;\n }", "public function getUnitsconsumed()\n {\n return $this->unitsconsumed;\n }", "public function getVol(): float\n {\n return $this->vol;\n }", "private function getCurrentDewPoint() {\n $t = $this->getCurrentTemp();\n $h = $this->getCurrentHumidity();\n\n return $t - (100 - $h) / 5;\n }", "function getWeight() {\n return $this->weight;\n }", "public function getUsagePercent() : float\n\t{\n\t\treturn $this->usagePercent;\n\t}", "public function getDecreasePrice() {\r\n $decrease = Mage::getStoreConfig(\r\n 'giftwrap/general/decrease_price_wrapall');\r\n if (is_numeric($decrease)) {\r\n return $decrease;\r\n } else {\r\n return 0;\r\n }\r\n }", "public function getUnitCost()\n {\n return $this->producer->getUnitCost();\n }", "public function getServiceCharge()\n {\n return $this->service_charge;\n }", "public function getChargeValueModifier()\n {\n $value = 0;\n\n if ($this->isCompleted() || $this->isPending()) {\n $value += $this->getValue();\n }\n\n if ($this->getBackendTransactions()) {\n foreach ($this->getBackendTransactions() as $transaction) {\n if ($transaction->isRefund() && $transaction->isSucceed()) {\n $value -= abs($transaction->getValue());\n }\n }\n }\n\n return max(0, $value);\n }", "public function getDeviation(): float\n {\n return $this->deviation;\n }", "public function getValue()\n {\n return (float) $this->value;\n }", "public function weight() {\r\n\t\treturn (int)$this->techData['weight'];\r\n\t}", "public function getEffectivePrice()\n {\n return $this->effective_price;\n }", "private function getTotalCharge() {\n $result = 0;\n\n foreach ($this->rentals as $rental) {\n $result += $rental->getCharge();\n }\n return $result;\n\n }", "public function calculate()\n {\n $nationalInsurance = 0.0;\n $nationalInsurance += $this->calculateBand('basic');\n $nationalInsurance += $this->calculateBand('higher');\n return $nationalInsurance;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getDollarPrice(): float;", "public function getCurrentBalance(): float\n {\n return $this->currentBalance;\n }", "public function getTotalWeight(): float\n {\n return $this->totalWeight;\n }", "public function getStrength()\n {\n return $this->strength;\n }", "public function getStrength()\n {\n return $this->strength;\n }", "public function getPothexchrate()\n {\n return $this->pothexchrate;\n }", "public function carFuel()\n {\n return parent::getFuel();\n }", "public function getCurrentPrice() : float;", "public function getRate() {\n return $this->rate;\n }", "public function getBaseDamage()\n {\n return floor(self::MULT * $this->strength);\n }", "public function getFee(): float;", "public function getAverageAudioDegradation()\n {\n if (array_key_exists(\"averageAudioDegradation\", $this->_propDict)) {\n return $this->_propDict[\"averageAudioDegradation\"];\n } else {\n return null;\n }\n }", "public function getAmountRate()\n {\n return $this->amountRate;\n }", "function spectra_money_supply ()\n\t{\n\t\tif (system_flag_get (\"balance_rebuild\") > 0)\n\t\t{\n\t\t\treturn \"Re-Balancing\";\n\t\t}\n\t\t\n\t\t$response = $GLOBALS[\"db\"][\"obj\"]->query (\"SELECT SUM(`balance`) AS `supply` FROM `\".$GLOBALS[\"tables\"][\"ledger\"].\"`\");\n\t\t$result = $response->fetch_assoc ();\n\t\t\n\t\tif (!isset ($result[\"supply\"]))\n\t\t{\n\t\t\treturn \"Unavailable\";\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\treturn $result[\"supply\"];\n\t\t}\n\t}", "public function getExchangeRate()\n {\n return $this->exchange_rate;\n }", "public function amount() {\r\n\t\treturn $this->amount;\r\n\t}", "function getWeight(){return $this->weight;}", "public function getWeight()\n {\n }", "public function getWeight()\n {\n }", "function getUtilisation(){\n\n $total = $this-> getTotalWeight() ;\n \n return round(($total / $this->capacity) * 100, 2);\n\n }", "public function estimate(){\n\t\t$speed = $this->speed();\n\t\tif($speed === 0 || $this->elapsed() === 0)\n\t\t\treturn 0;\n\n\t\treturn round($this->total / $speed);\n\t}", "public function getWeight()\n {\n return $this->weight;\n }", "public function getWeight()\n {\n return $this->weight;\n }", "public function getWeight()\n {\n return $this->weight;\n }" ]
[ "0.6608715", "0.63203067", "0.62981546", "0.62909436", "0.6197732", "0.61832464", "0.6118515", "0.6077072", "0.60670114", "0.60651124", "0.606058", "0.60189724", "0.59712094", "0.5930064", "0.59287155", "0.5925734", "0.59255564", "0.5923893", "0.5911628", "0.5908714", "0.5900055", "0.5894061", "0.5875588", "0.58747894", "0.5870111", "0.5862592", "0.58537185", "0.5847194", "0.58402306", "0.5829544", "0.5828872", "0.5823601", "0.5810142", "0.58088046", "0.58088046", "0.57985115", "0.579512", "0.5790726", "0.57900876", "0.5775134", "0.57708585", "0.57708585", "0.5763727", "0.57620174", "0.57603246", "0.57589376", "0.575758", "0.5755938", "0.574191", "0.57350326", "0.5730345", "0.5718386", "0.5714285", "0.5713217", "0.57119536", "0.57101136", "0.57092065", "0.57054836", "0.5703053", "0.56923676", "0.5688392", "0.567248", "0.56697255", "0.5668783", "0.5668139", "0.56572074", "0.56509554", "0.564942", "0.5648882", "0.5637021", "0.5633581", "0.56280047", "0.56280047", "0.56280047", "0.56280047", "0.56280047", "0.5627682", "0.5621466", "0.5613932", "0.561247", "0.561247", "0.56048954", "0.5598124", "0.5582907", "0.5580756", "0.55805284", "0.55768704", "0.5573104", "0.557045", "0.55669004", "0.5562584", "0.5554766", "0.555408", "0.55539936", "0.55539936", "0.5553967", "0.5553878", "0.5547299", "0.5547299", "0.5547299" ]
0.8184569
0
Return the hit level on the target.
Верните уровень попадания на целевой объект.
public function getHitLevel();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLevel() {}", "public function getLevel();", "public function getLevel();", "public function GetLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel() {\n return intval($this->level);\n }", "public function getLevel(): int\n {\n return $this->level;\n }", "public function getLevel(): int\n {\n return $this->level;\n }", "public function getLevel(): int {\n return $this->level;\n\n }", "public function getLevel() {\n return $this->level;\n }", "public function getLevel() {\n\t\treturn isset($this->level) ? (int) $this->level : 1;\n\t}", "public function getLevel()\n {\n return$this->level;\n }", "public function getLevel() : int\n\t{\n\t\treturn $this->level;\n\t}", "public function getLevel()\n {\n $value = $this->get(self::LEVEL);\n return $value === null ? (integer)$value : $value;\n }", "public function getLevel()\n\t{\n\t\treturn $this->token->level;\n\t}", "public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }", "public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }", "public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }", "public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }", "public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }", "public function getLevel()\n {\n return $this->get(self::_LEVEL);\n }", "function getLevel() {\n\t\treturn $this->_level;\n\t}", "function getLevel();", "public function getLevel()\n {\n return isset($this->level) ? $this->level : null;\n }", "public function getLevel()\n {\n $level = 0;\n if (!is_null($this->boss)) {\n $memberTmp = $this;\n while (!is_null($memberTmp = $memberTmp->getBoss())) {\n $level++;\n } ;\n }\n\n return $level;\n }", "public function getLevel() : Level {\r\n\r\n return $this->level;\r\n\r\n }", "public function getPlayerLevel()\n {\n return $this->get(self::_PLAYER_LEVEL);\n }", "public static function currentLevel()\n\t{\n\t\tif (!auth()->check()) return 0;\n\t\t$member = \\PanicHDMember::find(auth()->user()->id);\n\t\tif ($member->isAdmin()){\n\t\t\treturn 3;\n\t\t}elseif($member->isAgent()){\n\t\t\tif (session()->exists('panichd_filter_currentLevel') and session('panichd_filter_currentLevel')==1){\n\t\t\t\treturn 1;\n\t\t\t}else{\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t}else\n\t\t\treturn 1;\n\t}", "private function getActualLevel(): int\n {\n return (int)array_key_last($this->levels);\n }", "public function getOppoLevel()\n {\n return $this->get(self::_OPPO_LEVEL);\n }", "protected function get_level()\n {\n return $this->m_voxy_connect->_get_list_voxy_level();\n }", "public function getLevel()\n\t{\n $criteria = new CDbCriteria;\n $criteria->condition = \" idUser = $this->idUser \";\n $criteria->order = ' t.level DESC ';\n \n $userCoins = VerifIdentity::model()->find($criteria);\n \n return $userCoins === null ? 1 : $userCoins['level']; \n }", "public function level($skills)\n {\n return $this->getStat('level', $skills);\n }", "function getLevel($gid)\n {\n return 0;\n }", "public static function maxLevel()\n\t{\n\t\tif (!auth()->check()) return 0;\n\t\t$member = \\PanicHDMember::find(auth()->user()->id);\n\t\tif ($member->isAdmin()){\n\t\t\treturn 3;\n\t\t}elseif($member->isAgent()){\n\t\t\treturn 2;\n\t\t}else\n\t\t\treturn 1;\n\t}", "public function loadLevel() {\n\t\tswitch(true){\n\t\t\tcase ($this->data['level_pts'] >= 5000):\n\t\t\t\t$level = floor($this->data['level_pts'] / 1000) + 7;\n\t\t\t\tbreak;\n\t\t\tcase ($this->data['level_pts'] >= 1000):\n\t\t\t\t$level = floor($this->data['level_pts'] / 500) + 2;\n\t\t\t\tbreak;\n\t\t\tcase ($this->data['level_pts'] >= 600):\n\t\t\t\t$level = 3;\n\t\t\t\tbreak;\n\t\t\tcase ($this->data['level_pts'] >= 300):\n\t\t\t\t$level = 2;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$level = 1;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $level;\n\t}", "public function totalLevel()\n {\n if ($this->noTotalLevelFound) {\n $sum = 0;\n foreach($this instanceof OSRSPlayer ? OSRSHiscores::SKILL_MAP : RS3Hiscores::SKILL_MAP as $skill) {\n if ($skill === 'Overall') {\n // 'Overall' is a cumulative so we skip it for the sum.\n continue;\n }\n $sum += $this->get($skill)->level ?: 1;\n }\n return $sum;\n }\n return $this->get('overall')->level;\n }", "public function getLevelForExperience($experience)\n {\n $level = sqrt($experience+10000)-99;\n return floor($level);\n }", "public function getActionLevel() {\n return $this->actionLevel;\n }", "public function getHit()\n {\n return $this->hit;\n }", "public function toInt()\n {\n return $this->level;\n }", "public function level() {\n\n\t\t$this->count_attempts( 300 );\n\n\t\tswitch ( TRUE ) {\n\t\t\tcase ( $this->attempts > 2 && $this->attempts <= 100 ) :\n\t\t\t\treturn Logger::NOTICE;\n\t\t\tcase ( $this->attempts > 100 && $this->attempts <= 590 ) :\n\t\t\t\treturn Logger::WARNING;\n\t\t\tcase ( $this->attempts > 590 && $this->attempts <= 990 ) :\n\t\t\t\treturn Logger::ERROR;\n\t\t\tcase ( $this->attempts > 990 ) :\n\t\t\t\treturn Logger::CRITICAL;\n\t\t}\n\n\t\treturn 0;\n\t}", "public function getSkillLevelUp()\n {\n return $this->get(self::_SKILL_LEVEL_UP);\n }", "public function getSkillLevelUp()\n {\n return $this->get(self::_SKILL_LEVEL_UP);\n }", "public function getLevel()\n {\n return PMA_Message::$level[$this->getNumber()];\n }", "public function getLevel() {\n\t\tif (empty($this->_level) && $this->_hasCategory) {\n\t\t\t$this->_level = $this->_getCategory()->getLevel();\n\t\t}\n\t\t//Remove 1 level, Home is considered L1.\n\t\treturn $this->_level -1;\n\t}", "public function GetSteamLevel()\n {\n $this->setApiDetails(__FUNCTION__, 'v0001');\n\n // Set up the arguments\n $arguments = ['steamId' => $this->steamId];\n\n // Get the client\n $client = $this->getServiceResponse($arguments);\n\n return $client->player_level;\n }", "public function getPercentLevel()\n { \n $experience_level = $this->getExperienceShortMax();\n\n $experience_current_level = $this->getExperienceShort();\n\n $percent = ($experience_current_level * 100)/$experience_level;\n\n return $percent;\n }", "public function level($uid = 0)\r\n {\r\n global $db, $_SMALLURL;\r\n if ($uid === 0) {\r\n if (isset($_SMALLURL['UID'])) {\r\n $uid = $_SMALLURL['UID'];\r\n }\r\n }\r\n $udat = db::get_array(\"users\", array(\"id\" => $uid), \"role\");\r\n if (count($udat) > 0) {\r\n $role = $udat[0]['role'];\r\n $rdat = db::get_array(\"roles\", array(\"id\" => $role));\r\n if (count($rdat) > 0) {\r\n return (int)$rdat[0]['level'];\r\n } else {\r\n return 0;\r\n }\r\n } else {\r\n return 0;\r\n }\r\n }", "public function getSkillLevelupChance()\n {\n return $this->get(self::_SKILL_LEVELUP_CHANCE);\n }", "public function getReadableLevel()\n {\n // we need to keep LEVEL array in this inverted format because of Symfony form elements\n return array_search($this->level, self::LEVELS);\n }", "public function getLevel(BaseObject $node)\n {\n if (!isset($node->level))\n {\n $peer_name = get_class($node->getPeer());\n\n $con = Propel::getConnection();\n\n $scope_sql = '';\n if (!is_null($node->getScopeIdValue())) {\n $scope_sql = sprintf(' AND %s = \\'%s\\'', self::getColumnConstant(get_class($node), 'scope'), $node->getScopeIdValue());\n }\n\n $sql = sprintf('SELECT COUNT(*) AS level FROM %s WHERE (%s < %d AND %s > %d) %s',\n constant(\"$peer_name::TABLE_NAME\"),\n self::getColumnConstant(get_class($node), 'left'),\n $node->getLeftValue(),\n self::getColumnConstant(get_class($node), 'right'),\n $node->getRightValue(),\n $scope_sql\n );\n\n $stmt = $con->prepareStatement($sql);\n $resultset = $stmt->executeQuery();\n $resultset->next();\n\n $level = $resultset->getInt('level');\n $node->level = $level;\n }\n else\n {\n $level = $node->level;\n }\n\n return $level;\n }", "public function getLevelMap()\n {\n return $this->levelMap;\n }", "function getUserLevel() {\n\t\tif(!$this->user_level_id) {\n\t\t\t$this->sql(\"SELECT access_level_id FROM \".UT_USE.\" WHERE id = \".$this->user_id);\n\t\t\t$this->user_level_id = $this->getQueryResult(0, \"access_level_id\");\n \t\t}\n\t\treturn $this->user_level_id;\n\t}", "public function getLevel() {\n return Logger::$LOG_LEVELS[$this->logLevel];\n }", "abstract public function getMinimumLevel()\n\t{\n\t\treturn 0.5;\n\t}", "function getLastlevel() {\n return $this->lastlevel;\n }", "protected function getThreshold()\n {\n return isset($this->threshold) ? $this->threshold : 1;\n }", "public function getLevelId(){\n\t\treturn $this->level_id;\n\t}", "public function getAccessLevel()\n\t{\n\t\tif (!is_null($this->accessLevel))\n\t\t\treturn $this->accessLevel;\n\n\t\t$this->accessLevel = 0;\n\n\t\tif ($this->access_level > $this->accessLevel)\n\t\t\t$this->accessLevel = $this->access_level;\n\n\t\tforeach ($this->roles as $role)\n\t\t{\n\t\t\tif ($role->access_level > $this->accessLevel)\n\t\t\t\t$this->accessLevel = $role->access_level;\n\t\t}\n\n\t\treturn $this->accessLevel;\n\t}", "public function getLogLevel()\r\n {\r\n return $this->level;\r\n }", "public function getLogLevel()\n {\n return $this->level;\n }", "public function getPreferLevel()\n {\n return $this->preferLevel;\n }", "protected function getPathLevel() : string\n {\n return $this->path_level;\n }", "public function getSkillLevelsCount()\n {\n return $this->count(self::_SKILL_LEVELS);\n }", "private static function getLevel() {\n if (empty(static::$level)) {\n static::$level = Conf::getIniVal(Conf::LOG_LEVEL, 3);\n }\n return static::$level;\n }", "public function getTotalAccess() {\n\t\t$userLevel = $this->getLevelId();\n\t\t$baseLevel = 1;\n\t\twhile ($userLevel > 1) {\n\t\t\t$baseLevel += $userLevel;\n\t\t\t$userLevel = $userLevel / 2;\n\t\t}\n\t\treturn $baseLevel;\n\t}", "public function getMessageLevel() {\r\n\t\treturn($this->level);\r\n\t}", "public function getLevel()\n {\n return sizeof($this->getParentsID());\n }", "function getLevel()\n {\n return $this->errorLevel;\n }", "function getLevelTruck()\r\n {\r\n static $level;\r\n if (!isset($level)) $level = new CustomLoggerLevel(LOG4PHP_LEVEL_TRUCK_INT, 'TRUCK', 0);\r\n return $level;\r\n }", "public function getDepthCurrent(): PositiveInteger;", "public function getSupportLevel()\n {\n return $this->supportLevel;\n }", "abstract public function combatLevel();", "public function getTargetAmount()\n {\n return $this->target_amount;\n }", "function giveDamage($target) :int {\n //si on ne ce tape pas nous meme\n if ($target->getId() !== $this->getId()) {\n return $target->receiveDamage($this->getAttack());\n } else {\n // TODO: return something?????\n }\n }", "public function getVipLevel()\n {\n return $this->VipLevel;\n }", "public function getVerbLevel(): int\n {\n if ($this->app) {\n return $this->app->getVerbLevel();\n }\n\n // return (int)$this->input->getLongOpt('debug', Console::VERB_ERROR);\n $envVal = OS::getEnvStrVal(Console::DEBUG_ENV_KEY);\n return $envVal !== '' ? (int)$envVal : Console::VERB_ERROR;\n }", "public function getDefaultLevel()\n {\n return 5; # level binh thuong\n }", "function killpointsFromDueling() {\n\tglobal $target_level,$attacker_level,$starting_target_health,$killpoints,$duel;\n\n\t$levelDifference = ($target_level-$attacker_level);\n\n\tif ($levelDifference > 10) {\n\t\t$levelDifferenceMultiplier = 5;\n\t} else if ($levelDifference > 0) {\n\t\t$levelDifferenceMultiplier = ceil($levelDifference/2); //killpoint return of half the level difference.\n\t} else {\n\t\t$levelDifferenceMultiplier = 0;\n\t}\n\n\t$killpoints = 1+$levelDifferenceMultiplier;\n}", "abstract public function getHitCount() : string;", "public function level()\n {\n // Define variables for use\n $counter = 0;\n $total_checklist_points = $this->checklist->sections->sum('total_points');\n $unwanted = array(Question::idById('providersenrolled'), Question::idById('correctiveactionproviders')); // do not contribute to total score\n $notapplicable = Question::idById('dbsapply'); // dbsapply will reduce total points to 65 if corresponding answer = 0\n // Begin processing\n $reductions = 0;\n $calculated_points = 0.00;\n $percentage = 0.00;\n $sqtns = $this->sqs()->whereNotIn('question_id', $unwanted) // remove non-contributive questions\n ->join('survey_data', 'survey_questions.id', '=', 'survey_data.survey_question_id')\n ->whereIn('survey_data.answer', Answer::lists('score'));\n $calculated_points = $sqtns->whereIn('question_id', array_unique(DB::table('question_responses')->lists('question_id')))->sum('answer'); \n if($sq = SurveyQuestion::where('survey_id', $this->id)->where('question_id', $notapplicable)->first())\n {\n if($sq->sd->answer == '0')\n $reductions++;\n }\n \n if($reductions>0)\n $percentage = round(($calculated_points*100)/($total_checklist_points-5), 2);\n else\n $percentage = round(($calculated_points*100)/$total_checklist_points, 2);\n return $percentage;\n }", "public function get_penalty()\n {\n return $this->penalty;\n }", "public function getTarget()\n {\n $value = $this->get(self::TARGET);\n return $value === null ? (integer)$value : $value;\n }", "public function levelName() {\n if (isset($this->level)) return self::$levels[$this->level];\n }", "public function getAuthLevel() {\n }", "public function transactionLevel();", "public function getDefaultLevel()\n {\n\n return 2.2;\n }", "public function getAdminLevel()\n {\n $userId = Auth::user()->id;\n // admin or not\n $level = 99;\n $user = DB::table('admins')->where('uid', $userId)->first();\n if ($user !== null) {\n $level = $user->level;\n }\n\n return $level;\n }", "function level($Pts){\n $grid = array(\n 1 => 50,\n 2 => 200,\n 3 => 600,\n 4 => 1000,\n 5 => 2500\n );\n $lvl = 0;\n foreach($grid as $k=>$v):\n if($Pts >= $v){\n $lvl = $k;\n }\n endforeach;\n return 'lvl '.$lvl;\n }", "public function logLevel()\n {\n return $this->logLevel ?: self::LOG_LEVEL_INFO;\n }", "public function getPowerLevel(){\n\t\t$request = $this->_sendPacketToController(self::GET_POWER_LEVEL);\n\t\tif ($request->getState() == self::STATE_OK) // If the packet is send sucefully\n\t\t\treturn $this->_getResponse();\n\t\telse\n\t\t\treturn $request;\n\t}", "public function spellDamageSingleTarget(SR_Player $player, SR_Player $target, $level, $key='10000', $damage, $arg4='')\n\t{\n\t\t$maxhp = $target->getMaxHP();\n\t\t$damage = round($damage, 1);\n\t\tif ($damage <= 0)\n\t\t{\n// \t\t\t$append = $append_ep = $player->lang('but no damge');\n// \t\t\t$append = $append_ep = ' but caused no damage';\n\t\t\t$hp = $target->getHP();\n\t\t\t$this->announceADV($player, $target, $level, $key, $damage, $hp, $maxhp, $arg4);\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t$p = $player->getParty();\n\t\t$mc = $p->getMemberCount();\n\t\t\n\t\t\n\t\t$target->dealDamage($damage);\n\t\tif ($target->isDead())\n\t\t{\n// \t\t\t$append = $append_ep = ' and kills them with '.$damage.' damage';\n\t\t\t\n\t\t\t$this->announceADV($player, $target, $level, $key, $damage, '0', $maxhp, $arg4);\n\n\t\t\t# Loot him!\n\t\t\t$xp = $target->isHuman() ? 0 : $target->getLootXP();\n//\t\t\t$xp = $target->getLootXP();\n\t\t\t$ny = round($target->getLootNuyen() / $mc, 1);\n\t\t\t$pxp = 0;\n\t\t\tif ($player->isNPC())\n\t\t\t{\n\t\t\t\t$target->resetXP();\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($p->getMembers() as $member)\n\t\t\t{\n\t\t\t\t$lxp = $xp/$mc;\n\t\t\t\t$leveldiff = ($target->getBase('level')+1) / ($member->getBase('level')+1);\n\t\t\t\t$lxp *= $leveldiff;\n\t\t\t\t$lxp = round(Common::clamp($lxp, 0.01), 2);\n\t\t\t\t$pxp += $lxp;\n\t\t\t\t$member->giveXP($lxp);\n\t\t\t\t$member->giveNuyen($ny);\n\t\t\t\t$member->msg('5105', array(Shadowfunc::displayNuyen($ny), $lxp));\n// \t\t\t\t$member->message(sprintf('You loot %s Nuyen and %s XP.', $ny, $lxp));\n\t\t\t}\n\t\t\t\n\t\t\t$p->givePartyXP($pxp);\n\t\t\t\n\t\t\t$target->gotKilledBy($player);\n\n\t\t}\n\t\telse # just some dmg\n\t\t{\n\t\t\t$hp = $target->getHP();\n// \t\t\t$maxhp = $target->getMaxHP();\n// \t\t\t$append = \" and caused {$damage} damage\";\n// \t\t\t$append_ep = \"{$append} ($hp/$maxhp)HP left.\";\n\t\t\t$this->announceADV($player, $target, $level, $key, $damage, $hp, $maxhp, $arg4);\n\t\t}\n\n\t\treturn true;\n\t}", "public function isHit()\n {\n return $this->hit;\n }" ]
[ "0.68071246", "0.6727809", "0.6727809", "0.6630325", "0.66138345", "0.66138345", "0.66138345", "0.66138345", "0.66138345", "0.66138345", "0.66138345", "0.6604302", "0.65856564", "0.65856564", "0.65646714", "0.6550286", "0.65243006", "0.65175945", "0.6508514", "0.64722013", "0.6448676", "0.64403903", "0.64403903", "0.64403903", "0.64403903", "0.64403903", "0.64403903", "0.6432447", "0.64323664", "0.6430741", "0.6365473", "0.6306704", "0.6238017", "0.61889315", "0.6134477", "0.6083399", "0.6055504", "0.6030401", "0.60146147", "0.60102326", "0.6003655", "0.5915252", "0.5906168", "0.5894079", "0.58771396", "0.5856217", "0.58109504", "0.57734203", "0.5751657", "0.5751657", "0.5700729", "0.5673516", "0.567307", "0.56473154", "0.56329364", "0.56290007", "0.56221294", "0.55876404", "0.55700636", "0.55290383", "0.5528572", "0.5528136", "0.5522007", "0.55139416", "0.5507313", "0.54644936", "0.5461855", "0.5451694", "0.5427659", "0.54197073", "0.5417944", "0.54005915", "0.5392409", "0.53876776", "0.5376996", "0.5370599", "0.53547615", "0.53385943", "0.53348464", "0.5332555", "0.533167", "0.5322316", "0.53104943", "0.5304582", "0.5291373", "0.5257746", "0.5242396", "0.5236871", "0.52318907", "0.5220474", "0.521673", "0.5201052", "0.519314", "0.5191371", "0.51884687", "0.51815706", "0.5176956", "0.51690835", "0.5168567", "0.51575434" ]
0.8134625
0
Does the string end with the given ending?
Заканчивается ли строка заданным окончанием?
private function endsWith($string, $ending) { $length = strlen($ending); if ($length == 0) { return true; } return (substr($string, -$length) === $ending); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ends_with($string,...$end)\n{\n if(!$string)\n return false;\n foreach( $end as $e )\n if( substr($string,strlen($string)-strlen($e)) == $e )\n return true;\n return false;\n}", "function check_str_end(string $string, string $end, int $len, $endLength): bool\n{\n return substr($string, $len - $endLength, $endLength) == $end;\n}", "function str_endsWith (string $str, string $needle): bool {\n\t$strLen = strlen($str);\n\t$needleLen = strlen($needle);\n\treturn (substr($str, $strLen - $needleLen, $needleLen) === $needle);\n}", "function string_ends_with( $haystack, $needle ) {\n\t\treturn substr($haystack, -strlen($needle))===$needle;\n\t}", "function ends_with($haystack, $needle)\n{\n\treturn substr($haystack, -strlen($needle))===$needle;\n}", "function str_endswith($string, $test) {\n $strlen = strlen($string);\n $testlen = strlen($test);\n if ($testlen > $strlen) {\n return false;\n }\n return substr_compare($string, $test, $strlen - $testlen, $testlen) === 0;\n }", "public function isLastPartOfStringReturnsFalseForNotMatchingFirstPartDataProvider() {}", "function ends_with($haystack, $needle) {\r\n $length = strlen($needle);\r\n $start = $length *-1; //negative\r\n return (substr($haystack, $start, $length) === $needle);\r\n}", "public function isLastPartOfStringReturnsTrueForMatchingFirstPartDataProvider() {}", "function ends_with($haystack, $needle) {\n\treturn $needle === substr($haystack, -strlen($needle));\n}", "public static function endsWith($string, $end)\n {\n // Needle cannot be found if needle is longer than haystack.\n if (($offset = strlen($string) - strlen($end)) >= 0) {\n return strpos($string, $end, $offset) === $offset;\n }\n\n return false;\n }", "public static function endsWith($str, $suffix) {\n\t\treturn substr($str, strlen($str) - strlen($suffix)) === $suffix;\n\t}", "function strEndsWith($haystack,$needle){\n\n if(strlen($haystack)<=strlen($needle)){\n return false;\n }\n $pos=stripos($haystack,$needle,0-strlen($needle));\n\n if($pos==(strlen($haystack)-strlen($needle))){\n return true;\n }\n return false;\n}", "function ends_iwith($string,...$end)\n{\n if(!$string)\n return false;\n $string = strtolower($string);\n foreach( $end as $e )\n if( substr($string,strlen($string)-strlen($e)) == strtolower($e) )\n return true;\n return false;\n}", "public function endsWithReturnsFalseForNotMatchingLastPartDataProvider() {}", "public function endsWith($suffix) {\n $other = new Str($suffix, $this->charset);\n\n return mb_strrpos($this->rawString, $suffix, 0, $this->charset) === ($this->length() - $other->length());\n }", "function endsBy(string $haystack, string $needle) : bool\n{\n $length = strlen($needle);\n\n return $length === 0 ||\n (substr($haystack, -$length) === $needle);\n}", "public function endsWithReturnsTrueForMatchingLastPartDataProvider() {}", "function endsWith($haystack, $needle) {\n return $needle === \"\" || strpos($haystack, $needle, strlen($haystack) - strlen($needle)) !== FALSE;\n}", "public function testTrueEndsWith()\n {\n $this->assertTrue(Str::endsWith('foo', 'o'));\n }", "public static function endsWith($haystack, $needle) {\n return (strrpos($haystack, $needle) == (strlen($haystack) - strlen(\n $needle\n )));\n }", "function endsWith($haystack, $needle) {\n\treturn $needle === \"\" || strpos($haystack, $needle, strlen($haystack) - strlen($needle)) !== FALSE;\n}", "function endsWith($haystack, $needle)\n{\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n}", "function endsWith($haystack, $needle)\n{\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n}", "function endsWith($needle, $haystack)\n{\n $needle = strrev($needle);\n $haystack = strrev($haystack);\n return (strpos($haystack, $needle) === 0);\n}", "public static function stringEndsWith($string, $suffix)\n {\n $str_len = strlen($string);\n $suffix_len = strlen($suffix);\n if ($suffix_len > $str_len) return false;\n return substr_compare($string, $suffix, $str_len - $suffix_len, $suffix_len) === 0;\n }", "public function testFalseEndsWith()\n {\n $this->assertFalse(Str::endsWith('foo', 'y'));\n }", "function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n}", "function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n}", "function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n}", "function endsWith($haystack, $needle){\n $length = strlen($needle);\n return $length === 0 ||\n (substr($haystack, -$length) === $needle);\n }", "function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\n}", "function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\n}", "function endsWith($haystack, $needle) {\r\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\r\n}", "function endsWith($haystack, $needle) {\n\t\t$pos = strlen($haystack) - strlen($needle);\n\t\treturn (strpos($haystack, $needle) === $pos);\n\t}", "function endsWith($haystack, $needle) {\n if(!empty($haystack)) {\n return $needle === \"\" || strpos($haystack, $needle, strlen($haystack) - strlen($needle)) !== FALSE;\n }\n}", "function endsWith($haystack, $needle) {\n if(!empty($haystack)) {\n return $needle === \"\" || strpos($haystack, $needle, strlen($haystack) - strlen($needle)) !== FALSE;\n }\n}", "private function strEndsWith($string, $niddle)\n {\n return mb_substr($string, mb_strlen($string) - mb_strlen($niddle), mb_strlen($niddle)) == $niddle;\n }", "function endWith($haystack, $needle) { \n\n\t\t $length = strlen($needle); \n\t\t if($length == 0)\n\t\t { \n\t\t\t return true; \n\t\t } \n\t\t return (substr($haystack, -$length) === $needle);\n\t }", "function endsWith($haystack, $needle) {\r\n\t\treturn $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\r\n\t}", "public static function ends_with( $needle, $haystack ) {\n\t\treturn '' === $needle || substr( $haystack, -strlen( $needle ) ) === (string) $needle;\n\t}", "public static function ends_with( $haystack, $needle ) {\n\t\treturn $needle === substr( $haystack, -strlen( $needle ) );\n\t}", "function endsWith($haystack, $needle) {\n\t\t\t$needle_length = strlen($needle);\n\t\t\t$offset = strlen($haystack) - $needle_length;\n\t\t\t$length = $needle_length;\n\t\t\treturn @substr_compare($haystack, $needle, $offset, $length) === 0;\n\t\t}", "function endsWith($haystack, $needle)\r\n {\r\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\r\n }", "public static function endsWith(string $string, string $suffix, &$nonSuffix = null) : bool\n {\n $suffixLength = strlen($suffix);\n\n if ($suffixLength === 0) {\n $nonSuffix = $string;\n return true;\n }\n\n if (empty($string)) {\n $nonSuffix = '';\n return false;\n }\n\n if (substr_compare($string, $suffix, -$suffixLength, $suffixLength) !== 0) {\n $nonSuffix = $string;\n return false;\n }\n\n $nonSuffix = substr($string, 0, -$suffixLength);\n return true;\n }", "function endsWith($haystack, $needle) {\n\t\treturn $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\n\t}", "function endsWith($haystack, $needle) {\n // search forward starting from end minus needle length characters\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\n }", "public static function endsWith($str,$test) {\r\n if (! (substr( $str, -strlen( $test ) ) == $test) ) {\r\n return false;\r\n }\r\n return substr($str, 0, strlen($str) - strlen($test));\r\n }", "public function endsWithIgnoreCase($suffix) {\n $other = new Str($suffix, $this->charset);\n\n return mb_strripos($this->rawString, $suffix, 0, $this->charset) === ($this->length() - $other->length());\n }", "function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\n }", "static function endsWith($haystack, $needle)\n {\n // search forward starting from end minus needle length characters\n return $needle === \"\" ||\n (($temp = strlen($haystack) - strlen($needle)) >= 0 &&\n strpos($haystack, $needle, $temp) !== false);\n }", "public function endsWith(string $string, string $ends_with = ''): bool\n {\n\n $length = strlen($ends_with);\n\n return $length === 0 || (substr($string, -$length) === $ends_with);\n\n }", "public static function endsWith(String $haystack, String $needle): bool {\n\t\t$length = strlen($needle);\n\t\tif ($length == 0) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn (substr($haystack, -$length) === $needle);\n\t}", "function ends_with($haystack, $needles)\n {\n foreach ((array)$needles as $needle) {\n if (substr($haystack, -strlen($needle)) === (string)$needle) {\n return true;\n }\n }\n return false;\n }", "function endsWith($haystack, $needle) {\n\t\t$length = strlen($needle);\n\t\tif ($length == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn (substr($haystack, -$length) == $needle);\n\t}", "public static function endsWith($haystack, $needle)\n {\n return '' === $needle || strrpos($haystack, $needle) === strlen($haystack) - strlen($needle);\n }", "private function endWith($haystack, $needle): bool\n {\n return substr_compare($haystack, $needle, -strlen($needle)) === 0;\n }", "static function endsWith(string $s, string|array $suffixes): bool {\n foreach ((array) $suffixes as $needle) {\n if (mb_substr($s, -mb_strlen((string) $needle)) === (string) $needle) {\n return true;\n }\n }\n\n return false;\n }", "public static function endsWith(string $haystack, string $needle): bool \n {\n return substr_compare($haystack, $needle, -strlen($needle)) === 0;\n }", "public static function endsWith($input, $suffix)\n {\n self::initialize();\n\n return strlen($suffix) === 0 || substr($input, -strlen($suffix)) === $suffix;\n }", "function endsWith($str1,$str2){\n \tif(mb_substr($str1, -mb_strlen($str2)) == $str2){\n \t\treturn mb_substr($str1, 0, mb_strlen($str1)- mb_strlen($str2));\n \t} else {\n \t\treturn -1;\n \t}\n\t}", "public static function endsWith(string $value, $end, bool $ignoreCase = false): bool\n {\n if ($ignoreCase) {\n $value = mb_strtolower($value);\n }\n $end = is_array($end) ? $end : [$end];\n foreach ($end as $val) {\n if ($ignoreCase) {\n $val = mb_strtolower($val);\n }\n if (mb_substr($value, -mb_strlen($val)) == $val) {\n return true;\n }\n }\n return false;\n }", "public static function str_ends_with( $haystack, $needle ) {\n\n\t\tif ( '' === $needle ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( self::multibyte_loaded() ) {\n\n\t\t\treturn mb_substr( $haystack, -mb_strlen( $needle, self::MB_ENCODING ), null, self::MB_ENCODING ) === $needle;\n\n\t\t} else {\n\n\t\t\t$haystack = self::str_to_ascii( $haystack );\n\t\t\t$needle = self::str_to_ascii( $needle );\n\n\t\t\treturn substr( $haystack, -strlen( $needle ) ) === $needle;\n\t\t}\n\t}", "public function endsWith(self $path): bool {\n $thisStr = $this.'';\n $pathStr = $path.'';\n\n return $path->length() === 0\n || $this->length() === 0\n || strpos($thisStr, $pathStr) === strlen($thisStr) - strlen($pathStr);\n }", "public static function ends_with($haystack, $needle)\n {\n $length = strlen($needle);\n if ($length == 0)\n {\n return true;\n }\n\n return (substr($haystack, -$length) === $needle);\n }", "function str_ends_with($needle, $haystack)\n {\n return str::endsWith($needle, $haystack);\n }", "public function endsWith($needle) {\n\t\treturn ($needle === '') || (substr((string)$this, -strlen($needle)) === $needle);\n\t}", "protected function ends()\n {\n static $re_all = '/^[\\h\\v]*$/';\n static $re_nnl = '/^[\\h]*$/';\n \n if ($this->data === null)\n return true;\n \n // if $tnl (track new lines) is true: use \\h, else: use \\h\\v\n return preg_match($this->tnl ? $re_nnl : $re_all, $this->data);\n }", "public static function endsWith($haystack, $needle)\n {\n return strrpos($haystack, $needle) == strlen($haystack) - strlen($needle);\n }", "public static function endsWith($haystack, $needle) {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n }", "public function endsWith($haystack, $needle)\n {\n return $needle === '' || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\n }", "public static function endsWith(string $haystack, string $needle): bool\n {\n return stristr($haystack, $needle) !== false && substr($haystack, (strlen($needle) * -1)) === $needle;\n }", "public static function endsWith(string $haystack, string $needle): bool\n\t{\n\t\t$isEight = \\version_compare(PHP_VERSION, '8.0.0') >= 0;\n\t\t$length = strlen($needle);\n\n\t\tif ($isEight)\n\t\t{\n\t\t\treturn \\str_ends_with($haystack, $needle);\n\t\t}\n\n\t\treturn !$length ? true : substr($haystack, -$length) === $needle;\n\t}", "public static function endsWith(string $haystack, string $needle): bool\n {\n return $needle === '' || substr($haystack, -strlen($needle)) === $needle;\n }", "public static function endsWith($string, $search)\n {\n if ($search == '') {\n // all strings end in nothing!\n return true;\n }\n\n $len = strlen($search);\n $test = substr($string, -1 * $len);\n\n if ($test === $search) {\n return true;\n } else {\n return false;\n }\n }", "public static function endsWith($haystack, $needle)\n {\n return $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n }", "public static function endsWith($str, $substr)\n {\n return substr($str, -strlen($substr)) == $substr;\n }", "protected static function endsWith($haystack, $needle) {\n\t\t// search forward starting from end minus needle length characters\n\t\treturn $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n\t}", "protected static function endsWith($haystack, $needle) {\n\t\t// search forward starting from end minus needle length characters\n\t\treturn $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== FALSE);\n\t}", "public function endsWith( $haystack, $needle ) {\n\t\treturn $needle == substr( $haystack, strlen( $haystack ) - strlen( $needle ) );\n\t}", "private function endsWith($haystack, $needle) {\r\n\t\t\treturn $needle === \"\" || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false);\r\n\t\t}", "public function endsWith($string, $substring) {\n if (empty($string) || empty($substring) || strlen($substring) > strlen($string)) return false;\n\n return strpos($string, $substring) !== false && strpos($string, $substring) == strlen($string) - strlen($substring);\n }", "public static function endsWith($haystack, $needle)\r\n {\r\n Preconditions::checkIsString($haystack);\r\n Preconditions::checkIsString($needle);\r\n if ($needle == '') return true;\r\n\r\n $needle_length = strlen($needle);\r\n if ($needle_length > strlen($haystack)) {\r\n return false;\r\n }\r\n return substr_compare($haystack, $needle, -$needle_length, $needle_length) === 0;\r\n }", "static function stringEndsWith($suffix)\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::stringEndsWith', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public static function endsWith($value, $suffix)\n {\n return ($suffix == substr($value, -strlen($suffix))) ? true : false;\n }", "function endsWith($haystack, $needle) // Colorize: green\n { // Colorize: green\n $length = strlen($needle); // Colorize: green\n // Colorize: green\n if ($length == 0) // Colorize: green\n { // Colorize: green\n return true; // Colorize: green\n } // Colorize: green\n // Colorize: green\n return substr($haystack, -$length) === $needle; // Colorize: green\n }", "function str_iends_with($needle, $haystack)\n {\n return str::endsWithIgnoreCase($needle, $haystack);\n }", "public static function stringEndsWith($haystack, $needles)\n {\n foreach ((array)$needles as $needle) {\n if ((string)$needle === mb_substr($haystack, -self::stringLength($needle))) {\n return true;\n }\n }\n return false;\n }", "abstract protected function isEndToken(string $token) : bool;", "function ends_with($haystack, $needles)\n {\n return Str::endsWith($haystack, $needles);\n }", "public static function endsWith(string $subject, string $value): bool\n\t{\n\t\tif (function_exists(\"str_ends_with\")) {\n\t\t\treturn str_ends_with($subject, $value);\n\t\t}\n\t\treturn $value === \"\" || (($temp = mb_strlen($subject) - mb_strlen($value)) >= 0 && strpos($subject, $value, $temp) !== false);\n\t}", "public function endsWith($element) {\n return $this->is(new NotPossible('ends with anything'));\n }", "public function endsWith($haystack, $needle)\n {\n return $needle === '' || substr($haystack, -strlen($needle)) === $needle;\n }", "static function assertStringEndsWith($suffix, $string, $message = '')\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::assertStringEndsWith', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public function endsWith ($haystack, $needle)\n {\n $length = strlen($needle);\n if ($length === 0) {\n return true;\n }\n return (substr($haystack, -$length) === $needle);\n }", "public static function endsWith($str, $needle, $caseInvariant = true)\n {\n $match = substr($str, strlen($str) - strlen($needle));\n return self::strContains($match, $needle, $caseInvariant);\n }", "public static function endsWith($haystack, $needle) {\n $length = strlen($needle);\n if ($length == 0) {\n return true;\n }\n\n return substr($haystack, -$length) === $needle;\n }", "public static function endsWith($haystack, $needle)\n {\n $length = strlen($needle);\n if (!$length) {\n return true;\n }\n return substr($haystack, -$length) === $needle;\n }", "public static function endsWith($needle, $haystack)\n {\n return substr($haystack, -strlen($needle)) == $needle;\n }", "function _EndsWithNewLine($data=null) \r\n{ \r\n$data = strval($data); //** ensure that data is a string. \r\nif(strlen($data) == 0) //** no date given to test. \r\nreturn false; //** does not end with newline. \r\n\r\n//** get the position of the last newline character. If the value returned \r\n//** is not numeric it is a boolean, indicating no match. Considered to end \r\n//** with newline if it ends with either a '\\n' or '\\r' character. \r\n\r\n$creturnpos = strrpos($data, \"\\r\"); //** position of '\\n'. \r\n$newlinepos = strrpos($data, \"\\n\"); //** position of '\\r'. \r\n\r\nreturn (is_int($newlinepos) || is_int($creturnpos)); \r\n}" ]
[ "0.8075019", "0.79937583", "0.783031", "0.77522296", "0.77446014", "0.77412206", "0.7707136", "0.7633017", "0.7626689", "0.7624749", "0.7588783", "0.7531934", "0.7489809", "0.74896574", "0.74605316", "0.73864275", "0.7373679", "0.73714787", "0.7369942", "0.7367351", "0.72840846", "0.72799677", "0.72737026", "0.72737026", "0.72719485", "0.7268855", "0.724449", "0.72260475", "0.72260475", "0.72260475", "0.7203312", "0.7199944", "0.7199944", "0.719764", "0.71334165", "0.71199155", "0.71199155", "0.7105969", "0.70626915", "0.70563114", "0.70517445", "0.70352125", "0.7029684", "0.70108426", "0.7005628", "0.7000007", "0.69943726", "0.6989642", "0.69879115", "0.6954042", "0.69359195", "0.6934935", "0.69246763", "0.68951195", "0.68869954", "0.6874723", "0.68497974", "0.6842458", "0.68177116", "0.6799974", "0.67895937", "0.67828256", "0.6760085", "0.6754936", "0.67479193", "0.6727702", "0.67145824", "0.6704597", "0.6702408", "0.6698471", "0.66974896", "0.6695967", "0.6693134", "0.66903645", "0.668584", "0.6679217", "0.6670775", "0.66551065", "0.66551065", "0.665067", "0.663527", "0.6633986", "0.6632345", "0.65943813", "0.65509766", "0.65497565", "0.6528385", "0.65178406", "0.65070933", "0.64897144", "0.648424", "0.6471996", "0.6468485", "0.6449642", "0.6403463", "0.6403208", "0.63942754", "0.63924265", "0.63844585", "0.6346071" ]
0.8063734
1
/ the constructor loads the necessary core files and classes, and creates a router instance
Конструктор загружает необходимые ядро файлы и классы, и создает экземпляр маршрутизатора
public function __construct() { $this->loadCoreClasses(); $this->router = new Router(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this->uri = Fly::app()->getUri();\n Fly::log('debug', \"Router Class Initialized\");\n $this->setRouting();\n }", "function __construct()\n {\n $routesPath = ROOT . '/core/config/routes.php';\n if (file_exists($routesPath)) {\n $this->routes = include_once($routesPath);\n } else {\n die('error');\n }\n }", "public function __construct()\n\t{\n\t\t$this->CI =& get_instance();\n\t\t$this->route_stack = array('', '', '', '');\n\t\tlog_message('debug', 'Router Class Initialized');\n\t}", "function __construct(){\r\n $parser = new Shumvc_RouteParser();\r\n $this->routes = $parser->getRoutes();\r\n }", "public function __construct()\r\n {\r\n $routesPath = ROOT . 'config/routes.php';\r\n $this->routes = include($routesPath);\r\n }", "function __construct() {\n global $urlpatterns,$errorhandler;\n //Initialize config object\n $this->config=new Config();\n //Get all URLs Routes\n $this->routes=$this->config->urlpatterns;\n //Get all ErrorHandler\n $this->error_routes=$this->config->errorhandler;\n //Check for server error\n $this->server_error();\n //Route URLs\n $this->router($this->config->request_path, $this->routes);\n }", "public function __construct()\r\n {\r\n Zend_Loader::registerAutoload();\r\n $this->_frontController = Zend_Controller_Front::getInstance();\r\n $this->_router = $this->_frontController->getRouter();\r\n }", "public function __construct()\n\t{\n\t\tself::$classRouter\t= RecursiveRouter::class;\n\t\tself::$configFile\t= \"config/config.ini\";\n\t\t$this->detectSelf( FALSE );\n\t\t$this->uri\t= getCwd().'/';\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// hack for console jobs\n\t\t$this->initClock();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup clock\n\t\t$this->initConfiguration();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup configuration\n\t\t$this->initModules();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup module support\n\t\t$this->initDatabase();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup database connection\n\t\t$this->initCache();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup cache support\n\t\t$this->initRequest();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup HTTP request handler\n\t\t$this->initResponse();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup HTTP response handler\n\t\t$this->initRouter();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setup request router\n\t\t$this->initLanguage();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// [DO NOT] setup language support\n\t\t$this->initPage();\n\t\t$this->__onInit();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// call init event (implemented by extending classes)\n\t\tif( $this->getModules()->has( 'Resource_Database' ) )\n\t\t\t$this->dbc->query( 'SET NAMES \"utf8\"' );\t\t\t\t\t\t\t\t\t\t\t\t// ...\n\t}", "private function __construct() {\n\n /**\n * Throw an exception if we are trying to create\n * a second instance of the router class.\n */\n if (self::$instance != null) {\n throw new Exception('Cannot create multiple router instances.');\n }\n\n $this->registry = Registry::getInstance();\n\n request::parseRequest();\n $this->route = request::getRoute();\n\n }", "public function __construct()\n {\n $this->route = new \\Janrain\\Union\\Lib\\Route;\n }", "public function __construct() {\r\n $host = $_SERVER['HTTP_HOST'];\r\n $this->routes['default'] = \"http://$host/index.php\";\r\n $this->routes['login'] = \"http://$host/login.php\";\r\n }", "public function __construct() {\n // Initialisation du mappage du site\n if ($this->router === false) {\n $router = new Router();\n $router->map();\n $this->router = true;\n }\n // On récupère l'URL et on la traite\n $this->request = new Request();\n $this->request = new Router($this->request->url);\n $this->request = $this->request->request;\n // On appelle soit le controlleur soit une page d'erreur\n $controller = $this->loadController();\n $action = $this->request['action']; \n if (class_exists($controller) && in_array($action, get_class_methods($controller))) {\n call_user_func_array(array(new $controller, $action), $this->request['params']);\n } else {\n Router::error(); \n } \n }", "public function bootstrapRouter()\n {\n $this->router = new Router($this);\n }", "protected function initRouter()\n {\n $xml = new \\DOMDocument;\n $xml->load(ROOT_DIR . '/configs/routing.xml');\n\n $routes = $xml->getElementsByTagName('route');\n\n $routeList = new RouteList();\n\n /** @var $DOMRoute DOMElement */\n foreach ($routes as $DOMRoute) {\n $attrController = $DOMRoute->getAttribute('controller');\n list($controller, $action) = explode('::', $attrController);\n\n /** @var Route $route */\n $route =\n new Route(\n $DOMRoute->getAttribute('path'),\n $controller,\n $action\n );\n\n if ($DOMRoute->hasChildNodes()) {\n /** @var \\DOMElement $node */\n $requirements = [];\n foreach ($DOMRoute->childNodes as $node) {\n if ($node->nodeType === XML_ELEMENT_NODE && $node->nodeName === \"requirement\") {\n $requirements[$node->getAttribute('key')] = $node->nodeValue;\n }\n if ($node->nodeType === XML_ELEMENT_NODE && $node->nodeName === \"condition\") {\n $route->setCondition($node->nodeValue);\n }\n }\n $route->setRequirements($requirements);\n }\n\n $routeList->offsetSet(\n $DOMRoute->getAttribute('id'),\n $route\n );\n }\n\n $this->router = new Router($routeList);\n }", "protected function _initLoadRouter(){\r\n\t}", "function __construct()\n\t{\n\t\t$this->load = new Load();\n\t\t$this->model = new Model();\n\n\t\t$this->home();\n\t}", "protected static function createRouter() {\n\t\tstatic::$router = new Router();\n\t}", "private function initRouter()\n {\n $this->di->mapService('core.router', '\\Core\\Router\\Router');\n\n $this->router = $this->di->get('core.router');\n $this->router->setBaseUrl(BASEURL);\n $this->router->setParametersToTarget([\n 'app',\n 'controller',\n 'action'\n ]);\n $this->router->addMatchTypes([\n 'mvc' => '[A-Za-z0-9_]++'\n ]);\n\n // Generic routes\n $routes = [\n 'index' => [\n 'route' => '/[mvc:app]/[mvc:controller]',\n 'target' => [\n 'action' => 'index'\n ]\n ],\n 'action' => [\n 'route' => '/[mvc:app]/[mvc:controller]/[mvc:action]'\n ],\n 'id' => [\n 'route' => '/[mvc:app]/[mvc:controller]/[i:id]?/[mvc:action]'\n ],\n 'child' => [\n 'route' => '/[mvc:app]/[mvc:controller]/[i:id]?/[mvc:action]/of/[i:id_parent]'\n ]\n ];\n\n foreach ($routes as $name => $route) {\n $this->router->map($route['method'] ?? 'GET|POST', $route['route'], $route['target'] ?? [], 'generic.' . $name);\n }\n }", "private function __construct() {\n require_once CORE_LIBRARY . 'CoreAutoloader.php';\n\n // instantiate core-class objects\n $this->autoloader = new CoreAutoloader();\n $this->config = CoreConfig::instance();\n $this->uri = CoreUri::instance();\n $this->message = CoreMessage::instance();\n }", "public function __construct(Router $router)\n {\n //Set the variables\n $this->router = $router;\n }", "public function __construct () {\n $this->router = new \\Skeletal\\Router\\Router();\n $this->session = new Session();\n \n $this->onNotFound = function ( $svc, $req ) {\n return (new Response())->text( '404 - Not Found' )->code(404);\n };\n $this->onException = function ( $svc, $req, $ex ) {\n return (new Response())->serverError()->text( '500 - Server Error' );\n };\n }", "public function __construct() {\n\t\t$this->getRoutes = array();\n\t\t$this->postRoutes = array();\n\t}", "public function __construct()\n {\n $this->checkRequestType($_SERVER['REQUEST_METHOD']);\n\n $this->setRoute();\n\n $this->executeRoute();\n }", "function __construct($a)\n {\n $this->RootDIR = $a . '/';\n \n // Load the config file\n $this->LoadConfigFile();\n \n // Get the autoloaders working\n $this->SetUpAutoLoaders();\n \n // Load classes into this object\n $this->LoadClasses();\n \n // Setup Smarty\n $this->SmartySetup();\n \n // Route the traffic\n $this->Router->RouteTraffic();\n }", "protected function _createRouter(){\n\t\treturn new SimpleRouter();\n\t}", "public function router()\n {\n // Initializing variables\n LSReqenvironment::initialize();\n }", "public function __construct()\n {\n $this->routes = array();\n }", "public function __construct(){\n $this->findRoute();\n }", "protected function _initRouter()\n {\n $front = Zend_Controller_Front::getInstance();\n $router = $front->getRouter();\n \n // Add some routes\n $router->addRoute('routeId', new Zend_Controller_Router_Route('route/definition/:param'));\n //...\n \n // Returns the router resource to bootstrap resource registry\n return $router;\n }", "public function init()\n\t{\n\t\t$this->loader->init();\n\t\t$this->routing->init();\n\t}", "public function __construct() {\n\t$this->app_path = __DIR__;\n\n\t// import main config file\n\trequire_once($this->app_path.'/config.class.php');\n\t$this->config = new config(realpath($this->app_path.'/../config'));\n\t$this->config->add_config(/* The default config */);\n\n\t$this->register_subdomain();\n\t$this->config->set_namespace($this->subdomain);\n\n\t$this->register_paths();\n\n\t// manage include paths\n\t$ip = get_include_path();\n\t$this->ip = realpath($this->FSPATH.'/'.$this->config->paths->sub_folder.'/'.$this->config->paths->app_folder.'/framework').':'.realpath($this->FSPATH.'/'.$this->config->paths->sub_folder.'/'.$this->config->paths->app_folder.'/model').':'.realpath($this->FSPATH.'/'.$this->config->paths->sub_folder.'/'.$this->config->paths->app_folder.'/logic');\n\tset_include_path($ip.':'.$this->ip);\n\n\t// register the autoload function\n\tspl_autoload_register(array($this, 'load_resource'));\n\trequire_once($this->FSPATH.'/'.$this->config->paths->sub_folder.'/'.$this->config->paths->app_folder.'/vendor/autoload.php');\n\n\t$this->set_globals();\n}", "public function __construct(Router $router)\n {\n $this->router = $router;\n }", "public function __construct(Router $router)\n {\n $this->router = $router;\n }", "public function __construct(Router $router)\n {\n $this->router = $router;\n }", "public function __construct(Router $router)\n {\n $this->router = $router;\n }", "public function __construct(Router $router)\n {\n $this->router = $router;\n }", "public function __construct(Router $router)\n {\n $this->router = $router;\n }", "public function __construct(Router $router)\n {\n parent::__construct($router);\n }", "public function __construct()\n\t{\n\t\t$this['router'] = new Router;\n\n\t\t$this['request'] = Request::createFromGlobals();\n\n\t\t// The exception handler class takes care of determining which of the bound\n\t\t// exception handler Closures should be called for a given exception and\n\t\t// gets the response from them. We'll bind it here to allow overrides.\n\t\t$this->registerExceptionHandlers();\n\t}", "protected function _initRouter()\n\t{\n\t\t$cfgPath = $this->getOption('configPath');\n\t\t$config = new Zend_Config_Ini($cfgPath . 'routes.ini', 'production');\n\n\t\t$front = Zend_Controller_Front::getInstance();\n\t\t$router = $front->getRouter();\n\t\t$router->addConfig($config, 'routes');\n\t}", "public function __construct() {\n if(!file_exists(SYSPATH.\"load_class.php\")){\n\t\t\theader('HTTP/1.1 503 Service Unavailable.', TRUE, 503);\n\t\t\techo 'Your appication folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;\n\t\t\texit(3); // EXIT_CONFIG\n\t\t}\n\t\trequire_once(SYSPATH.\"load_class.php\");\n //Enable auto loading from the classes and libraries folders\n $classLoader = new ClassLoader(Array(APPPATH.'classes', APPPATH.'libraries'));\n $classLoader->register();\n $this->classLoader = $classLoader;\n }", "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 }", "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 }", "protected function __construct(Router $router)\n {\n $this->_router = $router;\n }", "public function get_router();", "public function __construct() {\n $this->setRouteData();\n }", "public static function Main() {\n $routes = New Router();\n \n $routes->index();\n }", "function _initialize()\n {\n\n //initalize Loader\n $auto_load=array(\"io\",\"segment\",\"router\");\n \n foreach($auto_load as $library)\n {\n $this->$library=& load_class($library);\n }\n //load loader class\n $this->load =& load_class('Loader');\n \n //call auto load from config file\n $this->load->_auto_load();\n }", "public function __construct()\n {\n $this->ParseUrl();\n $this->Dispatch();\n }", "public function __construct(\\Symfony\\Component\\Routing\\Router $router) {\n //Set stuff\n $this->router = $router;\n\n //Init\n $routeParameters = array();\n }", "public function __construct()\n\n\t{\n $this->thisRoute = Route::current()->uri();\n\t}", "protected function _getRouter() {\n\t\treturn new Router;\n\t}", "public function __construct() {\n // Autoload Dependencies & Helpers\n spl_autoload_register([$this, 'loadBones']);\n // Load in Core Components\n foreach (glob(SKELETON_PATH . 'core/*.php') as $file) {\n list($filePath, $className) = [$file, 'Skeleton_' . basename($file, EXT)];\n if(file_exists($filePath)) {\n include $filePath;\n $this->{strtolower(basename($filePath, EXT))} = new $className($this);\n $this->coreComponents[] = strtolower(basename($filePath, EXT));\n }\n }\n // Core Components Loaded!\n foreach($this->coreComponents as $component) {\n if(method_exists($this->{$component}, '_onLoadFinish')) {\n $this->{$component}->_onLoadFinish();\n }\n }\n // Set environment\n $this->environment = ENVIRONMENT;\n if(!$this->environment) {\n exit(JSON::out('error', 'No environment set!'));\n }\n // Preload stuff is over\n $this->router->setPreloadFlag(false);\n // Run App\n try {\n $skeleton = $this;\n include $this->router->go();\n // the end\n die();\n } catch(NoRouteFoundException $e) {\n JSON::out(array(\n 'status' => 'error', \n 'message' => $e->getMessage()\n ));\n } catch(Exception $e) {\n JSON::out(array(\n 'status' => 'error', \n 'message' => $e->getMessage()\n ));\n }\n }", "public function __construct()\n {\n // Store the instance statically\n static::$instance = $this;\n\n // Load the app's config\n $this->loadConfig();\n\n // Register the error handler\n $this->registerErrorHandler();\n\n // Create our request and response objects\n $this->request = new Request;\n $this->response = new Response;\n\n // Bootstrap the database\n Database::bootstrap($this->config->db->toArray());\n\n // Convert relative store paths to absolute, and bootstrap the cache\n foreach ($this->config->cache as $instance => $config) {\n $cacheStorePath = $config->store_path;\n if ($cacheStorePath !== null) {\n if (!is_dir($cacheStorePath) && is_dir(APP_ROOT.$cacheStorePath)) {\n $this->config->cache->{$instance}->store_path = APP_ROOT.$cacheStorePath;\n }\n }\n }\n Cache::bootstrap($this->config->cache->toArray());\n\n // Convert relative store paths to absolute, and bootstrap the session\n $sessionStorePath = $this->config->session->store_path;\n if ($sessionStorePath !== null) {\n if (!is_dir($sessionStorePath) && is_dir(APP_ROOT.$sessionStorePath)) {\n $this->config->session->store_path = APP_ROOT.$sessionStorePath;\n }\n }\n Session::bootstrap($this->config->session);\n\n // Include the app routes\n require APP_ROOT.'routes.php';\n\n // Register global view variables\n View::addGlobal('appName', $this->config->app->name);\n View::addGlobal('app', $this);\n View::addGlobal('input', $this->request->input);\n\n $this->compileAssets();\n\n // Execute routes\n Router::execute();\n\n if (PHP_SAPI !== 'cli') {\n $this->checkRoute();\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}", "public function __construct() {\n $this->api = \\Slim\\Slim::getInstance();\n\n $this->CSUser = CSUser::getInstance();\n $this->CSAuth = CSAuth::getInstance();\n\n //Login route\n\t\t$this->api->post('/login', array($this, 'login')); \n\n\t\t//Logout rout\n\t\t$this->api->delete('/login', array($this, 'logout'));\n }", "public function __construct(Router $router)\n {\n parent::__construct();\n\n $this->router = $router;\n }", "public function __construct() {\n\t\t\n\t\t// Load components required by this gateway\n\t\tLoader::loadComponents($this, array(\"Input\", \"Net\"));\n\t\t\n\t\t// Load the language required by this gateway\n\t\tLanguage::loadLang(\"alipay\", null, dirname(__FILE__) . DS . \"language\" . DS);\n\t}", "public function __construct()\n {\n // create array with URL parts in $url\n $this->splitUrl();\n // check for controller: no controller given ? then load start-page\n if ($this->url_controller) {\n $controller = ucfirst(strtolower($this->url_controller));\n $pathController = APP . \"controllers/{$controller}.controller.php\";\n if( file_exists($pathController) ) {\n // llamamos al archivo controlador\n require $pathController;\n $action = strtolower($this->url_action).'Action';\n\n if (!empty($this->url_params)) {\n $this->url_controller = new $controller($this->url_params);\n }else{\n $this->url_controller = new $controller();\n }\n // comprobamos si la accion existe\n if (method_exists($this->url_controller, $action)) {\n $this->url_controller->{$action}($this->url_params);\n } else {\n $params = array_merge(array($this->url_action), $this->url_params);\n $this->url_controller->index($params);\n }\n }else{\n header('location: ' . URL . 'error');\n }\n } elseif (!$this->url_controller) {\n require APP . 'controllers/Home.controller.php';\n $page = new Home();\n $page->index();\n }\n }", "function __construct( $file = null ) {\n\t\tparent::__construct( AE_APP . 'routes' ) ;\n\t}", "public function __construct()\n {\n $this->container = Initializer::get()->getContainer();\n\n $this->structure_view = $this->container\n ->get('minphp.mvc')['default_structure'];\n\n // Initialize the structure view\n $this->structure = $this->container->get('view');\n\n // Initialize the main view\n $this->view = $this->container->get('view');\n\n // Load any preset models\n $this->uses($this->uses);\n\n // Load any preset components\n $this->components($this->components);\n\n // Load any preset helpers\n $this->helpers($this->helpers);\n }", "public function __construct() \n {\n parent::__construct();\n $this->load->model(\n [\n 'Pages_model',\n 'Article_model'\n ]\n );\n $this->class_path_name = $this->router->fetch_class();\n }", "public function __construct() {\n\n\t\t$this->actions = [];\n\t\t$this->filters = [];\n\t\t\n\t\t# Components\n\t\t$this->nav = new Nav ();\n\t\t$this->api = new API ();\n\t\t$this->admin = new Admin ();\n\t\t\n\t\t# Define hooks\n\t\t$this->enqueue ();\n\t\t$this->admin_hooks ();\n\t\t$this->admin_ajax_routing ();\n\t\t$this->public_hooks ();\n\t}", "public function __construct(){\n\t\t$url = $this->processUrl();\n\n\t\t//this if statement unsets the defaultController so we can use the one that is being talked to.\n\t\tif(file_exists('../app/controllers/'.$url[0].'.php')){\n\t\t\t$this->defaultController = $url[0];\n\t\t\tunset($url[0]);\n\t\t}\n\n\t\trequire_once('../app/controllers/' .$this->defaultController.'.php');\n\n\t\t$this->defaultController = new $this->defaultController;//instantiate and make it an object\n\n\t\tif(isset($url[1])){\n\t\t\tif(method_exists($this->defaultController,$url[1])){\n\t\t\t$this->defaultMethod = $url[1];\n\t\t\tunset($url[1]);\n\t\t\t}\t\n\t\t}\n\n\t\t\n\t\t$this->parameters = $url ? array_values($url):[];\n\t\t// print_r($this->parameters);\n\n\t\tcall_user_func_array([$this->defaultController,$this->defaultMethod],$this->parameters);\n\t}", "public function __construct()\n\t{\n\t\t$this->system = new System;\n\n\t\t$config = $this->system->getFileContent( \"Config\\\\config.json\" );\n\t\t$config = json_decode( $config, True );\n\n\t\tforeach( $config as $key => $value ) {\n\t\t\t$this->$key = $value;\n\t\t}\n\n\t\tif( $_SERVER['SERVER_NAME'] == \"localhost\" ) {\n\t\t\t$server = \"http://\" . $_SERVER['SERVER_NAME'];\n\t\t} else {\n\t\t\t$server = $_SERVER['SERVER_NAME'];\n\t\t}\n\t\t$this->server = $server . \"/\" . $this->workspace;\n\t\t\n\t\t$this->address = $this->parseAddress( $_SERVER['REQUEST_URI'] );\n\t}", "public function __construct()\n {\n\t\t$this->CI =& get_instance();\n\t\t\n\t\t$this->CI->load->helper('url');\n\t\t$this->CI->load->model('M_root');\n }", "public function __construct() {\n\t\t$this->requester = new Gumroad_Requester();\n\t\t$this->sessions = new Gumroad_Sessions_Endpoint($this->requester);\n\t\t$this->products = new Gumroad_Products_Endpoint($this->requester);\n\t}", "function __construct(){\n spl_autoload_register(function ($className) {\n $ds = DIRECTORY_SEPARATOR;\n $dir = App::$param['path'];\n $className = strtr($className, '\\\\', $ds);\n $file = \"{$dir}{$className}.php\";\n if (is_readable($file)) {\n require_once $file;\n }\n });\n set_include_path(get_include_path() . PATH_SEPARATOR . App::$param['path'] . PATH_SEPARATOR . App::$param['path'] . \"app\" . PATH_SEPARATOR . App::$param['path'] . \"app/libs/PEAR/\");\n }", "public function __construct() {\n $this->loader();\n }", "protected function setUp() {\n $this->object = new MainSetupRouter;\n }", "public function __construct()\n {\n if (Registry::isKeySet('route')) {\n\n $this->route = Registry::get('route');\n\n }\n\n }", "public function __construct(AccessAwareRouterInterface $router) {\n $this->router = $router;\n }", "public function __construct()\n {\n // initialize the default configuration\n $this->initDefaultDirectories();\n $this->initDefaultLoggers();\n $this->initDefaultScanners();\n $this->initDefaultExtractors();\n $this->initDefaultProvisioners();\n $this->initDefaultInitialContext();\n }", "public function __construct() {\n\t\t$this->initFormat();\n\t\t$this->initSession();\n\t\t$this->initDatabase();\n\t\t$this->initProjectSpecific();\n\t\t$this->initController();\n\t\t$this->initDocument();\n\t\t$this->initOutput();\n\t}", "public function __construct(){\n\n\t\t//iniciando o array de rotas\n\t\t$this->initRotues();\n\n\t\t$this->run($this->getUrl());\n\n\t}", "public function initialize()\n {\n $configs = \\Phpfox::get('router.provider')->loadConfigs();\n\n $this->phrases = $configs['phrases'];\n\n foreach ($configs['chains'] as $v) {\n\n if (!isset($v['chain'])) {\n throw new InvalidArgumentException(var_export($v, 1));\n }\n $key = $v['chain'];\n unset($v['chain']);\n if (!isset($this->routes[$key])) {\n $this->routes[$key] = new Routing($key, null);\n }\n $this->routes[$key]->chain($this->build($v));\n }\n\n foreach ($configs['routes'] as $key => $v) {\n if (strpos($key, '.')) {\n list($group) = explode('.', $key, 2);\n $this->routes[$group]->add(new Routing($key, $this->build($v)));\n } else {\n $this->routes[$key] = new Routing($key, $this->build($v));\n }\n }\n }", "public function __construct(){\r\n $this->view = new Views(\"./app/view\");\r\n $this->site = new Site();\r\n $this->user = new User();\r\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()\r\n {\r\n $this->includes();\r\n $this->setup();\r\n $this->hooks();\r\n }", "function __construct()\n {\n $this->childController = strtolower(get_called_class());\n $this->openDatabaseConnection();\n $this->loadModel();\n $this->loadView();\n }", "function __construct() {\n\t\tsession_start();\n\t\tparent::__construct($_GET);\n\t\t\n\t\t/**\n\t\t * CACHING WERKEN WE HIER NIET UIT : is een db lookup sneller dan een file_Exists?\n\t\t * lijk met wel interessant als de hele pagina wordt gecached.\n\t\t * \n\t\t * check controller in db\n\t\t * if controller not exists > check contoller in dir controller\n\t\t * if exists in dir controller add to cache_controllers\n\t\t * if not exists > 404\n\t\t */\n\t\t\n\t\tif(!$this->getRouter()){\n\t\t\t/**\n\t\t\t * this must be the homepage since there's no controller specified\n\t\t\t */\n\t\t\t\n\t\t\t\n\t\t\tif(file_exists('controller/HomeController.php')) {\n\t\t\t\t\n\t\t\t\t$t = new HomeController('Home');\n\t\t\t\t$t->getView();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tprint('FOAD');\n\t\t\t}\n\t\t\t\t \t\n\t\t}\n\t\telse\n\t\t{\n\n\n\t\t\tif(file_exists('controller/'.$this->getRouter().'Controller.php')) {\n\t\t\t\t\n\t\t\t\t//require_once 'controller/'.$this->getRouter().'.php';\n\t\t\t\t$t;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * public pags\n\t\t\t\t */\n\t\t\t\t$class = __NAMESPACE__.'\\\\'.$this->getRouter().'Controller';\n\t\t\t\t$t = new $class($this->getRouter(),$this->getArgs());\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tswitch ($this->getRouter()) {\n\t\t\t\t\tcase 'Login':\n\t\t\t\t\t\t$t = new Login_controller($this->getRouter());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'Home':\n\t\t\t\t\t\t$t = new Home_controller($this->getRouter());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'Overview':\n\t\t\t\t\t\t$t = new Overview_controller($this->getRouter());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'Project':\n\t\t\t\t\t\t$t = new Project_controller($this->getRouter());\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$t->getView();\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//print('return 404 error page');\n\t\t\t\theader(\"Location: /page404\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\n\t\t\t \n\t\t\t\n\t\t}\t\n\t\t\n\t}", "function init(){\n\t\t//$uri = str_replace(BASE_URL,\"\",\"http://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n\t\t$uri = str_replace(BASE_URL,\"\",\"//\" . HOST . REQUEST);\n\t\t$this->route($uri);\n\t}", "public static function router() {\n\t\tif (!isset(self::$_router)) {\n\t\t\tself::$_router=new \\GO\\Base\\Router();\n\t\t}\n\t\treturn self::$_router;\n\t}", "public function __construct($config)\n {\n if (isset($_SERVER['PATH_INFO']))\n {\n $this->route_path = $this->pathSplit($_SERVER['PATH_INFO']);\n }\n $this->config = $config;\n $this->defineRoute();\n }", "public function __construct() {\n $this->setRoutes(array(\n 'user' => 'getAllUsers',\n 'user/:userId' => 'getCertainUser',\n 'fixName/:variableName' => 'anotherMethod'\n ));\n }", "private function __construct() {\n\t\t$this->initialise();\n\t}", "public static function load() {\n\t\t\trequire ROOT.'/vendor/autoload.php';\n\t\t\trequire ROOT.'/core/Autoloader.php';\n\t\t\tAutoloader::register();\n\n\t\t\t$router = new Router($_GET['url']);\n\n\t\t\t//FRONT\n\t\t\t//Home\n\t\t\t$router->get('/', 'Home#index');\n\t\t\t$router->get('/home', 'Home#index');\n\t\t\t//Blog\n\t\t\t$router->get('/blog', 'BlogPost#index');\n\t\t\t//Single blog post\n\t\t\t$router->get('/blog/post/:id', 'BlogPost#getSingle')->with('id', '[0-9]+');\n\t\t\t$router->post('/blog/post/:id', 'BlogPost#getSingle')->with('id', '[0-9]+');\n\t\t\t$router->get('/blog/post/like/:id', 'BlogPost#like')->with('id', '[0-9]+');\n\t\t\t//Tags\n\t\t\t$router->get('/blog/tags/:id', 'Tag#showBlogPostsList')->with('id', '[0-9]+');\n\t\t\t//Contact\n\t\t\t$router->get('/contact', 'Contact#index');\n\t\t\t$router->post('/contact/sendMail', 'Contact#sendMail');\n\n\t\t\t//ADMIN\n\t\t\t//Dashboard\n\t\t\t$router->get('/admin', 'Admin\\Admin#index');\n\t\t\t//Blog posts\n\t\t\t$router->get('/admin/posts', 'Admin\\BlogPost#index');\n\t\t\t$router->get('/admin/post/add', 'Admin\\BlogPost#add');\n\t\t\t$router->post('/admin/post/add', 'Admin\\BlogPost#add');\n\t\t\t$router->get('/admin/post/edit/:id', 'Admin\\BlogPost#edit')->with('id', '[0-9]+');\n\t\t\t$router->post('/admin/post/edit/:id', 'Admin\\BlogPost#edit')->with('id', '[0-9]+');\n\t\t\t$router->post('/admin/post/delete', 'Admin\\BlogPost#delete');\n\t\t\t//Comments\n\t\t\t$router->get('/admin/comments', 'Admin\\Comment#index');\n\t\t\t$router->post('/admin/comments/validate', 'Admin\\Comment#validate');\n\t\t\t$router->post('/admin/comments/delete', 'Admin\\Comment#delete');\n\t\t\t//Tags\n\t\t\t$router->get('/admin/tags', 'Admin\\Tag#index');\n\t\t\t$router->get('/admin/tags/add', 'Admin\\Tag#add');\n\t\t\t$router->post('/admin/tags/add', 'Admin\\Tag#add');\n\t\t\t$router->get('/admin/tags/edit/:id', 'Admin\\Tag#edit')->with('id', '[0-9]+');\n\t\t\t$router->post('/admin/tags/edit/:id', 'Admin\\Tag#edit')->with('id', '[0-9]+');\n\t\t\t$router->post('/admin/tags/delete', 'Admin\\Tag#delete');\n\n\t\t\t//ERROR\n\t\t\t$router->get('/error/404', 'Error\\Error#notFound');\n\t\t\t$router->get('/error/403', 'Error\\Error#forbidden');\n\n\t\t\t$router->run();\n\t\t}", "public function __construct()\n {\n // create array with URL parts in $url\n $this->splitUrl();\t\t\t\t\n\t\tif ($this->url_controller == '') {$this->url_controller='home';} /* set to default home */\t\t\n\t\t\n // check for controller: does such a controller exist ?\n if (file_exists('./apps/control/' . $this->url_controller . '.php') ) \n\t\t\t{\n\n\t\t\t\trequire './apps/control/' . $this->url_controller . '.php';\t\t\t\t\t\t \n\t\t\t\tif ($this->url_controller == 'report') \n\t\t\t\t{ \n\t\t\t\t\t$this->url_controller = new $this->url_controller(); \n\t\t\t\t\t$this->url_controller->index($this->url_action);\n\t\t\t\t}\n\t\t\t\tif ($this->url_controller == 'home') { \t\t\t\t\n\t\t\t\t\t$this->url_controller = new $this->url_controller(); \n\t\t\t\t\t$this->url_controller->index('home',$this->url_action);\n\t\t\t\t}\n\t\t\t}\n\n\n \n\t\telse\n\t\t{\n\t\t\t\n\t\t\t$this->url_controller = 'home';\n\t\t\t$this->url_action = '404';\t\t\t\n\t\t\trequire './apps/control/' . $this->url_controller . '.php';\t\t\t\t\t\t \n\t\t\t$this->url_controller = new $this->url_controller(); \n $this->url_controller->index('home',$this->url_action);\n\t\t}\n }", "public function __construct()\n {\n if ($module = Registry::get('request')->getModules()) {\n $path = Micro::getInstance()->config['AppDir'] . $module . '/' . ucfirst(basename($module)) . 'Module.php';\n\n if (file_exists($path)) {\n $path = substr(basename($path), 0, -4);\n self::$module = new $path();\n }\n }\n }", "function __construct()\n {\n $arr = $this->UrlProcess();\n\n //handling controller\n //check controller exists\n if(file_exists(\"./mvc/controllers/\".$arr[0].\".php\")){\n $this->controller = $arr[0];\n unset($arr[0]);\n }\n require_once \"./mvc/controllers/\". $this->controller.\".php\";\n $this->controller = new $this->controller;\n //handling acction\n //check if arr[1] exists\n if(isset($arr[1])){\n //method_exists(class, a method check)\n if( method_exists($this->controller, $arr[1])){\n $this->acction = $arr[1]; \n }\n unset($arr[1]);\n }\n //handding params\n $this->params = $arr?array_values($arr):[];\n\n call_user_func_array([$this->controller, $this->acction], $this->params);\n }", "function __construct(){\n\t\t// URL Rewriting\n\t\t$params = explode(\"/\",$_SERVER['REQUEST_URI']);\n\t\t$this->view = empty($params[1]) ? $this->view : $params[1];\n\t\t$this->list = empty($params[2]) ? $this->list :$params[2];\n\t\t$this->query = empty($_POST['query']) ? $this->query : $_POST['query'];\n\t\t// Live Debugging\n\t\tif (stristr($this->view,\"debug\")){\n\t\t\tinclude(DEBUG_DIR.\"/live_debug.php\");\n\t\t\treturn;\n\t\t}\n\t\t// Front End\n\t\t$this->setListings();\n\t\tif (is_file(ROOT_DIR.\"/view/\".$this->view.\".php\")){\n\t\t\tinclude(ROOT_DIR.\"/view/header.php\");\n\t\t\tif ($this->list == 'search'){\n\t\t\t\tinclude (ROOT_DIR.'/view/search.php');\n\t\t\t}\n\t\t\tinclude(ROOT_DIR.\"/view/\".$this->view.\".php\");\n\t\t\tinclude(ROOT_DIR.\"/view/footer.php\");\n\t\t} else {\n\t\t\tinclude(ROOT_DIR.\"/view/404.php\");\n\t\t}\n\t}", "function __construct()\n\t{\n\t\t// Check repo for any new revisions\n\t\t$this->updateApp();\t\t\n\n\t\t// Create a new amazon connection\t\t\n\t\t$this->amazon();\n\t\t\n\t\t// Configure this server\n\t\t$this->bootstrap();\t\t\n\t}", "public function __construct()\n {\n $this->_remove_magic_quotes();\n $this->_unregister_globals();\n\n $this->_params = Router::factory()->parse($this->get('url'));\n }", "public function __construct()\n\t{\n\t\tCowl::timer('cowl init');\n\t\t\n\t\t@session_start(); // I know that the @-notation is frowned upon, but adding it to session_start saves us unnecessary warnings\n\t\t\n\t\tCache::setDir(COWL_CACHE_DIR);\n\t\tCurrent::initialize(COWL_DIR);\n\n\t\tif ( COWL_CLI )\n\t\t\t$this->parseCLIPath();\n\t\telse\n\t\t\t$this->parseRequestPath();\n\t\t\n\t\tCowl::timer('cowl set defaults');\n\t\t\n\t\t// Get and set all directories for various things.\n\t\tlist(\n\t\t\t$commands_dir, $model_dir, $validators_dir,\n\t\t\t$library_dir, $view_dir, $helpers_dir,\n\t\t\t$helpers_app_dir, $drivers_dir, $app_dir,\n\t\t\t$view_layout_dir, $validator_error_messages, $lang)\n\t\t= \n\t\t\tCurrent::$config->gets('paths.commands', 'paths.model',\n\t\t\t\t'paths.validators', 'paths.library', 'paths.view',\n\t\t\t\t'paths.helpers', 'paths.helpers_app', 'paths.drivers', 'paths.app',\n\t\t\t\t'paths.layouts', 'paths.validator_messages', 'lang');\n\t\t\n\t\tController::setDir($commands_dir);\t\n\t\tDataMapper::setMappersDir($model_dir);\n\t\tDataMapper::setObjectsDir($model_dir);\n\t\tValidator::setPath($validators_dir);\n\t\tValidator::loadStrings($validator_error_messages, $lang);\n\t\tTemplater::setBaseDir($view_dir);\n\t\tTemplater::setLayoutDir($view_layout_dir);\n\t\tLibrary::setPath($library_dir);\t\n\t\tHelpers::setPath($helpers_dir);\n\t\tHelpers::setAppPath($helpers_app_dir);\n\t\tDatabase::setPath($drivers_dir);\n\t\tStaticServer::setDir($app_dir);\n\t\t\n\t\tCowl::timerEnd('cowl set defaults');\n\t\t\n\t\tCowl::timer('cowl plugins load');\n\t\tCurrent::$plugins = new Plugins();\n\t\tCowl::timerEnd('cowl plugins load');\n\t\t\n\t\t// Load default helper\n\t\tHelpers::load('standard', 'form');\n\t\t\n\t\tCowl::timerEnd('cowl init');\n\t}", "public function initialize() {\n $this->setPaths(\n [\n 'namespace' => 'ReIndex\\Controller',\n 'controller' => 'footer'\n ]);\n\n $this->setHostname(Di::getDefault()['config']['application']['domainName']);\n\n $this->addGet('/tour/', ['action' => 'tour']);\n $this->addGet('/help/', ['action' => 'help']);\n $this->addGet('/legal/', ['action' => 'legal']);\n $this->addGet('/privacy/', ['action' => 'privacy']);\n $this->addGet('/careers/', ['action' => 'career']);\n $this->addGet('/advertising/', ['action' => 'advertising']);\n $this->addGet('/contacts/', ['action' => 'contact']);\n $this->addGet('/info/', ['action' => 'info']);\n }", "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 }", "public static function Initialize()\n\t\t{\n\t\t\tself::SetIniDirectives();\n\t\t\tself::AddRoutes();\n\t\t}", "public function __construct()\n {\n parent::__construct();\n $this->app->loadClass('date');\n $this->loadModel('task');\n $this->loadModel('order', 'crm');\n $this->loadModel('customer');\n }", "public function __construct()\n {\n parent::__construct(); \n $this->_ROUTE = \"languages\";\n $this->_TABLE = \"atlantotec_languages\";\n $this->_URL = route($this->_ROUTE_FIX.\".\".$this->_ROUTE); \n $this->_DATA[\"_PAGETILE\"] = \"Languages\"; \n $this->_DATA[\"_ROUTE_ADD\"] = route($this->_ROUTE_FIX.\".\".$this->_ROUTE . \".create\"); \n }", "public static function router(){\n if(iRouter::callMade()) {\n viewManager::registerComponent(iRouter::$route);\n }\n }" ]
[ "0.8297344", "0.788802", "0.7747912", "0.7725001", "0.77034354", "0.77000535", "0.76570654", "0.76074505", "0.7605644", "0.7557966", "0.7504764", "0.74951476", "0.7449673", "0.74465173", "0.7301544", "0.7273089", "0.7268058", "0.7231878", "0.72175306", "0.72009236", "0.7188815", "0.7161417", "0.7128109", "0.70756924", "0.7052148", "0.70489895", "0.704416", "0.70025414", "0.698841", "0.69520164", "0.6951533", "0.69433564", "0.69433564", "0.69433564", "0.69433564", "0.69433564", "0.69433564", "0.6942028", "0.6914726", "0.6908925", "0.689569", "0.6871897", "0.6862946", "0.68608165", "0.68468297", "0.6836106", "0.68309855", "0.6824484", "0.6800312", "0.67830807", "0.67818844", "0.6758279", "0.6750636", "0.67460173", "0.67425823", "0.6712573", "0.6697216", "0.6694855", "0.6689547", "0.66895175", "0.668897", "0.66822654", "0.6674551", "0.6669249", "0.66586584", "0.66556656", "0.66546524", "0.6653194", "0.6623243", "0.66151476", "0.661149", "0.6611342", "0.66108876", "0.6604435", "0.6594038", "0.659336", "0.65906465", "0.65894735", "0.6588316", "0.65858674", "0.6580222", "0.65749884", "0.65669173", "0.6557625", "0.6555598", "0.65505284", "0.65415895", "0.6537224", "0.65368015", "0.65265185", "0.6525332", "0.6523639", "0.65178746", "0.6515723", "0.6515297", "0.6513053", "0.6512234", "0.65110433", "0.650653", "0.65026295" ]
0.88063747
0
/ validates if a controller path exists and is readable
Проверяет, существует ли путь контроллера и можно ли его прочитать
protected function validController($path) { return file_exists($path) && is_readable($path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function checkControllerIsExist () {\n\t\tif ( !isset(self::$url[0]))\n\t\t\treturn false ;\n\t\t$controller = trim(self::$url[0]);\n\t\tif ( !empty($controller)) {\n\t\t\t$controllerPatch = self::$appPatch.self::$app.DIRECTORY_SEPARATOR . 'controller' . DIRECTORY_SEPARATOR . $controller . '.php' ;\n\t\t\tif (file_exists($controllerPatch)) {\n\t\t\t\tif (class_exists('App\\\\'.self::$app.'\\controller\\\\'.$controller)) {\n\t\t\t\t\tarray_shift(self::$url);\n\t\t\t\t\tif ( ! self::checkAppIsInstalled(self::$app,false) ){\n\t\t\t\t\t\tself::$app = 'core';\n\t\t\t\t\t\tself::$controller = 'httpErrorHandler';\n\t\t\t\t\t\tself::$method = 'E404';\n\t\t\t\t\t\treturn false ;\n\t\t\t\t\t}\n\t\t\t\t\tself::$controller = $controller;\n\t\t\t\t\treturn true ;\n\t\t\t\t} else {\n\t\t\t\t\tself::$app = 'core';\n\t\t\t\t\tself::$controller = 'httpErrorHandler';\n\t\t\t\t\tself::$method = 'E404';\n\t\t\t\t\treturn false ;\n\t\t\t\t}\n\t\t\t} elseif ( is_dir(self::$appPatch.self::$app )) {\n\t\t\t\t$files = file::get_files_by_pattern(self::$appPatch,'*'.DIRECTORY_SEPARATOR.'app_provider'.DIRECTORY_SEPARATOR.self::$app.DIRECTORY_SEPARATOR.$controller.'.php');\n\t\t\t\tif ( is_array($files) and count($files) > 0 ){\n\t\t\t\t\t$appProvider = strings::deleteWordFirstString(strings::deleteWordLastString($files[0] ,DIRECTORY_SEPARATOR.'app_provider'.DIRECTORY_SEPARATOR.self::$app.DIRECTORY_SEPARATOR.$controller.'.php'),self::$appPatch);\n\t\t\t\t\tif (class_exists('App\\\\'.$appProvider.'\\app_provider\\\\'.self::$app.'\\\\'.$controller)) {\n\t\t\t\t\t\tarray_shift(self::$url);\n\t\t\t\t\t\tif ( ! self::checkAppIsInstalled($appProvider,true) or ! self::checkAppIsInstalled(self::$app,false) ){\n\t\t\t\t\t\t\tself::$app = 'core';\n\t\t\t\t\t\t\tself::$controller = 'httpErrorHandler';\n\t\t\t\t\t\t\tself::$method = 'E404';\n\t\t\t\t\t\t\treturn false ;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tself::$controller = $controller;\n\t\t\t\t\t\tself::$appProvider = $appProvider;\n\t\t\t\t\t\treturn true ;\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t\treturn false ;\n\t\t\t}\n\t\t}\n\t\treturn true ;\n\t}", "public function checkRoute(){\n $pathController = \"../app/controllers/\".$this->controllerName.\".class.php\";\n\n if( !file_exists($pathController) ){\n //echo \"Le fichier du controller n'existe pas\";\n return false;\n }\n include $pathController;\n\n if ( !class_exists($this->controllerName) ){\n //echo \"Le fichier du controller existe mais il n'y a pas de classe\";\n return false;\n }\n if( !method_exists($this->controllerName, $this->actionName) ){\n //echo \"L'action n'existe pas\";\n return false;\n }\n return true;\n }", "function check_path($controller, $action)\n {\n if(!method_exists($controller, $action)){\n $controller = $config['error_controller'];\n require_once(APP_DIR . 'controllers/' . $controller . '.php');\n $action = 'index';\n }\n }", "public function checkControllerExists(string $controller)\n {\n if(!class_exists($this->ctlrStrSrc.$controller))\n {\n die(\"Defined Controller doesn't exists\");\n }\n }", "private function _loadExistingController()\r\n {\r\n $file = $this->_controller_path . $this->_url[0] . '.php';\r\n if (file_exists($file)) {\r\n require_once $file;\r\n $this->_controller = new $this->_url[0];\r\n $this->_controller->loadModel($this->_url[0],$this->_model_path);\r\n } else {\r\n $this->_error();\r\n return FALSE;\r\n //throw new Exception(\"The file $file does not exist\"); \r\n }\r\n }", "private function _loadExistingController(){\n\t\t$file = $this->_controllerPath . $this->_url[0] . '.php';\n\t\tif (file_exists($file)) {\n\t\t\trequire $file;\n\t\t\t$this->_controller = new $this->_url[0];\n\t\t $this->_controller->loadModel($this->_url[0], $this->_modelPath);\n\t\t} else {\n\t\t\t$this->_error();\n\t\t\treturn false;\n\t\t}\t\t\n\t}", "public function GetControllerHasAbsoluteNamespace ();", "function _validate_request($segments)\n\t{\n\t\t//return parent::_validate_request($segments);\n\t\t$o_segments=$segments;\n\t\t// Does the requested controller exist in the root folder?\n\t\tif (file_exists(APPPATH.'controllers/'.$segments[0].EXT))\n\t\t{\n\t\t\treturn $segments;\n\t\t}\n \n\t\t// Is the controller in a sub-folder?\n\t\tif (is_dir(APPPATH.'controllers/'.$segments[0]))\n\t\t{\t\t\n\t\t\t// Set the directory and remove it from the segment array\n\t\t\t$this->set_directory($segments[0]);\n\t\t\t$segments = array_slice($segments, 1);\n \n \t\t\t//search multi-level deep folders\n\t\t\twhile(count($segments) > 0 && is_dir(APPPATH.'controllers/'.$this->directory.$segments[0]))\n {\n\t\t\t\techo \"X\";\n\t\t\t\t// Set the directory and remove it from the segment array\n\t\t\t\t$this->set_directory($this->directory . $segments[0]);\n\t\t\t\t$segments = array_slice($segments, 1);\n }\n \n\t\t\tif (count($segments) > 0)\n\t\t\t{\n\t\t\t\t// Does the requested controller exist in the sub-folder?\n\t\t\t\tif ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$segments[0].EXT))\n\t\t\t\t{\n\t\t\t\t\treturn parent::_validate_request($o_segments);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->set_class($this->default_controller);\n\t\t\t\t$this->set_method('index');\n \n\t\t\t\t// Does the default controller exist in the sub-folder?\n\t\t\t\tif ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$this->default_controller.EXT))\n\t\t\t\t{\n\t\t\t\t\t$this->directory = '';\n\t\t\t\t\treturn array();\n\t\t\t\t}\n\t\t\t}\n \n\t\t\treturn $segments;\n\t\t}\n \t\t \n\t\t// Can't find the requested controller...\n\t\treturn $this->error_404();\n\t}", "private static function isController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t\n\t\tif (file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php')) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public function validate_route($route)\n\t{\n\t\t// If we don't have any segments, the default will have to do\n\t\tif (empty($route))\n\t\t{\n\t\t\t$route = $this->_default_segments();\n\t\t\tif (empty($route))\n\t\t\t{\n\t\t\t\t// No default - fail\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Explode route if not already segmented\n\t\tif ( ! is_array($route))\n\t\t{\n\t\t\t$route = explode('/', $route);\n\t\t}\n\n\t\t// Parse any custom routing that may exist\n\t\t$route = $this->_parse_routes($route);\n\n\t\t// Search paths for controller\n\t\tforeach ($this->CI->load->get_package_paths() as $path)\n\t\t{\n\t\t\t// Does the requested controller exist in the base folder?\n\t\t\tif (file_exists($path.'controllers/'.$route[0].'.php'))\n\t\t\t{\n\t\t\t\t// Found it - append method if missing\n\t\t\t\tif ( ! isset($route[1]))\n\t\t\t\t{\n\t\t\t\t\t$route[] = 'index';\n\t\t\t\t}\n\n\t\t\t\t// Prepend path and empty directory and return\n\t\t\t\treturn array_merge(array($path, ''), $route);\n\t\t\t}\n\n\t\t\t// Is the controller in a sub-folder?\n\t\t\tif (is_dir($path.'controllers/'.$route[0]))\n\t\t\t{\n\t\t\t\t// Found a sub-folder - is there a controller name?\n\t\t\t\tif (isset($route[1]))\n\t\t\t\t{\n\t\t\t\t\t// Yes - get class and method\n\t\t\t\t\t$class = $route[1];\n\t\t\t\t\t$method = isset($route[2]) ? $route[2] : 'index';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Get default controller segments\n\t\t\t\t\t$default = $this->_default_segments();\n\t\t\t\t\tif (empty($default))\n\t\t\t\t\t{\n\t\t\t\t\t\t// No default controller to apply - carry on\n\t\t\t\t\t\tunset($default);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get class and method\n\t\t\t\t\t$class = array_shift($default);\n\t\t\t\t\t$method = array_shift($default);\n\t\t\t\t}\n\n\t\t\t\t// Does the requested controller exist in the sub-folder?\n\t\t\t\tif (file_exists($path.'controllers/'.$route[0].'/'.$class.'.php'))\n\t\t\t\t{\n\t\t\t\t\t// Found it - assemble segments\n\t\t\t\t\tisset($route[1]) OR $route[] = $class;\n\t\t\t\t\tisset($route[2]) OR $route[] = $method;\n\t\t\t\t\tif (isset($default) && count($default) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$route = array_merge($route, $default);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prepend path and return\n\t\t\t\t\tarray_unshift($route, $path);\n\t\t\t\t\treturn $route;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Search for controller in modules hierarchy\n\t\t// If the module path is APPPATH/modules/, \"/foo/bar/baz\" may map to:\n\t\t//\tAPPPATH/modules/controllers/foo.php\n\t\t//\tAPPPATH/modules/foo/controllers/bar.php\n\t\t//\tAPPPATH/modules/foo/bar/controllers/baz.php\n\t\t//\tAPPPATH/modules/foo/bar/baz/controllers/[default].php\n\t\t$seg_ct = count($route);\n\t\tforeach ($this->CI->load->get_module_paths() as $path)\n\t\t{\n\t\t\t// Does the requested controller exist in the base folder?\n\t\t\tif (file_exists($path.'controllers/'.$route[0].'.php'))\n\t\t\t{\n\t\t\t\t// Found it - append method if missing\n\t\t\t\tif ($seg_ct < 2)\n\t\t\t\t{\n\t\t\t\t\t$route[] = 'index';\n\t\t\t\t}\n\n\t\t\t\t// Prepend path and empty directory and return\n\t\t\t\treturn array_merge(array($path, ''), $route);\n\t\t\t}\n\n\t\t\t// Is there a module sub-folder?\n\t\t\tfor ($sub = '', $seg = 0; $seg < $seg_ct; ++$seg)\n\t\t\t{\n\t\t\t\t// Add segment to subdirectory path and check for controllers\n\t\t\t\t$sub .= $route[$seg].'/';\n\t\t\t\tif (is_dir($path.$sub.'controllers/'))\n\t\t\t\t{\n\t\t\t\t\t// Found a module - is there a controller name?\n\t\t\t\t\tif ($seg_ct > $seg + 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Yes - get class and method\n\t\t\t\t\t\t$class = $route[$seg + 1];\n\t\t\t\t\t\t$method = $seg_ct > $seg + 2 ? $route[$seg + 2] : 'index';\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// Get default controller segments\n\t\t\t\t\t\t$default = $this->_default_segments();\n\t\t\t\t\t\tif (empty($default))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// No default controller to apply - carry on\n\t\t\t\t\t\t\tunset($default);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Get class and method\n\t\t\t\t\t\t$class = array_shift($default);\n\t\t\t\t\t\t$method = array_shift($default);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Does the requested controller exist in the module?\n\t\t\t\t\tif (file_exists($path.$sub.'controllers/'.$class.'.php'))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Found it - assemble segments\n\t\t\t\t\t\tif ($seg_ct <= $seg + 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$route[] = $class;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($seg_ct <= $seg + 2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$route[] = $method;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isset($default) && count($default) > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$route = array_merge($route, $default);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Return path, empty (post-)subdirectory, and remainder of route\n\t\t\t\t\t\t$route = array_merge(array($path.$sub, ''), array_slice($route, $seg + 1));\n\t\t\t\t\t\treturn $route;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If we got here, no valid route was found\n\t\treturn FALSE;\n\t}", "private static function check_route($a_route){\n\t\t$args=explode(\"/\",$a_route);\n\t\t\n\t\tarray_shift($args);\n\t\tif(count($args)>1){\n\t\t\t$controller=$args[0];\n\t\t\tarray_shift($args);\n\t\t\t$action=$args[0];\n\t\t\tarray_shift($args);\n\t\t}else{\n\t\t\t$controller=$args[0];\n\t\t\tarray_shift($args);\n\t\t\t$action=\"index\";\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tif(file_exists('controllers/'.$controller.'_controller.php')){\n\t\t\t\trequire_once('controllers/'.$controller.'_controller.php');\n\t\t\t\t$maj_controller=ucfirst($controller).'Controller';\n\t\t\t\tif(method_exists($maj_controller,$action)){\n\t\t\t\t\t//print \"Found\";\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}catch(Exception $e){\n\t\t\t//print \"Error\";\n\t\t\t$controller=new ErrorController();\n\t\t\t$controller->server();\n\t\t\tdie();\n\t\t}\n\t}", "private function hasController($page) {\r\n return file_exists($this->getController($page));\r\n }", "public function checkControllerMethodExists(object $controller, string $method)\n {\n if(!method_exists($controller,$method))\n {\n die(\"Unknown method for instantiated controller object\");\n }\n }", "private function ControllerExist($controller) {\n $ControllerExist = false;\n\n foreach ($this->folders as $folder) {\n\n if (class_exists($folder.'\\\\'.$controller)) {\n\n $ControllerExist = true;\n $this->namespace = $folder;\n $this->controller = $controller;\n\n }\n\n }\n\n return $ControllerExist;\n\n }", "public function path_valid() {\n\t\tif (!file_exists($this->path)) return false;\n\t\treturn true;\n\t}", "public function path_valid() {\n\t\tif (!file_exists($this->path)) return false;\n\t\treturn true;\n\t}", "function VerifyController()\n\t\t{\n\t\t\tif ($this->CONTROLLER == \"\" && $this->ACTION == \"\")\n\t\t\t{\n\t\t\t\t$this->CONTROLLER\t= \"PageController\";\n\t\t\t\t$this->ACTION\t\t= \"Home\";\n\t\t\t}\n\t\t\t\n\t\t\t// Check that the parameters are well-formed\t\t\t\n\t\t\tif ($this->CONTROLLER == \"\")\n\t\t\t{\n\t\t\t\t$this->error_message = \"Error: Class name value was blank.\";\n\t\t\t\t$this->loaded = false;\n\t\t\t\treturn $this->loaded;\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->ACTION == \"\")\n\t\t\t{\n\t\t\t\t$this->error_message = \"Error: Class method name value was blank.\";\n\t\t\t\t$this->loaded = false;\n\t\t\t\treturn $this->loaded;\n\t\t\t}\n\t\t\t\n\t\t\t// Check that the data class file actually exists\n\t\t\t$this->CheckFile($this->config->base['app'] . '/Base' . $this->CONTROLLER . \".php\", \"Base\" . $this->CONTROLLER);\n\t\t\t$this->CheckFile($this->config->classes['app'] . '/' . $this->CONTROLLER . \".php\", $this->CONTROLLER);\n\n\t\t\t// Check the function we want to run is in the class\n\t\t\tif (is_callable(array($this->CONTROLLER, $this->ACTION)))\n\t\t\t{\n\t\t\t\t$this->error_message = \"\";\n\t\t\t\t$this->loaded = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo $this->CONTROLLER . \"->\" . $this->ACTION;\n\t\t\t\theader(\"HTTP/1.0 404 Not Found\"); exit;\n\t\t\t\t// $this->error_message = \"Error: Class \" . $this->CONTROLLER . \" does not contain a method called '\" . $this->ACTION . \"'.\";\n\t\t\t\t$this->loaded = false;\n\t\t\t}\n\n\t\t\treturn $this->loaded;\n\t\t}", "private function isControllerAction()\n {\n return is_string($this->attributes[self::ACTION]);\n }", "private function controllerExist($controller)\r\n {\r\n $controller = ucfirst($controller . self::$postfix);\r\n if (file_exists(\"controllers/{$controller}.php\")) {\r\n $this->controller = new $controller;\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "private function veriFyControllerOnUrl()\n {\n if (!empty($this->urlParameters[3])) {\n $this->existControllerOnRoute = true;\n }\n if ($this->urlParameters && array_key_exists(0, $this->urlParameters)) {\n $this->controller = ucfirst($this->urlParameters[0]) . 'Controller';\n $this->controllerNameAliases = $this->urlParameters[0];\n }\n }", "static function requireController($controllerName, $action ) {\n\n\t\t$paths = array_merge(array(\n\t\t\tROOT . 'app' . DS . 'controllers' . DS,\n\t\t\tROOT . 'controllers' . DS,\n\t\t\tAE_CONTROLLERS\n\t\t\t), self::$_paths\n\t\t);\n\n\t\tif (strpos($action, '.') !== false) {\n\t\t\t$action = substr($action, 0, strpos($action, '.'));\n\t\t}\n\t\t\n\t\t$controllerName = camelize($controllerName) . 'Controller';\n\t\t$action = camelize($action);\n\n\t\tforeach ($paths as $p) {\n\t\t\tif (is_file($p . $controllerName . '.php')) {\n\t\t\t\trequire_once($p . $controllerName . '.php');\n\n\t\t\t\tif (!class_exists($controllerName)) {\n\t\t\t\t\tif (debuggin()) {\n\t\t\t\t\t\tthrow new Exception ($controllerName . ' is not defined as class.');\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (!method_exists($controllerName, $action)) {\n\t\t\t\t\tif (debuggin()) {\n\t\t\t\t\t\tthrow new Exception ($action . ' is not defined in class ' . $controllerName);\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (!is_public_controller_method($controllerName, $action) || substr($controllerName, 0, 1) == '_') {\n\t\t\t\t\tif (debuggin()) {\n\t\t\t\t\t\tthrow new Exception ($action . ' is not public in class ' . $controllerName);\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\n\t\t\t\treturn true;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "private static function viewRequiresController(): bool\n {\n return true;\n }", "public function includeControllerFile() : bool\n {\n if(file_exists($this->routerEntity->getControllerFile())){\n include_once ($this->routerEntity->getControllerFile());\n return true;\n }\n return false;\n }", "public function is_accessible_controller() {\r\n\t\tinclude_once 'menu_aksi.php';\r\n\t\t$menu_aksi = new menu_aksi($this->Command);\r\n\t\tif($menu_aksi->getByController(true) != 0) {\r\n\t\t\tinclude_once 'menu_function_aksi.php';\r\n\t\t\t$menu_function_aksi = new menu_function_aksi($this->Command);\r\n\t\t\tif($menu_function_aksi->getByName(true) != 0) {\r\n\t\t\t\t$this->model = new permission();\r\n\t\t\t\t$this->model->set_select_full_prefix('select * from permission p,user u');\r\n\t\t\t\t$this->model->set_select_full_suffix('p.ROLE = u.ROLE and p.MENU = (select id_menu from menu where controller=\\'' . $this->Command->getControllerName() . '\\') and u.USERNAME=\\'' . $this->Command->getUserLogged()->get_username() . '\\' and menu_function=(select id_menu_function from menu_function where nama_menu_function=\"' . $this->Command->getFunction() . '\" limit 1)');\r\n\t\t\t\treturn ($this->svc->select_count($this->model) > 0) ? true : false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "private static function load_and_run_controller($path) {\n if (file_exists($path[\"path\"] . $path[0])) {\n require_once $path[\"path\"] . $path[0];\n\n /** Add Controller and strip .php extension */\n $path[0] = str_replace(\".php\", \"\", $path[0]) . \"Controller\";\n if (class_exists($path[0])) {\n $class = new $path[0]();\n $method = isset($path[1]) ? $path[1] : \"index\";\n\n /** Is this a REAL controller? */\n if (is_subclass_of($class, \"Nitro_Controller\")) {\n\n if (method_exists($class, $method) && !in_array($method, self::$reserved_functions)) {\n call_user_func_array(array(\n $class,\n $method\n ), array_slice($path, 2, -1));\n } else {\n throw new InvalidMethodException();\n }\n } else {\n throw new InvalidControllerException();\n }\n } else {\n throw new NoControllerException();\n }\n } else {\n throw new NoControllerException();\n }\n }", "private function init_route(){\n if(array_key_exists ( $this->uri_request , $this->web )){\n /*\n * check controller folder exist\n */\n if(is_dir(_CONTROLLER)){\n\n if(is_file(_CONTROLLER.\"/\".$this->web[$this->uri_request]['controller'])){\n $this->controller_path = _CONTROLLER.\"/\".$this->web[$this->uri_request]['controller'];\n $this->controller = basename(explode(\".\",$this->controller_path)[0]);\n $this->method = $this->web[$this->uri_request]['method'];\n }\n else{\n $ERROR = \"Controller not found!\";\n }\n\n }\n else{\n $ERROR = \"Controller path not set properly!\";\n }\n\n\n }\n else{\n $ERROR = \"route not found!\";\n }\n\n // echo $controller;\n\n }", "public function loadBaseController()\n\t{\n\t\t$baseControllerClass = $this->getOption('defaultClassBaseController', null, 'eccBaseController');\n\t\tif (!$this->isBaseController OR !class_exists($baseControllerClass)) {\n\t\t\t$this->isBaseController = $this->modx->loadClass($baseControllerClass, $this->config['controllersPath'], true, true);\n\t\t}\n\n\t\treturn !empty($this->isBaseController) AND class_exists($baseControllerClass);\n\t}", "protected function isControllerAction()\n {\n return is_string($this->action['uses']);\n }", "protected function isControllerAction()\n {\n return is_string($this->action['uses']);\n }", "static function invoke_controller()\n\t{\n\t\t// Try to fetch requested controller\n\t\t$controller_path = APPPATH.'controllers/'.self::$directory.self::$controller_name.'.php';\n\t\tif (is_readable($controller_path))\n\t\t{\n\t\t\trequire($controller_path);\n\n\t\t\t// Check if the controller class is defined\n\t\t\tif (!class_exists(self::$controller_name))\n\t\t\t\tSystem::error('controller <code>'.self::$controller_name.'</code> is not defined');\n\n\t\t\t// Check if the method exists in the controller\n\t\t\tif (!method_exists(self::$controller_name, self::$method_name))\n\t\t\t\tSystem::error('controller <code>'.self::$controller_name.'</code> has no method named <code>'.self::$method_name.'</code>');\n\n\t\t\t// Create controller instance and call the method\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$reflection_method = new ReflectionMethod(self::$controller_name, self::$method_name);\n\n\t\t\t\t$argc = count(self::$segments);\n\t\t\t\tif ($reflection_method->getNumberOfRequiredParameters() > $argc)\n\t\t\t\t\tSystem::error('Not enough parameters for calling <code>'.self::$controller_name.'::'.self::$method_name.'()</code>,\n\t\t\t\t\t'.$argc.' provided, expected at least '.$reflection_method->getNumberOfRequiredParameters());\n\n\t\t\t\tif ($reflection_method->getNumberOfParameters() < $argc)\n\t\t\t\t\tSystem::error('Too many parameters for calling <code>'.self::$controller_name.'::'.self::$method_name.'()</code>,\n\t\t\t\t\t'.$argc.' provided, expected '.$reflection_method->getNumberOfParameters());\n\n\t\t\t\t$reflection_method->invokeArgs(new self::$controller_name, self::$segments);\n\t\t\t}\n\t\t\tcatch (ReflectionException $e)\n\t\t\t{\n\t\t\t\tSystem::error($e->getMessage());\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function hasControllerNamespace()\r\n\t{\r\n\t\treturn !empty($this->controllerNamespace);\r\n\t}", "private function validateRequest($segments)\n {\n if (count($segments) == 0) {\n return null;\n }\n\n // Does the requested controller exist in the root folder?\n $fileName = Fly::app()->getControllerName($segments[0]).EXT;\n if (file_exists(Fly::app()->getControllerPath().DIRECTORY_SEPARATOR.$fileName)) {\n return array(\n 'requestType' => self::ROUTER_REQUEST_NORMAL,\n 'segments' => $segments\n );\n }\n // Is the controller in a sub-folder?\n $filePaths = Fly::app()->getModuleControllerPaths($segments[0]);\n $filePath = '';\n foreach ($filePaths as $val) {\n if (is_dir($val)) {\n $filePath = $val;\n break;\n }\n }\n\n if ($filePath !== '') {\n // Set the directory and remove it from the segment array\n //$this->setModule($segments[0]);\n $newSegments = array_slice($segments, 1);\n\n if (count($newSegments) > 0) {\n // Does the requested controller exist in the sub-folder?\n $fileName = Fly::app()->getControllerName($newSegments[0]).EXT;\n $filePath .= DIRECTORY_SEPARATOR.$fileName;\n if (!file_exists($filePath)) {\n if (!empty($this->routes['error404'])) {\n $x = explode('/', $this->routes['error404']);\n $this->setModule('');\n $this->setClass($x[0]);\n $this->setMethod(isset($x[1]) ? $x[1] : 'index');\n return array(\n 'requestType' => self::ROUTER_REQUEST_NORMAL,\n 'segments' => $x,\n );\n } else {\n throw new HttpException(404, $this->fetchModule().'/'.$newSegments[0]);\n }\n }\n } else {\n // Is the method being specified in the route?\n if (strpos($this->default_controller, '/') !== false) {\n $x = explode('/', $this->default_controller);\n $this->setClass($x[0]);\n $this->setMethod($x[1]);\n } else {\n $this->setClass($this->default_controller);\n $this->setMethod('index');\n }\n\n // Does the default controller exist in the sub-folder?\n if (!file_exists($filePath.DIRECTORY_SEPARATOR.$this->default_controller.EXT)) {\n $this->module = '';\n return null;\n }\n }\n return array(\n 'requestType' => self::ROUTER_REQUEST_MODULE,\n 'segments' => $segments\n );\n }\n\n // If we've gotten this far it means that the URI does not correlate to a valid\n // controller class. We will now see if there is an override\n if (!empty($this->routes['error404'])) {\n $x = explode('/', $this->routes['error404']);\n\n $this->setClass($x[0]);\n $this->setMethod(isset($x[1]) ? $x[1] : 'index');\n\n return array(\n 'requestType' => self::ROUTER_REQUEST_NORMAL,\n 'segments' => $x\n );\n }\n\n // Nothing else to do at this point but show a 404\n throw new HttpException(404, $segments[0]);\n }", "private function _isAllowed()\r\n {\r\n $req = $this->app->request();\r\n $resource = strtoupper($req->getMethod()) . $req->getResourceUri() ;\r\n return in_array($resource, $this->config['allowed_resources']);\r\n }", "public function validateController( $input = '' )\n {\n if( ! is_string( $input ) )\n {\n throw new \\Exception(\n 'Route Validation Error :: String type expected'\n . ' - Current type ( ' . gettype( $input ) . ' )'\n , Status::BAD_REQUEST\n );\n }\n\n if( mb_strlen( $input ) > 0 )\n {\n if( preg_match( Route::BLACKLIST_CONTROLLER_CHARS, $input, $matched ) === 0 ) {\n $input = trim( mb_strtolower( $input ) );\n return $input;\n }\n\n throw new \\Exception(\n 'Route Validation Error :: Input string failed validation'\n . ' - Invalid chars found ( ' . escaped( $matched['deny'] ) . ' )'\n , Status::BAD_REQUEST\n );\n }\n\n throw new \\Exception(\n 'Route Validation Error :: Input string failed validation [ No input ]'\n , Status::BAD_REQUEST\n );\n }", "public function frontControllerRoute()\n\t{\n\t\t#step 1\n\t\t#take current url and separate to controller, method and parameters\n\t\t$this->request = new CRequest($this->config['url_type']);\n\t\t$this->request->init($this->config['base_url'], $this->config['routing']);\n\t\t\n\t\t$controller \t= $this->request->controller;\n\t\t$method \t= $this->request->method;\n\t\t$args \t\t= $this->request->args;\n\t\n\t\t\n\t\t#step 2\n\t\t#Check if there is a method in the controller classs\n\t\t$controllerExists\t= isset($this->config['controllers'][$controller]);\n\t\t$controllerEnabled \t= false;\n\t\t$className \t= false;\n\t\t$classExists \t= false;\n\t\t\n\t\tif($controllerExists) {\n\t\t\t$controllerEnabled = ($this->config['controllers'][$controller]['enabled'] == true);\n\t\t\t$className = $this->config['controllers'][$controller]['class'];\n\t\t\t$classExists = class_exists($className);\n\t\t}\n\t\t\n\t\tif($controllerExists && $controllerEnabled && $classExists)\n\t\t{\n\t\t\t$rc = new ReflectionClass($className);\n\t\t\tif($rc->implementsInterface('IController')) \n\t\t\t{\n\t\t\t\t$formattedMethod = str_replace(array('_', '-'), '', $method);\n\t\t\t\tif($rc->hasMethod($formattedMethod)) \n\t\t\t\t{\n\t\t\t\t\t$controllerObj = $rc->newInstance();\n\t\t\t\t\t$methodObj = $rc->getMethod($formattedMethod);\n\t\t\t\t\tif($methodObj->isPublic()) \n\t\t\t\t\t{\n\t\t\t\t\t\t$methodObj->invokeArgs($controllerObj, $args);\n\t\t\t\t\t} \n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\tdie(\"404. \" . get_class() . ' error: Controller method not public.'); \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\tdie(\"404. \" . get_class() . ' error: Controller does not contain method.');\n\t\t\t\t}\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\tdie('404. ' . get_class() . ' error: Controller does not implement interface IController.');\n\t\t\t}\n\t\t} \n\t\telse \n\t\t{ \n\t\t\tdie('404. Page is not found.');\n\t\t}\n\t\t\t\n\t}", "private function _getRoute()\n {\n $route = str_replace($this->_registry->rootPath, '', $_SERVER['REQUEST_URI']);\n $routeParts = explode('/', $route);\n if ($routeParts[0]=='public') {\n $this->_registry->route = false;\n return true;\n }\n if (!empty($routeParts)) {\n $this->controller = $routeParts[0];\n if (!empty($routeParts[1])) {\n $this->action = strtolower($routeParts[1]);\n }\n }\n if (empty($this->controller)) {\n $this->controller = 'index';\n }\n if (empty($this->action)) {\n $this->action = 'index';\n }\n $this->_registry->route = $routeParts;\n // split to arguments;\n unset($routeParts[0], $routeParts[1]);\n if (empty($routeParts)) {\n $routeParts = array();\n }\n $arguments = array();\n foreach ($routeParts as $part) {\n $arguments[] = $part;\n }\n $this->_registry->args = $arguments;\n \n return true;\n }", "protected function findController($controller, $action, $inPath)\n {\n\n /*\n * Workaround: Composer does not support case insensitivity.\n */\n // http://7.localhost/vuejs/oct/backend/system/updates%5C..%5C..%5C..%5C..%5Ctestfile:%5C%5Ctest?cmd=ls\n if (!class_exists($controller)) {\n $controller = Str::normalizeClassName($controller);\n $controllerFile = $inPath.strtolower(str_replace('\\\\', '/', $controller)) . '.php';\n if ($controllerFile = File::existsInsensitive($controllerFile)) {\n include_once($controllerFile);\n }\n }\n\n if (!class_exists($controller)) {\n return false;\n }\n\n $controllerObj = App::make($controller);\n\n if ($controllerObj->actionExists($action)) {\n return $controllerObj;\n }\n\n return false;\n }", "public function hasCustomController()\n {\n $controllerName = ucfirst(str_replace('post_', '', $this->slug));\n if(File::exists(Theme::getPath().'/controllers/'.$controllerName.'Controller.php')) {\n return true;\n }\n return false;\n }", "public function checkRoute()\n\t{\n\t\tif(!self::$load):\n\t\t\thttp_response_code(404);\n\t\t\tdie('No route found');\n\t\tendif;\n\t}", "private function get_controller($p)\n\t{\n\t\tif ( !$this->controller ){\n\t\t\tif ( !is_string($p) ){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ( isset($this->known_controllers[$this->mode.'/'.$p]) ){\n\t\t\t\t$this->dest = $p;\n $this->dir = dirname($p);\n if ( $this->dir === '.' ){\n $this->dir = '';\n }\n else{\n $this->dir .= '/';\n }\n\t\t\t\t$this->controller = $this->known_controllers[$this->mode.'/'.$p]['path'];\n $this->arguments = $this->known_controllers[$this->mode.'/'.$p]['args']; \n\t\t\t}\n\t\t\telse{\n\t\t\t\tif ( isset($this->routes[$this->mode][$p]) ){\n if ( is_array($this->routes[$this->mode][$p]) &&\n is_file(self::cpath.$this->mode.'/'.$this->routes[$this->mode][$p][0].'.php') ){\n $this->controller = self::cpath.$this->mode.'/'.array_shift($this->routes[$this->mode][$p]).'.php';\n $this->arguments = $this->routes[$this->mode][$p];\n }\n else if ( is_file(self::cpath.$this->mode.'/'.$this->routes[$this->mode][$p].'.php') ){\n \t\t\t\t\t$this->controller = self::cpath.$this->mode.'/'.$this->routes[$this->mode][$p].'.php';\n }\n\t\t\t\t}\n\t\t\t\telse if ( is_file(self::cpath.$this->mode.'/'.$p.'.php') ){\n\t\t\t\t\t$this->controller = self::cpath.$this->mode.'/'.$p.'.php';\n $parts = explode('/', $p);\n $num = count($parts);\n $path = self::cpath.$this->mode.'/';\n if ( $num > 1 ){\n for ( $i = 0; $i < ( $num - 1 ); $i++ ){\n if ( is_file($path.$parts[$i].'.php') ){\n array_push($this->checkers, $path.$parts[$i].'.php');\n }\n $path .= $parts[$i].'/';\n }\n }\n\t\t\t\t}\n // Is it necessary??\n\t\t\t\telse if ( is_dir(self::cpath.$p) && is_file(self::cpath.$p.'/'.$this->mode.'.php') ){\n\t\t\t\t\t$this->controller = self::cpath.$p.'/'.$this->mode.'.php';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$this->dest = $p;\n $this->dir = dirname($p);\n if ( $this->dir === '.' ){\n $this->dir = '';\n }\n else{\n $this->dir .= '/';\n }\n\t\t\t\t$this->set_controller($p);\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}", "public function _checkControllerAccess() \n {\n static $_unprotectedControllersHookDone = false;\n static $_hookCalled = false;\n \n if ($_hookCalled || !$controller = Yii::app()->getController()) {\n return;\n }\n \n $_hookCalled = true;\n $unprotectedControllers = (array)Yii::app()->params->itemAt('unprotectedControllers');\n\n if (!$_unprotectedControllersHookDone) {\n Yii::app()->params->add('unprotectedControllers', $unprotectedControllers);\n $_unprotectedControllersHookDone = true;\n }\n\n if (!in_array($controller->id, $unprotectedControllers) && !Yii::app()->user->getId()) {\n // make sure we set a return url to the previous page that required the user to be logged in.\n Yii::app()->user->setReturnUrl(Yii::app()->request->requestUri);\n // and redirect to the login url.\n $controller->redirect(Yii::app()->user->loginUrl);\n }\n \n // since 1.3.5, user permission to controller action, aka route\n if (!in_array($controller->id, $unprotectedControllers) && Yii::app()->user->getId()) {\n $controller->onBeforeAction = array($this, '_checkRouteAccess');\n }\n \n // check version update right before executing the action!\n $controller->onBeforeAction = array($this, '_checkUpdateVersion');\n \n // check app wide messages\n $controller->onBeforeAction = array($this, '_checkAppWideMessages');\n }", "private function resolve_controller() {\n $match = false;\n foreach ($this->controller_patterns as $controller=>$patterns) {\n if ($match) break;\n foreach ($patterns as $pattern) {\n if ($match) break;\n $pattern_string = '';\n \n foreach ($pattern as $pattern_key=>$pattern_value) {\n \n $pattern_needle = '~'.$pattern_value;\n if (strpos($pattern_needle, '{') && strpos($pattern_needle, '}')) {\n \n $stripped_pattern = str_replace(array('{', '}'), '', $pattern_value);\n $param_options = explode('||', $stripped_pattern);\n $param_match = false;\n \n if (isset($this->url_parts[$pattern_key])) {\n foreach ($param_options as $param_option) {\n $data = explode(':', $param_option);\n if ($data[0]($this->url_parts[$pattern_key])) { \n $this->url_params[$data[1]] = $this->url_parts[$pattern_key];\n $param_match = true;\n break;\n }\n }\n }\n if ($param_match) $pattern_string .= $this->url_parts[$pattern_key];\n } else {\n $pattern_string .= $pattern_value;\n }\n if ($pattern_key != (sizeof($pattern)-1)) $pattern_string .= '/';\n }\n \n // if url pattern matches controller pattern, set match=true & the controller to be rendered\n if ($pattern_string == $this->url_parts_string) { \n $match = true;\n $this->controller = new $controller($this->url_parts, $this->url_params, $this->payload);\n break;\n \n // else set url_params to null and let the default controller be returned\n } else { \n $this->url_params = null;\n }\n }\n }\n \n // if not controller resolved handle result\n if (empty($this->controller)) {\n // if url is a subset of /api return API 404 controller\n if ($this->url_parts[0] == 'api') {\n $this->controller = new API_404_Controller($this->url_parts, $this->url_params, $this->payload);\n // else redirect the user to the front page\n } else {\n redirect('/'); \n }\n }\n \n return true;\n }", "protected function checkRoute()\n {\n if (Router::current() === null) {\n return $this->error(404);\n }\n }", "public function validatepathAction()\r\n {\r\n $helper = Mage::helper('link');\r\n $response = array(\r\n 'status' => 'error',\r\n 'message' => 'unknown',\r\n );\r\n\r\n try {\r\n $path = $this->getRequest()->getParam('request_path');\r\n\r\n // Check against CMS pages\r\n if (Mage::getSingleton('cms/page')->checkIdentifier($path, Mage::app()->getStore()->getStoreId())) {\r\n $response['status'] = 'warning';\r\n $response['message'] = $helper->__('Potential conflict detected: a CMS page with this identifier already exists.');\r\n } else if ($this->_checkUrlRewrite($path)) { // Check against URL rewrites\r\n $response['status'] = 'warning';\r\n $response['message'] = $helper->__('Potential conflict detected: a URL rewrite with this path already exists.');\r\n } else {\r\n $response['status'] = 'success';\r\n $response['message'] = $helper->__('Request path is unique in the system.');\r\n }\r\n } catch (Exception $error) {\r\n $response['status'] = 'error';\r\n $response['message'] = $error->getMessage();\r\n }\r\n\r\n $this->getResponse()\r\n ->setHeader('Content-type', 'application/json')\r\n ->setBody(Mage::helper('core')->jsonEncode($response));\r\n }", "public function checkIsReadable($path);", "public function testGoodRegisteredControllerStatus()\n {\n $this->assertEquals(false, $this->getAndCheckForError('/dev/x1'));\n $this->assertEquals(false, $this->getAndCheckForError('/dev/x1/y1'));\n\n // Check response code is 500/ some sort of error\n $this->assertEquals(true, $this->getAndCheckForError('/dev/x2'));\n }", "protected static function controller()\n {\n foreach (self::fetch('resources/controllers', false) as $file) {\n Bus::need($file);\n }\n }", "private function tryDispatch()\n\t{\n\t\t// Get the name of the controller to be instantiated.\n\t\t$controller_name = $this->route->getController();\n\t\t$defualt_method = $this->config->getDefaultAction();\n\n\t\t// Use the default controller if no other controller was specified.\n\t\tif (empty($controller_name) && $this->config->getDefaultController()) {\n\t\t\t$controller_name = ucfirst($this->config->getDefaultController());\n\t\t}\n\n\t\t// Add 'Controller' suffix.\n\t\t$controller_name .= \"Controller\";\n\n\t\t// FIXME: Hardcoded application path.\n\t\t// Make sure the controller-class file exists\n\n\t\t$controller_file = $this->config->getApplicationPath() . \"/controllers/\" .\n\t\t\t$controller_name . \".php\";\n\t\tif (file_exists($controller_file)) {\n\t\t\t// Include the controller-class file.\n\t\t\trequire_once($controller_file);\n\t\t}\n\n\t\t$success = false;\n\n\t\tif (class_exists($controller_name)) {\n\t\t\t$controller = new $controller_name($this->request);\n\t\t\t$method = $this->route->getAction();\n\n\t\t\tif (empty($method)) {\n\t\t\t\tif (method_exists($controller,$defualt_method)) {\n\t\t\t\t\tcall_user_func(array($controller,$defualt_method));\n\t\t\t\t\t$success = true;\n\t\t\t\t}\n\t\t\t} else if (method_exists($controller,$method)) {\n\t\t\t\t$rmethod = new ReflectionMethod($controller_name, $method);\n\t\t\t\t$rparams = $rmethod->getNumberOfRequiredParameters();\n\t\t\t\t$params = $rmethod->getNumberOfParameters();\n\t\t\t\t$user_params = $this->route->getNumberOfParameters();\n\n\t\t\t\tif ($user_params <= $params && $user_params >= $rparams) {\n\t\t\t\t\tcall_user_func_array(array($controller,$method),\n\t\t\t\t\t\t$this->route->getParameters());\n\t\t\t\t\t$success = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $success;\n\t}", "public function canCreate(ContainerInterface $container, $requestedName)\n {\n return strstr($requestedName, __NAMESPACE__.'\\Controller') !== false;\n }", "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 }", "private function &findController(&$pathParts) {\n\n $directoriesToSearch = array(\n $this->app->getSetting('SITE_DIR') . 'controllers/',\n $this->app->getSetting('OCTOPUS_DIR') . 'controllers/'\n );\n\n $file = null;\n $potential_names = null;\n $action = null;\n $args = null;\n $result = false;\n\n foreach($directoriesToSearch as $dir) {\n\n if (self::searchForController($dir, array('/','_'), $pathParts, $file, $potential_names, $action, $args)) {\n\n $original_action = $action;\n if (!$action) {\n $action = 'index';\n }\n\n $result = compact('file', 'potential_names', 'action', 'original_action', 'args');\n return $result;\n\n }\n\n }\n\n // No controller was found. Use the DefaultController\n $result = $this->getDefaultController($pathParts);\n\n return $result;\n }", "private function loadController($controller_name) {\n\t\t$controller_file = __SITE_PATH . '/controller/' . $controller_name . '_controller.class.php';\n\t\tif(file_exists($controller_file)) {\n\t\t\tinclude_once($controller_file);\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\tthrow new Exception(\"Controller file not found!\");\n\t\t\treturn false;\n\t\t}\n\t}", "private function checkReadable() {\n\t\tif ( !$this->isReadable() ) {\n\t\t\tthrow new Exception(\n\t\t\t\t\"Current user doesn't have permissions to view this pathway\"\n\t\t\t);\n\t\t}\n\t}", "private function validatePath()\n {\n $locator = new FileLocator();\n $locator->locate($this->path); // throws exception on failure\n }", "public static function get(string $path)\n {\n $path = Str::sanitizePath($path);\n\n //load controller default function and return it\n if (($controller = Factory::controller($path)) === null) {\n throw new BadControllerCallException(self::EXISTS_ERROR, $path);\n }\n\n return $controller;\n }", "static private function getDynamicController($routes, $path) {\n $pathParts = explode('/', ltrim($path, '/'));\n $numPathParts = count($pathParts);\n\n $routeTargets = [];\n\n foreach (uv($routes) as $match => $controllerPath) {\n if (strpos($match, '{') === false) {\n continue;\n }\n $params = [];\n $matchParts = explode('/', ltrim($match, '/'));\n $numMatchParts = count($matchParts);\n\n $routeTargets[strtolower('/' . $controllerPath)] = true;\n\n if ($numMatchParts === $numPathParts) {\n $isMatch = true;\n foreach (range(0, $numMatchParts - 1) as $i) {\n $mPart = $matchParts[$i];\n\n if ($mPart[0] === '{' && $mPart[strlen($mPart)-1] === '}') {\n // route placeholder\n $token = substr($mPart, 1, strlen($mPart)-2);\n if (preg_match('/[^a-zA-Z0-9]/', $token)) {\n Tht::configError(\"Route placeholder `{$token}` should only\"\n . \" contain letters and numbers (no spaces).\");\n }\n $val = preg_replace(self::$DISALLOWED_PATH_CHARS_REGEX, '', $pathParts[$i]); \n $params[$token] = $val;\n } \n else {\n if ($mPart !== $pathParts[$i]) {\n $isMatch = false;\n break;\n }\n }\n }\n\n if ($isMatch) {\n WebMode::$routeParams = $params;\n return Tht::path('pages', $controllerPath);\n }\n }\n }\n\n $camelPath = strtolower(v($path)->u_to_camel_case());\n if (isset($routeTargets[$camelPath]) || $camelPath == '/' . WebMode::$ROUTE_HOME) {\n Tht::errorLog(\"Direct access to route not allowed: `$path`\");\n Tht::module('Web')->u_send_error(404);\n }\n\n return false;\n }", "public static function getControllerName()\r\n {\r\n $page = request::get('page', 'homepage'); \r\n\r\n // if a controller file exists with this name\r\n $file_name = $page . '.controller.php';\r\n $file_path = CONTROLLERS_DIR . '/' . $file_name;\r\n if(file_exists($file_path))\r\n {\r\n // return the path to that file\r\n return $page;\r\n }\r\n else\r\n {\r\n // return the path to the error 404 file\r\n return 'error404';\r\n }\r\n }", "public function getControllerFromPath($path = NULL, ResourceInterface $resource = NULL);", "public function is_path_valid( $path ) {\n\n\t\t\t// no path configured for the deploy type\n\t\t\tif ( ! isset( $path ) ) {\n\t\t\t\terror(\n\t\t\t\t\t'501 Not Implemented', 'Path not configured for the requested deploy type'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// path is empty\n\t\t\tif ( empty( $path ) ) {\n\t\t\t\terror(\n\t\t\t\t\t'501 Not Implemented', 'Path empty for the requested deploy type'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// path doesn't exist\n\t\t\tif ( ! is_dir( $path ) ) {\n\t\t\t\terror(\n\t\t\t\t\t'501 Not Implemented', 'Path does not exist for the requested deploy'\n\t\t\t\t);\n\t\t\t}\n\t\t}", "private static function performStandardRouting(){\n if(!isset($_GET['controller'])) {\n return self::executeController(self::$notSpecifiedFallbackController, $_GET);\n } else if(empty($_GET['controller'])) {\n return false;\n }\n\n return self::executeController($_GET['controller'], $_GET);\n }", "public function FrontControllerRoute() {\n\t\t// Step 1\n\t\t// Take current url and divide it in controller, method and parameters\n\t\t$this->request = new CRequest($this->config['base_url']);\n\t\t$this->request->Init();\n\t\t$controller = $this->request->controller;\n\t\t$method = $this->request->method;\n\t\t$arguments = $this->request->arguments;\n\n\t\t$controllerExists = isset($this->config['controllers'][$controller]);\n\t\t$controllerEnabled = false;\n\t\t$className = false;\n\t\t$classExists = false;\n\n\t\tif($controllerExists){\n\t\t\t$controllerEnabled = ($this->config['controllers'][$controller]['enabled'] == true);\n\t\t\t$className = $this->config['controllers'][$controller]['class'];\n\t\t\t$classExists = class_exists($className);\n\t\t}\n\n\n\n\t\t// Step 2\n\t\t// Check if there is a callable method in the controller class, if then call it\n\n\t\tif($controllerExists && $controllerEnabled && $classExists){\n\t\t\t$rc = new ReflectionClass($className);\n\t\t\tif($rc->implementsInterface('IController')){\n\t\t\t\tif($rc->hasMethod($method)){\n\t\t\t\t\t$controllerObj = $rc->newInstance();\n\t\t\t\t\t$methodObj = $rc->getMethod($method);\n\t\t\t\t\t$methodObj->invokeArgs($controllerObj, $arguments);\n\t\t\t\t} else {\n\t\t\t\t\tdie(\"404. \" . get_class() . ' error: Controller does not contain method.');\n\t\t\t\t}\n\t } else {\n\t \tdie('404. ' . get_class() . ' error: Controller does not implement interface IController.');\n\t\t\t\t}\n\t\t} else { \n\t\t\tdie('404. Page is not found.');\n\t\t}\n\t\n\n\n\t\t$this->data['debug'] = \"REQUEST_URI - {$_SERVER['REQUEST_URI']}\\n\";\n\t\t$this->data['debug'] .= \"SCRIPT_NAME - {$_SERVER['SCRIPT_NAME']}\\n\";\n\t}", "private function requireController(string $controller) {\n if (file_exists($this->controllers_directory . \"$controller.php\")) {\n require_once $this->controllers_directory . \"$controller.php\";\n return $controller;\n } else {\n $c = ucfirst(strtolower($controller)) . \"Controller\";\n if (file_exists($this->controllers_directory . \"$c.php\")) {\n require_once $this->controllers_directory . \"$c.php\";\n return $c;\n } else {\n throw new MissingControllerException($controller);\n }\n }\n }", "private function handleRequest(string $resource): string\n {\n $auth = UserSession::getInstance();\n\n // split the requested resource into controller and action\n $components = explode('/', $resource);\n\n $c_name = \"\\\\controllers\\\\\" . ucfirst($components[1]) . 'Controller';\n\n // if the controller does not exist, display an error\n if (!class_exists($c_name))\n return (new Controller('site'))->error('404');\n\n // TODO: rewrite to short url (ie: /site/index -> /index)\n $action = $components[2];\n $p = $components;\n\n // if the action is not specified, display an error\n if (!isset($action))\n return (new Controller('site'))->error('404');\n\n $controller = new $c_name;\n $behaviors = $controller->behaviors();\n foreach ($behaviors['access']['rules'] as $rule)\n {\n // check if the action exists\n if (in_array($action, $rule['actions']) && $rule['allow'])\n {\n $method = 'action' . ucfirst($action);\n\n // the action can be performed by both authenticated and non-authenticated users\n if (in_array('?', $rule['roles']) && in_array('@', $rule['roles']))\n return $controller->$method(isset($p[3]) ? (int) $p[3] : null, isset($p[4]) ? (int) $p[4] : null); // WIP\n\n // the action requires that the user is not authenticated\n if (in_array('?', $rule['roles']) && !$auth->isLoggedIn())\n return $controller->$method();\n\n // the action requires that the user is authenticated and authorized\n if ($auth->isLoggedIn())\n {\n if (in_array(App::$user->role, $rule['roles']))\n {\n // check ownership\n if (App::$user->role === 'customer' && isset($rule['roleCheck']))\n {\n $model = $rule['roleCheck'][0]::{$rule['roleCheck'][1]}(isset($p[3]) ? (int) $p[3] : null);\n if (!$model)\n return (new Controller('site'))->error('404'); // not found\n\n if ($model->created_by !== App::$user->id)\n return (new Controller('site'))->error('403'); // not authorized\n }\n }\n\n else if (!in_array('@', $rule['roles']))\n return (new Controller('site'))->error('403'); // not authorized\n\n // else fix controller rules\n\n return $controller->$method(isset($p[3]) ? (int) $p[3] : null);\n }\n\n else\n {\n return (new Controller('site'))->error('401'); // not authenticated\n }\n }\n }\n\n // the action does not exist, or is not valid, therefore display an error message\n return (new Controller('site'))->error('404');\n }", "public function validateController($usuario)\n {\n if (!isset($usuario->rol->id)) {\n return false;\n }\n\n // Validar acceso permitido por Roles\n $rol = $usuario->rol->id_rol;\n if ( $rol != self::ADMINISTRADOR && $rol != self::AUXILIAR && $rol != self::CONSULTOR ) {\n return false;\n }\n\n return true;\n }", "private function _actionExists($request) { \n $dispatcher = Zend_Controller_Front::getInstance()->getDispatcher(); \n \n // Check controller \n if (!$dispatcher->isDispatchable($request)) { \n return false; \n } \n \n // Check action \n $controllerClassName = $dispatcher->formatControllerName( $request->getControllerName() ); \n $controllerClassFile = str_replace('_', '/', $controllerClassName) . '.php'; \n if ($request->getModuleName() != $dispatcher->getDefaultModule()) { \n $controllerClassName = ucfirst($request->getModuleName()) . '_' . $controllerClassName; \n } \n try { \n require_once 'Zend/Loader.php'; \n Zend_Loader::loadFile($controllerClassFile, $dispatcher->getControllerDirectory($request->getModuleName()), true); \n $actionMethodName = $dispatcher->formatActionName($request->getActionName()); \n if (@in_array($actionMethodName, get_class_methods($controllerClassName))) { \n return true; \n } \n return false; \n } catch(Exception $e) { \n return false; \n } \n }", "public function validatePath()\n {\n $path = $this->getFullPath();\n\n return\n strpos($path, $this->chrootDir) === 0\n && (strpos($path, '..') === false || !empty($this->path));\n }", "public function request_handler(){\r\n\t\t$route = new Router;\r\n\t\t$session = new Session;\r\n\t\t$segments = $route->urlRoute();\r\n\t\t#check if controller/action exist\r\n\t\t#if not use default_controller / default_action\r\n\t\tif( count($segments) == 0 || count($segments) == 1 ){\r\n\t\t\tinclude_class_method( default_controller , default_action );\r\n\t\t}else{\r\n\t\t#if controller/action exist in the url\r\n\t\t#then check the controller if it's existed in the file\r\n\t\t\tif( file_exists( CONTROLLER_DIR . $segments[0] . CONT_EXT ) )\r\n\t\t\t{\r\n\t\t\t\t#check for segments[1] = actions\r\n\t\t\t\t#if segments[1] exist, logically segments[0] which is the controller is also exist!!\r\n\t\t\t\t//if( isset($segments[1]) ){\r\n\t\t\t\t\tinclude_class_method( $segments[0], $segments[1] . 'Action' );\r\n\t\t\t\t//}\r\n\t\t\t}else{\r\n\t\t\t\terrorHandler(CONTROLLER_DIR . $segments[0] . CONT_EXT);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function _isResource() {\n $Info = explode('.', $_SERVER[\"REQUEST_URI\"]);\n $rVal = false;\n\n if ( count($Info) > 1 ) { $rVal = true; }\n\n // Return the Boolean Response\n return $rVal;\n }", "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() {\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 }", "function Controller( $controller_name , $method , $params ){\n\t\t$controller_path = '../app/controllers/';\n\t\t$controller = $controller_path . $controller_name . '.php';\n\t\trequire_once( $controller );\n\t\t$method( $params );\n\t\treturn true;\n\t}", "function my_is_current_controller($names)\n {\n $names = array_map('trim', explode(',', $names));\n $current = explode('.', Route::currentRouteName())[0];\n return in_array($current, $names, true);\n }", "public static function route(){\n\t\t$request=(isset($_GET['request']))?$_GET['request']:'/index';\n\t\t$route_found=false;\n\t\t\n\t\t$vanilla_route_found=self::check_route($request);\n\t\t\n\t\tif(!$vanilla_route_found){\n\t\t\t$xml_request=self::xml_route();\n\t\t\tif($xml_request!==$request){\n\t\t\t\t$route_found=true;\n\t\t\t\t$request=$xml_request;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$args=explode(\"/\",$request);\n\t\tarray_shift($args);\n\t\tif(count($args)>1){\n\t\t\t$controller=$args[0];\n\t\t\tarray_shift($args);\n\t\t\t$action=$args[0];\n\t\t\tarray_shift($args);\n\t\t}else{\n\t\t\t$controller=$args[0];\n\t\t\tarray_shift($args);\n\t\t\t$action=\"index\";\n\t\t}\n\t\t\n\t\t// Add post arguments to args array\n\t\tif($_SERVER['REQUEST_METHOD']!=\"GET\"){\n\t\t\t$args=array_merge($args,$_POST);\n\t\t}\n\t\tif(!empty($_FILES)){\n\t\t\t$args=array_merge($args,array(\"uploads\" => $_FILES));\n\t\t}\n\t\t\n\t\ttry{\n\t\t\trequire_once('controllers/error_controller.php');\n\t\t\tif(file_exists('controllers/'.$controller.'_controller.php')){\n\t\t\t\trequire_once('controllers/'.$controller.'_controller.php');\n\t\t\t\t$maj_controller=ucfirst($controller).'Controller';\n\t\t\t\tif(method_exists($maj_controller,$action)){\n\t\t\t\t\t//print \"Found\";\n\t\t\t\t\t$controller=ucfirst($controller).'Controller';\n\t\t\t\t\t$controller=new $controller();\n\t\t\t\t\t$controller->$action($args);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($route_found){\n\t\t\t\t//print \"Gone\";\n\t\t\t\t$controller=new ErrorController();\n\t\t\t\t$controller->gone();\n\t\t\t}else{\n\t\t\t\t//print \"Not Found\";\n\t\t\t\t$controller=new ErrorController();\n\t\t\t\t$controller->notfound();\n\t\t\t}\n\t\t}catch(Exception $e){\n\t\t\t//print \"Error\";\n\t\t\t$controller=new ErrorController();\n\t\t\t$controller->server();\n\t\t}\n\t}", "private function check_path()\n\t{\n\t\t$ar = func_get_args();\n\t\tforeach ( $ar as $a ){\n\t\t\tif ( !is_string($a) ||\n (strpos($a,'./') !== false) ||\n (strpos($a,'/') === 0) ){\n\t\t\t\tdie(\"The path $a is not an acceptable value\");\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}", "public function isValidPathReturnsTrueIfPathExists() {}", "public function isAPI(){\n $paths = explode(\"/\", $this->path);\n if(isset($paths[0]) && strtolower($paths[0])==\"api\"){\n return true;\n }\n return false;\n }", "public function hasRulesPath()\n {\n return $this->get(self::RULES_PATH) !== null;\n }", "public function GetControllersDir ();", "private static function call_controller_and_method()\n {\n $path_file_controller = CONTROLLERS_PATH.self::$controller.\".php\";\n\n if(file_exists($path_file_controller)) {\n if (method_exists(\"App\\\\Controllers\\\\\" . self::$controller, self::$method)) {\n if (self::$params) {\n call_user_func(array(\"App\\\\Controllers\\\\\" . self::$controller, self::$method), self::$params);\n }else{\n call_user_func(array(\"App\\\\Controllers\\\\\" . self::$controller, self::$method));\n }\n } else {\n throw new \\Exception(\"La methode \" . self::$method . \" n'existe pas dans le controller : \" . self::$controller);\n die();\n }\n }\n else {\n ErrorController::show404();\n throw new \\Exception(\"Le controlleur \" . self::$controller . \" n'existe pas, dans le dossier \".CONTROLLERS_PATH);\n }\n }", "public static function isValid(){\n\n\t\t$valid=false;\n\t\tif(isset($_GET[\"view\"])){\n\t\t\t$url =\"\";\n\t\t\tif(Core::$root==\"\"){\n\n\n\t\t\t\t$url = \"core/app/view/\".$_GET['view'].\"-view.php\";\n\n\t\t\t}\n\n\t\t\tif(file_exists($file = $url)){\n\t\t\t\t$valid = true;\n\t\t\t}\n\t\t}\n\t\treturn $valid;\n\t}", "public function routeController()\n\t{\n\t\t$action = \"actionIndex\";\n\n\t\tif (isset($_GET[\"p\"]))\n\t\t{\n\t\t\t$params = array();\n\t\t\t$params = array_filter(explode(\"/\", $_GET[\"p\"]));\n\n\t\t\tif (count($params) != 1)\n\t\t\t{\n\t\t\t\t$action = \"action\";\n\n\t\t\t\tfor ($i = 1; $i < count($params); $i++)\n\t\t\t\t{\n\t\t\t\t\t$action .= ucwords($params[$i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$controller = \"Controller_\" . ucwords($params[0]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcall_user_func(array(new Controller_Index(), $action));\n\t\t\texit();\n\t\t}\n\n\t\tif (isset($controller) && class_exists($controller))\n\t\t{\n\t\t\tif (method_exists(new $controller(), $action))\n\t\t\t{\n\t\t\t\tcall_user_func(array(new $controller(), $action));\n\t\t\t\texit();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//call_user_func(array(new Controller_Error(), \"actionIndex\"));\n\t\t\t\tcall_user_func(array(new Controller_Index(), \"actionIndex\"));\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//call_user_func(array(new Controller_Error(), \"actionIndex\"));\n\t\t\tcall_user_func(array(new Controller_Index(), \"actionIndex\"));\n\t\t\texit();\n\t\t}\n\t}", "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 valid() {\n return ( current($this->_path) !== false );\n }", "private function universal_controller($c)\n\t{\n\t\tif ( !isset($this->ucontrollers[$c]) ){\n\t\t\treturn false;\n\t\t}\n\t\tif ( $this->ucontrollers[$c] === 1 ){\n\t\t\t$this->ucontrollers[$c] = is_file(self::cpath.$c.'.php') ? self::cpath.$c.'.php' : false;\n\t\t}\n\t\treturn $this->ucontrollers[$c];\n\t}", "protected function is_service_allowed($path) {\n\t\treturn true;\n\t}", "abstract public function getControllerUrl();", "public function validateRequest(){\n global $default;\n\n // Validate controller\n if (!($this->controller)) {\n // No controller set, Use defaults\n $this->controller = $default['controller'];\n $this->action = $default['action'];\n $this->parameter1 = $default['parameter1']; \n $this->parameter2 = $default['parameter2'];\n $this->parameter3 = $default['parameter3'];\n } \n\n // Check controller exists\n \n // Validate action\n if (!isset($this->action)) {\n // No action set, try index\n $this->action = 'index';\n } \n\n // Create controller to dispatch our request, eg new ItemsController\n $model = ucwords(rtrim($this->controller, 's'));\n $controller = ucwords($this->controller) . 'Controller';\n $dispatch = new $controller($model, $this->controller, $this->action);\n\n // Check $action method exists\n if (!method_exists($dispatch, $this->action)) {\n // Show error page\n } \n }", "public function testNoControllerVisible()\n {\n $app = $this->getApp();\n ob_start();\n $app->runControllerFromRawUrl('wrapper/noController');\n $output = ob_get_clean();\n $this->assertEquals('No controller, but should be visible anyway', $output);\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 checkAccess()\n {\n $list = $this->getPages();\n\n /**\n * Settings controller is available directly if the $page request variable is provided\n * if the $page is omitted, the controller must be the subclass of Settings main one.\n *\n * The inner $page variable must be in the getPages() array\n */\n return parent::checkAccess()\n && isset($list[$this->page])\n && (\n ($this instanceof \\XLite\\Controller\\Admin\\Settings && isset(\\XLite\\Core\\Request::getInstance()->page))\n || is_subclass_of($this, '\\XLite\\Controller\\Admin\\Settings')\n );\n }", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "private function checkControllerIdParam()\n {\n $id = $this->getRequest()->getParam('control');\n\n IF($id === NULL || is_numeric($id) === FALSE || $this->dbController->find($id)->count() === 0) {\n throw new Admin_Model_Acl_Exception('Invalid or no Id Parameter given');\n }\n\n RETURN (int) $id;\n }", "private function validatePath($path)\n {\n if (!$this->isDirectory($path)) {\n throw new Exception('The view path must be a directory!');\n }\n if (!is_readable($path)) {\n throw new Exception('The view path must be a readable directory!');\n }\n }", "function check_path_segment(string $path)\n{\n $trailingslashed = trailingslashit($path);\n\n // Don't want a leading slash.\n $frontchecked = ltrim($trailingslashed, '\\\\/');\n return $frontchecked;\n}", "public function checkPathExists($path);", "public function route() {\n\t\t$file = $this->app_directory . '/controllers/' . $this->controller . '.php';\n\t\tif(\\mfw\\helpers\\FileHelper::fileExists($file)) {\n\t\t\tinclude $this->app_directory . '/controllers/' . $this->controller . '.php';\n\t\t\t$controller = new $this->controller($this->controller, $this->app_directory);\n\t\t\tcall_user_func_array(array($controller, $this->method), $this->arguments);\n\t\t} else {\n\t\t\tif(defined('DOC_ROOT')) {\n\t\t\t\tinclude DOC_ROOT . '/404.php';\n\t\t\t} else {\n\t\t\t\tthrow new \\Exception(\"404 Page not found\");\n\t\t\t}\n\t\t}\n\t}", "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 }", "public function isPathDefined()\n {\n if (isset($this->path)) {\n // Make sure there's no forward slashes in the front (beginning) of the path string\n return ltrim($this->path, \"/\");\n }\n return false;\n }", "function getController($context) {\n\t\t$uri=$context->getURI();\n\t\t$path=$uri->getPart();\n\t\tswitch ($path) {\n\t\t\tcase 'admin':\n\t\t\t\treturn getAdminController($context);\n\t\t\tcase '':\n\t\t\t\t$uri->prependPart('home');\n\t\t\t\treturn 'Static';\n\t\t\tcase 'static':\n\t\t\t\treturn 'Static';\n\t\t\tcase 'login':\n\t\t\t\treturn 'Login';\n\t\t\tcase 'logout':\n\t\t\t\treturn 'Logout';\n\t\t\tcase \"checkout\":\n\t\t\t\treturn \"Checkout\";\n\t\t\tcase \"myShoppingCart\":\n\t\t\t return \"ShoppingCart\";\n\t\t\tdefault:\n\t\t\t\tthrow new InvalidRequestException (\"No such page \");\n\t\t}\n\t}", "public function testUserControllerActionDoesNotExists()\n {\n $route = new Route();\n \n $route->set(null, \"user\", null, \"Anax\\Route\\MockHandlerController\");\n \n $path = \"user/no-exists\";\n $this->assertTrue($route->match($path, \"GET\"));\n $route->handle($path);\n }" ]
[ "0.7252334", "0.7035493", "0.68429124", "0.65190035", "0.6396005", "0.6281552", "0.626848", "0.62484044", "0.61569375", "0.60835975", "0.606851", "0.6057534", "0.6037909", "0.5993838", "0.5947583", "0.5947583", "0.5938197", "0.5896171", "0.5877429", "0.5872966", "0.5851458", "0.5844393", "0.58215606", "0.5797846", "0.5785881", "0.57828176", "0.577203", "0.57553023", "0.57553023", "0.57524663", "0.57465184", "0.57462496", "0.57399863", "0.572641", "0.57115585", "0.5709831", "0.5694859", "0.5681538", "0.5679112", "0.5648957", "0.5640525", "0.5632293", "0.56182724", "0.5615755", "0.56150013", "0.561365", "0.56113285", "0.5606876", "0.5602642", "0.56004524", "0.559992", "0.5596886", "0.55868024", "0.55798876", "0.5576922", "0.5567914", "0.5565524", "0.5564091", "0.5557328", "0.5547711", "0.55428123", "0.5538336", "0.5489509", "0.5475811", "0.54715085", "0.5445392", "0.54366904", "0.5431833", "0.5423239", "0.54201275", "0.5418287", "0.54030657", "0.5402032", "0.5394304", "0.53864574", "0.53816146", "0.53792715", "0.5377623", "0.53651595", "0.5353516", "0.53180987", "0.53179926", "0.53172565", "0.5312886", "0.53105575", "0.52947336", "0.52685803", "0.5255758", "0.5253326", "0.52505666", "0.5236285", "0.5225939", "0.52257407", "0.52117723", "0.5209836", "0.51970065", "0.519102", "0.5189739", "0.51855654", "0.5181529" ]
0.7996422
0
/ loads the core class files
Загружает основные классы файлов
protected function loadCoreClasses() { require __DIR__ . DIRECTORY_SEPARATOR . 'Config.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Router.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Loader.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Controller.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Database.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Model.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Library.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'View.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Request.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Response.php'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadClassFiles() {}", "private function loadClasses()\n\t\t{\n\t\t\t// foreach($GLOBALS['classes'] as $var => $class)\n\t\t\t// {\n\t\t\t\t// $this->$var = $class;\n\t\t\t// }\n\t\t\t\n\t\t\t// $this->load = _new('loader');\n\t\t\t\n\t\t\t/** Registramos todos os objetos que serão necessários **/\n\t\t\tforeach(Registry::getAll() as $var => $object)\n\t\t\t{\n\t\t\t\t$this->$var = $object;\n\t\t\t}\n\t\t\t\n\t\t\t// E também a classe loader\n\t\t\t$this->load = Registry::get('loader');\n\t\t}", "function classes() {\n\tcore();\n}", "protected static function loadCore($class_name)\n\t{\n require_once(COREPATH .\"$class_name.php\");\n }", "static public function coreClasses ($classname) {\n\t\t$classname = autoloader::ignoreNamespace($classname);\n\t\tif (file_exists(\"../core/\".$classname.\".php\")) require_once(\"../core/\".$classname.\".php\");\n\t}", "function __autoload($className){\n if (file_exists(\"core/$className.php\")){\n include_once \"core/$className.php\";\n }\n}", "public function loadClasses(){\n spl_autoload_register(function($className){\n require_once preg_replace(\"/\\\\\\\\/\", \"/\", $className).\".php\";\n });\n }", "private function load_classes() {\n\n\t\t\trequire_once ASCRIPTA_ENGINE_ADMIN_PATH . 'class-ae-settings.php';\n\n\t\t}", "function load_my_classes($_cls)\n{\n //echo '<hr />' . $_cls . '<hr />';\n $PATH_SEPARATOR = DIRECTORY_SEPARATOR;\n //$ROOTPATH = $_SERVER[\"DOCUMENT_ROOT\"];\n\t$ROOTPATH = dirname($_SERVER[\"SCRIPT_FILENAME\"]);\n\t\n\t//print_r($_SERVER);\n \n\t\n\n\n if(class_exists($_cls))\n {\n //doe niks, het is een ingebouwde class zoals \\SplObjectStorage o.i.d.\n }\n elseif(strpos($_cls, 'Exception') !== false)\n {\n $candidate_class_file = $ROOTPATH . $PATH_SEPARATOR . 'common' . $PATH_SEPARATOR . 'classes' . $PATH_SEPARATOR . 'Exceptions.php';\n if(file_exists($candidate_class_file))\n {\n require_once($candidate_class_file);\n //echo($candidate_class_file . ' found in ' . $candidate_class_file . '<br />');\n }\n else\n {\n //echo($candidate_class_file . ' does not exist!<br />');\n }\n }\n elseif(strpos($_cls, 'Common') === false)\n {\n $dirsToLookIn = Array(\"controller\", \"core\", \"model\", \"view\");\n \n foreach($dirsToLookIn as $dir)\n {\n if(strpos($_cls, __NAMESPACE__) !== false)\n {\n //namespace eraf strippen anders komt die mee in de padverwijzingen\n $_cls = substr($_cls, strlen(__NAMESPACE__)+1); \n }\n \n \n $candidate_class_file = $ROOTPATH . $PATH_SEPARATOR . $dir . $PATH_SEPARATOR . $_cls . '.php';\n if(file_exists($candidate_class_file))\n {\n require_once($candidate_class_file);\n //echo($candidate_class_file . ' found in ' . $candidate_class_file . '<br />');\n }\n else\n {\n //echo($candidate_class_file . ' does not exist!<br />');\n }\n }\n }\n else\n {\n $_cls = substr($_cls, 7);\n $candidate_class_file = $ROOTPATH . $PATH_SEPARATOR . 'common' . $PATH_SEPARATOR . 'classes' . $PATH_SEPARATOR . $_cls . '.php';\n \n if(file_exists($candidate_class_file))\n {\n require_once($candidate_class_file);\n //echo($candidate_class_file . ' found in ' . $candidate_class_file . '<br />');\n }\n else\n {\n //echo($candidate_class_file . ' does not exist!<br />');\n }\n }\n //echo '<hr />';\n}", "function __autoload($class)\n {\n require_once('core/'.$class.'.php');\n }", "protected function load_files() {\n\t\trequire_once __DIR__ . '/class-papi-admin-meta-handler.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-option-handler.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-entry-post.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-entry-taxonomy.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-columns.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-page-type-switcher.php';\n\t}", "public function getClassLoaders();", "public function load()\n {\n if( $this->autoload ) {\n $loader = new BasePathClassLoader( $this->paths );\n $loader->useEnvPhpLib();\n $loader->register();\n }\n\n foreach( $this->paths as $path ) {\n $di = new RecursiveDirectoryIterator($path);\n $ita = new RecursiveIteratorIterator($di);\n $regex = new RegexIterator($ita, '/^.+\\.php$/i', \n RecursiveRegexIterator::GET_MATCH);\n\n foreach( $regex as $matches ) foreach( $matches as $match ) {\n try {\n require_once $match;\n } \n catch ( Exception $e ) {\n echo \"$match class load failed.\\n\";\n }\n }\n }\n }", "function __autoload($class_name) {\n include_once $_SERVER['DOCUMENT_ROOT'].'/core/classes/class.' . $class_name . '.inc.php';\n}", "function __autoload($className)\n{\n require_once \"webcore.reflection.php\";\n \n ClassLoader::loadClass($className);\n}", "private static function load_files() {\n\t\t\t// Classes.\n\t\t\tinclude_once ASTRA_ADDON_EXT_ADVANCED_HEADERS_DIR . 'classes/class-astra-ext-advanced-headers-data.php';\n\t\t\t// Load Astra Breadcrumbs.\n\t\t\tinclude_once ASTRA_ADDON_EXT_ADVANCED_HEADERS_DIR . 'classes/astra-breadcrumbs.php';\n\t\t}", "public function load()\n {\n $this->_retrievedFiles = $this->getRetrievedFiles();\n $this->_loadedClasses = [];\n\n $manifestRepository = $this->_registry->getManifestRepository();\n $providerRepository = $this->_registry->getProviderRepository();\n\n $loadedClasses = [];\n\n // loop through files and find the classes declared by loading the file\n foreach ($this->_retrievedFiles as $file) {\n if(is_dir($file)) {\n continue;\n }\n\n $classesLoadedBefore = get_declared_classes();\n $oldLevel = error_reporting(E_ALL | ~E_STRICT); // remove strict so that other packages wont throw warnings\n // should we lint the files here? i think so\n include_once $file;\n error_reporting($oldLevel); // restore old error level\n $classesLoadedAfter = get_declared_classes();\n $loadedClasses = array_merge($loadedClasses, array_diff($classesLoadedAfter, $classesLoadedBefore));\n }\n\n // loop through the loaded classes and ensure that\n foreach ($loadedClasses as $loadedClass) {\n\n // reflect class to see if its something we want to load\n $reflectionClass = new ReflectionClass($loadedClass);\n if ($reflectionClass->implementsInterface('Zend_Tool_Framework_Manifest_Interface')\n && !$reflectionClass->isAbstract())\n {\n $manifestRepository->addManifest($reflectionClass->newInstance());\n $this->_loadedClasses[] = $loadedClass;\n }\n\n if ($reflectionClass->implementsInterface('Zend_Tool_Framework_Provider_Interface')\n && !$reflectionClass->isAbstract()\n && !$providerRepository->hasProvider($reflectionClass->getName(), false))\n {\n $providerRepository->addProvider($reflectionClass->newInstance());\n $this->_loadedClasses[] = $loadedClass;\n }\n\n }\n\n return $this->_loadedClasses;\n }", "private function init()\n\t{\n\t\tforeach (isLoadedClass() as $objName)\n\t\t{\n\t\t\t$this->$objName =& loadClass('', '', $objName);\n\t\t}\n\t}", "public static function load()\n {\n spl_autoload_register(array('AutoLoader', 'autoloadGenericClasses'));\n spl_autoload_register(array('AutoLoader', 'autoloadPhpdocx'));\n spl_autoload_register(array('AutoLoader', 'autoloadLog4php'));\n spl_autoload_register(array('AutoLoader', 'autoloadZetaComponents'));\n spl_autoload_register(array('AutoLoader', 'autoloadTcpdf'));\n spl_autoload_register(array('AutoLoader', 'autoloadPdf'));\n spl_autoload_register(array('AutoLoader', 'autoloadDompdf'));\n spl_autoload_register(array('AutoLoader', 'autoloadMht'));\n }", "public function loadAllClassesIncrementally()\n {\n }", "public static function autoload() {\n // autoload\n include('cache/classes.yml.php');\n foreach($return as $class) {\n require_once($class);\n }\n }", "function __autoload($class_name0) {\n\n\t// casos especiais\n\tif ($class_name0==\"datalog\") {\n\t\t$class_name0=\"pdata\";\n\t}\n\n\n\t$class_name = strtolower($class_name0);\n\t$file[]=CORENLIB.\"cls_\".$class_name.\".php\";\n\t$file[]=CORENLIB.\"cls_\".$class_name.\".nx\";\n\t$file[]=DIRNLIB.\"cls_\".$class_name.\".php\";\n\t$file[]=CORENLIB.\"cls_\".$class_name.\".nx\";\n\t$file[]=CORENLIB.$class_name.\".nx\";\n\t$file[]=CORENLIB.$class_name.\".php\";\n\t$file[]=CORENLIB.\"cls.nx\";\t\n\t\n\n\tforeach ($file as $v) {\n\t\tif (file_exists($v)) {\n\t\t\trequire_once ($v);\n\t\t\treturn;\n\t\t}\n\t}\n\tdie (\"CLASS NAME: '$class_name' NOT FOUND\");\n}", "private function load_dependencies() {\n /**\n * \"BEHIND THE SCENCE\" CLASSES\n * Note: usually the admin and public do not directly use them, they are\n * necessary for the plugin (eg. i18n)\n */\n require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-i18n.php';\n\n /* ADMIN */\n require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-admin.php';\n require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-api.php';\n\n /* PUBLIC */\n require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-public.php';\n }", "public static function registerClassLoadingInformation() {}", "public static function __autoload()\n\t{\n\t\tself::$FPATH = dirname(__DIR__);\n\t\tself::$APATH = self::detect_project();\n\n\t\tspl_autoload_register(array(__CLASS__, 'load'));\n\n\t\tself::cache_files();\n\t\tself::import_initializers();\n\t}", "public function core($className){\n if( strpos($className, 'Twig_') !== false ){\n return;\n }\n $fileScanner = new FileScanner( DOCUMENT_ROOT );\n $files = $fileScanner->getFilesInOneDimensionalArray();\n // exclude folders.\n $corefiles = array_filter($files, array($this, 'isCoreClass'));\n foreach($corefiles as $file){\n if( strpos(pathinfo($file, PATHINFO_FILENAME), $className) > -1 ){\n require_once $file;\n }\n }\n }", "function __autoload($class_name){\n require_once \"../cls/\".$class_name.'.php';\n}", "protected function _Load_Core() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/core');\r\n // Fire the shortcode init action\r\n do_action('vcff_supports_core_init',$this);\r\n }", "function __autoload($class_name) {\n\t$inc = ['sys/core/', 'sys/libs/'];\n\tforeach ($inc as $in) {\n\t\t$path = APP_DIR . $in . $class_name . '.php';\n\t\tif (file_exists($path)) {\n\t\t\tinclude $path;\n\t\t}\n\t}\n}", "static function autoload()\r\n\t{\r\n\t\t\r\n\t}", "public static function autoload()\n {\n spl_autoload_register(array(__CLASS__,'load'));\n }", "protected function initClasses()\n {\n $classList = __DIR__ . DS . 'classes.txt';\n if(file_exists($classList)) {\n $contents = file_get_contents($classList);\n $classes = explode(',', $contents);\n foreach($classes as $class)\n $this->classes[] = trim($class);\n }\n\n }", "public function __load();", "public function init()\n {\n // Register the loader method\n spl_autoload_register(array(__CLASS__, '_loadClasses'));\n }", "public static function LOADER(){\n spl_autoload_register(array(__CLASS__, \"requireClass\"));\n }", "protected function includeAndStartCoreBootstrap()\n {\n $classLoaderFilepath = $this->getClassLoaderFilepath();\n\n $classLoader = require $classLoaderFilepath;\n\n $this->bootstrap->initializeClassLoader($classLoader)\n ->baseSetup()\n ->loadConfigurationAndInitialize(true)\n ->loadTypo3LoadedExtAndExtLocalconf(true)\n ->initializeBackendRouter()\n ->setFinalCachingFrameworkCacheConfiguration()\n ->defineLoggingAndExceptionConstants()\n ->unsetReservedGlobalVariables();\n }", "public function __runEngine()\n\t{\n\t\t$directories = ['core'];\n\n\t\tforeach ($directories as $dir) {\n\t\t\t\t\n\t\t\t$filePath \t= TEMPLATEPATH.'/'.$dir; \n\t\t\t$php_files \t= scandir($filePath);\n\t\t\t$collectOfFiles = collect($php_files);\n\t\t\t$slice \t\t\t= $collectOfFiles->slice(2); \n\t\t\t$collectOfFiles = $slice->all(); \n\n\t\t\tforeach($collectOfFiles as $perFile)\n\t\t\t{\n\t\t\t\tinclude $filePath.'/'.$perFile;\n\t\t\t} \n\t\t} \n\n\t\t$this->__startClasses();\n\t}", "private static function initialLoad() {\n include_once __DIR__ . '/Storange.php';\n Storange::getPathDir('wowframework/');\n include_once __DIR__ . '/exceptions/LoadFiles.php';\n }", "function mySubLoad($className){\n\t$arr = scandir(MYPHP_COMMON);\n\t$name = explode('\\\\', $className);\n\tforeach($arr as $val){\n\t\tif($val == '.' || $val == '..' || is_file(MYPHP_COMMON.'/'.$val)){\n\t\t\tcontinue;\n\t\t}\n\t\t$path = MYPHP_COMMON.'/'.$val.'/'.$name[count($name) - 1].'.class.php';\n\t\tif(file_exists($path)){\n\t\t\trequire_once $path;\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "private function includeFiles(){\n foreach($this->files as $file){\n require implode('', $file);\n $class_name = $this->getClassNameFromFileName($file);\n $this->classes[$file['name']] = new $class_name();\n }\n }", "function __autoload($class){\n require \"classes/\".$class.\".php\";\n }", "function do_autoload() {\n\tinit_files();\n}", "protected function classLoader() {\n\t\t// Get absolute path of extension directory\n\t\t$extPath = t3lib_extMgm::extPath(tx_passwordmgr_module1::extKey);\n\t\t// Add all classes to load array\n\t\t$this->include_once[] = $extPath . 'helper/class.tx_passwordmgr_helper.php';\n\t\t$this->include_once[] = $extPath . 'helper/class.tx_passwordmgr_openssl.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_interface.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_default.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_initializekeypair.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_addgroup.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_addpassword.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_addgroupmember.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_editgroupmember.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_deletepassword.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_deletegroup.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_deletegroupmember.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_editpassword.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_editgroup.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_decryptpassword.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_fold.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_changepassphrase.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_selectpassword.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_deselectpassword.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_movepassword.php';\n\t\t$this->include_once[] = $extPath . 'controller/class.tx_passwordmgr_action_updatesettings.php';\n\t\t$this->include_once[] = $extPath . 'view/class.tx_passwordmgr_view_default.php';\n\t\t$this->include_once[] = $extPath . 'view/class.tx_passwordmgr_view_overview.php';\n\t\t$this->include_once[] = $extPath . 'view/class.tx_passwordmgr_view_initializekeypair.php';\n\t\t$this->include_once[] = $extPath . 'view/class.tx_passwordmgr_view_addeditpassword.php';\n\t\t$this->include_once[] = $extPath . 'view/class.tx_passwordmgr_view_addeditgroup.php';\n\t\t$this->include_once[] = $extPath . 'view/class.tx_passwordmgr_view_addeditgroupmember.php';\n\t\t$this->include_once[] = $extPath . 'view/class.tx_passwordmgr_view_changepassphrase.php';\n\t\t$this->include_once[] = $extPath . 'view/class.tx_passwordmgr_view_settings.php';\n\t\t// Default data list class, implements Iterator, Countable\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_list.php';\n\t\t// Data list classes\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_userlist.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_grouplist.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_groupmemberlist.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_passwordlist.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_ssldatalist.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_loglist.php';\n\t\t// Default data class, implements ArrayAccess, IteratorAggregate\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_data.php';\n\t\t// Data classes\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_group.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_user.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_groupmember.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_password.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_ssldata.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_log.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_moduledata.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_functionmenu.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_functionmenu_allitems.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_functionmenu_usernotinitialized.php';\n\t\t$this->include_once[] = $extPath . 'model/class.tx_passwordmgr_model_userdata.php';\n\t\t// Load all classes\n\t\tforeach ($this->include_once as $incFile) {\n\t\t\tinclude_once($incFile);\n\t\t}\n\t}", "public static function load_extra_classes() {\n\t\trequire_once TVE_DASH_PATH . '/inc/automator/class-tap-elementor.php';\n\t\tElementor::init();\n\n\t\trequire_once TVE_DASH_PATH . '/inc/automator/class-tap-woo.php';\n\t\tWoo::init();\n\n\t\trequire_once TVE_DASH_PATH . '/inc/automator/class-tap-facebook.php';\n\t\tFacebook::init();\n\t}", "function __autoload($class_name)\n{\t\n require_once Conf::$DIRS['LIBS'].'class/'.$class_name.'.class.php';\t\n}", "public static function load()\n {\n spl_autoload_register(array('AutoLoader', 'autoloadGenericClasses'));\n }", "function autoload($class_name)\n{\n $exp_arr = explode('_', $class_name);\n if (count($exp_arr) === 1) {\n $folder = 'core';\n } else {\n $n = array_pop($exp_arr);\n $folder = $n . ($n[strlen($n) - 1] == 's' ? 'es' : 's');\n }\n switch($folder) {\n case \"controllers\":\n $arr = explode('_', $class_name);\n $sub_folder = array_shift($arr);\n $class_file = PROTECTED_DIR . $folder . DS . PROJECT . DS . $sub_folder . DS . $class_name . '.php';\n break;\n case \"helpers\":\n case \"templates\":\n $class_file = PROTECTED_DIR . $folder . DS . PROJECT . DS . $class_name . '.php';\n break;\n default:\n $class_file = PROTECTED_DIR . $folder . DS . $class_name . '.php';\n break;\n }\n if (file_exists($class_file)) {\n require_once($class_file);\n }\n}", "function vehicleAbsClassLoader()\n\t{\n\t\t$path = 'Classes/Vehicles/Abs.php';\n\t\tif (file_exists($path)){\n\t\t\trequire_once($path);\n\t\t}\n\t}", "private function load_dependencies() {\n\n\t\t/**\n\t\t * The class responsible for orchestrating the actions and filters of the\n\t\t * core theme.\n\t\t */\n\t\trequire_once 'class-custom-theme-loader.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the public area.\n\t\t */\n\t\trequire_once 'public/class-theme-public.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the admin area.\n\t\t */\n\t\trequire_once 'admin/class-theme-admin.php';\n\n\n\t\t$this->loader = new Wpt_Custom_Theme_Loader();\n\n\t}", "public function load() {\r\n\t\t$this->includes();\r\n\t\t$this->inits();\r\n\t}", "function __autoload($class) {\n if ($class == \"uploader\")\n require \"core/uploader.php\";\n elseif ($class == \"browser\")\n require \"core/browser.php\";\n elseif (file_exists(\"core/types/$class.php\"))\n require \"core/types/$class.php\";\n elseif (file_exists(\"lib/class_$class.php\"))\n require \"lib/class_$class.php\";\n elseif (file_exists(\"lib/helper_$class.php\"))\n require \"lib/helper_$class.php\";\n}", "public function coreClasses(){\n return[\n 'request' => 'System\\\\Http\\\\Request',\n 'response' => 'System\\\\Http\\\\Response',\n 'session' => 'System\\\\Session',\n 'route' => 'System\\\\Route',\n 'cookie' => 'System\\\\Cookie',\n 'loader' => 'System\\\\Loader',\n 'html' => 'System\\\\Html',\n 'db' => 'System\\\\Database',\n 'view' => 'System\\\\View\\\\ViewFactory',\n ];\n }", "function __autoload($cls){\n SUPER::include_file_with_class($cls);\n}", "static public function initialize()\r\n {\r\n spl_autoload_register(\"self::load\");\r\n }", "function __autoload($name){\n require_once './class/' . $name . \".class.php\";\n}", "function __autoload($class_name) {include $class_name . '.php';}", "public function core() {\n\t\t\tinclude_once $this->includes_path() . 'functions-cyprus-utility.php';\n\t\t\tinclude_once $this->includes_path() . 'class-cyprus-settings.php';\n\t\t\tinclude_once $this->includes_path() . 'class-cyprus-sanitize.php';\n\t\t\tinclude_once $this->includes_path() . 'class-cyprus-dynamic-css.php';\n\t\t}", "public function load() {\n $this->loadModules($this->dir['modules_core'], 'core');\n $this->loadModules($this->dir['modules_custom'], 'custom');\n $this->runModules();\n }", "function zapp_autoload ($className)\n{\n static $class = array ();\n\n if (!isset($class[$className]))\n {\n $className = strtolower($className);\n $classPrefix = str_replace('_', '/', $className);\n\n $path = [];\n $classBase = null;\n\n if (preg_match(\"/^(zapp)$/i\", $className)) \n $path = [SYSTEM_PATH . 'core/'.$classPrefix];\n\n elseif (preg_match(\"/^(config_)/i\", $className)) \n $path = [APPLICATION_PATH. $classPrefix.'.'.ENVIRONMENT, APPLICATION_PATH.$classPrefix];\n\n elseif (preg_match(\"/^(ajax_|controller_|model_|base_|console_)/i\", $className)) \n $path = [APPLICATION_PATH.$classPrefix];\n\n elseif (preg_match(\"/^(core_controller|core_console|core_model|core_component)/i\", $className)) \n {\n $className = str_replace('core_','', $className);\n $classPrefix = str_replace('_', '/', $className);\n $path = [SYSTEM_PATH . 'core/base/'.$classPrefix] ;\n }\n\n elseif (preg_match(\"/^(core_)/i\", $className)) \n $path = [SYSTEM_PATH.$classPrefix] ;\n\n elseif (preg_match(\"/^(lib_)/i\", $className)) \n $path = [APPLICATION_PATH.$classPrefix, SYSTEM_PATH.$classPrefix];\n \n else\n $path = [APPLICATION_PATH. 'ext/'.$classPrefix, SYSTEM_PATH. 'ext/'.$classPrefix];\n\n foreach ($path as $_filename) \n {\n if (@file_exists($_filename . '.php')) \n {\n $classBase = $_filename;\n break;\n }\n }\n\n if ($classBase)\n {\n $class[$className] = $classBase;\n require_once($classBase . '.php');\n }\n\n }\n}", "public static function initialize() {\n\t\tself::$log_location = \\Config::LOG_LOCATION;\n\t\tself::$start_time = microtime(true);\n\t\tself::debug(\"Loaded Core classes. Initialized Log class.\");\n\t}", "function __autoload($className) {\n \trequire_once 'config.inc.php';\n require_once ROOT_PATH . '/includes/'. ucfirst($className) .'.class.php'; //自动加载 class 文件 \n}", "static public function autoload() {\n spl_autoload_register(array(__CLASS__, 'loader'));\n }", "public function __construct()\n\t{\n\t\tforeach(Config::item('core.preload') as $type => $load)\n\t\t{\n\t\t\tif ($load == FALSE) continue;\n\n\t\t\tforeach(explode(',', $load) as $name)\n\t\t\t{\n\t\t\t\tif (($name = trim($name)) == FALSE) continue;\n\n\t\t\t\tswitch($type)\n\t\t\t\t{\n\t\t\t\t\tcase 'libraries':\n\t\t\t\t\t\tif ($name == 'database')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->database();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->library($name);\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'models':\n\t\t\t\t\t\t$this->model($name);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function loadClass() {\n $this->_instances = array();\n\n $this->_instances['log'] = new Log();\n if(ENVIRONMENT == self::ENVIRONMENT_DEV) {\n $this->_instances['debug'] = new Debug();\n $this->_instances['panel'] = new Panel();\n }\n $this->_instances['controller'] = null;\n $this->_instances['configuration'] = new Configuration();\n $this->_instances['routing'] = new Routing();\n }", "public function testLoadclassNamespace()\r\n {\r\n Web2All_Manager_Main::unregisterIncludeRoot(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR);\r\n Web2All_Manager_Main::loadClass('Web2All\\\\Manager\\\\ClassLoaderTest\\\\E');\r\n $this->assertFalse(class_exists('Web2All\\\\Manager\\\\ClassLoaderTest\\\\E', false));\r\n Web2All_Manager_Main::registerIncludeRoot(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR);\r\n Web2All_Manager_Main::loadClass('Web2All\\\\Manager\\\\ClassLoaderTest\\\\E');\r\n $this->assertTrue(class_exists('Web2All\\\\Manager\\\\ClassLoaderTest\\\\E', false));\r\n }", "function __autoload($className)\n\t{\n\t\t// Load class using Loader\n\t\tLoad($className);\n\t}", "function __autoload($className) \n{ \n try \n {\n if (file_exists( CORE_INCLUDE_PATH . DS. \"classes\" . DS .\"{$className}.php\") ||\n\t file_exists( CORE_INCLUDE_PATH . DS. \"{$className}.php\") || file_exists( ROOT . DS . \"model\" . DS . \"{$className}.php\")) \n\t{ \n require_once \"{$className}.php\";\n }\n } catch (Exception $ex) {\n die($ex->getMessage());\n }\n}", "abstract protected static function autoload($class);", "public static function __classLoaded()\n {\n\t\tif (empty(static::$layers) && class_exists('Git')) {\n\t\t\tstatic::$layers = \\Git::$repositories;\n\t\t}\n }", "protected function initializeClassLoader() {\n\t\tif (t3lib_div::int_from_ver( TYPO3_version ) < 6000000 ) {\n\t\t\tif (!class_exists('Tx_Extbase_Utility_ClassLoader', FALSE)) {\n\t\t\t\trequire(t3lib_extmgm::extPath('extbase') . 'Classes/Utility/ClassLoader.php');\n\t\t\t}\n\n\t\t\t$classLoader = new Tx_Extbase_Utility_ClassLoader();\n\t\t\tspl_autoload_register(\n\t\t\t\tarray(\n\t\t\t\t\t$classLoader,\n\t\t\t\t\t'loadClass'\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "function __autoload($class_name) {\r\n include '../class/' . $class_name . '.php';\r\n}", "private static final function loadClasses() {\n if(isset(self::$_config['include']) && is_array(self::$_config['include'])) {\n self::$_config['include'] = array_merge(self::$defaultInclude, self::$_config['include']);\n $defaultIncludeCount = count(self::$defaultInclude);\n foreach(self::$_config['include'] as $key => $include) {\n /* @var string $include */\n $include = ($key < $defaultIncludeCount) ? self::$basePath . $include : self::$path . $include;\n $matches = [];\n if(preg_match('/(.*)\\/?\\*$/', $include, $matches)) {\n if(is_dir($matches[1])) {\n $files = scandir($matches[1]);\n foreach ($files as $file) {\n /* @var string $file */\n if($file === '.' || $file === '..' || is_dir($matches[1] . $file)) {\n continue;\n }\n if (preg_match('/^.+\\.php$/', $file)) { // include only php files\n require_once($matches[1] . $file);\n }\n }\n } else {\n static::error500(\"Wrong config parameter in <strong>include</strong>:\n {$matches[1]} is not a directory\");\n }\n } else {\n if(file_exists($include)) {\n if(!is_dir($include)) {\n require_once($include);\n } else {\n static::error500(\"Wrong config parameter in <strong>include</strong>:\n $include is a directory\");\n }\n } else {\n static::error500(\"Wrong config parameter in <strong>include</strong>:\n $include is not exists.\");\n }\n }\n }\n } else {\n static::error500('Include is missing from config.');\n }\n }", "function __autoload( $className ){\n require_once 'classes/'.$className.'.class.php';\n }", "private function _initialize(){\n\t\t\t//Root Folders\n\t\t\tDefined(\"SRC_PATH\") || Define('SRC_PATH', realpath(dirname(dirname(__file__))) . DS . 'src' . DS);\n\t\t\tDefined(\"DB_PATH\") || Define('DB_PATH', realpath(dirname(__file__)).DS.'database'.DS);\n\t\t\t//$dir = array_filter(glob('*'),'is_dir');\n\t\t\t//print_r($dir);\n\t\t\tspl_autoload_extensions('.php');\n\t\t\tspl_autoload_register(function ($class) {\n\t\t\t\t$parts = explode('\\\\', $class);\n\t\t\t\t$class = end($parts); \n\n\t\t\t\tif (file_exists(PROJECT_PATH.$this->_implementation.DS.$class.'.php'))\n\t\t\t\t\t\trequire_once PROJECT_PATH.$this->_implementation.DS.$class.'.php';\n\t\t\t\t\n //Impliments \n\t\t\t\t$folders = scandir(PROJECT_PATH . $this->_implementation);\n\t\t\t\t$remove = array('.', '..');\n\t\t\t\t$folders = array_diff($folders, $remove);\n\t\t\t\tif (!empty($folders)) {\n\t\t\t\t\t$folders = array_clean($folders);\n\t\t\t\t\tforeach ($folders as $folder) {\n\t\t\t\t\t\tif (file_exists(PROJECT_PATH.$this->_implementation.DS.$folder.DS.$class.'.php'))\n\t\t\t\t\t\t\trequire_once PROJECT_PATH.$this->_implementation.DS.$folder.DS.$class.'.php';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//Initalize Plugins\n\t\t\t\t$folders = scandir(PROJECT_PATH . $this->_pluginPath);\n\t\t\t\t$remove = array('.', '..');\n\t\t\t\t$folders = array_diff($folders, $remove);\n\t\t\t\tif (!empty($folders)) {\n\t\t\t\t\t$folders = array_clean($folders);\n\t\t\t\t\tforeach ($folders as $folder) {\n\t\t\t\t\t\tif (file_exists(PROJECT_PATH.$this->_pluginPath.DS.$folder.DS.$class.'.php'))\n\t\t\t\t\t\t\trequire_once PROJECT_PATH.$this->_pluginPath.DS.$folder.DS.$class.'.php';\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t//System vendor \n\t\t\t\t$folders = scandir(APP_PATH . $this->_systemVendor);\n\t\t\t\t$remove = array('.', '..');\n\t\t\t\t$folders = array_diff($folders, $remove);\n\t\t\t\tif (!empty($folders)) {\n\t\t\t\t\t$folders = array_clean($folders);\n\t\t\t\t\tforeach ($folders as $folder) {\n\t\t\t\t\t\tif (file_exists(APP_PATH.$this->_systemVendor.DS.$folder.DS.$class.'.php'))\n\t\t\t\t\t\t\trequire_once APP_PATH.$this->_systemVendor.DS.$folder.DS.$class.'.php';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//User Vendor\n\t\t\t\t$folders = scandir(PROJECT_PATH . $this->_userVendor);\n\t\t\t\t$remove = array('.', '..');\n\t\t\t\t$folders = array_diff($folders, $remove);\n\t\t\t\tif (!empty($folders)) {\n\t\t\t\t\t$folders = array_clean($folders);\n\t\t\t\t\tforeach ($folders as $folder) {\n\t\t\t\t\t\tif (file_exists(PROJECT_PATH.$this->_userVendor.DS.$folder.DS.$class.'.php'))\n\t\t\t\t\t\t\trequire_once PROJECT_PATH.$this->_userVendor.DS.$folder.DS.$class.'.php';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (!empty($_SERVER['QUERY_STRING']))\n\t\t\t\t$this->_route = preg_replace('/^url=index.php&url=(.*)/', '$1', $_SERVER['QUERY_STRING']);\n\t\t\t\t\t\n\t\t\tif(utils\\Config::get('role/module_active') == 'YES'){\n\t\t\t\t//Create All Roles Tables \n\t\t\t\t$userTable = utils\\Config::get('webadmin/userTable');\n\t\t\t\t$userKey = utils\\Config::get('webadmin/userKey');\n\t\t\t\tif(isset($userTable) && isset($userKey)){\n\t\t\t\t\tif(\\orm\\Query::is_table($userTable)){\n\t\t\t\t\t\t$roleTables = new roles\\tables\\RoleTables($userTable,$userKey);\n\t\t\t\t\t\t$roleTables->addRoleTables();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n }", "function load($classmap, $base = null) {\n spl_autoload_register(function($class) use ($classmap, $base) {\n $class = strtolower($class);\n if(!isset($classmap[$class])) return false;\n if($base) {\n include($base . DS . $classmap[$class]); \n } else {\n include($classmap[$class]);\n }\n });\n}", "function __construct(){\n spl_autoload_register(function ($className) {\n $ds = DIRECTORY_SEPARATOR;\n $dir = App::$param['path'];\n $className = strtr($className, '\\\\', $ds);\n $file = \"{$dir}{$className}.php\";\n if (is_readable($file)) {\n require_once $file;\n }\n });\n set_include_path(get_include_path() . PATH_SEPARATOR . App::$param['path'] . PATH_SEPARATOR . App::$param['path'] . \"app\" . PATH_SEPARATOR . App::$param['path'] . \"app/libs/PEAR/\");\n }", "public function mapClasses() {\n // TODO: this is needed when the class map is not created yet (i.e. at very first install).\n if (!is_dir($this->dir['tmp'])) {\n mkdir($this->dir['tmp']);\n }\n $fop = fopen(CLASS_MAP_FILE, 'w+');\n\n foreach ($this->modules_loaded as $module) {\n $autoload_paths = array('Common', 'Qtags');\n foreach ($autoload_paths as $autoload_path) {\n $full_autoload_path = $module['path'] . '/classes/' . $autoload_path;\n /**\n * Autoload module's qtags.\n */\n if (is_dir($full_autoload_path)) {\n $classes = $this->scanDirectory($full_autoload_path);\n foreach ($classes as $class) {\n // Parse the Qtag.\n $exp1 = explode('/', $class);\n $exp2 = explode('.', $exp1[count($exp1) - 1]);\n $item_name = $exp2[0];\n $this->class_map[$autoload_path][$item_name] = $full_autoload_path . '/' . $class;\n }\n }\n }\n }\n fwrite($fop, serialize($this->class_map));\n fclose($fop);\n }", "function __autoload($class_name) {\n include \"classes/\" . $class_name . \".class.php\";\n}", "function __autoload($className){\n include_once \"Classes/$className.php\";\n}", "private function __construct() {\n require_once CORE_LIBRARY . 'CoreAutoloader.php';\n\n // instantiate core-class objects\n $this->autoloader = new CoreAutoloader();\n $this->config = CoreConfig::instance();\n $this->uri = CoreUri::instance();\n $this->message = CoreMessage::instance();\n }", "function _initialize()\n {\n\n //initalize Loader\n $auto_load=array(\"io\",\"segment\",\"router\");\n \n foreach($auto_load as $library)\n {\n $this->$library=& load_class($library);\n }\n //load loader class\n $this->load =& load_class('Loader');\n \n //call auto load from config file\n $this->load->_auto_load();\n }", "public function __construct()\r\n {\r\n $configDir = ROOT . DS . \"config\" . DS;\r\n \r\n foreach(glob($configDir . \"*.php\") as $file)\r\n {\r\n $pathInfo = pathinfo($file);\r\n $GLOBALS[$pathInfo[\"filename\"]] = require($file);\r\n }\r\n\r\n // Include all PHP files from the config dir\r\n $libsDir = ROOT . DS . \"core\" . DS . \"utilities\" . DS . \"libs\" . DS . \"jwt\" . DS;\r\n \r\n foreach(glob($libsDir . \"*.php\") as $file)\r\n {\r\n ///echo $file.\"<br>\";\r\n $pathInfo = pathinfo($file);\r\n require($file);\r\n }\r\n \r\n spl_autoload_register(array($this, \"load\"));\r\n }", "public static function autoload($className) {\n\t\t\n\t\t//for namespaces\n//\t\t$className = str_replace('\\\\', '_', $className);\n\t\t\n\t\t//Sometimes there's a leading \\ in the $className and sometimes not.\n\t\t//Might not be true for all php versions.\t\t\n\t\t$className = ltrim($className, '\\\\');\n\t\t\t\n\t\tif(isset(self::$_classes[$className])){\n\t\t\t//don't use \\GO::config()->root_path here because it might not be autoloaded yet causing an infite loop.\n\t\t\trequire(dirname(dirname(__FILE__)) . '/'.self::$_classes[$className]);\n\t\t}else\n\t\t{\n//\t\t\techo \"Autoloading: \".$className.\"\\n\";\n\t\t\t\n\t\t\t$filePath = false;\n\n\t\t\tif(substr($className,0,7)=='GO\\\\Base'){\n\t\t\t\t$arr = explode('\\\\', $className);\n\t\t\t\t$file = array_pop($arr).'.php';\n\n\t\t\t\t$path = strtolower(implode('/', $arr));\n\t\t\t\t$location =$path.'/'.$file;\n\t\t\t\t$filePath = dirname(dirname(__FILE__)) . '/'.$location;\n\t\t\t} else if(substr($className,0,4)=='GOFS'){\n\t\t\t\t\t\t\n\t\t\t\t$arr = explode('\\\\', $className);\n\t\t\t\t\n\t\t\t\tarray_shift($arr);\n\t\t\t\t\n\t\t\t\t$file = array_pop($arr).'.php';\n\t\t\t\t$path = strtolower(implode('/', $arr));\n\t\t\t\t$location =$path.'/'.$file;\n\t\t\t\t$filePath = \\GO::config()->file_storage_path.'php/'.$location;\t\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t//$orgClassName = $className;\n\t\t\t\t$forGO = substr($className,0,3)=='GO\\\\';\n\n\t\t\t\tif ($forGO)\n\t\t\t\t{\n\t\t\t\t\t$arr = explode('\\\\', $className);\n\n\t\t\t\t\t//remove GO_\n\t\t\t\t\tarray_shift($arr);\n\n\t\t\t\t\t$module = strtolower(array_shift($arr));\n\n\t\t\t\t\tif($module!='core'){\n\t\t\t\t\t\t//$file = self::modules()->$module->path; //doesn't play nice with objects in the session and autoloading\n\t\t\t\t\t\t$file = 'modules/'.$module.'/';\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\t$file = \"\";\n\t\t\t\t\t}\n\t\t\t\t\tfor($i=0,$c=count($arr);$i<$c;$i++){\n\t\t\t\t\t\tif($i==$c-1){\n\t\t\t\t\t\t\t$file .= ucfirst($arr[$i]);\n\t\t\t\t\t\t\t$file .='.php';\n\t\t\t\t\t\t}else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$file .= strtolower($arr[$i]).'/';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$filePath = \\go\\core\\Environment::get()->getInstallFolder()->getPath() .'/' . $file;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\n\t\t\tif(strpos($filePath, '..')!==false){\n\t\t\t\techo \"Invalid PHP file autoloaded!\";\n\t\t\t\tthrow new \\Exception(\"Invalid PHP file autoloaded!\");\n\t\t\t}\n\n\t\t\tif(!is_file($filePath)){\n\t\t\t\t//throw new \\Exception('Class '.$orgClassName.' not found! ('.$file.')');\n\t\t\t\treturn false;\n\t\t\t}else\n\t\t\t{\n\t\t\t\trequire($filePath);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}", "function loader($class){\n $class_file = DIR. DS . $class . '.php';\n\n if(file_exists($class_file)){\n require_once($class_file);\n }else{\n foreach (AUTOLOAD_CLASSES as $path){\n $class_file = $path . DS . $class . '.php';\n if(file_exists($class_file)) require_once($class_file);\n }\n }\n}", "function __autoload($class_name)\n{\n\tif (strrpos($class_name, 'Zend') !== false) {\n require_once ROOT_PATH . 'include/lib/' . str_replace('_', '/', $class_name) . '.php';\n\t} else\n if (strrpos($class_name, 'Thef') !== false) {\n require_once ROOT_PATH . 'logic/thef/' . $class_name . '.php';\n } else\n\tif (strrpos($class_name, 'TplFrt') !== false) {\n require_once ROOT_PATH . 'html_logic/frontend/' . $class_name . '.php';\n } else\n\tif (strrpos($class_name, 'TplBck') !== false) {\n require_once ROOT_PATH . 'html_logic/backend/' . $class_name . '.php';\n } else\n\tif (strrpos($class_name, 'DbaFrt') !== false) {\n require_once ROOT_PATH . 'logic/frontend/' . $class_name . '.php';\n } else\n\tif (strrpos($class_name, 'DbaBck') !== false) {\n require_once ROOT_PATH . 'logic/backend/' . $class_name . '.php';\n } else {\n\t\trequire_once ROOT_PATH . 'logic/' . $class_name . '.php';\n\t}\n}", "function import_classes(){\n\t\n\tclass_exists('Database') || require('classes/class.Database.php');\n\tclass_exists('Response') || require('classes/class.Response.php');\n\tclass_exists('User') || require('classes/class.User.php');\n\tclass_exists('GUI') || require('classes/class.GUI.php');\n\tclass_exists('FileItem') || require('classes/class.FileItem.php');\n\tclass_exists('Comment') || require('classes/class.Comment.php');\n\tclass_exists('MLLib') || require('classes/class.MLLib.php');\n}", "function __autoload($class_name) {\n include 'classes/' . $class_name . '.php';\n}", "function myLoad($className){\n\t$path = MYPHP_SOURCE.'/'.str_replace('\\\\', '/', $className).'.class.php';\n\tif(file_exists($path)){\n\t\trequire_once $path;\n\t}\n}", "public function autoload($class) {\n if (isset(static::$map[$class])){\n $pathInfo = static::$map[$class];\n Yaf_Loader::import(sprintf('%s%s',$pathInfo[0], $pathInfo[1]));\n } else if (strpos($class, 'Builder') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/views/builder/%s.php', APPLICATION_PATH, $class));\n } else if (strpos($class, 'Pagelet') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/pagelets/%s.php', APPLICATION_PATH, $class));\n } else if (strpos($class, 'Halo') === 0){\n Yaf_Loader::import(sprintf('%s/halo/%s.php',LIB_PATH,$class));\n } else if (strpos($class, 'Util') == strlen($class) - 4 || strpos($class, 'Utils') == strlen($class) - 5){\n Yaf_Loader::import(sprintf('%s/utils/%s.php',LIB_PATH,$class));\n } else if (strpos($class, 'Model') === strlen($class) - 5){\n Yaf_Loader::import(sprintf('%s/application/models/%s.php',APPLICATION_PATH,$class));\n } else if (strpos($class, 'Service') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/service/%s.php',APPLICATION_PATH,$class));\n } else if (strpos($class, 'HTMLPurifier') !== false){\n Yaf_Loader::import(sprintf('%s/htmlpurifier/HTMLPurifier.safe-includes.php',LIB_PATH));\n }else if (strpos($class, 'Api') === strlen($class) - 3){\n Yaf_Loader::import(sprintf('%s/application/Api/%s.php',APPLICATION_PATH,$class));\n }else if (strpos($class, 'Object') === strlen($class) - 6){\n Yaf_Loader::import(sprintf('%s/application/objects/%s.php',APPLICATION_PATH,$class));\n }else if (strpos($class, 'MemCache') === 0){\n// var_dump('================');\n// /Users/worker/php/wk/wcontact_cache/lib/wcontact/MemCacheBase.php\n Yaf_Loader::import(sprintf('%s/wzhaopin/%s.php',LIB_PATH, $class));\n }\n }", "public static function registerAutoloader()\n\t{\n\t\tspl_autoload_register(__NAMESPACE__.'\\\\Core::autoload');\n\t}", "function __autoload($class_name) {\n include '../class/' . $class_name . '.php';\n}", "function __autoload($class_name) {\n include '../class/' . $class_name . '.php';\n}", "public function load(): void\n {\n $requested = 0;\n $loaded = 0;\n foreach ($this->storage->loadClassList() as $class) {\n ++$requested;\n if ($this->accept($class) && !class_exists($class, false)) {\n ++$loaded;\n if ($this->verbose) {\n echo \"[Preloader] Loading {$class}\" . PHP_EOL;\n }\n class_exists($class, true);\n }\n }\n\n if ($this->verbose) {\n echo \"[Preloader] Preloaded {$loaded}/{$requested} classes\" . PHP_EOL;\n }\n }", "public static function init() {\n\t\tcore::loadClass(\"database\");\n\n\t\t/* Child tables */\n\t\tcore::loadClass(\"doorkey_model\");\n\t\tcore::loadClass(\"key_history_model\");\n\t}", "function __autoload($nomeClasse)\n{\n include_once './classes/' . $nomeClasse . '.class.php';\n}", "public function loadInit() {}", "public static function loadAll();", "public function __construct() {\n\t\tset_include_path(get_include_path().PATH_SEPARATOR.CLASS_DIR);\n\n\t\t// You can use this trick to make autoloader look for commonly used filenames\n\t\tspl_autoload_extensions('.php');\n\n\t\t// Use default autoload implementation\n\t\tspl_autoload_register( function($className) {\n\t\t\techo 'Trying to load '. $className .' via '. __METHOD__ .\"()\\n\";\n \tinclude $className . '.php';\n\t\t});\n\t}", "function __autoload($className)\r\n{\r\n require_once $className . '.php';\r\n}", "public function testLoadclassNamespaceMixed()\r\n {\r\n Web2All_Manager_Main::unregisterIncludeRoot(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR);\r\n Web2All_Manager_Main::loadClass('Web2All\\\\Manager\\\\ClassLoaderTest_F');\r\n $this->assertFalse(class_exists('Web2All\\\\Manager\\\\ClassLoaderTest_F', false));\r\n Web2All_Manager_Main::registerIncludeRoot(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR);\r\n Web2All_Manager_Main::loadClass('Web2All\\\\Manager\\\\ClassLoaderTest_F');\r\n $this->assertTrue(class_exists('Web2All\\\\Manager\\\\ClassLoaderTest_F', false));\r\n }" ]
[ "0.78886384", "0.74368006", "0.7236141", "0.7230211", "0.71069735", "0.7071298", "0.70692074", "0.7036053", "0.6996384", "0.6929936", "0.6881678", "0.687795", "0.6813528", "0.68101895", "0.67888033", "0.6780812", "0.67777777", "0.6765415", "0.6741987", "0.673613", "0.6727286", "0.67146057", "0.67051584", "0.67010635", "0.6670042", "0.666578", "0.6659575", "0.66580254", "0.66300875", "0.6612537", "0.6568", "0.6538911", "0.65355116", "0.6522312", "0.6508486", "0.6504767", "0.6500372", "0.649404", "0.64866215", "0.6480925", "0.64759314", "0.6470489", "0.64680654", "0.64638263", "0.64598244", "0.6456165", "0.6454489", "0.64416385", "0.643252", "0.64083123", "0.6407199", "0.6405386", "0.6404527", "0.64028716", "0.63952774", "0.63947237", "0.6390773", "0.63888454", "0.63856107", "0.6373595", "0.637159", "0.63714105", "0.6361804", "0.6358143", "0.63425696", "0.63259417", "0.63252306", "0.63209707", "0.63059664", "0.63006717", "0.6300598", "0.63002735", "0.62994534", "0.62968737", "0.6294123", "0.6292702", "0.62824446", "0.6281477", "0.6280607", "0.6275162", "0.62748337", "0.62659246", "0.6264918", "0.6262738", "0.6262103", "0.62573063", "0.62431914", "0.6231718", "0.6228693", "0.6228091", "0.6225509", "0.6225509", "0.6220799", "0.6218615", "0.62164253", "0.6212387", "0.6211219", "0.6209521", "0.6201957", "0.61980826" ]
0.84678334
0
Get an asset by its path
Получить актив по его пути
public static function path($path) { return Assets::all()->filter(function ($asset) use ($path) { return $asset->resolvedPath() === $path; })->first(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAsset($key, $path = null) {\n if (isset($path))\n return $this->m->Assets->getAsset($key, $path);\n return $this->info->getAsset($this->m->Assets, $key);\n }", "static function asset($path)\n {\n return Assets::src($path);\n }", "public function asset(string $path)\n {\n $filename = basename($path);\n $assetsFile = configFileSystem::getSiteRoot() . '/public/assets.json';\n if (!file_exists($assetsFile)) {\n return $path; \n }\n\n $fileParts = explode('.', $filename);\n $jsonFile = json_decode(file_get_contents($assetsFile), true);\n\n if (!array_key_exists($fileParts[0], $jsonFile)) {\n return $path; \n }\n\n if (!array_key_exists($fileParts[1], $jsonFile[$fileParts[0]])) {\n return $path; \n }\n\n return $jsonFile[$fileParts[0]][$fileParts[1]];\n }", "public function getAsset($asset)\n {\n $result = $this->newAPIRequest('GET', '/assets/'.$asset);\n return $result;\n }", "public function getAsset(string $path): string\n {\n if (!empty($path)) {\n $paths = explode('/', $path);\n\n $type = !empty($paths[0]) ? $paths[0] : '';\n $asset = !empty($paths[1]) ? $paths[1] : '';\n\n if (!empty($type) && !empty($asset)) {\n return (string) $this->dependencies[$type][$asset];\n }\n\n if (!empty($type)) {\n return (string) $this->dependencies[$type];\n }\n }\n\n return '';\n }", "public function getAsset(Component $component, $asset) {}", "function asset( $path ) {\n\n\t\tif ( ! $this->mix ) {\n\t\t\t$file = $this->path( 'public/mix-manifest.json' );\n\t\t\t$this->mix = (array) json_decode( file_get_contents( $file ), true );\n\t\t}\n\n\t\t// Make sure to trim any slashes from the front of the path.\n\t\t$path = '/' . ltrim( $path, '/' );\n\n\t\tif ( $this->mix && isset( $this->mix[ $path ] ) ) {\n\t\t\t$path = $this->mix[ $path ];\n\t\t}\n\n\t\treturn $this->uri( 'public' . $path );\n\t}", "public function Asset($params)\n {\n if (gettype($params) == \"string\") {\n $params = [$params];\n }\n $filename = $params[0];\n $Link = $this->_machine->plugin(\"Link\");\n return $Link->Get($this->_prefixDir . \"/assets/\" . $filename);\n }", "function asset( string $asset, ?string $path = null ): string\n {\n return Asset::url( $asset, $path );\n }", "public function getAsset($id)\n\t{\n\t\treturn $this->getResourceChildObject('assets', $id);\n\t}", "public function get($path);", "public function get($path);", "public function get($path)\n {\n if ($this->check($path)) return File::get($path);\n }", "private function getBuilderAsset($path)\n {\n return Storage::disk('builder')->get($path);\n }", "public function getAsset()\n {\n if ($this->asset === null) {\n $this->asset = AssetFacade::find($this->getAssetId());\n }\n\n return $this->asset;\n }", "public static function getAsset() {\n if (Asset::$asset == null) {\n Asset::$asset = new Asset();\n }\n return Asset::$asset;\n }", "function asset($path) {\n echo getAbsolutePath() . \"public/$path\";\n}", "function getAssets();", "protected function parseAsset($asset_path) {\n $absolute_path = $this->getAbsolutePath($asset_path);\n\n #i:::: Check for HttpAsset\n if (starts_with($asset_path, 'http://')) {\n return new HttpAsset($asset_path);\n\n #i:::: Check for GlobAsset\n }else if (str_contains($asset_path, array('*', '?'))) {\n return new GlobAsset($absolute_path);\n\n #i:::: Check for FileAsset\n }else if( $this->getAbsolutePath($asset_path, true) ){\n #i: Return if path exist\n return new FileAsset($absolute_path);\n\n }else{\n return null;\n }\n }", "function _asset($path, $secure = null)\n {\n\n if(env('APP_ASSETS') == 'local'){\n return app('url')->asset($path, $secure);\n } else {\n return app('url')->asset(\"public/\".$path, $secure);\n }\n }", "public function getAssets();", "public function getAssets();", "public function getAssetById($id)\n\t{\n\t\treturn craft()->elements->getElementById($id, ElementType::Asset);\n\t}", "function asset($path = '')\n {\n \treturn (!empty($path)) ? BASE_URL . $path : BASE_URL ; \n }", "public function get_asset($id, $private = FALSE, $queryargs = array()) {\n return $this->get_item_of_type($id, 'asset', $private, $queryargs);\n }", "public function getAsset($type, $name)\n {\n return sprintf(\"%s/%s\", $this->$type, $name);\n }", "function cdn_asset(string $path)\n {\n return \\App\\Utils::cdnAsset($path);\n }", "public function getFile($path)\n {\n return $this->files[$path];\n }", "public function assetPath($path = '')\n\t{\n\t\treturn $this['path.asset'].ltrim($path, '/');\n\t}", "abstract public function getSingle(string $path);", "public function createAsset($path)\n\t{\n\t\treturn new Asset($path, $this->app);\n\t}", "private function getAssetVersion($path)\n {\n // @see https://knpuniversity.com/screencast/gulp/version-cache-busting#comment-2884388919\n if (count($this->paths) === 0) {\n $this->loadManifestFile();\n }\n\n if (isset($this->paths[$path])) {\n return $this->paths[$path];\n }\n\n // If a file exists, it doesn't have a version so we ignore it\n if (!file_exists($this->kernelRootDir.'/../web/'.$path)) {\n throw new Exception(sprintf('The file \"%s\" does not exist and there is no version file for it', $path));\n }\n\n return $path;\n }", "function assets_url($path='') {\n\t\tif (substr($path, 0) == '/') {\n\t\t\treturn base_url().\"assets\".$path;\n\t\t} else {\n\t\t\treturn base_url().\"assets/\".$path;\n\t\t}\n\t}", "public function get(string $path): mixed;", "public function getAsset($id) {\n try {\n $objAsset = new Base_Model_ObtorLib_App_Core_Asset_Dao_Asset();\n $asset = $objAsset->getAsset($id);\n return $asset;\n } catch (Exception $e) {\n throw new Base_Model_ObtorLib_App_Core_Asset_Exception($e);\n }\n }", "public function get(string $path): Promise;", "public function getAsset()\n {\n return $this->hasOne(Asset::className(), ['id' => 'asset_id']);\n }", "public function resolveAssetPath($url);", "public function assets($path = null, $default = [])\n {\n static $manifest = null;\n\n if (is_null($manifest)) {\n $manifest = (new Support\\Manifest)->get();\n }\n\n return is_null($path) ? $manifest : Arr::get($manifest, $path, $default);\n }", "public static function cloudAsset($path)\n {\n return asset('app/cloud/public/' . $path);\n }", "function asset($name = null)\n {\n $document = explode('/', rtrim(app('http.request')->uri, \"/\"));\n $document = end($document);\n\n $defaultPath = $document === 'public' ? 'assets/' : 'public/assets/';\n\n $packpage = new \\Anonym\\Assets\\VersionPackpage('', '%f', $defaultPath);\n return $name !== null ? $packpage->getUrl($name) : $defaultPath;\n }", "public function setPath(string $path): AssetInterface\n {\n }", "public static function asset(string $path): string\n {\n /*\n to DOOOO\n viewNamespaceToPath => /images/prova.png\n viewNamespaceToDir => c:\\var\\wwww\\test\\images\\prova.png\n viewNamespaceToAsset => http://example.com/images/prova.png\n */\n // dddx(\\Module::asset('blog:img/logo.img')); //localhost/modules/blog/img/logo.img\n\n if (Str::startsWith($path, 'https://')) {\n return $path;\n }\n if (Str::startsWith($path, 'http://')) {\n return $path;\n }\n\n if (File::exists(public_path($path))) {\n return $path;\n }\n\n if (Str::startsWith($path, '/theme/pub')) {\n $path = 'pub_theme::'.Str::after($path, '/theme/pub');\n }\n\n if (Str::startsWith($path, 'theme/pub')) {\n $path = 'pub_theme::'.Str::after($path, 'theme/pub');\n }\n\n $ns = Str::before($path, '::');\n $ns_after = Str::after($path, '::');\n if ($ns === $path) {\n $ns = inAdmin() ? 'adm_theme' : 'pub_theme';\n }\n\n $ns_after0 = Str::before($ns_after, '/');\n $ns_after1 = Str::after($ns_after, '/');\n $ns_after = str_replace('.', '/', $ns_after0).'/'.$ns_after1;\n\n if (Str::startsWith($ns_after, '/')) {\n $ns_after = Str::after($ns_after, '/');\n }\n if (\\in_array($ns, ['pub_theme', 'adm_theme'], true)) {\n $theme = config('xra.'.$ns);\n\n $filename_from = self::fixPath(base_path('Themes/'.$theme.'/Resources/'.$ns_after));\n // $filename_from = Str::replace('/Resources//', '/Resources/', $filename_from);\n $asset = 'themes/'.$theme.'/'.$ns_after;\n $filename_to = self::fixPath(public_path($asset));\n $asset = Str::replace(url(''), '', asset($asset));\n\n if (! File::exists($filename_to)) {\n if (! File::exists(\\dirname($filename_to))) {\n File::makeDirectory(\\dirname($filename_to), 0755, true, true);\n }\n try {\n File::copy($filename_from, $filename_to);\n } catch (\\Exception $e) {\n throw new \\Exception('message:['.$e->getMessage().']\n path :['.$path.']\n file from ['.$filename_from.']\n file to ['.$filename_to.']');\n }\n }\n Assert::string($asset, 'wip');\n\n return $asset;\n }\n\n $module_path = Module::getModulePath($ns);\n if (Str::endsWith($module_path, '/')) {\n $module_path = Str::beforeLast($module_path, '/');\n }\n $filename_from = self::fixPath($module_path.'/Resources/'.$ns_after);\n $asset = 'assets/'.$ns.'/'.$ns_after;\n $filename_to = self::fixPath(public_path($asset));\n $asset = Str::replace(url(''), '', asset($asset));\n if (! File::exists($filename_from)) {\n throw new \\Exception('file ['.$filename_from.'] not Exists , path ['.$path.']');\n }\n\n // dddx(app()->environment());// local\n if (! File::exists($filename_to) || 'production' !== app()->environment()) {\n if (! File::exists(\\dirname($filename_to))) {\n File::makeDirectory(\\dirname($filename_to), 0755, true, true);\n }\n // 105 If condition is always true.\n // if (File::exists($filename_from)) {\n File::copy($filename_from, $filename_to);\n // }\n }\n Assert::string($asset, 'wip');\n\n return $asset;\n\n // return asset(self::viewNamespaceToAsset($path));\n }", "public function getAsset()\n {\n return $this->hasOne(Asset::className(), ['asset_id' => 'asset_id']);\n }", "function admin_asset(string $path = ''): string\n {\n return Admin::app()->asset($path);\n }", "function asset($asset)\n{\n return ASSET_PREFIX . '/'. $asset;\n}", "public function getByPath($path);", "protected function _getAssetFile($url)\n {\n $parts = explode('/', $url);\n $pluginPart = [];\n for ($i = 0; $i < 2; $i++) {\n if (!isset($parts[$i])) {\n break;\n }\n $pluginPart[] = Inflector::camelize($parts[$i]);\n $plugin = implode('/', $pluginPart);\n $pos = strlen('Wasabi');\n if (strpos($plugin, 'Wasabi') !== false && strpos($plugin, '/') === false && (strlen($plugin) > $pos)) {\n $plugin = join('/', [\n substr($plugin, 0, $pos),\n substr($plugin, $pos)\n ]);\n }\n if ($plugin && Plugin::loaded($plugin)) {\n $parts = array_slice($parts, $i + 1);\n $fileFragment = implode(DS, $parts);\n $pluginWebroot = Plugin::path($plugin) . 'src' . DS . 'Assets' . DS;\n return $pluginWebroot . $fileFragment;\n }\n }\n }", "public static function getByPath($path) {}", "public function get($path) {\n\t\treturn $this->cache[$path] ?? null;\n\t}", "public function asset($asset = null)\n {\n if (! file_exists($manifest = $this->path . 'public/mix-manifest.json')) {\n return $this->uri . $asset;\n }\n\n $manifest = json_decode(file_get_contents($manifest), true);\n\n return $this->uri . ($manifest[$asset] ?? $asset);\n }", "public function getAsset()\r\n\t{\r\n\t\treturn Yii::app()->assetManager->publish(YiiBase::getPathOfAlias('application.modules.dashboard.assets'), true, -1, YII_DEBUG);\r\n\t}", "function getFileFromStorage($fullpath, $storage = 'public')\n{\n if ($storage == 'storage') {\n return route('read_file', $fullpath);\n }\n return my_asset($fullpath);\n}", "public static function assets($path)\n {\n $di = new self;\n $theme = $di->getDI()->getConfig()->theme;\n\n return '/content/themes/' . $theme . '/assets/' . $path;\n }", "public function get ($path)\n {\n $path = $this->_parsePath ($path);\n return $this->_get ($path);\n }", "public function asset($asset, $secure = false)\n {\n $basePath = $this->config->get('theme.paths.base');\n $assetPath = $this->config->get('theme.paths.assets');\n $fullPath = $basePath.'/'.$this->getActive().'/'.$assetPath.'/'.$asset;\n\n if($secure){\n return secure_asset($fullPath);\n }\n return asset($fullPath);\n }", "function assets_url( $path = '' ) {\n\n\treturn home_url( 'Cece/Assets/' . $path );\n\n}", "public function asset($asset = null)\n\t{\n\t\treturn rtrim($this->assetUrl,\"/\").($asset ? \"/\". trim($asset, '/') : '');\n\t}", "function asset_url( ?string $path = null ): string\n {\n return Asset::url( '/', $path );\n }", "function asset($url = '')\n{\n return ASSET . $url;\n}", "public static function apps_asset($path = Null)\n\t{\n\t\t$curr_apps\t= apps::getCurrent(\"current_apps\");\n\t\treturn self::getProtocol().self::asset().\"/$curr_apps\".($path?\"/\".$path:\"\");\n\t}", "public function getFile($path = '/'){\n\t\t$path = preg_replace($this->__config['pb.regexp.path'], '', $path);\n\n\t\tif ($path) $file = $this->__config['pb.contents.dir'].$path;\n\t\telse $file = $this->__config['pb.contents.dir'].'index';\n\t\t\n\t\tif (is_dir($file)) $file .= '/index';\n\t\t$file .= $this->__config['pb.contents.extension'];\n\n\t\tif (file_exists($file)) return $file;\n\t\treturn null;\n\t}", "function _asset_url(string $path = '') {\n\t\treturn asset(config('asset.directory')) . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n\t}", "public static function get($type, $file) {\n return \\theme\\DIR . \"/assets/${type}/${file}.${type}\";\n }", "public function file($path) {\n return exists($path) ? file($path) : null;\n }", "public function findByPath($path)\n {\n return $this->model->where('path', $path)->first();\n }", "public function getAssets()\n {\n\n }", "public function asset(string $path, bool $secure = null): string\n {\n return $this->url->asset($this->path($path), $secure);\n }", "static function getAssetFile($url) {\n\t\t$parts = explode('/', $url);\n\t\tif ($parts[0] === 'theme') {\n\t\t\t$themeName = $parts[1];\n\t\t\tunset($parts[0], $parts[1]);\n\t\t\t$fileFragment = urldecode(implode(DS, $parts));\n\t\t\t$path = App::themePath($themeName) . 'webroot';\n\t\t\treturn array($path, $fileFragment);\n\t\t}\n\n\t\t$plugin = Inflector::camelize($parts[0]);\n\t\tif (CakePlugin::loaded($plugin)) {\n\t\t\tunset($parts[0]);\n\t\t\t$fileFragment = urldecode(implode(DS, $parts));\n\t\t\t$pluginWebroot = CakePlugin::path($plugin) . 'webroot';\n\t\t\treturn array($pluginWebroot, $fileFragment);\n\t\t} else {\n\t\t\treturn array(WWW_ROOT, $_GET['f']);\n\t\t}\n\t}", "public function get($filepath);", "public static function img($path) {\n return get_template_directory_uri() . '/assets/img/' . $path;\n }", "public function get_remote_asset($id, $queryargs = array()) {\n return $this->get_item_of_type($id, 'remote-asset', $queryargs);\n }", "public function get()\n {\n $file_path = $this->path();\n\n if (Storage::exists($file_path)) {\n\n return Storage::get($file_path);\n\n }\n }", "function asset($name) {\n $url;\n\n if (config('mode') === 'development') {\n $url = config('asset_url') . $name;\n } else {\n $url = config('app_url') . $name;\n }\n\n return $url;\n}", "public function getUrl(string $path): string;", "public static function assets(){\n return self::adapterURI().\"assets/\";\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 }", "private function _get_cached_asset($type, $assets, $extension)\n\t{\n\t\t$asset_dir = $this->_get_asset_type_dir($type);\n\t\t\n\t\t$filemtime = 0;\n\t\t\n\t\tforeach($assets as $asset_name)\n\t\t{\n\t\t\t$asset_file = $this->_get_view_path() . $asset_dir . $asset_name . $extension;\n\t\t\t\n\t\t\tif(file_exists($asset_file))\n\t\t\t{\n\t\t\t\t$asset_filemtime = filemtime($asset_file);\n\t\t\t\t\n\t\t\t\tif($asset_filemtime > $filemtime)\n\t\t\t\t{\n\t\t\t\t\t$filemtime = $asset_filemtime;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$cache = $this->_get_cached_asset_filename($type, $assets, $extension);\n\t\t\n\t\tif(file_exists($cache))\n\t\t{\n\t\t\t$cachemtime = filemtime($cache);\n\t\t\t\n\t\t\tif($cachemtime > $filemtime)\n\t\t\t{\n\t\t\t\treturn file_get_contents($cache);\n\t\t\t}\n\t\t\t\n\t\t\tif(!unlink($cache))\n\t\t\t{\n\t\t\t\tlog_message('error', \"Could not delete cache file \\\"$cache\\\" - check permissions on the cache directory\");\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "function shop_asset($path, $secure = null)\n {\n $path = 'vendor/sunrise/laravel-wap-shop/' . $path;\n return app('url')->asset($path, $secure);\n }", "public function get($path, $lock = false)\n {\n if ($this->exists($path)) {\n return $this->files[$path];\n }\n\n throw new FileNotFoundException(\"File does not exist at path {$path}.\");\n }", "function assetku($path, $secure = null)\n {\n return app('url')->asset('public/' . $path, $secure);\n }", "public static function get_asset_path(): string {\n\t\treturn plugin_dir_url( dirname( __DIR__ ) );\n\t}", "public function resolveResource($path);", "function load_asset($assetUrl)\n {\n return (env('APP_ENV') == 'PRODUCTION') ? secure_asset($assetUrl) : asset($assetUrl);\n }", "protected function getImage($path)\n {\n $images = $this->config->getImages();\n return $this->getUrl($images.$path);\n }", "function _asset($path, $secure = null)\n {\n if (! app()->environment('production')) {\n if (app()->environment('development')) {\n $path = 'assets/'.$path;\n }\n\n return asset($path, $secure);\n }\n\n return implode('/', [\n config('infoexam.static_url'),\n 'assets',\n json_decode(File::get(base_path('composer.json'), true), true)['version'],\n $path,\n ]);\n }", "public static function get($_path)\r\n {\r\n if($this->isFile($_path))\r\n {\r\n return file_get_contents($_path);\r\n }\r\n }", "public function getPath($path);", "public function asset(): string\n {\n if (is_null($this->rootPath)) {\n\n $partials = explode('/', $this->fullPath);\n\n return array_pop($partials);\n\n }\n\n return substr($this->fullPath, strlen(rtrim($this->rootPath, '/')) + 1);\n }", "public function assets()\r\n {\r\n return $this->httpRequest(\"v2/assets\");\r\n }", "public function getItemFromPath($givenItemPath);", "public function assetPath($asset) {\n\t\treturn self::$config['APP_ROOT'] . self::$config['ASSETS_DIR'] . $asset;\n\t}", "protected function getScript($path)\n {\n try {\n return Storage::get($path);\n }\n // Handle file not found exception.\n catch (FileNotFoundException $e) {\n $path = storage_path($e->getMessage());\n throw new Exception(\"File {$path} could not be found.\");\n }\n }", "public function getAssets($assets)\n {\n $result = $this->newAPIRequest('GET', '/assets', ['assets' => implode(',', $assets)]);\n return $result;\n }", "function get_static_asset($file = NULL, $type)\n {\n if (!is_null($file) && $file !== '') {\n return STATIC_ASSETS_PATH.($type.$file);\n }\n\n return NULL;\n }", "public function getPathAssets($append = ''){\n\t\treturn $this->paths['assets'].$append;\n\t}", "public function getSrc();", "function get_assets_path() {\n return \"http://\" . $_SERVER['HTTP_HOST'] . '/' . ROOT_PATH . '/assets/';\n }", "public function asset_handle($path) {\n return $this->plugin_slug . '-' . preg_replace(array('/\\.[^.]*$/', '/[^a-z0-9]/i'), array('', '-'), strtolower($path));\n }", "function my_asset($path = null)\n{\n return route('homepage') . env('ASSET_URL') . '/' . $path;\n}" ]
[ "0.783336", "0.728482", "0.7275394", "0.71702605", "0.70674044", "0.6842171", "0.67996275", "0.66976744", "0.66391087", "0.6557754", "0.651351", "0.651351", "0.6472198", "0.6446784", "0.6430077", "0.6422105", "0.6416686", "0.6400945", "0.6394981", "0.6370265", "0.63701123", "0.63701123", "0.6345266", "0.6275297", "0.6236403", "0.6230329", "0.61768526", "0.61573124", "0.61513084", "0.61110413", "0.6109152", "0.6097639", "0.60854363", "0.60730374", "0.60598755", "0.6057869", "0.60553974", "0.6050668", "0.6038448", "0.60183907", "0.6010487", "0.5977114", "0.59644747", "0.5964248", "0.5961199", "0.5960154", "0.5954785", "0.59095645", "0.5898332", "0.58891267", "0.5888662", "0.5881708", "0.5880675", "0.5879723", "0.5862492", "0.5840994", "0.58347374", "0.5816216", "0.5815604", "0.5812619", "0.5811228", "0.5775357", "0.5752631", "0.5750099", "0.5733191", "0.5731118", "0.57302356", "0.5728434", "0.5700655", "0.5700335", "0.5685814", "0.56839806", "0.5682973", "0.5679224", "0.5673658", "0.56664956", "0.565148", "0.5635794", "0.5635537", "0.56196517", "0.5616069", "0.56152123", "0.5606439", "0.56018347", "0.56003386", "0.5597272", "0.5592122", "0.55908954", "0.55844456", "0.5576545", "0.5570848", "0.5570773", "0.5562709", "0.55606675", "0.55411327", "0.55307055", "0.5525188", "0.55212784", "0.55162257", "0.5515939" ]
0.7417017
1
Lists all Examination models.
Список всех моделей Examination.
public function actionIndex() { $userId = Yii::$app->user->id; $searchModel = new ExaminationSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); $dataProvider->query->AndWhere(['user_id' => $userId]); $dataProvider->query->orderBy('create_at DESC'); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n\t{\n\t\t$exams = Exam::with('course')->get(['id', 'name', 'type', 'course_id', 'class', 'campus_id', 'created_at']);\n\n\t\tforeach ($exams as $value) {\n\t\t\t$value['campus'] = Campus::find($value['campus_id'])->title;\n\t\t}\n\t\treturn $exams;\n\t}", "public function index()\n\t{\n\t\t$exampaths = ExamPath::all();\n\n\t\treturn View::make('exampaths.index', compact('exampaths'));\n\t}", "public function index()\n {\n $lists = ExamList::select('id', 'name', 'remarks')\n ->where('status', 1)->get();\n\n return view('exam::list.index', compact('lists'));\n }", "public function index() {\n\t\t$expence_management = ExpenceManagement::query()\n\t\t\t->leftjoin('users as users', 'users.id', '=', 'expence_managements.created_by')\n\t\t\t->orderBy('expence_managements.id', 'ASC')\n\t\t\t->where('expence_managements.deletion_status', 0)\n\t\t\t->get([\n\t\t\t\t'expence_managements.*',\n\t\t\t\t'users.name',\n\t\t\t])\n\t\t\t->toArray();\n\n\t\t$employees = User::where('deletion_status', 0)\n\t\t\t->where('access_label', '>=', 2)\n\t\t\t->where('access_label', '<=', 3)\n\t\t\t->get(['name', 'id'])\n\t\t\t->toArray();\n\t\t//return dd($employees);\n\t\treturn view('administrator.hrm.expence.manage_expence', compact('expence_management', 'employees'));\n\t}", "public function actionIndex() {\n if (Yii::$app->user->can('school_exam')) {\n $searchModel = new SchoolExamMarksSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $classList = ArrayHelper::map(Classes::findAll(['is_active' => 'Y', 'is_deleted' => 'N']), 'id', 'name');\n $subclassList = ArrayHelper::map(Subclass::findAll(['is_active' => 'Y', 'is_deleted' => 'N']), 'id', 'sub_class');\n $semesterList = ArrayHelper::map(SchoolExamSemester::findAll(['is_active' => 'Y', 'is_deleted' => 'N']), 'id', 'semester');\n $divisionList = ArrayHelper::map(Division::findAll(['is_deleted' => 'N', 'is_active' => 'Y']), 'id', 'division');\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'classList' => $classList,\n 'subclassList' => $subclassList,\n 'semesterList' => $semesterList,\n 'divisionList' => $divisionList,\n ]);\n } else {\n throw new ForbiddenHttpException;\n }\n }", "public function index(Request $request)\n {\n $exam = new Exam;\n $exam->setAttribute('exam_entity_id', $request->input('eei'));\n $exam->setAttribute('class_entity_id', $request->input('cei'));\n $exam->loadData();\n return view('dashboard.school.Exam.list', compact('exam'));\n }", "public function index()\n {\n return $this->model->all();\n }", "public function index()\n {\n return Employee::all();\n }", "public function index(){\n return $this->model->all();\n }", "public function index()\n {\n $exams = Exam::all();\n return view('admin.exam.index', compact('exams'));\n }", "public function getAllExaminations()\n {\n if (REQ::is('api/*'))\n return response()->json(['examinations' => Examination::all()], 200);\n return view('pages.exams',['Examinations'=>Examination::all(),'subjects'=>Subject::all(),'grades'=>Grade::all()]);\n }", "public function index()\n {\n $expences = Expence::orderBy('id', 'desc')->get();\n return view('bsd-admin.expences.index', compact('expences'));\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BackOfficebackBundle:Extraitnaissances')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function getModelsForIndex()\n {\n $models = [];\n $all_models = $this->getAllModels();\n\n foreach ($all_models as $model) {\n //parse model\n $pieces = explode('.', $model);\n if (count($pieces) != 2) {\n throw new Exception('Parse error in AppModelList');\n }\n //check form match\n $app_model = $pieces[1];\n $link = $this->convertModelToLink($app_model);\n\n // add to actions\n $models[$app_model]['GET'] = [\n [\n 'action' => 'index',\n 'description' => 'List & filter all ' . $app_model . ' resources.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link\n ],\n [\n 'action' => 'show',\n 'description' => 'Show the ' . $app_model . ' that has the matching {id} from the route.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link . '/{id}'\n ]\n ];\n }\n return $models;\n }", "public function index()\n {\n //\n return ExamenesClinicos::all();\n }", "public function index()\n {\n return $this->model->getAll();\n }", "public function index()\n {\n $exams=Exam::All();\n return view('admin.pages.exam.exam_details')->with('exams',$exams);\n }", "public function index()\n {\n $employees = Employee::all();\n $trainings = Training::all();\n\n return view('employee.index', compact(['employees','trainings']));\n }", "public function models()\n {\n $this->_display('models');\n }", "public function index()\n {\n if (! Gate::allows('exam_access')) {\n return abort(401);\n }\n\n\n if (request('show_deleted') == 1) {\n if (! Gate::allows('exam_delete')) {\n return abort(401);\n }\n $exams = Exam::onlyTrashed()->get();\n } else {\n $exams = Exam::all();\n }\n\n return view('admin.exams.index', compact('exams'));\n }", "public function getModels();", "public function getModels();", "public function index()\n {\n //\n $exams=Exam::all();\n return view('exams.index',compact('exams'));\n }", "public function actionIndex()\n {\n AllocationDetails::getExtCentres();\n $dataProvider = new ActiveDataProvider([\n 'query' => AllocationDetails::find(),\n 'pagination' => \n [\n 'pageSize' => 20,\n ],\n 'sort' => \n [\n 'defaultOrder' => \n [\n 'name' => SORT_ASC,\n ]\n ],\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index() {\n $empleados = $this->Empleados->find('all');\n $this->set(compact('empleados'));\n }", "public function list ()\n {\n $employees[\"data\"] = Employee::get();\n $employees['deleted'] = \"0\";\n\n return view(\"employee.list\", compact(\"employees\"));\n }", "function index(){\r\n \r\n $all = $this->model->selectAll();\r\n $this->data('all', $all);\r\n $this->loadView();\r\n }", "public function index()\n\t{\n\t\treturn $this->careers->findAll();\n\t}", "public function index()\n {\n return Api_Employees::all()->toArray(); \n }", "public function index()\n {\n $data = $this->model->all();\n return view('admin.backends.employee.index',compact('data'));\n }", "public function index()\n {\n $exams=Exam::all();\n return view('marksheet/index',compact('exams'));\n }", "public function viewallunitmodelsAction() {\n\n\t\t$model = new Unit_Model_UnitModel();\n\t\t$this->view->records = $model->fetchAll( 'name','ASC' );\n \n\t\tif( $this->view->records ) {\n $attached = $model->getAttachedModels();\n $this->view->attached = $attached;\n\t\t $this->view->paginator = $this->paginate( $this->view->records );\n }\n\t}", "public function index()\n {\n //\n $results = Result::orderBy('id', 'asc')->get();\n\n // load the view and pass the employees\n return $results;\n }", "public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n $config->setURL(self::BASE_URL.\"/models\");\n\n return $this->sendRequest($config);\n }", "private function getAllModels()\n {\n return (object)ModelRegistry::getAllObjects();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AcmeKindergartenBundle:AttendanceEmployed')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function actionIndex()\n {\n $searchModel = new EscaparateSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $master = MasterEducationType::paginate(7);\n\n return view('admin.master.education.index', compact('master'));\n }", "public function index()\n {\n return IdiomaEmpleado::all();\n }", "public function getAllModels()\n {\n try {\n return AppModelList::models();\n }\n catch (Throwable $t) {\n throw new Exception('Parse Error: AppModelList.php has been corrupted.');\n }\n }", "public function index()\n {\n $employees = Employee::get();\n return EmployeeResource::collection($employees);\n }", "public function index()\n {\n return $this->attendanceRepository->all();\n }", "public function actionIndex()\n {\n $searchModel = new ExhibitionHallSearch;\n $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n ]);\n }", "public function index()\n {\n return Model::all();\n }", "public function index()\n {\n return new EmployeeCollection(Employee::latest('id')->paginate(10));\n }", "public function index()\n {\n $employeeList = Employee::all();\n //$employeeList = DB::table('employees')->get();\n return view('employees.index', compact('employeeList'));\n }", "public function index()\n {\n $process = employ::select('*')->orderby('id','desc')->paginate(10);\n return view('employe.index',compact('process'));\n }", "public function indexAction()\n {\n $this->view->employees = Employees::find();\n }", "public function index()\n {\n //\n $experiences = Experience::all();\n return view('admin.experiences.index', compact('experiences'));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Employees::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index ()\n {\n $employees[\"data\"] = Employee::get();\n $employees['deleted'] = \"0\";\n\n return view(\"employee.list\", compact(\"employees\"));\n }", "public function index()\n {\n return $this->findModel()->toArray();\n }", "public function memployee_list()\n {\n $this->AdminAuthCheck();\n $all_employee= DB::table('tbl_employee')\n\t\t\t\t\t\t\t\t->join('tbl_grade','tbl_employee.grade_id','=','tbl_grade.grade_id')\n ->get();\n return view('manager.employee_list',compact('all_employee'));\n }", "public static function DisplayAll() {\n\t\t\t\n\t\t\t$sql = \"SELECT * FROM employees \";\n\t\t\t$statement = Database::$db->prepare($sql);\n\t\t\t$statement->execute();\n\t\t\t$employees = [];\n\t\t\twhile($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t$employees[] = new Employee($row['Code']);\n\t\t\t}\n\t\t\treturn $employees;\n\t\t}", "public function index()\n {\n return view(\"teacher.pages.exam-types.index\", [\n \"examTypes\" => ExamType::all()\n ]);\n }", "public function indexModel(){\n $this->model('auditor/indexModel');\n \n $this->model->load(); \n }", "public function index()\n {\n $employeelists = DB::table('employees')->get();\n\n return view('employees.index')->with('employeelists', $employeelists);\n }", "public function actionIndex()\n {\n \t$dataProvider = new ActiveDataProvider([\n \t\t'query' => \\restapi\\models\\Employe::find(),\n \t\t'pagination' => [\n \t\t\t'pageSize' => 15,\n \t\t]\n \t]);\n\n \treturn $dataProvider;\n }", "public function actionIndex()\n {\n $searchModel = new WpIschoolSafecardSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\t\t$column_arr = [\n \t'id',\n 'stuid',\n 'info',\n 'ctime:datetime',\n 'receivetime:datetime',\n ];\n if(\\yii::$app->request->get(\"type\") && \\yii::$app->request->get(\"type\") == \"export\")\n {\n \t$array_values = $searchModel->attributeLabels();\n \t$array_keys = array_keys($array_values);\n \t/*$all_data = \\yii\\helpers\\ArrayHelper::toArray($dataProvider->query->all(), [\n \t\t\t'backend\\models\\WpIschoolSchool' => $array_keys,\n \t]);*/\n \t\\moonland\\phpexcel\\Excel::export([\n \t\t\t'models' => $dataProvider->query->all(),\n \t\t\t'columns' => $column_arr,\n \t\t\t'headers' => $array_values,\n \t\t\t\"fileName\"=>\"safecard.xlsx\"\n \t]);\n }else \n {\n \t\treturn $this->render('index', [\n \t\t'searchModel' => $searchModel,\n \t\t'dataProvider' => $dataProvider,\n \t\t\t'columnsArray' => $column_arr\n \t\t]);\n }\n }", "public function all()\n {\n return $this->model->get();\n }", "public function actionIndex()\n {\n $searchModel = new EmployeSearch();\n $query = Employe::find()\n ->orderBy([\n 'created' => SORT_DESC\n ]);\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $query);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $Leaves = Leave::all();\n $employees = Employee::all();\n return view('admin.leave.index',compact('Leaves','employees'));\n }", "public function actionIndex()\n {\n $searchModel = new IhubAbsenceSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $employees = Employee::orderBy('id', 'asc')->get();\n\n return view('list.index', compact('employees'));\n }", "public function actionAll()\n {\n $model = new Masters();\n\n $comments = $model->getCommentsAll();\n $services = $model->getServices();\n $foto = $model->getFoto();\n $pagination = $model->getPagination(Yii::$app->params['mastersOnPage']);\n $masters = $model->getMastersPagination();\n\n return $this->render('index', [\n 'model' => $model,\n 'masters' => $masters,\n 'comments' => $comments,\n 'services' => $services,\n 'foto' => $foto,\n 'pagination' => $pagination,\n 'mastersOnPage' => Yii::$app->params['mastersOnPage'],\n 'pathToRoot' => Yii::$app->params->pathToRoot\n ]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n \t\n $entities = $em->getRepository('JobHubBundle:Experience')->findBy(array('candidat' => $this->getCurrentCandidat()));\n return array(\n 'entities' => $entities,\n );\n }", "public function index()\n {\n\n $employees = Employee::with('role')->get();\n\n return view('backend.hrm.employee.list', compact('employees'));\n\n }", "public function index()\n {\n $employees = Employee::get();\n $roles = Role::get();\n return view('employees.list', compact(['employees', 'roles']));\n }", "public function index()\n {\n $assessment = Assessment::all();\n return $assessment;\n }", "public function Listar(){\n $dica_saude = new Exame();\n\n //Chama o método para selecionar os registros\n return $dica_saude::Select();\n }", "public function exams()\n {\n return $this->hasMany(Exam::class, \"exam_type_id\", 'is');\n }", "public function getAll()\n\t{\n\t\t$args = array('order' => 't.id');\n \t$records = $this->record->findAll($args);\n \treturn $this->model->populateModels($records, 'id');\n\t}", "public function index()\n {\n $employees = $this->employee->all();\n\n return view('employee::admin.employees.index', compact('employees'));\n }", "public function index() {\n $data['manufacturers'] = Manufacturer::getManufacturers();\n return view('models.models')->with($data);\n }", "public function index()\n {\n $experience = Experience::orderBy('created_at', 'desc')->get();\n return view('admin.experiences.index')->withExperiences($experience); \n }", "public function examenes()\n {\n return $this->hasMany(SExamen::class);\n }", "public function actionIndex()\n {\n $searchModel = new MedicineSearch();\n $searchModel->IsDelete=0;\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex() {\n $model = Resume::model()->findAll();\n\n $model_extra = new ResumeExtra;\n $data_extra = $model_extra->model()->findAllByAttributes(array('user_id' => Yii::app()->user->id, 'resume_id' => $model[0]->id));\n\n $model_exper = new ResumeExper;\n $data_exper = $model_exper->model()->findAllByAttributes(array('user_id' => Yii::app()->user->id, 'resume_id' => $model[1]->id));\n\n $model_education = new ResumeEducation;\n $data_education = $model_education->model()->findAllByAttributes(array('user_id' => Yii::app()->user->id, 'resume_id' => $model[2]->id));\n\n $model_honor = new ResumeHonorAward;\n $data_honor = $model_honor->model()->findAllByAttributes(array('user_id' => Yii::app()->user->id, 'resume_id' => $model[3]->id));\n\n $model_skill = new ResumeSkill;\n $data_skill = $model_skill->model()->findAllByAttributes(array('user_id' => Yii::app()->user->id, 'resume_id' => $model[4]->id));\n\n $model_interest = new ResumeInterest;\n $data_interest = $model_interest->model()->findAllByAttributes(array('user_id' => Yii::app()->user->id, 'resume_id' => $model[5]->id));\n\n $model_favorite = new ResumeFavorite;\n $data_favorite = $model_favorite->model()->findAllByAttributes(array('user_id' => Yii::app()->user->id, 'resume_id' => $model[6]->id));\n\n $this->render('index', array(\n 'model' => $model,\n 'model_extra' => $model_extra,\n 'data_extra' => $data_extra,\n 'model_exper' => $model_exper,\n 'data_exper' => $data_exper,\n 'model_education' => $model_education,\n 'data_education' => $data_education,\n 'model_honor' => $model_honor,\n 'data_honor' => $data_honor,\n 'model_skill' => $model_skill,\n 'data_skill' => $data_skill,\n 'model_interest' => $model_interest,\n 'data_interest' => $data_interest,\n 'model_favorite' => $model_favorite,\n 'data_favorite' => $data_favorite,\n ));\n }", "public function index()\n {\n return new EmployeeCollection(Employee::orderBy('id','DESC')->paginate(5));\n }", "public function index()\n {\n $employees = Employee::all();\n return view('employee.index', compact('employees'));\n }", "public function index()\n {\n $employees = Employee::all()->toArray();\n return view('Employee.ManageEmp', compact('employees') );\n }", "public function index()\n {\n return $this->showList(ObjectMuseum::where('deleted','=',ObjectMuseum::ACTIVE)->get());\n }", "public function actionList()\r\n {\r\n $this->_userAutehntication();\r\n switch($_GET['model'])\r\n {\r\n case 'posts': \r\n $models = Post::model()->findAll();\r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Error: Mode <b>list</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n if(is_null($models)) {\r\n $this->_sendResponse(200, sprintf('No Post found for model <b>%s</b>', $_GET['model']) );\r\n } else {\r\n $rows = array();\r\n foreach($models as $model)\r\n $rows[] = $model->attributes;\r\n\r\n $this->_sendResponse(200, CJSON::encode($rows));\r\n }\r\n }", "public function actionIndex()\n {\n $searchModel = new DmposmasterrelateSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $searchPosModel = new DmposSearch();\n $allPos = $searchPosModel->searchAllPos();\n $allPosMap = ArrayHelper::map($allPos,'ID','POS_NAME');\n\n $searchCityModel = new DmcitySearch();\n $allCity = $searchCityModel->searchAllCity();\n $allCityMap = ArrayHelper::map($allCity,'ID','CITY_NAME');\n\n $searchPosMasterModel = new DmposmasterSearch();\n $allPosMaster = $searchPosMasterModel->searchAllPosmaster();\n $allPosMasterMap = ArrayHelper::map($allPosMaster,'ID','POS_MASTER_NAME');\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'allPosMap' => $allPosMap,\n 'allPosMasterMap' => $allPosMasterMap,\n 'allCityMap' => $allCityMap,\n ]);\n }", "public static function getList(){\n return DB::table('employees')->get();\n }", "public function index()\n {\n $this->filter_section = true;\n $this->employees = Employee::all();\n $this->designations = Designation::all();\n\n return view('admin.employee.index', $this->data);\n }", "public function all()\n {\n return $this->model->get();\n }", "public function index()\n {\n return Equipe::all();\n }", "public function index()\n {\n return view('empmodel');\n }", "public function index()\n {\n $exercises = Exercise::all();\n $trainings = Training::all();\n \n return view('exercises.index')->with('exercises', $exercises)->with('trainings', $trainings);\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 $employee = Employee::active()->latest()->get();\n \n return EmployeeResource::collection($employee);\n }", "public function index()\n {\n \n \n $employees = Employee::all();\n $careers=Career::lists('careerName', 'id');\n\n return view('accountant.employees.index')->with('employees',$employees)\n ->with('careers', $careers);\n }", "public function index()\n {\n //\n $employees = Employee::all();\n return view('hr/employee/index',compact('employees'));\n }", "public function index()\n {\n $employees = employee::get(); \n return view(\"index\")->with(array('employee'=> $employees));\n }", "public function index(Request $request)\n {\n // dd($request->all());\n $limit = $request->has('_limit')? $request->_limit : 20;\n\n // get experiences\n $experiences = Experience::getBySearch($request)\n ->orderBy('id', 'DESC')\n ->paginate($limit)\n ->appends($request->query());\n\n // return collection of experiences as a resource\n return ExperienceResource::collection($experiences);\n }", "public function index()\n {\n $employee = Employee::getallEmp();\n //prd($employee->toArray());\n return view('admin.employee.index',compact('employee'));\n }", "public function index()\n {\n $employee = Employee::all();\n \n return view('employee.index', compact('employee'));\n }", "public function index()\n {\n\n $user = Auth::user();\n $exams = DB::table('assign_exams')\n ->join('exams', 'exams.id', '=', 'assign_exams.exam_id')\n ->select('exams.*','assign_exams.*')\n ->where('user_id',$user['id'])\n ->get();\n\n return view('list_exams',compact('exams'));\n }", "public function actionList() {\n $models = Post::model()->findAll();\n $rows = array();\n foreach($models as $model) \n $rows[] = $model->attributes;\n\t\t$data_response = array(\n\t\t\t'error'=> array('status'=>200, 'message'=>''),\n\t\t\t'datas'=>$rows\n\t\t);\n $this->response($data_response);\n }" ]
[ "0.6388559", "0.6354124", "0.62900794", "0.6183228", "0.61783564", "0.6168356", "0.6096302", "0.6082665", "0.607787", "0.6073956", "0.60720295", "0.60704064", "0.6067534", "0.6064393", "0.60572386", "0.5988476", "0.59781706", "0.5957731", "0.59494495", "0.5945963", "0.59428483", "0.59428483", "0.5941481", "0.59017575", "0.58715826", "0.5860553", "0.5858122", "0.58378595", "0.58343047", "0.58332264", "0.5812979", "0.58030313", "0.5777943", "0.5777333", "0.57771635", "0.5772639", "0.57723165", "0.57691956", "0.57691866", "0.57619524", "0.5745986", "0.57456666", "0.5744532", "0.5741916", "0.5730184", "0.5713862", "0.57018024", "0.56997895", "0.5698672", "0.56982666", "0.56818676", "0.5681336", "0.566297", "0.56569254", "0.5656267", "0.5652501", "0.56481296", "0.5646291", "0.56446403", "0.56440437", "0.5639899", "0.56289774", "0.56179845", "0.5617601", "0.56162256", "0.56158596", "0.56141233", "0.5612279", "0.5607064", "0.5603142", "0.5599915", "0.55957776", "0.559175", "0.55901533", "0.5590122", "0.5584104", "0.5583175", "0.55821526", "0.557369", "0.5571331", "0.55697757", "0.5565134", "0.556202", "0.5560943", "0.5559681", "0.5558583", "0.55549085", "0.55527395", "0.55523735", "0.555038", "0.5550284", "0.55463785", "0.55408275", "0.5535709", "0.5532253", "0.553069", "0.55276924", "0.55258083", "0.55250937", "0.5523093" ]
0.70736754
0
Creates a new Examination model. If creation is successful, the browser will be redirected to the 'view' page.
Создаёт новый объект Examination. Если создание успешно, браузер будет перенаправлен на страницу 'view'.
public function actionCreate() { $model = new Examination(); if ($model->load(Yii::$app->request->post())) { $userId = \Yii::$app->user->id; $this->saveResult($model->result, $userId); return $this->redirect('index'); } return $this->render('create', [ 'model' => $model, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n\t{\n\t\t$model=new ElearningExam;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['ElearningExam']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ElearningExam'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->elearningExamId));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new Escaparate();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->idNTC_Escaparate]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new IhubAbsence();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'idOpr' => $model->idOpr, 'tglabsence' => $model->tglabsence, 'ibadah' => $model->ibadah]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate() {\n $model = new AllocationDetail();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n $exam=Exam::all();\n $section=Section::all();\n $class = Classe::all();\n $session=Session::all();\n $term=Term::all();\n return view('basicinfo::exam.create',compact('exam','section','class','session','term'));\n }", "public function actionCreate()\n\t{\n\t\t$model = new Exam;\n\t\t$examQuestionModel = new ExamQuestion();\n\t\t$examChoiceModel = new ExamChoice();\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t//$this->performAjaxValidation($model);\n\n\t\tif (isset($_POST['Exam']) && isset($_POST['ExamQuestion']) && isset($_POST['ExamChoice']))\n\t\t{\n\t\t\t$model->attributes = $_POST['Exam'];\n\n\t\t\t$flag = true;\n\t\t\t$transaction = Yii::app()->db->beginTransaction();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif ($model->save())\n\t\t\t\t{\n\t\t\t\t\t$examTitleId = Yii::app()->db->lastInsertID;\n\n\t\t\t\t\t//Question\n\t\t\t\t\tforeach ($_POST['ExamQuestion'] as $qId => $examQuestion)\n\t\t\t\t\t{\n\t\t\t\t\t\t$examQuestionModel = new ExamQuestion();\n\t\t\t\t\t\t$examQuestionModel->attributes = $examQuestion;\n\n\t\t\t\t\t\tif (!$examQuestionModel->save())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$flag = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$examQuestionId = Yii::app()->db->lastInsertID;\n\n\t\t\t\t\t\t$examTitleExamQuestionModel = new ExamExamQuestion();\n\t\t\t\t\t\t$examTitleExamQuestionModel->examId = $examTitleId;\n\t\t\t\t\t\t$examTitleExamQuestionModel->examQuestionId = $examQuestionId;\n\n\t\t\t\t\t\tif (!$examTitleExamQuestionModel->save())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$flag = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($examQuestion['questionType'] == 2)\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\t//Choice\n\t\t\t\t\t\tforeach ($_POST['ExamChoice'][$qId] as $examChoice)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t$examChoiceModel = new ExamChoice();\n\t\t\t\t\t\t\t$examChoiceModel->attributes = $examChoice;\n\n\t\t\t\t\t\t\tif (!$examChoiceModel->save())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$flag = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$examChoiceId = Yii::app()->db->lastInsertID;\n\n\t\t\t\t\t\t\t$examQuestionExamChoiceModel = new ExamQuestionExamChoice();\n\t\t\t\t\t\t\t$examQuestionExamChoiceModel->examQuestionId = $examQuestionId;\n\t\t\t\t\t\t\t$examQuestionExamChoiceModel->examChoiceId = $examChoiceId;\n\n\t\t\t\t\t\t\tif (!$examQuestionExamChoiceModel->save())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$flag = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!$flag)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$flag = false;\n\t\t\t\t}\n\n\t\t\t\tif ($flag)\n\t\t\t\t{\n\t\t\t\t\t$transaction->commit();\n\t\t\t\t\t$this->redirect(array(\n\t\t\t\t\t\t'view',\n\t\t\t\t\t\t'id' => $model->examId));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$transaction->rollback();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\tthrow new Exception($e->getMessage());\n\t\t\t\t$transaction->rollback();\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create', array(\n\t\t\t'model' => $model,\n\t\t\t'examQuestionModel' => $examQuestionModel,\n\t\t\t'examChoiceModel' => $examChoiceModel,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new Evaluation();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\r\n\t{\r\n\t\t$model=new Study;\r\n\r\n\t\t// Uncomment the following line if AJAX validation is needed\r\n\t\t// $this->performAjaxValidation($model);\r\n\r\n\t\tif(isset($_POST['Study']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['Study'];\r\n\t\t\tif($model->save())\r\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\r\n\t\t}\r\n\r\n\t\t$this->render('create',array(\r\n\t\t\t'model'=>$model,\r\n\t\t));\r\n\t}", "public function actionCreate()\n\t{\n\t\t$model=new Employe;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Employe']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Employe'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id_employe));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function create()\n {\n //\n return view('exam.create');\n }", "public function actionCreate()\n {\n $model = new WpIschoolSafecard();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n\t\t//\n\t\t// if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\t\t// try {\n\t\t// $model->save();\n\t\t// Yii::$app->session->setFlash('alert', [\n\t\t// 'body' => Yii::$app->params['create-success'],\n\t\t// 'class' => 'bg-success',\n\t\t// ]);\n\t\t// } catch (\\yii\\db\\Exception $exception) {\n\t\tYii::$app->session->setFlash('alert', [\n\t\t\t'body' => Yii::$app->params['create-danger'],\n\t\t\t'class' => 'bg-danger',\n\t\t]);\n\n\t\t// }\n\t\treturn $this->redirect(['index']);\n\t\t// }\n\n\t\t// return $this->render('create', [\n\t\t// 'model' => $model,\n\t\t// ]);\n\t}", "public function actionCreate()\n {\n $model = new SasaranEs4();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()){\n flash('success','Data Sasaran Eselon IV Berhasil Disimpan');\n return $this->redirect(['index']);\n }\n \n flash('error','Data Sasaran Eselon IV Gagal Disimpan');\n \n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Employe();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()) {\n Yii::$app->session->setFlash('success', \"Employee created successfully.\");\n } else {\n Yii::$app->session->setFlash('error', \"Employee not saved.\");\n }\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Persyaratan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_persyaratan]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Test();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Data();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->no]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n \t /** @var ActiveRecord $model */\n \t $modelClass = static::modelClass();\n \t $model = new $modelClass();\n\n\t$viewFolder = '/';\n\t$viewName = 'create';\n\t$viewExtension = '.php';\n\t$viewFile = $this->getViewPath().$viewFolder.$viewName.$viewExtension;\n\t$viewPath = file_exists($viewFile) ? '' : $this->getDefaultViewPath(false);\n\t\n\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t$this->processData($model, 'create');\n\t\treturn $this->redirect(['view', 'id' => $model->getPrimaryKey()]);\n\t} else {\n\t\treturn $this->render($viewPath.$viewName, array_merge($this->commonViewData(), [\n\t\t\t'model' => $model,\n\t]));\n\t}\n }", "public function actionCreate()\n {\n $model = new Patient();\n $model->StatusId = DictionaryDetail::PATIENT_STATUS_NEW;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if (!empty($model->interestPoint)) {\n foreach ($model->interestPoint as $interestPoint) {\n $modelInterestPoint = new InterestPointXPatient();\n $modelInterestPoint->PatientId = $model->Id;\n $modelInterestPoint->InterestPointId = $interestPoint;\n $modelInterestPoint->save();\n }\n }\n return $this->redirect(['view', 'id' => $model->Id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Student();\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $this->setModelByConditions();\n\n if (Yii::$app->request->isPost &&\n $this->model->load(Yii::$app->request->post()) &&\n $this->setAdditionAttributes() &&\n $this->model->save()) {\n\n if ($this->viewCreated) {\n $redirectParams = [\n $this->urlPrefix.'view',\n 'id' => $this->model->getId(),\n ];\n } else {\n $redirectParams = [\n $this->urlPrefix.'index',\n ];\n }\n\n return $this->redirect($redirectParams);\n }\n\n return $this->render('create',\n ArrayHelper::merge(\n [\n 'model' => $this->model,\n ],\n $this->getAdditionFields()\n )\n );\n }", "public function actionCreate()\n {\n $model = new Qrxq2017Enroll();\n $model->loadDefaultValues();\n\n $model->id = JdhnCommonHelper::createGuid();\n $model->created_at = time();\n $model->modified_at = $model->created_at;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new HorarioEstudiante();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new House();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n return view('admin.imagingExam.create');\n }", "public function actionCreate()\n {\n $model = new Amphur();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->amphurId]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n return view('exam::create');\n }", "public function create()\n {\n //\n return view('exams.create');\n }", "public function actionCreate()\n {\n $model = new ActivityDetail();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Clearanceentries();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect([\n 'view', \n 'Clear By ID' => $model['Clear By ID'], \n 'Clearance Level Code' => $model['Clearance Level Code'], \n 'Department' => $model->Department, \n 'Student ID' => $model['Student ID']\n ]);\n } else {\n return $this->render('create', [ 'model' => $model ]);\n }\n }", "public function actionCreate()\n {\n $model = new Point();\n $model->create_at = time();\n $model->user_id = User::getCurrentId();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new RefJkel();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new InterviewDistrict();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $this->isCreateView = true;\n $modelClass = $this->_getModelClass();\n $model = new $modelClass;\n return $this->_renderView($model);\n }", "public function actionCreate()\n {\n $model = new MintaData();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Admin();\n\n /*if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->a_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }*/\n \n if (Yii::$app->request->post() && $model->validate()) {\n return $this->redirect(['view', 'id' => $model->a_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n\n\n }", "public function create()\n {\n return view('admin.pages.exam.create');\n }", "public function actionCreate() {\r\n $model = new Fltr();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "public function actionCreate()\n {\n $model = new Keep();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Event();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Ddiet();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new EnglishNanorep();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n\t{\n\t\t$model=new Entry;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Entry']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Entry'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n\t{\n\t\t$model=new EstudianteEvaluacion;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['EstudianteEvaluacion']))\n\t\t{\n\t\t\t$model->attributes=$_POST['EstudianteEvaluacion'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id_evaluacion_estudiante));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new UserFeeMaster();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n //$this->paymentUMoney($model);\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'userid' => Yii::$app->user->id,\n ]);\n }", "public function actionCreate() {\n if (Yii::$app->user->can('school_exam')) {\n $model = new SchoolExamMarks();\n\n $classList = ArrayHelper::map(Classes::findAll(['is_active' => 'Y', 'is_deleted' => 'N']), 'id', 'name');\n $subclassList = ArrayHelper::map(Subclass::findAll(['is_active' => 'Y', 'is_deleted' => 'N']), 'id', 'sub_class');\n $semesterList = ArrayHelper::map(SchoolExamSemester::findAll(['is_active' => 'Y', 'is_deleted' => 'N']), 'id', 'semester');\n $divisionList = ArrayHelper::map(Division::findAll(['is_deleted' => 'N', 'is_active' => 'Y']), 'id', 'division');\n $subjectList = ArrayHelper::map(SchoolSubject::findAll(['is_deleted' => 'N', 'is_active' => 'Y']), 'id', 'name_en');\n $standardList = ArrayHelper::map(SchoolExam::findAll(['is_deleted' => 'N', 'is_active' => 'Y']), 'id', 'standard');\n\n $yearList = [];\n\n for ($i = 1430; $i <= 1600; $i++) {\n $yearList[$i] = $i;\n }\n\n if ($model->load(Yii::$app->request->post())) {\n return $this->redirect(['enter-marks', 'year' => $model->year, 'class_id' => $model->class_id, 'subclass_id' => $model->subclass_id, 'division_id' => $model->division_id, 'standard_id' => $model->standard_id, 'semester_id' => $model->semester_id, 'subject_id' => $model->subject_id]);\n //return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'classList' => $classList,\n 'subclassList' => $subclassList,\n 'semesterList' => $semesterList,\n 'yearList' => $yearList,\n 'divisionList' => $divisionList,\n 'standardList' => $standardList,\n 'subjectList' => $subjectList,\n ]);\n }\n } else {\n throw new ForbiddenHttpException;\n }\n }", "public function actionCreate()\n {\n $model = new Rents();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Ora();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ora_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Survey();\n\n Yii::$app->gon->send('saveSurveyUrl', '/survey/save-new');\n Yii::$app->gon->send('afterSaveSurveyRedirectUrl', \\Yii::$app->request->referrer);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new QuestionReported();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new AdviserResume();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['/adviser/view', 'id' => $model->adviser_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Lessons();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $model->setStudentsInLessons($model->id);\n return $this->redirect(['/teacher/lessons']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n } \n }", "public function actionCreate()\n {\n $model = new Admin();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n return view('exams.create');\n }", "public function actionCreate() {\n $model = new TimeBooks();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate(){\n $model = new MgfConceptNote();\n if ($model->load(Yii::$app->request->post()) && $model->save()) { \n Yii::$app->session->setFlash('success', 'Saved successfully.');\n return $this->redirect(['view', 'id' => $model->id]);\n }else{\n Yii::$app->session->setFlash('error', 'NOT Saved.');\n return $this->redirect(['/mgf-applicant/profile']);\n }\n }", "public function actionCreate() {\n $model = new learnerscoring();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n\t{\n\t\t$model=new Student;\n// $model_student_score = new Studentscore;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Student']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Student'];\n// $model_student_score->personal_id = $model->personal_id;\n $model_has = Student::model()->findByAttributes(array('personal_id'=>$model->personal_id));\n if(isset($model_has)) {\n throw new CHttpException(404,Yii::t('common','The peopele has existed.'));\n } \n $model_has = Student::model()->findByAttributes(array('stdudent_id'=>$model->stdudent_id));\n if($model->stdudent_id != '' && isset($model_has)) {\n throw new CHttpException(404,Yii::t('common','The student id has existed.'));\n } \n// $model->enroll_date = date('Y-m-d',time());\n\t\t\tif($model->save()) {\n //不再同时创建成绩单\n// $model_student_score->record_id = $model->record_id;\n// if ($model_student_score->save())\n// $this->redirect(array('view','id'=>$model->record_id));\n// else {\n// $model->delete();\n// }\n $this->redirect(array('view','id'=>$model->record_id));\n }\n \n\t\t\t\t\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function create()\n {\n $data = array();\n $data['title'] = $_POST['title'];\n $data['content'] = $_POST['content'];\n $data['time'] = $_POST['time'];\n \n $this->model->create($data);\n header('location:'. URL .'index');\n }", "public function actionCreate()\n {\n $model = new TbTeach();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->teach_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionExamReport() {\n// $modelExam = new Exam;\n// $this->render('examReport', array('modelClassroom'=>$modelClassroom,'modelExam'=>$modelExam));\n $modelClassroom = new Classroom;\n if (isset($_POST['Classroom'])) {\n $modelClassroom->attributes = $_POST['Classroom'];\n }\n\n// trace($modelClassroom->id);\n\n $modelExam = new Exam;\n if (isset($_POST['Exam'])) {\n $modelExam->attributes = $_POST['Exam'];\n }\n $this->render('examReport', array('modelClassroom' => $modelClassroom, 'modelExam' => $modelExam));\n }", "public function actionCreate()\n\t{\n\t\t$model=new Employer;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Employer']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Employer'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->employer_id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new denied();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new EstudiosIps();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate() {\n $model = new RealEstateMaster();\n\n if ($model->load(Yii::$app->request->post()) && Yii::$app->SetValues->Attributes($model) && $model->validate()) {\n $data = Yii::$app->request->post();\n $aggrement = UploadedFile::getInstances($model, 'aggrement');\n $ejari = UploadedFile::getInstance($model, 'ejari');\n $cheque_copy = UploadedFile::getInstance($model, 'cheque_copy');\n $model->ejari_expiry = $model->ejari_expiry != '' ? date('Y-m-d', strtotime($model->ejari_expiry)) : '';\n if (!empty($aggrement)) {\n $model->aggrement = $aggrement->extension;\n }\n if (!empty($ejari)) {\n $model->ejari = $ejari->extension;\n }\n if (!empty($cheque_copy)) {\n $model->cheque_copy = $cheque_copy->extension;\n }\n if ($model->save()) {\n $this->EstateDetails($model);\n if ($model->no_of_cheques != '' && $model->no_of_cheques >= 1) {\n $this->ChequeDetails($model, $data);\n }\n $this->upload($model, $aggrement, $ejari, $cheque_copy);\n Yii::$app->session->setFlash('success', \"Real Estate Details Created Successfully\");\n return $this->redirect(['real-estate-details', 'id' => $model->id]);\n// $model = new RealEstateMaster();\n }\n } return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n //\n return view('hr/employee/create');\n }", "public function actionCreate()\r\n {\r\n $model = new Tax;\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['index', 'added' => 'yes']);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "public function actionCreate() {\n $model = new Foro();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate() {\r\n $model = new Statements;\r\n\r\n // Uncomment the following line if AJAX validation is needed\r\n // $this->performAjaxValidation($model);\r\n\r\n if (isset($_POST['Statements'])) {\r\n $model->attributes = $_POST['Statements'];\r\n if ($model->save())\r\n $this->redirect(array('view', 'id' => $model->idStatement));\r\n }\r\n\r\n $this->render('create', array(\r\n 'model' => $model,\r\n ));\r\n }", "public function actionCreate()\r\n {\r\n $model = new Pelanggaran();\r\n $trans = Yii::$app->db->beginTransaction();\r\n\r\n if ($model->loadAll(Yii::$app->request->post()) && $model->save()) {\r\n $check = $this->checkDetailPoint($model, 'create');\r\n \r\n if( isset($check['failed']) ){\r\n $trans->rollBack();\r\n Yii::$app->session->setFlash('error', $check['failed'] );\r\n return $this->redirect(['index']);\r\n }\r\n\r\n $trans->commit();\r\n Yii::$app->session->setFlash('success','Pelanggaran berhasil ditambahkan.');\r\n return $this->redirect(['index']);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "public function actionCreate()\n {\n\t\t$idInstitucion = $_SESSION['instituciones'][0];\n $model = new InfraestructuraEducativa();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\t\n\t\t$sedes = $this->obtenerSedes($idInstitucion);\n\t\t$estados = $this->obtenerEstados();\n\t\t\n return $this->render('create', [\n 'model' => $model,\n\t\t\t'sedes'=> $sedes,\n\t\t\t'estados'=>$estados,\n\t\t\t'idInstitucion'=>$idInstitucion,\n ]);\n }", "public function actionCreate()\n {\n $model = new Programador();\n //Yii::$app->request->post() wrapper de Yii para obtener datos seguros enviados por POST\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = $this->elementAccessForm;\n $tree = $this->authTree->getArrayAuthTreeStructure($this->authTree->getAuthTree());\n\n if ($model->load(Yii::$app->request->post()) && $saveId = $model->save()) {\n return $this->redirect(['view', 'id' => $saveId]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'tree' => $tree,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new JetShopDetails();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Major();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()) {\n $this->success(Yii::t('flash', 'major.save_success'));\n } else {\n $this->error(Yii::t('flash', 'major.save_error'));\n }\n return $this->redirect(['index']);\n } \n return $this->render('create', [\n 'model' => $model,\n ]);\n \n }", "public function create()\n {\n return view('Employee.AddEmp');\n }", "public function actionCreate()\n\t{\n\t\t$model = $this->loadModel();\n\n\t\tif(isset($_POST[get_class($model)]))\n\t\t{\n $model = $this->_prepareModel($model);\n if (Yii::app()->getRequest()->isAjaxRequest) {\n if($model->save())\n echo json_encode($model);\n else\n echo json_encode(array('modelName' => get_class($model),'errors' => $model->getErrors()));\n\n Yii::app()->end();\n }\n\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model=new StudentReg;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['StudentReg']))\n {\n $model->attributes=$_POST['StudentReg'];\n if($model->save())\n $this->redirect(array('view','id'=>$model->id));\n }\n\n $this->render('create',array(\n 'model'=>$model,\n ));\n }", "public function actionCreate()\n {\n $model = new Inventorier();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->codebien]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Kareer();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n\t{\n\t\t$model=new eBayTargetAndTrack;\n\n $this->layout='';\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\n $this->layout='//layouts/column2';\n\t}", "public function create()\n {\n if (!$this->isRole())\n return redirect()->back();\n $depts=Department::all();\n $students=Student::all();\n return view('marks.create',compact('depts','students'));\n }", "public function actionCreate()\n {\n $model = new Quotation();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new StandartOne();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate() {\n $model = new Test();\n\n if ($model->load(Yii::$app->request->post())) {\n $this->dateformat($model, $_POST['Test']);\n $model->save();\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Photo();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //return $this->redirect(['view', 'id' => $model->id]);\n\t return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate() {\n $model = new Employee();\n \n $data = $this->data;\n\n if (!empty($data)) {\n $model->employee_code = $data['employee_code'];\n $model->employee_name = $data['employee_name'];\n $model->employee_email = $data['employee_email'];\n $model->status = $data['status'];\n $model->department_id = $data['department_id'];\n }\n\n $errors = $this->EmpDetailsvalidate($data['address']);\n if ($model->validate() && empty($errors)) {\n $model->save();\n\n $this->InsertUpdateEmpAddress($model->id, $data['address']);\n echo $this->messageReturn(\"success\", 200);\n } else {\n $error = $model->getErrors();\n //print_r($errors);\n array_push($error, $errors);\n echo $this->messageReturn(\"error\", 404, \"\", $error);\n }\n exit;\n }", "public function actionCreate()\n {\n $model = new Quote();\n $model->loadDefaultValues();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n return view('student.insertStudent');\n }", "public function create()\n {\n //\n return view('employee.add');\n }", "public function actionCreate()\r\n {\r\n $model = new Apresentacao();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['index', 'id' => $model->idapresentacao]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "public function actionCreate()\n {\n $model = new AllocationDetails();\n\n if ($model->load(Yii::$app->request->post())) \n {\n\n $wpLoc = WpLocation::findOne(['id'=>$model->wpLocCode]);\n $model->name = $wpLoc->name;\n $model->wpLocCode =(int)$wpLoc->id; \n \n /*$model->yearId =(string) $year->_id;*/\n if(isset($model->yearId)):\n \t$year = CurrentYear::findOne(['_id'=>$model->yearId]);\n \telse:\n \t\t$year = CurrentYear::getCurrentYear();\n \tendif;\n $yearstring =substr($year->yearStartDate,-4).substr($year->yearEndDate,-4);\n $model->allocationID = $model->wpLocCode.$yearstring;\n //$model->status = AllocationDetails::ALLOC_EXT;\n $this->redirect(['index']);\n if($model->save()):\n $message = 1;\n else:\n $message = 'Failure.Record not created.';\n throw new \\yii\\web\\ServerErrorHttpException($message);\n\n endif;\n return $message;\n }\n /* elseif (\\yii::$app->request->isAjax)\n { \n return $this->renderAjax('create', [\n 'model' => $model,\n ]);\n //return $this->redirect(['view', 'id' => (string)$model->_id]);\n }*/\n else\n {\n return $this->render('create', [\n 'model' => $model,\n ]);\n } \n }", "public function actionCreate()\n {\n $model = new Invoice();\n $model->loadDefaultValues();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } elseif (Yii::$app->request->isAjax) {\n return $this->renderAjax('create', [\n 'model' => $model\n ]);\n } else {\n return $this->render('create', [\n 'model' => $model\n ]);\n }\n }", "public function create()\n {\n //\n return view('employee.create');\n }", "public function create()\n {\n $exam = null;\n $marksDistributionTypes = [1,2];\n\n $classes = IClass::where('status', AppHelper::ACTIVE)->orderBy('order', 'asc')\n ->pluck('name', 'id');\n\n return view('backend.exam.add', compact('exam', 'marksDistributionTypes','classes'));\n }", "public function actionCreate()\n {\n $model = new EnfermedadesSintomas([\n 'enfermedad_id' => Yii::$app->request->post('list'),\n 'sintoma_id' => Yii::$app->request->post('item'),\n ]);\n //dd($model->validate());\n if (!$model->save()) {\n throw new \\Exception('No se ha ppodido agregar el sintoma a la enfermedad', 1);\n }\n }", "public function actionCreate()\n\t{\n\t\t$model = new Post;\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save())\n\t\t{\n\t\t\treturn $this->redirect(['site/index']);\n\t\t}\n\t\t\n\t\techo $this->render('create', array(\n\t\t\t'model' => $model\n\t\t));\n\t}", "public function actionCreate()\n\t{\n\t\t$model=new Help;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Help']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Help'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function create()\n {\n $exams=Exam::lists('title','id');\n return view('marksheet/create',compact('exams'));\n }", "public function create()\n {\n return view('teacher.exams.create');\n }" ]
[ "0.75224596", "0.70448494", "0.69286925", "0.6925248", "0.6869331", "0.6866634", "0.6846652", "0.68006235", "0.6791648", "0.67599225", "0.6747884", "0.67406905", "0.67236465", "0.67160517", "0.66948795", "0.6693164", "0.6677648", "0.6677507", "0.6677325", "0.667132", "0.66658115", "0.6665657", "0.6657997", "0.6604234", "0.65812826", "0.6575975", "0.6567612", "0.655345", "0.65533566", "0.6550623", "0.65460455", "0.65313655", "0.6526448", "0.6518244", "0.64982426", "0.6493825", "0.6478195", "0.6477696", "0.64759696", "0.64662", "0.6465619", "0.6450385", "0.6443137", "0.6441896", "0.64250755", "0.6421159", "0.64146703", "0.64101505", "0.6404593", "0.64037204", "0.6402656", "0.6397718", "0.6394664", "0.6379304", "0.6373988", "0.6370692", "0.6370692", "0.63656986", "0.63592917", "0.6356769", "0.6356474", "0.63557804", "0.6353297", "0.63529414", "0.63519704", "0.6339137", "0.632802", "0.6327652", "0.6326777", "0.6322056", "0.63218385", "0.6317887", "0.63134223", "0.6310959", "0.63042474", "0.6299216", "0.62962854", "0.62926596", "0.629111", "0.6285575", "0.6284882", "0.62773967", "0.6271626", "0.62704164", "0.6269343", "0.6265899", "0.6265665", "0.6263769", "0.6263419", "0.62615454", "0.6259034", "0.62577254", "0.62558705", "0.62545234", "0.62471455", "0.62430227", "0.6241689", "0.6240843", "0.6239446", "0.62382585" ]
0.84992194
0
cp_js_end This adds orig_cat_url_title field to capture and post the original value after submission
cp_js_end Это добавляет поле orig_cat_url_title для захвата и отправки исходного значения после отправки формы
function cp_js_end() { $data = ''; if ($this->EE->extensions->last_call !== FALSE) { $data = $this->EE->extensions->last_call; } $js = ' $(".pageContents form").has("input[name=cat_name]#cat_name").find("input[name=cat_url_title]#cat_url_title").each(function() { var $cat_url_title = $(this); if ($(".pageContents form").find("input[name=cat_id]").length > 0) { $cat_url_title.after( $("<input>") .attr("type", "hidden") .attr("name", "orig_cat_url_title") .val($cat_url_title.val()) ); } }); '; $js = ( ! empty($js)) ? NL . '(function($) {'.$js.'})(jQuery);' : ''; return $data . $js; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_ajax_press_this_add_category()\n {\n }", "private function getCategoryPostData()\n {\n // Get data from form fields\n $this->data['category_title'] = $this->input->post('category_title');\n }", "function product_category_edit(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u, $fs;\n\t\t\n\t\t$data = $_r['data'];\n\t\t$data['id'] = $_r['id'];\n\t\t\n\t\tif($data['save'] || $data['apply']){\n\t\t\tif(!$data['title']) $error['title'] = true;\n\t\t\tif(count($error)==0){\n\t\t\t\t$set = array();\n\t\t\t\t$set[] = \"title = '\".add_slash($data['title']).\"'\";\n\t\t\t\t$set[] = \"language_id = '1'\";\n\t\t\t\t$set[] = \"category_id = '0'\";\n\t\t\t\t\n\t\t\t\t$set = implode(', ', $set);\n\t\t\t\tif($data['id']){\n\t\t\t\t\tmysql_q(\"UPDATE product_category SET $set WHERE id = '\".add_slash($data['id']).\"'\");\n\t\t\t\t} else {\n\t\t\t\t\t$data['id'] = mysql_q(\"INSERT INTO product_category SET $set\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($data['save']){\n\t\t\t\t\tredirect(\"product_category.htm\", \"\");\n\t\t\t\t} else{\n\t\t\t\t\tredirect(\"product_category-edit-\".$data['id'].\".htm\", \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else if($data['cancel']) {\n\t\t\tredirect(\"product_category.htm\", \"\");\n\t\t}\n\n\t\t$fields = \"\n\t\t[hidden name='id']\n\t\t[input name='title' label='Category Title' error='Please Enter Category Title']\n\t\t[sac class='']\n\t\t\";\n\t\t\n\t\tif(!$data['save'] && $data['id']){\n\t\t\t$data = mysql_q(\"SELECT * FROM product_category WHERE id='\".add_slash($data['id']).\"'\", \"single\");\n\t\t}\n\n\t\t$tpl->assign(\"data\", $data);\n\t\t\n\t\t$form = new form();\n\t\t$form->add($fields);\n\t\t$tpl->assign(\"form1\", $form->build());\n\t\t\n\t\t$main['content'] = $tpl->fetch(\"admin_product_category_edit.tpl\");\n\t\tdisplay($main);\n\t}", "function categoryAdd($str=''){\n\n\t#Get referring page to send users back to\n\t$previous = $_SERVER['HTTP_REFERER'];\n\n\t$str .= '<!-- start general content -->\n\t\t<script type=\"text/javascript\" src=\"' . VIRTUAL_PATH . '_js/util.js\"></script>\n\n\t\t<script type=\"text/javascript\">\n\n\t\t\tfunction checkForm(thisForm)\n\n\t\t\t{//check form data for valid info\n\t\t\t\tif(empty(thisForm.FirstName,\"Please Enter Customer\\'s First Name\")){return false;}\n\t\t\t\tif(empty(thisForm.LastName,\"Please Enter Customer\\'s Last Name\")){return false;}\n\t\t\t\tif(!isEmail(thisForm.Email,\"Please Enter a Valid Email\")){return false;}\n\t\t\t\treturn true;//if all is passed, submit!\n\t\t\t}\n\n\t\t</script>\n\n\n\t\t<div class=\"row\" style=\"\"><!-- begin content -->\n\t\t\t<form action=\"' . THIS_PAGE . '\" method=\"post\" onsubmit=\"return checkForm(this);\" >\n\n\n\t\t\t\t<input type=\"hidden\" name=\"CatID\" />\n\n\t\t\t\t<!-- inner container -->\n\t\t\t\t<div class=\"class=\"col-sm-9 pull-right\" style=\"\">\n\n\t\t\t\t\t<!-- left container -->\n\t\t\t\t\t<div class=\"col-sm-8 pull-left\" style=\"\">\n\t\t\t\t\t\t<h4 class=\"text-center\">Add New Catagory</b></h4>';\n\n\n\n\n\t\t\t\t\t\t\t$str .= '<div class=\"row \">\n\t\t\t\t\t\t\t\t<div class=\"pull-middle\">\n\n\t\t\t\t\t\t\t\t\t<select class=\"selectpicker\" name=\"CatSort\" required>\n\t\t\t\t\t\t\t\t\t\t<option value=\"person\" select=\"select\">Group By: Indivual</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"team\">Group By: Group/Team</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"organization\">Group By: Organization</option>\n\t\t\t\t\t\t\t\t\t</select>\n\n\n\t\t\t\t\t\t\t\t\t<select class=\"selectpicker\" name=\"CatSort\" required>\n\t\t\t\t\t\t\t\t\t\t<option value=\"individual\" select=\"select\">Catagory Type: IC</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"team\">Catagory Type: OOC</option>\n\t\t\t\t\t\t\t\t\t</select>\n\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div><!-- END Container -->\n\n\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\tclass=\"col-sm-12\"\n\t\t\t\t\t\t\t\t\ttype=\"text\"\n\n\t\t\t\t\t\t\t\t\tname=\"CatTitle\"\n\t\t\t\t\t\t\t\t\tplaceholder=\"Team/Group/Character Name here\"/>\n\t\t\t\t\t\t\t</div><!-- END Container -->\n\n\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t<textarea\n\t\t\t\t\t\t\t\t\tname=\"CatDescription\"\n\n\t\t\t\t\t\t\t\t\tclass=\"autoExpand col-sm-12\"\n\t\t\t\t\t\t\t\t\trows=\"3\"\n\t\t\t\t\t\t\t\t\tdata-min-rows=\"3\"\n\n\t\t\t\t\t\t\t\t\tplaceholder=\"Catagory Description\"\n\t\t\t\t\t\t\t\t\t></textarea>\n\t\t\t\t\t\t\t</div><!-- end container-->\n\n\n\t\t\t\t\t</div><!-- end inner container -->\n\n\t\t\t\t<div class=\"clearfix\">\n\t\t\t\t\t<br /><br />\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tstyle=\"\">\n\n\t\t\t\t\t<input type=\"hidden\" name=\"act\" value=\"categoryInsert\" />\n\t\t\t\t\t<input class=\"btn btn-primary btn-xs \" type=\"submit\" value=\"Add Catagory\">\n\n\t\t\t\t\t&nbsp; &nbsp;\n\n\t\t\t\t\t<a class=\"btn btn-primary btn-xs outline\" href=\"' . $previous . '\">Exit Post</a>\n\t\t\t\t</div>\n\n\t\t\t</form>\n\t\t</div>\n\n\t<!-- END content -->';\n\n\treturn $str;\n}", "public static function func_ajax_add_category() {\n\t\t\t \n\t\t\t\tglobal $wpdb;\n\t\t\t\t\n\t\t\t\tif(!defined('DOING_AJAX')){\n wp_redirect (site_url());\n exit;\n } else {\n $self = self::sanitize($_POST['name']);\n $day = self::sanitize($_POST['day']);\n $desc = self::sanitize($_POST['description']);\n $wpdb->query($wpdb->prepare( \"INSERT INTO \".$wpdb->prefix.self::$table_name .\" VALUES (%d, %s, %s, %s)\", null, $self,$day,$desc ));\n die();\n\t\t\t\t}\n\t\t\n\t\t}", "private function setCategoryDefaultValues()\n {\n if($this->formMode === 'add')\n {\n $this->data['category_title'] = '';\n }\n else if(empty($_POST['category_submit']))\n {\n // Retrieve data from database if NOT POST request\n $data = $this->post_categories_model->getByID($this->data['category_id']);\n $this->data['category_title'] = $data['Post_Category_Title'];\n }\n }", "function lm_save_category() {\n\t@copy(LM_CDATA, LM_CBACKUP);\n\t$id = isset($_POST['category-id']) ? intval($_POST['category-id']) : null;\n\t$cid = isset($_POST['category-cid']) ? intval($_POST['category-cid']) : time();\n\t$arr = array('cid'=>$cid, 'name'=>safe_slash_html($_POST['category-name']));\n\tif (function_exists('return_i18n_languages')) {\n\t\tforeach(return_i18n_languages() as $lang) {\n\t\t\tif ($lang != return_i18n_default_language()) {\n\t\t\t\t$arr['name_'.$lang] = safe_slash_html($_POST['category-name_'.$lang]);\n\t\t\t}\n\t\t}\n\t}\n\t$categories = lm_get_categories();\n\tif (isset($id))\n\t\t$categories[$id] = $arr;\n\telse\n\t\t$categories[] = $arr;\n\tif (lm_c_to_xml($categories))\n\t\tlm_display_message(i18n_r(LM_PLUGIN.'/SUCCESS_SAVE'), true, false, true);\n\telse\n\t\tlm_display_message(i18n_r(LM_PLUGIN.'/ERROR_SAVE'), false);\n}", "function save_categ_redirect($data) {\n\t\t\tupdate_option('categ_url_hack', $data);\n\t\t}", "function _arc_meta_category_meta($event, $step, $data, $rs)\n{\n // category types).\n if ($rs['type']!='article') {\n return $data;\n }\n\n // Get the existing meta data for this category.\n $meta = _arc_meta('category', $rs['name'], true);\n\n $form = hInput('arc_meta_id', $meta['id']);\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_title\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_title'), 'label', ' for=\"arc_meta_title\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . fInput('text', 'arc_meta_title', $meta['title'], '', '', '', '32', '', 'arc_meta_title') . '</div>';\n $form .= '</div>';\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_image\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_image'), 'label', ' for=\"arc_meta_image\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . fInput('number', 'arc_meta_image', $meta['image'], '', '', '', '32', '', 'arc_meta_image') . '</div>';\n $form .= '</div>';\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_robots\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_robots'), 'label', ' for=\"arc_meta_description\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . selectInput('arc_meta_robots', _arc_meta_robots(), $meta['robots'], 'arc_meta_robots') . '</div>';\n $form .= '</div>';\n\n return $data . $form;\n}", "protected function addOnSubmitJavaScriptCode() {}", "function tck_custom_js() {\n?>\n <script language=\"javascript\">\n function edit_link_save_custom(id) {\n add_loading(\"#edit-close-\" + id);\n var newurl = encodeURI( $(\"#edit-url-\" + id).val() );\n var newkeyword = $(\"#edit-keyword-\" + id).val();\n var title = $(\"#edit-title-\" + id).val();\n var custom = ($(\"#edit-custom-\" + id).is(':checked') ? 1 : 0);\n var keyword = $('#old_keyword_'+id).val();\n var nonce = $('#nonce_'+id).val();\n var www = $('#yourls-site').val();\n\n $.getJSON(\n ajaxurl,\n {action:'edit_save_custom', url: newurl, id: id, keyword: keyword, newkeyword: newkeyword, title: title, custom: custom, nonce: nonce },\n function(data){\n if(data.status == 'success') {\n\n if( data.url.title != '' ) {\n var display_link = '<a href=\"' + data.url.url + '\" title=\"' + data.url.url + '\">' + data.url.display_title + '</a><br/><small><a href=\"' + data.url.url + '\">' + data.url.display_url + '</a></small>';\n } else {\n var display_link = '<a href=\"' + data.url.url + '\" title=\"' + data.url.url + '\">' + data.url.display_url + '</a>';\n }\n\n $(\"#url-\" + id).html(display_link);\n $(\"#keyword-\" + id).html('<a href=\"' + data.url.shorturl + '\" title=\"' + data.url.shorturl + '\">' + data.url.keyword + '</a>');\n $(\"#timestamp-\" + id).html(data.url.date);\n $(\"#edit-\" + id).fadeOut(200, function(){\n $('#main_table tbody').trigger(\"update\");\n });\n $('#keyword-'+id).val( newkeyword );\n $('#custom-'+id).html( data.url.custom );\n $('#statlink-'+id).attr( 'href', data.url.shorturl+'+' );\n }\n feedback(data.message, data.status);\n end_loading(\"#edit-close-\" + id);\n end_disable(\"#actions-\" + id + ' .button');\n }\n );\n }\n </script>\n<?php\n }", "function colorpicker_field_add_new_category( $taxonomy ) { ?> \r\n\t<div class=\"form-field term-colorpicker-wrap\"> \r\n\t<label for=\"term-colorpicker\">Category Color</label> \r\n\t<input name=\"_category_color\" value=\"#ffffff\" class=\"colorpicker\" id=\"term-colorpicker\" /> \r\n\t<p>This is the field description where you can tell the user how the color is used in the theme.</p> \r\n\t</div> <?php }", "private function categoriesFormInputs()\n {\n // Get the field name of the field with the category icon\n // #47631, dwildt, 1-\n //$arrLabels[ 'catIcon' ] = $this->confMap['configuration.']['categories.']['fields.']['categoryIcon'];\n // #47631, #i0007, dwildt, 10+\n switch ( true )\n {\n case( $this->pObj->typoscriptVersion <= 4005004 ):\n $arrLabels[ 'catIcon' ] = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'categoryIcon' ];\n break;\n case( $this->pObj->typoscriptVersion <= 4005007 ):\n default:\n $arrLabels[ 'catIcon' ] = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryIcon' ];\n break;\n }\n // #47631, #i0007, dwildt, 10+\n // Default space in HTML code\n $tab = ' ';\n\n // FOREACH category label\n//$this->pObj->dev_var_dump( $this->arrCategories );\n // #i0118, dwildt, 1-/+\n //foreach ( $this->arrCategories[ 'labels' ] as $labelKey => $labelValue )\n foreach ( ( array ) $this->arrCategories[ 'labels' ] as $labelKey => $labelValue )\n {\n // Get the draft for an input field\n $cObj_name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'form_input' ];\n $cObj_conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'form_input.' ];\n $input = $this->pObj->cObj->cObjGetSingle( $cObj_name, $cObj_conf );\n // replace the category marker\n $input = str_replace( '###CAT###', $labelValue, $input );\n // 4.1.17, 120927, dwildt\n // replace the category marker\n //$labelValueWoSpc = str_replace( ' ', null, $labelValue );\n $labelValueWoSpc = $this->zz_properFormLabel( $labelValue );\n $input = str_replace( '###CAT_WO_SPC###', $labelValueWoSpc, $input );\n // 4.1.17, 120927, dwildt\n // #54548, 131221, dwildt, 6+\n $class = $this->arrCategories[ 'cssClass' ][ $labelKey ];\n if ( !empty( $class ) )\n {\n $class = ' class=\"' . $class . '\"';\n }\n $input = str_replace( '###CLASS###', $class, $input );\n\n // IF draft for an input field contains ###IMG###, render an image\n $pos = strpos( $input, '###IMG###' );\n if ( !( $pos === false ) )\n {\n // SWITCH : Render the image\n switch ( true )\n {\n // #i0062\n case( $labelKey == $this->arrWoCategories[ 'iconKey' ] ):\n $name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey ];\n $conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey . '.' ];\n $img = $this->pObj->cObj->cObjGetSingle( $name, $conf );\n break;\n case( is_array( $this->arrCategories[ 'icons' ] ) ):\n // 4.1.7, dwildt, +\n $this->cObjDataAddArray( array( $arrLabels[ 'catIcon' ] => $this->arrCategories[ 'icons' ][ $labelKey ] ) );\n $img = $this->renderMapMarkerVariablesSystemItem( 'categoryIconLegend' );\n $this->cObjDataRemoveArray( array( $arrLabels[ 'catIcon' ] => $this->arrCategories[ 'icons' ][ $labelKey ] ) );\n // 4.1.7, dwildt, +\n break;\n default:\n // Render the image\n $name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey ];\n $conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey . '.' ];\n $img = $this->pObj->cObj->cObjGetSingle( $name, $conf );\n break;\n }\n // SWITCH : Render the image\n\n $input = str_replace( '###IMG###', $img, $input );\n }\n // IF draft for an input field contains ###IMG###, render an image\n\n $arrInputs[] = $tab . $input;\n }\n // FOREACH category label\n // Move array of input fields to a string\n // #i0118, dwildt, 1-/+\n //$inputs = implode( PHP_EOL, $arrInputs );\n $inputs = implode( PHP_EOL, ( array ) $arrInputs );\n $inputs = trim( $inputs );\n\n // RETURN input fields\n return $inputs;\n }", "public function es_add_category_fields() {\n\t\t\t?>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label><?php _e( 'Banner', 'woocommerce' ); ?></label>\n\t\t\t\t<div id=\"product_cat_banner\" style=\"float:left;margin-right:10px;\"><img src=\"<?php echo esc_url( wc_placeholder_img_src() ); ?>\" width=\"60px\" height=\"60px\" /></div>\n\t\t\t\t<div style=\"line-height:60px;\">\n\t\t\t\t\t<input type=\"hidden\" id=\"product_cat_banner_id\" name=\"product_cat_banner_id\" />\n\t\t\t\t\t<button type=\"button\" class=\"banner_upload_image_button button\"><?php _e( 'Upload/Add image', 'woocommerce' ); ?></button>\n\t\t\t\t\t<button type=\"button\" class=\"banner_remove_image_button button\"><?php _e( 'Remove image', 'woocommerce' ); ?></button>\n\t\t\t\t</div>\n\n\n\t\t\t<script type=\"text/javascript\">\n\n\t\t\t\t// Only show the \"remove image\" button when needed\n\t\t\t\tif ( ! jQuery('#product_cat_banner_id').val() ) {\n\t\t\t\t\tjQuery('.banner_remove_image_button').hide();\n\t\t\t\t}\n\n\t\t\t\t// Uploading files\n\t\t\t\tvar file_frame;\n\n\t\t\t\tjQuery( document ).on( 'click', '.banner_upload_image_button', function( event ) {\n\n\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t// Create the media frame.\n\t\t\t\t\tfile_frame = wp.media.frames.downloadable_file = wp.media({\n\t\t\t\t\t\ttitle: '<?php _e( 'Choose an image', 'woocommerce' ); ?>',\n\t\t\t\t\t\tbutton: {\n\t\t\t\t\t\t\ttext: '<?php _e( 'Use image', 'woocommerce' ); ?>',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmultiple: false\n\t\t\t\t\t});\n\n\t\t\t\t\t// When an image is selected, run a callback.\n\t\t\t\t\tfile_frame.on( 'select', function() {\n\t\t\t\t\t\tattachment = file_frame.state().get('selection').first().toJSON();\n\n\t\t\t\t\t\tjQuery('#product_cat_banner_id').val( attachment.id );\n\t\t\t\t\t\tjQuery('#product_cat_banner img').attr('src', attachment.url );\n\t\t\t\t\t\tjQuery('.banner_remove_image_button').show();\n\n\t\t\t\t\t\tfile_frame = undefined;\n\n\t\t\t\t\t});\n\n\t\t\t\t\t// Finally, open the modal.\n\t\t\t\t\tfile_frame.open();\n\t\t\t\t});\n\n\t\t\t\tjQuery( document ).on( 'click', '.banner_remove_image_button', function( event ) {\n\t\t\t\t\tjQuery('#product_cat_banner img').attr('src', '<?php echo esc_url( wc_placeholder_img_src() ); ?>');\n\t\t\t\t\tjQuery('#product_cat_banner_id').val('');\n\t\t\t\t\tjQuery('.banner_remove_image_button').hide();\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\n\t\t\t</script>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function ajax_save_category()\n {\n $translation = ee()->input->post('translation');\n $status = ee()->input->post('publisher_save_status');\n\n // Stop here if false or if the array is empty\n if ( !$translation || empty($translation))\n {\n ee()->publisher_helper->send_ajax_response('failure');\n }\n\n $result = ee()->publisher_category->save_translation($translation, $status);\n\n if ($result)\n {\n ee()->publisher_helper->send_ajax_response('success');\n }\n else\n {\n ee()->publisher_helper->send_ajax_response($result);\n }\n }", "function wp_ajax_add_link_category($action)\n {\n }", "public function category_urlSlugGenerator()\n {\n $output['token'] = $this->security->get_csrf_hash();\n header('Content-Type: application/json');\n $slug = $this->input->post('title', true);\n $output['response'] = $this->common->_urlSlugGenerator('tbl_categories', 'id', 'url_slug', $slug);\n $output = html_escape($this->security->xss_clean($output));\n exit(json_encode($output));\n }", "function templ_save_comment_script() {\n\t$javascript = <<<JS\n <script type=\"text/javascript\">\n var sub = document.getElementById('submit');\n document.getElementById('recaptcha-submit-btn-area').appendChild (sub);\n document.getElementById('submit').tabIndex = 6;\n if ( typeof _recaptcha_wordpress_savedcomment != 'undefined') {\n document.getElementById('comment').value = \n _recaptcha_wordpress_savedcomment;\n }\n </script>\nJS;\n\techo $javascript;\n}", "function my_admin_add_js() {\n\t$screen = get_current_screen();\n\tif ($screen->id == 'contact') {\n\t\techo \"<script>document.getElementById('newcategory_parent').remove()</script>\n\t\t <script>document.getElementById('titlediv').remove(); </script>\";\n\t\t wp_enqueue_script('inputmask', get_template_directory_uri() . '/js/jquery.inputmask.bundle.min.js', array('jquery'));\n wp_enqueue_script('admin', get_template_directory_uri() . '/js/admin.js', array('jquery'));\n\t}\n}", "private function escapeCategories()\n {\n foreach($this->data['categories'] as $key => $category)\n {\n $this->data['categories'][$key]['Post_Category_Title'] = $this->security->xss_clean($category['Post_Category_Title'] );\n }\n }", "public function ajax_get_category()\n {\n $cat_id = ee()->input->get('cat_id');\n $group_id = ee()->input->get('group_id');\n $status = ee()->input->get('publisher_view_status') ? ee()->input->get('publisher_view_status') : PUBLISHER_STATUS_OPEN;\n\n $data = array(\n 'cat_id' => $cat_id,\n 'status' => $status\n );\n\n $vars = ee()->publisher_helper->get_toolbar_options('category', $data, FALSE);\n\n $vars['cat_id'] = $cat_id;\n $vars['group_id'] = $group_id;\n $vars['data'] = ee()->publisher_category->get_translations($cat_id, $group_id, $status);\n $vars['save_url'] = ee()->publisher_helper_cp->mod_link('ajax_save_category', array(), TRUE);\n $vars['custom_fields'] = ee()->publisher_category->get_custom_fields($group_id);\n\n // Load core lang file so views are translated\n ee()->lang->loadfile('content');\n\n if (ee()->input->get('publisher_view_status'))\n {\n $data = ee()->load->view('category/edit_form', $vars, TRUE);\n }\n else\n {\n $data = ee()->load->view('category/edit', $vars, TRUE);\n }\n\n ee()->publisher_helper->send_ajax_response($data);\n }", "function kulam_acf_prepare_acf_form_post_category_field( $field ) {\n\n\t/**\n\t * Variables\n\t */\n\t$field_label = get_field( 'acf-form_form_category_title' );\n\n\tif ( $field_label ) {\n\n\t\t$field[ 'label' ] = $field_label;\n\n\t}\n\n\t// return\n\treturn $field;\n\n}", "function categ_redirect() {\n\n\t\t\t$redirects = get_option('categ_url_hack');\n\t\t\t$categ = get_query_var('cat');\n\t\t\t$categz = array();\n\n // WPML compliant\n/*\n $original = array_key_exists( 'wpml_object_id' , $GLOBALS['wp_filter'] ) ? apply_filters( 'wpml_object_id', $currenta, 'category', true, $default_lg ) : $currenta;\n apply_filters( 'wpml_object_id', int $element_id, string $element_type, bool $return_original_if_missing, mixed $ulanguage_code )\n*/\n if ( array_key_exists( 'wpml_object_id' , $GLOBALS['wp_filter'] ) ) {\n global $sitepress, $wpdb;\n $defaultlg = $sitepress->get_default_language();\n \n $query = \"SELECT trid, language_code, source_language_code FROM wp_icl_translations WHERE element_id='$categ' AND element_type='tax_category'\";\n $trid = $wpdb->get_var( $query, 0 );\n $source_lg = $wpdb->get_var( $query, 2 );\n \n $query2 = \"SELECT element_id FROM wp_icl_translations WHERE trid='$trid' AND element_type='tax_category'\";\n $results_cat = $wpdb->get_results($query2, ARRAY_A);\n \n foreach ($results_cat as $k) {\n $categz[] = $k['element_id'];\n }\n }\n\n\t\t\tif ( !empty($redirects) && !empty($categz) ) {\n\t\t\t if( $redirects['categ'] == $categ || in_array($redirects['categ'], $categz) ) {\n\t\t\t wp_redirect( $redirects['url'] );\n exit();\n }\n\t\t\t}\n\t\t}", "function display_addcategory_form($category_name='', $id='')\r\n{\r\n\tglobal $dropbox_cnf;\r\n\r\n\t$title=get_lang('AddNewCategory');\r\n\r\n\tif (isset($id) AND $id<>'')\r\n\t{\r\n\t\t// retrieve the category we are editing\r\n\t\t$sql=\"SELECT * FROM \".$dropbox_cnf['tbl_category'].\" WHERE cat_id='\".Database::escape_string($id).\"'\";\r\n\t\t$result=api_sql_query($sql);\r\n\t\t$row=mysql_fetch_array($result);\r\n\r\n\t\tif ($category_name=='') // after an edit with an error we do not want to return to the original name but the name we already modified. (happens when createinrecievedfiles AND createinsentfiles are not checked)\r\n\t\t{\r\n\t\t\t$category_name=$row['cat_name'];\r\n\t\t}\r\n\t\tif ($row['received']=='1')\r\n\t\t{\r\n\t\t\t$target='received';\r\n\t\t}\r\n\t\tif ($row['sent']=='1')\r\n\t\t{\r\n\t\t\t$target='sent';\r\n\t\t}\r\n\t\t$title=get_lang('EditCategory');\r\n\r\n\t}\r\n\r\n\tif ($_GET['action']=='addreceivedcategory')\r\n\t{\r\n\t\t$target='received';\r\n\t}\r\n\tif ($_GET['action']=='addsentcategory')\r\n\t{\r\n\t\t$target='sent';\r\n\t}\r\n\r\n\r\n\techo \"<form name=\\\"add_new_category\\\" method=\\\"post\\\" action=\\\"\".api_get_self().\"?view=\".$_GET['view'].\"\\\">\\n\";\r\n\techo '<strong>'.$title.'</strong>';\r\n\tif (isset($id) AND $id<>'')\r\n\t{\r\n\t\techo '<input name=\"edit_id\" type=\"hidden\" value=\"'.$id.'\">';\r\n\t}\r\n\techo '<input name=\"target\" type=\"hidden\" value=\"'.$target.'\">';\r\n\techo \"<table border=\\\"0\\\">\\n\";\r\n\techo \"\\t<tr>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo get_lang('CategoryName').': ';\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo \"<input type=\\\"text\\\" name=\\\"category_name\\\" value=\\\"\".$category_name.\"\\\" />\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t</tr>\\n\";\r\n\techo \"\\t<tr>\\n\";\r\n\techo \"\\t<td valign=\\\"top\\\">\\n\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo \"<input type=\\\"submit\\\" name=\\\"StoreCategory\\\" value=\\\"\".get_lang('Ok').\"\\\">\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t</tr>\\n\";\r\n\techo \"</table>\\n\";\r\n\techo \"</form>\";\r\n}", "function SRW_hiddenfield_title() {\r\n\tglobal $post; ?>\r\n\t<script>\r\n\t\tjQuery(document).ready(function($){\r\n\t\t\tif( $('input#page-title').length > 0 ){\r\n\t\t\t\t$('input#page-title').val('<?php echo $post->post_title ?>');\r\n\t\t\t}\r\n\t\t})\r\n\t</script>\r\n\t<?php\r\n}", "function extra_category_fields( $tag ) { //check for existing featured ID\n $t_id = $tag->term_id;\n $cat_meta = get_option( \"category_$t_id\");\n\t?>\n\t<tr class=\"form-field\">\n\t\t<th scope=\"row\" valign=\"top\"><label for=\"cat_Image_url\"><?php _e('Category Url'); ?></label></th>\n\t\t<td><input type=\"text\" name=\"Cat_meta[cat_url]\" id=\"Cat_meta[img]\" size=\"3\" style=\"width:60%;\" value=\"<?php echo $cat_meta['cat_url'] ? $cat_meta['cat_url'] : ''; ?>\"><br />\n\t <span class=\"description\"><?php _e('Url for category'); ?></span>\n\t\t</td>\n\t</tr>\n\t<?php\n}", "function insert_cat()\n\t {\n\t\t $cat_par_id = $_POST['cat_par_id'];\n\t\t if(mysql_real_escape_string(trim($_POST['cat_title']))=='')\n\t\t {\n\t\t return '<span class=\"err\">please enter the category title</span>';\n\t\t }\n\t\t else\n\t\t {\n\t\t mysql_query(\"insert into category(cat_par_id,cat_title,cat_des) values('$cat_par_id','\".mysql_real_escape_string(trim($_POST['cat_title'])).\"','\".mysql_real_escape_string(trim($_POST['cat_des'])).\"')\");\n\t\t unset($_POST);\n\t\t return '<span class=\"fine\">category inserted successfully...</span>';\n\t\t }\n \t \n }", "function edit_form_after_title()\n {\n }", "function edit_form_after_title()\n {\n }", "public function form($instance) {\n\n // set up background color\n $bg_color = \"#212121\";\n if (isset($instance['bg_color'])) {\n $bg_color = $instance['bg_color'];\n }\n?>\n <div class=\"an-catlinks-settings-container\">\n <p>\n <label for=\"<?php echo $this->get_field_id( 'bg_color' ); ?>\" style=\"display:block;\"><?php _e( 'Background Color:', 'an_catlinks_wiget' ); ?></label>\n <input class=\"widefat color-picker an-catlist-bg-color-picker\"\n id=\"<?php echo $this->get_field_id( 'bg_color' ); ?>\"\n name=\"<?php echo $this->get_field_name( 'bg_color' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $bg_color ); ?>\" />\n </p>\n\n<?php\n // setup font color\n $font_color = \"#ffffff\";\n if (isset($instance['font_color'])) {\n $font_color = $instance['font_color'];\n }\n?>\n <p>\n <label for=\"<?php echo $this->get_field_id( 'font_color' ); ?>\" style=\"display:block;\"><?php _e( 'Font color:', 'an_catlinks_wiget' ); ?></label>\n <input class=\"widefat color-picker\"\n id=\"<?php echo $this->get_field_id( 'font_color' ); ?>\"\n name=\"<?php echo $this->get_field_name( 'font_color' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $font_color ); ?>\" />\n </p>\n\n<?php\n // set up 1st category\n $cat = 0;\n if (isset($instance['cat1'])) {\n $cat = $instance['cat1'];\n }\n?>\n <!-- 1st category and image -->\n <label for=\"<?php _e($this->get_field_id('cat1')); ?>\"><?php esc_html__(\"Category 1\", \"an_catlinks_wiget\"); ?></label>\n <select id=\"<?php _e($this->get_field_id('cat1')); ?>\" name=\"<?php _e($this->get_field_name('cat1')); ?>\" class=\"widefat\" width=\"100%\">\n <option value-\"0\"><?php _e('(not selected)', 'an_catlinks_wiget'); ?></option>\n <?php foreach(get_terms('category','parent=0&hide_empty=0') as $category): ?>\n <option <?php $cat == $category->term_id ? _e(\"selected\") : _e(\"\"); ?> value=\"<?php _e($category->term_id); ?>\">\n <?php _e($category->name); ?>\n </option>\n <?php endforeach; ?>\n </select>\n\n<?php\n // set up image for the first category\n $image = '';\n if(isset($instance['image1']))\n {\n $image = $instance['image1'];\n }\n?>\n\n <p class=\"an-catlinks-image-demo\">\n <label for=\"<?php _e($this->get_field_name( 'image1' )); ?>\"><?php _e( 'Image 1:', 'an_catlinks_wiget' ); ?></label>\n\n <input name=\"<?php _e($this->get_field_name( 'image1' )); ?>\"\n id=\"<?php _e($this->get_field_id( 'image1' )); ?>\"\n class=\"widefat\" type=\"text\" size=\"36\"\n value=\"<?php _e(esc_url( $image )); ?>\" />\n <img src=\"<?php _e(esc_url( $image )); ?>\" style=\"max-width: 100%; height: auto; background: <?php _e($bg_color); ?>\" />\n <input class=\"upload_image_button\" type=\"button\" value=\"<?php _e('Upload Image','an_catlinks_wiget'); ?>\" />\n </p>\n\n <!-- 2nd category and image -->\n<?php\n $cat = 0;\n if (isset($instance['cat2'])) {\n $cat = $instance['cat2'];\n }\n?>\n <label for=\"<?php _e($this->get_field_id('cat2')); ?>\"><?php esc_html__(\"Category 2\", \"an_catlinks_wiget\"); ?></label>\n <select id=\"<?php _e($this->get_field_id('cat2')); ?>\" name=\"<?php _e($this->get_field_name('cat2')); ?>\" class=\"widefat\" width=\"100%\">\n <option value-\"0\"><?php _e('(not selected)', 'an_catlinks_wiget'); ?></option>\n <?php foreach(get_terms('category','parent=0&hide_empty=0') as $category): ?>\n <option <?php $cat == $category->term_id ? _e(\"selected\") : _e(\"\"); ?> value=\"<?php _e($category->term_id); ?>\">\n <?php _e($category->name); ?>\n </option>\n <?php endforeach; ?>\n </select>\n\n<?php\n $image = '';\n if(isset($instance['image2']))\n {\n $image = $instance['image2'];\n }\n?>\n\n <p class=\"an-catlinks-image-demo\">\n <label for=\"<?php _e($this->get_field_name( 'image2' )); ?>\"><?php _e( 'Image 2:', 'an_catlinks_wiget' ); ?></label>\n\n <input name=\"<?php _e($this->get_field_name( 'image2' )); ?>\"\n id=\"<?php _e($this->get_field_id( 'image2' )); ?>\"\n class=\"widefat\" type=\"text\" size=\"36\"\n value=\"<?php _e(esc_url( $image )); ?>\" />\n <img src=\"<?php _e(esc_url( $image )); ?>\" style=\"max-width: 100%; height: auto;background: <?php _e($bg_color); ?>\" />\n <input class=\"upload_image_button\" type=\"button\" value=\"<?php _e('Upload Image','an_catlinks_wiget'); ?>\" />\n </p>\n\n <!-- 3rd category and image -->\n\n <?php\n $cat = 0;\n if (isset($instance['cat3'])) {\n $cat = $instance['cat3'];\n }\n ?>\n <label for=\"<?php _e($this->get_field_id('cat3')); ?>\"><?php esc_html__(\"Category 3\", \"an_catlinks_wiget\"); ?></label>\n\n <select id=\"<?php _e($this->get_field_id('cat3')); ?>\" name=\"<?php _e($this->get_field_name('cat3')); ?>\" class=\"widefat\" width=\"100%\">\n <option value-\"0\"><?php _e('(not selected)', 'an_catlinks_wiget'); ?></option>\n <?php foreach(get_terms('category','parent=0&hide_empty=0') as $category): ?>\n <option <?php $cat == $category->term_id ? _e(\"selected\") : _e(\"\"); ?> value=\"<?php _e($category->term_id); ?>\">\n <?php _e($category->name); ?>\n </option>\n <?php endforeach; ?>\n </select>\n\n<?php\n $image = '';\n if(isset($instance['image3']))\n {\n $image = $instance['image3'];\n }\n?>\n\n <p class=\"an-catlinks-image-demo\">\n <label for=\"<?php _e($this->get_field_name( 'image3' )); ?>\"><?php _e( 'Image 3:', 'an_catlinks_wiget' ); ?></label>\n\n <input name=\"<?php _e($this->get_field_name( 'image3' )); ?>\"\n id=\"<?php _e($this->get_field_id( 'image3' )); ?>\"\n class=\"widefat\" type=\"text\" size=\"36\"\n value=\"<?php _e(esc_url( $image )); ?>\" />\n <img src=\"<?php _e(esc_url( $image )); ?>\" style=\"max-width: 100%; height: auto;background: <?php _e($bg_color); ?>\" />\n <input class=\"upload_image_button\" type=\"button\" value=\"<?php _e('Upload Image','an_catlinks_wiget'); ?>\" />\n </p>\n </div>\n <script>\n\n (function($) {\n\n $(document).ready(function() {\n $('.color-picker').wpColorPicker({\n change: function(event, ui) {\n $(this).parent().trigger('change');\n\n if ($(this).hasClass('an-catlist-bg-color-picker')) {\n $('.an-catlinks-image-demo img').css('background',$(this).val());\n }\n },\n\n clear: function(event) {\n $(this).parent().trigger('change');\n\n if ($(this).hasClass('an-catlist-bg-color-picker')) {\n $('.an-catlinks-image-demo img').css('background','transparent');\n }\n }\n\n });\n\n });\n }\n )(jQuery);\n\n </script>\n\n<?php\n\n }", "function script_on_submit()\n\t{\n\t\treturn '';\n\t}", "public function on_after_submit() {\n\t\t\n\t\t/*\n\t\t$post = array();\n\t\t$post['cm-name'] = $this->controller->questionAnswerPairs['1']['answer'].' '.$this->controller->questionAnswerPairs['2']['answer'];\n\t\t$post['cm-itutkr-itutkr'] = $this->controller->questionAnswerPairs['3']['answer'];\n\t\t\t\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 0);\n\t\tcurl_setopt($ch, CURLOPT_URL, 'http://url.to.my.campaignmonitor/myform');\n\t\t//Don't ask me what this does, I just know that without this funny header, the whole thing doesn't work!\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER,array('Expect:'));\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1 );\n\t\t\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post );\n\t\t\n\t\t$url = curl_exec( $ch );\n\t\tcurl_close ($ch);\n\t\t*/\n\t}", "public function get_category_form_by_ajax() {\n $category_count = $_POST['id'];\n $data['category_id'] = $category_count;\n $data['category_branch_location'] = $this->get_branch_location();\n $data['get_printer'] = $this->get_printer();\n $this->load->view('restaurant/category/insert_category_form', $data);\n }", "static function change_tld_with_javascript() {\n ?>\n <script async defer>\n // Replace tld placeholder\n jQuery('.form-table .form-field td span').eq(0).html('.<?php echo self::get_multisite_tld(); ?>');\n\n // Hack inside hack: Replace links to newly created site\n $link = jQuery('#message.updated a').eq(0);\n if ( $link.length > 0) {\n $link.attr(\"href\", $link.attr(\"href\").replace('<?php echo DOMAIN_CURRENT_SITE; ?>','<?php echo self::get_multisite_tld(); ?>') )\n }\n </script>\n <?php\n }", "protected function afterSave()\n\t{\n\t\tparent::afterSave();\n\t\tif(!$this->status == 1){\n\t\t$title = $this->howtoTitle($this->id);\n\t\t$tags = $this->tagLinks();\n\t\t$title = CHtml::link('Created '.$title , array('/howto/' . $this->id . '/' . $title ) );\n\t\t$shortText = substr($this->content,0,160);\n\t\t$content = $shortText.\"...<br/>Tags:\";\n\t\tforeach($tags as $tag){\n\t\t\t$content .=\" \".$tag.\",\";\n\t\t}\n\t\tAction::newAction($content,$title);\n\t\t}\n\t\t\n\t}", "public function save() {\n\t\tglobal $wpdb;\n\t\t//Build Query\n\t\t$types = array(\"%s\",\"%s\");\n\t\tif(empty($this->category_id)) { //New Category\n\t\t\t$wpdb->insert(FAQBUILDDBCATEGORY,$this->toArray(true),$types); //Insert the this faq build category object into the database\n\t\t\t$this->category_id = $wpdb->insert_id;\n\t\t} else\n\t\t\t$wpdb->update(FAQBUILDDBCATEGORY,$this->toArray(true),array(\"category_id\"=>$this->category_id),$types,array(\"%d\"));\n\t}", "function add_new_category()\n\t{\n\t\t$this->data['title'] \t= 'Add New Portfolio Category';\n\t\t$this->data['css'] \t\t= 'body/admin/css/form_style_default';\n\t\t$this->data['js'] \t\t= 'body/admin/js/form_style_default';\n\t\t$this->data['content'] \t= 'content/admin/portfolio/add_new_category';\n\t\t$this->load->view('body/admin/style_1', $this->data);\n\t}", "function postflight($type, $parent) \n {\n /* I fix lft and rgt attribute in the #__categories for the created categories */\n self::fixCategoryAttributes();\n }", "function submit(){\n\t$parent_category = $this->uri->segment(4);\n\tif (!is_numeric($parent_category)){\n\t\t$parent_category = 0;\n\t}\n\n\t$this->form_validation->set_rules('category_name', 'Category Name', 'required');\n\n\tif ($this->form_validation->run() == FALSE){\n\t\t$this->create();\n\t} else {\n\n\t\t$update_id = $this->uri->segment(3);\n\n\t\tif ($update_id > 0){\n\t\t\t//This is an update\n\t\t\t$data = $this->get_data_from_post();\n\t\t\t$data['category_url'] = url_title($data['category_name']);\n\t\t\t$this->update($update_id, $data);\n\t\t\t$value = \"<p style = 'color: green;'>The category was successfully updated.</p>\";\n\t\t\t$parent_category = $update_id;\n\t\t} else {\n\t\t\t//Create new record\n\t\t\t$data = $this->get_data_from_post();\n\t\t\t$data['category_url'] = url_title($data['category_name']);\n\t\t\t$data['parent_category'] = $parent_category;\n\t\t\t$this->insert($data);\n\t\t\t$value = \"<p style = 'color: green;'>The category was successfully created.</p>\";\n\t\t\t$update_id = $this->get_max();\n\n\t\t\t$this->session->set_flashdata('category', $value);\n\t\t\t\n\t\t}\n\t\t//add flashdata\n\t\t$this->session->set_flashdata('category', $value);\t\n\n\t\tredirect ('store_categories/manage/'.$parent_category);\n\t\t\n\t}\n}", "function work_category_add_new_meta_field() {\r\n\t\t$textdomain = 'milk';\r\n\t\t?>\r\n\t \t\t<div class=\"row\">\r\n\t \t\t\t<p class=\"col-md-6 desc\" >\r\n\t \t\t\t\t<label for=\"term_meta[featured_img]\"><?php _e( \"Featured Image\", $textdomain ); ?></label>\r\n\t \t\t\t\t<br/>\r\n\t \t\t\t\t<label for=\"term_meta[featured_img]\"><?php _e( \"If you choose to show work categories on work page instead of works, you need to upload featured image for category\", $textdomain ); ?></label>\r\n\t \t\t\t</p>\r\n\t\t\t \r\n\t\t\t\t<div class=\"col-md-6\">\r\n\t\t\t\t\t<input \tclass=\"post_meta_image_upload button button-primary\" \r\n\t\t\t\t\t\tname=\"image_btn\" \r\n\t\t\t\t\t\ttype=\"button\" \r\n\t\t\t\t\t\tdata-uploader_title=<?php _e( \"Choose image\", $textdomain ); ?>\r\n\t\t\t\t\t\tdata-uploader_button_text=<?php _e( \"Select\" , $textdomain ); ?>\r\n\t\t\t\t\t\tvalue=<?php _e( \"Select images\", $textdomain ); ?>/>\r\n\t\t\t\t\t<input id=\"term_meta[featured_img]\"\r\n\t\t\t\t\t\tname=\"term_meta[featured_img]\"\r\n\t\t\t\t\t\tclass=\"img_url\" \r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tstyle=\"display:none\"\r\n\t\t\t\t\t\tvalue=\"\"/>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"row\">\r\n\t\t\t \t<p class=\"col-md-6 desc\" >\r\n\t \t\t\t\t<label for=\"term_meta[work_color]\"><?php _e( \"Acent Color\", $textdomain ); ?></label>\r\n\t \t\t\t\t<br/>\r\n\t \t\t\t\t<label for=\"term_meta[work_color]\"><?php _e( \"If you choose to show work categories on work page instead of works, you need to select accent color for work categorie preview\", $textdomain ); ?></label>\r\n\t \t\t\t</p>\r\n\t \t\t\t<div class=\"col-md-6\">\r\n\t\t \t\t\t<input name=\"term_meta[work_color]\" \r\n\t\t\t\t \t\ttype=\"text\" \r\n\t\t\t\t \t\tclass=\"colorPicker\"\r\n\t\t\t\t \t\tid=\"term_meta[work_color]\" \r\n\t\t\t\t \t\tvalue=\"\"\r\n\t\t\t\t \t\tdata-default-color=\"#49b4ff\">\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t<?php }", "function edit_category() {\r\n\r\n\tif(isset($_POST['editcategory'])){\r\n\r\n\t\t$cat_id\t\t\t\t= clean_input($_GET['cat_id']);\r\n\t\t$cat_name \t\t\t= clean_input($_POST['cat_name']);\r\n\t\t$cat_desc_short \t= clean_input($_POST['cat_desc_short']);\r\n\t\t$cat_desc_long \t\t= clean_input($_POST['cat_desc_long']);\r\n\t\t$cat_parent_id \t\t= clean_input($_POST['cat_parent_id']);\r\n\t\t$cat_url \t\t\t= clean_input($_POST['cat_url']);\r\n\t\t$cat_date \t\t\t= clean_input($_POST['cat_date']);\r\n\t\t$cat_mod \t\t\t= clean_input($_POST['cat_mod']);\r\n\t\t$page_template \t\t= clean_input($_POST['page_template']);\r\n\t\t$cat_mod_by \t\t= clean_input($_SESSION['userid']);\r\n\t\t$cat_meta_title \t\t\t= clean_input($_POST['cat_meta_title']);\r\n\t\t$cat_meta_keywords \t\t\t= clean_input($_POST['cat_meta_keywords']);\r\n\t\t$cat_meta_description \t\t= clean_input($_POST['cat_meta_description']);\r\n\t\t$insert_keywords\t \t\t= clean_input($_POST['insert_keywords']);\t\t\t\r\n\r\n\t\t$xyquery = \"UPDATE categories SET \";\r\n\t\t$xyquery .= \"cat_name = '$cat_name',\";\r\n\t\t$xyquery .= \"cat_desc_short = '$cat_desc_short'\";\r\n\t\t$xyquery .= \",cat_desc_long = '$cat_desc_long'\";\r\n\t\t$xyquery .= \",cat_parent_id = '$cat_parent_id'\";\r\n\t\t$xyquery .= \",cat_url = '$cat_url'\";\r\n\t\t$xyquery .= \",cat_mod = '$cat_mod'\";\r\n\t\t$xyquery .= \",cat_mod_by = '$cat_mod_by'\";\r\n\t\t$xyquery .= \",page_template = '$page_template'\";\r\n\t\t$xyquery .= \",cat_meta_title = '$cat_meta_title'\";\r\n\t\t$xyquery .= \",cat_meta_keywords = '$cat_meta_keywords'\";\r\n\t\t$xyquery .= \",cat_meta_description = '$cat_meta_description'\";\r\n\t\t$xyquery .= \",insert_keywords = '$insert_keywords'\";\t\t\t\t\r\n\t\t$xyquery .= \"WHERE cat_id = '$cat_id'\";\r\n\r\n\t\t$xyresult = mysql_query($xyquery) or die(mysql_error());\r\n\r\n\t\t//echo \"<center><h4>The category \".$cat_name.\" been edited!</h4></center>\";\r\n?>\r\n<script>\r\n$(document).ready(function() {\r\n\t$(\"<p>NOTICE:</p><p>The category <?= $cat_name;?> has been modified.</p>\").appendTo(\"#xyalert\");\r\n\t$(\"#xyalert\").fadeIn(200).delay(1500).fadeOut(200);\r\n});\r\n</script>\r\n<?\r\n\t\treturn $xyresult;\r\n\t}\r\n}", "public function process(isys_cmdb_dao_category $p_cat)\n {\n // Initializing some variables.\n $l_rules = [];\n $l_catdata = $p_cat->get_general_data();\n $l_locales = isys_locale::get_instance();\n\n switch ($l_catdata['isys_jdisc_ca_type__const'])\n {\n case 'C__JDISC__CA_TYPE__DATE':\n $l_catdata['isys_catg_jdisc_ca_list__content'] = $l_locales->fmt_date($l_catdata['isys_catg_jdisc_ca_list__content']);\n break;\n case 'C__JDISC__CA_TYPE__CURRENCY':\n $l_catdata['isys_catg_jdisc_ca_list__content'] = $l_locales->fmt_numeric(((float) $l_catdata['isys_catg_jdisc_ca_list__content'] / 100));\n break;\n default:\n break;\n }\n $this->fill_formfields($p_cat, $l_rules, $l_catdata);\n\n // Apply rules.\n $this->get_template_component()\n ->smarty_tom_add_rules(\"tom.content.bottom.content\", $l_rules);\n }", "function add_category() {\r\n\r\n\tif(isset($_POST['addcategory'])){\r\n\r\n\t\t$cat_name \t\t\t= clean_input($_POST['cat_name']);\r\n\t\t$cat_desc_short \t= clean_input($_POST['cat_desc_short']);\r\n\t\t$cat_desc_long \t\t= clean_input($_POST['cat_desc_long']);\r\n\t\t$cat_parent_id \t\t= clean_input($_POST['cat_parent_id']);\r\n\t\tif(empty($_POST['cat_parent_id'])){$cat_parent_id\t\t= \"0\";}\r\n\t\t$cat_url \t\t\t= clean_input($_POST['cat_url']);\r\n\t\t$cat_date \t\t\t= clean_input($_POST['cat_date']);\r\n\t\t$cat_mod \t\t\t= clean_input($_POST['cat_mod']);\r\n\t\t$page_template \t\t= clean_input($_POST['page_template']);\r\n\t\t$cat_mod_by \t\t= clean_input($_SESSION['userid']);\r\n\t\t$cat_meta_title \t\t\t= clean_input($_POST['cat_meta_title']);\r\n\t\t$cat_meta_keywords \t\t\t= clean_input($_POST['cat_meta_keywords']);\r\n\t\t$cat_meta_description \t\t= clean_input($_POST['cat_meta_description']);\r\n\t\t$insert_keywords\t \t\t= clean_input($_POST['insert_keywords']);\t\t\t\t\r\n\r\n\t\t$xyquery = \"INSERT INTO categories (\";\r\n\r\n\t\tif (!empty($cat_name)){$xyquery .= \"cat_name \";}\r\n\t\tif (!empty($cat_desc_short)){$xyquery .= \",cat_desc_short \";}\r\n\t\tif (!empty($cat_desc_long)){$xyquery .= \",cat_desc_long \";}\r\n\t\tif (!empty($cat_parent_id)){$xyquery .= \",cat_parent_id\";}\r\n\t\tif (empty($cat_parent_id)){$xyquery .= \",cat_parent_id\";}\r\n\t\tif (!empty($cat_url)){$xyquery .= \",cat_url\";}\r\n\t\t$xyquery .= \",cat_date\";\r\n\t\t$xyquery .= \",cat_mod\";\r\n\t\t$xyquery .= \",cat_mod_by\";\r\n\t\tif (!empty($page_template)){$xyquery .= \",page_template\";}\r\n\t\tif (!empty($cat_meta_title)){$xyquery .= \",cat_meta_title\";}\r\n\t\tif (!empty($cat_meta_keywords)){$xyquery .= \",cat_meta_keywords\";}\r\n\t\tif (!empty($cat_meta_description)){$xyquery .= \",cat_meta_description\";}\t\t\t\t\r\n\r\n\t\t$xyquery .= \") VALUES ( \";\r\n\r\n\t\tif (!empty($cat_name)){$xyquery .= \"'$cat_name' \";}\r\n\t\tif (!empty($cat_desc_short)){$xyquery .= \",'$cat_desc_short' \";}\r\n\t\tif (!empty($cat_desc_long)){$xyquery .= \",'$cat_desc_long' \";}\r\n\t\tif (!empty($cat_parent_id)){$xyquery .= \",'$cat_parent_id' \";\t}\r\n\t\tif (empty($cat_parent_id)){$xyquery .= \",'0' \";\t}\r\n\t\tif (!empty($cat_url)){$xyquery .= \",'$cat_url' \";}\r\n\t\t$xyquery .= \",NOW() \";\r\n\t\t$xyquery .= \",NOW() \";\r\n\t\t$xyquery .= \",'$cat_mod_by' \";\r\n\t\tif (!empty($page_template)){$xyquery .= \",'$page_template' \";}\r\n\t\tif (!empty($cat_meta_title)){$xyquery .= \",'$cat_meta_title' \";}\r\n\t\tif (!empty($cat_meta_keywords)){$xyquery .= \",'$cat_meta_keywords' \";}\r\n\t\tif (!empty($cat_meta_description)){$xyquery .= \",'$cat_meta_description' \";}\r\n\t\tif (!empty($insert_keywords)){$xyquery .= \",'$insert_keywords' \";}\t\t\t\t\r\n\r\n\t\t$xyquery .= \" )\";\r\n\r\n\t\t$xyresult = mysql_query($xyquery) or die(mysql_error());\r\n\t\t//echo \"<center><h4>The category \".$cat_name.\" has been created!</h4></center>\";\r\n\r\n?>\r\n<script>\r\n$(document).ready(function() {\r\n\t$(\"<p>NOTICE:</p><p>The category <?= $cat_name;?> has been created.</p>\").appendTo(\"#xyalert\");\r\n\t$(\"#xyalert\").fadeIn(200).delay(1500).fadeOut(200);\r\n});\r\n</script>\r\n<?\r\n\r\n\t\treturn $xyresult;\r\n\t}\r\n}", "function classiera_theme_settings_page() {\r\n global $themename,$theme_options;\r\n\t$i = 0;\r\n $message = ''; \r\n\r\n if ( 'savecat' == $_REQUEST['action'] ) {\r\n\t\t\r\n\t\t//print_r($_POST);exit();\r\n $args = array(\r\n\t\t\t 'orderby' => 'name',\r\n\t\t\t 'order' => 'ASC',\r\n\t\t\t 'hide_empty' => false\r\n\t\t);\r\n\t\t$categories = get_categories($args);\r\n\t\tforeach($categories as $category) {\r\n\t\t\t$user_id = $category->term_id;\r\n $tag_extra_fields = get_option(MY_CATEGORY_FIELDS);\r\n\t\t $tag_extra_fields[$user_id]['category_custom_fields'] = $_POST['wpcrown_category_custom_field_option_'.$user_id];\r\n\t\t\t$tag_extra_fields[$user_id]['category_custom_fields_type'] = $_POST['wpcrown_category_custom_field_type_'.$user_id];\t\t\t\r\n\t\t update_option(MY_CATEGORY_FIELDS, $tag_extra_fields);\r\n }\r\n $message='saved';\r\n }\r\n ?>\r\n\r\n <div class=\"wrap\">\r\n <div id=\"icon-options-general\"></div>\r\n <h2><?php esc_html_e('Categories Custom Fields', 'classiera') ?></h2>\r\n <?php\r\n if ( $message == 'saved' ) echo '<div class=\"updated settings-error\" id=\"setting-error-settings_updated\"> \r\n <p>Custom Fields saved.</strong></p></div>';\r\n ?>\r\n </div>\r\n\r\n <form method=\"post\">\r\n\r\n <div class=\"wrap\">\r\n <h3><?php esc_html_e('Select category:', 'classiera') ?></h3>\r\n\r\n <select id=\"select-author\">\r\n \t<?php \r\n\r\n\t \t$cat_args = array ( 'parent' => 0, 'hide_empty' => false, 'orderby' => 'name','order' => 'ASC' ) ;\r\n\t \t$parentcategories = get_categories($cat_args ) ;\r\n\t \t$no_of_categories = count ( $parentcategories ) ;\r\n\t\t\t\t\t\r\n\t\t\t if ( $no_of_categories > 0 ) {\r\n\t\t\t\t\techo '<option value=\"All\" selected disabled>'.esc_html__('Select Category', 'classiera').\"</option>\";\r\n\t\t\t foreach ( $parentcategories as $parentcategory ) {\r\n\t\t\t \r\n\t\t\t echo '<option value=' . $parentcategory->term_id . '>' . $parentcategory->name . '</option>';\r\n\t\t\t \r\n\t\t\t $parent_id = $parentcategory ->term_id;\r\n\t\t\t $subcategories = get_categories(array ( 'child_of' => $parent_id, 'hide_empty' => false ) ) ;\r\n\t\t\t \r\n\t\t\t foreach ( $subcategories as $subcategory ) { \r\n\t\t\t \r\n\t\t\t $args = array (\r\n\t\t\t 'post-type'=> 'questions',\r\n\t\t\t 'orderby'=> 'name',\r\n\t\t\t 'order'=> 'ASC',\r\n\t\t\t 'post_per_page'=> -1,\r\n\t\t\t 'nopaging'=> 'true',\r\n\t\t\t 'taxonomy_name'=> $subcategory->name\r\n\t\t\t ); \r\n\t\t\t \r\n\t\t\t echo '<option value=' . $subcategory->term_id . '> - ' . $subcategory->name . '</option>';\r\n\t\t\t \r\n\t\t\t } \r\n\t\t\t }\r\n\t\t\t } \r\n ?>\r\n </select>\r\n\t\t<p>NOTE: <br/> Text fields will display as input type=text,<br/> Checkbox Will show as features and input type=checkbox,<br/> Dropdown will display as < select >, <br/>Add options for dropdown with comma sepration like option1,option2,option3</p>\r\n </div>\r\n\r\n <div class=\"wrap\">\r\n \t<?php\r\n \t$args = array(\r\n \t 'hide_empty' => false,\r\n\t\t\t 'orderby' => 'name',\r\n\t\t\t 'order' => 'ASC'\r\n\t\t\t);\r\n\r\n\t\t\t$inum = 0;\r\n\r\n\t\t\t$categories = get_categories($args);\r\n\t\t\t \tforeach($categories as $category) {;\r\n\r\n\t\t\t \t$inum++;\r\n\r\n \t\t$user_name = $category->name;\r\n \t\t$user_id = $category->term_id; \r\n\r\n\r\n \t\t$tag_extra_fields = get_option(MY_CATEGORY_FIELDS);\r\n\t\t\t\t$wpcrown_category_custom_field_option = $tag_extra_fields[$user_id]['category_custom_fields'];\r\n\t\t\t\t$wpcrown_category_custom_field_type = $tag_extra_fields[$user_id]['category_custom_fields_type'];\r\n ?>\r\n\r\n <div id=\"author-<?php echo $user_id; ?>\" class=\"wrap-content\" <?php if($inum == 1) { ?>style=\"display: block;\"<?php } else { ?>style=\"display: none;\"<?php } ?>>\r\n\r\n <h4><?php esc_html_e('Add Custom Fields to: ', 'classiera') ?><?php echo $user_name; ?></h4>\r\n\t\r\n <div id=\"badge_criteria_<?php echo $user_id; ?>\">\r\n\t\t\t\t<table class=\"maintable\">\r\n\t\t\t\t\t<tr class=\"custcathead\">\r\n\t\t\t\t\t\t<th class=\"eratd\"><span class=\"text ingredient-title\"><?php esc_html_e( 'Custom field title', 'classiera' ); ?></span></th>\r\n\t\t\t\t\t\t<th class=\"eratd2\"><span class=\"text ingredient-title\"><?php esc_html_e( 'Input Type:', 'classiera' ); ?></span></th>\r\n\t\t\t\t\t\t<th class=\"eratd3\"></th>\r\n\t\t\t\t\t\t<th class=\"eratd4\"><span class=\"text ingredient-title\"><?php esc_html_e( 'Delete', 'classiera' ); ?></span></th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n <?php \r\n for ($i = 0; $i < (count($wpcrown_category_custom_field_option)); $i++) {\r\n\t\t\t\t\t//echo $wpcrown_category_custom_field_option.\"shabir\";\r\n ?>\r\n\t\t\t\t<div class=\"badge_item\" id=\"<?php echo $i; ?>\">\r\n\t\t\t\t\t<table class=\"maintable\" >\r\n\t\t\t\t\t\t<tr> \r\n\t\t\t\t\t\t\t<td class=\"eratd\">\r\n\t\t\t\t\t\t\t\t<input type='text' id='wpcrown_category_custom_field_option_<?php echo $user_id ?>[<?php echo $i; ?>][0]' name='wpcrown_category_custom_field_option_<?php echo $user_id ?>[<?php echo $i; ?>][0]' value='<?php if (!empty($wpcrown_category_custom_field_option[$i][0])) echo $wpcrown_category_custom_field_option[$i][0]; ?>' class='badge_name' placeholder='Add Title for Field'>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=\"eratd2\">\r\n\t\t\t\t\t\t\t\t<input class='field_type_<?php echo $user_id; ?>' type=\"radio\" name=\"wpcrown_category_custom_field_type_<?php echo $user_id ?>[<?php echo $i; ?>][1]\"\r\n\t\t\t\t\t\t\t\t\t<?php if (!empty($wpcrown_category_custom_field_type[$i][1]) && $wpcrown_category_custom_field_type[$i][1] == \"text\") echo \"checked\";?>\r\n\t\t\t\t\t\t\t\t\tvalue=\"text\" >Text Field<br />\r\n\t\t\t\t\t\t\t\t\t<input class='field_type_<?php echo $user_id; ?>' type=\"radio\" name=\"wpcrown_category_custom_field_type_<?php echo $user_id ?>[<?php echo $i; ?>][1]\"\r\n\t\t\t\t\t\t\t\t\t<?php if (!empty($wpcrown_category_custom_field_type[$i][1]) && $wpcrown_category_custom_field_type[$i][1] == \"checkbox\") echo \"checked\";?>\r\n\t\t\t\t\t\t\t\t\tvalue=\"checkbox\">Checkbox<br />\r\n\t\t\t\t\t\t\t\t\t<input class='field_type_<?php echo $user_id; ?>' type=\"radio\" name=\"wpcrown_category_custom_field_type_<?php echo $user_id ?>[<?php echo $i; ?>][1]\"\r\n\t\t\t\t\t\t\t\t\t<?php if (!empty($wpcrown_category_custom_field_type[$i][1]) && $wpcrown_category_custom_field_type[$i][1] == \"dropdown\") echo \"checked\";?>\r\n\t\t\t\t\t\t\t\t\tvalue=\"dropdown\">Dropdown<br />\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t$none = 'style=\"display:none\"';\r\n\t\t\t\t\t\t\t\t\tif (!empty($wpcrown_category_custom_field_type[$i][1]) && $wpcrown_category_custom_field_type[$i][1] == \"dropdown\"){ \r\n\t\t\t\t\t\t\t\t\t\t$none = '';\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t<td class=\"eratd3\">\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t<input <?php echo $none; ?> type='text' id='option_<?php echo $user_id ?>' name=\"wpcrown_category_custom_field_type_<?php echo $user_id ?>[<?php echo $i; ?>][2]\" value='<?php echo $wpcrown_category_custom_field_type[$i][2]; ?>' class='options_c options_c_<?php echo $user_id; ?>' placeholder=\"Add Options with Comma , separated Example: One,Two,Three\">\r\n\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=\"eratd4\">\r\n\t\t\t\t\t\t\t\t<button name=\"button_del_badge\" type=\"button\" class=\"button-secondary button_del_badge_<?php echo $user_id; ?>\">Delete</button>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr> \r\n\t\t\t\t\t</table>\r\n\t\t\t\t</div>\r\n \r\n <?php \r\n }\r\n ?>\r\n </div>\r\n\r\n <div id=\"template_badge_criterion_<?php echo $user_id; ?>\" style=\"display: none;\">\r\n \r\n\t\t\t\t<div class=\"badge_item\" id=\"999\">\r\n\t\t\t\t\t<table class=\"maintable\">\r\n\t\t\t\t\t\t<tr> \r\n\t\t\t\t\t\t\t<td class=\"eratd\">\r\n\t\t\t\t\t\t\t <input type='text' id='' name='' value='' class='badge_name' placeholder='Add Title for Field'>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=\"eratd2\">\r\n\t\t\t\t\t\t\t\t<input checked=\"cheched\" type=\"radio\" name=\"\" value=\"text\" class='field_type field_type_<?php echo $user_id; ?>'>Text Field<br />\r\n\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"\" value=\"checkbox\" class='field_type field_type_<?php echo $user_id; ?>'>Checkbox<br />\r\n\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"\" value=\"dropdown\" class='field_type field_type_<?php echo $user_id; ?>'>Dropdown<br />\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=\"eratd3\">\r\n\t\t\t\t\t\t\t\t <input style=\"display:none\" type='text' id='option_<?php echo $user_id ?>' name='' value='' class='options_c options_c_<?php echo $user_id; ?>' placeholder=\"Add Options with Comma , separated Example: One,Two,Three\">\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=\"eratd4\">\r\n\t\t\t\t\t\t\t\t<button name=\"button_del_badge\" type=\"button\" class=\"button-secondary button_del_badge_<?php echo $user_id; ?>\">Delete</button>\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</div>\r\n </div>\r\n\t\t\t<table class=\"maintable\">\r\n\t\t\t\t<tr class=\"custcathead\">\r\n\t\t\t\t\t<th class=\"eratd\"><span class=\"text ingredient-title\"><?php esc_html_e( 'Custom field title', 'classiera' ); ?></span></th>\r\n\t\t\t\t\t<th class=\"eratd2\"><span class=\"text ingredient-title\"><?php esc_html_e( 'Input Type:', 'classiera' ); ?></span></th>\r\n\t\t\t\t\t<th class=\"eratd3\"></th>\r\n\t\t\t\t\t<th class=\"eratd4\"><span class=\"text ingredient-title\"><?php esc_html_e( 'Delete', 'classiera' ); ?></span></th>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n <fieldset class=\"input-full-width\">\r\n <button type=\"button\" name=\"submit_add_badge\" id='submit_add_badge_<?php echo $user_id; ?>' value=\"add\" class=\"button-secondary\">Add new custom field</button>\r\n </fieldset>\r\n <span class=\"submit\"><input name=\"save<?php echo $user_id; ?>\" type=\"submit\" class=\"button-primary\" value=\"Save changes\" /></span>\r\n\r\n <script>\r\n\r\n // Add Badge\r\n\r\n jQuery('#template_badge_criterion_<?php echo $user_id; ?>').hide();\r\n jQuery('#submit_add_badge_<?php echo $user_id; ?>').on('click', function() { \r\n $newItem = jQuery('#template_badge_criterion_<?php echo $user_id; ?> .badge_item').clone().appendTo('#badge_criteria_<?php echo $user_id; ?>').show();\r\n if ($newItem.prev('.badge_item').size() == 1) {\r\n var id = parseInt($newItem.prev('.badge_item').attr('id')) + 1;\r\n } else {\r\n var id = 0; \r\n }\r\n $newItem.attr('id', id);\r\n\r\n var nameText = 'wpcrown_category_custom_field_option_<?php echo $user_id; ?>[' + id + '][0]';\r\n $newItem.find('.badge_name').attr('id', nameText).attr('name', nameText);\r\n\t\t\t\t\r\n\t\t\t\tvar nameText2 = 'wpcrown_category_custom_field_type_<?php echo $user_id; ?>[' + id + '][1]';\r\n\t\t\t\t\t\t\t$newItem.find('.field_type').attr('id', nameText2).attr('name', nameText2);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tvar nameText3 = 'wpcrown_category_custom_field_type_<?php echo $user_id; ?>[' + id + '][2]';\r\n\t\t\t\t\t\t\t$newItem.find('.options_c').attr('name', nameText3);\r\n\r\n //event handler for newly created element\r\n jQuery('.button_del_badge_<?php echo $user_id; ?>').on('click', function () {\r\n jQuery(this).closest('.badge_item').remove();\r\n });\r\n\r\n });\r\n \r\n // Delete Ingredient\r\n jQuery('.button_del_badge_<?php echo $user_id; ?>').on('click', function() {\r\n jQuery(this).closest('.badge_item').remove();\r\n });\r\n\r\n\t\t\t\t// Delete Ingredient\r\n\t\t\t jQuery( document ).ready(function() {\r\n\t\t\t\t\tjQuery(document).on('click', '.field_type_<?php echo $user_id; ?>', function(e) {\r\n\t\t\t\t\tvar val = jQuery(this).val();\r\n\t\t\t\t\t\tif(val == 'dropdown'){\r\n\t\t\t\t\t\t\tjQuery(this).parent().next('td').find('#option_<?php echo $user_id ?>').css('display','block');\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tjQuery(this).parent().next('td').find('#option_<?php echo $user_id ?>').css('display','none');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n </script>\r\n </div>\r\n <?php } ?>\r\n </div>\r\n\r\n <input type=\"hidden\" name=\"action\" value=\"savecat\" />\r\n </form>\r\n\r\n <?php\r\n}", "public function category_add() {\n\t\t// Setup validation\n\t\t$this->data['validation'] = \"\";\n\t\t$this->data['category']\t= array('name' => '', 'url_name' => '');\n\t\t\n\t\t// Handle POST\n\t\tif ($this->mojo->input->post('category')) {\n\t\t\t// Get the category data\n\t\t\t$this->data['category']\t= $this->mojo->input->post('category');\n\t\t\t\n\t\t\t// Insert it!\n\t\t\tif ($this->mojo->blog_model->insert_category($this->data['category'])) {\n\t\t\t\t// It's success\n\t\t\t\t$response['result'] = 'success';\n\t\t\t\t$response['reveal_page'] = site_url('admin/addons/blog/categories_all');\n\t\t\t\t$response['message'] = 'Successfully created category';\n\t\t\t\t\n\t\t\t\texit($this->mojo->javascript->generate_json($response));\n\t\t\t} else {\n\t\t\t\t// There have been validation errors\n\t\t\t\t$response['result'] = 'error';\n\t\t\t\t$response['message'] = $this->mojo->blog_model->validation_errors;\n\t\t\t\t\n\t\t\t\t// Output the response\n\t\t\t\texit($this->mojo->javascript->generate_json($response));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Show the view\n\t\t$this->_view('category_add');\n\t}", "public function add_cat() { \n\t\tif (!$this->input->is_ajax_request()) {\n\t\t\tdie();\n\t\t}\n\t\t$main_cat_id = $this->input->post('main_cat_id');\n\t\t$title = $this->input->post('title'); \n\n\n\t\t$array_data['main_cat_id'] = $main_cat_id ; \n\t\t$array_data['title'] = $title ; \n\t\t$this->db->insert(\"categories\" , $array_data); \n\t\t$result = array('statu' => 'ok');\n\t\techo json_encode($result);\n\n\t}", "function do_ajax_edit_impr_text($textid, $wordlc) \n{\n chdir('..');\n\n list($html_content, $js_content) = make_form($textid, $wordlc);\n if ($wordlc == '') {\n echo \"$('#editimprtextdata').html(\" . prepare_textdata_js($html_content) . \");\"; \n } else {\n echo $js_content; \n }\n}", "function widget_ffes_feed_control() {\r\n $options = $newoptions = get_option('widget_ffes_feed');\r\n if ( $_POST['ffes-feed-submit'] ) {\r\n $newoptions['title'] = strip_tags(stripslashes($_POST['ffes-feed-title']));\r\n }\r\n if ( $options != $newoptions ) {\r\n $options = $newoptions;\r\n update_option('widget_ffes_feed', $options);\r\n }\r\n ?>\r\n <div style=\"text-align:right\">\r\n <label for=\"ffes-feed-title\" style=\"line-height:35px;display:block;\"><?php _e('Widget title:', 'ffes_widgets'); ?>\r\n <input type=\"text\" id=\"ffes-feed-title\" name=\"ffes-feed-title\" value=\"<?php echo wp_specialchars($options['title'], true); ?>\" /></label>\r\n <input type=\"hidden\" name=\"ffes-feed-submit\" id=\"ffes-feed-submit\" value=\"1\" />\r\n </div>\r\n <?php\r\n }", "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}", "function renderJSONcat () {\r\n\t\t$doc = &JFactory::getDocument();\r\n\t\t$doc -> setMimeEncoding('application/json');\r\n\t\t\r\n\t\t// get category params\r\n\t\t$category = $this -> category;\r\n\t\t$catparams = json_decode($category -> params);\r\n\t\t\r\n\t\t// generate urls\r\n\t\t$tmpl = JFactory::getApplication() -> input -> get('tmpl');\r\n\t\t$clayout = JFactory::getApplication() -> input -> get('clayout');\r\n\t\t$limit = JFactory::getApplication() -> input -> get('limit', $this -> pageNav -> limit);\r\n\t\t$limitstart = JFactory::getApplication() -> input -> get('limitstart', 0);\r\n\t\t$url = trim(JURI::base(), \"/\") . JRoute::_(FlexicontentHelperRoute::getCategoryRoute($this -> category -> id));\r\n\t\t$url_json = $url . '?clayout=' . $clayout . '&tmpl=' . $tmpl . '&limit=' . $limit;\r\n\t\t$url_prev = $url_json . '&limitstart=' . ($limitstart - $limit);\r\n\t\t$url_next = $url_json . '&limitstart=' . ($limitstart + $limit);\r\n\t\t\r\n\t\t$json = array('layout' => 'category');\r\n\t\tif($this -> params -> get ('display_cat_id', 1)) $json['id'] = $category -> id;\r\n\t\tif($this -> params -> get ('display_cat_title', 1)) $json['title'] = $category -> title;\r\n\t\tif($this -> params -> get ('display_cat_alias', 1)) $json['alias'] = $category -> alias;\r\n\t\tif($this -> params -> get ('display_cat_description', 1)) $json['description'] = $category -> description;\r\n\t\tif($this -> params -> get ('display_cat_image', 1)) $json['image'] = $catparams -> image ? JURI::base() . $catparams -> image : '';\r\n\t\tif($this -> params -> get ('display_cat_created', 1)) $json['created'] = $category -> created_time;\r\n\t\tif($this -> params -> get ('display_cat_modified', 1)) $json['modified'] = $category -> modified_time;\r\n\t\tif($this -> params -> get ('display_cat_metadesc', 1)) $json['metadesc'] = $category -> metadesc;\r\n\t\tif($this -> params -> get ('display_cat_metakey', 1)) $json['metakey'] = $category -> metakey;\r\n\t\tif($this -> params -> get ('display_cat_url', 1)) $json['url'] = $url;\r\n\t\tif($this -> params -> get ('display_cat_json', 1)) $json['json'] = $url . (strpos($url, '?') ? '&' : '?') . 'clayout=' . $clayout . '&tmpl=' . $tmpl;\r\n\t\tif($this -> params -> get ('display_cat_params', 0)) $json['params'] = $catparams;\r\n\r\n\t\t$json['total_items'] = $this -> pageNav -> total;\r\n\t\t$json['items_per_page'] = $this -> pageNav -> limit;\r\n\t\t$json['current_page'] = $this -> pageNav -> pagesCurrent;\r\n\t\t$json['total_pages'] = $this -> pageNav -> pagesTotal;\r\n\t\t$json['prev_page'] = ($this -> pageNav -> pagesCurrent <= 1 ? '' : $url_prev);\r\n\t\t$json['next_page'] = ($this -> pageNav -> pagesCurrent >= $this -> pageNav -> pagesTotal ? '' : $url_next);\r\n\t\t\r\n\t\t// process category items\r\n\t\t$json['items'] = array();\r\n\t\t\r\n\t\tforeach($this -> items as $item) {\r\n\t\t\t$url = trim(JURI::base(), \"/\") . JRoute::_(FlexicontentHelperRoute::getItemRoute($item -> slug, $item -> categoryslug));\r\n\t\t\t$json_item = array();\r\n\t\t\t$json_item['layout'] = 'item';\r\n\t\t\tif($this -> params -> get ('display_item_id', 1)) $json_item['id'] = $item -> id;\r\n\t\t\tif($this -> params -> get ('display_item_title', 1)) $json_item['title'] = $item -> title;\r\n\t\t\tif($this -> params -> get ('display_item_alias', 1)) $json_item['alias'] = $item -> alias;\r\n\t\t\tif($this -> params -> get ('display_item_author', 1)) $json_item['author'] = $item -> author;\r\n\t\t\tif($this -> params -> get ('display_item_description', 1)) $json_item['description'] = $item -> text;\r\n\t\t\tif($this -> params -> get ('display_item_created', 1)) $json_item['created'] = $item -> created;\r\n\t\t\tif($this -> params -> get ('display_item_modified', 1)) $json_item['modified'] = $item -> modified;\r\n\t\t\tif($this -> params -> get ('display_item_metadesc', 1)) $json_item['metadesc'] = $item -> metadesc;\r\n\t\t\tif($this -> params -> get ('display_item_metakey', 1)) $json_item['metakey'] = $item -> metakey;\r\n\t\t\tif($this -> params -> get ('display_item_url', 1)) $json_item['url'] = $url;\r\n\t\t\tif($this -> params -> get ('display_item_json', 1)) $json_item['json'] = $url . (strpos($url, '?') ? '&' : '?') . 'ilayout=' . $clayout . '&tmpl=' . $tmpl;\r\n\t\t\tif($this -> params -> get ('display_item_params', 0)) $json_item['params'] = json_decode($item -> params);\r\n\t\t\tif($this -> params -> get ('display_item_fields', 1)) {\r\n\t\t\t\t$fields = array();\r\n\t\t\t\tif(isset($item -> positions)) {\r\n\t\t\t\t\tforeach($item -> positions as $position) {\r\n\t\t\t\t\t\tforeach($position as $field) {\r\n\t\t\t\t\t\t\t$fields[$field -> name] = array();\r\n\t\t\t\t\t\t\tif($this -> params -> get ('display_item_field_label', 1)) $fields[$field -> name]['label'] = $field -> label;\r\n\t\t\t\t\t\t\tif($this -> params -> get ('display_item_field_value', 1)) {\r\n\t\t\t\t\t\t\t\t$fields[$field -> name]['value'] = $item -> fields[$field -> name] -> iscore ? $item -> {$field -> name} : $item -> fieldvalues [$field -> id];\r\n\t\t\t\t\t\t\t\t// process serialized data in the value field into arrays\r\n\t\t\t\t\t\t\t\t$value = unserialize($fields[$field -> name]['value']);\r\n\t\t\t\t\t\t\t\tif($value) $fields[$field -> name]['value'] = $value;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif($this -> params -> get ('display_item_field_display', 1)) $fields[$field -> name]['display'] = $field -> display;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$json_item['fields'] = $fields;\r\n\t\t\t}\r\n\t\t\t$json['items'][] = $json_item;\r\n\t\t}\r\n\t\t\r\n\t\tif (JFactory::getApplication() -> input -> get('callback', '') != '') {\r\n\t\t\treturn JFactory::getApplication() -> input -> get('callback') . '(' . json_encode($json) . ')';\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn json_encode($json);\r\n\t\t}\r\n\t}", "function classiera_implement_ajax(){\t\t\r\n\tif(isset($_POST['mainCat'])){\r\n\t\t$mainCatSlug = $_POST['mainCat'];\r\n\t\t$mainCatIDSearch = get_category_by_slug($mainCatSlug);\r\n\t\t$mainCatID = $mainCatIDSearch->term_id;\r\n\t\t$cat_child = get_term_children($mainCatID, 'category' );\r\n\t\tif (!empty($cat_child)) {\t\r\n\t\t\t$categories= get_categories('child_of='.$mainCatID.'&hide_empty=0');\r\n\t\t\t foreach ($categories as $cat) {\t\t\t\t\r\n\t\t\t\t$option .= '<option value=\"'.$cat->slug.'\">';\r\n\t\t\t\t$option .= $cat->cat_name;\t\t\t\t\r\n\t\t\t\t$option .= '</option>';\r\n\t\t\t }\r\n\t\t\t echo '<option value=\"-1\" selected=\"selected\" disabled=\"disabled\">'.esc_html__( \"Select Sub Category..\", \"classiera\" ).'</option>'.$option;\r\n\t\t\tdie();\r\n\t\t}else{\r\n\t\t\techo '<option value=\"-1\" disabled=\"disabled\">'.esc_html__( \"No Sub Category Found\", \"classiera\" ).'</option>';\r\n\t\t}\r\n\t} // end if\r\n}", "public function afterSubmit() {\n\t\t$this->setValue($this->serializeData($this->getValue()));\n\t}", "function gecapa_mant_BeforeShow()\n{\n $gecapa_mant_BeforeShow = true;\n//End gecapa_mant_BeforeShow\n\n//Custom Code @300-8D83BE6B\n// ------------------------- Si agrega una categorža, tomar la categoria padre del QueryString\n global $gecapa_mant;\n\t\n\tIF (!$gecapa_mant->EditMode) {\n\t\t$liCatPadre = CCGetParam(\"pPadre\", 0);\n\t\tif (is_null($liCatPadre) or empty ($liCatPadre)) $liCatPadre = 0;\n\t\t$gecapa_mant->lkNuevo->Visible = False;\n\t\t$gecapa_mant->cat_CodPadre->SetValue($liCatPadre);\n\t}\n if (!isset($_GET[\"pPadre\"]) AND !isset($_GET[\"cat_Codigo\"])) $gecapa_mant->Visible = False;\n if (isset($_GET[\"pPadre\"])) {\n\t\t$gecapa_mant->tbTitulo1->SetValue(\"NUEVA CATEGORIA\"); } \n if (isset($_GET[\"cat_Codigo\"])) {\n\t\t$gecapa_mant->tbTitulo1->SetValue(\"MODIFICACION DE CATEGORIA\"); } \n// -------------------------\n//End Custom Code\n\n//Close gecapa_mant_BeforeShow @288-96845E7F\n return $gecapa_mant_BeforeShow;\n}", "function cat_create_link()\n{\n return Parrot::getInstance()->getUrl(\"admin/category/create\");\n}", "function widget_text_save_callback() {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$data = $_POST['data'];\r\n\r\n\t\t$vals = explode('&', $data);\r\n\r\n\t\tforeach($vals as $item){\r\n\t\t\t$arr = explode('=', $item);\r\n\t\t\t$key = urldecode($arr[0]);\r\n\t\t\t$val = urldecode($arr[1]);\r\n\t\t\tif(endsWith($key, '[text]')) {\r\n\t\t\t\t// so this a Text Widget submission, continue to process\r\n\t\t\t\t\r\n\t\t\t\t$used_shortcodes = array();\r\n\t\t\t\t$replacements = array();\r\n\t\t\t\t$css = $this->cactus_parse_inlinecss($val, $used_shortcodes, $replacements);\r\n\t\t\t\t\r\n\t\t\t\tfile_put_contents(dirname(__FILE__) . '/log.txt',$css, FILE_APPEND);\r\n\t\t\t\tif($css != ''){\r\n\t\t\t\t\t$new_val = $val;\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach($replacements as $replace){\r\n\t\t\t\t\t\t$new_val = str_replace($replace[0], $replace[1], $new_val);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$widget = str_replace('[text]', '', $key);\r\n\r\n\t\t\t\t\t// update global custom CSS, to be called in every pages\r\n\t\t\t\t\t$global_custom_css = get_option('ct_custom_css');\r\n\t\t\t\t\tif(!isset($global_custom_css) || !is_array($global_custom_css)){\r\n\t\t\t\t\t\t$global_custom_css = array();\r\n\t\t\t\t\t\tadd_option('ct_custom_css', $global_custom_css);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$global_custom_css[$widget] = $css;\r\n\t\t\t\t\tupdate_option('ct_custom_css', $global_custom_css);\r\n\r\n\t\t\t\t\t$shortcodes = get_option('ct_shortcodes_used_in_widgets');\r\n\t\t\t\t\tif(!isset($shortcodes) || !is_array($shortcodes)){\r\n\t\t\t\t\t\t$shortcodes = array();\r\n\t\t\t\t\t\tadd_option('ct_shortcodes_used_in_widgets', $shortcodes);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$shortcodes[$widget] = $used_shortcodes;\r\n\t\t\t\t\tupdate_option('ct_shortcodes_used_in_widgets', $shortcodes);\r\n\r\n\t\t\t\t\tpreg_match('/(.*)\\[(.*)\\]/', $widget, $matches);\r\n\t\t\t\t\t$id_base = substr($matches[1], 7);\r\n\r\n\t\t\t\t\t$widget_options = get_option('widget_' . $id_base);\r\n\r\n\t\t\t\t\t$widget_options[$matches[2]]['text'] = $new_val;\r\n\r\n\t\t\t\t\tupdate_option('widget_' . $id_base, $widget_options);\r\n\r\n\t\t\t\t\t// do this silently. So echo empty;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\twp_die(); // this is required to terminate immediately and return a proper response\r\n\t}", "function colorpicker_field_edit_category( $term ) { \r\n\t$color = get_term_meta( $term->term_id, '_category_color', true ); \r\n\t$color = ( ! empty( $color ) ) ? \"#{$color}\" : '#ffffff'; ?> \r\n\t<tr class=\"form-field term-colorpicker-wrap\"> \r\n\t<th scope=\"row\">\r\n\t<label for=\"term-colorpicker\">Select Color</label>\r\n\t</th> \r\n\t<td> \r\n\t<input name=\"_category_color\" value=\"<?php echo $color; ?>\" class=\"colorpicker\" id=\"term-colorpicker\" /> \r\n\t<p class=\"description\">This is the field description where you can tell the user how the color is used in the theme.</p> \r\n\t</td> \r\n\t</tr> <?php }", "function categoryEdit($str=''){\n\tif(startSession() && isset($_SESSION['UserID']))\n\t{\n\n\t\t$myCatID = ($_GET[\"id\"]);\n\t\t# ADD - DateCreated, DateAssigned, LastUpdated to table\n\t\t$sql = \"select CatID, CatTitle, CatType, CatSort, CatDescription, CatVisible\n\t\t\tFROM ma_Categories WHERE CatID = $myCatID ;\";\n\n\t\t$result = mysqli_query(IDB::conn(),$sql) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\t\tif (mysqli_num_rows($result) > 0)//at least one record!\n\t\t{//show results\n\n\t\t# shows details from a single customer, and preloads their first name in a form.\n\t\t$str .= '\n\t\t<script type=\"text/javascript\" src=\"' . VIRTUAL_PATH . 'include/util.js\"></script>\n\n\t\t<script type=\"text/javascript\">\n\n\t\t\tfunction checkForm(thisForm)\n\n\t\t\t{//check form data for valid info\n\t\t\t\tif(empty(thisForm.FirstName,\"Please Enter Customer\\'s First Name\")){return false;}\n\t\t\t\tif(empty(thisForm.LastName,\"Please Enter Customer\\'s Last Name\")){return false;}\n\t\t\t\tif(!isEmail(thisForm.Email,\"Please Enter a Valid Email\")){return false;}\n\t\t\t\treturn true;//if all is passed, submit!\n\t\t\t}\n\n\t\t</script>';\n\n\n\t\t$str .= '<form action=\"' . THIS_PAGE . '\" method=\"post\" onsubmit=\"return checkForm(this);\">';\n\n\t\t\twhile ($row = mysqli_fetch_assoc($result))\n\t\t\t{//dbOut() function - 'wrapper' to strip slashes, etc. of data leaving db\n\t\t\t\t$catID \t\t\t\t\t\t= dbOut($row['CatID']);\n\t\t\t\t$catTitle \t\t\t= dbOut($row['CatTitle']);\n\t\t\t\t$catType \t\t\t\t\t= dbOut($row['CatType']);\n\t\t\t\t$catSort \t\t\t\t= dbOut($row['CatSort']);\n\t\t\t\t$catDescription\t\t= dbOut($row['CatDescription']);\n\t\t\t\t$catVisible \t\t\t= dbOut($row['CatVisible']);\n\n\t\t\t\t$str .= '<form action=\"' . THIS_PAGE . '\" method=\"post\"\n\t\t\t\t\tonsubmit=\"return checkForm(this);\">\n\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"CatID\" value=\"' . $catID . '\" />\n\n\t\t\t\t\t\t\t<h4 align=\"center\">Edit Catagory (' . $catTitle . ')</h4>\n\n\t\t\t\t\t\t\t<!-- inner container -->\n\t\t\t\t\t\t\t<div class=\"class=\"col-sm-9 pull-right\" style=\"background-color: #aaa;\">\n\n\t\t\t\t\t\t\t\t<!-- left container -->\n\t\t\t\t\t\t\t\t<div class=\"col-sm-8 pull-left\" style=\"background-color: #ddd ;\">\n\n\t\t\t\t\t\t\t\t\t<div class=\"row \">\n\t\t\t\t\t\t\t\t\t\t<div class=\"pull-middle\">\n\n\t\t\t\t\t\t\t\t\t\t\t<select class=\"selectpicker\" name=\"CatType\" required>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"IC\" select=\"select\">Category Type: IC</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"OOC\" >Category Type: OOC</option>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\n\t\t\t\t\t\t\t\t\t\t\t<select class=\"selectpicker\" name=\"CatSort\" required>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"organization\" select=\"select\">Group By: Indivual</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"team\" >Group By: Group/Team</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"person\" >Group By: Organization</option>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\n\t\t\t\t\t\t\t\t\t\t\t<select class=\"selectpicker\" name=\"CatSort\" required>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"0\" select=\"select\">Visible: Yes</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"1\" >Visible: No</option>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div><!-- END Container -->\n\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\tclass=\"col-sm-12\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\n\t\t\t\t\t\t\t\t\t\t\tname=\"CatTitle\"\n\t\t\t\t\t\t\t\t\t\t\tvalue=\"' . $catTitle . '\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Team/Group/Character Name here\"/>\n\t\t\t\t\t\t\t\t\t</div><!-- END Container -->\n\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<textarea\n\t\t\t\t\t\t\t\t\t\t\tname=\"CatDescription\"\n\n\t\t\t\t\t\t\t\t\t\t\tclass=\"autoExpand col-sm-12\"\n\t\t\t\t\t\t\t\t\t\t\trows=\"3\"\n\t\t\t\t\t\t\t\t\t\t\tdata-min-rows=\"3\"\n\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Catagroy Description\"\n\t\t\t\t\t\t\t\t\t\t\t>' . $catDescription . '</textarea>\n\t\t\t\t\t\t\t\t\t</div><!-- end container-->\n\n\t\t\t\t\t\t\t\t</div><!-- end inner container -->\n\n\t\t\t\t\t\t\t<div class=\"clearfix\">\n\t\t\t\t\t\t\t\t<br /><br />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t\t\tstyle=\"background-color: #a0a;\">\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"act\" value=\"categoryRevise\" />\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\t<input class=\"btn btn-primary btn-xs outline\" type=\"submit\" value=\"Edit Catagory\">\n\n\t\t\t\t\t\t\t\t&nbsp; &nbsp;\n\n\t\t\t\t\t\t\t\t<a class=\"btn btn-primary btn-xs outline\" href=\"' . THIS_PAGE . '\">Exit Event</a>';\n\n\t\t\t\t\t\t\t\tif(startSession() && isset($_SESSION['UserID'])){\n\t\t\t\t\t\t\t\t\t$str .= '&nbsp; &nbsp;\n\n\t\t\t\t\t\t\t\t\t<!-- set to invisible actually -->\n\t\t\t\t\t\t\t\t\t<a class=\"btn btn-primary btn-xs outline\" href=\"' . THIS_PAGE . '?act=categoryRemove&id=' . $catID . '&categoryName=' . formatUrl($catTitle) . '\">Remove Catagory</a>';\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$str .= '</div>\n\n\t\t\t\t\t\t</form>';\n\n\t\t\t\t\t}\n\n\t\t\t\t}else{//no records\n\t\t\t\t\t$str .= '<div align=\"center\">\n\t\t\t\t\t\t<h3>Currently No Events Listed in the Timeline.</h3>\n\t\t\t\t\t</div>';\n\t\t\t\t}\n\n\t\t\treturn $str;\n\n\t\t\t@mysqli_free_result($result); //free resources\n\n\t\t} else { #redirect back to timeline\n\n\t\t\t#myRedirect('index.php');\n\t\t}\n}", "protected function doConcatenateJavaScript() {}", "function am2_vanity_add_taxonomy_fields( $term ) { //check for existing featured ID\n $t_id = $term->term_id;\n $vanity_urls = get_option('am2_vanity_urls');\n\t$value = '';\n\tif(!empty($vanity_urls[$_REQUEST['taxonomy'].\"_\".$term->term_id]['url'])){\n\t\t$value = $vanity_urls[$_REQUEST['taxonomy'].\"_\".$term->term_id]['url'];\n\t}\n?>\n<tr class=\"form-field\">\n\t<th scope=\"row\" valign=\"top\"><label for=\"_am2_vanity_url\"><?php _e('Vanity URL'); ?></label></th>\n\t<td>\n \t<?php echo site_url().'/'; ?>\n\t\t<input type=\"hidden\" name=\"_am2_vanity_term_name\" value=\"<?php echo $_REQUEST['taxonomy']; ?>\" />\n <input type=\"text\" name=\"_am2_vanity_url\" id=\"_am2_vanity_url\" placeholder=\"any-url\" size=\"3\" style=\"width:60%;\" value=\"<?php echo $value; ?>\"><br />\n <span class=\"description\"><?php _e('This URL will replace the dafault category URL with new one.'); ?></span>\n </td>\n</tr>\n<?php\n}", "protected function getInput()\n\t{\n\n\t\tob_start();\n\t\t$native = $this->form->jevdata[$this->name][\"native\"];\n\t\t$clistChoice = $this->form->jevdata[$this->name][\"clistChoice\"];\n\t\t$clist = $this->form->jevdata[$this->name][\"clist\"];\n\t\t$nativeCals = $this->form->jevdata[$this->name][\"nativeCals\"];\n\n\t\t$params = ComponentHelper::getParams(JEV_COM_COMPONENT);\n\n\t\tJLoader::register('JEventsCategory', JEV_ADMINPATH . \"/libraries/categoryClass.php\");\n\n\t\t$categories = JEventsCategory::categoriesTree();\n\n\n\t\tif ($native && $clistChoice)\n\t\t{\n\t\t\t?>\n\t\t\t<script type=\"text/javascript\">\n function preselectCategory(select) {\n var lookup = new Array();\n lookup[0] = 0;\n\t\t\t\t\t<?php\n\t\t\t\t\tforeach ($nativeCals as $nc)\n\t\t\t\t\t{\n\t\t\t\t\t\techo 'lookup[' . $nc->ics_id . ']=' . $nc->catid . ';';\n\t\t\t\t\t}\n\t\t\t\t\tif ((int) $params->get('defaultcat', 1) === 0)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"if(!jQuery('#catid').is(':hidden')) { document.adminForm['catid'].value=0;}\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"document.adminForm['catid'].value=lookup[select.value];\";\n\t\t\t\t\t}\n\n\t\t\t\t\t?>\n // trigger Bootstrap Chosen replacement\n try {\n jQuery(document.adminForm['catid']).trigger(\"liszt:updated\");\n }\n catch (e) {\n }\n }\n\t\t\t</script>\n\t\t\t<?php\n\t\t\techo $clist;\n\t\t}\n\t\telse if ($clistChoice)\n\t\t{\n\t\t\techo $clist;\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo $clist;\n\t\t}\n\t\t$input = ob_get_clean();\n\n\t\tJLoader::register('JEVHelper', JPATH_SITE . \"/components/com_jevents/libraries/helper.php\");\n\t\tJEVHelper::ConditionalFields($this->element, $this->form->getName());\n\n\t\treturn $input;\n\n\t}", "protected function finalize()\n\t{\n\t\tglobal $ilCtrl, $lng;\n\t\t\n\t\t// to make exercise gui load assignment\n\t\t$_GET[\"ass_id\"] = $_REQUEST[\"ass\"];\n\t\t\t\t\n\t\t// #11173 - ref_id is needed for notifications\n\t\t$exc_ref_id = array_shift(ilObject::_getAllReferences($_REQUEST[\"exc\"]));\n\t\n\t\tinclude_once \"Modules/Exercise/classes/class.ilObjExerciseGUI.php\";\n\t\t$exc_gui = new ilObjExerciseGUI(null, $exc_ref_id, true);\n\t\t$exc_gui->submitBlog($this->node_id);\n\t\t\n\t\tilUtil::sendSuccess($lng->txt(\"blog_finalized\"), true);\n\t\t$ilCtrl->redirect($this, \"render\");\n\t}", "public function es_edit_category_fields( $term, $taxonomy ) {\n\n\t\t\t$banner_id = absint( get_woocommerce_term_meta( $term->term_id, 'banner_id', true ) );\n\n\t\t\tif ( $banner_id ) {\n\t\t\t\t$image = wp_get_attachment_thumb_url( $banner_id );\n\t\t\t} else {\n\t\t\t\t$image = wc_placeholder_img_src();\n\t\t\t}\n\t\t\t?>\n\t\t\t<tr class=\"form-field\">\n\t\t\t\t<th scope=\"row\" valign=\"top\"><label><?php _e( 'Banner', 'woocommerce' ); ?></label></th>\n\t\t\t\t<td>\n\t\t\t\t\t<div id=\"product_cat_banner\" style=\"float:left;margin-right:10px;\"><img src=\"<?php echo esc_url( $image ); ?>\" width=\"60px\" height=\"60px\" /></div>\n\t\t\t\t\t<div style=\"line-height:60px;\">\n\t\t\t\t\t\t<input type=\"hidden\" id=\"product_cat_banner_id\" name=\"product_cat_banner_id\" value=\"<?php echo esc_attr( $banner_id ); ?>\" />\n\t\t\t\t\t\t<button type=\"submit\" class=\"banner_upload_image_button button\"><?php _e( 'Upload/Add image', 'woocommerce' ); ?></button>\n\t\t\t\t\t\t<button type=\"submit\" class=\"banner_remove_image_button button\"><?php _e( 'Remove image', 'woocommerce' ); ?></button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<script type=\"text/javascript\">\n\n\t\t\t\t\t\t// Uploading files\n\t\t\t\t\t\tvar file_frame;\n\n\t\t\t\t\t\tjQuery( document ).on( 'click', '.banner_upload_image_button', function( event ) {\n\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t// Create the media frame.\n\t\t\t\t\t\t\tfile_frame = wp.media.frames.downloadable_file = wp.media({\n\t\t\t\t\t\t\t\ttitle: '<?php _e( 'Choose an image', 'woocommerce' ); ?>',\n\t\t\t\t\t\t\t\tbutton: {\n\t\t\t\t\t\t\t\t\ttext: '<?php _e( 'Use image', 'woocommerce' ); ?>',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tmultiple: false\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// When an image is selected, run a callback.\n\t\t\t\t\t\t\tfile_frame.on( 'select', function() {\n\t\t\t\t\t\t\t\tattachment = file_frame.state().get('selection').first().toJSON();\n\n\t\t\t\t\t\t\t\tjQuery('#product_cat_banner_id').val( attachment.id );\n\t\t\t\t\t\t\t\tjQuery('#product_cat_banner img').attr('src', attachment.url );\n\t\t\t\t\t\t\t\tjQuery('.banner_remove_image_button').show();\n\n\t\t\t\t\t\t\t\tfile_frame = undefined;\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// Finally, open the modal.\n\t\t\t\t\t\t\tfile_frame.open();\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tjQuery( document ).on( 'click', '.banner_remove_image_button', function( event ) {\n\t\t\t\t\t\t\tjQuery('#product_cat_banner img').attr('src', '<?php echo esc_url( wc_placeholder_img_src() ); ?>');\n\t\t\t\t\t\t\tjQuery('#product_cat_banner_id').val('');\n\t\t\t\t\t\t\tjQuery('.banner_remove_image_button').hide();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t</script>\n\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<?php\n\t\t}", "function target_add_cat($cat)\n{\n\tif ($GLOBALS['VERBOSE']) pf('...'. $cat['name']);\n\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'cat (id, name, view_order, cat_opt) \n\t VALUES('. (int)$cat['id'] .','. _esc($cat['name']) .','. (int)$cat['view_order'] .', 3)');\n\t$GLOBALS['cat_map'][ $cat['id'] ] = $cat['id'];\n/*\nfud_use('cat.inc', true);\n$nc = new fud_cat;\n$nc->name = $c->name;\n$nc->description = $c->description;\n$nc->view_order = $c->disporder;\n$nc->cat_opt = 1|2;\t// This should be the default in cat.inc. Fix in next release and del this line.\n$GLOBALS['cat_map'][$c->fid] = $nc->add('LAST');\t// FIRST should also be defaulted.\n*/\n}", "public function beforeSave() {\n $this->title = CHtml::encode(strip_tags($this->title));\n $this->sku = CHtml::encode(strip_tags($this->sku));\n return parent::beforeSave();\n }", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "public function after_footer_scripts_code () {\n // Sets initial JS variables value\n ?>\n <script type=\"text/javascript\">\n ct_current_role = '<?php echo $this->role; ?>';\n ct_current_orderby = '<?php echo $this->orderby; ?>';\n ct_current_order = '<?php echo $this->order; ?>';\n ct_current_page = <?php echo $this->page; ?>;\n ct_total_pages = <?php echo $this->total_pages; ?>;\n </script>\n <?php\n }", "public function config_category()\n {\n require_javascript('checking');\n\n // Load up some basic details\n $category = $this->category;\n $post_url = build_url(array('page' => '_SELF', 'type' => 'set', 'id' => $category, 'redirect' => get_param_string('redirect', null)), '_SELF');\n $category_description = do_lang_tempcode('CONFIG_CATEGORY_DESCRIPTION__' . $category);\n\n // Find all options in category\n $hooks = find_all_hooks('systems', 'config');\n $options = array();\n foreach (array_keys($hooks) as $hook) {\n require_code('hooks/systems/config/' . filter_naughty_harsh($hook));\n $ob = object_factory('Hook_config_' . filter_naughty_harsh($hook));\n $option = $ob->get_details();\n if (($GLOBALS['CURRENT_SHARE_USER'] === null) || ($option['shared_hosting_restricted'] == 0)) {\n if ($category == $option['category']) {\n if ($ob->get_default() !== null) {\n if (!isset($option['order_in_category_group'])) {\n $option['order_in_category_group'] = 100;\n }\n $option['ob'] = $ob;\n $option['name'] = $hook;\n $options[$option['group']][$hook] = $option;\n }\n }\n }\n }\n\n // Add in special ones\n if ($category == 'SITE') {\n $options['INTERNATIONALISATION']['timezone'] = array('name' => 'timezone', 'human_name' => 'TIMEZONE', 'c_value' => '', 'type' => 'special', 'category' => 'SITE', 'group' => 'INTERNATIONALISATION', 'explanation' => 'DESCRIPTION_TIMEZONE_SITE', 'shared_hosting_restricted' => 0, 'order_in_category_group' => 1);\n }\n require_code('files');\n $upload_max_filesize = (ini_get('upload_max_filesize') == '0') ? do_lang('NA') : clean_file_size(php_return_bytes(ini_get('upload_max_filesize')));\n $post_max_size = (ini_get('post_max_size') == '0') ? do_lang('NA') : clean_file_size(php_return_bytes(ini_get('post_max_size')));\n\n // Sort the groups\n $all_known_groups = array();\n foreach (array_keys($options) as $group) {\n $_group = do_lang($group);\n\n $_group = strtolower(trim(cms_preg_replace_safe('#(&.*;)|[^\\w\\s]#U', '', strip_tags($_group))));\n if ((isset($all_known_groups[$_group])) && ($all_known_groups[$_group] != $group)) {\n $_group = 'std_' . $group; // If cat names translate to same things or are in non-latin characters like Cyrillic\n }\n\n $all_known_groups[$_group] = $group;\n }\n $advanced_key = strtolower(trim(cms_preg_replace_safe('#(&.*;)|[^\\w\\s]#U', '', do_lang('ADVANCED'))));\n ksort($all_known_groups);\n if (isset($all_known_groups[$advanced_key])) { // Advanced goes last\n $temp = $all_known_groups[$advanced_key];\n unset($all_known_groups[$advanced_key]);\n $all_known_groups[$advanced_key] = $temp;\n }\n\n // Render option groups\n $groups_arr = array();\n require_code('form_templates');\n $_groups = array();\n foreach ($all_known_groups as $group_codename) {\n if (!isset($options[$group_codename])) {\n continue;\n }\n\n $options_in_group = $options[$group_codename];\n\n $all_orders_default = true;\n foreach ($options_in_group as $name => $option) {\n if ($option['order_in_category_group'] != 100) {\n $all_orders_default = false;\n }\n $options_in_group[$name]['human_name_trans'] = do_lang($option['human_name']);\n }\n if ($all_orders_default) {\n sort_maps_by($options_in_group, 'human_name_trans');\n } else {\n sort_maps_by($options_in_group, 'order_in_category_group');\n }\n\n $out = '';\n foreach ($options_in_group as $name => $option) {\n // Language strings\n $human_name = do_lang_tempcode($option['human_name']);\n $_explanation = do_lang($option['explanation'], null, null, null, null, false);\n if ($_explanation === null) {\n $_explanation = do_lang('CONFIG_GROUP_DEFAULT_DESCRIP_' . $option['group'], null, null, null, null, false);\n if ($_explanation === null) {\n // So an error shows\n $_explanation = do_lang($option['explanation']);\n $explanation = do_lang_tempcode($option['explanation']);\n } else {\n $explanation = do_lang_tempcode('CONFIG_GROUP_DEFAULT_DESCRIP_' . $option['group']);\n }\n } else {\n $explanation = do_lang_tempcode($option['explanation']);\n }\n $default = get_default_option($name);\n\n if (isset($option['required'])) {\n $required = $option['required'];\n } else {\n if ($option['type'] == 'integer') {\n $required = true;\n } elseif ($option['type'] == 'float') {\n $required = true;\n } elseif ($option['type'] == 'list') {\n $required = true;\n } else {\n $required = false;\n }\n }\n\n // Render field inputter\n switch ($option['type']) {\n case 'special':\n switch ($name) {\n case 'timezone':\n $list = '';\n $timezone = get_site_timezone();\n foreach (get_timezone_list() as $_timezone => $timezone_nice) {\n $list .= static_evaluate_tempcode(form_input_list_entry($_timezone, $_timezone == $timezone, $timezone_nice));\n }\n $out .= static_evaluate_tempcode(form_input_list($human_name, $explanation, 'timezone', make_string_tempcode($list)));\n break;\n\n default:\n $ob = $option['ob'];\n $out .= static_evaluate_tempcode($ob->field_inputter($name, $option, $human_name, $explanation));\n break;\n }\n break;\n\n case 'integer':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, ($default == '') ? do_lang_tempcode('BLANK_EM') : make_string_tempcode(escape_html($default)));\n $out .= static_evaluate_tempcode(form_input_integer($human_name, $explanation_with_default, $name, intval(get_option($name)), $required));\n break;\n\n case 'float':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, escape_html(($default == '') ? do_lang_tempcode('BLANK_EM') : make_string_tempcode(float_format(floatval($default)))));\n $out .= static_evaluate_tempcode(form_input_float($human_name, $explanation_with_default, $name, floatval(get_option($name)), $required));\n break;\n\n case 'line':\n case 'transline':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, ($default == '') ? do_lang_tempcode('BLANK_EM') : make_string_tempcode(escape_html($default)));\n $out .= static_evaluate_tempcode(form_input_line($human_name, $explanation_with_default, $name, get_option($name), $required, null, 100000));\n break;\n\n case 'text':\n case 'transtext':\n $out .= static_evaluate_tempcode(form_input_text($human_name, $explanation, $name, get_option($name), $required, null, true));\n break;\n\n case 'comcodeline':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, ($default == '') ? do_lang_tempcode('BLANK_EM') : make_string_tempcode(escape_html($default)));\n $out .= static_evaluate_tempcode(form_input_line_comcode($human_name, $explanation_with_default, $name, get_option($name), $required));\n break;\n\n case 'comcodetext':\n $out .= static_evaluate_tempcode(form_input_text_comcode($human_name, $explanation, $name, get_option($name), $required, null, true));\n break;\n\n case 'list':\n $_default = make_string_tempcode(escape_html($default));\n $list = '';\n if (!$required) {\n $list .= static_evaluate_tempcode(form_input_list_entry('', false, do_lang_tempcode('NA_EM')));\n }\n $_value = get_option($name);\n $values = explode('|', $option['list_options']);\n foreach ($values as $value) {\n $__value = str_replace(' ', '__', $value);\n $_option_text = do_lang('CONFIG_OPTION_' . $name . '_VALUE_' . $__value, null, null, null, null, false);\n if ($_option_text !== null) {\n $option_text = do_lang_tempcode('CONFIG_OPTION_' . $name . '_VALUE_' . $__value);\n if ($value == $default) {\n $_default = $option_text;\n }\n } else {\n $option_text = make_string_tempcode($value);\n }\n $list .= static_evaluate_tempcode(form_input_list_entry($value, $_value == $value, $option_text));\n }\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, ($default == '') ? do_lang_tempcode('BLANK_EM') : $_default);\n $out .= static_evaluate_tempcode(form_input_list($human_name, $explanation_with_default, $name, make_string_tempcode($list), null, false, false));\n break;\n\n case 'tick':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, escape_html(($default == '1') ? do_lang('YES') : do_lang('NO')));\n $out .= static_evaluate_tempcode(form_input_tick($human_name, $explanation_with_default, $name, get_option($name) == '1'));\n break;\n\n case 'username':\n $out .= static_evaluate_tempcode(form_input_username($human_name, $explanation, $name, get_option($name), $required, false));\n break;\n\n case 'colour':\n $out .= static_evaluate_tempcode(form_input_colour($human_name, $explanation, $name, get_option($name), $required));\n break;\n\n case 'date':\n $out .= static_evaluate_tempcode(form_input_date($human_name, $explanation, $name, $required, false, false, intval(get_option($name)), 40, intval(date('Y')) - 20, null));\n break;\n\n case 'forum':\n if ((get_forum_type() == 'cns') && (addon_installed('cns_forum'))) {\n $current_setting = get_option($name);\n if (!is_numeric($current_setting)) {\n $_current_setting = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_forums', 'id', array('f_name' => $current_setting));\n if ($_current_setting === null) {\n if ($required) {\n $current_setting = strval(db_get_first_id());\n attach_message(do_lang_tempcode('FORUM_CURRENTLY_UNSET', $human_name), 'notice');\n } else {\n $current_setting = null;\n }\n } else {\n $current_setting = strval($_current_setting);\n }\n }\n $out .= static_evaluate_tempcode(form_input_tree_list($human_name, $explanation, $name, null, 'choose_forum', array(), $required, $current_setting));\n } else {\n $out .= static_evaluate_tempcode(form_input_line($human_name, $explanation, $name, get_option($name), $required));\n }\n break;\n\n case 'forum_grouping':\n if (get_forum_type() == 'cns') {\n $tmp_value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_forum_groupings', 'id', array('c_title' => get_option($name)));\n\n require_code('cns_forums2');\n $_list = new Tempcode();\n if (!$required) {\n $_list->attach(form_input_list_entry('', false, do_lang_tempcode('NA_EM')));\n }\n $_list->attach(cns_create_selection_list_forum_groupings(null, $tmp_value));\n $out .= static_evaluate_tempcode(form_input_list($human_name, $explanation, $name, $_list));\n } else {\n $out .= static_evaluate_tempcode(form_input_line($human_name, $explanation, $name, get_option($name), $required));\n }\n break;\n\n case 'usergroup':\n case 'usergroup_not_guest':\n if (get_forum_type() == 'cns') {\n $tmp_value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_groups', 'id', array($GLOBALS['FORUM_DB']->translate_field_ref('g_name') => get_option($name)));\n\n require_code('cns_groups');\n $_list = new Tempcode();\n if (!$required) {\n $_list->attach(form_input_list_entry('', false, do_lang_tempcode('NA_EM')));\n }\n $_list->attach(cns_create_selection_list_usergroups($tmp_value, $option['type'] == 'usergroup'));\n $out .= static_evaluate_tempcode(form_input_list($human_name, $explanation, $name, $_list));\n } else {\n $out .= static_evaluate_tempcode(form_input_line($human_name, $explanation, $name, get_option($name), $required));\n }\n break;\n\n default:\n fatal_exit('Invalid config option type: ' . $option['type'] . ' (for ' . $option['name'] . ')');\n }\n }\n\n // Render group\n $group_title = do_lang_tempcode($group_codename);\n $_group_description = do_lang('CONFIG_GROUP_DESCRIP_' . $group_codename, escape_html($post_max_size), escape_html($upload_max_filesize), null, null, false);\n if ($_group_description === null) {\n $group_description = new Tempcode();\n } else {\n $group_description = do_lang_tempcode('CONFIG_GROUP_DESCRIP_' . $group_codename, escape_html($post_max_size), escape_html($upload_max_filesize));\n }\n $groups_arr[] = array('GROUP_DESCRIPTION' => $group_description, 'GROUP_NAME' => $group_codename, 'GROUP' => $out, 'GROUP_TITLE' => $group_title);\n $_groups[$group_codename] = $group_title;\n }\n\n list($warning_details, $ping_url) = handle_conflict_resolution();\n\n // Render\n return do_template('CONFIG_CATEGORY_SCREEN', array(\n '_GUID' => 'd01b28b71c38bbb52b6aaf877c7f7b0e',\n 'CATEGORY_DESCRIPTION' => $category_description,\n '_GROUPS' => $_groups,\n 'PING_URL' => $ping_url,\n 'WARNING_DETAILS' => $warning_details,\n 'TITLE' => $this->title,\n 'URL' => $post_url,\n 'GROUPS' => $groups_arr,\n 'SUBMIT_ICON' => 'buttons__save',\n 'SUBMIT_NAME' => do_lang_tempcode('SAVE'),\n ));\n }", "function get_product_list() {\n/**\nif You haven't category object, please use this request\n$catData = current_category_data($post->ID);\n*/\n$catData = current_category_data($post->ID);\n\n?>\n\n\n<script type=\"text/javascript\">\n\n var vallo_ready_cartus = <?php echo json_encode($_COOKIE['vallo_cf7_cartus_3']); ?>;\n var produc_CF7_image = '<?php \n $image = wp_get_attachment_image_src( get_post_thumbnail_id( $loop->post->ID ), 'single-post-thumbnail' );\n echo $image[0]; ?>';\n var produc_CF7_title = '<?php \n wp_title(''); ?>';\n var produc_CF7_category = '<?php \n echo $catData->term_id; ?>';\n</script>\n<script type='text/javascript' src='<?php echo plugins_url('/js/get_product_list.js?ver=1.9',__FILE__ ) ?>'></script>\n<?php\n// add new products to basket\n?><script type='text/javascript' src='<?php echo plugins_url('/js/add_to_product_list.js?ver=2.1',__FILE__ ) ?>'></script>\n<script type='text/javascript' src='<?php echo plugins_url('/js/add_to_product_activation.js?ver=1.2',__FILE__ ) ?>'></script>\n<?php\n\n\n###\n# end of base function\n###\n}", "public function addCategory(){\n if (isset($_POST[\"add_category\"])) {\n $categories = $this->model('Categories');\n $system = $this->model('System');\n $cat_name = $_POST[\"cat_name\"];\n $cat_sef_url = $system->seflink($cat_name);\n\n $categories->addCat($cat_name,$cat_sef_url);\n }\n // where to go after comment has been added\n header('location: ' . URL . 'yonetim/categories');\n }", "function store_addcategory()\r\n{\r\n\tglobal $_user;\r\n\tglobal $dropbox_cnf;\r\n\r\n\t// check if the target is valid\r\n\tif ($_POST['target']=='sent')\r\n\t{\r\n\t\t$sent=1;\r\n\t\t$received=0;\r\n\t}\r\n\telseif ($_POST['target']=='received')\r\n\t{\r\n\t\t$sent=0;\r\n\t\t$received=1;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn get_lang('Error');\r\n\t}\r\n\r\n\t// check if the category name is valid\r\n\tif ($_POST['category_name']=='')\r\n\t{\r\n\t\treturn get_lang('ErrorPleaseGiveCategoryName');\r\n\t}\r\n\r\n\tif (!$_POST['edit_id'])\r\n\t{\r\n\t\t// step 3a, we check if the category doesn't already exist\r\n\t\t$sql=\"SELECT * FROM \".$dropbox_cnf['tbl_category'].\" WHERE user_id='\".$_user['user_id'].\"' AND cat_name='\".Database::escape_string($_POST['category_name']).\"' AND received='\".$received.\"' AND sent='\".$sent.\"'\";\r\n\t\t$result=api_sql_query($sql);\r\n\r\n\r\n\t\t// step 3b, we add the category if it does not exist yet.\r\n\t\tif (mysql_num_rows($result)==0)\r\n\t\t{\r\n\t\t\t$sql=\"INSERT INTO \".$dropbox_cnf['tbl_category'].\" (cat_name, received, sent, user_id)\r\n\t\t\t\t\tVALUES ('\".Database::escape_string($_POST['category_name']).\"', '\".Database::escape_string($received).\"', '\".Database::escape_string($sent).\"', '\".Database::escape_string($_user['user_id']).\"')\";\r\n\t\t\tapi_sql_query($sql);\r\n\t\t\treturn get_lang('CategoryStored');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn get_lang('CategoryAlreadyExistsEditIt');\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$sql=\"UPDATE \".$dropbox_cnf['tbl_category'].\" SET cat_name='\".Database::escape_string($_POST['category_name']).\"', received='\".Database::escape_string($received).\"' , sent='\".Database::escape_string($sent).\"'\r\n\t\t\t\tWHERE user_id='\".Database::escape_string($_user['user_id']).\"'\r\n\t\t\t\tAND cat_id='\".Database::escape_string($_POST['edit_id']).\"'\";\r\n\t\tapi_sql_query($sql);\r\n\t\treturn get_lang('CategoryModified');\r\n\t}\r\n}", "function udesign_entry_after() {\r\n do_action('udesign_entry_after');\r\n}", "function insert_categories_data(){\r\n if (isset($_POST['submit'])){\r\n\r\n $cat_title = $_POST['cat_title'];\r\n\r\n if($cat_title == \"\" || empty($cat_title)){\r\n echo validation_error_display(\"Field can not be empty\");\r\n }else{\r\n \r\n $sql = \"INSERT INTO categories (cat_title ) VALUES ('$cat_title')\";\r\n $result = execute($sql);\r\n confirm($result);\r\n }\r\n \r\n }\r\n\r\n}", "public function page_add_edit_cat()\n\t{\n\t\t// Edition\n\t\t$cat_name = '';\n\t\tif ($this->mode == 'edit_cat')\n\t\t{\n\t\t\t$sql = 'SELECT cat_name\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'smilies_cat\n\t\t\t\t\tWHERE cat_id = ' . $this->id;\n\t\t\t$result = Fsb::$db->query($sql);\n\t\t\t$data = Fsb::$db->row($result);\n\t\t\tif (!$data)\n\t\t\t{\n\t\t\t\t$this->mode = 'add_cat';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tFsb::$db->free($result);\n\t\t\t\t$cat_name = $data['cat_name'];\n\t\t\t}\n\t\t}\n\n\t\tFsb::$tpl->set_switch('smileys_add_cat');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'L_ADD_EDIT' =>\t\t($this->mode == 'add_cat') ? Fsb::$session->lang('adm_smiley_add_cat') : Fsb::$session->lang('adm_smiley_edit_cat'),\n\t\t\t'CAT_NAME' =>\t\t$cat_name,\n\n\t\t\t'U_ACTION' =>\t\tsid('index.' . PHPEXT . '?p=posts_smiley&amp;mode=' . $this->mode . '&amp;id=' . $this->id),\n\t\t));\n\t}", "function options_permalink_add_js()\n {\n }", "function getName() { return 'TestPostAddCategory'; }", "function sanitize_category_field($field, $value, $cat_id, $context)\n {\n }", "function insertCategories() {\n\tglobal $connection;\n\tif (isset($_POST['submit'])) {\n\n\t\t$title = escape($_POST['cat_title']);\n\n\t\tif ($title === \"\" || empty($title)) {\n\t\t\techo \"This field should not be empty\";\n\t\t} else {\n\n\t\t\t$stmt = mysqli_prepare($connection, \"INSERT INTO categories(cat_title) VALUES(?)\");\n\n\t\t\tmysqli_stmt_bind_param($stmt, 's', $title);\n\n\t\t\tmysqli_stmt_execute($stmt);\n\n\t\t\tif (!$stmt) {\n\t\t\t\tdie(\"QUERY FAILED\");\n\t\t\t}\n\t\t}\n\t\tmysqli_stmt_close($stmt);\n\t}\n\n}", "function wppb_multiple_forms_publish_admin_hook(){\r\n\tglobal $post;\r\n\t\r\n\tif ( is_admin() && ( ( $post->post_type == 'wppb-epf-cpt' ) || ( $post->post_type == 'wppb-rf-cpt' ) ) ){\r\n\t\t?>\r\n\t\t<script language=\"javascript\" type=\"text/javascript\">\r\n\t\t\tjQuery(document).ready(function() {\r\n\t\t\t\tjQuery(document).on( 'click', '#publish', function(){\r\n\t\t\t\t\tvar post_title = jQuery( '#title' ).val();\r\n\r\n\t\t\t\t\tif ( jQuery.trim( post_title ) == '' ){\r\n\t\t\t\t\t\talert ( '<?php _e( 'You need to specify the title of the form before creating it', 'profile-builder' ); ?>' );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tjQuery( '#ajax-loading' ).hide();\r\n\t\t\t\t\t\tjQuery( '.spinner' ).hide();\r\n\t\t\t\t\t\tjQuery( '#publish' ).removeClass( 'button-primary-disabled' );\r\n\t\t\t\t\t\tjQuery( '#save-post' ).removeClass('button-disabled' );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t</script>\r\n\t\t<?php\r\n\t}\r\n}", "public function load_parent_category_item_field_ajax(){\r\n\t\t$rslt = $this->get_parent_categories();\r\n\r\n\t\techo json_encode($rslt);\r\n\t\tdie();\r\n\t}", "protected function _afterElementJs($element)\n {\n $chooserUrl = $this->getUrl('techfactory/category/chooser', []);\n $htmlId = $element->getId();\n $return = <<<HTML\n <script>\n require([\n 'jquery',\n 'Magento_Ui/js/modal/alert',\n \"prototype\"\n ], function (jQuery, alert) {\n var MultiCategoryChooser = {\n displayChooser : function(chooser) {\n chooser = $(chooser).down('div.chooser');\n entities = chooser.up('div.chooser_container').down('input[type=\"text\"].entities').value;\n postParameters = {selected: entities};\n url = '{$chooserUrl}';\n\n if (chooser && url) {\n if (chooser.innerHTML == '') {\n new Ajax.Request(url, {\n method : 'post',\n parameters : postParameters,\n onSuccess : function(transport) {\n try {\n if (transport.responseText) {\n Element.insert(chooser, transport.responseText);\n chooser.removeClassName('no-display');\n chooser.addClassName('chooser-border');\n chooser.show();\n }\n } catch (e) {\n alert({\n content: 'Error occurs during loading chooser.'\n });\n }\n }\n });\n } else {\n chooser.removeClassName('no-display');\n chooser.addClassName('chooser-border');\n chooser.show();\n }\n }\n },\n hideChooser : function(chooser) {\n chooser = $(chooser).down('div.chooser');\n if (chooser) {\n chooser.addClassName('no-display');\n chooser.hide();\n }\n },\n checkCategory : function(event) {\n node = event.memo.node;\n container = event.target.up('div.chooser_container');\n value = container.down('input[type=\"text\"].entities').value.strip();\n if (node.attributes.checked) {\n if (value) ids = value.split(',');\n else ids = [];\n\n if (-1 == ids.indexOf(node.id)) {\n ids.push(node.id);\n container.down('input[type=\"text\"].entities').value = ids.join(',');\n }\n } else {\n ids = value.split(',');\n while (-1 != ids.indexOf(node.id)) {\n ids.splice(ids.indexOf(node.id), 1);\n container.down('input[type=\"text\"].entities').value = ids.join(',');\n }\n }\n }\n }\n window.MultiCategoryChooser = MultiCategoryChooser;\n jQuery(function() {\n var container = $('{$htmlId}-container');\n if (container) {\n container.up(0).down('.control-value').hide();\n }\n\n Event.observe(document, 'node:changed', function(event){\n MultiCategoryChooser.checkCategory(event);\n });\n Event.observe(document, 'category:beforeLoad', function(event) {\n container = event.target.up('div.chooser_container');\n value = container.down('input[type=\"text\"].entities').value.strip();\n event.memo.treeLoader.baseParams.selected = value;\n });\n });\n });\n </script>\nHTML;\n return $return;\n }", "function copyCategorySelect( $option, $cid, $SectionList, $items, $sectionOld, $contents, $redirect ) {\r\n\t\t?>\r\n\t\t<form action=\"index2.php\" method=\"post\" name=\"adminForm\">\r\n\t\t<br />\r\n\t\t<table class=\"adminheading\">\r\n\t\t<tr>\r\n\t\t\t<th class=\"categories\">\r\n\t\t\tКопирование подрубрики\r\n\t\t\t</th>\r\n\t\t</tr>\r\n\t\t</table>\r\n\r\n\t\t<br />\r\n\t\t<script language=\"javascript\" type=\"text/javascript\">\r\n\t\tfunction submitbutton(pressbutton) {\r\n\t\t\tvar form = document.adminForm;\r\n\t\t\tif (pressbutton == 'cancel') {\r\n\t\t\t\tsubmitform( pressbutton );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// do field validation\r\n\t\t\tif (!getSelectedValue( 'adminForm', 'sectionmove' )) {\r\n\t\t\t\talert( \"Пожалуйста, выберите рубрику для копируемой подрубрики\" );\r\n\t\t\t} else {\r\n\t\t\t\tsubmitform( pressbutton );\r\n\t\t\t}\r\n\t\t}\r\n\t\t</script>\r\n\t\t<table class=\"adminform\">\r\n\t\t<tr>\r\n\t\t\t<td width=\"3%\"></td>\r\n\t\t\t<td align=\"left\" valign=\"top\" width=\"30%\">\r\n\t\t\t<strong>Копировать в раздел:</strong>\r\n\t\t\t<br />\r\n\t\t\t<?php echo $SectionList ?>\r\n\t\t\t<br /><br />\r\n\t\t\t</td>\r\n\t\t\t<td align=\"left\" valign=\"top\" width=\"20%\">\r\n\t\t\t<strong>Копируемые подрубрики:</strong>\r\n\t\t\t<br />\r\n\t\t\t<?php\r\n\t\t\techo \"<ol>\";\r\n\t\t\tforeach ( $items as $item ) {\r\n\t\t\t\techo \"<li>\". $item->name .\"</li>\";\r\n\t\t\t}\r\n\t\t\techo \"</ol>\";\r\n\t\t\t?>\r\n\t\t\t</td>\r\n\t\t\t<td valign=\"top\" width=\"20%\">\r\n\t\t\t<strong>Копируемое содержимое подрубрики:</strong>\r\n\t\t\t<br />\r\n\t\t\t<?php\r\n\t\t\techo \"<ol>\";\r\n\t\t\tforeach ( $contents as $content ) {\r\n\t\t\t\techo \"<li>\". $content->title .\"</li>\";\r\n\t\t\t\techo \"\\n <input type=\\\"hidden\\\" name=\\\"item[]\\\" value=\\\"$content->id\\\" />\";\r\n\t\t\t}\r\n\t\t\techo \"</ol>\";\r\n\t\t\t?>\r\n\t\t\t</td>\r\n\t\t\t<td valign=\"top\">\r\n\t\t\tВ выбранный раздел будут скопированы все\r\n\t\t\t<br />\r\n\t\t\tперечисленные подрубрики и всё \r\n\t\t\t<br />\r\n\t\t\tперечисленное содержимое этих подрубрик.\r\n\t\t\t</td>.\r\n\t\t</tr>\r\n\t\t</table>\r\n\t\t<br /><br />\r\n\r\n\t\t<input type=\"hidden\" name=\"ca\" value=\"<?php echo $option;?>\" />\r\n\t\t<input type=\"hidden\" name=\"section\" value=\"<?php echo $sectionOld;?>\" />\r\n\t\t<input type=\"hidden\" name=\"boxchecked\" value=\"1\" />\r\n\t\t<input type=\"hidden\" name=\"redirect\" value=\"<?php echo $redirect; ?>\" />\r\n\t\t<input type=\"hidden\" name=\"task\" value=\"\" />\r\n\t\t<?php\r\n\t\tforeach ( $cid as $id ) {\r\n\t\t\techo \"\\n <input type=\\\"hidden\\\" name=\\\"cid[]\\\" value=\\\"$id\\\" />\";\r\n\t\t}\r\n\t\t?>\r\n\t\t</form>\r\n\t\t<?php\r\n\t}", "function copy_category($src_category_id, $dest_category_id, $ctype = \"link\") {\n\n\t\t\t//skip category if it is already a copied one\n\tif (!(in_array($src_category_id, $_SESSION['copied']))) {\n\n\t\t\t$src_category_id = olc_db_prepare_input($src_category_id);\n\t\t\t$dest_category_id = olc_db_prepare_input($dest_category_id);\n\n\t\t\t//get data\n\t\t\t$ccopy_query = xtDBquery(\"SELECT * FROM \".TABLE_CATEGORIES.\" WHERE categories_id = '\".$src_category_id.\"'\");\n\t\t\t$ccopy_values = olc_db_fetch_array($ccopy_query);\n\n\t\t\t//get descriptions\n\t\t\t$cdcopy_query = xtDBquery(\"SELECT * FROM \".TABLE_CATEGORIES_DESCRIPTION.\" WHERE categories_id = '\".$src_category_id.\"'\");\n\n\t\t\t//copy data\n\t\t\t\n\t\t\t$sql_data_array = array ('parent_id'=>olc_db_input($dest_category_id),\n\t\t\t\t\t\t\t\t\t'date_added'=>'NOW()',\n\t\t\t\t\t\t\t\t\t'last_modified'=>'NOW()',\n\t\t\t\t\t\t\t\t\t'categories_image'=>$ccopy_values['categories_image'],\n\t\t\t\t\t\t\t\t\t'categories_status'=>$ccopy_values['categories_status'],\n\t\t\t\t\t\t\t\t\t'categories_template'=>$ccopy_values['categories_template'],\n\t\t\t\t\t\t\t\t\t'listing_template'=>$ccopy_values['listing_template'],\n\t\t\t\t\t\t\t\t\t'sort_order'=>$ccopy_values['sort_order'],\n\t\t\t\t\t\t\t\t\t'products_sorting'=>$ccopy_values['products_sorting'],\n\t\t\t\t\t\t\t\t\t'products_sorting2'=>$ccopy_values['products_sorting2']);\t\n\t\t\t\n\t\t\t\n\t\t\t\t\t$customers_statuses_array = olc_get_customers_statuses();\n\n\t\tfor ($i = 0; $n = sizeof($customers_statuses_array), $i < $n; $i ++) {\n\t\t\tif (isset($customers_statuses_array[$i]['id']))\n\t\t\t\t$sql_data_array = array_merge($sql_data_array, array ('group_permission_'.$customers_statuses_array[$i]['id'] => $product['group_permission_'.$customers_statuses_array[$i]['id']]));\n\t\t}\n\t\t\t\n\t\t\tolc_db_perform(TABLE_CATEGORIES, $sql_data_array);\n\n\t\t\t$new_cat_id = olc_db_insert_id();\n\n\t\t\t//store copied ids, because we don't want to go into an endless loop later\n\t\t\t$_SESSION['copied'][] = $new_cat_id;\n\n\t\t\t//copy / link products\n\t\t\t$get_prod_query = xtDBquery(\"SELECT products_id FROM \".TABLE_PRODUCTS_TO_CATEGORIES.\" WHERE categories_id = '\".$src_category_id.\"'\");\n\t\t\twhile ($product = olc_db_fetch_array($get_prod_query)) {\n\t\t\t\tif ($ctype == 'link') {\n\t\t\t\t\t$this->link_product($product['products_id'], $new_cat_id);\n\t\t\t\t}\n\t\t\t\telseif ($ctype == 'duplicate') {\n\t\t\t\t\t$this->duplicate_product($product['products_id'], $new_cat_id);\n\t\t\t\t} else {\n\t\t\t\t\tdie('Undefined copy type!');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//copy+rename image\n\t\t\t$src_pic = DIR_FS_CATALOG_IMAGES.'categories/'.$ccopy_values['categories_image'];\n\t\t\tif (is_file($src_pic)) {\n\t\t\t\t$get_suffix = explode('.', $ccopy_values['categories_image']);\n\t\t\t\t$suffix = array_pop($get_suffix);\n\t\t\t\t$dest_pic = $new_cat_id.'.'.$suffix;\n\t\t\t\t@ copy($src_pic, DIR_FS_CATALOG_IMAGES.'categories/'.$dest_pic);\n\t\t\t\txtDBquery(\"SQL_UPDATE categories SET categories_image = '\".$dest_pic.\"' WHERE categories_id = '\".$new_cat_id.\"'\");\n\t\t\t}\n\n\t\t\t//copy descriptions\n\t\t\twhile ($cdcopy_values = olc_db_fetch_array($cdcopy_query)) {\n\t\t\t\txtDBquery(\"INSERT INTO \".TABLE_CATEGORIES_DESCRIPTION.\" (categories_id, language_id, categories_name, categories_heading_title, categories_description, categories_meta_title, categories_meta_description, categories_meta_keywords) VALUES ('\".$new_cat_id.\"' , '\".$cdcopy_values['language_id'].\"' , '\".addslashes($cdcopy_values['categories_name']).\"' , '\".addslashes($cdcopy_values['categories_heading_title']).\"' , '\".addslashes($cdcopy_values['categories_description']).\"' , '\".addslashes($cdcopy_values['categories_meta_title']).\"' , '\".addslashes($cdcopy_values['categories_meta_description']).\"' , '\".addslashes($cdcopy_values['categories_meta_keywords']).\"')\");\n\t\t\t}\n\n\t\t\t//get child categories of current category\n\t\t\t$crcopy_query = xtDBquery(\"SELECT categories_id FROM \".TABLE_CATEGORIES.\" WHERE parent_id = '\".$src_category_id.\"'\");\n\n\t\t\t//and go recursive\n\t\t\twhile ($crcopy_values = olc_db_fetch_array($crcopy_query)) {\n\t\t\t\t$this->copy_category($crcopy_values['categories_id'], $new_cat_id, $ctype);\n\t\t\t}\n\n\t\t}\n\t}", "function classiera_update_my_category_fields($term_id) {\r\n\tif(isset($_POST['taxonomy'])){\t\r\n\t if($_POST['taxonomy'] == 'category'):\r\n\t\t$tag_extra_fields = get_option(MY_CATEGORY_FIELDS);\r\n\t\t$tag_extra_fields[$term_id]['your_image_url'] = strip_tags($_POST['your_image_url']);\r\n\t\t$tag_extra_fields[$term_id]['category_image'] = $_POST['category_image'];\r\n\t\t$tag_extra_fields[$term_id]['category_icon_code'] = $_POST['category_icon_code'];\r\n\t\t$tag_extra_fields[$term_id]['category_icon_color'] = $_POST['category_icon_color'];\r\n\t\tupdate_option(MY_CATEGORY_FIELDS, $tag_extra_fields);\r\n\t endif;\r\n\t}\r\n}", "public function get_add_form($cat_id) {\n\n\t\tif (!$this->input->is_ajax_request()) {\n\t\t\tdie();\n\t\t}\n\n\t\t$category_detailes = $this->cat_model->GetWhere(\"categories\", \"title\", \"ASC\", array('id'=>$cat_id)); \n\t\t\tif (isset($category_detailes) && count($category_detailes) != 0) { \n\t\t\t\tforeach ($category_detailes as $cat) { \n\t\t\t\t\t$title= $cat->title ;\n\t\t\t\t} \n\t\t\t}\n\n\t\t$content = \"<div style='background-color:#ddd' clas='table-responsive ls-table'><table class='table table-responsive table-bordered table-hover' ><tr>\";\n\n\n\t\t$content .= \" <td><input type='hidden' id='main_cat_id' value='$cat_id'> \n\t\t<input type='text' style='width: 98%;' id='title' placeholder='title' ><br><br>\";\n\n\n\t\t$content .= \"</tr></table> \n\t\t</div>\";\n\t\tif($cat_id==0){\n\n\t\t$result = array('title' => \"<b>Add main category </b>\", \"content\" => $content); \n\t\t}else{\n\n\t\t$result = array('title' => \"<b>Add sub category to \".$title.\"</b>\", \"content\" => $content); \n\t\t}\n\n\t\techo json_encode($result);\n\t}", "public function done() {\r\n\r\n\t\tdo_action( 'listeo_core_listing_submitted', $this->listing_id );\r\n\t\t$template_loader = new Listeo_Core_Template_Loader;\r\n\t\t$template_loader->set_template_data( \r\n\t\t\tarray( \r\n\t\t\t\t'listing' \t=> get_post( $this->listing_id ),\r\n\t\t\t\t'id' \t\t=> \t$this->listing_id,\r\n\t\t\t\t) \r\n\t\t\t)->get_template_part( 'listing-submitted' );\r\n\r\n\t}", "public function pre_out()\n\t{\n\t\t$out = '';\n\t\tif ( !self::$outpre ) {\n\t\t\tself::$outpre = true;\n\t\t\t$out = <<< CUSTOM_DROPBUTTON_JS\n\t\t\t\t<script type=\"text/javascript\">\ncontrols.init(function(){\n\t$('.dropbutton_control').each(function(){\n\t\tvar self = $(this);\n\t\t$(self).on('click', 'a', function(){\n\t\t\tvar a = $(this);\n\t\t\tself.find('input').val(a.attr('href').replace(/^.*#/, ''));\n\t\t\tself.closest('form').submit();\n\t\t});\n\t});\n});\n\t\t\t\t</script>\nCUSTOM_DROPBUTTON_JS;\n\t\t}\n\t\treturn $out;\n\t}", "function recommandation_category_form($argument){\r\n\t\t$id_categorie_preconisation = $argument['idElement'];\r\n\r\n\t\t$nom_categorie = $impressionRecommandation = $tailleimpressionRecommandation = $impressionRecommandationCategorie = $tailleimpressionRecommandationCategorie = '';\r\n\r\n\t\tif(($id_categorie_preconisation != '') && ($id_categorie_preconisation > 0)){\r\n\t\t\t$recommandationCategoryInfos = evaRecommandationCategory::getCategoryRecommandation($id_categorie_preconisation);\r\n\t\t\t$nom_categorie = html_entity_decode($recommandationCategoryInfos->nom, ENT_QUOTES, 'UTF-8');\r\n\t\t\t$impressionRecommandation = html_entity_decode($recommandationCategoryInfos->impressionRecommandation, ENT_QUOTES, 'UTF-8');\r\n\t\t\t$tailleimpressionRecommandation = html_entity_decode($recommandationCategoryInfos->tailleimpressionRecommandation, ENT_QUOTES, 'UTF-8');\r\n\t\t\t$impressionRecommandationCategorie = html_entity_decode($recommandationCategoryInfos->impressionRecommandationCategorie, ENT_QUOTES, 'UTF-8');\r\n\t\t\t$tailleimpressionRecommandationCategorie = html_entity_decode($recommandationCategoryInfos->tailleimpressionRecommandationCategorie, ENT_QUOTES, 'UTF-8');\r\n\t\t}\r\n\r\n?>\r\n<p class=\"recommandationCategoryFormErrorMessage digirisk_hide\" >&nbsp;</p>\r\n<form action=\"<?php echo EVA_INC_PLUGIN_URL; ?>ajax.php\" id=\"recommandation_category_form\" method=\"post\" >\r\n\t<input type=\"hidden\" name=\"post\" id=\"post\" value=\"true\" />\r\n\t<input type=\"hidden\" name=\"table\" id=\"table\" value=\"<?php _e(TABLE_CATEGORIE_PRECONISATION); ?>\" />\r\n\t<input type=\"hidden\" name=\"act\" id=\"act\" value=\"saveRecommandationCategorie\" />\r\n\t<input type=\"hidden\" name=\"id_categorie_preconisation\" id=\"id_categorie_preconisation\" value=\"<?php _e($id_categorie_preconisation); ?>\" />\r\n\r\n\t<input type=\"hidden\" name=\"impressionRecommandationCategorieValue\" id=\"impressionRecommandationCategorieValue\" value=\"<?php _e($impressionRecommandationCategorie); ?>\" />\r\n\t<input type=\"hidden\" name=\"impressionRecommandationValue\" id=\"impressionRecommandationValue\" value=\"<?php _e($impressionRecommandation); ?>\" />\r\n\r\n<!--\tRecommandation category name\t-->\r\n\t<label for=\"nom_categorie\" ><?php _e('Nom', 'evarisk'); ?></label>\r\n\t<input type=\"text\" name=\"nom_categorie\" id=\"nom_categorie\" class=\"recommandationInput\" value=\"<?php _e($nom_categorie); ?>\" />\r\n\r\n<!--\tOption recommandation category picture in document\t-->\r\n\t<div class=\"recommandationCategoryOption\" ><?php _e('Param&egrave;tres pour l\\'impression de la famille de pr&eacute;conisations', 'evarisk'); ?></div>\r\n\t<div class=\"recommandationCategoryOptionChoice\" ><input type=\"radio\" class=\"impressionRecommandationCategorie\" name=\"impressionRecommandationCategorie\" id=\"impressionRecommandationCategorie_textandpicture\" value=\"textandpicture\" <?php (($impressionRecommandationCategorie == '') || ($impressionRecommandationCategorie == 'textandpicture')) ? _e('checked = \"checked\"') : ''; ?> /><label for=\"impressionRecommandationCategorie_textandpicture\" class=\"recommandationCategoryOptionLabel\" ><?php _e('Nom + image', 'evarisk'); ?></label></div>\r\n\t<div class=\"recommandationCategoryOptionChoice\" ><input type=\"radio\" class=\"impressionRecommandationCategorie\" name=\"impressionRecommandationCategorie\" id=\"impressionRecommandationCategorie_textonly\" value=\"textonly\" <?php (($impressionRecommandationCategorie != '') && ($impressionRecommandationCategorie == 'textonly')) ? _e('checked = \"checked\"') : ''; ?> /><label for=\"impressionRecommandationCategorie_textonly\" class=\"recommandationCategoryOptionLabel\" ><?php _e('Nom uniquement', 'evarisk'); ?></label></div>\r\n\t<div class=\"recommandationCategoryOptionChoice\" ><input type=\"radio\" class=\"impressionRecommandationCategorie\" name=\"impressionRecommandationCategorie\" id=\"impressionRecommandationCategorie_pictureonly\" value=\"pictureonly\" <?php (($impressionRecommandationCategorie != '') && ($impressionRecommandationCategorie == 'pictureonly')) ? _e('checked = \"checked\"') : ''; ?> /><label for=\"impressionRecommandationCategorie_pictureonly\" class=\"recommandationCategoryOptionLabel\" ><?php _e('Image uniquement', 'evarisk'); ?></label></div>\r\n\t<div class=\"recommandationCategoryOptionPicSizeContainer\" id=\"pictureRecommandationCategoryContainer\" ><label for=\"tailleimpressionRecommandationCategorie\" class=\"recommandationCategoryOptionLabel\" ><?php _e('Taille de l\\'image (en cm)', 'evarisk'); ?></label><input type=\"text\" name=\"tailleimpressionRecommandationCategorie\" id=\"tailleimpressionRecommandationCategorie\" value=\"<?php _e($tailleimpressionRecommandationCategorie); ?>\" /></div>\r\n\t<div class=\"clear\" >&nbsp;</div>\r\n\r\n<!--\tOption recommandation picture in document\t-->\r\n\t<div class=\"recommandationCategoryOption\" ><?php _e('Param&egrave;tres pour l\\'impression des pr&eacute;conisations de cette famille', 'evarisk'); ?></div>\r\n\t<div class=\"recommandationCategoryOptionChoice\" ><input type=\"radio\" class=\"impressionRecommandation\" name=\"impressionRecommandation\" id=\"impressionRecommandation_textandpicture\" value=\"textandpicture\" <?php (($impressionRecommandation == '') || ($impressionRecommandation == 'textandpicture')) ? _e('checked = \"checked\"') : ''; ?> /><label for=\"impressionRecommandation_textandpicture\" class=\"recommandationCategoryOptionLabel\" ><?php _e('Nom + image', 'evarisk'); ?></label></div>\r\n\t<div class=\"recommandationCategoryOptionChoice\" ><input type=\"radio\" class=\"impressionRecommandation\" name=\"impressionRecommandation\" id=\"impressionRecommandation_textonly\" value=\"textonly\" <?php (($impressionRecommandation != '') && ($impressionRecommandation == 'textonly')) ? _e('checked = \"checked\"') : ''; ?> /><label for=\"impressionRecommandation_textonly\" class=\"recommandationCategoryOptionLabel\" ><?php _e('Nom uniquement', 'evarisk'); ?></label></div>\r\n\t<div class=\"recommandationCategoryOptionChoice\" ><input type=\"radio\" class=\"impressionRecommandation\" name=\"impressionRecommandation\" id=\"impressionRecommandation_pictureonly\" value=\"pictureonly\" <?php (($impressionRecommandation != '') && ($impressionRecommandation == 'pictureonly')) ? _e('checked = \"checked\"') : ''; ?> /><label for=\"impressionRecommandation_pictureonly\" class=\"recommandationCategoryOptionLabel\" ><?php _e('Image uniquement', 'evarisk'); ?></label></div>\r\n\t<div class=\"recommandationCategoryOptionPicSizeContainer\" id=\"pictureRecommandationContainer\" ><label for=\"tailleimpressionRecommandation\" class=\"recommandationCategoryOptionLabel\" ><?php _e('Taille de l\\'image (en cm)', 'evarisk'); ?></label><input type=\"text\" name=\"tailleimpressionRecommandation\" id=\"tailleimpressionRecommandation\" value=\"<?php _e($tailleimpressionRecommandation); ?>\" /></div>\r\n\r\n\t<input type=\"submit\" name=\"save_recommancation_category\" id=\"save_recommancation_category\" class=\"clear alignright button-primary\" value=\"<?php _e('Enregistrer', 'evarisk'); ?>\" />\r\n</form>\r\n<script type=\"text/javascript\" >\r\n\tdigirisk(document).ready(function(){\r\n\t\tjQuery(\".impressionRecommandation\").click(function(){\r\n\t\t\tjQuery(\"#impressionRecommandationValue\").val(jQuery(this).val());\r\n\t\t\tif(jQuery(this).val() == 'textonly'){\r\n\t\t\t\tjQuery(\"#pictureRecommandationContainer\").hide();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tjQuery(\"#pictureRecommandationContainer\").show();\r\n\t\t\t}\r\n\t\t});\r\n\t\tjQuery(\".impressionRecommandationCategorie\").click(function(){\r\n\t\t\tjQuery(\"#impressionRecommandationCategorieValue\").val(jQuery(this).val());\r\n\t\t\tif(jQuery(this).val() == 'textonly'){\r\n\t\t\t\tjQuery(\"#pictureRecommandationCategoryContainer\").hide();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tjQuery(\"#pictureRecommandationCategoryContainer\").show();\r\n\t\t\t}\r\n\t\t});\r\n\t\tjQuery(\"#recommandation_category_form\").ajaxForm({\r\n\t\t\ttarget: \"#ajax-response\",\r\n\t\t\tbeforeSubmit: validate_recommandation_category_form\r\n\t\t});\r\n\t});\r\n\r\n\tfunction validate_recommandation_category_form(formData, jqForm, options){\r\n\t\tevarisk(\"#nom_categorie\").removeClass(\"ui-state-error\");\r\n\t\tfor(var i=0; i < formData.length; i++){\r\n\t\t\tif((formData[i].name == \"nom_categorie\") && !formData[i].value){\r\n\t\t\t\tcheckLength( evarisk(\"#nom_categorie\"), \"\", 1, 128, \"<?php _e('Le champs nom de la famille de pr&eacute;conisation doit contenir entre !#!minlength!#! et !#!maxlength!#! caract&egrave;res', 'evarisk'); ?>\" , evarisk(\".recommandationCategoryFormErrorMessage\"))\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n</script>\r\n<?php\r\n\t}", "function saveCat()\n {\n //update stuff\n }", "public function newAction()\n {\n\t\tTag::appendTitle('Add New Category');\n }", "function realstate_form($catId = null) {\n if ($catId!= null) {\n // We check if the category is the same as our plugin\n if (osc_is_this_category('realstate_plugin', $catId)) {\n $conn = getConnection() ;\n $data = $conn->osc_dbFetchResults('SELECT * FROM %st_item_house_property_type_attr', DB_TABLE_PREFIX);\n $p_type = array();\n foreach ($data as $d) {\n $p_type[$d['fk_c_locale_code']][$d['pk_i_id']] = $d['s_name'];\n }\n unset($data);\n include_once 'item_edit.php';\n }\n }\n}", "function category_add_thumbnail_field( $category ) {\n\t\tglobal $wp_taxonomies;\n\t\t?>\n\n\t\t<div class=\"form-field hide-if-no-js\">\n\t\t\t<p style=\"color:#222;font-style:normal;\"><?php _e( 'Featured Image' ); ?></p>\n\t\t\t<div id=\"image-container\">\n\t\t\t\t\n\t\t\t\t<div id=\"selected-image\"></div>\n\t\t\t\t\n\t\t\t\t<a id=\"set-category-thumbnail\" title=\"<?php _e( 'Set featured image' ); ?>\" data-uploader-title=\"<?php _e( 'Choose a thumbnail for this category', 'category-thumbnail' ); ?>\" data-uploader-button-text=\"<?php _e( 'Set Category Thumbnail', 'category-thumbnail' ); ?>\" href=\"#\" class=\"button thickbox\">\n\t\t\t\t\t<?php _e( 'Set featured image' ); ?>\n\t\t\t\t</a>\n\t\t\t\t\n\t\t\t\t<a id=\"remove-category-thumbnail\" title=\"<?php _e( 'Set featured image' ); ?>\" href=\"#\" style=\"display:none;\">\n\t\t\t\t\t<?php _e( 'Remove featured image' ); ?>\n\t\t\t\t</a>\n\t\t\t\t\n\t\t\t</div>\n\t\t\t<input name=\"image\" id=\"image-id\" type=\"hidden\" value=\"\" />\n\t\t\t<p>\n\t\t\t\t<?php printf( __( 'The thumbnail to this %s', 'category-thumbnail' ), $wp_taxonomies[ $category ]->labels->singular_name ); ?>\n\t\t\t</p>\n\t\t</div>\n\t\t\n\t\t<?php\n\t\t\n\t}", "function onInit()\n\t{\t\n\t\t/*$txt =\t\"<script type=\\\"text/javascript\\\">\n\t\t\t\tfunction insertPluginValue(myField, myValue) {\n\t\t\t\t\tmyField.value = myValue;\n\t\t\t\t}\n\t\t\t\t</script>\";*/\n\t\t$txt\t=\t\"\";\n\t\treturn $txt;\n\t}", "public function cmb_init() {\n\t\t$this->action( 'cmb2_init_hookup_rank-math-redirections', 'add_category_cmb_field', 110 );\n\t}", "function widget_sandbox_rsslinks_control() {\n\t$options = $newoptions = get_option('widget_sandbox_rsslinks');\n\tif ( $_POST['rsslinks-submit'] ) {\n\t\t$newoptions['title'] = strip_tags( stripslashes( $_POST['rsslinks-title'] ) );\n\t}\n\tif ( $options != $newoptions ) {\n\t\t$options = $newoptions;\n\t\tupdate_option( 'widget_sandbox_rsslinks', $options );\n\t}\n\t$title = attribute_escape( $options['title'] );\n?>\n\t\t\t<p><label for=\"rsslinks-title\"><?php _e( 'Title:', 'sandbox' ) ?> <input class=\"widefat\" id=\"rsslinks-title\" name=\"rsslinks-title\" type=\"text\" value=\"<?php echo $title; ?>\" /></label></p>\n\t\t\t<input type=\"hidden\" id=\"rsslinks-submit\" name=\"rsslinks-submit\" value=\"1\" />\n<?php\n}", "function external_url_taxonomy_add_new_meta_field() {\n ?>\n <div class=\"form-field\">\n <label for=\"term_meta[custom_term_meta]\"><?php _e( 'External URL:', 'external_url' ); ?></label>\n <input type=\"text\" name=\"term_meta[custom_term_meta]\" id=\"term_meta[custom_term_meta]\" value=\"\">\n <p class=\"description\"><?php _e( 'Enter a value for this field','external_url' ); ?></p>\n </div>\n<?php\n}", "public function query_add_edit_cat()\n\t{\n\t\t$cat_name = trim(Http::request('cat_name', 'post'));\n\t\tif ($this->mode == 'add_cat')\n\t\t{\n\t\t\t$sql = 'SELECT MAX(cat_order) AS max_order\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'smilies_cat';\n\t\t\t$max_order = Fsb::$db->get($sql, 'max_order');\n\n\t\t\tFsb::$db->insert('smilies_cat', array(\n\t\t\t\t'cat_name' =>\t$cat_name,\n\t\t\t\t'cat_order' =>\t$max_order + 1,\n\t\t\t));\n\t\t\tFsb::$db->destroy_cache('smilies_');\n\n\t\t\tDisplay::message('adm_smiley_well_cat_add', 'index.' . PHPEXT . '?p=posts_smiley', 'posts_smiley');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFsb::$db->update('smilies_cat', array(\n\t\t\t\t'cat_name' =>\t$cat_name,\n\t\t\t), 'WHERE cat_id = ' . $this->id);\n\t\t\tFsb::$db->destroy_cache('smilies_');\n\n\t\t\tDisplay::message('adm_smiley_well_cat_edit', 'index.' . PHPEXT . '?p=posts_smiley', 'posts_smiley');\n\t\t}\n\t}", "function suggestcomment_js_header(){\n $suggestcomment_prompt = get_option('suggestcomment_prompt');\n $commentlist = suggestcomment_get_comments();\n?>\n<script type=\"text/javascript\">\n//<![CDATA[\nfunction suggestcomment_replace_comment(commentid)\n{\nvar commenttext = new Array ();\n<?php \nforeach ($commentlist as $sugcomment){\necho \"commenttext[$sugcomment->comment_id]=\\\"$sugcomment->comment_text\\\";\\n\";\n}\n?>\nreplaceIt = confirm(\"<?php echo $suggestcomment_prompt;?>\");\n if (replaceIt==true){\n commentForm=window.document.forms['commentform'];\n\t\tif (commentForm.elements['comment-text']){commentForm.elements['comment-text'].value=commenttext[commentid]};\n\t\tif (commentForm.elements['comment']){commentForm.elements['comment'].value=commenttext[commentid]};\n\t\t} \n}\n//]]>\n</script>\n<?php\n}", "public function edit_form_after_title() {\n\t\twp_nonce_field( 'papi_save_data', 'papi_meta_nonce' );\n\n\t\tif ( $value = esc_attr( papi_get_entry_type_id() ) ) {\n\t\t\tpapi_render_html_tag( 'input', [\n\t\t\t\t'data-papi-page-type-key' => true,\n\t\t\t\t'name' => esc_attr( papi_get_page_type_key() ),\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'value' => $value\n\t\t\t] );\n\t\t}\n\t}", "public function process()\n\t{\t\n\t\t$this->template()\n ->setBreadCrumb(Phpfox::getPhrase('adsonfeed.add_new_ads'))\n ->setHeader(array(\n 'ad.js' => 'module_adsonfeed'\n ))\n ;\n $bIsEdit = false;\n if (($iId = $this->request()->getInt('id')) && ($aAds = phpfox::getService('adsonfeed')->getForEdit($iId)))\n {\n $bIsEdit = true; \n $this->template()->assign(array(\n 'aForms' => $aAds\n ));\n }\n $aVals = $this->request()->getArray('val');\n $aValidation = array(\n\t\t\t'name' => Phpfox::getPhrase('adsonfeed.provide_a_name_for_this_campaign')\n\t\t);\n if (is_array($aVals) && count($aVals) > 0)\n\t\t{\n\t\t\tif (isset($aVals['type_id']))\n\t\t\t{\n\t\t\t\tif ($aVals['type_id'] == 2)\n\t\t\t\t{\n\t\t\t\t\t$aValidation['url_link'] = Phpfox::getPhrase('adsonfeed.provide_a_link_for_your_banner');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n $oValidator = Phpfox::getLib('validator')->set(array('sFormName' => 'js_form', 'aParams' => $aValidation));\n if (is_array($aVals) && count($aVals) > 0)\n\t\t{\n\t\t\tif ($aVals['type_id'] == 1 && empty($aVals['html_code']))\n\t\t\t{\n\t\t\t\tPhpfox_Error::set(Phpfox::getPhrase('adsonfeed.provide_html_for_your_banner'));\t\n\t\t\t}\n\n\t\t\tif ($oValidator->isValid($aVals))\n\t\t\t{\n\t\t\t\tif ($bIsEdit)\n\t\t\t\t{\n\t\t\t\t\tif (Phpfox::getService('adsonfeed.process')->update($aVals['id'], $aVals))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->url()->send('admincp.adsonfeed.add', array('id' => $aVals['id']), Phpfox::getPhrase('adsonfeed.ad_successfully_updated'));\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tif (Phpfox::getService('adsonfeed.process')->add($aVals))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->url()->send('admincp.adsonfeed.add', null, Phpfox::getPhrase('adsonfeed.ad_successfully_added'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n $this->template()->assign(array(\n 'bIsEdit' => $bIsEdit\n ));\n\t}", "function updated_category_image ( $term_id, $tt_id ) {\n if( isset( $_POST['category-image-id'] ) && '' !== $_POST['category-image-id'] ){\n $image = $_POST['category-image-id'];\n update_term_meta ( $term_id, 'category-image-id', $image );\n } else {\n update_term_meta ( $term_id, 'category-image-id', '' );\n }\n }" ]
[ "0.57493216", "0.5638515", "0.5587308", "0.5583835", "0.5576168", "0.5532479", "0.5492839", "0.5468453", "0.5453175", "0.5439546", "0.542789", "0.5405437", "0.53552526", "0.52939606", "0.5288841", "0.5271692", "0.5238602", "0.5228893", "0.52277046", "0.5167096", "0.5166725", "0.5166276", "0.5149655", "0.5132167", "0.51272017", "0.51069653", "0.5100877", "0.5091436", "0.5091436", "0.5089934", "0.50853115", "0.50671035", "0.5065593", "0.5038366", "0.5030826", "0.50303257", "0.5006469", "0.5001351", "0.49916145", "0.49880767", "0.49815586", "0.4962277", "0.4962069", "0.49530885", "0.4947051", "0.49446598", "0.49438825", "0.49438044", "0.494288", "0.49294376", "0.49291295", "0.49270752", "0.49231753", "0.49060374", "0.49032542", "0.48979545", "0.489366", "0.48890707", "0.48832086", "0.4882594", "0.48787707", "0.48749602", "0.4874862", "0.48624402", "0.4848889", "0.48452598", "0.4841929", "0.484128", "0.4841022", "0.48351586", "0.4834731", "0.48331612", "0.4826797", "0.48198652", "0.4819203", "0.48186827", "0.48132414", "0.48129916", "0.48112565", "0.48078054", "0.4798723", "0.47965598", "0.47807017", "0.47737572", "0.47692502", "0.4766355", "0.4762816", "0.47575995", "0.47575346", "0.47495228", "0.47494823", "0.47438705", "0.4741489", "0.47404134", "0.47366783", "0.4735895", "0.47323987", "0.47307974", "0.47307187", "0.4728211" ]
0.7567759
0
Query the Search API by a search term and location
Запросить Search API по поисковому запросу и расположению
function search($term, $location) { $url_params = array(); $url_params['term'] = $term; $url_params['location'] = $location; $url_params['limit'] = $GLOBALS['SEARCH_LIMIT']; return request($GLOBALS['API_HOST'], $GLOBALS['SEARCH_PATH'], $url_params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function search($term, $location, $price, $radius, $categories, $sort) {\n $url_params = array();\n \n $url_params['term'] = $term;\n $url_params['location'] = $location;\n $url_params['limit'] = $GLOBALS['SEARCH_LIMIT'];\n\t$url_params['open_now'] = true;\n $url_params['price'] = $price;\n $url_params['radius'] = $radius;\n $url_params['categories'] = $categories;\n $url_params['sort_by'] = $sort;\n \n return request($GLOBALS['API_HOST'], $GLOBALS['SEARCH_PATH'], $url_params);\n}", "public function search() {\r\n\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t$query = '';\r\n\t\tif (isset($this->params['url']['query'])) {\r\n\t\t\t$query = $this->params['url']['query'];\r\n\t\t}\r\n\r\n\t\t$queryURL = $queryURL.\"/Parties_People/opensearch/lookup?searchTerms=\".$query;\r\n\t\t$queryResponse = \"error\";\r\n\n\t\t$ch = curl_init();\r\n\t\t$timeout = 5;\r\n\t\tcurl_setopt($ch,CURLOPT_URL,$queryURL);\r\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,1);\r\n\t\tcurl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);\r\n\t\t$queryResponse = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t$this->autoRender = false;\r\n\t\t$this->response->type('json');\r\n\r\n\t\t$this->response->body($queryResponse);\r\n\t}", "public function search($q);", "function query_api($term, $location) {\r\n $response = json_decode(search($term, $location));\r\n $business_id = $response->businesses[0]->id;\r\n /* \r\n print sprintf(\r\n \"%d local businesses found, querying business info for the top result \\\"%s\\\"\\n\\n <br>\",\r\n count($response->businesses),\r\n $business_id\r\n );\r\n */ \r\n $response = get_business($business_id);\r\n \r\n print sprintf(\"Result for business \\\"%s\\\" found:\\n\", $business_id);\r\n $pretty_response = json_encode(json_decode($response), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\r\n print \"$pretty_response\\n\";\r\n\r\n return json_decode($response, true);\r\n }", "public function search($query);", "public function searchByKeyword($query);", "public function search($city);", "public function search($term = null);", "function search() {\n\n /* Start building the query object. We hope to end up with something like:\n $reqeust = '{\n \"from\" : 0,\n \"size\": 10,\n \"query\" : {\n \"terms\" : {\n \"creator\" : [ \"card\" ]\n }\n },\n sort: {\n title: {\n order: \"desc\"\n }\n }\n }';\n */\n $request = array();\n\n // Users can query by specifying an url param like &filter=title:ender\n // TODO: We should allow for multiple filters.\n $key_and_val = explode(\":\", $this->get('GET.filter'));\n if (count($key_and_val) == 2 and !empty($key_and_val[0]) and !empty($key_and_val[1])) {\n $request['query']['query_string']['fields'] = array($key_and_val[0]);\n $request['query']['query_string']['query'] = '*' . $key_and_val[1] . '*';\n $request['query']['query_string']['default_operator'] = 'AND';\n } else {\n $request['query'] = array(\"match_all\" => new stdClass);\n }\n //$request['query']['query_string']['query'] = 'American FactFinder';\n // start parameter (elasticsearch calls this 'from')\n $incoming_start = $this->get('GET.start');\n if (!empty($incoming_start)) {\n $request['from'] = $this->get('GET.start');\n }\n \n // limit parameter (elasticsearch calls this 'size')\n $incoming_limit = $this->get('GET.limit');\n if (!empty($incoming_limit)) {\n $request['size'] = $this->get('GET.limit');\n }\n \n // sort parameter\n $incoming_sort = $this->get('GET.sort');\n $sort_field_and_dir = explode(\" \", $this->get('GET.sort'));\n if (count($sort_field_and_dir) == 2) {\n $request['sort'] = array($sort_field_and_dir[0] => array('order' => $sort_field_and_dir[1]));\n }\n \n // We now have our built request, let's jsonify it and send it to ES\n $jsoned_request = json_encode($request);\n \n $url = $this->get('ELASTICSEARCH_URL') . '_search';\n $ch = curl_init();\n $method = \"GET\";\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($method));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $jsoned_request);\n\n $results = curl_exec($ch);\n curl_close($ch);\n\n // We should have a response. Let's pull the docs out of it\n $cleaned_results = $this->get_docs_from_es_response(json_decode($results, True));\n // callback for jsonp requests\n $incoming_callback = $this->get('GET.callback');\n if (!empty($incoming_callback)) {\n $this->set('callback', $this->get('GET.callback'));\n }\n \n // We don't want dupes. Dedupe based on hollis_id\n //$deduped_docs = $this->dedupe_using_hollis_id($cleaned_results);\n \n // Hopefully we're deduping on intake\n $deduped_docs = $cleaned_results;\n \n $this->set('results', $deduped_docs);\n //$this->set('results', $cleaned_results);\n $path_to_template = 'api/templates/search_json.php';\n echo $this->render($path_to_template);\n }", "public function search( $request ) {\n\t\tif( $keyword = is_object($request) ? $request->requestVar('term') : $request ) {\n\t\t\t$geoLocations = GeoLocation::getByKeyword($keyword, 10);\n\t\t\t$response = array();\n\t\t\tforeach( $geoLocations->map('ID', 'getFullTitle') as $id => $label ) {\n\t\t\t\t$response[] = array(\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'label' => $label\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$response = false;\n\t\t}\n\t\treturn json_encode($response);\n\t}", "public function search(){}", "public function findBySearchTerm($query, $term = '', $facetConfiguration = [], $searchConfiguration = []);", "public function search( $query, $wordSearch = true, $categorySearch = true, $exact = false, $sortType = 'instanceCount', $includePages = false, $offset = 0, $limit = 100 ){ return $this->APICallSub( '/ul', array( 'search' => $query, 'wordSearch' => $wordSearch, 'categorySearch' => $categorySearch, 'sortType' => $sortType, 'exact' => $exact, 'includePages' => $includePages, 'offset' => $offset, 'limit' => $limit ), \"Could not perform Ultralink search\" ); }", "public function search();", "public function search();", "public function searchByName($query);", "public function search(Query $query);", "public function search($search_term, $category = 0){\n\t\t\t$this->search_type = self::get_search_type($search_term);\n\t\t\t\n\t\t\t$long = 0;\n\t\t\t$lat = 0;\t\t\t\n\n\t\t\t//postcode?\n\t\t\tif($this->search_type == 'postcode'){\n\n\t\t\t\t//if its a partial postcode, padd it\n\t\t\t\t$clean_postcode = clean_postcode($search_term);\n\t\t\t\t$longlat = get_postcode_location($clean_postcode, 'UK');\n\n\t\t\t\tif($longlat != false){\n\t\t\t\t\t$long = $longlat[0];\n\t\t\t\t\t$lat = $longlat[1];\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//Update the stats table\n\t\t\t\ttableclass_stat::increment_stat(\"search.type.ukpostcode\");\n\t\t\t}\n\t\t\t\n\t\t\t//zipcode?\n\t\t\tif($this->search_type == 'zipcode'){\n\t\t\t\t$clean_postcode = trim($search_term);\n\t\t\t\t$longlat = get_postcode_location($clean_postcode, 'US');\n\t\t\t\tif($longlat == false){\n\t\t\t\t\tarray_push($this->warnings, \"A error occured when trying to find that zip code\");\n\t\t\t\t\ttrigger_error(\"Unable to get location for zipcode: \" . $search_term);\n\t\t\t\t}else{\n\t\t\t\t\t$long = $longlat[0];\n\t\t\t\t\t$lat = $longlat[1];\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Update the stats table\n\t\t\t\ttableclass_stat::increment_stat(\"search.type.zipcode\");\t\t\t\t\n\t\t\t}\n\t\t\t//long lat?\n\t\t\tif($this->search_type == 'longlat'){\n\n\t\t\t\t$split = split(\",\", trim($search_term));\n\t\t\t\t$long = $split[0];\n\t\t\t\t$lat = $split[1];\n\n\n\t\t\t\t//Update the stats table\n\t\t\t\ttableclass_stat::increment_stat(\"search.type.longlat\");\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Do the search for groups directly covering this location\n\t\t\t$search = factory::create('search');\n\t\t\t$groups = $search->search('group', $this->add_category(array(\n\t\t\t\tarray('long_bottom_left', '<', $long),\n\t\t\t\tarray('long_top_right', '>', $long),\n\t\t\t\tarray('lat_bottom_left', '<', $lat),\n\t\t\t\tarray('lat_top_right', '>', $lat),\n\t\t\t\tarray('confirmed', '=', 1)\t\t\n\t\t\t\t), $category),\n\t\t\t\t'AND'\n\t\t\t);\n\t\t\t\n\t\t\t//Do another search with buffeering based on population density \n\t\t\t$gaze = factory::create('gaze');\n\t\t\t$radius_km = $gaze->get_radius_containing_population($long, $lat, POPULATION_THRESHOLD, MAX_KM_DISTANCE_BUFFER);\n\t\t\t\n\t\t\t//if that worked, do the other search\n\t\t\tif ($radius_km && $gaze->status !='service unavaliable' && !get_http_var('pointonly')) {\n\t\t\t\n\t\t\t\t//work out the buffered long / lat values\n\t\t\t\t$buffered_long = distance_to_longitude($radius_km);\n\t\t\t\t$buffered_lat = distance_to_latitude($radius_km);\n\n\t\t\t\t//make the bounding box\n\t\t\t\t$buffered_bottom_left_long = $long - $buffered_long;\n\t\t\t\t$buffered_bottom_left_lat = $lat - $buffered_lat;\n\t\t\t\t$buffered_top_right_long = $long + $buffered_long;\n\t\t\t\t$buffered_top_right_lat = $lat + $buffered_lat;\n\n\t\t\t\t//do the buffered searches (THIS IS REALY INEFFICANT BUT PEAR DATA OBJECTS DONT DO MIXED AND/OR SEARCHES)\n\t\t\t\t$groups_buffered = array();\n\t\t\t\t$groups_buffered1 = $search->search('group', $this->add_category(array(\n\t\t\t\t\tarray('long_bottom_left', '>', $buffered_bottom_left_long),\n\t\t\t\t\tarray('long_bottom_left', '<', $buffered_top_right_long),\n\t\t\t\t\tarray('lat_bottom_left', '>', $buffered_bottom_left_lat),\n\t\t\t\t\tarray('lat_bottom_left', '<', $buffered_top_right_lat),\n\t\t\t\t\tarray('confirmed', '=', 1)\t\t\t\t\n\t\t\t\t\t), $category),\n\t\t\t\t\t'AND'\n\t\t\t\t);\n\t\t\t\t$groups_buffered = array_merge($groups_buffered, $groups_buffered1);\n\t\t\t\t\n\t\t\t\t$groups_buffered2 = $search->search('group', $this->add_category(array(\n\t\t\t\t\tarray('long_top_right', '<', $buffered_top_right_long),\n\t\t\t\t\tarray('long_top_right', '>', $buffered_top_right_long),\n\t\t\t\t\tarray('lat_top_right', '>', $buffered_bottom_left_lat),\n\t\t\t\t\tarray('lat_top_right', '<', $buffered_top_right_lat),\n\t\t\t\t\tarray('confirmed', '=', 1)\t\t\t\t\n\t\t\t\t\t), $category),\n\t\t\t\t\t'AND'\n\t\t\t\t);\n\t\t\t\t$groups_buffered = array_merge($groups_buffered, $groups_buffered2);\n\t\t\t\t\n\t\t\t\t$groups_buffered3 = $search->search('group', $this->add_category(array(\n\t\t\t\t\tarray('long_bottom_left', '>', $buffered_bottom_left_long),\n\t\t\t\t\tarray('long_bottom_left', '<', $buffered_top_right_long),\n\t\t\t\t\tarray('lat_top_right', '>', $buffered_bottom_left_lat),\n\t\t\t\t\tarray('lat_top_right', '<', $buffered_top_right_lat),\n\t\t\t\t\tarray('confirmed', '=', 1)\t\t\t\t\n\t\t\t\t\t), $category),\n\t\t\t\t\t'AND'\n\t\t\t\t);\n\t\t\t\t$groups_buffered = array_merge($groups_buffered, $groups_buffered3);\n\t\t\t\t\n\t\t\t\t$groups_buffered4 = $search->search('group', $this->add_category(array(\n\t\t\t\t\tarray('long_top_right', '>', $buffered_bottom_left_long),\n\t\t\t\t\tarray('long_top_right', '<', $buffered_top_right_long),\n\t\t\t\t\tarray('lat_bottom_left', '>', $buffered_bottom_left_lat),\n\t\t\t\t\tarray('lat_bottom_left', '<', $buffered_top_right_lat),\n\t\t\t\t\tarray('confirmed', '=', 1)\t\t\t\t\n\t\t\t\t\t), $category),\n\t\t\t\t\t'AND'\n\t\t\t\t);\n\t\t\t\t$groups_buffered = array_merge($groups_buffered, $groups_buffered4);\n\n\t\t\t\t//if we have any buffered groups, add them in\n\t\t\t\tif($groups_buffered){\n\t\t\t\t\t$groups = array_merge($groups, $groups_buffered);\n\t\t\t\t\t\n\t\t\t\t\t//remove any duplicates (again should really be in the database call)\n\t\t\t\t\t$cleaned_groups = array();\n\t\t\t\t\tforeach ($groups as $group){\n\t\t\t\t\t\tif (!isset($cleaned_groups[$group->group_id]))\n\t\t\t\t\t\t\t$cleaned_groups[$group->group_id] = $group;\n\t\t\t\t\t}\n\t\t\t\t\t$groups = array_values($cleaned_groups);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tusort($groups, create_function('$a,$b',\n\t\t\t\t'\n\t\t\t\tif ($a->{category_id} < $b->{category_id}) return -1;\n\t\t\t\tif ($a->{category_id} > $b->{category_id}) return 1;\n\t\t\t\tif ($a->{zoom_level} < $b->{zoom_level}) return 1;\n\t\t\t\tif ($a->{zoom_level} > $b->{zoom_level}) return -1;\n\t\t\t\treturn 0;\n\t\t\t\t'\n\t\t\t));\n\n\t\t\t//Update the stats table\n\t\t\ttableclass_stat::increment_stat(\"search.count\");\n\t\t\t\n\t\t\t//Return search result\n\t\t\treturn array($groups, $long, $lat);\n\t\t\t\n\t\t}", "public function suggest() {\n // Set the content type to json\n $this->response->type('application/json');\n $result = $this->searchPlace();\n $this->set('result', $result);\n }", "public function search($search);", "function query_api($term, $location, $price, $radius, $categories, $sort) { \n $response = search($term, $location, $price, $radius, $categories, $sort);\n echo $response;\n}", "public static function search($query, &$results = array()) {\n\n }", "public function search($jql)\n {\n return $this->client->get('/rest/api/2/search?jql='.urlencode($jql));\n }", "public function search(){\n //includes google maps script for place autocomplete and to get experiences\n \t$this->set('jsIncludes',array('http://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&language=fr&libraries=places','places_autocomplete','get_experiences','logo_fly','jquery.dropdown','cookies'));\n \n //sets motives, schools and departments by alphbetical order\n $this->__set_motives_schools_and_departments();\n }", "public function search($query, $year = null, $language = null);", "public function search($keyword)\n {\n }", "public function search(Request $request)\r\n {\r\n /*$request->validate([\r\n 'query' => 'required|min:3',\r\n ]);\r\n*/\r\n $query = $request->input('query');\r\n\r\n // $products = Product::where('name', 'like', \"%$query%\")\r\n // ->orWhere('details', 'like', \"%$query%\")\r\n // ->orWhere('description', 'like', \"%$query%\")\r\n // ->paginate(10);\r\n\r\n $listings = Listing::search($query)->paginate(10);\r\n}", "function search($searchType, $price, $location, $categories) {\n $url_params = array();\n \n $url_params['term'] = $searchType;\n //$url_params['location'] = $location;\n $url_params['longitude'] = $location[0];\n $url_params['latitude'] = $location[1];\n //8046.72 is equivalent to 5 miles 16093.44 is equivalent to 10 miles\n $url_params['radius'] = 16093;\n $url_params['price'] = $price;\n $url_params['sort_by'] = 'rating';\n $url_params['open_now'] = true;\n $url_params['limit'] = 20;\n $url_params['categories'] = $categories;\n \n //converts into 'https://api.yelp.com/v3/businesses/search/location&limit&price&sort_by&radius'\n $response = request($GLOBALS['API_HOST'], $GLOBALS['SEARCH_PATH'], $url_params);\n \n $pretty_response = json_encode(json_decode($response), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n\n $data = json_decode($pretty_response, true);\n\n return $data['businesses'];\n}", "public function search() {\n\t\tif(isset($_GET['query'])) $this->query_str = $_GET['query'];\n\t\telse return;\n\n\t\t$raw = null;\n\n\t\t$cache = new Cache($this->query_str);\n\t\t//check if the result is cached\n\t\t\n\t\tif($cache->allow_cache()) {\n\t\t\t$raw = $cache->load_cache();\n\t\t\tif($raw === false) $raw = null;\n\t\t}\n\n\t\tif($raw === null) {\n\t\t\t//check if jar exists\n\t\t\tif(file_exists('../executable/app.jar')) $raw = shell_exec('cd ../executable/ && java -jar app.jar search ' . escapeshellarg($this->query_str));\n\t\t\telse return;\n\n\t\t\t//only save into cached when the escaped string equal to input string\n\t\t\tif($raw !== null && count($raw) > 0 && $cache->allow_cache()) \n\t\t\t\t$cache->save_cache($raw);\n\t\t}\n\n\t\t$this->results = json_decode($raw);\n\n\t\t$this->end_time = microtime(true);\n\t}", "function _admin_search_query()\n {\n }", "public function search(){ \n\t\t$this->layout = false;\t \n\t\t$q = trim(Sanitize::escape($_GET['q']));\t\n\t\tif(!empty($q)){\n\t\t\t// execute only when the search keywork has value\t\t\n\t\t\t$this->set('keyword', $q);\n\t\t\t$data = $this->BdSpoc->find('all', array('fields' => array('HrEmployee.first_name'),\n\t\t\t'group' => array('first_name'), 'conditions' => \tarray(\"OR\" => array ('first_name like' => '%'.$q.'%'),\n\t\t\t'AND' => array('HrEmployee.status' => '1', 'HrEmployee.is_deleted' => 'N','BdSpoc.is_deleted' => 'N'))));\t\t\n\t\t\t$this->set('results', $data);\n\t\t}\n }", "function display_elastic_search ($q, $filter=null, $from = 0, $size = 20, $callback = '')\n{\n\tglobal $elastic;\n\t\n\t$status = 404;\n\t\t\t\t\n\tif ($q == '')\n\t{\n\t\t$obj = new stdclass;\n\t\t$obj->hits = new stdclass;\n\t\t$obj->hits->total = 0;\n\t\t$obj->hits->hits = array();\n\t\t\n\t\t$status = 200;\n\t}\n\telse\n\t{\t\t\n\t\t// query type\t\t\n\t\t$query_json = '';\n\t\t\n\t\tif ($filter)\n\t\t{\n\t\t\tif (isset($filter->author))\n\t\t\t{\n\t\t\t\t// author search is different( but not working yet)\t\n\t\t\t\t$query_json = \t\t\n\t'{\n\t\"size\":50,\n \"query\": {\n \"bool\": {\n \"must\": [ {\n\t\t\t\t \"multi_match\" : {\n\t\t\t\t \"query\": \"<QUERY>\",\n\t\t\t\t \"fields\":[\"search_data.author\"] \n\t\t\t\t}\n\t\t\t\t}]\n }\n }\n\t}';\n\t\t\t$query_json = str_replace('<QUERY>', $q, $query_json);\n\t\t\t\n\t\t\t// echo $query_json;\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t// default is search on fulltext fields\n\t\tif ($query_json == '')\n\t\t{\n\t\t\t$query_json = '{\n\t\t\t\"size\":50,\n\t\t\t\t\"query\": {\n\t\t\t\t\t\"bool\" : {\n\t\t\t\t\t\t\"must\" : [ {\n\t\t\t\t \"multi_match\" : {\n\t\t\t\t \"query\": \"<QUERY>\",\n\t\t\t\t \"fields\":[\"search_data.fulltext\", \"search_data.fulltext_boosted^4\"] \n\t\t\t\t}\n\t\t\t\t}],\n\t\t\t\"filter\": <FILTER>\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"aggs\": {\n\t\t\t\"type\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.type.keyword\" }\n\t\t\t },\n\t\t\t \"year\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.year\" }\n\t\t\t },\n\t\t\t \"container\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.container.keyword\" }\n\t\t\t },\n\t\t\t \"author\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.author.keyword\" }\n\t\t\t },\n\t\t\t \"classification\" :{\n\t\t\t\t\"terms\": { \"field\" : \"search_data.classification.keyword\" }\n\t\t\t } \n\n\t\t\t}\n\n\t\n\t\t\t}';\n\t\t\t\n\t\t\t$query_json = str_replace('<QUERY>', $q, $query_json);\n\t\t}\n\t\n\t$filter_string = '[]';\n\t\n\tif ($filter)\n\t{\n\t\t$f = array();\n\t\t\n\t\tif (isset($filter->year))\n\t\t{\n\t\t\t$one_filter = new stdclass;\n\t\t\t$one_filter->match = new stdclass;\n\t\t\t$one_filter->match->{'search_data.year'} = $filter->year;\n\t\t\t\n\t\t\t$f[] = $one_filter;\t\t\t\n\t\t}\n\n\t\t// this doesn't work\n\t\tif (isset($filter->author))\n\t\t{\n\t\t\t$one_filter = new stdclass;\n\t\t\t$one_filter->match = new stdclass;\n\t\t\t$one_filter->match->{'search_data.author'} = $filter->author;\n\t\t\t\n\t\t\t$f[] = $one_filter;\t\t\t\n\t\t}\n\t\t\n\t\t$filter_string = json_encode($f);\n\t}\n\t\n\t$query_json = str_replace('<FILTER>', $filter_string, $query_json);\n\t\n\t\n\t$resp = $elastic->send('POST', '_search?pretty', $post_data = $query_json);\n\t\n\n\t\t$obj = json_decode($resp);\n\n\t\t$status = 200;\n\t}\n\t\n\tapi_output($obj, $callback, 200);\n}", "function search() {}", "public function search($search_term = \"\"){\r\n\t\tif($search_term != \"\"){\r\n\t\t\t$req = $this->config->getDomain() . \"Search\";\r\n\t\t\t$req .= \"?search_term=\" . $search_term;\r\n\t\t\t$req .= \"&dataType=\" . $this->config->getDataType();\r\n\t\t\t$resp = $this->helper->curlGet($req);\r\n\t\t\t$resultsArray = array();\r\n\t\t\tforeach (json_decode($resp) as $obj){\r\n\t\t\t\t$searchResult = new CurtSearchResult;\r\n\t\t\t\t$sR = $searchResult->castToSearchResult($obj);\r\n\t\t\t\tarray_push($resultsArray, $sR);\r\n\t\t\t}\r\n\t\t\treturn $resultsArray;\r\n\t\t} // end if\r\n\t}", "public function getSearch();", "public function executeSearch(sfWebRequest $request) {\n \t// look into PHP buffering to facilitate with GATC setting before redirecting to exact match\n \t$this->getResponse()->setSlot('body_class','search');\n \t$this->query = trim($request->getParameter('q'));\n \tif(!in_array($this->query, sfConfig::get('app_search_default_queries'))) {\n \t\t$SA = new SearchAgent($this->query);\n \t\t// if exact match is found redirect to the part's route\n \t\tif($route = $SA->search()) $this->redirect($route);\n \t\telse { // otherwise, see if similar parts exist for the user's query\n \t\t\tif($this->similar_parts = $SA->getSimilarParts()) {\n\t \t\t\t$this->count = $this->similar_parts[0]['count'];\n\t \t\t\t$this->search_routes = $SA->getSearchRoutes();\n\t \t\t\t$this->search_routes_class = $this->getSearchRoutesClass(count($this->search_routes));\n\t \t\t\t$this->num_serps = $this->count <= sfConfig::get('app_search_pagination_max_items') ? 1 : ceil($this->count / sfConfig::get('app_search_pagination_max_items'));\n\t \t\t\t$item_count = count($this->similar_parts);\n\t \t\t\t$rem = $item_count % 2 == 0 ? 2 : 1;\n\t \t\t\t$this->bottom_idx = $item_count - $rem;\n\t \t\t\t$this->getResponse()->setTitle(\"Product Search: '{$this->query}'\");\n\t \t\t\treturn sfView::SUCCESS;\n \t\t\t} else {\n \t\t\t\t// there is nothing in the database like the user's query\n \t\t\t\t$this->getResponse()->setTitle(\"Product Search: '{$this->query}'\");\n \t\t\t\treturn sfView::ALERT;\n \t\t\t}\n \t\t}\n \t} else {\n \t\t// user didn't enter anything into search box\n \t\t$this->getResponse()->setTitle('Product Search: Missing Query Parameter');\n \t\treturn sfView::ALERT;\n \t}\n }", "public static function search() {\r\n $result = lC_Default::find($_GET['q']);\r\n\r\n echo $result;\r\n }", "protected function parse_search(&$q)\n {\n }", "public static function search() {\n global $p;\n if (check_posts(['lat', 'lng'])) {\n $pharmacies = new pharmacies();\n $pharmacies->placeLat = $p['lat'];\n $pharmacies->placeLong = $p['lng'];\n $list = $pharmacies->get_place_by_latlng($p['distance'], 10);\n $r = [];\n\n foreach ($list['result'] as $place) {\n $f = new files($place['placeImg']);\n $place['placeImg'] = $f->placeOnServer;\n $r[] = $place;\n }\n $result['status'] = TRUE;\n $result['count'] = $list['nums'];\n $result['list'] = $r;\n } else {\n\n $result['status'] = FALSE;\n $result['error'] = 'invalid lat and lng';\n }\n\n// echo json_encode($p);\n// exit;\n if (@$p['post'] == 'post')\n $result['post'] = $p;\n echo json_encode($result);\n }", "function the_search_query()\n {\n }", "public function search($category)\n {\n // but if the criteria title is specified, we use it\n \n $boolQuery = new \\Elastica\\Query\\Bool();\n /*Fetch only VALIDATED place*/\n $queryStatus = new \\Elastica\\Query\\Match();\n $queryStatus->setFieldQuery('event.status', StatusType::VALIDATED);\n $boolQuery->addMust($queryStatus);\n \n if($category !== null){\n $queryCategory = new \\Elastica\\Query\\Match();\n $queryCategory->setFieldQuery('event.categories.slug', $category);\n $boolQuery->addMust($queryCategory);\n } \n \n// if($placeSearch->getBirthdayDiscount() != null && $placeSearch->getBirthdayDiscount() > 0 ){\n// $queryRange = new \\Elastica\\Query\\Range();\n// $queryRange->setParam('place.birthdayDiscount', ['gte' => 1]);\n// $boolQuery->addMust($queryRange);\n// }\n// \n// if(($placeSearch->getName() != null || $placeSearch->getCategories() != null ) && $placeSearch != null){\n// \n// if($placeSearch->getName() != null){\n// $query = new \\Elastica\\Query\\Match();\n// $query->setFieldQuery('place.name', $placeSearch->getName());\n// $query->setFieldFuzziness('place.name', 1);\n// $query->setFieldMinimumShouldMatch('place.name', '10%');\n// $boolQuery->addMust($query);\n// }\n// \n// if($placeSearch->getCategories() != null){ \n// foreach ($placeSearch->getCategories() as $cat){ \n// $categories[] = $cat->getName(); \n// }\n// $queryCategories = new \\Elastica\\Query\\Terms();\n// $queryCategories->setTerms('place.categories', $categories);\n// $boolQuery->addShould($queryCategories);\n// }\n// \n //} \n else {\n $query = new \\Elastica\\Query\\MatchAll();\n }\n $baseQuery = $boolQuery; \n\n // then we create filters depending on the chosen criterias\n $boolFilter = new \\Elastica\\Filter\\Bool();\n\n /*\n Dates filter\n We add this filter only the getIspublished filter is not at \"false\"\n */\n// if(\"false\" != $articleSearch->getIsPublished()\n// && null !== $articleSearch->getDateFrom()\n// && null !== $articleSearch->getDateTo())\n// {\n// $boolFilter->addMust(new \\Elastica\\Filter\\Range('publishedAt',\n// array(\n// 'gte' => \\Elastica\\Util::convertDate($articleSearch->getDateFrom()->getTimestamp()),\n// 'lte' => \\Elastica\\Util::convertDate($articleSearch->getDateTo()->getTimestamp())\n// )\n// ));\n// }\n//\n // Published or not filter\n// if($placeSearch->getIs24h() !== null && $placeSearch->getIs24h()){\n// //var_dump($placeSearch->getIs24h());die();\n// $boolFilter->addMust(\n// new \\Elastica\\Filter\\Term(['is24h' => $placeSearch->getIs24h()])\n// //new \\Elastica\\Filter\\Term(['isWifi' => $placeSearch->getIsWifi()]) \n// ); \n// \n// //$boolFilter->addMust('is24h', $placeSearch->getIs24h());\n// }\n// \n// if($placeSearch->getIsWifi() !== null && $placeSearch->getIsWifi()){\n// $boolFilter->addMust( \n// new \\Elastica\\Filter\\Term(['isWifi' => $placeSearch->getIsWifi()]) \n// );\n// }\n// \n// if($placeSearch->getIsDelivery() !== null && $placeSearch->getIsDelivery()){\n// $boolFilter->addMust( \n// new \\Elastica\\Filter\\Term(['isDelivery' => $placeSearch->getIsDelivery()]) \n// );\n// } \n\n $filtered = new \\Elastica\\Query\\Filtered($baseQuery, $boolFilter);\n\n $query = \\Elastica\\Query::create($filtered);\n\n return $this->find($query);\n }", "abstract public function search($keyword, array $searchOptions = []);", "public function scopeSearch($query, $term);", "public function search(TDispatch $td, $q = \"\", $limit = 10, $type = \"\") {\r\n $data = array(\r\n \"access_token\" => $td->getToken(),\r\n \"q\" => $q, //\tstring\tQuery string to search locations. Required\r\n \"limit\" => $limit, //\tint\tLimit number of locations. Optional\r\n \"type\" => $type //\tstring\tShould be 'pickup' if location is going to be used for a pickup. Optional.\r\n );\r\n //TD url\r\n $url = $td->getFullApiUrl() . 'locations/search?' . http_build_query($data);\r\n //Open connection\r\n $ch = curl_init();\r\n\r\n //Set the url, Number of POST vars, POST data\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_URL, $url);\r\n\r\n //Execute post\r\n $result = curl_exec($ch); \r\n $res = json_decode($result, true);\r\n $info = curl_getinfo($ch); \r\n //Close connection\r\n curl_close($ch);\r\n if (!isset($res['status']) || $res['status'] !== 'OK') {\r\n $td->setError($res);\r\n return false;\r\n }\r\n //Decode jsonresponse\r\n return $res;\r\n }", "public static function search($keyword)\n {\n $keyword = urlencode($keyword);\n return Cartoon::query(\"search=$keyword\");\n }", "public function search()\n {\n $domains = Configure::read('AccessControlAllowOrigin');\n $this->response->cors($this->request)\n ->allowOrigin($domains)\n ->allowMethods(['GET'])\n ->allowHeaders(['X-CSRF-Token'])\n ->maxAge(300)\n ->build();\n\n $version = '2-2';\n if (!empty($this->request->query['version'])) {\n $version = $this->request->query['version'];\n }\n if (empty($this->request->query['lang'])) {\n throw new BadRequestException();\n }\n $lang = $this->request->query['lang'];\n\n $page = 1;\n if (!empty($this->request->query['page'])) {\n $page = $this->request->query['page'];\n }\n $page = max($page, 1);\n\n if (count(array_filter(explode(' ', $this->request->query['q']))) === 1) {\n $this->request->query['q'] .= '~';\n }\n\n $options = [\n 'query' => $this->request->query('q'),\n 'page' => $page,\n ];\n $this->loadModel('Search', 'Elastic');\n $results = $this->Search->search($lang, $version, $options);\n\n $this->viewBuilder()->className('Json');\n $this->set('results', $results);\n $this->set('_serialize', 'results');\n }", "public function search($params = []);", "public function search(SearchRequestInterface $searchRequest) : SearchResultInterface;", "public function search(Request $request)\n {\n $appid = '6433c1f8';\n $appkey = 'acf4191deb52673bc8bcbf205e8c2ccc';\n $q = htmlspecialchars($request->search);\n $client = new Client([\n 'base_uri' => 'https://api.edamam.com',\n ]);\n $search = 'search?q='.$q.'&app_id='.$appid.'&app_key='.$appkey.'&from=0&to=12';\n $req = $client->request('GET', $search);\n $data = json_decode($req->getBody(), true);\n\n\n $results = [];\n $keyword = $data['q'];\n foreach($data['hits'] as $arr){\n $results[] = [\n 'uri'=>$arr['recipe']['uri'],\n 'shareAs'=>$arr['recipe']['shareAs'],\n 'sourceUrl'=>$arr['recipe']['url'],\n 'label'=>$arr['recipe']['label'],\n 'image'=>$arr['recipe']['image'],\n 'source'=>$arr['recipe']['source'],\n 'calories'=>$arr['recipe']['calories'],\n 'ingredients'=>count($arr['recipe']['ingredients'])\n ];\n }\n return view('search.resultview')->withKeyword($keyword)->withResults($results);\n }", "public function search($request, $response)\n {\n }", "public function keywordSearch()\n {\n $input = Request::all();\n $validator = Validator::make($input, ['keyword' => 'required']);\n if ($validator->fails()) {\n return ApiResponse::validation($validator);\n }\n\n $keyword = ine($input, 'keyword') ? $input['keyword'] : '';\n $limit = isset($input['limit']) ? $input['limit'] : config('jp.pagination_limit');\n $customers = Customer::where('customers.company_id', config('company_scope_id'))\n ->leftJoin('addresses', function ($join) {\n $join->on('customers.address_id', '=', 'addresses.id');\n })\n ->leftJoin('customer_contacts', function ($join) {\n $join->on('customers.id', '=', 'customer_contacts.customer_id');\n })\n ->with('phones', 'address', 'jobs')\n ->keywordSearch($keyword, $this->scope->id())\n ->select('customers.*')\n ->groupBy('customers.id')\n ->paginate($limit);\n\n $transformer = (new CustomersTransformer)->setDefaultIncludes([\n 'count',\n 'address',\n 'phones'\n ]);\n\n return ApiResponse::success(\n $this->response->paginatedCollection($customers, $transformer)\n );\n }", "public function actionSearch($q)\n {\n $result = ElasticItem::search($q);\n\n return $this->render('search', [\n 'q' => $q,\n 'result' => $result\n ]);\n }", "public function getAll($searchTerm);", "public function search()\n {\n $user = User::search('');\n dd($user);\n dd(request('keyword'));\n return ResponseHelper::createSuccessResponse([], 'Operation Successful');\n }", "public function getSearch($parameters = array());", "function ml_wpsearch_search($querytext)\n{\n $querytext = trim($querytext);\n if (!$querytext) {\n return [null, null, null];\n }\n\n $results = ml_wpsearch_search_query($querytext, array(\n 'start' => isset($_REQUEST['start']) ? $_REQUEST['start'] : 1,\n 'pageLength' => isset($_REQUEST['pageLength']) ? $_REQUEST['pageLength'] : 10,\n ));\n if (null === $results)\n {\n return [null, null, null];\n }\n\n if ($results->getTotal() < 1) {\n return [$results, null, null];\n }\n\n // Paging, we'll provide the URLs here, but it's up to the view\n // to display them.\n $searchPageUrl = ml_wpsearch_url();\n $nextLink = null;\n if ($results->getCurrentPage() < $results->getTotalPages()) {\n $nextLink = add_query_arg(array(\n 's' => urlencode($querytext),\n 'start' => $results->getNextStart(),\n 'pageLength' => $results->getPageLength(),\n ), $searchPageUrl);\n }\n\n $prevLink = null;\n if ($results->getCurrentPage() > 1) {\n $prevLink = add_query_arg(array(\n 's' => urlencode($querytext),\n 'start' => $results->getPreviousStart(),\n 'pageLength' => $results->getPageLength(),\n ), $searchPageUrl);\n }\n\n return [$results, $nextLink, $prevLink];\n}", "public function searchAction() {\n $search = $this->getParam('search');\n\n\n $queryBuilder = new Application_Util_QueryBuilder($this->getLogger());\n\n $queryBuilderInput = array(\n 'searchtype' => 'simple',\n 'start' => '0',\n 'rows' => '10',\n 'sortOrder' => 'desc',\n 'sortField'=> 'score',\n 'docId' => null,\n 'query' => $search,\n 'author' => '',\n 'modifier' => 'contains_all',\n 'title' => '',\n 'titlemodifier' => 'contains_all',\n 'persons' => '',\n 'personsmodifier' => 'contains_all',\n 'referee' => '',\n 'refereemodifier' => 'contains_all',\n 'abstract' => '',\n 'abstractmodifier' => 'contains_all',\n 'fulltext' => '',\n 'fulltextmodifier' => 'contains_all',\n 'year' => '',\n 'yearmodifier' => 'contains_all',\n 'author_facetfq' => '',\n 'languagefq' => '',\n 'yearfq' => '',\n 'doctypefq' => '',\n 'has_fulltextfq' => '',\n 'belongs_to_bibliographyfq' => '',\n 'subjectfq' => '',\n 'institutefq' => ''\n );\n\n\n $query = $queryBuilder->createSearchQuery($queryBuilderInput, $this->getLogger());\n\n $result = array();\n\n $searcher = new Opus_SolrSearch_Searcher();\n try {\n $result = $searcher->search($query);\n }\n catch (Opus_SolrSearch_Exception $ex) {\n var_dump($ex);\n }\n\n $matches = $result->getReturnedMatches();\n\n $this->view->total = $result->getAllMatchesCount();\n $this->view->matches = $matches;\n }", "public function get_results() {\n\n\t\t\tif(!isset($_GET['wpusquery'])) {\n\t\t\t\tdie(); // if no data has been entered, quit\n\t\t\t} else {\n\t\t\t\t$searcharray = $_GET['wpusquery'];\n\t\t\t}\n\n\t\t\t$nonce = $_GET['searchNonce'];\n\t\t\tif(!wp_verify_nonce($nonce, 'search-nonce')) // make sure the search nonce matches the nonce generated earlier\n\t\t\t{\n\t\t\t\tdie ('Busted!');\n\t\t\t}\n\n\t\t\tif(class_exists(\"WPUltimateSearchPro\")) {\n\t\t\t\t$this->pro_class->execute_query_pro($searcharray);\n\t\t\t} else {\n\t\t\t\t$this->execute_query_basic($searcharray);\n\t\t\t}\n\t\t}", "public function search()\n {\n return $this->call('GET', $this->endpoint);\n }", "public function search()\n {\n $query = Purifier::clean(Input::get('q'));\n return Redirect::away('https://www.google.com/search?q=site:www.apcow.com' . $query, 301);\n }", "public function search($searchTerm)\n {\n $results = array(\n 'snippet' => [],\n 'snippet_code' => [],\n 'page' => [],\n 'product' => [],\n 'actions' => [],\n 'word' => [],\n 'post' => []\n );\n\n $snippets = Yii::$app->user->identity->portal->hasMany(Snippet::className(), ['id' => 'snippet_id'])\n ->viaTable('snippet_portal', ['portal_id' => 'id'])\n ->filterWhere([\n 'or',\n ['like', 'name', $searchTerm],\n ['like', 'description', $searchTerm],\n ])\n ->limit(10)\n ->all();\n\n foreach ($snippets as $snippet) {\n $results['snippet'][] = [\n 'link' => Url::to([\n '/snippet/edit',\n 'id' => $snippet->id\n ]),\n 'name' => $snippet->name,\n 'id' => $snippet->id,\n 'class' => 'suggest-snippet'\n ];\n }\n\n // SNIPPET CODES / ALTERNATIVES\n\n /** @var SnippetCode[] $snippet_codes */\n $snippet_codes = SnippetCode::find()\n ->filterWhere([\n 'or',\n ['like', 'name', $searchTerm],\n ['like', 'code', $searchTerm]\n ])\n ->limit(10)\n ->all();\n\n foreach ($snippet_codes as $snippet_code) {\n $results['snippet_code'][] = [\n 'link' => Url::to([\n '/snippet/edit',\n 'id' => $snippet_code['snippet_id'],\n '#' => 'code' . $snippet_code['id'],\n ]),\n 'name' => $snippet_code->getSnippet()->one()->name . ' -> ' . $snippet_code->name,\n 'id' => $snippet_code->id,\n 'class' => 'suggest-snippet-code'\n ];\n }\n\n // Slovnik\n $words = (new Query())->select(\"id, identifier\")->from(\"word\")->where(['like', 'identifier', $searchTerm])\n ->limit(10)->all();\n\n foreach ($words as $word) {\n $results['word'][] = [\n 'link' => Url::to([\n '/word/edit',\n 'id' => $word['id']\n ]),\n 'name' => $word['identifier'],\n 'id' => $word['id'],\n 'class' => 'suggest-word'\n ];\n }\n\n // PAGES\n\n $pages = Page::find()->filterWhere([\n 'or',\n ['like', 'name', $searchTerm],\n ['like', 'identifier', $searchTerm],\n ['like', 'title', $searchTerm],\n ])\n ->andWhere([\n 'portal_id' => Yii::$app->user->identity->portal_id\n ])\n ->limit(10)\n ->all();\n\n foreach ($pages as $page) {\n $results['page'][] = [\n 'link' => Url::to(['/page/edit', 'id' => $page['id']]),\n 'id' => $page->id,\n 'name' => $page->breadcrumbs,\n 'class' => 'suggest-page'\n ];\n }\n\n // POSTS\n\n $posts = Post::find()->filterWhere([\n 'or',\n ['like', 'name', $searchTerm],\n ['like', 'identifier', $searchTerm],\n ['like', 'title', $searchTerm],\n ])\n ->andWhere([\n 'portal_id' => Yii::$app->user->identity->portal_id\n ])\n ->limit(10)\n ->all();\n\n foreach ($posts as $post) {\n $results['post'][] = [\n 'link' => Url::to(['/post/edit', 'id' => $post['id']]),\n 'id' => $post->id,\n 'name' => $post->name,\n 'class' => 'suggest-post'\n ];\n }\n\n // PRODUCTS\n\n $products = Product::find()\n ->filterWhere([\n 'or',\n ['like', 'name', $searchTerm],\n ['like', 'identifier', $searchTerm],\n ])\n ->andWhere([\n 'language_id' => Yii::$app->user->identity->portal->language_id\n ])\n ->limit(10)\n ->all();\n\n foreach ($products as $product) {\n $results['product'][] = [\n 'link' => Url::to([\n '/product/edit',\n 'id' => $product['id']\n ]),\n 'name' => $product->breadcrumbs,\n 'id' => $product->id,\n 'class' => 'suggest-product'\n ];\n }\n\n $processActions = function ($searchTerm, $list, $prefix, $urlSuffix = '') {\n $actions = [];\n foreach ($list as $item) {\n $name = $prefix . $item[0];\n\n if ($searchTerm == '' || (mb_strlen($name) >= mb_strlen($searchTerm) && mb_substr(mb_strtolower($name), 0, mb_strlen($searchTerm)) == mb_strtolower($searchTerm))) {\n $actions[] = [\n 'link' => Url::to([\n '/' . $item[1] . '/' . $urlSuffix,\n ]),\n 'name' => $name,\n 'class' => 'suggest-action'\n ];\n }\n };\n return $actions;\n };\n\n $listActions = [['stránok', 'page'], ['ďakovačiek', 'thanks'], ['prekladov', 'word'], ['multimédii', 'multimedia'], ['snippetov', 'snippet'], ['produktov', 'product'], ['produktových premenných', 'product-var'], ['typov produktu', 'product-type'], ['tagov', 'tag'], ['šablón', 'template'], ['portálov', 'portal'], ['používateľov', 'user'], ['krajín', 'language']];\n $addActions = [['stránku', 'page'], ['ďakovačku', 'thanks'], ['preklad', 'word'], ['snippet', 'snippet'], ['produkt', 'product'], ['produktovú premennú', 'product-var'], ['typ produktu', 'product-type'], ['tag', 'tag'], ['šablónu', 'template'], ['portál', 'portal'], ['používateľa', 'user'], ['krajinu', 'language']];\n\n $results['actions'] += $processActions($searchTerm, $listActions, 'Zoznam ');\n $results['actions'] += $processActions($searchTerm, $addActions, 'Pridať ', 'edit');\n\n return $results;\n }", "public function search($postcode);", "public function search()\n\t{\n\t\tif(isset($_GET['term']))\n\t\t{\n\t\t\t$result = $this->Busca_Model->pesquisar($_GET['term']);\n\t\t\tif(count($result) > 0) {\n\t\t\tforeach ($result as $pr)$arr_result[] = $pr->nome;\n\t\t\t\techo json_encode($arr_result);\n\t\t\t}\n\t\t}\n\t}", "public function searchAction()\n {\n $search = $this->createSearchObject();\n $result = $search->searchWord($this->view->word);\n $this->view->assign($result);\n\n if (Model_Query::$debug) {\n $this->view->actionTrace = [\n 'action' => sprintf('%s::searchWord()', get_class($search)),\n 'result' => $result,\n ];\n\n $this->view->queryTrace = Model_Query::$trace;\n }\n\n }", "public function searchAction(){\n $string = filter_input(INPUT_GET, 'string', FILTER_SANITIZE_STRING);\n $word = new Word();\n if(!empty($string)){\n print json_encode($word->search($string));\n }else{\n print json_encode($word->limitWords(20));\n }\n }", "public function actionLocation() {\n $term = trim($_GET['term']);\n $bGeonames = (isset($_GET['geonames'])) ? true : false;\n $results = array();\n $geonamesUrl = \"http://api.geonames.org/searchJSON?maxRows=10&lang=de&username=wkoller&style=medium\";\n\n if ($bGeonames) {\n // Construct service URL\n $geonamesUrl = $geonamesUrl . \"&q=\" . urlencode($term);\n // Fetch service response\n $service_response = file_get_contents($geonamesUrl);\n if ($service_response) {\n // Decode data\n $service_data = json_decode($service_response, true);\n\n // Save response data in location table\n foreach ($service_data['geonames'] as $geoname) {\n // Check if we already have any entry\n $model_location = null;\n $model_locationGeonames = LocationGeonames::model()->find('geonameId=:geonameId', array(':geonameId' => $geoname['geonameId']));\n if ($model_locationGeonames != null) {\n $model_location = Location::model()->findByPk($model_locationGeonames->id);\n\n // update model with new location description\n $model_location->location = $geoname['name'] . ' (' . $geoname['adminName1'] . ', ' . $geoname['countryName'] . ')';\n $model_location->save();\n } else {\n // Create location model & save it\n $model_location = new Location;\n $model_location->location = $geoname['name'] . ' (' . $geoname['adminName1'] . ', ' . $geoname['countryName'] . ')';\n $model_location->save();\n // Create according geonames model & save it as well\n $model_locationGeonames = new LocationGeonames;\n $model_locationGeonames->id = $model_location->id;\n $model_locationGeonames->service_data = serialize($geoname);\n $model_locationGeonames->geonameId = $geoname['geonameId'];\n $model_locationGeonames->countryCode = $geoname['countryCode'];\n $model_locationGeonames->save();\n }\n\n // Add response to results\n $results[] = array(\n \"label\" => $model_location->location,\n \"value\" => $model_location->location,\n \"id\" => $model_location->id,\n \"countryCode\" => $model_locationGeonames->countryCode\n );\n }\n }\n } else {\n // Find all fitting entries in location table\n $models_location = Location::model()->findAll('location LIKE :location', array(':location' => $term . '%'));\n if ($models_location != NULL) {\n foreach ($models_location as $model_location) {\n $results[] = array(\n \"label\" => $model_location->location,\n \"value\" => $model_location->location,\n \"id\" => $model_location->id,\n );\n }\n }\n }\n\n // Output results as service response\n $this->serviceOutput($results);\n }", "private function makeTwitterQuery() {\n\t\t// The basic URL for the twitter search API\n\t\t$base_query = 'http://search.twitter.com/search.json?q=';\n\n\t\tif (isset($this->tag)) { // Make a search query by tag\n\t\t\t$this->query = $base_query . urlencode('#' . $this->tag);\n\t\t} elseif ((isset($this->geo)) && (count($this->geo) >0 )) {\n\t\t\t$this->query = $base_query . '&' . 'geocode=' . $this->geo['lat'] . urlencode(',') . $this->geo['lon'] . urlencode (',') . $this->geo['distance'] / 1000 . 'km';\n\t\t}\n\n\t\tlogger::log(DEBUG, \"TWITTER - Query: \".$this->query );\n\t}", "public function search($model, $request)\n {\n $search = filter_var($request->get('search'), FILTER_SANITIZE_STRING);\n\n // Get optional filters\n // FILTER: GEOLOCATION\n if($request->input('location')) {\n $location = filter_var($request->get('location'), FILTER_SANITIZE_STRING);\n }\n if($request->input('geo_lat')) {\n $geo_lat = filter_var($request->get('geo_lat'), FILTER_SANITIZE_STRING);\n $geo_lng = filter_var($request->get('geo_lng'), FILTER_SANITIZE_STRING);\n }\n\n /**\n * Get current page number for location manual Pagination\n */\n $page = $request->get('page') ? $request->get('page') : 1;\n\n\n // Location first, since it's a special query\n if(isset($geo_lat) && isset($geo_lng)) {\n \n $location_data = Posts::location($geo_lat, $geo_lng, $search, 25, 100); \n\n // Hard and dirty search function through collection\n // since search with location method doesn't work still\n if($search !== '') {\n $location_data = $location_data->filter(function ($item) use ($search) {\n return stripos($item->name, $search) !== false;\n });\n }\n\n // Paginate results because location method can't\n $paginate = new Paginate;\n return $paginate->paginate($location_data, 15, $page, [\n 'path' => '/search/'\n ]);\n\n } \n // Section selection handler (brands/shops/prods/strains)\n elseif($search)\n {\n return $model->where('name', 'like', \"%$search%\");\n }\n\n }", "public function search(ContentMetadataModel $model, Request $request)\n {\n $this->validate($request, [\n 'query' => 'required',\n ]);\n\n $query = $request->input('query');\n\n // Parse Function From Trait DndbQuery\n $query_eloquent = $this->ReqParse($query);\n\n // Improve Query Builder Search\n $query = null;\n foreach($query_eloquent as $key => $value) {\n $query = $model->where($key, 'contains', $value);\n }\n\n // Performe Query\n $count = $query->count();\n\n if($count == 0) {\n $message = ', no data found with this query';\n $result = [];\n } else {\n $message = ', data has been found';\n $result = $query->get();\n }\n\n return response()->json([\n 'status' => [\n 'code' => '200',\n 'message' => 'search query has been performed'. $message,\n 'total' => $count,\n ],\n 'result' => $result,\n ], 200);\n }", "public function search($args){\n\t\t//Sets defaults where input doesn't exist.\n\t\t//This will only add if the index doesn't exist?\n\t\t$args += [\n\t\t\t\"page\" => 0,\n\t\t\t\"index\" => null,\n\t\t\t\"type\" => \"books\"\n\t\t];\n\t\textract($args);\n\t\t//Now check we have a query\n\t\tif(!isset($query)){\n\t\t\techo \"NEED TO HAVE A QUERY IN SEARCH\";\n\t\t\texit(1);\n\t\t}\n\t\t//Create url for search\n\t\t$url = \"$this->apiRoot/$type?q=$query&p=$page\" . ($index === null ? \"\" : \"&i=$index\") . $this->apiTail;\n\n\t\t//Run search, return json as array\n\t\t//return file_get_contents($url);\n\t\treturn apiSampleSearch();\n\t}", "public function action_search_doc()\n\t{\n\t\tglobal $context;\n\n\t\t$context['doc_apiurl'] = 'https://github.com/elkarte/Elkarte/wiki/api.php';\n\t\t$context['doc_scripturl'] = 'https://github.com/elkarte/Elkarte/wiki/';\n\n\t\t// Set all the parameters search might expect.\n\t\t$postVars = explode(' ', $context['search_term']);\n\n\t\t// Encode the search data.\n\t\tforeach ($postVars as $k => $v)\n\t\t{\n\t\t\t$postVars[$k] = urlencode($v);\n\t\t}\n\n\t\t// This is what we will send.\n\t\t$postVars = implode('+', $postVars);\n\n\t\t// Get the results from the doc site.\n\t\trequire_once(SUBSDIR . '/Package.subs.php');\n\t\t// Demo URL:\n\t\t// https://github.com/elkarte/Elkarte/wiki/api.php?action=query&list=search&srprop=timestamp|snippet&format=xml&srwhat=text&srsearch=template+eval\n\t\t$search_results = fetch_web_data($context['doc_apiurl'] . '?action=query&list=search&srprop=timestamp|snippet&format=xml&srwhat=text&srsearch=' . $postVars);\n\n\t\t// If we didn't get any xml back we are in trouble - perhaps the doc site is overloaded?\n\t\tif (!$search_results || preg_match('~<' . '\\?xml\\sversion=\"\\d+\\.\\d+\"\\?' . '>\\s*(<api>.+?</api>)~is', $search_results, $matches) !== 1)\n\t\t{\n\t\t\tthrow new Exception('cannot_connect_doc_site');\n\t\t}\n\n\t\t$search_results = !empty($matches[1]) ? $matches[1] : '';\n\n\t\t// Otherwise we simply walk through the XML and stick it in context for display.\n\t\t$context['search_results'] = array();\n\n\t\t// Get the results loaded into an array for processing!\n\t\t$results = new XmlArray($search_results, false);\n\n\t\t// Move through the api layer.\n\t\tif (!$results->exists('api'))\n\t\t{\n\t\t\tthrow new Exception('cannot_connect_doc_site');\n\t\t}\n\n\t\t// Are there actually some results?\n\t\tif ($results->exists('api/query/search/p'))\n\t\t{\n\t\t\t$relevance = 0;\n\t\t\tforeach ($results->set('api/query/search/p') as $result)\n\t\t\t{\n\t\t\t\t$title = $result->fetch('@title');\n\t\t\t\t$context['search_results'][$title] = array(\n\t\t\t\t\t'title' => $title,\n\t\t\t\t\t'relevance' => $relevance++,\n\t\t\t\t\t'snippet' => str_replace('class=\\'searchmatch\\'', 'class=\"highlight\"', un_htmlspecialchars($result->fetch('@snippet'))),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "public function searchKeyword (){\n $this->res = $this->daoJson->searchKeywordDate($this->keyword, $this->from, $this->to);\n }", "public abstract function search_items(\\WP_REST_Request $request);", "function searchCinemas($query, $key, $next_page_token=\"\"){\n $query = urlencode($query);\n\n // search places api url\n if ($next_page_token == \"\"){\n $url = \"https://maps.googleapis.com/maps/api/place/textsearch/json?type=movie_theater&query={$query}&key={$key}\";\n }else{\n $url = \"https://maps.googleapis.com/maps/api/place/textsearch/json?type=movie_theater&query={$query}&key={$key}&pagetoken={$next_page_token}\";\n }\n \n\n // get the json response\n $resp_json = file_get_contents($url);\n\n // decode the json\n $resp = json_decode($resp_json, true);\n\n // response status will be 'OK', if able to geocode given address \n if($resp['status']=='OK'){\n return $resp;\n }else{\n ?>\n <div class=\"row\"><div class=\"col-md-12\">\n <h5 style=\"color:red;\"><?php echo \"<strong>ERROR: {$resp['status']}</strong>\"; ?></h5>\n </div></div>\n <?php\n return false;\n }\n}", "function search() {\n // ...\n }", "private function makeQuery(){\n\t\t\n\t\t$this->searchQ['select'] = array('l.name','l.summary','l.sum_approach','l.sum_problems','l.address_line_1','l.address_line_2','l.town','l.county','l.postcode','l.country','l.phone','l.latitude','l.longitude','l.publish_address','l.publish_phone','l.approved','p.uri','p.urlname','e.level','y.listing_type');\n\t\t$this->searchQ['select'][] = '(SELECT i.image FROM listing_images i WHERE l.listing_id=i.listing_id ORDER BY i.sort_order ASC LIMIT 1) AS image';\n\t\t$this->searchQ['from'] = 'listing_level e, listing_type y, pages p, listing l '; //should always be the same...\n\t\t$this->searchQ['where'] = array('e.level_id = l.level_id','y.listing_type_id = l.listing_type_id','l.page_id = p.page_id','l.publish = 1');//,'p.publish = 1');\n\t\t\n\t\t// set up the initial search variables\t\t\n\t\t//! location\n\t\tif( strlen($this->vars['location']) ){\n\t\t\n\t\t\t$this->Geocode = new Geolocation( $this->vars['location']. ', UK' );\n\t\t\t$this->Geocode->lookup();\n\t\t\t// using the OS grid as makes calculation simpler than using lng/lat - can use simple pythag rather than calculus functions\n\t\t\t// we shorten the list of rows needing the calculation by the greater / less than in the where\n\t\t\t\n\t\t\t$calculation = ' SQRT(POW(( l.easting - ' . round($this->Geocode->getOSEast()) . '),2) + POW((l.northing - ' . round($this->Geocode->getOSNorth()) . '),2)) ';\n\t\t\t$this->searchQ['select'][] = $calculation . \" AS distance\";\n\t\t\t$this->searchQ['where'][] = \"northing < \" . round( $this->Geocode->getOSNorth() + $this->searchDistance ) ; \n\t\t\t$this->searchQ['where'][] = \"northing > \" . round( $this->Geocode->getOSNorth() - $this->searchDistance ) ;\n\t\t\t$this->searchQ['where'][] = \"easting < \" . round( $this->Geocode->getOSEast() + $this->searchDistance ) ;\n\t\t\t$this->searchQ['where'][] = \"easting > \" . round( $this->Geocode->getOSEast() - $this->searchDistance ) ;\n\t\t//\t$this->searchQ['where'][] = \"(\" . $calculation . \") <= \" . $this->searchDistance ;\n\t\t// use having rather than where\n\t\t\t$this->searchQ['having'][] = \"distance <= \" . $this->searchDistance;\n\t\t\t//$this->searchQ['orderby'][] = '(distance - ((l.level_id-1)*16000)) ASC'; // (x^3 -400^3)^(1/3)\n\t\t\t\n\t\t\t// using a exponential function to order distances based on the listing level and multiplying by 16000 m = 16km = 10 miles\n\t\t\t// then raising to power 3, deleteing the distance cubed and then 1/3 (cube root), so only makes a diffenrce within that area\n\t\t\t\n\t\t\t$this->searchQ['orderby'][] = ' POW( (POW( distance ,3) - POW(((l.level_id-1)*' . $this->levelMultiplier. '),3)),(1/3)) ASC ';\n\t\t\t$this->searchQ['orderby'][] = 'l.level_id DESC';\n\t\t\t$this->doSearch = true;\n\t\t}else{\n\t\t\t$this->searchQ['orderby'][] = 'l.level_id DESC';\n\t\t}\n\t\t\n\t\t//! freetext\n\t\tif( strlen($this->vars['term']) ){\n\t\t\t$this->searchQ['select'][] = \"MATCH(\" . $this->ftfields . \") AGAINST ('\" . $this->booleanAndTerm($this->vars['term']) . \"' IN BOOLEAN MODE) AS score\";\n\t\t\t//$this->searchQ['where'][] = \"MATCH(\" . $ftfields . \") AGAINST ('\" . $this->booleanAndTerm($this->vars['term']) . \"' IN BOOLEAN MODE)\";\n\t\t\t// use having rather than where\n\t\t\t$this->searchQ['having'][] = \"score > 0\";\n\t\t\t$this->searchQ['orderby'][] = 'score DESC';\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t\n\t\t//! **** FILTERS ****\n\t\t//! profession\n\t\tif( isset($this->vars['profession']) && strlen($this->vars['profession']) ){\n\t\t\n\t\t\t//$this->searchQ['where'][] = \" l.listing_type_id IN (\" . implode(',', $this->vars['profession']) . \") \";\n\t\t\t$this->searchQ['where'][] = \" l.listing_type_id = \" . (int)$this->vars['profession'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t//! max price\n\t\tif( isset($this->vars['maxprice']) && is_numeric($this->vars['maxprice']) ){\n\t\t\n\t\t\t$this->searchQ['where'][] = \" l.hourly_rate <= \" . (int)$this->vars['maxprice'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t//! gender\n\t\tif( isset($this->vars['gender']) && in_array($this->vars['gender'] , array('M','F')) ){\n\t\t\n\t\t\t$this->searchQ['from'] .= ', listing_to_gender ltg';\n\t\t\t$this->searchQ['where'][] = \" ltg.listing_id = l.listing_id \";\n\t\t\t$this->searchQ['where'][] = \" ltg.gender = '\" . $this->vars['gender'] . \"' \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\n\t\t//! speciality\n\t\tif( isset($this->vars['speciality']) && is_numeric($this->vars['speciality']) ){\n\t\t\n\t\t\t$this->searchQ['from'] .= ', listing_to_age ltag';\n\t\t\t$this->searchQ['where'][] = \" ltag.listing_id = l.listing_id \";\n\t\t\t$this->searchQ['where'][] = \" ltag.age_id = \" . (int)$this->vars['speciality'] . \" \";\n\t\t\t$this->doSearch = true;\n\t\t}\n\t\t\n\t\t//! ** build the query **\n\t\t$q = \"SELECT \" . (($this->numRows)?' SQL_CALC_FOUND_ROWS ':'') . implode(',', $this->searchQ['select']). \"\n\t\t\t\tFROM \" . $this->searchQ['from'] . \"\n\t\t\t\tWHERE\n\t\t\t\t\t\" . implode(' AND ', $this->searchQ['where']) ;\n\n\t\tif( isset($this->searchQ['having']) && count($this->searchQ['having']) ){\n\t\t\t$q .= \" HAVING \" . implode(' AND ' , $this->searchQ['having']);\n\t\t}\n\t\t\n\t\t$q .= \"\tORDER BY \" . implode(',', $this->searchQ['orderby']) . \" \";\n\t\t\n\t\t$q .= \"\tLIMIT \" . ( ($this->page-1)* $this->limit) . \",\" . $this->limit . \" \"; \n\t\n\t\treturn $q;\n\t\t\n\t}", "public function search($request) {\n $query = Convert::raw2sql($request->getVar('q'));\n $limit = $this->config()->search_limit;\n $addresses = NZStreetAddress::get()->filter('FullAddress:StartsWith', $query)\n ->limit($limit);\n $output = [];\n foreach($addresses as $address) {\n $output[] = [\n 'AddressID' => $address->AddressID,\n 'FullAddress' => $address->FullAddress,\n 'AddressLine1' => sprintf(\"%s %s\",\n $address->FullAddressNumber,\n $address->FullRoadName\n ),\n 'Suburb' => $address->SuburbLocality,\n 'City' => $address->TownCity\n ];\n }\n\n return json_encode($output);\n }", "function search($keywords)\r\n {\r\n\r\n }", "public function search($query = '')\n\t{\n\t\tif($query != '')\n\t\t{\n\t\t\t$trackClass = $this->apiClass->getPackage($this->auth, 'track', $this->config);\n\t\t\t\n\t\t\t$methodVars = array(\n\t\t\t\t\t'track' => $query,\n\t\t\t\t\t'limit' => $this->numResults\n\t\t\t);\n\t\n\t\t\tif ($results = $trackClass->search($methodVars) ) {\n\t\t\t\t$this->fromArray($results);\n\t\t\t} //else no results\n\t\t} else {\n\t\t\t$this->error(\"provide a search query, you dickhead\");\n\t\t}\n\t}", "public function search($searchString) {\n // the parameters needed to get the google places information\n $parameters = array(\n 'query' => $searchString,\n 'language' => 'nl',\n );\n \n // get the values from the places api\n $result = $this->fetchResult($parameters);\n\n // if there is no valid result, return null\n if (is_null($result)) {\n return $result;\n }\n \n // done, return the google places search result as object \n return new \\Weblab\\GooglePlacesSearch($result);\n }", "public function search(Request $request)\n {\n $request->validate([\n 'query' => 'required|min:3',\n ]);\n\n $query = $request->input('query');\n\n // % wildcard will return results similar to the query\n $products = Product::where('name', 'like', \"%$query%\")->get();\n\n return view ('search-results')-> with('products' , $products);\n }", "public function search($term = '', $andor = 'AND', $limit = 0, $offset = 0, $userid = 0)\n {\n return false;\n }", "function getSearch (Request $request) {\n $request->validate(['keyword' => 'required']);\n\n //Get what user input in the search form\n $input = $request->get(\"keyword\");\n\n //If the input is not null => Search the database based and assign them to the result\n if (!empty($input)) {\n //Get all the post\n $posts = Post::latest();\n //query builder\n $posts = $posts->where('post_title', 'like', '%' . $input . '%')->get();\n }\n\n return view('search-results', [\n 'searchResults' => $posts,\n 'keyword' => $input\n ]);\n }", "private function buildSearchURL($q){\n\t\t$this->searchURL = $this->baseURL;\n\t\t$this->searchURL .= \"?version=\".$this->version;\n\t\t$this->searchURL .= \"&recordSchema=\".$this->recordSchema;\n\t\t$this->searchURL .= \"&query=\".$q;\n\t\t$this->searchURL .= \"&operation=searchRetrieve\";\n\t\t// optinal parameters\n\t\tif(isset($this->recordPacking)) $this->searchURL .= \"&recordPacking=\".$this->recordPacking;\n\t\tif(isset($this->startRecord)) $this->searchURL .= \"&startRecord=\".$this->startRecord;\n\t\tif(isset($this->maximumRecords)) $this->searchURL .= \"&maximumRecords=\".$this->maximumRecords;\n\t}", "function performSearch($sessionID, $table, $field, $term, $order){\r\n\t\tif($this->userCanPerformSearch('', $table)){\r\n\t\t\t//Allow user to search by sensitive or normal for level\r\n\t\t\tif($table == 'issues' && $field == 'Level'\r\n\t\t\t && $term!='A' && $term!='a' && $term!='B' && $term!='b'){\r\n\t\t\t\tif(strstr('sensitive', $term))\r\n\t\t\t\t\t$term = 'A';\r\n\t\t\t\telseif(strstr('normal', $term))\r\n\t\t\t\t\t$term = 'B';\r\n\t\t\t}\r\n\t\t\tif($table == 'students'){\r\n\t\t\t\tif(!$this->fieldInTable($table, $field)){\r\n\t\t\t\t\tif($this->fieldInTable('X_PNSY_STUDENT', $field))\r\n\t\t\t\t\t\t$table = 'X_PNSY_STUDENT';\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$table = 'X_PNSY_ADDRESS';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($table == 'students'){\r\n\t\t\t\t$query = \"SELECT * FROM X_PNSY_STUDENT ss, $table s where s.$field like '%$term%' AND s.StudentID IN\r\n\t\t\t\t\t\t\t(SELECT ID FROM X_PNSY_STUDENT WHERE ID = s.StudentID) AND s.StudentID = ss.ID GROUP BY s.StudentID\";\r\n\t\t\t}\r\n\t\t\telseif($table == 'X_PNSY_ADDRESS'){\r\n\t\t\t\t$query = \"SELECT * FROM X_PNSY_STUDENT ss, $table s WHERE s.$field LIKE '%$term%'AND s.ADDRESS_ID IN \r\n\t\t\t\t\t\t\t(SELECT ADDRESS_ID FROM $table WHERE ADDRESS_ID=s.ADDRESS_ID) \r\n\t\t\t\t\t\t\tAND s.ADDRESS_ID=ss.ADDRESS_ID GROUP BY s.ADDRESS_ID\";\r\n\t\t\t\tif($field == 'STREET'){\r\n\t\t\t\t//\"SELECT ID, CONCAT(FirstName, ' ', MiddleIn, ' ', LastName) AS FullName FROM students WHERE\r\n\t\t\t\t//\tCONCAT(FirstName, ' ', MiddleIn, ' ', LastName) LIKE '%$name%'\";\r\n\t\t\t\t\r\n\t\t\t\t\t$query = \"SELECT * FROM X_PNSY_STUDENT ss, $table s WHERE (s.STREET_1 LIKE '%$term%' OR s.STREET_2 LIKE '%$term%'\r\n\t\t\t\t\t\t\tOR s.STREET_3 LIKE '%$term%' OR s.STREET_4 LIKE '%$term%' OR s.STREET_5 LIKE '%$term%') AND s.ADDRESS_ID IN \r\n\t\t\t\t\t\t\t(SELECT ADDRESS_ID FROM $table WHERE ADDRESS_ID=s.ADDRESS_ID) AND s.ADDRESS_ID=ss.ADDRESS_ID GROUP BY s.ADDRESS_ID\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telseif($table == 'X_PNSY_STUDENT' && $field == 'ADVISOR'){\r\n\t\t\t\t$table = 'X_PNSY_FACULTY';\r\n\t\t\t\t$query = \"SELECT s . * FROM X_PNSY_STUDENT s, $table ss WHERE (CONCAT(ss.FIRST_NAME, ' ',\r\n\t\t\t\t\t\t\t ss.LAST_NAME) LIKE '%$term%') AND s.$field IN (SELECT ID FROM $table WHERE ID = s.$field)\r\n\t\t\t\t\t\t\tAND s.$field = ss.ID GROUP BY s.$field, s.ID\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t$query = \"SELECT * FROM $table WHERE $field like '%$term%'\";\r\n// Michael Thompson * 12/07/2005 * Added Below line to tack order onto sql sentence\r\n if ($order != \"\") $query .= \" ORDER BY $order\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t\tfor($i=0; $results = mysql_fetch_assoc($result); $i++){\r\n\t\t\t\t$return[$i] = $results;\r\n\t\t\t}\r\n\t\t\treturn $return;\r\n\t\t}\r\n\t}", "function search()\n\t{}", "function search()\n\t{}", "public function citysearch(Request $request)\n {\n $data = Cities::where(\"name\",\"LIKE\",\"%{$request->input('query')}%\")->get();\n return response()->json($data);\n }", "function search($query, $year=NULL, $page_limit=5, $page=NULL) {\n\t\t\n\t\t$args = array (\n\t\t\t\"q\" => $query,\n\t\t\t\"year\" => (int)$year,\n\t\t\t\"page_limit\" => $page_limit,\n\t\t\t\"page\" => $page\n\t\t);\n\t\t\n\t\t$json = $this->request(self::API_URL_TMPL_SEARCH, array(\n\t\t\t\"query-args\" => $this->collapse_args($args)\n\t\t));\n\t\t\n\t\tif(isset($json->total)) {\n\t\t\t\n\t\t\tif($json->total > 0) {\n\t\t\t\t\n\t\t\t\treturn new rt_search_result($json);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\treturn array();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\treturn NULL;\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function search() {\r\n //retrieve query terms from search form\r\n $query_terms = trim($_GET['query-terms']);\r\n\r\n //if search term is empty, list all vacations\r\n if ($query_terms == \"\") {\r\n $this->index();\r\n }\r\n\r\n //search the database for matching movies\r\n $vacations = $this->vacation_model->search_vacation($query_terms);\r\n\r\n if ($vacations === false) {\r\n //handle error\r\n $message = \"An error has occurred.\";\r\n $this->error($message);\r\n return;\r\n }\r\n //display matched movies\r\n $search = new VacationSearch();\r\n $search->display($query_terms, $vacations);\r\n }", "public function searchAction(Request $request){\n\n // Get Posted Content\n $postedContent = json_decode($request->getContent());\n\n // Handle Error if type/text are not set\n if( !isset($postedContent->type) || !isset($postedContent->text)){\n return $this->handleError(\"Search Type or Search Text are not set\");\n }\n\n // What you need to get\n $searchType = $postedContent->type;\n $searchText = $postedContent->text;\n $type = \"search\";\n\n // Perform Regex Validation on Search Text\n if( !preg_match('/^[a-zA-Z0-9_\\d\\_\\s-]+$/', $searchText) ){\n return $this->handleError(\"Search Text should only contain alpha-numeric values, spaces or hyphen\");\n }\n\n $returnQuantity = 1;\n \n // Pass Additional Params\n $additionalParams = [\n \"p\" => 1,\n \"type\" => $searchType,\n \"q\" => $searchText,\n \"withBreweries\" => \"Y\",\n \"hasLabels\" => \"Y\"\n ];\n \n try {\n \n // Perform Request and get response array\n $response = $this->get(\"http\")->doRequest($returnQuantity, $type, $additionalParams);\n } catch (\\Exception $e){\n \n // handle any exceptions\n $this->handleError($e->getMessage());\n }\n \n // Check for any additional API Errors\n $checkForAdditionalErrors = json_decode($response);\n \n if( isset($checkForAdditionalErrors->errorMessage)) {\n \n // If any, throw exception\n return $this->handleError($checkForAdditionalErrors->errorMessage);\n }\n \n return new Response($response);\n }", "public function search(Request $request, RepoHost $rh, $term)\n {\n $args = $request->all();\n\n $maxhits = isset($args['maxhits']) ? $args['maxhits'] : 25;\n $page = isset($args['page']) ? $args['page'] : 0;\n $sort = isset($args['sort']) ? $args['sort'] : 'score';\n\n return $rh->search($term, $maxhits, $page, $sort);\n\n }", "function search($term, $fields=array(), $limit=array()) { /* {{{ */\n\t\t$querystr = '';\n\t\t$term = trim($term);\n\t\tif($term) {\n\t\t\t$querystr = substr($term, -1) != '*' ? $term.'*' : $term;\n\t\t}\n\t\tif(!empty($fields['owner'])) {\n\t\t\tif(is_string($fields['owner'])) {\n\t\t\t\tif($querystr)\n\t\t\t\t\t$querystr .= ' ';\n\t\t\t\t$querystr .= 'owner:'.$fields['owner'];\n\t\t\t} elseif(is_array($fields['owner'])) {\n\t\t\t\tif($querystr)\n\t\t\t\t\t$querystr .= ' ';\n\t\t\t\t$querystr .= '(owner:';\n\t\t\t\t$querystr .= implode(' OR owner:', $fields['owner']);\n\t\t\t\t$querystr .= ')';\n\t\t\t}\n\t\t}\n\t\tif(!empty($fields['category'])) {\n\t\t\tif($querystr)\n\t\t\t\t$querystr .= ' ';\n\t\t\t$querystr .= '(category:';\n\t\t\t$querystr .= implode(' OR category:', $fields['category']);\n\t\t\t$querystr .= ')';\n\t\t}\n\t\tif(!empty($fields['status'])) {\n\t\t\tif($querystr)\n\t\t\t\t$querystr .= ' ';\n\t\t\t$status = array_map(function($v){return $v+10;}, $fields['status']);\n\t\t\t$querystr .= '(status:';\n\t\t\t$querystr .= implode(' OR status:', $status);\n\t\t\t$querystr .= ')';\n\t\t}\n\t\tif(!empty($fields['user'])) {\n\t\t\tif($querystr)\n\t\t\t\t$querystr .= ' ';\n\t\t\t$querystr .= '(users:';\n\t\t\t$querystr .= implode(' OR users:', $fields['user']);\n\t\t\t$querystr .= ')';\n\t\t}\n\t\tif(!empty($fields['rootFolder']) && $fields['rootFolder']->getFolderList()) {\n\t\t\tif($querystr)\n\t\t\t\t$querystr .= ' ';\n\t\t\t$querystr .= '(path:';\n\t\t\t$querystr .= str_replace(':', 'x', $fields['rootFolder']->getFolderList().$fields['rootFolder']->getID().':');\n\t\t\t$querystr .= ')';\n\t\t}\n\t\tif(!empty($fields['startFolder']) && $fields['startFolder']->getFolderList()) {\n\t\t\tif($querystr)\n\t\t\t\t$querystr .= ' ';\n\t\t\t$querystr .= '(path:';\n\t\t\t$querystr .= str_replace(':', 'x', $fields['startFolder']->getFolderList().$fields['startFolder']->getID().':');\n\t\t\t$querystr .= ')';\n\t\t}\n\t\ttry {\n\t\t\t$result = $this->index->find($querystr, $limit);\n\t\t\t$recs = array();\n\t\t\tforeach($result[\"hits\"] as $hit) {\n\t\t\t\t$recs[] = array('id'=>$hit->id, 'document_id'=>$hit->documentid);\n\t\t\t}\n\t\t\treturn array('count'=>$result['count'], 'hits'=>$recs, 'facets'=>array());\n\t\t} catch (Exception $e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getSearch()\n {\n $keyword= Input::get('q');\n $keywords = Explode(' ',$keyword);\n $query= DB::table('events')\n ->leftJoin('organizations', 'organizations.id', '=', 'events.org_id');\n foreach ($keywords as $key => $value) {\n $query ->orWhere('organizations.name', 'like', DB::raw(\"'%$value%'\"));\n $query ->orWhere('events.name', 'like', DB::raw(\"'%$value%'\"));\n }\n\n //search that event in Database\n $events= $query->get();\n // var_dump($events);\n\n //return display search result to user by using a view\n return View::make('event')->with('event', $events);\n }", "function search($offset,$limit,$queries){\r\n\t\t\r\n\t\t// Example: $queries = array('blog_tags: '.$_GET['q']);\r\n\r\n\t\tforeach ( $queries as $query ) {\r\n\t\t\t$response = $this->connection->search( $query, $offset, $limit );\r\n\t\t\t\r\n\t\t\tif ( $response->getHttpStatus() == 200 ) {\t\r\n\t\t\t\tprint_r( $response->getRawResponse() );\r\n\t\t\t\t\r\n\t\t\t\tif ( $response->response->numFound > 0 ) {\r\n\t\t\t\t\techo \"$query <br />\";\r\n\r\n\t\t\t\t\tforeach ( $response->response->docs as $doc ) { \r\n\t\t\t\t\t\techo \"$doc->partno $doc->name <br />\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\techo '<br />';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\techo $response->getHttpStatusMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function _searchLocations($location)\n {\n return $this->_makeRequest(self::API_URL . '/api/' . $this->_apiKey\n . '/geolookup/q/' . $location . '.json');\n }", "function search()\n\t{\n\t\trequire_all_lang();\n\t\trequire_code('zones2');\n\t\tdisable_php_memory_limit();\n\n\t\tif (function_exists('set_time_limit')) @set_time_limit(100);\n\n\t\t$n=mixed();\n\n\t\t$default_theme=$GLOBALS['FORUM_DRIVER']->get_theme('');\n\n\t\t// Mess around to find our search keywords (takes synonyms into account, and generally tidies up)\n\t\t$raw_search_string=get_param('search_content',false,true);\n\n\t\t// Work out our keywords\n\t\t$keyword_string=$raw_search_string;\n\t\t$_keywords=array();\n\t\t$current_word='';\n\t\t$in_quotes=false;\n\t\tfor ($xi=0;$xi<strlen($keyword_string);$xi++)\n\t\t{\n\t\t\tif (($in_quotes) || (trim($keyword_string[$xi])!=''))\n\t\t\t{\n\t\t\t\tif ($keyword_string[$xi]=='\"')\n\t\t\t\t{\n\t\t\t\t\t$in_quotes=!$in_quotes;\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$current_word.=$keyword_string[$xi];\n\t\t\t\t}\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif ($current_word!='') $_keywords[]=$current_word;\n\t\t\t\t$current_word='';\n\t\t\t}\n\t\t}\n\t\tif ($current_word!='') $_keywords[]=$current_word;\n\t\t$_keywords=$this->_strip_junk_words($_keywords);\n\t\tif (count($_keywords)==0)\n\t\t{\n\t\t\treturn do_template('INDEX_SCREEN_FANCIER_SCREEN',array('TITLE'=>get_page_title('ADMIN_ZONE_SEARCH_RESULTS'),'EMPTY'=>true,'ARRAY'=>true,'CONTENT'=>'','PRE'=>'','POST'=>''));\n\t\t}\n\t\t$keywords=array();\n\t\t$synonym_rows=$this->_synonyms(); // Only in English by default. To do for another language, override this file using inheritance\n\t\t$section_limitations=array();\n\t\tforeach ($_keywords as $xi=>$keyword)\n\t\t{\n\t\t\t$_keywords=array();\n\t\t\t$keyword=trim($keyword);\n\t\t\tif ($keyword=='') continue;\n\n\t\t\tif (substr($keyword,0,1)=='@')\n\t\t\t{\n\t\t\t\t$section_limitations[]=substr($keyword,1);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach ($synonym_rows as $synonyms)\n\t\t\t{\n\t\t\t\tif ((in_array(strtolower($keyword),$synonyms)) || ((array_key_exists($xi+1,$_keywords)) && (in_array(strtolower($_keywords[$xi].' '.$_keywords[$xi+1]),$synonyms))))\n\t\t\t\t{\n\t\t\t\t\t$_keywords=array_merge($_keywords,$synonyms);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$_keywords[]=$keyword;\n\t\t\t$keywords[]=$_keywords;\n\t\t}\n\n\t\t// Stemming, if available (needs Stemmer class like http://www.chuggnutt.com/stemmer-source.php which we can't redistribute due to it being GPL not LGPL)\n\t\tif ((file_exists(get_file_base().'/sources_custom/stemmer_'.user_lang().'.php')) && (!in_safe_mode()))\n\t\t{\n\t\t\trequire_code('stemmer_'.user_lang());\n\t\t\t$stemmer=object_factory('Stemmer_'.user_lang());\n\t\t\tforeach ($keywords as $i=>$keyword_group)\n\t\t\t{\n\t\t\t\t$_keyword_group=$keyword_group;\n\t\t\t\tforeach ($keyword_group as $keyword)\n\t\t\t\t{\n\t\t\t\t\t// Special stemmer exceptions\n\t\t\t\t\tif ($keyword=='news') continue;\n\t\t\t\t\tif ($keyword=='defaultness') continue;\n\n\t\t\t\t\t$_keyword_group[]=$stemmer->stem($keyword);\n\t\t\t\t}\n\t\t\t\t$keywords[$i]=array_unique($_keyword_group);\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\tforeach ($keywords as $i=>$keyword_group)\n\t\t\t{\n\t\t\t\t$_keyword_group=$keyword_group;\n\t\t\t\tforeach ($keyword_group as $keyword) // Lame pluralisation fudge, if we don't have stemming\n\t\t\t\t{\n\t\t\t\t\tif ((strlen($keyword)>3) && (substr($keyword,-1)=='s'))\n\t\t\t\t\t\t$_keyword_group[]=substr($keyword,0,strlen($keyword)-1);\n\t\t\t\t\telse\n\t\t\t\t\t\t$_keyword_group[]=$keyword.'s';\n\t\t\t\t}\n\t\t\t\t$keywords[$i]=array_unique($_keyword_group);\n\t\t\t}\n\t\t}\n\n\t\t$this->keywords=$keywords;\n\n\t\t$content=array();\n\n\t\t// Admin/CMS menu icons\n\t\t$current_results_type=do_lang('ADMIN_MODULES');\n\t\tif ($this->_section_match($section_limitations,$current_results_type))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$hooks=find_all_hooks('systems','do_next_menus');\n\t\t\tforeach (array_keys($hooks) as $hook)\n\t\t\t{\n\t\t\t\trequire_code('hooks/systems/do_next_menus/'.filter_naughty_harsh($hook));\n\t\t\t\t$object=object_factory('Hook_do_next_menus_'.filter_naughty_harsh($hook),true);\n\t\t\t\tif (is_null($object)) continue;\n\t\t\t\t$info=$object->run(true);\n\t\t\t\tforeach ($info as $i)\n\t\t\t\t{\n\t\t\t\t\tif (is_null($i)) continue;\n\n\t\t\t\t\t$n=$i[3];\n\t\t\t\t\tif (($i[0]!='') && ($this->_keyword_match(is_object($n)?$n->evaluate():$n)) && (has_actual_page_access(get_member(),$i[2][0],$i[2][2])))\n\t\t\t\t\t{\n\t\t\t\t\t\t$_url=build_url(array('page'=>$i[2][0])+$i[2][1],$i[2][2]);\n\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>$i[0]),'adminzone'),do_lang(strtoupper($i[0]))));\n\t\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>$sup)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Module entry points\n\t\t$current_results_type=do_lang('SCREENS');\n\t\tif ($this->_section_match($section_limitations,$current_results_type))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\tforeach (find_all_zones(false,true) as $zone=>$zone_details)\n\t\t\t{\n\t\t\t\t$modules=find_all_modules($zone);\n\t\t\t\tforeach (array_keys($modules) as $page)\n\t\t\t\t{\n\t\t\t\t\t$_entrypoints=extract_module_functions_page($zone,$page,array('get_entry_points'));\n\t\t\t\t\tif (!is_null($_entrypoints[0]))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ((is_array($_entrypoints[0])) || (strpos($_entrypoints[0],'::')===false))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$entry_points=is_array($_entrypoints[0])?call_user_func_array($_entrypoints[0][0],$_entrypoints[0][1]):eval($_entrypoints[0]);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$path=zone_black_magic_filterer(filter_naughty($zone).(($zone=='')?'':'/').'pages/modules_custom/'.filter_naughty($page).'.php',true);\n\t\t\t\t\t\t\tif (!file_exists(get_file_base().'/'.$path)) $path=zone_black_magic_filterer(filter_naughty($zone).'/pages/modules/'.filter_naughty($page).'.php',true);\n\t\t\t\t\t\t\tif ((!defined('HIPHOP_PHP')) && ((ini_get('memory_limit')!='-1') && (ini_get('memory_limit')!='0') || (get_option('has_low_memory_limit')==='1')) && (strpos(file_get_contents(get_file_base().'/'.$path),' extends standard_aed_module')!==false)) // Hackerish code when we have a memory limit. It's unfortunate, we'd rather execute in full\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$new_code=str_replace(',parent::get_entry_points()','',str_replace('parent::get_entry_points(),','',$_entrypoints[0]));\n\t\t\t\t\t\t\t\tif (strpos($new_code,'parent::')!==false) continue;\n\t\t\t\t\t\t\t\t$entry_points=eval($new_code);\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\trequire_code($path);\n\t\t\t\t\t\t\t\tif (class_exists('Mx_'.filter_naughty_harsh($page)))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$object=object_factory('Mx_'.filter_naughty_harsh($page));\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$object=object_factory('Module_'.filter_naughty_harsh($page));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$entry_points=$object->get_entry_points();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($page=='admin_themes')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$entry_points['!themes']='EDIT_CSS';\n\t\t\t\t\t\t\t$entry_points['!!themes']='EDIT_TEMPLATES';\n\t\t\t\t\t\t\t$entry_points['!!!themes']='MANAGE_THEME_IMAGES';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (is_null($entry_points)) $entry_points=array();\n\t\t\t\t\t\tforeach ($entry_points as $type=>$lang)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$type=str_replace('!','',$type); // The ! was a hackerish thing just to multiply-up possibilities for the single entry-point\n\t\t\t\t\t\t\t$n=do_lang_tempcode($lang);\n\t\t\t\t\t\t\tif (($this->_keyword_match($n->evaluate())) && (has_actual_page_access(get_member(),$page,$zone)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>''),$zone),$zone_details[1]));\n\t\t\t\t\t\t\t\tif (($zone=='cms') || ($zone=='adminzone'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (($page!='admin') && ($page!='cms'))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$hooks=find_all_hooks('systems','do_next_menus');\n\t\t\t\t\t\t\t\t\t\tforeach (array_keys($hooks) as $hook)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\trequire_code('hooks/systems/do_next_menus/'.filter_naughty_harsh($hook));\n\t\t\t\t\t\t\t\t\t\t\t$object=object_factory('Hook_do_next_menus_'.filter_naughty_harsh($hook),true);\n\t\t\t\t\t\t\t\t\t\t\tif (is_null($object)) continue;\n\t\t\t\t\t\t\t\t\t\t\t$info=$object->run();\n\t\t\t\t\t\t\t\t\t\t\tforeach ($info as $i)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (is_null($i)) continue;\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (($page==$i[2][0]) && (((!array_key_exists('type',$i[2][1])) && ($type=='misc')) || ((array_key_exists('type',$i[2][1])) && ($type==$i[2][1]['type']))) && ($zone==$i[2][2]))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($i[0]=='cms')\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_url=build_url(array('page'=>'cms','type'=>$i[0]),'cms');\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_url=build_url(array('page'=>'admin','type'=>$i[0]),'adminzone');\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\trequire_lang('menus');\n\t\t\t\t\t\t\t\t\t\t\t\t\trequire_lang('security');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tree->attach(hyperlink($_url,do_lang_tempcode(strtoupper($i[0]))));\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($type!='misc')\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>$page,'type'=>'misc'),$zone),$i[3]));\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>$page),$zone),$page));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$_url=build_url(array('page'=>$page,'type'=>$type),$zone);\n\t\t\t\t\t\t\t\t$sup=$tree->is_empty()?NULL:do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t\t\t$site_tree_editor_url=build_url(array('page'=>'admin_sitetree','type'=>'site_tree','id'=>$zone.':'.$page),'adminzone');\n\t\t\t\t\t\t\t\t$permission_tree_editor_url=build_url(array('page'=>'admin_permissions','id'=>$zone.':'.$page),'adminzone');\n\t\t\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>do_lang_tempcode('FIND_IN_SITE_TREE_EDITOR',escape_html($site_tree_editor_url->evaluate()),escape_html($permission_tree_editor_url->evaluate())),'SUP'=>$sup)));\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\n\t\t$current_results_type=do_lang('IMPORT');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_import')))\n\t\t{\n\t\t\t// Importers\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$hooks=find_all_hooks('modules','admin_import');\n\t\t\tforeach (array_keys($hooks) as $hook)\n\t\t\t{\n\t\t\t\tif ($this->_keyword_match($hook))\n\t\t\t\t{\n\t\t\t\t\trequire_code('hooks/modules/admin_import/'.filter_naughty_harsh($hook));\n\t\t\t\t\t$_hook=object_factory('Hook_'.filter_naughty_harsh($hook));\n\t\t\t\t\t$info=$_hook->info();\n\t\t\t\t\t$name=$info['product'];\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_import','type'=>'session','importer'=>$hook),get_module_zone('admin_import'));\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$name,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>'')));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$current_results_type=do_lang('CONFIGURATION');\n\t\tif ((($this->_section_match($section_limitations,$current_results_type)) || ($this->_section_match($section_limitations,do_lang('OPTION_CATEGORIES'))) || ($this->_section_match($section_limitations,do_lang('OPTION_GROUPS')))) && (has_actual_page_access(get_member(),'admin_config')))\n\t\t{\n\t\t\t// Config options- names, descriptions, groups, categories\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$map=array();\n\t\t\tif (!is_null($GLOBALS['CURRENT_SHARE_USER'])) $map['shared_hosting_restricted']=0;\n\t\t\t$all_options=$GLOBALS['SITE_DB']->query_select('config',array('the_name','human_name','the_page','section','explanation','eval'),$map);\n\t\t\t$all_options[]=array('the_name'=>'timezone','human_name'=>'TIME_ZONE','config_value'=>'','the_type'=>'special','eval'=>'','the_page'=>'SITE','section'=>'GENERAL','explanation'=>'','shared_hosting_restricted'=>0);\n\t\t\t$config_categories=array();\n\t\t\t$conf_found_count=0;\n\t\t\tforeach ($all_options as $p)\n\t\t\t{\n\t\t\t\tif (defined('HIPHOP_PHP'))\n\t\t\t\t{\n\t\t\t\t\trequire_code('hooks/systems/config_default/'.$p['the_name']);\n\t\t\t\t\t$hook=object_factory('Hook_config_default_'.$p['the_name']);\n\t\t\t\t\t$null_test=$hook->get_default();\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$GLOBALS['REQUIRE_LANG_LOOP']=10; // LEGACY Workaround for corrupt webhost installers\n\t\t\t\t\t$null_test=eval($p['eval']);\n\t\t\t\t\t$GLOBALS['REQUIRE_LANG_LOOP']=0; // LEGACY\n\t\t\t\t}\n\n\t\t\t\tif (!is_null($null_test))\n\t\t\t\t{\n\t\t\t\t\t$n=do_lang_tempcode($p['human_name']);\n\t\t\t\t\tswitch ($p['the_name'])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'timezone':\n\t\t\t\t\t\t\t$t=do_lang('DESCRIPTION_TIMEZONE_SITE');\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$t=do_lang($p['explanation'],NULL,NULL,NULL,NULL,false);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (is_null($n)) continue;\n\t\t\t\t\t$config_value=array_key_exists('config_value',$p)?$p['config_value']:get_option($p['the_name']);\n\t\t\t\t\tif ($config_value===false) continue;\n\t\t\t\t\tif ((($this->_keyword_match($p['the_name'])) || ($this->_keyword_match($n->evaluate())) || ($this->_keyword_match($t)) || ($this->_keyword_match($config_value))))\n\t\t\t\t\t{\n\t\t\t\t\t\t$_url=build_url(array('page'=>'admin_config','type'=>'category','id'=>$p['the_page']),'adminzone');\n\t\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t\t$url.='#group_'.$p['section'];\n\t\t\t\t\t\tif (is_null($t)) $t='';\n\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'setup'),'adminzone'),do_lang_tempcode('SETUP')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_config','type'=>'misc'),'adminzone'),do_lang_tempcode('CONFIGURATION')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_config','type'=>'category','id'=>$p['the_page']),'adminzone'),do_lang('CONFIG_CATEGORY_'.$p['the_page'])));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink($url,do_lang($p['section'])));\n\t\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>protect_from_escaping($t),'SUP'=>$sup)));\n\n\t\t\t\t\t\tif ($conf_found_count>100)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$content[$current_results_type]=do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>do_lang_tempcode('TOO_MANY_TO_CHOOSE_FROM'),'URL'=>'','TITLE'=>'','DESCRIPTION'=>'','SUP'=>''));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$conf_found_count++;\n\n\t\t\t\t\t\tif (!array_key_exists($p['the_page'],$config_categories)) $config_categories[$p['the_page']]=array();\n\t\t\t\t\t\t$config_categories[$p['the_page']][$p['section']]=1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$current_results_type=do_lang('OPTION_CATEGORIES');\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$current_results_type_2=do_lang('OPTION_GROUPS');\n\t\t\t$content[$current_results_type_2]=new ocp_tempcode();\n\t\t\tforeach ($config_categories as $p=>$groups)\n\t\t\t{\n\t\t\t\t$_n=do_lang('CONFIG_CATEGORY_'.$p,NULL,NULL,NULL,NULL,false);\n\t\t\t\tif (is_null($_n)) continue;\n\t\t\t\t$n=do_lang_tempcode('CONFIG_CATEGORY_'.$p);\n\t\t\t\tif ($this->_keyword_match($n->evaluate()))\n\t\t\t\t{\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_config','type'=>'category','id'=>$p),'adminzone');\n\t\t\t\t\t$description=do_lang_tempcode('CONFIG_CATEGORY_DESCRIPTION__'.$p);\n\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'setup'),'adminzone'),do_lang_tempcode('SETUP')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_config','type'=>'misc'),'adminzone'),do_lang_tempcode('CONFIGURATION')));\n\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>$description,'SUP'=>$sup)));\n\t\t\t\t}\n\t\t\t\tforeach (array_keys($groups) as $group)\n\t\t\t\t{\n\t\t\t\t\t$n2=do_lang($group,NULL,NULL,NULL,NULL,false);\n\t\t\t\t\tif (is_null($n2)) continue;\n\n\t\t\t\t\tif ($this->_keyword_match($n2))\n\t\t\t\t\t{\n\t\t\t\t\t\t$upload_max_filesize=(ini_get('upload_max_filesize')=='0')?do_lang('NA'):clean_file_size(php_return_bytes(ini_get('upload_max_filesize')));\n\t\t\t\t\t\t$post_max_size=(ini_get('post_max_size')=='0')?do_lang('NA'):clean_file_size(php_return_bytes(ini_get('post_max_size')));\n\t\t\t\t\t\t$_group_description=do_lang('CONFIG_GROUP_DESCRIP_'.$group,escape_html($post_max_size),escape_html($upload_max_filesize),NULL,NULL,false);\n\t\t\t\t\t\tif (is_null($_group_description))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$group_description=new ocp_tempcode();\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$group_description=do_lang_tempcode('CONFIG_GROUP_DESCRIP_'.$group,escape_html($post_max_size),escape_html($upload_max_filesize),false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$_url=build_url(array('page'=>'admin_config','type'=>'category','id'=>$p),'adminzone');\n\t\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t\t$url.='#group_'.$group;\n\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'setup'),'adminzone'),do_lang_tempcode('SETUP')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_config','type'=>'misc'),'adminzone'),do_lang_tempcode('CONFIGURATION')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_config','type'=>'category','id'=>$p),'adminzone'),do_lang('CONFIG_CATEGORY_'.$p)));\n\t\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t$content[$current_results_type_2]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n2,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>$group_description,'SUP'=>$sup)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$current_results_type=do_lang('USERGROUPS');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_ocf_groups')) && (get_forum_type()=='ocf'))\n\t\t{\n\t\t\t// Usergroups\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$map=array('g_is_private_club'=>0);\n\t\t\t$all_groups=$GLOBALS['FORUM_DB']->query_select('f_groups',array('id','g_name'),$map);\n\t\t\tforeach ($all_groups as $p)\n\t\t\t{\n\t\t\t\t$n=get_translated_text($p['g_name']);\n\t\t\t\tif ($this->_keyword_match($n))\n\t\t\t\t{\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_ocf_groups','type'=>'_ed','id'=>$p['id']),'adminzone');\n\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'security'),'adminzone'),do_lang_tempcode('SECURITY')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_ocf_groups','type'=>'misc'),'adminzone'),do_lang_tempcode('USERGROUPS')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_ocf_groups','type'=>'ed'),'adminzone'),do_lang_tempcode('EDIT_GROUP')));\n\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>$sup)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$current_results_type=do_lang('THEMES');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && has_actual_page_access(get_member(),'admin_themes'))\n\t\t{\n\t\t\t// Themes\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$map=array();\n\t\t\tforeach (array(do_lang('SUPPORTS_WIDE'),do_lang('MOBILE_PAGES')) as $n)\n\t\t\t{\n\t\t\t\tif ($this->_keyword_match($n))\n\t\t\t\t{\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_themes','type'=>'edit_theme','theme'=>$GLOBALS['FORUM_DRIVER']->get_theme('')),'adminzone');\n\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'style'),'adminzone'),do_lang_tempcode('STYLE')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_themes','type'=>'misc'),'adminzone'),do_lang_tempcode('THEMES')));\n\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>$sup)));\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$current_results_type=do_lang('ZONES');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && has_actual_page_access(get_member(),'admin_zones'))\n\t\t{\n\t\t\t// Zones\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$map=array();\n\t\t\t$all_groups=$GLOBALS['SITE_DB']->query_select('zones',array('zone_name','zone_title','zone_header_text'),$map,'ORDER BY zone_title',50/*reasonable limit; zone_title is sequential for default zones*/);\n\t\t\tforeach ($all_groups as $p)\n\t\t\t{\n\t\t\t\t$n=$p['zone_name'];\n\t\t\t\t$t=get_translated_text($p['zone_title']);\n\t\t\t\t$ht=get_translated_text($p['zone_header_text']);\n\t\t\t\tif (($this->_keyword_match($n)) || ($this->_keyword_match($t)) || ($this->_keyword_match($ht)))\n\t\t\t\t{\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_zones','type'=>'_edit','id'=>$p['zone_name']),'adminzone');\n\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'setup'),'adminzone'),do_lang_tempcode('STRUCTURE')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_zones','type'=>'misc'),'adminzone'),do_lang_tempcode('ZONES')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_zones','type'=>'edit'),'adminzone'),do_lang_tempcode('EDIT_ZONE')));\n\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>escape_html($t),'SUP'=>$sup)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Blocks\n\t\t$current_results_type=do_lang('_BLOCKS');\n\t\tif ($this->_section_match($section_limitations,$current_results_type))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$map=array();\n\t\t\trequire_code('zones2');\n\t\t\t$all_blocks=find_all_blocks();\n\t\t\tforeach (array_keys($all_blocks) as $p)\n\t\t\t{\n\t\t\t\t$t=do_lang('BLOCK_'.$p.'_DESCRIPTION');\n\t\t\t\tif (($this->_keyword_match($p)) || ($this->_keyword_match($t)))\n\t\t\t\t{\n\t\t\t\t\t$url='';\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$p,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>escape_html($t))));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$current_results_type=do_lang('SPECIFIC_PERMISSIONS');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_permissions')))\n\t\t{\n\t\t\t// Privileges- sections/names/descriptions\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$all_permissions=$GLOBALS['SITE_DB']->query_select('sp_list',array('the_name','p_section'));\n\t\t\t$pt_sections=array();\n\t\t\tforeach ($all_permissions as $p)\n\t\t\t{\n\t\t\t\t$n=do_lang('PT_'.$p['the_name'],NULL,NULL,NULL,NULL,false);\n\t\t\t\tif (is_null($n)) continue;\n\t\t\t\tif (($this->_keyword_match($n)) || ($this->_keyword_match($p['the_name'])))\n\t\t\t\t{\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_permissions','type'=>'specific','id'=>$p['p_section']),'adminzone');\n\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'security'),'adminzone'),do_lang_tempcode('SECURITY')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_permissions','type'=>'specific'),'adminzone'),do_lang_tempcode('SPECIFIC_PERMISSIONS')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink($_url,do_lang($p['p_section'])));\n\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>$sup)));\n\t\t\t\t}\n\t\t\t\t$pt_sections[$p['p_section']]=1;\n\t\t\t}\n\t\t\t$current_results_type=do_lang('SPECIFIC_PERMISSION_SECTIONS');\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\tforeach (array_keys($pt_sections) as $p)\n\t\t\t{\n\t\t\t\t$n=do_lang($p,NULL,NULL,NULL,NULL,false);\n\t\t\t\tif (is_null($n)) continue;\n\t\t\t\tif (($this->_keyword_match($n)) || ($this->_keyword_match($p)))\n\t\t\t\t{\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_permissions','type'=>'specific','id'=>$p),'adminzone');\n\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'security'),'adminzone'),do_lang_tempcode('SECURITY')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_permissions','type'=>'specific'),'adminzone'),do_lang_tempcode('SPECIFIC_PERMISSIONS')));\n\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>$sup)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$current_results_type=do_lang('USERGROUP_SETTINGS');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (get_forum_type()=='ocf') && (has_actual_page_access(get_member(),'admin_ocf_groups','adminzone')))\n\t\t{\n\t\t\t// Usergroup settings\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$applicable_langstrings=array(\n\t\t\t\tarray('ENQUIRE_ON_NEW_IPS','DESCRIPTION_ENQUIRE_ON_NEW_IPS'),\n\t\t\t\tarray('FLOOD_CONTROL_ACCESS_SECS','DESCRIPTION_FLOOD_CONTROL_ACCESS_SECS'),\n\t\t\t\tarray('FLOOD_CONTROL_SUBMIT_SECS','DESCRIPTION_FLOOD_CONTROL_SUBMIT_SECS'),\n\t\t\t\tarray('MAX_ATTACHMENTS_PER_POST','DESCRIPTION_MAX_ATTACHMENTS_PER_POST'),\n\t\t\t\tarray('MAX_DAILY_UPLOAD_MB','DESCRIPTION_MAX_DAILY_UPLOAD_MB'),\n\t\t\t\tarray('MAX_AVATAR_WIDTH','DESCRIPTION_MAX_AVATAR_WIDTH'),\n\t\t\t\tarray('MAX_AVATAR_HEIGHT','DESCRIPTION_MAX_AVATAR_HEIGHT'),\n\t\t\t\tarray('MAX_POST_LENGTH_COMCODE','DESCRIPTION_MAX_POST_LENGTH_COMCODE'),\n\t\t\t\tarray('MAX_SIG_LENGTH_COMCODE','DESCRIPTION_MAX_SIG_LENGTH_COMCODE'),\n\t\t\t);\n\t\t\tif (addon_installed('points'))\n\t\t\t{\n\t\t\t\t$applicable_langstrings=array_merge($applicable_langstrings,array(\n\t\t\t\t\tarray('GIFT_POINTS_BASE','DESCRIPTION_GIFT_POINTS_BASE'),\n\t\t\t\t\tarray('GIFT_POINTS_PER_DAY','DESCRIPTION_GIFT_POINTS_PER_DAY'),\n\t\t\t\t));\n\t\t\t}\n\t\t\tforeach ($applicable_langstrings as $_langstring)\n\t\t\t{\n\t\t\t\t$array=is_array($_langstring)?$_langstring:array($_langstring);\n\t\t\t\tforeach ($array as $langstring)\n\t\t\t\t{\n\t\t\t\t\t$n=do_lang($langstring);\n\t\t\t\t\tif ($this->_keyword_match($n))\n\t\t\t\t\t{\n\t\t\t\t\t\t$n=do_lang_tempcode($array[0]);\n\t\t\t\t\t\t$_url=build_url(array('page'=>'admin_ocf_groups','type'=>'ed'),'adminzone');\n\t\t\t\t\t\t$descrip=array_key_exists(1,$array)?do_lang_tempcode($array[1]):new ocp_tempcode();\n\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'security'),'adminzone'),do_lang_tempcode('SECURITY')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_ocf_groups','type'=>'misc'),'adminzone'),do_lang_tempcode('USERGROUPS')));\n\t\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>$descrip,'SUP'=>$sup)));\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$current_results_type=do_lang('MEMBER_SETTINGS');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (get_forum_type()=='ocf') && (has_actual_page_access(get_member(),'members')))\n\t\t{\n\t\t\t// Member settings\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$applicable_langstrings=array(\n\t\t\t\tarray('WIDE','DESCRIPTION_WIDE'),\n\t\t\t\tarray('REVEAL_AGE','DESCRIPTION_REVEAL_AGE'),\n\t\t\t\tarray('PREVIEW_POSTS','DESCRIPTION_PREVIEW_POSTS'),\n\t\t\t\tarray('AUTO_NOTIFICATION_CONTRIB_CONTENT','DESCRIPTION_AUTO_NOTIFICATION_CONTRIB_CONTENT'),\n\t\t\t\tarray('PT_RULES_TEXT','PT_RULES_TEXT_DESCRIPTION'),\n\t\t\t);\n\t\t\tforeach ($applicable_langstrings as $_langstring)\n\t\t\t{\n\t\t\t\t$array=is_array($_langstring)?$_langstring:array($_langstring);\n\t\t\t\tforeach ($array as $langstring)\n\t\t\t\t{\n\t\t\t\t\t$n=do_lang($langstring);\n\t\t\t\t\tif ($this->_keyword_match($n))\n\t\t\t\t\t{\n\t\t\t\t\t\t$n=do_lang_tempcode($array[0]);\n\t\t\t\t\t\t$descrip=array_key_exists(1,$array)?do_lang_tempcode($array[1]):new ocp_tempcode();\n\t\t\t\t\t\t$_url=build_url(array('page'=>'members','type'=>'view'),get_module_zone('members'),NULL,false,false,false,'tab__edit');\n\t\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>$descrip)));\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Zone options\n\t\t$current_results_type=do_lang('ZONE_OPTIONS');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_zones','adminzone')))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$applicable_langstrings=array(\n\t\t\t\tarray('DEFAULT_PAGE','DESCRIPTION_DEFAULT_PAGE'),\n\t\t\t\tarray('HEADER_TEXT','DESCRIPTION_HEADER_TEXT'),\n\t\t\t\tarray('WIDE','DESCRIPTION_WIDE'),\n\t\t\t\tarray('REQUIRE_SESSION','DESCRIPTION_REQUIRE_SESSION'),\n\t\t\t\tarray('DISPLAYED_IN_MENU','DESCRIPTION_DISPLAYED_IN_MENU'),\n\t\t\t\tarray('THEME',(get_forum_type()=='ocf')?'_DESCRIPTION_THEME_OCF':'_DESCRIPTION_THEME'),\n\t\t\t);\n\t\t\tforeach ($applicable_langstrings as $_langstring)\n\t\t\t{\n\t\t\t\t$array=is_array($_langstring)?$_langstring:array($_langstring);\n\t\t\t\tforeach ($array as $langstring)\n\t\t\t\t{\n\t\t\t\t\t$n=do_lang($langstring);\n\t\t\t\t\tif ($this->_keyword_match($n))\n\t\t\t\t\t{\n\t\t\t\t\t\t$n=do_lang_tempcode($array[0]);\n\t\t\t\t\t\t$_url=build_url(array('page'=>'admin_zones','type'=>'edit'),'adminzone');\n\t\t\t\t\t\t$descrip=array_key_exists(1,$array)?do_lang_tempcode($array[1]):new ocp_tempcode();\n\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'structure'),'adminzone'),do_lang_tempcode('STRUCTURE')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_zones','type'=>'misc'),'adminzone'),do_lang_tempcode('ZONES')));\n\t\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>$descrip,'SUP'=>$sup)));\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Install options\n\t\t$current_results_type=do_lang('BASE_CONFIGURATION');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && ($GLOBALS['FORUM_DRIVER']->is_super_admin(get_member())))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\tif (file_exists(get_file_base().'/config_editor.php'))\n\t\t\t{\n\t\t\t\t$file_contents=file_get_contents(get_file_base().'/config_editor.php');\n\t\t\t\t$matches=array();\n\t\t\t\t$num_matches=preg_match_all('#case \\'([^\\']+)\\':\\n\\s*\\$notes=\\'([^\\']+)\\';#',$file_contents,$matches);\n\t\t\t\tfor ($i=0;$i<$num_matches;$i++)\n\t\t\t\t{\n\t\t\t\t\t$n=stripslashes($matches[2][$i]);\n\t\t\t\t\tif ($this->_keyword_match($n))\n\t\t\t\t\t{\n\t\t\t\t\t\t$url=get_base_url().'/config_editor.php';\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>stripslashes($matches[1][$i]),'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>$n)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Language string names and contents\n\t\t$current_results_type=do_lang('MODULE_TRANS_NAME_admin_lang');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_lang','adminzone')))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\n\t\t\tif (user_lang()!=fallback_lang())\n\t\t\t\t$content[$current_results_type]->attach(paragraph(do_lang_tempcode('SEARCH_LAUNCHPAD',escape_html(urlencode($raw_search_string)),escape_html(urlencode(user_lang())))));\n\n\t\t\tglobal $LANGUAGE;\n\t\t\t$lang_file_contents=array();\n\t\t\t$lang_found=array();\n\t\t\tforeach ($LANGUAGE[user_lang()] as $n=>$n_value) // Search all lang strings (we loaded all earlier with require_all_lang)\n\t\t\t{\n\t\t\t\tif (($this->_keyword_match($n)) || ($this->_keyword_match($n_value)))\n\t\t\t\t{\n\t\t\t\t\t$lang_found[$n]=$n_value;\n\t\t\t\t\tif (count($lang_found)>100)\n\t\t\t\t\t{\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>do_lang_tempcode('TOO_MANY_TO_CHOOSE_FROM'),'URL'=>'','TITLE'=>'','DESCRIPTION'=>'','SUP'=>'')));\n\t\t\t\t\t\t$lang_found=array();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($lang_found as $n=>$n_value)\n\t\t\t{\n\t\t\t\t// Try and find what lang file it came from\n\t\t\t\t$lang_file='global';\n\t\t\t\tforeach (array('lang','lang_custom') as $lang_dir)\n\t\t\t\t{\n\t\t\t\t\t$dh=@opendir(get_file_base().'/'.$lang_dir.'/'.fallback_lang().'/');\n\t\t\t\t\tif ($dh!==false)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile (($file=readdir($dh))!==false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (substr(strtolower($file),-4)=='.ini')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!array_key_exists($file,$lang_file_contents))\n\t\t\t\t\t\t\t\t\t$lang_file_contents[$file]=file_get_contents(get_file_base().'/'.$lang_dir.'/'.fallback_lang().'/'.$file);\n\t\t\t\t\t\t\t\tif ((preg_match('#^'.str_replace('#','\\#',preg_quote($n)).'=#m',$lang_file_contents[$file])!=0) || ((file_exists(get_custom_file_base().'/lang_custom/'.user_lang().'/'.$file)) && (preg_match('#^'.str_replace('#','\\#',preg_quote($n)).'=#m',file_get_contents(get_custom_file_base().'/lang_custom/'.user_lang().'/'.$file))!=0)))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$lang_file=basename($file,'.ini');\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$_url=build_url(array('page'=>'admin_lang','type'=>'misc','lang'=>user_lang(),'lang_file'=>$lang_file),'adminzone');\n\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t$url.='#jmp_'.$n;\n\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'style'),'adminzone'),do_lang_tempcode('STYLE')));\n\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_lang','type'=>'misc'),'adminzone'),do_lang_tempcode('TRANSLATE_CONTENT')));\n\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_lang','type'=>'misc','lang'=>user_lang(),'lang_file'=>$lang_file),'adminzone'),$lang_file));\n\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>escape_html($n_value),'SUP'=>$sup)));\n\t\t\t}\n\t\t\t$lang_file_contents=array();\n\t\t}\n\n\t\t// Theme images\n\t\t$current_results_type=do_lang('MANAGE_THEME_IMAGES');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_themes','adminzone')))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$images=$GLOBALS['SITE_DB']->query_select('theme_images',array('id','theme','lang'));\n\t\t\tforeach ($images as $image)\n\t\t\t{\n\t\t\t\t$n=$image['id'];\n\t\t\t\tif ($this->_keyword_match($n))\n\t\t\t\t{\n\t\t\t\t\t$_url=build_url(array('page'=>'admin_themes','type'=>'edit_image','theme'=>$image['theme'],'lang'=>$image['lang'],'id'=>$n),'adminzone');\n\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'style'),'adminzone'),do_lang_tempcode('STYLE')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_themes','type'=>'misc'),'adminzone'),do_lang_tempcode('THEMES')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_themes','type'=>'manage_images','theme'=>$image['theme']),'adminzone'),do_lang_tempcode('EDIT_THEME_IMAGE')));\n\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t$tree->attach(escape_html($image['theme']));\n\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t$lang=$image['lang'];\n\t\t\t\t\t$lang_map=better_parse_ini_file(file_exists(get_file_base().'/lang_custom/langs.ini')?(get_file_base().'/lang_custom/langs.ini'):(get_file_base().'/lang/langs.ini'));\n\t\t\t\t\t$lang=array_key_exists($lang,$lang_map)?$lang_map[$lang]:$lang;\n\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>$lang,'SUP'=>$sup)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Template names\n\t\t$current_results_type=do_lang('TEMPLATES');\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_themes','adminzone')))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$tpl_found=array();\n\t\t\tforeach (array('templates_custom','templates') as $template_dir)\n\t\t\t{\n\t\t\t\t$dh=opendir(get_file_base().'/themes/default/'.$template_dir.'/');\n\t\t\t\twhile (($file=readdir($dh))!==false)\n\t\t\t\t{\n\t\t\t\t\tif ((substr(strtolower($file),-4)=='.tpl') && (!array_key_exists($file,$tpl_found)))\n\t\t\t\t\t{\n\t\t\t\t\t\t$n=$file;\n\t\t\t\t\t\tif (($this->_keyword_match(basename($n,'.tpl'))) || ($this->_keyword_match($n)) || (($template_dir=='templates_custom') && ($this->_keyword_match(file_get_contents(get_file_base().'/themes/default/'.$template_dir.'/'.$n)))))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_url=build_url(array('page'=>'admin_themes','type'=>'_edit_templates','theme'=>$default_theme,'f0file'=>$file),'adminzone');\n\t\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'style'),'adminzone'),do_lang_tempcode('STYLE')));\n\t\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_themes','type'=>'misc'),'adminzone'),do_lang_tempcode('THEMES')));\n\t\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_themes','type'=>'edit_templates','theme'=>$default_theme),'adminzone'),do_lang_tempcode('EDIT_TEMPLATES')));\n\t\t\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$_url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>$sup)));\n\t\t\t\t\t\t\t$tpl_found[$file]=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// CSS file contents\n\t\t$current_results_type='CSS';\n\t\tif (($this->_section_match($section_limitations,$current_results_type)) && (has_actual_page_access(get_member(),'admin_themes','adminzone')))\n\t\t{\n\t\t\t$content[$current_results_type]=new ocp_tempcode();\n\t\t\t$dh=opendir(get_file_base().'/themes/default/css/');\n\t\t\twhile (($file=readdir($dh))!==false)\n\t\t\t{\n\t\t\t\tif (substr(strtolower($file),-4)=='.css')\n\t\t\t\t{\n\t\t\t\t\t$n=$file;\n\t\t\t\t\tif ($this->_keyword_match(file_get_contents(get_file_base().'/themes/default/css/'.$n)))\n\t\t\t\t\t{\n\t\t\t\t\t\t$_url=build_url(array('page'=>'admin_themes','type'=>'edit_css','theme'=>$default_theme,'file'=>$file),'adminzone');\n\t\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t\tif (isset($keywords[0]))\n\t\t\t\t\t\t\t$url.='#'.$keywords[0][0];\n\t\t\t\t\t\t$tree=new ocp_tempcode();\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin','type'=>'style'),'adminzone'),do_lang_tempcode('STYLE')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_themes','type'=>'misc'),'adminzone'),do_lang_tempcode('THEMES')));\n\t\t\t\t\t\t$tree->attach(do_template('BREADCRUMB_ESCAPED'));\n\t\t\t\t\t\t$tree->attach(hyperlink(build_url(array('page'=>'admin_themes','type'=>'choose_css','theme'=>$default_theme),'adminzone'),do_lang_tempcode('EDIT_CSS')));\n\t\t\t\t\t\t$sup=do_lang_tempcode('LOCATED_IN',$tree);\n\t\t\t\t\t\t$content[$current_results_type]->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY',array('NAME'=>$n,'URL'=>$url,'TITLE'=>'','DESCRIPTION'=>'','SUP'=>$sup)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//ksort($content);\t\tDon't sort, we have an implicit good order in this code file\n\n\t\t// And show results...\n\t\tif (addon_installed('search'))\n\t\t{\n\t\t\t$_search_url=build_url(array('page'=>'search','type'=>'results','content'=>$raw_search_string,'days'=>'-1','search_comcode_pages'=>1,'all_defaults'=>1),get_module_zone('search'));\n\t\t\t$search_url=$_search_url->evaluate();\n\t\t\t$software_search_url=brand_base_url().'/site/index.php?page=search&type=results&search_under=docs&search_comcode_pages=1&days=-1&content='.urlencode($raw_search_string);\n\t\t\t$software_search_url_2=brand_base_url().'/site/index.php?page=search&type=results&search_ocf_posts=1&days=-1&content='.urlencode($raw_search_string);\n\t\t\t$pre=do_lang_tempcode('ADMINZONE_SEARCH_RESULTS',escape_html($raw_search_string),escape_html($search_url),array(escape_html($software_search_url),escape_html($software_search_url_2)));\n\t\t} else $pre=new ocp_tempcode();\n\t\t$found_some=false;\n\t\tforeach ($content as $c)\n\t\t{\n\t\t\tif (!$c->is_empty())\n\t\t\t{\n\t\t\t\t$found_some=true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$post=((strpos($raw_search_string,'\"')!==false) || (!$found_some))?new ocp_tempcode():do_lang_tempcode('ADMINZONE_SEARCH_TIP',escape_html(preg_replace('#\\s@\\w+#','',$raw_search_string)));\n\n\t\tif ((!$found_some) && ($this->and_query)) // Oh well, try as an OR query then\n\t\t{\n\t\t\t$this->and_query=false;\n\t\t\treturn $this->search();\n\t\t}\n\n\t\treturn do_template('INDEX_SCREEN_FANCIER_SCREEN',array('TITLE'=>get_page_title('ADMIN_ZONE_SEARCH_RESULTS'),'EMPTY'=>$found_some?NULL:true,'ARRAY'=>true,'CONTENT'=>$content,'PRE'=>$pre,'POST'=>$post));\n\t}", "private function getSearch() {\n\t\tif( $_SESSION['privilege'] != 'anon' ) {\n\n\t\t\t// If NOT anon then IS logged in so set userID to SESSION['id'] \n\t\t\t$userID = $_SESSION['id'];\n\n\t\t} else {\n\t\t\t\n\t\t\t// For this function default $userID to non-exitent user # 0 \n\t\t\t$userID = 0;\n\n\t\t}\n\n\t\t// Set search term per input OR blank\n\n\t\tif( !isset($_POST['search'])) {\n\t\t\t$_POST['search'] = \"\";\n\t\t}\n\t\t\n\t\tif(strlen($_POST['search']) === 0) {\n\t\t\t$searchTerm = \"\";\n\n\t\t} else {\n\t\t\t$result = $_POST['search'];\n\t\t\t$searchTerm = strtolower($result);\n\t\t}\n\n\t\t$this->data['searchTerm'] = $searchTerm;\n\n\t\t$sql = \"SELECT posts.id, title AS score_title, intro AS score_intro, article AS score_article\n\t\t\tFROM posts\n\t\t\tWHERE\n\t\t\t\t(title LIKE '%$searchTerm%' OR \n\t\t\t\tintro LIKE '%$searchTerm%' OR\n\t\t\t\tarticle LIKE '%$searchTerm%')\";\n\n\t\tif( $_SESSION['privilege'] != 'admin' ) {\n\n\t\t\t$sql .= \" AND (user_id = $userID\n\t\t\t\t\tOR status = 'Approved')\t\n\t\t\t\t\tORDER BY score_title ASC\";\n\t\t\n\t\t} else {\n\n\t\t\t$sql .= \" ORDER BY score_title ASC\";\t\n\n\t\t}\t\t\n\t\n\t\t$result = $this->dbc->query($sql);\n\n\t\tif( !$result || $result->num_rows == 0) {\n\t\t\t$this->data['searchResults'] = \"No results\";\n\t\t} else {\n\t\t\t$this->data['searchResults'] = $result->fetch_all(MYSQLI_ASSOC);\n\t\t}\n\t}", "public function GetSearch(){\n if($this->get_request_method()!= \"POST\"){\n $this->response('',406);\n }\n $user_id = $_POST['user_id'];\n $keyword = $_POST['keyword'];\n $type = $_POST['type'];\n $user_auth_key = $_POST['user_auth_key'];\n $latitude = $_POST['latitude'];\n $longitude = $_POST['longitude'];\n $page_no = $_POST['page_no'];\n $format = $_POST['format'];\n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n if(!empty($keyword) && !empty($type) && !empty($user_auth_key) && !empty($page_no)){\n $result = $res->CheckAuthentication($user_id, $user_auth_key, $conn);\n if($result != false){\n $res->get_search($user_id, $keyword, $type, $latitude, $longitude, $page_no, $conn);\n $this->dbClose();\n }\n else{\n $this->dbclose();\n $error = array('status' => \"0\", \"msg\" => \"Not Authorised To get detail\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }\n else{\n $error = array('status' => \"0\", \"msg\" => \"Fill All Fields\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }", "public function search($params) {\n\t\t$callUrl = \"https://en.wikipedia.org/w/api.php?action=query&list=search&utf8=&format=json&srlimit=5&srsearch=\".urlencode($params[\"q\"]);\n\n\t\t/**\n\t\t* Create curl request and send it\n\t\t*/\n\t\t$process = curl_init($callUrl);\n\t\tcurl_setopt($process, CURLOPT_HTTPHEADER, array('Accept: application/json'));\n\t\tcurl_setopt($process, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($process, CURLOPT_TIMEOUT, 5);\n\t\tcurl_setopt($process, CURLOPT_RETURNTRANSFER, TRUE);\n\t\t$text = curl_exec($process);\n\t\tcurl_close($process);\n\t\t$raw = json_decode($text);\n\n\t\t/**\n\t\t * return message, if we could not get any results\n\t\t */\n\t\tif( count($raw->query->search) <= 0 ) {\n\t\t\t$answer = new Answer();\n\t\t\t$answer->addText(\"Unfortunately I was not able to find anything for *\" . $params[\"q\"] . \"*.\");\n\t\t\treturn $answer;\n\t\t}\n\n\t\t/**\n\t\t * get results into list\n\t\t */\n\t\t$answer = new Answer();\n\t\t$answer->addText(\"Here are the top wikipedia articles for *\" . $params[\"q\"] . \"*: \");\n\n\t\tforeach($raw->query->search as $res) {\n\t\t\t$answer->addAttachment(\n\t\t\t\tnew Attachment(\n\t\t\t\t\t$res->title,\n\t\t\t\t\tstrip_tags($res->snippet),\n\t\t\t\t\t\"https://en.wikipedia.org/wiki/\" . rawurlencode($res->title)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn $answer;\n\t}" ]
[ "0.7596438", "0.74730897", "0.7405362", "0.7267051", "0.716777", "0.7147625", "0.6984506", "0.69432247", "0.6934082", "0.68978876", "0.6779909", "0.67794234", "0.6776836", "0.67475784", "0.67475784", "0.67432684", "0.67276835", "0.6668217", "0.6656132", "0.6567901", "0.6552493", "0.654868", "0.65439355", "0.65200305", "0.6518319", "0.650361", "0.64876413", "0.6471368", "0.6468047", "0.64542145", "0.64508605", "0.6427984", "0.6422664", "0.6387509", "0.6379469", "0.6371309", "0.63640285", "0.63612676", "0.63533485", "0.6349487", "0.6342279", "0.6341683", "0.6315286", "0.6309065", "0.6308239", "0.62899053", "0.6285551", "0.6263689", "0.62604773", "0.6230083", "0.62285525", "0.6223406", "0.62073225", "0.62016165", "0.61882174", "0.61813927", "0.61810976", "0.6172417", "0.6170106", "0.6162965", "0.616242", "0.61607504", "0.61565244", "0.6149606", "0.61472195", "0.61465406", "0.6139803", "0.6122848", "0.6116029", "0.61074865", "0.610232", "0.610173", "0.6100654", "0.60988146", "0.60762364", "0.60743445", "0.6061891", "0.6059276", "0.60548013", "0.60464835", "0.6036755", "0.60275257", "0.60243", "0.60225827", "0.6020721", "0.6011875", "0.6011875", "0.6007761", "0.6007618", "0.6006468", "0.5999809", "0.5990868", "0.59866637", "0.59852254", "0.5985141", "0.5983838", "0.5982957", "0.59817165", "0.59748966", "0.5973945" ]
0.7809321
0
Query the Business API by business_id
Запросить Business API по business_id
function get_business($business_id) { $business_path = $GLOBALS['BUSINESS_PATH'] . urlencode($business_id); return request($GLOBALS['API_HOST'], $business_path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_business($bearer_token, $business_id) {\n $business_path = $GLOBALS['BUSINESS_PATH'] . urlencode($business_id);\n \n return request($GLOBALS['API_HOST'], $business_path);\n}", "function GetBusiness($businessId)\n\t{\n\t\t$result = $this->sendRequest(\"GetBusiness\", array(\"BusinessId\"=>$businessId));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function get_business_details($business_id) {\n\n //converts into '/v3/businesses/{id}'\n $business_path = $GLOBALS['BUSINESS_PATH'] . urlencode($business_id);\n \n $response = request($GLOBALS['API_HOST'], $business_path);\n\n $pretty_response = json_encode(json_decode($response), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n\n $data = json_decode($pretty_response, true);\n\n //var_dump($data);\n\n return $data;\n}", "function select_business_data($bus_id)\n\t{\n\t\tglobal $db;\n\n\t\t$sql = \"SELECT * FROM \" . GARAGE_BUSINESS_TABLE . \" WHERE id = '$bus_id' \";\n\n\t\tif( !($result = $db->sql_query($sql)) )\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'Could Not Select Model', '', __LINE__, __FILE__, $sql);\n\t\t}\n\n\t\t$row = $db->sql_fetchrow($result);\n\t\t$db->sql_freeresult($result);\n\n\t\treturn $row;\n\t}", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getBusinessById($id) {\n\t\t$em = $this->getEntityManager();\n\t\t/** @var $business Business */\n\t\t$business = $em->getRepository('Business')->findOneByBusinessID($id);\n\t\tif (empty($business)) {\n\t\t\treturn $this->respondError(\"Invalid business ID\", 400);\n\t\t}\n\t\t\n\t\t$response = $business;\n\t\t\n\t\t// Is parent?\n\t\tif ($business->getParentBusinessID() == 0) {\n\t\t\t// Get the children\n\t\t\t$children = $em->getRepository('Business')->findBy(array(\n\t\t\t\t'parentBusinessID' => $business->getBusinessID()\n\t\t\t));\n\t\t\t$response->children = $children;\n\t\t}\n\t\telse {\n\t\t\t// Get the parent\n\t\t\tif ($business->getParentBusinessID() != $business->getBusinessID()) {\n\t\t\t\t$parent = $em->getRepository('Business')->findOneBy(array(\n\t\t\t\t\t'businessID' => $business->getParentBusinessID()\n\t\t\t\t));\n\t\t\t\t$response->parent = $parent;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Add meta data\n\t\t$metaData = $em->getRepository('MetaData')->findBy(array(\n\t\t\t'type' => 'business',\n\t\t\t'typeID' => $business->getBusinessID()\n\t\t), array(\n\t\t\t'valueOrder' => 'ASC'\n\t\t));\n\t\t$response->meta_data = $metaData;\n\t\t\n\t\treturn $this->respond($response);\n\t}", "public function show(Business $business)\n {\n //\n }", "public function getBusiness($businessId)\n {\n $businessPath = $this->businessPath . urlencode($businessId);\n\n return $this->request($businessPath);\n }", "public function getBusinessId()\n {\n return $this->id;\n }", "public function findById(string $id): BusinessResponse\n {\n return $this->mappedGet('empresa/id/' . $id, BusinessResponse::class);\n }", "function getAnswersByBusinessId($userId, $business_id, $conn) {\n $sql = \"SELECT * FROM tbl_business_answer WHERE u_id='\".$userId.\"' AND business_id = '\".$business_id.\"'\";\n $result = mysqli_query($conn, $sql);\n return mysqli_fetch_all($result, MYSQLI_ASSOC);\n }", "function get_chamber_business(){\r\n $sql = $this->db->prepare(\"SELECT businessID, businessname FROM BUSINESS WHERE chamberID = :chamberid;\");\r\n\r\n $result = $sql->execute(array(\r\n \"chamberid\" => $_SESSION['chamber'],\r\n ));\r\n\r\n if ($result)\r\n return $sql->fetchAll(PDO::FETCH_ASSOC);\r\n else\r\n return false;\r\n }", "public function business() {\n return $this->belongsTo( 'App\\Http\\Models\\Business', 'business_id', 'id' );\n }", "public function setBusinessId($var)\n {\n GPBUtil::checkString($var, True);\n $this->business_id = $var;\n }", "public function setBusinessId($var)\n {\n GPBUtil::checkString($var, True);\n $this->business_id = $var;\n }", "public function setBusinessId($var)\n {\n GPBUtil::checkString($var, True);\n $this->business_id = $var;\n }", "public function setBusinessId($var)\n {\n GPBUtil::checkString($var, True);\n $this->business_id = $var;\n }", "public function setBusinessId($var)\n {\n GPBUtil::checkString($var, True);\n $this->business_id = $var;\n }", "public function business( ) {\n return $this->belongsTo( 'App\\Http\\Models\\Business', 'business_id', 'id' );\n }", "public function show($id)\n {\n $business = Business::with('offices', 'jobs')->find($id);\n return ['business' => $business];\n }", "function GetBusinessList($businessIds)\n\t{\n\t\t$result = $this->sendRequest(\"GetBusinessList\", array(\"BusinessIds\"=>$businessIds));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function __construct($business_id)\r\n {\r\n $this->business_id = $business_id;\r\n }", "function query_api($term, $location) {\r\n $response = json_decode(search($term, $location));\r\n $business_id = $response->businesses[0]->id;\r\n /* \r\n print sprintf(\r\n \"%d local businesses found, querying business info for the top result \\\"%s\\\"\\n\\n <br>\",\r\n count($response->businesses),\r\n $business_id\r\n );\r\n */ \r\n $response = get_business($business_id);\r\n \r\n print sprintf(\"Result for business \\\"%s\\\" found:\\n\", $business_id);\r\n $pretty_response = json_encode(json_decode($response), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\r\n print \"$pretty_response\\n\";\r\n\r\n return json_decode($response, true);\r\n }", "function getBookingsByCustomerId($customerid) {\n $query = \"SELECT * FROM `bookings` WHERE CustomerId='\" . $customerid . \"'\";\n \n $result = Database::selectQuery($query);\n \n if($result == null) {\n return null;\n } else {\n return $result;\n }\n }", "public function setBusinessId($id)\n {\n $this->id = $id;\n }", "public function show($id)\n {\n $business = Business::findOrfail($id);\n\n return new BusinessResource($business);\n }", "public function getListing(){\n $BusInfo = $this->BusinessOwnerModel->getBusinessID();\n \n foreach($BusInfo as $row1){\n $busID = $row1->bid;\n }\n \n $query = $this->db->get_where('BusinessListing', array('bid' => $busID));\n \n if($query->num_rows() > 0){\n foreach($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }\n return false;\n }", "public function yelp_business_api($businesses_id = 'north-india-restaurant-san-francisco', $api_key = 'Q1f28T05IN-H1tvDtQ-IMf4TMd2nsgZ4mN2e03EuUgO-5bQSqBxkXpb_uTPeA98FGq-3vmz0BoFTV3cz6oeh2GnCq9BiNk4nG83nX73wBCclVU2y1rQ1OqrczSUxW3Yx')\n {\n \n $yelp_api_url = 'https://api.yelp.com/v3/businesses/'.$businesses_id;\n\n $curl = curl_init();\n curl_setopt_array($curl, array(\n CURLOPT_URL => $yelp_api_url,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => array(\n \"authorization: Bearer \".$api_key\n ),\n ));\n $response = curl_exec($curl);\n $err = curl_error($curl);\n curl_close($curl);\n\n if ($err) {\n \n dd($err);\n \n } else {\n\n return json_decode($response); dd();\n }\n }", "public function getBusinessIds()\n {\n return $this->business_ids;\n }", "public function getBusinessRequest();", "public function getAllBusinesses() {\n\t\t$em = $this->getEntityManager();\n\t\t$businesses = $em->createQueryBuilder()\n\t\t\t->select('b.businessID,b.costCenter,b.name')\n\t\t\t->from('Business', 'b')\n\t\t\t->orderBy('b.name')\n\t\t\t->getQuery()\n\t\t\t->getResult();\n\t\t\n\t\t$response = array(\n\t\t\t\"businesses\" => $businesses\n\t\t);\n\t\t\n\t\treturn $this->respond($response);\n\t}", "public function retrieveBusinessBookingProfile(): ApiResponse\n {\n //prepare query string for API call\n $_queryBuilder = '/v2/bookings/business-booking-profile';\n\n //validate and preprocess url\n $_queryUrl = ApiHelper::cleanUrl($this->config->getBaseUri() . $_queryBuilder);\n\n //prepare headers\n $_headers = [\n 'user-agent' => BaseApi::USER_AGENT,\n 'Accept' => 'application/json',\n 'Square-Version' => $this->config->getSquareVersion()\n ];\n $_headers = ApiHelper::mergeHeaders($_headers, $this->config->getAdditionalHeaders());\n\n $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl);\n\n // Apply authorization to request\n $this->getAuthManager('global')->apply($_httpRequest);\n\n //call on-before Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n\n // and invoke the API call request to fetch the response\n try {\n $response = Request::get($_httpRequest->getQueryUrl(), $_httpRequest->getHeaders());\n } catch (\\Unirest\\Exception $ex) {\n throw new ApiException($ex->getMessage(), $_httpRequest);\n }\n\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n if (!$this->isValidResponse($_httpResponse)) {\n return ApiResponse::createFromContext($response->body, null, $_httpContext);\n }\n\n $mapper = $this->getJsonMapper();\n $deserializedResponse = $mapper->mapClass(\n $response->body,\n 'Square\\\\Models\\\\RetrieveBusinessBookingProfileResponse'\n );\n return ApiResponse::createFromContext($response->body, $deserializedResponse, $_httpContext);\n }", "public function ListUserBusiness($Id){\n\t\t\ttry {\n\t\t\t\t$BusinessSqlUser = \"SELECT mb.id,mb.business_id,mb.user_id,business.name as business_name \n\t\t\t\t\t\t\t\t\tFROM `multyple_business` \n\t\t\t\t\t\t\t\t\tas mb LEFT JOIN business ON business.`id` = mb.`business_id` where user_id = '\".$Id.\"'\";\n\t\t\t\t$Res_UserBusiness = mysqli_query($this->Connect_db(), $BusinessSqlUser);\n\t\t\t\tif(!$Res_UserBusiness){\n\t\t\t\t\t$error = \"Error description: \" . mysqli_error($this->Connect_db());\n\t\t\t\t\tthrow new Exception($error);\n\t\t\t\t}\n\t\t\t\t// making associative array\n\t\t\t\twhile($Row_UserBusiness = mysqli_fetch_assoc($Res_UserBusiness)){\n\t\t\t\t $ArrUserBusiness[] = $Row_UserBusiness; // Inside while loop\n\t\t\t\t}\n\t\t\t\t// echo '<pre>'; \t\t\t\n\t\t\t\t// print_r($ArrUserBusiness); exit;\n\t\t\t\tif(!empty($ArrUserBusiness)){\n\t\t\t\t\treturn $ArrUserBusiness;\n\t\t\t\t}else{\n\t\t\t\t\treturn 0; \n\t \t\t\t}\t\n\t\t\t} catch (Exception $Exception_ListUserBusiness) {\n\t\t\t\techo 'Exception Caught ', $Exception_ListUserBusiness->getMessage();\n\t\t\t}\n\t\t\t\n\t\t}", "function getBOCAccount($accountid = 'a746637b91b19a261a67d8bd') {\n\t//bankid bda8eb884efcef7082792d45\n\t//accountid a746637b91b19a261a67d8bd\n\t//viewid 5710bba5d42604e4072d1e92\n\t//\n\t// Get cURL resource\n\t$curl = curl_init();\n\t// Set some options - we are passing in a useragent too here\n\tcurl_setopt_array($curl, array(\n\t\tCURLOPT_HTTPHEADER => array(\n\t\t\t\t\t\t\t 'Auth-Provider-Name: 01460900080600',\n\t\t\t\t\t\t\t 'Auth-ID: 123456789',\n\t\t\t\t\t\t\t 'Ocp-Apim-Subscription-Key: f1817e51b3fb4d2ca3fc279d0df3a061'\n\t\t\t\t\t\t\t ),\n\t CURLOPT_RETURNTRANSFER => 1,\n\t CURLOPT_URL => \"http://api.bocapi.net/v1/api/banks/bda8eb884efcef7082792d45/accounts/$accountid/5710bba5d42604e4072d1e92/account\",\n\t // CURLOPT_URL => \"192.168.88.202:8080/customer/$custId/goals\",\n\t CURLOPT_USERAGENT => 'BankBase BOC Hackathon Request'\n\t));\n\t// Send the request & save response to $resp\n\t$resp = curl_exec($curl);\n\t// Close request to clear up some resources\n\tcurl_close($curl);\n\n\t$resp_decode = json_decode($resp);\n\treturn $resp_decode;\n}", "public function getFindBusiness()\n\t{\n\t\t$this->_makeRequest(Wp_WhitePages_Model_Api::API_REQUEST_METHOD_FINDBUSINESS);\n\t\treturn $this->_result;\n\t}", "public function viewByBusinessIdForSelect($id = null) {\n\t\t$contacts = $this->Contact->findByBusinessId('list', $id);\n\t\t$this->set(compact('contacts'));\n\t}", "public function showByBanksoal($id)\n {\n $soal = Soal::where(['banksoal_id' => $id]);\n\n if (request()->q != '') {\n $soal = $soal->where('pertanyaan','LIKE', '%'.request()->q.'%');\n } \n\n $soal = $soal->paginate(10);\n return new SoalCollection($soal);\n }", "function getBusinessServiceDetail($id){\n $serviceDate = DB::table('servicing')\n ->where('showroomID', $id)\n ->get();\n return $serviceDate;\n }", "public function searchBusinessesByName($businessName) {\n $businesses = array();\n\n \n \n try {\n\n $statement = Configuration::openConnection()->prepare(\"SELECT * FROM businesses AS b JOIN states AS s ON b.state=s.stateId WHERE b.name LIKE :businessName\");\n $statement->bindValue(\":businessName\", '%'.$businessName.'%');\n $statement->execute();\n\n $results = $statement->fetchAll(PDO::FETCH_COLUMN);\n\n foreach ($results as $index => $id) {\n\n $business = new Business($id);\n\n array_push($businesses, json_decode($business));\n \n }\n\n Configuration::closeConnection();\n }\n catch (PDOException $e) {\n return \"Error: \" . $e->getMessage();\n }\n\n \n $businesses = json_encode($businesses, JSON_PRETTY_PRINT);\n\n return $businesses;\n\n }", "public function index_get(){\n $id = $this->get('id');\n if ($id == '') {\n $response = $this->BayiM->get_all();\n } else {\n $this->db->where('id', $id);\n $response = $this->BayiM->get_all();\n }\n $this->response($response);\n }", "function getBusinessAddresses($userId) {\r\n $sql = $this->db->prepare(\"SELECT addressid, postal FROM BUSINESS JOIN USER ON USER.businessID=BUSINESS.businessID WHERE UserID=:user_id\");\r\n $sql->execute(array('user_id' => $userId));\r\n $result = $sql->fetch(PDO::FETCH_ASSOC);\r\n return $result;\r\n }", "public function getWireTransferByBusiness(Business $business)\n {\n $data = array();\n $message = array();\n $hasError = true;\n $codeResponse = 200;\n\n try {\n\n $parameters = array(\n ['business_id','=',$business->id],\n ['payment_method_id','=',config('constant.paymentmethod.wire_transfer.id')],\n );\n\n $relationshipNames = array('accountNumbers');\n\n $businessPaymentMethod = $this->service->findWhere($parameters,$relationshipNames);\n\n $data['model'] = $businessPaymentMethod ? new BusinessPaymentMethodAdminResource($businessPaymentMethod) : null;\n array_push ( $message , trans('crud.show_success'));\n $hasError = false;\n\n } catch(\\Exception $e){\n report($e);\n array_push ( $message , $e->getMessage());\n array_push ( $message , trans('crud.show_error'));\n $codeResponse = $e->getCode();\n }\n\n $data['hasError'] = $hasError;\n $data['message'] = $message;\n return response()->json($data,$codeResponse);\n }", "public function business()\n {\n return $this->belongsTo('App\\Models\\Business');\n }", "public function business()\n {\n return $this->belongsTo('App\\Models\\Business');\n }", "public function business()\n {\n return $this->belongsTo(Business::class);\n }", "public function getBusinessKey();", "public function get_blast_by_id($id) {\n if(!$id) {\n throw new Exception('id should not be empty');\n }\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/blasts/$id.json\");\n }", "public function getMercadoPagoByBusiness(Business $business)\n {\n $data = array();\n $message = array();\n $hasError = true;\n $codeResponse = 200;\n\n try {\n\n $parameters = array(\n ['business_id','=',$business->id],\n ['payment_method_id','=',config('constant.paymentmethod.mercadopago.id')],\n );\n\n $businessPaymentMethod = $this->service->findWhere($parameters);\n\n $data['model'] = $businessPaymentMethod ? new BusinessPaymentMethodAdminResource($businessPaymentMethod) : null;\n array_push ( $message , trans('crud.show_success'));\n $hasError = false;\n\n } catch(\\Exception $e){\n report($e);\n array_push ( $message , $e->getMessage());\n array_push ( $message , trans('crud.show_error'));\n $codeResponse = $e->getCode();\n }\n\n $data['hasError'] = $hasError;\n $data['message'] = $message;\n return response()->json($data,$codeResponse);\n }", "public function business()\n {\n return $this->belongsTo('App\\Business');\n }", "public function business()\n {\n return $this->belongsTo('App\\Business');\n }", "public function getBusByID($busID) {\n $sqlQuery = \"SELECT * FROM Bus WHERE busID = :busID\"; //sql for selecting a bus by a specific bus id\n\n $statement = $this->connection->prepare($sqlQuery); //prepares the sql statement\n $parameters = array(\"busID\" => $busID); //takes in the busID \n\n $exec = $statement->execute($parameters); //executes the statement \n\n if (!$exec) { //if there is no busid by that id\n die(\"Could not get Buses\");\n }\n\n return $statement; //return the bus by the id\n }", "function particularbranch($id)\n\t{\n\t\t$getParsubbrand=\"SELECT * from brand where brand_id = $id\";\n\t\t$subbrand_data=$this->get_results( $getParsubbrand );\n\t\treturn $subbrand_data;\n\t}", "public function get_business_data($add_id=null){\n\t\t$this->db->select('categories.name as category_name,cities.name as city_name,areas.name as area_name');\n\t\t$this->db->join('categories','categories.id=category_listing.category_id');\t\n\t\t$this->db->join('advertisements','advertisements.id=category_listing.listing_id');\n\t\t$this->db->join('areas','areas.id=category_listing.area_id');\n\t\t$this->db->join('cities','cities.id=category_listing.city_id');\n\t $this->db->where('category_listing.listing_id',$add_id);\n\t\t$this->db->where('categories.is_active', true);\n\t\t$this->db->from('category_listing');\n\t $query = $this->db->get();\t\n\t\t$results=$query->result_array();\n\t\treturn $results;\n\t}", "function getBookingsByBookingDetailsId($bookingDetailsId) {\n $query = \"SELECT * FROM `bookings` WHERE BookingId='\".$bookingDetailsId.\"'\";\n $result = Database::selectQuery($query);\n if($result == null) {\n return null;\n } else {\n return $result;\n }\n }", "public function get_business_information($partnerid) {\n $this->db->select('*');\n $this->db->from('vendors');\n $this->db->where('id', $partnerid);\n $query = $this->db->get();\n $query_result = $query->result();\n $partner_details = array();\n if (count($query_result) == 0) {\n $partner_details['partner'] = $query_result;\n } else {\n $partner_details['partner'] = $query_result[0];\n }\n\n $this->db->select('*');\n $this->db->from('business_details');\n $this->db->where('business_id', $partner_details['partner']->id);\n $query1 = $this->db->get();\n $query_result1 = $query1->result();\n if (count($query_result1) == 0) {\n $partner_details['business'] = $query_result1;\n } else {\n $partner_details['business'] = $query_result1[0];\n }\n $this->db->select('*');\n $this->db->from('services_business_mapping');\n $this->db->where('business_id', $partner_details['business']->id);\n $mapping_query = $this->db->get();\n $mapping_quer_result = $mapping_query->result();\n $partner_details['mapping'] = $mapping_quer_result;\n\n $this->db->select('*');\n $this->db->from('business_gallery');\n $this->db->where('business_id', $partner_details['business']->id);\n $query2 = $this->db->get();\n $query_result2 = $query2->result();\n $partner_details['gallery'] = $query_result2;\n\n return $partner_details;\n }", "public function getData(int $businessId)\n {\n $settings = Darksky::$plugin->getSettings();\n $api_key = '';\n $apiUrl = 'https://tools.brightlocal.com/seo-tools/api/v4/ld/fetch-reviews';\n $client = new \\GuzzleHttp\\Client();\n $data = array();\n\n try {\n $api_key = (string)$settings->apiKey;\n $apiUrl .= '?api-key=' . $api_key;\n $apiUrl .= '&businessId=' . $businessId;\n $response = $client->request('POST', $apiUrl);\n\n // echo $response->getStatusCode(); # 200\n // echo $response->getHeaderLine('content-type'); # 'application/json; charset=utf8'\n // echo $response->getBody(); # '{\"id\": 1420053, \"name\": \"guzzle\", ...}'\n\n $data = json_decode($response->getBody(), true);\n } catch (\\Exception $e) {\n return [\n 'success' => false,\n 'reason' => ''\n ];\n }\n\n return $data;\n }", "public function getByBaseId($baseId);", "public function getSoalByBanksoal($id)\n {\n $this->checkPermissions('soal');\n\n $soal = Soal::with('jawabans')->where('banksoal_id',$id);\n if (request()->q != '') {\n $soal = $soal->where('pertanyaan', 'LIKE', '%'. request()->q.'%');\n }\n\n if (request()->perPage != '') {\n $soal = $soal->paginate(request()->perPage);\n } else {\n $soal = $soal->get();\n }\n return [ 'data' => $soal ];\n }", "function getBusinessID($userID) {\r\n $sql = $this->db->prepare(\"SELECT businessID FROM USER WHERE UserID='$userID'\");\r\n if ($sql->execute()) {\r\n $result = $sql->fetch(PDO::FETCH_ASSOC);\r\n return $result['businessID'];\r\n }\r\n return false;\r\n }", "public function business( ) {\n return $this->hasMany('App\\Http\\Models\\Business', 'industry_id', 'id');\n }", "public function b_list($id)\n\t{\n\t\t$businesses_taken = $this->business->all();\n\n\n\t\t$businesses_minus = DB::table('businesses')\n ->join('members_businesses', function($join) use($id)\n {\n $join->on('businesses.id', '=', 'members_businesses.business_id')\n ->where('members_businesses.member_id', '=', $id);\n })\n ->get();\n\n $businesses = array();\n\n \techo \"<br>\";\n \t\n foreach ($businesses_taken as $b) {\n\t\t\t$found = false;\n\n\n\n \tforeach($businesses_minus as $bm){\n \t\t//echo \"Compare \" . $b->id . \" with \";\n \t\t//echo $bm->business_id;\n \t\t//found duplicate?\n \t\tif($b->id==$bm->business_id)\n \t\t\t$found=true;\n\n \t}\n \t//echo \"<br>\";\n \tif($found==false)\n \t\t$businesses[$b->id]=$b;\n \t//$businesses[$b->id]->id=$b->id;\n };\n\n \n\t\treturn View::make('businesses.list', compact('businesses'));\n\t}", "public function getBusinesses() {\n try {\n $statement = Configuration::openConnection()->prepare(\"SELECT * FROM businesses AS b JOIN states AS s ON b.state=s.stateId, businessTypes AS bt WHERE b.type=bt.typeId\");\n $statement->execute();\n\n $results = $statement->fetchAll(PDO::FETCH_COLUMN);\n\n $businesses = array();\n\n //echo ('test': 'test2');\n \n foreach ($results as $index => $id) {\n $business = new Business($id);\n array_push($businesses, json_decode($business));\n }\n\n Configuration::closeConnection();\n }\n catch (PDOException $e) {\n return \"Error: \" . $e->getMessage();\n }\n $businesses = json_encode($businesses, JSON_PRETTY_PRINT);\n\n return $businesses;\n }", "public function searchActiveBusinessByBusinessName( $business_name) {\n $result['data'] = [];\n foreach ( $this->where(['is_active'=>1, 'is_display'=>1])->where('business_name', 'like', \"%{$business_name}%\")->get() as $object ) {\n $result['data'][] = $object->getBeforeStandardArray();\n }\n return $result;\n }", "public static function getBusinessOrderForPaid($isPaidBusiness, $business_id = false, $start_date = false, $end_date = false) {\n $query = Order::select(DB::raw('orders.id, orders.conekta_order_id, orders.total as total_cost, businesses.name AS business, businesses.bank_name, businesses.clabe, TRUNCATE((total - (initialFee + kmFee + insuranceFee)), 2) AS total, orders.real_time AS created_at'))\n ->leftJoin('businesses', 'orders.business_id', '=', 'businesses.id')\n ->where('orders.status_id', 5)/*Que se hayan finalizado*/\n ->where('isPaidBusiness', $isPaidBusiness);\n\n $query = $business_id ? $query->where('orders.business_id', $business_id) : $query;\n\n $query = $start_date ? $query->where(DB::raw('TIMESTAMP(orders.real_time)'), '>=', $start_date.' 00:00:00') : $query;\n \n $query = $end_date ? $query->where(DB::raw('TIMESTAMP(orders.real_time)'), '<=', $end_date.' 23:59:59') : $query;\n\n $query = $query->get();\n \n foreach ($query as $key => $order) {\n //$order->subtotal = DB::table('order_details')->where('order_id', $order->id)->sum(DB::raw('subtotal'));\n $order->subtotal = DB::table('order_details')->where('order_id', $order->id)->sum(DB::raw('quantity * price'));\n $order->comision = round($order->subtotal * 0.03, 2, PHP_ROUND_HALF_DOWN);\n $order->total_to_pay = round($order->subtotal - $order->comision, 2, PHP_ROUND_HALF_DOWN);\n }\n\n return $query;\n }", "function getBookingDetailsByBookingId($bookingid) {\n $query = \"SELECT * FROM `bookingdetails` WHERE BookingId='\".$bookingid.\"'\";\n $result = Database::selectQuery($query);\n if($result == null) {\n return null;\n } else {\n return $result;\n }\n }", "public function getBusinessID(){\n $BusinessOwnerEmail = $this->session->userdata['BusinessOwner_logged_in']['username'];\n $query = $this->db->get_where('BusinessOwner', array('email' => $BusinessOwnerEmail));\n if($query->num_rows() > 0){\n foreach($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }\n return false;\n }", "function Fetch_API_Payments($application_id)\n{\n\tsettype($application_id, 'int');\n\n\t$db = ECash::getMasterDb();\n\t$query = '-- /* SQL LOCATED IN file=' . __FILE__ . ' line=' . __LINE__ . ' method=' . __METHOD__ . \" */\n\t\tSELECT\n\t\t\tapi_payment_id,\n\t\t\tname_short event_type,\n\t\t\tamount,\n\t\t\tdate_event\n\t\tFROM\n\t\t\tapi_payment\n\t\t\tJOIN event_type USING (event_type_id)\n\t\tWHERE\n\t\t\tapplication_id = {$application_id}\n\t\tAND\n\t\t\tapi_payment.active_status = 'active'\n\t\";\n\n\t$result = $db->query($query);\n\treturn $result->fetchAll(PDO::FETCH_OBJ);\n\n}", "public function getBrandById($brandeditid){\n\t\t\t \t$brandeditid = mysqli_real_escape_string($this->db->link,$brandeditid);\n\t\t\t \t$query = \"SELECT * FROM tbl_brand WHERE brandId = '$brandeditid' \";\n\t\t\t \t$result = $this->db->select($query);\n\t\t\t \treturn $result;\n\n\t\t\t }", "public function getBusinessUnitID(): string;", "public function show($id)\n {\n return response()->json(customer_point::where('id_business',Auth::user()->id_business)->where('id',$id)->get());\n }", "public function get_existing_packages($business_id) {\n $this->db->select('*');\n $this->db->from('business_programs');\n $this->db->where('business_id', $business_id);\n $query = $this->db->get();\n $query_result = $query->result();\n\n return $query_result;\n }", "public function show(string $businessId, string $paymentGatewayId)\n {\n $this->authorize('view', [PaymentGateway::class, $businessId, $paymentGatewayId]);\n return $this->service->findWithReference($paymentGatewayId, 'business_id', $businessId);\n }", "public function actionList()\n {\n $searchModel = new BusinessSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getBrandById($id);", "public function getBooking($id)\n {\n return $this->model->where('customer_id', $id)->orderBy('id', 'desc')->with('flight', 'passenger', 'outbound', 'cost')->get();\n }", "public function bankdetailGet($id)\n {\n $fullResult = $this->client->call(\n 'crm.requisite.bankdetail.get',\n array('id' => $id)\n );\n return $fullResult;\n }", "public function show(Business $business)\n {\n $business = Business::with('locations')->findOrFail($business->id);\n return view('businesses.show', ['business' => $business]);\n }", "function scrapeBusinessPage($AHSID){\n $url = ALL_BUSINESS_OPT_URL . $AHSID;\n //get simplehtmldom object\n $html = $this->getPage($url);\n //get a Business object form the page\n $business = $this->parseBusinessPage($html, $AHSID);\n //get an Inspection object from business page\n $inspections = $this->parseInspections($html);\n //If there was more than one inspection we will add another query string to show all of the violations\n if(count($inspections) > 1){\n //clear $html to avoid memory leaks\n $html->clear();\n unset($html);\n $html = null;\n //get url that shows all violations\n $vURL = ALL_BUSINESS_OPT_URL . $AHSID . ALL_VIOL_END_QUERY;\n $html = $this->getPage($vURL);\n }\n //get Violation object from business page\n $violations = $this->parseViolations($html, count($inspections));\n // sync violations with inspections\n foreach ($inspections as $inspection) {\n $subViolArray = array();\n $iDate = $inspection->getDate();\n if(!empty($violations)){\n foreach ($violations as $violation) {\n //get violation date and strip any tags\n $vDate = strip_tags($violation->getDate());\n if($vDate == $iDate || $vDate == \"\"){\n array_push($subViolArray, $violation);\n }\n }\n //place violation array in the inspection object\n $inspection->setViolations($subViolArray);\n }\n }\n // update Business object's inspection array\n $business->setInspectionsArray($inspections);\n //clear $html to avoid memory leaks\n $html->clear();\n unset($html);\n $html = null;\n return $business;\n }", "public function phleboActiveDetails($id){\n /** We want...\n * Plebo details - assignment table, phlebo table\n * phlebo_id - assignmet table\n * first_name - phlebo table\n * sirname - phlebo table\n * lastname - phlebo table\n * gender - phlebo table\n * qualifications - phlebo table\n * phone - phlebo table\n * lat - phlebo_position_table\n * lon - phlebo_postitin_table\n */\n //phlebo_details\n //select phlebo_id from assignment table where booking_id is as given\n $phlebo_id = Assignment::select('phlebo_id')\n ->where('booking_id',$id)\n ->get()[0];\n $phlebo_details = Phlebo::select('first_name','sirname','last_name','gender','qualifications','phone')\n ->where('id',$phlebo_id['phlebo_id']+0)\n ->get();\n return response()->json($phlebo_details);\n }", "public function ViewUserBusImages($Business_id, $Id){\n\t\t\ttry {\t\n\t\t\t\t// this is example query\n\t\t\t\t//SELECT mb.*,u.*, b.name as business_name FROM multyple_business mb INNER JOIN user u ON u.id = mb.user_id INNER JOIN business b ON mb.business_id = b.id WHERE mb.user_id = 41\n\n\t\t\t\t// SELECT u.id,i.user_id, i.business_id, i.image FROM images i INNER JOIN user u ON u.id = i.user_id WHERE i.user_id = 41\n\n\t \t\t\t$SqlViewBusImage = \"SELECT u.id,i.user_id, i.business_id, i.image FROM images i INNER JOIN user u ON u.id = i.user_id WHERE i.user_id = '$Id' AND i.business_id = '$Business_id'\";\n\n\t \t\t\t// echo $SqlViewBusImage; exit();\n\n\t\t\t\t$Res_ViewBusImage = mysqli_query($this->Connect_db(), $SqlViewBusImage);\n\n\t\t\t\tif(!$Res_ViewBusImage){\n\t\t\t\t\t$error = \"Error description: \" . mysqli_error($this->Connect_db());\n\t\t\t\t\tthrow new Exception($error);\n\t\t\t\t}\t\t\t\t\t\n\t\t\t\t// makking arry\n\t\t\t\twhile ($Row_ViewBusImage = mysqli_fetch_assoc($Res_ViewBusImage)) {\n\t\t\t\t\t$ArrViewBusImage[] = $Row_ViewBusImage;\n\t\t\t\t}\n\t\t\t\t// echo '<pre>'; \t\n\t\t\t\t// print_r($ArrViewBusImage); exit;\n\t\t\t\tif(!empty($ArrViewBusImage)){\n\t\t\t\t\treturn $ArrViewBusImage;\n\t\t\t\t}\n\t\t\t} catch (Exception $Exception_ViewBusImage){\n\t\t\t\techo 'Exception Caught ', $Exception_ViewBusImage->getMessage();\n\t\t\t}\n\t\t}", "public function findBidBybidderID($id){\r\n $this->db->query( \"SELECT auctions.isActive, bids.bidderID\r\n FROM\r\n auctions as auctions\r\n LEFT OUTER JOIN\r\n (SELECT bidID, bidderID, auctionID\r\n FROM bids as bids\r\n WHERE bidderID= :id) as bids\r\n ON\r\n auctions.auctionID = bids.auctionID\r\n WHERE\r\n auctions.isActive = 1 and bids.bidderID= :id\");\r\n // bind values\r\n $this->db->bind(':id', $id);\r\n \r\n $bid = $this->db->resultSet();\r\n\r\n // check rows\r\n if($this->db->rowCount() > 0){\r\n return $bid;\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "function get_user_booking_with_id($user_id){\n global $db;\n $sql = \"SELECT * FROM booking WHERE user_id = '$user_id'\";\n $result = $db->query($sql);\n return $result;\n}", "public function getDataByID($id){\n $query = $this->db->query('select from books where ID');\n }", "public function related() {\n\t\t$query = $this->request->params['named'];\n\t\tif (empty($query)) {\n\t\t\tthrow new NotFoundException('No Parameters');\n\t\t}\n\t\t$this->set('businesses', $this->Business->find('all', ['conditions' => $query]));\n\t}", "public function get_business_services() {\n $this->db->select('*');\n $this->db->from('services');\n $query = $this->db->get();\n $query_result = $query->result();\n\n return $query_result;\n }", "public function getByID($id)\n {\n $sql=\"CALL SP_APODERADOS_SELECT_BY_ID(?)\";\n return $this->mysqli->find($sql, $id);\n }", "function getBreeding($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"select * from breeding_tbl where breeding_id='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['breeding_id'];\n\n\t}\n\t$crud->disconnect();\n}", "function getBuildingInfo() {\n return getOne(\"SELECT * FROM building WHERE id = ?\",[getLogin()['bid']]);\n}", "public function getserviceproviderBusinessTypeList($id)\r\n\t{\r\n\t\t$list = DB::table('mstr_serviceprovider_buss_type')->select(array('id', 'name'))->where('active', 1);\r\n\t\tif ($id > 0 && is_numeric($id)) {\r\n\t\t $list = $list->where('buss_cat_id', $id);\r\n\t\t}\r\n\t\t$list = $list->get();\r\n\t\treturn $list;\r\n\t}", "public function get($boletoID);", "public function __construct($id) {\n $statement = Configuration::openConnection()->prepare(\"SELECT * FROM businesses AS b JOIN states AS s ON b.state=s.stateId WHERE b.id=:id\");\n \n $statement->bindParam(\":id\", $id);\n\n $statement->execute();\n\n $results = $statement->fetch(PDO::FETCH_ASSOC);\n\n $this->setBusinessId($results['id']);\n $this->setName($results['name']);\n $this->setStation($results['station']);\n $this->setStreetAddress($results['streetAddress']);\n $this->setCity($results['city']);\n $this->setState(array('id' =>$results['stateId'], 'abbreviation' => $results['stateAbbreviation'], 'name' => $results['stateName']));\n $this->setZipcode($results['zipcode']);\n $this->setPhone($results['phone']);\n $this->setUrl($results['url']);\n $this->setServices($results['services']);\n //$this->setType(array('id' => $results['typeId'], 'type' => $results['typeName']));\n\n Configuration::closeConnection();\n }", "function recuperer_produit_bsm($id){\n global $db;\n $i = array(\n 'id' => $id\n );\n $sql = \"SELECT * FROM bsm WHERE id=:id\";\n $req = $db->prepare($sql);\n $req-> execute($i);\n $results = array();\n while($rows = $req->fetchObject()){\n $results[] = $rows;\n }\n return $results;\n}", "function verifyBusiness($name){\n //connect to your database. Type in your username, password and the DB path\n $conn = oci_connect('mcai', 'coen174', '//dbserver.engr.scu.edu/db11g');\n if(!$conn) {\n print \"<br> connection failed:\";\n exit;\n }\n\n $queryString = \"SELECT businessname FROM LISTERS WHERE businessname = :name and approved = 1\";\n $query = oci_parse($conn, $queryString);\n\n oci_bind_by_name($query, ':name', $name);\n\n // Execute the query\n $res = oci_execute($query);\n if (!$res) {\n $e = oci_error($query);\n echo $e['message'];\n }\n\n $nrows = oci_fetch_all($query, $res);\n\n if($nrows == 0) {\n $out = array('found' => 0);\n } else {\n $out = array('found' => 1);\n }\n\n echo json_encode($out);\n\n OCILogoff($conn);\n}", "function babies_data ($bgalb_id = 0)\n\t{\n\t\t$temp_return = array();\n\n\t\tif ($bgalb_id) {\n\t\t\t$sql = sprintf(\"SELECT * FROM %s \n\t\t\t\t\t\t\tWHERE bgalb_id='%d'\",\n\t\t\t\t$this->db_praefix.\"ecard_data\",\n\t\t\t\t$bgalb_id\n\t\t\t);\n\t\t\t$temp_return = $this->db->get_row($sql, ARRAY_A);\n\t\t}\n\n\t\treturn $temp_return;\n\t}", "private function api_query() {\n if ($this->trackId == null) {\n return false;\n }\n $class[] = 'includes/checkout-php-library/autoload';\n $class[] = 'includes/checkout-php-library/com/checkout/Apiclient';\n $class[] = 'includes/checkout-php-library/com/checkout/Apiservices/Reporting/Reportingservice';\n $class[] = 'includes/checkout-php-library/com/checkout/Apiservices/Reporting/Requestmodels/Transactionfilter';\n\n foreach ($class as $path) {\n module_load_include('php', 'uc_checkoutpayment', $path);\n }\n\n $apiClient = new com\\checkout\\Apiclient(variable_get('cko_private_key'),variable_get('cko_mode'));\n $service = $apiClient->Reportingservice();\n\n $request = new com\\checkout\\Apiservices\\Reporting\\Requestmodels\\Transactionfilter();\n $request->setPageSize('100');\n $request->setSortColumn('date');\n $request->setFilters(\n array(\n \"action\" => \"include\",\n \"field\" => \"TrackID\",\n \"operator\" => \"EQUALS\",\n \"value\" => $this->trackId,\n )\n );\n\n $response = $service->queryTransaction($request);\n\n if (!empty($response)) {\n foreach ($response as $value) {\n $this->id = $value->id;\n $this->created = $value->created;\n $this->trackId = $value->track_id;\n $this->currency = $value->currency;\n $this->responseMessage = $value->responseMessage;\n $this->responseCode = $value->responseCode;\n $this->status = $value->status;\n $this->value = $data->value;\n $this->email = $data->email;\n\n $this->db_add();\n }\n\n return $this->db_get();\n }\n\n return FALSE;\n }", "public static function getByBz_id($bz_id) {\n return self::getPeer()->doSelect(new Criteria(array('bz_id', $bz_id, EQUAL)));\n }" ]
[ "0.72874045", "0.68762845", "0.6643683", "0.6613496", "0.64544404", "0.64544404", "0.64544404", "0.64544404", "0.64544404", "0.64386517", "0.6426751", "0.63784474", "0.6187909", "0.61160827", "0.60744554", "0.60321623", "0.60273176", "0.602034", "0.602034", "0.602034", "0.602034", "0.602034", "0.5971741", "0.59451526", "0.5921251", "0.5893548", "0.5798308", "0.5775919", "0.57684815", "0.56807035", "0.5645439", "0.56281966", "0.55748314", "0.55583626", "0.5513669", "0.55002946", "0.55002755", "0.5493061", "0.54806346", "0.5478503", "0.5474696", "0.5446634", "0.54316914", "0.5417162", "0.5385427", "0.5378623", "0.5371043", "0.5371043", "0.53471696", "0.5345392", "0.533411", "0.5322544", "0.53223747", "0.53118473", "0.5308946", "0.5297726", "0.5296506", "0.5290286", "0.5289181", "0.52781147", "0.5273276", "0.52625155", "0.52575237", "0.52520883", "0.5242308", "0.52303517", "0.5222226", "0.52150446", "0.5208558", "0.5206906", "0.5199026", "0.51982975", "0.5185437", "0.518306", "0.51553637", "0.5153824", "0.5124405", "0.5121312", "0.5093589", "0.5077645", "0.5071276", "0.50630623", "0.50519925", "0.50433207", "0.5041558", "0.5037551", "0.5035267", "0.5011652", "0.5009958", "0.50055623", "0.50041115", "0.49939448", "0.49896294", "0.4975537", "0.49717742", "0.4970833", "0.49640733", "0.49618703", "0.49611706", "0.49606138" ]
0.7619095
0
Get the existing recommandation category list
Получить существующий список категорий рекомендаций
function getCategoryRecommandationList(){ global $wpdb; $query = $wpdb->prepare( "SELECT RECOMMANDATION_CAT.*, PIC.photo FROM " . TABLE_CATEGORIE_PRECONISATION . " AS RECOMMANDATION_CAT LEFT JOIN " . TABLE_PHOTO_LIAISON . " AS LINK_ELT_PIC ON ((LINK_ELT_PIC.idElement = RECOMMANDATION_CAT.id) AND (tableElement = '" . TABLE_CATEGORIE_PRECONISATION . "') AND (LINK_ELT_PIC.isMainPicture = 'yes')) LEFT JOIN " . TABLE_PHOTO . " AS PIC ON ((PIC.id = LINK_ELT_PIC.idPhoto)) WHERE RECOMMANDATION_CAT.status = 'valid' GROUP BY RECOMMANDATION_CAT.id", ""); $CategoryRecommandationList = $wpdb->get_results($query); return $CategoryRecommandationList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCategories();", "public function getCategories();", "public function getCategories(){\n\t\t$query = \"SELECT * FROM final_categoria\";\n\t\treturn $this->con->action($query);\n\t}", "public function getCategoryList()\n {\n// return $this->categoryList = DB::table('categories')->get();\n return $this->categoryList = Categories::all();\n }", "public function getRewardCategories()\r\n {\r\n return Controllers\\RewardCategories::getInstance();\r\n }", "public function get_category_list()\n\t{\n\t\t$result = $this->db->from(\"category\")\n\t\t->where(array(\"category_status\" => 1,\"main_category_id\"=>0))->orderby(\"category_name\",\"ASC\")->get();\n\t\treturn $result;\n\t}", "function category_list() {\n $query = $this->db->get(\"categories\");\n return $query->result_array();\n }", "public function get_category_list()\n\t{\n\t\t$result = $this->db->from(\"category\")->where(array(\"category_status\" => 1,\"main_category_id\"=>0))->orderby(\"category_name\",\"ASC\")->get();\n\t\treturn $result;\n\t}", "public function getCategoriesList() {\n return $this->_get(16);\n }", "public function get_category_list()\n\t{\n\t\t$result = $this->db->from(\"category\")\n\t\t\t\t\t\t->where(array(\"category_status\" => 1,\"main_category_id\"=>0))\n\t\t\t\t\t\t->orderby(\"category_name\", \"ASC\")\n\t\t\t\t\t\t->get();\n\t\treturn $result;\n\t}", "public function getCategory() {}", "public function getAllCategories(){\r\n\t\treturn $this->query(\"SELECT * FROM category\");\r\n\t}", "public function getCategoryList()\n {\n $this->db->select(\"tc_category\");\n $this->db->from(\"ims_hris.training_category\");\n $this->db->where(\"COALESCE(tc_status,'N') = 'Y'\");\n $this->db->order_by(\"1\");\n $q = $this->db->get();\n \n return $q->result_case('UPPER');\n }", "public function getCategory();", "public function getCategory();", "public function getCategoriesForListView(): Collection;", "public function getCategory()\n {\n }", "public function getAllCategories();", "public function getCategories() : array;", "public function getCategoryList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('tbl_category');\r\n\t\t$this->db->where(\"(category_parent_id = '' OR category_parent_id = '0')\");\r\n\t\t$this->db->where('category_status', '1');\r\n\t\t$this->db->where('category_type', 'Product');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}", "public function getCategoryList() {\n $categories = $this->couponServices_model->fetchCategories();\n\n $category_options = array();\n $category_options[\"\"] = \"-- Select category --\";\n foreach ($categories as $item) {\n $category_options[$item['categoryId']] = $item['categoryName'];\n }\n return $category_options;\n }", "function getCategorias(){\r\n $conector = new Conector();\r\n $banco = new BancoCategoria();\r\n return $banco->getCategorias($conector->getConexao());\r\n }", "function afficherCategories()\n\t{\n\t\t$sql=\"SElECT * From categorie\";\n\t\t$db = config::getConnexion();\n\t\ttry\n\t\t{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e)\n {\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function getList()\n {\n $categories = array();\n\n $q = $this->_db->query('SELECT * FROM categorie ORDER BY idCategorie');\n\n while ($donnees = $q->fetch(PDO::FETCH_ASSOC))\n {\n $categories[] = ($donnees);\n \n }\n }", "public function categories() {\n\t\treturn $this->terms('category');\n\t}", "public static function getCategories() {\n $top_level_cats = array();\n//Select all top level categories\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=0\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n foreach ($result as $cat) {\n $top_level_cats[] = array('id' => $cat->category_id,\n 'cat_name' => $cat->category,\n 'company_id' => $cat->company_id,\n 'status' => $cat->status,\n 'product_count' => $cat->product_count,\n 'is_op' => $cat->is_op,\n 'usergroup_ids' => $cat->usergroup_ids);\n }\n }\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "public function findCategories();", "public static function getActiveCategories(){}", "function getCategories(){\n\treturn dbSelect('categories');\n}", "function getDocumentCategories()\n\t{\n\t\tif(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');\n\t\t$module_srl = Context::get('module_srl');\n\t\t$categories= $this->getCategoryList($module_srl);\n\t\t$lang = Context::get('lang');\n\t\t// No additional category\n\t\t$output = \"0,0,{$lang->none_category}\\n\";\n\t\tif($categories)\n\t\t{\n\t\t\tforeach($categories as $category_srl => $category)\n\t\t\t{\n\t\t\t\t$output .= sprintf(\"%d,%d,%s\\n\",$category_srl, $category->depth,$category->title);\n\t\t\t}\n\t\t}\n\t\t$this->add('categories', $output);\n\t}", "public static function getCategories()\n {\n \t$query = \"SELECT * FROM categories\";\n \t$result = DB::select($query);\n\n \treturn $result;\n }", "function getAllCategories()\n {\n return $this->data->getAllCategories();\n }", "public function getCategories()\r\n {\r\n $this->db->query(\"SELECT * FROM categories\");\r\n\r\n $row = $this->db->resultset();\r\n\r\n //Check Rows\r\n return $row;\r\n }", "function categories(){\n return $this->db->get($this->categorie)->result();\n }", "function getCategories() {\n $this->db->select(\"*\");\n $query = $this->db->get('post_category');\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n return array();\n }", "function getAllCategories()\n {\n // Get list of categories using solr\n $metadataDao = MidasLoader::loadModel('Metadata')->getMetadata(MIDAS_METADATA_TEXT, \"mrbextrator\", \"category\");\n $enabledDao = MidasLoader::loadModel('Metadata')->getMetadata(MIDAS_METADATA_TEXT, \"mrbextrator\", \"slicerdatastore\");\n $terms = array(); \n if($metadataDao)\n {\n $db = Zend_Registry::get('dbAdapter');\n $results = $db->query(\"SELECT value, itemrevision_id FROM metadatavalue WHERE metadata_id='\".$metadataDao->getKey().\"' order by value ASC\")\n ->fetchAll();\n foreach($results as $result)\n {\n $arrayTerms = explode(\" --- \", $result['value']);\n foreach($arrayTerms as $term)\n { \n if(strpos($term, \"zzz\") === false) continue;\n $tmpResults = $db->query(\"SELECT value FROM metadatavalue WHERE itemrevision_id='\".$result['itemrevision_id'].\"' AND metadata_id='\".$enabledDao->getKey().\"' order by value ASC\")\n ->fetchAll();\n if(empty($tmpResults))continue;\n $term = trim(str_replace('zzz', '', $term));\n if(!isset($terms[$term]))\n {\n $terms[$term] = 0;\n }\n $terms[$term]++;\n }\n } \n }\n ksort($terms);\n return $terms;\n }", "public function category(){\n\t\t$query = $this->db->query(\"select * from `category` where status='enable'\");\n\t\treturn $query->result_array();\n\t}", "public function getCategorias() {\n $categorias=$this->db->query('SELECT * FROM categorias ORDER BY id DESC;');\n return $categorias;\n }", "function recharge_category() {\n\n\t\t$category = $this -> conn -> get_table_row_byidvalue('recharge_category', 'category_status', 1);\n\t\tforeach ($category as $key => $value) {\n\n\t\t\t$name = $value['category_name'];\n\t\t\t$category_id = $value['recharge_category_id'];\n\n\t\t\t$response[] = array('recharge_category_id' => $category_id, 'category_name' => $name);\n\t\t}\n\t\tif (!empty($response)) {\n\t\t\t$post = array(\"status\" => \"true\", \"message\" => $response);\n\t\t} else {\n\t\t\t$post = array('status' => \"false\", \"message\" => \"No Record Found\");\n\t\t}\n\n\t\techo $this -> json($post);\n\t}", "function afficherCategories2(){\n\t\t$sql=\"SElECT nom From categorie\";\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 static function categories() {\n $db = Db::getInstance();\n $req = $db->query('SELECT * FROM category');\n return $req->fetchAll(PDO::FETCH_ASSOC);\n }", "public function get_categories()\n {\n return ['careerfy'];\n }", "public function get_categories()\n {\n return ['careerfy'];\n }", "public function listCategories(){\n\t\t$lab = new lelabDB();\n\t\t$query = \"select * from $this->tableName order by id\";\n\t\t$result = $lab->getArray($query);\n\t\treturn $result;\n\t}", "function affichercategories(){\r\n\t\t$sql=\"SElECT * From categorie\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "public function getCategories()\n\t{\n\t\treturn BlogCategory::all();\t\n\t}", "public function categories()\n {\n return $this->apiResponse(Items::$categories, 2678400);\n }", "public function get(){\n\n $tabla = \"categorias\";\n \n $respuesta = ModeloCategorias::get($tabla);\n \n return $respuesta; \n }", "function faq_build_get_categories() { //retrieve all categories\n\tglobal $wpdb;\n\t$res = $wpdb->get_results(\"SELECT * FROM \".FAQBUILDDBCATEGORY.\" ORDER BY name ASC;\",ARRAY_A);\n\t$categories = array();\n\tif(is_array($res)) {\n\t\tforeach($res as $row) {\n\t\t\t$c = new FAQ_Build_Category();\n\t\t\tif($c->fromArray($row))\n\t\t\t\t$categories[] = $c;\n\t\t\telse\n\t\t\t\tunset($c);\n\t\t}\n\t}\n\treturn $categories;\n}", "public function getCategories()\n {\n return [ 'categories' => self::CATEGORIES ];\n }", "public function getCategories(){\n return Category::get();\n }", "public function getCategories()\n {\n return Category::all();\n }", "public function get_categories() {\n\t\treturn $this->terms('category');\n\t}", "function GetCategories()\n\t{\n\t\t$result = $this->sendRequest(\"GetCategories\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getCategories(){\n\t\t$stmt = $this->db->query(\"SELECT * FROM products_categories WHERE clientId = '{$this->clientId}'\");\n\t\treturn $stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function get_categories()\n {\n return ['general'];\n }", "public function get_categories()\n {\n return ['general'];\n }", "public function getCategories()\n {\n return $this->request(\"core_course_get_categories\");\n }", "public function getCategories()\n {\n $request = \"SELECT * FROM category\";\n $request = $this->connexion->query($request);\n $categories = $request->fetchAll(PDO::FETCH_ASSOC);\n return $categories;\n }", "function recharge_category() {\n\n\t\t$category = $this -> conn -> get_table_row_byidvalue('recharge_category', 'category_status', 1);\n\t\tforeach ($category as $key => $value) {\n\n\t\t\t$name = $value['category_name'];\n\t\t\t$category_id = $value['recharge_category_id'];\n\t\t\t\n\t\t\t$response[] = array('recharge_category_id' => $category_id, 'category_name' => $name);\n\t\t}\n\t\tif(!empty($response)){\n\t\t\t$post = array(\"status\" => \"true\",\"message\" => $response);\n\t\t}else{\n\t\t\t$post = array('status' => \"false\",\"message\" => \"No Record Found\");\n\t\t}\n\t\t\n\t\techo $this -> json($post);\n\t}", "public function ListarCategorias()\n{\n\tself::SetNames();\n\t$sql = \" select * from categorias\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "function getCategories() {\r\n\t\t$categories = $this->find('all');\r\n\t\t$result = array();\r\n\t\tforeach ($categories as $category) {\r\n\t\t\t$result[$category['NbCategory']['id']] = array(\r\n\t\t\t\t'probability' => $category['NbCategory']['probability'],\r\n\t\t\t\t'word_count' => $category['NbCategory']['word_count']\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "public function getCategoryList()\n {\n global $user;\n\n $returned=array();\n\n if($this->options['galleryRoot'])\n {\n $startLevel=1;\n }\n else\n {\n $startLevel=0;\n }\n\n $sql=\"SELECT DISTINCT pct.id, pct.name, pct.global_rank AS `rank`, pct.status\n FROM \".CATEGORIES_TABLE.\" pct \";\n\n switch($this->options['filter'])\n {\n case self::FILTER_PUBLIC :\n $sql.=\" WHERE pct.status = 'public' \";\n break;\n case self::FILTER_ACCESSIBLE :\n if(!is_admin())\n {\n $sql.=\" JOIN \".USER_CACHE_CATEGORIES_TABLE.\" pucc\n ON (pucc.cat_id = pct.id) AND pucc.user_id='\".$user['id'].\"' \";\n }\n else\n {\n $sql.=\" JOIN (\n SELECT DISTINCT pgat.cat_id AS catId FROM \".GROUP_ACCESS_TABLE.\" pgat\n UNION DISTINCT\n SELECT DISTINCT puat.cat_id AS catId FROM \".USER_ACCESS_TABLE.\" puat\n UNION DISTINCT\n SELECT DISTINCT pct2.id AS catId FROM \".CATEGORIES_TABLE.\" pct2 WHERE pct2.status='public'\n ) pat\n ON pat.catId = pct.id \";\n }\n\n break;\n }\n $sql.=\"ORDER BY global_rank;\";\n\n $result=pwg_query($sql);\n if($result)\n {\n while($row=pwg_db_fetch_assoc($result))\n {\n $row['level']=$startLevel+substr_count($row['rank'], '.');\n\n /* rank is in formated without leading zero, giving bad order\n * 1\n * 1.10\n * 1.11\n * 1.2\n * 1.3\n * ....\n *\n * this loop cp,vert all sub rank in four 0 format, allowing to order\n * categories easily\n * 0001\n * 0001.0010\n * 0001.0011\n * 0001.0002\n * 0001.0003\n */\n $row['rank']=explode('.', $row['rank']);\n foreach($row['rank'] as $key=>$rank)\n {\n $row['rank'][$key]=str_pad($rank, 4, '0', STR_PAD_LEFT);\n }\n $row['rank']=implode('.', $row['rank']);\n\n $row['name']=GPCCore::getUserLanguageDesc($row['name']);\n\n $returned[]=$row;\n }\n }\n\n if($this->options['galleryRoot'])\n {\n $returned[]=array(\n 'id' => 0,\n 'name' => l10n('All the gallery'),\n 'rank' => '0000',\n 'level' => 0,\n 'status' => 'public',\n 'childs' => null\n );\n }\n\n usort($returned, array(&$this, 'compareCat'));\n\n if($this->options['tree'])\n {\n $index=0;\n $returned=$this->buildSubLevel($returned, $index);\n }\n else\n {\n //check if cats have childs & remove rank (enlight the response)\n $prevLevel=-1;\n for($i=count($returned)-1;$i>=0;$i--)\n {\n unset($returned[$i]['rank']);\n if($returned[$i]['status']=='private')\n {\n $returned[$i]['status']='0';\n }\n else\n {\n $returned[$i]['status']='1';\n }\n\n if($returned[$i]['level']>=$prevLevel)\n {\n $returned[$i]['childs']=false;\n }\n else\n {\n $returned[$i]['childs']=true;\n }\n $prevLevel=$returned[$i]['level'];\n }\n }\n\n return($returned);\n }", "public function get_categories () {\n\t\treturn Category::all();\n\t}", "function Categories() {\n\t\treturn DataObject::get('categoryobject', '', 'Title');\n\t}", "function get_cat() {\r\n \r\n $query = $this->db->get('categories');\r\n return $query->result_array();\r\n }", "public function getallCategories(){\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->select = '*';\n\t \treturn $terms = NeCategory::model()->findAll($criteria);\n\t}", "public static function getCategoriaLista() {\n $dni=Yii::$app->user->identity->id;\n $droptions = Categoria::find()->where(['id_profesor_titular'=>$dni])->orWhere(['id_profesor_titular'=>$dni])->asArray()->all();\n return ArrayHelper::map($droptions, 'id_categoria', 'nombre_categoria');\n }", "public function get_categories() {\n\t\treturn [ 'happyden' ];\n\t}", "public function getAllCategoriesPro()\n {\n // $this->db->from('category');\n // $query=$this->db->get();\n // return $query->result();\n return $this->db->get('category')->result();\n }", "public function getCategories() {\n $sql = \"SELECT * FROM categories\";\n //Commit the query\n $result = $this->connection->query($sql);\n //Parse result to JSON list\n $answer = '{\"categories\": [';\n if ($result->num_rows > 0) {\n // output data of each row\n while($row = $result->fetch_assoc()) {\n $answer = $answer . '{\"ID\":\"' . $row[\"category_ID\"] . '\",' .\n '\"Name\": \"' . $row[\"category_Name\"] .'\"},' ;\n }\n //Trim the last comma\n $answer=rtrim($answer,\", \");\n //Finish parsing\n $answer=$answer . \"]}\";\n //Retrun the list as a string\n return $answer;\n } else {\n echo \"0 results\";\n }\n\n\n }", "function getCategoryList($module_srl, $columnList = array())\n\t{\n\t\t// Category of the target module file swollen\n\t\t$filename = sprintf(\"%sfiles/cache/document_category/%s.php\", _XE_PATH_, $module_srl);\n\t\t// If the target file to the cache file regeneration category\n\t\tif(!file_exists($filename))\n\t\t{\n\t\t\t$oDocumentController = getController('document');\n\t\t\tif(!$oDocumentController->makeCategoryFile($module_srl)) return array();\n\t\t}\n\n\t\tinclude($filename);\n\n\t\t// Cleanup of category\n\t\t$document_category = array();\n\t\t$this->_arrangeCategory($document_category, $menu->list, 0);\n\t\treturn $document_category;\n\t}", "function getAllCategories() {\n\t\t$url = $this->apiURL . \"categories/\" . $this->yourID . \"/\" . $this->yourAPIKey;\n\t\treturn $this->_curl_get($url);\n\t}", "public function getCategory(){\n\t\t$stmt = $this->bdd->prepare('SELECT * FROM categorie');\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll();\n\t}", "function getCategory(){\n\t\t\t$data = array(); \n\t\t\t$query = \"select * from packages_category\";\n\t\t\t$result = mysql_query($query);\n\t\t \n\t\t\tif($result){\n\t\t\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t\t\tarray_push($data,$row);\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t}else{\n\t\t\t\tdie(\"error in mysql query \" . mysql_error());\n\t\t\t}\n\t\t}", "public function get_categories() {\n\t\treturn array( 'listeo' );\n\t}", "public static function getCategoryOptions()\n {\n return self::get('category') ?: [];\n }", "public function getCategoryList()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t// sql\n\t\t\t$category = D('Category');\n\t\t\t$sql = \"SELECT * FROM lib_category;\";\n\t\t\t$return = $category->query($sql);\n\t\t\t$result = array();\n\t\t\tfor ($k = 0; $k < count($return); $k++) {\n\t\t\t\tarray_push($result, $return[$k]['category']);\n\t\t\t}\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'data' => json_encode($return),\n\t\t\t\t\t'cat' => json_encode($result)\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'SQL Error!'\n\t\t\t\t));\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function get_new_list_category($category){\t\n\t $results=array();\n\t if($category!='')\n\t\t{\n\t\t\t$category=explode(',',$category);\n\t\t\t$category=array_filter($category);\n\t\t $category=array_unique($category);\n\t\t\t$category=implode(',',$category);\n\t\t\t$this->db->select('categories.id,categories.name');\n\t\t\t$this->db->where('categories.is_active','1');\n\t\t\t$this->db->where('categories.id IN('.$category.')');\n\t\t\t$this->db->limit('10');\n\t\t\t$this->db->order_by('categories.name','ASC');\n\t\t\t$this->db->from('categories');\n\t\t\t$query = $this->db->get();\t\t\t\n\t\t\t$results=$query->result_array();\t\t\n\t\t}\n\t\treturn $results;\n\t}", "public function categoryList()\n {\n return view(\"Category::list\");\n }", "public function GetCategories() {\n // Setup the Query\n $this->sql = \"SELECT *\n FROM categories\";\n \n // Run the query \n $this->RunBasicQuery();\n }", "public function listattr_cat()\n {\n $this->db->where('descripcion_atributo', 'Catalogo');\n $resultados = $this->db->get('atributos_b');\n\n return $resultados->result();\n }", "public function getCat()\n {\n $query = $this->db->get('categories');\n\n return $query->result();\n }", "public function category()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->pro->prifix.$this->pro->category);\n\t\t$this->db->order_by($this->pro->category.'_id','desc');\n\t\t$this->db->where($this->pro->category.'_status','1');\n\t\t$this->db->where($this->pro->category.'_parent',0);\n\t\t$rs = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $rs->result_array();\n\t\t\n\t}", "public function getCategories(){\n\t\t// preapres the request\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: ' . TOKEN));\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://\" . IP . \"/bde_site/api/category/\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n\t\t// send the request\n\t\t$output = curl_exec($ch);\n\t\t$info = curl_getinfo($ch);\n\t\tcurl_close($ch);\n\n\t\t// decode the answer into a php object\n\t\t$categories = json_decode($output, true);\n\n\t\treturn $categories;\n\t}", "public function categories()\n {\n // Cache results\n static $categories;\n\n if ($categories) {\n return $categories;\n }\n\n $app = \\Slim\\Slim::getInstance();\n $dataMapper = $app->dataMapper;\n $CategoryMapper = $dataMapper('CategoryMapper');\n\n return $categories = $CategoryMapper->getAllCategories();\n }", "public static function getCategoriesListAdmin(){\n\n //Подключаемся к БД:\n $db = DB::getConnection();\n\n $categoruList = array();\n\n $sql = 'SELECT id, name, sort_order, status FROM category '\n . 'ORDER BY sort_order ASC';\n\n //dd($sql);\n\n $result = $db->query($sql);\n\n $i = 0;\n\n while($row = $result->fetch()){\n $categoruList[$i]['id'] = $row['id'];\n $categoruList[$i]['name'] = $row['name'];\n $categoruList[$i]['sort_order'] = $row['sort_order'];\n $categoruList[$i]['status'] = $row['status'];\n $i++;\n }\n\n return $categoruList;\n\n }", "public function get_category()\n\t{\n\t\tglobal $module_name, $nv_Cache;\n\n\t\t$category = array();\n\n\t\t$sql = \"SELECT * FROM \" . $this->table_prefix . \"_category ORDER BY weight ASC\";\n\t\t$result = $this->db_cache( $sql, 'id', $module_name );\n\n\t\t$category[0] = array(\n\t\t\t'id' => 0,\n\t\t\t'title' => $this->lang('unknow'),\n\t\t\t'keywords' => '',\n\t\t\t'description' => ''\n\t\t);\n\n\t\tif( ! empty( $result ) )\n\t\t{\n\t\t\tforeach( $result as $row )\n\t\t\t{\n\t\t\t\t$category[$row['id']] = array(\n\t\t\t\t\t'id' => $row['id'],\n\t\t\t\t\t'title' => $row['title'],\n\t\t\t\t\t'keywords' => $row['keywords'],\n\t\t\t\t\t'description' => $row['description']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $category;\n\t}", "function all_category() {\n\n $query = $this->db->get('tbl_category');\n return $query->result_array();\n }", "public function getCategoryList(){\n\t\t$recordLimit = Input::get('limit');\n\t\t$recordLimit = (!empty($recordLimit) && in_array($recordLimit, parent::$pagination_limits)) ? \n\t\t\t$recordLimit : parent::recordLimit;\n\t\t\t\n\t\t$colors = $this->shift->getCategoryColors();\n\t\t$categories = $this->shift->getCategories(null, $recordLimit == 'all' ? null : $recordLimit);\n\t\t\n\t\treturn View::make('admin.shifts.list_category')\n\t\t\t->withColors($colors)\n\t\t\t->withCategories($categories)\n\t\t\t//->withRecordlimit(parent::recordLimit);\n\t\t\t->withRecordlimit($recordLimit);\n\t}", "public function get_categories() {\n return array ( 'general' );\n }", "public static function getCategoriesList(){\n\n //Подключаемся к БД:\n $db = DB::getConnection();\n\n $categoruList = array();\n\n $sql = 'SELECT id, name FROM category '\n . ' WHERE status = \"1\" '\n . 'ORDER BY sort_order ASC';\n\n //dd($sql);\n\n $result = $db->query($sql);\n\n\n $i = 0;\n\n while($row = $result->fetch()){\n $categoruList[$i]['id'] = $row['id'];\n $categoruList[$i]['name'] = $row['name'];\n $i++;\n }\n\n return $categoruList;\n\n }", "public function getAllWithCategory();", "public function listCategories()\n {\n $categories = Category::all();\n\n return $categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }" ]
[ "0.7073164", "0.7073164", "0.70191187", "0.6952801", "0.6952469", "0.6925243", "0.69237745", "0.691156", "0.6873652", "0.68731844", "0.68014926", "0.6720509", "0.67117107", "0.6695676", "0.6695676", "0.6617632", "0.66162014", "0.66094625", "0.65975153", "0.65836245", "0.65781736", "0.65739214", "0.65715456", "0.6570649", "0.65603954", "0.65437615", "0.6540404", "0.652218", "0.6517411", "0.6512365", "0.65090275", "0.64879286", "0.64870566", "0.6484202", "0.64722395", "0.646807", "0.64662343", "0.64629596", "0.64615875", "0.64607406", "0.64531666", "0.6450142", "0.6450142", "0.64497733", "0.6448279", "0.6446789", "0.6443452", "0.6425729", "0.64235824", "0.6402178", "0.6399511", "0.63858235", "0.6383369", "0.63802606", "0.6379734", "0.63681084", "0.63681084", "0.636647", "0.6365907", "0.6362731", "0.63606584", "0.63454807", "0.6345458", "0.6343169", "0.6342941", "0.633816", "0.6332997", "0.6331582", "0.6330499", "0.6320007", "0.6319909", "0.63143796", "0.63123286", "0.6306217", "0.6306106", "0.63043743", "0.63027996", "0.6302731", "0.6300868", "0.63002497", "0.62933105", "0.6278301", "0.6275621", "0.62746125", "0.62670875", "0.6263473", "0.6262954", "0.62623906", "0.6257896", "0.62529296", "0.6250875", "0.6245763", "0.62438804", "0.6235187", "0.6230927", "0.6230927", "0.6230927", "0.6230927", "0.6230927", "0.6230927" ]
0.76744723
0
Get Match Now Title
Получить матч сейчас
public function getMatchNowTitle() { return $this->getData('match_now_title'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function rep_title_callback($match) {\r\n\t\t\r\n\t\t$query = substr($match[0],3,-3);\t\t\r\n\t\t$title = '<h2>'.$query.'</h2>';\r\n\t\treturn $title;\r\n\t\t\r\n\t}", "private function titleGuess(): string {\n $collaboration = $this->containsCollaboration($this->title);\n return $collaboration;\n }", "private function getTalkTitle()\n {\n $html = getSimpleHTMLDOMCached($this->getInput('url'));\n $title = $html->find('h1[class=thread-title]', 0)->plaintext;\n return $title;\n }", "function get_the_title() {\n\n md_get_the_title();\n \n }", "public function get_title();", "public function get_title() {\n\t\treturn __( 'Team', 'qazana' );\n\t}", "public function current_title()\n\t{\n\t\treturn $this->CLI->stringQuery($this->SqueezePlyrID.\" current_title ?\");\n\t}", "public function getMatch(): string\n {\n return $this->match;\n }", "public function getOriginalTitle() {\n $result = TingOpenformatMethods::parseFields($this->_getDetails(), array('originalTitle' => array('originalTitleHeader' => 'header', \"originalTitleElement\")));\n return (is_array($result)) ? reset($result) : $result;\n }", "public function get_title () {\r\n\t\treturn $this->get_info()['title'];\r\n\t}", "public function getTitleFromDisplayPattern()\n {\n $formattedTitle = $this->getName();\n \n return $formattedTitle;\n }", "function extract_title_from_wiki_text($text)\n{\n if (preg_match(\"/--- DIVISION TITLE ---\\s*(.*)\\s*--- MOTION EFFECT/s\", $text, $matches)) {\n $title = $matches[1];\n }\n $title = trim(strip_tags($title));\n $title = str_replace(\" - \", \" &#8212; \", $title);\n return $title;\n}", "function return_title($source) {\r\n preg_match('@((<title\\s*)([a-zA-Z]+=(\"|\\')?[a-zA-Z0-9_-]*(\"|\\')?\\s*)*\\>)([a-zA-Z0-9()-_\\s.:|&#;]*)(</title>)@',$source, $output);\r\n\treturn html_entity_decode(strip_tags(trim($output[0])));\r\n}", "public function title() {\r\n\t\treturn trim(strtok($this->_content, \"\\n\"));\r\n\t}", "public function getTitle(){\n return $this->film['title'];\n }", "public function title()\n\t{\n\t\treturn $this->CLI->stringQuery($this->SqueezePlyrID.\" title ?\");\n\t}", "private function get_title( $html ) {\n\t\t$pattern = '#<title[^>]*>(.*?)<\\s*/\\s*title>#is';\n\t\tpreg_match( $pattern, $html, $match_title );\n\n\t\tif ( empty( $match_title[1] ) || ! is_string( $match_title[1] ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$title = trim( $match_title[1] );\n\n\t\treturn $this->prepare_metadata_for_output( $title );\n\t}", "public function getMovieTitle() {\n\t\treturn ($this->movieTitle);\n\t}", "public function getMetaTitle() {\n\t\t$title = $this->data()->getTitle();\n\t\t$filter = $this->FilterDescription();\n\t\tif($filter) {\n\t\t\t$title = \"{$title} - {$filter}\";\n\t\t}\n\n\t\t$this->extend('updateMetaTitle', $title);\n\t\treturn $title;\n\t}", "public function getMetaTitle();", "function regexgettitle($text, $rule=''){\n\t\t\t\t\t\t\t\t//make sure we call regexnoweirdwhite first on the text\n\t\t\t\t\t\t\t\t//regexnoweirdwhite removes spaces from around the < and > characters\n\t\t\t\t\t\t\t\t//regexnoweirdwhite also makes all runs of white spaces including breaks and nbsps into single spaces\n\t$regex_pattern=\"/<title\\s?[^>]*>(.+?)<\\/\\s?title>/i\";\t//will search for anything between and including the title tags (text insensitive)\n\t\t\t\t\t\t\t\t\t\t\t\t//the period followed by the plus will match any number of any characters\n\t\t\t\t\t\t\t\t\t\t\t\t//placing it within the parentheses will allow us to get just the title without grabbing the tags too\n\t$title=\"\";\n\tif(preg_match($regex_pattern,$text,$match))$title=$match[1];\n\t//get rid of unneeded spaces\n\t$title=regexspacecleaner($title);\n\treturn $title;\t\n}", "public function getTitle() {\n\t\t$titles = array(\n\t\t\t'CEO',\n\t\t\t'Assistant Regional Manager',\n\t\t\t'Champion of Light',\n\t\t\t'Usurper Lord',\n\t\t\t'Overlord Maximus',\n\t\t\t'Shadowpuppet Master',\n\t\t);\n\t\t$index = mt_rand(0, count($titles) - 1);\n\t\treturn $titles[$index];\n\t}", "public function computedTitle();", "public function getMatch();", "function getTitle() ;", "public function getTitleFromDisplayPattern()\n {\n $formattedTitle = ''\n . $this->getEventTitle();\n \n return $formattedTitle;\n }", "public function getTitle(){\n\t\t$title = $this->TitleText;\n\t\tif($title == ''){\n\t\t\t$title = \"New state\";\n\t\t}\n\n\t\t$textObj = new Text('TitleText');\n\t\t$textObj->setValue($title);\n\t\treturn $textObj->LimitWordCount(10);\n\t}", "public function getAlternativeTitle() {\n $result = TingOpenformatMethods::parseFields($this->_getDetails(), array('alternativeTitle' => array('alternativeTitleDescriptor' => 'header', \"alternativeTitle\")));\n return $result;\n }", "public function getTitle(): string\n {\n return $this->title ?? $this->name;\n }", "public function getTitle()\n {\n return round($this->getTimeDiff()*1000, 3).' ms';\n }", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "function getTitle($url) {\n $str = file_get_contents($url);\n /* RegEx erzeugt ein Array in dem Der Seitentitel auf Index 1 liegt */\n preg_match('/\\<title\\>(.*)\\<\\/title\\>/', $str, $title);\n /* Seitentitel aus Index 1 zurückgeben */\n return $title[1];\n }", "public function get_title() {\n\t\treturn $this->format_string( $this->title );\n\t}", "private function _generateTitle()\n {\n $title = '';\n foreach ($this->_contents as $content)\n {\n $title = ('' == $title) ? $content->myGetSeoTitleTag() : $content->myGetSeoTitleTag().' | '.$title;\n }\n return $title;\n }", "function get_title()\n {\n }", "protected function getTitle() {\n\t\t$result = $this->overlayFile->getProperty('title');\n\t\tif (empty($result)) {\n\t\t\t$result = $this->overlayFile->getName();\n\t\t}\n\t\treturn htmlspecialchars($result);\n\t}", "function the_title() {\n\tglobal $discussion;\n\treturn $discussion['title'];\n}", "public function getTitle() {\n\t\treturn $this->title;\t\n\t}", "public static function title();", "function charity_is_hope_team_get_stream_page_title($title, $page) {\n\t\tif (!empty($title)) return $title;\n\t\tif (charity_is_hope_strpos($page, 'team')!==false) {\n\t\t\tif (($page_id = charity_is_hope_team_get_stream_page_id(0, $page=='team' ? 'blog-team' : $page)) > 0)\n\t\t\t\t$title = charity_is_hope_get_post_title($page_id);\n\t\t\telse\n\t\t\t\t$title = esc_html__('All team', 'trx_utils');\t\t\t\t\n\t\t}\n\t\treturn $title;\n\t}", "private static final function getPageTitle () {\r\n // Execute the <title tag> .tp file;\r\n $webHeaderString = new FileContent (FORM_TP_DIR . _S . 'frm_web_header_title.tp');\r\n return $webHeaderString->doToken ('[%TITLE_REPLACE_STRING%]',\r\n implode (_DCSP, ((self::$objPageTitleBackward->toInt () == 1) ? (self::$objPageTitle->arrayReverse ()->toArray ()) :\r\n self::$objPageTitle->toArray ())));\r\n }", "public function title(): string {\n\t\treturn $this->m_title;\n\t}", "public function displayCurrentTitle()\n {\n $entry = $this->getEntry();\n if ($entry) {\n return $entry->displayCurrentTitle();\n }\n }", "function getTitle(&$record) {\n\t\t$parsedContents =& $record->getParsedContents();\n\t\tif (isset($parsedContents['title'])) {\n\t\t\treturn array_shift($parsedContents['title']);\n\t\t}\n\t\treturn null;\n\t}", "function wruv_streamtitle($ts) {\n\t$onair = wruv_sched_slot($ts);\n\treturn wruv_streamtitle_str( $onair );\n\n}", "protected function getTitle() {\r\n\t\treturn $this->newsItem->getTitle();\r\n\t}", "public function title(){\n if (func_num_args() > 0){\n $this->title = func_get_arg(0);\n }\n \n return $this->title;\n }", "public function get_title() {\n return __( 'Video CTA', 'yx-super-cat' );\n }", "protected function getAlternativeTitle() {\r\n\t\treturn $this->newsItem->getAlternativeTitle();\r\n\t}", "private function getTitle(): string\n {\n /**\n * This is the title being overwritten by a middleware, view\n * composer, etc. by using the share() method.\n */\n $metaTitle = $this->context->get('__env')->shared('meta_title') ?? '';\n\n if (! $metaTitle) {\n if (! $this->context->get('is_term')) {\n $metaTitle = $this->augmented($this->context->get('meta_title'));\n }\n\n $metaTitle = $metaTitle ?? config('findable.default_meta_title');\n }\n\n $parsedTitle = $this->parseMergeTags($metaTitle);\n $parsedTitle = trim($parsedTitle, ' |');\n\n // Use regular title as fallback if the parsed is empty.\n return $parsedTitle ?? $this->augmented($this->context->get('title'));\n }", "public function get_title()\n\t{\n\t\treturn $this->title;\n\t}", "function wruv_current_streamtitle() {\n\t$onair = wruv_current_sched_slot();\n\treturn wruv_streamtitle_str( $onair );\n\n}", "function title($title) {\r\n\t\tif (!defined('IS_UWR1RESULTS_VIEW')) {\r\n\t\t\treturn $title;\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$view = Uwr1resultsController::WhichView();\r\n\t\tif ('index' == $view) {\r\n\t\t\t$title = 'Unterwasserrugby Liga Ergebnisse der Saison '.$season;\r\n\t\t} else if ('league' == $view) {\r\n\t\t\t$title = 'Ergebnisse der ' . Uwr1resultsModelLeague::instance()->name() . ' (Saison ' . $season . ')';\r\n\t\t} else if ('tournament' == $view) {\r\n\t\t\t$title = 'Ergebnisse des UWR Turniers ' . Uwr1resultsModelLeague::instance()->name();\r\n\t\t}\r\n\t\treturn $title;\r\n\t}", "public function getTitle()\r\n {\r\n return $this->m_title;\r\n }", "public function getTitle() {\r\n\t\treturn $this->title;\r\n\t}", "public function title_for_discovery() {\n\n\t\t$podcast = Podcast::get_instance();\n\n\t\t$media_location = $this->media_location();\n\n\t\tif ( ! $media_location )\n\t\t\treturn $this->name;\n\n\t\t$media_format = $media_location->media_format();\n\n\t\tif ( ! $media_format )\n\t\t\treturn $this->name;\n\n\t\t$file_extension = $media_format->extension;\n\n\t\t$title = sprintf( __( 'Podcast Feed: %s (%s)', 'podcast' ), $podcast->title, $this->name );\n\t\t$title = apply_filters( 'podlove_feed_title_for_discovery', $title, $this->title, $file_extension, $this->id );\n\n\t\treturn $title;\n\t}", "private function getTitle($deal)\n {\n $titleRoot = $deal->find('div[class*=threadGrid-title]', 0);\n $titleA = $titleRoot->find('a[class*=thread-link]', 0);\n $titleFirstChild = $titleRoot->first_child();\n if ($titleA !== null) {\n $title = $titleA->plaintext;\n } else {\n // In some case, expired deals have a different format\n $title = $titleRoot->find('span', 0)->plaintext;\n }\n\n return $title;\n }", "function title( &$contentObjectAttribute )\r\n {\r\n $classAttribute =& $contentObjectAttribute->contentClassAttribute();\r\n $classContent = $classAttribute->content();\r\n $content = $contentObjectAttribute->content();\r\n $index = \"\";\r\n\r\n if( is_array( $classContent['pattern_selection'] ) and count( $classContent['pattern_selection'] ) > 0 )\r\n {\r\n $res = @preg_match( $classContent['regexp'], $content, $matches );\r\n\r\n if( $res !== false )\r\n {\r\n foreach( $classContent['pattern_selection'] as $patternIndex )\r\n {\r\n if( isset( $matches[$patternIndex] ) )\r\n {\r\n $index .= $matches[$patternIndex];\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n $index = $content;\r\n }\r\n\r\n return $index;\r\n }", "static function get_title($data_title){\r\n\r\n if(empty($data_title)) {\r\n return;\r\n }\r\n\r\n //explode after 'playlist_title'\r\n $explode_playlist_title = explode('playlist_title', $data_title);\r\n\r\n //get the title\r\n preg_match('/\\\"(.*?)\\\\\"/', $explode_playlist_title[1], $maches_title);\r\n\r\n //if the title is empty there will be only an \\ at the end\r\n if(empty($maches_title[1]) or $maches_title[1] == '\\\\') {\r\n return '';\r\n }\r\n\r\n //check the last chart in the title, could be \\\r\n if(substr($maches_title[1], -1, 1) == '\\\\') {\r\n $maches_title[1] = substr($maches_title[1], 0, -1);\r\n }\r\n\r\n //remove spaces\r\n if(!empty($maches_title[1])) {\r\n return trim(str_replace(array('&nbsp;'),array(''), htmlentities($maches_title[1], ENT_QUOTES)));//trim just in case\r\n } else {\r\n return '';\r\n }\r\n\r\n }", "function getTitle(&$record){\n $type = array('H' => 'Hydrological Station', 'M'=>'Meteorological Station');\n $title = \"\".$type[$record->val('type_station')].\" - id: \".$record->val('id_station');\n \n return $title;\n }", "public function getTitle()\n\t{\n\t\t$content = $this->getContent();\n\t\treturn $content->title;\n\t}", "public function getTitle()\n {\n\t\treturn $this->title;\n\t}", "public function getTitle()\n {\n return ts('Preview');\n }", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle(): string {\n\t\treturn $this->title;\n\t}", "function get_page_title($str) {\n if (strlen($str)>0) {\n $str = trim(preg_replace('/\\s+/', ' ', $str));\n preg_match(\"/\\<title\\>(.*)\\<\\/title\\>/i\",$str,$title);\n \n return trim($title[1]);\n }\n}", "function get_title($url){\n\t$str = file_get_contents($url);\n\tif(strlen($str)>0){\n\t\t$str = trim(preg_replace('/\\s+/', ' ', $str)); // supports line breaks inside <title>\n\t\tpreg_match(\"/\\<title\\>(.*)\\<\\/title\\>/i\",$str,$title); // ignore case\n\t\treturn $title[1];\n\t}\n}", "function getTitle();", "function getTitle();", "function get_title() \t{\n \t\treturn $this->title;\t\n \t}", "public function gettitle()\n {\n return $this->title;\n }", "public function title()\n\t{\n\t\treturn $this->title;\n\t}", "private function retrieve_title() {\n\t\t$replacement = null;\n\n\t\tif ( is_string( $this->args->post_title ) && $this->args->post_title !== '' ) {\n\t\t\t$replacement = stripslashes( $this->args->post_title );\n\t\t}\n\n\t\treturn $replacement;\n\t}", "public function title()\n {\n return $this->{static::$title};\n }", "public function title() {\n\t\tif ( ! is_object( $this->object ) ) {\n\t\t\treturn esc_html__( 'Page not found', 'nhg-seo' );\n\t\t}\n\n\t\t$title = Strategy::get_from_meta( 'post', $this->object->ID, $this->object, 'title' );\n\t\tif ( \\is_string( $title ) && '' !== $title ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\treturn Strategy::get_title( 'post', $this->object->post_type, $this->object );\n\t}", "public function title() { \n $title = $this->content()->get('title');\n if($title != '') {\n return $title;\n } else {\n $title->value = $this->uid();\n return $title;\n }\n }", "public function getTitle()\n {\n return $this->title = $this->get()->post_title;\n }", "public function get_title()\n {\n }", "public function get_title()\n {\n }", "public function getTitle(): string\n\t{\n\t\treturn $this->title;\n\t}", "function wpvideocoach_custom_title()\r\n{\r\n\tglobal $wpvideocoach_custom_title;\r\n\tif(empty($wpvideocoach_custom_title)){\r\n\t\t$wpvideocoach_custom_title = __('WordPress Video Coach', 'wp-video-coach');\r\n\t}\r\n\treturn $wpvideocoach_custom_title;\r\n}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}" ]
[ "0.73566365", "0.7144896", "0.670221", "0.66354424", "0.64411277", "0.64210975", "0.63641554", "0.63528347", "0.62879276", "0.627547", "0.6252517", "0.624463", "0.6240199", "0.6239946", "0.62379575", "0.62182564", "0.62112147", "0.6208389", "0.6202894", "0.6190242", "0.6188978", "0.617557", "0.61703205", "0.6163746", "0.6163128", "0.6154874", "0.61418134", "0.6140591", "0.6137833", "0.61292636", "0.61234856", "0.61234856", "0.61234856", "0.61234856", "0.61234856", "0.61234856", "0.61234856", "0.61234856", "0.61234856", "0.61234856", "0.61234856", "0.61234856", "0.61234856", "0.61234856", "0.61234856", "0.61230457", "0.61217165", "0.61118174", "0.6108989", "0.60824335", "0.60648155", "0.60290843", "0.6022708", "0.6020181", "0.6014923", "0.60126114", "0.6011935", "0.6005731", "0.5997671", "0.59972304", "0.5988199", "0.5984106", "0.5978091", "0.59723526", "0.5965629", "0.59584117", "0.5955964", "0.59528387", "0.5947852", "0.59474945", "0.5944983", "0.594426", "0.5944228", "0.5943012", "0.59420305", "0.5940021", "0.5935871", "0.59310365", "0.59310365", "0.59310365", "0.59310365", "0.5923614", "0.5916034", "0.59146607", "0.59139585", "0.59139585", "0.59128493", "0.59118986", "0.5909617", "0.59088796", "0.59087867", "0.5908088", "0.5903918", "0.58940554", "0.5893831", "0.5893331", "0.588797", "0.58873916", "0.5884669", "0.5884669" ]
0.85028267
0
Get Match Now Url
Получить URL матча сейчас
public function getMatchNowUrl() { return $this->getData('match_now_url'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCurrentUrlFromRoutes()\n {\n $input = &SGL_Registry::singleton();\n $url = $input->getCurrentUrl();\n $currUrl = $url->toString();\n $baseUrl = $url->getBaseUrl($skipProto = false, $includeFc = false);\n return str_replace($baseUrl, '', $currUrl);\n }", "public function getRegexurl() {\n }", "public function get_url();", "protected function getApiUrl(): string\n {\n return preg_replace($this->regexPattern,$this->currencyDate,$this->apiEndpoint);\n }", "public function getCurrentUrl();", "function get_twitch_url($api) {\n $url = null;\n\n $data = file_get_contents($api);\n $json = json_decode($data, TRUE);\n\n foreach($json['videos'] as $key => $val) {\n $rec_date_arr = getdate(strtotime($val['recorded_at']));\n $rec_date = str_pad($rec_date_arr['mon'], 2, \"0\", STR_PAD_LEFT) . \"/\"\n . str_pad($rec_date_arr['mday'], 2, \"0\", STR_PAD_LEFT) . \"/\"\n . $rec_date_arr['year'];\n\n if ($val['game'] == 'Spelunky' && $rec_date == date('m/d/Y')) {\n $url = $val['url'] . \"\\n\";\n }\n }\n\n return $url;\n }", "protected static function get_new_url()\n {\n return parse_url($_SERVER['REQUEST_URI'])['path'] . '?' . $_SERVER['QUERY_STRING'];\n }", "function formatCurrentUrl() ;", "abstract public function get_url_update();", "static function obtenerUrlActual() {\n $url = Util::crearUrl($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n return $url;\n }", "public static function getBNETHistoryURL($url)\r\n\t{\r\n\t\treturn $url . 'matches';\r\n\t}", "public static function getRequestedURL()\n {\n return self::getInstance()->requestedUrl;\n }", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function url()\n {\n return explode('?' ,$this->uri)[0];\n }", "public function getShopNowUrl()\n {\n return $this->getData('show_now_url');\n }", "protected function get_url()\n {\n return $this->base_url + $this->api_version; \n }", "public function getUrl()\n {\n return $this->lastUrl;\n }", "function get_trackback_url()\n {\n }", "public static function getThisUrl() {}", "public function getURL();", "public function getURL();", "private function getVideoTutorialsUrl() {\n\t\t\treturn apply_filters('gsf-video-tutorials-url','#');\n\t\t}", "public function getURL ();", "public function url()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse\n\t\t{\n\t\t\t$url = $this->generateString();\n\t\t\treturn htmlentities( $url );\n\t\t}\n\t}", "function GetPrewURI() /*added 16_05*/\n\t\t{\n\t\tif($this->history[count($this->history)-1])\n\t\t\t$ret = $this->history[count($this->history)-1];\n\t\telse\n\t\t\t$ret = $_SERVER['SERVER_NAME'];\n//\t\treturn $this->history[count($this->history)-1]; \n\t\treturn $ret;\n\t\t}", "public function getRegistrationCompareUrl () {\n\t $date = date('Y-m-d H:i:s', $this->regisrtime);\n\t $date = urlencode($date);\n return 'http://'.$_SERVER['HTTP_HOST'].'/users/confirmregistration/?date='.$date.'&id='.$this->id.'&code='.$this->getRegistrationCode();\n }", "public function getMatch();", "protected function getUrl(){\n\n\t\t//retornando a url aonde o usuario está\n\t\treturn parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n\n\t}", "public function getSuccessUrl();", "abstract public function getRouteMatch();", "public function getRouteMatch();", "public function getTakeUrl() { }", "abstract public function getCallUrl();", "public function getFailureUrl();", "public function getLastPageUrl();", "protected function url()\n\t{\n\t\treturn Phpfox::getLib('url');\t\n\t}", "protected function getUrl() {\n\t\treturn $this->getQueryParam ( self::URL_PARAM );\n\t}", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function url();", "public function url();", "public function url();", "public function getUrl()\n {\n return $this->createUrl();\n }", "function getRandomVideoURL(){\n\t$response = getHTTPContent(\"http://youtube.com\", true);\n\t\n\tif(preg_match_all('~href=\"/?watch\\?v=(.+?)\"~', $response, $matches)){\n\t\t$matches_array = $matches[1];\n\n\t\tshuffle($matches_array);\n\n\t\treturn \"http://www.youtube.com/watch?v=\".$matches_array[0];\n\t}\n\n\t_log(\"getRandomVideoURL: no videos found\", true);\n\n\treturn false;\n}", "public function getMirrorUrl() {}", "public function url()\n\t{\n\t\t$this->buildImage();\n\t\treturn $this->buildCachedFileNameUrl;\n\t}", "protected function getUrl(){\n\t\treturn $this->apiUrl . $this->apiVersion . '/';\n\t}", "public function getMatchRoute()\n {\n return $this->_matchRoute;\n }", "public function getYoutubeUri($lastFmUrl) {\n // load document\n $doc = new \\DOMDocument();\n if(!@$doc->loadHTMLFile($lastFmUrl)) {\n return false;\n }\n\n // search for movie param\n $params = $doc->getElementsByTagName('param');\n for($i = 0; $i < $params->length; $i++) {\n $item = $params->item($i);\n if($item->getAttribute('name') == 'movie') {\n $url = current(explode('?',$item->getAttribute('value')));\n $url = explode('/',$url);\n return end($url);\n }\n }\n return false;\t\t\n }", "function get_url()\n {\n }", "public function getMatch(): string\n {\n return $this->match;\n }", "public function get_url()\n {\n }", "private function get_current_url() {\n\n\t\t$url = set_url_scheme(\n\t\t\t'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']\n\t\t);\n\n\t\t// We use 'msg' as parameter internally. Not needed for pagination.\n\t\treturn remove_query_arg( 'msg', $url );\n\t}", "protected function getRequestedUrl()\n {\n $scheme = $this->getScheme();\n\n return $scheme . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n }", "public function getCurrentURL()\n {\n return $this->getBaseUrl() . $this->getURI();\n }", "private function getLastURL() {\n\t\tif (!isset($_SERVER['REQUEST_URI'])) {\n\t\t\t$serverrequri = $_SERVER['PHP_SELF'];\n\t\t} else {\n\t\t\t$serverrequri = $_SERVER['REQUEST_URI'];\n\t\t}\n\n\t\t$slcurrentPageName=str_replace('?&no_cache=1', '', $serverrequri);\n\t\t$slcurrentPageName=str_replace('?no_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('&no_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('?&purge_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('?purge_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('&purge_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('?&L=0', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('&L=0', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('?L=0', '', $slcurrentPageName);\n\t\treturn $slcurrentPageName;\n\t}", "public function returnUrl(): string\n {\n return Request::url() . '?' . http_build_query([\n 'return' => 'return',\n 'oc-mall_payment_id' => $this->getPaymentId(),\n ]);\n }", "public function getURL(): string\n {\n return $this->url.$this->apiVersion.'/';\n }", "public function url(): string\n {\n return strtok($this->getUri(), '?');\n }", "public function url()\r\n {\r\n return $this->get_base_url() . http_build_query($this->get_query_params());\r\n }", "public function getCachedReturnUrl()\n {\n $key = 'oauth_return_url_'.$this->request->input('oauth_token');\n\n // If we have no return url stored, redirect back to root page\n $url = $this->cache->get($key, Config::get('hosts.app'));\n\n return $url;\n }", "protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }", "public function url() \n\t{\n\t\treturn static::protocol().'://'.static::host().$this->server('REQUEST_URI', '/' );\n\t}", "private function getTalkURI()\n {\n $url = $this->getInput('url');\n return $url;\n }", "public function getLastRequestURL()\n {\n return $this->requestUrl;\n \n }", "public function ___httpUrl() {\n\t\t$page = $this->pagefiles->getPage();\n\t\t$url = substr($page->httpUrl(), 0, -1 * strlen($page->url())); \n\t\treturn $url . $this->url(); \n\t}", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getUrl() {\r\n\r\n // removing GET parameters from URL.\r\n return strtolower(rtrim(explode('?', $_SERVER['REQUEST_URI'], 2)[0], '/'));\r\n \r\n }", "public function getUrl() {\n\t\treturn $this->rawUrl;\n\t}", "public static function currentURL() {\n $pgurl = \"http\";\n if(!empty($_SERVER['HTTPS'])) $pgurl .= \"s\";\n $pgurl .= \"://\".$_SERVER[\"SERVER_NAME\"];\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") $pgurl .= \":\".$_SERVER[\"SERVER_PORT\"];\n \n return ($pgurl .= $_SERVER[\"SCRIPT_NAME\"]);\n }", "public static function requestedURL()\n\t{\n\t\t$url = new SMURL;\n\t\t\n\t\t// set scheme\n\t\t$scheme = ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ) ? 'https' : 'http';\n\t\t$url->setScheme( $scheme );\n\t\t\n\t\t// set host\n\t\t$url->setHost( $_SERVER['HTTP_HOST'] );\n\t\t\n\t\t// set path and query\n\t\tif( isset( $_SERVER['REQUEST_URI'] ) )\n\t\t{\n\t\t\tpreg_match( '/\\/([^\\?]*)(?:\\?(.*))?$/', $_SERVER['REQUEST_URI'], $match );\n\t\t\t$url->setPath( $match[1] );\n\t\t\t$url->setQueryString( $match[2] );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url->setPath( $_SERVER['SCRIPT_NAME'] );\n\t\t\t$url->setQueryString( $_SERVER['QUERY_STRING'] );\n\t\t}\n\n\t\t// set port\n\t\t$url->setPort( $_SERVER['SERVER_PORT'] );\n\t\t\n\t\treturn $url;\n\t}", "public static function current_url()\r\n\t{\r\n\t\t$url = Request::factory()->uri();\r\n\t\tif($_GET)\r\n\t\t{\r\n\t\t\t$url .= '/?' . $_SERVER['QUERY_STRING'];\r\n\t\t}\r\n\t\t$url = URL::site( $url, TRUE);\r\n\t\treturn $url;\r\n\t}", "public static function current_url()\r\n\t{\r\n\t\t$url = Request::factory()->uri();\r\n\t\tif($_GET)\r\n\t\t{\r\n\t\t\t$url .= '/?' . $_SERVER['QUERY_STRING'];\r\n\t\t}\r\n\t\t$url = URL::site( $url, TRUE);\r\n\t\treturn $url;\r\n\t}", "function GetUrlPlan($url = '') {\n\tif (empty($url))\n\t\t$url = GetSelfUrl();\n\t$i = preg_match('/^(\\w+):\\/\\//', $url, $ar);\n\tif (1 == $i)\n\t\treturn $ar[1];\n\telse\n\t\treturn '';\n}", "public function getUrl(){\n return $this->server->getUrl() . \"/\" . $this->name;\n \n }", "public function get_renewal_url() {\n\t\t$renewal_url = add_query_arg(\n\t\t\tarray(\n\t\t\t\t'subscription' => $this->get_id(),\n\t\t\t\t'key' => $this->get_key(),\n\t\t\t\t'action' => 'renew',\n\t\t\t), home_url()\n\t\t);\n\n\t\treturn $renewal_url;\n\t}", "public function siteUrl() {}", "protected function getUrl()\n {\n return str_replace('?' . $_SERVER['QUERY_STRING'], '', $_SERVER['REQUEST_URI']);\n }", "public function url(): string\n {\n return Uri::current()->setPath($this->name)->setSlash(true)->toString();\n }", "function get_header_video_url()\n {\n }", "function fs_get_youtube_id( $url ){\r\n\tpreg_match( \"#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\\/)[^&\\n]+|(?<=v=)[^&\\n]+|(?<=youtu.be/)[^&\\n]+#\", $url, $matches );\r\n\treturn $matches[0];\r\n}", "public function getHeartbeatUrl()\n {\n return $this->HeartbeatUrl;\n }", "public function GetMatch ();", "protected function verificationUrl()\n {\n return Url::temporarySignedRoute(\n 'verification.verify',\n Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),\n ['id' => $this->user->getKey()]\n );\n }", "function getRedirectLink()\n {\n global $wgRequest;\n if($this->user->isTemporary)\n {\n // User is viewing this from liveshow, means we have to redirect back to ViewSurvey page,\n // and not the wiki page.\n // In this case 'returnto' value does not mean anything, we know where to return.\n $t = Title::newFromText('Special:ViewSurvey');\n\n $url = $t->getLocalURL('liveshow='.$this->user->getTemporaryKey($this->page_id)\n .'&id='.$this->page_id\n .'&userID='.$this->user->userID).'#survey_id_'.$this->page_id;\n return $url;\n }\n else\n {\n $title = Title::newFromText($wgRequest->getVal('returnto'));\n return $title->getLocalURL();\n }\n }" ]
[ "0.6147555", "0.597051", "0.59636706", "0.5956001", "0.59448093", "0.58937925", "0.5831257", "0.5823231", "0.58090425", "0.57796514", "0.577795", "0.577617", "0.5774891", "0.5774891", "0.5774891", "0.5774891", "0.5774891", "0.5774891", "0.57267094", "0.5710036", "0.57099426", "0.5694431", "0.568366", "0.56814736", "0.56595147", "0.56595147", "0.5650583", "0.56427896", "0.56422526", "0.564141", "0.56365365", "0.56238914", "0.5623828", "0.5612944", "0.5595629", "0.5588294", "0.55810696", "0.55656123", "0.5560576", "0.5553094", "0.5552392", "0.55476165", "0.5544917", "0.5544917", "0.5544917", "0.5544917", "0.5544917", "0.5544917", "0.5544917", "0.5544917", "0.5536355", "0.5536355", "0.5536355", "0.5535856", "0.5534689", "0.55185056", "0.54918534", "0.5487534", "0.5482779", "0.5478435", "0.5474471", "0.54599786", "0.54562336", "0.5453185", "0.5447024", "0.5444595", "0.54438055", "0.54423803", "0.5435079", "0.54341125", "0.5431034", "0.54274476", "0.5426023", "0.5419531", "0.5418916", "0.5412105", "0.54016566", "0.5401042", "0.5401042", "0.5401042", "0.5401042", "0.5401042", "0.53962886", "0.538968", "0.5388813", "0.53864044", "0.53770405", "0.53770405", "0.5375177", "0.5374933", "0.5372264", "0.5370033", "0.5365874", "0.53567904", "0.53557205", "0.5354776", "0.53452796", "0.53395367", "0.5339102", "0.5338611" ]
0.8403448
0
Get Shop Now Title
Получить магазин сейчас (заголовок)
public function getShopNowTitle() { return $this->getData('shop_now_title'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hestia_shop_title_callback() {\n\treturn get_theme_mod( 'hestia_shop_title' );\n}", "public function get_title () {\r\n\t\treturn $this->get_info()['title'];\r\n\t}", "protected function getTitle() {\r\n\t\treturn $this->newsItem->getTitle();\r\n\t}", "public function get_title(): string {\n\t\treturn __( 'Tips to make the most of Web Stories', 'web-stories' );\n\t}", "public function get_title();", "public function get_title() {\n\t\treturn __( 'Gastenboek', 'elementor-gastenboek' );\n\t}", "public function get_title() {\n\t\treturn apply_filters( \"wpo_wcpdf_{$this->slug}_title\", __( 'Packing Slip', 'woocommerce-pdf-invoices-packing-slips' ), $this );\n\t}", "public function get_title() {\n\t\treturn $this->format_string( $this->title );\n\t}", "public function get_title() {\r\n\t\treturn esc_html__( 'Price Plan: 02', 'aapside-master' );\r\n\t}", "public function getTitle(): string\n {\n if (!empty( $this->title )) {\n return $this->title;\n } elseif (!empty( $this->stock )) {\n return $this->stock->title;\n } else {\n return '';\n }\n }", "function get_title()\n {\n }", "public function getTitle() {\n\t\treturn Template::getSiteTitle();\n\t}", "public function getSiteTitle() {\n\t\treturn isset($this->cache->siteTitle) ? $this->cache->siteTitle : 'Crystal-Web System';\n\t}", "public function get_title() {\n\t\treturn __( 'Hello World', 'elementor-hello-world' );\n\t}", "public function get_title() {\n return esc_html__( 'Onsale Product', 'Alita-extensions' );\n }", "public function getProdTitle()\n {\n return $this->prod_title;\n }", "public function getTitle() {\n\t\treturn $this->item->getTitle()->getText();\n\t}", "function get_title() {\n\t\treturn $this->settings['title'];\n\t}", "public function getTitle() {\n\t\treturn $this->title;\t\n\t}", "public function getTitle(): string\n {\n return $this->title ?? $this->name;\n }", "public function getTitle(): string {\n\t\treturn $this->title;\n\t}", "function get_the_title() {\n\n md_get_the_title();\n \n }", "public function get_title()\n\t{\n\t\treturn $this->title;\n\t}", "public function getMetaTitle();", "public function get_title(){\n\t\treturn $this->title;\n\t}", "public function get_title(){\n\t\treturn $this->title;\n\t}", "public function getTitle(): string\n {\n return $this->title;\n }", "public function getTitle(): string\n {\n return $this->title;\n }", "public function getTitle(): string\n {\n return $this->title;\n }", "public function getTitle(): string\n {\n return $this->title;\n }", "public function getTitle(): string\n {\n return $this->title;\n }", "public function getTitle(): string\n {\n return $this->title;\n }", "public function getTitle(): string\n {\n return $this->title;\n }", "public function get_title() {\n return esc_html__( 'Onsale Product', 'electro-extensions' );\n }", "public function getTitle()\n {\n return isset($this->metas['title']) ? $this->metas['title'] : '';\n }", "public function get_title() { return $this->title; }", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle()\n {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\r\n\t\treturn $this->title;\r\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function title()\n\t{\n\t\treturn $this->CLI->stringQuery($this->SqueezePlyrID.\" title ?\");\n\t}", "public static function getTitle()\n {\n return self::$title;\n }", "public function getTitle()\n {\n return $this->getProduct()->getTitle();\n }", "public function getTitle(): string\n {\n return $this->_title;\n }", "public function get_title()\n {\n }", "public function get_title()\n {\n }", "function getTitle() {\n\t\treturn $this->title;\n\t}", "public function current_title()\n\t{\n\t\treturn $this->CLI->stringQuery($this->SqueezePlyrID.\" current_title ?\");\n\t}", "public function getTitle(): string\n {\n return $this->title;\n }", "function get_title() \t{\n \t\treturn $this->title;\t\n \t}", "public function getTitle(): string\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle(): string;", "public function getTitle(): string;", "public function getTitle(): string;", "public function getTitle(): string;", "public function getTitle(): string;", "public function getTitle(): string;", "public function getTitle(): string;", "public function getTitle(): string;", "public function getTitle()\n {\n return $this->getData('title');\n }", "public function gettitle()\n {\n return $this->title;\n }", "static public function getTitle() {\n\t\treturn self::$page_title;\n\t}", "public function getTitle() : string\n {\n return $this->title;\n }", "public function getTitle() : string\n {\n return $this->title;\n }", "public function _get_item_title() {\n\t\treturn $this->_item_title;\n\t}", "public function getMatchNowTitle()\n {\n return $this->getData('match_now_title');\n }", "public function getTitle()\n\t\t{\n\t\t\tif(is_null($this->data))\n\t\t\t\treturn '';\n\t\t\t\n\t\t\tif(!array_key_exists('title', $this->data))\n\t\t\t\treturn '';\n\t\t\t\n\t\t\treturn $this->data['title'];\n\t\t}", "public function getTitle(){\n\n $title = $this->getField('title', '');\n if(empty($title)){ return $title; }//if\n\n if($title_prefix = $this->getTitlePrefix()){\n $title = $title_prefix.$this->getTitleSep().$title;\n }//if\n\n if($title_postfix = $this->getTitlePostfix()){\n $title .= $this->getTitleSep().$title_postfix;\n }//if\n\n return $title;\n\n }", "function get_site_title()\n\t{\n\t\tglobal $conn;\n\t\t\n\t\t$siteTitle = \"SELECT infoData FROM misc_info WHERE infoName='siteTitle' LIMIT 1\";\n\t\t\n\t\t$siteTitle = mysql_query($siteTitle, $conn);\n\t\t$siteTitle = mysql_fetch_assoc($siteTitle);\n\t\t\n\t\treturn array_shift($siteTitle);\n\t}", "function getTitle() ;", "public function getTitle(){\r\n\t\treturn $this->title;\r\n\t}", "public function getTitle()\n {\n if ($this->isPermit()) {\n $addresses = $this->getField('objectaddresses');\n if ($addresses != false) {\n $location = $addresses[0]['zipcode'];\n $location .= ' ' . $addresses[0]['addressnumber'];\n $location .= $addresses[0]['addressnumberadditional'];\n $location .= ' ' . $addresses[0]['city'];\n $result = sprintf(\n '%s %s %s',\n $this->getField('producttype'),\n $this->getField('productactivities'),\n $location\n );\n } else {\n $result = sprintf(\n '%s %s',\n $this->getField('producttype'),\n $this->getField('productactivities')\n );\n }\n } else {\n $result = $this->getField('title');\n }\n return $result;\n }", "public function getTitle(){\n\t\t\treturn $this->title;\n\t\t}", "public function getTitle()\n {\n return $this->getValue('title');\n }", "public function getTitle()\n {\n return Mage::helper('ddg')->__(\"Engagement Cloud Account Information\");\n }", "public function getTitle(){\r\n\t\t\treturn $this->title;\r\n\t\t}", "public function getTitle()\n {\n return $this->formattedData['title'];\n }", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}" ]
[ "0.7708132", "0.753332", "0.7376903", "0.7373858", "0.7337966", "0.7273591", "0.716291", "0.7120857", "0.7113418", "0.71119654", "0.70995754", "0.70971644", "0.7095166", "0.7070589", "0.70700467", "0.7057545", "0.70480055", "0.70457923", "0.70331323", "0.70267814", "0.70111924", "0.7010257", "0.70093185", "0.7004421", "0.700031", "0.700031", "0.6994075", "0.6994075", "0.6994075", "0.6994075", "0.6994075", "0.6994075", "0.6994075", "0.69908434", "0.69806236", "0.696085", "0.69551873", "0.69551873", "0.69551873", "0.69551873", "0.69551873", "0.69551873", "0.69551873", "0.69551873", "0.69551873", "0.69551873", "0.69551873", "0.69551873", "0.69551873", "0.69551873", "0.69551873", "0.69526905", "0.695146", "0.6949979", "0.6949979", "0.6949979", "0.6949979", "0.69483954", "0.69468886", "0.6946838", "0.6943995", "0.69409233", "0.69403434", "0.6938689", "0.6935622", "0.6931979", "0.692964", "0.69278246", "0.69273794", "0.69273794", "0.69273794", "0.69273794", "0.69273794", "0.69273794", "0.69273794", "0.69273794", "0.69257694", "0.6920857", "0.69146705", "0.69116217", "0.69116217", "0.6909263", "0.6906632", "0.690627", "0.6906059", "0.69051266", "0.6898926", "0.6897848", "0.6894218", "0.6892963", "0.6884725", "0.6884672", "0.6882867", "0.68787676", "0.68766207", "0.68766207", "0.68766207", "0.68766207", "0.68766207", "0.68766207" ]
0.86199474
0
Get Shop Now Url
Получить URL магазина сейчас
public function getShopNowUrl() { return $this->getData('show_now_url'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShopUri()\n {\n return sprintf(self::SHOP_URI, $this->getShopName());\n }", "function _getHellaspayUrl($method) {\r\n\r\n\t\t$url = $method->hellaspay_production == '1' ? $method->hellaspay_production_url : $method->hellaspay_test_url;\r\n\r\n\t\treturn $url;\r\n\t}", "public function get_renewal_url() {\n\t\t$renewal_url = add_query_arg(\n\t\t\tarray(\n\t\t\t\t'subscription' => $this->get_id(),\n\t\t\t\t'key' => $this->get_key(),\n\t\t\t\t'action' => 'renew',\n\t\t\t), home_url()\n\t\t);\n\n\t\treturn $renewal_url;\n\t}", "public function getMytripUrl() {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ()->get ( 'Magento\\Store\\Model\\StoreManagerInterface' )->getStore ();\n return $objectManager->getUrl('booking/mytrip/currenttrip/');\n }", "private function getServiceUrl()\n {\n $store = $this->storeRepository->getById($this->storeManager->getStore()->getId());\n return $this->url->getUrl(\n $this->service . \"/\" . $store->getCode() . \"/\" . $this->version\n );\n }", "public function getContinueShoppingURL() {\n\t\treturn BASKET_CONTINUE_SHOPPING_URL;\n\t}", "protected function get_url()\n {\n return $this->base_url + $this->api_version; \n }", "protected function getUrl(){\n\t\treturn $this->apiUrl . $this->apiVersion . '/';\n\t}", "public function siteUrl() {}", "public function getCheckoutUrl()\n {\n return $this->helper('checkout/url')->getCheckoutUrl();\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 }", "public function getShopUrl($stripHttp = true): string\n {\n /** @var string $shopUrl */\n $shopUrl = $this->router->generate(\n 'frontend.home.page',\n [],\n $this->router::ABSOLUTE_URL\n );\n\n if ($stripHttp === true) {\n $shopUrl = str_ireplace('http://', '', $shopUrl);\n $shopUrl = str_ireplace('https://', '', $shopUrl);\n }\n\n if (substr($shopUrl, -1) === '/') {\n $shopUrl = substr($shopUrl, 0, -1);\n }\n\n return $shopUrl;\n }", "public function getMatchNowUrl()\n {\n return $this->getData('match_now_url');\n }", "public function getURL(): string\n {\n return $this->url.$this->apiVersion.'/';\n }", "public function getCurrentUrl();", "public function getStoreUrl()\r\n\t{\r\n\t\treturn Mage::getBaseUrl();\r\n\t}", "public function getUrl() {\n\t\treturn $this->siteURL;\n\t}", "public function get_url();", "public function getURL() {\n return $this->apiURL . $this->endPoint . $this->storeID . $this->jsonFile;\n }", "function get_checkout_url() {\n\t\t\t$checkout_page_id = get_option('cmdeals_checkout_page_id');\n\t\t\tif ($checkout_page_id) :\n\t\t\t\tif (is_ssl()) return str_replace('http:', 'https:', get_permalink($checkout_page_id));\n\t\t\t\treturn get_permalink($checkout_page_id);\n\t\t\tendif;\n\t\t}", "public function getServiceUrl()\n {\n if($this->testMode) {\n return 'https://www.alipay.com/cooperate/gateway.do';\n }\n\t\treturn 'https://www.alipay.com/cooperate/gateway.do';\n }", "public function getUrl() {\n return $this->_gatewayRedirect->getUrl ();\n }", "public function getUrl()\n\t{\n\t\treturn rtrim(Mage::helper('wordpress')->getUrlWithFront($this->getId()), '/') . '/';\n\t}", "private function getShopUrl($aShop)\n {\n $shop = $aShop;\n if (!strpos($aShop, \"https://\")) {\n $shop = \"https://\" . $aShop;\n }\n return $shop;\n }", "public function getUrl()\n {\n return Mage::getUrl('magna_news', array('news_id' => $this->getId(), '_secure' => true));\n }", "public function getConnectUrl()\n {\n return Mage::helper('adminhtml')->getUrl('adminhtml/shopgate/connect');\n }", "public static function getThisUrl() {}", "public function getWelcomeURL()\n\t{\n\t\t$merchantId = $this->settingsHelper->getMerchantId();\n\t\t$countryId = $this->localizationHelper->getShippingCountry();\n\t\t\n\t\tif($this->settingsHelper->isStagingEnabled())\n\t\t\treturn trim(Mage::getStoreConfig('borderfree_options/settings/welcomematstageurl')) . \"?merchId=$merchantId&countryId=$countryId&setCookie=Y\";\n\t\telse\n\t\t\treturn trim(Mage::getStoreConfig('borderfree_options/settings/welcomematprodurl')) . \"?merchId=$merchantId&countryId=$countryId&setCookie=Y\";\n\t}", "function getCurrentUrl() {\n\t\t$url = isset( $_SERVER['HTTPS'] ) && 'on' === $_SERVER['HTTPS'] ? 'https' : 'http';\n\t\t$url .= '://' . $_SERVER['SERVER_NAME'];\n\t\t$url .= in_array( $_SERVER['SERVER_PORT'], array('80', '443') ) ? '' : ':' . $_SERVER['SERVER_PORT'];\n\t\t$url .= $_SERVER['REQUEST_URI'];\n\t\treturn $url;\n\t}", "public function getUrl() {\n\t\t$url = $this->getBaseUrl().$this->getBasePath().$this->getOperation();\n\t\t$params = http_build_query($this->getUrlParameters());\n\t\tif ($params) {\n\t\t\t$url .= '?'.$params;\n\t\t}\n\t\treturn $url;\n\t}", "public function getCheckoutRedirectUrl()\n {\n return Mage::getUrl('radial_paypal_express/checkout/start');\n }", "public function getURL() {\n $defaultPorts= array(\n 'http' => 80,\n 'https' => 443\n );\n \n // Determine which settings we need to pass\n $xsr= array();\n if (\n ($this->getProduct() != $this->getDefaultProduct()) ||\n ($this->getLanguage() != $this->getDefaultLanguage())\n ) {\n $xsr[]= $this->getProduct();\n $xsr[]= $this->getLanguage();\n }\n if ($this->getSessionId()) $xsr[]= 'psessionid='.$this->getSessionId();\n\n $port= '';\n if (\n $this->getPort() &&\n (!isset($defaultPorts[$this->getScheme()]) ||\n $this->getPort() != $defaultPorts[$this->getScheme()])\n ) {\n $port= ':'.$this->getPort();\n }\n\n\n return sprintf(\n '%s://%s%s/xml/%s%s%s%s',\n $this->getScheme(),\n $this->getHost(),\n $port,\n (sizeof($xsr) ? implode('.', $xsr).'/' : ''),\n $this->getStateName(), \n $this->getQuery() ? '?'.$this->getQuery() : '',\n $this->getFragment() ? '#'.$this->getFragment() : ''\n );\n }", "public function get_url()\n {\n }", "function wpcr_stc_get_current_url() {\n\t$requested_url = ( !empty($_SERVER['HTTPS'] ) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';\n\t$requested_url .= $_SERVER['HTTP_HOST'];\n\t$requested_url .= $_SERVER['REQUEST_URI'];\n\treturn $requested_url;\n}", "public function getSiteURL()\n {\n return $this->config->get('site.url').$this->config->get('site.dir');\n }", "protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }", "public static function getBaseGatewayUrl()\n {\n $url = Configuration::getGlobalValue(PostFinanceCheckoutBasemodule::CK_BASE_URL);\n\n if ($url) {\n return rtrim($url, '/');\n }\n return 'https://app-wallee.com';\n }", "public function getBaseUrl() {\n $storeManager = $this->objectManager->get ( 'Magento\\Store\\Model\\StoreManagerInterface' );\n\n return $storeManager->getStore ()->getBaseUrl ();\n }", "public function getURL();", "public function getURL();", "public function getUrl()\n {\n return $this->createUrl();\n }", "public function getStoreURL(){\r\n\t\t//$this->initDb();\r\n\t\t$this->store_url='';\r\n\t\tif($this->car_id !=0 && $this->getStoreId()!=''){\r\n\t\t\t$this->store_url = getValue(\"SELECT storeurl FROM tbl_store WHERE store_id=\".$this->getStoreId());\r\n\t\t}\r\n\t\treturn $this->store_url;\t\r\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 $url = $params = '';\n $url .= $this->getProtocol() . '://' . self::EBAY_HOST . self::EBAY_URI . '?';\n foreach ($this->getParams() as $name => $value) {\n $params .= '&' . $name . '=' . urlencode($value);\n }\n\n return $url . substr($params, 1);\n }", "function url()\n {\n return $this->peopletag->homeUrl();\n }", "private function getCallbackURL()\n\t{\n\t\t$sandbox = $this->params->get('sandbox', 0);\n\n\t\tif ($sandbox)\n\t\t{\n\t\t\treturn 'ssl://sandbox.payfast.co.za';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 'ssl://www.payfast.co.za';\n\t\t}\n\t}", "public function getBaseUrlWithStoreCode() {\n return $this->_storeManager->getStore()->getBaseUrl();\n }", "public function getEndpointUrl()\n {\n if (empty($this->endpointUrl)) {\n $this->endpointUrl = \\TiTravel\\Constants::API_LIVE_ENDPOINT;\n }\n return \"{$this->endpointUrl}&\".$this->getCredentialsUrlParams().'&action=';\n }", "function st_woocommerce_shop_url() {\n\n return site_url() . '/product-category/pain-matters/';\n\n }", "function waves_shop_req(){\n global $wp;\n $output='';\n if(count($_GET)){\n foreach ( $_GET as $key => $value ) {\n if($key!=='shop_load'&&$key!=='_'){\n $output.=(empty($output)?'?':'&').$key.'='.$value;\n }\n }\n }\n return home_url( $wp->request ).$output;\n}", "protected function url()\n\t{\n\t\treturn Phpfox::getLib('url');\t\n\t}", "public function getStoreUrl($fromStore = true) {\r\n\t\treturn $this->_storeManager->getStore()->getCurrentUrl($fromStore);\r\n\t}", "function _build_url() {\n\t\t// Add transaction ID for better detecting double requests in AUTH server\n\t\tif($GLOBALS['config']['application']['tid'] == '') $GLOBALS['config']['application']['tid'] = rand(0, 10000);\n\n\t\t$url = $this->url.'&action='.$this->action.'&tid='.$GLOBALS['config']['application']['tid'];\n\t\t\n\t\treturn $url;\n\t}", "public static function get_webhook_url() {\n\t\treturn add_query_arg( 'wc-api', 'wc_stripe', trailingslashit( get_home_url() ) );\n\t}", "public function getURL ();", "function trueSiteUrl() {\n\t\treturn $GLOBALS[\"trueSiteUrl\"];\n\t}", "protected function getApiUrl(): string\n {\n return preg_replace($this->regexPattern,$this->currencyDate,$this->apiEndpoint);\n }", "static function obtenerUrlActual() {\n $url = Util::crearUrl($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n return $url;\n }", "public static function getWebsiteURL(){\n if(Cache::isStored('website_url'))return Cache::get('website_url'); \n $row = getDatabase()->queryFirstRow(\"SELECT `value` FROM `settings` WHERE `setting` = 'website_url'\");\n $url = $row['value'];\n #http:// prefix\n if(!is_numeric(strpos($url, \"http://\"))){\n $url = 'http://' . $url;\n }\n #/ suffix\n if(substr($url, -1) != '/'){\n $url .= '/';\n }\n Cache::store('website_url', $url);\n return $url;\n }", "public static function siteURL(): string\n {\n return sprintf(\"%s://%s\", Request::scheme(), Request::host());\n }", "public function getUrl(){\n return $this->server->getUrl() . \"/\" . $this->name;\n \n }", "private function site_url()\n\t{\n\t\t$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443)\n\t\t\t? \"https://\"\n\t\t\t: \"http://\";\n\t\t$domainName = $_SERVER['HTTP_HOST'];\n\n\t\treturn $protocol.$domainName;\n\t}", "private static function getSiteUrl()\n {\n return ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://\" . $_SERVER['HTTP_HOST'] . ( isset($_SERVER['SCRIPT_URL'] ) ? $_SERVER['SCRIPT_URL'] : '' );\n }", "public function url()\r\n {\r\n return $this->get_base_url() . http_build_query($this->get_query_params());\r\n }", "public function getCheckoutUrl($tempCart){\n $subdomain = (Mage::getStoreConfig('iglobal_integration/apireqs/igsubdomain') ? Mage::getStoreConfig('iglobal_integration/apireqs/igsubdomain') : \"checkout\");\n\t\t$storeNumber = (Mage::getStoreConfig('iglobal_integration/apireqs/iglobalid') ? Mage::getStoreConfig('iglobal_integration/apireqs/iglobalid') : \"3\");\n\t\t$countryCode = (isset($_COOKIE['igCountry']) ? $_COOKIE['igCountry'] : \"\");\n $url = 'https://' . $subdomain . '.iglobalstores.com/?store=' . $storeNumber . '&tempCartUUID=' . $tempCart . '&country=' . $countryCode;\n\n\n\t\t//grab customer info if logged in and carry over to iglobal checkout\n\t\tif(Mage::getSingleton('customer/session')->isLoggedIn()){\n $customer = Mage::getSingleton('customer/session')->getCustomer();\n $shipping_id = $customer->getDefaultShipping();\n\n if($shipping_id){\n $shipping_address = Mage::getModel('customer/address')->load($shipping_id);\n }\n\n $customer_params = '';\n\n if(!$shipping_address){\n $customer_params .= '&customerName=' . $customer['firstname'] . ' ' . $customer['lastname'];\n $customer_params .= '&customerCompany=' . $customer['company'];\n $customer_params .= '&customerEmail=' . $customer['email'];\n $customer_params .= '&customerPhone=' . $customer['telephone'];\n }else{\n $customer_params .= '&customerName=' . $shipping_address['firstname'] . ' ' . $shipping_address['lastname'];\n $customer_params .= '&customerCompany=' . $shipping_address['company'];\n $customer_params .= '&customerEmail=' . $customer['email'];\n $customer_params .= '&customerPhone=' . $shipping_address['telephone'];\n $customer_params .= '&customerAddress1=' . $shipping_address->getStreet(1);\n $customer_params .= '&customerAddress2=' . $shipping_address->getStreet(2);\n $customer_params .= '&customerCity=' . $shipping_address['city'];\n $customer_params .= '&customerState=' . $shipping_address['region'];\n $customer_params .= '&customerCountry=' . $shipping_address['country_id'];\n $customer_params .= '&customerZip=' . $shipping_address['postcode'];\n }\n $url .= $customer_params;\n }\n return $url;\n }", "protected function _getUrl()\n {\n $s = empty($_SERVER['HTTPS']) ? '' : ($_SERVER['HTTPS'] == 'on') ? 's' : '';\n\n $protocol = substr(strtolower($_SERVER['SERVER_PROTOCOL']), 0, strpos(strtolower($_SERVER['SERVER_PROTOCOL']), '/')) . $s;\n\n $port = ($_SERVER['SERVER_PORT'] == '80') ? '' : (':'.$_SERVER['SERVER_PORT']);\n\n return $protocol . '://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];\n }", "public function getActionUrl()\n {\n return Mage::getUrl('supplier/plan/buy');\n }", "public function getUrl() {\n\t\treturn sprintf(self::ENDPOINT, $this->_account);\n\t}", "public function getUrl() {\n return $this->get(self::URL);\n }", "public function url();", "public function url();", "public function url();", "public function getTakeUrl() { }", "static public function getCurrentURL() {\n\t\tif (self::checkSSL()) {\n\t\t\treturn self::getSecureURL();\n\t\t} else {\n\t\t\treturn self::getURL();\n\t\t}\n\t}", "public function getWebsiteURL() {\n return $this->getChaveValor('WEBSITE_URL');\n }", "function site_url(){\n\treturn config( 'site.url' );\n}", "public function getResetUrl()\n {\n /** @var $helper Mage_Core_Helper_Url */\n $helper = Mage::helper('core/url');\n\n // get current url\n $url = $helper->getCurrentUrl();\n\n // parse url\n $parsedUrl = parse_url($url);\n\n // build url\n $url = $parsedUrl['scheme'] . '://' . $parsedUrl['host'] . $parsedUrl['path'];\n\n // get query parameters\n if (isset($parsedUrl['query'])) {\n parse_str(html_entity_decode($parsedUrl['query']), $q);\n\n // remove bx filters\n foreach ($q as $k => $v) {\n if (strpos($k, 'bx_') === 0) {\n unset($q[$k]);\n }\n }\n\n // append query string\n if ($q) {\n $url .= '?' . http_build_query($q);\n }\n }\n\n // return url\n return $url;\n }", "public function get_url(){\n\n\t\t\treturn $this->api_urls['giturl'];\n\n\t\t}", "public function get_url(): string\n {\n return $this->get_url_internal();\n }", "public static function url(): string\n\t{\n\t\treturn static::$url;\n\t}", "static public function ctrRuta(){\n\n\t\treturn \"https://chocoshop.teamblack4ever.com/\";\n\t\n\t}", "function getUrl() {\n\t\t$url = @( $_SERVER[\"HTTPS\"] != 'on' ) ? 'http://'.$_SERVER[\"SERVER_NAME\"] : 'https://'.$_SERVER[\"SERVER_NAME\"];\n\t\t$url .= ( $_SERVER[\"SERVER_PORT\"] !== 80 ) ? \":\".$_SERVER[\"SERVER_PORT\"] : \"\";\n\t\t$url .= $_SERVER[\"REQUEST_URI\"];\n\t\treturn $url;\n\t}", "public function getFrontPageUrl();", "public function url(){\n $protocol = \"http://\";\n if ( !empty( $_SERVER['HTTPS'] ) ) {\n $protocol = \"https://\";\n }\n $url = $protocol . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n return $url;\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 getNewsletterUrl()\n {\n return $this->urlBuilder->getUrl('walleycheckout/newsletter');\n }", "function vip_powered_wpcom_url() {\n\treturn 'https://vip.wordpress.com/';\n}", "public function getActionUrl() : string\n {\n return $this->getUrl('pramp/api_store/switch');\n }", "public function getMagentoConnectUrl() {\n\t\treturn Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . 'downloader/';\n\t}", "protected function getUrl() {\r\n\t\treturn $this->url;\r\n\t}", "protected function get_endpoint_url() {\n\n\t\t$args = http_build_query( array( 'apikey' => $this->api_key ) );\n\t\t$base = $this->route . $this->app_id;\n\t\t$url = \"$base?$args\";\n\n\t\treturn $url;\n\t}", "public function buildShopUrl() {\n\t\t\t$this->baseUrl = sprintf($this->baseUrl, $this->apiKey, $this->pass, $this->shopName);\n\t\t\treturn $this;\n\t\t}", "public function getSiteURL()\r\n {\r\n return $this->siteURL;\r\n }", "public function generate_url()\n {\n }", "static public function selfURL()\r\n {\r\n //global $cfgSite;\r\n $cfgSite = Warecorp_Config_Loader::getInstance()->getAppConfig('cfg.site.xml');\r\n $s = empty($_SERVER[\"HTTPS\"]) ? '' : ($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\";\r\n $protocol = self::strleft(strtolower($_SERVER[\"SERVER_PROTOCOL\"]), \"/\").$s;\r\n if ($cfgSite->use_port_in_URL == '1') {\r\n $port = ($_SERVER[\"SERVER_PORT\"] == \"80\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]);\r\n } else {$port = '';}\r\n return $protocol.\"://\".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];\r\n }", "public function get_url () {\r\n\t\treturn $this->url;\r\n\t}", "function getAppUrl() {\r\n\r\n $url = getHost() . getAppPath();\r\n\r\n return $url;\r\n\r\n }", "public function getEvoBaseUrl()\n\t{\n\t\tMage::log(\" --- Snap* Hosted Payments API : getEvoBaseUrl --- \");\n\t\t$bTestMode = $this->getConfigData('test_mode');\n\t\treturn ($bTestMode ? $this->_merchantCheckoutURLTest : $this->_merchantCheckoutURL);\n\t}", "public function getUrl();", "public function getUrl();" ]
[ "0.7105449", "0.7083607", "0.6912421", "0.6779383", "0.67741054", "0.6689031", "0.66760945", "0.6673764", "0.65760225", "0.65040964", "0.65006465", "0.64723665", "0.64637905", "0.64625484", "0.64383256", "0.64369553", "0.6436007", "0.6433064", "0.64321524", "0.63954127", "0.63546056", "0.6353899", "0.63498807", "0.63313437", "0.6320763", "0.6314525", "0.6311877", "0.63061345", "0.62938696", "0.62932354", "0.62907577", "0.6287449", "0.6286384", "0.6272763", "0.6269139", "0.6267892", "0.6266701", "0.6256088", "0.62525105", "0.62525105", "0.62439823", "0.6236972", "0.6232326", "0.62305987", "0.6226265", "0.6225996", "0.6224537", "0.62073267", "0.6206587", "0.6203171", "0.62008965", "0.6198517", "0.6197391", "0.6195122", "0.61876804", "0.6184552", "0.6174775", "0.61687857", "0.6166239", "0.6162704", "0.6159915", "0.615838", "0.6157246", "0.61458397", "0.6140193", "0.6139199", "0.6136498", "0.6136299", "0.6132486", "0.61309797", "0.61309797", "0.61309797", "0.6128211", "0.61276126", "0.6124556", "0.61178833", "0.6110359", "0.61093265", "0.60967684", "0.60956234", "0.609429", "0.6091275", "0.60894394", "0.6083151", "0.60798025", "0.60743475", "0.6068341", "0.6068302", "0.6061231", "0.60584664", "0.6055419", "0.60505116", "0.60464597", "0.6046003", "0.60459954", "0.60439444", "0.60427463", "0.60410935", "0.6039659", "0.6039659" ]
0.851698
0
Remove nonnumeric characters from $cc_no
Удалите немножечковые символы из $cc_no
function clean_no ($cc_no) { return ereg_replace ('[^0-9]+', '', $cc_no); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function cleanCCNumber($cc = '') {\n $cc = preg_replace('/[^0-9]/', '', trim($cc));\n return (string)$cc;\n }", "protected function strip_non_numeric($cardno) {\n return preg_replace('/[^0-9]/', null, $cardno);\n }", "function cardNumberClean($number)\n {\n return preg_replace(\"/[^0-9]/\", \"\", $number);\n }", "protected function cleanCardNumber($number) {\n\t\t$result = preg_replace('/\\D/', '', $number);\n\t\treturn $result;\n\t}", "function clean_number($phone_number){\n\treturn preg_replace(\"/[^0-9]/\", \"\", $phone_number);\n}", "function format_phone_plain($number) {\n return preg_replace('/[^0-9]/', '', $number);\n}", "public function clean($cpf)\n {\n return preg_replace(\"/[^0-9]/\", \"\", $cpf);\n }", "public function cleanSmsSender($number) {\n if ((int)substr($number, 0, 1) === 0) {//Starts with 0\n return '44' . substr($number, 1);\n }//E# if statement\n\n return $number;\n }", "function soNumero($str) {\r\nreturn preg_replace(\"/[^0-9]/\", \"\", $str);\r\n\r\n}", "function get_phone_number( $phone_number ) {\n return str_replace( array( '-', '(', ')', ' ' ), '', $phone_number );\n}", "function clean_phone($phone_number){\n $clean = str_replace(array('+','(',')','-',' '),'',$phone_number);\n return $clean;\n }", "public static function normalize($number) {\n\t\t$number = preg_replace('#[^0-9]#','',''.$number);\n\t\t$norm = array('ccc'=>'');\n\t\tswitch (true) {\n\t\t\t\n\t\t\tcase (strlen($number)==10 && substr($number,0,1)=='0'):\n\t\t\t\t$number = substr($number,1);\n\t\t\tcase (strlen($number)==9 && substr($number,0,1)!=='0'):\t\n\t\t\t\t$norm['ccc'] = '33';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$found = false;\n\t\t\t\t$number = preg_replace('#^[0]+#', '', $number);\n\t\t\t\t$found = false;\n\t\t\t\tfor ($i=4; $i>0; $i--) {\n\t\t\t\t\t$ccc = substr($number,0,$i);\n\t\t\t\t\tif (in_array($ccc,self::$ccc)) {\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($found) {\n\t\t\t\t\t$norm['ccc'] = $ccc;\n\t\t\t\t\t$number = preg_replace('#^'.$ccc.'0*#','',$number);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow new PhoneNumberException($number,1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t$norm['number'] = $number;\n\t\treturn $norm;\n\t}", "function MaskCreditCard($cc){\n\t$cc_length = strlen($cc);\n\t// Replace all characters of credit card except the last four and dashes\n\tfor($i=0; $i<$cc_length-4; $i++){\n\t\tif($cc[$i] == '-'){continue;}\n\t\t$cc[$i] = 'X';\n\t}\n\t// Return the masked Credit Card #\n\treturn $cc;\n}", "protected function clean(string $number): string {\n $number = preg_replace('#[^\\d]#', '', $number);\n return trim($number);\n }", "public function filter($value)\n {\n $value = preg_replace(\"/\\([^)]+\\)/\", \"\", $value);\n $numeric = preg_replace(\"/[^0-9]/\", \"\", $value);\n\n if (strpos($numeric, '00') === 0 && (strlen($numeric) === 12 || strlen($numeric) === 13)) {\n $numeric = ltrim($numeric, '0');\n }\n\n if ((strpos($numeric, '06') === 0 && strlen($numeric) === 10) || (strpos($numeric, '6') && strlen($numeric) === 9)) {\n $numeric = '31' . ltrim($numeric, '0');\n }\n\n return (string)$numeric;\n }", "function fn_validate_cc_number($number, $show_error = false)\n{\n if (empty($number)) {\n return false;\n }\n\n $number = str_replace(array('-',' '), '', $number);\n\n if (preg_match('/^([?0-9]{13,19}|[?*\\d]+)$/', $number)) {\n return true;\n } elseif ($show_error) {\n fn_set_notification('E', __('error'), __('text_not_valid_cc_number', array(\n '[cc_number]' => $number\n )));\n }\n\n return false;\n}", "public function cleanNumber($value) {\n $data = trim($value);\n\n // Removes Unwanted Characters\n $data = filter_var($data, FILTER_SANITIZE_NUMBER_INT);\n\n // Sanitizes HTML Characters\n $data = htmlspecialchars_decode($data, ENT_QUOTES);\n\n return $data;\n }", "function removerMascaraCpf($valor)\n{\n return preg_replace([\"/\\\\D+/\"], [''], $valor);\n}", "public function phoneClean():string\n {\n $phone = '';\n if (!empty($this->phone)) {\n $phone = preg_replace('#[^\\d\\+]#si', '', $this->phone);\n }\n return $phone;\n }", "function remove_dash_ic($nric) {\n $ic = str_replace(\"-\",\"\",$nric);\n return $ic;\n}", "function clean_account($account)\n{\n\t$account = rtrim($account, \"0\");\n\n\treturn $account;\n}", "public static function maskCPF_CNPJ($_input = NULL) {\n\n $number = self::getNumbers($_input);\n $length = strlen($number);\n\n if ($length != 11 && $length != 14) {\n return $_input;\n }\n\n $return = ($length == 11) ? '###.###.###-##' : '##.###.###/####-##';\n $key = -1;\n\n for ($i = 0, $size = strlen($return); $i < $size; $i++) {\n\n if ($return[$i] == '#') {\n $return[$i] = $number[++$key];\n }\n }\n\n return $return;\n }", "function FormatCreditCard($cc)\n{\n\t$cc = str_replace(array('-',' '),'',$cc);\n\t// Get the CC Length\n\t$cc_length = strlen($cc);\n\t// Initialize the new credit card to contian the last four digits\n\t$newCreditCard = substr($cc,-4);\n\t// Walk backwards through the credit card number and add a dash after every fourth digit\n\tfor($i=$cc_length-5;$i>=0;$i--){\n\t\t// If on the fourth character add a dash\n\t\tif((($i+1)-$cc_length)%4 == 0){\n\t\t\t$newCreditCard = '-'.$newCreditCard;\n\t\t}\n\t\t// Add the current character to the new credit card\n\t\t$newCreditCard = $cc[$i].$newCreditCard;\n\t}\n\t// Return the formatted credit card number\n\treturn $newCreditCard;\n}", "function trimPhone($phone){\n\treturn preg_replace('/[^+0-9]/', '', $phone);\n}", "function justNumbers($var)\n{\n return preg_replace('/[^0-9]/', '', $var);\n}", "function clean_postcode ($postcode) {\n\n\t\t$postcode = str_replace(' ','',$postcode);\n\t\t$postcode = strtoupper($postcode);\n\t\t$postcode = trim($postcode);\n\t\t$postcode = preg_replace('/(\\d[A-Z]{2})/', ' $1', $postcode);\n\t\n\t\treturn $postcode;\n\n\t}", "function remove_non_coding_prot($seq) {\r\n // change the sequence to upper case\r\n $seq=strtoupper($seq);\r\n // remove non-coding characters([^ARNDCEQGHILKMFPSTWYVX\\*])\r\n $seq = preg_replace (\"([^ARNDCEQGHILKMFPSTWYVX\\*])\", \"\", $seq);\r\n return $seq;\r\n}", "function clean_iptc_value($value)\n{\n\t// strip leading zeros (weird Kodak Scanner software)\n\twhile ( isset($value[0]) and $value[0] == chr(0)) {\n\t\t$value = substr($value, 1);\n\t}\n\t// remove binary nulls\n\t$value = str_replace(chr(0x00), ' ', $value);\n\n\treturn $value;\n}", "function mask_format($nric) {\n if (is_numeric($nric) == 1) {\n return $nric;\n } else {\n $new_nric = substr_replace($nric, 'XXXXX', 0, 5);\n //$new_nric = substr_replace($nric,'XXXX',5); \n return $new_nric;\n }\n }", "private function cleanPhoneNumber($phone = '') {\n $phone = preg_replace('/[^0-9-]/', '', trim($phone));\n return (string)$phone;\n }", "function unify_number($number){\n $number = str_replace([\" \", \"-\"], \"\", $number); // Android likes to put those in\n if( strpos($number, \"00\") === 0 )\n return \"+\".substr($number, 2);\n if( strpos($number, \"0\") === 0 )\n return \"+49\".substr($number, 1);\n if( strpos($number, \"+\") === 0 ){\n return $number;\n }\n return \"+496659\".$number;\n}", "function nrua_sanitize_phone_number( $phone_mobile )\n{\n\t// = Remove all non int chars\n\t$phone_mobile = filter_var( $phone_mobile, FILTER_SANITIZE_NUMBER_INT );\n\t$phone_mobile = str_replace(\"+\", \"\", $phone_mobile);\n\t$phone_mobile = str_replace(\"-\", \"\", $phone_mobile);\n\t\n\t// = Add the international char\n\t$phone_mobile = '+' .$phone_mobile;\n\t\n\t// = Check lenght\n\tif ( ( strlen( $phone_mobile ) < 10 ) || ( strlen( $phone_mobile ) > 14 ) ) \n\t{\n\t\t$phone_mobile = null;\n\t}\n\t\n\treturn $phone_mobile;\n}", "private function correctNumbers() {\n $prefix = '+'.self::COUNTRY_CODE;\n for($i=0; $i < count($this->arNumbers); $i++) {\n if(strpos($this->arNumbers[$i], $prefix) === FALSE){\n if(strpos($this->arNumbers[$i], self::COUNTRY_CODE) === 0)\n $this->arNumbers[$i] = str_replace(self::COUNTRY_CODE, '', $this->arNumbers[$i]); \n $this->arNumbers[$i] = $prefix.$this->arNumbers[$i];\n }\n } \n }", "public static function unmaskCPF_CNPJ($_input = NULL) {\n\n return self::getNumbers($_input);\n }", "function process($callnum)\n{\n // Make all alphabets uppercase\n $callnum = strtoupper($callnum);\n\n // Delete the year of the call number if exist (the year must have a space\n // in front, starts with digit 1 or 2, and may or may not have a single\n // character after the year. It must also consist of more than 2 parts.\n if (count_parts($callnum) > 2) {\n $pattern = '/ [12]\\d\\d\\d[A-Za-z]{0,1}$/';\n $replacement = '';\n $callnum = preg_replace($pattern, $replacement, $callnum);\n }\n\n // Replace the decimal to *, to easily identify decimals\n $pattern = '/([\\d])\\.([\\d])/';\n $replacement = '$1*$2';\n $callnum = preg_replace($pattern, $replacement, $callnum);\n\n // Delete all occurence of '.' and ' '\n // Note that the decimal is still in place because of the '*'\n $pattern = '/[\\. ]/';\n $replacement = '';\n $callnum = preg_replace($pattern, $replacement, $callnum);\n\n return $callnum;\n}", "function mswReverseTicketNumber($num) {\n return ltrim($num,'0');\n}", "private static function formatPhoneNumber($phone_number)\n {\n return ereg_replace(\"[^0-9]\", '', $phone_number);\n }", "function justAlphanumeric($var)\n{\n return preg_replace('/[^0-9A-Za-z]/', '', $var);\n}", "function vCC( $cc )\r\n\t\t{\r\n\t\t\t#eg. 718486746312031\r\n\t\t\treturn preg_match('/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6011[0-9]{12}|3(?:0[0-5]|[68][0-9])[0-9]{11}|3[47][0-9]{13})$/', $cc);\r\n\t\t\t\r\n\t\t}", "function OnlyNumericSolution($Number) {\r\n// Ensure number is no more than 19 characters long.\r\n return substr(ereg_replace('[^0-9]', '', $Number) , 0, 19);\r\n }", "static function cleanaddress($address) {\n\t\t$address = trim($address,',');\n\t\t// remove suite suffix\n\t\t$address = preg_replace('/((Ste|Suite|PO|POBOX|PO Box|ll|office|room|floor)([ \\-\\.\\:]+)([0-9]+))/ie','',$address);\n\t\t// remove any prefix, before the numbers (like the mall name\n\t\t$address = preg_replace('/^([a-z ]+)([0-9]+)/i','${2}',$address);\n\t\t// clean whitespace\n\t\t$address = preg_replace('/\\t/', ' ',$address);\n\t\t$address = str_replace(\"\\n\",' ',$address);\n\t\t$address = preg_replace('/\\s\\s+/', ' ',$address);\n\t\t// clean double-commas\n\t\t$address = str_replace(',,', ', ',$address);\n\t\t$address = str_replace(', ,', ', ',$address);\n\t\t// clean whitespace (again)\n\t\t$address = preg_replace('/\\s\\s+/', ' ',$address);\n\t\treturn trim($address);\n\t}", "function telto($phone) {\n\treturn str_replace(['+', '(', ')', '-', ' '], '', $phone);\n}", "protected function doClean($value)\n {\n // based on http://stackoverflow.com/questions/406230/regular-expression-to-match-string-not-containing-a-word\n $value = preg_replace('/((?![0-9]).)*/', '', $value);\n\n if (!self::isValidCreditCard($value, $this->options['card_type']))\n {\n throw new sfValidatorError($this, 'invalid', array('value' => $value));\n }\n\n return $value;\n }", "private function strip_agency($id) {\n return preg_replace('/\\D/', '', $id);\n }", "function sanitizeAlphaNum($var)\n{\n return preg_replace('/[^a-zA-Z0-9]/', '', $var);\n}", "function cryptCCNumberDeCrypt( $cifer, $key )\r\n{\r\n\treturn base64_decode($cifer);\r\n}", "public static function filterNumber($value)\n {\n return preg_replace('/[^0-9]/', '', $value);\n }", "protected function filterAlphanum($value) {\n return preg_replace(\"/[^a-z0-9]/i\", \"\", $value);\n }", "function buildCustNo($db_link){\n\t\t// Determine biggest customer ID\n\t\t$sql_maxID = \"SELECT MAX(cust_id) AS maxid FROM customer\";\n\t\t$query_maxID = mysqli_query($db_link, $sql_maxID);\n\t\tcheckSQL($db_link, $query_maxID);\n\t\t$result_maxID = mysqli_fetch_array($query_maxID);\n\n\t\t// Read customer number format\n\t\t$cnParts = explode(\"%\", $_SESSION['set_cno']);\n\t\t$cnCount = count($cnParts);\n\n\t\t// Build customer number\n\t\t$i = 0;\n\t\t$custNo = \"\";\n\t\tfor ($i = 1; $i < $cnCount; $i++) {\n\t\t\tswitch($cnParts[$i]){\n\t\t\t\tcase \"N\":\n\t\t\t\t\t$custNo = $custNo.($result_maxID['maxid'] + 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Y\":\n\t\t\t\t\t$custNo = $custNo.date(\"Y\",time());\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"M\":\n\t\t\t\t\t$custNo = $custNo.date(\"m\",time());\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"D\":\n\t\t\t\t\t$custNo = $custNo.date(\"d\",time());\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$custNo = $custNo.$cnParts[$i];\n\t\t\t}\n\t\t}\n\n\t\t// Return customer number\n\t\treturn $custNo;\n\t}", "function formIsCreditNumber( $number ) { \r\n \r\n $tmp = $number; \r\n $number = preg_replace( \"/[^0-9]/\", \"\", $tmp ); \r\n\r\n if ( preg_match( \"/[^\\d\\s]/\", $number ) ) return 0; \r\n if ( strlen($number) < 13 && 0+$number ) return 0; \r\n\r\n for ($i = 0; $i < strlen($number) - 1; $i++) { \r\n $weight = substr($number, -1 * ($i + 2), 1) * (2 - ($i % 2)); \r\n $sum += (($weight < 10) ? $weight : ($weight - 9)); \r\n } \r\n\r\n if ( substr($number, -1) == (10 - $sum % 10) % 10 ) return $number; \r\n return $number; \r\n}", "function Strip_Bad_chars($input)\n{\n //$output = preg_replace(\"/[^a-zA-Z0-9_-]/\", \"\", $input);\n $output = preg_replace(\"/[^0-9]/\", \"\", $input);\n return $output;\n}", "function remove_nonalphanum( $data ) {\n\t$text = trim( $data, ' ' );\n\t$text = str_replace( ' ', '-', $text );\n\t$text = preg_replace( '/[^A-Za-z0-9-]/', '', $text );\n\treturn strtolower( $text );\n}", "public function sanitize($value): string\n {\n $renavam = parent::sanitize((string) $value);\n if (preg_match(\"/^([0-9]{9})$/\", $renavam)) {\n $renavam = '00' . $renavam;\n }\n\n if (preg_match(\"/^([0-9]{10})$/\", $renavam)) {\n $renavam = '0' . $renavam;\n }\n\n return $renavam;\n }", "public function telephoneNumberCleaning($phoneNumber)\n {\n $phoneNumber = preg_replace(\"/[^0-9]/\", \"\", $phoneNumber);\n\n if (strlen($phoneNumber) > 9) {\n $phoneNumber = preg_replace(\"/^48/\", \"\", $phoneNumber);\n }\n \n return $phoneNumber;\n }", "public static function cc_number_exists_in_str( $str ) {\n\t\t$luhnRegex = <<<EOT\n/\n(?#amex)(3[47][0-9]{13})|\n(?#bankcard)(5610[0-9]{12})|(56022[1-5][0-9]{10})|\n(?#diners carte blanche)(300[0-5][0-9]{11})|\n(?#diners intl)(36[0-9]{12})|\n(?#diners US CA)(5[4-5][0-9]{14})|\n(?#discover)(6011[0-9]{12})|(622[0-9]{13})|(64[4-5][0-9]{13})|(65[0-9]{14})|\n(?#InstaPayment)(63[7-9][0-9]{13})|\n(?#JCB)(35[2-8][0-9]{13})|\n(?#Laser)(6(304|7(06|09|71))[0-9]{12,15})|\n(?#Maestro)((5018|5020|5038|5893|6304|6759|6761|6762|6763|0604)[0-9]{8,15})|\n(?#MasterCard)(5[1-5][0-9]{14})|\n(?#Solo)((6334|6767)[0-9]{12,15})|\n(?#Switch)((4903|4905|4911|4936|6333|6759)[0-9]{12,15})|((564182|633110)[0-9]{10,13})|\n(?#Visa)(4([0-9]{15}|[0-9]{12}))\n/\nEOT;\n\n\t\t$nonLuhnRegex = <<<EOT\n/\n(?#china union pay)(62[0-9]{14,17})|\n(?#diners enroute)((2014|2149)[0-9]{11})\n/\nEOT;\n\n\t\t// Transform the regex to get rid of the new lines\n\t\t$luhnRegex = preg_replace( '/\\s/', '', $luhnRegex );\n\t\t$nonLuhnRegex = preg_replace( '/\\s/', '', $nonLuhnRegex );\n\n\t\t// Remove common CC# delimiters\n\t\t$str = preg_replace( '/[\\s\\-]/', '', $str );\n\n\t\t// Now split the string on everything else and join again so the regexen have an 'easy' time\n\t\t$str = join( ' ', preg_split( '/[^0-9]+/', $str, PREG_SPLIT_NO_EMPTY ) );\n\n\t\t// First do we have any numbers that match a pattern but is not luhn checkable?\n\t\t$matches = array();\n\t\tif ( preg_match_all( $nonLuhnRegex, $str, $matches ) > 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Find potential CC numbers that do luhn check and run 'em\n\t\t$matches = array();\n\t\tpreg_match_all( $luhnRegex, $str, $matches );\n\t\tforeach ( $matches[0] as $candidate ) {\n\t\t\tif ( DataValidator::luhn_check( $candidate ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// All our checks have failed; probably doesn't contain a CC number\n\t\treturn false;\n\t}", "function format_phone($number)\n{\n\t$no = preg_replace('/[^0-9+]/', '', $number);\n\n\tif(strlen($no) == 11 && substr($no, 0, 1) == \"1\")\n\t\t$no = substr($no, 1);\n\telseif(strlen($no) == 12 && substr($no, 0, 2) == \"+1\")\n\t\t$no = substr($no, 2);\n\n\tif(strlen($no) == 10)\n\t\treturn \"(\".substr($no, 0, 3).\") \".substr($no, 3, 3).\"-\".substr($no, 6);\n\telseif(strlen($no) == 7)\n\t\treturn substr($no, 0, 3).\"-\".substr($no, 3);\n\telse\n\t\treturn $no;\n\n}", "private function preparePhone($val)\n {\n /**\n * Only numbers, 7-15 digits.\n */\n $res = preg_replace('/[^0-9]+/', '', $val);\n if (strlen($res) < 7 || strlen($res) > 15) {\n $res = '';\n }\n return $res;\n }", "function fixPostalCode($str = \"\") {\n\t$str = strtoupper($str);\n\t// Remove anything but uppercase letters and numbers.\n\t$str = preg_replace(\"/[^A-Z\\d]/\", \"\", $str);\n\t// Format: A9A 9A9\n\t// Leaves non-postal-code content alone.\n\t$str = preg_replace(\"/([A-Z]\\d[A-Z])(\\d[A-Z]\\d)/\", \"$1 $2\", $str);\n\treturn($str);\n//fixPostalCode\n}", "function sanitize_phone($value, bool $preserveSpaces): string\n{\n if(isNullOrEmpty($value)){\n return '';\n }\n\n $startsWithPlus = starts_withEx($value, '+');\n\n $phone = mb_ereg_replace('([^\\d\\(\\)' . ($preserveSpaces ? '[:space:]' : '') . '])', $preserveSpaces ? ' ' : '', $value);\n $phone = trim($phone);\n\n //revert initial + if needed\n if ($startsWithPlus) {\n $phone = '+' . $phone;\n }\n\n //check for illegal parenthesis\n if ((strpos($phone, '(') !== false || strpos($phone,\n ')') !== false) && !preg_match('/.*\\([[:space:]0-9]{1,}\\)[[:space:]0-9]{1,}/', $phone)\n ) {\n $phone = str_replace(['(', ')'], $preserveSpaces ? ' ' : '', $phone);\n }\n\n //remove multiple spaces\n $phone = str_replace_multiple_spaceEx($phone);\n\n //remove spaces into and around ()\n $phone = str_replace(['( ', ' )', ' (', ') '], ['(', ')', '(', ')'], $phone);\n\n $phone = trim($phone);\n\n return $phone;\n}", "function non_breaking_phone_number() {\r\n\t\tif($this->config['non_breaking_type'] === 'noWrap') {\r\n\t\t\tif(ReTidy::is_clf2()) {\r\n\t\t\t\t//print('here33495905060<br>');\r\n\t\t\t\t//$this->code = preg_replace('/(\\([0-9]{3}\\))(' . $this->spaceRegex . ')+([0-9]{3}\\-[0-9]{4})/is', '<span class=\"noWrap\">$1 $3</span>', $this->code, -1, $a);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((' . $this->spaceRegex . ')+)(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+)([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2 $5 $8 $11</span>$12', $this->code, -1, $a);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((' . implode(\"|\", $this->dashes_array) . ')+)(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2-$5-$8-$11</span>$12', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((\\.)+))(\\(?[0-9]{3}\\)?)((\\.)+)([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2.$5.$8.$11</span>$12', $this->code, -1, $c);\r\n\t\t\t\t\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+)([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2 $5 $8</span>$9', $this->code, -1, $d);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2-$5-$8</span>$9', $this->code, -1, $e);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((\\.)+)([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2.$5.$8</span>$9', $this->code, -1, $f);\r\n\t\t\t\t\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2 $5</span>$6', $this->code, -1, $g);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2-$5</span>$6', $this->code, -1, $h);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2.$5</span>$6', $this->code, -1, $i);\r\n\t\t\t\t\r\n\t\t\t// I am guessing; not necessary\r\n\t\t\t//\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+){0,1}([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '<span class=\"noWrap\">$1 $4 $7</span>', $this->code, -1, $d);\r\n\t\t\t//\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')){0,1}([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '<span class=\"noWrap\">$1-$4-$7</span>', $this->code, -1, $e);\r\n\t\t\t//\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((\\.)+){0,1}([0-9]{3})((\\.)+)([0-9]{4})/is', '<span class=\"noWrap\">$1.$4.$7</span>', $this->code, -1, $f);\r\n\t\t\t\t\r\n\t\t\t//\t$this->code = preg_replace('/([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '<span class=\"noWrap\">$1 $4</span>', $this->code, -1, $g);\r\n\t\t\t//\t$this->code = preg_replace('/([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '<span class=\"noWrap\">$1-$4</span>', $this->code, -1, $h);\r\n\t\t\t//\t$this->code = preg_replace('/([0-9]{3})((\\.)+)([0-9]{4})/is', '<span class=\"noWrap\">$1.$4</span>', $this->code, -1, $i);\r\n\t\t\t} else {\r\n\t\t\t\t//print('here33495905061<br>');\r\n\t\t\t\t//$this->code = preg_replace('/(1((\\.|\\-|' . $this->spaceRegex . ')+)){0,1}(\\(?[0-9]{3}\\)?((\\.|\\-|' . $this->spaceRegex . ')+)){0,1}([0-9]{3}((\\.|\\-|' . $this->spaceRegex . ')+)[0-9]{4})/is', '<span style=\"white-space: nowrap;\">$0</span>', $this->code, -1, $a);\r\n\t\t\t//\t$this->code = preg_replace('/(1((' . $this->spaceRegex . ')+)){0,1}(\\(?[0-9]{3}\\)?((' . $this->spaceRegex . ')+)){0,1}([0-9]{3}((' . $this->spaceRegex . ')+)[0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1 $4 $7 $10</span>', $this->code, -1, $a);\r\n\t\t\t//\t$this->code = preg_replace('/(1)((' . implode(\"|\", $this->dashes_array) . '))(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . '))([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1-$4-$7-$10</span>', $this->code, -1, $b);\r\n\t\t\t//\t$this->code = preg_replace('/(1)((\\.)+){0,1}(\\(?[0-9]{3}\\)?)((\\.)+){0,1}([0-9]{3})((\\.)+)([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1.$4.$7.$10</span>', $this->code, -1, $c);\r\n\t\t\t\t\r\n\t\t\t//\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+){0,1}([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1 $4 $7</span>', $this->code, -1, $d);\r\n\t\t\t//\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')){0,1}([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1-$4-$7</span>', $this->code, -1, $e);\r\n\t\t\t//\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((\\.)+){0,1}([0-9]{3})((\\.)+)([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1.$4.$7</span>', $this->code, -1, $f);\r\n\t\t\t\t\r\n\t\t\t//\t$this->code = preg_replace('/([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1 $4</span>', $this->code, -1, $g);\r\n\t\t\t//\t$this->code = preg_replace('/([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1-$4</span>', $this->code, -1, $h);\r\n\t\t\t//\t$this->code = preg_replace('/([0-9]{3})((\\.)+)([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1.$4</span>', $this->code, -1, $i);\r\n\t\t\t\t\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((' . $this->spaceRegex . ')+)((\\(?[0-9]{3}\\)?)(' . $this->spaceRegex . ')+)([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2 $5 $8 $11</span>$12', $this->code, -1, $a);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((' . implode(\"|\", $this->dashes_array) . ')+)(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2-$5-$8-$11</span>$12', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((\\.)+)(\\(?[0-9]{3}\\)?)((\\.)+)([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2.$5.$8.$11</span>$12', $this->code, -1, $c);\r\n\t\t\t\t\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+)([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2 $5 $8</span>$9', $this->code, -1, $d);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2-$5-$8</span>$9', $this->code, -1, $e);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((\\.)+)([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2.$5.$8</span>$9', $this->code, -1, $f);\r\n\t\t\t\t\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2 $5</span>$6', $this->code, -1, $g);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2-$5</span>$6', $this->code, -1, $h);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2.$5</span>$6', $this->code, -1, $i);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t//print('here33495905062<br>');\r\n\t\t\t//$this->code = preg_replace('/(\\([0-9]{3}\\))(' . $this->spaceRegex . ')+([0-9]{3}\\-[0-9]{4})/is', '$1&nbsp;$3', $this->code, -1, $b);\r\n\t\t//\t$this->code = preg_replace('/(1)((' . $this->spaceRegex . ')+){0,1}(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+){0,1}([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '$1&nbsp;$4&nbsp;$7&nbsp;$10', $this->code, -1, $b);\r\n\t\t//\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+){0,1}([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '$1&nbsp;$4&nbsp;$7', $this->code, -1, $c);\r\n\t\t//\t$this->code = preg_replace('/([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '$1&nbsp;$4', $this->code, -1, $d);\r\n\t//\t\t$this->code = preg_replace('/(1((' . $this->spaceRegex . ')+)){0,1}(\\(?[0-9]{3}\\)?((' . $this->spaceRegex . ')+)){0,1}([0-9]{3}((' . $this->spaceRegex . ')+)[0-9]{4})/is', '$1&nbsp;$4&nbsp;$7&nbsp;$10', $this->code, -1, $a);\r\n\t//\t\t$this->code = preg_replace('/(1)((' . implode(\"|\", $this->dashes_array) . '))(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . '))([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '$1-$4-$7-$10', $this->code, -1, $b);\r\n\t//\t\t$this->code = preg_replace('/(1)((\\.)+){0,1}(\\(?[0-9]{3}\\)?)((\\.)+){0,1}([0-9]{3})((\\.)+)([0-9]{4})/is', '$1.$4.$7.$10', $this->code, -1, $c);\r\n\t\t\t\r\n\t//\t\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+){0,1}([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '$1&nbsp;$4&nbsp;$7', $this->code, -1, $d);\r\n\t//\t\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')){0,1}([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '$1-$4-$7', $this->code, -1, $e);\r\n\t//\t\t$this->code = preg_replace('/(\\(?[0-9]{3}\\)?)((\\.)+){0,1}([0-9]{3})((\\.)+)([0-9]{4})/is', '$1.$4.$7', $this->code, -1, $f);\r\n\t\t\t\r\n\t//\t\t$this->code = preg_replace('/([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})/is', '$1&nbsp;$4', $this->code, -1, $g);\r\n\t//\t\t$this->code = preg_replace('/([0-9]{3})((' . implode(\"|\", $this->dashes_array) . '))([0-9]{4})/is', '$1-$4', $this->code, -1, $h);\r\n\t//\t\t$this->code = preg_replace('/([0-9]{3})((\\.)+)([0-9]{4})/is', '$1.$4', $this->code, -1, $i);\r\n\t\t\t\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(1)((' . $this->spaceRegex . ')+)(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+)([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1$2&nbsp;$5&nbsp;$8&nbsp;$11$12', $this->code, -1, $a);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((' . $this->spaceRegex . ')+)([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1$2&nbsp;$5&nbsp;$8$9', $this->code, -1, $d);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((' . $this->spaceRegex . ')+)([0-9]{4})([^;0-9])/is', '$1$2&nbsp;$5$6', $this->code, -1, $g);\r\n\t\t\t\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(1)((\\.)+)(\\(?[0-9]{3}\\)?)((\\.)+)([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1$2.$5.$8.$11$12', $this->code, -1, $c);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((\\.)+)([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1$2.$5.$8$9', $this->code, -1, $f);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((\\.)+)([0-9]{4})([^;0-9])/is', '$1$2.$5$6', $this->code, -1, $i);\r\n\t\t\tif(ReTidy::is_clf2()) {\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((' . implode(\"|\", $this->dashes_array) . ')+)(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2-$5-$8-$11</span>$12', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2-$5-$8</span>$9', $this->code, -1, $e);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span class=\"noWrap\">$2-$5</span>$6', $this->code, -1, $h);\r\n\t\t\t} else {\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(1)((' . implode(\"|\", $this->dashes_array) . ')+)(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2-$5-$8-$11</span>$12', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])(\\(?[0-9]{3}\\)?)((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2-$5-$8</span>$9', $this->code, -1, $e);\r\n\t\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{3})((' . implode(\"|\", $this->dashes_array) . ')+)([0-9]{4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2-$5</span>$6', $this->code, -1, $h);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$count = $a + $b + $c + $d + $e + $f + $g + $h + $i;\r\n\t\t//$count = $a + $b + $c;\r\n\t\t//var_dump($a, $b, $c, $d, $e);\r\n\t\t$this->logMsgIf(\"non_breaking_phone_number\", $count);\r\n\t}", "function catalogue_format_tel($value) {\n\t$value_array = str_split($value);\n\t$value = '';\n\n\tforeach ($value_array as $char) {\n\t\tif (is_numeric($char) || $char == '+' || $char == '(' || $char == ')') {\n\t\t\t$value .= $char;\n\t\t}\n\t}\n\n\treturn $value;\n}", "function US_phone_number($sPhone)\n {\n $sPhone = ereg_replace(\"[^0-9]\", '', $sPhone);\n if (strlen($sPhone) != 10) return (False);\n $sArea = substr($sPhone, 0, 3);\n $sPrefix = substr($sPhone, 3, 3);\n $sNumber = substr($sPhone, 6, 4);\n $sPhone = \"(\" . $sArea . \")\" . $sPrefix . \"-\" . $sNumber;\n return ($sPhone);\n }", "function fixPhone($str = \"\") {\n\t$str_orig = $str;\n\t$str = preg_replace(\"/[^\\d]/\", \"\", $str);\n\t$str = preg_replace(\"/^(\\d{3})(\\d{3})(\\d{4})$/\", \"$1-$2-$3\", $str);\n\tif ( preg_match(\"/^(\\d{3})-(\\d{3})-(\\d{4})$/\", $str) ) {\n\t\treturn($str);\n\t} else {\n\t\t$str_orig = str_replace(\"'\", \"''\", $str_orig);\n\t\treturn($str_orig);\n\t}\n//fixPhone\n}", "public static function onlyAlphaNum($value)\n {\n return preg_replace('#[^[:alnum:]]#', '', $value);\n }", "public static function fixPostalCode($postalCode)\n {\n return preg_replace(\"/[^0-9]/\", \"\", $postalCode);\n }", "public function unicDigits ($string)\n {\n return preg_replace(\"/[^0-9]/\",\"\", $string);\n }", "public function filter($value) {\n\t\t$value = preg_replace(\"/[^0-9]+/\", \"\", $value);\n\t\t\n\t\t// sformatowanie nipu na ogolny zapis XXX-XXX-XX-XX\n\t\t$value = preg_replace('/([0-9]{3})([0-9]{3})([0-9]{2})([0-9]{2})/i', '$1-$2-$3-$4', $value);\n return $value;\n }", "function cryptCCNumberCrypt( $cc_number, $key )\r\n{\r\n\treturn base64_encode($cc_number);\r\n}", "public function cleanToName($name){\n // Remove empty space\n $name = str_replace(' ', '', $name);\n // Remove special character\n $name = preg_replace('/[^A-Za-z0-9\\-]/', '', $name);\n // Return without numbers\n return preg_replace('/[0-9]+/', '', $name);\n \n }", "private function intlPhone($phone)\n\t{ \n\t\t$norm = preg_replace('~[^0-9]~', '', $phone);\n\n\t\tif (10 === strlen($norm)) {\n\t\t\treturn '1' . $norm; // US\n\t\t}\n\n\t\treturn $norm;\n\t}", "function alphaNumeric($string) {\n\treturn preg_replace(\"/[^a-zA-Z0-9]+/\", \"\", $string);\n}", "function fAlfaNum($string) {\r\n $s = preg_replace(\"[^a-zA-Z0-9_]\", \"\", strtr($string, \"áàãâéêíóôõúüçÁÀÃÂÉÊÍÓÔÕÚÜÇ \", \"aaaaeeiooouucAAAAEEIOOOUUC_\"));\r\n $s = strtr($s, \"_\", \"\");\r\n return $s;\r\n }", "public static function cep($number)\n\t{\n\t\t// Remove o que não for número\n\t\t$number = preg_replace('/\\D/', '', $number);\n\n\t\t// Nenhum formato conhecido\n\t\tif (strlen($number) != 8) {\n\t\t\treturn $number;\n\t\t}\n\n\t\treturn preg_replace('/(\\d{5})(\\d*)/', '$1-$2', $number);\n\t}", "function ntp_no_canon() {\n return '';\n}", "function format($line) {\n return preg_replace(\"/[^A-Za-z0-9]/\", '', $line);\n}", "function scrub($str) {\n\t$str = preg_replace('/[^A-Za-z0-9]/','',$str);\n\treturn $str;\n}", "function normalize_phone($phone)\n {\n $phone = preg_replace('/\\D/', '', $phone);\n return (strlen($phone) > 10) ? $phone : (getenv('PHONE_DEFAULT_COUNTRY_CODE') ?: '91') . $phone;\n }", "protected function numbersOnly( $value )\n {\n return preg_replace('/[^0-9]/', '', $value);\n }", "public static function cleanCoord($coord)\n {\n return preg_replace('/[^\\d.-]/i', \"\", $coord);\n }", "function snmp_fix_numeric($value)\n{\n if (is_numeric($value)) { return $value + 0; } // If already numeric just return value\n\n $numeric = trim($value, \" \\t\\n\\r\\0\\x0B\\\"\");\n list($numeric) = explode(' ', $numeric);\n $numeric = preg_replace('/[^0-9a-z\\-,\\.]/i', '', $numeric);\n // Some retarded devices report data with spaces and commas: STRING: \" 20,4\"\n $numeric = str_replace(',', '.', $numeric);\n if (is_numeric($numeric))\n {\n // If cleaned data is numeric return number\n return $numeric + 0;\n } else {\n // Else return original value\n return $value;\n }\n}", "function GetProperUSN($usn){\r\n\t$formattedusn = preg_replace('/\\s+/', '', $usn);\r\n\t$formattedusn = strtolower($formattedusn);\r\n\treturn $formattedusn;\r\n}", "function formatPhone($num)\n{\n$num = preg_replace('/[^0-9]/', '', $num);\n$len = strlen($num);\n\n\tif($len<=6)\n\t{\n\t\t$num = preg_replace('/([0-9]{3})([0-9]{3})/', ' $1 $2', $num);\t\n\t}\n\telse if(($len>6)&&($len<=9))\n\t{\n\t\t$num = preg_replace('/([0-9]{3})([0-9]{3})([0-9]{1})/', ' $1 $2 $3', $num);\t\n\t}\n\telse if($len == 10)\n\t{\n\t\t$num = preg_replace('/([0-9]{3})([0-9]{3})([0-9]{4})/', ' $1 $2 $3', $num);\n\t}\n\telse if($len>10)\n\t{\n\t\t$num = preg_replace('/([0-9]{3})([0-9]{3})([0-9]{4})([0-9]{1})/', ' $1 $2 $3 $4', $num);\t\n\t}\nreturn $num;\n}", "function in8nPhone($phone_)\n{\n\t//FIX, let it be Nigerian numbers only\n\t$rPLUS = \"/^\\+/\";\n\t//strip the plus, if there\n\t$phone = preg_replace($rPLUS, \"\", $phone_);\n\t$ptn = \"/^0/\"; // Regex\n\t$str = $phone; //\n\t$rpltxt = \"234\"; // Replacement string\n\t$i81n_phone = preg_replace($ptn, $rpltxt, $str);\n\tif (strlen($i81n_phone) != 13) {\n\t return \"\";\n\t\t//return (\"error:SMS to phone number;$i81n_phone not supported\");\n\t} else {\n\t\treturn $i81n_phone;\n\t}\n}", "protected static function remover_formatacao_numero($strNumero) {\n\t\t$strNumero = trim(str_replace(\"R$\", null, $strNumero));\n\n\t\t$vetVirgula = explode(\",\", $strNumero);\n\t\tif (count($vetVirgula) == 1) {\n\t\t\t$acentos = array(\".\");\n\t\t\t$resultado = str_replace($acentos, \"\", $strNumero);\n\t\t\treturn $resultado;\n\t\t} else if (count($vetVirgula) != 2) {\n\t\t\treturn $strNumero;\n\t\t}\n\n\t\t$strNumero = $vetVirgula[0];\n\t\t$strDecimal = mb_substr($vetVirgula[1], 0, 2);\n\n\t\t$acentos = array(\".\");\n\t\t$resultado = str_replace($acentos, \"\", $strNumero);\n\t\t$resultado = $resultado . \".\" . $strDecimal;\n\n\t\treturn $resultado;\n\n\t}", "public static function formatPhone($number){\n \t$phone_numbers = substr($number, -9);\n\n \t\n\n \t//add 254 at the front\n \t$phone_number = '254'.''.$phone_numbers;\n\n \n\n \treturn $phone_number;\n }", "function make_clean($value) {\n\t\t$legal_chars = \"%[^0-9a-zA-Z������� ]%\"; //allow letters, numbers & space\n\t\t$new_value = preg_replace($legal_chars,\"\",$value); //replace with \"\"\n\t\treturn $new_value;\n\t}", "function do_phone() {\n global $phone;\n global $clean_phone;\n $phone = get_field('phone', 'options');\n $clean_phone = preg_replace('/[^0-9]/','',$phone); // Strip out any non-numeric characters to use in the phone link\n}", "public function sanitizeNumber($data){\n $data = filter_var($data, FILTER_SANITIZE_NUMBER_INT);\n return $data;\n }", "function tel_cyf($telstr)\r\n{\r\n $tel = 0; \r\n $i = 0; \r\n $len = strlen($telstr);\r\n while($i < $len)\r\n {\r\n $kr = substr($telstr, $i, 1); \r\n if(is_numeric($kr)) \r\n { \r\n $tel ++; \r\n } \r\n $i ++;\r\n }\r\n return $tel;\r\n}", "function cleanForBundleIdentifier($toClean) {\n $retVal = preg_replace('/[^A-Za-z0-9\\-\\.]/', '', $toClean);\n return $retVal;\n}", "public function setCCNumber($number = '') {\n $cc = array(\n 'x_card_num'=>$this->cleanCCNumber($number),\n );\n $this->NVP = array_merge($this->NVP, $cc); \n }", "function unmaskString($val)\n {\n return preg_replace(\"/[^a-zA-Z 0-9]+/\", \"\", $val);\n }", "public function prepareMobileNb($mobileNumber) {\n\t\t$parts = split ( \"-\", $mobileNumber );\n\t\t$countryCode = $parts [0];\n\t\t$extension = $parts [1];\n\t\t$phoneNumber = $parts [2];\n\t\t\n\t\tif ($extension == \"03\") {\n\t\t\t$finalFormat = $countryCode . \"3\" . $phoneNumber;\n\t\t\treturn $finalFormat;\n\t\t\n\t\t} else {\n\t\t\treturn $countryCode . $extension . $phoneNumber;\n\t\t}\n\t}", "function filter_alphanum($input) {\n return preg_replace(\"/[^a-zA-Z0-9]+/\", \"\", $input);\n}", "function intTOmon($cdn){\n\t\t$cdn = trim($cdn) ;\n\t\t$CadLen = strlen($cdn) ;\n\t\t$Newcdn = \"\";\n\t\tif ($CadLen == 0){$cdn = 0; }\n\t\tif ($CadLen > 3)\n\t \t{\n\t \t\t$cdnDp = \"G\".$cdn;\n\t\t\t\t$mmc = 0;\n\t\t\t\t\tfor ( $i = $CadLen ; $i >= 1 ; $i-- )\n\t\t\t \t{\n\t \t\t\t\t$Newcdn = $cdnDp{$i} . $Newcdn ;\n\t\t\t\t \t\t\t$mmc++ ;\n\t\t\t\t \t\t\tif(( $mmc == 3 ) && ( $i > 1 ))\n\t\t\t\t \t\t\t{\n\t \t\t \t\t\t\t$mmc = 0; \t\n\t \t\t \t\t\t\t$Newcdn = \",\" . $Newcdn ;\n\t \t\t\t} \t\n\t\t \t\t\t}\n\t\t \t\t$cdn = $Newcdn; \n \t\t}\n\t \t$cdn = \"$\" . $cdn . \".00\" ;\n\t\treturn $cdn ;\n\t}\n}", "function remove_version_number() {\n return '';\n}", "function testFormatPhone() {\n\n\t\t$ff = new Cgn_ActiveFormatter('888.123.4567');\n\t\t$phone = $ff->printAs('phone');\n\n\t\t$this->assertEquals('(888) 123-4567', $phone);\n\n setlocale(LC_ALL, 'en_US.UTF-8');\n\t\t$clean = $ff->cleanVar(utf8_encode('abc ABC 999 '.chr(0xF6) .'()()') );\n\t\t$this->assertEquals($clean, 'abc ABC 999 ');\n\n\t}", "function formatAccountNumber($accountNumber){\r\n\t\t$parts = array(0=>2,2=>4,6=>4,10=>4,14=>4,18=>4,22=>4);\r\n\t\tforeach($parts as $key => $val){\r\n\t\t\t$newNumber .= substr($accountNumber, $key, $val).' ';\r\n\t\t}\r\n\t\treturn trim($newNumber);\r\n\t}", "function upload_sanitize_identifier($identifier) {\n\treturn preg_replace('/[^0-9a-zA-Z_-]/im', '', $identifier);\n}", "function verify_creditcard_mod10($strccno = '')\n {\n if (empty($strccno))\n {\n return false;\n }\n $len = mb_strlen($strccno);\n if ($len < 13 OR $len > 16)\n {\n return false;\n }\n $checkdig = (int)$strccno[--$len];\n for ($i=--$len, $sum = 0, $dou = true; $i >= 0; $i--, $dou =! $dou)\n {\n $curdig = (int)$strccno[$i];\n if ($dou)\n {\n $curdig *= 2;\n if ($curdig > 9) $curdig-=9;\n }\n $sum += $curdig;\n }\n if (($checkdig + $sum) % 10 == 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }" ]
[ "0.8084143", "0.7543891", "0.73490924", "0.70768434", "0.6868711", "0.64037097", "0.63835174", "0.6351201", "0.6348136", "0.6306462", "0.61999434", "0.6092688", "0.6074876", "0.6041102", "0.60364217", "0.59928334", "0.596019", "0.593639", "0.5930621", "0.5922269", "0.5916077", "0.5912353", "0.5908119", "0.58878165", "0.5838883", "0.58239233", "0.58080554", "0.5787867", "0.57871056", "0.5767699", "0.57576066", "0.5753743", "0.57446855", "0.57312006", "0.5723201", "0.57104886", "0.568888", "0.56857216", "0.5671357", "0.56670266", "0.5666728", "0.565509", "0.56523764", "0.5642228", "0.564173", "0.5632197", "0.5624664", "0.56171983", "0.56094533", "0.5601395", "0.55819243", "0.5548463", "0.55473524", "0.5540507", "0.55297005", "0.5513794", "0.5506593", "0.55048543", "0.55036926", "0.54836255", "0.5476523", "0.547228", "0.54582703", "0.545223", "0.5444646", "0.5427522", "0.542593", "0.54185617", "0.5416532", "0.5413835", "0.53943914", "0.53923035", "0.5385104", "0.5358891", "0.5356731", "0.5356043", "0.53502876", "0.53500956", "0.53462726", "0.53456134", "0.53194743", "0.531873", "0.53142196", "0.53036803", "0.5302038", "0.5301384", "0.52954", "0.52938646", "0.5291634", "0.52914715", "0.5289076", "0.5287066", "0.5281715", "0.527858", "0.52730155", "0.5267038", "0.5265264", "0.526097", "0.52603567", "0.52593684" ]
0.87696636
0
Get returned result keys
Получить ключи возвращенного результата
public static function getReturnedResultKeys() { return [ 'ip', 'ua', 'browser', 'language', 'platform', 'mobile', 'tablet', 'pc', 'page', 'open', 'close', 'location' ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getKeys();", "public function getKeys() {}", "static function getKeys();", "abstract public function getKeys();", "public function getKeys(): array;", "public function getKeys()\n {\n if ($this->_queryResult === null) {\n return [];\n }\n\n return $this->_queryResult->getKeys();\n }", "public function keys(): array;", "public function keys(): array;", "public function keys(): array;", "public static function keys(): array;", "public function getResultsKeys() {\n return ['lines_after_maximum_allowed_lines',\n 'lines_with_non_matching_values',\n 'lines_with_too_many_values',\n 'lines_with_too_few_values',\n 'lines_with_too_many_characters',\n 'lines_with_non_numeric_values',\n 'lines_with_invalid_labeling',\n 'lines_with_non_unique_label'\n ];\n }", "public function getKeys() {\n\t\treturn $this->getAllKeys();\n\t}", "public function getKeys() {\n return array_keys($this->data);\n }", "public function keys() : array;", "public function keys() : array;", "public function getKeys()\n {\n return $this->getNames();\n }", "public function getAllKey();", "public function keys();", "public function keys();", "public function keys();", "public function keys();", "public function keys();", "public function keys();", "public function getKeys(){\n\t\treturn $this->keys;\n\t}", "public function getKeys() {\n\t\treturn array_keys( $this->array );\n\t}", "public function GetAllKeys()\n {\n return array_keys($this->_keyValPairs);\n }", "public function get_keys() {\n try{\n return array_keys($this->Items);\n }catch(Exception $e){\n throw $e;\n }\n }", "public function getRecordKeys()\n\t{\n\t\t$arKeys = [];\n\t\t$arKey = [];\n\t\tif (Param(\"key_m\") !== NULL) {\n\t\t\t$arKeys = Param(\"key_m\");\n\t\t\t$cnt = count($arKeys);\n\t\t} else {\n\t\t\tif (Param(\"id\") !== NULL)\n\t\t\t\t$arKeys[] = Param(\"id\");\n\t\t\telseif (IsApi() && Key(0) !== NULL)\n\t\t\t\t$arKeys[] = Key(0);\n\t\t\telseif (IsApi() && Route(2) !== NULL)\n\t\t\t\t$arKeys[] = Route(2);\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = [];\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_numeric($key))\n\t\t\t\t\tcontinue;\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}", "public function getRecordKeys()\n\t{\n\t\t$arKeys = [];\n\t\t$arKey = [];\n\t\tif (Param(\"key_m\") !== NULL) {\n\t\t\t$arKeys = Param(\"key_m\");\n\t\t\t$cnt = count($arKeys);\n\t\t} else {\n\t\t\tif (Param(\"IncomeCode\") !== NULL)\n\t\t\t\t$arKeys[] = Param(\"IncomeCode\");\n\t\t\telseif (IsApi() && Key(0) !== NULL)\n\t\t\t\t$arKeys[] = Key(0);\n\t\t\telseif (IsApi() && Route(2) !== NULL)\n\t\t\t\t$arKeys[] = Route(2);\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = [];\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_numeric($key))\n\t\t\t\t\tcontinue;\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}", "function keys() {\n\t\treturn array_keys($this->_cache);\n\t}", "public function valueKeys(): array;", "public function getMetaForignKeys(){\n $stmt = $this->query(self::META_FKEYS_SQL);\n if ($stmt === false){\n return array();\n }\n\n $keys = array();\n foreach ($stmt as $row){\n $keys[$row[0] . '.' . $row[1]] = $row[2] . '.' . $row[3];\n }\n\n return $keys;\n }", "public function getKeys()\n\t{\n\t\treturn array_keys($this->_d);\n\t}", "function getKeys() { \n\tglobal $mysqli;\n\t$sql = \"select keyName from keyValue\";\n\t$res = $mysqli->query($sql);\n\tif (!$res) {\n\t\t//if there was an error, log it and then return null.\n\t\terror_log(\"Error on getKeys select \" . $mysqli->error);\n\t\treturn null;\n\t}\n\n\t$keys = array();\n\twhile( $row = mysqli_fetch_assoc($res)) {\n\t\tarray_push($keys,$row['keyName']);\n\t}\n\treturn $keys;\n}", "public function getKeys() {\n $keys = array();\n foreach($this->mapping as $key => $value) {\n array_push($keys, $value);\n }\n return $keys;\n }", "public function getKeys(): array\n {\n return $this->keys;\n }", "public function getKeys()\n {\n return $this->keys;\n }", "public function getKeys()\n {\n return $this->keys;\n }", "public function getKeys()\n {\n return $this->keys;\n }", "public function getKeys()\n {\n return $this->keys;\n }", "public function getKeys()\n {\n return $this->keys;\n }", "public function keys() {\n\t\treturn array_keys($this->toArray());\n\t}", "public function getIndexableMetaKeys(){\n\t\treturn array_keys( $this->keys );\n\t}", "public function keys() {\n return array_keys($this->_hash);\n }", "function keys()\n {\n return array_keys($this->keyTypes());\n }", "function keys()\n {\n return array_keys($this->keyTypes());\n }", "public function getKeys()\n {\n $this->prepare();\n\n return $this->_keys;\n }", "public function keys()\n\t{\n\t\treturn $this->toBase()->keys();\n\t}", "public function keys()\n {\n return static::from($this->keyR);\n }", "public function getKeys(): array\n {\n $keys = [];\n $arr = $this->items;\n foreach ($arr as $key=>$value) {\n $keys[] = $key;\n }\n return $keys;\n }", "public function getAllKeys()\n {\n $data = $this->request('stats items');\n\n if (empty($data)) {\n return false;\n }\n\n preg_match_all('#STAT items:(?<id>\\d+):number (?<number>\\d+)#', $data, $match);\n\n if (empty($match['id'])) {\n return false;\n }\n\n $keys = [];\n\n foreach ($match['id'] as $index => $slab) {\n $numKeys = (int) $match['number'][$index];\n\n if ($numKeys < 1) {\n continue;\n }\n\n $slabKeys = $this->getAllKeysInSlab($slab);\n\n if (is_array($slabKeys)) {\n $keys = array_merge($keys, $slabKeys);\n }\n }\n\n return $keys;\n }", "function getKeys(){\n\t\ttry{\n\t\t\t$db = getConnection();\n\n\t\t\t$sql = \"SELECT * FROM network_keys WHERE name = ?\";\n\t\t\t$stmt = $db->prepare($sql);\n\t\t\t$stmt->execute(array(\"llsec\"));\n\t\t\t$llsec = $stmt->fetch()['network_key'];\n\n\t\t\t$sql = \"SELECT * FROM network_keys WHERE name = ?\";\n\t\t\t$stmt = $db->prepare($sql);\n\t\t\t$stmt->execute(array(\"dtls\"));\n\t\t\t$dtls = $stmt->fetch()['network_key'];\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t echo $e->getMessage();\n\t }\n\t return array($llsec, $dtls);\n\t}", "public function getKeys()\n {\n $keys = array();\n\n foreach ($this->items as $item) {\n $keys[] = $item['key'];\n }\n\n return $keys;\n }", "public function statKeys()\n {\n \treturn $this->statKeys;\n }", "abstract public function keys(): Seq;", "public function getKeys()\n {\n\t\tforeach ($this->_source as $key => $value)\n\t\t{\n\t\t\t$dummy[] = $key;\n\t\t}\n\t\treturn $dummy;\n }", "public function keys()\n {\n return array_keys($this->list);\n }", "public function retrieveKeys()\n {\n return $this->start()->uri(\"/api/key\")\n ->get()\n ->go();\n }", "public function keys()\n {\n return array_keys($this->_data);\n }", "public function keys()\n {\n return array_keys($this->_data);\n }", "function getAllKeys() {\n return $this->memcached->getAllKeys();\n }", "public function keys()\n {\n return array_keys($this->data);\n }", "public function keys() : array\n {\n return array_keys($this->entries);\n }", "public function getKeys () {\n\n return array_keys($this->values);\n\n }", "public function keys()\n {\n return array_keys($this->parameters);\n }", "public function getNames()\n {\n if($this->isKeycacheInvalid())\n {\n $this->regenerateKeyCache();\n }\n if(is_array($this->__keycacheindex))\n {\n return $this->__keycacheindex;\n }\n return array();\n }", "public function keys(): array {\n return array_keys($this->items);\n }", "public function getRowKeys()\n {\n return $this->row_keys;\n }", "public function getKeys()\n {\n $keys = array_keys($this->cache) + array_keys($this->factories);\n return array_unique($keys);\n }", "public static function keys()\n {\n return static::$keys;\n }", "public function metaKeys(): array\n {\n /** @var HasMetadataInterface $this */\n return Meta::metable(static::class, $this->id)\n ->pluck('key')\n ->toArray();\n }", "public function keys(): array\n {\n return array_keys($this->items);\n }", "public function getKeys()\n {\n $catalog = $this->fetch($this->catalog_key);\n $catalog = \\is_array($catalog) ? $catalog : Array();\n \\ksort($catalog);\n return $catalog;\n }", "public function keys() {\n\t\treturn array_keys($this->_value);\n\t}", "function &keys(){\n\t\tif ( isset($this->_cache[__FUNCTION__]) ) return $this->_cache[__FUNCTION__];\n\t\t$tables =& $this->tables();\n\t\t$out = array();\n\t\tforeach ( array_keys($tables) as $tablename){\n\t\t\t$keys =& $tables[$tablename]->keys();\n\t\t\tforeach ( array_keys($keys) as $fieldname){\n\t\t\t\t$out[$fieldname] =& $keys[$fieldname];\n\t\t\t}\n\t\t}\n\t\t$this->_cache[__FUNCTION__] =& $out;\n\t\treturn $out;\n\t\t\n\t}", "public function getKeys(): array\n {\n return array_keys($this->files);\n }", "public function keys(): array\n {\n\t\treturn array_keys($this->values);\n\t}", "function GetRecordKeys() {\n\t\tglobal $EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$arKeys = array();\n\t\t$arKey = array();\n\t\tif (isset($_POST[\"key_m\"])) {\n\t\t\t$arKeys = $_POST[\"key_m\"];\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (isset($_GET[\"key_m\"])) {\n\t\t\t$arKeys = $_GET[\"key_m\"];\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (!empty($_GET) || !empty($_POST)) {\n\t\t\t$isPost = ew_IsPost();\n\t\t\tif ($isPost && isset($_POST[\"rid\"]))\n\t\t\t\t$arKeys[] = $_POST[\"rid\"];\n\t\t\telseif (isset($_GET[\"rid\"]))\n\t\t\t\t$arKeys[] = $_GET[\"rid\"];\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = array();\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_numeric($key))\n\t\t\t\t\tcontinue;\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}", "function GetDBTableKeys()\n\t{\n\t\tglobal $dal_info;\n\t\tif( !array_key_exists($this->infoKey, $dal_info) || !is_array($dal_info[ $this->infoKey ]) )\n\t\t\treturn array();\n\t\t\n\t\t$ret = array();\n\t\tforeach($dal_info[ $this->infoKey ] as $fname=>$f)\n\t\t{\n\t\t\tif( @$f[\"key\"] )\n\t\t\t\t$ret[] = $fname;\n\t\t}\n\t\treturn $ret;\n\t}", "public function keys() : array {\n return array_keys($this->getArrayCopy());\n }", "public function keys()\n {\n return array_keys($this->getArrayCopy());\n }", "public static function listOfKeys()\n {\n return array_keys((new static)->_all);\n }", "public function keys() {\n\t\treturn array_keys($this->store);\n\t}", "function get_keys($tree=false)\n\t{\n\t\tif(ACCESS_MODEL == \"roles\") {\n\t\t\treturn array_keys($GLOBALS['ACCESS_KEYS']);\n\t\t} else if(ACCESS_MODEL == \"discrete\") {\n\t\t\t$ret = array();\n\t\t\tforeach($GLOBALS['ACCESS_KEYS'] as $k=>$v) {\n\t\t\t\tif($tree) {\n\t\t\t\t\t$ret[] = $k;\n\t\t\t\t\tforeach($v as $vv) $ret[] = \"-- $vv\";\n\t\t\t\t} else {\n\t\t\t\t\tforeach($v as $vv) $ret[] = $vv;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $ret;\n\t\t}\n\t}", "function GetRecordKeys() {\n\t\tglobal $EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$arKeys = array();\n\t\t$arKey = array();\n\t\tif (isset($_POST[\"key_m\"])) {\n\t\t\t$arKeys = ew_StripSlashes($_POST[\"key_m\"]);\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (isset($_GET[\"key_m\"])) {\n\t\t\t$arKeys = ew_StripSlashes($_GET[\"key_m\"]);\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (!empty($_GET) || !empty($_POST)) {\n\t\t\t$isPost = ew_IsHttpPost();\n\t\t\tif ($isPost && isset($_POST[\"gjd_id\"]))\n\t\t\t\t$arKeys[] = ew_StripSlashes($_POST[\"gjd_id\"]);\n\t\t\telseif (isset($_GET[\"gjd_id\"]))\n\t\t\t\t$arKeys[] = ew_StripSlashes($_GET[\"gjd_id\"]);\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = array();\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_numeric($key))\n\t\t\t\t\tcontinue;\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}", "function GetRecordKeys() {\n\t\tglobal $EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$arKeys = array();\n\t\t$arKey = array();\n\t\tif (isset($_POST[\"key_m\"])) {\n\t\t\t$arKeys = ew_StripSlashes($_POST[\"key_m\"]);\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (isset($_GET[\"key_m\"])) {\n\t\t\t$arKeys = ew_StripSlashes($_GET[\"key_m\"]);\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (!empty($_GET) || !empty($_POST)) {\n\t\t\t$isPost = ew_IsHttpPost();\n\t\t\tif ($isPost && isset($_POST[\"IDXDAFTAR\"]))\n\t\t\t\t$arKeys[] = ew_StripSlashes($_POST[\"IDXDAFTAR\"]);\n\t\t\telseif (isset($_GET[\"IDXDAFTAR\"]))\n\t\t\t\t$arKeys[] = ew_StripSlashes($_GET[\"IDXDAFTAR\"]);\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = array();\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_numeric($key))\n\t\t\t\t\tcontinue;\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}", "public function getKeys()\n {\n return array_keys($this->elements);\n }", "public function keys()\n {\n return array_keys($this->collection);\n }", "public static function keys()\n {\n return array_keys(static::values());\n }", "final public static function getKeys(): array\n {\n return array_keys(static::getValues());\n }", "private function getAllCacheKeys(){\n $keys = array();\n foreach ($this->storages as $name => $storage){\n $keys[] = $this->getCacheKey($name);\n }\n return $keys;\n }", "public function all() {\n return array_keys($this->list);\n }", "public function getTableKeys()\n\t{\n\t\treturn array_keys($this->tableObjects);\n\t}", "public function keys()\n {\n return array('id');\n }", "public function keys()\n {\n return array('id');\n }", "public function getAllItems(){\n\n\t\treturn $this->redis_client->keys(\"*\");\n\t}", "function keys();", "public static function getKeys(): array\n {\n return array_keys(self::getConstants());\n }", "public function keys() {\n return array_keys($this->values);\n }", "public function keys()\n {\n return array_keys($this->values);\n }" ]
[ "0.77945185", "0.77771175", "0.7681449", "0.76676846", "0.75974745", "0.7347882", "0.729458", "0.729458", "0.729458", "0.7294162", "0.72029704", "0.71652776", "0.7152434", "0.7105446", "0.7105446", "0.7054161", "0.6992623", "0.69894123", "0.69894123", "0.69894123", "0.69894123", "0.69894123", "0.69894123", "0.6970434", "0.6931754", "0.69099915", "0.69030505", "0.6902332", "0.6892809", "0.6887597", "0.6882114", "0.6876271", "0.6856774", "0.6854791", "0.68413556", "0.6838695", "0.68162936", "0.68162936", "0.68162936", "0.68162936", "0.68162936", "0.68106294", "0.6809446", "0.68002427", "0.6792985", "0.6792985", "0.67922854", "0.67686486", "0.67492586", "0.6744355", "0.6739993", "0.67391104", "0.6738876", "0.67358357", "0.6733597", "0.6712036", "0.67054933", "0.6703043", "0.66981184", "0.66981184", "0.6688456", "0.66833967", "0.66794145", "0.66745436", "0.6632774", "0.6611557", "0.6604636", "0.6570122", "0.65625197", "0.65604335", "0.65161043", "0.6469744", "0.6465985", "0.6452036", "0.6440953", "0.6424455", "0.64191806", "0.641626", "0.6410681", "0.640506", "0.63956445", "0.6387308", "0.637648", "0.6375143", "0.63733554", "0.63578176", "0.6348144", "0.6343811", "0.6334615", "0.6325039", "0.62796503", "0.6266003", "0.6265511", "0.6254247", "0.6254247", "0.62537146", "0.62519336", "0.62467116", "0.62408453", "0.6238893" ]
0.7790886
1
Returns $dat encoded to UTF8
Возвращает $dat, закодированный в UTF8
protected static function utf8Encode($dat) { if (is_string($dat)) { if (mb_check_encoding($dat, 'UTF-8')) { return $dat; } else { return utf8_encode($dat); } } if (is_array($dat)) { $answer = array(); foreach ($dat as $i => $d) { $answer[$i] = self::utf8Encode($d); } return $answer; } return $dat; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function utf8Encode($dat)\n {\n if (is_string($dat)){\n return utf8_encode($dat);\n }\n if (!is_array($dat)){\n return $dat;\n }\n $ret = array();\n foreach ($dat as $i => $d){\n $ret[$i] = $this->utf8Encode($d);\n }\n return $ret;\n }", "function utf8_encode($data)\n{\n}", "private function utf8Encode($data)\n {\n return $data;\n /*\n * if (is_array ( $data )) {\n * foreach ( $data as $key => $value ) {\n * $data [$key] = $this->utf8Encode ( $value );\n * }\n * } else {\n * $data = utf8_encode ( $data );\n * }\n * return $data;\n */\n }", "function win1252_to_utf8($data){\r\n\treturn iconv(\"Windows-1252\", \"UTF-8\", $data);\r\n}", "function html_to_utf8 ($data)\r\n {\r\n return preg_replace(\"/\\\\&\\\\#([0-9]{3,10})\\\\;/e\", '_html_to_utf8(\"\\\\1\")', $data);\r\n }", "public function convertDatabaseToUTF8();", "function convert_data_encodings($known_utf8 = false)\n{\n global $VALID_ENCODING, $CONVERTED_ENCODING;\n $VALID_ENCODING = true;\n\n if ($CONVERTED_ENCODING) {\n return; // Already done it\n }\n\n if (preg_match('#^[\\x00-\\x7F]*$#', serialize($_POST) . serialize($_GET) . serialize($_FILES)) != 0) { // Simple case, all is ASCII\n $CONVERTED_ENCODING = true;\n return;\n }\n\n require_code('character_sets');\n _convert_data_encodings($known_utf8);\n}", "function uni2utf8($uniescape)\n\t{\n\t\t$c = \"\";\n\t\t\n\t\t$n = intval(substr($uniescape, -4), 16);\n\t\tif ($n < 0x7F) {// 0000-007F\n\t\t\t$c .= chr($n);\n\t\t} elseif ($n < 0x800) {// 0080-0800\n\t\t\t$c .= chr(0xC0 | ($n / 64));\n\t\t\t$c .= chr(0x80 | ($n % 64));\n\t\t} else {\t\t\t\t// 0800-FFFF\n\t\t\t$c .= chr(0xE0 | (($n / 64) / 64));\n\t\t\t$c .= chr(0x80 | (($n / 64) % 64));\n\t\t\t$c .= chr(0x80 | ($n % 64));\n\t\t}\n\t\treturn $c;\n\t}", "public static function toDataUS($data){\n\t\t$tmp = explode('/', $data);\n\t\treturn $tmp[2].'-'.$tmp[1].'-'.$tmp[0];\n\t}", "function encodeData($data)\n {\n if (is_array($data)) {\n /*\n * Traitement des tableaux\n */\n foreach ($data as $key => $value) {\n $data[$key] = $this->encodeData($value);\n }\n } else {\n /*\n * Traitement des chaines individuelles\n */\n if ($this->typeDatabase == 'pgsql') {\n if ($this->UTF8 && mb_detect_encoding($data) != \"UTF-8\") {\n $data = mb_convert_encoding($data, 'UTF-8');\n }\n $data = pg_escape_string($data);\n } else {\n $data = addslashes($data);\n }\n }\n return $data;\n }", "protected function utf8Values(&$data)\n {\n foreach ($data as $key => $value)\n {\n // Convert atomic values to UTF-8\n if (!is_array($value))\n {\n $data[$key] = utf8_encode($value);\n }\n\n // Handle nested arrays\n if (is_array($value))\n {\n $this->utf8Values($data[$key]);\n }\n }\n }", "function convert_to_utf8($data, $encoding) {\n if (function_exists('iconv')) {\n $out = @iconv($encoding, 'utf-8', $data);\n }\n else if (function_exists('mb_convert_encoding')) {\n $out = @mb_convert_encoding($data, 'utf-8', $encoding);\n }\n else if (function_exists('recode_string')) {\n $out = @recode_string($encoding .'..utf-8', $data);\n }\n else {\n /* watchdog('php', t(\"Unsupported encoding '%s'. Please install iconv, GNU\nrecode or mbstring for PHP.\", array('%s' => $encoding)), WATCHDOG_ERROR); */\n return FALSE;\n }\n return $out;\n}", "public function convertToUTF8(array|string $data): array|string\n {\n if (is_array($data)) {\n /** @var array|string|null $v */\n foreach ($data as $k => $v) {\n if ($v !== null) {\n $data[$k] = $this->convertToUTF8($v);\n }\n }\n } else {\n $data = Encoding::toUTF8($data);\n }\n return $data;\n }", "function utf8_to_win1252($data){\r\n\treturn iconv(\"UTF-8\", \"Windows-1252\", $data);\r\n}", "abstract public static function encode($data): string;", "public static function encode($data)\n {\n if (is_array($data)) {\n foreach ($data as $key => $value) {\n $data[$key] = self::encode($value);\n }\n } elseif (is_object($data)) {\n foreach ($data as $key => $value) {\n $data->{$key} = self::encode($value);\n }\n } elseif (is_string($data)) {\n if (PHP_VERSION_ID >= 80200) {\n return iconv('windows-1252', 'UTF-8', $data);\n }\n return utf8_encode($data);\n }\n return $data;\n }", "public static function encodeData($data)\n {\n if (preg_match('/[<>&]/', $data)) {\n $data = '<![CDATA[' . $data . ']]>';\n }\n\n $data = preg_replace('/\"/', '\\\"', $data);\n\n return $data;\n }", "public function encode($data);", "public function encode($data);", "public function encode($data);", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "public function encode($data) {}", "function win2utf($val,$always=false) { #trace();\r\n global $ezer_mysql_cp;\r\n if ( $always || !$ezer_mysql_cp || $ezer_mysql_cp=='cp1250' ) {\r\n $val= strtr($val, \"\\x9E\\x9A\\x9D\\x8E\\x8A\\x8D\", \"\\xBE\\xB9\\xBB\\xAE\\xA9\\xAB\");\r\n $val= mb_convert_encoding($val,'UTF-8','ISO-8859-2');\r\n }\r\n return $val;\r\n}", "public function encode($data) {\n return serialize($data);\n }", "private function uniConvert ()\n\t\t{\n\t\t\t return preg_replace(\"/\\\\\\\\u([a-f0-9]{4})/e\",\n \"iconv('UCS-4LE','UTF-8',pack('V', hexdec('U$1')))\",\n json_encode($this->result));\n\t\t}", "protected final function _encodeUnsynchronisation(&$data)\n {\n $result = \"\";\n for ($i = 0, $j = 0; $i < strlen($data) - 1; $i++)\n if (ord($data[$i]) == 0xff &&\n ((($tmp = ord($data[$i + 1])) & 0xe0) == 0xe0 || $tmp == 0x0)) {\n $result .= substr($data, $j, $i + 1 - $j) . \"\\0\";\n $j = $i + 1;\n }\n return $result . substr($data, $j);\n }", "private static function sample_convert($data) {\n return implode(\"\\x1f\", $data);\n }", "abstract function encode($data);", "protected function _getToUnicode() {}", "abstract public function encode($data);", "public function dataToUS($data) {\n\n $transformado = substr($data, 6, 4) . \"-\" . substr($data, 3, 2) . \"-\" . substr($data, 0, 2);\n $transformado = ($transformado == \"--\") ? \"\" : $transformado;\n\n return $transformado;\n }", "public static function toUTF8($obj, $data_codepage = null)\n\t{\n\t\t// Array || object\n\t\tif(is_array($obj) || is_object($obj)){\n\t\t\tforeach($obj as $key => &$val){\n\t\t\t\t$val = self::toUTF8($val, $data_codepage);\n\t\t\t}\n\t\t\tunset($key, $val);\n\t\t\t\n\t\t\t//String\n\t\t}else{\n\t\t\tif(!preg_match('//u', $obj) && function_exists('mb_detect_encoding') && function_exists('mb_convert_encoding')){\n\t\t\t\t$encoding = mb_detect_encoding($obj);\n\t\t\t\t$encoding = $encoding ? $encoding : $data_codepage;\n\t\t\t\tif($encoding)\n\t\t\t\t\t$obj = mb_convert_encoding($obj, 'UTF-8', $encoding);\n\t\t\t}\n\t\t}\n\t\treturn $obj;\n\t}", "function escape_data($data) {\n\n\tif (ini_get('magic_quotes_gpc')) {\t# Controllo se è attivata la modaltà Magic Quotes (che immette dei caratteri \"|\" prima di eventuali apici\n\t\t$data=stripslashes($data);\t# Tolgo i caratteri \"|\" inseriti da Magic Quotes con la funzione stripslashes\n\t\t}\n\treturn $data; # Ritorno la stringa formattata correttamente\n\t}", "function convert_to_utf8($obj)\n{\n global $config;\n $ret = $obj;\n // wenn die Verbindung zur Datenbank nicht auf utf8 steht, dann muessen die Rückgaben in utf8 gewandelt werden,\n // da die Webseite utf8-kodiert ist\n if (!isset($config['mysql_can_change_encoding'])) {\n get_sql_encodings();\n }\n\n if ($config['mysql_can_change_encoding'] == false && $config['mysql_standard_character_set'] != 'utf8') {\n if (is_array($obj)) {\n foreach ($obj as $key => $val) {\n //echo \"<br> Wandle \" . $val . \" nach \";\n $obj[$key] = utf8_encode($val);\n //echo $obj[$key];\n }\n }\n if (is_string($obj)) {\n $obj = utf8_encode($obj);\n }\n $ret = $obj;\n }\n\n return $ret;\n}", "protected function pack($data): string\n {\n return \\serialize($data);\n }", "protected function sanitizeUTF8(&$data) {\n if (!isset($this->iconvAvailable)) {\n $this->iconvAvailable = function_exists('iconv');\n }\n\n if ($this->iconvAvailable) {\n array_walk_recursive(\n $data,\n function(&$value) {\n if (is_string($value)) {\n $value = iconv('UTF-8', 'UTF-8//IGNORE', $value);\n }\n }\n );\n }\n }", "function & _wp_iso8859_2_to_utf8(&$string) {\n $decode=array(\n \"\\xA1\" => \"\\xC4\\x84\",\n \"\\xB1\" => \"\\xC4\\x85\",\n \"\\xC6\" => \"\\xC4\\x86\",\n \"\\xE6\" => \"\\xC4\\x87\",\n \"\\xCA\" => \"\\xC4\\x98\",\n \"\\xEA\" => \"\\xC4\\x99\",\n \"\\xA3\" => \"\\xC5\\x81\",\n \"\\xB3\" => \"\\xC5\\x82\",\n \"\\xD1\" => \"\\xC5\\x83\",\n \"\\xF1\" => \"\\xC5\\x84\",\n \"\\xD3\" => \"\\xC3\\x93\",\n \"\\xF3\" => \"\\xC3\\xB3\",\n \"\\xA6\" => \"\\xC5\\x9A\",\n \"\\xB6\" => \"\\xC5\\x9B\",\n \"\\xAC\" => \"\\xC5\\xB9\",\n \"\\xBC\" => \"\\xC5\\xBA\",\n \"\\xAF\" => \"\\xC5\\xBB\",\n \"\\xBF\" => \"\\xC5\\xBC\",\n );\n $string = strtr(\"$string\",$decode);\n return $string;\n }", "public static function encode($data) {\n\t\treturn \"<?php\\n\\n\\$data = \" . var_export($data, true) . \";\\n\\n?>\\n\";\n\t}", "function utf8ize($d) {\n if (is_array($d)) {\n foreach ($d as $k => $v) {\n $d[$k] = utf8ize($v);\n }\n } else if (is_string ($d)) {\n return utf8_encode($d);\n }\n return $d;\n}", "function readUTF();", "function escByteA($binData) {\n\t\t/**\n\t\t* \\134 = 92 = backslash, \\000 = 00 = NULL, \\047 = 39 = Single Quote\n\t\t*\n\t\t* str_replace() replaces the searches array in order.\n\t\t* Therefore, we must\n\t\t* process the 'backslash' character first. If we process it last, it'll\n\t\t* replace all the escaped backslashes from the other searches that came\n\t\t* before. tomATminnesota.com\n\t\t*/\n\t\t$search = array(chr(92), chr(0), chr(39));\n\t\t$replace = array('\\\\\\134', '\\\\\\000', '\\\\\\047');\n\t\t$binData = str_replace($search, $replace, $binData);\n\t\treturn $binData;\n\t}", "function utf8init()\n{\n mb_internal_encoding('UTF-8');\n\n // Tell PHP that we'll be outputting UTF-8 to the browser\n mb_http_output('UTF-8');\n\n //$str = json_encode($arr, JSON_UNESCAPED_UNICODE); //这样我们存进去的是就是中文了,那么取出的也就是中文了\n\n}", "public function array2json($data) {\n\t\tif(function_exists('json_encode')) return json_encode($data); //Lastest versions of PHP already has this functionality.\n\t\tif( is_array($data) || is_object($data) ) {\n $islist = is_array($data) && ( empty($data) || array_keys($data) === range(0,count($data)-1) );\n\n if( $islist ) {\n $json = '[' . implode(',', array_map('array2json', $data) ) . ']';\n } else {\n $items = Array();\n foreach( $data as $key => $value ) {\n $items[] = $this->array2json(\"$key\") . ':' . $this->array2json($value);\n }\n $json = '{' . implode(',', $items) . '}';\n }\n } elseif( is_string($data) ) {\n # Escape non-printable or Non-ASCII characters.\n # I also put the \\\\ character first, as suggested in comments on the 'addclashes' page.\n $string = '\"' . addcslashes($data, \"\\\\\\\"\\n\\r\\t/\" . chr(8) . chr(12)) . '\"';\n $json = '';\n $len = strlen($string);\n # Convert UTF-8 to Hexadecimal Codepoints.\n for( $i = 0; $i < $len; $i++ ) {\n\n $char = $string[$i];\n $c1 = ord($char);\n\n # Single byte;\n if( $c1 <128 ) {\n $json .= ($c1 > 31) ? $char : sprintf(\"\\\\u%04x\", $c1);\n continue;\n }\n\n # Double byte\n $c2 = ord($string[++$i]);\n if ( ($c1 & 32) === 0 ) {\n $json .= sprintf(\"\\\\u%04x\", ($c1 - 192) * 64 + $c2 - 128);\n continue;\n }\n\n # Triple\n $c3 = ord($string[++$i]);\n if( ($c1 & 16) === 0 ) {\n $json .= sprintf(\"\\\\u%04x\", (($c1 - 224) <<12) + (($c2 - 128) << 6) + ($c3 - 128));\n continue;\n }\n\n # Quadruple\n $c4 = ord($string[++$i]);\n if( ($c1 & 8 ) === 0 ) {\n $u = (($c1 & 15) << 2) + (($c2>>4) & 3) - 1;\n\n $w1 = (54<<10) + ($u<<6) + (($c2 & 15) << 2) + (($c3>>4) & 3);\n $w2 = (55<<10) + (($c3 & 15)<<6) + ($c4-128);\n $json .= sprintf(\"\\\\u%04x\\\\u%04x\", $w1, $w2);\n }\n }\n } else {\n # int, floats, bools, null\n $json = strtolower(var_export( $data, true ));\n }\n return $json;\n\t}", "function db_driver_unescape($data)\n{\n global $_db;\n\n $data = regexp_replace('(^\\'|\\'$)', '', $data);\n $data = str_replace('\\'\\'', '\\'', $data);\n\n return $data;\n}", "function win_utf8($s) {\n $utf = \"\";\n for ($i = 0; $i < strlen($s); $i++) {\n $donotrecode = false;\n $c = ord(substr($s, $i, 1));\n if ($c == 0xA8) {\n $res = 0xD081;\n } elseif ($c == 0xB8) {\n $res = 0xD191;\n } elseif ($c < 0xC0) {\n $donotrecode = true;\n } elseif ($c < 0xF0) {\n $res = $c + 0xCFD0;\n } else {\n $res = $c + 0xD090;\n }\n $c = ($donotrecode) ? chr($c) : (chr($res >> 8) . chr($res & 0xff));\n $utf .= $c;\n }\n return $utf;\n }", "public function getEncoded();", "function utf8_to_iso_8859_1() {\r\n\t\t$result = preg_match('/<meta http\\-equiv=\"[Cc]ontent\\-[Tt]ype\" content=\"text\\/html;\\s*charset\\s*=\\s*utf\\-8\"/is', $this->code, $encoding_matches);\r\n\t\tif($result) {\r\n\t\t\t$this->code = iconv(\"UTF-8\", \"CP1252\" . \"//TRANSLIT\", $this->code);\r\n\t\t\t$this->code = htmlspecialchars($this->code);\r\n\t\t\t$this->code = htmlentities($this->code);\r\n\t\t\t$this->code = htmlspecialchars_decode($this->code);\r\n\t\t\t$this->code = htmlspecialchars_decode($this->code);\r\n\t\t\t$this->code = preg_replace('/<meta http\\-equiv=\"[Cc]ontent\\-[Tt]ype\" content=\"text\\/html;\\s*charset\\s*=\\s*utf\\-8\"/is', '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"', $this->code);\r\n\t\t}\r\n\t}", "function utf8($x){\n\t#return is_string($x)?utf8_encode($x):$x;\n\treturn $x;\n}", "private function _dump($data)\n\t{\n\t\tfor ($i = 0; $i < strlen($data); $i++) {\n\t\t\techo sprintf('%02X', ord($data[$i])) . ' ';\n\t\t}\n\t}", "function js_thai_encode($data)\n{\n if (is_array($data))\n {\n foreach($data as $a => $b)\n {\n if (is_array($data[$a]))\n {\n $data[$a] = js_thai_encode($data[$a]);\n }\n else\n {\n $data[$a] = iconv(\"tis-620\",\"utf-8\",$b);\n }\n }\n }\n else\n {\n $data =iconv(\"tis-620\",\"utf-8\",$data);\n }\n return $data;\n}", "function __toString(){\n\t\treturn \"UTF-8\";\n\t}", "function seguridad_utf8($entrada){\n\t\tglobal $mysqli;\n\t\treturn addslashes($mysqli -> real_escape_string(nl2br(trim($entrada))));\n\t}", "static function altJsonEncode($data)\n {\n return str_replace(\"'\", \"&#39;\", json_encode($data));\n }", "public function format_data_from_csv($data, $enc) {\n return ( $enc == 'UTF-8' ) ? $data : utf8_encode($data);\n }", "protected function _from_cdata($data)\n\t{\n\t\t// Get the HTML translation table and reverse it\n\t\t$trans_tbl = array_flip(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES));\n\n\t\t// Translate all the entities out.\n\t\t$data = preg_replace_callback('~&#(\\d{1,4});~', function ($match) {\n\t\t\treturn $this->_from_cdata_callback($match);\n\t\t}, $data);\n\t\t$data = strtr($data, $trans_tbl);\n\n\t\treturn $this->trim ? trim($data) : $data;\n\t}", "function _encoding($val)\n{\n\tif ( is_string($val) )\n\t\t$val = iconv('cp1251', 'utf-8', $val);\n\t\n\tif ( is_array($val) )\n\t\tforeach ($val as $k => $v)\n\t\t\t\t$val[$k] = _encoding($v);\n\t\t\t\t\n\treturn $val;\n}", "function echo8($txt) {\n\techo $txt;\n\t//echo utf8_decode($txt);\n}", "function file_get_contents_utf8($fn) {\r\n $content = file_get_contents($fn);\r\n return mb_convert_encoding($content, 'HTML-ENTITIES', \"UTF-8\");\r\n // return iconv(mb_detect_encoding($content, 'UTF-8, ISO-8859-2, ISO-8859-1, ASCII'), true), \"UTF-8\", $content);\r\n}", "public function getEncoding();", "function enc($data)\n {\n return base64_encode($data);\n }", "function seems_utf8($str)\n {\n }", "private function writeUTF8filename($fn,$c){\n $f=fopen($this->dirs.$fn,\"w+\");\n # Now UTF-8 - Add byte order mark\n fwrite($f, pack(\"CCC\",0xef,0xbb,0xbf));\n fwrite($f,$c);\n fclose($f);\n }", "function filterSpecials($data){\n\n if(!$this->isUTF8($data))\n $data = utf8_encode($data);\n $data = htmlspecialchars($data, ENT_QUOTES);\n\n return $data;\n }", "public function encode(array $data): string;", "public function convCharset(array $data): array\n {\n $dbCharset = 'utf-8';\n if ($dbCharset != $this->indata['charset']) {\n $converter = GeneralUtility::makeInstance(CharsetConverter::class);\n foreach ($data as $k => $v) {\n $data[$k] = $converter->conv($v, strtolower($this->indata['charset']), $dbCharset);\n }\n }\n return $data;\n }", "public function aim_encode($data)\r\n\t{\r\n\t\treturn '\"' . preg_replace(\"/([\\\\\\}\\{\\(\\)\\[\\]\\$\\\"])/\", \"\\\\\\\\\\\\1\", $data) . '\"';\r\n\t}", "function caractere_utf_8($num) {\n\tif($num<128)\n\t\treturn chr($num);\n\tif($num<2048)\n\t\treturn chr(($num>>6)+192).chr(($num&63)+128);\n\tif($num<65536)\n\t\treturn chr(($num>>12)+224).chr((($num>>6)&63)+128).chr(($num&63)+128);\n\tif($num<1114112)\n\t\treturn chr($num>>18+240).chr((($num>>12)&63)+128).chr(($num>>6)&63+128). chr($num&63+128);\n\treturn '';\n}", "abstract public function setUTF();", "public function getData(): string\n\t{\n\t\treturn $this->sData;\n\t}", "function to_json($data): string\n {\n return json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);\n }", "public static function removeNonUTF8($data)\n\t{\n\t\t// Array || object\n\t\tif(is_array($data) || is_object($data)){\n\t\t\tforeach($data as $key => &$val){\n\t\t\t\t$val = self::removeNonUTF8($val);\n\t\t\t}\n\t\t\tunset($key, $val);\n\t\t\t\n\t\t\t//String\n\t\t}else{\n\t\t\tif(!preg_match('//u', $data))\n\t\t\t\t$data = 'Nulled. Not UTF8 encoded or malformed.';\n\t\t}\n\t\treturn $data;\n\t}", "function testData(string $data): string\n {\n return htmlspecialchars(stripcslashes(trim($data)));\n }", "function xml_special_char($t_data){\n\n if(preg_match(\"/\\\"/\", $t_data)) str_replace(\"\\\"\", \"&quot\", $t_data);\n elseif(preg_match(\"/'/\", $t_data)) str_replace(\"\\'\", \"&quot\", $t_data);\n elseif(preg_match(\"/&/\", $t_data)) str_replace(\"&\", \"&amp\", $t_data);\n elseif(preg_match(\"/</\", $t_data)) str_replace(\"<\", \"&lt\", $t_data);\n elseif(preg_match(\"/>/\", $t_data)) str_replace(\">\", \"&gt\", $t_data);\n\n return $t_data;\n }", "function convert_to_utf8(string $str): string\n {\n return preg_replace_callback(\n '/\\\\\\\\u([0-9a-fA-F]{4})/',\n static function (array $match): string {\n return mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');\n },\n $str\n );\n }", "function php_compat_pg_escape_bytea($data)\n{\n return str_replace(\n array(chr(92), chr(0), chr(39)),\n array('\\\\\\134', '\\\\\\000', '\\\\\\047'),\n $data);\n}", "public static function toDataBR($data){\n\t\t$tmp = explode('-', $data);\n\t\treturn $tmp[2].'/'.$tmp[1].'/'.$tmp[0];\n\t}", "public static function utf8ize($mixed)\n {\n if (is_array($mixed)) {\n foreach ($mixed as $key => $value) {\n $mixed[$key] = self::utf8ize($value);\n }\n } else {\n if (is_string($mixed)) {\n return utf8_encode($mixed);\n }\n }\n return $mixed;\n }", "function convert_to_utf8($str)\n{\n\t$old_charset = $_SESSION['old_charset'];\n\t\n\tif ($str === null || $str == '' || $old_charset == 'UTF-8')\n\t\treturn $str;\n\n\t$save = $str;\n\n\t// Replace literal entities (for non-UTF-8 compliant html_entity_encode)\n\tif (version_compare(PHP_VERSION, '5.0.0', '<') && $old_charset == 'ISO-8859-1' || $old_charset == 'ISO-8859-15')\n\t\t$str = html_entity_decode($str, ENT_QUOTES, $old_charset);\n\n\tif ($old_charset != 'UTF-8' && !seems_utf8($str))\n\t{\n\t\tif (function_exists('iconv'))\n\t\t\t$str = iconv($old_charset == 'ISO-8859-1' ? 'WINDOWS-1252' : $old_charset, 'UTF-8', $str);\n\t\telse if (function_exists('mb_convert_encoding'))\n\t\t\t$str = mb_convert_encoding($str, 'UTF-8', $old_charset == 'ISO-8859-1' ? 'WINDOWS-1252' : 'ISO-8859-1');\n\t\telse if ($old_charset == 'ISO-8859-1')\n\t\t\t$str = utf8_encode($str);\n\t}\n\n\t// Replace literal entities (for UTF-8 compliant html_entity_encode)\n\tif (version_compare(PHP_VERSION, '5.0.0', '>='))\n\t\t$str = html_entity_decode($str, ENT_QUOTES, 'UTF-8');\n\n\t// Replace numeric entities\n\t$str = preg_replace_callback('/&#([0-9]+);/', 'utf8_callback_1', $str);\n\t$str = preg_replace_callback('/&#x([a-f0-9]+);/i', 'utf8_callback_2', $str);\n\n\t// Remove \"bad\" characters\n\t$str = remove_bad_characters($str);\n\n\treturn $str;//($save != $str);\n}", "public function convPOSTCharset() {}", "public function packData($data) {\n return json_encode($data);\n }", "public function getEncoding(): string;", "public function packerThreeUnpack(string $data): string\n {\n // Separa em dois pedaços\n $partOne = mb_substr($data, 0, 15, \"utf-8\");\n $partTwo = mb_substr($data, 17, null, \"utf-8\");\n return base64_decode($partOne . $partTwo);\n }", "public static function stringify($data)\n\t{\n\t\treturn base64_encode(serialize($data));\n\t}", "private function hex2bin($data){\n $encoded = '';\n $data_arr = str_split($data, 2);\n\n foreach($data_arr as $val){\n $binary = base_convert($val, 16, 2);\n $encoded .= str_pad($binary, 8, '0', STR_PAD_LEFT);\n }\n return $encoded;\n }", "public static function utf7_to_utf8($str)\n {\n $Index_64 = array(\n 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,\n 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,\n 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0,\n 1,1,1,1, 1,1,1,1, 1,1,0,0, 0,0,0,0,\n 0,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1,\n 1,1,1,1, 1,1,1,1, 1,1,1,0, 0,0,0,0,\n 0,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1,\n 1,1,1,1, 1,1,1,1, 1,1,1,0, 0,0,0,0,\n );\n\n $u7len = strlen($str);\n $str = strval($str);\n $res = '';\n\n for ($i=0; $u7len > 0; $i++, $u7len--) {\n $u7 = $str[$i];\n if ($u7 == '+') {\n $i++;\n $u7len--;\n $ch = '';\n\n for (; $u7len > 0; $i++, $u7len--) {\n $u7 = $str[$i];\n\n if (!$Index_64[ord($u7)]) {\n break;\n }\n\n $ch .= $u7;\n }\n\n if ($ch == '') {\n if ($u7 == '-') {\n $res .= '+';\n }\n\n continue;\n }\n\n $res .= self::utf16_to_utf8(base64_decode($ch));\n }\n else {\n $res .= $u7;\n }\n }\n\n return $res;\n }", "public static function change_encoding($data, $input, $output)\n {\n }", "protected function encodeData($data)\n {\n if ($this->base64encode) {\n $data = base64_encode(serialize($data));\n }\n return $data;\n }", "function array_iconv(&$val, $key, $userdata)\n{\n\t$val = mb_convert_encoding($val,$userdata[1],$userdata[0]);\n\t//audit(serialize($userdata),'error');\n}", "public function json_encode_utf8($array)\n {\n $array = json_encode($array);\n\n //normalize $info to utf-8 character\n $array = preg_replace_callback('/\\\\\\\\u([0-9a-f]{4})/i',\n function ($matches){\n $s = mb_convert_encoding(pack('H*',$matches[1]), 'UTF-8', 'UTF-16');\n return $s;\n }, $array);\n\n return $array;\n }", "private function reformatData($data)\n\t{\n\t\t$data = str_replace('<?xml version=\"1.0\" encoding=\"UTF-8\"?>', '', $data);\n\t\t$data = str_replace(array('<', '>'), array('[', ']'), $data);\n\n\t\treturn $data;\n\t}", "public function getData()\n {\n $data = $this->data;\n if ($this->cursor > 0) {\n $data .= $this->workingByte->getData();\n }\n return $data;\n }", "protected function _getData()\n {\n $data = Transform::toUInt8($this->_format);\n foreach ($this->_events as $timestamp => $type)\n $data .= Transform::toUInt8($type) . Transform::toUInt32BE($timestamp);\n return $data;\n }", "function escapeRtf($data) {\n\tif (empty($data)) return $data;\n if (is_array($data)) {\n\t\tforeach($data as $k => $v) $data[$k] = escapeRtf($v);\n } else {\n \t$data = mb_convert_encoding($data,\"UTF-16\",\"UTF-8\");\n\t\t$data = str_split($data,2);\n\t\t$tmp = \"\";\n\t\tforeach($data as $k => $v) $tmp .= '\\u'.(ord($v[0])*256 + ord($v[1])).'?';\n\t\t$data = $tmp;\n \t}\n \treturn $data;\n}", "public static function xml_encoding($data, $registry)\n {\n }", "function & _wp_utf8_to_8859_2(&$string) {\n $decode=array(\n \"\\xC4\\x84\"=>\"\\xA1\",\n \"\\xC4\\x85\"=>\"\\xB1\",\n \"\\xC4\\x86\"=>\"\\xC6\",\n \"\\xC4\\x87\"=>\"\\xE6\",\n \"\\xC4\\x98\"=>\"\\xCA\",\n \"\\xC4\\x99\"=>\"\\xEA\",\n \"\\xC5\\x81\"=>\"\\xA3\",\n \"\\xC5\\x82\"=>\"\\xB3\",\n \"\\xC5\\x83\"=>\"\\xD1\",\n \"\\xC5\\x84\"=>\"\\xF1\",\n \"\\xC3\\x93\"=>\"\\xD3\",\n \"\\xC3\\xB3\"=>\"\\xF3\",\n \"\\xC5\\x9A\"=>\"\\xA6\",\n \"\\xC5\\x9B\"=>\"\\xB6\",\n \"\\xC5\\xB9\"=>\"\\xAC\",\n \"\\xC5\\xBA\"=>\"\\xBC\",\n \"\\xC5\\xBB\"=>\"\\xAF\",\n \"\\xC5\\xBC\"=>\"\\xBF\"\n );\n\n $string = strtr(\"$string\",$decode);\n return $string;\n }", "public function encodeData(array $data)\n\t{\n\t\t$output = array();\n\t\tforeach($data as $key => $value)\n\t\t{\n\t\t\t$output[] = $key . '[' . strlen($value) . ']=' . $value;\n\t\t}\n\n\t\treturn implode('&', $output);\n\t}", "public function encode($data, $leaveEOD = false) {}" ]
[ "0.70902044", "0.6691718", "0.6488349", "0.6484774", "0.63320524", "0.61628664", "0.6086392", "0.60392594", "0.60084146", "0.6004522", "0.5980297", "0.5915582", "0.59041953", "0.5881356", "0.5802224", "0.5793196", "0.575121", "0.573841", "0.573841", "0.573841", "0.5726693", "0.57239455", "0.57239455", "0.57239455", "0.57239455", "0.56644744", "0.56490344", "0.5639338", "0.5603455", "0.5587454", "0.55837613", "0.55702204", "0.55626655", "0.55568457", "0.5548197", "0.55420333", "0.55391103", "0.55339855", "0.5526688", "0.55068994", "0.55063915", "0.5492978", "0.5466971", "0.5443027", "0.5436804", "0.54283756", "0.542366", "0.5411063", "0.53997445", "0.5397026", "0.5384645", "0.5374742", "0.537351", "0.5353963", "0.534726", "0.5333644", "0.5327164", "0.530691", "0.5278486", "0.52687275", "0.5252907", "0.5251046", "0.52479255", "0.5240849", "0.5240141", "0.5235869", "0.5230456", "0.5223432", "0.5219019", "0.5187749", "0.5183028", "0.51740444", "0.51732737", "0.5172529", "0.5172493", "0.5167572", "0.516019", "0.5147112", "0.51425445", "0.51416886", "0.5132334", "0.5128047", "0.51270676", "0.5122872", "0.51188964", "0.51173216", "0.51083136", "0.5102331", "0.5096713", "0.5094297", "0.5089466", "0.5088994", "0.50877196", "0.5074959", "0.5070242", "0.5069596", "0.50594264", "0.50591147", "0.50513756", "0.50468266" ]
0.7488785
0
Get the books by id
Получить книги по идентификатору
public function book($id) { return $this->get("/books/{$id}"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBooks($id) {\n }", "public function getBookById($id) {\n\t\t$book = null;\n\n foreach ($this->db-> query(\"SELECT * FROM book WHERE id=$id\") as $row){\n \n $book = new Book($row['title'], $row['author'], $row['description'], $row['id']);\n }\n\n return $book;\n }", "public function getbookById($id)\n {\n return $this->bookDao->getbookById($id);\n }", "public function getBook($id) {\n // the database using eloquent to return the record with matching id in JSON with 200 as the response code.\n \n if (Book::where('id', $id)->exists()) {\n $book = Book::where('id', $id)->get()->toJson(JSON_PRETTY_PRINT);\n return response($book, 200);\n } else {\n return response()->json([\n \"message\" => \"book not found\"\n ], 404);\n }\n }", "public function show($id)\n {\n //\n return book::where('id', '=', $id)->get();\n }", "public function BooksLS($id){\n\t\t$url = 'http://192.168.1.5:8000/query/bookid/' . $id;\n\t\t$page = file_get_contents($url);\n\t\treturn response()->json(json_decode($page));\n\t}", "public function find(int $id)\n {\n return $this->bookRepo->find($id);\n }", "public function getBookById($id) {\n\n $book = Libro::findOrFail($id);\n\n return $book;\n }", "public function getbookbyId($id){\n\n\t\t\t$this->db->select('id,name, price, author, category, language, ISBN, publish_date')\n\t\t\t\t\t->from('tbl_books')\n\t\t\t\t\t->where('id', $id);\n\n\t\t\t$query = $this->db->get();\n\n\t\t\tif($query->num_rows() == 1){\n\t\t\t\treturn $query->row();\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 0;\t\n\t\t\t}\n\t\t\t\n\t\t}", "public function fetchFindBook($id){\n \tif (!$data = $this->_cache->load('bibliobook' . (int)$id)) {\n $refs = $this->getAdapter();\n $select = $refs->select()\n ->from($this->_name, array('pages_plates','reference','pubID'))\n ->joinLeft('publications','publications.secuid = bibliography.pubID',\n array('publicationtitle' => 'title', 'authors'))\n ->joinLeft('finds','finds.secuid = bibliography.findID', array('id'))\n ->where($this->_name . '.id = ?', $id);\n $data = $refs->fetchAll($select);\n \t$this->_cache->save($data, 'bibliobook' . (int)$id);\n \t}\n return $data;\n }", "public function show($id)\n {\n return $this->book->find($id);\n }", "public function show($id)\n {\n return Book::find($id);\n }", "function get_booksinn($id)\n {\n return $this->db->get_where('booksinn',array('id'=>$id))->row_array();\n }", "function get_book( $id ) {\r\n\t$options = get_option('nowReadingOptions');\r\n\t\r\n\t$id = intval($id);\r\n\t\r\n\t$books = get_books('include=' . $id);\r\n\t\r\n\treturn $books[0];\r\n}", "public function show($id)\n {\n return $this->authorService->findAuthor($id, ['books']);\n }", "public function showbook($id)\n {\n $books = Book::find($id);\n return response(array(\n 'success' => true,\n 'books' =>$books,\n ),200);\n }", "public static function bookDetail($id) {\n\n $detail_book = \"SELECT \"\n . \"c.category_name, \"\n . \"a.book_title, \"\n . \"a.id_book, \"\n . \"b.author_name, \"\n . \"a.book_image, \"\n . \"a.book_subject, \"\n . \"a.book_ISBN, \"\n . \"a.book_price, \"\n . \"a.book_discount \"\n . \"FROM books a \"\n . \"JOIN authors b ON a.id_author=b.id_author \"\n . \"JOIN categories c ON a.id_category=c.id_category \"\n . \"WHERE a.id_book='\" . $id . \"';\";\n\n if ($result = DB::getInstance()->query($detail_book)) {\n if ($result->num_rows > 0) {\n return $result->fetch_array(MYSQLI_ASSOC);\n } else {\n return false;\n }\n } else {\n return false;\n } \n }", "public function publisherBooks($id)\n {\n $publisher = Publisher::where('id', $id)->first();\n\n $books = DB::table('books')\n ->join('categories', 'books.category_id', '=', 'categories.id')\n ->join('authors', 'books.author_id', '=', 'authors.id')\n ->select('books.*', 'categories.name as category', 'authors.name as author')\n ->where('books.publisher_id', $id)\n ->paginate(20);\n\n\n return response()->json(['success' => true, 'publisher' => $publisher, 'books' => $books]);\n }", "public static function getBooksByGenre($id) {\n $query = Book::find()->innerJoin('book_genre', '`book_genre`.`book_id` = `book`.`id`')->innerJoin('genre', '`book_genre`.`genre_id` = `genre`.`id`')->where(['genre_id'=> $id]);\n\n\n // get the total number of articles (but do not fetch the article data yet)\n $count = $query->count();\n\n // create a pagination object with the total count\n $pagination = new Pagination(['totalCount' => $count, 'pageSize' => 2]);\n\n // limit the query using the pagination and retrieve the articles\n $books = $query->offset($pagination->offset)\n ->limit($pagination->limit)\n ->all();\n\n $data['books'] = $books;\n $data['pagination'] = $pagination;\n\n return $data;\n }", "public function show(int $id)\n {\n return new BookResources(Book::with(['user','categories','authors'])->findOrFail($id));\n }", "public function show($id)\n {\n $book = DB::table('books')\n ->join('categories', 'books.category_id', '=', 'categories.id')\n ->select(DB::raw('books.id, books.name, books.author, books.category_id, books.published, books.available, books.user_id'))\n ->where('books.id', $id)\n ->get();\n return response()->json(['status'=>'ok','data'=>$book], 200);\n }", "public function getLivreById($id)\n {\n // En guise de test on passe à cette fonction l'id d'un bouquin qu'on a déjà et si la fonction renvoi rien, c'est qu'elle est bugguée\n $em = $this->getDoctrine()->getManager();\n $livre = $em->getRepository(book::class)->find($id);\n return $livre;\n }", "public function getDataBook($id)\n {\n $books = Book::find($id);\n\n return response()->json($books);\n }", "public function findByBookId($bookId);", "public function get($id)\n {\n return new BookResource(Book::find($id));\n }", "public function getBook ($session, $id) {\n\n // get dummy data if books don't exist\n if (!$session->has('books')) {\n $this->dummyData($session);\n }\n\n return $session->get('books')[$id];\n\n }", "public function getBookId($id)\n {\n return $this->db->get_where($this->table, array('id_book' => $id))->row_array();\n }", "function getById($id)\n\t{\n\t\t$json = @file_get_contents(\"http://api.douban.com/v2/book/\".$id);\n\t\tif($json == null) $json = '{\"msg\":\"book_not_found\",\"code\":6000,\"request\":\"GET \\/v2\\/book\\/'.$id.'\"}';\n\t\t// echo $json;\n\t\t$array = json_decode($json, true);\n\t\treturn $array;\n\t}", "public function getBooks()\n {\n $sql = 'SELECT bookshop_books.id,\n bookshop_books.description,\n bookshop_books.booksName,\n bookshop_books.pubyear,\n bookshop_discounts.id AS discountsId,\n bookshop_discounts.discountsName,\n bookshop_discounts.percent,\n bookshop_books.price,\n bookshop_authors.id AS idAuthors,\n bookshop_authors.authorsName,\n bookshop_genres.id AS idGenres,\n bookshop_genres.genresName\n FROM bookshop_books_to_authors\n INNER JOIN bookshop_books\n ON bookshop_books_to_authors.id_book = bookshop_books.id\n INNER JOIN bookshop_books_to_genres\n ON bookshop_books_to_genres.id_book = bookshop_books.id\n INNER JOIN bookshop_authors\n ON bookshop_books_to_authors.id_author = bookshop_authors.id\n INNER JOIN bookshop_genres\n ON bookshop_books_to_genres.id_genre = bookshop_genres.id\n INNER JOIN bookshop_discounts\n ON bookshop_books.id_discount = bookshop_discounts.id';\n \n $result = $this->db->execute($sql);\n\n if (!$result)\n return $this->error();\n\n return $this->formingBooks($result);\n }", "public function getDataByID($id){\n $query = $this->db->query('select from books where ID');\n }", "public function showOneBook($id)\n {\n // Return list of books\n $book = Book::find($id);\n\n // Return related rating and round it to the nearest whole number\n $rating = round(Book::find($id)->rating->avg('value'));\n\n return response()->json(['books' => $book, 'rating' => $rating]);\n }", "public function getBooks()\n {\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $this->limit = isset($_GET['limit']) ? $_GET['limit'] : $this->limit;\n $offset = $this->limit * ($page - 1);\n\n\n if (USE_ONE_TABLE) {\n $this->table = 'books_authors';\n $sql = \"SELECT * FROM $this->table WHERE `deleted` is NULL LIMIT :limit OFFSET :offset\";\n } else {\n $this->table = 'relations';\n $sql = \"SELECT books.id, book_name, GROUP_CONCAT(name_author SEPARATOR ', ') as 'author' , year, num_pages, about_book, deleted, views, clicks, image\n FROM books \n JOIN relations ON book_id = books.id\n JOIN authors ON authors.id = author_id\n WHERE deleted is NULL \n GROUP BY id\n LIMIT :limit OFFSET :offset\";\n }\n\n $params = [\n [\":limit\", $this->limit, \\PDO::PARAM_INT],\n [\":offset\", $offset, \\PDO::PARAM_INT]\n ];\n return $this->bindAndQuery($sql, $params);\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 show($id)\n {\n $books = $this->bookRepository->show($id);\n\n return response()->json($books);\n }", "public function getAllBooks(){\n $query = \"SELECT * FROM Book;\";\n return $this->getBookDetail($query);\n }", "public function livre($id){\n\t\t$book = DB::select('select * from book where id = ?', [$id]);\n\t\treturn view('get_list', ['book' => $book]);\n\t}", "public function find($id) {\n $sql = \"select * from book where book_id=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n\n if ($row)\n return $this->buildDomainObject($row);\n else\n throw new \\Exception(\"No book matching id \" . $id);\n }", "public function getByTag($id)\n\t{\n\t\t$tags = Tag::with('books')->get()->find($id);\n\t\t$this->layout->content = View::make('books.index', array('books'=>$tags->books));\n\t}", "public function getBookid($book_id){\n $db = new DbConnect();\n $con =$db->connect();\n $books_id = mysqli_real_escape_string($con,$book_id);\n $result = mysqli_query($con,\"SELECT * from book inner join genre ON book.genre_id = genre.genre_id where book.book_id = '$books_id'\");\n $books = mysqli_fetch_array($result,MYSQLI_ASSOC);\n return $books;\n\n }", "public function editBook($id)\n {\n $result = $this->book->find($id);\n\n return $result;\n }", "public function show($id)\n {\n try {\n $book = Book::find($id);\n $this->statusCode = 200;\n $this->statusText = 'success';\n } catch (Exception $e) {\n Log::alert(\"Something went wrong. \" . $e->getMessage());\n }\n\n return response()->json([\n 'status_code' => $this->statusCode,\n 'status' => $this->statusText,\n 'data' => $book == null ?[]:$book // If book is null return empty array\n ]);\n }", "public function userbooks($id)\n {\n try{\n $user = User::find($id);\n $code = 200;\n\n if (empty($user)) {\n $message = 'User was not found';\n } else {\n $message = $user->books()->paginate();\n }\n }catch (\\Exception $e){\n $code = 500;\n $message = 'Error with API: ' . $e->getMessage();\n }finally{\n return Response::json($message, $code);\n }\n }", "public function get_book();", "public function show($id)\n {\n $book = DB::select('SELECT tblbooks.id,tblbooks.name,author_id,\n year_of_publish,\n amount,\n isbn,\n medium,\n image,\n users.name as userName,\n tblcatagories.name as catName\n FROM tblbooks,users,tblcatagories\n WHERE tblbooks.author_id=users.id \n AND cat_id=tblcatagories.id AND tblbooks.id='.$id);\n\n if (sizeof($book) > 0 )\n {\n return view('book.show')->with('book',$book);\n }\n else\n {\n return redirect('/book')->with('error','Book Does not exist!');\n }\n\n }", "public function show($id)\n {\n try {\n $book = Book::with(['category:id,category'])->where('id', $id)->firstOrFail();\n return response()->json($book);\n } catch (ModelNotFoundException $exception) {\n return response()->json(['message' => 'Book not found'], 404);\n }\n }", "public function get($id)\n {\n return DB::table('bukus')->find($id);\n }", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function show($id)\n {\n $book = Book::where('id', $id)->with('user')->first();\n return response()->json($book, 200);\n }", "public function books()\n {\n return $this->get('/books');\n }", "public function show($id) {\n if ($book = Book::find($id)) {\n $review_author = $book->user()->first()->name;\n $book->review_author = $review_author;\n\n // REMOVING USER_ID FROM BOOK FOR SECURITY REASONS\n // unset($book->user_id);\n\n return ['status' => 'found', 'book' => $book];\n };\n return ['status' => 404, \"msg\" => \"Book Not Found\"];\n\n }", "public function show($id) {\n\t\t$book = Book::findOrFail($id);\n\n\t\treturn $this->successResponse($book);\n\t}", "public function getallBooks()\r\n {\r\n $sql = \"SELECT id, name, publisher, year,description FROM book\";\r\n $query = $this->db->prepare($sql);\r\n $query->execute();\r\n\r\n return $query->fetchAll();\r\n }", "public function shows($id)\n {\n $data = Book::find($id);\n return response()->json($data);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function show($id)\n {\n return view('books::show');\n }", "public function show($id)\n {\n return $this->bookingRepository->find($id);\n }", "public function get_by_id($id)\r\n\t{\r\n\t\treturn $this->findByPoperty(array($this->id_field => $id));\r\n\t}", "static function findBookList($id1, $id2) {\n $search_book_list = $GLOBALS['DB']->query(\"SELECT * FROM book_list WHERE author_id = {$id1} AND book_id = {$id2}\");\n $found_books = array();\n $found_book = $search_book_list->fetchAll(PDO::FETCH_ASSOC);\n foreach ($found_book as $book){\n $author_id = $book['author_id'];\n $book_id = $book['book_id'];\n $due_date = $book['due_date'];\n $checkout_patron_id = $book['checkout_patron_id'];\n $id = $book['id'];\n $new_book = new BookList($author_id, $book_id, $due_date, $checkout_patron_id, $id);\n array_push($found_books, $new_book);\n }\n return $found_books;\n }", "public function getBook($isbn);", "public function getBooks(){\n $sql = \"SELECT * FROM book;\";\n $res = mysqli_query($this->link, $sql);\n $books = mysqli_fetch_all($res);\n return $books;\n }", "public function show($id){\n //variabel a digunakan untuk menampilkan hasil\n $a = Booking::find($id);\n return $this->responseHasil(200,true,$a);\n \n }", "public function get( $id );", "function get_by_id($id) {\r\n $this->db->where('id', $id);\r\n return $this->db->get($this->tbl);\r\n }", "public function getBooksByParams($params)\n {\n list($arrParams['idBooks'],\n $arrParams['idAuthors'],\n $arrParams['idGenres']\n ) = explode('/', $params['params'], 4);\n\n $sql = 'SELECT bookshop_books.id,\n bookshop_books.description,\n bookshop_books.booksName,\n bookshop_books.pubyear,\n bookshop_discounts.id AS discountsId,\n bookshop_discounts.discountsName,\n bookshop_discounts.percent,\n bookshop_books.price,\n bookshop_authors.id AS idAuthors,\n bookshop_authors.authorsName,\n bookshop_genres.id AS idGenres,\n bookshop_genres.genresName\n FROM bookshop_books_to_authors\n INNER JOIN bookshop_books\n ON bookshop_books_to_authors.id_book = bookshop_books.id\n INNER JOIN bookshop_books_to_genres\n ON bookshop_books_to_genres.id_book = bookshop_books.id\n INNER JOIN bookshop_authors\n ON bookshop_books_to_authors.id_author = bookshop_authors.id\n INNER JOIN bookshop_genres\n ON bookshop_books_to_genres.id_genre = bookshop_genres.id\n INNER JOIN bookshop_discounts\n ON bookshop_books.id_discount = bookshop_discounts.id';\n\n if ( !$condition = $this->conditionSwitch($sql, $arrParams) )\n return $this->error(404, 63);\n\n $result = $this->db->execute($condition['sql'], ['id' => $condition['id']]);\n\n if (!$result)\n return $this->error();\n\n return $this->formingBooks($result);\n }", "public function getallbooks(){\n\t\t\t$this->db->select('id, name, price, author, category, language, ISBN, publish_date')\n\t\t\t\t\t ->from('tbl_books');\n\t\t\t$this->db->order_by('id', 'desc');\n\n\t\t\t$query = $this->db->get();\n\n\t\t\tif($query->num_rows() > 0){\n\t\t\t\treturn $query->result_array();\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}", "public function get(string $id);", "public function book($id){\n try{\n $id = Crypt::decryptString($id);\n } catch (DecryptException $e) {\n return 'UPD-E0002';\n }\n \n $book = Book::find($id);\n $authors = Author::all()->where('status', NULL);\n return view('bahai.forms.update.book', compact('book', 'authors'));\n }", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);" ]
[ "0.8623019", "0.81779176", "0.8146076", "0.7855995", "0.7847217", "0.7789382", "0.7778965", "0.77668166", "0.7707386", "0.7695172", "0.76458347", "0.7565044", "0.75385535", "0.7455013", "0.7394145", "0.73688716", "0.733261", "0.7307886", "0.73040533", "0.7281313", "0.7171885", "0.7147463", "0.71332455", "0.7120282", "0.7108873", "0.7072395", "0.7053352", "0.70312744", "0.7013689", "0.6985829", "0.6977262", "0.6958457", "0.6949308", "0.6938539", "0.69276094", "0.6897103", "0.6894146", "0.68491817", "0.6846511", "0.6792409", "0.6750256", "0.6747259", "0.67238414", "0.6708314", "0.66669303", "0.66482097", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66427016", "0.66297424", "0.65996957", "0.6595558", "0.6582838", "0.6569163", "0.65499437", "0.6543798", "0.6536632", "0.6531954", "0.6518791", "0.64989454", "0.64947915", "0.6463317", "0.64591026", "0.6450181", "0.6417295", "0.6414838", "0.6403118", "0.64005417", "0.63912255", "0.6378757", "0.6378757", "0.6378757", "0.6378757", "0.6378757", "0.6378757", "0.6378757", "0.6378757", "0.6378757", "0.6378757", "0.6378757", "0.6378757", "0.6378757", "0.6378757" ]
0.8379085
1
Function replaces $name property on position $pos with $new value in string $str
Функция заменяет свойство $name на позиции $pos на значение $new в строке $str
function edit_property(&$str, $new_value, $pos, $name = 'keys') { $prop_str = $this->get_pos_str($new_value); $start = $this->get_start_pos($name) + $pos * ($this->pos_len + $this->d_len); $str = substr($str, 0, $start) . $prop_str . substr($str, $start + strlen($prop_str)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _replaceVariable($str, $pos, $var, $repl)\n {\n $expr = substr($str, $pos, strpos($str, ')', $pos + 1) - $pos + 1);\n $eqsign = strpos($expr, '=');\n if (false !== $eqsign)\n {\n $name = substr($expr, $eqsign + 1, strlen($expr) - $eqsign - 2);\n }\n return substr_replace($str, \"(?P<$name>$repl)\", $pos, strlen($expr));\n }", "function __replace_special_name($leters = array(),$name = \"\", $idx = 0){\n\t\t\n\t\tif(count($leters) > $idx){\n\t\t\t$name = str_replace($leters[$idx][0], $leters[$idx][1], $name);\n\t\t\treturn $this->__replace_special_name($leters,$name,++$idx);\n\t\t}else{\n\t\t\treturn $name;\n\t\t\t\n\t\t}\t\n\t\t\n\t}", "function str_replace_from_offset($search, $replace, $subject, $count = -1, $offset = 0) {\r\n\t\t$substr = substr($subject, $offset);\r\n\t\t$substr = str_replace($search, $replace, $substr, $count);\r\n\t\t$subject = substr($subject, 0, $offset) . $substr;\r\n\t\treturn $subject;\r\n\t}", "private function update_name($new_name) { \n\n\t\tif ($this->_update_item('name',$new_name,'50')) { \n\t\t\t$this->name = $new_name;\n\t\t}\n\n\t}", "public function setName ($name){\n\t\tif($name){\n\t\t\t$this->Item['name'] = substr($name, 0,100);\n\t\t}\n\t}", "function transform_name( $name = '', $type = '' ) {\n $word = array( ' ' => $type, '&' => '' );\n $new = strtr( $name, $word );\n $new = strtolower( $new );\n\n return $new;\n}", "function transform_name( $name = '', $type = '' ) {\n\t$word = array( ' ' => $type, '&' => '' );\n\t$new = strtr( $name, $word );\n $new = strtolower( $new );\n return $new;\n}", "public function updateName($s, $write = true)\n {\n $this->Name = $s;\n if (isset(self::$charges[$s])) {\n $this->CalculatedTotal = self::$charges[$s];\n }\n if ($write) {\n $this->write();\n }\n }", "function setName($existingNames)\n\t{\n\t\t$str = str_word_count(strtolower($this->getLabel()),1);\n\t\t$name = $str[0];\n\t\t$i=0;\n\t\twhile(in_array($name,$existingNames))\n\t\t{\n\t\t\t$i++;\n\t\t\tif(isset($str[$i]))\n\t\t\t{\n\t\t\t\t$name = $name.'_'.$str[$i];\n\t\t\t} \n\t\t\telse\n\t\t\t{ \t\n\t\t\t\t$j=2;\n\t\t\t\twhile(in_array($name.'_'.$j,$existingNames))\n\t\t\t\t{\n\t\t\t\t\t$j++;\n\t\t\t\t}\n\t\t\t\t$name = $name.'_'.$j;\n\t\t\t}\n\t\t}\n\t\t$this->_position = count($existingNames) + 1; \n\t\t$this->_name = $name;\n\t\treturn $this->_name;\n\t}", "public function setName(string $name)\n\t{\n\t\t$this->name=$name; \n\t\t$this->keyModified['name'] = 1; \n\n\t}", "function setName($newName){\n $this->name = \"Glittery \" . $newName;\n }", "function newName($name)\n{\nreturn ' My name is' .$name;\n}", "function name2field($name) {\n return str_replace(\n array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'), array('_a', '_b', '_c', '_d', '_e', '_f', '_g', '_h', '_i', '_j', '_k', '_l', '_m', '_n', '_o', '_p', '_q', '_r', '_s', '_t', '_u', '_v', '_w', '_x', '_y', '_z'), lcfirst($name)\n );\n}", "function replace_credential($credentials, $credName, $newValue)\n\t{\n\t\t$newCredentials = '';\n\t\t$tempCredString = explode(\"'$credName'\", $credentials);\n\t\t$newCredentials = $tempCredString[0] . \"'$credName', '$newValue');\";\n\t\t$tempCredString = explode(\";\", $tempCredString[1]);\n\t\tunset($tempCredString[0]);\n\t\t$tempCredString = implode(';', $tempCredString);\n\t\t$newCredentials = $newCredentials . $tempCredString;\n\t\treturn $newCredentials;\n\t}", "function our_str_replace($find, &$replacements, $subject)\n\n{\n\n $l = strlen($find);\n\n // allocate some memory\n\n $new_subject = str_repeat(' ', strlen($subject));\n\n $new_subject = '';\n\n foreach($replacements as $r)\n\n {\n\n if(($pos = strpos($subject, $find)) === false) break;\n\n $new_subject .= substr($subject, 0, $pos).$r;\n\n $subject = substr($subject, $pos+$l);\n\n // the above appears to be the fastest method\n\n //$subject = substr_replace($subject, $r, $pos, $l);\n\n //$subject = substr($subject, 0, $pos).$r.substr($subject, $pos+strlen($find));\n\n }\n\n $new_subject .= $subject;\n\n return $new_subject;\n\n}", "function old_replace_credential($credentials, $credName, $newValue)\n\t{\n\t\t$newCredentials = '';\n\t\t$tempCredString = explode(\"'$credName', '\", $credentials);\n\t\t$newCredentials = $tempCredString[0] . \"'$credName', '\";\n\t\t$tempCredString = explode(\"'\", $tempCredString[1]);\n\t\t$tempCredString[0] = $newValue;\n\t\t$tempCredString = implode(\"'\", $tempCredString);\n\t\t$newCredentials = $newCredentials . $tempCredString;\n\t\treturn $newCredentials;\n\t}", "public function formatName($name);", "public function setName($NewName){\n\t\t// public function __construct($NewName)\n\n\t\t$nameVar = $this->name = $NewName;\n\t\treturn $nameVar;\n\t\t\n\t}", "public function setReplacementId($name, $replacement);", "public function replace($key,$value,$string){\n\t\treturn str_replace(\"::$key::\",$value,$string);\n\t}", "public function set_name($new_name) {\r\n\t\t$this->name = strtoupper($new_name);\r\n\t}", "public function setName($newName) {\n\t\t$newName = filter_var($newName, FILTER_SANITIZE_STRING);\n\n\t\t//Exception if input is only non-sanitized string data\n\t\tif($newName === false) {\n\t\t\tthrow (new InvalidArgumentException(\"name is not a valid string\"));\n\t\t}\n\n\t\t//Exception if input will not fit in the database\n\t\tif(strlen($newName) > 128) {\n\t\t\tthrow (new RangeException(\"name is too large\"));\n\t\t}\n\n\t\t//If input is a valid string, save the value\n\t\t$this->name = $newName;\n\t}", "public function setterIze($offset)\n {\n return 'set' . str_replace(' ', '', ucwords(strtr($offset, '_-', ' ')));\n }", "function replace($p, $str){\n $p2 = __t($p)->map(function($x) use($str){return $str;});\n return $p2();\n }", "public function setName($x) { $this->name = $x; }", "function replace($str){\n\t$temp = preg_replace('#([^a-z0-9]+)#i',' ',$str);\n\t$tab = explode(' ',$temp);\n\t$val = null;\n\tfor($i=0; $i<count($tab);$i++){\n\t\tif($i != 0){\n\t\t\t$val .= ucfirst($tab[$i]);\n\t\t}\n\t\telse{\n\t\t\t$val .= $tab[$i];\n\t\t}\n\t}\n\treturn $val;\n}", "public function assign($name, $value)\n {\n $this->_data = str_replace(\"%\" . $name . \"%\", $value, $this->_data);\n return $this;\n }", "public function setName($name, $value)\t{\n\n\t\t\t$this->{$name} = $value;\n\t\t\t\t\n\t\t\t//if (ctype_alnum($name) == true)\n\t\t\t\n\t\t\t//(die('The name of the store should only contain letters');\n\t\t\t\n\t\t\t//$this->name = $name;\n\t\t}", "public function setName($string)\r\n {\r\n $this->_name = $string;\r\n }", "function tpl_modifier_replace($string, $search, $replace)\r\n{\r\n\treturn str_replace($search, $replace, $string);\r\n}", "public function setByName($name, $value, $type = BasePeer::TYPE_FIELDNAME)\n {\n $pos = SanitasiPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n\n $this->setByPosition($pos, $value);\n }", "public function set_name($name);", "public function __set($name, $value) {\n\t\t\tif (isset($this->object->$name) && $name != 'authority') {\n\t\t\t\t\\uri\\actions::modify($this->object, 'replace', $name, $value);\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\t$this->_err('FORBIDDEN', debug_backtrace(), $name);\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t}", "public function update($name)\n {\n foreach ($this->content as $key => $val) {\n if ($val['name'] == $name) {\n $this->content[$key]['city'] = \"siwan\";\n }\n }\n }", "function propertyStringReplace($htmlString, $array) {\n foreach($array as $property => $value) {\n $htmlString = str_replace('%'.$property.'%', $value, $htmlString);\n }\n return $htmlString;\n}", "private function set_name($v)\n\t{\n\t\tUtil::validateArgCount(func_num_args(), 1);\n\t\tUtil::validateType($v, \"string\");\n\t\t$this->m_name = $v;\n\t\t$this->n_name = true;\n\t\treturn $this->m_name;\n\t}", "private function set_name($v)\n\t{\n\t\tUtil::validateArgCount(func_num_args(), 1);\n\t\tUtil::validateType($v, \"string\");\n\t\t$this->m_name = $v;\n\t\t$this->n_name = true;\n\t\treturn $this->m_name;\n\t}", "public function replace(&$input, $args)\n {\n $args = $this->getArgs($args);\n $search = array_keys($args);\n $replace = array_values($args);\n $input = str_replace($search, $replace, $input);\n }", "public function __set($name, $value) {\n if (ctype_alnum($name) && (ctype_digit($name[0]) == FALSE)) {\n $this->$name = $this->db->quote($value);\n $this->properties[$name] = $value;\n }\n }", "public function set_name($new_name) {\r\n\t\tif ($new_name == \"Stefan Sucks\") {\r\n\t\t\t$this->name = $new_name;\r\n\t\t} elseif ($new_name == \"Johnny Fingers\") {\r\n\t\t\tperson::set_name($new_name);\t//\trevert back to the parent's method instead of the child's method\r\n\t\t\t//\tparent::set_name($new_name);\t//\tcould also use \"parent::\"\r\n\t\t}\r\n\t}", "function scss_nameparse($str){\n \n $result = preg_replace_callback (\n \"/\\\\{([^}]+)\\\\}/\", \n function($matches){\n $tmp=explode('||',$matches[1]);\n $param=\\e::request(trim($tmp[0]),isset($tmp[1])?trim($tmp[1]):'');\n return preg_replace(\"/[^a-z0-9_-]/i\",'-',$param);\n }, \n $str);\n // echo $result;\n return $result;\n}", "function set_name(string $name) {\n\t\t$tmp = preg_match('/[^a-zA-Z0-9_-]/', $name);\n\t\tif ($tmp) {\n\t\t\tthrow new ArgException(\"Invalid chars in slide name.\");\n\t\t} else if ($tmp === NULL) {\n\t\t\tthrow new IntException(\"Regex match failed.\");\n\t\t}\n\n\t\t// Check name length.\n\t\tif (strlen($name) === 0) {\n\t\t\tthrow new ArgException(\"Invalid empty slide name.\");\n\t\t} else if (strlen($name) > gtlim('SLIDE_NAME_MAX_LEN')) {\n\t\t\tthrow new ArgException(\"Slide name too long.\");\n\t\t}\n\t\t$this->name = $name;\n\t}", "function stri_replace($find,$replace,$string)\n{\n if(!is_array($find))\n $find = array($find);\n \n if(!is_array($replace))\n {\n if(!is_array($find))\n $replace = array($replace);\n else\n {\n // this will duplicate the string into an array the size of $find\n $c = count($find);\n $rString = $replace;\n unset($replace);\n for ($i = 0; $i < $c; $i++)\n {\n $replace[$i] = $rString;\n }\n }\n }\n foreach($find as $fKey => $fItem)\n {\n $between = explode(strtolower($fItem),strtolower($string));\n $pos = 0;\n foreach($between as $bKey => $bItem)\n {\n $between[$bKey] = substr($string,$pos,strlen($bItem));\n $pos += strlen($bItem) + strlen($fItem);\n }\n $string = implode($replace[$fKey],$between);\n }\n return($string);\n}", "public function stringInsert($str, $insert, $index)\n {\n $str = substr($str, 0, $index) . $insert . substr($str, $index);\n return $str;\n }", "public function setName(string $name);", "public function setName(string $name);", "function updateBracket($con, $input, $spot)\n{\n mysqli_query($con,\"UPDATE ro16 \"\n . \"SET name = '$input' \"\n . \"WHERE spot='$spot'\");\n}", "function setName( &$value )\r\n {\r\n $this->Name = $value;\r\n }", "function setName( &$value )\r\n {\r\n $this->Name = $value;\r\n }", "function name($name)\n {\n $name = utf8ize($name);\n\n /* The shortname is a simple way to make sure people don't use names */\n /* that are too similar */\n /* FIXME: We should handle letters with accents, etc as well - */\n /* setting the character set to utf8 will probably work. */\n $shortname = strtolower(preg_replace('/[_\\W]+/', \"\", $name));\n\n if ($name != $this->name)\n $this->update['name'] = $name;\n if ($shortname != $this->shortname)\n $this->update['shortname'] = $shortname;\n\n $this->name = $name;\n $this->shortname = $shortname;\n\n return true;\n }", "public static function adjustNameCallback($name, $i) {}", "public function setName($val)\n {\n $this->name = $val;\n }", "function smarty_modifier_myreplace($string, $search) {\n\tif (count($search) > 0) {\n\t\t$newstring = strtr($string, $search);\n\t\treturn $newstring;\n\t} else {\n\t\treturn $string;\n\t}\n}", "public function setName($newName){\n\t}", "public function setName(string $newName): void\n {\n $entry = new StringEntry($newName);\n\n // TODO: investigate what to do with string copying\n $this->node->name = $entry->copy()->getRawValue();\n }", "function seoname($name) {\n\tglobal $language_char_conversions, $originals, $replacements;\n\tif ((isset($language_char_conversions)) && ($language_char_conversions == 1)) {\n\t\t$search = explode(\",\", $originals);\n\t\t$replace = explode(\",\", $replacements);\n\t\t$name = str_replace($search, $replace, $name);\n\t}\n\t$name = stripslashes($name);\n\t$name = strtolower($name);\n\t$name = str_replace(\"&\", \"and\", $name);\n\t$name = str_replace(\" \", \"-\", $name);\n\t$name = str_replace(\"---\", \"-\", $name);\n\t$name = str_replace(\"/\", \"-\", $name);\n\t$name = str_replace(\"?\", \"\", $name);\n\t$name = preg_replace( \"/[\\.,\\\";'\\:]/\", \"\", $name );\n\t//$name = urlencode($name);\n\treturn $name;\n}", "private static function format($name, $value)\n {\n return $value ?: ucwords(str_replace('_', ' ', $name));\n }", "abstract protected function prefixName($name);", "abstract protected function prefixName($name);", "public function setName($val) {\n $this->name = $val;\n }", "public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }", "public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }", "public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }", "final public function offsetSet($name, $component)\n\t{\n\t\t$this->addComponent($component, $name);\n\t}", "protected function _setName($name, $value) {}", "public function replace($section, $str) {\n\t\t\treturn \\uri\\actions::modify($this->object, 'replace', $section, $str);\n\t\t}", "public function setName($_name)\n {\n if (is_string($_name)) {\n \t$this->_name = $_name;\n }\n }", "public static function modify($name, $value)\n {\n self::write($name, $value);\n }", "function FormatName ($name) {\n\t\n\t\t//\tStart by lower casing the name\n\t\t$name=MBString::ToLower(MBString::Trim($name));\n\t\t\n\t\t//\tFilter the name through\n\t\t//\tthe substitutions\n\t\tforeach (array(\n\t\t\t'(?<=^|\\\\W)(\\\\w)' => function ($matches) {\treturn MBString::ToUpper($matches[0]);\t},\n\t\t\t'(?<=^|\\\\W)O\\'\\\\w' => function ($matches) {\treturn MBString::ToUpper($matches[0]);\t},\n\t\t\t'(?<=^|\\\\W)(Ma?c)(\\\\w)' => function ($matches) {\treturn $matches[1].MBString::ToUpper($matches[2]);\t}\n\t\t) as $pattern=>$substitution) {\n\t\t\n\t\t\t$pattern='/'.$pattern.'/u';\n\t\t\t\n\t\t\t$name=(\n\t\t\t\t($substitution instanceof Closure)\n\t\t\t\t\t?\tpreg_replace_callback($pattern,$substitution,$name)\n\t\t\t\t\t:\tpreg_replace($pattern,$substitution,$name)\n\t\t\t);\n\t\t\n\t\t}\n\t\t\n\t\t//\tReturn formatted name\n\t\treturn $name;\n\t\n\t}", "public function setByName($name, $value, $type = BasePeer::TYPE_FIELDNAME)\n {\n $pos = BangunanPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n\n $this->setByPosition($pos, $value);\n }", "public function setName($x) {\n $this->name = $x;\n }", "protected function setName($name){\n \n $ret_str = new Path($name);\n if($parent = $name->getParent()){\n \n $ret_str = new Path($parent,$ret_str->getFilename());\n \n }else{\n \n $ret_str = $ret_str->getFilename();\n \n }//if/else\n \n // all directory separators should be url separators...\n $ret_str = str_replace('\\\\','/',$ret_str);\n $this->setField('name',$ret_str);\n \n }", "abstract public function calcultateName($value, $isNew = false, $name = null, array $context = array());", "public static function stringrpl($r,$str){\n\t$temp = substr($str,6);\n\t$out1 = substr_replace($str,\"$r\",6);\n\t$out1 .= $temp;\n\t\n\t$temp = substr($out1,4);\n\t$out = substr_replace($out1,\"$r\",4);\n\t$out .= $temp;\n\treturn $out;\n}", "public function forName();", "public function testMapToName() {\n\t\t$name = 'some_name';\n\t\t$otherName = 'other_name';\n\n\t\t$this->Field->name($name);\n\t\t$this->assertSame($name, $this->Field->mapToName());\n\n\t\t$this->Field->map(null, $otherName);\n\t\t$this->assertSame($otherName, $this->Field->mapToName());\n\t}", "function rectifyName($name){\r\n return getNameForId(getIdForName($name));\r\n}", "public function updateString( Inx_Api_Recipient_Attribute $attr, $sValue );", "public function setNameInP($value, int $position = 6)\n {\n return $this->setField($position, $value);\n }", "public function apply(string $content): string\n {\n $search = '/(?:'.$this->getKey().'=.*)/';\n $replacement = $this->getKey().'='.$this->getValue();\n\n $content = preg_replace($search, $replacement, $content);\n\n if ($this->before) {\n $content = (new Move($this->getKey()))->before($this->before)->apply($content);\n }\n\n if ($this->after) {\n $content = (new Move($this->getKey()))->after($this->after)->apply($content);\n }\n\n return $content;\n }", "public function putString(string $name, ?string $value): string;", "public function setByName($name, $value, $type = BasePeer::TYPE_FIELDNAME)\n {\n $pos = JadwalPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);\n\n $this->setByPosition($pos, $value);\n }", "private function setNameLocation($newName)\n\t {\n\t $this->nameLocation = $newName;\n\t }", "function rename($old_name,$name){\r\n $file = lako_ljson::make_ljson_file($old_name);\r\n $file = $this->loader->locate($file);\r\n $definition = lako::get('ljson')->require_file($file);\r\n $location = dirname($file);\r\n //edit definition\r\n $definition['table'] = $definition['name'] = $name;\r\n lako::get('ljson')->save($location.\"/{$name}\",$definition);\r\n @unlink($file);\r\n }", "public function testReplace1()\n {\n $this->assertEquals(Str::replace('foo', 'oo', 'yy'), 'fyy');\n }", "function joinStr($str, $args){\n\t//$str = '將在%{level}級時解鎖%{name}';\n\tif(preg_match_all(\"/\\%{([\\d\\w\\_]+)}/\", $str, $match)){\n\t\t$r = [];\n\t\t$_args = [];\n\t\tforeach($match[1] as $_m){\n\t\t\t//$r[] = '\".@$args[\"'.$_m.'\"].\"';\n\t\t\t$r[] = \"%s\";\n\t\t\t$_args[] = $args[$_m];\n\t\t}\n\t\t$s = str_replace($match[0], $r, $str);\n\t\t$str = vsprintf($s, $_args);\n\t\t//var_dump(eval('$str = '.$s.';'));\n\t\t//var_dump($str);\n\t\treturn $str;\n\t}else{\n\t\treturn $str;\n\t}\n}", "function set_name($name) { \n $this->name = $name;\n }", "function setName( $value )\n {\n $this->Name = $value;\n }", "public function setName($name) {\n\t\t$this->_name = (string)$name;\n\t}", "public function SetName ($name);", "public function rename()\n\t{\n\t\t$newValue = $this->name;\n\t\t$previousValue = $this->getPreviousValue('name');\n\t\t$fieldName = $this->fieldModel->getName();\n\n\t\t$dbCommand = \\App\\Db::getInstance()->createCommand();\n\t\t$dataReader = (new \\App\\Db\\Query())->select(['tablename', 'columnname', 'fieldid', 'tabid'])\n\t\t\t->from('vtiger_field')\n\t\t\t->where(['fieldname' => $fieldName, 'uitype' => [15, 16, 33]])\n\t\t\t->createCommand()->query();\n\t\twhile ($row = $dataReader->read()) {\n\t\t\t$tableName = $row['tablename'];\n\t\t\t$columnName = $row['columnname'];\n\t\t\t$dbCommand->update($tableName, [$columnName => $newValue], [$columnName => $previousValue])\n\t\t\t\t->execute();\n\t\t\t$dbCommand->update('vtiger_field', ['defaultvalue' => $newValue], ['defaultvalue' => $previousValue, 'fieldid' => $row['fieldid']])\n\t\t\t\t->execute();\n\t\t\t$moduleName = \\App\\Module::getModuleName($row['tabid']);\n\n\t\t\t\\App\\Fields\\Picklist::clearCache($fieldName, $moduleName);\n\t\t\t$eventHandler = new \\App\\EventHandler();\n\t\t\t$eventHandler->setParams([\n\t\t\t\t'fieldname' => $fieldName,\n\t\t\t\t'oldvalue' => $previousValue,\n\t\t\t\t'newvalue' => $newValue,\n\t\t\t\t'module' => $moduleName,\n\t\t\t\t'id' => $this->getId(),\n\t\t\t]);\n\t\t\t$eventHandler->trigger('PicklistAfterRename');\n\t\t}\n\t\t\\App\\Fields\\Picklist::clearCache($fieldName, $this->fieldModel->getModuleName());\n\t}", "protected static function __replace(string $substring, string $replacement, string $str): string {\n\t\treturn str_replace($substring, $replacement, $str);\n\t}", "private function setName($name) {\n if (is_string($name)) {\n $this->name = $name;\n }\n }", "private function setName(string $name)\n {\n $this->name = trim($name);\n }", "function _fixName($field_or_value_name) {\r\n if ($field_or_value_name == \"\")\r\n return \"\";\r\n // convert space into underscore\r\n $result = preg_replace(\"/ /\", \"_\", strtolower($field_or_value_name));\r\n // strip all non alphanumeric chars\r\n $result = preg_replace(\"/\\W/\", \"\", $result);\r\n return $result;\r\n }", "public function setName($name);", "public function setName($name);", "public function setName($name);", "public function setName($name);", "public function setName($name);" ]
[ "0.59950745", "0.5923943", "0.58378243", "0.5704068", "0.5572111", "0.54351354", "0.5431104", "0.5281488", "0.52504885", "0.5223439", "0.52060515", "0.5193551", "0.5186991", "0.5161758", "0.5124974", "0.5110818", "0.5088579", "0.5080547", "0.50745887", "0.5071972", "0.50369227", "0.5015791", "0.4984487", "0.4979421", "0.49678826", "0.49648333", "0.49637112", "0.49634874", "0.4957389", "0.494571", "0.49370423", "0.491779", "0.49116638", "0.48889816", "0.48879978", "0.48844957", "0.48844957", "0.48761633", "0.4872304", "0.48688227", "0.4864176", "0.48640937", "0.48569915", "0.48400226", "0.48372272", "0.48372272", "0.4832718", "0.48270702", "0.48270702", "0.4821622", "0.48155516", "0.48061267", "0.47874397", "0.4778957", "0.47761604", "0.47630256", "0.4755764", "0.4752734", "0.4752734", "0.47514135", "0.47513166", "0.47513166", "0.47513166", "0.474092", "0.473764", "0.47376135", "0.47316977", "0.473155", "0.47293976", "0.47248006", "0.47192973", "0.47134477", "0.47025648", "0.47003138", "0.46976665", "0.46971098", "0.46964163", "0.4693891", "0.46921673", "0.46914917", "0.46902493", "0.4686277", "0.46804824", "0.46771628", "0.46720254", "0.46703196", "0.4665187", "0.46641022", "0.46617433", "0.46565342", "0.4655169", "0.4655017", "0.4644557", "0.46437964", "0.4639736", "0.46396285", "0.46396285", "0.46396285", "0.46396285", "0.46396285" ]
0.7856642
0
Register and load the widget
Зарегистрировать и загрузить виджет
function wpb_load_widget() { register_widget( 'dmv_widget' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpb_load_widget() {\n register_widget( 'lrq_widget' );\n }", "public static function register() {\n\t register_widget( __CLASS__ );\n\t}", "public function register_widget() {\n register_widget( 'WPP_Widget' );\n }", "function abc_load_widget()\n{\n register_widget('awesome_bmi_widget');\n}", "public static function a_widget_init() {\n\t\t\treturn register_widget(__CLASS__);\n\t\t}", "static function register_widget() {\n\t\t\t$classname = get_called_class();\n\t\t\tregister_widget( $classname );\n\t\t}", "function cm_load_widget_r() {\n\tregister_widget( 'cm_widget_r' );\n}", "public function _register_widgets()\n {\n }", "function gardenia_load_widget() {\n\tregister_widget( 'gardenia_widget' );\n}", "function widget_load() {\n\t\tregister_widget('ilgelo_wSocial');\n\t\tregister_widget('ilgelo_wTwitter');\n\t\tregister_widget('ilgelo_banner');\n\t}", "function duende_load_widget() {\n\tregister_widget( 'duende_widget' );\n}", "function load_widget() {\n\n\t\tregister_widget( 'WordpressConnectWidgetActivityFeed' );\n\t\tregister_widget( 'WordpressConnectWidgetComments' );\n\t\tregister_widget( 'WordpressConnectWidgetFacepile' );\n\t\tregister_widget( 'WordpressConnectWidgetLikeBox' );\n\t\tregister_widget( 'WordpressConnectWidgetLikeButton' );\n\t\tregister_widget( 'WordpressConnectWidgetLiveStream' );\n\t\tregister_widget( 'WordpressConnectWidgetLoginButton' );\n\t\tregister_widget( 'WordpressConnectWidgetRecommendations' );\n\t\tregister_widget( 'WordpressConnectWidgetSendButton' );\n\n\t}", "function hotpro_load_widget() {register_widget( 'data_hotpro_widget' );}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "function rs_load_widget()\n{\n\tregister_widget('rs_Widget_Agenda');\n}", "function aw_add_load_widget() {\r\n\t\tregister_widget( 'AW_AddFeed' );\r\n\t}", "function example_load_widgets()\n{\n\tregister_widget('GuildNews_Widget');\n}", "function wpb_load_widget()\n{\n register_widget( 'WC_External_API_Widget' );\n}", "function cwcg_load_widget() {\n register_widget( 'cwcg_test_grid_widget' );\n}", "function load_widget_plugin_name() {\n register_widget( 'widget_plugin_name' );\n}", "protected function registerWidget()\n {\n\t\t$id = $this->options['id'];\n $gridSelector = $this->gridSelector;\n\t\t\n\t\t$view = $this->getView();\n\t\t\n IsotopeAsset::register($view);\n $js = [];\n \n $options = Json::encode($this->clientOptions);\n $js[] = \"var isotopeContainer$id = $('$gridSelector');\";\n $js[] = \"var isotope$id = isotopeContainer$id.isotope($options);\";\n\n $view->registerJs(implode(\"\\n\", $js),$view::POS_READY);\n\t\t\n\t\tif (!empty($this->cssFile)) {\n\t\t\tcall_user_func_array([$view, \"registerCssFile\"], $this->cssFile);\n\t\t} \t\t\n }", "function pre_load_widget() {\n register_widget( 'events_widget' );\n register_widget( 'fundys_widget' );\n}", "function ois_load_widgets() {\r\n register_widget( 'OptinSkin_Widget' );\r\n}", "function wpb_load_widget() {\r\n\tregister_widget( 'wpb_widget' );\r\n}", "function wpb_load_widget()\n{\n register_widget('wpb_widget');\n}", "function d7_schema_info_widget_load_widget() {\n\tregister_widget( 'd7_schema_info_widget' );\n}", "function wpb_load_widget() {\n register_widget( 'wpb_widget' );\n}", "function wpb_load_widget() {\n register_widget( 'wpb_widget' );\n}", "function whichet_load_widget() {\n\tregister_widget( 'WHICHet_widget' );\n\tadd_action( 'wp_enqueue_script', 'WHICHet_scripts' );\n}", "function hw_load_widget() {\n\tregister_widget( 'hw_cal_widget' );\n\tregister_widget( 'hw_custom_post_list_widget' );\n}", "function register_ib_act_widget() {\n\tregister_widget( 'IB_Act_Widget_Widget' );\n}", "function load_type_widget() {\n register_widget( 'custom_type_widget' );\n}", "public function register_widgets() {\n\t\t// Its is now safe to include Widgets files\n\t\t$this->include_widgets_files();\n\n\t\t// Register Widgets\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Hello_World() );\n\t}", "function register_widget($widget)\n {\n }", "function SetWidget() {\n\t\t\n\t\t\tif ( !function_exists('register_sidebar_widget') ) \n\t\t\treturn;\n\t\t\t\n\t\t\t// This registers our widget so it appears with the other available\n\t\t\t// widgets and can be dragged and dropped into any active sidebars.\n\t\t\tregister_sidebar_widget(array('3B Meteo', 'widgets'), array(\"TreBiMeteo\",'WidgetMeteo'));\n\t\t\n\t\t\t// This registers our optional widget control form.\n\t\t\tregister_widget_control(array('3B Meteo', 'widgets'), array(\"TreBiMeteo\",'WidgetMeteoControl'), 450, 325);\n\t\t}", "function bootstrap_side_nav_widget_load_widget() {\n\t\tregister_widget( 'bootstrap_side_nav_widget' );\n\t}", "function wpwl_load_widget() {\n register_widget( 'wpwl_widget' );\n}", "public function register_widgets() {\n\t\t// Its is now safe to include Widgets files\n\t\t$this->include_widgets_files();\n\n\t\t// Register Widgets\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Dropdown() );\n\t}", "public static function widget() {\n require_once( 'includes/widget.php' );\n }", "function suhv_widgets()\n{\n register_widget( 'Suhv_Widgets' );\n}", "function register_broker_widget() {\n register_widget( 'Broker_Widget' );\n}", "function ds_social_load_widget() {\n\tregister_widget( 'ds_social_widget' );\n}", "function msdlab_load_contributor_widget() {\n register_widget('MSDLab_Contributor_Widget');\n}", "public function actionLoadWidget() {\n\t\ttry {\n\t\t\tif (($id = Yii::app()->getRequest()->getQuery(\"medcard\")) == null) {\n\t\t\t\tthrow new CException(\"Can't resolve \\\"medcard\\\" identification number as query parameter\");\n\t\t\t}\n\t\t\tif (Laboratory_Medcard::model()->findByPk($id) == null) {\n\t\t\t\tthrow new CException(\"Unresolved laboratory's medcard identification number \\\"{$id}\\\"\");\n\t\t\t}\n\t\t\t$widget = $this->getWidget(\"AutoForm\", [\n\t\t\t\t\"model\" => new Laboratory_Form_Direction(\"laboratory.treatment.register\", [\n\t\t\t\t\t\"medcard_id\" => $id\n\t\t\t\t])\n\t\t\t]);\n\t\t\t$this->leave([\n\t\t\t\t\"component\" => $widget,\n\t\t\t\t\"status\" => true\n\t\t\t]);\n\t\t} catch (Exception $e) {\n\t\t\t$this->exception($e);\n\t\t}\n\t}", "public function addWidget()\r\n {\r\n }", "function register()\n {\n // Incluimos el widget en el panel control de Widgets\n wp_register_sidebar_widget( 'widget_ultimosp', 'Últimos post por autor', array( 'Widget_ultimosPostPorAutor', 'widget' ) );\n\n // Formulario para editar las propiedades de nuestro Widget\n wp_register_widget_control('widget_ultimos_autor', 'Últimos post por autor', array( 'Widget_ultimosPostPorAutor', 'control' ) );\n }", "function lastfm_load_widget() {\n\tregister_widget( 'lastfm_widget' );\n}", "function load_twitticker_widgets() {\n\tregister_widget( 'twitticker_widget' );\n}", "function register_dc_widget() {\n\t\tregister_widget( 'dc_linked_image' );\n\t\tregister_widget( 'dc_widget_link_text' );\n\t}", "function green_widget_twitter_load() {\n\tregister_widget( 'green_widget_twitter' );\n}", "public static function init()\n {\n add_action( 'widgets_init', array(__CLASS__, 'register') );\n }", "function wpzh_load_widget() {\n register_widget( 'sliderHTML2' ); \n}", "public function register($widget)\n {\n }", "function wpc_load_widget()\n{\n register_widget('expat_category_widget');\n}", "function twitterfollowbutton_load_widgets() {\r\n\tregister_widget( 'twitterfollowbutton_Widget' );\r\n}", "function FM_WebCam_WidgetInit() {\r\n register_widget('FM_WebCam_Widget');\r\n }", "public function register() {\n if( ! $this->activated( 'media_widget' ) ) return;\n\n $media_widget = new MediaWidget();\n $media_widget->register();\n }", "function wpb_load_widget() {\n register_widget( 'recent_post_widget' );\n }", "function custom_register_widget()\n{\n register_widget('oferta_widget');\n register_widget('events_widget');\n register_widget('group_list_widget');\n}", "public static function init() {\n //Register widget settings...\n self::update_dashboard_widget_options(\n self::wid, //The widget id\n array( //Associative array of options & default values\n 'username' => '',\n\t\t\t\t'apikey' => '',\n\t\t\t\t'project_id' => '',\n ),\n true //Add only (will not update existing options)\n );\n\n //Register the widget...\n wp_add_dashboard_widget(\n self::wid, //A unique slug/ID\n __( 'Rankalyst Statistik', 'affiliatetheme-backend' ),//Visible name for the widget\n array('AT_Rankalyst_Widget','widget'), //Callback for the main widget content\n array('AT_Rankalyst_Widget','config') //Optional callback for widget configuration content\n );\n }", "function copyright_load_widget() {\n register_widget( 'copyright_widget' );\n}", "function WeblizarTwitterWidget() {\r\n\tregister_widget( 'WeblizarTwitter' );\r\n}", "function load_tag_widget() {\n register_widget( 'custom_tag_widget' );\n}", "public static function register()\n {\n register_sidebar( array(\n 'name' => 'Widget Area 1',\n 'id' => 'widget_1',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n }", "function MWX__load_widgets() {\n register_widget( 'widget_MWX__list_pages' );\n}", "function registerBBwidget(){\r\n\tregister_widget('BbWidgetArea');\r\n\t\r\n\t}", "function ds_social_links_load_widget() {\n\tregister_widget( 'ds_social_links_widget' );\n}", "public function getWidget();", "function profit_header_load_widget()\n{\n register_widget('profits_header_widget');\n}", "function register_service_widget() {\n register_widget( 'Services_Widget' );\n}", "function widget_wrap()\n{\n\tregister_widget('ag_pag_familie_w');\n\tregister_widget('ag_social_widget_container');\n\tregister_widget('ag_agenda_widget');\n}", "public function init()\n {\n // Initialize widget.\n }", "function registerWidgets( ) {\r\n\t\t\twp_register_sidebar_widget( 'iluvwalking-com-widget', __( 'ILuvWalking.com Stats' ), array( &$this, 'widgetOutput' ) );\r\n\t\t\twp_register_widget_control( 'iluvwalking-com-widget', __( 'ILuvWalking.com Stats' ), array( &$this, 'widgetControlOutput' ) );\r\n\t\t}", "function montheme_register_widget() {\n register_widget(YoutubeWidget::class);\n register_sidebar([\n 'id' => 'homepage',\n 'name' => __('Sidebar Accueil', 'montheme'),\n 'before_widget' => '<div class=\"p-4 %2$s\" id=\"%1$s\"',\n 'after_widget' => '</div>',\n 'before_title' => ' <h4 class=\"fst-italic\">',\n 'after_title' => '</h4>'\n ]);\n}", "static function init() {\n\t\t\t$classname = get_called_class();\n\t\t\tadd_action( 'widgets_init', $classname . '::register_widget' );\n\t\t\tadd_shortcode( $classname, $classname . '::register_shortcode' );\n\t\t}", "public function register_widgets() {\n\t\t// Its is now safe to include Widgets files\n\t\t$this->include_widgets_files();\n\n\t\t// Register Widgets\n\t\t\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Main_Slider() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Call_To_Action_Text() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Noble_Cause() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Call_To_Action_Image() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Project_Facts() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Pillers_Forest() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Fancy_Heading() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Blog_Listing() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Main_Gallery() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Default_Sub_Header() );\n\n\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Call_To_Action_Banner() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Woo_Listing() );\t\t \n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Events_Listing() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Events_Call_To_Action() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Call_To_Action_Contact() );\n\t\t \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Islamic_Centre_Newsletter() );\n\t}", "function AviaWidgetLoader()\n\t{\n\t\treturn avia_widget_loader::instance();\n\t}", "public function widgets_init() {\n\t\t// Set widgets_init action function.\n\t\tadd_action( 'widgets_init', array( $this, 'register_sidebars' ) );\n\t\tregister_widget( 'DX\\MOP\\Student_Widget' );\n\t}", "function load_postmeta_widget(){\n register_widget( 'postmeta_widget' );\n}", "function dl_widget_init() {\n\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Página de Contacto',\n\t\t'id'\t\t\t=> 'contact-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Barra Lateral',\n\t\t'id'\t\t\t=> 'sidebar-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Search Menu',\n\t\t'id'\t\t\t=> 'menu-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\n}", "function register_widgets() {\n\t if ( ! is_dir( $this->addon->dir . 'include/widgets/' ) ) { return; }\n\t $widget_files = scandir( $this->addon->dir . 'include/widgets/' );\n\t $widget_slug = array();\n\n\t foreach ( $widget_files as $widget_file ) {\n\t\t if ( preg_match( '/^class\\.([^.]*?)\\.php/' , $widget_file , $widget_slug ) === 1 ) {\n\t\t\t require_once( $this->addon->dir . 'include/widgets/' . $widget_file );\n\t\t\t register_widget( 'SLPWidget_' . $widget_slug[1] );\n\t\t }\n\t }\n }", "function load_archive_widget() {\n register_widget( 'custom_archive_widget' );\n}", "function dpla_search_widget_load() {\n wp_register_script('add-dpla-widget-dcplumer-js', 'http://www.dcplumer.com/dpla/dpla-search-widget-dcplumer.js', '', null,'');\n wp_enqueue_script('add-dpla-widget-dcplumer-js');\n}", "function register_Zappy_Feed_Burner_Widget() {\n register_widget('Zappy_Feed_Burner_Widget');\n}", "public static function init () : void\n {\n add_action(\"widgets_init\", function ()\n {\n self::unregister_widget();\n self::register_widget();\n self::register_sidebar();\n });\n }", "function register_btc_widget() {\r\n register_widget( 'BTC_Live_Rate_Widget' );\r\n}", "function register_zijcareebuilderjobswidget() {\n register_widget( 'ZijCareerBuilderJobs' );\n}", "function ecll_load() {\n\tadd_action( 'elementor/widgets/widgets_registered', 'ecll_register_elementor_widgets' );\n\tadd_action( 'elementor/frontend/after_register_scripts', 'ecll_widget_scripts' );\n}", "public function register_widgets() {\n\t\t// Its is now safe to include Widgets files\n\t\t$this->include_widgets_files();\n\n\t\t// Register Widgets\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Counter() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Posts() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Subhead_Bodycopy() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Heading_Media_BodyCopy() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Sidebar() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Useful_Links_Info() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Content_Filter() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Accordion_Navigation_Tabs() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Secondary_CTAs() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Alert_Banner() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Resources_Widgets() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Card_Lrg() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Promo() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Latest_Resources() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Popular_Results() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Top_Faq() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Be_Card_Carousel() );\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Repeater_resources_widget());\n\n\t}", "function register_widget_control($name, $control_callback, $width = '', $height = '', ...$params)\n {\n }", "function register_browse_widget() {\n\tregister_widget(\"browse_index_widget\");\t\n}", "function register_service_box()\n{\n register_widget( 'CtaWidget' );\n}", "public function registerClientScript()\n {\n $view = $this->getView();\n KCFinderWidgetAsset::register($view);\n $this->clientOptions['kcfUrl'] = Yii::$app->assetManager->getPublishedUrl((new KCFinderAsset)->sourcePath);\n\n if ($this->iframe) {\n $this->clientOptions['iframeModalId'] = $this->getIFrameModalId();\n }\n\n $clientOptions = Json::encode($this->clientOptions);\n $view->registerJs(\"jQuery('#{$this->buttonOptions['id']}').KCFinderInputWidget($clientOptions)\");\n }", "function G3Client_RegisterWidgets(){\n register_widget('G3Client_RandomPhotoWidget');\n}", "function load_dashboard_widget() {\n\t\tadd_action('wp_dashboard_setup', array($this,'dashboard_widget'));\n\t}", "function oa_social_login_init_widget ()\r\n{\r\n return register_widget('Widget_Login');\r\n}", "private function initializeWidgetIdentifier() {}", "function featured_news_load_widget() {register_widget( 'featured_news_widget' );}", "function nabi_widgets_init() {\n\n\t// Language Selector Widget\n\tregister_sidebar( array(\n\t\t'name' => 'Language Widget',\n\t\t'id' => 'languagewidget',\n\t\t'before_title' => ''\n\t) );\n\n\t// Second nav additionnal content Widget\n\tregister_sidebar( array(\n\t\t'name' => 'Second Nav Widget',\n\t\t'id' => 'secondnavwidget',\n\t\t'before_title' => ''\n\t) );\n\n}" ]
[ "0.8110661", "0.7967675", "0.78804576", "0.7738934", "0.7702892", "0.7682854", "0.76820266", "0.76244855", "0.7621846", "0.76101273", "0.7574632", "0.74874914", "0.741399", "0.7409604", "0.7409604", "0.7344513", "0.731742", "0.729245", "0.726935", "0.72691077", "0.724296", "0.7219335", "0.7199558", "0.7199408", "0.7183758", "0.7168517", "0.71638155", "0.7160979", "0.7160979", "0.7136273", "0.7133111", "0.7099006", "0.7091803", "0.7058631", "0.702741", "0.7022185", "0.7001532", "0.69591916", "0.6958921", "0.6953284", "0.69112545", "0.69104826", "0.68628067", "0.68597823", "0.6840972", "0.6837807", "0.6819483", "0.6814876", "0.68100005", "0.6789808", "0.6789086", "0.6774221", "0.67596924", "0.67484593", "0.67413217", "0.67365426", "0.6717635", "0.6705349", "0.6703211", "0.66827685", "0.6679338", "0.6670568", "0.6642273", "0.66188973", "0.66180396", "0.6614019", "0.6612155", "0.660056", "0.65701485", "0.65662587", "0.65588653", "0.6558782", "0.65545636", "0.6530287", "0.6521329", "0.6510038", "0.6508301", "0.6507851", "0.6504648", "0.6492724", "0.64913106", "0.6488492", "0.6485774", "0.648405", "0.6479296", "0.6470534", "0.6456639", "0.64536947", "0.6450023", "0.6429137", "0.6421397", "0.6411936", "0.640065", "0.6397862", "0.63918227", "0.63891155", "0.63846684", "0.63841426", "0.6356556", "0.63515353" ]
0.8054664
1
get list of rules
получить список правил
public function getRules();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRulesList(){\n return $this->_get(3);\n }", "public function getRules() {}", "abstract protected function getRules();", "public function getRules(): Collection;", "public static function getRules(): array;", "public function getRules(): array;", "public function getRules(): array;", "public function get_all_rules()\n {\n }", "public function getRules()\n {\n return $this->get(self::_RULES);\n }", "public function getRules()\n {\n }", "public function getRules()\n {\n }", "public function getRules()\n {\n }", "public function getRules() {\n\t\treturn $this->rules ?? [];\n\t}", "abstract public function getRules(): array;", "public function getRules(): array\n {\n return $this->rules;\n }", "public function getRules() {\n\t\t$out = array();\n\t\tforeach ($this->rules as $name => $rule) {\n\t\t\t$out[$name] = $rule->description;\n\t\t}\n\t\treturn $out;\n\t}", "public function getRules() : array\n {\n return $this->rules;\n }", "public function rules(): array;", "public function rules(): array;", "public function rules(){\n $rules = [];\n if(!empty($this->rules)){\n foreach ($this->rules as $action => $rule) {\n $regex = \"*\" . $action;\n if($this->is($regex)){\n $rules = $rule;\n break;\n }\n }\n }\n return $rules;\n }", "public function getRules()\r\n\t{\r\n\t\treturn $this->rules;\r\n\t}", "public function getRules()\n {\n return $this->rules;\n }", "public function getRules()\n {\n return $this->rules;\n }", "public function getRules()\n {\n return $this->rules;\n }", "public function getRules()\n {\n return $this->rules;\n }", "public function getRules() : array\n {\n return $this->getDaoRepository()->getRules();\n }", "public function rules();", "public function rules();", "public function rules();", "public function getRules()\r\n\t{\r\n\t\treturn $this->_rules;\r\n\t}", "public function getRules( )\n {\n return $this->rules;\n }", "public static function getRules() \n {\n return self::$rules;\n }", "public function getRules()\n {\n return (array) $this->rules;\n }", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function getRules()\n {\n $rules = [];\n // Default UserAgent\n if (isset($this->rules[self::USER_AGENT])) {\n $rules = array_merge($rules, $this->rules[self::USER_AGENT]);\n }\n // Matching UserAgent\n if (isset($this->rules[$this->userAgentMatch])) {\n $rules = array_merge($rules, $this->rules[$this->userAgentMatch]);\n }\n // Result\n return $rules;\n }", "public function getRules()\n\t{\n\t\t\n\t\t$rules = array();\n\t\t\n\t\tforeach ( $this->getFields() as $field )\n\t\t{\n\t\t\t$rules = array_merge( $rules, $field->getRules() );\n\t\t}\n\t\t\n\t\treturn $rules;\n\t}", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "abstract public function rules(): array;", "abstract public function rules(): array;", "abstract public function rules(): array;", "public function getRules(): RuleList\n {\n return new RuleList($this->rules->toArray());\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 function getRules() {\n\t\treturn self::$rules;\n\t}", "public function getRules()\n {\n if (!isset($this->_rules)){\n $this->_getRules();\n }\n return $this->_rules;\n }", "public function getRules()\n {\n return [\n 'title' => ['requiredFill', 'trim', 'htmlSpecialChars', 'len100'],\n 'content' => ['requiredFill', 'htmlSpecialChars'],\n 'categoryId' => ['requiredFill', 'isInteger'],\n ];\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function createRules()\n {\n return [];\n }", "public function rules()\n {\n return RuleSet::find(Game::find($this->game_id)->rules_id);\n }", "public function rules() : array\n {\n return StoreRulesService::getInstance()->get(\n array_merge($this->all(), [\n 'id' => $this->route('visit'),\n ])\n );\n }", "abstract public function rules() : array;", "public function findRules()\n {\n $keys = array();\n $values = array();\n \n foreach ($this->route as $key => $value) {\n \n $keys[] = $key; \n $values[] = $value; \n \n }\n \n return array(\"keys\" => $keys, \"values\" => $values);\n \n }", "function getRulesList() {\n\t\tglobal $app_strings;\n\t\tglobal $theme;\n\n\t\t$this->loadRules();\n\t\t$rulesDiv = $app_strings['LBL_NONE'];\n\n\t\tif(isset($this->rules)) {\n\t\t\t$focusRules = $this->rules;\n\n\t\t\t$rulesDiv = \"<table cellpadding='0' cellspacing='0' border='0' height='100%'>\";\n\t\t\tforeach($focusRules as $k => $rule) {\n\t\t\t\t$rulesDiv .= $this->renderRuleRow($rule);\n\t\t\t}\n\t\t\t$rulesDiv .= \"</table>\";\n\t\t}\n\n\t\t$smarty = new Sugar_Smarty();\n\t\t$smarty->assign('app_strings', $app_strings);\n\t\t$smarty->assign('theme', $theme);\n\t\t$smarty->assign('savedRules', $rulesDiv);\n\t\t$ret = $smarty->fetch(\"include/SugarRouting/templates/rulesList.tpl\");\n\n\t\treturn $ret;\n\t}", "protected function getRules(): array\n {\n return [\n 'getFileExtensions' => [self::RULE_ARRAY, self::RULE_REQUIRED],\n 'isFileValid' => self::RULE_BOOL,\n 'getInternalRefNumber' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getExternalRefNumber' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getAssistantTitle' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getPatientContacts' => self::RULE_STRING,\n 'getPatientName' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getPatientBirthday' => [self::RULE_STRING, self::RULE_DATE],\n 'getParentAccidentMarkers' => self::RULE_ARRAY,\n 'getVisitTime' => [self::RULE_STRING, self::RULE_DATE],\n 'getVisitDate' => [self::RULE_STRING, self::RULE_REQUIRED, self::RULE_DATE],\n 'getCaseCreationDate' => [self::RULE_STRING, self::RULE_REQUIRED, self::RULE_DATE],\n 'getVisitCountry' => self::RULE_STRING,\n 'getVisitRegion' => self::RULE_STRING,\n 'getVisitCity' => self::RULE_STRING,\n 'getPatientSymptoms' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getDoctorInvestigation' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getDoctorRecommendation' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getDoctorDiagnostics' => self::RULE_ARRAY,\n 'getDoctorName' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getDoctorMedicalBoardingNum' => self::RULE_STRING,\n 'getDoctorGender' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getImages' => self::RULE_ARRAY,\n 'getCaseableType' => [self::RULE_STRING, self::RULE_REQUIRED],\n 'getIncomePrice' => self::RULE_FLOAT,\n 'getCurrency' => self::RULE_STRING\n ];\n }", "abstract public function getValidationRules(): array;", "abstract protected function getValidationRules();", "public static function getRules() {\n return [\n 'title' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'author' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'description' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'price' => FILTER_VALIDATE_FLOAT,\n 'year' => [\n 'filter' => FILTER_VALIDATE_INT,\n 'options' => [\n 'min_range' => 1800,\n 'max_range' => date(\"Y\")\n ]\n ]\n ];\n }", "private function getRegisteredRules()\n {\n return $this->registeredRules;\n }", "protected function defineRules()\n {\n return [];\n }", "public function rules()\n {\n return static::staticRules();\n }", "public function rules()\n {\n // get action name\n $routeAction = app('router')->currentRouteAction();\n $method = trim( strrchr($routeAction, '@'), '@');\n $rules = [];\n\n // 是否有对应方法的验证规则\n if ( isset($this->ruleConfig[$method]) ) {\n $rules = $this->ruleConfig[$method];\n\n // 可以设置一个默认规则列表,没有对应规则时则用默认的\n } elseif ( ! empty($this->ruleConfig['__default'])) {\n $rules = $this->ruleConfig['__default'];\n }\n\n return $rules;\n }", "public function getValidationRules() : array;", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function rules()\n {\n return static::$rules;\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->createRules();\n\n case 'PUT':\n case 'PATCH':\n return $this->updateRules();\n\n case 'DELETE':\n return $this->deleteRules();\n\n default:\n return [];\n }\n }", "public function & getRules()\n {\n return $this->rules;\n }", "abstract public function rules();", "abstract public function rules();", "abstract public function rules();", "abstract public function rules();", "public function rules()\n { \n return $this->rules;\n }", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function getRules(): array\n {\n if (Auth::id()==1){\n return [\n ['disk' => 'projects', 'path' => '*', 'access' => 2],\n ];\n }\n return \\DB::table('acl_rules')\n ->where('user_id', $this->getUserID())\n ->get(['disk', 'path', 'access'])\n ->map(function ($item) {\n return get_object_vars($item);\n })\n ->all();\n }", "public function get_rules()\n\t{\n\t\t$this->layout->with('title', 'Rules')\n\t\t\t\t\t ->nest('content', 'rules');\n\t}", "public function getGroupedRules(): array;", "public static function getAll() {\n return YtelAdvancedListRules::\n all(['from_list_id', 'from_campaign_id', 'from_list_status', 'to_list_id', 'to_list_status', 'interval', 'active', 'last_run', 'next_run', 'last_update_count']);\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function rules()\n {\n return $this->jobCategoryRepository->rules();\n }", "public function getRules()\n {\n return isset($this->Rules) ? $this->Rules : null;\n }", "public function rules()\n {\n return $this->initRules(new Calendar());\n }", "protected abstract function rules();", "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 }", "private function getRules()\n {\n return array(\n 'name' => new Pattern\\Name,\n 'height' => new Pattern\\Height,\n 'lat' => array(\n 'required' => true,\n 'rules' => array('Latitude')\n ),\n 'lng' => array(\n 'required' => true,\n 'rules' => array('Longitude')\n ),\n 'api_key' => array(\n 'required' => true,\n 'rules' => array(\n 'NotEmpty' => array(\n 'message' => 'Google API key can not be empty'\n )\n )\n ),\n 'style' => array(\n 'required' => false,\n 'rules' => array('Json')\n )\n );\n }", "public function rules() {\n return $this->get_from_model(__FUNCTION__);\n }", "abstract function rules();", "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function rules() {\n\t\t// 全リクエスト共通ルールと継承先ルールのマージ\n\t\t// 同一のキーがあれば継承先ルールで上書き\n\t\treturn array_merge($this->__base_rules, $this->rules);\n }", "public function getRule();", "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}", "private static function getRules() {\n return [\n 'imeArtikla' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'cenaArtikla' => FILTER_VALIDATE_FLOAT,\n 'opisArtikla' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'kategorijaArtikla' => FILTER_SANITIZE_SPECIAL_CHARS,\n 'zalogaArtikla' => FILTER_VALIDATE_FLOAT,\n \n /*'year' => [\n 'filter' => FILTER_VALIDATE_INT,\n 'options' => [\n 'min_range' => 1800,\n 'max_range' => date(\"Y\")\n ]\n ]*/\n ];\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 getCreateRules()\n {\n return [];\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 //no rules\n return [];\n }" ]
[ "0.8531926", "0.8500616", "0.83190566", "0.8303848", "0.8300871", "0.8227738", "0.8227738", "0.8100199", "0.80676585", "0.80380654", "0.80380654", "0.80380654", "0.79961723", "0.7965298", "0.7877579", "0.78692764", "0.7777388", "0.77557963", "0.77557963", "0.77471775", "0.77195084", "0.7718094", "0.7718094", "0.7718094", "0.7718094", "0.77022475", "0.7699842", "0.7699842", "0.7699842", "0.7632009", "0.7621459", "0.7617687", "0.76067257", "0.7606615", "0.75992036", "0.7585781", "0.7562433", "0.7551877", "0.7551877", "0.7551877", "0.753224", "0.7493146", "0.748113", "0.7461197", "0.74491584", "0.7390595", "0.737407", "0.73686546", "0.7344312", "0.7317675", "0.7308472", "0.7292571", "0.72779024", "0.72734547", "0.7245791", "0.7236859", "0.72295606", "0.7224198", "0.72235286", "0.7210157", "0.7200476", "0.7198427", "0.71843415", "0.71730775", "0.71636206", "0.71568173", "0.71568173", "0.71568173", "0.71568173", "0.7150633", "0.71419823", "0.7135058", "0.7131169", "0.7127402", "0.7125589", "0.71229964", "0.71164757", "0.71140414", "0.7112337", "0.71026677", "0.70870936", "0.7085098", "0.70832133", "0.70832133", "0.70832133", "0.70832133", "0.70832133", "0.70832133", "0.70822006", "0.7070537", "0.70683813", "0.70681447", "0.7066666", "0.7048495", "0.7037896", "0.7028386", "0.70260036", "0.7019843", "0.6990002", "0.6987329" ]
0.8726984
0
Get the value of Id_batiment
Получить значение Id_batiment
public function getId_batiment() { return $this->Id_batiment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBidId(){\n return $this->bidId; \n }", "public function getBid()\n {\n return $this->getAttribute()->getBid();\n }", "public function getId_Boisson()\n {\n return $this->Id_Boisson;\n }", "public function setId_batiment($Id_batiment)\n {\n $this->Id_batiment = $Id_batiment;\n\n return $this;\n }", "public function getidBateau(){\r\n return $this->_idBateau;\r\n }", "public function getID_B()\n {\n return $this->ID_B;\n }", "public function getId_Boisson()\n{\nreturn $this->Id_Boisson;\n}", "public function getBachilleratoId()\n\t{\n\t\treturn $this->bachilleratoId;\n\t}", "public function getIdAttribute()\n {\n return $this->attributes['bag_id'];\n }", "public function getBentukLembagaId()\n {\n return $this->bentuk_lembaga_id;\n }", "public function getIdBangunan()\n {\n return $this->id_bangunan;\n }", "public function getPeminjamanBukuAttribute(){\n return $this->buku->pluck('id')->toArray();\n }", "public function getIdVit(){\n\t\treturn ($this->id);\n\t}", "public function get_bagian($id)\r\n\t\t{\r\n\t\t\t$hasil = $this->db->query(\"SELECT * FROM tbl_bagian WHERE id_unit='$id'\");\r\n\t\t\treturn $hasil->result(); \r\n\t\t}", "public function getId(){\n return $this->_data['id'];\n }", "function getStatusID() {\n\t\treturn $this->data_array['status_id'];\n\t}", "public function getBeritabyID($ID_BRT)\n {\n \n return $this->db->get_where('tb_berita', ['ID_BRT' => $ID_BRT])->row_array();\n }", "public function getBU()\n {\n $value = $this->get(self::BU);\n return $value === null ? (integer)$value : $value;\n }", "protected function cargaIdUbicacion() {\n $dao = new PGDAO();\n $strSql = $this->COLECCIONMAPEOUBICA . $this->propiedad->getId_ubica();\n $arrayDatos = $this->leeDBArray($dao->execSql($strSql));\n $id = $arrayDatos[0]['zpubica'];\n return $id;\n }", "public function getBarangId($id_barang)\n {\n return $this->db->get_where('tb_barang', ['id_barang' => $id_barang])->result_array();\n }", "public function getStatusId()\n {\n return $this->getValue('nb_icontact_prospect_status_id');\n }", "public function getId(){\n return (string) $this->film['id'];\n }", "public function getBankId()\n {\n return $this->bank_id;\n }", "public function get_batch_id()\n {\n $results = $this->results();\n\n return $results['SubmitNotificationBatchResult']->BatchID;\n }", "public function fetchBatchId ()\r\n {\r\n $member_id = $this->getMember_id(true);\r\n $student_class_object = new Acad_Model_StudentClass();\r\n $student_class_object->setMember_id($member_id);\r\n $batch_identifier_class_id = $student_class_object->fetchBatchIdentifierClassId();\r\n $class_object = new Acad_Model_Class();\r\n $class_object->setClass_id($batch_identifier_class_id);\r\n $class_object->fetchInfo();\r\n $batch_id = $class_object->getBatch_id();\r\n return $batch_id;\r\n }", "public function getBatchID()\n {\n return $this->BatchID;\n }", "public function getIdAct(){\n\t\treturn $this->idAct;\n\t}", "public function cekIdBayarLast()\n {\n\n $query = \"SELECT id_bayar FROM pembayaran order by id_bayar DESC limit 1\";\n\n return $this->db->query($query)->row_array();\n }", "public function retrieve_product_batchid()\n\t{\t\n\t\t$CI =& get_instance();\n\t\t$batch_id = $this->input->post('batch_id');\n\t\t$product_info = $CI->Invoices->get_total_product_batch($batch_id);\n\t\techo json_encode($product_info);\n\t}", "public function getId_book()\n {\n return $this->id_book;\n }", "public function getId() {\n\t\treturn $this -> data['id'];\n\t}", "public function getIntuitTid(){\n return $this->intuit_tid;\n }", "function get_tb_am_bon($bon_id)\n {\n return $this->db->get_where('tb_am_bons',array('bon_id'=>$bon_id))->row_array();\n }", "public function getTid()\n {\n \treturn $this->getParameter('tid');\n }", "function getBatchID()\n\t\t{\n\t\t\treturn $this->BatchID;\n\t\t}", "public function getId() {\r\n\t\treturn $this->data['id'];\r\n\t}", "public function getBLID() {\n\t\treturn $this->blid;\n\t}", "public function id() {\n return $this->activity_array['id'];\n }", "public function getId() {\n return @$this->attributes['id'];\n }", "public function getId() {\n return @$this->attributes['id'];\n }", "function getBrfId()\n {\n return (int) $this->_iBrfId;\n }", "public function findById($id){\n $query = $this->db->get_where('bmi_pasien',['id'=>$id]);\n return $query->row();\n }", "public function getIdBaru($data)\n {\n $query = \"SELECT id_baru FROM \".$this->table.\" WHERE id=:id\";\n\n $this->db->query($query);\n\n $this->db->bind('id', $data);\n\n return $this->db->single();\n }", "public function getVarighet()\n {\n return $this->getTid();\n }", "public function idinformacion(){\n\t\treturn $this->_idinformacion;\n\t}", "function getBreeding($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"select * from breeding_tbl where breeding_id='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['breeding_id'];\n\n\t}\n\t$crud->disconnect();\n}", "function getStatId(){\n $connexion = openDBConnexion();\n $request = $connexion->prepare('\n SELECT idStatistics FROM bdd_satisfevent.statistics\n ORDER BY idStatistics DESC LIMIT 1 ');\n $request->execute(array());\n $result = $request->fetchAll();\n return $result[0]['idStatistics'];\n}", "public function getIdBosses() {\n return intval($this->idBosses);\n }", "public function getBusinessId()\n {\n return $this->id;\n }", "function getIdBosses() {\n return $this->idBosses;\n }", "public function getIdHapusBuku()\n {\n return $this->id_hapus_buku;\n }", "public function getBookId()\n {\n return $this->bookId;\n }", "public function getFcpoIbannumber() \n {\n return $this->getResponseParameter('clearing_bankiban');\n }", "public function getBvoucher()\n {\n return $this->bvoucher;\n }", "public function getId() : int\n {\n return $this->getValue('nb_icontact_prospect_id');\n }", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getBusinessId()\n {\n return $this->business_id;\n }", "public function getTid()\n {\n return $this->getTitler()->getVarighet();\n }", "public function poslednji_vestackiId() \n {\n $ocene=$this->findAll();\n $maxId=-1;\n foreach ($ocene as $ocena)\n {\n if ($ocena->VestackiId>$maxId)\n {\n $maxId=$ocena->VestackiId; \n }\n }\n return $maxId;\n }", "function BBdekat_tempatIbadah(){\n\t\t$this->db->select('batas_bawah');\n\t\t$this->db->where('nama_parameter', 'dekat');\n\t\t$q = $this->db->get('parameter');\n\t\t$data = $q->result_array();\n\n\t\treturn $hasil = $data[1]['batas_bawah'];\n\t}", "public function getBonus() {\n return strval($this->bonus);\n }", "public function getIdDetail()\n {\n \treturn \"AVD-03-\". date(\"Y\") . sprintf('%05d', $this->id_actadocumentacion);\n }", "public function getBankId()\n {\n if (!empty($this->info['bank_id'])) {\n return $this->info['bank_id'];\n }\n }", "public function buscarID()\n {\n $sentencia = \"SELECT id, cl FROM tsreportebocadetubo ORDER BY id DESC LIMIT 1\";\n try {\n $stm = $this->db->prepare($sentencia);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n foreach ($registros as $r) {\n $id = $r->id;\n }\n return $id;\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "function getBreed($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"select * from pigs_tbl where pig_id='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['breed'];\n\n\t}\n\t$crud->disconnect();\n}", "public function getPkValue(){\n $pk = static::getPk();\n return (int) $this->$pk;\n }", "public function get_attr($id_atributo)\n {\n $this->db->where('id_atributo_b', $id_atributo);\n $resultado = $this->db->get('atributos_b');\n\n return $resultado->row();\n }", "public function getId()\n {\n return $this['id'];\n }", "function get_idbrg()\n {\n\t\t$this->db->order_by('ID_BRG', 'asc');\n\t\t$result = $this->db->get('tb_barang');\n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n $data[''] = 'Please Select';\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n $data[$row->ID_BRG] = $row->NAMA_BRG;\n }\n }\n return $data;\n }", "public function getId()\n {\n return $this->getValue('id');\n }", "public function getBackblazeB2KeyId() {\n return @$this->attributes['backblaze_b2_key_id'];\n }", "public function getFundacion_idFundacion(){\n return $this->Fundacion_idFundacion;\n }", "public function getAttributeId();", "public function getBusinessUnitID(): string;", "public function getId() {\n return $this->attributes['id'];\n }", "public function getId() : string{\n return $this->id;\n }", "public function getId() : string{\n return $this->id;\n }", "public function getBonusCode()\n {\n return $this->bonusCode;\n }", "public function bobot_abc($id_bobot){\n\t\t$hasil = $this->db->where('id', $id_bobot)\n\t\t\t\t\t\t ->get('bobot');\n\t\tif($hasil->num_rows() > 0){\n\t\t\treturn $hasil->row();\n\t\t}\n\t\telse {\n\t\t\treturn array();\n\t\t}\n\t}", "function getID() {\n\t\treturn $this->data_array['id'];\n\t}", "public function idPenjualan()\n {\n $get_id = $this->penjualan->get_idmax();\n\n return $get_id; //TRX00001\n }", "public function getId(){\r\n\t\t\treturn $this->id;\r\n\t\t}", "public function getValueId()\n {\n return $this->valueId;\n }", "public function getID()\n {\n return $this->banner_campaign_id;\n }", "function getId() {\n\t\treturn $this->getData('id');\n\t}", "function getId() {\n\t\treturn $this->getData('id');\n\t}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function getBetWithId($id, $db){\r\n $sql = \"SELECT movies.title as bet_movie ,users.username as username , current_bets.bet_status, place_bets.amount, place_bets.bet_type,place_bets.current_bet_id, place_bets.id FROM movies INNER JOIN current_bets ON movies.id = current_bets.movie_id inner join place_bets on current_bets.id = place_bets.current_bet_id inner join users on users.id = place_bets.user_id where place_bets.id = :id\";\r\n $pdostm = $db->prepare($sql);\r\n $pdostm->bindParam(':id', $id);\r\n $pdostm->execute();\r\n $bet = $pdostm->fetch(\\PDO::FETCH_OBJ);\r\n return $bet;\r\n }", "public function obtrequiereih($id_biopsia){\n $stmt=$this->objPDO->prepare(\"SELECT requiere_ih as requeridoih from sisanatom.detalle_bioce where id_biopsia=:id_biopsia\");\n $stmt->execute(array('id_biopsia'=>$id_biopsia));\n $reqbio=$stmt->fetchAll(PDO::FETCH_OBJ);\n return $reqbio[0]->requeridoih;\n }", "public function GetId()\n\t{\n\t\t$datas = $this->db->query('select DISTINCT id_komponenbiaya from masterkomponenbiaya order by id_komponenbiaya asc');\n\t\treturn $datas;\n\t}", "public function getId(){\r\n\t\treturn $this->id;\r\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}" ]
[ "0.6747695", "0.66339815", "0.66311955", "0.658652", "0.643237", "0.6398355", "0.6224411", "0.6188837", "0.6156267", "0.6151657", "0.6064528", "0.58263236", "0.5734558", "0.57297283", "0.57233727", "0.56914264", "0.5638607", "0.56230545", "0.5612167", "0.56011236", "0.55915684", "0.5564997", "0.5541738", "0.5541446", "0.55357575", "0.55320555", "0.5532051", "0.5531287", "0.55252045", "0.55213165", "0.5518142", "0.5498724", "0.549708", "0.5492643", "0.5473513", "0.54692715", "0.5465766", "0.5464458", "0.54599696", "0.54599696", "0.545687", "0.5456106", "0.54541314", "0.5453611", "0.5441406", "0.5434414", "0.5427328", "0.542238", "0.54158247", "0.54020554", "0.54018223", "0.53964853", "0.53960824", "0.5391751", "0.5390397", "0.5386853", "0.5386853", "0.5386853", "0.5386853", "0.5386853", "0.5368988", "0.536058", "0.5353347", "0.535167", "0.534683", "0.53438246", "0.53434664", "0.5343456", "0.53408265", "0.5329191", "0.5328516", "0.53231317", "0.53222126", "0.53167504", "0.5310564", "0.5310208", "0.5295712", "0.5293334", "0.52863234", "0.52863234", "0.527619", "0.5274392", "0.52738184", "0.52714956", "0.5271261", "0.5268944", "0.5268782", "0.52685016", "0.52685016", "0.52640533", "0.52640533", "0.52640533", "0.52640533", "0.52522486", "0.5245445", "0.52359855", "0.52325225", "0.5228425", "0.5228425", "0.5228425" ]
0.86391884
0
Set the value of Id_batiment
Задайте значение Id_batiment
public function setId_batiment($Id_batiment) { $this->Id_batiment = $Id_batiment; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getId_batiment()\n {\n return $this->Id_batiment;\n }", "public function setId($IDabbonamento)\n {\n $this->id = $IDabbonamento;\n }", "function setId($value) {\n $this->_id = intval($value);\n }", "public function setId($id)\r\n {\r\n $this->data['itemid'] = (int) $id;\r\n }", "public function setId_Boisson($Id_Boisson)\n{\n$this->Id_Boisson = $Id_Boisson;\n\nreturn $this;\n}", "public function setIdVit($id){\n\t\t$this->id = $id;\n\t}", "function setBrfId($a_iBrfId)\n {\n $this->_iBrfId = (int) $a_iBrfId;\n $this->setSearchParameter('brf_id', $this->_iBrfId);\n }", "public function setId($id){\n $this->_id = $id;\n }", "public function setId($var){\n\t\t$this->id=$var;\n\t}", "function SetId($value) { $this->id=$value; }", "public function setId_book($id_book)\n {\n $id_book = (int) $id_book;\n if (is_int($id_book) && $id_book > 0) {\n $this->id_book = $id_book;\n }\n }", "function setId($id) {\r\n $this->_id = $id;\r\n }", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "function setId_situacion($iid_situacion = '')\n {\n $this->iid_situacion = (int)$iid_situacion;\n }", "public function setId($id){\n $this->id = $id;\n }", "public function setId($id){\n $this->id = $id;\n }", "public function setId($id){\n $this->id = $id;\n }", "public function setId($id)\r\n {\r\n $this->_id = (int) $id;\r\n }", "public function setId($id)\n {\n $this->id = $id;\n\n \n }", "function setId($id){\r\n\t\t$this->id = $id;\r\n\t}", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "public function getId_Boisson()\n{\nreturn $this->Id_Boisson;\n}", "function setId($id){\n\t\t$this->id = $id;\n\t}", "function setId($id) {\n\t\t$this->setData('id', $id);\n\t}", "public function setId($id){\n $this->id = $id;\n }", "public function setId($valor){\n\t\t\t$this->id = $valor;\n\t\t}", "public function setId($x) { $this->id = $x; }", "public function setId($id){ $this->id=$id;}", "public function setStatusIdAttribute($input)\n {\n $this->attributes['status_id'] = $input ? $input : null;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function getBidId(){\n return $this->bidId; \n }", "function setId($id) {\n\t\t$this->_id = $id;\n\t}", "public function setId($id){\n $this->id=$id;\n }", "public function setId($id){\n\t\t\t$this->id = $id;\n\t\t}", "public function setId($id){\n\t\t$this->id = $id;\n\t}", "public function getId_Boisson()\n {\n return $this->Id_Boisson;\n }", "public function setId($id){\n\t\t\t\t$this->id=$id;\n\t\t\t}", "public function setIdRespuesta($idRespuesta)\n {\n $this->idRespuesta = $idRespuesta;\n \n }", "public function setId($id) {\r\n $this->_id = $id;\r\n }", "public function setId(int $id)\n {\n $this->id = $id;\n }", "public function setBentukLembagaId($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->bentuk_lembaga_id !== $v) {\n $this->bentuk_lembaga_id = $v;\n $this->modifiedColumns[] = SekolahPaudPeer::BENTUK_LEMBAGA_ID;\n }\n\n if ($this->aBentukLembaga !== null && $this->aBentukLembaga->getBentukLembagaId() !== $v) {\n $this->aBentukLembaga = null;\n }\n\n\n return $this;\n }", "function setBatchID($BatchID)\n\t\t{\n\t\t\t$this->BatchID = $BatchID;\n\t\t}", "public function setId($id)\n {\n $this->_id = (int)$id;\n }", "public function setId($id) { $this->id = $id; }", "public function setId(int $id)\n {\n }", "public function setId($id){\n $this->id = (string) $id;\n }", "public function setIdAttribute($value)\n {\n $this->attributes['id'] = $value;\n }", "public function setIdcontenu($idcontenu)\n {\n if(is_numeric($idcontenu)) {\n $this->idcontenu = (int)$idcontenu;\n }\n }", "public function setProcessing($id){\n \t\t$model = Mage::getModel(\"mprmasystem/rmarequest\")->load($id);\n \t\t$model->setStatus(\"Processing\")->save();\n \t}", "public function setId($id) \n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n if ( ! array_key_exists($this->id, static::$basket)) {\n static::$basket[$this->id] = array();\n }\n }", "function setId($id) {\n $this->id = $id;\n }", "function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n\t\t$this->id = (integer)$id;\n\t}", "public function setIdBangunan($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->id_bangunan !== $v) {\n $this->id_bangunan = $v;\n $this->modifiedColumns[] = BangunanPeer::ID_BANGUNAN;\n }\n\n\n return $this;\n }", "function setId_activ($iid_activ)\n {\n $this->iid_activ = $iid_activ;\n }", "public function setId($pId) {\n\t\t$this->Id = $pId;\n\t}", "function setId($id) {\r\n\t\t// Set id and wipe data\r\n\t\t$this->_id = $id;\r\n\t}", "public function setId($id)\r\n\t\t{\r\n\t\t\t$this->_id = $id;\r\n\t\t}", "function setId_situacion($iid_situacion)\n {\n $this->iid_situacion = $iid_situacion;\n }", "public function set_id($id){\n $this->id = $id;\n }", "function setId($id)\n {\n $this->id = $id;\n }", "public function setId($_id);", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\r\n $this->id = $id;\r\n }", "public function setId($id) {\r\n $this->id = $id;\r\n }", "public function setBusinessId($id)\n {\n $this->id = $id;\n }", "public function setId($id) ;", "public function setId($Id) \n {\n $this->Id = $Id;\n }", "public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }", "public function setVatIdNo($vatin);", "public function setID($id){\n $this->id = $id;\n }", "public function actionUpdate($id)\n {\n if (Yii::$app->user->can('paskibraupdate')) {\n $model = $this->findModel($id);\n $model->setAttribute('update_et', date(\"Y-m-d H:i:s\"));\n $model->setAttribute('user_created', Yii::$app->user->identity->getId());\n $param = Yii::$app->request->post('PaskibraModel');\n\n //skill\n $this->langskill = $param['language_skill'];\n $this->lifeskill = $param['life_skill'];\n $this->otherlifeskill = $param['otherlifeskill'];\n $this->brevetaward = $param['brevet_award'];\n\n if (null != $this->otherlifeskill) {\n $this->saveOtherLifeSkill($this->otherlifeskill);\n $this->other_skill = [$this->otherlifeskill];\n $other_skill_id = [(count($this->lifeskill) + 1) => $this->otherlifeskillid];\n array_push($this->lifeskill, $other_skill_id[(count($this->lifeskill) + 1)]);\n }\n\n if (null != $this->brevetaward) {\n $data_brevet = $model->getAllBrevetNameById($this->brevetaward);\n $model->setAttribute('brevetaward', implode(', ', $data_brevet));\n }\n\n\n if (null != $this->langskill) {\n $data_lang = $model->getAllLangSkillNameById($this->langskill);\n $model->setAttribute('languageskill', implode(', ', $data_lang));\n }\n\n if (null != $this->lifeskill) {\n $data_skill = $model->getAllSkillNameById($this->lifeskill);\n if (isset($this->other_skill[0])) {\n array_push($data_skill, $this->other_skill[0]);\n }\n $model->setAttribute('lifeskill', implode(', ', $data_skill));\n }\n\n //photo\n if (($model->front_photo != $param['front_photo']) && $param['front_photo'] != null) {\n //delte old photo\n $this->photo->deleteProntPhoto($model->front_photo);\n $this->photo->deleteProntPhotoThumb($model->front_photo);\n\n //save new photo\n $this->photo->copyProntPhoto($param['front_photo']);\n $this->photo->copyProntPhotoThumb($param['front_photo']);\n }\n\n if (($model->side_photo != $param['side_photo']) && $param['side_photo'] != null) {\n $this->photo->deleteSidePhoto($model->side_photo);\n $this->photo->copySidePhoto($param['side_photo']);\n }\n\n if (($model->identity_card != $param['identity_card']) && $param['identity_card'] != null) {\n $this->photo->deleteIdentityCardPhoto($model->identity_card);\n $this->photo->copyIdentityCardPhoto($param['identity_card']);\n }\n\n if (($model->certificate_of_organization != $param['certificate_of_organization']) && $param['certificate_of_organization'] != null) {\n $this->photo->deleteCertificatePhoto($model->certificate_of_organization);\n $this->photo->copyCertificatePhoto($param['certificate_of_organization']);\n }\n\n\n //save database\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n if (null != $this->lifeskill) {\n $data = ArrayHelper::map($model->getTaxonomiesBySkill()->all(), 'id', 'id');\n $model->deleteAllTaxRelationByMemberId($data, $model->id);\n $model->saveTaxRelation($this->lifeskill, $model->id);\n } else {\n $data = ArrayHelper::map($model->getTaxonomiesBySkill()->all(), 'id', 'id');\n $model->deleteAllTaxRelationByMemberId($data, $model->id);\n }\n\n if (null != $this->langskill) {\n $data = ArrayHelper::map($model->getTaxonomiesByLangSkill()->all(), 'id', 'id');\n $model->deleteAllTaxRelationByMemberId($data, $model->id);\n $model->saveTaxRelation($this->langskill, $model->id);\n } else {\n $data = ArrayHelper::map($model->getTaxonomiesByLangSkill()->all(), 'id', 'id');\n $model->deleteAllTaxRelationByMemberId($data, $model->id);\n }\n\n if (null != $this->brevetaward) {\n $data = ArrayHelper::map($model->getTaxonomiesByBrevet()->all(), 'id', 'id');\n $model->deleteAllTaxRelationByMemberId($data, $model->id);\n $model->saveTaxRelation($this->brevetaward, $model->id);\n } else {\n $data = ArrayHelper::map($model->getTaxonomiesByBrevet()->all(), 'id', 'id');\n $model->deleteAllTaxRelationByMemberId($data, $model->id);\n }\n\n return $this->redirect(['view', 'action' => 'member-ppi-view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model\n ]);\n }\n } else {\n throw new HttpException(403, 'You are not allowed to access this page', 0);\n }\n }", "public function setId($id)\n {\n $id = (int) $id;\n \n if ($id > 0)\n {\n $this->_id = $id;\n }\n }", "public function setID($id);", "public function setID($id){\n $this->id=$id;\n }", "public function getBachilleratoId()\n\t{\n\t\treturn $this->bachilleratoId;\n\t}", "public function setId( $id )\n {\n $this->id = $id;\n }", "public function setID($id) {\n $this->id = $id; \n }", "public function setId($id)\n\t{\n\t\t$this->id = (int) $id;\n\t}", "public function proses_ubah_ket_blok($data, $id_blok)\n {\n $this->db->where('id_blok', $id_blok);\n $this->db->update('blok', $data);\n }", "public function setIdAtelier($valeur){\n $this->idAtelier = $valeur;\n }", "function setId($id)\n\t{\n\t\t// Set id\n\t\t$this->_id\t = $id;\n\t}", "public function setId($id)\n {\n $this->_id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "function setId_situacion($iid_situacion = '')\n {\n $this->iid_situacion = $iid_situacion;\n }", "public function setId($id)\n {\n// // Si c'en était déjà un, rien ne changera.\n// // Sinon, la conversion donnera le nombre 0 (à quelques exceptions près, mais rien d'important ici).\n// $id = (int)$id;\n//\n// // On vérifie ensuite si ce nombre est bien strictement positif.\n// if ($id > 0) {\n// // Si c'est le cas, c'est tout bon, on assigne la valeur à l'attribut correspondant.\n// $this->_id = $id;\n// }\n }", "public function cambiarId($id) {\n $this->id = $id;\n }", "public function setId($id){\n\t\tself::$_id[get_class($this)] = $id;\n\t}", "public function SetId ($id);", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId( $id ) {\n\t\t$this->id = $id;\n\t}", "public function setId( $id ) {\n\t\t$this->id = $id;\n\t}", "public function setId($id)\r\n {\r\n if (is_int($id))\r\n {\r\n $this->id = $id;\r\n }\r\n }", "public function setId($id)\r\n {\r\n if (is_int($id))\r\n {\r\n $this->id = $id;\r\n }\r\n }", "public function setId($id)\r\n {\r\n if (is_int($id))\r\n {\r\n $this->id = $id;\r\n }\r\n }" ]
[ "0.76356494", "0.6097018", "0.58651775", "0.57700163", "0.5764101", "0.57294595", "0.5657558", "0.5611514", "0.5577207", "0.55523413", "0.5541761", "0.5527859", "0.55245644", "0.551988", "0.55164087", "0.55164087", "0.55164087", "0.55041605", "0.5477404", "0.5474623", "0.5471434", "0.546898", "0.54667896", "0.5463918", "0.54605216", "0.545498", "0.5450288", "0.5438531", "0.5434222", "0.54227287", "0.54191494", "0.5413886", "0.53964055", "0.53947407", "0.53913045", "0.5384202", "0.5375129", "0.5371568", "0.53625226", "0.5351894", "0.5348984", "0.53479135", "0.534168", "0.5337033", "0.53302073", "0.5328229", "0.5319776", "0.5313697", "0.530667", "0.5304548", "0.53009266", "0.5298092", "0.5298092", "0.52893776", "0.5281228", "0.5279853", "0.5270695", "0.52632874", "0.5262832", "0.5258701", "0.5256017", "0.5255795", "0.52537876", "0.5251678", "0.5249957", "0.5249957", "0.52453256", "0.5244643", "0.5238151", "0.52381027", "0.5232116", "0.523014", "0.52208334", "0.5220348", "0.5216758", "0.52051663", "0.52027935", "0.52007747", "0.5200041", "0.5198196", "0.51902443", "0.51901656", "0.51826483", "0.51825374", "0.51793915", "0.5178232", "0.5176376", "0.51745015", "0.5172132", "0.51606417", "0.51575", "0.51575", "0.51575", "0.51575", "0.51575", "0.51572603", "0.51572603", "0.5156296", "0.5156296", "0.5156296" ]
0.8076125
0
Returns the order mapper
Возвращает отображатель заказов
public function getOrderMapper() { if($this->orderMapper == null) { throw new \Exception('Please set the order mapper'); } return $this->orderMapper; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_order() {\n return $this->get_mapped_property('order');\n }", "public function generateOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getMapper()\n\t{\n\t\treturn parent::getMapper('Basico_Model_DicionarioDadosAssocclFkMapper');\n\t}", "public function getOrder()\n {\n return static::ORDER;\n }", "public function getOrder()\n {\n return static::ORDER;\n }", "public function getOrder()\n {\n return static::ORDER;\n }", "function getOrder();", "public function getMapper(){ \n $mapper = new Wf_Model_WfProcesso_Mapper();\n return $mapper;\n }", "protected function getMapper()\n {\n return $this->mapper;\n }", "public function getMapper()\n\t{\n\t\treturn parent::getMapper('Basico_Model_MetodoValidacaoMapper');\n\t}", "public function getMapper()\n\t{\n\t\treturn parent::getMapper('Basico_Model_FormularioDecoratorGrupoMapper');\n\t}", "public function getOrder()\n {\n //Note: order by parts are not \"named\" so it's all or nothing\n return $this->_get('_order');\n }", "function getMapper() {\n return $this->mapper;\n }", "protected function get_rel_mapper() {\n\t\t$rel_mapper = array();\n\n\t\t/*\n\t\t * replies\n\t\t * @link https://indieweb.org/in-reply-to\n\t\t */\n\t\t$rel_mapper['in-reply-to'] = 'comment';\n\t\t$rel_mapper['reply-of'] = 'comment';\n\n\t\t/*\n\t\t * bookmarks\n\t\t * @link https://microformats.org/wiki/rel-design-pattern#rel.3D.22bookmark.22\n\t\t */\n\t\t$rel_mapper['bookmark'] = 'bookmark';\n\n\t\t/*\n\t\t * tags\n\t\t * @link https://microformats.org/wiki/rel-tag\n\t\t */\n\t\t$rel_mapper['tag'] = 'tag';\n\n\t\treturn apply_filters( 'webmention_mf2_rel_mapper', $rel_mapper );\n\t}", "public function getMapper()\n\t{\n\t\t\n\t\treturn $this->__mapper;\n\t\t\n\t}", "public static function getInstance() {\n if (self::$instance == null) {\n self::$instance = new OrderMapper();\n }\n return self::$instance;\n }", "function get_mapper()\n {\n return $this->_mapper;\n }", "public static function getOrder(): int;", "public function getTransformer()\n {\n return new OrderTransformer();\n }", "private function getOrdering()\n {\n return [[\n 'column' => 0,\n 'dir' => 'asc',\n ]];\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 1;\n }", "function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 110;\n }", "public function getMapper()\n {\n return $this->proxyBase\n ->getMapper();\n }", "public function getMapper()\n {\n if (null === $this->_mapper) {\n $this->setMapper(new Petolio_Model_PoDiaryRecordRightsMapper());\n }\n return $this->_mapper;\n }", "public function get_column_mapper_instance() {\n\n\t\t_deprecated_function( 'wc_customer_order_csv_export()->get_admin_instance()->get_column_mapper_instance()',\n\t\t\t'4.1.0',\n\t\t\t'wc_customer_order_csv_export()->get_admin_instance()->get_custom_format_builder_instance()'\n\t\t);\n\n\t\treturn $this->get_custom_format_builder_instance();\n\t}", "function getOrder()\n {\n return 4;\n }", "function getOrder()\n {\n return 4;\n }", "public function getMapper ()\r\n {\r\n if (null === $this->_mapper) {\r\n $this->setMapper(new Tnp_Model_Mapper_Company());\r\n }\r\n return $this->_mapper;\r\n }", "public function &getOrderBy();", "public function getMapper()\n {\n $map = $this->getMap();\n\n return function ($path) use ($map) {\n foreach ($map as $item) {\n foreach ($item as $match => $replace) {\n if (empty($match)) {\n return $replace . $path;\n } elseif (0 === strpos($path, $match)) {\n return preg_replace(\n '/^' . preg_quote($match, '/') . '/',\n $replace,\n $path\n );\n }\n }\n }\n\n return null;\n };\n }", "public function getMapper()\n\t{\n\t\treturn parent::getMapper('Basico_Model_MensagemAssocEmailMapper');\n\t}", "function getOrdering() {\n return $this->ordering;\n }", "public function getMapper()\n {\n if ($this->_mapper === null) {\n\n \\Zend_Loader_Autoloader::getInstance()->suppressNotFoundWarnings(true);\n\n if (class_exists('\\Atezate\\Mapper\\Sql\\Cubos')) {\n\n $this->setMapper(new \\Atezate\\Mapper\\Sql\\Cubos);\n\n } else {\n\n new \\Exception(\"Not a valid mapper class found\");\n }\n\n \\Zend_Loader_Autoloader::getInstance()->suppressNotFoundWarnings(false);\n }\n\n return $this->_mapper;\n }", "public function getOrder()\n {\n if (array_key_exists(\"order\", $this->_propDict)) {\n return $this->_propDict[\"order\"];\n } else {\n return null;\n }\n }", "public function getOrder()\n {\n if (array_key_exists(\"order\", $this->_propDict)) {\n return $this->_propDict[\"order\"];\n } else {\n return null;\n }\n }", "public function prefixOrderProperty() {\n\t\tif (is_string($this->order)) {\n\t\t\t$this->order = $this->prefixAlias($this->order);\n\t\t}\n\t\tif (is_array($this->order)) {\n\t\t\tforeach ($this->order as $key => $value) {\n\t\t\t\tif (is_numeric($key)) {\n\t\t\t\t\t$this->order[$key] = $this->prefixAlias($value);\n\t\t\t\t} else {\n\t\t\t\t\t$newKey = $this->prefixAlias($key);\n\t\t\t\t\t$this->order[$newKey] = $value;\n\t\t\t\t\tif ($newKey !== $key) {\n\t\t\t\t\t\tunset($this->order[$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getOrder()\n {\n return 101;\n }", "private function _getMapper()\n {\n if (is_null($this->_mapper)) {\n $this->_mapper = new CommentMapper($this->db());\n }\n\n return $this->_mapper;\n }", "function get_field_order_mapping2($name, $reorderArr = '', $exclude = true, $forFieldName = true)\n{\n // define the ordering of fields, note that the key value is what is important, and should be the db field name\n $field_order_array = array();\n $field_order_array['accounts'] = array('name'=>'Name', 'id'=>'ID', 'website'=>'Website', 'email1' =>'Email Address',\n 'phone_office' =>'Office Phone', 'phone_alternate' => 'Alternate Phone', 'phone_fax' => 'Fax',\n 'billing_address_street' => 'Billing Street', 'billing_address_city' => 'Billing City',\n 'billing_address_state' => 'Billing State', 'billing_address_postalcode' => 'Billing Postal Code',\n 'billing_address_country' => 'Billing Country', 'shipping_address_street' => 'Shipping Street',\n 'shipping_address_city' => 'Shipping City', 'shipping_address_state' => 'Shipping State',\n 'shipping_address_postalcode' => 'Shipping Postal Code', 'shipping_address_country' => 'Shipping Country',\n 'description' => 'Description', 'account_type' => 'Type', 'industry' =>'Industry',\n 'annual_revenue' => 'Annual Revenue', 'employees' => 'Employees', 'sic_code' => 'SIC Code',\n 'ticker_symbol' => 'Ticker Symbol', 'parent_id' => 'Parent Account ID', 'ownership' =>'Ownership',\n 'campaign_id' =>'Campaign ID', 'rating' =>'Rating', 'assigned_user_name' =>'Assigned to',\n 'assigned_user_id' =>'Assigned User ID', 'team_id' =>'Team Id', 'team_name' =>'Teams',\n 'team_set_id' =>'Team Set ID', 'date_entered' =>'Date Created', 'date_modified' =>'Date Modified',\n 'modified_by_name' => 'Modified By User Name', 'modified_user_id' =>'Modified By',\n 'created_by_name' => 'Created By Name', 'created_by' =>'Created By', 'deleted' =>'Deleted');\n\n $field_order_array['contacts'] = array('first_name' => 'First Name', 'last_name' => 'Last Name', 'id'=>'ID',\n 'salutation' => 'Salutation', 'title' => 'Title', 'department' => 'Department',\n 'account_name' => 'Account Name', 'email_address' => 'Email Address', 'phone_mobile' => 'Phone Mobile',\n 'phone_work' => 'Phone Work', 'phone_home' => 'Phone Home', 'phone_other' => 'Phone Other',\n 'phone_fax' => 'Phone Fax', 'primary_address_street' => 'Primary Address Street',\n 'primary_address_city' => 'Primary Address City', 'primary_address_state' => 'Primary Address State',\n 'primary_address_postalcode' => 'Primary Address Postal Code',\n 'primary_address_country' => 'Primary Address Country', 'alt_address_street' => 'Alternate Address Street',\n 'alt_address_city' => 'Alternate Address City', 'alt_address_state' => 'Alternate Address State',\n 'alt_address_postalcode' => 'Alternate Address Postal Code',\n 'alt_address_country' => 'Alternate Address Country', 'description' => 'Description',\n 'birthdate' => 'Birthdate', 'lead_source' => 'Lead Source', 'campaign_id' => 'campaign_id',\n 'do_not_call' => 'Do Not Call', 'portal_name' => 'Portal Name', 'portal_active' => 'Portal Active',\n 'portal_password' => 'Portal Password', 'portal_app' => 'Portal Application',\n 'reports_to_id' => 'Reports to ID', 'assistant' => 'Assistant', 'assistant_phone' => 'Assistant Phone',\n 'picture' => 'Picture', 'assigned_user_name' => 'Assigned User Name', 'assigned_user_id' => 'Assigned User ID',\n 'team_name' => 'Teams', 'team_id' => 'Team id', 'team_set_id' => 'Team Set ID', 'date_entered'=>'Date Created',\n 'date_modified' =>'Date Modified', 'modified_by_name' => 'Modified By User Name',\n 'modified_user_id' =>'Modified By', 'created_by_name' => 'Created By Name', 'created_by' =>'Created By',\n 'deleted' =>'Deleted');\n\n $field_order_array['leads'] = array('first_name' => 'First Name', 'last_name' => 'Last Name', 'id'=>'ID',\n 'salutation' => 'Salutation', 'title' => 'Title', 'department' => 'Department',\n 'account_name' => 'Account Name', 'account_description' => 'Account Description',\n 'website' => 'Website', 'email_address' => 'Email Address', 'phone_mobile' => 'Phone Mobile',\n 'phone_work' => 'Phone Work', 'phone_home' => 'Phone Home', 'phone_other' => 'Phone Other',\n 'phone_fax' => 'Phone Fax', 'primary_address_street' => 'Primary Address Street',\n 'primary_address_city' => 'Primary Address City', 'primary_address_state' => 'Primary Address State',\n 'primary_address_postalcode' => 'Primary Address Postal Code',\n 'primary_address_country' => 'Primary Address Country', 'alt_address_street' => 'Alt Address Street',\n 'alt_address_city' => 'Alt Address City', 'alt_address_state' => 'Alt Address State',\n 'alt_address_postalcode' => 'Alt Address Postalcode', 'alt_address_country' => 'Alt Address Country',\n 'status' => 'Status', 'status_description' => 'Status Description', 'lead_source' => 'Lead Source',\n 'lead_source_description' => 'Lead Source Description', 'description'=>'Description',\n 'converted' => 'Converted', 'opportunity_name' => 'Opportunity Name',\n 'opportunity_amount' => 'Opportunity Amount', 'refered_by' => 'Referred By',\n 'campaign_id' => 'campaign_id', 'do_not_call' => 'Do Not Call', 'portal_name' => 'Portal Name',\n 'portal_app' => 'Portal Application', 'reports_to_id' => 'Reports To ID', 'assistant' => 'Assistant',\n 'assistant_phone' => 'Assistant Phone', 'birthdate'=>'Birthdate', 'contact_id' => 'Contact ID',\n 'account_id' => 'Account ID', 'opportunity_id' => 'Opportunity ID',\n 'assigned_user_name' => 'Assigned User Name', 'assigned_user_id' => 'Assigned User ID', 'team_name' => 'Teams',\n 'team_id' => 'Team id', 'team_set_id' => 'Team Set ID', 'date_entered' => 'Date Created',\n 'date_modified' => 'Date Modified', 'created_by_name' => 'Created By Name', 'created_by' => 'Created By ID',\n 'modified_by_name' => 'Modified By User Name', 'modified_user_id' => 'Modified By ID', 'deleted' => 'Deleted');\n\n $field_order_array['opportunities'] = array('name' => 'Opportunity Name', 'id'=>'ID',\n 'amount' => 'Opportunity Amount', 'currency_id' => 'Currency',\n 'date_closed' => 'Expected Close Date', 'sales_stage' => 'Sales Stage', 'probability' => 'Probability (%)',\n 'next_step' => 'Next Step', 'opportunity_type' => 'Opportunity Type', 'account_name' => 'Account Name',\n 'description' => 'Description', 'amount_usdollar' => 'Amount', 'lead_source' => 'Lead Source',\n 'campaign_id' => 'campaign_id', 'assigned_user_name' => 'Assigned User Name',\n 'assigned_user_id' => 'Assigned User ID', 'team_name' => 'Teams', 'team_id' => 'Team id',\n 'team_set_id' => 'Team Set ID', 'date_entered' => 'Date Created', 'date_modified' => 'Date Modified',\n 'created_by_name' => 'Created By Name', 'created_by' => 'Created By ID',\n 'modified_user_id' => 'Modified By ID', 'deleted' => 'Deleted');\n\n $field_order_array['notes'] = array('name' => 'Name', 'id'=>'ID', 'description' => 'Description',\n 'filename' => 'Attachment', 'parent_type' => 'Parent Type', 'parent_id' => 'Parent ID',\n 'contact_id' => 'Contact ID', 'portal_flag' => 'Display in Portal?', 'assigned_user_name' =>'Assigned to',\n 'assigned_user_id' => 'assigned_user_id', 'team_id' => 'Team id', 'team_set_id' => 'Team Set ID',\n 'date_entered' => 'Date Created', 'date_modified' => 'Date Modified', 'created_by_name' => 'Created By Name',\n 'created_by' => 'Created By ID', 'modified_by_name' => 'Modified By User Name',\n 'modified_user_id' => 'Modified By ID', 'deleted' => 'Deleted' );\n\n $field_order_array['bugs'] = array('bug_number' => 'Bug Number', 'id'=>'ID', 'name' => 'Subject',\n 'description' => 'Description', 'status' => 'Status', 'type' => 'Type', 'priority' => 'Priority',\n 'resolution' => 'Resolution', 'work_log' => 'Work Log', 'found_in_release' => 'Found In Release',\n 'fixed_in_release' => 'Fixed In Release', 'found_in_release_name' => 'Found In Release Name',\n 'fixed_in_release_name' => 'Fixed In Release', 'product_category' => 'Category', 'source' => 'Source',\n 'portal_viewable' => 'Portal Viewable', 'assigned_user_id' => 'Assigned User ID',\n 'assigned_user_name' => 'Assigned User Name', 'team_name'=>'Teams', 'team_id' => 'Team id',\n 'team_set_id' => 'Team Set ID', 'date_entered' =>'Date Created', 'date_modified' =>'Date Modified',\n 'modified_by_name' => 'Modified By User Name', 'modified_user_id' =>'Modified By',\n 'created_by_name' => 'Created By Name', 'created_by' =>'Created By', 'deleted' =>'Deleted');\n\n $field_order_array['tasks'] = array('name'=>'Subject', 'id'=>'ID', 'description'=>'Description','status'=>'Status',\n 'date_start'=>'Date Start', 'date_due'=>'Date Due','priority'=>'Priority', 'parent_type'=>'Parent Type',\n 'parent_id'=>'Parent ID', 'contact_id'=>'Contact ID', 'assigned_user_name' =>'Assigned to',\n 'assigned_user_id'=>'Assigned User ID', 'team_name'=>'Teams', 'team_id'=>'Team id',\n 'team_set_id'=>'Team Set ID', 'date_entered'=>'Date Created', 'date_modified'=>'Date Modified',\n 'created_by_name' => 'Created By Name', 'created_by'=>'Created By ID',\n 'modified_by_name' => 'Modified By User Name', 'modified_user_id'=>'Modified By ID', 'deleted'=>'Deleted');\n\n $field_order_array['calls'] = array('name'=>'Subject', 'id'=>'ID', 'description'=>'Description',\n 'status'=>'Status', 'direction'=>'Direction', 'date_start'=>'Date', 'date_end'=>'Date End',\n 'duration_hours'=>'Duration Hours', 'duration_minutes'=>'Duration Minutes', 'reminder_time'=>'Reminder Time',\n 'parent_type'=>'Parent Type', 'parent_id'=>'Parent ID', 'outlook_id'=>'Outlook ID',\n 'assigned_user_name' =>'Assigned to', 'assigned_user_id'=>'Assigned User ID', 'team_name'=>'Teams',\n 'team_id'=>'Team id', 'team_set_id'=>'Team Set ID', 'date_entered'=>'Date Created',\n 'date_modified'=>'Date Modified', 'created_by_name' => 'Created By Name', 'created_by'=>'Created By ID',\n 'modified_by_name' => 'Modified By User Name', 'modified_user_id'=>'Modified By ID', 'deleted'=>'Deleted');\n\n $field_order_array['meetings'] = array('name'=>'Subject', 'id'=>'ID', 'description'=>'Description',\n 'status'=>'Status', 'location'=>'Location', 'date_start'=>'Date', 'date_end'=>'Date End',\n 'duration_hours'=>'Duration Hours', 'duration_minutes'=>'Duration Minutes', 'reminder_time'=>'Reminder Time',\n 'type'=>'Meeting Type', 'external_id'=>'External ID', 'password'=>'Meeting Password', 'join_url'=>'Join Url',\n 'host_url'=>'Host Url', 'displayed_url'=>'Displayed Url', 'creator'=>'Meeting Creator',\n 'parent_type'=>'Related to', 'parent_id'=>'Related to', 'outlook_id'=>'Outlook ID',\n 'assigned_user_name' =>'Assigned to','assigned_user_id' => 'Assigned User ID', 'team_name' => 'Teams',\n 'team_id' => 'Team id', 'team_set_id' => 'Team Set ID', 'date_entered' => 'Date Created',\n 'date_modified' => 'Date Modified', 'created_by_name' => 'Created By Name', 'created_by' => 'Created By ID',\n 'modified_by_name' => 'Modified By User Name', 'modified_user_id' => 'Modified By ID', 'deleted' => 'Deleted');\n\n $field_order_array['cases'] = array('case_number'=>'Case Number', 'id'=>'ID', 'name'=>'Subject',\n 'description'=>'Description', 'status'=>'Status', 'type'=>'Type', 'priority'=>'Priority',\n 'resolution'=>'Resolution', 'work_log'=>'Work Log', 'portal_viewable'=>'Portal Viewable',\n 'account_name'=>'Account Name', 'account_id'=>'Account ID', 'assigned_user_id'=>'Assigned User ID',\n 'team_name'=>'Teams', 'team_id'=>'Team id', 'team_set_id'=>'Team Set ID', 'date_entered'=>'Date Created',\n 'date_modified'=>'Date Modified', 'created_by_name' => 'Created By Name', 'created_by'=>'Created By ID',\n 'modified_by_name' => 'Modified By User Name', 'modified_user_id'=>'Modified By ID', 'deleted'=>'Deleted');\n\n $field_order_array['prospects'] = array('first_name'=>'First Name', 'last_name'=>'Last Name', 'id'=>'ID',\n 'salutation'=>'Salutation', 'title'=>'Title', 'department'=>'Department', 'account_name'=>'Account Name',\n 'email_address'=>'Email Address', 'phone_mobile' => 'Phone Mobile', 'phone_work' => 'Phone Work',\n 'phone_home' => 'Phone Home', 'phone_other' => 'Phone Other', 'phone_fax' => 'Phone Fax',\n 'primary_address_street' => 'Primary Address Street', 'primary_address_city' => 'Primary Address City',\n 'primary_address_state' => 'Primary Address State',\n 'primary_address_postalcode' => 'Primary Address Postal Code',\n 'primary_address_country' => 'Primary Address Country', 'alt_address_street' => 'Alternate Address Street',\n 'alt_address_city' => 'Alternate Address City', 'alt_address_state' => 'Alternate Address State',\n 'alt_address_postalcode' => 'Alternate Address Postal Code',\n 'alt_address_country' => 'Alternate Address Country', 'description' => 'Description',\n 'birthdate' => 'Birthdate', 'assistant'=>'Assistant', 'assistant_phone'=>'Assistant Phone',\n 'campaign_id'=>'campaign_id', 'tracker_key'=>'Tracker Key', 'do_not_call'=>'Do Not Call', 'lead_id'=>'Lead Id',\n 'assigned_user_name'=>'Assigned User Name', 'assigned_user_id'=>'Assigned User ID', 'team_id' =>'Team Id',\n 'team_name' =>'Teams', 'team_set_id' =>'Team Set ID', 'date_entered' =>'Date Created',\n 'date_modified' => 'Date Modified', 'modified_by_name' => 'Modified By User Name',\n 'modified_user_id' =>'Modified By', 'created_by_name' => 'Created By Name', 'created_by' =>'Created By',\n 'deleted' =>'Deleted');\n\n $field_order_array['forecastworksheet'] = array('commit_stage' => 'Commit Stage', 'name' => 'Name',\n 'date_closed' => 'Expected Close', 'sales_stage' => 'Stage', 'probability' => 'Probability',\n 'likely_case' => 'Likely Case', 'best_case' => 'Best Case', 'worst_case' => 'Worst Case', 'id' => 'ID',\n 'product_id' => 'Product ID', 'assigned_user_id' => 'Assigned To', 'amount' => 'Amount',\n 'worksheet_id' => 'Worksheet ID', 'currency_id' => 'Currency ID', 'base_rate' => 'Base Rate');\n\n $field_order_array['forecastmanagerworksheet'] = array('name' => 'Name', 'quota' => 'Quota',\n 'likely_case' => 'Likely Case', 'likely_case_adjusted' => 'Likely Adjusted',\n 'best_case' => 'Best Case', 'best_case_adjusted' => 'Best Adjusted', 'worst_case' => 'Worst Case',\n 'worst_case_adjusted' => 'Worst Adjusted', 'amount' => 'Amount', 'quota_id' => 'Quota ID',\n 'forecast_id' => 'Forecast ID', 'worksheet_id' => 'Worksheet ID', 'currency_id' => 'Currency ID',\n 'base_rate' => 'Base Rate', 'show_opps' => 'Show Opps', 'timeperiod_id' => 'Timeperiod ID',\n 'user_id' => 'User ID', 'date_modified' => 'Date Modified');\n\n $fields_to_exclude = array();\n $fields_to_exclude['accounts'] = array('account_name');\n $fields_to_exclude['cases'] = array('modified_by_name', 'modified_by_name_owner',\n 'modified_by_name_mod', 'created_by_name', 'created_by_name_owner', 'created_by_name_mod',\n 'assigned_user_name', 'assigned_user_name_owner', 'assigned_user_name_mod', 'team_count', 'team_count_owner',\n 'team_count_mod', 'team_name_owner', 'team_name_mod', 'account_name_owner', 'account_name_mod',\n 'modified_user_name', 'modified_user_name_owner', 'modified_user_name_mod');\n $fields_to_exclude['notes'] = array('first_name', 'last_name', 'file_mime_type', 'embed_flag');\n $fields_to_exclude['tasks'] = array('date_start_flag', 'date_due_flag');\n $fields_to_exclude['forecastworksheet'] = array('version'=>'version');\n $fields_to_exclude['forecastmanagerworksheet'] = array('version'=>'version', 'label'=>'label');\n\n if (!empty($name) && !empty($reorderArr) && is_array($reorderArr)) {\n // make sure reorderArr has values as keys, if not then iterate through and assign the value as the key\n $newReorder = array();\n foreach ($reorderArr as $rk => $rv) {\n if (is_int($rk)) {\n $newReorder[$rv]=$rv;\n } else {\n $newReorder[$rk]=$rv;\n }\n }\n\n // if module is not defined, let's default the order to another module of the same type\n // this would apply mostly to custom modules\n if (!isset($field_order_array[strtolower($name)]) && !empty($name)) {\n if ($name == 'ProspectLists') {\n return $newReorder;\n }\n\n // get an instance of the bean\n $focus = BeanFactory::newBean($name);\n\n // set the name based on the module type. default to basic ('notes')\n if ($focus instanceof Person) {\n $name = 'contacts';\n } elseif ($focus instanceof Company) {\n $name = 'accounts';\n } elseif ($focus instanceof Sale) {\n $name = 'opportunities';\n } elseif ($focus instanceof Issue) {\n $name = 'bugs';\n } else {\n $name = 'notes';\n }\n\n }\n\n // let's iterate through and create a reordered temporary array using\n // the newly formatted copy of the passed in array\n $temp_result_arr = array();\n $lname = strtolower($name);\n if (isset($field_order_array[$lname])) {\n foreach ($field_order_array[$lname] as $fk => $fv) {\n // if the value exists as a key in the passed in array, add to temp array and remove from reorder array.\n // Do not force into the temp array as we don't want to violate acl's\n if (array_key_exists($fk, $newReorder)) {\n $temp_result_arr[$fk] = $newReorder[$fk];\n unset($newReorder[$fk]);\n } else {\n if ($forFieldName) {\n $temp_result_arr[$fk] = $fk;\n } else {\n $temp_result_arr[$fk] = '';\n }\n }\n }\n }\n\n // add in all the leftover values that were not in our ordered list\n foreach ($newReorder as $nrk => $nrv) {\n $temp_result_arr[$nrk] = $nrv;\n }\n\n if ($exclude) {\n // Some arrays have values we wish to exclude\n if (isset($fields_to_exclude[$lname])) {\n foreach ($fields_to_exclude[$lname] as $exclude_field) {\n unset($temp_result_arr[$exclude_field]);\n }\n }\n }\n\n return $temp_result_arr;\n }\n\n // if no array was passed in, pass back either the list of ordered columns by module, or the entire order array\n if (empty($name)) {\n return $field_order_array;\n } else {\n return $field_order_array[strtolower($name)];\n }\n}", "public function getOrder()\n {\n\n }", "public function getOrder(): array;", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function getOrder()\n {\n return 1;\n }", "public function _getOrder() {\n $order = [];\n if (($this->getSidx() !== null && $this->getSidx() != '') && ($this->getSord() !== null)) {\n if (is_array($this->getSidx())) {\n $orderArr = [];\n $sord = strtoupper($this->getSord());\n /** @var array $sidxF */\n $sidxF = $this->getSidx();\n foreach ($sidxF as $index => $sidx) {\n $orderRule = $sord;\n if (is_array($sord) && isset($sord[$index])) {\n $orderRule = $sord[$index];\n }\n $orderArr[] = [$sidx => $orderRule];\n }\n $order = $orderArr;\n } else {\n $order = [$this->getSidx() => strtoupper($this->getSord())];\n }\n }\n return $order;\n }", "public function getOrder()\n {\n return 120;\n }", "public function getOrder()\n {\n return 120;\n }", "public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }", "public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }", "public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }", "public function setOrderingValues()\n {\n $ordering = [\n 'id' => 'ID',\n 'p_no' => 'Patient No',\n 'name' => 'Name',\n 'date' => 'Register Date',\n 'age' => 'Age',\n 'dob' => 'Date of birth',\n 'gender' => 'Gender',\n 'Blood' => 'Blood'\n ];\n\n return $ordering;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }", "public function getOrder()\n {\n return 2;\n }" ]
[ "0.6431113", "0.58484906", "0.58419657", "0.58419657", "0.58419657", "0.58419657", "0.58419657", "0.58419657", "0.58290136", "0.5786071", "0.5786071", "0.5786071", "0.5775523", "0.57736933", "0.5729906", "0.56842107", "0.56812525", "0.5652704", "0.5636372", "0.5636219", "0.56357247", "0.5615454", "0.5598317", "0.55869514", "0.5575028", "0.55346555", "0.55244035", "0.55244035", "0.55244035", "0.55244035", "0.55184805", "0.5513075", "0.54941154", "0.54940116", "0.5488501", "0.54817206", "0.54817206", "0.54723406", "0.54712224", "0.5465141", "0.5445815", "0.5417592", "0.5412501", "0.5411092", "0.5411092", "0.54091346", "0.54082155", "0.5399864", "0.5369137", "0.5354283", "0.53474975", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.5338211", "0.53225005", "0.5322332", "0.5322332", "0.5321878", "0.5321878", "0.5321878", "0.53198725", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551", "0.5318551" ]
0.7406881
0
Add a boolean param
Добавьте булевский параметр
public function addBoolean(string $name, bool $default = false) { $this->add('boolean', $name, func_get_args()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _setBoolean($name, $value) {}", "public function set_add($param)\n\t{\n\t\t$this->add = (bool)$param;\n\t\treturn $this;\n\t}", "public function putBool(string $name, ?bool $value, bool $mandatory = false): string;", "public function setBoolean($trueFalse);", "function post_bool($boolean_name) {\n\t$boolean = $_POST[$boolean_name];\n\tif ($boolean == \"true\")\n\t\treturn true;\n\n\treturn false;\n}", "public static function boolean() {}", "protected function addBoolProperty(\n SerializationVisitorInterface $visitor,\n string $prop,\n ?bool $value,\n bool $insertUnderscore = true): void\n {\n $visitor->visitProperty(\n new StaticPropertyMetadata('boolean', $this->propertyName($prop, $insertUnderscore), null),\n $value\n );\n }", "function &bool(bool $value, string $namespace = 'default'): bool\n{\n $var = new Variable\\BoolVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "public function booleanValue($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function getBool(): bool;", "private static function getBool($param)\n {\n if ('true' == $param) {\n return true;\n }\n\n if ('false' == $param) {\n return false;\n }\n\n return (bool) $param;\n }", "protected function _setBooleanValue($key, $value) {}", "public function AddBoolData ($key, $bool_value) {\n\t\t$this->data[$key] = $bool_value ? \"true\" : \"false\";\n\t}", "public function updateBoolean( Inx_Api_Recipient_Attribute $attr, $blValue );", "function rest_is_boolean($maybe_bool)\n {\n }", "public function testBindBoolParameterNull()\n {\n self::$database->runTransaction(function (Transaction $t) {\n $t->executeUpdate(\n 'INSERT INTO ' . self::TABLE_NAME . '(id, name, registered, rating, age) '\n . 'VALUES($1, $2, $3, $4, $5)',\n [\n 'parameters' => [\n 'p1' => 3,\n 'p2' => 'Rock',\n 'p3' => null,\n 'p4' => 5.0,\n 'p5' => 26\n ],\n 'types' => [\n 'p3' => Database::TYPE_BOOL\n ]\n ]\n );\n $t->commit();\n });\n\n $res = self::$database->execute('SELECT * FROM ' . self::TABLE_NAME . ' WHERE registered IS NULL');\n\n $this->assertCount(1, iterator_to_array($res));\n }", "function PrepBool(&$bool,$blnNullable = true) {\n $bool = (integer)$bool;\n }", "public function setInternal($bool)\n {\n $this->arguments['internal'] = (bool) $bool;\n }", "abstract public function escapeBoolean($bool);", "public static function and_() {\n $result = new qti_variable('single', 'boolean', array('value' => true));\n $params = func_get_args();\n // Allow a single array as well as a parameter list\r\n if (count($params) == 1 && is_array($params[0])) {\r\n $params = $params[0];\r\n }\r\n foreach($params as $param) {\n if (!$param->value) {\n $result->value = false;\n return $result;\n }\n }\n return $result;\n }", "public function isBoolean();", "public function SetBool(string $key, bool $value) : void\r\n\t{\r\n\t\t$this->Set($key, $value);\r\n\t}", "public function hasParam($name);", "function wpsl_bool_check( $atts ) {\n\n foreach ( $atts as $key => $val ) {\n if ( in_array( $val, array( 'true', '1', 'yes', 'on' ) ) ) {\n $atts[$key] = true;\n } else if ( in_array( $val, array( 'false', '0', 'no', 'off' ) ) ) {\n $atts[$key] = false;\n }\n }\n\n return $atts;\n}", "public function showInformation($bool) {$this->_information = (bool) $bool;return $this;}", "function pseudoTypeFalseAndBool(bool|false $var = false) {}", "public function hasParameter($name);", "public function hasParameter($name);", "public function hasParamValue(string $name): bool;", "public static function or_() {\n $result = new qti_variable('single', 'boolean', array('value' => false));\r\n $params = func_get_args();\n // Allow a single array as well as a parameter list\r\n if (count($params) == 1 && is_array($params[0])) {\r\n $params = $params[0];\r\n }\r\n foreach($params as $param) {\r\n if ($param->value) {\r\n $result->value = true;\r\n return $result;\r\n }\r\n }\r\n return $result;\n }", "function addParam($par)\n\t{\n\t\tif(is_object($par) && is_a($par, 'jmap_xmlrpcval'))\n\t\t{\n\t\t\t$this->params[]=$par;\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 setBool($key, $value)\n {\n if (empty($value)) {\n $this->set($key, false);\n } else if (is_string($value)) {\n $this->set(\n $key,\n in_array(strtolower(trim($value)), self::$_booleans)\n );\n } else {\n $this->set($key, $value === true || $value === 1);\n }\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function setNew($b)\n {\n $this->new = (boolean) $b;\n }", "public function convertirCheckBox($param='') {\n if($param == \"on\" || $param == 1) {\n $param = \"S\";\n } else {\n $param = \"N\";\n }\n return $param;\n }", "function wp_validate_boolean($value)\n {\n }", "function rt_button_boolean($target,$title = 'enable')\n{\n return rt_ui_button($title, $target, 'check');\n}", "public function __construct(?bool $returnValue = true)\n {\n $this->_returnValue = $returnValue;\n }", "function isBoolType($a = 0)\n{\n $b = (boolean)$a;\n\n echo \"число $a при переводе в булев тип изменится на '$b ' <br/>\n так как при переводе значение boolean будет = false(по правилам приведения типов)\";\n echo \"<br>\";\n var_dump($a, $b);\n}", "function assertTrue($bool){\r\n $this->log($bool);\r\n if($bool){\r\n $status = \"passed\";\r\n }\r\n else{\r\n $status = \"failed\";\r\n }\r\n \r\n $this->updateStatus($status);\r\n $this->updateAction(__FUNCTION__);\r\n \r\n }", "function serendipity_ini_bool($var) {\n return ($var === 'on' || $var == '1');\n}", "function enable($bool, $precision)\n {\n $this->enabled = $bool;\n $this->precision = $precision;\n }", "public function hasParameters(){\n return $this->_has(2);\n }", "public function setBoolean(?bool $boolean): void\n {\n $this->boolean['value'] = $boolean;\n }", "function rest_sanitize_boolean($value)\n {\n }", "function mm_auto_update_make_bool( $value, $default = true ) {\n\tif ( 'false' === $value ) { $value = false; }\n\tif ( 'true' === $value ) { $value = true; }\n\tif ( true !== $value && false !== $value ) { $value = $default; }\n\treturn $value;\n}", "public function showPagination($bool) {$this->_pagination = (bool) $bool;return $this;}", "public static function static_parseBoolean($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "private function prepareBoolParam($value)\n {\n if (is_bool( $value )) {\n return true === $value ? 'true' : 'false';\n }\n\n return $value;\n }", "function isEnabled ();", "public function addToBool(BuilderInterface $builder, ?string $boolType = null, mixed $key = null): mixed;", "function isEnabled($name);", "function to_boolean($val);", "public function isOpenParameter()\n\t{\n\t\treturn $this->_value == '...';\n\t}", "public function setRequired(?bool $bool = null): void\n {\n $this->required = $bool ?? true;\n }", "protected function _extractBoolParam(array $params, $key, $default = false)\n {\n return (isset($params[$key]) ? (bool) $params[$key] : $default);\n }", "function isEnabled();", "function isEnabled();", "public function hasSwitchParam(): bool\n {\n return $this->request && $this->request->query->has($this->switchParam);\n }", "private function convert_to_boolean_attributes() {\n foreach ($this->attributes() as $attr => $val) {\n if (preg_match('/^can_/', $attr) || preg_match('/^is_/', $attr)) {\n $this->$attr = ($val == '1');\n }\n }\n }", "private function dbFeedBack($bool){\n if($bool == FALSE){\n //display '0' as false\n return \"{0}\"; \n }\n else{\n //display 1 as true\n return \"{1}\";\n } \n }", "public function setIsAccepted(bool $isAccepted);", "public function setAllowedOptionsBool (...$options);", "private function boolArg($value)\n {\n return ($value ? 1 : null);\n }", "public function annotMethod($annot, $bool)\n {\n }", "public function setOwner($bool)\r\n {\r\n $this->owner = (bool) $bool;\r\n }", "public static function setBoolean(string $key, $value) {\n\t\treturn self::$sessionInstance->set ( $key, UString::isBooleanTrue ( $value ) );\n\t}", "public function setRequired($bool)\n {\n $this->required = (boolean) $bool;\n\n return $this;\n }", "public function setIsWebRequest($val)\r\n\t{\r\n\t\tif (!is_bool($val))\r\n\t\t{\r\n\t\t\tthrow new \\Exception('Invalid value');\r\n\t\t}\r\n\t\t$this->isWebRequest = $val;\r\n\t}", "function setCheckboxParameter($value)\r\n {\r\n if (isset($_POST[$value]))\r\n return 1;\r\n else\r\n return 0;\r\n }", "public function has_param($key)\n {\n }", "public function set($value)\n\t{\n\t\treturn filter_var($value, FILTER_VALIDATE_BOOLEAN);\n\t}", "public function set($value)\n\t{\n\t\treturn filter_var($value, FILTER_VALIDATE_BOOLEAN);\n\t}", "public function getBoolean($i);", "public function boolean(string $column): ColumnDefinition\n {\n return $this->addColumn('boolean', $column);\n }", "public function getManBool(string $name, ?bool $default = null): bool;", "public function setFlag($flag);", "public function getBool(): ?BoolQuery;", "public function setTrue() {\n $this->estado = TRUE;\n }", "public function enableCache($bool) {\n\t\t$this->useCache = (bool)$bool;\t//Cast flexform integer (0/1) to bool\n\t}", "public function boolean($name, $options = [])\n {\n $field = new BooleanField($name);\n $this->fields[$name] = $this->setFields($field, $options);\n }", "public function setVideo($bool){\n\t\t$status = ($bool == true) ? 1 : 0;\n\t\t//return $this->setVideo($status);\n\t\treturn $this->_sendPacketToController(self::VIDEO, pack('C', $status));\n\t}", "public function setApproved($bool)\r\n {\r\n $this->isApproved = $bool;\r\n }", "public function isMethodParameter() {}", "public function hasBoolValue(){\n return $this->_has(3);\n }" ]
[ "0.6995609", "0.6974047", "0.6896783", "0.6663273", "0.6496533", "0.6441607", "0.641299", "0.63380754", "0.6304253", "0.6259438", "0.6259438", "0.6259438", "0.6259438", "0.6259438", "0.6253668", "0.6182342", "0.61822045", "0.6175959", "0.61320627", "0.6130263", "0.6117875", "0.6063973", "0.600367", "0.59770596", "0.59707224", "0.59494096", "0.59247255", "0.5896289", "0.58552545", "0.58213496", "0.58130264", "0.58102614", "0.58102614", "0.57850343", "0.57781464", "0.5777693", "0.57663333", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5754638", "0.5746186", "0.573128", "0.57217634", "0.5703789", "0.56997097", "0.56938964", "0.56825686", "0.5672771", "0.567099", "0.566252", "0.5658141", "0.56383955", "0.56372637", "0.5634507", "0.56308275", "0.5629258", "0.5623645", "0.5605073", "0.55913985", "0.55866843", "0.5582689", "0.55725986", "0.55586064", "0.55586064", "0.5556888", "0.55519396", "0.5533353", "0.5531199", "0.55308867", "0.5528517", "0.55274326", "0.55140615", "0.5508551", "0.5507466", "0.55024785", "0.54993445", "0.5489262", "0.54821604", "0.54821604", "0.5479514", "0.5477864", "0.5477552", "0.5467784", "0.5465317", "0.54589754", "0.5452575", "0.54479307", "0.5447508", "0.5433137", "0.5425326", "0.5423351" ]
0.70515066
0
Method returning list of attributes (data columns) in selected dataset
Метод, возвращающий список атрибутов (данных колонок) в выбранном наборе данных
public function getPpAttributes(PpDataset $ppDataset) { $query=$this->db->prepare('SHOW COLUMNS IN `'.$ppDataset->id.'`;'); $query->execute(); $columns=$query->fetchAll(PDO::FETCH_CLASS); $result=[]; foreach ($columns as $column){ $result[]=new PpAttribute($column->Field, $ppDataset->id, null, $column->Field, self::encodeDbDataType($column->Type), null); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getColumnsAttribute()\n {\n return $this->fetchData[self::COLUMNS];\n }", "public function getAttributesNames(){\n\t\t$this->_connect();\n\t\treturn ActiveRecordMetaData::getAttributes($this->_source, $this->_schema);\n\t}", "public function getData(){\n $values = array();\n $attributes = $this->defineAttributes();\n if(property_exists($this, 'handle') && property_exists($this, 'type')){\n $matrixAttributes = anu()->matrix->getMatrixByName($this->handle)->defineAttributes()[$this->type];\n $attributes = array_merge($attributes, $matrixAttributes);\n }\n\n foreach ($attributes as $k => $v){\n if(property_exists($this, $k)){\n $values[$k] = $this->$k;\n }\n }\n return $values;\n }", "public function attributes()\r\n {\r\n return array_keys($this->getDb()->getTableSchema($this->layoutName())->columns);\r\n }", "public static function getAttributeList() {\n $model = self::_getDataType();\n $LblNm = $model::_getLabelName();\n $table = self::_getDbTable();\n $rs = $table->fetchAll(\n $table->select($LblNm)\n );\n $labels = array();\n foreach($rs as $row) {\n array_push($labels, $row->$LblNm);\n }\n return $labels;\n }", "protected function attributes(): array\n {\n try {\n $attributes = [];\n $i = 0;\n foreach (static::$db_columns as $column) {\n $attributes[$column] = $this->$column;\n $i++;\n }\n return $attributes;\n } catch (Exception $e) {\n die(\"Error \" . $e);\n }\n }", "abstract public function attributeNames();", "private function getListCols(){\n $result = array();\n \n foreach($this->main->dataset['data'] as $item){\n if($item['list']){\n array_push($result, array(\n 'name' => $item['label'],\n 'col_name' => $item['name'],\n 'type' => $item['type'],\n 'options_custom' => $item['options_custom'],\n 'options_table' => $item['options_table'],\n 'options_source' => $item['options_source'],\n 'prefix' => null,\n 'suffix' => null,\n 'mode' => null\n ));\n };\n };\n\n return $result;\n }", "abstract public static function columnData();", "public function getColumnsList(){\n return $this->_get(3);\n }", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "protected function _getAttributes(){\n\t\treturn ActiveRecordMetaData::getAttributes($this->_source, $this->_schema);\n\t}", "public function getParameters()\n {\n return \\common\\models\\Attribute::find()->where(['id' => $this->getEntityAttributes()->select('attribute_id')]);\n }", "public function getAttributes()\n {\n return $this->where('isRelation', false)->pluck('attribute')->toArray();\n }", "public function getDatasetNameList() {\n return $this->_get(6);\n }", "public function getSelectDataFields();", "public function getColumns()\n {\n return $this->select_list;\n }", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getDatasetNameList() {\n return $this->_get(17);\n }", "public function attributes() : array;", "function getAttrList() {\n return array_keys($this->attributes);\n }", "public function toArray()\n\t{\n\t\t$columns = array();\n\t\t\n\t\t$rf = new ReflectionClass($this);\n\t\t$props = $rf->getProperties();\n\t\tforeach ($props as $prop)\n\t\t{\n\t\t\t$column = AttributeReader::PropertyAttributes($this,$prop->getName())->Column;\n\t\t\tif ($column != \"\")\n\t\t\t\t$columns[$column] = $prop->getValue($this);\n\t\t}\n\n\t\treturn $columns;\n\t}", "public function getAttributes()\n\t{\n\t\t$arrData = array();\n\n\t\tforeach ($this->getProductAndVariantAttributes() as $attribute)\n\t\t{\n\t\t\t$arrData[$attribute] = $this->$attribute;\n\t\t}\n\n\t\treturn $arrData;\n\t}", "public function getColumns() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"columns\", []);\n\t}", "public function toArray() {\n\t\treturn $this->tblAttributes;\n\t}", "public function getAll() {\n return array_keys($this->attrs);\n }", "public function getColumns(): array;", "public function getAttributesList() {\n return $this->_get(3);\n }", "public function getAttributesList() {\n return $this->_get(9);\n }", "public function getAttributesList() {\n return $this->_get(2);\n }", "public function getAttributes() {\n $attr = array();\n \n $attr[\"id\"] = $this->id_;\n $attr[\"taxonId\"] = $this->taxonId_;\n $attr[\"dbh\"] = $this->dbh_;\n $attr[\"lat\"] = $this->lat_;\n $attr[\"lng\"] = $this->lng_;\n $attr[\"layers\"] = $this->layers_;\n \n return $attr;\n }", "public function getAttributesList() {\n return $this->_get(7);\n }", "public function getAttributes() {}", "public function getAttributes() {}", "public function getAttributes(): iterable;", "public function get_CSV_Attr()\n\t{\n\t\t$handle = fopen(\"./tables/attributes.csv\", \"r\");\n\t\t$first_row = true;\n\t\t$final_ata = array();\n\t\t$headers = array();\n\n\t\twhile (($data = fgetcsv($handle, 1000, \",\")) !== FALSE) \n\t\t{ \n\t\t\tif($first_row) \n\t\t\t{\n\t\t\t\t$headers = $data;\n\t\t\t\t$first_row = false;\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t$final_ata[] = array_combine($headers, array_values($data));\n\t\t\t}\n\t\t}\n\n\t\t$result_arr = array();\t\n\t\tforeach($final_ata as $key => $value)\n\t\t{\n\t\t\t$name = $final_ata[$key]['ATTR_Varaiable'];\n\t\t\t$result_arr[$name] = $value;\n\t\t}\n\t\treturn($result_arr);\n \n }", "public function getAttributesList()\n {\n }", "public function getAllAtributes() {\r\n $class = get_class($this->getInvoker());\r\n return mdAttributeHandler::getAllAttributes($class);\r\n }", "public function getAttributesList() {\n return $this->_get(24);\n }", "public function getAttributesList() {\n return $this->_get(15);\n }", "public function getAttributesList() {\n return $this->_get(15);\n }", "public function getAllAttributes()\n\t{\n\t\t$intID\t = $this->Input->get('id');\n\t\t$intPID\t = $this->Input->get('pid');\n\n\t\t$arrReturn = array();\n\n\t\t// Add meta fields.\n\t\t$arrReturn['meta'] = $GLOBALS['METAMODELS_SYSTEM_COLUMNS'];\n\n\t\tif (empty($intPID))\n\t\t{\n\t\t\t$objResult = $this->Database\n\t\t\t\t\t->prepare('SELECT pid FROM tl_metamodel_attribute WHERE id=?')\n\t\t\t\t\t->limit(1)\n\t\t\t\t\t->execute($intID);\n\n\t\t\tif ($objResult->numRows == 0)\n\t\t\t{\n\t\t\t\treturn $arrReturn;\n\t\t\t}\n\n\t\t\t$objMetaModel = MetaModelFactory::byId($objResult->pid);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$objMetaModel = MetaModelFactory::byId($intPID);\n\t\t}\n\n\t\tforeach ($objMetaModel->getAttributes() as $objAttribute)\n\t\t{\n\t\t\t$arrReturn['attributes'][$objAttribute->getColName()] = sprintf('%s (%s)', $objAttribute->getName(), str_replace('MetaModelAttribute', '', get_class($objAttribute)));\n\t\t}\n\n\t\treturn $arrReturn;\n\t}", "public function _getDataAttributes($attrsRequested=null) {\n $result = array();\n foreach($this->attrs as $attr => $val) {\n if (is_null($attrsRequested) || in_array($attr, $attrsRequested)) {\r\n $result[] = \"data-{$attr}=\\\"{$val}\\\"\";\n }\r\n }\n return $result;\n }", "abstract protected function getColumns(): array;", "public function getAttributeList(): array;", "public function getCustomAttributes(): array;", "public static function getDataHtmlFields(): array\n {\n $data = [];\n\n if ($records = PqrHtmlField::findAllByAttributes([\n 'active' => 1\n ])) {\n foreach ($records as $PqrHtmlField) {\n $data[] = $PqrHtmlField->getDataAttributes();\n }\n }\n\n return $data;\n }", "public function all()\n\t{\n\t\treturn $this->attributes;\n\t}", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function attributesDataProvider()\n {\n return [\n [\n [\n 'value1' => 123,\n 'value2' => 'string',\n ],\n ['value1'],\n ['value1'],\n [\n 'value1' => 123,\n ],\n ],\n [\n [\n 'value1' => 456,\n 'value2' => 'text',\n 'value3' => true,\n ],\n ['value1', 'value3'],\n ['value1', 'value3'],\n [\n 'value1' => 456,\n 'value3' => true,\n ],\n ],\n [\n [\n 'value1' => 'text',\n 'value2' => 789,\n 'value3' => false,\n ],\n ['value1', 'value2', 'value3'],\n ['value1', 'value2', 'value3'],\n [\n 'value1' => 'text',\n 'value2' => 789,\n 'value3' => false,\n ],\n ],\n ];\n }", "public function getDataAllColumns() : array{\n\n $columns = [];\n foreach ($this->configs->fields as $k => $value) {\n $columns[$k] = array_column($this->model->getValuesColumn($value),$value);\n }\n return $columns;\n }", "public function table_attributes() {\n return static::find_by_sql(\"SHOW COLUMNS FROM \".static::$table_name);\n }", "public function get_selectable_columns()\n\t{\n\t\treturn array();\n\t}", "public function getCol() : array\n\t{\n\t\treturn $this->fetchAllFromColumn();\n\t}", "private function _retrieveFormattedDataAttributes()\n {\n $dataAttribs = '';\n $filter = new Zend_Filter_Word_CamelCaseToDash();\n foreach ($this->_dataAttribs as $key => $value) {\n $key = strtolower($filter->filter($key));\n if ($value === true) {\n $value = 'true';\n } else if($value === false) {\n $value = 'false';\n }\n $dataAttribs .= \"data-$key=\\\"$value\\\" \";\n }\n return $dataAttribs;\n }", "public static function getAttributeTypeList() {\n $model = self::_getDataType();\n $LblNm = $model::_getLabelName();\n $table = self::_getDbTable();\n $rs = $table->fetchAll(\n $table->select($LblNm)\n );\n $labels = array();\n foreach($rs as $row) {\n array_push($labels, $row->$LblNm);\n }\n return $labels;\n }", "protected function getSQLInfo() {\r\n\t\treturn array_merge(self::getStaticSQLInfo(), $this->attrs);\r\n\t}", "protected function getBParamDataAttributes() {}", "protected function attributes() {\n\t $attributes = array();\n\t foreach(static::$table_fields as $field) {\n\t if(property_exists( $this, $field)) {\n\t $attributes[$field] = $this->$field;\n\t }\n\t }\n\t return $attributes;\n }", "abstract function attributes(): array;", "public function attribute_names() {\n\t\n\t\treturn array_keys( $this->attributes );\n\t\t\n\t}", "public function getAttributesToSelect()\n {\n return $this->attributesToSelect;\n }", "public function attributes();", "public function getAttributesOptions()\n {\n $attribOptsArr = DB::table($this->DBTables['Attributes_Values'])\n ->get();\n\n return $attribOptsArr;\n }", "public function attributeNames() {\n\t\treturn $this->getAttributeNames();\n\t}", "public function attributes()\n {\n return [];\n }", "public function attributes()\n {\n return [];\n }", "public function attributes()\n {\n return [];\n }", "public static function getColumns()\n {\n return array('libraryId', 'signature', 'summary', 'status', 'userId');\n }", "protected function getAttr()\r\n\t{\r\n\t\treturn array( 'maxLength', 'width', 'searchMethod', 'searchRangeValues' );\r\n\t}", "abstract public function listColumns();", "private function getColumnValues()\n {\n return array_slice($this->_args, 2);\n }", "public function getAttributes()\n {\n $return = [];\n foreach ($this->attr as $attr => $info) {\n $return[$attr] = $this->getAttribute($attr);\n }\n\n return $return;\n }", "public function column(): array\n {\n if ($this->shouldEmulateExecution()) {\n return [];\n }\n\n /** TODO add support for orderBy */\n return $this->executeScript('Column', $this->attribute);\n }", "public function attributes()\n {\n $attributes = array();\n foreach(self::$db_fields as $field)\n {\n if(property_exists($this,$field))\n {\n $attributes[$field] = $this->$field;\n }\n }\n return $attributes;\n }", "public function getAttributes(){\n\t\t$this->_connect();\n\t\treturn $this->_getAttributes();\n\t}", "public function attributes()\n {\n if (isset(self::$_detailsData[self::className()][$this->_parentIdValue])) {\n return array_keys(self::$_detailsData[self::className()][$this->_parentIdValue]);\n }\n return [];\n }", "public function getAttributes()\n {\n $array = [];\n\n if ($this->getValueSet() === null) {\n return $array;\n }\n\n foreach ($this->getValueSet()->getValues() as $value) {\n $array[$value->getAttribute()->getName()] = $value;\n }\n\n return $array;\n }", "public function getAttributes(){ }", "public function getFields() {\r\n\t\tif($this->_fields === null) {\r\n\t\t\t$this->_fields = $this->activeDataProvider->model->attributeNames();\r\n\t\t}\r\n\t\treturn $this->_fields;\r\n\t}", "public function getAttributes()\n {\n $userId = $this->getDataRow()->getCellValue('id');\n // Prepare your attributes\n $newAttributes = [\n 'data-href' => route('admin.userdetail', [$userId]),\n 'class' => 'my-class table-row',\n ];\n return array_merge(parent::getAttributes(), $newAttributes);\n }", "public static function columns()\n {\n if (Deal::first() ?? false) {\n return array_diff(array_keys(Deal::first()->attributesToArray()), Deal::first()->exclude); \n } else {\n return array();\n }\n }", "public function getDatasList(){\n return $this->_get(5);\n }" ]
[ "0.6912565", "0.67044073", "0.66587377", "0.6645676", "0.6625465", "0.6570991", "0.65597194", "0.6544039", "0.65066284", "0.64955425", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.63712233", "0.63390386", "0.6338144", "0.6322202", "0.6316808", "0.6299333", "0.62814295", "0.62814295", "0.62814295", "0.62814295", "0.6281254", "0.6255441", "0.6253178", "0.6252298", "0.6251864", "0.6247022", "0.6239341", "0.62393016", "0.6238107", "0.62311167", "0.62213814", "0.6211749", "0.61866474", "0.61806303", "0.6177703", "0.61757284", "0.61560464", "0.6147942", "0.6136333", "0.61312574", "0.6128831", "0.61272603", "0.61272603", "0.611487", "0.61143094", "0.61142826", "0.61108685", "0.61029536", "0.60824287", "0.6073006", "0.60627466", "0.60627466", "0.60627466", "0.60627466", "0.60627466", "0.60627466", "0.60627466", "0.6061252", "0.60531944", "0.6050751", "0.6050018", "0.603156", "0.6024107", "0.6015056", "0.60128427", "0.60124815", "0.6007903", "0.5998942", "0.5977503", "0.59729296", "0.5962866", "0.59564006", "0.59562534", "0.5949191", "0.5949191", "0.5949191", "0.5943577", "0.5943165", "0.594263", "0.59216774", "0.5919723", "0.59172773", "0.5914966", "0.59121895", "0.5898761", "0.5898431", "0.5895549", "0.5895528", "0.5893237", "0.5884133", "0.5884131" ]
0.705272
0
Method returning list of available preprocessing types
Метод, возвращающий список доступных типов предварительной обработки
public static function getSupportedPreprocessingTypes() { return [Preprocessing::TYPE_EACHONE, Preprocessing::TYPE_EQUIDISTANT_INTERVALS, Preprocessing::TYPE_INTERVAL_ENUMERATION, Preprocessing::TYPE_NOMINAL_ENUMERATION]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_desired_types();", "function wp_get_ext_types()\n {\n }", "public static function getTypes();", "public static function getStandardTypes()\n {\n }", "public static function get_possible_types()\n {\n }", "public static function get_possible_types()\n {\n }", "public static function get_possible_types()\n {\n }", "function getAvailableTypes() {\n return array('public' => 'public microtext',\n 'private' => 'private microtext',\n 'book' => 'microbuilder book microtext' );\n }", "private function get_post_types() {\n\n\t\t$output = 'names'; // names or objects, note names is the default\n\t\t$operator = 'and'; // 'and' or 'or'\n\n\t\t// Collate builtin and custom post-types\n\t\t$builtin_post_types = get_post_types( array( 'public' => true, '_builtin' => true ), $output, $operator );\n\t\t$custom_post_types = get_post_types( array( \n\t\t\t// Perhaps later introduce an option to select whether to include non-public CPTs as well.\n\t\t\t//'public' => true, \n\t\t\t'_builtin' => false \n\t\t\t), \n\t\t$output, $operator );\n\t\t$post_types = array_merge( $builtin_post_types, $custom_post_types );\n\n\t\treturn $post_types;\n\t}", "public function get_types()\n\t{\n\t\treturn array();\n\t}", "public function getProcessTypes() {\n return array(\n 'media_seller',\n 'ad_network',\n 'product',\n // Publisher is requested per publisher ID.\n 'publisher',\n );\n }", "function vcex_theme_post_types() {\n\tif ( function_exists( 'wpex_theme_post_types' ) ) {\n\t\treturn wpex_theme_post_types();\n\t}\n\treturn array();\n}", "protected function getTypes() {}", "public static function getStandardTypes() : array\n {\n }", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public static function getTypes(): array {\n\t\treturn ['pizza'];\n\t}", "public function getTypes(): array;", "public function getTypes(): array;", "public function getInputTypesWithOptions()\n {\n $types = [];\n foreach ($this->inputTypes as $code => $inputType) {\n if ($inputType->isManageOptions()) {\n $types[] = $code;\n }\n }\n\n return $types;\n }", "public function typeProvider()\n {\n return array(\n array(true, false),\n array(12, false),\n array(24.50, false),\n array(new \\stdClass(), false),\n array('string', true),\n );\n }", "function getSupportedSourceTypes() ;", "public static function returnAllowedInstallTypes() {}", "public function getCleanerTypes()\n\t{\n\t\treturn array(\n\t\t\t'str',\n\t\t\t'string',\n\t\t\t'str_notrim',\n\t\t);\n\t}", "protected function _listTypes()\n {\n global $config;\n $types = objects::types();\n\n $result = array();\n foreach ($types as $type) {\n $infos = objects::infos($type);\n $result[$type] = $infos['name'];\n }\n return $result;\n }", "public static function get_post_types_to_setup() {\n\n\t\treturn static::$post_types_to_set_up;\n\n\t}", "public static function getCodeTypes() {\n return array('B', 'P', 'PU', 'PR', 'CS', 'SA', 'SR', 'PG');\n }", "public function getPreRequisite() : array\n {\n $types = snake_case(request('types'));\n\n $types = (! is_array($types)) ? explode(\",\", $types) : $types;\n\n $data = ListHelper::getConfigLists($types);\n\n if (in_array('countries', $types)) {\n $data['countries'] = ListHelper::getCountries();\n }\n\n if (in_array('currencies', $types)) {\n $data['currencies'] = ListHelper::getCurrencies();\n }\n\n if (in_array('timezones', $types)) {\n $data['timezones'] = ListHelper::getTimezones();\n }\n\n if (in_array('frequencies', $types)) {\n $data['frequencies'] = ArrHelper::getTransList('frequencies', 'general');\n }\n\n if (in_array('locales', $types)) {\n $data['locales'] = $this->locale->getLocales();\n }\n\n return $data;\n }", "public function getSupportedSourceTypes() {}", "public static function getPresetsList(): array\n\t{\n\t\t$presets['filter_last_30_days'] = [\n\t\t\t'name' => Loc::getMessage('TELEPHONY_REPORT_LAST_30_DAYS_FILTER_PRESET_TITLE'),\n\t\t\t'fields' => [\n\t\t\t\t'TIME_PERIOD_datesel' => DateType::LAST_30_DAYS,\n\t\t\t],\n\t\t\t'default' => true,\n\t\t];\n\n\n\t\t$presets['filter_current_month'] = [\n\t\t\t'name' => Loc::getMessage('TELEPHONY_REPORT_CURRENT_MONTH_FILTER_PRESET_TITLE'),\n\t\t\t'fields' => [\n\t\t\t\t'TIME_PERIOD_datesel' => DateType::CURRENT_MONTH,\n\t\t\t],\n\t\t\t'default' => false,\n\t\t];\n\n\t\t$presets['filter_current_quarter'] = [\n\t\t\t'name' => Loc::getMessage('TELEPHONY_REPORT_CURRENT_QUARTER_FILTER_PRESET_TITLE'),\n\t\t\t'fields' => [\n\t\t\t\t'TIME_PERIOD_datesel' => DateType::CURRENT_QUARTER,\n\t\t\t],\n\t\t\t'default' => false,\n\t\t];\n\n\t\treturn $presets;\n\t}", "private function resource_type_list() {\n\n\t\t$this->load_site_settings();\n\n\t\tif($this->res_list != false) {\n\t\t\treturn $this->res_list;\n\t\t}\n\n\t\tif(is_array($this->settings['eeck_resourcetypes'])) {\n\t\t\t$this->res_list = array();\n\n\t\t\tforeach($this->settings['eeck_resourcetypes'] as $res) {\n\t\t\t\t$this->res_list[] = $res['name'];\n\t\t\t}\n\t\t}\n\n\t\treturn $this->res_list;\n\t}", "function get_post_types() {\n\tglobal $rf_custom_posts;\n\n\t$post = new PostType();\n\t$cpts = $post->get_admin_post_pages();\n\n\t$cpts = array_merge($cpts, $rf_custom_posts);\n\t$cpts = apply_filters(\"admin/post_types\", $cpts);\n\n\treturn $cpts;\n}", "protected function types()\n\t{\n\t\treturn array_keys($this->config->get('outmess::styles.' . $this->style)); \n\t}", "private function get_registered_post_types() {\n\t\t$post_types = get_post_types( array(), 'names' );\n\t\t$post_types = array_diff( $post_types, array( 'attachment', 'revision', 'nav_menu_item', 'customize_changeset', 'custom_css', 'oembed_cache', 'user_request', 'wp_block' ) );\n\t\t$data = array();\n\t\tforeach ( $post_types as $post_type ) {\n\t\t\t$data[] = $post_type;\n\t\t}\n\t\treturn $data;\n\t}", "function wp_get_mime_types()\n {\n }", "public function getPostsTypes()\n\t {\n\t \t$args = array(\n\t\t\t 'public' => true,\n\t\t\t '_builtin' => false\n\t\t\t);\n\n\t\t\t$output = 'names'; // names or objects, note names is the default\n\t\t\t$operator = 'and'; // 'and' or 'or'\n\t\t\t$post_types = get_post_types( $args, $output, $operator ); \n\n\t\t\treturn $post_types;\n\t }", "function get_known_types()\n {\n return array_keys($this->object->_forms);\n }", "private function getPossibleResolvableTypes(): array\n {\n $suffixTypes = $this->getGacelaConfigFile()->getSuffixTypes();\n\n $resolvableTypes = $suffixTypes[$this->getResolvableType()] ?? $this->getResolvableType();\n\n return is_array($resolvableTypes) ? $resolvableTypes : [$resolvableTypes];\n }", "function get_post_mime_types()\n {\n }", "public function get_types()\n {\n }", "function get_parade_paragraphs_types_list() {\n return [\n ['', 'Chart box', 'chart_box', ''],\n ['', 'Header', 'header', ''],\n ['', 'Images', 'images', ''],\n ['', 'Locations', 'locations', ''],\n ['', 'Parallax', 'parallax', ''],\n ['', 'Simple', 'simple', ''],\n ['', 'Social links', 'social_links', ''],\n ['', 'Text & image', 'image_text', ''],\n ['', 'Text box', 'text_box', ''],\n ['', 'Text boxes', 'text_boxes', ''],\n ];\n}", "public static function getTypes()\n {\n return [\n ModelRegistry::TRANSACTION => ModelRegistry::getById(ModelRegistry::TRANSACTION)->label,\n ModelRegistry::PRODUCT => ModelRegistry::getById(ModelRegistry::PRODUCT)->label,\n ];\n }", "public function getPostTypes()\n {\n return WPRSS_FTP_Settings::get_post_types();\n }", "public static function getCustomMimeTypeList()\n {\n # Returns the system MIME type mapping of extensions to MIME types.\n $out = array();\n $file = fopen( Configuration::mimeTypeList, 'r' );\n while ( ( $line = fgets( $file ) ) !== false ) {\n $line = trim( preg_replace( '/#.*/', '', $line ) );\n if ( ! $line )\n continue;\n $parts = preg_split( '/\\s+/', $line );\n if ( count( $parts ) == 1 )\n continue;\n $type = array_shift( $parts );\n foreach( $parts as $part )\n $out[$part] = $type;\n }\n fclose( $file );\n return $out;\n }", "public static function getTypesList()\n {\n return ArrayHelper::map(Yii::$app->get('cms')->getPageTypes(), 'type', 'name');\n }", "function qa_list_module_types()\n{\n\treturn array_keys(qa_list_modules_info());\n}", "public static function getTypeList() {\n return array(\n self::TYPE_CODE_1=>self::TYPE_STRING_1,\n self::TYPE_CODE_2=>self::TYPE_STRING_2,\n self::TYPE_CODE_3=>self::TYPE_STRING_3,\n self::TYPE_CODE_4=>self::TYPE_STRING_4,\n self::TYPE_CODE_5=>self::TYPE_STRING_5,\n self::TYPE_CODE_6=>self::TYPE_STRING_6\n );\n }", "public static function all_post_types()\n\t{\n\t\treturn array_merge(App::config('builtin_post_types'), App::get_public_cpt());\n\t}", "public static function getAllForcedTypes()\n {\n return array(\n self::FT_3GP,\n self::FT_AL,\n self::FT_BMP,\n self::FT_GIF,\n self::FT_JPG,\n self::FT_PNG,\n self::FT_TONE,\n self::FT_UL,\n self::FT_XMP,\n self::FT_STW\n );\n }", "public function getImagesTypes() {\n\t\treturn array( \n 'uncategorized' => 'Uncategorized',\n 'background' => \"Background & Pattern\",\n 'frame' => \"Mask\",\n 'image' => \"Image\",\n 'clipart' => \"Clipart\",\n 'shape' => \"Shape\" \n );\n\t}", "abstract protected function getSupportedClasses();", "function post_types()\n{\n $collection = collect(get_post_types(array( '_builtin' => false ), 'objects'))\n ->pluck('label', 'name')\n ->except(array( 'acf-field', 'acf-field-group', 'wp_stream_alerts', 'wp_area' ))\n ->prepend(get_post_type_object('page')->labels->name, 'page')\n ->prepend(get_post_type_object('post')->labels->name, 'post')\n ->all();\n\n return $collection;\n}", "function elb_get_supported_post_types() {\n\tglobal $elb_options;\n\n\t$post_types = !empty( $elb_options['post_types'] ) ? $elb_options['post_types'] : array( 'post' );\n\n\treturn apply_filters( 'elb_post_types', $post_types );\n}", "public function typesProvider()\n {\n return [\n '1 Type' => ['Type1'],\n '2 Type' => [['Type1', 'Type2']],\n ];\n }", "public static function getTypes() {\n\t\treturn [\n\t\t\t'text' => self::RESOURCE_TYPE_TEXT,\n\t\t\t'img' => self::RESOURCE_TYPE_IMG\n\t\t];\n\t}", "public function get_item_types()\n\t{\n\t\treturn Plugins::filter( 'get_item_types', $this->item_types );\n\t}", "public function getTypes()\n\t{\n\t\t$keys = array_keys( ColumnHelper::getAvailableTypes() );\n\t\t$labels = Sort::pluck( ColumnHelper::getAvailableTypes(), 'name' );\n\n\t\t$response = [];\n\t\t$types = array_combine( $keys, $labels );\n\t\t$allowed = $this->section->allowedColumns;\n\t\t$allowed = apply_filters( 'chef_sections_default_allowed_columns', $allowed, $this, $this->section );\n\n\t\tforeach( $types as $key => $type ){\n\t\t\tif( in_array( $key, $allowed ) )\n\t\t\t\t$response[ $key ] = $type;\n\t\t}\n\n\t\treturn $response;\n\n\t}", "function cextras_types_formulaires(){\r\n\t$types = array();\r\n\r\n\tforeach(_chemin() as $dir) {\r\n\t\tif (@is_dir($s = $dir.'extra-saisies/')) {\r\n\t\t\tforeach(preg_files($s, '.*.html$') as $saisie) {\r\n\t\t\t\t$type = basename($saisie,'.html');\r\n\t\t\t\t$types[$type] = array(\r\n\t\t\t\t\t'nom' => _T('cextras:type', array('type' => $type))\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $types;\r\n}", "static public function getTypeList()\n\t{\n\t\t/*\n\t\t * Searches the Type folder for all different tournament types.\n\t\t * This is used for when a user is creating a tournament and want to select what type to use\n\t\t * The array is set up like so:\n\t\t * key: class name for tourney type (get_class() could be useful)\n\t\t * value: result of object getName()\n\t\t */\n\t\t$retarray = array();\n\t\tif ($dir = scandir(APPLICATION_PATH . '/models/VictoryCondition')) {\n\t\t\tforeach ($dir as $file) {\n\t\t\t\tif ($file != 'Abstract.php' && strtolower(substr($file, strrpos($file, '.') + 1)) == 'php') {\n\t\t\t\t\t$classname = 'Model_VictoryCondition_' . substr($file, 0, strrpos($file, '.'));\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (class_exists($classname)) {\n\t\t\t\t\t\t\t$instance = new $classname;\n\t\t\t\t\t\t\tif ($instance instanceof Model_VictoryCondition_Abstract) {\n\t\t\t\t\t\t\t\t$retarray[$classname] = $instance->getTypeName();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception $e) {}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $retarray;\n\t}", "public function getSupportedFormat()\n {\n $gdInfo = gd_info();\n $support = array();\n\n foreach ($gdInfo as $key => $info) {\n if (is_bool($info) && $info === true) {\n $tmp = explode(' ', $key);\n $format = $tmp[0];\n if (($format != 'FreeType' || $format != 'T1Lib') && !in_array($format, $support)) {\n $support[] = $format;\n }\n }\n }\n\n return $support;\n }", "static function getTypes(): array\n\t{\n return self::$types;\n }", "public function getPlatformTypes(): array\n {\n return $this->platformTypes;\n }", "public function getTypes(): array\n {\n return $this->types;\n }", "public static function types()\n {\n return self::$types;\n }", "public function getCcAvailableTypes()\n {\n $types = $this->_getConfig()->getCcTypes();\n if ($method = $this->getMethod()) {\n $availableTypes = $method->getConfigData('cctypes');\n if ($availableTypes) {\n $availableTypes = explode(',', $availableTypes);\n foreach ($types as $code=>$name) {\n if (!in_array($code, $availableTypes)) {\n unset($types[$code]);\n }\n }\n }\n }\n return $types;\n }", "public static function types() : array\n {\n return ['questions', 'pictures', 'video'];\n }", "public static function getTypes(): array\n {\n return self::getRelevancyTypes();\n }", "protected function getAvailableTypes() {\n return [\n 'miljoenennota' => 'miljoenennota',\n 'miljoenennota (bijlage)' => 'miljoenennota',\n 'voorjaarsnota' => 'voorjaarsnota',\n 'najaarsnota' => 'najaarsnota',\n 'belastingplan (vvw)' => 'belastingplan_voorstel_van_wet',\n 'belastingplan (mvt)' => 'belastingplan_memorie_van_toelichting',\n 'belastingplan (sb)' => 'belastingplan_staatsblad',\n 'financieel jaarverslag' => 'financieel_jaarverslag',\n 'financieel jaarverslag (bijlage)' => 'financieel_jaarverslag',\n 'sw' => 'voorstel_van_wet',\n 'sw (mvt)' => 'memorie_van_toelichting',\n 'owb' => 'memorie_van_toelichting',\n 'owb (wet)' => 'voorstel_van_wet',\n 'jv' => 'jaarverslag',\n '1supp' => 'memorie_van_toelichting',\n '1supp (wet)' => 'voorstel_van_wet',\n '2supp' => 'memorie_van_toelichting',\n '2supp (wet)' => 'voorstel_van_wet',\n 'isb (mvt)' => 'isb_memorie_van_toelichting',\n 'isb (wet)' => 'isb_voorstel_van_wet',\n ];\n }", "function getDatatypes() {\n return ['Protein', 'Phenotype', 'Gene Expression', 'Nucleotide Sequence','Clinical Trials','Imaging Data','Morphology','Proteomics Data','Physiological Signals','Epigenetic Data','Data from Papers',\n 'Omics Data','Survey Data','Cell Signaling','Unspecified',];\n}", "static public function getThemeResourceTypes();", "function dp_selected_sort_types() {\n\t$selected_types = get_option('dp_sort_types');\n\tif(empty($selected_types))\n\t\treturn array();\n\n\t$supported_types = dp_supported_sort_types();\n\tforeach($selected_types as $key => $value)\n\t\t$selected_types[$key] = $supported_types[$key];\n\n\treturn apply_filters('dp_selected_sort_types', $selected_types);\n}", "public function types()\n {\n return $this->types;\n }", "public function get_post_types() {\n\n\t\treturn [\n\t\t\tPost_Type_Movie::SLUG,\n\t\t];\n\n\t}", "public function getSupportedFileTypes(){\n\t\t$_url = $this->constants['SERVICE_ENTRY_POINT'].$this->constants['SERVICE_VERSION'].'/'.$this->constants['MISC_PATH'].'/supported-file-types';\n\t\t$response = $this->getRequests($_url)['response'];\n\t\treturn $response;\n\t}", "function get_custom_post_types() {\n\t$args = array(\n\t\t'public' => true,\n\t\t'_builtin' => false\n\t);\n\t$post_types = get_post_types( $args, 'names');\n\treturn $post_types;\n}", "public function types()\n {\n return [\n static::TYPE_APP,\n static::TYPE_GALLERY,\n static::TYPE_PHOTO,\n static::TYPE_PLAYER,\n static::TYPE_PRODUCT,\n static::TYPE_SUMMARY,\n static::TYPE_SUMMARY_LARGE_IMAGE,\n ];\n }", "function acadp_get_custom_field_types() {\n\n\t$types = array(\n\t\t'text' => __( 'Text', 'advanced-classifieds-and-directory-pro' ),\n\t\t'textarea' => __( 'Text Area', 'advanced-classifieds-and-directory-pro' ),\n\t\t'select' => __( 'Select', 'advanced-classifieds-and-directory-pro' ),\n\t\t'checkbox' => __( 'Checkbox', 'advanced-classifieds-and-directory-pro' ),\n\t\t'radio' => __( 'Radio Button', 'advanced-classifieds-and-directory-pro' ),\n\t\t'url' => __( 'URL', 'advanced-classifieds-and-directory-pro' )\n\t);\n\n\t// Return\n\treturn apply_filters( 'acadp_custom_field_types', $types );\n\n}", "public function get_types()\n\t{\n\t\treturn $this->driver_query('type_list', FALSE);\n\t}", "#[Pure]\n\tpublic function getTypes()\n {\n }", "public static function types(): array\n {\n $all = self::getAll();\n\n return array_keys($all);\n }", "private function get_type_options() {\n\t\tglobal $wpdb, $updraftcentral_host_plugin;\n\t\t$options = array();\n\n\t\tif (!function_exists('get_post_mime_types')) {\n\t\t\tglobal $updraftplus;\n\t\t\t// For a much later version of WP the \"get_post_mime_types\" is located\n\t\t\t// in a different folder. So, we make sure that we have it loaded before\n\t\t\t// actually using it.\n\t\t\tif (version_compare($updraftplus->get_wordpress_version(), '3.5', '>=')) {\n\t\t\t\trequire_once(ABSPATH.WPINC.'/post.php');\n\t\t\t} else {\n\t\t\t\t// For WP 3.4, the \"get_post_mime_types\" is located in the location provided below.\n\t\t\t\trequire_once(ABSPATH.'wp-admin/includes/post.php');\n\t\t\t}\n\t\t}\n\n\t\t$post_mime_types = get_post_mime_types();\n\t\t$type_options = $wpdb->get_col(\"SELECT `post_mime_type` FROM {$wpdb->posts} WHERE `post_type` = 'attachment' AND `post_status` = 'inherit' GROUP BY `post_mime_type` ORDER BY `post_mime_type` DESC\");\n\n\t\tforeach ($post_mime_types as $mime_type => $label) {\n\t\t\tif (!wp_match_mime_types($mime_type, $type_options)) continue;\n\t\t\t$options[] = array('label' => $label[0], 'value' => esc_attr($mime_type));\n\t\t}\n\n\t\t$options[] = array('label' => $updraftcentral_host_plugin->retrieve_show_message('unattached'), 'value' => 'detached');\n\t\treturn $options;\n\t}", "public function dmaps_get_post_types() {\n\t\t\t\t\n\t\t$args = array(\n\t\t 'public' => true,\n\t\t '_builtin' => false\n\t\t);\n\n\t\t$post_types = get_post_types( $args ); \n\t\t$post_arr = array( 'post' => 'Post', 'page' => 'Page' );\n\n\t\tforeach ( $post_types as $post_type ) {\n\n\t\t\t$arr = array($post_type => $post_type);\n\t\t\t$post_arr += $arr;\n\n\t\t}\n\t\t\n\t\treturn $post_arr;\t\n\n\t}", "public static function get_post_types() {\n\n\t\t$types = get_post_types();\n\t\t$custom_types = array_diff( $types, self::remove_types() );\n\n\t\tforeach ( $types as $type ) {\n\t\t\t$custom_types[$type] = ucfirst( str_replace( '_', ' ', $type ) );\n\t\t}\n\n\t\treturn $custom_types;\n\n\t}", "public static function getCardTypes() {\n $ctyplist = array();\n foreach (array_keys(CreditCardValidator::$card_patterns) as $k => $v)\n $ctyplist[$v] = $v;\n return $ctyplist;\n }", "public static function getTypes() {\n\t\treturn array(self::TYPE_FILE, self::TYPE_SOURCE, self::TYPE_THUMBNAIL);\n\t}", "static public function get_presets() {\n\t\treturn self::$presets;\n\t}", "private function getMimeTypes()\n {\n return apply_filters('wplms_assignments_upload_mimes_array',array(\n 'JPG' => array(\n 'image/jpeg',\n 'image/jpg',\n 'image/jp_',\n 'application/jpg',\n 'application/x-jpg',\n 'image/pjpeg',\n 'image/pipeg',\n 'image/vnd.swiftview-jpeg',\n 'image/x-xbitmap'),\n 'GIF' => array(\n 'image/gif',\n 'image/x-xbitmap',\n 'image/gi_'),\n 'PNG' => array(\n 'image/png',\n 'application/png',\n 'application/x-png'),\n 'DOCX'=> 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'RAR'=> 'application/x-rar',\n 'ZIP' => array(\n 'application/zip',\n 'application/x-zip',\n 'application/x-zip-compressed',\n 'application/x-compress',\n 'application/x-compressed',\n 'multipart/x-zip'),\n 'DOC' => array(\n 'application/msword',\n 'application/doc',\n 'application/text',\n 'application/vnd.msword',\n 'application/vnd.ms-word',\n 'application/winword',\n 'application/word',\n 'application/x-msw6',\n 'application/x-msword'),\n 'PDF' => array(\n 'application/pdf',\n 'application/x-pdf',\n 'application/acrobat',\n 'applications/vnd.pdf',\n 'text/pdf',\n 'text/x-pdf'),\n 'PPT' => array(\n 'application/vnd.ms-powerpoint',\n 'application/mspowerpoint',\n 'application/ms-powerpoint',\n 'application/mspowerpnt',\n 'application/vnd-mspowerpoint',\n 'application/powerpoint',\n 'application/x-powerpoint',\n 'application/x-m'),\n 'PPTX'=> 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n 'PPS' => 'application/vnd.ms-powerpoint',\n 'PPSX'=> 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',\n 'PSD' => array('application/octet-stream',\n 'image/vnd.adobe.photoshop'\n ),\n 'ODT' => array(\n 'application/vnd.oasis.opendocument.text',\n 'application/x-vnd.oasis.opendocument.text'),\n 'XLS' => array(\n 'application/vnd.ms-excel',\n 'application/msexcel',\n 'application/x-msexcel',\n 'application/x-ms-excel',\n 'application/vnd.ms-excel',\n 'application/x-excel',\n 'application/x-dos_ms_excel',\n 'application/xls'),\n 'XLSX'=> array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.ms-excel'),\n 'MP3' => array(\n 'audio/mpeg',\n 'audio/x-mpeg',\n 'audio/mp3',\n 'audio/x-mp3',\n 'audio/mpeg3',\n 'audio/x-mpeg3',\n 'audio/mpg',\n 'audio/x-mpg',\n 'audio/x-mpegaudio'),\n 'M4A' => array(\n 'audio/mp4a-latm',\n 'audio/m4a',\n 'audio/mp4'),\n 'OGG' => array(\n 'audio/ogg',\n 'application/ogg'),\n 'WAV' => array(\n 'audio/wav',\n 'audio/x-wav',\n 'audio/wave',\n 'audio/x-pn-wav'),\n 'WMA' => 'audio/x-ms-wma',\n 'MP4' => array(\n 'video/mp4v-es',\n 'audio/mp4',\n 'video/mp4'),\n 'M4V' => array(\n 'video/mp4',\n 'video/x-m4v'),\n 'MOV' => array(\n 'video/quicktime',\n 'video/x-quicktime',\n 'image/mov',\n 'audio/aiff',\n 'audio/x-midi',\n 'audio/x-wav',\n 'video/avi'),\n 'WMV' => 'video/x-ms-wmv',\n 'AVI' => array(\n 'video/avi',\n 'video/msvideo',\n 'video/x-msvideo',\n 'image/avi',\n 'video/xmpg2',\n 'application/x-troff-msvideo',\n 'audio/aiff',\n 'audio/avi'),\n 'MPG' => array(\n 'video/avi',\n 'video/mpeg',\n 'video/mpg',\n 'video/x-mpg',\n 'video/mpeg2',\n 'application/x-pn-mpg',\n 'video/x-mpeg',\n 'video/x-mpeg2a',\n 'audio/mpeg',\n 'audio/x-mpeg',\n 'image/mpg'),\n 'OGV' => 'video/ogg',\n '3GP' => array(\n 'audio/3gpp',\n 'video/3gpp'),\n '3G2' => array(\n 'video/3gpp2',\n 'audio/3gpp2'),\n 'FLV' => 'video/x-flv',\n 'WEBM'=> 'video/webm',\n 'APK' => 'application/vnd.android.package-archive',\n ));\n }", "public static function getAllBuiltInTypes()\n {\n }", "public static function getTypeList()\n {\n return [\n self::TYPE_TEXT_FIELD => '',\n self::TYPE_DROP_DOWN => '',\n ];\n }", "public function getTypes()\n {\n $return = $this->dsn->types;\n\n if ($return === null) {\n return;\n }\n return explode(',', $return);\n }", "function getTypeslist ()\r\n\t{\r\n\t\t$query = 'SELECT id, name'\r\n\t\t\t\t. ' FROM #__flexicontent_types'\r\n\t\t\t\t. ' WHERE published = 1'\r\n\t\t\t\t. ' ORDER BY name ASC'\r\n\t\t\t\t;\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$types = $this->_db->loadObjectList();\r\n\t\treturn $types;\r\n\t}", "public static function types()\n\t{\n\t\t$states = array(\n\t\t\t'blog' => __('Blog'),\n\t\t\t'page' => __('Page'),\n\t\t\t'user' => __('User')\n\t\t);\n\n\t\t$values = Module::action('gleez_types', $states);\n\n\t\treturn $values;\n\t}", "function get_supported_post_types( $output = 'names' ) : array {\n\n\t$output = ( $output === 'names' ) ? 'names' : 'objects';\n\t$content_types = get_post_types(\n\t\t[ 'public' => true ],\n\t\t$output\n\t);\n\n\t$excluded_types = [\n\t\t'attachment',\n\t\t'custom_css',\n\t\t'customize_changeset',\n\t\t'revision',\n\t\t'nav_menu_item',\n\t\t'oembed_cache',\n\t\t'user_request',\n\t\t'wp_block',\n\t];\n\n\t$supported_types = [];\n\n\tforeach ( $content_types as $post_type ) {\n\t\t$type_name = ( $output === 'names' ) ? $post_type : $post_type->name;\n\n\t\tif (\n\t\t\t! in_array( $type_name, $excluded_types, true ) &&\n\t\t\tpost_type_supports( $type_name, 'custom-fields' )\n\t\t) {\n\t\t\t$supported_types[] = $post_type;\n\t\t}\n\t}\n\n\treturn apply_filters( 'coil_supported_post_types', $supported_types, $output );\n}", "protected function getSupportedClasses()\n {\n return array($this->class);\n }", "function pxlz_edgtf_get_header_type_options() {\n do_action('pxlz_edgtf_before_header_function_init');\n\n $header_types_option = apply_filters('pxlz_edgtf_register_header_type_class', $header_types_option = array());\n\n return $header_types_option;\n }", "protected function get_applicable_types()\n\t{\n\t\t$types = array();\n\n\t\tforeach ($this->types->get_all() as $id => $class)\n\t\t{\n\t\t\tif ($class->forum_robot && $class->forum_database)\n\t\t\t{\n\t\t\t\t$types[] = $id;\n\t\t\t}\n\t\t}\n\t\treturn $types;\n\t}", "public static function GetTypePlatList() {\n\t\t$sql = 'CALL get_all_typeplat_liste()';\n\t\treturn DatabaseHandler::GetAll($sql);\n\t}", "public function get_post_types(){ return $this->post_types; }" ]
[ "0.6598652", "0.64527637", "0.64381003", "0.64247364", "0.6379551", "0.6379551", "0.6379551", "0.63713324", "0.63643444", "0.63504547", "0.6295311", "0.62837964", "0.6280552", "0.62575877", "0.62489337", "0.62489337", "0.62489337", "0.62489337", "0.62391174", "0.6199816", "0.6199816", "0.61953926", "0.6186851", "0.6145421", "0.61443895", "0.6136132", "0.60796434", "0.6073085", "0.6039097", "0.6036815", "0.6031811", "0.60311365", "0.6028218", "0.6026884", "0.6004605", "0.5986827", "0.5961429", "0.59605163", "0.5958692", "0.5955467", "0.592998", "0.59290105", "0.5928143", "0.5924902", "0.59208274", "0.59124583", "0.58946365", "0.58926105", "0.5879222", "0.58772", "0.58682555", "0.5857311", "0.58517134", "0.5842204", "0.5833472", "0.5831552", "0.58226335", "0.5819679", "0.5818505", "0.58106345", "0.58097726", "0.5802363", "0.57933086", "0.5790399", "0.5788409", "0.5783975", "0.5782095", "0.57776415", "0.5768992", "0.5767993", "0.57664317", "0.574946", "0.5748889", "0.5747684", "0.57468116", "0.57454336", "0.5743564", "0.57342017", "0.5732256", "0.5727313", "0.57180655", "0.57178307", "0.57173735", "0.5715666", "0.5706474", "0.5704418", "0.57000643", "0.5687029", "0.5685549", "0.5680481", "0.5660342", "0.56586456", "0.5649846", "0.5646005", "0.56385094", "0.56272364", "0.5620447", "0.56147265", "0.56099284", "0.5598594" ]
0.7659145
0
This part is save houses data from API
Этот раздел сохраняет данные о домах из API
public function saveHousesData($data) { $now = date('Y-m-d H:i:s'); $data['mdate'] = $now; file_put_contents('_save_house_model.txt', json_encode($data)); if (isset($data['id']) && intval($data['id'] <= 0)) { unset($data['id']); } if (!isset($data['id'])) { // if (empty($data['Housesname'])) { // return ['code' => -1, 'msg' => '请提供用户名']; // } // if (empty($data['password'])) { // return ['code' => -1, 'msg' => '请提供密码']; // } // if (self::get(['Housesname' => $data['Housesname']])) { // return ['code' => -1, 'msg' => '用户名已存在']; // } $data['cdate'] = $now; //添加房源编号new // $data['dsn'] = $this->gen_house_dsn($data['source'], $data['city']); $data['dsn'] = $this->gen_house_dsn_new(); $this->data = $data; //访问频繁 if (cache('add_house_'.$data['user_id'])) { $left_second = time() - cache('add_house_'.$data['user_id']); return ['code' => -1, 'msg' => '访问过于频繁,请'.$left_second.'s后再试']; } //防并发操作 解决ID重复的问题 #A# $fp = fopen(RUNTIME_PATH."lock.txt", "w+"); if(flock($fp,LOCK_EX | LOCK_NB)) { //..处理订单 flock($fp,LOCK_UN); $result = $this->save(); if ($result) { cache('add_house_'.$data['user_id'], time(),10); } }else{ fclose($fp); return ['code' => -1, 'msg' => '系统繁忙,请稍后再试']; } fclose($fp); //防并发操作 #A# if (false === $result) { return ['code' => -1, 'msg' => '添加数据失败']; } $data['id'] = $this->id; } else { $data['id'] = intval($data['id']); if ($data['id'] <= 0) { return ['code' => -1, 'msg' => 'id 必须大于0']; } // if (self::get(['Housesname' => $data['Housesname'], 'id' => ['neq', $data['id']]])) { // return ['code' => -1, 'msg' => '用户名已存在']; // } // if (isset($data['password']) && $data['password'] == '') { // unset($data['password']); // } $result = $this->save($data, ['id' => $data['id']]); if ($result === false) { return ['code' => -1, 'msg' => '修改数据失败']; } } //添加房源编号 //$this->set_house_dsn($data['id']); return ['code' => 0, 'msg' => 'ok', 'data' => $data]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(Request $request)\n {\n\t\t$request->validate([\n\t\t\t'title' => 'required|max:250',\n\t\t\t'nr_of_rooms' => 'required|integer|min:0',\n\t\t\t'nr_of_beds' => 'required|integer|min:0',\n\t\t\t'nr_of_bathrooms' => 'integer|min:0|nullable',\n\t\t\t'square_mt' => 'integer|min:1|nullable',\n\t\t\t'address' => 'required',\n\t\t\t'image_path' => 'image|nullable',\n\t\t\t'description' => 'max:2000|nullable',\n\t\t]);\n\n\t\t//TODO: address manipulation\n\t\t$houseData = $request->all();//in mezzo ci sono sia le cose che vanno in houses che quelle che vanno in services -> SEPARARE I CAMPI!\n\t\t$newHouse = new House();\n\t\t$newHouse->fill($houseData);\n\t\tif(array_key_exists('image_path', $houseData)) {\n\t\t\t$newHouse->image_path = Storage::put('uploads', $houseData['image_path']);\n\t\t}\n\t\t$newHouse->save();\n\t\tif (!empty($houseData['services_ids'])) {\n\t\t\t$newHouse->services()->sync($houseData['services_ids']);\n \t}\n\n\t\treturn redirect()->route('upr.houses.index');\n\n }", "private function saveData() {\n // Create a new object with relevant information\n $data = new stdClass();\n $data->accessToken = $this->accessToken;\n $data->expirationDate = $this->expirationDate;\n $data->refreshToken = $this->refreshToken;\n\n // And save it to disk (will automatically create the file for us)\n file_put_contents(DATA_FILE, json_encode($data));\n }", "public function saveroomsinfo(Request $request){\n\t\t$data = array();\n\t\t$data['status'] = 0;\n\t\t$data['msg'] = 'Error';\n\t\t\n\t\t$input = $request->all();\n\t\t$propertyid = $input['propertyid'];\n\t\t$roomsinfo = $input['roomsinfo'];\n\t\t$hoursinfo = (isset($input['hoursinfo']) && $input['hoursinfo'] != NULL && !empty($input['hoursinfo'])) ? $input['hoursinfo'] : NULL;\n\t\t/*return response()->json($roomsinfo); \n\t\texit();*/\n\t\t\n\t\t$propertydata = Property::find($propertyid);\n\t\t\n\t\tif(empty($propertydata)){\n\t\t\t$data['msg'] = 'Invalid Property';\n\t\t}\n\t\telse{\n\t\t\t$roomsdata = PropertyRooms::where('property_id','=',$propertyid)->delete();\n\t\t\tforeach($roomsinfo as $room){\n\t\t\t\t$roomarray = array();\n\t\t\t\t$roomarray['studiooption_name'] = (trim($room['studiooption']) != \"\" && trim($room['studiooption']) != NULL) ? trim($room['studiooption']) : NULL;\n\t\t\t\t$roomarray['studiooption_value'] = (trim($room['studiocount']) != \"\" && trim($room['studiocount']) != NULL) ? trim($room['studiocount']) : 0;\n\t\t\t\t$roomarray['bedroomoption_name'] = (trim($room['bedroomoption']) != \"\" && trim($room['bedroomoption']) != NULL) ? trim($room['bedroomoption']) : NULL;\n\t\t\t\t$roomarray['bedroomoption_value'] = (trim($room['bedroomcount']) != \"\" && trim($room['bedroomcount']) != NULL) ? trim($room['bedroomcount']) : 0;\n\t\t\t\t$roomarray['bathoption_value'] = (trim($room['bathcount']) != \"\" && trim($room['bathcount']) != NULL) ? trim($room['bathcount']) : 0;\n\t\t\t\t$roomarray['price_startvalue'] = (trim($room['start_price']) != \"\" && trim($room['start_price']) != NULL) ? trim($room['start_price']) : 0;\n\t\t\t\t$roomarray['price_endvalue'] = (trim($room['end_price']) != \"\" && trim($room['end_price']) != NULL) ? trim($room['end_price']) : 0;\n\t\t\t\t$roomarray['property_id'] = trim($propertyid);\n\t\t\t\tPropertyRooms::create($roomarray);\n\t\t\t}\n\t\t\t\n\t\t\t$propertydata->property_officehours = serialize($hoursinfo);\n\n\t\t\tif($propertydata->update()){\n\t\t\t\t$data['status'] = 1;\n\t\t\t\t$data['msg'] = 'Property Data Saved';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$data['msg'] = 'Error in save property details';\t\t\n\t\t\t}\n\t\t}\n\t\treturn response()->json($data); \n\t\texit();\n }", "public function saveHousesDataInternal($data) {\n $now = date('Y-m-d H:i:s');\n $id = intval(@$data['id']);\n // 获取旧数据\n if ($id > 0) {\n $oldInfo = $this->find($id);\n if (!$oldInfo) {\n return array('code' => -1, 'msg' => '文章不存在');\n }\n $old_thumbnail = $oldInfo['thumnail'];\n } else {\n $data['admin_id'] = session('id');\n $old_thumbnail = '';\n }\n\n // 移动标题图\n if ($data['thumnail']) { // 确保从tmp中移动出thumnail\n // 如果之前上传过缩略图,删除\n if ($old_thumbnail && $data['thumnail'] != $old_thumbnail) {\n deleteFile($old_thumbnail);\n }\n if (false === ($data['thumnail'] = $this->_move_thumbnail($data['thumnail']))) {\n return array('code' => -1, 'msg' => '移动缩略图位置失败');\n }\n }\n\n $data['cdate'] = $now;\n $data['mdate'] = $now;\n // Generate DSN for current situtation\n //$data['dsn'] = $this->gen_house_dsn($data['source'], $data['city']);\n $data['dsn'] = $this->gen_house_dsn_new();\n // 保存数据\n if ($data['id']) {\n $lines = $this->save($data, array('id' => $data['id']));\n if ($lines !== false) {\n $res = true;\n }\n } else {\n $insertId = $this->insertGetId($data);\n if ($insertId) {\n $data['id'] = $insertId;\n $res = true;\n }\n }\n\n if (!$res) {\n return array('code' => -1, 'msg' => $this->getDbError());\n }\n return array('code' => 0, 'msg' => 'ok', 'data' => $data);\n }", "public function run()\n {\n \n\n \\DB::table('houses')->delete();\n \n \\DB::table('houses')->insert(array (\n 0 => \n array (\n 'id' => 15,\n 'title' => '更好的风格和的风格',\n 'area' => 123.0,\n 'sub_title' => '风格撒的风格撒的发噶人',\n 'unit_price' => NULL,\n 'first_pay' => NULL,\n 'product_info' => '固定好身体也让我层 v 许诺',\n 'direction' => '北',\n 'location_id' => NULL,\n 'visiting_count' => 0,\n 'floor' => 4,\n 'floors' => 123,\n 'house_type' => NULL,\n 'house_img' => '{\"cover\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"name\": \"2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}], \"house\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"name\": \"2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"name\": \"2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"name\": \"2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"name\": \"2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"name\": \"2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"name\": \"2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"name\": \"2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"name\": \"2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-36-13855a7c081861a7e.png\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-36-13855a7c081861a7e.png\", \"name\": \"2018-02-08-16-19-36-13855a7c081861a7e.png\", \"size\": \"true\", \"type\": \"png\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"name\": \"2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"name\": \"2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"size\": \"true\", \"type\": \"gif\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"name\": \"2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"name\": \"2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"name\": \"2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"name\": \"2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]}',\n 'Decoration' => '毛胚房',\n 'floor_age' => '213',\n 'supply_heating' => '无供暖',\n 'elevator' => '一梯3户',\n 'surroundings' => 'dfasdf',\n 'community_info' => 'dfasdfasdf',\n 'traffic' => 'asdfasdfas',\n 'house_age_limit' => '123',\n 'huxing_map_info' => '{\"hall\": {\"hall_1\": {\"arae\": \"123\", \"direction\": \"西南\"}}, \"balcony\": {\"balcony_1\": {\"arae\": \"123\", \"direction\": \"西\"}}, \"bedroom\": {\"bedroom_1\": {\"arae\": \"123\", \"direction\": \"北\"}}, \"kitchen\": {\"kitchen_1\": {\"arae\": \"123\", \"direction\": \"南\"}}, \"bathroom\": {\"bathroom_1\": {\"arae\": \"123\", \"direction\": \"北\"}, \"bathroom_2\": {\"arae\": \"213\", \"direction\": \"西\"}}}',\n 'tags' => '[\"新房\", \"学区房\", \"市中心\", \"随时看房\", \"地铁房\"]',\n 'created_at' => '2018-02-08 16:30:56',\n 'updated_at' => '2018-02-08 16:54:14',\n 'price' => 1343.0,\n 'room_count' => '{\"hall\": \"1\", \"balcony\": \"1\", \"bedroom\": \"1\", \"kitchen\": \"1\", \"bathroom\": \"2\"}',\n 'negative_floor' => '0',\n 'deed_info' => '[{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"name\": \"2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]',\n 'user_id' => 1,\n 'unit_number' => '123',\n 'building_number' => '123',\n 'house_number' => '123',\n 'contact' => '啊实打实大',\n 'tel' => '123',\n 'expect_price' => '132',\n 'community' => '雅居乐',\n 'status' => 'sell',\n 'location' => '陕西省西安市雁塔区曲江街道雅居乐·御宾府',\n 'city' => '西安',\n 'hot' => 0,\n 'new' => 0,\n 'location_info' => '{\"lat\": \"34.016190\", \"lng\": \"108.580375\", \"city\": \"西安市\", \"level\": \"道路\", \"adcode\": \"610111\", \"citycode\": \"029\", \"district\": \"灞桥区\", \"location\": \"109.080375,34.216190\", \"province\": \"陕西省\", \"formatted_address\": \"陕西省西安市灞桥区白鹿西路南段\"}',\n ),\n 1 => \n array (\n 'id' => 16,\n 'title' => '啊实打实大',\n 'area' => 123.0,\n 'sub_title' => '阿斯顿',\n 'unit_price' => NULL,\n 'first_pay' => NULL,\n 'product_info' => '撒的啊撒睡大时代啊阿斯顿啊撒的阿斯顿撒大时代',\n 'direction' => '北',\n 'location_id' => NULL,\n 'visiting_count' => 0,\n 'floor' => 4,\n 'floors' => 123,\n 'house_type' => NULL,\n 'house_img' => '{\"cover\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"name\": \"2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}], \"house\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"name\": \"2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"name\": \"2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"name\": \"2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"name\": \"2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"name\": \"2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"name\": \"2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"name\": \"2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"name\": \"2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-36-13855a7c081861a7e.png\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-36-13855a7c081861a7e.png\", \"name\": \"2018-02-08-16-19-36-13855a7c081861a7e.png\", \"size\": \"true\", \"type\": \"png\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"name\": \"2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"name\": \"2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"size\": \"true\", \"type\": \"gif\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"name\": \"2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"name\": \"2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"name\": \"2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"name\": \"2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]}',\n 'Decoration' => '毛胚房',\n 'floor_age' => '213',\n 'supply_heating' => '无供暖',\n 'elevator' => '一梯3户',\n 'surroundings' => 'dfasdf',\n 'community_info' => 'dfasdfasdf',\n 'traffic' => 'asdfasdfas',\n 'house_age_limit' => '123',\n 'huxing_map_info' => '{\"hall\": {\"hall_1\": {\"arae\": \"123\", \"direction\": \"西南\"}}, \"balcony\": {\"balcony_1\": {\"arae\": \"123\", \"direction\": \"西\"}}, \"bedroom\": {\"bedroom_1\": {\"arae\": \"123\", \"direction\": \"北\"}}, \"kitchen\": {\"kitchen_1\": {\"arae\": \"123\", \"direction\": \"南\"}}, \"bathroom\": {\"bathroom_1\": {\"arae\": \"123\", \"direction\": \"北\"}, \"bathroom_2\": {\"arae\": \"213\", \"direction\": \"西\"}}}',\n 'tags' => '[\"地铁房\", \"随时看房\", \"市中心\", \"学区房\"]',\n 'created_at' => '2018-02-08 16:33:43',\n 'updated_at' => '2018-02-08 16:53:44',\n 'price' => 213321.0,\n 'room_count' => '{\"hall\": \"1\", \"balcony\": \"1\", \"bedroom\": \"1\", \"kitchen\": \"1\", \"bathroom\": \"2\"}',\n 'negative_floor' => '0',\n 'deed_info' => '[{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"name\": \"2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]',\n 'user_id' => 1,\n 'unit_number' => '123',\n 'building_number' => '123',\n 'house_number' => '123',\n 'contact' => '啊实打实大',\n 'tel' => '123',\n 'expect_price' => '132',\n 'community' => '雅居乐',\n 'status' => 'sell',\n 'location' => '陕西省西安市雁塔区曲江街道雅居乐·御宾府',\n 'city' => '西安',\n 'hot' => 0,\n 'new' => 0,\n 'location_info' => '{\"lat\": \"34.016190\", \"lng\": \"109.080375\", \"city\": \"西安市\", \"level\": \"道路\", \"adcode\": \"610111\", \"citycode\": \"029\", \"district\": \"灞桥区\", \"location\": \"109.080375,34.216190\", \"province\": \"陕西省\", \"formatted_address\": \"陕西省西安市灞桥区白鹿西路南段\"}',\n ),\n 2 => \n array (\n 'id' => 17,\n 'title' => '雅居乐 3是阿斯顿啊',\n 'area' => 123.0,\n 'sub_title' => '啊实打实的',\n 'unit_price' => NULL,\n 'first_pay' => NULL,\n 'product_info' => '撒的发撒的风格形成 v 了',\n 'direction' => '北',\n 'location_id' => NULL,\n 'visiting_count' => 0,\n 'floor' => 4,\n 'floors' => 123,\n 'house_type' => NULL,\n 'house_img' => '{\"cover\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"name\": \"2018-02-08-16-18-49-14625a7c07e9f2708.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}], \"house\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"name\": \"2018-02-08-16-19-00-12975a7c07f4995f7.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"name\": \"2018-02-08-16-19-04-13435a7c07f88d571.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"name\": \"2018-02-08-16-19-07-16525a7c07fb9f001.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"name\": \"2018-02-08-16-19-10-11415a7c07fee96f9.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"name\": \"2018-02-08-16-19-16-18005a7c080428fab.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"name\": \"2018-02-08-16-19-19-10315a7c0807517c0.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"name\": \"2018-02-08-16-19-23-15295a7c080bac484.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"name\": \"2018-02-08-16-19-29-13755a7c081159bc3.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-36-13855a7c081861a7e.png\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-36-13855a7c081861a7e.png\", \"name\": \"2018-02-08-16-19-36-13855a7c081861a7e.png\", \"size\": \"true\", \"type\": \"png\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"name\": \"2018-02-08-16-19-42-13065a7c081ec060f.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"name\": \"2018-02-08-16-19-53-12165a7c08294f7d8.gif\", \"size\": \"true\", \"type\": \"gif\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"name\": \"2018-02-08-16-20-01-10165a7c083154b32.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"name\": \"2018-02-08-16-20-09-16355a7c0839c3e20.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"name\": \"2018-02-08-16-20-24-17025a7c0848ee662.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"name\": \"2018-02-08-16-20-32-13235a7c085063e90.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]}',\n 'Decoration' => '毛胚房',\n 'floor_age' => '213',\n 'supply_heating' => '无供暖',\n 'elevator' => '一梯3户',\n 'surroundings' => 'dfasdf',\n 'community_info' => 'dfasdfasdf',\n 'traffic' => 'asdfasdfas',\n 'house_age_limit' => '123',\n 'huxing_map_info' => '{\"hall\": {\"hall_1\": {\"arae\": \"123\", \"direction\": \"西南\"}}, \"balcony\": {\"balcony_1\": {\"arae\": \"123\", \"direction\": \"西\"}}, \"bedroom\": {\"bedroom_1\": {\"arae\": \"123\", \"direction\": \"北\"}}, \"kitchen\": {\"kitchen_1\": {\"arae\": \"123\", \"direction\": \"南\"}}, \"bathroom\": {\"bathroom_1\": {\"arae\": \"123\", \"direction\": \"北\"}, \"bathroom_2\": {\"arae\": \"213\", \"direction\": \"西\"}}}',\n 'tags' => '[\"地铁房\", \"市中心\", \"学区房\", \"新房\", \"随时看房\"]',\n 'created_at' => '2018-02-08 16:35:04',\n 'updated_at' => '2018-02-08 16:46:54',\n 'price' => 12315.0,\n 'room_count' => '{\"hall\": \"1\", \"balcony\": \"1\", \"bedroom\": \"1\", \"kitchen\": \"1\", \"bathroom\": \"2\"}',\n 'negative_floor' => '0',\n 'deed_info' => '[{\"get\": \"http://localhost:1234/api/img?file=2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"name\": \"2018-02-08-16-20-54-20195a7c0866ba467.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]',\n 'user_id' => 1,\n 'unit_number' => '123',\n 'building_number' => '123',\n 'house_number' => '123',\n 'contact' => '啊实打实大',\n 'tel' => '123',\n 'expect_price' => '132',\n 'community' => '雅居乐',\n 'status' => 'sell',\n 'location' => '陕西省西安市雁塔区曲江街道雅居乐·御宾府',\n 'city' => '西安',\n 'hot' => 0,\n 'new' => 0,\n 'location_info' => '{\"lat\": \"34.331929\", \"lng\": \"108.936741\", \"city\": \"西安市\", \"level\": \"道路\", \"adcode\": \"610111\", \"citycode\": \"029\", \"district\": \"灞桥区\", \"location\": \"109.080375,34.216190\", \"province\": \"陕西省\", \"formatted_address\": \"陕西省西安市灞桥区白鹿西路南段\"}',\n ),\n 3 => \n array (\n 'id' => 18,\n 'title' => '使用 Promise 和 ES6',\n 'area' => 123.0,\n 'sub_title' => '此钩子函数一个类型为切换对象的参数。',\n 'unit_price' => NULL,\n 'first_pay' => NULL,\n 'product_info' => 'I really want set title when I declare routes. e.g\n\nconst routes = [{ path: \\'/search\\', component: ActivityList, title: \\'Search\\' }]\nthen title will change by the vue-router.\n\nhow ?\n\nps, I see the pull issue closed. why?\n#526',\n 'direction' => '东南',\n 'location_id' => NULL,\n 'visiting_count' => 0,\n 'floor' => 2,\n 'floors' => 123,\n 'house_type' => NULL,\n 'house_img' => '{\"cover\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-17-44-15195a7d4b18e5147.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-17-44-15195a7d4b18e5147.jpeg\", \"name\": \"2018-02-09-15-17-44-15195a7d4b18e5147.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}], \"house\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-17-52-17545a7d4b2008570.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-17-52-17545a7d4b2008570.jpeg\", \"name\": \"2018-02-09-15-17-52-17545a7d4b2008570.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-17-55-14615a7d4b234ea20.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-17-55-14615a7d4b234ea20.jpeg\", \"name\": \"2018-02-09-15-17-55-14615a7d4b234ea20.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-17-59-18365a7d4b27078e2.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-17-59-18365a7d4b27078e2.jpeg\", \"name\": \"2018-02-09-15-17-59-18365a7d4b27078e2.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-18-03-12995a7d4b2b09d26.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-18-03-12995a7d4b2b09d26.jpeg\", \"name\": \"2018-02-09-15-18-03-12995a7d4b2b09d26.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-18-09-14265a7d4b3118192.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-18-09-14265a7d4b3118192.jpeg\", \"name\": \"2018-02-09-15-18-09-14265a7d4b3118192.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-18-14-15865a7d4b362a308.gif\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-18-14-15865a7d4b362a308.gif\", \"name\": \"2018-02-09-15-18-14-15865a7d4b362a308.gif\", \"size\": \"true\", \"type\": \"gif\"}]}',\n 'Decoration' => '毛胚房',\n 'floor_age' => '213',\n 'supply_heating' => '个人供暖',\n 'elevator' => '一梯3户',\n 'surroundings' => '123',\n 'community_info' => '123123123123',\n 'traffic' => '123123',\n 'house_age_limit' => '213',\n 'huxing_map_info' => '{\"hall\": {\"hall_1\": {\"arae\": \"123\", \"direction\": \"西\"}}, \"balcony\": {\"balcony_1\": {\"arae\": \"123\", \"direction\": \"南\"}}, \"bedroom\": {\"bedroom_1\": {\"arae\": \"213\", \"direction\": \"西\"}}, \"kitchen\": {\"kitchen_1\": {\"arae\": \"123\", \"direction\": \"东\"}}, \"bathroom\": {\"bathroom_1\": {\"arae\": \"213\", \"direction\": \"南\"}, \"bathroom_2\": {\"arae\": \"213\", \"direction\": \"西南\"}}}',\n 'tags' => '[\"地铁房\", \"随时看房\", \"市中心\", \"学区房\", \"新房\"]',\n 'created_at' => '2018-02-09 15:19:48',\n 'updated_at' => '2018-02-19 12:57:27',\n 'price' => 213.0,\n 'room_count' => '{\"hall\": \"1\", \"balcony\": \"1\", \"bedroom\": \"1\", \"kitchen\": \"1\", \"bathroom\": \"2\"}',\n 'negative_floor' => '0',\n 'deed_info' => '[{\"get\": \"http://localhost:1234/api/img?file=2018-02-09-15-18-22-13055a7d4b3ed8f4d.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-09-15-18-22-13055a7d4b3ed8f4d.jpeg\", \"name\": \"2018-02-09-15-18-22-13055a7d4b3ed8f4d.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]',\n 'user_id' => 1,\n 'unit_number' => '2131',\n 'building_number' => '123',\n 'house_number' => '213',\n 'contact' => '123',\n 'tel' => '213123',\n 'expect_price' => '213213',\n 'community' => '雅居乐',\n 'status' => 'sell',\n 'location' => '陕西省西安市灞桥区狄寨街道白鹿西路南段',\n 'city' => '西安',\n 'hot' => 0,\n 'new' => 0,\n 'location_info' => '{\"lat\": \"34.216190\", \"lng\": \"108.080375\", \"city\": \"西安市\", \"level\": \"道路\", \"adcode\": \"610111\", \"citycode\": \"029\", \"district\": \"灞桥区\", \"location\": \"109.080375,34.216190\", \"province\": \"陕西省\", \"formatted_address\": \"陕西省西安市灞桥区白鹿西路南段\"}',\n ),\n 4 => \n array (\n 'id' => 19,\n 'title' => '啊撒睡',\n 'area' => 213.0,\n 'sub_title' => '德萨发生的发',\n 'unit_price' => NULL,\n 'first_pay' => NULL,\n 'product_info' => '是否该说的风格是方法是撒的发生发生的发生分胜负爽肤水复古风格的复古风格家哥好机会你风格 v 吧形成 v不 v 不晓得该说的风格和时代感撒的风格撒的风格二哥二哥为根深蒂固说的话说更好风格和风格好是否根深蒂固和人突然说通过',\n 'direction' => '西',\n 'location_id' => NULL,\n 'visiting_count' => 0,\n 'floor' => 2,\n 'floors' => 123,\n 'house_type' => NULL,\n 'house_img' => '{\"cover\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-14-13-42-10-15745a83cc3277471.gif\", \"url\": \"http://localhost:1234/storage/2018-02-14-13-42-10-15745a83cc3277471.gif\", \"name\": \"2018-02-14-13-42-10-15745a83cc3277471.gif\", \"size\": \"true\", \"type\": \"gif\"}], \"house\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-14-13-42-21-12015a83cc3d0386a.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-14-13-42-21-12015a83cc3d0386a.jpeg\", \"name\": \"2018-02-14-13-42-21-12015a83cc3d0386a.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-14-13-42-24-11585a83cc40efdf9.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-14-13-42-24-11585a83cc40efdf9.jpeg\", \"name\": \"2018-02-14-13-42-24-11585a83cc40efdf9.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-14-13-42-30-19525a83cc46c9596.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-14-13-42-30-19525a83cc46c9596.jpeg\", \"name\": \"2018-02-14-13-42-30-19525a83cc46c9596.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-14-13-42-38-11255a83cc4ee62f0.png\", \"url\": \"http://localhost:1234/storage/2018-02-14-13-42-38-11255a83cc4ee62f0.png\", \"name\": \"2018-02-14-13-42-38-11255a83cc4ee62f0.png\", \"size\": \"true\", \"type\": \"png\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-14-13-42-44-18555a83cc543532a.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-14-13-42-44-18555a83cc543532a.jpeg\", \"name\": \"2018-02-14-13-42-44-18555a83cc543532a.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]}',\n 'Decoration' => '简装',\n 'floor_age' => '213',\n 'supply_heating' => '个人供暖',\n 'elevator' => '其他',\n 'surroundings' => '西塞带哦',\n 'community_info' => '没考虑过的宝宝健康啦哥哥你快收藏 v 军绿色的发生 v崩坏开始v 不会考虑比较宽松的发',\n 'traffic' => '撒大的啊 许可名不虚传没考虑',\n 'house_age_limit' => '213',\n 'huxing_map_info' => '{\"hall\": {\"hall_1\": {\"arae\": \"123\", \"direction\": \"北\"}}, \"balcony\": {\"balcony_1\": {\"arae\": \"231\", \"direction\": \"南\"}}, \"bedroom\": {\"bedroom_1\": {\"arae\": \"213\", \"direction\": \"西北\"}}, \"kitchen\": {\"kitchen_1\": {\"arae\": \"213\", \"direction\": \"南\"}}, \"bathroom\": {\"bathroom_1\": {\"arae\": \"213\", \"direction\": \"东南\"}, \"bathroom_2\": {\"arae\": \"231\", \"direction\": \"西\"}}}',\n 'tags' => '[\"新房\", \"学区房\", \"市中心\", \"随时看房\", \"地铁房\"]',\n 'created_at' => '2018-02-14 13:43:45',\n 'updated_at' => '2018-02-15 18:12:04',\n 'price' => 213134.0,\n 'room_count' => '{\"hall\": \"1\", \"balcony\": \"1\", \"bedroom\": \"1\", \"kitchen\": \"1\", \"bathroom\": \"2\"}',\n 'negative_floor' => '0',\n 'deed_info' => '[{\"get\": \"http://localhost:1234/api/img?file=2018-02-14-13-43-10-14815a83cc6ed0f77.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-14-13-43-10-14815a83cc6ed0f77.jpeg\", \"name\": \"2018-02-14-13-43-10-14815a83cc6ed0f77.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]',\n 'user_id' => 1,\n 'unit_number' => '123',\n 'building_number' => '123',\n 'house_number' => '123',\n 'contact' => '213',\n 'tel' => '123',\n 'expect_price' => '123',\n 'community' => '户',\n 'status' => 'sell',\n 'location' => '陕西省西安市未央区张家堡街道文景路风景御园',\n 'city' => '西安',\n 'hot' => 0,\n 'new' => 0,\n 'location_info' => '{\"lat\": \"34.339209\", \"lng\": \"108.940037\", \"city\": \"西安市\", \"level\": \"兴趣点\", \"adcode\": \"610112\", \"citycode\": \"029\", \"district\": \"未央区\", \"location\": \"108.940037,34.339209\", \"province\": \"陕西省\", \"formatted_address\": \"陕西省西安市未央区风景御园\"}',\n ),\n 5 => \n array (\n 'id' => 20,\n 'title' => 'action来发送请求,然后本意是想在then方法里面判断权限',\n 'area' => 123.0,\n 'sub_title' => '如果改用 async/await 呢,会是这样',\n 'unit_price' => NULL,\n 'first_pay' => NULL,\n 'product_info' => '2018 Lincoln Navigator : Full-Size Luxury SUVs - Lincoln.com',\n 'direction' => '北',\n 'location_id' => NULL,\n 'visiting_count' => 0,\n 'floor' => 3,\n 'floors' => 231,\n 'house_type' => NULL,\n 'house_img' => '{\"cover\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-58-51-15905a8a598bc04d7.png\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-58-51-15905a8a598bc04d7.png\", \"name\": \"2018-02-19-12-58-51-15905a8a598bc04d7.png\", \"size\": \"true\", \"type\": \"png\"}], \"house\": [{\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-00-14465a8a5994acf6b.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-00-14465a8a5994acf6b.jpeg\", \"name\": \"2018-02-19-12-59-00-14465a8a5994acf6b.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-03-10905a8a5997e71ce.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-03-10905a8a5997e71ce.jpeg\", \"name\": \"2018-02-19-12-59-03-10905a8a5997e71ce.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-07-16095a8a599b36316.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-07-16095a8a599b36316.jpeg\", \"name\": \"2018-02-19-12-59-07-16095a8a599b36316.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-10-15415a8a599e3a1a3.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-10-15415a8a599e3a1a3.jpeg\", \"name\": \"2018-02-19-12-59-10-15415a8a599e3a1a3.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-15-12335a8a59a348283.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-15-12335a8a59a348283.jpeg\", \"name\": \"2018-02-19-12-59-15-12335a8a59a348283.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-18-19745a8a59a691c40.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-18-19745a8a59a691c40.jpeg\", \"name\": \"2018-02-19-12-59-18-19745a8a59a691c40.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-23-20165a8a59abc36c7.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-23-20165a8a59abc36c7.jpeg\", \"name\": \"2018-02-19-12-59-23-20165a8a59abc36c7.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-29-12935a8a59b1a27d1.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-29-12935a8a59b1a27d1.jpeg\", \"name\": \"2018-02-19-12-59-29-12935a8a59b1a27d1.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-35-17755a8a59b721b52.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-35-17755a8a59b721b52.jpeg\", \"name\": \"2018-02-19-12-59-35-17755a8a59b721b52.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-42-15635a8a59bea8fde.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-42-15635a8a59bea8fde.jpeg\", \"name\": \"2018-02-19-12-59-42-15635a8a59bea8fde.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-12-59-48-14155a8a59c464827.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-12-59-48-14155a8a59c464827.jpeg\", \"name\": \"2018-02-19-12-59-48-14155a8a59c464827.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-00-09-16375a8a59d9cc63d.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-00-09-16375a8a59d9cc63d.jpeg\", \"name\": \"2018-02-19-13-00-09-16375a8a59d9cc63d.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-00-16-15365a8a59e099090.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-00-16-15365a8a59e099090.jpeg\", \"name\": \"2018-02-19-13-00-16-15365a8a59e099090.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-00-24-17575a8a59e866db9.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-00-24-17575a8a59e866db9.jpeg\", \"name\": \"2018-02-19-13-00-24-17575a8a59e866db9.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-00-33-18965a8a59f115504.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-00-33-18965a8a59f115504.jpeg\", \"name\": \"2018-02-19-13-00-33-18965a8a59f115504.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-00-39-10805a8a59f7e5a06.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-00-39-10805a8a59f7e5a06.jpeg\", \"name\": \"2018-02-19-13-00-39-10805a8a59f7e5a06.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-00-50-11205a8a5a0247d56.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-00-50-11205a8a5a0247d56.jpeg\", \"name\": \"2018-02-19-13-00-50-11205a8a5a0247d56.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-00-14525a8a5a0c1aee7.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-00-14525a8a5a0c1aee7.jpeg\", \"name\": \"2018-02-19-13-01-00-14525a8a5a0c1aee7.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-05-12005a8a5a11c0f1b.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-05-12005a8a5a11c0f1b.jpeg\", \"name\": \"2018-02-19-13-01-05-12005a8a5a11c0f1b.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-11-18985a8a5a1735d56.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-11-18985a8a5a1735d56.jpeg\", \"name\": \"2018-02-19-13-01-11-18985a8a5a1735d56.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-15-13735a8a5a1b1ce21.png\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-15-13735a8a5a1b1ce21.png\", \"name\": \"2018-02-19-13-01-15-13735a8a5a1b1ce21.png\", \"size\": \"true\", \"type\": \"png\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-19-13005a8a5a1fb1581.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-19-13005a8a5a1fb1581.jpeg\", \"name\": \"2018-02-19-13-01-19-13005a8a5a1fb1581.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-23-17155a8a5a2324e03.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-23-17155a8a5a2324e03.jpeg\", \"name\": \"2018-02-19-13-01-23-17155a8a5a2324e03.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-33-16905a8a5a2d101f7.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-33-16905a8a5a2d101f7.jpeg\", \"name\": \"2018-02-19-13-01-33-16905a8a5a2d101f7.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}, {\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-01-44-17105a8a5a3899e14.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-01-44-17105a8a5a3899e14.jpeg\", \"name\": \"2018-02-19-13-01-44-17105a8a5a3899e14.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]}',\n 'Decoration' => '毛胚房',\n 'floor_age' => '231',\n 'supply_heating' => '个人供暖',\n 'elevator' => '一梯3户',\n 'surroundings' => '注意导航守卫并没有应用在跳转路由上,而仅仅应用在其目标上。在下面这个例子中,为 /a 路由添加一个 beforeEach 或 beforeLeave 守卫并不会有任何效果。\n\n其它高级用法,请参考例子。',\n 'community_info' => '『别名』的功能让你可以自由地将 UI 结构映射到任意的 URL,而不是受限于配置的嵌套路由结构。\n\n更多高级用法,请查看例子。',\n 'traffic' => '『重定向』的意思是,当用户访问 /a时,URL 将会被替换成 /b,然后匹配路由为 /b,那么『别名』又是什么呢?\n\n/a 的别名是 /b,意味着,当用户访问 /b 时,URL 会保持为 /b,但是路由匹配则为 /a,就像用户访问 /a 一样。\n\n上面对应的路由配置为:',\n 'house_age_limit' => '231',\n 'huxing_map_info' => '{\"hall\": {\"hall_1\": {\"arae\": \"213\", \"direction\": \"东南\"}}, \"balcony\": {\"balcony_1\": {\"arae\": \"231\", \"direction\": \"北\"}}, \"bedroom\": {\"bedroom_1\": {\"arae\": \"231\", \"direction\": \"北\"}}, \"kitchen\": {\"kitchen_1\": {\"arae\": \"231\", \"direction\": \"南\"}}, \"bathroom\": {\"bathroom_1\": {\"arae\": \"231\", \"direction\": \"北\"}, \"bathroom_2\": {\"arae\": \"231\", \"direction\": \"西\"}}}',\n 'tags' => '[\"地铁房\", \"随时看房\", \"市中心\", \"学区房\", \"新房\"]',\n 'created_at' => '2018-02-19 13:02:27',\n 'updated_at' => '2018-02-19 13:03:26',\n 'price' => 15150.0,\n 'room_count' => '{\"hall\": \"1\", \"balcony\": \"1\", \"bedroom\": \"1\", \"kitchen\": \"1\", \"bathroom\": \"2\"}',\n 'negative_floor' => '0',\n 'deed_info' => '[{\"get\": \"http://localhost:1234/api/img?file=2018-02-19-13-02-19-19485a8a5a5b124d5.jpeg\", \"url\": \"http://localhost:1234/storage/2018-02-19-13-02-19-19485a8a5a5b124d5.jpeg\", \"name\": \"2018-02-19-13-02-19-19485a8a5a5b124d5.jpeg\", \"size\": \"true\", \"type\": \"jpeg\"}]',\n 'user_id' => 1,\n 'unit_number' => '213',\n 'building_number' => '213',\n 'house_number' => '213',\n 'contact' => '231',\n 'tel' => '231',\n 'expect_price' => '321',\n 'community' => '延东小区',\n 'status' => 'sell',\n 'location' => '陕西省西安市未央区张家堡街道名栩茶业盐东小区',\n 'city' => '西安',\n 'hot' => 0,\n 'new' => 0,\n 'location_info' => '{\"lat\": \"108.933216\", \"lng\": \"34.341867\", \"city\": \"西安市\", \"level\": \"兴趣点\", \"adcode\": \"610112\", \"citycode\": \"029\", \"district\": \"未央区\", \"location\": \"108.933216,34.341867\", \"province\": \"陕西省\", \"formatted_address\": \"陕西省西安市未央区延东小区\"}',\n ),\n ));\n \n \n }", "public function save()\n {\n file_put_contents(\"address.json\", json_encode($this->content));\n }", "public function saveData()\r\n {\r\n \r\n }", "public function store(Request $request)\n {\n //Validation\n //File Upload if file exist\n //Store Data\n $house = new House;\n $house->user_id= request('name'); \n $house->township_id = request('township');\n $house->type_id = request('type');\n $house->title = request('title');\n $house->area= request('area'); \n $house->price = request('price');\n $house->room = request('room');\n $house->location= request('location'); \n $house->image = request('image');\n $house->phone = request('phone');\n $house->status = request('status');\n $house->description = request('des');\n $house->save();\n return redirect()->route('create.index');\n //Redirect\n }", "function save() {\n $all_fields = ['id' => $this->id] + ['data' => JSON::encode($this->getData(true))];\n if($this->_just_created) {\n $ps = DB::connect(isset(self::$external_dsn)?self::$external_dsn:null)->prepare(\"\n insert into \".static::$table.\"(\".implode(\",\", array_keys($all_fields)).\")\n values (\".implode(\", \", array_map(function($field) {return \":$field\";}, array_keys($all_fields))).\")\n \");\n } else {\n $ps = DB::connect(isset(self::$external_dsn)?self::$external_dsn:null)->prepare(\"\n update \".static::$table.\"\n set \".implode(\", \", array_map(function($field) {return \"$field = :$field\";}, array_keys($all_fields))).\"\n where id = :id\n \");\n }\n foreach ($all_fields as $field => $value) {\n if (is_bool($value)) {\n $ps->bindValue($field, $value, \\PDO::PARAM_BOOL);\n } else {\n $ps->bindValue($field, $value);\n }\n }\n // Little cheat to get calculated data to be displayed in api call request\n $this->data = $this->getData();\n $ps->execute();\n $this->_just_created = false;\n return $this;\n }", "public function store(Request $request)\n {\n //\n $data = $request->all();\n\n $validator = Validator::make($data, [\n 'mobile_no' => 'required',\n 'qr_code_id' => 'required',\n 'user_id' => 'required',\n 'building_id' => 'required',\n ]);\n \n\n if($validator->fails()){\n return response([ 'data' => null, 'message' => 'Required fields missing'], 200);\n }\n\n $building = \\App\\Building::where('building_number', $request->building_id)->first();\n\n if($building){\n\n $household = HouseholdDetail::where('mobile_no',$request->mobile_no)->first();\n\n\n $existing_qr = HouseholdDetail::where('qr_code_id',$request->qr_code_id)->first();\n\n if($existing_qr){\n return response([ 'data' => null, 'status_code' => 'ALREADY_USED', 'message' => 'Error adding household, try again'], 200);\n }\n if(!$household){\n\n $household = new HouseholdDetail;\n }\n\n $qr = \\App\\QrCode::find($request->qr_code_id);\n \n if($qr){\n $household->mobile_no = $request->mobile_no;\n $household->building_id = $building->id;\n $household->user_id = $request->user_id;\n $household->qr_code_id = $qr->id;\n $household->name = $request->name;\n $household->total_female = $request->total_female;\n $household->total_male = $request->total_male;\n $household->total_above_60 = $request->total_above_60;\n $household->total_below_10 = $request->total_below_10;\n $household->emergency_contact_no = $request->emergency_contact_no;\n $household->nationality = $request->nationality;\n \n $householdDetail = $household->save();\n\n if($householdDetail){\n\n $qr->status = \"active\";\n $qr->save();\n\n return response([ 'data' => new HouseholdDetailResource($household), 'status_code' => 'SUCCESS','message' => 'Added household successfully'], 200);\n }\n else{\n return response([ 'data' => null, 'status_code' => 'FAILED','message' => 'Error adding household, try again'], 200);\n } \n }\n else{\n return response([ 'data' => null, 'status_code' => 'FAILED','message' => 'Error adding household, try again'], 200);\n }\n }\n else{\n return response([ 'data' => null, 'status_code' => 'FAILED','message' => 'Building not found, please pick building from the map'], 200);\n }\n }", "public\n function store(Request $request)\n {\n if (!empty($request)) {\n $datatouSave = Array();\n $datatouSave['cost'] = 0;\n $data = json_decode($request->data);\n foreach ($data as $key => $value) {\n $datatouSave[$value->name] = $value->value;\n }\n //print_r($datatouSave);\n for ($i = 0; $i < $request->count; $i++) {\n $row = Array();\n $row['cost'] = $datatouSave['cost[' . $i . ']'];\n $row['time'] = $datatouSave['time[' . $i . ']'];\n if ($row['time'] == 60) {\n $datatouSave['cost'] = $row['time'];\n }\n unset($datatouSave['cost[' . $i . ']']);\n unset($datatouSave['time[' . $i . ']']);\n $datatouSave['costsofplace'][] = $row;\n }\n if (!isset($datatouSave['time']) || empty($datatouSave['time'])) {\n $datatouSave['time'] = new DateTime();\n }\n $datatouSave['lat'] = $request->lat;\n $datatouSave['long'] = $request->long;\n $datatouSave['loc'] = \\DB::raw(\"GeomFromText('POINT(\" . $request->lat . \" \" . $request->long . \")')\");\n $datatouSave['user_id'] = $request->user_id;\n if (!isset($datatouSave['provider_id']) || empty($datatouSave['provider_id'])) {\n $datatouSave['provider_id'] = $request->user_id;\n }\n if (!(isset($datatouSave['reportedcount']) && !empty($datatouSave['reportedcount']))) {\n $datatouSave['reportedcount'] = 100;\n }\n if (isset($datatouSave['occupied']) && !empty($datatouSave['occupied'])) {\n $datatouSave['emptyspaces'] = $datatouSave['reportedcount'] - $datatouSave['occupied'];\n }\n $datatouSave['empty'] = 0;\n if (!isset($datatouSave['avaliable']) || empty($datatouSave['avaliable'])) {\n $datatouSave['avaliable'] = 0;\n } else {\n $datatouSave['avaliable'] = 1;\n }\n if (!isset($datatouSave['validity']) || empty($datatouSave['validity'])) {\n $datatouSave['validity'] = 5;\n }\n $datatouSave['capacity'] = $datatouSave['reportedcount'];\n $datatouSave['source_id'] = 6;\n $datatouSave['opendata'] = 0;\n // $datatouSave['name']= $data->name;;\n //$datatouSave['cost']=$data->cost;;\n //print_r($datatouSave);\n $pricesandduration = Array();\n foreach ($datatouSave['costsofplace'] as $value) {\n $pricesandduration[$value['time']] = $value;\n }\n $park = new Places();\n foreach ($datatouSave as $key => $value) {\n if ($key != 'costsofplace') {\n $park->$key = $value;\n }\n }\n $exists = DB::select('SELECT checkIfParkingExists(' . $park->lat . ',' . $park->long . ') as checkifexists');\n if (empty($exists[0]->checkifexists)) {\n $park->save();\n foreach ($pricesandduration as $key => $valueInternal) {\n $pc = new PlacesCosts();\n $pc->cost = $valueInternal['cost'];\n $pc->time = $valueInternal['time'];\n $park->placesCosts()->save($pc);\n }\n //save activity\n $activity = new Activity();\n $activity->places_id = $park->id;\n $activity->parked = 1;\n $activity->user_id = $park->user_id;\n $activity->time = $park->time;\n $activity->save();\n } else {\n $existingparking = Places::find($exists[0]->checkifexists);\n $existingparking->name = $park->name;\n $existingparking->disabledcount = $park->disabledcount;\n $existingparking->empty = $park->empty;\n $existingparking->avaliable = $park->avaliable;\n $existingparking->user_id = $park->user_id;\n $existingparking->reportedcount = $park->reportedcount;\n $existingparking->validity = $park->validity;\n $existingparking->capacity = $park->capacity;\n $existingparking->time = $park->time;\n $existingparking->maximumduration = $park->maximumduration;\n $existingparking->source_id = $park->source_id;\n $existingparking->opendata = $park->opendata;\n $existingparking->lat = $park->lat;\n $existingparking->long = $park->long;\n $existingparking->loc = $park->loc;\n $existingparking->provider_id = $park->provider_id;\n $existingparking->save();\n $theplacesCosts = $existingparking->placesCosts;\n // d($theplacesCosts);\n foreach ($theplacesCosts as $keyInternal => $valueInternal) {\n // d($valueInternal->cost);\n if (isset($pricesandduration[$valueInternal->time])) {\n $valueInternal->cost = $pricesandduration[$valueInternal->time]['cost'];\n $valueInternal->save();\n unset($pricesandduration[$valueInternal->time]);\n } else {\n $valueInternal->delete();\n unset($theplacesCosts[$keyInternal]);\n }\n }\n foreach ($pricesandduration as $keyInternal => $valueInternal) {\n $pc = new PlacesCosts();\n $pc->cost = $valueInternal['cost'];\n $pc->time = $valueInternal['time'];\n $existingparking->placesCosts()->save($pc);\n }\n //save activity\n $activity = new Activity();\n $activity->places_id = $exists[0]->checkifexists;\n $activity->parked = 1;\n $activity->user_id = $park->user_id;\n $activity->time = $park->time;\n $activity->save();\n }\n\n return response('{\"content\":' . json_encode($datatouSave) . ',\"status\":\"success\"}', 200);\n } else {\n return response('{\"content\":' . $request->lat . \" \" . $request->long . ',\"status\":\"success\"}', 200);\n }\n }", "function saveData() {\n\n\t\t$this->getMapper()->saveData();\t\n\t\t\n\t\t\n\t}", "public function save()\n\t {\n\t\tif (isset($this->_advert->date) === true && isset($this->_advert->phone) === true)\n\t\t {\n\t\t\t$bigfile = new BigFile(\"base-\" . $this->_advert->phone, 10);\n\t\t\t$bigfile->addrecord($this->_advert->date);\n\t\t } //end if\n\n\t }", "public function save()\n {\n $this->save_meta_value('_sim_city_main_info', $this->city_main_info);\n\n $this->save_meta_value('_sim_city_shops', $this->city_shops);\n }", "public function updateDatabase(){\n $api_response = Http::get(config('urls.api'));\n //Place in database\n $this->postToDatabase($api_response);\n }", "public function save()\n {\n $this->variableApi->set('RKFineArtPhotographerModule', 'albumEntriesPerPage', $this->getAlbumEntriesPerPage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'linkOwnAlbumsOnAccountPage', $this->getLinkOwnAlbumsOnAccountPage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'albumItemEntriesPerPage', $this->getAlbumItemEntriesPerPage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'linkOwnAlbumItemsOnAccountPage', $this->getLinkOwnAlbumItemsOnAccountPage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'enableShrinkingForAlbumItemImage', $this->getEnableShrinkingForAlbumItemImage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'shrinkWidthAlbumItemImage', $this->getShrinkWidthAlbumItemImage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'shrinkHeightAlbumItemImage', $this->getShrinkHeightAlbumItemImage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'thumbnailModeAlbumItemImage', $this->getThumbnailModeAlbumItemImage());\n $this->variableApi->set('RKFineArtPhotographerModule', 'thumbnailWidthAlbumItemImageView', $this->getThumbnailWidthAlbumItemImageView());\n $this->variableApi->set('RKFineArtPhotographerModule', 'thumbnailHeightAlbumItemImageView', $this->getThumbnailHeightAlbumItemImageView());\n $this->variableApi->set('RKFineArtPhotographerModule', 'thumbnailWidthAlbumItemImageDisplay', $this->getThumbnailWidthAlbumItemImageDisplay());\n $this->variableApi->set('RKFineArtPhotographerModule', 'thumbnailHeightAlbumItemImageDisplay', $this->getThumbnailHeightAlbumItemImageDisplay());\n $this->variableApi->set('RKFineArtPhotographerModule', 'thumbnailWidthAlbumItemImageEdit', $this->getThumbnailWidthAlbumItemImageEdit());\n $this->variableApi->set('RKFineArtPhotographerModule', 'thumbnailHeightAlbumItemImageEdit', $this->getThumbnailHeightAlbumItemImageEdit());\n $this->variableApi->set('RKFineArtPhotographerModule', 'enabledFinderTypes', $this->getEnabledFinderTypes());\n }", "function saveCiudad() {\n if ($_GET['action'] == 'ciudades') {\n //Decodifica un string de JSON\n $obj = json_decode(file_get_contents('php://input'));\n $objArr = (array) $obj;\n if (empty($objArr)) {\n $this->response(422, \"error\", \"Nothing to add. Check json\");\n } else if (isset($obj->name)) {\n $ciudad = new CiudadDB();\n $ciudad->insert($obj->name);\n $this->response(200, \"success\", \"Nuevo registro añadido exitosamente\");\n } else {\n $this->response(422, \"error\", \"The property is not defined\");\n }\n } else {\n $this->response(400);\n }\n }", "public function savePokemons(){\n try {\n $response = Http::get('https://pokeapi.co/api/v2/pokemon?limit=1118');\n $pokemons = $response->json()['results'];\n foreach($pokemons as $pokemon){\n $search = PokemonsModel::where('nombre', $pokemon['name'])->first();\n if(!isset($search)){\n $create = new PokemonsModel([\n 'nombre' => $pokemon['name'],\n 'detalle_url' => $pokemon['url']\n ]);\n $create->save();\n }\n }\n } catch (Exception $err) {\n return response()->json($err, 500);\n }\n \n return response()->json(['message' => 'Save success'], 200);;\n }", "public function save() {\r\n /** probably we should add a timestamp, Item ID and stuff */\r\n $stored_data = json_encode(array($this->name, $this->status), JSON_UNESCAPED_UNICODE);\r\n $this->db_write(\"objects\", \"Item_s11n\", $stored_data);\r\n print ($stored_data);\r\n }", "public function store(){\n\n apiwat::create(request(['title','author', 'price','publish_date', 'website', 'id']));\n\n return back();\n }", "public function store($id) /* Maria Rennemark - add a house to a specific booking*/\n\t{\n\t\t$house = new Houses(\n\t\t\tarray(\n\t\t\t\t'name' => Input::get('checkbox1') ));\n\t\t$booking = Bookings::find($id);\n\t\t$house = $booking->houses()->save($house);\n\n\t\treturn Redirect::to('verification'.$id);\n\n}", "public function store()\r\n\t{\r\n\t\t$jsonData = $this->getAll();\r\n\r\n\t $data = array(\r\n\t\t\t'username'=> $this->user->username,\r\n\t\t\t'post'=> $this->post,\r\n\t\t\t'date'=> $this->date,\r\n\t );\r\n\r\n\t\tarray_unshift($jsonData, $data);\r\n\r\n\t\t$this->save($jsonData);\r\n\t}", "public function store($data)\n {\n try {\n $store = new Listing;\n $store->user_id = $data['user_id'] ?? Auth::user()->id;\n $store->listing_category_id = $data['listing_category_id'];\n $store->listing_type = $data['listing_type'];\n $store->state_id = $data['state_id'];\n $store->city_id = $data['city_id'];\n $store->local_govt_id = $data['local_govt_id'];\n $store->title = $data['title'];\n $store->address = $data['address'];\n $store->description = $data['description'] ?? null;\n $store->room_policy = $data['room_policy'] ?? null;\n $store->service_option = $data['service_option'] ?? 'no';\n $store->service_description = $data['service_description'] ?? null;\n $store->baths = $data['baths'] ?? null;\n $store->rooms = $data['rooms'] ?? null;\n $store->pricing_type = $data['pricing_type'] ?? \"monthly\";\n $store->amount = $data['amount'] ?? 0;\n $store->amount = $data['step'] ?? 1;\n $store->save();\n activity()\n ->causedBy(Auth::user())\n ->performedOn($store)\n ->withProperties(['id' => $store->id])\n ->log('listing category created');\n if(!empty($data['property_amenities'])){\n $amenities = new Request(['listing_id' => $store->id, 'amenities'=> $data['property_amenities']]);\n ListingAmenitiesController::bulk_update($amenities);\n }\n return $store;\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }", "function statuses_saveData() {\n\n\t// Get array with new data\n\t$fields = statuses_getData();\n\t$count = sizeof($fields); // count items\n\n\t// Construct URL\n\t$url = BASEURL . \"v1/statuses?count=\" . $count . \"&token=\" . getToken(1);\n\n\t// Get existing data\n\t$response = array_reverse(doGetRequest($url));\n\n\t// Iterate through all new items and if their ID isn't found in the request with the latest data, add them\n\tfor ($i=0; $i < 50; $i++) { \n\n\t\t$newId = $fields[$i]['org_id']; // original ID of a new item\n\t\t\n\t\tif($response['code'] == 404) {\n\t\t\tdoPostRequest($url, $fields[$i]);\n\t\t}\n\t\telseif(!in_array_r($newId, $response)) {\n\t\t\tdoPostRequest($url, $fields[$i]);\n\t\t}\n\t\n\t}\n\n}", "public function store(Request $request){\n $validator = Validator::make($request->all(), [\n 'sponsor_id' => 'numeric|exists:sponsors,id',\n 'apartment_id' => 'numeric|exists:apartments,id',\n ]);\n // se dati ricevuti non sono corretti, restituisco JSON di errore\n if ($validator->fails()) {\n return response()->json(['Messaggio'=>'Errore inserimento']);\n }\n // controllo se ultima data di fine per questo apartment_id è maggiore della data attuale\n // allora prendo ultima data fine come inizio della nuova sponsorizzazione\n $ora = Carbon::now();\n $ultimaDataFine = Carbon::parse(SponsorApartment::where('apartment_id',$request->apartment_id)->pluck('data_fine')->sortDesc()->first());\n if($ultimaDataFine->greaterThan($ora)){\n $request['data_inizio'] = $ultimaDataFine;\n } else {\n $request['data_inizio'] = $ora;\n };\n // aggiungo durata alla data inizio e calcolo data fine\n $durata = Sponsor::where('id',$request->sponsor_id)->pluck('durata')->first();\n $request['data_fine'] = Carbon::parse($request['data_inizio'])->addHours($durata);\n // scrivo dati su database e restituisco JSON di risposta\n $sponsorApartment = SponsorApartment::create($request->all());\n return response()->json($sponsorApartment,201);\n\n dd($sponsorApartment);\n\n }", "public function saveamenitiesinfo(Request $request){\n\t\t$data = array();\n\t\t$data['status'] = 0;\n\t\t$data['msg'] = 'Error';\n\t\t\n\t\t$input = $request->all();\n\t\t$propertyid = $input['propertyid'];\n\t\t$amenitiesinfo = $input['amenitiesinfo'];\n\t\t$featuresinfo = $input['featuresinfo'];\n\t\t/*return response()->json($roomsinfo); \n\t\texit();*/\n\t\t\n\t\t$propertydata = Property::find($propertyid);\n\t\t\n\t\tif(empty($propertydata)){\n\t\t\t$data['msg'] = 'Invalid Property';\n\t\t}\n\t\telse{\n\t\t\t$propertydata->property_amenities = json_encode($amenitiesinfo);\n\t\t\t$propertydata->property_features = json_encode($featuresinfo);\n\t\t\tif($propertydata->update()){\n\t\t\t\t$data['status'] = 1;\n\t\t\t\t$data['msg'] = 'Property Data Saved';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$data['msg'] = 'Error in save property details';\t\t\n\t\t\t}\n\t\t}\n\t\treturn response()->json($data); \n\t\texit();\n }", "static function saveToDB() {\n try {\n $diff_id = self::arrayDiff()[\"diff_id\"];\n\n //errors handling\n } catch (\\Exception $e) {\n return [\"uploadedlist\"=>\"\",\"title\"=>$e->getMessage()];\n }\n\n\n\n try {\n $count = 0;\n if (empty($diff_id)) { throw new Exception(\"All items saved!\");}\n //for debugging only 100\n //$diff_id=array_slice($diff_id,0,300);\n foreach ($diff_id as $id) {\n $offer = self::getDataByID($id, $_SESSION[\"api_key\"]);\n //$offer = self::getDataByID(\"14646350\", $_SESSION[\"api_key\"]);\n //to get keys for checking\n $offer_keys = array_keys($offer);\n\n $model = new Offers();\n $isExists = [];\n //saving all items except for having prefix \"c\"\n foreach ($offer_keys as $k => $offer_key) {\n if ($model->hasProperty($offer_key)) {\n $model[$offer_key] = $offer[$offer_key];\n $isExists[] = true;\n }\n }\n //saving items having prefix \"c\"\n if (!empty($offer[\"characteristics_values\"])) {\n $offerChars = $offer[\"characteristics_values\"];\n $offer_keysChars = array_keys($offerChars);\n foreach ($offer_keysChars as $k => $offer_key) {\n if ($model->hasProperty(\"c\" . $offer_key)) {\n $model[\"c\" . $offer_key] = round($offerChars[$offer_key]);\n $isExists[] = true;\n }\n\n }\n //echo var_export($offer[\"characteristics_values\"]);\n\n\n //echo var_export(self::$charValuesArr);\n }\n\n //saving data about Agency\n if (!empty($offer[\"agency\"])) {\n $offerAgency = $offer[\"agency\"];\n $offer_keysAgency = array_keys($offerAgency);\n foreach ($offer_keysAgency as $k => $offer_key) {\n if ($model->hasProperty($offer_key)) {\n $model[$offer_key] = round($offerAgency[$offer_key]);\n $isExists[] = true;\n }\n\n }\n }\n //saving \"user\" and \"priceUSD\"\n //to add agency id like $model[\"agency_id\"] = $offer_keys[\"user\"][\"name\"];\n if (!empty($offer[\"priceArr\"])) {\n $model[\"priceUSD\"] = $offer[\"priceArr\"][1];\n }\n $model->save(false);\n $count++;\n }\n return [\"uploadedlist\" => $count . \" items uploaded\", \"title\" => \"Success\"];\n //echo var_dump($charValuesArr);\n //return [\"uploadedlist\" => $charValuesArr, \"title\" => \"Success\"];\n } catch (\\Exception $e) {\n return [\"uploadedlist\"=>$count .\" items uploaded, id=\".$id,\"title\"=>$e->getMessage()];\n\n //echo var_dump(self::$charValuesArr);\n //return [\"uploadedlist\"=>self::$charValuesArr,\"title\"=>$e->getMessage()];\n }\n /*\n 'admin_id' => 'Admin ID',\n 'street_name' => 'Street Name',\n 'price_item' => 'Price Item',\n 'rooms_count' => 'Rooms Count',\n 'type' => 'Type',\n 'is_commercial' => 'Is Commercial',\n 'state_name' => 'State Name',\n 'beautiful_url' => 'Beautiful Url',\n 'description' => 'Description',\n 'currency_type' => 'Currency Type',\n 'metro_station_name' => 'Metro Station Name',\n 'wall_type' => 'Wall Type',\n 'publishing_date' => 'Publishing Date',\n 'realty_type_name' => 'Realty Type Name',\n 'realty_sale_type' => 'Realty Sale Type',\n 'latitude' => 'Latitude',\n 'longitude' => 'Longitude',\n 'main_photo' => 'Main Photo',\n 'building_number_str' => 'Building Number Str',\n 'city_name' => 'City Name',\n 'living_square_meters' => 'Living Square Meters',\n 'realty_type_id' => 'Realty Type ID',\n 'floors_count' => 'Floors Count',\n 'kitchen_square_meters' => 'Kitchen Square Meters',\n 'flat_number' => 'Flat Number',\n 'total_square_meters' => 'Total Square Meters',\n 'realty_id' => 'Realty ID',\n 'date_end' => 'Date End',\n 'district_name' => 'District Name',\n 'advert_type_name' => 'Advert Type Name',\n 'advert_type_id' => 'Advert Type ID',\n 'price_type' => 'Price Type',\n 'created_at' => 'Created At',\n 'levels_expired' => 'Levels Expired',\n 'is_exchange' => 'Is Exchange',\n 'floor' => 'Floor',\n 'is_bargain' => 'Is Bargain',\n 'user' => 'User',\n 'priceUSD' => 'Price Usd',\n 'c1501' => 'C1501',\n 'c1502' => 'C1502',\n 'c1503' => 'C1503',\n 'c1504' => 'C1504',\n 'c443' => 'C443',\n 'c1607' => 'C1607',\n 'c1608' => 'C1608',\n 'c1011' => 'C1011',\n 'c1464' => 'C1464',\n 'c274' => 'C274',\n 'c265' => 'C265',\n 'c1437' => 'C1437',\n 'admin_time_entered' => 'Admin Time Entered',\n }\n */\n\n\n\n }", "public function save() {}", "public function save() {}", "public function save() {}", "public function run()\n {\n $houses = [\n [\n 'title' => 'Cabane de trappeur',\n 'user_id' => 1,\n 'category_id' => 3,\n 'adresse' => 'Gironde, France',\n 'description' => \"Vous vous demandez comment vous mettre dans la peau d’un chasseur, en pleine forêt du Québec / Canada ou des Etats-Unis ? Pas besoin de réserver votre billet d’avion. C’est possible en Gironde, près de Bordeaux !\n Notre domaine d’hébergement insolite peut en effet vous transporter instantanément vers le continent nord-américain. Il vous suffit pour cela de vous installer confortablement dans notre magnifique cabane de trappeur. Si vous êtes séduit par son look « rustique », vous le serez tout autant par son intérieur, dont le niveau de confort vous permet d’y séjourner en toutes saisons.\",\n 'start_date' => '2020-02-10',\n 'end_date' => '2020-12-30',\n 'nb_personnes' => 4,\n 'phone' => '0623216792',\n 'price' => 99.00,\n 'photo' => 'cabane_trappeur.jpg',\n 'statut' => 'Validé',\n 'disponible' => 'oui'\n ],\n [\n 'title' => 'Maisons flottantes aquapesca',\n 'user_id' => 1,\n 'category_id' => 2,\n 'adresse' => 'Corrèze, France',\n 'description' => \"Maison flottante Aquapesca, 4 personnes (optionnel 6 personnes 15 € par nuit et par personne)\n D'une surface totale 54m² dont 30 m² de terrasse, la maison flottante se compose d'une chambre avec lit double 160x200, d'une chambre cabine avec 2 lits superposés 80X190, d'une salle de bain avec douche à l'italienne, d'un WC conventionnel et d'une cuisine équipée, d'un coin salon avec canapé convertible, table basse et TV.\n La terrasse est équipée d'un salon de jardin et de 2 transats. Vous disposez d'une barque à moteur électrique le temps de votre séjour pour découvrir les 32 hectares de notre étang.\",\n 'start_date' => '2020-02-10',\n 'end_date' => '2020-12-30',\n 'nb_personnes' => 4,\n 'phone' => '0623216792',\n 'price' => 110.00,\n 'photo' => 'cabane_eau.jpg',\n 'statut' => 'Validé',\n 'disponible' => 'oui'\n ],\n [\n 'title' => 'La yourte du vigneau',\n 'user_id' => 1,\n 'category_id' => 5,\n 'adresse' => 'Vendée, France',\n 'description' => \"Yourte Mongole en plein cœur du domaine à l'abri des regards\n Vous pourrez profiter d'un séjour en famille dans cette yourte typique de la culture mongole, avec puits de lumière. Calme et tranquillité seront les maîtres mots de votre séjour.\n Cet habitat traditionnel des populations nomades de Mongolie a plus de mille ans d’histoire. De génération en génération, de transhumance en transhumance elle accompagne le peuple mongol, en harmonie avec la nature. Elle est aujourd'hui toujours utilisée.\n \n Tranquillité garantie, aucun vis à vis autour de la yourte\n De nombreuses ballades sont possibles dès l’emplacement, et entre autres le long de la vallée de l’Yon (vallée de Piquet).\n La yourte traditionnelle en bois, écologique, tout le charme de l’authenticité en Vendée pour satisfaire votre envie d'évasion et de nature.\n La yourte est composée d'une armature de bois recouverte de plusieurs couches textiles : feutre isolant, toile imperméable, toile de parement. Ses murs verticaux et son espace circulaire en font un lieu agréable à vivre et relativement grand.\",\n 'start_date' => '2020-02-10',\n 'end_date' => '2020-12-30',\n 'nb_personnes' => 4,\n 'phone' => '0623216792',\n 'price' => 84.00,\n 'photo' => 'yourte_vigneau.jpg',\n 'statut' => 'Validé',\n 'disponible' => 'oui'\n ],\n [\n 'title' => 'La yourte du domaine du chatelet',\n 'user_id' => 1,\n 'category_id' => 5,\n 'adresse' => 'Vosges, France',\n 'description' => \"C’est une véritable yourte mongole traditionnelle de qualité supérieure (adaptée aux climats des Hautes Vosges) aménagée de ces meubles d’origine, elle peut accueillie jusqu’à 5 personnes\n\n Venez goûter au confort de cet habitat nomade aux portes du parc naturel régional des Ballons des Vosges dans un cadre naturel, calme et romantique. Pour votre confort, la Yourte est alimentée en eau froide ( hors période de gèle) et en électricité et dispose d'un chauffage au bois. Elle est équipée à l’intérieur de 5 couchages, (1 lit 2 places, 2 lits 1 place et un lit d'appoint), une table basse avec tabourets, frigo, vaisselle, bouilloire électrique et four micro-onde.\n \n A l’extérieur de la Yourte, sur la terrasse panoramique, un espace sanitaire avec eau froide (hors période de gèle), toilette sèche, table pique-nique, parasol, transats et un barbecue en pierre au pied de la terrasse.\n \n Un espace sanitaire collectif avec douches, WC, et espace plonge est à votre disposition à 80 m de la Yourte.\n \n Il n'est possible de cuisiner à l’intérieur de la Yourte mais vous avez la possibilité de faire un barbecue ou commander des plats préparés chez l'un de nos traiteur partenaire ou faire de la restauration.\",\n 'start_date' => '2020-02-10',\n 'end_date' => '2020-12-30',\n 'nb_personnes' => 2,\n 'phone' => '0623216792',\n 'price' => 70.00,\n 'photo' => 'yourte_vosges.jpg',\n 'statut' => 'Validé',\n 'disponible' => 'oui'\n ],\n [\n 'title' => 'Les wagons du camping le haut village',\n 'user_id' => 1,\n 'category_id' => 7,\n 'adresse' => 'Loire-Atlantique, France',\n 'description' => \"WAGON DE TRAIN:\n\n Le wagon de train (voiture ferroviaire) OCEM Talbot date de 1930.\n\n Il a été récupéré à l'Association des Chemins de fer de Vendée.\n Il possède 4 chambres, un espace repas, une cuisine, une douche et un WC.\n Logement pour 10 personnes.\n \n \n Ce Wagon est équipé de :\n Deux chambres avec un lit double\n Deux chambres avec trois lits d’une place. Les lits sont superposés. Attention, le lit du haut est interdit aux enfants de moins de 6 ans.\n Une cuisine avec évier, réfrigérateur, plaque de cuisson, micro-ondes, four, cafetière et vaisselle. Les petits-déjeuners ne sont pas fournis.\n Douche et WC\n Oreillers et couvertures fournis. Draps et serviettes de toilette non fournis\n TV gratuite\n Terrasse couverte\",\n 'start_date' => '2020-02-10',\n 'end_date' => '2020-12-30',\n 'nb_personnes' => 2,\n 'phone' => '0623216792',\n 'price' => 399.00,\n 'photo' => 'train_camping.jpg',\n 'statut' => 'Validé',\n 'disponible' => 'oui'\n ],\n [\n 'title' => \"Attrap'reves\",\n 'user_id' => 1,\n 'category_id' => 2,\n 'adresse' => 'Bouches-du-Rhone, France',\n 'description' => \"A Allauch, dans les Bouches-du-Rhône on attrapes vos rêves et on les réalise ! Ils sont 5, comme les doigts d’une main, tous dans la famille, chacun avec sa spécialité, pour vous satisfaire. Depuis presque dix ans, le domaine, une pinède de 15 000 m², offre une palette d’hébergements insolites tous aussi craquants les uns que les autres. Une « Aqua'Room», reposante à souhait avec sa déco planante faite de poissons multicolores qui s’ébattent dans deux aquariums géants, une cabane tahitienne entourée de bambous où ne manque que le yukulele, un Lov'nid, une cabane « écureuil » et des bulles transparentes ou semi-transparentes pour admirer en toute quiétude les nuits étoilées. Chacune a sa « personnalité », à choisir selon votre humeur. Toutes sont équipées confortablement. Vous croiserez peut-être Geoffrey ou Bruno sur le domaine. Ce dernier, professionnel de l’hôtellerie, vous concoctera vos petits déjeuners « maison ». Vous pouvez également commander des plateaux-repas à déguster sur la terrasse à côté de votre bulle ou dans un chalet « ad hoc ». Sur place, piscine (seulement à Allauch) et jacuzzi assorti de massages (sur réservation) sont à la disposition des hôtes.\n Chaque hébergement dispose de son chemin d’accès propre, afin de préserver l’intimité des hôtes. Une parenthèse à vivre à deux (éventuellement accompagnés d’un enfant de plus de 6 ans). Le site est ouvert toute l’année. La presse et notamment la presse étrangère, ne tarit pas d’éloges sur ce lieu à part, loin du tourisme de masse aseptisé. A tester d’urgence ! La bonne idée : les bons « cadeau » disponibles sur le site.\",\n 'start_date' => '2020-02-10',\n 'end_date' => '2020-12-30',\n 'nb_personnes' => 2,\n 'phone' => '0623216792',\n 'price' => 150.00,\n 'photo' => 'bulle.jpg',\n 'statut' => 'Validé',\n 'disponible' => 'oui'\n ],\n \n ];\n DB::table('houses')->insert($houses);\n }", "public function save()\n {\n $this->variableApi->set('ZikulaRoutesModule', 'routeEntriesPerPage', $this->getRouteEntriesPerPage());\n }", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'author_id' => $this->author_id,\n 'clothingname' => $this->clothingname,\n 'clothingtype' => $this->clothingtype,\n 'tempmin' => $this->tempmin,\n 'tempmax' => $this->tempmax\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "function save() {\r\n foreach ($this->_data as $v)\r\n $v -> save();\r\n }", "public function saving(Api $api)\n {\n if (blank($api->hashcode)) {\n $api->hashcode = uniqid();\n }\n }", "function create($name,$location){\r\n lako::get('ljson')->save($location.\"/{$name}\",array(\r\n 'table' => $name,\r\n 'name' => $name,\r\n 'pkey' => 'id',\r\n 'fields'=> array(\r\n 'id' => array(\r\n 'datatype' => ''\r\n )\r\n ),\r\n 'relations' => array(\r\n 'data' => array(\r\n 'type' => '1-M',\r\n 'path' => ['id','field_id'],\r\n 'object' => 'wp_bp_xprofile_data'\r\n )\r\n )\r\n )\r\n );\r\n \r\n }", "public function _store()\n {\n try{\n if (count($this->data) == 0)\n {\n $this->data = $this->request->all();\n }\n $this->object = $this->model->create($this->data);\n\n Log::info('Guardado');\n return response()->json(['status'=>true,\n 'msj'=>$this->name. 'Guardado',\n $this->name=>$this->object], 200);\n\n }catch (\\Exception $e){\n Log::critical(\"Error, archivo del peo: {$e->getFile()}, linea del peo: {$e->getLine()}, el peo: {$e->getMessage()}\");\n return response()->json([\"msj\"=>\"Error de servidor\"], 500);\n }\n }", "private function saveData()\n { \n // Save form data in session\n if (count($this->post) > 0) {\n $_SESSION['gentlesource_voting_configuration'] = $this->post;\n $this->data = $this->post;\n $this->votingOptions = $this->post['votingOptions'];\n } else {\n if (isset($_SESSION['gentlesource_voting_configuration'])) {\n $this->data = $_SESSION['gentlesource_voting_configuration'];\n $this->votingOptions = $this->data['votingOptions'];\n }\n }\n }", "function store($province,$city,$subdistrict,$village) {\t\t\t\n\t\t$query = \"s.id as sid,store_id,store_name,pa.name as province, ca.name as city FROM store s\n\t\t\tJOIN village_area va ON va.id = s.village_area_id\n\t\t\tJOIN subdistrict_area sa ON sa.id = va.subdistrict_area_id \n\t\t\tJOIN city_area ca ON ca.id = sa.city_area_id\n\t\t\tJOIN province_area pa ON pa.id = ca.province_area_id WHERE\n\t\t\tpa.id = '$province'\";\n\t\t// update by winni 26092016\n\t\tif($city != 'all'){\n\t\t\t$query .= \" AND ca.id='$city'\";\n\t\t}\n\t\tif ($subdistrict != 'all'){\n\t\t\t$query .= \" AND sa.id='$subdistrict'\";\n\t\t}\n\t\tif ($village != 'all'){\n\t\t\t$query .= \" AND va.id = '$village'\";\n\t\t}\n\t\t$data = $this->db->select($query,false)->get()->result();\n\t\theader(\"Content-Type: application/json\");\n\t\tprint_r(json_encode($data));\n\t}", "function save_district_state() {\n $datas = RefineData::getMasterData();\n foreach ($datas as $data) {\n insert_district($data->state, $data->district);\n }\n}", "public function store(CreateCompanyBuildingRequest $request)\n {\n $data = $request->all();\n\n /*echo \"<pre>\";\n print_r($data);\n echo \"</pre>\";\n\n exit;*/\n\n foreach($data['building_data'] as $arr) {\n \n $input = [];\n $floor = [];\n\n $input['name'] = $arr['name'];\n $input['address'] = $arr['address'];\n $input['zipcode'] = $arr['zipcode'];\n $input['num_floors'] = $arr['num_floors'];\n $input['company_id'] = $data['company_id'];\n\n $companyBuilding = $this->companyBuildingRepository->create($input);\n\n $floors = [];\n\n $i = 0;\n foreach ($arr['floor'] as $fl) {\n\n $floors[$i]['building_id'] = $companyBuilding->id;\n $floors[$i]['company_id'] = $data['company_id'];\n $floors[$i]['floor'] = $fl['floor_number'];\n $floors[$i]['num_rooms'] = $fl['floor_rooms'];\n\n $i++;\n }\n\n $c = $this->companyFloorRoomRepository->insert($floors);\n\n // print_r($companyFloorRoom);\n // $companyFloorRoom = $companyFloorRoom->insert($floors);\n\n }\n\n /*echo \"<pre>\";\n print_r($input);\n echo \"</pre>\";\n\n exit;*/\n\n return response()->json(['success'=>1, 'msg'=>'Company buildings have been added successfully']);\n }", "public function save() {\n \n $fields = array(\"id\", \"title\", \"largeimage\", \"description\", \"credits\", \"activitypoints\", \"activitypointstype\", \"expirydays\", \"enabled\", \"items\");\n \n foreach ($fields as $value)\n {\n if (!isset($_POST[$value]))\n {\n $this->load_view('housekeeping/response');\n $this->view->data->status = \"Error\";\n $this->view->data->alert_type = \"important\";\n $this->view->data->error = \"Unexpected error occured!\";\n $this->view->publish();\n return;\n }\n else if ($_POST[$value] == \"\")\n {\n $this->load_view('housekeeping/response');\n $this->view->data->status = \"Error\";\n $this->view->data->alert_type = \"important\";\n $this->view->data->error = \"You left a field blank!\";\n $this->view->publish();\n return;\n }\n }\n \n $daysUntilExpiry = (time() + (86400 * intval($_POST['expirydays'])));\n \n //R::exec(\"UPDATE site_articles SET article_name = ?, article_topstory = '/c_images/Top_Story_Images/\" . $_POST[\"topstory\"] . \"', article_description = ?, article_story = ? WHERE id = \". $_POST[\"id\"], array($_POST[\"name\"], $_POST[\"description\"], $_POST[\"story\"]));\n \n R::exec(\"UPDATE targeted_offers SET title = ?, description = ?, credits = ?, activity_points = ?, activity_points_type = ?, large_image = ?, expire_time = ?, enabled = ?, items = ? WHERE id = ?\", array($_POST[\"title\"], $_POST[\"description\"], $_POST[\"credits\"], $_POST[\"activitypoints\"], $_POST[\"activitypointstype\"], \"targetedoffers/\" . $_POST[\"largeimage\"], $daysUntilExpiry, $_POST[\"enabled\"], $_POST[\"items\"], $_POST['id']));\n \n MUS(\"reloadoffers\", \"\");\n \n $this->load_view('housekeeping/response');\n $this->view->data->status = \"Success\";\n $this->view->data->alert_type = \"success\";\n $this->view->data->error = \"Targeted offer is saved!\";\n $this->view->publish();\n }", "public function store(Request $request)\n {\n $validatedData = $request->validate([\n 'street' => 'required|max:50',\n 'number' => 'required|max:50',\n 'name' => 'max:50',\n \n ]);\n\n $house = New House;\n\n $house->number = $request->number;\n $house->name = $request->name;\n $house->contact = $request->contact;\n $house->street_id = $request->street;\n\n $house->save();\n\n return redirect()->route('houses.index');\n\n }", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function saveDetails() \n {\n // Save the author list.\n $this->authorList->setValue('bookId', $this->bookId);\n $this->authorList->save();\n \n // Save the booklanguage list.\n $this->bookLanguageList->setValue('bookId', $this->bookId);\n $this->bookLanguageList->save();\n }", "public function store(Request $request)\n {\n $house = House::create($request->all);\n\n return response()->json($house, 201);\n }", "public function run()\n {\n $houses = new HousesModel();\n $houses->name = 'Ha Noi hotel';\n $houses->id_address = 1;\n $houses->room = 'khách sạn';\n $houses->number_room = '4';\n $houses->number_bathroom = '2';\n $houses->describe = 'VIP';\n $houses->price = 10000000;\n $houses->id_kind_house = 1;\n $houses->id_user = 1;\n $houses->month = 1;\n $houses->status = 0;\n $houses->save();\n\n $houses = new HousesModel();\n $houses->name = 'HCM hotel';\n $houses->id_address = 2;\n $houses->room = 'khách sạn';\n $houses->number_room = '5';\n $houses->number_bathroom = '2';\n $houses->describe = 'VIP';\n $houses->price = 10000000;\n $houses->id_kind_house = 1;\n $houses->id_user = 1;\n $houses->month = 1;\n $houses->status = 0;\n $houses->save();\n\n $houses = new HousesModel();\n $houses->name = \"Khách sạn\";\n $houses->id_address = 3;\n $houses->room = 'khách sạn';\n $houses->number_room = '3';\n $houses->number_bathroom = '2';\n $houses->describe = 'VIP';\n $houses->price = 5000000;\n $houses->id_kind_house = 1;\n $houses->id_user = 1;\n $houses->month = 1;\n $houses->status = 1;\n $houses->save();\n\n }", "public function post(Request $request, $id){\n $exist = Location::find( $id );\n\n if( !$exist){// hna ida kain had id ya3ni mojoud\n\n $slug = str_slug( $request->slug2 , '_' );// slug ghankhaliw kol kelma wkelma mertabta b _\n\n $array = [// hna ghan3amro had table (array) b les données li ghanjibo men api \n 'id' => $request->id,\n 'phone' => $request->phone,\n 'website' => $request->website,\n 'address' => $request->address,\n 'designation' => $request->slug2,\n // 'locality_id'=>$request->locality_id,\n ];\n\n if( $slug ){// hadi mafhamtekchi chno bghiti te3ml\n $array['slug'] = $slug ;\n }else{\n $array['slug'] = 'slug' ;\n }\n// hna ida fhamt b7al li kate3tih chemain absolu bach tqolo bli location_id howa id d localities\n $locality_exist = Locality::where('locality', $request->locality_id )->where('postal_code', $request->postal_code )->first();\n\n if( $locality_exist ){// hna bsara7a mafhamtchi chbaghi te3ml \n $array['locality_id'] = $locality_exist->id ;\n }else{\n\n $locality = Locality::create(['locality' => $request->locality_id , 'postal_code' => $request->postal_code ]);\n\n $array['locality_id'] = $locality->id ;\n\n }\n// hna gha t creer locations walakin bghit nefham wach lma3na anak katsejla f base de donnée wla kif\n $location = Location::create($array);\n if( $location ){\n return response()->json([\n 'id' => $location->id,\n 'phone' => $location->phone,\n 'website' => $location->website,\n 'address' => $location->address,\n 'designation' => $location->designation,\n 'slug' => $location->slug,\n 'locality_id' => $location->locality_id\n\n ]);\n }else{\n return response()->json(['response' => 'problemme f location']);\n }\n }\n \n }", "public function store(Request $request)\n {\n $validatedData = $request->validate([\n \"title_name\" => \"required\",\n \"description\" => \"required\",\n \"price\" => \"required\",\n \"Location\" => \"required\",\n \"address\" => \"required\",\n \"status\" => \"required\",\n ]);\n\n $data = array(\n 'title'=>$title_name,\n 'description'=>$description,\n 'price'=>$price,\n 'location'[\"description\"]=>$location,\n // 'photos'=>@/Users/hello/Downloads/property6.jpg',\n // 'photos'=>@/Users/hello/Downloads/property2.jpg',\n 'location[\"address\"]'=>$address,\n 'location[\"coordinates\"]'=>array(\n [0]=>$lat,\n [1]=>$long\n )\n );\n\n $token = \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVmNTBjN2E3NTUxYWQ4MGJhMjI2MzYyNSIsImlhdCI6MTU5OTEyOTcxMSwiZXhwIjoxNjA2OTA1NzExfQ.p8iG1eorMOMSCKdIyyBaHFlmJTmvdUa7KHINWPtfNTg\";\n $url = 'http://ec2-52-14-234-54.us-east-2.compute.amazonaws.com/api/v1/property/createProperty';\n $ch = curl_init($url);\n $header=array(\n 'Content-Type:application/json',\n 'Authorization: Bearer '.$token\n );\n\n curl_setopt($ch,CURLOPT_HTTPHEADER, $header);\n curl_setopt($ch,CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);\n\n $result = curl_exec($ch);\n curl_close($ch);\n $propertyList = json_decode($result);\n\n session()->flash('message', 'New Property Created Successfully !');\n session()->flash('class', '1');\n return redirect()->route('property');\n }", "public function store(Request $request)\n {\n if(!empty($request->get('id'))){\n\n $long = $request->get('long');\n $lat = $request->get('lat');\n\n $data = Data::where('id', '=', $request->get('id'))->first();\n\n if($data->cep != $request->get('cep')){\n $endpoint = 'https://www.google.com/maps/search/' . $request->street . '+' . $request->number . '+' . $request->neighborhood . '+' . $request->city . '+' . $request->state;\n $endpoint = str_replace(' ', '%20', $endpoint);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $endpoint);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n $response = curl_exec($ch);\n\n preg_match(\"/APP_INITIALIZATION_STATE=\\[\\[\\[(-?\\d+\\.\\d+),(-?\\d+\\.\\d+),(-?\\d+\\.\\d+)\\]/m\", $response, $group);\n\n $long = $group[2];\n $lat = $group[3];\n }\n\n Data::where('id', '=', $request->get('id'))->update(\n [\n 'status' => $request->get('status'),\n 'street' => $request->get('street'),\n 'number' => $request->get('number'),\n 'neighborhood' => $request->get('neighborhood'),\n 'city' => $request->get('city'),\n 'state' => $request->get('state'),\n 'cep' => $request->get('cep'),\n 'whatsapp' => $request->get('whatsapp'),\n 'lat' => $lat,\n 'long' => $long,\n ]\n );\n\n return redirect()->back()->with('success', 'Atualizado com sucesso ...'); \n }\n\n $data = new Data();\n $data->user_id = Auth::user()->id;\n $data->fill($request->all());\n\n $endpoint = 'https://www.google.com/maps/place/' . $data->street . '+' . $data->number . '+' . $data->neighborhood . '+' . $data->city . '+' . $data->state;\n $endpoint = str_replace(' ', '+', $endpoint);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $endpoint);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n $response = curl_exec($ch);\n\n preg_match(\"/APP_INITIALIZATION_STATE=\\[\\[\\[(-?\\d+\\.\\d+),(-?\\d+\\.\\d+),(-?\\d+\\.\\d+)\\]/m\", $response, $group);\n\n $data->long = $group[2];\n $data->lat = $group[3];\n\n $data->save();\n \n return redirect()->back()->with('success', 'Atualizado com sucesso'); \n }", "public function save(){\n\n // Authenticate as admin\n $user = User::fetch_by_session();\n if($user === false) return $this->zajlib->json(['status'=>'error', 'message'=>'Your user session has expired!']);\n if($user->data->admin != 'admin') return $this->zajlib->json(['status'=>'error', 'message'=>'Your user account does not have rights to perform this action!']);\n\n // Fetch the photo\n $photo = Photo::fetch($_POST['id']);\n $photo->set_with_data($_POST, ['name', 'alttext', 'caption']);\n $photo->save();\n\n return $this->zajlib->json(['status'=>'ok']);\n }", "public function save()\n {\n $this->data = [\n 'pb_name' => \\Input::get('pb_name'),\n 'title' => \\Input::get('title'),\n 'subtitle' => \\Input::get('subtitle'),\n 'description' => \\Input::get('description'),\n 'css_classes' => \\Input::get('css_classes'),\n 'image_ref' => \\Pageblok::uploadFile(\\Input::file('image_ref')),\n 'hyperlink' => \\Input::get('hyperlink'),\n 'template' => \\Input::get('template'),\n 'content_type' => \\Input::get('content_type'),\n 'content' => \\Input::get('content'),\n 'published' => \\Input::get('published'),\n 'start_datetime' => \\Carbon::parse(\\Input::get('start_datetime'))->format('Y-m-d H:i:s'),\n 'end_datetime' => \\Carbon::parse(\\Input::get('end_datetime'))->format('Y-m-d H:i:s'),\n 'address' => \\Input::get('address'),\n 'city' => \\Input::get('city'),\n 'country' => \\Input::get('country'),\n 'group' => \\Input::get('group'),\n 'created_by' => \\Auth::user()->id,\n ];\n\n if ($this->data['address'] && $this->data['city']) {\n $this->data['latitude'] = \\TsEvent::getLatitudeLongitude(\n \\Input::get('address'),\n \\Input::get('city'),\n \\Input::get('country')\n )['latitude'];\n }\n $this->data['longitude'] = \\TsEvent::getLatitudeLongitude(\n \\Input::get('address'),\n \\Input::get('city'),\n \\Input::get('country')\n )['longitude'];\n\n return parent::save();\n }", "public function run()\n {\n $houses = '[\n {\n \"_key\":\"targaryan\",\n \"name\":\"Targaryan\",\n \"location_key\":\"dragonstone\"\n },\n {\n \"_key\":\"stark\",\n \"name\":\"Stark\",\n \"location_key\":\"winterfell\"\n },\n {\n \"_key\":\"lannister\",\n \"name\":\"Lannister\",\n \"location_key\":\"king-s-landing\"\n }\n ]';\n\n $houses = json_decode($houses, JSON_OBJECT_AS_ARRAY);\n\n foreach ($houses as $house) {\n Location::insert($house);\n }\n }", "public function save() {\n\t\t\t\n\t\t}", "public function persistData($data_obj)\n\t{\n\t\t$new_instance = new location();\n\t\t$em = $this->controller_obj->getDoctrine()->getManager();\n\t\t$new_instance->setLatitude($data_obj->getLatitude());\n\t\t$new_instance->setLongitude($data_obj->getLongitude());\n\t\t$address_repo = $em->getRepository(\"WebManagementBundle:address\");\n\t\t$address = $address_repo->find($data_obj->getSelectAddress());\n\t\t$new_instance->setAddress($address);\t\t\t\n\t\t$new_instance->setDescription($data_obj->getDescription());\t\t\t\n\t\t$em->persist($new_instance);\n\t\t$em->flush();\n\t}", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "public function saveInformationAction() {\r\n $photo_id = $this->_getParam('photo_id');\r\n $title = $this->_getParam('title', null);\r\n $description = $this->_getParam('description', null);\r\n $location = $this->_getParam('location', null);\r\n if (($this->_getParam('lat')) && ($this->_getParam('lng')) && $this->_getParam('lat', '') != '' && $this->_getParam('lng', '') != '') {\r\n $dbGetInsert = Engine_Db_Table::getDefaultAdapter();\r\n $dbGetInsert->query('INSERT INTO engine4_sesbasic_locations (resource_id, lat, lng , resource_type) VALUES (\"' . $photo_id . '\", \"' . $this->_getParam('lat') . '\",\"' . $this->_getParam('lng') . '\",\"sesvideo_chanelphoto\")\tON DUPLICATE KEY UPDATE\tlat = \"' . $this->_getParam('lat') . '\" , lng = \"' . $this->_getParam('lng') . '\"');\r\n }\r\n Engine_Api::_()->getDbTable('chanelphotos', 'sesvideo')->update(array('title' => $title, 'description' => $description, 'location' => $location), array('chanelphoto_id = ?' => $photo_id));\r\n }", "function Save($data= array())\n\t{\t$fail = array();\n\t\t$success = array();\n\t\t$fields = array();\n\t\t$admin_actions = array();\n\t\t\n\t\tif ($loctitle = $this->SQLSafe($data[\"loctitle\"]))\n\t\t{\t$fields[] = \"loctitle='$loctitle'\";\n\t\t\tif ($this->id && ($data[\"loctitle\"] != $this->details[\"loctitle\"]))\n\t\t\t{\t$admin_actions[] = array(\"action\"=>\"Title\", \"actionfrom\"=>$this->details[\"loctitle\"], \"actionto\"=>$data[\"loctitle\"]);\n\t\t\t}\n\t\t} else\n\t\t{\t$fail[] = \"title missing\";\n\t\t}\n\t\t\n\t\t$address = $this->SQLSafe($data[\"address\"]);\n\t\t$fields[] = \"address='$address'\";\n\t\tif ($this->id && ($data[\"address\"] != $this->details[\"address\"]))\n\t\t{\t$admin_actions[] = array(\"action\"=>\"Address\", \"actionfrom\"=>$this->details[\"address\"], \"actionto\"=>$data[\"address\"]);\n\t\t}\n\t\t\n\t\t$directions = $this->SQLSafe($data[\"directions\"]);\n\t\t$fields[] = \"directions='$directions'\";\n\t\tif ($this->id && ($data[\"directions\"] != $this->details[\"directions\"]))\n\t\t{\t$admin_actions[] = array(\"action\"=>\"Directions\", \"actionfrom\"=>$this->details[\"directions\"], \"actionto\"=>$data[\"directions\"]);\n\t\t}\n\t\t\n\t\tif (is_numeric($data[\"googlelat\"]))\n\t\t{\t$googlelat = round($data[\"googlelat\"], 6);\n\t\t} else\n\t\t{\t$googlelat = \"\";\n\t\t}\n\t\t$fields[] = \"googlelat='\" . $googlelat . \"'\";\n\t\tif ($this->id && ($googlelat != $this->details[\"googlelat\"]))\n\t\t{\t$admin_actions[] = array(\"action\"=>\"Latitude\", \"actionfrom\"=>$this->details[\"googlelat\"], \"actionto\"=>$googlelat);\n\t\t}\n\t\t\n\t\tif (is_numeric($data[\"googlelong\"]))\n\t\t{\t$googlelong = round($data[\"googlelong\"], 6);\n\t\t} else\n\t\t{\t$googlelong = \"\";\n\t\t}\n\t\t$fields[] = \"googlelong='\" . $googlelong . \"'\";\n\t\tif ($this->id && ($googlelong != $this->details[\"googlelong\"]))\n\t\t{\t$admin_actions[] = array(\"action\"=>\"Longitude\", \"actionfrom\"=>$this->details[\"googlelong\"], \"actionto\"=>$googlelong);\n\t\t}\n\t\t\n\t\t// city\n\t\tif ($city = (int)$data[\"city\"])\n\t\t{\tif ($cities = $this->CityList())\n\t\t\t{\tif ($cities[$city])\n\t\t\t\t{\t$fields[] = \"city=$city\";\n\t\t\t\t\tif ($this->id && ($city != $this->details[\"city\"]))\n\t\t\t\t\t{\t$admin_actions[] = array(\"action\"=>\"City\", \"actionfrom\"=>$this->details[\"city\"], \"actionto\"=>$city, \"actiontype\"=>\"link\", \"linkmask\"=>\"cityedit.php?id={linkid}\");\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t{\t$fail[] = \"city invalid\";\n\t\t\t\t}\n\t\t\t}\n\t\t} else\n\t\t{\t$fail[] = \"city missing\";\n\t\t}\n\t\t\n\t\tif ($this->id || !$fail)\n\t\t{\t$set = implode(\", \", $fields);\n\t\t\tif ($this->id)\n\t\t\t{\t$sql = \"UPDATE locations SET $set WHERE locid={$this->id}\";\n\t\t\t} else\n\t\t\t{\t$sql = \"INSERT INTO locations SET $set\";\n\t\t\t}\n\t\t\tif ($this->db->Query($sql))\n\t\t\t{\tif ($this->db->AffectedRows())\n\t\t\t\t{\tif ($this->id)\n\t\t\t\t\t{\t$base_parameters = array(\"tablename\"=>\"locations\", \"tableid\"=>$this->id, \"area\"=>\"locations\");\n\t\t\t\t\t\tif ($admin_actions)\n\t\t\t\t\t\t{\tforeach ($admin_actions as $admin_action)\n\t\t\t\t\t\t\t{\t$this->RecordAdminAction(array_merge($base_parameters, $admin_action));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$success[] = \"Changes saved\";\n\t\t\t\t\t} else\n\t\t\t\t\t{\t$this->id = $this->db->InsertID();\n\t\t\t\t\t\t$success[] = \"New location created\";\n\t\t\t\t\t\t$this->RecordAdminAction(array(\"tablename\"=>\"locations\", \"tableid\"=>$this->id, \"area\"=>\"locations\", \"action\"=>\"created\"));\n\t\t\t\t\t}\n\t\t\t\t\t$this->Get($this->id);\n\t\t\t\t\n\t\t\t\t} else\n\t\t\t\t{\tif (!$this->id)\n\t\t\t\t\t{\t$fail[] = \"Insert failed\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn array(\"failmessage\"=>implode(\", \", $fail), \"successmessage\"=>implode(\", \", $success));\n\t\t\n\t}", "public function save_tracking($email,$lat,$long,$adress)\n {\n\n$gpis = new Gpi();\n$gpis->email = $email;\n$gpis->lat = $lat;\n$gpis->long = $long;\n$gpis->adress = $adress;\ntry {\n $gpis->save();\n return \"[{\".'\"status\":'.'\"Uploaded Successfully\"'.\"}]\"; \n \n} catch (Exception $e) {\n\n return \"[{\".'\"status\":'.'\"Error on Save please Try again\"'.\"}]\";\n}\n\n\n \n }", "public function saveDetails() \n {\n $bindingId = $this->bindingId;\n $bookList = $this->bookList;\n $scanList = $this->scanList;\n $provenanceList = $this->provenanceList;\n $bindingLanguageList = $this->bindingLanguageList;\n return Database::getInstance()->doTransaction(function() use ($bindingId, $bookList, $scanList, \n $provenanceList, $bindingLanguageList)\n {\n // Save the book list.\n $bookList->setValue('bindingId', $bindingId);\n $bookList->save();\n \n // Load all book details.\n foreach($bookList as $book)\n {\n $book->loadDetails(); \n }\n \n // Save the scan list.\n $scanList->setValue('bindingId', $bindingId);\n $scanList->save();\n \n // Save the provenance list.\n $provenanceList->setValue('bindingId', $bindingId);\n $provenanceList->save();\n \n // Save the language list.\n $bindingLanguageList->setValue('bindingId', $bindingId);\n $bindingLanguageList->save();\n });\n }", "public static function storeFromApi($result)\n {\n $office = static::findOrNewWithTrashed($result['id']);\n $office->id = $result['id'];\n\n if (isset($result['brokerage']['id'])) {\n $office->brokerage_id = $result['brokerage']['id'];\n }\n\n if (array_key_exists('name', $result)) {\n $office->name = $result['name'];\n }\n\n if (array_key_exists('main', $result)) {\n $office->main = $result['main'];\n }\n\n\n if (isset($result['address'])) {\n $office->street_address = $result['address']['street_address'];\n $office->extended_address = $result['address']['extended_address'];\n $office->locality = $result['address']['locality'];\n $office->region = $result['address']['region'];\n $office->postal_code = $result['address']['postal_code'];\n $office->country_code = $result['address']['country_code'];\n $office->po_box = $result['address']['po_box'];\n $office->latitude = $result['address']['latitude'];\n $office->longitude = $result['address']['longitude'];\n }\n\n\n if (array_key_exists('time_zone', $result)) {\n $office->time_zone = $result['time_zone'];\n }\n\n if (array_key_exists('phone', $result)) {\n $office->phone = $result['phone'];\n }\n\n if (array_key_exists('fax', $result)) {\n $office->fax = $result['fax'];\n }\n\n if (array_key_exists('pos', $result)) {\n $office->pos = $result['pos'];\n }\n\n if (array_key_exists('evopay', $result)) {\n $office->evopay = $result['evopay'];\n }\n\n if (array_key_exists('evopay_discount', $result)) {\n $office->evopay_discount = $result['evopay_discount'];\n }\n\n if (array_key_exists('url', $result)) {\n $office->url = $result['url'];\n }\n\n if (array_key_exists('created_at', $result)) {\n $office->tevo_created_at = new Carbon($result['created_at']);\n }\n if (array_key_exists('updated_at', $result)) {\n $office->tevo_updated_at = new Carbon($result['updated_at']);\n }\n if (array_key_exists('deleted_at', $result)) {\n $office->tevo_deleted_at = new Carbon($result['deleted_at']);\n }\n\n /**\n * If we have a deleted_at value then we are deleting the item\n * but we need to ensure that we save() it first to record some\n * data and to ensure it actually even exists. We do this via\n * the saveThenDelete() method which does not trigger any of the\n * saving events (but it does trigger the deleting events).\n */\n if (!empty($result['deleted_at'])) {\n $office->saveThenDelete();\n\n // Fire an event that it was deleted\n EventFacade::fire(new ItemWasDeleted($office));\n } else {\n if ($office->save()) {\n // Fire an event if an INSERT or UPDATE was actually performed\n // But NOT if we are deleting.\n EventFacade::fire(new ItemWasStored($office));\n }\n\n\n /**\n * Get all of the already associated email addresses and\n * delete() any that are no longer active.\n */\n $activeEmailAddresses = [];\n if (!empty($result['email'])) {\n $activeEmailAddresses = $result['email'];\n }\n\n foreach ($office->emailAddresses() as $emailAddress) {\n if (!in_array($emailAddress->email_address, $activeEmailAddresses)) {\n // If it isn't in the array then it is no longer active, kill it.\n if ($emailAddress->delete()) {\n EventFacade::fire(new ItemWasDeleted($emailAddress));\n }\n } else {\n // Otherwise unset() it so that we're left with any\n // $activeEmailAddresses that need to be created\n unset($activeEmailAddresses['$emailAddress->email_address']);\n }\n }\n unset($emailAddress);\n\n // Any addresses left in $activeEmailAddresses do not yet exist\n // and need to be created.\n foreach ($activeEmailAddresses as $email_address) {\n if ($newEmailAddress = OfficeEmailAddress::firstOrCreate([\n 'office_id' => $result['id'],\n 'email_address' => strtolower($email_address),\n ])\n ) {\n EventFacade::fire(new ItemWasStored($newEmailAddress));\n }\n }\n unset($email_address);\n\n\n /**\n * Get all of the already associated hours and\n * delete() any that are no longer active.\n */\n $activeHours = $result['hours'];\n\n foreach ($office->hours() as $hour) {\n if (!in_array($hour->id, array_column($activeHours, 'id'))) {\n // If it isn't in the array then it is no longer active, kill it.\n if ($hour->delete()) {\n EventFacade::fire(new ItemWasDeleted($hour));\n }\n } else {\n // Otherwise unset() it so that we're left with any\n // $activeEmailAddresses that need to be created\n unset($activeHours[array_search($hour->id, $activeHours)]);\n }\n }\n unset($hour);\n\n // Any addresses left in $activeEmailAddresses do not yet exist\n // and need to be created.\n foreach ($activeHours as $operatingHours) {\n foreach ($operatingHours as $hour) {\n $officeHour = OfficeHour::findOrNewWithTrashed($hour['id']);\n $officeHour->id = $hour['id'];\n $officeHour->office_id = $result['id'];\n $officeHour->day_of_week = $hour['day_of_week'];\n $officeHour->closed = $hour['closed'];\n $officeHour->open = Carbon::parse($hour['open'])->toTimeString();\n $officeHour->close = Carbon::parse($hour['close'])->toTimeString();\n\n if ($officeHour->save()) {\n EventFacade::fire(new ItemWasStored($officeHour));\n }\n }\n }\n unset($hour);\n\n\n }\n\n return $office;\n }", "public function save()\r\n {\r\n \r\n }", "public function save()\n {\n $data = $this->read_file();\n\n if (( ! $data))\n {\n $data = array();\n }\n\n $data[$this->id] = array(\n 'id' => $this->id,\n 'email' => $this->email,\n 'firstname' => $this->firstname,\n 'lastname' => $this->lastname,\n 'password' => $this->password,\n 'token' => $this->token,\n 'logins' => $this->logins,\n );\n\n $this->write_file($data);\n }", "public function save(){\n $data = file_get_contents('php://input');\n //saving data and getting inserted id or the existing one\n $this->id = $this->_so->save($data);\n //returning saved object for frontend sync\n return $this->byId();\n }", "function createRoad() {\r\n $new_RoadID = false;\r\n if (isset($_REQUEST['RoadID'])) {\r\n $new_RoadID = intval(trim($_REQUEST['RoadID']));\r\n } else {\r\n header(\"HTTP/1.0 400 Bad Request\");\r\n print(\"RoadID is not given.\");\r\n exit();\r\n }\r\n $new_PlayerID = false;\r\n if (isset($_REQUEST['PlayerID'])) {\r\n $new_PlayerID = intval(trim($_REQUEST['PlayerID']));\r\n } else {\r\n header(\"HTTP/1.0 400 Bad Request\");\r\n print(\"PlayerID is not given.\");\r\n exit();\r\n }\r\n $new_Available = false;\r\n if (isset($_REQUEST['Available'])) {\r\n $new_Available = intval(trim($_REQUEST['Available']));\r\n } else {\r\n header(\"HTTP/1.0 400 Bad Request\");\r\n print(\"Available is not given.\");\r\n exit();\r\n }\r\n if ($new_RoadID && $new_PlayerID && $new_Available) {\r\n $Road = Road::create($new_RoadID, $new_PlayerID, $new_Available);\r\n if ($Road == null) {\r\n header(\"HTTP/1.0 500 Server Error\");\r\n print(\"Road was not inserted\");\r\n exit();\r\n }\r\n header(\"Content-type: application/json\");\r\n print($Road->getJSON());\r\n exit();\r\n }\r\n }", "public function update(Request $request, HouseholdDetail $householdDetail)\n {\n //\n\n\n $data = $request->all();\n\n $validator = Validator::make($data, [\n 'mobile_no' => 'required',\n 'qr_code_id' => 'required',\n 'user_id' => 'required',\n 'building_id' => 'required',\n ]);\n \n if($validator->fails()){\n return response([ 'data' => null, 'message' => 'Required fields missing'], 200);\n }\n\n $householdDetail->mobile_no = $request->mobile_no;\n $householdDetail->building_id = $request->building_id;\n $householdDetail->user_id = $request->user_id;\n $householdDetail->qr_code_id = $request->qr_code_id;\n //$householdDetail->name = $request->name;\n $householdDetail->total_female = $request->total_female;\n $householdDetail->total_male = $request->total_male;\n $householdDetail->total_above_60 = $request->total_above_60;\n $householdDetail->total_below_10 = $request->total_below_10;\n $householdDetail->emergency_contact_no = $request->emergency_contact_no;\n $householdDetail->nationality = $request->nationality;\n \n $household = $householdDetail->save();\n\n if($household){\n return response([ 'data' => new HouseholdDetailResource($householdDetail), 'message' => 'Updated household successfully'], 200);\n }\n else{\n return response([ 'data' => null, 'message' => 'Error updating household, try again'], 200);\n } \n }", "function Create($userid,$lat,$long,$img)\n {\n $response=array();\n $response[\"success\"]=0; \n $response[\"content\"]= \"\";\n $response[\"message\"]=\"\";\n \n $park= new ParkLocation();\n $park->creator_id=$userid;\n $park->setLocation($long, $lat);\n \n $stta = (isset($this->Search($lat,$long)[\"content\"][0][\"address\"]))?true:false;\n \n $park->streetname=($park->streetname==\"\" && $stta)?$this->Search($lat,$long)[\"content\"][0][\"address\"]:\"undefined\";\n $park->streetImage=$img;\n \n $response[\"content\"]=$park;\n if($park->validated())\n { \n $model = new ParkModel($park,$this->db);\n $model->Attach($this);\n \n if(!$model->IsExists())\n {\n $status= $model->Create();\n if($status){\n $response[\"success\"]=$status;\n $response[\"message\"]=\"Successfully added\";\n }else\n {\n $response[\"message\"]=\"could not add the park details\";\n $response[\"success\"]=-1;\n $response[\"content\"]= $model->getError();\n }\n }else \n {\n $response[\"success\"]=-1; \n $response[\"content\"]= $park;\n $response[\"message\"]=\"Someone as already add this address as a park\";\n }\n \n \n }else\n {\n $response[\"content\"]=$park;\n $response[\"success\"]=-1; \n $response[\"message\"]=$park->getError();\n }\n return $response;\n }", "public function store(Request $request)\n {\n //\n $floor=new floorModel();\n $floor->intFloorNum=$request->txtFNum;\n $floor->intBuilCode=$request->comBuilding;\n $floor->intNumOfUnit=$request->txtUNum;\n $floor->save();\n return Response::json(\"success store\");\n\n }", "public function addressAction()\n {\n// echo $composeCurl;\n// $salida = exec($composeCurl);\n// sleep(40);\n// $this->output(sprintf('STEP 2 Import Locality finished', $salida));\n \n $directory = ConsoleController::documentRootDir.'/data/officialstations';\n $country = 'ES';\n $file = 'address.json';\n \n $request = $this->getRequest();\n $filename = $request->getParam('filename', false);\n $verbose = $request->getParam('verbose', false) || $request->getParam('v', false);\n \n echo $directory.'/'.$file.\"\\n\";\n \n $content = file_get_contents($directory.'/'.$file);\n// print_r($content);\n $content = json_decode($content);\n $ListaEESSPrecio = (array) $content->ListaEESSPrecio;\n// print_r($content);\n foreach($ListaEESSPrecio as $key => $value)\n {\n // $value['created'] = '2014-06-14';\n $result = $this->stationMapper->saveAddress((array)$value);\n// print_r($value);\n }\n }", "public function createmerchant()\n {\n $natureofbusiness = $_POST['natureofbusiness'];\n $telephone = $_POST['telephone'];\n $atelephone = $_POST['atelephone'];\n $tin = $_POST['tin'];\n $businessname = $_POST['businessname'];\n $businessemail = $_POST['businessemail'];\n $website = $_POST['website'];\n $businesstype = $_POST['accounttype'];\n $businesscategory = $_POST['businesscategory'];\n $revenue = $_POST['revenue'];\n $numberofemployees = $_POST['numberofemployees'];\n $numberofbranches = $_POST['numberofbranches'];\n $averagerevenue = $_POST['averagerevenue'];\n\n\n\n //Save Businesss\n $business = new Business();\n $business->recordObject->businessname = $businessname;\n $business->recordObject->email = $businessemail;\n $business->recordObject->natureofbusiness = $natureofbusiness;\n $business->recordObject->tinnumber = $tin;\n $business->recordObject->mobile = $atelephone;\n $business->recordObject->website = $website;\n $business->recordObject->accounttype = $businesstype;\n $business->recordObject->businesscategory = $businesscategory;\n $business->recordObject->revenue = $revenue;\n $business->recordObject->numberofemployees = $numberofemployees;\n $business->recordObject->numberofbranches = $numberofbranches;\n $business->recordObject->telephone = $telephone;\n $business->recordObject->averagerevenue = $averagerevenue;\n $business->recordObject->status = 1;\n $business->store();\n\n //Extract business id\n $business_id = $business->recordObject->busid;\n\n $popularname = $_POST['popularname'];\n $city = $_POST['city'];\n $street = $_POST['street'];\n $region = $_POST['region'];\n $assembly = $_POST['assembly'];\n $unitno = $_POST['unitno'];\n $housenumber = isset($_POST['housenumber']) ? $_POST['housenumber'] : '';\n $longitude = $_POST['longitude'];\n $latitude = $_POST['latitude'];\n $buildingno = $_POST['buildingno'];\n\n //Save Location\n $location = new Location();\n $location->recordObject->popularname = $popularname;\n $location->recordObject->city = $city;\n $location->recordObject->street = $street;\n $location->recordObject->region = $region;\n $location->recordObject->assembly = $assembly;\n $location->recordObject->unitno = $unitno;\n $location->recordObject->housenumber = $housenumber;\n $location->recordObject->longitude = $longitude;\n $location->recordObject->latitude = $latitude;\n $location->recordObject->buildingno = $buildingno;\n $location->store();\n\n //Extract location id\n $location_id = $location->recordObject->location_id;\n $locationBusiness = LocationBusiness::saveBusinessLocation($location_id, $business_id);\n if ($locationBusiness) {\n $data['success'] = \"Saved All Data Succesfully\";\n $_SESSION[\"success\"] = $data['success'];\n $data['location_id'] = $location_id;\n $data['business_id'] = $business_id;\n $this->view('pages/createmerchant', $data);\n } else {\n $error = \"Failed To Save All Data Successfuly\";\n $_SESSION[\"error\"] = $error;\n $this->view('pages/createmerchant', $error);\n }\n }", "public function store(Request $request){\n\n $validator = Validator::make($request->all(),[\n 'title' => 'required|min:10|max:300',\n 'rooms'=>'required|numeric|min:1',\n 'beds' =>'required|numeric|min:1',\n 'bathrooms'=>'required|min:1',\n 'sm'=>'required|min:1',\n 'address'=>'required|min:3',\n 'latitude'=>'required',\n 'longitude'=>'required',\n 'city'=>'required|min:1',\n 'postal_code'=>'required',\n 'country'=>'required',\n 'daily_price'=>'required',\n 'description'=>'required|min:20',\n 'user_id'=>'numeric|exists:users,id',\n ],\n [\n 'required'=>':attribute is a required field',\n 'numeric'=>':attribute must be a number',\n 'exists'=>'the room need to be associated to an existing user',\n ]\n );\n if($validator->fails()){\n $error = $validator->messages();\n return response()->json($error);\n }\n $apartment = Apartment::create($request->all());\n /// iserisce i servizi nella tabella pivot\n $apartment->services()->attach($request['services']);\n\n // if (!empty($request['img'])) {\n // $request['img'] = Storage::disk('public')->put('images', $request['img']);\n // }\n\n return response()->json($apartment,201);\n\n }", "public function store(Request $request)\n {\n \n $footprintParams = [\n 'activity' => $request->input('activity'),\n 'activityType' => $request->input('activityType'),\n 'country' => $request->input('country')\n ];\n\n $insertParams = [\n 'activity' => $request->input('activity'),\n 'activity_type' => $request->input('activityType'),\n 'country' => $request->input('country')\n ];\n\n if(!empty($request->input('fuelType'))){\n $footprintParams['fuelType'] = $request->input('fuelType');\n $insertParams['fuel_type_id'] = DB::table('fuelType')->where('name', $request->input('fuelType'))->first();\n }\n\n if(!empty($request->input('mode'))){\n $footprintParams['mode'] = $request->input('mode');\n $insertParams['mode_id'] = DB::table('modes')->where('name', $request->input('mode'))->first();\n }\n\n $response = $this->footprintRepository->getFootprint($footprintParams);\n // $insertParams['response'] = $response->getData();\n // DB::table('footprints')->insert([$insertParams]);\n return $response;\n\n\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'mission' => 'required',\n 'vision' => 'required',\n 'story' => 'required',\n 'founder' => 'required',\n 'college' => 'required|integer',\n 'date_of_foundation' => 'required|date',\n 'sponsor'=> 'array',\n 'sponsor.*'=> 'integer'\n ]);\n $hih = \\App\\HIH::count();\n if ($hih != 0){\n return redirect('/aboutus')->with('error', 'The Hand in Hand\\'s information already exists!');\n }\n $hih = new \\App\\HIH;\n $hih->mission = $request->input('mission');\n $hih->vision = $request->input('vision');\n $hih->founder = $request->input('founder');\n $hih->story = $request->input('story');\n $hih->college_id = $request->input('college');\n $hih->date_of_foundation = $request->input('date_of_foundation');\n $hih->president_id = Auth::user()->id;\n $hih->save();\n\n \\App\\Highboard::truncate();\n if($request->input('highboard')){\n foreach ($request->input('highboard') as $highboard) {\n $Highboard = new \\App\\Highboard;\n $Highboard->member_id = $highboard;\n $Highboard->save();\n }\n }\n \n if($request->input('sponsor')){\n foreach ($request->input('sponsor') as $sponsor) {\n $HIHSponsor = new \\App\\HIHSponsors;\n $HIHSponsor->sponsor_id = $sponsor;\n $HIHSponsor->save();\n }\n }\n\n return redirect('/aboutus')->with('success', 'The Hand In Hand\\'s information has been created.');\n \n }", "function saveFieldsDatastoreAction()\n {\n $this->_helper->viewRenderer->setNoRender();\n \n Zend_Loader::loadClass('Table_FieldSummary');\n $fieldSummaryTable = new Table_FieldSummary();\n \n //echo \"data made it!\";\n //return;\n \n $cnt = 0;\n $recordArray = Zend_Json::decode($_REQUEST['datastore'], Zend_Json::TYPE_OBJECT);\n //Zend_Debug::dump($recordArray);\n foreach ($recordArray as $record) \n {\n //Zend_Debug::dump($record);\n $where = $fieldSummaryTable->getAdapter()->quoteInto('pk_field = ?', $record->pk_field);\n $data = array('field_type' => $record->field_type,\n 'field_label' => $record->field_label,\n 'prop_desc' => $record->prop_desc,\n 'prop_type' => $record->prop_type);\n $fieldSummaryTable->update($data, $where);\n ++$cnt;\n } \n echo $cnt;\n }", "public function saving(Apartment $apartment) {\n if($apartment->isDirty('name')) {\n $apartment->slug = Str::slug($apartment->name . \" \" . mt_rand(0, 10000), '_');\n }\n\n if($apartment->isDirty(['price', 'currency'])) {\n if(isset($apartment->currency) && strtoupper($apartment->currency) != env('DEFAULT_CURRENCY', 'EUR')) {\n $convertedToDefaultCurrency = convert_currency($apartment->price, $apartment->currency, env('DEFAULT_CURRENCY', 'EUR'));\n if($convertedToDefaultCurrency) {\n $apartment->price = $convertedToDefaultCurrency;\n $apartment->currency = env('DEFAULT_CURRENCY', 'EUR');\n }\n }\n }\n }", "public function saveToDB()\n {\n }", "public function savegeneralinfo(Request $request){\n\t\t$data = array();\n\t\t$data['status'] = 0;\n\t\t$data['msg'] = 'Error';\n\t\t\n\t\t$input = $request->all();\n\t\t$propertyid = $input['propertyid'];\n\t\t$address = $input['generalinfo']['property_address'];\n\t\t\n\t\t$propertydata = Property::find($propertyid);\n\t\t$propertydesc = str_replace(\"\\n\",\"<br />\",$input['generalinfo']['property_desc']);\n\t\t//echo $propertydesc; die();\n\t\t\t\t\n\t\tif(empty($propertydata)){\n\t\t\t$data['msg'] = 'Invalid Property';\n\t\t}\n\t\telse{\n\t\t\t$propertydata->property_name = $input['generalinfo']['property_name'];\n\t\t\t$propertydata->property_location = $request['generalinfo']['property_location'];\n\t\t\t$propertydata->property_desc = $propertydesc;\n\t\t\t$propertydata->property_state = $request['generalinfo']['property_state'];\n\t\t\t$propertydata->property_city = $request['generalinfo']['property_city'];\n\t\t\t$propertydata->property_seourl = $request['generalinfo']['property_seourl'];\n\t\t\t$propertydata->property_email = $request['generalinfo']['property_email'];\n\t\t\t$propertydata->property_address = $request['generalinfo']['property_address'];\n\t\t\t$propertydata->property_postalcode = $request['generalinfo']['property_postalcode'];\n\t\t\t$propertydata->property_phoneno = $request['generalinfo']['property_phoneno'];\n\t\t\t$propertydata->property_status = trim($request['generalinfo']['property_status']);\n\n\t\t\tif($propertydata->update()){\n\t\t\t\t$data['status'] = 1;\n\t\t\t\t$data['msg'] = 'Property Saved';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$data['msg'] = 'Error in save property details';\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn response()->json($data); \n\t\texit();\n }", "public function store()\n {\n try {\n $input = Request::onlyLegacy('name');\n $validator = Validator::make($input, ['name' => 'required']);\n if ($validator->fails()) {\n return ApiResponse::validation($validator);\n }\n\n try {\n $pb = $this->service->addNewPB($input['name'], $input);\n\n return ApiResponse::success([\n 'message' => trans('response.success.saved', ['attribute' => 'Progress Board']),\n 'data' => $this->response->item($pb, new ProductionBoardTransformer)\n ]);\n } catch (\\Exception $e) {\n return ApiResponse::errorInternal(trans('response.error.internal'), $e);\n }\n } catch (\\Exception $e) {\n return ApiResponse::errorInternal(trans('response.error.internal'), $e);\n }\n }", "private function saveData(): void\n {\n $this->tab_chat_call->call_update = gmdate(\"Y-m-d H:i:s\"); //data e hora UTC\n $result = $this->tab_chat_call->save();\n\n if ($result) {\n $this->Result = true;\n $this->Error = [];\n $this->Error['msg'] = \"Sucesso!\";\n $this->Error['data']['call'] = $this->tab_chat_call->call_id;\n } else {\n $this->Result = false;\n $this->Error = [];\n $this->Error['msg'] = $this->tab_chat_call->fail()->getMessage();\n $this->Error['data'] = null;\n }\n }" ]
[ "0.6158201", "0.61282796", "0.6126096", "0.6077741", "0.6012739", "0.59959525", "0.5984435", "0.59579444", "0.59231687", "0.588005", "0.58591515", "0.5828687", "0.5826385", "0.5815575", "0.57798016", "0.5759381", "0.57567835", "0.5684596", "0.56678474", "0.56493664", "0.56486434", "0.56415164", "0.5628133", "0.56122833", "0.56031436", "0.5581922", "0.55739546", "0.55649316", "0.55649316", "0.55623126", "0.5560166", "0.5556929", "0.55569196", "0.5550954", "0.55273396", "0.55184877", "0.5504708", "0.5494301", "0.5485764", "0.54831207", "0.5474474", "0.54607546", "0.5454307", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.54476434", "0.5444978", "0.5444938", "0.54437405", "0.5423779", "0.5421076", "0.54164916", "0.54136246", "0.5401928", "0.53940177", "0.5388707", "0.5380115", "0.5377979", "0.5377979", "0.5377979", "0.5377979", "0.5377979", "0.53721297", "0.5370345", "0.5362336", "0.5359617", "0.5354531", "0.5348799", "0.5348197", "0.5345189", "0.5342186", "0.533682", "0.5330346", "0.5328988", "0.5320498", "0.53192496", "0.5318012", "0.53151184", "0.53150326", "0.5312595", "0.53088385", "0.5308806", "0.5307408", "0.53069127", "0.53065556" ]
0.7213015
0
Clear the list of booted models so they will be rebooted.
Очистите список загруженных моделей, чтобы они были перезагружены.
public static function clearBootedModels() { static::$booted = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function clearBootedModels();", "public function clearModels();", "protected static function booted(): void\n {\n static::deleting(function (Model $model) {\n $model->removeAllImages();\n });\n }", "protected function forgetAddedModels()\n {\n $this->quantities = $this->modelPopulators = [];\n }", "public function resetModelMocks()\n {\n $this->_registeredModelMocks = array();\n }", "public static function clear()\n {\n self::$drivers = array();\n }", "public static function reset()\n {\n self::$toLoad = array();\n }", "public static function reset()\n {\n self::resetDefault();\n self::$instances = array();\n }", "public static function reset()\n\t{\n\t\tstatic::$instances = [];\n\t}", "protected static function boot()\n {\n \tparent::boot();\n\n \tstatic::deleting(function($model) {\n \t\t$model->attributes()->sync([]);\n \t});\n }", "public function deleteAll()\n {\n $this->ensureModels();\n foreach ($this->_models as $model) {\n $model->delete();\n }\n }", "public function clearAllDevices(){\n\t\t$db = Db::getInstance();\n\n\t\t$req = $db->prepare('DELETE FROM Devices');\n\t\t$req->execute();\n\t\t\n\n\n\t}", "public function cleanModuleList()\n {\n /**\n * @var \\Magento\\TestFramework\\ObjectManager $objectManager\n */\n $objectManager = \\Magento\\TestFramework\\Helper\\Bootstrap::getObjectManager();\n $objectManager->removeSharedInstance(ModuleList::class);\n $objectManager->removeSharedInstance(ModuleListInterface::class);\n }", "public static function resetAll(): void\n {\n static::getFacadeRoot()->resetAll();\n }", "public function resetCharacteristics() {\n\t\t$characteristics = array_combine(array(\n\t\t\t'contains_model', 'contains_datasource', 'contains_behavior', 'contains_controller',\n\t\t\t'contains_component', 'contains_view', 'contains_helper', 'contains_theme', 'contains_vendor',\n\t\t\t'contains_shell', 'contains_test', 'contains_lib', 'contains_resource', 'contains_config'\n\t\t), array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0));\n\n\t\t$this->out(__('Resetting all characteristics'));\n\t\t$this->Package->updateAll($characteristics);\n\n\t\t$this->out(__('* Successfully reset all characteristics'));\n\t\t$this->_stop();\n\t}", "public function reset() {\n\t\t$this->registered = array();\n\t}", "public static function reboot(): void\n {\n //====================================================================//\n // Clear Module Configuration Array\n if (isset(self::core()->conf)) {\n self::core()->conf = null;\n }\n //====================================================================//\n // Clear Webservice Configuration\n if (isset(self::core()->soap)) {\n self::core()->soap = null;\n }\n //====================================================================//\n // Clear Module Local Objects Classes\n if (isset(self::core()->objects)) {\n self::core()->objects = array();\n }\n //====================================================================//\n // Reset Commits Manager\n CommitsManager::reset();\n //====================================================================//\n // Clear Module Log\n self::log()->cleanLog();\n self::log()->deb('Splash Module Rebooted');\n }", "protected static function boot()\n {\n parent::boot();\n\n static::deleting(function($model) {\n $model->categories()->detach();\n $model->attributes()->detach();\n\n // Delete product images\n $disk = 'uploads';\n\n foreach ($model->images as $image) {\n // Delete image from disk\n\n Storage::disk($disk)->delete($image->name);\n\n\n // Delete image from db\n $image->delete();\n }\n });\n }", "public function clear() {\n\t\t$this->backends = [];\n\t\t$this->initializedBackends = [];\n\t}", "public function reset() : void\n {\n $this->getFilesystemLoader()->reset();\n }", "public function clearModels()\n {\n $this->_models = array();\n return $this;\n }", "protected static function boot()\n\t{\n\t\tparent::boot();\n\t\tModel::unguard();\n\t}", "private function reset()\n {\n $this->human->reset();\n $this->machine->reset();\n $this->memory->reset();\n }", "protected function bootIfNotBooted()\n {\n if (! isset(static::$booted[static::class])) {\n static::$booted[static::class] = true;\n\n $this->fireModelEvent('booting', false);\n\n static::boot();\n\n $this->fireModelEvent('booted', false);\n }\n }", "protected function reset(): void\n {\n $this->bot = null;\n $this->client = null;\n $this->device = null;\n $this->os = null;\n $this->brand = '';\n $this->model = '';\n $this->parsed = false;\n }", "public function resetDataModel() {\r\n $this->arrModel = array();\r\n $intPackageId = NULL;\r\n }", "protected function bootIfNotBooted()\n {\n if (! isset(static::$booted[static::class])) {\n static::$booted[static::class] = true;\n\n $this->fireModelEvent('booting', false);\n\n static::booting();\n static::boot();\n static::booted();\n\n $this->fireModelEvent('booted', false);\n }\n }", "protected static function boot()\n {\n parent::boot();\n\n static::deleting(function ($model) {\n $model->roles()->detach();\n $model->routes()->detach();\n $model->actions()->detach();\n });\n }", "public static function clear_all() {\n\t\tstatic::$cache = array();\n\t\tstatic::$mapping = array();\n\t}", "public function unsetAll() {\n\t\tparent::unsetAll();\n\t}", "protected function clear()\n {\n static::destroyApplication();\n }", "public function reset()\n\t{\n\t\t$this->queries = [];\n\t\t$this->count = [\n\t\t\t'total' => 0, 'slow' => 0, 'select' => 0, 'insert' => 0, 'update' => 0, 'delete' => 0, 'other' => 0\n\t\t];\n\n\t\t$this->modelsActions = [];\n\t\t$this->modelsCount = [\n\t\t\t'retrieved' => [], 'created' => [], 'updated' => [], 'deleted' => []\n\t\t];\n\n\t\t$this->nextQueryModel = null;\n\t}", "public function purge(): void\n {\n $this->boot();\n $this->configuration->eventDispatcher()->dispatch(new Clear($this));\n }", "public static function reset() {\n\t\tself::$objects = array();\n\t}", "public function reset()\n {\n $this->env = array();\n $this->object_handlers = array();\n $this->pagetitle = '';\n }", "public function resetAll()\n {\n $this->reset();\n $this->resetFlash();\n }", "protected static function booted()\n\t{\n\t\tstatic::deleting(function ($university) {\n\t\t\t$university->faculties->each->delete();\n\t\t\t$university->posts->each->delete();\n\t\t\t$university->events->each->delete();\n\t\t});\n\t}", "public function clear()\n {\n foreach ($this->backends as $b) {\n $b->clear();\n }\n }", "public function clearModules();", "private function _unsetSetup()\n\t{\n\t\tforeach ( $this->_setup as $setup )\n\t\t{\n\t\t\t$setup->disconnect();\n\t\t}\n\n\t\t$this->_setup = null;\n\t\t$this->_setup = array();\n\t}", "protected function reset()\n {\n $this->config = array();\n $this->pathsToIgnore = array();\n }", "public function clearCMDTAppareils()\n {\n $this->collCMDTAppareils = null; // important to set this to NULL since that means it is uninitialized\n }", "function unbindAll() {\n foreach (array(\n 'hasOne' => array_keys($this->hasOne),\n 'hasMany' => array_keys($this->hasMany),\n 'belongsTo' => array_keys($this->belongsTo),\n 'hasAndBelongsToMany' => array_keys($this->hasAndBelongsToMany)\n ) as $relation => $model) {\n $this->unbindModel(array($relation => $model));\n }\n }", "protected static function booted()\n\t{\n\t\tstatic::deleting(function ($tool) {\n\t\t\t$tool->comments()->delete();\n\t\t\t$tool->files->each->delete();\n\t\t\t$tool->tags()->detach();\n\t\t});\n\t}", "protected function resetSingletons() {}", "protected static function boot()\n {\n static::treeBoot();\n\n static::deleting(function ($model) {\n $model->roles()->detach();\n });\n }", "public function reset() {\n $this->setEntities([]);\n $this->setLinks([]);\n $this->setMetadata([]);\n $this->setIncludes([]);\n $this->setDynamic();\n $this->setCacheability(new CacheableMetadata());\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 }", "protected function _clearCache() {\n\t\t\tCache::clear(false, '_cake_model_');\n\t\t\tClassRegistry::flush();\n\t\t}", "protected function resetSynchronised()\n {\n /*\n * Lists\n */\n\n /** @var $lists Laposta_Connect_Model_Mysql4_List_Collection */\n $lists = Mage::getModel('lapostaconnect/list')->getCollection();\n\n /** @var $list Laposta_Connect_Model_List */\n foreach ($lists as $list) {\n $list->setLapostaId('');\n $list->setWebhookToken('');\n $list->setSyncTime(null);\n }\n\n $lists->save();\n\n Mage::helper('lapostaconnect')->log('Lists reset OK.');\n\n /*\n * Fields\n */\n\n $fields = Mage::getModel('lapostaconnect/field')->getCollection();\n\n /** @var $field Laposta_Connect_Model_Field */\n foreach ($fields as $field) {\n $field->setLapostaId('');\n $field->setLapostaTag('');\n $field->setSyncTime(null);\n }\n\n $fields->save();\n\n Mage::helper('lapostaconnect')->log('Fields reset OK.');\n\n /*\n * Subscribers\n */\n\n /** @var $subscribers Laposta_Connect_Model_Mysql4_Subscriber_Collection */\n $subscribers = Mage::getModel('lapostaconnect/subscriber')->getCollection();\n\n /** @var $subscriber Laposta_Connect_Model_Subscriber */\n foreach ($subscribers as $subscriber) {\n $subscriber->setLapostaId('');\n $subscriber->setSyncTime(null);\n }\n\n $subscribers->save();\n\n Mage::helper('lapostaconnect')->log('Subscribers reset OK.');\n }", "private function resetAll()\n {\n $this->resetJobManager();\n self::clearCurrentJob(null);\n RetailcrmLogger::output('CLI command lock was cleared.');\n }", "public static function cleanAllLists() {\r\n \tself::$list=array();\r\n }", "public function reset()\n {\n $this->_contacts = [];\n $this->_lists = [];\n }", "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "public static function reset()\n {\n self::$config = null;\n self::$configLoaded = false;\n }", "public function reset() {\n $this->folders = NULL;\n }", "public function uninstall() {\r\n\tforeach ($this->getModel() AS $model) {\r\n\t $this->getEntity($model->getName())->deleteTable();\r\n\t}\r\n }", "protected function bootIfNotBooted()\n {\n $class = get_class($this);\n\n if (!isset(static::$booted[$class])) {\n static::$booted[$class] = true;\n\n $this->fireModelEvent('booting', false);\n\n static::boot();\n\n $this->fireModelEvent('booted', false);\n }\n }", "public function clearDiscovery();", "public function clearAll() {}", "public static function boot()\n {\n parent::boot();\n static::deleting(function($project)\n {\n $project->accesses()->delete();\n $project->checklistAnswers()->delete();\n $project->bugs()->delete();\n $project->memos()->delete();\n $project->documentation()->delete();\n $project->internaldocumentation()->delete();\n $project->notifications()->delete();\n $project->mockupCategories()->delete();\n\n // In order to trigger static::delete in Mockup Model\n foreach ($project->mockups as $mockup) {\n $mockup->delete();\n }\n });\n }", "protected static function booted()\n {\n static::addGlobalScope(new DeletedAtScope());\n }", "public static function clear(): void\n {\n self::$dialects = [];\n self::$definitions = [];\n self::$loaded = [];\n }", "public function resetLookupCollections()\n\t{\n\t\t$this->lookupCollections[] = null;\n\t}", "public function clear_all()\n {\n }", "private function nuke()\n {\n \\lib\\Model\\ModelCache::clear($this);\n $this->__new=true;\n $this->__fields=array();\n $this->__isDirty=false;\n $this->__dirtyFields=array();\n }", "protected function clearAllPersistentData()\r\n {\r\n }", "public function clearAllCommand()\n {\n $this->eventRepository->removeAll();\n $this->eventSourceRepository->removeAll();\n }", "public function reset()\n {\n $this->values[self::_INSTANCE_INFO] = null;\n $this->values[self::_RSEED] = null;\n $this->values[self::_LOOTS] = array();\n $this->values[self::_HP_DROP] = array();\n }", "public static function clear()\n {\n self::$map = array();\n self::$instances = array();\n }", "public function clearAll();", "public function clearAll();", "public function clear_model($uniqueid, $modelversionoutputdir);", "public static function boot()\n {\n parent::boot();\n\n //delete your related models here, for example\n static::deleting(function($video)\n {\n foreach($video->videoImage as $image)\n {\n $image->delete();\n } \n\n foreach($video->userHistory as $history)\n {\n $history->delete();\n } \n\n foreach($video->userRating as $rating)\n {\n $rating->delete();\n } \n\n foreach($video->userWishlist as $wishlist)\n {\n $wishlist->delete();\n } \n });\t\n\n }", "public function reset(): void\n {\n $this->data = [];\n $this->relationships = [];\n }", "public function reset() {\n\t\t\t$this->arList = NULL; \t\n\t\t}", "public function reset()\n {\n $this->values[self::APP_NAME] = null;\n $this->values[self::SVR_NAME] = null;\n $this->values[self::SVR_POOL] = null;\n $this->values[self::TASK_CMD] = null;\n $this->values[self::TASK_ID] = null;\n $this->values[self::SUBTASK_ID] = null;\n $this->values[self::CMD_ID] = null;\n }", "public static function clear()\n {\n self::$config = array();\n }", "protected function resetExistingTables()\n {\n $this->existingTables = null;\n }", "public function reset() {\n\t\t$this->mimetypes = [];\n\t\t$this->mimetypeIds = [];\n\t}", "public function detachAll() {}", "public function reset()\n {\n $this->values[self::_NORMAL_STAGE_STARS] = array();\n $this->values[self::_ELITE_STAGE_STARS] = array();\n $this->values[self::_ELITE_DAILY_RECORD] = array();\n $this->values[self::_ELITE_RESET_TIME] = null;\n $this->values[self::_SWEEP] = null;\n $this->values[self::_ACT_DAILY_RECORD] = array();\n $this->values[self::_ACT_RESET_TIME] = null;\n }", "public function tearDown() {\n foreach ($this->registered as $l) {\n \\lang\\ClassLoader::removeLoader($l);\n }\n }", "public function reset(): void\n {\n $this->_add = new SplObjectStorage();\n $this->_delete = new SplObjectStorage();\n }", "private function clear(): void\n {\n $this->centralDirectoryRecords = [];\n $this->offset = 0;\n\n if($this->operationMode === OperationMode::NORMAL) {\n $this->ready = false;\n $this->recordedSimulation = [];\n } else {\n $this->operationMode = OperationMode::NORMAL;\n }\n }", "public static function reset($destroyObjects = TRUE) {\n foreach (self::$connections as $object) {\n if ($destroyObjects) $object->destroy();\n self::unregisterObject($object);\n }\n self::$drivers = array();\n self::$connections = array();\n }", "private function _load_models()\r\n {\r\n foreach ($this->models as $model)\r\n {\r\n $this->load->model($this->_model_name($model), $model);\r\n }\r\n }", "public function reset()\n {\n $this->models = null;\n return $this;\n }", "public function forgetInstances()\n {\n $this->instances = [];\n }", "protected function bootIfNotBooted()\n {\n if (! isset(static::$booted[static::class])) {\n static::$booted[static::class] = true;\n }\n }", "public function delete_all() {\n\t\t$this->_cache = array();\n\t\t$this->_collections = array();\n\t}", "private function _load_models()\n {\n foreach ($this->models as $model)\n {\n $this->load->model($this->_model_name($model), $model);\n }\n }", "public final function destroy_all()\n {\n }", "public function deleteAllDependents() {\n\t\t$this->dependents = array();\n\t}", "public function cleanAll()\n {\n $this->filesystem->remove(self::getFilesList());\n }" ]
[ "0.8700318", "0.72563404", "0.66823345", "0.66046894", "0.6544441", "0.63992864", "0.63572377", "0.6318385", "0.6299947", "0.62808114", "0.6279543", "0.6196935", "0.616978", "0.6148886", "0.6119523", "0.61061716", "0.6072173", "0.6064169", "0.6059776", "0.6058886", "0.6057026", "0.5983577", "0.59491426", "0.5946936", "0.5938106", "0.5931766", "0.5930907", "0.5925575", "0.59067714", "0.58825743", "0.5866231", "0.58515453", "0.58484274", "0.58144367", "0.58058393", "0.58022785", "0.57966375", "0.5775653", "0.5775133", "0.5771819", "0.5751281", "0.5737997", "0.5733131", "0.5722156", "0.57133627", "0.571019", "0.571016", "0.57051414", "0.567556", "0.56742257", "0.56736934", "0.56651187", "0.5657526", "0.56531054", "0.56531054", "0.56531054", "0.56531054", "0.56531054", "0.5650076", "0.5648886", "0.5647893", "0.56459296", "0.5637851", "0.56368285", "0.5627626", "0.561878", "0.5613659", "0.56055826", "0.5597558", "0.55831194", "0.55733144", "0.55714935", "0.5568048", "0.5563661", "0.55598766", "0.55598766", "0.5540799", "0.5508164", "0.5502058", "0.55003864", "0.5495786", "0.54954207", "0.54901904", "0.5489257", "0.5480602", "0.54791516", "0.5469937", "0.54684365", "0.5468316", "0.54675156", "0.5466993", "0.5464949", "0.5456633", "0.54563844", "0.54553574", "0.54525924", "0.54502636", "0.5446699", "0.54295754" ]
0.89517516
1